Skip to contentSkip to conversation

powerpc: Add check to select PPC_RADIX_BROADCAST_TLBIE

RFC PATCH Applied Madhavan Srinivasan 4 participants 6 messages Apr 7, 2025 – Apr 21, 2025 PowerPC

lore
Share & tools
lore

Madhavan Srinivasan

author maintainer
#0 lore raw

RFC PATCH 1/1 powerpc: Add check to select PPC_RADIX_BROADCAST_TLBIE

Commit 3d45a3d0d2e6 ("powerpc: Define config option for processors with broadcast TLBIE") added a config option PPC_RADIX_BROADCAST_TLBIE to support processors with broadcast TLBIE. Since this option is relevant only for RADIX_MMU, add
a check as a dependency to enable PPC_RADIX_BROADCAST_TLBIE in both
powernv and pseries configs. This fixes the unmet config dependency
warning reported

WARNING: unmet direct dependencies detected for PPC_RADIX_BROADCAST_TLBIE
Depends on [n]: PPC_RADIX_MMU [=n]
Selected by [y]:
- PPC_PSERIES [=y] && PPC64 [=y] && PPC_BOOK3S [=y]

---
 arch/powerpc/platforms/powernv/Kconfig | 2 +-
 arch/powerpc/platforms/pseries/Kconfig | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/powerpc/platforms/powernv/Kconfig +1 -1
index 3fbe0295ce14..95d7ba73d43d 100644
@@ -17,7 +17,7 @@ config PPC_POWERNV
 	select MMU_NOTIFIER
 	select FORCE_SMP
 	select ARCH_SUPPORTS_PER_VMA_LOCK
-	select PPC_RADIX_BROADCAST_TLBIE
+	select PPC_RADIX_BROADCAST_TLBIE if PPC_RADIX_MMU
 	default y
 
 config OPAL_PRD
arch/powerpc/platforms/pseries/Kconfig +1 -1
index a934c2a262f6..fa3c2fff082a 100644
@@ -23,7 +23,7 @@ config PPC_PSERIES
 	select FORCE_SMP
 	select SWIOTLB
 	select ARCH_SUPPORTS_PER_VMA_LOCK
-	select PPC_RADIX_BROADCAST_TLBIE
+	select PPC_RADIX_BROADCAST_TLBIE if PPC_RADIX_MMU
 	default y
 
 config PARAVIRT
Signature · 1 line
2.48.1
Tested-by on v1 1/1
#1 lore raw
Quoted 7 lines · Madhavan Srinivasan

Commit 3d45a3d0d2e6 ("powerpc: Define config option for processors with broadcast TLBIE") added a config option PPC_RADIX_BROADCAST_TLBIE to support processors with broadcast TLBIE. Since this option is relevant only for RADIX_MMU, add
a check as a dependency to enable PPC_RADIX_BROADCAST_TLBIE in both
powernv and pseries configs. This fixes the unmet config dependency
warning reported

Quoted 8 lines

WARNING: unmet direct dependencies detected for PPC_RADIX_BROADCAST_TLBIE
Depends on [n]: PPC_RADIX_MMU [=n]
Selected by [y]:
- PPC_PSERIES [=y] && PPC64 [=y] && PPC_BOOK3S [=y]

Tested this on pseries LPAR and the patch fixes the reported issue. Hence,

Quoted 23 lines
---
  arch/powerpc/platforms/powernv/Kconfig | 2 +-
  arch/powerpc/platforms/pseries/Kconfig | 2 +-
  2 files changed, 2 insertions(+), 2 deletions(-)
arch/powerpc/platforms/powernv/Kconfig +1 -1
index 3fbe0295ce14..95d7ba73d43d 100644
@@ -17,7 +17,7 @@ config PPC_POWERNV
  	select MMU_NOTIFIER
  	select FORCE_SMP
  	select ARCH_SUPPORTS_PER_VMA_LOCK
-	select PPC_RADIX_BROADCAST_TLBIE
+	select PPC_RADIX_BROADCAST_TLBIE if PPC_RADIX_MMU
  	default y
 
  config OPAL_PRD
arch/powerpc/platforms/pseries/Kconfig +0 -0
index a934c2a262f6..fa3c2fff082a 100644

arch/powerpc/platforms/pseries/Kconfig config PPC_PSERIES · line 29

Quoted 8 lines
arch/powerpc/platforms/pseries/Kconfig +1 -1
@@ -23,7 +23,7 @@ config PPC_PSERIES
  	select FORCE_SMP
  	select SWIOTLB
  	select ARCH_SUPPORTS_PER_VMA_LOCK
-	select PPC_RADIX_BROADCAST_TLBIE
+	select PPC_RADIX_BROADCAST_TLBIE if PPC_RADIX_MMU
  	default y
 
  config PARAVIRT

