public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Christophe Leroy <christophe.leroy@csgroup.eu>,
	Nicholas Piggin <npiggin@gmail.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH v1 02/19] powerpc/64e: Tie PPC_BOOK3E_64 to PPC_E500MC
Date: Fri, 09 Sep 2022 22:39:37 +1000	[thread overview]
Message-ID: <87k06cen7a.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <e60c6e97-f73e-5a5e-9ddf-8956e9a5b950@csgroup.eu>

Christophe Leroy <christophe.leroy@csgroup.eu> writes:
> Le 09/09/2022 à 07:50, Michael Ellerman a écrit :
>> Hi Christophe,
>> 
>> Thanks for trying to clean up this tangled mess.
>> 
>> Christophe Leroy <christophe.leroy@csgroup.eu> writes:
>>> The only 64-bit Book3E CPUs we support is the e500mc.
>> 
>> AFAIK the e500mc is 32-bit?
>
> Yes it seems.
>
>> 
>> We support e5500 and e6500 which are 64-bit Book3E.
>> 
>> They're derivatives of the e500mc AIUI.
>> 
>> So CONFIG_PPC_E500MC actually means e500mc *and later derivatives*.
>> 
>> You can see that with eg:
>> 
>> config SPE_POSSIBLE
>> 	def_bool y
>> 	depends on E500 && !PPC_E500MC
>> 
>> Because e500mc dropped SPE, and so therefore e5500 and e6500 don't have
>> it either.
>> 
>> And eg:
>> 
>> #ifdef CONFIG_PPC_E500MC
>> _GLOBAL(__setup_cpu_e6500)
>> 	mflr	r6
>> 
>> 
>>> However our Kconfig allows configurating a kernel that has 64-bit
>>> Book3E support, but no e500mc support enabled. Such a kernel
>>> would never boot, it doesn't know about any CPUs.
>> 
>> That is true.
>> 
>>> To fix this, force e500mc to be selected whenever we are
>>> building a 64-bit Book3E kernel.
>> 
>> I think that's a reasonable fix, just it's important to differentiate
>> between CONFIG_PPC_E500MC (the symbol) and e500mc (the CPU).
>
> Ok, I'll see how I can make it more explicit.
>
>> 
>>> And add a test to detect futur situations where cpu_specs is empty.
>>                             future
>>>
>>> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
>>> ---
>>>   arch/powerpc/kernel/cputable.c         | 2 ++
>>>   arch/powerpc/platforms/Kconfig.cputype | 2 ++
>>>   2 files changed, 4 insertions(+)
>>>
>> ..
>>> diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype
>>> index 5185d942b455..19fd95a06352 100644
>>> --- a/arch/powerpc/platforms/Kconfig.cputype
>>> +++ b/arch/powerpc/platforms/Kconfig.cputype
>>> @@ -108,6 +108,8 @@ config PPC_BOOK3S_64
>>>   config PPC_BOOK3E_64
>>>   	bool "Embedded processors"
>>>   	select PPC_FSL_BOOK3E
>>> +	select E500
>>> +	select PPC_E500MC
>>>   	select PPC_FPU # Make it a choice ?
>>>   	select PPC_SMP_MUXED_IPI
>>>   	select PPC_DOORBELL
>> 
>> I think that makes the select of PPC_E500MC below redundant:
>> 
>> config PPC_QEMU_E500
>> 	bool "QEMU generic e500 platform"
>> 	select DEFAULT_UIMAGE
>> 	select E500
>> 	select PPC_E500MC if PPC64
>
> That's handled in  [v1,10/19] powerpc: Remove redundant selection of 
> E500 and E500MC. Should I reorder patches ?

No that's fine the way it is, I hadn't looked at patch 10 when I replied.

cheers

  reply	other threads:[~2022-09-09 12:39 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-08 17:37 [PATCH v1 01/19] powerpc/Kconfig: Fix non existing CONFIG_PPC_FSL_BOOKE Christophe Leroy
2022-09-08 17:37 ` [PATCH v1 02/19] powerpc/64e: Tie PPC_BOOK3E_64 to PPC_E500MC Christophe Leroy
2022-09-09  5:50   ` Michael Ellerman
2022-09-09  6:22     ` Christophe Leroy
2022-09-09 12:39       ` Michael Ellerman [this message]
2022-09-08 17:37 ` [PATCH v1 03/19] powerpc/64e: Remove unnecessary #ifdef CONFIG_PPC_FSL_BOOK3E Christophe Leroy
2022-09-08 17:37 ` [PATCH v1 04/19] powerpc/cputable: Remove __machine_check_early_realmode_p{7/8/9} prototypes Christophe Leroy
2022-09-08 17:37 ` [PATCH v1 05/19] powerpc/cputable: Move __cpu_setup() prototypes out of cputable.h Christophe Leroy
2022-09-08 17:37 ` [PATCH v1 06/19] powerpc/cputable: Split cpu_specs[] " Christophe Leroy
2022-09-08 17:37 ` [PATCH v1 07/19] powerpc: Remove CONFIG_FSL_BOOKE Christophe Leroy
2022-09-08 17:37 ` [PATCH v1 08/19] powerpc/cputable: Split cpu_specs[] for mpc85xx and e500mc Christophe Leroy
2022-09-08 17:37 ` [PATCH v1 09/19] powerpc: Remove CONFIG_PPC_BOOK3E Christophe Leroy
2022-09-08 17:37 ` [PATCH v1 10/19] powerpc: Remove redundant selection of E500 and E500MC Christophe Leroy
2022-09-08 17:37 ` [PATCH v1 11/19] powerpc: Change CONFIG_E500 to CONFIG_PPC_E500 Christophe Leroy
2022-09-08 17:37 ` [PATCH v1 12/19] Documentation: Rename PPC_FSL_BOOK3E to PPC_E500 Christophe Leroy
2022-09-08 17:37 ` [PATCH v1 13/19] watchdog: booke_wdt: Replace PPC_FSL_BOOK3E by PPC_E500 Christophe Leroy
2022-09-08 17:49   ` Guenter Roeck
2022-09-08 17:37 ` [PATCH v1 14/19] powerpc: Remove CONFIG_PPC_FSL_BOOK3E Christophe Leroy
2022-09-08 17:37 ` [PATCH v1 15/19] powerpc: Remove CONFIG_PPC_BOOK3E_MMU Christophe Leroy
2022-09-08 17:37 ` [PATCH v1 16/19] powerpc: Replace PPC_85xx || PPC_BOOKE_64 by PPC_E500 Christophe Leroy
2022-09-08 17:37 ` [PATCH v1 17/19] powerpc: Simplify redundant Kconfig tests Christophe Leroy
2022-09-08 17:37 ` [PATCH v1 18/19] powerpc: Cleanup idle for e500 Christophe Leroy
2022-09-08 17:37 ` [PATCH v1 19/19] powerpc: Remove impossible mmu_psize_defs[] on nohash Christophe Leroy
2022-09-09  2:35   ` kernel test robot

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=87k06cen7a.fsf@mpe.ellerman.id.au \
    --to=mpe@ellerman.id.au \
    --cc=christophe.leroy@csgroup.eu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=npiggin@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox