forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 10ebd8556b7990499c896a550e3d416b444211e6
kernel/arch/parisc/kernel/unaligned.c
....@@ -1,23 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Unaligned memory access handler
34 *
45 * Copyright (C) 2001 Randolph Chung <tausq@debian.org>
56 * Significantly tweaked by LaMont Jones <lamont@debian.org>
6
- *
7
- * This program is free software; you can redistribute it and/or modify
8
- * it under the terms of the GNU General Public License as published by
9
- * the Free Software Foundation; either version 2, or (at your option)
10
- * any later version.
11
- *
12
- * This program is distributed in the hope that it will be useful,
13
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
- * GNU General Public License for more details.
16
- *
17
- * You should have received a copy of the GNU General Public License
18
- * along with this program; if not, write to the Free Software
19
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20
- *
217 */
228
239 #include <linux/jiffies.h>
....@@ -121,7 +107,7 @@
121107 #define R1(i) (((i)>>21)&0x1f)
122108 #define R2(i) (((i)>>16)&0x1f)
123109 #define R3(i) ((i)&0x1f)
124
-#define FR3(i) ((((i)<<1)&0x1f)|(((i)>>6)&1))
110
+#define FR3(i) ((((i)&0x1f)<<1)|(((i)>>6)&1))
125111 #define IM(i,n) (((i)>>1&((1<<(n-1))-1))|((i)&1?((0-1L)<<(n-1)):0))
126112 #define IM5_2(i) IM((i)>>16,5)
127113 #define IM5_3(i) IM((i),5)
....@@ -690,14 +676,14 @@
690676 if (ret == ERR_PAGEFAULT)
691677 {
692678 force_sig_fault(SIGSEGV, SEGV_MAPERR,
693
- (void __user *)regs->ior, current);
679
+ (void __user *)regs->ior);
694680 }
695681 else
696682 {
697683 force_sigbus:
698684 /* couldn't handle it ... */
699685 force_sig_fault(SIGBUS, BUS_ADRALN,
700
- (void __user *)regs->ior, current);
686
+ (void __user *)regs->ior);
701687 }
702688
703689 return;