ARM: rockchip: Add cpu hotplug support for RK3XXX SoCs
Subsystems (3)
PATCH v2 1/1 ARM: rockchip: Add cpu hotplug support for RK3XXX SoCs
Adds ability to shutdown all CPUs except the first one (since it might be special for a lot of platforms). It is now possible to use kexec which requires such a feature.
Signed-off-by Romain Perier <[email protected]>
--- arch/arm/mach-rockchip/platsmp.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
arch/arm/mach-rockchip/platsmp.c +20 -0
@@ -21,6 +21,7 @@#include <linux/of_address.h> #include <asm/cacheflush.h> +#include <asm/cp15.h> #include <asm/smp_scu.h> #include <asm/smp_plat.h> #include <asm/mach/map.h>
@@ -178,8 +179,27 @@ static void __init rockchip_smp_prepare_cpus(unsigned int max_cpus)pmu_set_power_domain (0 + i, false); } +#ifdef CONFIG_HOTPLUG_CPU +static int rockchip_cpu_kill (unsigned int cpu) +{ +pmu_set_power_domain (0 + cpu, false); +return 1 ; +} + +static void rockchip_cpu_die (unsigned int cpu) +{ +v7_exit_coherency_flush (louis); +while (1 ) +cpu_do_idle (); +} +#endif +static struct smp_operations rockchip_smp_ops__initdata = { .smp_prepare_cpus = rockchip_smp_prepare_cpus, .smp_boot_secondary = rockchip_boot_secondary, +#ifdef CONFIG_HOTPLUG_CPU + .cpu_kill = rockchip_cpu_kill, + .cpu_die = rockchip_cpu_die, +#endif };CPU_METHOD_OF_DECLARE (rk3066_smp,"rockchip,rk3066-smp" , &rockchip_smp_ops);
Signature · 1 line
1.9.1
Heiko Stübner
maintainerPATCH v2 1/1 ARM: rockchip: Add cpu hotplug support for RK3XXX SoCs
Am Samstag, 19. Juli 2014, 13:03:26 schrieb Romain Perier:
Quoted 5 lines
Adds ability to shutdown all CPUs except the first one (since it might be special for a lot of platforms). It is now possible to use kexec which requires such a feature.
Signed-off-by Romain Perier <[email protected]>
works like a charm :-)
I've added it to my tree and will send it off in the next days.
Heiko
Quoted 45 lines
--- arch/arm/mach-rockchip/platsmp.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)(quoted diff) +0
-0
b/arch/arm/mach-rockchip/platsmp.cindex 910835d..189684f 100644arch/arm/mach-rockchip/platsmp.c +20
-0@@ -21,6 +21,7 @@#include <linux/of_address.h> #include <asm/cacheflush.h> +#include <asm/cp15.h> #include <asm/smp_scu.h> #include <asm/smp_plat.h> #include <asm/mach/map.h> @@ -178,8 +179,27 @@ static void __init rockchip_smp_prepare_cpus(unsigned int max_cpus) pmu_set_power_domain(0 + i, false); } +#ifdef CONFIG_HOTPLUG_CPU +static int rockchip_cpu_kill (unsigned int cpu) +{ +pmu_set_power_domain (0 + cpu, false); +return 1 ; +} + +static void rockchip_cpu_die (unsigned int cpu) +{ +v7_exit_coherency_flush (louis); +while (1 ) +cpu_do_idle (); +} +#endif +static struct smp_operations rockchip_smp_ops__initdata = { .smp_prepare_cpus = rockchip_smp_prepare_cpus, .smp_boot_secondary = rockchip_boot_secondary, +#ifdef CONFIG_HOTPLUG_CPU + .cpu_kill = rockchip_cpu_kill, + .cpu_die = rockchip_cpu_die, +#endif }; CPU_METHOD_OF_DECLARE(rk3066_smp, "rockchip,rk3066-smp",
&rockchip_smp_ops);