linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: anna-maria@linutronix.de (Anna-Maria Gleixner)
To: linux-arm-kernel@lists.infradead.org
Subject: [patch 07/66] ARM: mvebu: Convert to hotplug state machine
Date: Mon, 11 Jul 2016 12:28:29 -0000	[thread overview]
Message-ID: <20160711122531.171995355@linutronix.de> (raw)
In-Reply-To: 20160711122450.923603742@linutronix.de

From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>

Install the callbacks via the state machine.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Gregory Clement <gregory.clement@free-electrons.com>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Anna-Maria Gleixner <anna-maria@linutronix.de>
---
 arch/arm/mach-mvebu/coherency.c |   19 ++++++-------------
 include/linux/cpuhotplug.h      |    1 +
 2 files changed, 7 insertions(+), 13 deletions(-)

--- a/arch/arm/mach-mvebu/coherency.c
+++ b/arch/arm/mach-mvebu/coherency.c
@@ -111,20 +111,12 @@ static struct notifier_block mvebu_hwcc_
 	.notifier_call = mvebu_hwcc_notifier,
 };
 
-static int armada_xp_clear_shared_l2_notifier_func(struct notifier_block *nfb,
-					unsigned long action, void *hcpu)
+static int armada_xp_clear_l2_starting(unsigned int cpu)
 {
-	if (action == CPU_STARTING || action == CPU_STARTING_FROZEN)
-		armada_xp_clear_shared_l2();
-
-	return NOTIFY_OK;
+	armada_xp_clear_shared_l2();
+	return 0;
 }
 
-static struct notifier_block armada_xp_clear_shared_l2_notifier = {
-	.notifier_call = armada_xp_clear_shared_l2_notifier_func,
-	.priority = 100,
-};
-
 static void __init armada_370_coherency_init(struct device_node *np)
 {
 	struct resource res;
@@ -155,8 +147,9 @@ static void __init armada_370_coherency_
 
 	of_node_put(cpu_config_np);
 
-	register_cpu_notifier(&armada_xp_clear_shared_l2_notifier);
-
+	cpuhp_setup_state_nocalls(CPUHP_AP_ARM_MVEBU_COHERENCY,
+				  "AP_ARM_MVEBU_COHERENCY",
+				  armada_xp_clear_l2_starting, NULL);
 exit:
 	set_cpu_coherent();
 }
--- a/include/linux/cpuhotplug.h
+++ b/include/linux/cpuhotplug.h
@@ -15,6 +15,7 @@ enum cpuhp_state {
 	CPUHP_AP_IRQ_ARMADA_XP_STARTING,
 	CPUHP_AP_IRQ_ARMADA_CASC_STARTING,
 	CPUHP_AP_IRQ_BCM2836_STARTING,
+	CPUHP_AP_ARM_MVEBU_COHERENCY,
 	CPUHP_AP_NOTIFY_STARTING,
 	CPUHP_AP_ONLINE,
 	CPUHP_TEARDOWN_CPU,

       reply	other threads:[~2016-07-11 12:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20160711122450.923603742@linutronix.de>
2016-07-11 12:28 ` Anna-Maria Gleixner [this message]
2016-07-11 12:28 ` [patch 33/66] arm: Convert VFP hotplug notifiers to state machine Anna-Maria Gleixner
2016-07-11 12:28 ` [patch 38/66] clocksource/arm_global_timer: Convert to hotplug " Anna-Maria Gleixner
2016-07-11 12:28 ` [patch 51/66] arm: twd: " Anna-Maria Gleixner
2016-07-11 12:28 ` [patch 50/66] arm: l2c: " Anna-Maria Gleixner
2016-07-11 12:29 ` [patch 54/66] hwtracing: coresight-etm3x: " Anna-Maria Gleixner
2016-07-12 15:19   ` Mathieu Poirier
2016-07-11 12:29 ` [patch 55/66] hwtracing: coresight-etm4x: " Anna-Maria Gleixner
2016-07-12 15:21   ` Mathieu Poirier
2016-07-11 12:29 ` [patch 56/66] arm64: armv8 deprecated: " Anna-Maria Gleixner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160711122531.171995355@linutronix.de \
    --to=anna-maria@linutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).