Fwd: [PATCH 1/2] ARM: l2x0: Only set .set_debug on PL310 r3p0 and earlier

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-------- Original Message --------
From: Rob Herring <robherring2@xxxxxxxxx>
Sent: Wed Dec 12 17:25:49 EST 2012
To: linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
Cc: Russell King <linux@xxxxxxxxxxxxxxxx>, jonathan@xxxxxxxxxxxxxx, Mark Langsdorf <mark.langsdorf@xxxxxxxxxxx>, linux@xxxxxxxxxxxxxxx, tony@xxxxxxxxxxx, Rob Herring <rob.herring@xxxxxxxxxxx>
Subject: [PATCH 1/2] ARM: l2x0: Only set .set_debug on PL310 r3p0 and earlier

From: Rob Herring <rob.herring@xxxxxxxxxxx>

PL310 errata work-arounds using .set_debug function are only needed on
r3p0 and earlier, so check the rev and only set .set_debug on older revs.

Avoiding debug register accesses fixes aborts on non-secure platforms
like highbank. It is assumed that non-secure platforms needing these
work-arounds have already implemented .set_debug with secure monitor
calls.

Signed-off-by: Rob Herring <rob.herring@xxxxxxxxxxx>
---
 arch/arm/mm/cache-l2x0.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
index 8a97e64..6cf2fd1 100644
--- a/arch/arm/mm/cache-l2x0.c
+++ b/arch/arm/mm/cache-l2x0.c
@@ -334,7 +334,8 @@ void __init l2x0_init(void __iomem *base, u32 aux_val, u32 aux_mask)
 		/* Unmapped register. */
 		sync_reg_offset = L2X0_DUMMY_REG;
 #endif
-		outer_cache.set_debug = pl310_set_debug;
+		if ((cache_id & L2X0_CACHE_ID_RTL_MASK) <= L2X0_CACHE_ID_RTL_R3P0)
+			outer_cache.set_debug = pl310_set_debug;
 		break;
 	case L2X0_CACHE_ID_PART_L210:
 		ways = (aux >> 13) & 0xf;
-- 
1.7.10.4



The one liner I mentioned. Two lines if you really want to be pedantic. I will do a test build. Leave with me.
-- 
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
_______________________________________________
arm mailing list
arm@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/arm



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux ARM (Vger)]     [Linux ARM]     [ARM Kernel]     [Fedora User Discussion]     [Older Fedora Users Discussion]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Maintainers]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [Linux Apps]     [KDE Users]     [Fedora Tools]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]

Powered by Linux