Lines Matching refs:bit
52 #define test_cpu_cap(c, bit) \
53 arch_test_bit(bit, (unsigned long *)((c)->x86_capability))
57 * (selected with (bit>>5) give us the word number and the low 5
58 * bits give us the bit/feature number inside the word.
59 * (1UL<<((bit)&31) gives us a mask for the feature_bit so we can
62 #define CHECK_BIT_IN_MASK_WORD(maskname, word, bit) \
63 (((bit)>>5)==(word) && (1UL<<((bit)&31) & maskname##word ))
122 #define cpu_has(c, bit) \
123 (__builtin_constant_p(bit) && REQUIRED_MASK_BIT_SET(bit) ? 1 : \
124 test_cpu_cap(c, bit))
126 #define this_cpu_has(bit) \
127 (__builtin_constant_p(bit) && REQUIRED_MASK_BIT_SET(bit) ? 1 : \
128 x86_this_cpu_test_bit(bit, \
139 #define cpu_feature_enabled(bit) \
140 (__builtin_constant_p(bit) && DISABLED_MASK_BIT_SET(bit) ? 0 : static_cpu_has(bit))
142 #define boot_cpu_has(bit) cpu_has(&boot_cpu_data, bit)
144 #define set_cpu_cap(c, bit) set_bit(bit, (unsigned long *)((c)->x86_capability))
146 extern void setup_clear_cpu_cap(unsigned int bit);
147 extern void clear_cpu_cap(struct cpuinfo_x86 *c, unsigned int bit);
149 #define setup_force_cpu_cap(bit) do { \
150 set_cpu_cap(&boot_cpu_data, bit); \
151 set_bit(bit, (unsigned long *)cpu_caps_set); \
154 #define setup_force_cpu_bug(bit) setup_force_cpu_cap(bit)
169 static __always_inline bool _static_cpu_has(u16 bit)
179 : : [feature] "i" (bit),
180 [bitnum] "i" (1 << (bit & 7)),
181 [cap_byte] "i" (&((const char *)boot_cpu_data.x86_capability)[bit >> 3])
189 #define static_cpu_has(bit) \
191 __builtin_constant_p(boot_cpu_has(bit)) ? \
192 boot_cpu_has(bit) : \
193 _static_cpu_has(bit) \
196 #define cpu_has_bug(c, bit) cpu_has(c, (bit))
197 #define set_cpu_bug(c, bit) set_cpu_cap(c, (bit))
198 #define clear_cpu_bug(c, bit) clear_cpu_cap(c, (bit))
200 #define static_cpu_has_bug(bit) static_cpu_has((bit))
201 #define boot_cpu_has_bug(bit) cpu_has_bug(&boot_cpu_data, (bit))
202 #define boot_cpu_set_bug(bit) set_cpu_cap(&boot_cpu_data, (bit))