Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > fc11cd6e1c513a17304da94a5390f3cd > files > 3972

kernel-2.6.18-194.11.1.el5.src.rpm

From: Bhavna Sarathy <bnagendr@redhat.com>
Date: Wed, 30 Sep 2009 18:25:24 -0400
Subject: [x86] mce_amd: fix up threshold_bank4 creation
Message-id: <20090930182726.7763.68917.sendpatchset@localhost.localdomain>
Patchwork-id: 20998
O-Subject: [RHEL5.5 PATCH 3/3] Fix up threshold_bank4
Bugzilla: 526315
RH-Acked-by: Prarit Bhargava <prarit@redhat.com>

Resolves BZ 526315

threshold_bank4 was not being created correctly.

This error was detected through RHEL5.4 experimental kernel testing, and this fix is being
submitted for RHEL5.5 support.

Please review and ACK.

diff --git a/arch/x86_64/kernel/mce_amd.c b/arch/x86_64/kernel/mce_amd.c
index 93ab5f9..d6ee879 100644
--- a/arch/x86_64/kernel/mce_amd.c
+++ b/arch/x86_64/kernel/mce_amd.c
@@ -454,12 +454,12 @@ 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;
+	struct cpuinfo_x86 *c = &cpu_data[cpu];
 
 	sprintf(name, "threshold_bank%i", bank);
 
 #ifdef CONFIG_SMP
-	if (cpu_data[cpu].cpu_core_id && shared_bank[bank]) {	/* symlink */
+	if (c->cpu_core_id && shared_bank[bank]) {	/* symlink */
 		i = first_cpu(c->llc_shared_map);
 
 		/* first core not up yet */