* [PATCH] fix x86 cpuid keys used in alternative_smp()
@ 2006-08-15 16:03 Jan Beulich
2006-08-15 16:21 ` Andi Kleen
0 siblings, 1 reply; 3+ messages in thread
From: Jan Beulich @ 2006-08-15 16:03 UTC (permalink / raw)
To: Andreas Kleen, linux-kernel; +Cc: patches
By hard-coding the cpuid keys for alternative_smp() rather than using
the symbolic constant it turned out that incorrect values were used on
both i386 (0x68 instead of 0x69) and x86-64 (0x66 instead of 0x68).
Signed-off-by: Jan Beulich <jbeulich@novell.com>
--- linux-2.6.18-rc4/include/asm-i386/alternative.h 2006-08-15 11:29:59.000000000 +0200
+++ 2.6.18-rc4-x86-alternatives-key/include/asm-i386/alternative.h 2006-08-15 15:21:15.000000000 +0200
@@ -116,7 +116,7 @@ static inline void alternatives_smp_swit
" .align 4\n" \
" .long 661b\n" /* label */ \
" .long 663f\n" /* new instruction */ \
- " .byte 0x68\n" /* X86_FEATURE_UP */ \
+ " .byte " __stringify(X86_FEATURE_UP) "\n" \
" .byte 662b-661b\n" /* sourcelen */ \
" .byte 664f-663f\n" /* replacementlen */ \
".previous\n" \
--- linux-2.6.18-rc4/include/asm-x86_64/alternative.h 2006-08-15 11:30:02.000000000 +0200
+++ 2.6.18-rc4-x86-alternatives-key/include/asm-x86_64/alternative.h 2006-08-15 15:22:41.000000000 +0200
@@ -130,7 +130,7 @@ static inline void alternatives_smp_swit
" .align 8\n" \
" .quad 661b\n" /* label */ \
" .quad 663f\n" /* new instruction */ \
- " .byte 0x66\n" /* X86_FEATURE_UP */ \
+ " .byte " __stringify(X86_FEATURE_UP) "\n" \
" .byte 662b-661b\n" /* sourcelen */ \
" .byte 664f-663f\n" /* replacementlen */ \
".previous\n" \
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] fix x86 cpuid keys used in alternative_smp()
2006-08-15 16:03 [PATCH] fix x86 cpuid keys used in alternative_smp() Jan Beulich
@ 2006-08-15 16:21 ` Andi Kleen
2006-08-16 6:28 ` Jan Beulich
0 siblings, 1 reply; 3+ messages in thread
From: Andi Kleen @ 2006-08-15 16:21 UTC (permalink / raw)
To: Jan Beulich; +Cc: Andreas Kleen, linux-kernel, patches, discuss
On Tue, 15 Aug 2006 18:03:08 +0200
"Jan Beulich" <jbeulich@novell.com> wrote:
> By hard-coding the cpuid keys for alternative_smp() rather than using
> the symbolic constant it turned out that incorrect values were used on
> both i386 (0x68 instead of 0x69) and x86-64 (0x66 instead of 0x68).
Thanks. Applied.
I wonder if that was the reason why the .fill misassembly the
2.16.91.0.5 (10.1) binutils commits (see recent discuss report from
Rafael) didn't cause crashes on UP machines. Do you have
an opinion on that?
-Andi
]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] fix x86 cpuid keys used in alternative_smp()
2006-08-15 16:21 ` Andi Kleen
@ 2006-08-16 6:28 ` Jan Beulich
0 siblings, 0 replies; 3+ messages in thread
From: Jan Beulich @ 2006-08-16 6:28 UTC (permalink / raw)
To: Andi Kleen; +Cc: Andreas Kleen, linux-kernel, discuss
>> By hard-coding the cpuid keys for alternative_smp() rather than using
>> the symbolic constant it turned out that incorrect values were used on
>> both i386 (0x68 instead of 0x69) and x86-64 (0x66 instead of 0x68).
>
>Thanks. Applied.
>
>I wonder if that was the reason why the .fill misassembly the
>2.16.91.0.5 (10.1) binutils commits (see recent discuss report from
>Rafael) didn't cause crashes on UP machines. Do you have
>an opinion on that?
That is well possible - I saw the mail, and I also wondered why this
wouldn't result in a broken kernel.
Jan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-08-16 6:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-15 16:03 [PATCH] fix x86 cpuid keys used in alternative_smp() Jan Beulich
2006-08-15 16:21 ` Andi Kleen
2006-08-16 6:28 ` Jan Beulich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome