* [PATCH] x86: fix percpu_{to,from}_op()
@ 2009-05-11 15:49 Jan Beulich
2009-05-11 19:20 ` Ingo Molnar
0 siblings, 1 reply; 2+ messages in thread
From: Jan Beulich @ 2009-05-11 15:49 UTC (permalink / raw)
To: Ingo Molnar, Thomas Gleixner, hpa; +Cc: linux-kernel
- the byte operand constraints were wrong for 32-bit
- the to-op's input operands weren't properly parenthesized
[ Impact: compilation problem fix ]
Signed-off-by: Jan Beulich <jbeulich@novell.com>
---
arch/x86/include/asm/percpu.h | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
--- linux-2.6.30-rc5/arch/x86/include/asm/percpu.h 2009-05-11 17:28:25.000000000 +0200
+++ 2.6.30-rc5-x86-percpu-accessors/arch/x86/include/asm/percpu.h 2009-05-07 16:40:11.000000000 +0200
@@ -82,22 +82,22 @@ do { \
case 1: \
asm(op "b %1,"__percpu_arg(0) \
: "+m" (var) \
- : "ri" ((T__)val)); \
+ : "qi" ((T__)(val))); \
break; \
case 2: \
asm(op "w %1,"__percpu_arg(0) \
: "+m" (var) \
- : "ri" ((T__)val)); \
+ : "ri" ((T__)(val))); \
break; \
case 4: \
asm(op "l %1,"__percpu_arg(0) \
: "+m" (var) \
- : "ri" ((T__)val)); \
+ : "ri" ((T__)(val))); \
break; \
case 8: \
asm(op "q %1,"__percpu_arg(0) \
: "+m" (var) \
- : "re" ((T__)val)); \
+ : "re" ((T__)(val))); \
break; \
default: __bad_percpu_size(); \
} \
@@ -109,7 +109,7 @@ do { \
switch (sizeof(var)) { \
case 1: \
asm(op "b "__percpu_arg(1)",%0" \
- : "=r" (ret__) \
+ : "=q" (ret__) \
: "m" (var)); \
break; \
case 2: \
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] x86: fix percpu_{to,from}_op()
2009-05-11 15:49 [PATCH] x86: fix percpu_{to,from}_op() Jan Beulich
@ 2009-05-11 19:20 ` Ingo Molnar
0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2009-05-11 19:20 UTC (permalink / raw)
To: Jan Beulich, Tejun Heo; +Cc: Thomas Gleixner, hpa, linux-kernel
* Jan Beulich <JBeulich@novell.com> wrote:
> - the byte operand constraints were wrong for 32-bit
> - the to-op's input operands weren't properly parenthesized
>
> [ Impact: compilation problem fix ]
>
> Signed-off-by: Jan Beulich <jbeulich@novell.com>
>
> ---
> arch/x86/include/asm/percpu.h | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
applied to x86/urgent, thanks.
Btw., what kind of compilation problem did you experience? Did GCC
bail out with a constraint error (which version?), or did you get a
miscompiled kernel?
Ingo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-05-11 19:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-11 15:49 [PATCH] x86: fix percpu_{to,from}_op() Jan Beulich
2009-05-11 19:20 ` Ingo Molnar
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®