diff mbox series

arm64: dts: juno: Add cache-level property to L2 caches

Message ID 20220629095959.1115587-1-sudeep.holla@arm.com (mailing list archive)
State New, archived
Headers show
Series arm64: dts: juno: Add cache-level property to L2 caches | expand

Commit Message

Sudeep Holla June 29, 2022, 9:59 a.m. UTC
Add the missing cache-level property to L2 caches. This is needed if
we need to find the last level cache directly from the device tree cache
node.

Cc: Liviu Dudau <liviu.dudau@arm.com>
Cc: Lorenzo Pieralisi <lpieralisi@kernel.org>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
---
 arch/arm64/boot/dts/arm/juno-r1.dts | 2 ++
 arch/arm64/boot/dts/arm/juno-r2.dts | 2 ++
 arch/arm64/boot/dts/arm/juno.dts    | 2 ++
 3 files changed, 6 insertions(+)

Hi,

I found out that of_find_last_cache_level() was returning 0 for L2 cache
on juno when I was attempting to use of_find_last_cache_level() during the
rework of my {arch,cache_topology} series[1], although I ended up not
using that function at the end.

Regards,
Sudeep

[1] https://lore.kernel.org/all/20220627165047.336669-1-sudeep.holla@arm.com/

Comments

Liviu Dudau June 29, 2022, 10:19 a.m. UTC | #1
On Wed, Jun 29, 2022 at 10:59:59AM +0100, Sudeep Holla wrote:
> Add the missing cache-level property to L2 caches. This is needed if
> we need to find the last level cache directly from the device tree cache
> node.
> 
> Cc: Liviu Dudau <liviu.dudau@arm.com>
> Cc: Lorenzo Pieralisi <lpieralisi@kernel.org>
> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>

Acked-by: Liviu Dudau <liviu.dudau@arm.com>

Thanks for the useful addition!

Best regards,
Liviu

> ---
>  arch/arm64/boot/dts/arm/juno-r1.dts | 2 ++
>  arch/arm64/boot/dts/arm/juno-r2.dts | 2 ++
>  arch/arm64/boot/dts/arm/juno.dts    | 2 ++
>  3 files changed, 6 insertions(+)
> 
> Hi,
> 
> I found out that of_find_last_cache_level() was returning 0 for L2 cache
> on juno when I was attempting to use of_find_last_cache_level() during the
> rework of my {arch,cache_topology} series[1], although I ended up not
> using that function at the end.
> 
> Regards,
> Sudeep
> 
> [1] https://lore.kernel.org/all/20220627165047.336669-1-sudeep.holla@arm.com/
> 
> diff --git a/arch/arm64/boot/dts/arm/juno-r1.dts b/arch/arm64/boot/dts/arm/juno-r1.dts
> index f099fb611d4e..6451c62146fd 100644
> --- a/arch/arm64/boot/dts/arm/juno-r1.dts
> +++ b/arch/arm64/boot/dts/arm/juno-r1.dts
> @@ -192,6 +192,7 @@ A57_L2: l2-cache0 {
>  			cache-size = <0x200000>;
>  			cache-line-size = <64>;
>  			cache-sets = <2048>;
> +			cache-level = <2>;
>  		};
>  
>  		A53_L2: l2-cache1 {
> @@ -199,6 +200,7 @@ A53_L2: l2-cache1 {
>  			cache-size = <0x100000>;
>  			cache-line-size = <64>;
>  			cache-sets = <1024>;
> +			cache-level = <2>;
>  		};
>  	};
>  
> diff --git a/arch/arm64/boot/dts/arm/juno-r2.dts b/arch/arm64/boot/dts/arm/juno-r2.dts
> index 709389582ae3..438cd1ff4bd0 100644
> --- a/arch/arm64/boot/dts/arm/juno-r2.dts
> +++ b/arch/arm64/boot/dts/arm/juno-r2.dts
> @@ -198,6 +198,7 @@ A72_L2: l2-cache0 {
>  			cache-size = <0x200000>;
>  			cache-line-size = <64>;
>  			cache-sets = <2048>;
> +			cache-level = <2>;
>  		};
>  
>  		A53_L2: l2-cache1 {
> @@ -205,6 +206,7 @@ A53_L2: l2-cache1 {
>  			cache-size = <0x100000>;
>  			cache-line-size = <64>;
>  			cache-sets = <1024>;
> +			cache-level = <2>;
>  		};
>  	};
>  
> diff --git a/arch/arm64/boot/dts/arm/juno.dts b/arch/arm64/boot/dts/arm/juno.dts
> index dbc22e70b62c..cf4a58211399 100644
> --- a/arch/arm64/boot/dts/arm/juno.dts
> +++ b/arch/arm64/boot/dts/arm/juno.dts
> @@ -197,6 +197,7 @@ A57_L2: l2-cache0 {
>  			cache-size = <0x200000>;
>  			cache-line-size = <64>;
>  			cache-sets = <2048>;
> +			cache-level = <2>;
>  		};
>  
>  		A53_L2: l2-cache1 {
> @@ -204,6 +205,7 @@ A53_L2: l2-cache1 {
>  			cache-size = <0x100000>;
>  			cache-line-size = <64>;
>  			cache-sets = <1024>;
> +			cache-level = <2>;
>  		};
>  	};
>  
> -- 
> 2.37.0
>
Sudeep Holla June 29, 2022, 10:53 a.m. UTC | #2
On Wed, 29 Jun 2022 10:59:59 +0100, Sudeep Holla wrote:
> Add the missing cache-level property to L2 caches. This is needed if
> we need to find the last level cache directly from the device tree cache
> node.
> 

