From 19bc0508cd4e2cf714cb2d94d8beab733330e312 Mon Sep 17 00:00:00 2001 From: Hidetoshi Seto Date: Wed, 19 Dec 2007 11:42:02 -0800 Subject: [PATCH] --- yaml --- r: 75093 b: refs/heads/master c: ed5d4026ae6f51bec25e03a891a7d59c492577ab h: refs/heads/master i: 75091: 8eb0050b23bf5870d6b0cbd3e3ac5385b927d4af v: v3 --- [refs] | 2 +- trunk/arch/ia64/kernel/mca.c | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 9596acb5e590..e85faae7b07f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 285fbd66330cd5899f4e607e3e65ab5921ddabf0 +refs/heads/master: ed5d4026ae6f51bec25e03a891a7d59c492577ab diff --git a/trunk/arch/ia64/kernel/mca.c b/trunk/arch/ia64/kernel/mca.c index 10b48cd15a87..6dbf5919d2d0 100644 --- a/trunk/arch/ia64/kernel/mca.c +++ b/trunk/arch/ia64/kernel/mca.c @@ -75,6 +75,7 @@ #include #include #include +#include #include #include @@ -1813,6 +1814,36 @@ ia64_mca_cpu_init(void *cpu_data) PAGE_KERNEL)); } +static void __cpuinit ia64_mca_cmc_vector_adjust(void *dummy) +{ + unsigned long flags; + + local_irq_save(flags); + if (!cmc_polling_enabled) + ia64_mca_cmc_vector_enable(NULL); + local_irq_restore(flags); +} + +static int __cpuinit mca_cpu_callback(struct notifier_block *nfb, + unsigned long action, + void *hcpu) +{ + int hotcpu = (unsigned long) hcpu; + + switch (action) { + case CPU_ONLINE: + case CPU_ONLINE_FROZEN: + smp_call_function_single(hotcpu, ia64_mca_cmc_vector_adjust, + NULL, 1, 0); + break; + } + return NOTIFY_OK; +} + +static struct notifier_block mca_cpu_notifier __cpuinitdata = { + .notifier_call = mca_cpu_callback +}; + /* * ia64_mca_init * @@ -1996,6 +2027,8 @@ ia64_mca_late_init(void) if (!mca_init) return 0; + register_hotcpu_notifier(&mca_cpu_notifier); + /* Setup the CMCI/P vector and handler */ init_timer(&cmc_poll_timer); cmc_poll_timer.function = ia64_mca_cmc_poll;