ARM: shmobile: Multicluster APMU prototype support
Magnus Damm
maintainerPATCH 1/2 ARM: shmobile: Multicluster APMU prototype support
From: Magnus Damm <[email protected]>
Allow APMU multicluster operation when enabled via the kernel command line. Default is still single cluster operation. Use together with appropriate scheduler modifcations or static CPU affinity.
---
Applies on top of renesas-devel-v3.14-20140408
arch/arm/mach-shmobile/platsmp-apmu.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-)
arch/arm/mach-shmobile/platsmp-apmu.c +14 -2
@@ -18,6 +18,19 @@#include <asm/smp_plat.h> #include <mach/common.h> +/* only enable the cluster that includes the boot CPU by default */ +static bool enable_multicluster = false; + +static __init int apmu_setup (char *opt) +{ +if (!opt) +return -EINVAL ; +if (!strncmp (opt,"multicluster" ,12 )) + enable_multicluster = true; +return 0 ; +} +early_param ("apmu" , apmu_setup); + static struct { void __iomem *iomem; int bit;
@@ -100,8 +113,7 @@ static void apmu_parse_cfg(void (*fn)(stbool is_allowed;for (k =0 ; k <ARRAY_SIZE (apmu_config); k++) { -/* only enable the cluster that includes the boot CPU */ - is_allowed = false; + is_allowed = enable_multicluster;for (bit =0 ; bit <ARRAY_SIZE (apmu_config[k].cpus); bit++) { id = apmu_config[k].cpus[bit];if (id >=0 ) {
Hi Magnus,
arch/arm/mach-shmobile/platsmp-apmu.c line 28
Quoted 13 lines · Magnus Damm
+++
work/arch/arm/mach-shmobile/platsmp-apmu.c2014-04-08 19:01:55.000000000 +0900arch/arm/mach-shmobile/platsmp-apmu.c +8
-0@@ -18,6 +18,19 @@#include <asm/smp_plat.h> #include <mach/common.h> +/* only enable the cluster that includes the boot CPU by default */ +static bool enable_multicluster = false; + +static __init int apmu_setup (char *opt) +{ +if (!opt) +return -EINVAL ; +if (!strncmp (opt,"multicluster" ,12 ))
Why do you ignore the characters after "multicluster", i.e. why not simply "!strcmp(opt, "multicluster)"?
arch/arm/mach-shmobile/platsmp-apmu.c line 32
Quoted 4 lines
arch/arm/mach-shmobile/platsmp-apmu.c +4
-0+ enable_multicluster = true; +return 0 ; +} +early_param ("apmu" , apmu_setup);
This can use some documentation under Documentation/.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Magnus Damm
maintainerHi Geert,
Quoted 8 lines · Geert Uytterhoeven
Hi Magnus,
Quoted 5 lines · Magnus Damm
+++
work/arch/arm/mach-shmobile/platsmp-apmu.c2014-04-08 19:01:55.000000000 +0900arch/arm/mach-shmobile/platsmp-apmu.c +0
-0@@ -18,6 +18,19 @@#include <asm/smp_plat.h> #include <mach/common.h>
Quoted 11 lines
arch/arm/mach-shmobile/platsmp-apmu.c line 28
Quoted 8 lines
arch/arm/mach-shmobile/platsmp-apmu.c +8
-0+/* only enable the cluster that includes the boot CPU by default */ +static bool enable_multicluster = false; + +static __init int apmu_setup (char *opt) +{ +if (!opt) +return -EINVAL ; +if (!strncmp (opt,"multicluster" ,12 ))Why do you ignore the characters after "multicluster", i.e. why not simply "!strcmp(opt, "multicluster)"?
Good point, thanks.
Quoted 6 lines
arch/arm/mach-shmobile/platsmp-apmu.c line 32
Quoted 4 lines
arch/arm/mach-shmobile/platsmp-apmu.c +4
-0+ enable_multicluster = true; +return 0 ; +} +early_param ("apmu" , apmu_setup);This can use some documentation under
Documentation/.
If this was destined for upstream merge I totally agree, but in this particular case it is just prototype-level code. The proper solution involves upstream scheduler modifications and perhaps also MCPM once we care about cluster-level power management.
Cheers,
/ magnus