Skip to contentSkip to conversation

ARM: mvebu: fix for mvebu/soc-cpuidle branch

PATCH New Thomas Petazzoni 2 participants 4 messages May 5, 2014 – May 8, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: mvebu: fix for mvebu/soc-cpuidle branch

Hello Jason,

In the merge of the Armada 375/38x I/O coherency support and the Armada XP cpuidle support, there was a conflict in coherency.c which was resolved correctly.

This commit fixes this invalid merge. It applies on top of your mvebu/soc-cpuidle branch.

Thanks,

Thomas

Thomas Petazzoni (1):
ARM: mvebu: fix mis-merge in coherency.c

 arch/arm/mach-mvebu/coherency.c | 28 +++++++++++++---------------
 1 file changed, 13 insertions(+), 15 deletions(-)
Signature · 1 line
1.9.2
#1 lore raw

PATCH 1/1 ARM: mvebu: fix mis-merge in coherency.c

Commit 31dd716233e066146d651889f7b01e8da9963bd7 lead to a conflict between the "Armada 375/38x I/O coherency" patch series and the "Armada XP cpuidle" patch series. Unfortunately, the conflict was improperly resolved, and leads to incorrect code in the coherency_type() function in arch/arm/mach-mvebu/coherency.c.

This commit fixes this mis-merge by restoring the appropriate code in coherency_type().

---
 arch/arm/mach-mvebu/coherency.c | 28 +++++++++++++---------------
 1 file changed, 13 insertions(+), 15 deletions(-)
arch/arm/mach-mvebu/coherency.c +13 -15
index ff8d5ef..9d5ccd3 100644
@@ -319,21 +319,19 @@ static int coherency_type(void)
 
 	np = of_find_matching_node_and_match(NULL, of_coherency_table, &match);
 	if (np) {
-		struct resource res;
-		pr_info("Initializing Coherency fabric\n");
-		of_address_to_resource(np, 0, &res);
-		coherency_phys_base = res.start;
-		/*
-		 * Ensure secondary CPUs will see the updated value,
-		 * which they read before they join the coherency
-		 * fabric, and therefore before they are coherent with
-		 * the boot CPU cache.
-		 */
-		sync_cache_w(&coherency_phys_base);
-		coherency_base = of_iomap(np, 0);
-		coherency_cpu_base = of_iomap(np, 1);
-		set_cpu_coherent();
-		of_node_put(np);
+		int type = (int) match->data;
+
+		/* Armada 370/XP coherency works in both UP and SMP */
+		if (type == COHERENCY_FABRIC_TYPE_ARMADA_370_XP)
+			return type;
+
+		/* Armada 375 coherency works only on SMP */
+		else if (type == COHERENCY_FABRIC_TYPE_ARMADA_375 && is_smp())
+			return type;
+
+		/* Armada 380 coherency works only on SMP */
+		else if (type == COHERENCY_FABRIC_TYPE_ARMADA_380 && is_smp())
+			return type;
 	}
 
 	return COHERENCY_FABRIC_TYPE_NONE;
Signature · 1 line
1.9.2
#2 lore raw

PATCH 1/1 ARM: mvebu: fix mis-merge in coherency.c

Quoted 6 lines · Thomas Petazzoni

Commit 31dd716233e066146d651889f7b01e8da9963bd7 lead to a conflict between the "Armada 375/38x I/O coherency" patch series and the "Armada XP cpuidle" patch series. Unfortunately, the conflict was improperly resolved, and leads to incorrect code in the coherency_type() function in arch/arm/mach-mvebu/coherency.c.

Quoted 7 lines

This commit fixes this mis-merge by restoring the appropriate code in coherency_type().

---
 arch/arm/mach-mvebu/coherency.c | 28 +++++++++++++---------------
 1 file changed, 13 insertions(+), 15 deletions(-)

I've squashed this in to mvebu/soc-cpuidle, please see:

b41375f71ace ARM: mvebu: ll_set_cpu_coherent always uses the current CPU

I'll let this sit for a night in -next before I send the pull request for mvebu/soc. Which includes mvebu/soc-cpuidle now.

thx,

Jason.

#3 lore raw

PATCH 1/1 ARM: mvebu: fix mis-merge in coherency.c

Dear Jason Cooper,

Quoted 15 lines · Jason Cooper
Quoted 6 lines · Thomas Petazzoni

Commit 31dd716233e066146d651889f7b01e8da9963bd7 lead to a conflict between the "Armada 375/38x I/O coherency" patch series and the "Armada XP cpuidle" patch series. Unfortunately, the conflict was improperly resolved, and leads to incorrect code in the coherency_type() function in arch/arm/mach-mvebu/coherency.c.

Quoted 7 lines

This commit fixes this mis-merge by restoring the appropriate code in coherency_type().

---
 arch/arm/mach-mvebu/coherency.c | 28 +++++++++++++---------------
 1 file changed, 13 insertions(+), 15 deletions(-)
Quoted 8 lines

I've squashed this in to mvebu/soc-cpuidle, please see:

b41375f71ace ARM: mvebu: ll_set_cpu_coherent always uses the current CPU

From a quick look, looks good.

I'll let this sit for a night in -next before I send the pull request for mvebu/soc. Which includes mvebu/soc-cpuidle now.

Perfect!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com