ARM: mm: cache-l2x0: Check for status property of DT node
A message that is not in the archive (sent off-list or not yet received): [email protected]
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.
Reported-by Tomasz Figa <[email protected]>Signed-off-by Tushar Behera <[email protected]>--- arch/arm/mm/cache-l2x0.c | 3 +++ 1 file changed, 3 insertions(+)arch/arm/mm/cache-l2x0.c +0
-0
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
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.
Reported-by Tomasz Figa <[email protected]>Signed-off-by Tushar Behera <[email protected]>--- arch/arm/mm/cache-l2x0.c | 3 +++ 1 file changed, 3 insertions(+)arch/arm/mm/cache-l2x0.c +0
-0@@ -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 ;Reviewed-by Tomasz Figa <[email protected]>
Looks sensible to me.
Thanks,
Mark.