diff options
| author | Mikael Pettersson <mikpe@csd.uu.se> | 2002-03-14 23:22:10 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2002-03-14 23:22:10 -0800 |
| commit | 1ae90c54c72dd492ae42c727b7b4d9e99c6da5f2 (patch) | |
| tree | 57ea0ae0a96077fb1fe3db386c7b3c3e673735d3 /drivers/acpi/acpi_processor.c | |
| parent | 27b350ef3a0f2e329d9a8dabdfb8cd217daf2a9b (diff) | |
[PATCH] boot_cpu_data corruption on SMP x86
The patch below eliminates a case of boot_cpu_data corruption
on SMP x86 machines. This was first observed on SMP Athlons,
but it also affects SMP Intel boxes in a less serious way.
When the secondary processors boot and execute head.S:checkCPUtype,
the code performs a 32-bit write of a small constant to the
byte-sized variable boot_cpu_data.x86 (X86 in head.S). Since the
write is 32-bit, it also writes zeros to the following 3 bytes,
which clobbers the x86_vendor, x86_model, and x86_mask fields
previously set up by check_bugs()'s call to identify_cpu().
Thus, after smp_init(), boot_cpu_data will _always_ identify
the CPU as an Intel (X86_VENDOR_INTEL == 0 in processor.h) with
model 0 and stepping 0.
The effect in standard kernels is not catastrophic, since:
(a) most SMP x86 boxes are Intel
(b) most uses of x86_vendor occur before smp_init() or reference
the SMP cpu_data[] array
(c) most post-boot references to boot_cpu_data occur in the
cpu_has_XXX macros which only read the x86_capability[] array
However, third-party extensions (like my x86 performance-monitoring
conters driver) can get seriously confused by this mis-identification.
Diffstat (limited to 'drivers/acpi/acpi_processor.c')
0 files changed, 0 insertions, 0 deletions
