From: Bhavna Sarathy <bnagendr@redhat.com> Date: Tue, 22 Sep 2009 16:11:14 -0400 Subject: [x86] fix up threshold_bank4 support on AMD Magny-cours Message-id: <20090922161310.7053.99485.sendpatchset@localhost.localdomain> Patchwork-id: 20919 O-Subject: [RHEL5.5 PATCH 3/3] Fix up threshold_bank4 support on AMD Magny-cours Bugzilla: 513684 RH-Acked-by: Christopher Lalancette <clalance@redhat.com> RH-Acked-by: Prarit Bhargava <prarit@redhat.com> Resolves BZ 513684 Fixup MCE Thresholding support on Magny-cours processors. diff --git a/arch/x86_64/kernel/mce_amd.c b/arch/x86_64/kernel/mce_amd.c index 883fe74..93ab5f9 100644 --- a/arch/x86_64/kernel/mce_amd.c +++ b/arch/x86_64/kernel/mce_amd.c @@ -454,12 +454,13 @@ static __cpuinit int threshold_create_bank(unsigned int cpu, unsigned int bank) struct threshold_bank *b = NULL; cpumask_t oldmask = CPU_MASK_NONE; char name[32]; + struct cpuinfo_x86 *c = cpu_data; sprintf(name, "threshold_bank%i", bank); #ifdef CONFIG_SMP if (cpu_data[cpu].cpu_core_id && shared_bank[bank]) { /* symlink */ - i = first_cpu(cpu_core_map[cpu]); + i = first_cpu(c->llc_shared_map); /* first core not up yet */ if (cpu_data[i].cpu_core_id) @@ -479,7 +480,7 @@ static __cpuinit int threshold_create_bank(unsigned int cpu, unsigned int bank) if (err) goto out; - b->cpus = cpu_core_map[cpu]; + b->cpus = c->llc_shared_map; per_cpu(threshold_banks, cpu)[bank] = b; goto out; } @@ -497,7 +498,7 @@ static __cpuinit int threshold_create_bank(unsigned int cpu, unsigned int bank) #ifndef CONFIG_SMP b->cpus = CPU_MASK_ALL; #else - b->cpus = cpu_core_map[cpu]; + b->cpus = c->llc_shared_map; #endif err = kobject_register(&b->kobj); if (err)