Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ed5d4026ae6f51bec25e03a891a7d59c492577ab
Commit:     ed5d4026ae6f51bec25e03a891a7d59c492577ab
Parent:     285fbd66330cd5899f4e607e3e65ab5921ddabf0
Author:     Hidetoshi Seto <[EMAIL PROTECTED]>
AuthorDate: Wed Dec 19 11:42:02 2007 -0800
Committer:  Tony Luck <[EMAIL PROTECTED]>
CommitDate: Wed Dec 19 12:30:47 2007 -0800

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: Satoru Takeuchi <[EMAIL PROTECTED]>
    Signed-off-by: Tony Luck <[EMAIL PROTECTED]>
---
 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 10b48cd..6dbf591 100644
--- a/arch/ia64/kernel/mca.c
+++ b/arch/ia64/kernel/mca.c
@@ -75,6 +75,7 @@
 #include <linux/workqueue.h>
 #include <linux/cpumask.h>
 #include <linux/kdebug.h>
+#include <linux/cpu.h>
 
 #include <asm/delay.h>
 #include <asm/machvec.h>
@@ -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;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to