All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicholas Piggin <npiggin@gmail.com>
To: Christophe Leroy <christophe.leroy@csgroup.eu>,
	linuxppc-dev@lists.ozlabs.org
Subject: Re: [RFC PATCH 4/6] powerpc/64s: Make hash MMU code build configurable
Date: Mon, 30 Aug 2021 16:51:48 +1000	[thread overview]
Message-ID: <1630306030.3s9bpofbg9.astroid@bobo.none> (raw)
In-Reply-To: <3b419b53-02b8-1a52-2f22-7b8ca49c4460@csgroup.eu>

Excerpts from Christophe Leroy's message of August 28, 2021 7:34 pm:
> 
> 
> Le 27/08/2021 à 18:34, Nicholas Piggin a écrit :
>> Introduce a new option CONFIG_PPC_64S_HASH_MMU which allows the 64s hash
>> MMU code to be compiled out if radix is selected and the minimum
>> supported CPU type is POWER9 or higher, and KVM is not selected.
>> 
>> This saves 128kB kernel image size (90kB text) on powernv_defconfig
>> minus KVM, 350kB on pseries_defconfig minus KVM, 40kB on a tiny config.
>> 
>> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
>> ---
> 
> ...
> 
>> @@ -324,6 +330,7 @@ static inline void assert_pte_locked(struct mm_struct *mm, unsigned long addr)
>>   }
>>   #endif /* !CONFIG_DEBUG_VM */
>>   
>> +#if defined(CONFIG_PPC_RADIX_MMU) && defined(CONFIG_PPC_64S_HASH_MMU)
>>   static inline bool radix_enabled(void)
>>   {
>>   	return mmu_has_feature(MMU_FTR_TYPE_RADIX);
>> @@ -333,6 +340,27 @@ static inline bool early_radix_enabled(void)
>>   {
>>   	return early_mmu_has_feature(MMU_FTR_TYPE_RADIX);
>>   }
>> +#elif defined(CONFIG_PPC_64S_HASH_MMU)
>> +static inline bool radix_enabled(void)
>> +{
>> +	return false;
>> +}
>> +
>> +static inline bool early_radix_enabled(void)
>> +{
>> +	return false;
>> +}
>> +#else
>> +static inline bool radix_enabled(void)
>> +{
>> +	return true;
>> +}
>> +
>> +static inline bool early_radix_enabled(void)
>> +{
>> +	return true;
>> +}
>> +#endif
> 
> You don't need something that complex. You don't need to change that at all indeed, just have to 
> ensure that when CONFIG_PPC_64S_HASH_MMU is not selected you have MMU_FTR_TYPE_RADIX included in 
> MMU_FTRS_ALWAYS and voila.

Yeah I had that as a later patch that fixes up the MMU ftrs for 64s 
which does that, I think was required before some of your patches were 
upstreamed.

But looks like it is now trivial so I should just pull that in here.

Thanks,
Nick

  reply	other threads:[~2021-08-30  6:52 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-27 16:34 [RFC PATCH 0/6] powerpc: Make hash MMU code build configurable Nicholas Piggin
2021-08-27 16:34 ` [RFC PATCH 1/6] powerpc: Remove unused FW_FEATURE_NATIVE references Nicholas Piggin
2021-08-27 16:34 ` [RFC PATCH 2/6] powerpc: Rename PPC_NATIVE to PPC_HASH_MMU_NATIVE Nicholas Piggin
2021-08-27 16:34 ` [RFC PATCH 3/6] powerpc/pseries: Stop selecting PPC_HASH_MMU_NATIVE Nicholas Piggin
2021-08-27 16:34 ` [RFC PATCH 4/6] powerpc/64s: Make hash MMU code build configurable Nicholas Piggin
2021-08-28  9:34   ` Christophe Leroy
2021-08-30  6:51     ` Nicholas Piggin [this message]
2021-08-28  9:59   ` Christophe Leroy
2021-08-30  6:55     ` Nicholas Piggin
2021-08-30  7:12       ` Christophe Leroy
2021-08-27 16:34 ` [RFC PATCH 5/6] powerpc/microwatt: select POWER9_CPU Nicholas Piggin
2021-08-28  9:50   ` Christophe Leroy
2021-08-30  6:56     ` Nicholas Piggin
2021-08-27 16:34 ` [RFC PATCH 6/6] powerpc/microwatt: Stop building the hash MMU code Nicholas Piggin
2021-08-28  9:54   ` Christophe Leroy
2021-08-30  3:24     ` Michael Ellerman
2021-08-30  6:58       ` Nicholas Piggin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1630306030.3s9bpofbg9.astroid@bobo.none \
    --to=npiggin@gmail.com \
    --cc=christophe.leroy@csgroup.eu \
    --cc=linuxppc-dev@lists.ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.