diff options
26 files changed, 327 insertions, 423 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index fa1b13996bd3..2e4fe5450fea 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
| @@ -9116,6 +9116,9 @@ F: arch/um/os-Linux/drivers/ | |||
| 9116 | 9116 | ||
| 9117 | TURBOCHANNEL SUBSYSTEM | 9117 | TURBOCHANNEL SUBSYSTEM |
| 9118 | M: "Maciej W. Rozycki" <macro@linux-mips.org> | 9118 | M: "Maciej W. Rozycki" <macro@linux-mips.org> |
| 9119 | M: Ralf Baechle <ralf@linux-mips.org> | ||
| 9120 | L: linux-mips@linux-mips.org | ||
| 9121 | Q: http://patchwork.linux-mips.org/project/linux-mips/list/ | ||
| 9119 | S: Maintained | 9122 | S: Maintained |
| 9120 | F: drivers/tc/ | 9123 | F: drivers/tc/ |
| 9121 | F: include/linux/tc.h | 9124 | F: include/linux/tc.h |
diff --git a/arch/mips/dec/ecc-berr.c b/arch/mips/dec/ecc-berr.c index 5abf4e894216..2a66e908f6a9 100644 --- a/arch/mips/dec/ecc-berr.c +++ b/arch/mips/dec/ecc-berr.c | |||
| @@ -21,6 +21,7 @@ | |||
| 21 | #include <asm/addrspace.h> | 21 | #include <asm/addrspace.h> |
| 22 | #include <asm/bootinfo.h> | 22 | #include <asm/bootinfo.h> |
| 23 | #include <asm/cpu.h> | 23 | #include <asm/cpu.h> |
| 24 | #include <asm/cpu-type.h> | ||
| 24 | #include <asm/irq_regs.h> | 25 | #include <asm/irq_regs.h> |
| 25 | #include <asm/processor.h> | 26 | #include <asm/processor.h> |
| 26 | #include <asm/ptrace.h> | 27 | #include <asm/ptrace.h> |
diff --git a/arch/mips/dec/kn02xa-berr.c b/arch/mips/dec/kn02xa-berr.c index f434b759e3b9..ec606363b806 100644 --- a/arch/mips/dec/kn02xa-berr.c +++ b/arch/mips/dec/kn02xa-berr.c | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | #include <linux/types.h> | 19 | #include <linux/types.h> |
| 20 | 20 | ||
| 21 | #include <asm/addrspace.h> | 21 | #include <asm/addrspace.h> |
| 22 | #include <asm/cpu-type.h> | ||
| 22 | #include <asm/irq_regs.h> | 23 | #include <asm/irq_regs.h> |
| 23 | #include <asm/ptrace.h> | 24 | #include <asm/ptrace.h> |
| 24 | #include <asm/traps.h> | 25 | #include <asm/traps.h> |
diff --git a/arch/mips/dec/prom/Makefile b/arch/mips/dec/prom/Makefile index 064ae7a76bdc..ae73e42ac20b 100644 --- a/arch/mips/dec/prom/Makefile +++ b/arch/mips/dec/prom/Makefile | |||
| @@ -6,4 +6,3 @@ | |||
| 6 | lib-y += init.o memory.o cmdline.o identify.o console.o | 6 | lib-y += init.o memory.o cmdline.o identify.o console.o |
| 7 | 7 | ||
| 8 | lib-$(CONFIG_32BIT) += locore.o | 8 | lib-$(CONFIG_32BIT) += locore.o |
| 9 | lib-$(CONFIG_64BIT) += call_o32.o | ||
diff --git a/arch/mips/dec/prom/call_o32.S b/arch/mips/dec/prom/call_o32.S deleted file mode 100644 index 8c8498159e43..000000000000 --- a/arch/mips/dec/prom/call_o32.S +++ /dev/null | |||
| @@ -1,89 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * O32 interface for the 64 (or N32) ABI. | ||
| 3 | * | ||
| 4 | * Copyright (C) 2002 Maciej W. Rozycki | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or | ||
| 7 | * modify it under the terms of the GNU General Public License | ||
| 8 | * as published by the Free Software Foundation; either version | ||
| 9 | * 2 of the License, or (at your option) any later version. | ||
| 10 | */ | ||
| 11 | |||
| 12 | #include <asm/asm.h> | ||
| 13 | #include <asm/regdef.h> | ||
| 14 | |||
| 15 | /* Maximum number of arguments supported. Must be even! */ | ||
| 16 | #define O32_ARGC 32 | ||
| 17 | /* Number of static registers we save. */ | ||
| 18 | #define O32_STATC 11 | ||
| 19 | /* Frame size for both of the above. */ | ||
| 20 | #define O32_FRAMESZ (4 * O32_ARGC + SZREG * O32_STATC) | ||
| 21 | |||
| 22 | .text | ||
| 23 | |||
| 24 | /* | ||
| 25 | * O32 function call dispatcher, for interfacing 32-bit ROM routines. | ||
| 26 | * | ||
| 27 | * The standard 64 (N32) calling sequence is supported, with a0 | ||
| 28 | * holding a function pointer, a1-a7 -- its first seven arguments | ||
| 29 | * and the stack -- remaining ones (up to O32_ARGC, including a1-a7). | ||
| 30 | * Static registers, gp and fp are preserved, v0 holds a result. | ||
| 31 | * This code relies on the called o32 function for sp and ra | ||
| 32 | * restoration and thus both this dispatcher and the current stack | ||
| 33 | * have to be placed in a KSEGx (or KUSEG) address space. Any | ||
| 34 | * pointers passed have to point to addresses within one of these | ||
| 35 | * spaces as well. | ||
| 36 | */ | ||
| 37 | NESTED(call_o32, O32_FRAMESZ, ra) | ||
| 38 | REG_SUBU sp,O32_FRAMESZ | ||
| 39 | |||
| 40 | REG_S ra,O32_FRAMESZ-1*SZREG(sp) | ||
| 41 | REG_S fp,O32_FRAMESZ-2*SZREG(sp) | ||
| 42 | REG_S gp,O32_FRAMESZ-3*SZREG(sp) | ||
| 43 | REG_S s7,O32_FRAMESZ-4*SZREG(sp) | ||
| 44 | REG_S s6,O32_FRAMESZ-5*SZREG(sp) | ||
| 45 | REG_S s5,O32_FRAMESZ-6*SZREG(sp) | ||
| 46 | REG_S s4,O32_FRAMESZ-7*SZREG(sp) | ||
| 47 | REG_S s3,O32_FRAMESZ-8*SZREG(sp) | ||
| 48 | REG_S s2,O32_FRAMESZ-9*SZREG(sp) | ||
| 49 | REG_S s1,O32_FRAMESZ-10*SZREG(sp) | ||
| 50 | REG_S s0,O32_FRAMESZ-11*SZREG(sp) | ||
| 51 | |||
| 52 | move jp,a0 | ||
| 53 | |||
| 54 | sll a0,a1,zero | ||
| 55 | sll a1,a2,zero | ||
| 56 | sll a2,a3,zero | ||
| 57 | sll a3,a4,zero | ||
| 58 | sw a5,0x10(sp) | ||
| 59 | sw a6,0x14(sp) | ||
| 60 | sw a7,0x18(sp) | ||
| 61 | |||
| 62 | PTR_LA t0,O32_FRAMESZ(sp) | ||
| 63 | PTR_LA t1,0x1c(sp) | ||
| 64 | li t2,O32_ARGC-7 | ||
| 65 | 1: | ||
| 66 | lw t3,(t0) | ||
| 67 | REG_ADDU t0,SZREG | ||
| 68 | sw t3,(t1) | ||
| 69 | REG_SUBU t2,1 | ||
| 70 | REG_ADDU t1,4 | ||
| 71 | bnez t2,1b | ||
| 72 | |||
| 73 | jalr jp | ||
| 74 | |||
| 75 | REG_L s0,O32_FRAMESZ-11*SZREG(sp) | ||
| 76 | REG_L s1,O32_FRAMESZ-10*SZREG(sp) | ||
| 77 | REG_L s2,O32_FRAMESZ-9*SZREG(sp) | ||
| 78 | REG_L s3,O32_FRAMESZ-8*SZREG(sp) | ||
| 79 | REG_L s4,O32_FRAMESZ-7*SZREG(sp) | ||
| 80 | REG_L s5,O32_FRAMESZ-6*SZREG(sp) | ||
| 81 | REG_L s6,O32_FRAMESZ-5*SZREG(sp) | ||
| 82 | REG_L s7,O32_FRAMESZ-4*SZREG(sp) | ||
| 83 | REG_L gp,O32_FRAMESZ-3*SZREG(sp) | ||
| 84 | REG_L fp,O32_FRAMESZ-2*SZREG(sp) | ||
| 85 | REG_L ra,O32_FRAMESZ-1*SZREG(sp) | ||
| 86 | |||
| 87 | REG_ADDU sp,O32_FRAMESZ | ||
| 88 | jr ra | ||
| 89 | END(call_o32) | ||
diff --git a/arch/mips/fw/lib/call_o32.S b/arch/mips/fw/lib/call_o32.S index b308b2a0613e..4703fe4dbd9a 100644 --- a/arch/mips/fw/lib/call_o32.S +++ b/arch/mips/fw/lib/call_o32.S | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * O32 interface for the 64 (or N32) ABI. | 2 | * O32 interface for the 64 (or N32) ABI. |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2002 Maciej W. Rozycki | 4 | * Copyright (C) 2002, 2014 Maciej W. Rozycki |
| 5 | * | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or | 6 | * This program is free software; you can redistribute it and/or |
| 7 | * modify it under the terms of the GNU General Public License | 7 | * modify it under the terms of the GNU General Public License |
| @@ -12,28 +12,37 @@ | |||
| 12 | #include <asm/asm.h> | 12 | #include <asm/asm.h> |
| 13 | #include <asm/regdef.h> | 13 | #include <asm/regdef.h> |
| 14 | 14 | ||
| 15 | /* O32 register size. */ | ||
| 16 | #define O32_SZREG 4 | ||
| 15 | /* Maximum number of arguments supported. Must be even! */ | 17 | /* Maximum number of arguments supported. Must be even! */ |
| 16 | #define O32_ARGC 32 | 18 | #define O32_ARGC 32 |
| 17 | /* Number of static registers we save. */ | 19 | /* Number of static registers we save. */ |
| 18 | #define O32_STATC 11 | 20 | #define O32_STATC 11 |
| 19 | /* Frame size for static register */ | 21 | /* Argument area frame size. */ |
| 20 | #define O32_FRAMESZ (SZREG * O32_STATC) | 22 | #define O32_ARGSZ (O32_SZREG * O32_ARGC) |
| 21 | /* Frame size on new stack */ | 23 | /* Static register save area frame size. */ |
| 22 | #define O32_FRAMESZ_NEW (SZREG + 4 * O32_ARGC) | 24 | #define O32_STATSZ (SZREG * O32_STATC) |
| 25 | /* Stack pointer register save area frame size. */ | ||
| 26 | #define O32_SPSZ SZREG | ||
| 27 | /* Combined area frame size. */ | ||
| 28 | #define O32_FRAMESZ (O32_ARGSZ + O32_SPSZ + O32_STATSZ) | ||
| 29 | /* Switched stack frame size. */ | ||
| 30 | #define O32_NFRAMESZ (O32_ARGSZ + O32_SPSZ) | ||
| 23 | 31 | ||
| 24 | .text | 32 | .text |
| 25 | 33 | ||
| 26 | /* | 34 | /* |
| 27 | * O32 function call dispatcher, for interfacing 32-bit ROM routines. | 35 | * O32 function call dispatcher, for interfacing 32-bit ROM routines. |
| 28 | * | 36 | * |
| 29 | * The standard 64 (N32) calling sequence is supported, with a0 | 37 | * The standard 64 (N32) calling sequence is supported, with a0 holding |
| 30 | * holding a function pointer, a1 a new stack pointer, a2-a7 -- its | 38 | * a function pointer, a1 a pointer to the new stack to call the |
| 31 | * first six arguments and the stack -- remaining ones (up to O32_ARGC, | 39 | * function with or 0 if no stack switching is requested, a2-a7 -- the |
| 32 | * including a2-a7). Static registers, gp and fp are preserved, v0 holds | 40 | * function call's first six arguments, and the stack -- the remaining |
| 33 | * a result. This code relies on the called o32 function for sp and ra | 41 | * arguments (up to O32_ARGC, including a2-a7). Static registers, gp |
| 34 | * restoration and this dispatcher has to be placed in a KSEGx (or KUSEG) | 42 | * and fp are preserved, v0 holds the result. This code relies on the |
| 35 | * address space. Any pointers passed have to point to addresses within | 43 | * called o32 function for sp and ra restoration and this dispatcher has |
| 36 | * one of these spaces as well. | 44 | * to be placed in a KSEGx (or KUSEG) address space. Any pointers |
| 45 | * passed have to point to addresses within one of these spaces as well. | ||
| 37 | */ | 46 | */ |
| 38 | NESTED(call_o32, O32_FRAMESZ, ra) | 47 | NESTED(call_o32, O32_FRAMESZ, ra) |
| 39 | REG_SUBU sp,O32_FRAMESZ | 48 | REG_SUBU sp,O32_FRAMESZ |
| @@ -51,32 +60,36 @@ NESTED(call_o32, O32_FRAMESZ, ra) | |||
| 51 | REG_S s0,O32_FRAMESZ-11*SZREG(sp) | 60 | REG_S s0,O32_FRAMESZ-11*SZREG(sp) |
| 52 | 61 | ||
| 53 | move jp,a0 | 62 | move jp,a0 |
| 54 | REG_SUBU s0,a1,O32_FRAMESZ_NEW | 63 | |
| 55 | REG_S sp,O32_FRAMESZ_NEW-1*SZREG(s0) | 64 | move fp,sp |
| 65 | beqz a1,0f | ||
| 66 | REG_SUBU fp,a1,O32_NFRAMESZ | ||
| 67 | 0: | ||
| 68 | REG_S sp,O32_NFRAMESZ-1*SZREG(fp) | ||
| 56 | 69 | ||
| 57 | sll a0,a2,zero | 70 | sll a0,a2,zero |
| 58 | sll a1,a3,zero | 71 | sll a1,a3,zero |
| 59 | sll a2,a4,zero | 72 | sll a2,a4,zero |
| 60 | sll a3,a5,zero | 73 | sll a3,a5,zero |
| 61 | sw a6,0x10(s0) | 74 | sw a6,4*O32_SZREG(fp) |
| 62 | sw a7,0x14(s0) | 75 | sw a7,5*O32_SZREG(fp) |
| 63 | 76 | ||
| 64 | PTR_LA t0,O32_FRAMESZ(sp) | 77 | PTR_LA t0,O32_FRAMESZ(sp) |
| 65 | PTR_LA t1,0x18(s0) | 78 | PTR_LA t1,6*O32_SZREG(fp) |
| 66 | li t2,O32_ARGC-6 | 79 | li t2,O32_ARGC-6 |
| 67 | 1: | 80 | 1: |
| 68 | lw t3,(t0) | 81 | lw t3,(t0) |
| 69 | REG_ADDU t0,SZREG | 82 | REG_ADDU t0,SZREG |
| 70 | sw t3,(t1) | 83 | sw t3,(t1) |
| 71 | REG_SUBU t2,1 | 84 | REG_SUBU t2,1 |
| 72 | REG_ADDU t1,4 | 85 | REG_ADDU t1,O32_SZREG |
| 73 | bnez t2,1b | 86 | bnez t2,1b |
| 74 | 87 | ||
| 75 | move sp,s0 | 88 | move sp,fp |
| 76 | 89 | ||
| 77 | jalr jp | 90 | jalr jp |
| 78 | 91 | ||
| 79 | REG_L sp,O32_FRAMESZ_NEW-1*SZREG(sp) | 92 | REG_L sp,O32_NFRAMESZ-1*SZREG(sp) |
| 80 | 93 | ||
| 81 | REG_L s0,O32_FRAMESZ-11*SZREG(sp) | 94 | REG_L s0,O32_FRAMESZ-11*SZREG(sp) |
| 82 | REG_L s1,O32_FRAMESZ-10*SZREG(sp) | 95 | REG_L s1,O32_FRAMESZ-10*SZREG(sp) |
diff --git a/arch/mips/fw/sni/sniprom.c b/arch/mips/fw/sni/sniprom.c index 2c2cb182af4e..6aa264b9856a 100644 --- a/arch/mips/fw/sni/sniprom.c +++ b/arch/mips/fw/sni/sniprom.c | |||
| @@ -40,7 +40,8 @@ | |||
| 40 | 40 | ||
| 41 | #ifdef CONFIG_64BIT | 41 | #ifdef CONFIG_64BIT |
| 42 | 42 | ||
| 43 | static u8 o32_stk[16384]; | 43 | /* O32 stack has to be 8-byte aligned. */ |
| 44 | static u64 o32_stk[4096]; | ||
| 44 | #define O32_STK &o32_stk[sizeof(o32_stk)] | 45 | #define O32_STK &o32_stk[sizeof(o32_stk)] |
| 45 | 46 | ||
| 46 | #define __PROM_O32(fun, arg) fun arg __asm__(#fun); \ | 47 | #define __PROM_O32(fun, arg) fun arg __asm__(#fun); \ |
diff --git a/arch/mips/include/asm/dec/prom.h b/arch/mips/include/asm/dec/prom.h index c0ead6313845..b59a2103b61a 100644 --- a/arch/mips/include/asm/dec/prom.h +++ b/arch/mips/include/asm/dec/prom.h | |||
| @@ -113,31 +113,31 @@ extern int (*__pmax_close)(int); | |||
| 113 | #define __DEC_PROM_O32(fun, arg) fun arg __asm__(#fun); \ | 113 | #define __DEC_PROM_O32(fun, arg) fun arg __asm__(#fun); \ |
| 114 | __asm__(#fun " = call_o32") | 114 | __asm__(#fun " = call_o32") |
| 115 | 115 | ||
| 116 | int __DEC_PROM_O32(_rex_bootinit, (int (*)(void))); | 116 | int __DEC_PROM_O32(_rex_bootinit, (int (*)(void), void *)); |
| 117 | int __DEC_PROM_O32(_rex_bootread, (int (*)(void))); | 117 | int __DEC_PROM_O32(_rex_bootread, (int (*)(void), void *)); |
| 118 | int __DEC_PROM_O32(_rex_getbitmap, (int (*)(memmap *), memmap *)); | 118 | int __DEC_PROM_O32(_rex_getbitmap, (int (*)(memmap *), void *, memmap *)); |
| 119 | unsigned long *__DEC_PROM_O32(_rex_slot_address, | 119 | unsigned long *__DEC_PROM_O32(_rex_slot_address, |
| 120 | (unsigned long *(*)(int), int)); | 120 | (unsigned long *(*)(int), void *, int)); |
| 121 | void *__DEC_PROM_O32(_rex_gettcinfo, (void *(*)(void))); | 121 | void *__DEC_PROM_O32(_rex_gettcinfo, (void *(*)(void), void *)); |
| 122 | int __DEC_PROM_O32(_rex_getsysid, (int (*)(void))); | 122 | int __DEC_PROM_O32(_rex_getsysid, (int (*)(void), void *)); |
| 123 | void __DEC_PROM_O32(_rex_clear_cache, (void (*)(void))); | 123 | void __DEC_PROM_O32(_rex_clear_cache, (void (*)(void), void *)); |
| 124 | 124 | ||
| 125 | int __DEC_PROM_O32(_prom_getchar, (int (*)(void))); | 125 | int __DEC_PROM_O32(_prom_getchar, (int (*)(void), void *)); |
| 126 | char *__DEC_PROM_O32(_prom_getenv, (char *(*)(char *), char *)); | 126 | char *__DEC_PROM_O32(_prom_getenv, (char *(*)(char *), void *, char *)); |
| 127 | int __DEC_PROM_O32(_prom_printf, (int (*)(char *, ...), char *, ...)); | 127 | int __DEC_PROM_O32(_prom_printf, (int (*)(char *, ...), void *, char *, ...)); |
| 128 | 128 | ||
| 129 | 129 | ||
| 130 | #define rex_bootinit() _rex_bootinit(__rex_bootinit) | 130 | #define rex_bootinit() _rex_bootinit(__rex_bootinit, NULL) |
| 131 | #define rex_bootread() _rex_bootread(__rex_bootread) | 131 | #define rex_bootread() _rex_bootread(__rex_bootread, NULL) |
| 132 | #define rex_getbitmap(x) _rex_getbitmap(__rex_getbitmap, x) | 132 | #define rex_getbitmap(x) _rex_getbitmap(__rex_getbitmap, NULL, x) |
| 133 | #define rex_slot_address(x) _rex_slot_address(__rex_slot_address, x) | 133 | #define rex_slot_address(x) _rex_slot_address(__rex_slot_address, NULL, x) |
| 134 | #define rex_gettcinfo() _rex_gettcinfo(__rex_gettcinfo) | 134 | #define rex_gettcinfo() _rex_gettcinfo(__rex_gettcinfo, NULL) |
| 135 | #define rex_getsysid() _rex_getsysid(__rex_getsysid) | 135 | #define rex_getsysid() _rex_getsysid(__rex_getsysid, NULL) |
| 136 | #define rex_clear_cache() _rex_clear_cache(__rex_clear_cache) | 136 | #define rex_clear_cache() _rex_clear_cache(__rex_clear_cache, NULL) |
| 137 | 137 | ||
| 138 | #define prom_getchar() _prom_getchar(__prom_getchar) | 138 | #define prom_getchar() _prom_getchar(__prom_getchar, NULL) |
| 139 | #define prom_getenv(x) _prom_getenv(__prom_getenv, x) | 139 | #define prom_getenv(x) _prom_getenv(__prom_getenv, NULL, x) |
| 140 | #define prom_printf(x...) _prom_printf(__prom_printf, x) | 140 | #define prom_printf(x...) _prom_printf(__prom_printf, NULL, x) |
| 141 | 141 | ||
| 142 | #else /* !CONFIG_64BIT */ | 142 | #else /* !CONFIG_64BIT */ |
| 143 | 143 | ||
diff --git a/arch/mips/include/asm/rm9k-ocd.h b/arch/mips/include/asm/rm9k-ocd.h deleted file mode 100644 index b0b80d9ecf96..000000000000 --- a/arch/mips/include/asm/rm9k-ocd.h +++ /dev/null | |||
| @@ -1,56 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2004 by Basler Vision Technologies AG | ||
| 3 | * Author: Thomas Koeller <thomas.koeller@baslerweb.com> | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify | ||
| 6 | * it under the terms of the GNU General Public License as published by | ||
| 7 | * the Free Software Foundation; either version 2 of the License, or | ||
| 8 | * (at your option) any later version. | ||
| 9 | * | ||
| 10 | * This program is distributed in the hope that it will be useful, | ||
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 13 | * GNU General Public License for more details. | ||
| 14 | * | ||
| 15 | * You should have received a copy of the GNU General Public License | ||
| 16 | * along with this program; if not, write to the Free Software | ||
| 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 18 | */ | ||
| 19 | |||
| 20 | #if !defined(_ASM_RM9K_OCD_H) | ||
| 21 | #define _ASM_RM9K_OCD_H | ||
| 22 | |||
| 23 | #include <linux/types.h> | ||
| 24 | #include <linux/spinlock.h> | ||
| 25 | #include <asm/io.h> | ||
| 26 | |||
| 27 | extern volatile void __iomem * const ocd_base; | ||
| 28 | extern volatile void __iomem * const titan_base; | ||
| 29 | |||
| 30 | #define ocd_addr(__x__) (ocd_base + (__x__)) | ||
| 31 | #define titan_addr(__x__) (titan_base + (__x__)) | ||
| 32 | #define scram_addr(__x__) (scram_base + (__x__)) | ||
| 33 | |||
| 34 | /* OCD register access */ | ||
| 35 | #define ocd_readl(__offs__) __raw_readl(ocd_addr(__offs__)) | ||
| 36 | #define ocd_readw(__offs__) __raw_readw(ocd_addr(__offs__)) | ||
| 37 | #define ocd_readb(__offs__) __raw_readb(ocd_addr(__offs__)) | ||
| 38 | #define ocd_writel(__val__, __offs__) \ | ||
| 39 | __raw_writel((__val__), ocd_addr(__offs__)) | ||
| 40 | #define ocd_writew(__val__, __offs__) \ | ||
| 41 | __raw_writew((__val__), ocd_addr(__offs__)) | ||
| 42 | #define ocd_writeb(__val__, __offs__) \ | ||
| 43 | __raw_writeb((__val__), ocd_addr(__offs__)) | ||
| 44 | |||
| 45 | /* TITAN register access - 32 bit-wide only */ | ||
| 46 | #define titan_readl(__offs__) __raw_readl(titan_addr(__offs__)) | ||
| 47 | #define titan_writel(__val__, __offs__) \ | ||
| 48 | __raw_writel((__val__), titan_addr(__offs__)) | ||
| 49 | |||
| 50 | /* Protect access to shared TITAN registers */ | ||
| 51 | extern spinlock_t titan_lock; | ||
| 52 | extern int titan_irqflags; | ||
| 53 | #define lock_titan_regs() spin_lock_irqsave(&titan_lock, titan_irqflags) | ||
| 54 | #define unlock_titan_regs() spin_unlock_irqrestore(&titan_lock, titan_irqflags) | ||
| 55 | |||
| 56 | #endif /* !defined(_ASM_RM9K_OCD_H) */ | ||
diff --git a/arch/mips/include/asm/syscall.h b/arch/mips/include/asm/syscall.h index c6e9cd2bca8d..17960fe7a8ce 100644 --- a/arch/mips/include/asm/syscall.h +++ b/arch/mips/include/asm/syscall.h | |||
| @@ -133,6 +133,8 @@ static inline int syscall_get_arch(void) | |||
| 133 | #ifdef CONFIG_64BIT | 133 | #ifdef CONFIG_64BIT |
| 134 | if (!test_thread_flag(TIF_32BIT_REGS)) | 134 | if (!test_thread_flag(TIF_32BIT_REGS)) |
| 135 | arch |= __AUDIT_ARCH_64BIT; | 135 | arch |= __AUDIT_ARCH_64BIT; |
| 136 | if (test_thread_flag(TIF_32BIT_ADDR)) | ||
| 137 | arch |= __AUDIT_ARCH_CONVENTION_MIPS64_N32; | ||
| 136 | #endif | 138 | #endif |
| 137 | #if defined(__LITTLE_ENDIAN) | 139 | #if defined(__LITTLE_ENDIAN) |
| 138 | arch |= __AUDIT_ARCH_LE; | 140 | arch |= __AUDIT_ARCH_LE; |
diff --git a/arch/mips/include/uapi/asm/inst.h b/arch/mips/include/uapi/asm/inst.h index df6e775f3fef..3125797f2a88 100644 --- a/arch/mips/include/uapi/asm/inst.h +++ b/arch/mips/include/uapi/asm/inst.h | |||
| @@ -484,13 +484,13 @@ enum MIPS6e_i8_func { | |||
| 484 | * Damn ... bitfields depend from byteorder :-( | 484 | * Damn ... bitfields depend from byteorder :-( |
| 485 | */ | 485 | */ |
| 486 | #ifdef __MIPSEB__ | 486 | #ifdef __MIPSEB__ |
| 487 | #define BITFIELD_FIELD(field, more) \ | 487 | #define __BITFIELD_FIELD(field, more) \ |
| 488 | field; \ | 488 | field; \ |
| 489 | more | 489 | more |
| 490 | 490 | ||
| 491 | #elif defined(__MIPSEL__) | 491 | #elif defined(__MIPSEL__) |
| 492 | 492 | ||
| 493 | #define BITFIELD_FIELD(field, more) \ | 493 | #define __BITFIELD_FIELD(field, more) \ |
| 494 | more \ | 494 | more \ |
| 495 | field; | 495 | field; |
| 496 | 496 | ||
| @@ -499,112 +499,112 @@ enum MIPS6e_i8_func { | |||
| 499 | #endif | 499 | #endif |
| 500 | 500 | ||
| 501 | struct j_format { | 501 | struct j_format { |
| 502 | BITFIELD_FIELD(unsigned int opcode : 6, /* Jump format */ | 502 | __BITFIELD_FIELD(unsigned int opcode : 6, /* Jump format */ |
| 503 | BITFIELD_FIELD(unsigned int target : 26, | 503 | __BITFIELD_FIELD(unsigned int target : 26, |
| 504 | ;)) | 504 | ;)) |
| 505 | }; | 505 | }; |
| 506 | 506 | ||
| 507 | struct i_format { /* signed immediate format */ | 507 | struct i_format { /* signed immediate format */ |
| 508 | BITFIELD_FIELD(unsigned int opcode : 6, | 508 | __BITFIELD_FIELD(unsigned int opcode : 6, |
| 509 | BITFIELD_FIELD(unsigned int rs : 5, | 509 | __BITFIELD_FIELD(unsigned int rs : 5, |
| 510 | BITFIELD_FIELD(unsigned int rt : 5, | 510 | __BITFIELD_FIELD(unsigned int rt : 5, |
| 511 | BITFIELD_FIELD(signed int simmediate : 16, | 511 | __BITFIELD_FIELD(signed int simmediate : 16, |
| 512 | ;)))) | 512 | ;)))) |
| 513 | }; | 513 | }; |
| 514 | 514 | ||
| 515 | struct u_format { /* unsigned immediate format */ | 515 | struct u_format { /* unsigned immediate format */ |
| 516 | BITFIELD_FIELD(unsigned int opcode : 6, | 516 | __BITFIELD_FIELD(unsigned int opcode : 6, |
| 517 | BITFIELD_FIELD(unsigned int rs : 5, | 517 | __BITFIELD_FIELD(unsigned int rs : 5, |
| 518 | BITFIELD_FIELD(unsigned int rt : 5, | 518 | __BITFIELD_FIELD(unsigned int rt : 5, |
| 519 | BITFIELD_FIELD(unsigned int uimmediate : 16, | 519 | __BITFIELD_FIELD(unsigned int uimmediate : 16, |
| 520 | ;)))) | 520 | ;)))) |
| 521 | }; | 521 | }; |
| 522 | 522 | ||
| 523 | struct c_format { /* Cache (>= R6000) format */ | 523 | struct c_format { /* Cache (>= R6000) format */ |
| 524 | BITFIELD_FIELD(unsigned int opcode : 6, | 524 | __BITFIELD_FIELD(unsigned int opcode : 6, |
| 525 | BITFIELD_FIELD(unsigned int rs : 5, | 525 | __BITFIELD_FIELD(unsigned int rs : 5, |
| 526 | BITFIELD_FIELD(unsigned int c_op : 3, | 526 | __BITFIELD_FIELD(unsigned int c_op : 3, |
| 527 | BITFIELD_FIELD(unsigned int cache : 2, | 527 | __BITFIELD_FIELD(unsigned int cache : 2, |
| 528 | BITFIELD_FIELD(unsigned int simmediate : 16, | 528 | __BITFIELD_FIELD(unsigned int simmediate : 16, |
| 529 | ;))))) | 529 | ;))))) |
| 530 | }; | 530 | }; |
| 531 | 531 | ||
| 532 | struct r_format { /* Register format */ | 532 | struct r_format { /* Register format */ |
| 533 | BITFIELD_FIELD(unsigned int opcode : 6, | 533 | __BITFIELD_FIELD(unsigned int opcode : 6, |
| 534 | BITFIELD_FIELD(unsigned int rs : 5, | 534 | __BITFIELD_FIELD(unsigned int rs : 5, |
| 535 | BITFIELD_FIELD(unsigned int rt : 5, | 535 | __BITFIELD_FIELD(unsigned int rt : 5, |
| 536 | BITFIELD_FIELD(unsigned int rd : 5, | 536 | __BITFIELD_FIELD(unsigned int rd : 5, |
| 537 | BITFIELD_FIELD(unsigned int re : 5, | 537 | __BITFIELD_FIELD(unsigned int re : 5, |
| 538 | BITFIELD_FIELD(unsigned int func : 6, | 538 | __BITFIELD_FIELD(unsigned int func : 6, |
| 539 | ;)))))) | 539 | ;)))))) |
| 540 | }; | 540 | }; |
| 541 | 541 | ||
| 542 | struct p_format { /* Performance counter format (R10000) */ | 542 | struct p_format { /* Performance counter format (R10000) */ |
| 543 | BITFIELD_FIELD(unsigned int opcode : 6, | 543 | __BITFIELD_FIELD(unsigned int opcode : 6, |
| 544 | BITFIELD_FIELD(unsigned int rs : 5, | 544 | __BITFIELD_FIELD(unsigned int rs : 5, |
| 545 | BITFIELD_FIELD(unsigned int rt : 5, | 545 | __BITFIELD_FIELD(unsigned int rt : 5, |
| 546 | BITFIELD_FIELD(unsigned int rd : 5, | 546 | __BITFIELD_FIELD(unsigned int rd : 5, |
| 547 | BITFIELD_FIELD(unsigned int re : 5, | 547 | __BITFIELD_FIELD(unsigned int re : 5, |
| 548 | BITFIELD_FIELD(unsigned int func : 6, | 548 | __BITFIELD_FIELD(unsigned int func : 6, |
| 549 | ;)))))) | 549 | ;)))))) |
| 550 | }; | 550 | }; |
| 551 | 551 | ||
| 552 | struct f_format { /* FPU register format */ | 552 | struct f_format { /* FPU register format */ |
| 553 | BITFIELD_FIELD(unsigned int opcode : 6, | 553 | __BITFIELD_FIELD(unsigned int opcode : 6, |
| 554 | BITFIELD_FIELD(unsigned int : 1, | 554 | __BITFIELD_FIELD(unsigned int : 1, |
| 555 | BITFIELD_FIELD(unsigned int fmt : 4, | 555 | __BITFIELD_FIELD(unsigned int fmt : 4, |
| 556 | BITFIELD_FIELD(unsigned int rt : 5, | 556 | __BITFIELD_FIELD(unsigned int rt : 5, |
| 557 | BITFIELD_FIELD(unsigned int rd : 5, | 557 | __BITFIELD_FIELD(unsigned int rd : 5, |
| 558 | BITFIELD_FIELD(unsigned int re : 5, | 558 | __BITFIELD_FIELD(unsigned int re : 5, |
| 559 | BITFIELD_FIELD(unsigned int func : 6, | 559 | __BITFIELD_FIELD(unsigned int func : 6, |
| 560 | ;))))))) | 560 | ;))))))) |
| 561 | }; | 561 | }; |
| 562 | 562 | ||
| 563 | struct ma_format { /* FPU multiply and add format (MIPS IV) */ | 563 | struct ma_format { /* FPU multiply and add format (MIPS IV) */ |
| 564 | BITFIELD_FIELD(unsigned int opcode : 6, | 564 | __BITFIELD_FIELD(unsigned int opcode : 6, |
| 565 | BITFIELD_FIELD(unsigned int fr : 5, | 565 | __BITFIELD_FIELD(unsigned int fr : 5, |
| 566 | BITFIELD_FIELD(unsigned int ft : 5, | 566 | __BITFIELD_FIELD(unsigned int ft : 5, |
| 567 | BITFIELD_FIELD(unsigned int fs : 5, | 567 | __BITFIELD_FIELD(unsigned int fs : 5, |
| 568 | BITFIELD_FIELD(unsigned int fd : 5, | 568 | __BITFIELD_FIELD(unsigned int fd : 5, |
| 569 | BITFIELD_FIELD(unsigned int func : 4, | 569 | __BITFIELD_FIELD(unsigned int func : 4, |
| 570 | BITFIELD_FIELD(unsigned int fmt : 2, | 570 | __BITFIELD_FIELD(unsigned int fmt : 2, |
| 571 | ;))))))) | 571 | ;))))))) |
| 572 | }; | 572 | }; |
| 573 | 573 | ||
| 574 | struct b_format { /* BREAK and SYSCALL */ | 574 | struct b_format { /* BREAK and SYSCALL */ |
| 575 | BITFIELD_FIELD(unsigned int opcode : 6, | 575 | __BITFIELD_FIELD(unsigned int opcode : 6, |
| 576 | BITFIELD_FIELD(unsigned int code : 20, | 576 | __BITFIELD_FIELD(unsigned int code : 20, |
| 577 | BITFIELD_FIELD(unsigned int func : 6, | 577 | __BITFIELD_FIELD(unsigned int func : 6, |
| 578 | ;))) | 578 | ;))) |
| 579 | }; | 579 | }; |
| 580 | 580 | ||
| 581 | struct ps_format { /* MIPS-3D / paired single format */ | 581 | struct ps_format { /* MIPS-3D / paired single format */ |
| 582 | BITFIELD_FIELD(unsigned int opcode : 6, | 582 | __BITFIELD_FIELD(unsigned int opcode : 6, |
| 583 | BITFIELD_FIELD(unsigned int rs : 5, | 583 | __BITFIELD_FIELD(unsigned int rs : 5, |
| 584 | BITFIELD_FIELD(unsigned int ft : 5, | 584 | __BITFIELD_FIELD(unsigned int ft : 5, |
| 585 | BITFIELD_FIELD(unsigned int fs : 5, | 585 | __BITFIELD_FIELD(unsigned int fs : 5, |
| 586 | BITFIELD_FIELD(unsigned int fd : 5, | 586 | __BITFIELD_FIELD(unsigned int fd : 5, |
| 587 | BITFIELD_FIELD(unsigned int func : 6, | 587 | __BITFIELD_FIELD(unsigned int func : 6, |
| 588 | ;)))))) | 588 | ;)))))) |
| 589 | }; | 589 | }; |
| 590 | 590 | ||
| 591 | struct v_format { /* MDMX vector format */ | 591 | struct v_format { /* MDMX vector format */ |
| 592 | BITFIELD_FIELD(unsigned int opcode : 6, | 592 | __BITFIELD_FIELD(unsigned int opcode : 6, |
| 593 | BITFIELD_FIELD(unsigned int sel : 4, | 593 | __BITFIELD_FIELD(unsigned int sel : 4, |
| 594 | BITFIELD_FIELD(unsigned int fmt : 1, | 594 | __BITFIELD_FIELD(unsigned int fmt : 1, |
| 595 | BITFIELD_FIELD(unsigned int vt : 5, | 595 | __BITFIELD_FIELD(unsigned int vt : 5, |
| 596 | BITFIELD_FIELD(unsigned int vs : 5, | 596 | __BITFIELD_FIELD(unsigned int vs : 5, |
| 597 | BITFIELD_FIELD(unsigned int vd : 5, | 597 | __BITFIELD_FIELD(unsigned int vd : 5, |
| 598 | BITFIELD_FIELD(unsigned int func : 6, | 598 | __BITFIELD_FIELD(unsigned int func : 6, |
| 599 | ;))))))) | 599 | ;))))))) |
| 600 | }; | 600 | }; |
| 601 | 601 | ||
| 602 | struct spec3_format { /* SPEC3 */ | 602 | struct spec3_format { /* SPEC3 */ |
| 603 | BITFIELD_FIELD(unsigned int opcode:6, | 603 | __BITFIELD_FIELD(unsigned int opcode:6, |
| 604 | BITFIELD_FIELD(unsigned int rs:5, | 604 | __BITFIELD_FIELD(unsigned int rs:5, |
| 605 | BITFIELD_FIELD(unsigned int rt:5, | 605 | __BITFIELD_FIELD(unsigned int rt:5, |
| 606 | BITFIELD_FIELD(signed int simmediate:9, | 606 | __BITFIELD_FIELD(signed int simmediate:9, |
| 607 | BITFIELD_FIELD(unsigned int func:7, | 607 | __BITFIELD_FIELD(unsigned int func:7, |
| 608 | ;))))) | 608 | ;))))) |
| 609 | }; | 609 | }; |
| 610 | 610 | ||
| @@ -616,141 +616,141 @@ struct spec3_format { /* SPEC3 */ | |||
| 616 | * if it is MIPS32 instruction re-encoded for use in the microMIPS ASE. | 616 | * if it is MIPS32 instruction re-encoded for use in the microMIPS ASE. |
| 617 | */ | 617 | */ |
| 618 | struct fb_format { /* FPU branch format (MIPS32) */ | 618 | struct fb_format { /* FPU branch format (MIPS32) */ |
| 619 | BITFIELD_FIELD(unsigned int opcode : 6, | 619 | __BITFIELD_FIELD(unsigned int opcode : 6, |
| 620 | BITFIELD_FIELD(unsigned int bc : 5, | 620 | __BITFIELD_FIELD(unsigned int bc : 5, |
| 621 | BITFIELD_FIELD(unsigned int cc : 3, | 621 | __BITFIELD_FIELD(unsigned int cc : 3, |
| 622 | BITFIELD_FIELD(unsigned int flag : 2, | 622 | __BITFIELD_FIELD(unsigned int flag : 2, |
| 623 | BITFIELD_FIELD(signed int simmediate : 16, | 623 | __BITFIELD_FIELD(signed int simmediate : 16, |
| 624 | ;))))) | 624 | ;))))) |
| 625 | }; | 625 | }; |
| 626 | 626 | ||
| 627 | struct fp0_format { /* FPU multiply and add format (MIPS32) */ | 627 | struct fp0_format { /* FPU multiply and add format (MIPS32) */ |
| 628 | BITFIELD_FIELD(unsigned int opcode : 6, | 628 | __BITFIELD_FIELD(unsigned int opcode : 6, |
| 629 | BITFIELD_FIELD(unsigned int fmt : 5, | 629 | __BITFIELD_FIELD(unsigned int fmt : 5, |
| 630 | BITFIELD_FIELD(unsigned int ft : 5, | 630 | __BITFIELD_FIELD(unsigned int ft : 5, |
| 631 | BITFIELD_FIELD(unsigned int fs : 5, | 631 | __BITFIELD_FIELD(unsigned int fs : 5, |
| 632 | BITFIELD_FIELD(unsigned int fd : 5, | 632 | __BITFIELD_FIELD(unsigned int fd : 5, |
| 633 | BITFIELD_FIELD(unsigned int func : 6, | 633 | __BITFIELD_FIELD(unsigned int func : 6, |
| 634 | ;)))))) | 634 | ;)))))) |
| 635 | }; | 635 | }; |
| 636 | 636 | ||
| 637 | struct mm_fp0_format { /* FPU multipy and add format (microMIPS) */ | 637 | struct mm_fp0_format { /* FPU multipy and add format (microMIPS) */ |
| 638 | BITFIELD_FIELD(unsigned int opcode : 6, | 638 | __BITFIELD_FIELD(unsigned int opcode : 6, |
| 639 | BITFIELD_FIELD(unsigned int ft : 5, | 639 | __BITFIELD_FIELD(unsigned int ft : 5, |
| 640 | BITFIELD_FIELD(unsigned int fs : 5, | 640 | __BITFIELD_FIELD(unsigned int fs : 5, |
| 641 | BITFIELD_FIELD(unsigned int fd : 5, | 641 | __BITFIELD_FIELD(unsigned int fd : 5, |
| 642 | BITFIELD_FIELD(unsigned int fmt : 3, | 642 | __BITFIELD_FIELD(unsigned int fmt : 3, |
| 643 | BITFIELD_FIELD(unsigned int op : 2, | 643 | __BITFIELD_FIELD(unsigned int op : 2, |
| 644 | BITFIELD_FIELD(unsigned int func : 6, | 644 | __BITFIELD_FIELD(unsigned int func : 6, |
| 645 | ;))))))) | 645 | ;))))))) |
| 646 | }; | 646 | }; |
| 647 | 647 | ||
| 648 | struct fp1_format { /* FPU mfc1 and cfc1 format (MIPS32) */ | 648 | struct fp1_format { /* FPU mfc1 and cfc1 format (MIPS32) */ |
| 649 | BITFIELD_FIELD(unsigned int opcode : 6, | 649 | __BITFIELD_FIELD(unsigned int opcode : 6, |
| 650 | BITFIELD_FIELD(unsigned int op : 5, | 650 | __BITFIELD_FIELD(unsigned int op : 5, |
| 651 | BITFIELD_FIELD(unsigned int rt : 5, | 651 | __BITFIELD_FIELD(unsigned int rt : 5, |
| 652 | BITFIELD_FIELD(unsigned int fs : 5, | 652 | __BITFIELD_FIELD(unsigned int fs : 5, |
| 653 | BITFIELD_FIELD(unsigned int fd : 5, | 653 | __BITFIELD_FIELD(unsigned int fd : 5, |
| 654 | BITFIELD_FIELD(unsigned int func : 6, | 654 | __BITFIELD_FIELD(unsigned int func : 6, |
| 655 | ;)))))) | 655 | ;)))))) |
| 656 | }; | 656 | }; |
| 657 | 657 | ||
| 658 | struct mm_fp1_format { /* FPU mfc1 and cfc1 format (microMIPS) */ | 658 | struct mm_fp1_format { /* FPU mfc1 and cfc1 format (microMIPS) */ |
| 659 | BITFIELD_FIELD(unsigned int opcode : 6, | 659 | __BITFIELD_FIELD(unsigned int opcode : 6, |
| 660 | BITFIELD_FIELD(unsigned int rt : 5, | 660 | __BITFIELD_FIELD(unsigned int rt : 5, |
| 661 | BITFIELD_FIELD(unsigned int fs : 5, | 661 | __BITFIELD_FIELD(unsigned int fs : 5, |
| 662 | BITFIELD_FIELD(unsigned int fmt : 2, | 662 | __BITFIELD_FIELD(unsigned int fmt : 2, |
| 663 | BITFIELD_FIELD(unsigned int op : 8, | 663 | __BITFIELD_FIELD(unsigned int op : 8, |
| 664 | BITFIELD_FIELD(unsigned int func : 6, | 664 | __BITFIELD_FIELD(unsigned int func : 6, |
| 665 | ;)))))) | 665 | ;)))))) |
| 666 | }; | 666 | }; |
| 667 | 667 | ||
| 668 | struct mm_fp2_format { /* FPU movt and movf format (microMIPS) */ | 668 | struct mm_fp2_format { /* FPU movt and movf format (microMIPS) */ |
| 669 | BITFIELD_FIELD(unsigned int opcode : 6, | 669 | __BITFIELD_FIELD(unsigned int opcode : 6, |
| 670 | BITFIELD_FIELD(unsigned int fd : 5, | 670 | __BITFIELD_FIELD(unsigned int fd : 5, |
| 671 | BITFIELD_FIELD(unsigned int fs : 5, | 671 | __BITFIELD_FIELD(unsigned int fs : 5, |
| 672 | BITFIELD_FIELD(unsigned int cc : 3, | 672 | __BITFIELD_FIELD(unsigned int cc : 3, |
| 673 | BITFIELD_FIELD(unsigned int zero : 2, | 673 | __BITFIELD_FIELD(unsigned int zero : 2, |
| 674 | BITFIELD_FIELD(unsigned int fmt : 2, | 674 | __BITFIELD_FIELD(unsigned int fmt : 2, |
| 675 | BITFIELD_FIELD(unsigned int op : 3, | 675 | __BITFIELD_FIELD(unsigned int op : 3, |
| 676 | BITFIELD_FIELD(unsigned int func : 6, | 676 | __BITFIELD_FIELD(unsigned int func : 6, |
| 677 | ;)))))))) | 677 | ;)))))))) |
| 678 | }; | 678 | }; |
| 679 | 679 | ||
| 680 | struct mm_fp3_format { /* FPU abs and neg format (microMIPS) */ | 680 | struct mm_fp3_format { /* FPU abs and neg format (microMIPS) */ |
| 681 | BITFIELD_FIELD(unsigned int opcode : 6, | 681 | __BITFIELD_FIELD(unsigned int opcode : 6, |
| 682 | BITFIELD_FIELD(unsigned int rt : 5, | 682 | __BITFIELD_FIELD(unsigned int rt : 5, |
| 683 | BITFIELD_FIELD(unsigned int fs : 5, | 683 | __BITFIELD_FIELD(unsigned int fs : 5, |
| 684 | BITFIELD_FIELD(unsigned int fmt : 3, | 684 | __BITFIELD_FIELD(unsigned int fmt : 3, |
| 685 | BITFIELD_FIELD(unsigned int op : 7, | 685 | __BITFIELD_FIELD(unsigned int op : 7, |
| 686 | BITFIELD_FIELD(unsigned int func : 6, | 686 | __BITFIELD_FIELD(unsigned int func : 6, |
| 687 | ;)))))) | 687 | ;)))))) |
| 688 | }; | 688 | }; |
| 689 | 689 | ||
| 690 | struct mm_fp4_format { /* FPU c.cond format (microMIPS) */ | 690 | struct mm_fp4_format { /* FPU c.cond format (microMIPS) */ |
| 691 | BITFIELD_FIELD(unsigned int opcode : 6, | 691 | __BITFIELD_FIELD(unsigned int opcode : 6, |
| 692 | BITFIELD_FIELD(unsigned int rt : 5, | 692 | __BITFIELD_FIELD(unsigned int rt : 5, |
| 693 | BITFIELD_FIELD(unsigned int fs : 5, | 693 | __BITFIELD_FIELD(unsigned int fs : 5, |
| 694 | BITFIELD_FIELD(unsigned int cc : 3, | 694 | __BITFIELD_FIELD(unsigned int cc : 3, |
| 695 | BITFIELD_FIELD(unsigned int fmt : 3, | 695 | __BITFIELD_FIELD(unsigned int fmt : 3, |
| 696 | BITFIELD_FIELD(unsigned int cond : 4, | 696 | __BITFIELD_FIELD(unsigned int cond : 4, |
| 697 | BITFIELD_FIELD(unsigned int func : 6, | 697 | __BITFIELD_FIELD(unsigned int func : 6, |
| 698 | ;))))))) | 698 | ;))))))) |
| 699 | }; | 699 | }; |
| 700 | 700 | ||
| 701 | struct mm_fp5_format { /* FPU lwxc1 and swxc1 format (microMIPS) */ | 701 | struct mm_fp5_format { /* FPU lwxc1 and swxc1 format (microMIPS) */ |
| 702 | BITFIELD_FIELD(unsigned int opcode : 6, | 702 | __BITFIELD_FIELD(unsigned int opcode : 6, |
| 703 | BITFIELD_FIELD(unsigned int index : 5, | 703 | __BITFIELD_FIELD(unsigned int index : 5, |
| 704 | BITFIELD_FIELD(unsigned int base : 5, | 704 | __BITFIELD_FIELD(unsigned int base : 5, |
| 705 | BITFIELD_FIELD(unsigned int fd : 5, | 705 | __BITFIELD_FIELD(unsigned int fd : 5, |
| 706 | BITFIELD_FIELD(unsigned int op : 5, | 706 | __BITFIELD_FIELD(unsigned int op : 5, |
| 707 | BITFIELD_FIELD(unsigned int func : 6, | 707 | __BITFIELD_FIELD(unsigned int func : 6, |
| 708 | ;)))))) | 708 | ;)))))) |
| 709 | }; | 709 | }; |
| 710 | 710 | ||
| 711 | struct fp6_format { /* FPU madd and msub format (MIPS IV) */ | 711 | struct fp6_format { /* FPU madd and msub format (MIPS IV) */ |
| 712 | BITFIELD_FIELD(unsigned int opcode : 6, | 712 | __BITFIELD_FIELD(unsigned int opcode : 6, |
| 713 | BITFIELD_FIELD(unsigned int fr : 5, | 713 | __BITFIELD_FIELD(unsigned int fr : 5, |
| 714 | BITFIELD_FIELD(unsigned int ft : 5, | 714 | __BITFIELD_FIELD(unsigned int ft : 5, |
| 715 | BITFIELD_FIELD(unsigned int fs : 5, | 715 | __BITFIELD_FIELD(unsigned int fs : 5, |
| 716 | BITFIELD_FIELD(unsigned int fd : 5, | 716 | __BITFIELD_FIELD(unsigned int fd : 5, |
| 717 | BITFIELD_FIELD(unsigned int func : 6, | 717 | __BITFIELD_FIELD(unsigned int func : 6, |
| 718 | ;)))))) | 718 | ;)))))) |
| 719 | }; | 719 | }; |
| 720 | 720 | ||
| 721 | struct mm_fp6_format { /* FPU madd and msub format (microMIPS) */ | 721 | struct mm_fp6_format { /* FPU madd and msub format (microMIPS) */ |
| 722 | BITFIELD_FIELD(unsigned int opcode : 6, | 722 | __BITFIELD_FIELD(unsigned int opcode : 6, |
| 723 | BITFIELD_FIELD(unsigned int ft : 5, | 723 | __BITFIELD_FIELD(unsigned int ft : 5, |
| 724 | BITFIELD_FIELD(unsigned int fs : 5, | 724 | __BITFIELD_FIELD(unsigned int fs : 5, |
| 725 | BITFIELD_FIELD(unsigned int fd : 5, | 725 | __BITFIELD_FIELD(unsigned int fd : 5, |
| 726 | BITFIELD_FIELD(unsigned int fr : 5, | 726 | __BITFIELD_FIELD(unsigned int fr : 5, |
| 727 | BITFIELD_FIELD(unsigned int func : 6, | 727 | __BITFIELD_FIELD(unsigned int func : 6, |
| 728 | ;)))))) | 728 | ;)))))) |
| 729 | }; | 729 | }; |
| 730 | 730 | ||
| 731 | struct mm_i_format { /* Immediate format (microMIPS) */ | 731 | struct mm_i_format { /* Immediate format (microMIPS) */ |
| 732 | BITFIELD_FIELD(unsigned int opcode : 6, | 732 | __BITFIELD_FIELD(unsigned int opcode : 6, |
| 733 | BITFIELD_FIELD(unsigned int rt : 5, | 733 | __BITFIELD_FIELD(unsigned int rt : 5, |
| 734 | BITFIELD_FIELD(unsigned int rs : 5, | 734 | __BITFIELD_FIELD(unsigned int rs : 5, |
| 735 | BITFIELD_FIELD(signed int simmediate : 16, | 735 | __BITFIELD_FIELD(signed int simmediate : 16, |
| 736 | ;)))) | 736 | ;)))) |
| 737 | }; | 737 | }; |
| 738 | 738 | ||
| 739 | struct mm_m_format { /* Multi-word load/store format (microMIPS) */ | 739 | struct mm_m_format { /* Multi-word load/store format (microMIPS) */ |
| 740 | BITFIELD_FIELD(unsigned int opcode : 6, | 740 | __BITFIELD_FIELD(unsigned int opcode : 6, |
| 741 | BITFIELD_FIELD(unsigned int rd : 5, | 741 | __BITFIELD_FIELD(unsigned int rd : 5, |
| 742 | BITFIELD_FIELD(unsigned int base : 5, | 742 | __BITFIELD_FIELD(unsigned int base : 5, |
| 743 | BITFIELD_FIELD(unsigned int func : 4, | 743 | __BITFIELD_FIELD(unsigned int func : 4, |
| 744 | BITFIELD_FIELD(signed int simmediate : 12, | 744 | __BITFIELD_FIELD(signed int simmediate : 12, |
| 745 | ;))))) | 745 | ;))))) |
| 746 | }; | 746 | }; |
| 747 | 747 | ||
| 748 | struct mm_x_format { /* Scaled indexed load format (microMIPS) */ | 748 | struct mm_x_format { /* Scaled indexed load format (microMIPS) */ |
| 749 | BITFIELD_FIELD(unsigned int opcode : 6, | 749 | __BITFIELD_FIELD(unsigned int opcode : 6, |
| 750 | BITFIELD_FIELD(unsigned int index : 5, | 750 | __BITFIELD_FIELD(unsigned int index : 5, |
| 751 | BITFIELD_FIELD(unsigned int base : 5, | 751 | __BITFIELD_FIELD(unsigned int base : 5, |
| 752 | BITFIELD_FIELD(unsigned int rd : 5, | 752 | __BITFIELD_FIELD(unsigned int rd : 5, |
| 753 | BITFIELD_FIELD(unsigned int func : 11, | 753 | __BITFIELD_FIELD(unsigned int func : 11, |
| 754 | ;))))) | 754 | ;))))) |
| 755 | }; | 755 | }; |
| 756 | 756 | ||
| @@ -758,51 +758,51 @@ struct mm_x_format { /* Scaled indexed load format (microMIPS) */ | |||
| 758 | * microMIPS instruction formats (16-bit length) | 758 | * microMIPS instruction formats (16-bit length) |
| 759 | */ | 759 | */ |
| 760 | struct mm_b0_format { /* Unconditional branch format (microMIPS) */ | 760 | struct mm_b0_format { /* Unconditional branch format (microMIPS) */ |
| 761 | BITFIELD_FIELD(unsigned int opcode : 6, | 761 | __BITFIELD_FIELD(unsigned int opcode : 6, |
| 762 | BITFIELD_FIELD(signed int simmediate : 10, | 762 | __BITFIELD_FIELD(signed int simmediate : 10, |
| 763 | BITFIELD_FIELD(unsigned int : 16, /* Ignored */ | 763 | __BITFIELD_FIELD(unsigned int : 16, /* Ignored */ |
| 764 | ;))) | 764 | ;))) |
| 765 | }; | 765 | }; |
| 766 | 766 | ||
| 767 | struct mm_b1_format { /* Conditional branch format (microMIPS) */ | 767 | struct mm_b1_format { /* Conditional branch format (microMIPS) */ |
| 768 | BITFIELD_FIELD(unsigned int opcode : 6, | 768 | __BITFIELD_FIELD(unsigned int opcode : 6, |
| 769 | BITFIELD_FIELD(unsigned int rs : 3, | 769 | __BITFIELD_FIELD(unsigned int rs : 3, |
| 770 | BITFIELD_FIELD(signed int simmediate : 7, | 770 | __BITFIELD_FIELD(signed int simmediate : 7, |
| 771 | BITFIELD_FIELD(unsigned int : 16, /* Ignored */ | 771 | __BITFIELD_FIELD(unsigned int : 16, /* Ignored */ |
| 772 | ;)))) | 772 | ;)))) |
| 773 | }; | 773 | }; |
| 774 | 774 | ||
| 775 | struct mm16_m_format { /* Multi-word load/store format */ | 775 | struct mm16_m_format { /* Multi-word load/store format */ |
| 776 | BITFIELD_FIELD(unsigned int opcode : 6, | 776 | __BITFIELD_FIELD(unsigned int opcode : 6, |
| 777 | BITFIELD_FIELD(unsigned int func : 4, | 777 | __BITFIELD_FIELD(unsigned int func : 4, |
| 778 | BITFIELD_FIELD(unsigned int rlist : 2, | 778 | __BITFIELD_FIELD(unsigned int rlist : 2, |
| 779 | BITFIELD_FIELD(unsigned int imm : 4, | 779 | __BITFIELD_FIELD(unsigned int imm : 4, |
| 780 | BITFIELD_FIELD(unsigned int : 16, /* Ignored */ | 780 | __BITFIELD_FIELD(unsigned int : 16, /* Ignored */ |
| 781 | ;))))) | 781 | ;))))) |
| 782 | }; | 782 | }; |
| 783 | 783 | ||
| 784 | struct mm16_rb_format { /* Signed immediate format */ | 784 | struct mm16_rb_format { /* Signed immediate format */ |
| 785 | BITFIELD_FIELD(unsigned int opcode : 6, | 785 | __BITFIELD_FIELD(unsigned int opcode : 6, |
| 786 | BITFIELD_FIELD(unsigned int rt : 3, | 786 | __BITFIELD_FIELD(unsigned int rt : 3, |
| 787 | BITFIELD_FIELD(unsigned int base : 3, | 787 | __BITFIELD_FIELD(unsigned int base : 3, |
| 788 | BITFIELD_FIELD(signed int simmediate : 4, | 788 | __BITFIELD_FIELD(signed int simmediate : 4, |
| 789 | BITFIELD_FIELD(unsigned int : 16, /* Ignored */ | 789 | __BITFIELD_FIELD(unsigned int : 16, /* Ignored */ |
| 790 | ;))))) | 790 | ;))))) |
| 791 | }; | 791 | }; |
| 792 | 792 | ||
| 793 | struct mm16_r3_format { /* Load from global pointer format */ | 793 | struct mm16_r3_format { /* Load from global pointer format */ |
| 794 | BITFIELD_FIELD(unsigned int opcode : 6, | 794 | __BITFIELD_FIELD(unsigned int opcode : 6, |
| 795 | BITFIELD_FIELD(unsigned int rt : 3, | 795 | __BITFIELD_FIELD(unsigned int rt : 3, |
| 796 | BITFIELD_FIELD(signed int simmediate : 7, | 796 | __BITFIELD_FIELD(signed int simmediate : 7, |
| 797 | BITFIELD_FIELD(unsigned int : 16, /* Ignored */ | 797 | __BITFIELD_FIELD(unsigned int : 16, /* Ignored */ |
| 798 | ;)))) | 798 | ;)))) |
| 799 | }; | 799 | }; |
| 800 | 800 | ||
| 801 | struct mm16_r5_format { /* Load/store from stack pointer format */ | 801 | struct mm16_r5_format { /* Load/store from stack pointer format */ |
| 802 | BITFIELD_FIELD(unsigned int opcode : 6, | 802 | __BITFIELD_FIELD(unsigned int opcode : 6, |
| 803 | BITFIELD_FIELD(unsigned int rt : 5, | 803 | __BITFIELD_FIELD(unsigned int rt : 5, |
| 804 | BITFIELD_FIELD(signed int simmediate : 5, | 804 | __BITFIELD_FIELD(signed int simmediate : 5, |
| 805 | BITFIELD_FIELD(unsigned int : 16, /* Ignored */ | 805 | __BITFIELD_FIELD(unsigned int : 16, /* Ignored */ |
| 806 | ;)))) | 806 | ;)))) |
| 807 | }; | 807 | }; |
| 808 | 808 | ||
| @@ -810,57 +810,57 @@ struct mm16_r5_format { /* Load/store from stack pointer format */ | |||
| 810 | * MIPS16e instruction formats (16-bit length) | 810 | * MIPS16e instruction formats (16-bit length) |
| 811 | */ | 811 | */ |
| 812 | struct m16e_rr { | 812 | struct m16e_rr { |
| 813 | BITFIELD_FIELD(unsigned int opcode : 5, | 813 | __BITFIELD_FIELD(unsigned int opcode : 5, |
| 814 | BITFIELD_FIELD(unsigned int rx : 3, | 814 | __BITFIELD_FIELD(unsigned int rx : 3, |
| 815 | BITFIELD_FIELD(unsigned int nd : 1, | 815 | __BITFIELD_FIELD(unsigned int nd : 1, |
| 816 | BITFIELD_FIELD(unsigned int l : 1, | 816 | __BITFIELD_FIELD(unsigned int l : 1, |
| 817 | BITFIELD_FIELD(unsigned int ra : 1, | 817 | __BITFIELD_FIELD(unsigned int ra : 1, |
| 818 | BITFIELD_FIELD(unsigned int func : 5, | 818 | __BITFIELD_FIELD(unsigned int func : 5, |
| 819 | ;)))))) | 819 | ;)))))) |
| 820 | }; | 820 | }; |
| 821 | 821 | ||
| 822 | struct m16e_jal { | 822 | struct m16e_jal { |
| 823 | BITFIELD_FIELD(unsigned int opcode : 5, | 823 | __BITFIELD_FIELD(unsigned int opcode : 5, |
| 824 | BITFIELD_FIELD(unsigned int x : 1, | 824 | __BITFIELD_FIELD(unsigned int x : 1, |
| 825 | BITFIELD_FIELD(unsigned int imm20_16 : 5, | 825 | __BITFIELD_FIELD(unsigned int imm20_16 : 5, |
| 826 | BITFIELD_FIELD(signed int imm25_21 : 5, | 826 | __BITFIELD_FIELD(signed int imm25_21 : 5, |
| 827 | ;)))) | 827 | ;)))) |
| 828 | }; | 828 | }; |
| 829 | 829 | ||
| 830 | struct m16e_i64 { | 830 | struct m16e_i64 { |
| 831 | BITFIELD_FIELD(unsigned int opcode : 5, | 831 | __BITFIELD_FIELD(unsigned int opcode : 5, |
| 832 | BITFIELD_FIELD(unsigned int func : 3, | 832 | __BITFIELD_FIELD(unsigned int func : 3, |
| 833 | BITFIELD_FIELD(unsigned int imm : 8, | 833 | __BITFIELD_FIELD(unsigned int imm : 8, |
| 834 | ;))) | 834 | ;))) |
| 835 | }; | 835 | }; |
| 836 | 836 | ||
| 837 | struct m16e_ri64 { | 837 | struct m16e_ri64 { |
| 838 | BITFIELD_FIELD(unsigned int opcode : 5, | 838 | __BITFIELD_FIELD(unsigned int opcode : 5, |
| 839 | BITFIELD_FIELD(unsigned int func : 3, | 839 | __BITFIELD_FIELD(unsigned int func : 3, |
| 840 | BITFIELD_FIELD(unsigned int ry : 3, | 840 | __BITFIELD_FIELD(unsigned int ry : 3, |
| 841 | BITFIELD_FIELD(unsigned int imm : 5, | 841 | __BITFIELD_FIELD(unsigned int imm : 5, |
| 842 | ;)))) | 842 | ;)))) |
| 843 | }; | 843 | }; |
| 844 | 844 | ||
| 845 | struct m16e_ri { | 845 | struct m16e_ri { |
| 846 | BITFIELD_FIELD(unsigned int opcode : 5, | 846 | __BITFIELD_FIELD(unsigned int opcode : 5, |
| 847 | BITFIELD_FIELD(unsigned int rx : 3, | 847 | __BITFIELD_FIELD(unsigned int rx : 3, |
| 848 | BITFIELD_FIELD(unsigned int imm : 8, | 848 | __BITFIELD_FIELD(unsigned int imm : 8, |
| 849 | ;))) | 849 | ;))) |
| 850 | }; | 850 | }; |
| 851 | 851 | ||
| 852 | struct m16e_rri { | 852 | struct m16e_rri { |
| 853 | BITFIELD_FIELD(unsigned int opcode : 5, | 853 | __BITFIELD_FIELD(unsigned int opcode : 5, |
| 854 | BITFIELD_FIELD(unsigned int rx : 3, | 854 | __BITFIELD_FIELD(unsigned int rx : 3, |
| 855 | BITFIELD_FIELD(unsigned int ry : 3, | 855 | __BITFIELD_FIELD(unsigned int ry : 3, |
| 856 | BITFIELD_FIELD(unsigned int imm : 5, | 856 | __BITFIELD_FIELD(unsigned int imm : 5, |
| 857 | ;)))) | 857 | ;)))) |
| 858 | }; | 858 | }; |
| 859 | 859 | ||
| 860 | struct m16e_i8 { | 860 | struct m16e_i8 { |
| 861 | BITFIELD_FIELD(unsigned int opcode : 5, | 861 | __BITFIELD_FIELD(unsigned int opcode : 5, |
| 862 | BITFIELD_FIELD(unsigned int func : 3, | 862 | __BITFIELD_FIELD(unsigned int func : 3, |
| 863 | BITFIELD_FIELD(unsigned int imm : 8, | 863 | __BITFIELD_FIELD(unsigned int imm : 8, |
| 864 | ;))) | 864 | ;))) |
| 865 | }; | 865 | }; |
| 866 | 866 | ||
diff --git a/arch/mips/include/uapi/asm/unistd.h b/arch/mips/include/uapi/asm/unistd.h index d6e154a9e6a5..2692abb28e36 100644 --- a/arch/mips/include/uapi/asm/unistd.h +++ b/arch/mips/include/uapi/asm/unistd.h | |||
| @@ -371,11 +371,12 @@ | |||
| 371 | #define __NR_finit_module (__NR_Linux + 348) | 371 | #define __NR_finit_module (__NR_Linux + 348) |
| 372 | #define __NR_sched_setattr (__NR_Linux + 349) | 372 | #define __NR_sched_setattr (__NR_Linux + 349) |
| 373 | #define __NR_sched_getattr (__NR_Linux + 350) | 373 | #define __NR_sched_getattr (__NR_Linux + 350) |
| 374 | #define __NR_renameat2 (__NR_Linux + 351) | ||
| 374 | 375 | ||
| 375 | /* | 376 | /* |
| 376 | * Offset of the last Linux o32 flavoured syscall | 377 | * Offset of the last Linux o32 flavoured syscall |
| 377 | */ | 378 | */ |
| 378 | #define __NR_Linux_syscalls 350 | 379 | #define __NR_Linux_syscalls 351 |
| 379 | 380 | ||
| 380 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ | 381 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ |
| 381 | 382 | ||
| @@ -699,11 +700,12 @@ | |||
| 699 | #define __NR_getdents64 (__NR_Linux + 308) | 700 | #define __NR_getdents64 (__NR_Linux + 308) |
| 700 | #define __NR_sched_setattr (__NR_Linux + 309) | 701 | #define __NR_sched_setattr (__NR_Linux + 309) |
| 701 | #define __NR_sched_getattr (__NR_Linux + 310) | 702 | #define __NR_sched_getattr (__NR_Linux + 310) |
| 703 | #define __NR_renameat2 (__NR_Linux + 311) | ||
| 702 | 704 | ||
| 703 | /* | 705 | /* |
| 704 | * Offset of the last Linux 64-bit flavoured syscall | 706 | * Offset of the last Linux 64-bit flavoured syscall |
| 705 | */ | 707 | */ |
| 706 | #define __NR_Linux_syscalls 310 | 708 | #define __NR_Linux_syscalls 311 |
| 707 | 709 | ||
| 708 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ | 710 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ |
| 709 | 711 | ||
| @@ -1031,11 +1033,12 @@ | |||
| 1031 | #define __NR_finit_module (__NR_Linux + 312) | 1033 | #define __NR_finit_module (__NR_Linux + 312) |
| 1032 | #define __NR_sched_setattr (__NR_Linux + 313) | 1034 | #define __NR_sched_setattr (__NR_Linux + 313) |
| 1033 | #define __NR_sched_getattr (__NR_Linux + 314) | 1035 | #define __NR_sched_getattr (__NR_Linux + 314) |
| 1036 | #define __NR_renameat2 (__NR_Linux + 315) | ||
| 1034 | 1037 | ||
| 1035 | /* | 1038 | /* |
| 1036 | * Offset of the last N32 flavoured syscall | 1039 | * Offset of the last N32 flavoured syscall |
| 1037 | */ | 1040 | */ |
| 1038 | #define __NR_Linux_syscalls 314 | 1041 | #define __NR_Linux_syscalls 315 |
| 1039 | 1042 | ||
| 1040 | #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ | 1043 | #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ |
| 1041 | 1044 | ||
diff --git a/arch/mips/kernel/proc.c b/arch/mips/kernel/proc.c index e40971b51d2f..037a44d962f3 100644 --- a/arch/mips/kernel/proc.c +++ b/arch/mips/kernel/proc.c | |||
| @@ -124,14 +124,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
| 124 | seq_printf(m, "kscratch registers\t: %d\n", | 124 | seq_printf(m, "kscratch registers\t: %d\n", |
| 125 | hweight8(cpu_data[n].kscratch_mask)); | 125 | hweight8(cpu_data[n].kscratch_mask)); |
| 126 | seq_printf(m, "core\t\t\t: %d\n", cpu_data[n].core); | 126 | seq_printf(m, "core\t\t\t: %d\n", cpu_data[n].core); |
| 127 | #if defined(CONFIG_MIPS_MT_SMP) || defined(CONFIG_MIPS_MT_SMTC) | 127 | |
| 128 | if (cpu_has_mipsmt) { | ||
| 129 | seq_printf(m, "VPE\t\t\t: %d\n", cpu_data[n].vpe_id); | ||
| 130 | #if defined(CONFIG_MIPS_MT_SMTC) | ||
| 131 | seq_printf(m, "TC\t\t\t: %d\n", cpu_data[n].tc_id); | ||
| 132 | #endif | ||
| 133 | } | ||
| 134 | #endif | ||
| 135 | sprintf(fmt, "VCE%%c exceptions\t\t: %s\n", | 128 | sprintf(fmt, "VCE%%c exceptions\t\t: %s\n", |
| 136 | cpu_has_vce ? "%u" : "not available"); | 129 | cpu_has_vce ? "%u" : "not available"); |
| 137 | seq_printf(m, fmt, 'D', vced_count); | 130 | seq_printf(m, fmt, 'D', vced_count); |
diff --git a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.S index fdc70b400442..3245474f19d5 100644 --- a/arch/mips/kernel/scall32-o32.S +++ b/arch/mips/kernel/scall32-o32.S | |||
| @@ -577,3 +577,4 @@ EXPORT(sys_call_table) | |||
| 577 | PTR sys_finit_module | 577 | PTR sys_finit_module |
| 578 | PTR sys_sched_setattr | 578 | PTR sys_sched_setattr |
| 579 | PTR sys_sched_getattr /* 4350 */ | 579 | PTR sys_sched_getattr /* 4350 */ |
| 580 | PTR sys_renameat2 | ||
diff --git a/arch/mips/kernel/scall64-64.S b/arch/mips/kernel/scall64-64.S index dd99c3285aea..be2fedd4ae33 100644 --- a/arch/mips/kernel/scall64-64.S +++ b/arch/mips/kernel/scall64-64.S | |||
| @@ -430,4 +430,5 @@ EXPORT(sys_call_table) | |||
| 430 | PTR sys_getdents64 | 430 | PTR sys_getdents64 |
| 431 | PTR sys_sched_setattr | 431 | PTR sys_sched_setattr |
| 432 | PTR sys_sched_getattr /* 5310 */ | 432 | PTR sys_sched_getattr /* 5310 */ |
| 433 | PTR sys_renameat2 | ||
| 433 | .size sys_call_table,.-sys_call_table | 434 | .size sys_call_table,.-sys_call_table |
diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S index f68d2f4f0090..c1dbcda4b816 100644 --- a/arch/mips/kernel/scall64-n32.S +++ b/arch/mips/kernel/scall64-n32.S | |||
| @@ -423,4 +423,5 @@ EXPORT(sysn32_call_table) | |||
| 423 | PTR sys_finit_module | 423 | PTR sys_finit_module |
| 424 | PTR sys_sched_setattr | 424 | PTR sys_sched_setattr |
| 425 | PTR sys_sched_getattr | 425 | PTR sys_sched_getattr |
| 426 | PTR sys_renameat2 /* 6315 */ | ||
| 426 | .size sysn32_call_table,.-sysn32_call_table | 427 | .size sysn32_call_table,.-sysn32_call_table |
diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S index 70f6acecd928..f1343ccd7ed7 100644 --- a/arch/mips/kernel/scall64-o32.S +++ b/arch/mips/kernel/scall64-o32.S | |||
| @@ -556,4 +556,5 @@ EXPORT(sys32_call_table) | |||
| 556 | PTR sys_finit_module | 556 | PTR sys_finit_module |
| 557 | PTR sys_sched_setattr | 557 | PTR sys_sched_setattr |
| 558 | PTR sys_sched_getattr /* 4350 */ | 558 | PTR sys_sched_getattr /* 4350 */ |
| 559 | PTR sys_renameat2 | ||
| 559 | .size sys32_call_table,.-sys32_call_table | 560 | .size sys32_call_table,.-sys32_call_table |
diff --git a/arch/mips/lib/csum_partial.S b/arch/mips/lib/csum_partial.S index 2e4825e48388..9901237563c5 100644 --- a/arch/mips/lib/csum_partial.S +++ b/arch/mips/lib/csum_partial.S | |||
| @@ -56,14 +56,20 @@ | |||
| 56 | #define UNIT(unit) ((unit)*NBYTES) | 56 | #define UNIT(unit) ((unit)*NBYTES) |
| 57 | 57 | ||
| 58 | #define ADDC(sum,reg) \ | 58 | #define ADDC(sum,reg) \ |
| 59 | .set push; \ | ||
| 60 | .set noat; \ | ||
| 59 | ADD sum, reg; \ | 61 | ADD sum, reg; \ |
| 60 | sltu v1, sum, reg; \ | 62 | sltu v1, sum, reg; \ |
| 61 | ADD sum, v1; \ | 63 | ADD sum, v1; \ |
| 64 | .set pop | ||
| 62 | 65 | ||
| 63 | #define ADDC32(sum,reg) \ | 66 | #define ADDC32(sum,reg) \ |
| 67 | .set push; \ | ||
| 68 | .set noat; \ | ||
| 64 | addu sum, reg; \ | 69 | addu sum, reg; \ |
| 65 | sltu v1, sum, reg; \ | 70 | sltu v1, sum, reg; \ |
| 66 | addu sum, v1; \ | 71 | addu sum, v1; \ |
| 72 | .set pop | ||
| 67 | 73 | ||
| 68 | #define CSUM_BIGCHUNK1(src, offset, sum, _t0, _t1, _t2, _t3) \ | 74 | #define CSUM_BIGCHUNK1(src, offset, sum, _t0, _t1, _t2, _t3) \ |
| 69 | LOAD _t0, (offset + UNIT(0))(src); \ | 75 | LOAD _t0, (offset + UNIT(0))(src); \ |
| @@ -710,6 +716,8 @@ LEAF(csum_partial) | |||
| 710 | ADDC(sum, t2) | 716 | ADDC(sum, t2) |
| 711 | .Ldone\@: | 717 | .Ldone\@: |
| 712 | /* fold checksum */ | 718 | /* fold checksum */ |
| 719 | .set push | ||
| 720 | .set noat | ||
| 713 | #ifdef USE_DOUBLE | 721 | #ifdef USE_DOUBLE |
| 714 | dsll32 v1, sum, 0 | 722 | dsll32 v1, sum, 0 |
| 715 | daddu sum, v1 | 723 | daddu sum, v1 |
| @@ -732,6 +740,7 @@ LEAF(csum_partial) | |||
| 732 | or sum, sum, t0 | 740 | or sum, sum, t0 |
| 733 | 1: | 741 | 1: |
| 734 | #endif | 742 | #endif |
| 743 | .set pop | ||
| 735 | .set reorder | 744 | .set reorder |
| 736 | ADDC32(sum, psum) | 745 | ADDC32(sum, psum) |
| 737 | jr ra | 746 | jr ra |
diff --git a/arch/mips/lib/delay.c b/arch/mips/lib/delay.c index 44713af15a62..705cfb7c1a74 100644 --- a/arch/mips/lib/delay.c +++ b/arch/mips/lib/delay.c | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | * Copyright (C) 1994 by Waldorf Electronics | 6 | * Copyright (C) 1994 by Waldorf Electronics |
| 7 | * Copyright (C) 1995 - 2000, 01, 03 by Ralf Baechle | 7 | * Copyright (C) 1995 - 2000, 01, 03 by Ralf Baechle |
| 8 | * Copyright (C) 1999, 2000 Silicon Graphics, Inc. | 8 | * Copyright (C) 1999, 2000 Silicon Graphics, Inc. |
| 9 | * Copyright (C) 2007 Maciej W. Rozycki | 9 | * Copyright (C) 2007, 2014 Maciej W. Rozycki |
| 10 | */ | 10 | */ |
| 11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
| 12 | #include <linux/param.h> | 12 | #include <linux/param.h> |
| @@ -15,6 +15,12 @@ | |||
| 15 | #include <asm/compiler.h> | 15 | #include <asm/compiler.h> |
| 16 | #include <asm/war.h> | 16 | #include <asm/war.h> |
| 17 | 17 | ||
| 18 | #ifndef CONFIG_CPU_DADDI_WORKAROUNDS | ||
| 19 | #define GCC_DADDI_IMM_ASM() "I" | ||
| 20 | #else | ||
| 21 | #define GCC_DADDI_IMM_ASM() "r" | ||
| 22 | #endif | ||
| 23 | |||
| 18 | void __delay(unsigned long loops) | 24 | void __delay(unsigned long loops) |
| 19 | { | 25 | { |
| 20 | __asm__ __volatile__ ( | 26 | __asm__ __volatile__ ( |
| @@ -22,13 +28,13 @@ void __delay(unsigned long loops) | |||
| 22 | " .align 3 \n" | 28 | " .align 3 \n" |
| 23 | "1: bnez %0, 1b \n" | 29 | "1: bnez %0, 1b \n" |
| 24 | #if BITS_PER_LONG == 32 | 30 | #if BITS_PER_LONG == 32 |
| 25 | " subu %0, 1 \n" | 31 | " subu %0, %1 \n" |
| 26 | #else | 32 | #else |
| 27 | " dsubu %0, 1 \n" | 33 | " dsubu %0, %1 \n" |
| 28 | #endif | 34 | #endif |
| 29 | " .set reorder \n" | 35 | " .set reorder \n" |
| 30 | : "=r" (loops) | 36 | : "=r" (loops) |
| 31 | : "0" (loops)); | 37 | : GCC_DADDI_IMM_ASM() (1), "0" (loops)); |
| 32 | } | 38 | } |
| 33 | EXPORT_SYMBOL(__delay); | 39 | EXPORT_SYMBOL(__delay); |
| 34 | 40 | ||
diff --git a/arch/mips/lib/strncpy_user.S b/arch/mips/lib/strncpy_user.S index d3301cd1e9a5..3c32baf8b494 100644 --- a/arch/mips/lib/strncpy_user.S +++ b/arch/mips/lib/strncpy_user.S | |||
| @@ -35,7 +35,6 @@ LEAF(__strncpy_from_\func\()_asm) | |||
| 35 | bnez v0, .Lfault\@ | 35 | bnez v0, .Lfault\@ |
| 36 | 36 | ||
| 37 | FEXPORT(__strncpy_from_\func\()_nocheck_asm) | 37 | FEXPORT(__strncpy_from_\func\()_nocheck_asm) |
| 38 | .set noreorder | ||
| 39 | move t0, zero | 38 | move t0, zero |
| 40 | move v1, a1 | 39 | move v1, a1 |
| 41 | .ifeqs "\func","kernel" | 40 | .ifeqs "\func","kernel" |
| @@ -45,21 +44,21 @@ FEXPORT(__strncpy_from_\func\()_nocheck_asm) | |||
| 45 | .endif | 44 | .endif |
| 46 | PTR_ADDIU v1, 1 | 45 | PTR_ADDIU v1, 1 |
| 47 | R10KCBARRIER(0(ra)) | 46 | R10KCBARRIER(0(ra)) |
| 47 | sb v0, (a0) | ||
| 48 | beqz v0, 2f | 48 | beqz v0, 2f |
| 49 | sb v0, (a0) | ||
| 50 | PTR_ADDIU t0, 1 | 49 | PTR_ADDIU t0, 1 |
| 50 | PTR_ADDIU a0, 1 | ||
| 51 | bne t0, a2, 1b | 51 | bne t0, a2, 1b |
| 52 | PTR_ADDIU a0, 1 | ||
| 53 | 2: PTR_ADDU v0, a1, t0 | 52 | 2: PTR_ADDU v0, a1, t0 |
| 54 | xor v0, a1 | 53 | xor v0, a1 |
| 55 | bltz v0, .Lfault\@ | 54 | bltz v0, .Lfault\@ |
| 56 | nop | 55 | move v0, t0 |
| 57 | jr ra # return n | 56 | jr ra # return n |
| 58 | move v0, t0 | ||
| 59 | END(__strncpy_from_\func\()_asm) | 57 | END(__strncpy_from_\func\()_asm) |
| 60 | 58 | ||
| 61 | .Lfault\@: jr ra | 59 | .Lfault\@: |
| 62 | li v0, -EFAULT | 60 | li v0, -EFAULT |
| 61 | jr ra | ||
| 63 | 62 | ||
| 64 | .section __ex_table,"a" | 63 | .section __ex_table,"a" |
| 65 | PTR 1b, .Lfault\@ | 64 | PTR 1b, .Lfault\@ |
diff --git a/arch/mips/loongson/Kconfig b/arch/mips/loongson/Kconfig index 7397be226a06..603d79a95f47 100644 --- a/arch/mips/loongson/Kconfig +++ b/arch/mips/loongson/Kconfig | |||
| @@ -64,7 +64,6 @@ config LEMOTE_MACH3A | |||
| 64 | bool "Lemote Loongson 3A family machines" | 64 | bool "Lemote Loongson 3A family machines" |
| 65 | select ARCH_SPARSEMEM_ENABLE | 65 | select ARCH_SPARSEMEM_ENABLE |
| 66 | select GENERIC_ISA_DMA_SUPPORT_BROKEN | 66 | select GENERIC_ISA_DMA_SUPPORT_BROKEN |
| 67 | select GENERIC_HARDIRQS_NO__DO_IRQ | ||
| 68 | select BOOT_ELF32 | 67 | select BOOT_ELF32 |
| 69 | select BOARD_SCACHE | 68 | select BOARD_SCACHE |
| 70 | select CSRC_R4K | 69 | select CSRC_R4K |
diff --git a/arch/mips/loongson/lemote-2f/clock.c b/arch/mips/loongson/lemote-2f/clock.c index e1f427f4f5f3..67dd94ef28e6 100644 --- a/arch/mips/loongson/lemote-2f/clock.c +++ b/arch/mips/loongson/lemote-2f/clock.c | |||
| @@ -91,6 +91,7 @@ EXPORT_SYMBOL(clk_put); | |||
| 91 | 91 | ||
| 92 | int clk_set_rate(struct clk *clk, unsigned long rate) | 92 | int clk_set_rate(struct clk *clk, unsigned long rate) |
| 93 | { | 93 | { |
| 94 | unsigned int rate_khz = rate / 1000; | ||
| 94 | int ret = 0; | 95 | int ret = 0; |
| 95 | int regval; | 96 | int regval; |
| 96 | int i; | 97 | int i; |
| @@ -111,10 +112,10 @@ int clk_set_rate(struct clk *clk, unsigned long rate) | |||
| 111 | if (loongson2_clockmod_table[i].frequency == | 112 | if (loongson2_clockmod_table[i].frequency == |
| 112 | CPUFREQ_ENTRY_INVALID) | 113 | CPUFREQ_ENTRY_INVALID) |
| 113 | continue; | 114 | continue; |
| 114 | if (rate == loongson2_clockmod_table[i].frequency) | 115 | if (rate_khz == loongson2_clockmod_table[i].frequency) |
| 115 | break; | 116 | break; |
| 116 | } | 117 | } |
| 117 | if (rate != loongson2_clockmod_table[i].frequency) | 118 | if (rate_khz != loongson2_clockmod_table[i].frequency) |
| 118 | return -ENOTSUPP; | 119 | return -ENOTSUPP; |
| 119 | 120 | ||
| 120 | clk->rate = rate; | 121 | clk->rate = rate; |
diff --git a/arch/mips/mm/tlb-funcs.S b/arch/mips/mm/tlb-funcs.S index 30a494db99c2..a5427c6e9757 100644 --- a/arch/mips/mm/tlb-funcs.S +++ b/arch/mips/mm/tlb-funcs.S | |||
| @@ -16,8 +16,10 @@ | |||
| 16 | 16 | ||
| 17 | #define FASTPATH_SIZE 128 | 17 | #define FASTPATH_SIZE 128 |
| 18 | 18 | ||
| 19 | EXPORT(tlbmiss_handler_setup_pgd_start) | ||
| 19 | LEAF(tlbmiss_handler_setup_pgd) | 20 | LEAF(tlbmiss_handler_setup_pgd) |
| 20 | .space 16 * 4 | 21 | 1: j 1b /* Dummy, will be replaced. */ |
| 22 | .space 64 | ||
| 21 | END(tlbmiss_handler_setup_pgd) | 23 | END(tlbmiss_handler_setup_pgd) |
| 22 | EXPORT(tlbmiss_handler_setup_pgd_end) | 24 | EXPORT(tlbmiss_handler_setup_pgd_end) |
| 23 | 25 | ||
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c index ee88367ab3ad..f99ec587b151 100644 --- a/arch/mips/mm/tlbex.c +++ b/arch/mips/mm/tlbex.c | |||
| @@ -1422,16 +1422,17 @@ static void build_r4000_tlb_refill_handler(void) | |||
| 1422 | extern u32 handle_tlbl[], handle_tlbl_end[]; | 1422 | extern u32 handle_tlbl[], handle_tlbl_end[]; |
| 1423 | extern u32 handle_tlbs[], handle_tlbs_end[]; | 1423 | extern u32 handle_tlbs[], handle_tlbs_end[]; |
| 1424 | extern u32 handle_tlbm[], handle_tlbm_end[]; | 1424 | extern u32 handle_tlbm[], handle_tlbm_end[]; |
| 1425 | extern u32 tlbmiss_handler_setup_pgd[], tlbmiss_handler_setup_pgd_end[]; | 1425 | extern u32 tlbmiss_handler_setup_pgd_start[], tlbmiss_handler_setup_pgd[]; |
| 1426 | extern u32 tlbmiss_handler_setup_pgd_end[]; | ||
| 1426 | 1427 | ||
| 1427 | static void build_setup_pgd(void) | 1428 | static void build_setup_pgd(void) |
| 1428 | { | 1429 | { |
| 1429 | const int a0 = 4; | 1430 | const int a0 = 4; |
| 1430 | const int __maybe_unused a1 = 5; | 1431 | const int __maybe_unused a1 = 5; |
| 1431 | const int __maybe_unused a2 = 6; | 1432 | const int __maybe_unused a2 = 6; |
| 1432 | u32 *p = tlbmiss_handler_setup_pgd; | 1433 | u32 *p = tlbmiss_handler_setup_pgd_start; |
| 1433 | const int tlbmiss_handler_setup_pgd_size = | 1434 | const int tlbmiss_handler_setup_pgd_size = |
| 1434 | tlbmiss_handler_setup_pgd_end - tlbmiss_handler_setup_pgd; | 1435 | tlbmiss_handler_setup_pgd_end - tlbmiss_handler_setup_pgd_start; |
| 1435 | #ifndef CONFIG_MIPS_PGD_C0_CONTEXT | 1436 | #ifndef CONFIG_MIPS_PGD_C0_CONTEXT |
| 1436 | long pgdc = (long)pgd_current; | 1437 | long pgdc = (long)pgd_current; |
| 1437 | #endif | 1438 | #endif |
diff --git a/drivers/cpufreq/loongson2_cpufreq.c b/drivers/cpufreq/loongson2_cpufreq.c index f0bc31f5db27..d4add8621944 100644 --- a/drivers/cpufreq/loongson2_cpufreq.c +++ b/drivers/cpufreq/loongson2_cpufreq.c | |||
| @@ -62,7 +62,7 @@ static int loongson2_cpufreq_target(struct cpufreq_policy *policy, | |||
| 62 | set_cpus_allowed_ptr(current, &cpus_allowed); | 62 | set_cpus_allowed_ptr(current, &cpus_allowed); |
| 63 | 63 | ||
| 64 | /* setting the cpu frequency */ | 64 | /* setting the cpu frequency */ |
| 65 | clk_set_rate(policy->clk, freq); | 65 | clk_set_rate(policy->clk, freq * 1000); |
| 66 | 66 | ||
| 67 | return 0; | 67 | return 0; |
| 68 | } | 68 | } |
| @@ -92,7 +92,7 @@ static int loongson2_cpufreq_cpu_init(struct cpufreq_policy *policy) | |||
| 92 | i++) | 92 | i++) |
| 93 | loongson2_clockmod_table[i].frequency = (rate * i) / 8; | 93 | loongson2_clockmod_table[i].frequency = (rate * i) / 8; |
| 94 | 94 | ||
| 95 | ret = clk_set_rate(cpuclk, rate); | 95 | ret = clk_set_rate(cpuclk, rate * 1000); |
| 96 | if (ret) { | 96 | if (ret) { |
| 97 | clk_put(cpuclk); | 97 | clk_put(cpuclk); |
| 98 | return ret; | 98 | return ret; |
diff --git a/include/uapi/linux/audit.h b/include/uapi/linux/audit.h index 11917f747cb4..1b1efddb91cd 100644 --- a/include/uapi/linux/audit.h +++ b/include/uapi/linux/audit.h | |||
| @@ -331,9 +331,17 @@ enum { | |||
| 331 | #define AUDIT_FAIL_PRINTK 1 | 331 | #define AUDIT_FAIL_PRINTK 1 |
| 332 | #define AUDIT_FAIL_PANIC 2 | 332 | #define AUDIT_FAIL_PANIC 2 |
| 333 | 333 | ||
| 334 | /* | ||
| 335 | * These bits disambiguate different calling conventions that share an | ||
| 336 | * ELF machine type, bitness, and endianness | ||
| 337 | */ | ||
| 338 | #define __AUDIT_ARCH_CONVENTION_MASK 0x30000000 | ||
| 339 | #define __AUDIT_ARCH_CONVENTION_MIPS64_N32 0x20000000 | ||
| 340 | |||
| 334 | /* distinguish syscall tables */ | 341 | /* distinguish syscall tables */ |
| 335 | #define __AUDIT_ARCH_64BIT 0x80000000 | 342 | #define __AUDIT_ARCH_64BIT 0x80000000 |
| 336 | #define __AUDIT_ARCH_LE 0x40000000 | 343 | #define __AUDIT_ARCH_LE 0x40000000 |
| 344 | |||
| 337 | #define AUDIT_ARCH_ALPHA (EM_ALPHA|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) | 345 | #define AUDIT_ARCH_ALPHA (EM_ALPHA|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) |
| 338 | #define AUDIT_ARCH_ARM (EM_ARM|__AUDIT_ARCH_LE) | 346 | #define AUDIT_ARCH_ARM (EM_ARM|__AUDIT_ARCH_LE) |
| 339 | #define AUDIT_ARCH_ARMEB (EM_ARM) | 347 | #define AUDIT_ARCH_ARMEB (EM_ARM) |
| @@ -346,7 +354,11 @@ enum { | |||
| 346 | #define AUDIT_ARCH_MIPS (EM_MIPS) | 354 | #define AUDIT_ARCH_MIPS (EM_MIPS) |
| 347 | #define AUDIT_ARCH_MIPSEL (EM_MIPS|__AUDIT_ARCH_LE) | 355 | #define AUDIT_ARCH_MIPSEL (EM_MIPS|__AUDIT_ARCH_LE) |
| 348 | #define AUDIT_ARCH_MIPS64 (EM_MIPS|__AUDIT_ARCH_64BIT) | 356 | #define AUDIT_ARCH_MIPS64 (EM_MIPS|__AUDIT_ARCH_64BIT) |
| 357 | #define AUDIT_ARCH_MIPS64N32 (EM_MIPS|__AUDIT_ARCH_64BIT|\ | ||
| 358 | __AUDIT_ARCH_CONVENTION_MIPS64_N32) | ||
| 349 | #define AUDIT_ARCH_MIPSEL64 (EM_MIPS|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) | 359 | #define AUDIT_ARCH_MIPSEL64 (EM_MIPS|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) |
| 360 | #define AUDIT_ARCH_MIPSEL64N32 (EM_MIPS|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE\ | ||
| 361 | __AUDIT_ARCH_CONVENTION_MIPS64_N32) | ||
| 350 | #define AUDIT_ARCH_OPENRISC (EM_OPENRISC) | 362 | #define AUDIT_ARCH_OPENRISC (EM_OPENRISC) |
| 351 | #define AUDIT_ARCH_PARISC (EM_PARISC) | 363 | #define AUDIT_ARCH_PARISC (EM_PARISC) |
| 352 | #define AUDIT_ARCH_PARISC64 (EM_PARISC|__AUDIT_ARCH_64BIT) | 364 | #define AUDIT_ARCH_PARISC64 (EM_PARISC|__AUDIT_ARCH_64BIT) |
