aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMagnus Damm <damm@opensource.se>2013-09-14 11:29:07 -0400
committerSimon Horman <horms+renesas@verge.net.au>2013-09-30 04:56:11 -0400
commitee490bcc4f2d456c40df93236cf6a1bce2d5ddd0 (patch)
tree7dfca475fa3fe97061d64d2f9095b8d934278381
parente4550216ef8245b1c9892239a2121a7b15ac2e91 (diff)
ARM: shmobile: Extend APMU code to allow single cluster only
Extend the APMU code with a check to only allow boot of CPU cores that sit in the same cluster as CPU0. This makes it possible for people to use the r8a790 CA7 boot mode with CA7-cores only. The default CA15 boot mode will enable CA15 cores only. This is an intentional software limitation to cope with lacking scheduler support. By removing this patch it is possible to run all 8 cores in parallel, but this is not recommended without out of tree scheduler modfications or custom user space code to control the CPU affinitiy. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-rw-r--r--arch/arm/mach-shmobile/platsmp-apmu.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/platsmp-apmu.c b/arch/arm/mach-shmobile/platsmp-apmu.c
index 34dc40dacb79..caaaa35b589f 100644
--- a/arch/arm/mach-shmobile/platsmp-apmu.c
+++ b/arch/arm/mach-shmobile/platsmp-apmu.c
@@ -94,8 +94,21 @@ static void apmu_parse_cfg(void (*fn)(struct resource *res, int cpu, int bit))
94 u32 id; 94 u32 id;
95 int k; 95 int k;
96 int bit, index; 96 int bit, index;
97 bool is_allowed;
97 98
98 for (k = 0; k < ARRAY_SIZE(apmu_config); k++) { 99 for (k = 0; k < ARRAY_SIZE(apmu_config); k++) {
100 /* only enable the cluster that includes the boot CPU */
101 is_allowed = false;
102 for (bit = 0; bit < ARRAY_SIZE(apmu_config[k].cpus); bit++) {
103 id = apmu_config[k].cpus[bit];
104 if (id >= 0) {
105 if (id == cpu_logical_map(0))
106 is_allowed = true;
107 }
108 }
109 if (!is_allowed)
110 continue;
111
99 for (bit = 0; bit < ARRAY_SIZE(apmu_config[k].cpus); bit++) { 112 for (bit = 0; bit < ARRAY_SIZE(apmu_config[k].cpus); bit++) {
100 id = apmu_config[k].cpus[bit]; 113 id = apmu_config[k].cpus[bit];
101 if (id >= 0) { 114 if (id >= 0) {