Applied to sudeep.holla/linux (for-next/juno), thanks!

[1/1] arm64: dts: juno: Add cache-level property to L2 caches
      https://git.kernel.org/sudeep.holla/c/156c90415b

--
Regards,
Sudeep
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/arm/juno-r1.dts b/arch/arm64/boot/dts/arm/juno-r1.dts
index f099fb611d4e..6451c62146fd 100644
--- a/arch/arm64/boot/dts/arm/juno-r1.dts
+++ b/arch/arm64/boot/dts/arm/juno-r1.dts
@@ -192,6 +192,7 @@  A57_L2: l2-cache0 {
 			cache-size = <0x200000>;
 			cache-line-size = <64>;
 			cache-sets = <2048>;
+			cache-level = <2>;
 		};
 
 		A53_L2: l2-cache1 {
@@ -199,6 +200,7 @@  A53_L2: l2-cache1 {
 			cache-size = <0x100000>;
 			cache-line-size = <64>;
 			cache-sets = <1024>;
+			cache-level = <2>;
 		};
 	};
 
diff --git a/arch/arm64/boot/dts/arm/juno-r2.dts b/arch/arm64/boot/dts/arm/juno-r2.dts
index 709389582ae3..438cd1ff4bd0 100644
--- a/arch/arm64/boot/dts/arm/juno-r2.dts
+++ b/arch/arm64/boot/dts/arm/juno-r2.dts
@@ -198,6 +198,7 @@  A72_L2: l2-cache0 {
 			cache-size = <0x200000>;
 			cache-line-size = <64>;
 			cache-sets = <2048>;
+			cache-level = <2>;
 		};
 
 		A53_L2: l2-cache1 {
@@ -205,6 +206,7 @@  A53_L2: l2-cache1 {
 			cache-size = <0x100000>;
 			cache-line-size = <64>;
 			cache-sets = <1024>;
+			cache-level = <2>;
 		};
 	};
 
diff --git a/arch/arm64/boot/dts/arm/juno.dts b/arch/arm64/boot/dts/arm/juno.dts
index dbc22e70b62c..cf4a58211399 100644
--- a/arch/arm64/boot/dts/arm/juno.dts
+++ b/arch/arm64/boot/dts/arm/juno.dts
@@ -197,6 +197,7 @@  A57_L2: l2-cache0 {
 			cache-size = <0x200000>;
 			cache-line-size = <64>;
 			cache-sets = <2048>;
+			cache-level = <2>;
 		};
 
 		A53_L2: l2-cache1 {
@@ -204,6 +205,7 @@  A53_L2: l2-cache1 {
 			cache-size = <0x100000>;
 			cache-line-size = <64>;
 			cache-sets = <1024>;
+			cache-level = <2>;
 		};
 	};