ARM/shmobile: Convert to hotplug state machine
Install the callbacks via the state machine so the old notifier based cpuhotplug infrastructure can be removed. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Cc: linux-sh@vger.kernel.org Cc: Peter Zijlstra <peterz@infradead.org> Cc: Magnus Damm <magnus.damm@gmail.com> Cc: Simon Horman <horms@verge.net.au> Cc: rt@linutronix.de Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/20160906170457.32393-3-bigeasy@linutronix.de Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
Родитель
c23a7266e6
Коммит
657ebf7a23
|
@ -21,26 +21,14 @@
|
||||||
static phys_addr_t shmobile_scu_base_phys;
|
static phys_addr_t shmobile_scu_base_phys;
|
||||||
static void __iomem *shmobile_scu_base;
|
static void __iomem *shmobile_scu_base;
|
||||||
|
|
||||||
static int shmobile_smp_scu_notifier_call(struct notifier_block *nfb,
|
static int shmobile_scu_cpu_prepare(unsigned int cpu)
|
||||||
unsigned long action, void *hcpu)
|
|
||||||
{
|
{
|
||||||
unsigned int cpu = (long)hcpu;
|
/* For this particular CPU register SCU SMP boot vector */
|
||||||
|
shmobile_smp_hook(cpu, virt_to_phys(shmobile_boot_scu),
|
||||||
switch (action) {
|
shmobile_scu_base_phys);
|
||||||
case CPU_UP_PREPARE:
|
return 0;
|
||||||
/* For this particular CPU register SCU SMP boot vector */
|
|
||||||
shmobile_smp_hook(cpu, virt_to_phys(shmobile_boot_scu),
|
|
||||||
shmobile_scu_base_phys);
|
|
||||||
break;
|
|
||||||
};
|
|
||||||
|
|
||||||
return NOTIFY_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct notifier_block shmobile_smp_scu_notifier = {
|
|
||||||
.notifier_call = shmobile_smp_scu_notifier_call,
|
|
||||||
};
|
|
||||||
|
|
||||||
void __init shmobile_smp_scu_prepare_cpus(phys_addr_t scu_base_phys,
|
void __init shmobile_smp_scu_prepare_cpus(phys_addr_t scu_base_phys,
|
||||||
unsigned int max_cpus)
|
unsigned int max_cpus)
|
||||||
{
|
{
|
||||||
|
@ -54,7 +42,9 @@ void __init shmobile_smp_scu_prepare_cpus(phys_addr_t scu_base_phys,
|
||||||
scu_power_mode(shmobile_scu_base, SCU_PM_NORMAL);
|
scu_power_mode(shmobile_scu_base, SCU_PM_NORMAL);
|
||||||
|
|
||||||
/* Use CPU notifier for reset vector control */
|
/* Use CPU notifier for reset vector control */
|
||||||
register_cpu_notifier(&shmobile_smp_scu_notifier);
|
cpuhp_setup_state_nocalls(CPUHP_ARM_SHMOBILE_SCU_PREPARE,
|
||||||
|
"arm/shmobile-scu:prepare",
|
||||||
|
shmobile_scu_cpu_prepare, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_HOTPLUG_CPU
|
#ifdef CONFIG_HOTPLUG_CPU
|
||||||
|
|
|
@ -35,6 +35,7 @@ enum cpuhp_state {
|
||||||
CPUHP_POWERPC_PMAC_PREPARE,
|
CPUHP_POWERPC_PMAC_PREPARE,
|
||||||
CPUHP_POWERPC_MMU_CTX_PREPARE,
|
CPUHP_POWERPC_MMU_CTX_PREPARE,
|
||||||
CPUHP_NOTIFY_PREPARE,
|
CPUHP_NOTIFY_PREPARE,
|
||||||
|
CPUHP_ARM_SHMOBILE_SCU_PREPARE,
|
||||||
CPUHP_TIMERS_DEAD,
|
CPUHP_TIMERS_DEAD,
|
||||||
CPUHP_BRINGUP_CPU,
|
CPUHP_BRINGUP_CPU,
|
||||||
CPUHP_AP_IDLE_DEAD,
|
CPUHP_AP_IDLE_DEAD,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче