diff mbox series

[RFC,6/6] powerpc/microwatt: Stop building the hash MMU code

Message ID 20210827163410.1177154-7-npiggin@gmail.com (mailing list archive)
State Superseded
Headers show
Series powerpc: Make hash MMU code build configurable | expand

Commit Message

Nicholas Piggin Aug. 27, 2021, 4:34 p.m. UTC
Microwatt is radix-only, so stop selecting the hash MMU code.

This saves 20kB compressed dtbImage and 56kB vmlinux size.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
 arch/powerpc/configs/microwatt_defconfig | 1 -
 arch/powerpc/platforms/Kconfig.cputype   | 1 +
 arch/powerpc/platforms/microwatt/Kconfig | 1 -
 3 files changed, 1 insertion(+), 2 deletions(-)

Comments

Christophe Leroy Aug. 28, 2021, 9:54 a.m. UTC | #1
Le 27/08/2021 à 18:34, Nicholas Piggin a écrit :
> Microwatt is radix-only, so stop selecting the hash MMU code.
> 
> This saves 20kB compressed dtbImage and 56kB vmlinux size.
> 
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
> ---
>   arch/powerpc/configs/microwatt_defconfig | 1 -
>   arch/powerpc/platforms/Kconfig.cputype   | 1 +
>   arch/powerpc/platforms/microwatt/Kconfig | 1 -
>   3 files changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/arch/powerpc/configs/microwatt_defconfig b/arch/powerpc/configs/microwatt_defconfig
> index bf5f2e5905eb..6fbad42f9e3d 100644
> --- a/arch/powerpc/configs/microwatt_defconfig
> +++ b/arch/powerpc/configs/microwatt_defconfig
> @@ -26,7 +26,6 @@ CONFIG_PPC_MICROWATT=y
>   # CONFIG_PPC_OF_BOOT_TRAMPOLINE is not set
>   CONFIG_CPU_FREQ=y
>   CONFIG_HZ_100=y
> -# CONFIG_PPC_MEM_KEYS is not set
>   # CONFIG_SECCOMP is not set
>   # CONFIG_MQ_IOSCHED_KYBER is not set
>   # CONFIG_COREDUMP is not set
> diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype
> index 9b90fc501ed4..b9acd6c68c81 100644
> --- a/arch/powerpc/platforms/Kconfig.cputype
> +++ b/arch/powerpc/platforms/Kconfig.cputype
> @@ -371,6 +371,7 @@ config SPE
>   config PPC_64S_HASH_MMU
>   	bool "Hash MMU Support"
>   	depends on PPC_BOOK3S_64
> +	depends on !PPC_MICROWATT

Do we really want to start nit picking which platforms can select such or such option ?
Isn't it enough to get it off through the defconfig ?

Is PPC_MICROWATT mutually exclusive with other book3s64 configs ? Don't we build multiplatform kernels ?

>   	default y
>   	select PPC_MM_SLICES
>   	help
> diff --git a/arch/powerpc/platforms/microwatt/Kconfig b/arch/powerpc/platforms/microwatt/Kconfig
> index e0ff2cfc1ca0..4f0ce292a6ce 100644
> --- a/arch/powerpc/platforms/microwatt/Kconfig
> +++ b/arch/powerpc/platforms/microwatt/Kconfig
> @@ -6,7 +6,6 @@ config PPC_MICROWATT
>   	select PPC_XICS
>   	select PPC_ICS_NATIVE
>   	select PPC_ICP_NATIVE
> -	select PPC_HASH_MMU_NATIVE if PPC_64S_HASH_MMU
>   	select PPC_UDBG_16550
>   	select ARCH_RANDOM
>   	help
>
Michael Ellerman Aug. 30, 2021, 3:24 a.m. UTC | #2
Christophe Leroy <christophe.leroy@csgroup.eu> writes:
> Le 27/08/2021 à 18:34, Nicholas Piggin a écrit :
>> Microwatt is radix-only, so stop selecting the hash MMU code.
>> 
>> This saves 20kB compressed dtbImage and 56kB vmlinux size.
>> 
>> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
>> ---
>>   arch/powerpc/configs/microwatt_defconfig | 1 -
>>   arch/powerpc/platforms/Kconfig.cputype   | 1 +
>>   arch/powerpc/platforms/microwatt/Kconfig | 1 -
>>   3 files changed, 1 insertion(+), 2 deletions(-)
>> 
>> diff --git a/arch/powerpc/configs/microwatt_defconfig b/arch/powerpc/configs/microwatt_defconfig
>> index bf5f2e5905eb..6fbad42f9e3d 100644
>> --- a/arch/powerpc/configs/microwatt_defconfig
>> +++ b/arch/powerpc/configs/microwatt_defconfig
>> @@ -26,7 +26,6 @@ CONFIG_PPC_MICROWATT=y
>>   # CONFIG_PPC_OF_BOOT_TRAMPOLINE is not set
>>   CONFIG_CPU_FREQ=y
>>   CONFIG_HZ_100=y
>> -# CONFIG_PPC_MEM_KEYS is not set
>>   # CONFIG_SECCOMP is not set
>>   # CONFIG_MQ_IOSCHED_KYBER is not set
>>   # CONFIG_COREDUMP is not set
>> diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype
>> index 9b90fc501ed4..b9acd6c68c81 100644
>> --- a/arch/powerpc/platforms/Kconfig.cputype
>> +++ b/arch/powerpc/platforms/Kconfig.cputype
>> @@ -371,6 +371,7 @@ config SPE
>>   config PPC_64S_HASH_MMU
>>   	bool "Hash MMU Support"
>>   	depends on PPC_BOOK3S_64
>> +	depends on !PPC_MICROWATT
>
> Do we really want to start nit picking which platforms can select such or such option ?
> Isn't it enough to get it off through the defconfig ?
>
> Is PPC_MICROWATT mutually exclusive with other book3s64 configs ? Don't we build multiplatform kernels ?

