Skip to contentSkip to conversation

arm: properly init alignment trap bit

PATCH Applied Lucas Stach 2 participants 2 messages May 10, 2013 – May 11, 2013 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: properly init alignment trap bit

On ARMv7 the intention is to disable the alignment trap to be able to use hardware assisted unaligned load/stores. Fix the init to do the right thing.

---
 arch/arm/include/asm/barebox-arm-head.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/include/asm/barebox-arm-head.h +1 -1
index 9385415..9a8cc87 100644
@@ -22,7 +22,7 @@ static inline void arm_cpu_lowlevel_init(void)
 
 #if __LINUX_ARM_ARCH__ >= 6
 	r |= CR_U;
-	r &= CR_A;
+	r &= ~CR_A;
 #else
 	r |= CR_A;
 #endif
Signature · 7 lines
1.8.1.4


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Applied
#1 lore raw
Quoted 5 lines · Lucas Stach

On ARMv7 the intention is to disable the alignment trap to be able to use hardware assisted unaligned load/stores. Fix the init to do the right thing.

Applied, thanks.

Although this fixes a bug I applied it to -next for now since this was around for longer and everything appeared to work.
(Though I really wonder how this could ever work)

Sascha

Quoted 26 lines
---
 arch/arm/include/asm/barebox-arm-head.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/include/asm/barebox-arm-head.h +1 -1
index 9385415..9a8cc87 100644
@@ -22,7 +22,7 @@ static inline void arm_cpu_lowlevel_init(void)
 
 #if __LINUX_ARM_ARCH__ >= 6
 	r |= CR_U;
-	r &= CR_A;
+	r &= ~CR_A;
 #else
 	r |= CR_A;
 #endif
Signature · 7 lines
1.8.1.4


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox