x86: traps.c replace #if CONFIG_X86_32 with #ifdef CONFIG_X86_32
PATCH 1/1 x86: traps.c replace #if CONFIG_X86_32 with #ifdef CONFIG_X86_32
Impact: cleanup, avoid warning in X86_64
Fixes this warning in X86_64:
CC arch/x86/kernel/traps.oarch/x86/kernel/traps.c:695:5: warning: "CONFIG_X86_32" is not defined
--- arch/x86/kernel/traps.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/kernel/traps.c +1 -1
@@ -692,7 +692,7 @@ void math_error(void __user *ip) err = swd & ~cwd &0x3f ; -#if CONFIG_X86_32 +#ifdef CONFIG_X86_32 if (!err)return ;#endif
Signature · 1 line
1.5.5.1
H. Peter Anvin
AppliedQuoted 16 lines · Jaswinder Singh
Impact: cleanup, avoid warning in
X86_64Fixes this warning in
X86_64:
CCarch/x86/kernel/traps.oarch/x86/kernel/traps.c:695:5: warning: "CONFIG_X86_32" is not definedSigned-off-by Jaswinder Singh <[email protected]>--- arch/x86/kernel/traps.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)arch/x86/kernel/traps.c +0
-0
arch/x86/kernel/traps.c void math_error(void __user *ip) · line 698
Quoted 8 lines
arch/x86/kernel/traps.c +1
-1@@ -692,7 +692,7 @@ void math_error(void __user *ip) err = swd & ~cwd &0x3f ; -#if CONFIG_X86_32 +#ifdef CONFIG_X86_32 if (!err)return ;#endif
Applied to tip:x86/fpu, thanks.
Andi: you might have a perspective on this: in math_error() we bail out if there is no error on i386, but not on x86-64. I am rather assuming that is because it simply can't happen on x86-64 (no IRQ 13 bullshit) so it wasn't necessary?
Thanks,
-hpa
Quoted 9 lines · H. Peter Anvin
Quoted 2 lines
return;
#endifApplied to tip:x86/fpu, thanks.
Andi: you might have a perspective on this: in
math_error()we bail out if there is no error on i386, but not on x86-64. I am rather assuming that is because it simply can't happen on x86-64 (no IRQ 13 bullshit) so it wasn't necessary?
Probably yes because it was not needed. Don't remember the exact circumstances, sorry.
But dropping the #ifdef should be fine obviously.
-Andi
Signature · 1 line
[email protected]
Quoted 14 lines · On Tue, 23 Dec 2008 10:20:37 -0800 "H. Peter Anvin" <[email protected]> wrote:
arch/x86/kernel/traps.c void math_error(void __user *ip) · line 698
Quoted 11 lines
arch/x86/kernel/traps.c +1
-1@@ -692,7 +692,7 @@ void math_error(void __user *ip) err = swd & ~cwd &0x3f ; -#if CONFIG_X86_32 +#ifdef CONFIG_X86_32 if (!err)return ;#endif Applied to tip:x86/fpu, thanks.
Quoted 5 lines
Andi: you might have a perspective on this: in
math_error()we bail out if there is no error on i386, but not on x86-64. I am rather assuming that is because it simply can't happen on x86-64 (no IRQ 13 bullshit) so it wasn't necessary?
Some 32-bit x86 clones generate math error interrupts when there is no actual error.