* [PATCH] arm64: Kconfig: add a choice for endianess
@ 2019-11-12 16:01 Anders Roxell
2019-11-12 16:24 ` John Garry
0 siblings, 1 reply; 3+ messages in thread
From: Anders Roxell @ 2019-11-12 16:01 UTC (permalink / raw)
To: catalin.marinas
Cc: will, john.garry, linux-arm-kernel, linux-kernel, Anders Roxell
When building allmodconfig KCONFIG_ALLCONFIG=$(pwd)/arch/arm64/configs/defconfig
CONFIG_CPU_BIG_ENDIAN gets enabled. Which tends not to be what most
people wants. Another concern that thas come up is that ACPI in't built
for an allmodconfig kernel today since that also depends on !CPU_BIG_ENDIAN.
Rework so that we introduce a 'choice' and default the choice to
CPU_LITTLE_ENDIAN. That means that when we build an allmodconfig kernel
it will default to CPU_LITTLE_ENDIAN that most people tends to want.
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
---
arch/arm64/Kconfig | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 64764ca92fca..62f83c234a61 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -877,11 +877,24 @@ config ARM64_PA_BITS
default 48 if ARM64_PA_BITS_48
default 52 if ARM64_PA_BITS_52
+choice
+ prompt "Endianess"
+ default CPU_LITTLE_ENDIAN
+ help
+ Choose what mode you plan on running your kernel in.
+
config CPU_BIG_ENDIAN
bool "Build big-endian kernel"
help
Say Y if you plan on running a kernel in big-endian mode.
+config CPU_LITTLE_ENDIAN
+ bool "Build little-endian kernel"
+ help
+ Say Y if you plan on running a kernel in little-endian mode.
+
+endchoice
+
config SCHED_MC
bool "Multi-core scheduler support"
help
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] arm64: Kconfig: add a choice for endianess
2019-11-12 16:01 [PATCH] arm64: Kconfig: add a choice for endianess Anders Roxell
@ 2019-11-12 16:24 ` John Garry
2019-11-12 17:27 ` Will Deacon
0 siblings, 1 reply; 3+ messages in thread
From: John Garry @ 2019-11-12 16:24 UTC (permalink / raw)
To: Anders Roxell, catalin.marinas; +Cc: will, linux-arm-kernel, linux-kernel
On 12/11/2019 16:01, Anders Roxell wrote:
> When building allmodconfig KCONFIG_ALLCONFIG=$(pwd)/arch/arm64/configs/defconfig
> CONFIG_CPU_BIG_ENDIAN gets enabled. Which tends not to be what most
> people wants. Another concern that thas come up is that ACPI in't built
/s/wants/want/, s/thas/has/, s/in't/isn't/
> for an allmodconfig kernel today since that also depends on !CPU_BIG_ENDIAN.
>
> Rework so that we introduce a 'choice' and default the choice to
> CPU_LITTLE_ENDIAN. That means that when we build an allmodconfig kernel
> it will default to CPU_LITTLE_ENDIAN that most people tends to want.
>
> Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
FWIW, apart from spelling mistakes:
Reviewed-by: John Garry <john.garry@huawei.com>
> ---
> arch/arm64/Kconfig | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index 64764ca92fca..62f83c234a61 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -877,11 +877,24 @@ config ARM64_PA_BITS
> default 48 if ARM64_PA_BITS_48
> default 52 if ARM64_PA_BITS_52
>
> +choice
> + prompt "Endianess"
Should this be "Endianness"?
> + default CPU_LITTLE_ENDIAN
> + help
> + Choose what mode you plan on running your kernel in.
> +
> config CPU_BIG_ENDIAN
> bool "Build big-endian kernel"
> help
> Say Y if you plan on running a kernel in big-endian mode.
>
> +config CPU_LITTLE_ENDIAN
> + bool "Build little-endian kernel"
> + help
> + Say Y if you plan on running a kernel in little-endian mode.
> +
> +endchoice
> +
> config SCHED_MC
> bool "Multi-core scheduler support"
> help
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] arm64: Kconfig: add a choice for endianess
2019-11-12 16:24 ` John Garry
@ 2019-11-12 17:27 ` Will Deacon
0 siblings, 0 replies; 3+ messages in thread
From: Will Deacon @ 2019-11-12 17:27 UTC (permalink / raw)
To: John Garry; +Cc: Anders Roxell, catalin.marinas, linux-arm-kernel, linux-kernel
On Tue, Nov 12, 2019 at 04:24:31PM +0000, John Garry wrote:
> On 12/11/2019 16:01, Anders Roxell wrote:
> > When building allmodconfig KCONFIG_ALLCONFIG=$(pwd)/arch/arm64/configs/defconfig
> > CONFIG_CPU_BIG_ENDIAN gets enabled. Which tends not to be what most
> > people wants. Another concern that thas come up is that ACPI in't built
>
> /s/wants/want/, s/thas/has/, s/in't/isn't/
>
> > for an allmodconfig kernel today since that also depends on !CPU_BIG_ENDIAN.
> >
> > Rework so that we introduce a 'choice' and default the choice to
> > CPU_LITTLE_ENDIAN. That means that when we build an allmodconfig kernel
> > it will default to CPU_LITTLE_ENDIAN that most people tends to want.
> >
> > Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
>
> FWIW, apart from spelling mistakes:
>
> Reviewed-by: John Garry <john.garry@huawei.com>
>
> > ---
> > arch/arm64/Kconfig | 13 +++++++++++++
> > 1 file changed, 13 insertions(+)
> >
> > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> > index 64764ca92fca..62f83c234a61 100644
> > --- a/arch/arm64/Kconfig
> > +++ b/arch/arm64/Kconfig
> > @@ -877,11 +877,24 @@ config ARM64_PA_BITS
> > default 48 if ARM64_PA_BITS_48
> > default 52 if ARM64_PA_BITS_52
> > +choice
> > + prompt "Endianess"
>
> Should this be "Endianness"?
>
> > + default CPU_LITTLE_ENDIAN
> > + help
> > + Choose what mode you plan on running your kernel in.
While we're at it, I'd avoid the use of "mode" here since that has a
different meaning in the architecture, although I see we already use that
terminology for CPU_BIG_ENDIAN. How about:
"Select the endianness of data accesses performed by the CPU. Userspace
applications will need to be compiled and linked for the endianness
that is selected here.
Little-endian is compatible with x86, but big-endian is faster."
(ok, maybe drop that last sentence ;)
> > config CPU_BIG_ENDIAN
> > bool "Build big-endian kernel"
> > help
> > Say Y if you plan on running a kernel in big-endian mode.
Then this can be:
"Say Y if you plan on running a kernel with a big-endian userspace."
> > +config CPU_LITTLE_ENDIAN
> > + bool "Build little-endian kernel"
> > + help
> > + Say Y if you plan on running a kernel in little-endian mode.
"Say Y if you plan on running a kernel with a little-endian userspace.
This is usually the case for distributions targetting arm64."
I think it's userspace that people really care about, so wording it in
terms of that makes most sense to me.
Will
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-11-12 17:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-12 16:01 [PATCH] arm64: Kconfig: add a choice for endianess Anders Roxell
2019-11-12 16:24 ` John Garry
2019-11-12 17:27 ` Will Deacon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox