Merge branch 'x86/fpu' into x86/asm, to pick up fix
authorIngo Molnar <mingo@kernel.org>
Mon, 6 Nov 2017 00:43:13 +0000 (01:43 +0100)
committerIngo Molnar <mingo@kernel.org>
Mon, 6 Nov 2017 00:43:13 +0000 (01:43 +0100)
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/kernel/cpu/cpuid-deps.c
include/linux/bitops.h

index c21f22d..904b0a3 100644 (file)
@@ -62,23 +62,19 @@ const static struct cpuid_dep cpuid_deps[] = {
        {}
 };
 
-static inline void __clear_cpu_cap(struct cpuinfo_x86 *c, unsigned int bit)
-{
-       clear_bit32(bit, c->x86_capability);
-}
-
-static inline void __setup_clear_cpu_cap(unsigned int bit)
-{
-       clear_cpu_cap(&boot_cpu_data, bit);
-       set_bit32(bit, cpu_caps_cleared);
-}
-
 static inline void clear_feature(struct cpuinfo_x86 *c, unsigned int feature)
 {
-       if (!c)
-               __setup_clear_cpu_cap(feature);
-       else
-               __clear_cpu_cap(c, feature);
+       /*
+        * Note: This could use the non atomic __*_bit() variants, but the
+        * rest of the cpufeature code uses atomics as well, so keep it for
+        * consistency. Cleanup all of it separately.
+        */
+       if (!c) {
+               clear_cpu_cap(&boot_cpu_data, feature);
+               set_bit(feature, (unsigned long *)cpu_caps_cleared);
+       } else {
+               clear_bit(feature, (unsigned long *)c->x86_capability);
+       }
 }
 
 /* Take the capabilities and the BUG bits into account */
index 36794f0..8fbe259 100644 (file)
@@ -227,32 +227,6 @@ static inline unsigned long __ffs64(u64 word)
        return __ffs((unsigned long)word);
 }
 
-/*
- * clear_bit32 - Clear a bit in memory for u32 array
- * @nr: Bit to clear
- * @addr: u32 * address of bitmap
- *
- * Same as clear_bit, but avoids needing casts for u32 arrays.
- */
-
-static __always_inline void clear_bit32(long nr, volatile u32 *addr)
-{
-       clear_bit(nr, (volatile unsigned long *)addr);
-}
-
-/*
- * set_bit32 - Set a bit in memory for u32 array
- * @nr: Bit to clear
- * @addr: u32 * address of bitmap
- *
- * Same as set_bit, but avoids needing casts for u32 arrays.
- */
-
-static __always_inline void set_bit32(long nr, volatile u32 *addr)
-{
-       set_bit(nr, (volatile unsigned long *)addr);
-}
-
 #ifdef __KERNEL__
 
 #ifndef set_mask_bits