linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc64: Enable CONFIG_E500 and CONFIG_PPC_E500MC for e5500/e6500
@ 2016-08-22 14:46 David Engraf
  2016-09-25  6:20 ` Scott Wood
  0 siblings, 1 reply; 6+ messages in thread
From: David Engraf @ 2016-08-22 14:46 UTC (permalink / raw)
  To: benh, paulus, mpe; +Cc: linuxppc-dev, linux-kernel, David Engraf

The PowerPC e5500/e6500 architecture is based on the e500mc core. Enable
CONFIG_E500 and CONFIG_PPC_E500MC when e5500/e6500 is used.

This will also fix using CONFIG_PPC_QEMU_E500 on PPC64.

Signed-off-by: David Engraf <david.engraf@sysgo.com>
---
 arch/powerpc/platforms/Kconfig.cputype | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype
index f32edec..0382da7 100644
--- a/arch/powerpc/platforms/Kconfig.cputype
+++ b/arch/powerpc/platforms/Kconfig.cputype
@@ -125,11 +125,13 @@ config POWER8_CPU
 
 config E5500_CPU
 	bool "Freescale e5500"
-	depends on E500
+	select E500
+	select PPC_E500MC
 
 config E6500_CPU
 	bool "Freescale e6500"
-	depends on E500
+	select E500
+	select PPC_E500MC
 
 endchoice
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: powerpc64: Enable CONFIG_E500 and CONFIG_PPC_E500MC for e5500/e6500
  2016-08-22 14:46 [PATCH] powerpc64: Enable CONFIG_E500 and CONFIG_PPC_E500MC for e5500/e6500 David Engraf
@ 2016-09-25  6:20 ` Scott Wood
  2016-09-26  8:48   ` David Engraf
  0 siblings, 1 reply; 6+ messages in thread
From: Scott Wood @ 2016-09-25  6:20 UTC (permalink / raw)
  To: David Engraf; +Cc: benh, paulus, mpe, linuxppc-dev, linux-kernel

On Mon, Aug 22, 2016 at 04:46:43PM +0200, David Engraf wrote:
> The PowerPC e5500/e6500 architecture is based on the e500mc core. Enable
> CONFIG_E500 and CONFIG_PPC_E500MC when e5500/e6500 is used.
> 
> This will also fix using CONFIG_PPC_QEMU_E500 on PPC64.
> 
> Signed-off-by: David Engraf <david.engraf@sysgo.com>
> ---
>  arch/powerpc/platforms/Kconfig.cputype | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype
> index f32edec..0382da7 100644
> --- a/arch/powerpc/platforms/Kconfig.cputype
> +++ b/arch/powerpc/platforms/Kconfig.cputype
> @@ -125,11 +125,13 @@ config POWER8_CPU
>  
>  config E5500_CPU
>  	bool "Freescale e5500"
> -	depends on E500
> +	select E500
> +	select PPC_E500MC
>  
>  config E6500_CPU
>  	bool "Freescale e6500"
> -	depends on E500
> +	select E500
> +	select PPC_E500MC

These config symbols are for setting -mcpu.  Kernels built with
CONFIG_GENERIC_CPU should also work on e5500/e6500.

The problem is that CONFIG_PPC_QEMU_E500 doesn't select E500 (I didn't
notice it before because usually CORENET_GENERIC is enabled as well).

Note that your patch, by eliminating the dependency on E500, would make
it possible to build a book3s kernel with E5500_CPU/E6500_CPU, which
doesn't make any sense.

-Scott

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: powerpc64: Enable CONFIG_E500 and CONFIG_PPC_E500MC for e5500/e6500
  2016-09-25  6:20 ` Scott Wood
@ 2016-09-26  8:48   ` David Engraf
  2016-09-26 23:08     ` Scott Wood
  0 siblings, 1 reply; 6+ messages in thread
From: David Engraf @ 2016-09-26  8:48 UTC (permalink / raw)
  To: Scott Wood; +Cc: benh, paulus, mpe, linuxppc-dev, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 2125 bytes --]

Am 25.09.2016 um 08:20 schrieb Scott Wood:
> On Mon, Aug 22, 2016 at 04:46:43PM +0200, David Engraf wrote:
>> The PowerPC e5500/e6500 architecture is based on the e500mc core. Enable
>> CONFIG_E500 and CONFIG_PPC_E500MC when e5500/e6500 is used.
>>
>> This will also fix using CONFIG_PPC_QEMU_E500 on PPC64.
>>
>> Signed-off-by: David Engraf <david.engraf@sysgo.com>
>> ---
>>  arch/powerpc/platforms/Kconfig.cputype | 6 ++++--
>>  1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype
>> index f32edec..0382da7 100644
>> --- a/arch/powerpc/platforms/Kconfig.cputype
>> +++ b/arch/powerpc/platforms/Kconfig.cputype
>> @@ -125,11 +125,13 @@ config POWER8_CPU
>>
>>  config E5500_CPU
>>  	bool "Freescale e5500"
>> -	depends on E500
>> +	select E500
>> +	select PPC_E500MC
>>
>>  config E6500_CPU
>>  	bool "Freescale e6500"
>> -	depends on E500
>> +	select E500
>> +	select PPC_E500MC
>
> These config symbols are for setting -mcpu.  Kernels built with
> CONFIG_GENERIC_CPU should also work on e5500/e6500.

