[RFC PATCH] powerpc: Add check to select PPC_RADIX_BROADCAST_TLBIE

Christophe Leroy christophe.leroy at csgroup.eu
Tue Apr 8 16:02:50 AEST 2025



Le 07/04/2025 à 21:10, Ritesh Harjani (IBM) a écrit :
> Madhavan Srinivasan <maddy at linux.ibm.com> writes:
> 
>> Commit 3d45a3d0d2e6 ("powerpc: Define config option for processors with broadcast TLBIE")
> 
> We may need to add above to Fixes tag as well, no?
> 
>> 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]
>>
>> Reported-by: kernel test robot <lkp at intel.com>
>> Closes: https://lore.kernel.org/oe-kbuild-all/202504051857.jRqxM60c-lkp@intel.com/
>> Signed-off-by: Madhavan Srinivasan <maddy at linux.ibm.com>
> 
> 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

> 
> 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:
> Reviewed-by: Ritesh Harjani (IBM) <ritesh.list at gmail.com>
> 
> 
>> ---
>>   arch/powerpc/platforms/powernv/Kconfig | 2 +-
>>   arch/powerpc/platforms/pseries/Kconfig | 2 +-
>>   2 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/powerpc/platforms/powernv/Kconfig b/arch/powerpc/platforms/powernv/Kconfig
>> index 3fbe0295ce14..95d7ba73d43d 100644
>> --- a/arch/powerpc/platforms/powernv/Kconfig
>> +++ b/arch/powerpc/platforms/powernv/Kconfig
>> @@ -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
>> diff --git a/arch/powerpc/platforms/pseries/Kconfig b/arch/powerpc/platforms/pseries/Kconfig
>> index a934c2a262f6..fa3c2fff082a 100644
>> --- a/arch/powerpc/platforms/pseries/Kconfig
>> +++ b/arch/powerpc/platforms/pseries/Kconfig
>> @@ -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
>> -- 
>> 2.48.1



More information about the Linuxppc-dev mailing list