forked from mirrors/linux
		
	x86: Remove FAST_FEATURE_TESTS
Since we want to rely on static branches to avoid speculation, remove any possible fallback code for static_cpu_has. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: torvalds@linux-foundation.org Link: https://lkml.kernel.org/r/20180319154717.705383007@infradead.org
This commit is contained in:
		
							parent
							
								
									e501ce957a
								
							
						
					
					
						commit
						d0266046ad
					
				
					 2 changed files with 0 additions and 19 deletions
				
			
		| 
						 | 
					@ -393,17 +393,6 @@ config X86_FEATURE_NAMES
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	  If in doubt, say Y.
 | 
						  If in doubt, say Y.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
config X86_FAST_FEATURE_TESTS
 | 
					 | 
				
			||||||
	bool "Fast CPU feature tests" if EMBEDDED
 | 
					 | 
				
			||||||
	default y
 | 
					 | 
				
			||||||
	---help---
 | 
					 | 
				
			||||||
	  Some fast-paths in the kernel depend on the capabilities of the CPU.
 | 
					 | 
				
			||||||
	  Say Y here for the kernel to patch in the appropriate code at runtime
 | 
					 | 
				
			||||||
	  based on the capabilities of the CPU. The infrastructure for patching
 | 
					 | 
				
			||||||
	  code at runtime takes up some additional space; space-constrained
 | 
					 | 
				
			||||||
	  embedded systems may wish to say N here to produce smaller, slightly
 | 
					 | 
				
			||||||
	  slower code.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
config X86_X2APIC
 | 
					config X86_X2APIC
 | 
				
			||||||
	bool "Support x2apic"
 | 
						bool "Support x2apic"
 | 
				
			||||||
	depends on X86_LOCAL_APIC && X86_64 && (IRQ_REMAP || HYPERVISOR_GUEST)
 | 
						depends on X86_LOCAL_APIC && X86_64 && (IRQ_REMAP || HYPERVISOR_GUEST)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -140,7 +140,6 @@ extern void clear_cpu_cap(struct cpuinfo_x86 *c, unsigned int bit);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define setup_force_cpu_bug(bit) setup_force_cpu_cap(bit)
 | 
					#define setup_force_cpu_bug(bit) setup_force_cpu_cap(bit)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if defined(CC_HAVE_ASM_GOTO) && defined(CONFIG_X86_FAST_FEATURE_TESTS)
 | 
					 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * Static testing of CPU features.  Used the same as boot_cpu_has().
 | 
					 * Static testing of CPU features.  Used the same as boot_cpu_has().
 | 
				
			||||||
 * These will statically patch the target code for additional
 | 
					 * These will statically patch the target code for additional
 | 
				
			||||||
| 
						 | 
					@ -196,13 +195,6 @@ static __always_inline __pure bool _static_cpu_has(u16 bit)
 | 
				
			||||||
		boot_cpu_has(bit) :				\
 | 
							boot_cpu_has(bit) :				\
 | 
				
			||||||
		_static_cpu_has(bit)				\
 | 
							_static_cpu_has(bit)				\
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
#else
 | 
					 | 
				
			||||||
/*
 | 
					 | 
				
			||||||
 * Fall back to dynamic for gcc versions which don't support asm goto. Should be
 | 
					 | 
				
			||||||
 * a minority now anyway.
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
#define static_cpu_has(bit)		boot_cpu_has(bit)
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define cpu_has_bug(c, bit)		cpu_has(c, (bit))
 | 
					#define cpu_has_bug(c, bit)		cpu_has(c, (bit))
 | 
				
			||||||
#define set_cpu_bug(c, bit)		set_cpu_cap(c, (bit))
 | 
					#define set_cpu_bug(c, bit)		set_cpu_cap(c, (bit))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue