summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/mcheck/mce-inject.c
diff options
context:
space:
mode:
authorAndi Kleen <andi@firstfloor.org>2009-05-27 21:56:56 +0200
committerH. Peter Anvin <hpa@zytor.com>2009-06-03 14:40:38 -0700
commitd620c67fb92aa11736112f9a03e31d8e3079c57a (patch)
treead624a23926c1cadaa577b36f8eb57f4de055bc0 /arch/x86/kernel/cpu/mcheck/mce-inject.c
parentf6fb0ac0869500323c78fa21992fe1933af61e91 (diff)
downloadlinux-d620c67fb92aa11736112f9a03e31d8e3079c57a.tar.bz2
x86, mce: support more than 256 CPUs in struct mce
The old struct mce had a limitation to 256 CPUs. But x86 Linux supports more than that now with x2apic. Add a new field extcpu to report the extended number. Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/kernel/cpu/mcheck/mce-inject.c')
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce-inject.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/x86/kernel/cpu/mcheck/mce-inject.c b/arch/x86/kernel/cpu/mcheck/mce-inject.c
index 7b3a5428396a..7d858fb4ce67 100644
--- a/arch/x86/kernel/cpu/mcheck/mce-inject.c
+++ b/arch/x86/kernel/cpu/mcheck/mce-inject.c
@@ -23,14 +23,14 @@
/* Update fake mce registers on current CPU. */
static void inject_mce(struct mce *m)
{
- struct mce *i = &per_cpu(injectm, m->cpu);
+ struct mce *i = &per_cpu(injectm, m->extcpu);
/* Make sure noone reads partially written injectm */
i->finished = 0;
mb();
m->finished = 0;
/* First set the fields after finished */
- i->cpu = m->cpu;
+ i->extcpu = m->extcpu;
mb();
/* Now write record in order, finished last (except above) */
memcpy(i, m, sizeof(struct mce));
@@ -49,7 +49,7 @@ static void raise_mce(unsigned long data)
{
struct delayed_mce *dm = (struct delayed_mce *)data;
struct mce *m = &dm->m;
- int cpu = m->cpu;
+ int cpu = m->extcpu;
inject_mce(m);
if (m->status & MCI_STATUS_UC) {
@@ -93,7 +93,7 @@ static ssize_t mce_write(struct file *filp, const char __user *ubuf,
if (copy_from_user(&m, ubuf, usize))
return -EFAULT;
- if (m.cpu >= num_possible_cpus() || !cpu_online(m.cpu))
+ if (m.extcpu >= num_possible_cpus() || !cpu_online(m.extcpu))
return -EINVAL;
dm = kmalloc(sizeof(struct delayed_mce), GFP_KERNEL);
@@ -108,7 +108,7 @@ static ssize_t mce_write(struct file *filp, const char __user *ubuf,
memcpy(&dm->m, &m, sizeof(struct mce));
setup_timer(&dm->timer, raise_mce, (unsigned long)dm);
dm->timer.expires = jiffies + 2;
- add_timer_on(&dm->timer, m.cpu);
+ add_timer_on(&dm->timer, m.extcpu);
return usize;
}