Commit a44059c5 authored by Andi Kleen's avatar Andi Kleen Committed by Anton Altaparmakov

[PATCH] Fix memory corruption on hyperthreaded x86-64 machines

Fix memory corruption in the HT init on x86-64 recently introduced by me.

Fix from from Suresh B. Siddha.
parent 253112b4
...@@ -596,8 +596,6 @@ static int __init init_amd(struct cpuinfo_x86 *c) ...@@ -596,8 +596,6 @@ static int __init init_amd(struct cpuinfo_x86 *c)
static void __init detect_ht(void) static void __init detect_ht(void)
{ {
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
extern int phys_proc_id[NR_CPUS];
u32 eax, ebx, ecx, edx; u32 eax, ebx, ecx, edx;
int index_lsb, index_msb, tmp; int index_lsb, index_msb, tmp;
int initial_apic_id; int initial_apic_id;
...@@ -1011,7 +1009,6 @@ static int show_cpuinfo(struct seq_file *m, void *v) ...@@ -1011,7 +1009,6 @@ static int show_cpuinfo(struct seq_file *m, void *v)
#ifdef CONFIG_X86_HT #ifdef CONFIG_X86_HT
if (cpu_has_ht) { if (cpu_has_ht) {
extern int phys_proc_id[NR_CPUS];
seq_printf(m, "physical id\t: %d\n", phys_proc_id[c - cpu_data]); seq_printf(m, "physical id\t: %d\n", phys_proc_id[c - cpu_data]);
seq_printf(m, "siblings\t: %d\n", smp_num_siblings); seq_printf(m, "siblings\t: %d\n", smp_num_siblings);
} }
......
...@@ -48,6 +48,7 @@ extern void (*mtrr_hook) (void); ...@@ -48,6 +48,7 @@ extern void (*mtrr_hook) (void);
extern void zap_low_mappings(void); extern void zap_low_mappings(void);
void smp_stop_cpu(void); void smp_stop_cpu(void);
extern char cpu_sibling_map[]; extern char cpu_sibling_map[];
extern char phys_proc_id[NR_CPUS];
#define SMP_TRAMPOLINE_BASE 0x6000 #define SMP_TRAMPOLINE_BASE 0x6000
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment