2.6.16-rc1-mm4 i386 atomic operations broken on SMP (in modules at least)
In-Reply-To: <[email protected]>
Quoted 5 lines · Neil Brown
My guess is there is there is something wrong with the 'alternative' stuff which strips out the lock prefix, but I couldn't see anything obviously wrong. The CPUs don't have
FEATURE_UP(see below) so it cannot possibly be removing the 'lock' prefix... but it certainly acts like it is.
Look closer:
Quoted 3 lines
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca
cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe lmconstant_tscpni monitords_cplcid xtpr
^^^^^^^^^^^^
SMP alternatives is re-using the constant_tsc X86 feature bit.
include/asm-i386/cpufeature.h +1 -1
@@ -71,7 +71,7 @@#define X86_FEATURE_P4 (3*32+ 7)/* P4 */ #define X86_FEATURE_CONSTANT_TSC (3*32+ 8)/* TSC ticks at a constant rate */ -#define X86_FEATURE_UP (3*32+ 8)/* smp kernel running on up */ +#define X86_FEATURE_UP (3*32+ 9)/* smp kernel running on up */ /* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */ #define X86_FEATURE_XMM3 (4*32+ 0)/* Streaming SIMD Extensions-3 */
Signature · 1 line
Chuck
Quoted 23 lines · Chuck Ebbert
In-Reply-To: <[email protected]>
Quoted 5 lines · Neil Brown
My guess is there is there is something wrong with the 'alternative' stuff which strips out the lock prefix, but I couldn't see anything obviously wrong. The CPUs don't have
FEATURE_UP(see below) so it cannot possibly be removing the 'lock' prefix... but it certainly acts like it is.Look closer:
Quoted 3 lines
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca
cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe lmconstant_tscpni monitords_cplcid xtpr^^^^^^^^^^^^
SMP alternatives is re-using the
constant_tscX86 feature bit.
include/asm-i386/cpufeature.h line 77
Quoted 8 lines
include/asm-i386/cpufeature.h +1
-1@@ -71,7 +71,7 @@#define X86_FEATURE_P4 (3*32+ 7)/* P4 */ #define X86_FEATURE_CONSTANT_TSC (3*32+ 8)/* TSC ticks at a constant rate */ -#define X86_FEATURE_UP (3*32+ 8)/* smp kernel running on up */ +#define X86_FEATURE_UP (3*32+ 9)/* smp kernel running on up */ /* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */ #define X86_FEATURE_XMM3 (4*32+ 0)/* Streaming SIMD Extensions-3 */
Darn, how did you spot that?
Should `feature_up' appear in /proc/cpuinfo?
Quoted 27 lines · On Thursday February 2, [email protected] wrote:
Quoted 26 lines · Chuck Ebbert
In-Reply-To: <[email protected]>
Quoted 5 lines · Neil Brown
My guess is there is there is something wrong with the 'alternative' stuff which strips out the lock prefix, but I couldn't see anything obviously wrong. The CPUs don't have
FEATURE_UP(see below) so it cannot possibly be removing the 'lock' prefix... but it certainly acts like it is.Look closer:
Quoted 3 lines
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca
cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe lmconstant_tscpni monitords_cplcid xtpr^^^^^^^^^^^^
SMP alternatives is re-using the
constant_tscX86 feature bit.include/asm-i386/cpufeature.h +0
-0@@ -71,7 +71,7 @@#define X86_FEATURE_P4 (3*32+ 7)/* P4 */ #define X86_FEATURE_CONSTANT_TSC (3*32+ 8)/* TSC ticks at a constant rate */
Quoted 7 lines
include/asm-i386/cpufeature.h line 77
Quoted 5 lines
include/asm-i386/cpufeature.h +1
-1-#define X86_FEATURE_UP (3*32+ 8)/* smp kernel running on up */ +#define X86_FEATURE_UP (3*32+ 9)/* smp kernel running on up */ /* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */ #define X86_FEATURE_XMM3 (4*32+ 0)/* Streaming SIMD Extensions-3 */ Darn, how did you spot that?
I can't say how he found the needle in the haystack, but I can confirm that it fixes the problem. I'm running -mm4 quite successfully with this patch now.
Thanks!
Thinks.. maybe this typo would have been harder if the columns lined up better, like this:
Quoted 5 lines
include/asm-i386/cpufeature.h line 74
Quoted 5 lines
#define
X86_FEATURE_P4(3*32+ 7) /* P4 */
#defineX86_FEATURE_CONSTANT_TSC(3*32+ 8) /* TSC ticks at a constant rate */include/asm-i386/cpufeature.h +1
-1-#define X86_FEATURE_UP (3*32+ 8)/* smp kernel running on up */ +#define X86_FEATURE_UP (3*32+ 9)/* smp kernel running on up */
NeilBrown