I don't think so. At least on QEMU it is not working because e5500/e6500 
is based on the e500mc core and the option CONFIG_PPC_E500MC also 
controls the cpu features (check cputable.h).

> The problem is that CONFIG_PPC_QEMU_E500 doesn't select E500 (I didn't
> notice it before because usually CORENET_GENERIC is enabled as well).

I noticed that as well, but I think it makes more sense to select 
E500/PPC_E500MC within the cputype menu instead of having a dependency 
which might be not clear for the user. Right now the way how to 
configure such a BSP is not clear, you need to open "Processor support" 
and select the "Processor Type", then switch to "Platform support" to 
select the BSP and afterward got back to "Processor support" to switch 
from the generic CPU type to e5500/e6500.

> Note that your patch, by eliminating the dependency on E500, would make
> it possible to build a book3s kernel with E5500_CPU/E6500_CPU, which
> doesn't make any sense.

You're right. The attached version fixes this.

- David

[-- Attachment #2: ppc.patch --]
[-- Type: text/x-patch, Size: 516 bytes --]

diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype
index f32edec..abd345e 100644
--- a/arch/powerpc/platforms/Kconfig.cputype
+++ b/arch/powerpc/platforms/Kconfig.cputype
@@ -125,11 +125,15 @@ config POWER8_CPU
 
 config E5500_CPU
 	bool "Freescale e5500"
-	depends on E500
+	depends on PPC_BOOK3E_64
+	select E500
+	select PPC_E500MC
 
 config E6500_CPU
 	bool "Freescale e6500"
-	depends on E500
+	depends on PPC_BOOK3E_64
+	select E500
+	select PPC_E500MC
 
 endchoice
 

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: powerpc64: Enable CONFIG_E500 and CONFIG_PPC_E500MC for e5500/e6500
  2016-09-26  8:48   ` David Engraf
@ 2016-09-26 23:08     ` Scott Wood
  2016-10-07  9:00       ` David Engraf
  0 siblings, 1 reply; 6+ messages in thread
From: Scott Wood @ 2016-09-26 23:08 UTC (permalink / raw)
  To: David Engraf; +Cc: benh, paulus, mpe, linuxppc-dev, linux-kernel

On Mon, 2016-09-26 at 10:48 +0200, David Engraf wrote:
> Am 25.09.2016 um 08:20 schrieb Scott Wood:
> > 
> > On Mon, Aug 22, 2016 at 04:46:43PM +0200, David Engraf wrote:
> > > 
> > > The PowerPC e5500/e6500 architecture is based on the e500mc core. Enable
> > > CONFIG_E500 and CONFIG_PPC_E500MC when e5500/e6500 is used.
> > > 
> > > This will also fix using CONFIG_PPC_QEMU_E500 on PPC64.
> > > 
> > > Signed-off-by: David Engraf <david.engraf@sysgo.com>
> > > ---
> > >  arch/powerpc/platforms/Kconfig.cputype | 6 ++++--
> > >  1 file changed, 4 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/arch/powerpc/platforms/Kconfig.cputype
> > > b/arch/powerpc/platforms/Kconfig.cputype
> > > index f32edec..0382da7 100644
> > > --- a/arch/powerpc/platforms/Kconfig.cputype
> > > +++ b/arch/powerpc/platforms/Kconfig.cputype
> > > @@ -125,11 +125,13 @@ config POWER8_CPU
> > > 
> > >  config E5500_CPU
> > >  	bool "Freescale e5500"
> > > -	depends on E500
> > > +	select E500
> > > +	select PPC_E500MC
> > > 
> > >  config E6500_CPU
> > >  	bool "Freescale e6500"
> > > -	depends on E500
> > > +	select E500
> > > +	select PPC_E500MC
> > These config symbols are for setting -mcpu.  Kernels built with
> > CONFIG_GENERIC_CPU should also work on e5500/e6500.
> I don't think so.

I do think so.  It's what you get when you run "make corenet64_smp_defconfig"
and that kernel works on e5500/e6500.

>  At least on QEMU it is not working because e5500/e6500 
> is based on the e500mc core and the option CONFIG_PPC_E500MC also 
> controls the cpu features (check cputable.h).

Again, this is only a problem when you have CONFIG_PPC_QEMU_E500 without
CONFIG_CORENET_GENERIC, and the fix for that is to have CONFIG_PPC_QEMU_E500
select CONFIG_E500 (and you need to manually turn on CONFIG_PPC_E500MC if
applicable, since CONFIG_PPC_QEMU_E500 can also be used with e500v2).

I wouldn't be opposed to also adding "select PPC_E500MC if PPC64" to
CONFIG_PPC_QEMU_E500.

> > 
> > The problem is that CONFIG_PPC_QEMU_E500 doesn't select E500 (I didn't
> > notice it before because usually CORENET_GENERIC is enabled as well).
> I noticed that as well, but I think it makes more sense to select 
> E500/PPC_E500MC within the cputype menu instead of having a dependency 
> which might be not clear for the user.

Again, that breaks CONFIG_GENERIC_CPU.  Unlike 32-bit, all 64-bit book3e
targets are supposed to be supportable with a single kernel image.

-Scott

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: powerpc64: Enable CONFIG_E500 and CONFIG_PPC_E500MC for e5500/e6500
  2016-09-26 23:08     ` Scott Wood
@ 2016-10-07  9:00       ` David Engraf
  2016-11-15  5:47         ` Scott Wood
  0 siblings, 1 reply; 6+ messages in thread
From: David Engraf @ 2016-10-07  9:00 UTC (permalink / raw)
  To: Scott Wood; +Cc: benh, paulus, mpe, linuxppc-dev, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 2595 bytes --]

