diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-mips/bug.h | 3 | ||||
| -rw-r--r-- | include/asm-mips/checksum.h | 2 | ||||
| -rw-r--r-- | include/asm-mips/fpu.h | 25 | ||||
| -rw-r--r-- | include/asm-mips/sibyte/sb1250_scd.h | 1 | ||||
| -rw-r--r-- | include/asm-mips/thread_info.h | 1 |
5 files changed, 11 insertions, 21 deletions
diff --git a/include/asm-mips/bug.h b/include/asm-mips/bug.h index 4d560a533940..7eb63de808bc 100644 --- a/include/asm-mips/bug.h +++ b/include/asm-mips/bug.h | |||
| @@ -18,7 +18,8 @@ do { \ | |||
| 18 | 18 | ||
| 19 | #define BUG_ON(condition) \ | 19 | #define BUG_ON(condition) \ |
| 20 | do { \ | 20 | do { \ |
| 21 | __asm__ __volatile__("tne $0, %0" : : "r" (condition)); \ | 21 | __asm__ __volatile__("tne $0, %0, %1" \ |
| 22 | : : "r" (condition), "i" (BRK_BUG)); \ | ||
| 22 | } while (0) | 23 | } while (0) |
| 23 | 24 | ||
| 24 | #define HAVE_ARCH_BUG_ON | 25 | #define HAVE_ARCH_BUG_ON |
diff --git a/include/asm-mips/checksum.h b/include/asm-mips/checksum.h index 20a81e1548f5..290485ac5407 100644 --- a/include/asm-mips/checksum.h +++ b/include/asm-mips/checksum.h | |||
| @@ -166,7 +166,7 @@ static inline __wsum csum_tcpudp_nofold(__be32 saddr, | |||
| 166 | #else | 166 | #else |
| 167 | "r" (proto + len), | 167 | "r" (proto + len), |
| 168 | #endif | 168 | #endif |
| 169 | "r" (sum)); | 169 | "r" ((__force unsigned long)sum)); |
| 170 | 170 | ||
| 171 | return sum; | 171 | return sum; |
| 172 | } | 172 | } |
diff --git a/include/asm-mips/fpu.h b/include/asm-mips/fpu.h index 4e12d1f9534f..b414a7d9db43 100644 --- a/include/asm-mips/fpu.h +++ b/include/asm-mips/fpu.h | |||
| @@ -68,8 +68,6 @@ do { \ | |||
| 68 | /* We don't care about the c0 hazard here */ \ | 68 | /* We don't care about the c0 hazard here */ \ |
| 69 | } while (0) | 69 | } while (0) |
| 70 | 70 | ||
| 71 | #define __fpu_enabled() (read_c0_status() & ST0_CU1) | ||
| 72 | |||
| 73 | #define enable_fpu() \ | 71 | #define enable_fpu() \ |
| 74 | do { \ | 72 | do { \ |
| 75 | if (cpu_has_fpu) \ | 73 | if (cpu_has_fpu) \ |
| @@ -102,14 +100,19 @@ static inline void __own_fpu(void) | |||
| 102 | set_thread_flag(TIF_USEDFPU); | 100 | set_thread_flag(TIF_USEDFPU); |
| 103 | } | 101 | } |
| 104 | 102 | ||
| 105 | static inline void own_fpu(int restore) | 103 | static inline void own_fpu_inatomic(int restore) |
| 106 | { | 104 | { |
| 107 | preempt_disable(); | ||
| 108 | if (cpu_has_fpu && !__is_fpu_owner()) { | 105 | if (cpu_has_fpu && !__is_fpu_owner()) { |
| 109 | __own_fpu(); | 106 | __own_fpu(); |
| 110 | if (restore) | 107 | if (restore) |
| 111 | _restore_fp(current); | 108 | _restore_fp(current); |
| 112 | } | 109 | } |
| 110 | } | ||
| 111 | |||
| 112 | static inline void own_fpu(int restore) | ||
| 113 | { | ||
| 114 | preempt_disable(); | ||
| 115 | own_fpu_inatomic(restore); | ||
| 113 | preempt_enable(); | 116 | preempt_enable(); |
| 114 | } | 117 | } |
| 115 | 118 | ||
| @@ -162,18 +165,4 @@ static inline fpureg_t *get_fpu_regs(struct task_struct *tsk) | |||
| 162 | return tsk->thread.fpu.fpr; | 165 | return tsk->thread.fpu.fpr; |
| 163 | } | 166 | } |
| 164 | 167 | ||
| 165 | static inline void enable_fp_in_kernel(void) | ||
| 166 | { | ||
| 167 | set_thread_flag(TIF_ALLOW_FP_IN_KERNEL); | ||
| 168 | /* make sure CU1 and FPU ownership are consistent */ | ||
| 169 | if (!__is_fpu_owner() && __fpu_enabled()) | ||
| 170 | __disable_fpu(); | ||
| 171 | } | ||
| 172 | |||
| 173 | static inline void disable_fp_in_kernel(void) | ||
| 174 | { | ||
| 175 | BUG_ON(!__is_fpu_owner() && __fpu_enabled()); | ||
| 176 | clear_thread_flag(TIF_ALLOW_FP_IN_KERNEL); | ||
| 177 | } | ||
| 178 | |||
| 179 | #endif /* _ASM_FPU_H */ | 168 | #endif /* _ASM_FPU_H */ |
diff --git a/include/asm-mips/sibyte/sb1250_scd.h b/include/asm-mips/sibyte/sb1250_scd.h index 7ed0bb611e56..b6a7d8f6ced5 100644 --- a/include/asm-mips/sibyte/sb1250_scd.h +++ b/include/asm-mips/sibyte/sb1250_scd.h | |||
| @@ -84,6 +84,7 @@ | |||
| 84 | #define K_SYS_REVISION_BCM112x_A2 0x21 | 84 | #define K_SYS_REVISION_BCM112x_A2 0x21 |
| 85 | #define K_SYS_REVISION_BCM112x_A3 0x22 | 85 | #define K_SYS_REVISION_BCM112x_A3 0x22 |
| 86 | #define K_SYS_REVISION_BCM112x_A4 0x23 | 86 | #define K_SYS_REVISION_BCM112x_A4 0x23 |
| 87 | #define K_SYS_REVISION_BCM112x_B0 0x30 | ||
| 87 | 88 | ||
| 88 | #define K_SYS_REVISION_BCM1480_S0 0x01 | 89 | #define K_SYS_REVISION_BCM1480_S0 0x01 |
| 89 | #define K_SYS_REVISION_BCM1480_A1 0x02 | 90 | #define K_SYS_REVISION_BCM1480_A1 0x02 |
diff --git a/include/asm-mips/thread_info.h b/include/asm-mips/thread_info.h index 6cf05f4a4e7e..fbcda8204473 100644 --- a/include/asm-mips/thread_info.h +++ b/include/asm-mips/thread_info.h | |||
| @@ -119,7 +119,6 @@ register struct thread_info *__current_thread_info __asm__("$28"); | |||
| 119 | #define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling TIF_NEED_RESCHED */ | 119 | #define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling TIF_NEED_RESCHED */ |
| 120 | #define TIF_MEMDIE 18 | 120 | #define TIF_MEMDIE 18 |
| 121 | #define TIF_FREEZE 19 | 121 | #define TIF_FREEZE 19 |
| 122 | #define TIF_ALLOW_FP_IN_KERNEL 20 | ||
| 123 | #define TIF_SYSCALL_TRACE 31 /* syscall trace active */ | 122 | #define TIF_SYSCALL_TRACE 31 /* syscall trace active */ |
| 124 | 123 | ||
| 125 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) | 124 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) |
