Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1486820

[tip:smp/hotplug] ia64/mca: Convert to hotplug state machine

Path csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod
From tip-bot for Sebastian Andrzej Siewior <tipbot@zytor.com>
Newsgroups linux.kernel
Subject [tip:smp/hotplug] ia64/mca: Convert to hotplug state machine
Date Mon, 19 Sep 2016 22:00:02 +0200
Message-ID <sjcTo-1ej-43@gated-at.bofh.it> (permalink)
References <ses2J-4Ps-13@gated-at.bofh.it>
Reply-To linux-kernel@vger.kernel.org, tony.luck@intel.com, tglx@linutronix.de, peterz@infradead.org, hpa@zytor.com, fenghua.yu@intel.com, bigeasy@linutronix.de, mingo@kernel.org
Git-Commit-ID 6b8d642239e866debbaa37f25e53837a5d141f33
X-Mailer tip-git-log-daemon
Robot-ID <tip-bot.git.kernel.org>
Robot-Unsubscribe Contact <mailto:hpa@kernel.org> to get blacklisted from these emails
MIME-Version 1.0
Content-Transfer-Encoding 8bit
Content-Type text/plain; charset=UTF-8
Content-Disposition inline
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 83
Organization linux.* mail to news gateway
X-Original-Cc mingo@kernel.org, bigeasy@linutronix.de, fenghua.yu@intel.com, hpa@zytor.com, peterz@infradead.org, tglx@linutronix.de, tony.luck@intel.com, linux-kernel@vger.kernel.org
X-Original-Date Mon, 19 Sep 2016 12:53:17 -0700
X-Original-Message-ID <tip-6b8d642239e866debbaa37f25e53837a5d141f33@git.kernel.org>
X-Original-References <20160906170457.32393-5-bigeasy@linutronix.de>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1486820

Show key headers only | View raw


Commit-ID:  6b8d642239e866debbaa37f25e53837a5d141f33
Gitweb:     http://git.kernel.org/tip/6b8d642239e866debbaa37f25e53837a5d141f33
Author:     Sebastian Andrzej Siewior <bigeasy@linutronix.de>
AuthorDate: Tue, 6 Sep 2016 19:04:40 +0200
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Mon, 19 Sep 2016 21:44:26 +0200

ia64/mca: Convert to hotplug state machine

Install the callbacks via the state machine and let the core invoke
the callbacks on the already online CPUs.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: linux-ia64@vger.kernel.org
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: rt@linutronix.de
Link: http://lkml.kernel.org/r/20160906170457.32393-5-bigeasy@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

---
 arch/ia64/kernel/mca.c | 26 ++++----------------------
 1 file changed, 4 insertions(+), 22 deletions(-)

diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c
index eb9220c..c2858865 100644
--- a/arch/ia64/kernel/mca.c
+++ b/arch/ia64/kernel/mca.c
@@ -1890,7 +1890,7 @@ ia64_mca_cpu_init(void *cpu_data)
 							      PAGE_KERNEL)));
 }
 
-static void ia64_mca_cmc_vector_adjust(void *dummy)
+static int ia64_mca_cpu_online(unsigned int cpu)
 {
 	unsigned long flags;
 
@@ -1898,25 +1898,9 @@ static void ia64_mca_cmc_vector_adjust(void *dummy)
 	if (!cmc_polling_enabled)
 		ia64_mca_cmc_vector_enable(NULL);
 	local_irq_restore(flags);
+	return 0;
 }
 
-static int mca_cpu_callback(struct notifier_block *nfb,
-				      unsigned long action,
-				      void *hcpu)
-{
-	switch (action) {
-	case CPU_ONLINE:
-	case CPU_ONLINE_FROZEN:
-		ia64_mca_cmc_vector_adjust(NULL);
-		break;
-	}
-	return NOTIFY_OK;
-}
-
-static struct notifier_block mca_cpu_notifier = {
-	.notifier_call = mca_cpu_callback
-};
-
 /*
  * ia64_mca_init
  *
@@ -2111,15 +2095,13 @@ ia64_mca_late_init(void)
 	if (!mca_init)
 		return 0;
 
-	register_hotcpu_notifier(&mca_cpu_notifier);
-
 	/* Setup the CMCI/P vector and handler */
 	setup_timer(&cmc_poll_timer, ia64_mca_cmc_poll, 0UL);
 
 	/* Unmask/enable the vector */
 	cmc_polling_enabled = 0;
-	schedule_work(&cmc_enable_work);
-
+	cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "ia64/mca:online",
+			  ia64_mca_cpu_online, NULL);
 	IA64_MCA_DEBUG("%s: CMCI/P setup and enabled.\n", __func__);
 
 #ifdef CONFIG_ACPI

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[tip:smp/hotplug] ia64/mca: Convert to hotplug state machine tip-bot for Sebastian Andrzej Siewior <tipbot@zytor.com> - 2016-09-19 22:00 +0200

csiph-web