diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2015-02-15 19:07:18 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2015-02-15 19:07:18 -0500 |
commit | 97ae2b5c17d6cc988c6d49ae0cf95befb6b7081c (patch) | |
tree | a71115af6c30fdc9de0878e2cf1c51e95b17a324 /arch/mips/include | |
parent | ef47fa5280819deaa8da7e0db1d875b225de5838 (diff) | |
parent | c8af781ebf3ffe37c18c34ca89e29c085560e561 (diff) |
Merge branch 'bfin_rotary' into next
Merge bfin_rotary driver changes from Sonic Zhang.
Diffstat (limited to 'arch/mips/include')
-rw-r--r-- | arch/mips/include/asm/fpu.h | 43 | ||||
-rw-r--r-- | arch/mips/include/asm/fw/arc/hinv.h | 6 | ||||
-rw-r--r-- | arch/mips/include/asm/mips-cm.h | 4 | ||||
-rw-r--r-- | arch/mips/include/asm/mipsregs.h | 15 | ||||
-rw-r--r-- | arch/mips/include/asm/syscall.h | 8 | ||||
-rw-r--r-- | arch/mips/include/asm/thread_info.h | 1 | ||||
-rw-r--r-- | arch/mips/include/uapi/asm/unistd.h | 15 |
7 files changed, 57 insertions, 35 deletions
diff --git a/arch/mips/include/asm/fpu.h b/arch/mips/include/asm/fpu.h index 994d21939676..affebb78f5d6 100644 --- a/arch/mips/include/asm/fpu.h +++ b/arch/mips/include/asm/fpu.h | |||
@@ -64,7 +64,7 @@ static inline int __enable_fpu(enum fpu_mode mode) | |||
64 | return SIGFPE; | 64 | return SIGFPE; |
65 | 65 | ||
66 | /* set FRE */ | 66 | /* set FRE */ |
67 | write_c0_config5(read_c0_config5() | MIPS_CONF5_FRE); | 67 | set_c0_config5(MIPS_CONF5_FRE); |
68 | goto fr_common; | 68 | goto fr_common; |
69 | 69 | ||
70 | case FPU_64BIT: | 70 | case FPU_64BIT: |
@@ -74,8 +74,10 @@ static inline int __enable_fpu(enum fpu_mode mode) | |||
74 | #endif | 74 | #endif |
75 | /* fall through */ | 75 | /* fall through */ |
76 | case FPU_32BIT: | 76 | case FPU_32BIT: |
77 | /* clear FRE */ | 77 | if (cpu_has_fre) { |
78 | write_c0_config5(read_c0_config5() & ~MIPS_CONF5_FRE); | 78 | /* clear FRE */ |
79 | clear_c0_config5(MIPS_CONF5_FRE); | ||
80 | } | ||
79 | fr_common: | 81 | fr_common: |
80 | /* set CU1 & change FR appropriately */ | 82 | /* set CU1 & change FR appropriately */ |
81 | fr = (int)mode & FPU_FR_MASK; | 83 | fr = (int)mode & FPU_FR_MASK; |
@@ -182,25 +184,32 @@ static inline int init_fpu(void) | |||
182 | int ret = 0; | 184 | int ret = 0; |
183 | 185 | ||
184 | if (cpu_has_fpu) { | 186 | if (cpu_has_fpu) { |
187 | unsigned int config5; | ||
188 | |||
185 | ret = __own_fpu(); | 189 | ret = __own_fpu(); |
186 | if (!ret) { | 190 | if (ret) |
187 | unsigned int config5 = read_c0_config5(); | 191 | return ret; |
188 | |||
189 | /* | ||
190 | * Ensure FRE is clear whilst running _init_fpu, since | ||
191 | * single precision FP instructions are used. If FRE | ||
192 | * was set then we'll just end up initialising all 32 | ||
193 | * 64b registers. | ||
194 | */ | ||
195 | write_c0_config5(config5 & ~MIPS_CONF5_FRE); | ||
196 | enable_fpu_hazard(); | ||
197 | 192 | ||
193 | if (!cpu_has_fre) { | ||
198 | _init_fpu(); | 194 | _init_fpu(); |
199 | 195 | ||
200 | /* Restore FRE */ | 196 | return 0; |
201 | write_c0_config5(config5); | ||
202 | enable_fpu_hazard(); | ||
203 | } | 197 | } |
198 | |||
199 | /* | ||
200 | * Ensure FRE is clear whilst running _init_fpu, since | ||
201 | * single precision FP instructions are used. If FRE | ||
202 | * was set then we'll just end up initialising all 32 | ||
203 | * 64b registers. | ||
204 | */ | ||
205 | config5 = clear_c0_config5(MIPS_CONF5_FRE); | ||
206 | enable_fpu_hazard(); | ||
207 | |||
208 | _init_fpu(); | ||
209 | |||
210 | /* Restore FRE */ | ||
211 | write_c0_config5(config5); | ||
212 | enable_fpu_hazard(); | ||
204 | } else | 213 | } else |
205 | fpu_emulator_init_fpu(); | 214 | fpu_emulator_init_fpu(); |
206 | 215 | ||
diff --git a/arch/mips/include/asm/fw/arc/hinv.h b/arch/mips/include/asm/fw/arc/hinv.h index f8d37d1df5de..9fac64a26353 100644 --- a/arch/mips/include/asm/fw/arc/hinv.h +++ b/arch/mips/include/asm/fw/arc/hinv.h | |||
@@ -119,7 +119,7 @@ union key_u { | |||
119 | #define SGI_ARCS_REV 10 /* rev .10, 3/04/92 */ | 119 | #define SGI_ARCS_REV 10 /* rev .10, 3/04/92 */ |
120 | #endif | 120 | #endif |
121 | 121 | ||
122 | typedef struct component { | 122 | typedef struct { |
123 | CONFIGCLASS Class; | 123 | CONFIGCLASS Class; |
124 | CONFIGTYPE Type; | 124 | CONFIGTYPE Type; |
125 | IDENTIFIERFLAG Flags; | 125 | IDENTIFIERFLAG Flags; |
@@ -140,7 +140,7 @@ struct cfgdata { | |||
140 | }; | 140 | }; |
141 | 141 | ||
142 | /* System ID */ | 142 | /* System ID */ |
143 | typedef struct systemid { | 143 | typedef struct { |
144 | CHAR VendorId[8]; | 144 | CHAR VendorId[8]; |
145 | CHAR ProductId[8]; | 145 | CHAR ProductId[8]; |
146 | } SYSTEMID; | 146 | } SYSTEMID; |
@@ -166,7 +166,7 @@ typedef enum memorytype { | |||
166 | #endif /* _NT_PROM */ | 166 | #endif /* _NT_PROM */ |
167 | } MEMORYTYPE; | 167 | } MEMORYTYPE; |
168 | 168 | ||
169 | typedef struct memorydescriptor { | 169 | typedef struct { |
170 | MEMORYTYPE Type; | 170 | MEMORYTYPE Type; |
171 | LONG BasePage; | 171 | LONG BasePage; |
172 | LONG PageCount; | 172 | LONG PageCount; |
diff --git a/arch/mips/include/asm/mips-cm.h b/arch/mips/include/asm/mips-cm.h index b95a827d763e..59c0901bdd84 100644 --- a/arch/mips/include/asm/mips-cm.h +++ b/arch/mips/include/asm/mips-cm.h | |||
@@ -89,9 +89,9 @@ static inline bool mips_cm_has_l2sync(void) | |||
89 | 89 | ||
90 | /* Macros to ease the creation of register access functions */ | 90 | /* Macros to ease the creation of register access functions */ |
91 | #define BUILD_CM_R_(name, off) \ | 91 | #define BUILD_CM_R_(name, off) \ |
92 | static inline u32 *addr_gcr_##name(void) \ | 92 | static inline u32 __iomem *addr_gcr_##name(void) \ |
93 | { \ | 93 | { \ |
94 | return (u32 *)(mips_cm_base + (off)); \ | 94 | return (u32 __iomem *)(mips_cm_base + (off)); \ |
95 | } \ | 95 | } \ |
96 | \ | 96 | \ |
97 | static inline u32 read_gcr_##name(void) \ | 97 | static inline u32 read_gcr_##name(void) \ |
diff --git a/arch/mips/include/asm/mipsregs.h b/arch/mips/include/asm/mipsregs.h index 5e4aef304b02..5b720d8c2745 100644 --- a/arch/mips/include/asm/mipsregs.h +++ b/arch/mips/include/asm/mipsregs.h | |||
@@ -1386,12 +1386,27 @@ do { \ | |||
1386 | __res; \ | 1386 | __res; \ |
1387 | }) | 1387 | }) |
1388 | 1388 | ||
1389 | #define _write_32bit_cp1_register(dest, val, gas_hardfloat) \ | ||
1390 | do { \ | ||
1391 | __asm__ __volatile__( \ | ||
1392 | " .set push \n" \ | ||
1393 | " .set reorder \n" \ | ||
1394 | " "STR(gas_hardfloat)" \n" \ | ||
1395 | " ctc1 %0,"STR(dest)" \n" \ | ||
1396 | " .set pop \n" \ | ||
1397 | : : "r" (val)); \ | ||
1398 | } while (0) | ||
1399 | |||
1389 | #ifdef GAS_HAS_SET_HARDFLOAT | 1400 | #ifdef GAS_HAS_SET_HARDFLOAT |
1390 | #define read_32bit_cp1_register(source) \ | 1401 | #define read_32bit_cp1_register(source) \ |
1391 | _read_32bit_cp1_register(source, .set hardfloat) | 1402 | _read_32bit_cp1_register(source, .set hardfloat) |
1403 | #define write_32bit_cp1_register(dest, val) \ | ||
1404 | _write_32bit_cp1_register(dest, val, .set hardfloat) | ||
1392 | #else | 1405 | #else |
1393 | #define read_32bit_cp1_register(source) \ | 1406 | #define read_32bit_cp1_register(source) \ |
1394 | _read_32bit_cp1_register(source, ) | 1407 | _read_32bit_cp1_register(source, ) |
1408 | #define write_32bit_cp1_register(dest, val) \ | ||
1409 | _write_32bit_cp1_register(dest, val, ) | ||
1395 | #endif | 1410 | #endif |
1396 | 1411 | ||
1397 | #ifdef HAVE_AS_DSP | 1412 | #ifdef HAVE_AS_DSP |
diff --git a/arch/mips/include/asm/syscall.h b/arch/mips/include/asm/syscall.h index bb7963753730..6499d93ae68d 100644 --- a/arch/mips/include/asm/syscall.h +++ b/arch/mips/include/asm/syscall.h | |||
@@ -29,13 +29,7 @@ | |||
29 | static inline long syscall_get_nr(struct task_struct *task, | 29 | static inline long syscall_get_nr(struct task_struct *task, |
30 | struct pt_regs *regs) | 30 | struct pt_regs *regs) |
31 | { | 31 | { |
32 | /* O32 ABI syscall() - Either 64-bit with O32 or 32-bit */ | 32 | return current_thread_info()->syscall; |
33 | if ((config_enabled(CONFIG_32BIT) || | ||
34 | test_tsk_thread_flag(task, TIF_32BIT_REGS)) && | ||
35 | (regs->regs[2] == __NR_syscall)) | ||
36 | return regs->regs[4]; | ||
37 | else | ||
38 | return regs->regs[2]; | ||
39 | } | 33 | } |
40 | 34 | ||
41 | static inline unsigned long mips_get_syscall_arg(unsigned long *arg, | 35 | static inline unsigned long mips_get_syscall_arg(unsigned long *arg, |
diff --git a/arch/mips/include/asm/thread_info.h b/arch/mips/include/asm/thread_info.h index 99eea59604e9..e4440f92b366 100644 --- a/arch/mips/include/asm/thread_info.h +++ b/arch/mips/include/asm/thread_info.h | |||
@@ -36,6 +36,7 @@ struct thread_info { | |||
36 | */ | 36 | */ |
37 | struct restart_block restart_block; | 37 | struct restart_block restart_block; |
38 | struct pt_regs *regs; | 38 | struct pt_regs *regs; |
39 | long syscall; /* syscall number */ | ||
39 | }; | 40 | }; |
40 | 41 | ||
41 | /* | 42 | /* |
diff --git a/arch/mips/include/uapi/asm/unistd.h b/arch/mips/include/uapi/asm/unistd.h index d001bb1ad177..c03088f9f514 100644 --- a/arch/mips/include/uapi/asm/unistd.h +++ b/arch/mips/include/uapi/asm/unistd.h | |||
@@ -376,16 +376,17 @@ | |||
376 | #define __NR_getrandom (__NR_Linux + 353) | 376 | #define __NR_getrandom (__NR_Linux + 353) |
377 | #define __NR_memfd_create (__NR_Linux + 354) | 377 | #define __NR_memfd_create (__NR_Linux + 354) |
378 | #define __NR_bpf (__NR_Linux + 355) | 378 | #define __NR_bpf (__NR_Linux + 355) |
379 | #define __NR_execveat (__NR_Linux + 356) | ||
379 | 380 | ||
380 | /* | 381 | /* |
381 | * Offset of the last Linux o32 flavoured syscall | 382 | * Offset of the last Linux o32 flavoured syscall |
382 | */ | 383 | */ |
383 | #define __NR_Linux_syscalls 355 | 384 | #define __NR_Linux_syscalls 356 |
384 | 385 | ||
385 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ | 386 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ |
386 | 387 | ||
387 | #define __NR_O32_Linux 4000 | 388 | #define __NR_O32_Linux 4000 |
388 | #define __NR_O32_Linux_syscalls 355 | 389 | #define __NR_O32_Linux_syscalls 356 |
389 | 390 | ||
390 | #if _MIPS_SIM == _MIPS_SIM_ABI64 | 391 | #if _MIPS_SIM == _MIPS_SIM_ABI64 |
391 | 392 | ||
@@ -709,16 +710,17 @@ | |||
709 | #define __NR_getrandom (__NR_Linux + 313) | 710 | #define __NR_getrandom (__NR_Linux + 313) |
710 | #define __NR_memfd_create (__NR_Linux + 314) | 711 | #define __NR_memfd_create (__NR_Linux + 314) |
711 | #define __NR_bpf (__NR_Linux + 315) | 712 | #define __NR_bpf (__NR_Linux + 315) |
713 | #define __NR_execveat (__NR_Linux + 316) | ||
712 | 714 | ||
713 | /* | 715 | /* |
714 | * Offset of the last Linux 64-bit flavoured syscall | 716 | * Offset of the last Linux 64-bit flavoured syscall |
715 | */ | 717 | */ |
716 | #define __NR_Linux_syscalls 315 | 718 | #define __NR_Linux_syscalls 316 |
717 | 719 | ||
718 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ | 720 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ |
719 | 721 | ||
720 | #define __NR_64_Linux 5000 | 722 | #define __NR_64_Linux 5000 |
721 | #define __NR_64_Linux_syscalls 315 | 723 | #define __NR_64_Linux_syscalls 316 |
722 | 724 | ||
723 | #if _MIPS_SIM == _MIPS_SIM_NABI32 | 725 | #if _MIPS_SIM == _MIPS_SIM_NABI32 |
724 | 726 | ||
@@ -1046,15 +1048,16 @@ | |||
1046 | #define __NR_getrandom (__NR_Linux + 317) | 1048 | #define __NR_getrandom (__NR_Linux + 317) |
1047 | #define __NR_memfd_create (__NR_Linux + 318) | 1049 | #define __NR_memfd_create (__NR_Linux + 318) |
1048 | #define __NR_bpf (__NR_Linux + 319) | 1050 | #define __NR_bpf (__NR_Linux + 319) |
1051 | #define __NR_execveat (__NR_Linux + 320) | ||
1049 | 1052 | ||
1050 | /* | 1053 | /* |
1051 | * Offset of the last N32 flavoured syscall | 1054 | * Offset of the last N32 flavoured syscall |
1052 | */ | 1055 | */ |
1053 | #define __NR_Linux_syscalls 319 | 1056 | #define __NR_Linux_syscalls 320 |
1054 | 1057 | ||
1055 | #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ | 1058 | #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ |
1056 | 1059 | ||
1057 | #define __NR_N32_Linux 6000 | 1060 | #define __NR_N32_Linux 6000 |
1058 | #define __NR_N32_Linux_syscalls 319 | 1061 | #define __NR_N32_Linux_syscalls 320 |
1059 | 1062 | ||
1060 | #endif /* _UAPI_ASM_UNISTD_H */ | 1063 | #endif /* _UAPI_ASM_UNISTD_H */ |