Skip to contentSkip to conversation

ARM: mvebu: Use a CR_C constant instead of a hard-coded one

PATCH New Gregory CLEMENT 1 participant 2 messages Aug 10, 2015 – Sep 29, 2015

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

PATCH 1/1 ARM: mvebu: Use a CR_C constant instead of a hard-coded one

Fix the armada_370_xp_pmsu_idle_enter() function to use a CR_C constant instead of a hard-coded constant in the assembly part. This clean-up was suggested by Russell King.

---
Hi,

this clean-up is not for 4.2 neither for 4.3 (the rc6 had just been released), but for 4.4. I send it now to not forget it.

Gregory

 arch/arm/mach-mvebu/pmsu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-mvebu/pmsu.c +2 -2
index 4f4e22206ae5..8efb83cea83d 100644
@@ -296,11 +296,11 @@ int armada_370_xp_pmsu_idle_enter(unsigned long deepidle)
 	/* Test the CR_C bit and set it if it was cleared */
 	asm volatile(
 	"mrc	p15, 0, r0, c1, c0, 0 \n\t"
-	"tst	r0, #(1 << 2) \n\t"
+	"tst	r0, %0 \n\t"
 	"orreq	r0, r0, #(1 << 2) \n\t"
 	"mcreq	p15, 0, r0, c1, c0, 0 \n\t"
 	"isb	"
-	: : : "r0");
+	: : "Ir" (CR_C) : "r0");
 
 	pr_debug("Failed to suspend the system\n");
 
Signature · 1 line
2.1.0
#1 lore raw

PATCH 1/1 ARM: mvebu: Use a CR_C constant instead of a hard-coded one

Quoted 5 lines · Gregory CLEMENT

Fix the armada_370_xp_pmsu_idle_enter() function to use a CR_C constant instead of a hard-coded constant in the assembly part. This clean-up was suggested by Russell King.

Applied on mvebu/cleanup

Quoted 28 lines

---
Hi,

this clean-up is not for 4.2 neither for 4.3 (the rc6 had just been released), but for 4.4. I send it now to not forget it.

Gregory

 arch/arm/mach-mvebu/pmsu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-mvebu/pmsu.c +2 -2
index 4f4e22206ae5..8efb83cea83d 100644
@@ -296,11 +296,11 @@ int armada_370_xp_pmsu_idle_enter(unsigned long deepidle)
 	/* Test the CR_C bit and set it if it was cleared */
 	asm volatile(
 	"mrc	p15, 0, r0, c1, c0, 0 \n\t"
-	"tst	r0, #(1 << 2) \n\t"
+	"tst	r0, %0 \n\t"
 	"orreq	r0, r0, #(1 << 2) \n\t"
 	"mcreq	p15, 0, r0, c1, c0, 0 \n\t"
 	"isb	"
-	: : : "r0");
+	: : "Ir" (CR_C) : "r0");
 
 	pr_debug("Failed to suspend the system\n");
Signature · 4 lines
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com