diff options
| author | Dan Williams <dan.j.williams@intel.com> | 2019-03-11 15:37:55 -0400 |
|---|---|---|
| committer | Dan Williams <dan.j.williams@intel.com> | 2019-03-11 15:37:55 -0400 |
| commit | 4083014e32699af04a8e6eaa4855b08dba36a47a (patch) | |
| tree | fa37f9f9691fe64ca8a3c0cdc0315dc12462e6e4 /arch/mips/include/asm/bitops.h | |
| parent | 6fd96ff557963de8e62842a0dc360a6e3610d2bb (diff) | |
| parent | 78153dd45e7e0596ba32b15d02bda08e1513111e (diff) | |
Merge branch 'for-5.1/nfit/ars' into libnvdimm-for-next
Merge several updates to the ARS implementation. Highlights include:
* Support retrieval of short-ARS results if the ARS state is "requires
continuation", and even if the "no_init_ars" module parameter is
specified.
* Allow busy-polling of the kernel ARS state by allowing root to reset
the exponential back-off timer.
* Filter potentially stale ARS results by tracking query-ARS relative to
the previous start-ARS.
Diffstat (limited to 'arch/mips/include/asm/bitops.h')
| -rw-r--r-- | arch/mips/include/asm/bitops.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/mips/include/asm/bitops.h b/arch/mips/include/asm/bitops.h index c4675957b21b..830c93a010c3 100644 --- a/arch/mips/include/asm/bitops.h +++ b/arch/mips/include/asm/bitops.h | |||
| @@ -69,6 +69,7 @@ static inline void set_bit(unsigned long nr, volatile unsigned long *addr) | |||
| 69 | : "ir" (1UL << bit), GCC_OFF_SMALL_ASM() (*m)); | 69 | : "ir" (1UL << bit), GCC_OFF_SMALL_ASM() (*m)); |
| 70 | #if defined(CONFIG_CPU_MIPSR2) || defined(CONFIG_CPU_MIPSR6) | 70 | #if defined(CONFIG_CPU_MIPSR2) || defined(CONFIG_CPU_MIPSR6) |
| 71 | } else if (kernel_uses_llsc && __builtin_constant_p(bit)) { | 71 | } else if (kernel_uses_llsc && __builtin_constant_p(bit)) { |
| 72 | loongson_llsc_mb(); | ||
| 72 | do { | 73 | do { |
| 73 | __asm__ __volatile__( | 74 | __asm__ __volatile__( |
| 74 | " " __LL "%0, %1 # set_bit \n" | 75 | " " __LL "%0, %1 # set_bit \n" |
| @@ -79,6 +80,7 @@ static inline void set_bit(unsigned long nr, volatile unsigned long *addr) | |||
| 79 | } while (unlikely(!temp)); | 80 | } while (unlikely(!temp)); |
| 80 | #endif /* CONFIG_CPU_MIPSR2 || CONFIG_CPU_MIPSR6 */ | 81 | #endif /* CONFIG_CPU_MIPSR2 || CONFIG_CPU_MIPSR6 */ |
| 81 | } else if (kernel_uses_llsc) { | 82 | } else if (kernel_uses_llsc) { |
| 83 | loongson_llsc_mb(); | ||
| 82 | do { | 84 | do { |
| 83 | __asm__ __volatile__( | 85 | __asm__ __volatile__( |
| 84 | " .set push \n" | 86 | " .set push \n" |
| @@ -123,6 +125,7 @@ static inline void clear_bit(unsigned long nr, volatile unsigned long *addr) | |||
| 123 | : "ir" (~(1UL << bit))); | 125 | : "ir" (~(1UL << bit))); |
| 124 | #if defined(CONFIG_CPU_MIPSR2) || defined(CONFIG_CPU_MIPSR6) | 126 | #if defined(CONFIG_CPU_MIPSR2) || defined(CONFIG_CPU_MIPSR6) |
| 125 | } else if (kernel_uses_llsc && __builtin_constant_p(bit)) { | 127 | } else if (kernel_uses_llsc && __builtin_constant_p(bit)) { |
| 128 | loongson_llsc_mb(); | ||
| 126 | do { | 129 | do { |
| 127 | __asm__ __volatile__( | 130 | __asm__ __volatile__( |
| 128 | " " __LL "%0, %1 # clear_bit \n" | 131 | " " __LL "%0, %1 # clear_bit \n" |
| @@ -133,6 +136,7 @@ static inline void clear_bit(unsigned long nr, volatile unsigned long *addr) | |||
| 133 | } while (unlikely(!temp)); | 136 | } while (unlikely(!temp)); |
| 134 | #endif /* CONFIG_CPU_MIPSR2 || CONFIG_CPU_MIPSR6 */ | 137 | #endif /* CONFIG_CPU_MIPSR2 || CONFIG_CPU_MIPSR6 */ |
| 135 | } else if (kernel_uses_llsc) { | 138 | } else if (kernel_uses_llsc) { |
| 139 | loongson_llsc_mb(); | ||
| 136 | do { | 140 | do { |
| 137 | __asm__ __volatile__( | 141 | __asm__ __volatile__( |
| 138 | " .set push \n" | 142 | " .set push \n" |
| @@ -193,6 +197,7 @@ static inline void change_bit(unsigned long nr, volatile unsigned long *addr) | |||
| 193 | unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG); | 197 | unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG); |
| 194 | unsigned long temp; | 198 | unsigned long temp; |
| 195 | 199 | ||
| 200 | loongson_llsc_mb(); | ||
| 196 | do { | 201 | do { |
| 197 | __asm__ __volatile__( | 202 | __asm__ __volatile__( |
| 198 | " .set push \n" | 203 | " .set push \n" |
