diff options
author | Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> | 2007-12-19 14:42:02 -0500 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2007-12-19 15:30:47 -0500 |
commit | ed5d4026ae6f51bec25e03a891a7d59c492577ab (patch) | |
tree | 3eaaae505cfe2ef733c1356991e259da352da59c /arch/ia64/kernel/mca.c | |
parent | 285fbd66330cd5899f4e607e3e65ab5921ddabf0 (diff) |
[IA64] Adjust CMCI mask on CPU hotplug
Currently CMCI mask of hot-added CPU is always disabled after CPU hotplug.
We should adjust this mask depending on CMC polling state.
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/ia64/kernel/mca.c')
-rw-r--r-- | arch/ia64/kernel/mca.c | 33 |
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 | ||
1817 | static 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 | |||
1827 | static 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 | |||
1843 | static 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; |