Am 27.09.2016 um 01:08 schrieb Scott Wood:
> On Mon, 2016-09-26 at 10:48 +0200, David Engraf wrote:
>> Am 25.09.2016 um 08:20 schrieb Scott Wood:
>>>
>>> On Mon, Aug 22, 2016 at 04:46:43PM +0200, David Engraf wrote:
>>>>
>>>> The PowerPC e5500/e6500 architecture is based on the e500mc core. Enable
>>>> CONFIG_E500 and CONFIG_PPC_E500MC when e5500/e6500 is used.
>>>>
>>>> This will also fix using CONFIG_PPC_QEMU_E500 on PPC64.
>>>>
>>>> Signed-off-by: David Engraf <david.engraf@sysgo.com>
>>>> ---
>>>>  arch/powerpc/platforms/Kconfig.cputype | 6 ++++--
>>>>  1 file changed, 4 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/arch/powerpc/platforms/Kconfig.cputype
>>>> b/arch/powerpc/platforms/Kconfig.cputype
>>>> index f32edec..0382da7 100644
>>>> --- a/arch/powerpc/platforms/Kconfig.cputype
>>>> +++ b/arch/powerpc/platforms/Kconfig.cputype
>>>> @@ -125,11 +125,13 @@ config POWER8_CPU
>>>>
>>>>  config E5500_CPU
>>>>  	bool "Freescale e5500"
>>>> -	depends on E500
>>>> +	select E500
>>>> +	select PPC_E500MC
>>>>
>>>>  config E6500_CPU
>>>>  	bool "Freescale e6500"
>>>> -	depends on E500
>>>> +	select E500
>>>> +	select PPC_E500MC
>>> These config symbols are for setting -mcpu.  Kernels built with
>>> CONFIG_GENERIC_CPU should also work on e5500/e6500.
>> I don't think so.
>
> I do think so.  It's what you get when you run "make corenet64_smp_defconfig"
> and that kernel works on e5500/e6500.
>
>>  At least on QEMU it is not working because e5500/e6500
>> is based on the e500mc core and the option CONFIG_PPC_E500MC also
>> controls the cpu features (check cputable.h).
>
> Again, this is only a problem when you have CONFIG_PPC_QEMU_E500 without
> CONFIG_CORENET_GENERIC, and the fix for that is to have CONFIG_PPC_QEMU_E500
> select CONFIG_E500 (and you need to manually turn on CONFIG_PPC_E500MC if
> applicable, since CONFIG_PPC_QEMU_E500 can also be used with e500v2).
>
> I wouldn't be opposed to also adding "select PPC_E500MC if PPC64" to
> CONFIG_PPC_QEMU_E500.

Please find attached the new version, setting E500 and PPC_E500MC on 64 
bit for review.

- David

>>>
>>> The problem is that CONFIG_PPC_QEMU_E500 doesn't select E500 (I didn't
>>> notice it before because usually CORENET_GENERIC is enabled as well).
>> I noticed that as well, but I think it makes more sense to select
>> E500/PPC_E500MC within the cputype menu instead of having a dependency
>> which might be not clear for the user.
>
> Again, that breaks CONFIG_GENERIC_CPU.  Unlike 32-bit, all 64-bit book3e
> targets are supposed to be supportable with a single kernel image.
>
> -Scott
>


