[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170608224059.fi4a5urcjoxhbgwb@yury-thinkpad>
Date: Fri, 9 Jun 2017 01:40:59 +0300
From: Yury Norov <ynorov@...iumnetworks.com>
To: Catalin Marinas <catalin.marinas@....com>
Cc: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-doc@...r.kernel.org, Arnd Bergmann <arnd@...db.de>,
Andrew Pinski <Andrew.Pinski@...iumnetworks.com>,
Heiko Carstens <heiko.carstens@...ibm.com>,
Chris Metcalf <cmetcalf@...hip.com>,
philipp.tomsich@...obroma-systems.com,
Joseph Myers <joseph@...esourcery.com>,
zhouchengming1@...wei.com,
Steve Ellcey <sellcey@...iumnetworks.com>,
Prasun.Kapoor@...iumnetworks.com, Andreas Schwab <schwab@...e.de>,
agraf@...e.de, szabolcs.nagy@....com, geert@...ux-m68k.org,
Adam Borowski <kilobyte@...band.pl>,
manuel.montezelo@...il.com, Chris Metcalf <cmetcalf@...lanox.com>,
Andrew Pinski <pinskia@...il.com>, linyongting@...wei.com,
klimov.linux@...il.com, broonie@...nel.org,
Bamvor Zhangjian <bamvor.zhangjian@...wei.com>,
Bamvor Jian Zhang <bamvor.zhangjian@...aro.org>,
Maxim Kuvyrkov <maxim.kuvyrkov@...aro.org>,
Florian Weimer <fweimer@...hat.com>, Nathan_Lynch@...tor.com,
Andrew Pinski <apinski@...ium.com>,
Ramana Radhakrishnan <ramana.gcc@...glemail.com>,
schwidefsky@...ibm.com, davem@...emloft.net,
christoph.muellner@...obroma-systems.com
Subject: Re: [PATCH 05/20] arm64: rename COMPAT to AARCH32_EL0 in Kconfig
Hi Catalin, thanks for review.
On Thu, Jun 08, 2017 at 03:09:12PM +0100, Catalin Marinas wrote:
> On Sun, Jun 04, 2017 at 02:59:54PM +0300, Yury Norov wrote:
> > --- a/arch/arm64/Kconfig
> > +++ b/arch/arm64/Kconfig
> > @@ -402,7 +402,7 @@ config ARM64_ERRATUM_834220
> >
> > config ARM64_ERRATUM_845719
> > bool "Cortex-A53: 845719: a load might read incorrect data"
> > - depends on COMPAT
> > + depends on AARCH32_EL0
> > default y
> > help
> > This option adds an alternative code sequence to work around ARM
> > @@ -784,7 +784,7 @@ config FORCE_MAX_ZONEORDER
> >
> > menuconfig ARMV8_DEPRECATED
> > bool "Emulate deprecated/obsolete ARMv8 instructions"
> > - depends on COMPAT
> > + depends on AARCH32_EL0
> > help
> > Legacy software support may require certain instructions
> > that have been deprecated or obsoleted in the architecture.
> > @@ -1062,9 +1062,15 @@ menu "Userspace binary formats"
> > source "fs/Kconfig.binfmt"
> >
> > config COMPAT
> > + bool
> > + depends on AARCH32_EL0
>
> You could just use "def_bool y" here
>
> > +
> > +config AARCH32_EL0
> > bool "Kernel support for 32-bit EL0"
> > + def_bool y
> > depends on ARM64_4K_PAGES || EXPERT
> > select COMPAT_BINFMT_ELF if BINFMT_ELF
> > + select COMPAT
>
> and avoid the explicit select.
in patch 20 COMPAT becomes depending also on ARM64_ILP32, like this:
- depends on AARCH32_EL0
+ depends on AARCH32_EL0 || ARM64_ILP32
So this is a preparation for it. If it looks confusing, I think it's
better to underline it in the description to the patch in addition to
this:
> From now, AARCH32_EL0 (former COMPAT) config option means the support of
> AARCH32 userspace, ARM64_ILP32 - support of ILP32 ABI (see next patches),
> and COMPAT indicates that one of them, or both, is enabled.
But if you prefer, I can do like you suggested here and make COMPAT
depend on AARCH32_EL0 in the last patch.
>
> > select HAVE_UID16
> > select OLD_SIGSUSPEND3
> > select COMPAT_OLD_SIGACTION
> [...]
> > --- a/arch/arm64/kernel/cpuinfo.c
> > +++ b/arch/arm64/kernel/cpuinfo.c
> > @@ -139,15 +139,17 @@ static int c_show(struct seq_file *m, void *v)
> > */
> > seq_puts(m, "Features\t:");
> > if (compat) {
> > -#ifdef CONFIG_COMPAT
> > - for (j = 0; compat_hwcap_str[j]; j++)
> > - if (compat_elf_hwcap & (1 << j))
> > - seq_printf(m, " %s", compat_hwcap_str[j]);
> > -
> > - for (j = 0; compat_hwcap2_str[j]; j++)
> > - if (compat_elf_hwcap2 & (1 << j))
> > - seq_printf(m, " %s", compat_hwcap2_str[j]);
> > -#endif /* CONFIG_COMPAT */
> > +#ifdef CONFIG_AARCH32_EL0
> > + if (personality(current->personality) == PER_LINUX32) {
> > + for (j = 0; compat_hwcap_str[j]; j++)
> > + if (compat_elf_hwcap & (1 << j))
> > + seq_printf(m, " %s", compat_hwcap_str[j]);
> > +
> > + for (j = 0; compat_hwcap2_str[j]; j++)
> > + if (compat_elf_hwcap2 & (1 << j))
> > + seq_printf(m, " %s", compat_hwcap2_str[j]);
> > + }
> > +#endif /* CONFIG_AARCH32_EL0 */
>
> I don't understand this hunk. Why do you need another check on
> personality? "compat" is already true if PER_LINUX32.
I think it's rebase issue. I'll fix it.
Yury
Powered by blists - more mailing lists