aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/ia64/kernel/mca.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c
index 10b48cd15a87..6dbf5919d2d0 100644
--- a/arch/ia64/kernel/mca.c
+++ b/arch/ia64/kernel/mca.c
@@ -75,6 +75,7 @@
75#include <linux/workqueue.h> 75#include <linux/workqueue.h>
76#include <linux/cpumask.h> 76#include <linux/cpumask.h>
77#include <linux/kdebug.h> 77#include <linux/kdebug.h>
78#include <linux/cpu.h>
78 79
79#include <asm/delay.h> 80#include <asm/delay.h>
80#include <asm/machvec.h> 81#include <asm/machvec.h>
@@ -1813,6 +1814,36 @@ ia64_mca_cpu_init(void *cpu_data)
1813 PAGE_KERNEL)); 1814 PAGE_KERNEL));
1814} 1815}
1815 1816
1817static void __cpuinit ia64_mca_cmc_vector_adjust(void *dummy)
1818{
1819 unsigned long flags;
1820
1821 local_irq_save(flags);
1822 if (!cmc_polling_enabled)
1823 ia64_mca_cmc_vector_enable(NULL);
1824 local_irq_restore(flags);
1825}
1826
1827static int __cpuinit mca_cpu_callback(struct notifier_block *nfb,
1828 unsigned long action,
1829 void *hcpu)
1830{
1831 int hotcpu = (unsigned long) hcpu;
1832
1833 switch (action) {
1834 case CPU_ONLINE:
1835 case CPU_ONLINE_FROZEN:
1836 smp_call_function_single(hotcpu, ia64_mca_cmc_vector_adjust,
1837 NULL, 1, 0);
1838 break;
1839 }
1840 return NOTIFY_OK;
1841}
1842
1843static struct notifier_block mca_cpu_notifier __cpuinitdata = {
1844 .notifier_call = mca_cpu_callback
1845};
1846
1816/* 1847/*
1817 * ia64_mca_init 1848 * ia64_mca_init
1818 * 1849 *
@@ -1996,6 +2027,8 @@ ia64_mca_late_init(void)
1996 if (!mca_init) 2027 if (!mca_init)
1997 return 0; 2028 return 0;
1998 2029
2030 register_hotcpu_notifier(&mca_cpu_notifier);
2031
1999 /* Setup the CMCI/P vector and handler */ 2032 /* Setup the CMCI/P vector and handler */
2000 init_timer(&cmc_poll_timer); 2033 init_timer(&cmc_poll_timer);
2001 cmc_poll_timer.function = ia64_mca_cmc_poll; 2034 cmc_poll_timer.function = ia64_mca_cmc_poll;