Currently, little endian is only supported on powernv and pseries,
however, Kconfigs still allow us to include other platforms in a LE
kernel, this may result in space wasting or even build error if some
BE-only platforms always assume they are built for a BE kernel. So just
modify the Kconfigs of BE-only platforms to remove them from being built
for a LE kernel.
For 32bit only platforms, nothing needs to be done, because
CPU_LITTLE_ENDIAN depends on PPC64. For 64bit supported platforms, add
CPU_BIG_ENDIAN to dependencies explicitly, so that these platforms will
be disabled for LE [Suggested-by: Cédric Le Goater [off-list ref]].
Signed-off-by: Boqun Feng <redacted>
---
arch/powerpc/platforms/cell/Kconfig | 4 ++--
arch/powerpc/platforms/maple/Kconfig | 2 +-
arch/powerpc/platforms/pasemi/Kconfig | 2 +-
arch/powerpc/platforms/powermac/Kconfig | 2 +-
arch/powerpc/platforms/ps3/Kconfig | 2 +-
5 files changed, 6 insertions(+), 6 deletions(-)
We end up saying this five times.
We already have PPC_BOOK3S_64 which captures the first two conditions, should
we add a PPC_BOOK3S_64_BE which expresses it all?
cheers
We end up saying this five times.
We already have PPC_BOOK3S_64 which captures the first two conditions, should
we add a PPC_BOOK3S_64_BE which expresses it all?
I'm not sure whether this is worth.. IMO, we add a config option only if
1. we can use this config somewhere in the code, for example,
"#ifdef CONFIG_XXX"
or
2. we want to offer a option for users to choose.
PPC_BOOK3S_64_BE satisfies neither condition. Further more,
CONFIG_PPC64, CONFIG_PPC_BOOK3S and CONFIG_CPU_BIG_ENDIAN all are used
in some #ifdefs in current code. As a newbie of kernel, I'm happy to get
some knowledge like: "If I'm hacking PS3, then #ifndef CONFIG_PPC64 is
guaranteed to be false, so I can just ignore the code guarded by them".
But if we add a PPC_BOOK3S_64_BE, it will take a little more effort to
see this.
Regards,
Boqun
We end up saying this five times.
We already have PPC_BOOK3S_64 which captures the first two conditions, should
we add a PPC_BOOK3S_64_BE which expresses it all?
I'm not sure whether this is worth.. IMO, we add a config option only if
1. we can use this config somewhere in the code, for example,
"#ifdef CONFIG_XXX"
or
2. we want to offer a option for users to choose.
PPC_BOOK3S_64_BE satisfies neither condition. Further more,
CONFIG_PPC64, CONFIG_PPC_BOOK3S and CONFIG_CPU_BIG_ENDIAN all are used
in some #ifdefs in current code. As a newbie of kernel, I'm happy to get
some knowledge like: "If I'm hacking PS3, then #ifndef CONFIG_PPC64 is
guaranteed to be false, so I can just ignore the code guarded by them".
But if we add a PPC_BOOK3S_64_BE, it will take a little more effort to
see this.
Yeah those are good points, so I'll take it as is. Thanks for thinking about it :)
cheers
Ping ;-)
Regards,
Boqun
On Mon, Sep 07, 2015 at 07:58:00AM +0800, Boqun Feng wrote:
quoted hunk
Currently, little endian is only supported on powernv and pseries,
however, Kconfigs still allow us to include other platforms in a LE
kernel, this may result in space wasting or even build error if some
BE-only platforms always assume they are built for a BE kernel. So just
modify the Kconfigs of BE-only platforms to remove them from being built
for a LE kernel.
For 32bit only platforms, nothing needs to be done, because
CPU_LITTLE_ENDIAN depends on PPC64. For 64bit supported platforms, add
CPU_BIG_ENDIAN to dependencies explicitly, so that these platforms will
be disabled for LE [Suggested-by: Cédric Le Goater [off-list ref]].
Signed-off-by: Boqun Feng <redacted>
---
arch/powerpc/platforms/cell/Kconfig | 4 ++--
arch/powerpc/platforms/maple/Kconfig | 2 +-
arch/powerpc/platforms/pasemi/Kconfig | 2 +-
arch/powerpc/platforms/powermac/Kconfig | 2 +-
arch/powerpc/platforms/ps3/Kconfig | 2 +-
5 files changed, 6 insertions(+), 6 deletions(-)
From: Michael Ellerman <mpe@ellerman.id.au> Date: 2015-09-18 09:50:00
On Fri, 2015-09-18 at 08:22 +0800, Boqun Feng wrote:
Ping ;-)
Hi Boqun,
We keep track of patches in patchwork:
http://patchwork.ozlabs.org/project/linuxppc-dev/list/?submitter=67102
So your patch won't be forgotten.
I tend to start taking patches for next after rc2, which should come out on
Sunday. So I'll probably merge this patch next week, when I do you'll get an
email.
cheers
So your patch won't be forgotten.
I tend to start taking patches for next after rc2, which should come out on
Sunday. So I'll probably merge this patch next week, when I do you'll get an
email.
From: Michael Ellerman <mpe@ellerman.id.au> Date: 2015-10-02 07:48:58
On Sun, 2015-06-09 at 23:58:00 UTC, Boqun Feng wrote:
Currently, little endian is only supported on powernv and pseries,
however, Kconfigs still allow us to include other platforms in a LE
kernel, this may result in space wasting or even build error if some
BE-only platforms always assume they are built for a BE kernel. So just
modify the Kconfigs of BE-only platforms to remove them from being built
for a LE kernel.
For 32bit only platforms, nothing needs to be done, because
CPU_LITTLE_ENDIAN depends on PPC64. For 64bit supported platforms, add
CPU_BIG_ENDIAN to dependencies explicitly, so that these platforms will
be disabled for LE [Suggested-by: C��dric Le Goater [off-list ref]].
Signed-off-by: Boqun Feng <redacted>
Acked-by: Geoff Levand <geoff@infradead.org>