linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ARM: l2x0: Only set .set_debug on PL310 r3p0 and earlier
@ 2012-12-12 22:25 Rob Herring
  2012-12-14  0:13 ` Tony Lindgren
  0 siblings, 1 reply; 2+ messages in thread
From: Rob Herring @ 2012-12-12 22:25 UTC (permalink / raw)
  To: linux-arm-kernel

From: Rob Herring <rob.herring@calxeda.com>

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@calxeda.com>
---
 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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH 1/2] ARM: l2x0: Only set .set_debug on PL310 r3p0 and earlier
  2012-12-12 22:25 [PATCH 1/2] ARM: l2x0: Only set .set_debug on PL310 r3p0 and earlier Rob Herring
@ 2012-12-14  0:13 ` Tony Lindgren
  0 siblings, 0 replies; 2+ messages in thread
From: Tony Lindgren @ 2012-12-14  0:13 UTC (permalink / raw)
  To: linux-arm-kernel

* Rob Herring <robherring2@gmail.com> [121212 14:28]:
> From: Rob Herring <rob.herring@calxeda.com>
> 
> 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@calxeda.com>

Nice, works for me:

Acked-by: Tony Lindgren <tony@atomide.com>

> ---
>  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
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-12-14  0:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-12 22:25 [PATCH 1/2] ARM: l2x0: Only set .set_debug on PL310 r3p0 and earlier Rob Herring
2012-12-14  0:13 ` Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).