mirror of
https://github.com/torvalds/linux.git
synced 2024-12-14 23:25:54 +00:00
626d686487
This commit implements the CPU hotplug support for the Marvell Armada 38x platform. Similarly to what was done for the Armada XP, this commit: * Implements the ->cpu_die() function of SMP operations by calling armada_38x_do_cpu_suspend() to enter the deep idle state for CPUs going offline. * Implements a dummy ->cpu_kill() function, simply needed for the kernel to know we have CPU hotplug support. * The mvebu_cortex_a9_boot_secondary() function makes sure to wake up the CPU if waiting in deep idle state by sending an IPI before deasserting the CPUs from reset. This is because mvebu_cortex_a9_boot_secondary() is now used in two different situations: for the initial boot of secondary CPUs (where CPU reset deassert is used to wake up CPUs) and for CPU hotplug (where an IPI is used to take CPU out of deep idle). * At boot time, we exit from the idle state in the ->smp_secondary_init() hook. This commit has been tested using CPU hotplug through sysfs (/sys/devices/system/cpu/cpuX/online) and using kexec. Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com> Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Link: https://lkml.kernel.org/r/1414669184-16785-5-git-send-email-gregory.clement@free-electrons.com Signed-off-by: Jason Cooper <jason@lakedaemon.net>
24 lines
798 B
C
24 lines
798 B
C
/*
|
|
* Power Management Service Unit (PMSU) support for Armada 370/XP platforms.
|
|
*
|
|
* Copyright (C) 2012 Marvell
|
|
*
|
|
* This file is licensed under the terms of the GNU General Public
|
|
* License version 2. This program is licensed "as is" without any
|
|
* warranty of any kind, whether express or implied.
|
|
*/
|
|
|
|
#ifndef __MACH_MVEBU_PMSU_H
|
|
#define __MACH_MVEBU_PMSU_H
|
|
|
|
int armada_xp_boot_cpu(unsigned int cpu_id, void *phys_addr);
|
|
int mvebu_setup_boot_addr_wa(unsigned int crypto_eng_target,
|
|
unsigned int crypto_eng_attribute,
|
|
phys_addr_t resume_addr_reg);
|
|
|
|
void mvebu_v7_pmsu_idle_exit(void);
|
|
|
|
int armada_370_xp_pmsu_idle_enter(unsigned long deepidle);
|
|
int armada_38x_do_cpu_suspend(unsigned long deepidle);
|
|
#endif /* __MACH_370_XP_PMSU_H */
|