Skip to contentSkip to conversation

ARM: mm: cache-l2x0: Check for status property of DT node

PATCH New Tomasz Figa 2 participants 2 messages Feb 12, 2014 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 ARM: mm: cache-l2x0: Check for status property of DT node

[making Cc list a bit more comprehensive]

Quoted 19 lines · Tushar Behera

Currently only the DT node is checked during l2x0 cache initialization, but it doesn't check the status of the DT node. Thus it gets called even if the status of DT node for L2 controller is disabled.

Add explicit check to ensure that L2 cache is initialized only for desired boards.

---
  arch/arm/mm/cache-l2x0.c |    3 +++
  1 file changed, 3 insertions(+)
arch/arm/mm/cache-l2x0.c +0 -0
index 7abde2c..f075cb1 100644

arch/arm/mm/cache-l2x0.c int __init l2x0_of_init(u32 aux_val, u32 aux_mask) · line 986

Quoted 9 lines
arch/arm/mm/cache-l2x0.c +3 -0
@@ -978,6 +978,9 @@ int __init l2x0_of_init(u32 aux_val, u32 aux_mask)
  	if (!np)
  		return -ENODEV;
 
+	if (!of_device_is_available(np))
+		return -ENODEV;
+
  	if (of_address_to_resource(np, 0, &res))
  		return -ENODEV;
 

Best regards,
Tomasz

#2 lore raw

PATCH 1/1 ARM: mm: cache-l2x0: Check for status property of DT node

Quoted 24 lines · Tomasz Figa

[making Cc list a bit more comprehensive]

Quoted 21 lines · Tushar Behera

Currently only the DT node is checked during l2x0 cache initialization, but it doesn't check the status of the DT node. Thus it gets called even if the status of DT node for L2 controller is disabled.

Add explicit check to ensure that L2 cache is initialized only for desired boards.

---
  arch/arm/mm/cache-l2x0.c |    3 +++
  1 file changed, 3 insertions(+)
arch/arm/mm/cache-l2x0.c +0 -0
index 7abde2c..f075cb1 100644
@@ -978,6 +978,9 @@ int __init l2x0_of_init(u32 aux_val, u32 aux_mask)
  	if (!np)
  		return -ENODEV;
 
Quoted 9 lines

arch/arm/mm/cache-l2x0.c int __init l2x0_of_init(u32 aux_val, u32 aux_mask) · line 986

Quoted 7 lines
arch/arm/mm/cache-l2x0.c +3 -0
+	if (!of_device_is_available(np))
+		return -ENODEV;
+
  	if (of_address_to_resource(np, 0, &res))
  		return -ENODEV;
 

Looks sensible to me.

Thanks,
Mark.