x86/asm: Clarify static_cpu_has()'s intended use
[sfrench/cifs-2.6.git] / arch / x86 / include / asm / cpufeature.h
index 2fb791a1b479bab6046009ebc1f98dc2308fe6e3..6d6d5cc4302bc6d3a850338f3901b792ec8c3f39 100644 (file)
@@ -155,9 +155,12 @@ extern void clear_cpu_cap(struct cpuinfo_x86 *c, unsigned int bit);
 #else
 
 /*
- * Static testing of CPU features.  Used the same as boot_cpu_has().
- * These will statically patch the target code for additional
- * performance.
+ * Static testing of CPU features. Used the same as boot_cpu_has(). It
+ * statically patches the target code for additional performance. Use
+ * static_cpu_has() only in fast paths, where every cycle counts. Which
+ * means that the boot_cpu_has() variant is already fast enough for the
+ * majority of cases and you should stick to using it as it is generally
+ * only two instructions: a RIP-relative MOV and a TEST.
  */
 static __always_inline bool _static_cpu_has(u16 bit)
 {