mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] x86: traps.c replace #if CONFIG_X86_32 with #ifdef CONFIG_X86_32
@ 2008-12-23 16:20 Jaswinder Singh
  2008-12-23 18:20 ` H. Peter Anvin
  0 siblings, 1 reply; 4+ messages in thread
From: Jaswinder Singh @ 2008-12-23 16:20 UTC (permalink / raw)
  To: Ingo Molnar, Andi Kleen, x86 maintainers, LKML

Impact: cleanup, avoid warning in X86_64

Fixes this warning in X86_64:
  CC      arch/x86/kernel/traps.o
arch/x86/kernel/traps.c:695:5: warning: "CONFIG_X86_32" is not defined

Signed-off-by: Jaswinder Singh <jaswinder@infradead.org>
---
 arch/x86/kernel/traps.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
index d327b53..2c00412 100644
--- a/arch/x86/kernel/traps.c
+++ b/arch/x86/kernel/traps.c
@@ -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
-- 
1.5.5.1




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] x86: traps.c replace #if CONFIG_X86_32 with #ifdef CONFIG_X86_32
  2008-12-23 16:20 [PATCH] x86: traps.c replace #if CONFIG_X86_32 with #ifdef CONFIG_X86_32 Jaswinder Singh
@ 2008-12-23 18:20 ` H. Peter Anvin
  2008-12-23 18:48   ` Andi Kleen
  2008-12-23 20:32   ` Chuck Ebbert
  0 siblings, 2 replies; 4+ messages in thread
From: H. Peter Anvin @ 2008-12-23 18:20 UTC (permalink / raw)
  To: Jaswinder Singh; +Cc: Ingo Molnar, Andi Kleen, x86 maintainers, LKML

Jaswinder Singh wrote:
> Impact: cleanup, avoid warning in X86_64
> 
> Fixes this warning in X86_64:
>   CC      arch/x86/kernel/traps.o
> arch/x86/kernel/traps.c:695:5: warning: "CONFIG_X86_32" is not defined
> 
> Signed-off-by: Jaswinder Singh <jaswinder@infradead.org>
> ---
>  arch/x86/kernel/traps.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
> index d327b53..2c00412 100644
> --- a/arch/x86/kernel/traps.c
> +++ b/arch/x86/kernel/traps.c
> @@ -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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] x86: traps.c replace #if CONFIG_X86_32 with #ifdef CONFIG_X86_32
  2008-12-23 18:20 ` H. Peter Anvin
@ 2008-12-23 18:48   ` Andi Kleen
  2008-12-23 20:32   ` Chuck Ebbert
  1 sibling, 0 replies; 4+ messages in thread
From: Andi Kleen @ 2008-12-23 18:48 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: Jaswinder Singh, Ingo Molnar, Andi Kleen, x86 maintainers, LKML

On Tue, Dec 23, 2008 at 10:20:37AM -0800, H. Peter Anvin wrote:
> >  		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?

Probably yes because it was not needed. Don't remember the exact circumstances,
sorry.

But dropping the #ifdef should be fine obviously.

-Andi
-- 
ak@linux.intel.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] x86: traps.c replace #if CONFIG_X86_32 with #ifdef CONFIG_X86_32
  2008-12-23 18:20 ` H. Peter Anvin
  2008-12-23 18:48   ` Andi Kleen
@ 2008-12-23 20:32   ` Chuck Ebbert
  1 sibling, 0 replies; 4+ messages in thread
From: Chuck Ebbert @ 2008-12-23 20:32 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: Jaswinder Singh, Ingo Molnar, Andi Kleen, x86 maintainers, LKML

On Tue, 23 Dec 2008 10:20:37 -0800
"H. Peter Anvin" <hpa@kernel.org> wrote:

> > --- a/arch/x86/kernel/traps.c
> > +++ b/arch/x86/kernel/traps.c
> > @@ -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?
> 

Some 32-bit x86 clones generate math error interrupts when there is no
actual error.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-12-23 20:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-23 16:20 [PATCH] x86: traps.c replace #if CONFIG_X86_32 with #ifdef CONFIG_X86_32 Jaswinder Singh
2008-12-23 18:20 ` H. Peter Anvin
2008-12-23 18:48   ` Andi Kleen
2008-12-23 20:32   ` Chuck Ebbert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®