| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Unaligned memory access handler |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (C) 2001 Randolph Chung <tausq@debian.org> |
|---|
| 5 | 6 | * 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 | | - * |
|---|
| 21 | 7 | */ |
|---|
| 22 | 8 | |
|---|
| 23 | 9 | #include <linux/jiffies.h> |
|---|
| .. | .. |
|---|
| 121 | 107 | #define R1(i) (((i)>>21)&0x1f) |
|---|
| 122 | 108 | #define R2(i) (((i)>>16)&0x1f) |
|---|
| 123 | 109 | #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)) |
|---|
| 125 | 111 | #define IM(i,n) (((i)>>1&((1<<(n-1))-1))|((i)&1?((0-1L)<<(n-1)):0)) |
|---|
| 126 | 112 | #define IM5_2(i) IM((i)>>16,5) |
|---|
| 127 | 113 | #define IM5_3(i) IM((i),5) |
|---|
| .. | .. |
|---|
| 690 | 676 | if (ret == ERR_PAGEFAULT) |
|---|
| 691 | 677 | { |
|---|
| 692 | 678 | force_sig_fault(SIGSEGV, SEGV_MAPERR, |
|---|
| 693 | | - (void __user *)regs->ior, current); |
|---|
| 679 | + (void __user *)regs->ior); |
|---|
| 694 | 680 | } |
|---|
| 695 | 681 | else |
|---|
| 696 | 682 | { |
|---|
| 697 | 683 | force_sigbus: |
|---|
| 698 | 684 | /* couldn't handle it ... */ |
|---|
| 699 | 685 | force_sig_fault(SIGBUS, BUS_ADRALN, |
|---|
| 700 | | - (void __user *)regs->ior, current); |
|---|
| 686 | + (void __user *)regs->ior); |
|---|
| 701 | 687 | } |
|---|
| 702 | 688 | |
|---|
| 703 | 689 | return; |
|---|