Yeah that belongs in the microwatt defconfig, not as a forced exclusion
in Kconfig.

cheers
Nicholas Piggin Aug. 30, 2021, 6:58 a.m. UTC | #3
Excerpts from Michael Ellerman's message of August 30, 2021 1:24 pm:
> Christophe Leroy <christophe.leroy@csgroup.eu> writes:
>> Le 27/08/2021 à 18:34, Nicholas Piggin a écrit :
>>> Microwatt is radix-only, so stop selecting the hash MMU code.
>>> 
>>> This saves 20kB compressed dtbImage and 56kB vmlinux size.
>>> 
>>> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
>>> ---
>>>   arch/powerpc/configs/microwatt_defconfig | 1 -
>>>   arch/powerpc/platforms/Kconfig.cputype   | 1 +
>>>   arch/powerpc/platforms/microwatt/Kconfig | 1 -
>>>   3 files changed, 1 insertion(+), 2 deletions(-)
>>> 
>>> diff --git a/arch/powerpc/configs/microwatt_defconfig b/arch/powerpc/configs/microwatt_defconfig
>>> index bf5f2e5905eb..6fbad42f9e3d 100644
>>> --- a/arch/powerpc/configs/microwatt_defconfig
>>> +++ b/arch/powerpc/configs/microwatt_defconfig
>>> @@ -26,7 +26,6 @@ CONFIG_PPC_MICROWATT=y
>>>   # CONFIG_PPC_OF_BOOT_TRAMPOLINE is not set
>>>   CONFIG_CPU_FREQ=y
>>>   CONFIG_HZ_100=y
>>> -# CONFIG_PPC_MEM_KEYS is not set
>>>   # CONFIG_SECCOMP is not set
>>>   # CONFIG_MQ_IOSCHED_KYBER is not set
>>>   # CONFIG_COREDUMP is not set
>>> diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype
>>> index 9b90fc501ed4..b9acd6c68c81 100644
>>> --- a/arch/powerpc/platforms/Kconfig.cputype
>>> +++ b/arch/powerpc/platforms/Kconfig.cputype
>>> @@ -371,6 +371,7 @@ config SPE
>>>   config PPC_64S_HASH_MMU
>>>   	bool "Hash MMU Support"
>>>   	depends on PPC_BOOK3S_64
>>> +	depends on !PPC_MICROWATT
>>
>> Do we really want to start nit picking which platforms can select such or such option ?
>> Isn't it enough to get it off through the defconfig ?
>>
>> Is PPC_MICROWATT mutually exclusive with other book3s64 configs ? Don't we build multiplatform kernels ?
> 
> Yeah that belongs in the microwatt defconfig, not as a forced exclusion
> in Kconfig.

Okay I'll fix that up. In that case the select POWER9 should not be in 
Kconfig but just defconfig too. Which is fine, it just means oldconfig
won't change it.

Thanks,
Nick
diff mbox series

Patch

diff --git a/arch/powerpc/configs/microwatt_defconfig b/arch/powerpc/configs/microwatt_defconfig
index bf5f2e5905eb..6fbad42f9e3d 100644
--- a/arch/powerpc/configs/microwatt_defconfig
+++ b/arch/powerpc/configs/microwatt_defconfig
@@ -26,7 +26,6 @@  CONFIG_PPC_MICROWATT=y
 # CONFIG_PPC_OF_BOOT_TRAMPOLINE is not set
 CONFIG_CPU_FREQ=y
 CONFIG_HZ_100=y
-# CONFIG_PPC_MEM_KEYS is not set
 # CONFIG_SECCOMP is not set
 # CONFIG_MQ_IOSCHED_KYBER is not set
 # CONFIG_COREDUMP is not set
diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype
index 9b90fc501ed4..b9acd6c68c81 100644
--- a/arch/powerpc/platforms/Kconfig.cputype
+++ b/arch/powerpc/platforms/Kconfig.cputype
@@ -371,6 +371,7 @@  config SPE
 config PPC_64S_HASH_MMU
 	bool "Hash MMU Support"
 	depends on PPC_BOOK3S_64
+	depends on !PPC_MICROWATT
 	default y
 	select PPC_MM_SLICES
 	help
diff --git a/arch/powerpc/platforms/microwatt/Kconfig b/arch/powerpc/platforms/microwatt/Kconfig
index e0ff2cfc1ca0..4f0ce292a6ce 100644
--- a/arch/powerpc/platforms/microwatt/Kconfig
+++ b/arch/powerpc/platforms/microwatt/Kconfig
@@ -6,7 +6,6 @@  config PPC_MICROWATT
 	select PPC_XICS
 	select PPC_ICS_NATIVE
 	select PPC_ICP_NATIVE
-	select PPC_HASH_MMU_NATIVE if PPC_64S_HASH_MMU
 	select PPC_UDBG_16550
 	select ARCH_RANDOM
 	help