From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932629AbcHKHhN (ORCPT ); Thu, 11 Aug 2016 03:37:13 -0400 Received: from szxga04-in.huawei.com ([119.145.14.52]:39884 "EHLO szxga04-in.huawei.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S932297AbcHKHhJ (ORCPT ); Thu, 11 Aug 2016 03:37:09 -0400 Subject: Re: [PATCH 05/19] arm64: rename COMPAT to AARCH32_EL0 in Kconfig To: Yury Norov , , , , , , , References: <1466207668-10549-1-git-send-email-ynorov@caviumnetworks.com> <1466207668-10549-6-git-send-email-ynorov@caviumnetworks.com> CC: , , , , , , , , , , , , , , , , , , Andrew Pinski , Andrew Pinski , Bamvor Jian Zhang , Hanjun Guo , "Zhangjian (Bamvor)" From: "Zhangjian (Bamvor)" Message-ID: <57AC2AA5.1030808@huawei.com> Date: Thu, 11 Aug 2016 15:35:01 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <1466207668-10549-6-git-send-email-ynorov@caviumnetworks.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.111.72.170] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020204.57AC2AC6.0010,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 28d68a4bd69b2ad7dffdc91904e68346 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Yury On 2016/6/18 7:54, Yury Norov wrote: > From: Andrew Pinski > > In this patchset ILP32 ABI support is added. Additionally to AARCH32, > which is binary-compatible with ARM, ILP32 is (mostly) ABI-compatible. > > 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. > > Where needed, CONFIG_COMPAT is changed over to use CONFIG_AARCH32_EL0 instead > > Reviewed-by: David Daney > Signed-off-by: Andrew Pinski > Signed-off-by: Philipp Tomsich > Signed-off-by: Christoph Muellner > Signed-off-by: Bamvor Jian Zhang > Signed-off-by: Yury Norov ... > diff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c > index c173d32..af200a8 100644 > --- a/arch/arm64/kernel/cpuinfo.c > +++ b/arch/arm64/kernel/cpuinfo.c > @@ -134,15 +134,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 I saw that compat_hwcap_str and compat_hwcap2_str is defined when "CONFIG_COMPAT" is true. Why we only change it to CONFIG_AARCH32_EL0 in c show()? > + if (personality(current->personality) == PER_LINUX32) { And "compat" is "personality(current->personality) == PER_LINUX32;", it seems that there is no need to add this twice. Regards Bamvor > + 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 */ > } else { > for (j = 0; hwcap_str[j]; j++) > if (elf_hwcap & (1 << j))