lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-6670a6d864653859229d2e921ea193a4a677dfea@git.kernel.org>
Date:	Mon, 18 Jul 2016 23:59:04 -0700
From:	tip-bot for Richard Cochran <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	rcochran@...utronix.de, bigeasy@...utronix.de,
	marc.zyngier@....com, torvalds@...ux-foundation.org,
	peterz@...radead.org, jason@...edaemon.net,
	linux-kernel@...r.kernel.org, tglx@...utronix.de, mingo@...nel.org,
	anna-maria@...utronix.de, hpa@...or.com
Subject: [tip:smp/hotplug] irqchip/gicv3: Convert to hotplug state machine

Commit-ID:  6670a6d864653859229d2e921ea193a4a677dfea
Gitweb:     http://git.kernel.org/tip/6670a6d864653859229d2e921ea193a4a677dfea
Author:     Richard Cochran <rcochran@...utronix.de>
AuthorDate: Wed, 13 Jul 2016 17:16:05 +0000
Committer:  Ingo Molnar <mingo@...nel.org>
CommitDate: Thu, 14 Jul 2016 09:34:28 +0200

irqchip/gicv3: Convert to hotplug state machine

Install the callbacks via the state machine.

Signed-off-by: Richard Cochran <rcochran@...utronix.de>
Signed-off-by: Anna-Maria Gleixner <anna-maria@...utronix.de>
Reviewed-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Acked-by: Jason Cooper <jason@...edaemon.net>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Marc Zyngier <marc.zyngier@....com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: rt@...utronix.de
Link: http://lkml.kernel.org/r/20160713153333.163186301@linutronix.de
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
 drivers/irqchip/irq-gic-v3.c | 22 +++++++---------------
 include/linux/cpuhotplug.h   |  1 +
 2 files changed, 8 insertions(+), 15 deletions(-)

diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c
index 2c5ba0e..6fc56c3 100644
--- a/drivers/irqchip/irq-gic-v3.c
+++ b/drivers/irqchip/irq-gic-v3.c
@@ -538,23 +538,13 @@ static void gic_cpu_init(void)
 }
 
 #ifdef CONFIG_SMP
-static int gic_secondary_init(struct notifier_block *nfb,
-			      unsigned long action, void *hcpu)
+
+static int gic_starting_cpu(unsigned int cpu)
 {
-	if (action == CPU_STARTING || action == CPU_STARTING_FROZEN)
-		gic_cpu_init();
-	return NOTIFY_OK;
+	gic_cpu_init();
+	return 0;
 }
 
-/*
- * Notifier for enabling the GIC CPU interface. Set an arbitrarily high
- * priority because the GIC needs to be up before the ARM generic timers.
- */
-static struct notifier_block gic_cpu_notifier = {
-	.notifier_call = gic_secondary_init,
-	.priority = 100,
-};
-
 static u16 gic_compute_target_list(int *base_cpu, const struct cpumask *mask,
 				   unsigned long cluster_id)
 {
@@ -634,7 +624,9 @@ static void gic_raise_softirq(const struct cpumask *mask, unsigned int irq)
 static void gic_smp_init(void)
 {
 	set_smp_cross_call(gic_raise_softirq);
-	register_cpu_notifier(&gic_cpu_notifier);
+	cpuhp_setup_state_nocalls(CPUHP_AP_IRQ_GICV3_STARTING,
+				  "AP_IRQ_GICV3_STARTING", gic_starting_cpu,
+				  NULL);
 }
 
 static int gic_set_affinity(struct irq_data *d, const struct cpumask *mask_val,
diff --git a/include/linux/cpuhotplug.h b/include/linux/cpuhotplug.h
index edc8adf..d6e4a06 100644
--- a/include/linux/cpuhotplug.h
+++ b/include/linux/cpuhotplug.h
@@ -10,6 +10,7 @@ enum cpuhp_state {
 	CPUHP_AP_OFFLINE,
 	CPUHP_AP_SCHED_STARTING,
 	CPUHP_AP_IRQ_GIC_STARTING,
+	CPUHP_AP_IRQ_GICV3_STARTING,
 	CPUHP_AP_NOTIFY_STARTING,
 	CPUHP_AP_ONLINE,
 	CPUHP_TEARDOWN_CPU,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