x86, cpufeature: Suppress compiler warning with gcc 3.x
Gcc 3.x generates a warning arch/x86/include/asm/cpufeature.h: In function `__static_cpu_has': arch/x86/include/asm/cpufeature.h:326: warning: asm operand 1 probably doesn't match constraints on each file. But static_cpu_has() for gcc 3.x does not need __static_cpu_has(). Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> LKML-Reference: <201008300127.o7U1RC6Z044051@www262.sakura.ne.jp> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
This commit is contained in:
parent
36ac4b987b
commit
2fd818642a
|
@ -296,6 +296,7 @@ extern const char * const x86_power_flags[32];
|
|||
|
||||
#endif /* CONFIG_X86_64 */
|
||||
|
||||
#if __GNUC__ >= 4
|
||||
/*
|
||||
* Static testing of CPU features. Used the same as boot_cpu_has().
|
||||
* These are only valid after alternatives have run, but will statically
|
||||
|
@ -304,7 +305,7 @@ extern const char * const x86_power_flags[32];
|
|||
*/
|
||||
static __always_inline __pure bool __static_cpu_has(u16 bit)
|
||||
{
|
||||
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
|
||||
#if __GNUC__ > 4 || __GNUC_MINOR__ >= 5
|
||||
asm goto("1: jmp %l[t_no]\n"
|
||||
"2:\n"
|
||||
".section .altinstructions,\"a\"\n"
|
||||
|
@ -345,7 +346,6 @@ static __always_inline __pure bool __static_cpu_has(u16 bit)
|
|||
#endif
|
||||
}
|
||||
|
||||
#if __GNUC__ >= 4
|
||||
#define static_cpu_has(bit) \
|
||||
( \
|
||||
__builtin_constant_p(boot_cpu_has(bit)) ? \
|
||||
|
|
Loading…
Reference in New Issue