[-- Attachment #2: ppc.patch --]
[-- Type: text/x-diff, Size: 498 bytes --]

diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig
index df25a3e..7e18456 100644
--- a/arch/powerpc/platforms/85xx/Kconfig
+++ b/arch/powerpc/platforms/85xx/Kconfig
@@ -253,6 +253,8 @@ endif # PPC32
 config PPC_QEMU_E500
 	bool "QEMU generic e500 platform"
 	select DEFAULT_UIMAGE
+	select E500
+	select PPC_E500MC if PPC64
 	help
 	  This option enables support for running as a QEMU guest using
 	  QEMU's generic e500 machine.  This is not required if you're

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: powerpc64: Enable CONFIG_E500 and CONFIG_PPC_E500MC for e5500/e6500
  2016-10-07  9:00       ` David Engraf
@ 2016-11-15  5:47         ` Scott Wood
  0 siblings, 0 replies; 6+ messages in thread
From: Scott Wood @ 2016-11-15  5:47 UTC (permalink / raw)
  To: David Engraf; +Cc: benh, paulus, mpe, linuxppc-dev, linux-kernel

On Fri, 2016-10-07 at 11:00 +0200, David Engraf wrote:
> Am 27.09.2016 um 01:08 schrieb Scott Wood:
> > 
> > On Mon, 2016-09-26 at 10:48 +0200, David Engraf wrote:
> > > 
> > > Am 25.09.2016 um 08:20 schrieb Scott Wood:
> > > > 
> > > > 
> > > > On Mon, Aug 22, 2016 at 04:46:43PM +0200, David Engraf wrote:
> > > > > 
> > > > > 
> > > > > The PowerPC e5500/e6500 architecture is based on the e500mc core.
> > > > > Enable
> > > > > CONFIG_E500 and CONFIG_PPC_E500MC when e5500/e6500 is used.
> > > > > 
> > > > > This will also fix using CONFIG_PPC_QEMU_E500 on PPC64.
> > > > > 
> > > > > Signed-off-by: David Engraf <david.engraf@sysgo.com>
> > > > > ---
> > > > >  arch/powerpc/platforms/Kconfig.cputype | 6 ++++--
> > > > >  1 file changed, 4 insertions(+), 2 deletions(-)
> > > > > 
> > > > > diff --git a/arch/powerpc/platforms/Kconfig.cputype
> > > > > b/arch/powerpc/platforms/Kconfig.cputype
> > > > > index f32edec..0382da7 100644
> > > > > --- a/arch/powerpc/platforms/Kconfig.cputype
> > > > > +++ b/arch/powerpc/platforms/Kconfig.cputype
> > > > > @@ -125,11 +125,13 @@ config POWER8_CPU
> > > > > 
> > > > >  config E5500_CPU
> > > > >  	bool "Freescale e5500"
> > > > > -	depends on E500
> > > > > +	select E500
> > > > > +	select PPC_E500MC
> > > > > 
> > > > >  config E6500_CPU
> > > > >  	bool "Freescale e6500"
> > > > > -	depends on E500
> > > > > +	select E500
> > > > > +	select PPC_E500MC
> > > > These config symbols are for setting -mcpu.  Kernels built with
> > > > CONFIG_GENERIC_CPU should also work on e5500/e6500.
> > > I don't think so.
> > I do think so.  It's what you get when you run "make
> > corenet64_smp_defconfig"
> > and that kernel works on e5500/e6500.
> > 
> > > 
> > >  At least on QEMU it is not working because e5500/e6500
> > > is based on the e500mc core and the option CONFIG_PPC_E500MC also
> > > controls the cpu features (check cputable.h).
> > Again, this is only a problem when you have CONFIG_PPC_QEMU_E500 without
> > CONFIG_CORENET_GENERIC, and the fix for that is to have
> > CONFIG_PPC_QEMU_E500
> > select CONFIG_E500 (and you need to manually turn on CONFIG_PPC_E500MC if
> > applicable, since CONFIG_PPC_QEMU_E500 can also be used with e500v2).
> > 
> > I wouldn't be opposed to also adding "select PPC_E500MC if PPC64" to
> > CONFIG_PPC_QEMU_E500.
> Please find attached the new version, setting E500 and PPC_E500MC on 64 
> bit for review.

Could you send as a standalone patch (not an attachment) with changelog and
signoff so I can apply it?

-Scott

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-11-15  5:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-22 14:46 [PATCH] powerpc64: Enable CONFIG_E500 and CONFIG_PPC_E500MC for e5500/e6500 David Engraf
2016-09-25  6:20 ` Scott Wood
2016-09-26  8:48   ` David Engraf
2016-09-26 23:08     ` Scott Wood
2016-10-07  9:00       ` David Engraf
2016-11-15  5:47         ` Scott Wood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).