With out this patch:

 make olddefconfig
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  HOSTCC  scripts/kconfig/confdata.o
  HOSTCC  scripts/kconfig/expr.o
  LEX     scripts/kconfig/lexer.lex.c
  YACC    scripts/kconfig/parser.tab.[ch]
  HOSTCC  scripts/kconfig/lexer.lex.o
  HOSTCC  scripts/kconfig/menu.o
  HOSTCC  scripts/kconfig/parser.tab.o
  HOSTCC  scripts/kconfig/preprocess.o
  HOSTCC  scripts/kconfig/symbol.o
  HOSTCC  scripts/kconfig/util.o
  HOSTLD  scripts/kconfig/conf

WARNING: unmet direct dependencies detected for PPC_RADIX_BROADCAST_TLBIE Depends on [n]: PPC_RADIX_MMU [=n]
  Selected by [y]:
  - PPC_PSERIES [=y] && PPC64 [=y] && PPC_BOOK3S [=y]
#

# configuration written to .config
#

With this patch:

make olddefconfig
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  HOSTCC  scripts/kconfig/confdata.o
  HOSTCC  scripts/kconfig/expr.o
  LEX     scripts/kconfig/lexer.lex.c
  YACC    scripts/kconfig/parser.tab.[ch]
  HOSTCC  scripts/kconfig/lexer.lex.o
  HOSTCC  scripts/kconfig/menu.o
  HOSTCC  scripts/kconfig/parser.tab.o
  HOSTCC  scripts/kconfig/preprocess.o
  HOSTCC  scripts/kconfig/symbol.o
  HOSTCC  scripts/kconfig/util.o
  HOSTLD  scripts/kconfig/conf
#
# No change to .config
#

Regards,

Venkat.

reviewer Reviewed-by on v1 1/1
#2 lore raw
In reply to Madhavan Srinivasan
Quoted 1 line · Madhavan Srinivasan

Commit 3d45a3d0d2e6 ("powerpc: Define config option for processors with broadcast TLBIE")

We may need to add above to Fixes tag as well, no?

Quoted 6 lines

added a config option PPC_RADIX_BROADCAST_TLBIE to support processors with broadcast TLBIE. Since this option is relevant only for RADIX_MMU, add a check as a dependency to enable PPC_RADIX_BROADCAST_TLBIE in both powernv and pseries configs. This fixes the unmet config dependency warning reported

Quoted 8 lines

WARNING: unmet direct dependencies detected for PPC_RADIX_BROADCAST_TLBIE
Depends on [n]: PPC_RADIX_MMU [=n]
Selected by [y]:
- PPC_PSERIES [=y] && PPC64 [=y] && PPC_BOOK3S [=y]

It's a bit strange that even though PPC_RADIX_BROADCAST_TLBIE adds PPC_RADIX_MMU as a dependency where is it defined, we still have to add an extra check for the same dependency to enable this for any platform.

The config generated by the 0day in the shared link, indeed had an unmet dependency. i.e.

CONFIG_PPC_64S_HASH_MMU=y
# CONFIG_PPC_RADIX_MMU is not set
CONFIG_PPC_RADIX_BROADCAST_TLBIE=y

So, the fix look good to me. Please feel free to take:

Quoted 33 lines
---
 arch/powerpc/platforms/powernv/Kconfig | 2 +-
 arch/powerpc/platforms/pseries/Kconfig | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/powerpc/platforms/powernv/Kconfig +1 -1
index 3fbe0295ce14..95d7ba73d43d 100644
@@ -17,7 +17,7 @@ config PPC_POWERNV
 	select MMU_NOTIFIER
 	select FORCE_SMP
 	select ARCH_SUPPORTS_PER_VMA_LOCK
-	select PPC_RADIX_BROADCAST_TLBIE
+	select PPC_RADIX_BROADCAST_TLBIE if PPC_RADIX_MMU
 	default y
 
 config OPAL_PRD
arch/powerpc/platforms/pseries/Kconfig +1 -1
index a934c2a262f6..fa3c2fff082a 100644
@@ -23,7 +23,7 @@ config PPC_PSERIES
 	select FORCE_SMP
 	select SWIOTLB
 	select ARCH_SUPPORTS_PER_VMA_LOCK
-	select PPC_RADIX_BROADCAST_TLBIE
+	select PPC_RADIX_BROADCAST_TLBIE if PPC_RADIX_MMU
 	default y
 
 config PARAVIRT
Signature · 1 line
2.48.1
#3 lore raw

Le 07/04/2025 à 21:10, Ritesh Harjani (IBM) a écrit :

Quoted 17 lines
Quoted 1 line · Madhavan Srinivasan

Commit 3d45a3d0d2e6 ("powerpc: Define config option for processors with broadcast TLBIE")

We may need to add above to Fixes tag as well, no?

Quoted 11 lines

added a config option PPC_RADIX_BROADCAST_TLBIE to support processors with broadcast TLBIE. Since this option is relevant only for RADIX_MMU, add a check as a dependency to enable PPC_RADIX_BROADCAST_TLBIE in both powernv and pseries configs. This fixes the unmet config dependency warning reported

WARNING: unmet direct dependencies detected for PPC_RADIX_BROADCAST_TLBIE
Depends on [n]: PPC_RADIX_MMU [=n]
Selected by [y]:
- PPC_PSERIES [=y] && PPC64 [=y] && PPC_BOOK3S [=y]

Quoted 7 lines
Quoted 3 lines

It's a bit strange that even though PPC_RADIX_BROADCAST_TLBIE adds PPC_RADIX_MMU as a dependency where is it defined, we still have to add an extra check for the same dependency to enable this for any platform.

That's expected, see https://docs.kernel.org/kbuild/kconfig-language.html#menu-attributes :

select should be used with care. select will force a symbol to a value without visiting the dependencies. By abusing select you are able to select a symbol FOO even if FOO depends on BAR that is not set. In general use select only for non-visible symbols (no prompts anywhere) and for symbols with no dependencies. That will limit the usefulness but on the other hand avoid the illegal configurations all over.

Christophe

Quoted 46 lines

The config generated by the 0day in the shared link, indeed had an unmet dependency. i.e.

CONFIG_PPC_64S_HASH_MMU=y
# CONFIG_PPC_RADIX_MMU is not set
CONFIG_PPC_RADIX_BROADCAST_TLBIE=y

So, the fix look good to me. Please feel free to take:

Quoted 33 lines
---
  arch/powerpc/platforms/powernv/Kconfig | 2 +-
  arch/powerpc/platforms/pseries/Kconfig | 2 +-
  2 files changed, 2 insertions(+), 2 deletions(-)
arch/powerpc/platforms/powernv/Kconfig +1 -1
index 3fbe0295ce14..95d7ba73d43d 100644
@@ -17,7 +17,7 @@ config PPC_POWERNV
  	select MMU_NOTIFIER
  	select FORCE_SMP
  	select ARCH_SUPPORTS_PER_VMA_LOCK
-	select PPC_RADIX_BROADCAST_TLBIE
+	select PPC_RADIX_BROADCAST_TLBIE if PPC_RADIX_MMU
  	default y
 
  config OPAL_PRD
arch/powerpc/platforms/pseries/Kconfig +1 -1
index a934c2a262f6..fa3c2fff082a 100644
@@ -23,7 +23,7 @@ config PPC_PSERIES
  	select FORCE_SMP
  	select SWIOTLB
  	select ARCH_SUPPORTS_PER_VMA_LOCK
-	select PPC_RADIX_BROADCAST_TLBIE
+	select PPC_RADIX_BROADCAST_TLBIE if PPC_RADIX_MMU
  	default y
 
  config PARAVIRT
Signature · 1 line
2.48.1
#4 lore raw
Quoted 22 lines · Christophe Leroy

Le 07/04/2025 à 21:10, Ritesh Harjani (IBM) a écrit :

Quoted 21 lines
Quoted 1 line · Madhavan Srinivasan

Commit 3d45a3d0d2e6 ("powerpc: Define config option for processors with broadcast TLBIE")

We may need to add above to Fixes tag as well, no?

Quoted 14 lines

added a config option PPC_RADIX_BROADCAST_TLBIE to support processors with broadcast TLBIE. Since this option is relevant only for RADIX_MMU, add a check as a dependency to enable PPC_RADIX_BROADCAST_TLBIE in both powernv and pseries configs. This fixes the unmet config dependency warning reported

WARNING: unmet direct dependencies detected for PPC_RADIX_BROADCAST_TLBIE
Depends on [n]: PPC_RADIX_MMU [=n]
Selected by [y]:
- PPC_PSERIES [=y] && PPC64 [=y] && PPC_BOOK3S [=y]

Quoted 5 lines
Quoted 3 lines

It's a bit strange that even though PPC_RADIX_BROADCAST_TLBIE adds PPC_RADIX_MMU as a dependency where is it defined, we still have to add an extra check for the same dependency to enable this for any platform.

That's expected, see

Yes. I had figured that out.

Quoted 1 line

https://docs.kernel.org/kbuild/kconfig-language.html#menu-attributes :

Ok! Good to see we have this properly documented as well. Thanks for pointing out the documentation link.

Quoted 10 lines

select should be used with care. select will force a symbol to a value without visiting the dependencies. By abusing select you are able to select a symbol FOO even if FOO depends on BAR that is not set. In general use select only for non-visible symbols (no prompts anywhere) and for symbols with no dependencies. That will limit the usefulness but on the other hand avoid the illegal configurations all over.

Christophe

Make sense. Thanks! for adding the details.

-ritesh

author maintainer Applied
#5 lore raw
In reply to Madhavan Srinivasan
Quoted 8 lines · Madhavan Srinivasan

Commit 3d45a3d0d2e6 ("powerpc: Define config option for processors with broadcast TLBIE") added a config option PPC_RADIX_BROADCAST_TLBIE to support processors with broadcast TLBIE. Since this option is relevant only for RADIX_MMU, add
a check as a dependency to enable PPC_RADIX_BROADCAST_TLBIE in both
powernv and pseries configs. This fixes the unmet config dependency
warning reported

[...]

Applied to powerpc/fixes.

[1/1] powerpc: Add check to select PPC_RADIX_BROADCAST_TLBIE

      https://git.kernel.org/powerpc/c/3700976f2ae8dfec4c17433f8a16c9e6c334cf89

Thanks