From: Chris Wright Date: Mon, 13 Feb 2006 19:21:17 +0000 (-0800) Subject: Add i386 phys_proc_id fix from Andi X-Git-Tag: v2.6.15.5~38 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8276c997ca94f5f5e6fc5d98b34d503aeba5706e;p=thirdparty%2Fkernel%2Fstable-queue.git Add i386 phys_proc_id fix from Andi --- diff --git a/queue/i386-move-phys_proc_id-early-intel-workaround-to-correct-function.patch b/queue/i386-move-phys_proc_id-early-intel-workaround-to-correct-function.patch new file mode 100644 index 00000000000..b18b369b7de --- /dev/null +++ b/queue/i386-move-phys_proc_id-early-intel-workaround-to-correct-function.patch @@ -0,0 +1,61 @@ +From stable-bounces@linux.kernel.org Mon Feb 13 01:37:31 2006 +Date: Mon, 13 Feb 2006 10:34:30 +0100 +From: Andi Kleen +To: stable@kernel.org +Cc: +Subject: [PATCH] i386: Move phys_proc_id/early intel workaround to correct function + + +early_cpu_detect only runs on the BP, but this code needs to run +on all CPUs. This will fix problems with the powernow-k8 driver +on dual core systems and general misdetection of AMD dual core. + +Looks like a mismerge somewhere. Also add a warning comment. + +Signed-off-by: Andi Kleen +Signed-off-by: Chris Wright +--- + + arch/i386/kernel/cpu/common.c | 17 ++++++++++------- + 1 files changed, 10 insertions(+), 7 deletions(-) + +--- linux-2.6.15.4.orig/arch/i386/kernel/cpu/common.c ++++ linux-2.6.15.4/arch/i386/kernel/cpu/common.c +@@ -207,7 +207,10 @@ static int __devinit have_cpuid_p(void) + + /* Do minimum CPU detection early. + Fields really needed: vendor, cpuid_level, family, model, mask, cache alignment. +- The others are not touched to avoid unwanted side effects. */ ++ The others are not touched to avoid unwanted side effects. ++ ++ WARNING: this function is only called on the BP. Don't add code here ++ that is supposed to run on all CPUs. */ + static void __init early_cpu_detect(void) + { + struct cpuinfo_x86 *c = &boot_cpu_data; +@@ -239,12 +242,6 @@ static void __init early_cpu_detect(void + if (cap0 & (1<<19)) + c->x86_cache_alignment = ((misc >> 8) & 0xff) * 8; + } +- +- early_intel_workaround(c); +- +-#ifdef CONFIG_X86_HT +- phys_proc_id[smp_processor_id()] = (cpuid_ebx(1) >> 24) & 0xff; +-#endif + } + + void __devinit generic_identify(struct cpuinfo_x86 * c) +@@ -292,6 +289,12 @@ void __devinit generic_identify(struct c + get_model_name(c); /* Default name */ + } + } ++ ++ early_intel_workaround(c); ++ ++#ifdef CONFIG_X86_HT ++ phys_proc_id[smp_processor_id()] = (cpuid_ebx(1) >> 24) & 0xff; ++#endif + } + + static void __devinit squash_the_stupid_serial_number(struct cpuinfo_x86 *c) diff --git a/queue/series b/queue/series index 902531cda5f..94b5e65df3a 100644 --- a/queue/series +++ b/queue/series @@ -2,3 +2,4 @@ ppc32-put-cache-flush-routines-back-into-.relocate_code-section.patch s390-klibc-build-fix-for-2.6.15.patch shmdt-cannot-detach-not-alined-shm-segment-cleanly.patch netfilter-missing-symbol.patch +i386-move-phys_proc_id-early-intel-workaround-to-correct-function.patch