Skip to contentSkip to conversation

ARM: shmobile: Allow APMU multicluster operation

PATCH New Magnus Damm 1 participant 1 message Dec 12, 2013

Subsystems (6)
lore
Share & tools
lore

Magnus Damm

author maintainer
#0 lore raw

PATCH 1/1 ARM: shmobile: Allow APMU multicluster operation

From: Magnus Damm <[email protected]>

Prototype patch to allow enabling of multiple clusters. Useful for testing purpose on SoCs such as r8a73a4 and r8a7790.

Not-Yet-Signed-off-by Magnus Damm <[email protected]>

---

 arch/arm/mach-shmobile/platsmp-apmu.c |   16 
 arch/x86/mm/#numa.c#                  |  831 +++++++++++++++++++++++++++++++++
 2 files changed, 845 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;
@@ -101,8 +114,7 @@ static void apmu_parse_cfg(void (*fn)(st
 	bool 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) {
arch/x86/mm/#numa.c# new file +831 -0

831 lines not on this page · raw message