aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/common/mcpm_platsmp.c
AgeCommit message (Collapse)AuthorFilesLines
2019-06-19treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500Thomas Gleixner1-4/+1
Based on 2 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation # extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 4122 file(s). Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Enrico Weigelt <[email protected]> Reviewed-by: Kate Stewart <[email protected]> Reviewed-by: Allison Randal <[email protected]> Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-12-01ARM: use const and __initconst for smp_operationsMasahiro Yamada1-1/+1
These smp_operations structures are not over-written, so add "const" qualifier and replace __initdata with __initconst. Also, add "static" where it is possible. Signed-off-by: Masahiro Yamada <[email protected]> Acked-by: Krzysztof Kozlowski <[email protected]> Acked-by: Maxime Ripard <[email protected]> Acked-by: Moritz Fischer <[email protected]> Acked-by: Stephen Boyd <[email protected]> # qcom part Acked-by: Viresh Kumar <[email protected]> Acked-by: Patrice Chotard <[email protected]> Acked-by: Heiko Stuebner <[email protected]> Acked-by: Wei Xu <[email protected]> Acked-by: Florian Fainelli <[email protected]> Acked-by: Sebastian Hesselbarth <[email protected]> Acked-by: Gregory CLEMENT <[email protected]> Acked-by: Shawn Guo <[email protected]> Acked-by: Matthias Brugger <[email protected]> Acked-by: Thierry Reding <[email protected]> Acked-by: Nicolas Pitre <[email protected]> Acked-by: Liviu Dudau <[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]>
2015-07-31ARM: 8392/3: smp: Only expose /sys/.../cpuX/online if hotpluggableStephen Boyd1-8/+4
Writes to /sys/.../cpuX/online fail if we determine the platform doesn't support hotplug for that CPU. Furthermore, if the cpu_die op isn't specified the system hangs when we try to offline a CPU and it comes right back online unexpectedly. Let's figure this stuff out before we make the sysfs nodes so that the online file doesn't even exist if it isn't (at least sometimes) possible to hotplug the CPU. Add a new 'cpu_can_disable' op and repoint all 'cpu_disable' implementations at it because all implementers use the op to indicate if a CPU can be hotplugged or not in a static fashion. With PSCI we may need to add a 'cpu_disable' op so that the secure OS can be migrated off the CPU we're trying to hotplug. In this case, the 'cpu_can_disable' op will indicate that all CPUs are hotpluggable by returning true, but the 'cpu_disable' op will make a PSCI migration call and occasionally fail, denying the hotplug of a CPU. This shouldn't be any worse than x86 where we may indicate that all CPUs are hotpluggable but occasionally we can't offline a CPU due to check_irq_vectors_for_cpu_disable() failing to find a CPU to move vectors to. Cc: Mark Rutland <[email protected]> Cc: Nicolas Pitre <[email protected]> Cc: Dave Martin <[email protected]> Acked-by: Simon Horman <[email protected]> [shmobile portion] Tested-by: Simon Horman <[email protected]> Cc: Magnus Damm <[email protected]> Cc: <[email protected]> Tested-by: Tyler Baker <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Signed-off-by: Stephen Boyd <[email protected]> Signed-off-by: Russell King <[email protected]>
2014-05-25ARM: 8029/1: mcpm: Rename the power_down_finish() functions to be less confusingDave Martin1-1/+1
The name "power_down_finish" seems to be causing some confusion, because it suggests that this function is responsible for taking some action to cause the specified CPU to complete its power down. This patch renames the affected functions to "wait_for_powerdown" and similar, since this function's intended purpose is just to wait for the hardware to finish a powerdown initiated by a previous cpu_power_down. Signed-off-by: Dave Martin <[email protected]> Acked-by: Nicolas Pitre <[email protected]> Signed-off-by: Russell King <[email protected]>
2013-10-29ARM: 7848/1: mcpm: Implement cpu_kill() to synchronise on powerdownDave Martin1-0/+10
CPU hotplug and kexec rely on smp_ops.cpu_kill(), which is supposed to wait for the CPU to park or power down, and perform the last rites (such as disabling clocks etc., where the platform doesn't do this automatically). kexec in particular is unsafe without performing this synchronisation to park secondaries. Without it, the secondaries might not be parked when kexec trashes the kernel. There is no generic way to do this synchronisation, so a new mcpm platform_ops method power_down_finish() is added by this patch. The new method is mandatory. A platform which provides no way to detect when CPUs are parked is likely broken. Signed-off-by: Dave Martin <[email protected]> Reviewed-by: Nicolas Pitre <[email protected]> Signed-off-by: Russell King <[email protected]>
2013-10-29ARM: 7847/1: mcpm: Factor out logical-to-physical CPU translationDave Martin1-4/+13
This patch factors the logical-to-physical CPU translation out of mcpm_boot_secondary(), so that it can be reused elsewhere. Signed-off-by: Dave Martin <[email protected]> Acked-by: Nicolas Pitre <[email protected]> Signed-off-by: Russell King <[email protected]>
2013-07-14arm: delete __cpuinit/__CPUINIT usage from all ARM usersPaul Gortmaker1-2/+2
The __cpuinit type of throwaway sections might have made sense some time ago when RAM was more constrained, but now the savings do not offset the cost and complications. For example, the fix in commit 5e427ec2d0 ("x86: Fix bit corruption at CPU resume time") is a good example of the nasty type of bugs that can be created with improper use of the various __init prefixes. After a discussion on LKML[1] it was decided that cpuinit should go the way of devinit and be phased out. Once all the users are gone, we can then finally remove the macros themselves from linux/init.h. Note that some harmless section mismatch warnings may result, since notify_cpu_starting() and cpu_up() are arch independent (kernel/cpu.c) and are flagged as __cpuinit -- so if we remove the __cpuinit from the arch specific callers, we will also get section mismatch warnings. As an intermediate step, we intend to turn the linux/init.h cpuinit related content into no-ops as early as possible, since that will get rid of these warnings. In any case, they are temporary and harmless. This removes all the ARM uses of the __cpuinit macros from C code, and all __CPUINIT from assembly code. It also had two ".previous" section statements that were paired off against __CPUINIT (aka .section ".cpuinit.text") that also get removed here. [1] https://lkml.org/lkml/2013/5/20/589 Cc: Russell King <[email protected]> Cc: Will Deacon <[email protected]> Cc: [email protected] Signed-off-by: Paul Gortmaker <[email protected]>
2013-06-05ARM: 7741/1: mcpm_platsmp.c: remove empty smp_init_cpus methodNicolas Pitre1-5/+0
The smp_init_cpus method in the smp_operations structure is optional and can be omitted entirely. Signed-off-by: Nicolas Pitre <[email protected]> Signed-off-by: Russell King <[email protected]>
2013-05-10ARM: 7715/1: MCPM: adapt to GIC changes after upstream mergeNicolas Pitre1-3/+0
Since commit c0114709ed85 ("irqchip: gic: Perform the gic_secondary_init() call via CPU notifier") it is no longer required nor possible to call gic_secondary_init() from platform code. Signed-off-by: Nicolas Pitre <[email protected]> Signed-off-by: Russell King <[email protected]>
2013-04-24ARM: mcpm: provide an interface to set the SMP ops at run timeNicolas Pitre1-1/+6
This is cleaner than exporting the mcpm_smp_ops structure. Signed-off-by: Nicolas Pitre <[email protected]> Acked-by: Jon Medhurst <[email protected]>
2013-04-24ARM: mcpm: generic SMP secondary bringup and hotplug supportNicolas Pitre1-0/+87
Now that the cluster power API is in place, we can use it for SMP secondary bringup and CPU hotplug in a generic fashion. Signed-off-by: Nicolas Pitre <[email protected]> Reviewed-by: Santosh Shilimkar <[email protected]> Reviewed-by: Will Deacon <[email protected]>