From: Anshuman Khandual <anshuman.khandual@arm.com> To: Will Deacon <will@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com>, Suzuki K Poulose <suzuki.poulose@arm.com>, Catalin Marinas <catalin.marinas@arm.com>, linux-kernel@vger.kernel.org, Ard Biesheuvel <ardb@kernel.org>, Mark Brown <broonie@kernel.org>, Dave Martin <Dave.Martin@arm.com>, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH V2] arm64/cpuinfo: Move HWCAP name arrays alongside their bit definitions Date: Wed, 20 May 2020 05:57:52 +0530 [thread overview] Message-ID: <f3f3836c-42bb-9745-88ee-a6fe6f653cc5@arm.com> (raw) In-Reply-To: <20200518223506.GA5866@willie-the-truck> On 05/19/2020 04:05 AM, Will Deacon wrote: > On Fri, May 15, 2020 at 08:58:05AM +0530, Anshuman Khandual wrote: >> On 05/14/2020 01:06 PM, Will Deacon wrote: >>> Why is it a change? We've never reported e.g. "java" on an arm64 kernel, so >> >> We already have "java" defined in existing compat_hwcap_str[] array even >> though it might never get set in compat_elf_hwcap. AFAICS, compat_elf_hwcap >> will have the following capabilities set (at the most). >> >> Via COMPAT_ELF_HWCAP_DEFAULT >> >> 01. COMPAT_HWCAP_HALF >> 02. COMPAT_HWCAP_THUMB >> 03. COMPAT_HWCAP_FAST_MULT >> 04. COMPAT_HWCAP_EDSP >> 05. COMPAT_HWCAP_TLS >> 06. COMPAT_HWCAP_IDIV >> 07. COMPAT_HWCAP_LPAE >> >> Via setup_elf_hwcaps(compat_elf_hwcaps) <-- setup_cpu_features() >> >> 8. COMPAT_HWCAP_NEON >> 9. COMPAT_HWCAP_VFPv4 >> 10. COMPAT_HWCAP_VFP >> 11. COMPAT_HWCAP_VFPv3 >> >> Via arch_timer_set_evtstrm_feature() >> >> 12. COMPAT_HWCAP_EVTSTRM >> >> The code exists for "java" string to be displayed with /proc/cpuinfo but it >> may never get triggered as compat_elf_hwcap will never have JAVA capability >> unless there is a bug as you had rightly mentioned. > > Fair enough, but applying this patch causes a *tonne* of warnings from > aiaiai: > > +In file included from arch/arm64/include/asm/cpufeature.h:11, > + from arch/arm64/include/asm/ptrace.h:11, > + from arch/arm64/include/asm/irqflags.h:10, > + from include/linux/irqflags.h:16, > + from include/linux/spinlock.h:54, > + from include/linux/seqlock.h:36, > + from include/linux/time.h:6, > + from arch/arm64/include/asm/stat.h:12, > + from include/linux/stat.h:6, > + from include/linux/module.h:13, > + from drivers/media/rc/keymaps/rc-imon-mce.mod.c:1: > +arch/arm64/include/asm/hwcap.h:189:26: warning: ‘compat_hwcap2_str’ defined but not used [-Wunused-const-variable=] > + 189 | static const char *const compat_hwcap2_str[] = { > + | ^~~~~~~~~~~~~~~~~ Native default build (defconfig) on arm64 does not throw this warning. I guess this came up with 'make W=n' or something. Anyways if this is indeed an issue, we will have to add in helpers for each HWCAP arrays which will fetch a feature string on index value to be used in c_show (arch/arm64/kernel/cpuinfo.c). I wanted to avoid this to reduce code. > > so I'm dropping this for now. Sure, will respin this later probably after 5.8-rc1.
WARNING: multiple messages have this Message-ID (diff)
From: Anshuman Khandual <anshuman.khandual@arm.com> To: Will Deacon <will@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com>, Suzuki K Poulose <suzuki.poulose@arm.com>, Catalin Marinas <catalin.marinas@arm.com>, linux-kernel@vger.kernel.org, Dave Martin <Dave.Martin@arm.com>, Mark Brown <broonie@kernel.org>, Ard Biesheuvel <ardb@kernel.org>, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH V2] arm64/cpuinfo: Move HWCAP name arrays alongside their bit definitions Date: Wed, 20 May 2020 05:57:52 +0530 [thread overview] Message-ID: <f3f3836c-42bb-9745-88ee-a6fe6f653cc5@arm.com> (raw) In-Reply-To: <20200518223506.GA5866@willie-the-truck> On 05/19/2020 04:05 AM, Will Deacon wrote: > On Fri, May 15, 2020 at 08:58:05AM +0530, Anshuman Khandual wrote: >> On 05/14/2020 01:06 PM, Will Deacon wrote: >>> Why is it a change? We've never reported e.g. "java" on an arm64 kernel, so >> >> We already have "java" defined in existing compat_hwcap_str[] array even >> though it might never get set in compat_elf_hwcap. AFAICS, compat_elf_hwcap >> will have the following capabilities set (at the most). >> >> Via COMPAT_ELF_HWCAP_DEFAULT >> >> 01. COMPAT_HWCAP_HALF >> 02. COMPAT_HWCAP_THUMB >> 03. COMPAT_HWCAP_FAST_MULT >> 04. COMPAT_HWCAP_EDSP >> 05. COMPAT_HWCAP_TLS >> 06. COMPAT_HWCAP_IDIV >> 07. COMPAT_HWCAP_LPAE >> >> Via setup_elf_hwcaps(compat_elf_hwcaps) <-- setup_cpu_features() >> >> 8. COMPAT_HWCAP_NEON >> 9. COMPAT_HWCAP_VFPv4 >> 10. COMPAT_HWCAP_VFP >> 11. COMPAT_HWCAP_VFPv3 >> >> Via arch_timer_set_evtstrm_feature() >> >> 12. COMPAT_HWCAP_EVTSTRM >> >> The code exists for "java" string to be displayed with /proc/cpuinfo but it >> may never get triggered as compat_elf_hwcap will never have JAVA capability >> unless there is a bug as you had rightly mentioned. > > Fair enough, but applying this patch causes a *tonne* of warnings from > aiaiai: > > +In file included from arch/arm64/include/asm/cpufeature.h:11, > + from arch/arm64/include/asm/ptrace.h:11, > + from arch/arm64/include/asm/irqflags.h:10, > + from include/linux/irqflags.h:16, > + from include/linux/spinlock.h:54, > + from include/linux/seqlock.h:36, > + from include/linux/time.h:6, > + from arch/arm64/include/asm/stat.h:12, > + from include/linux/stat.h:6, > + from include/linux/module.h:13, > + from drivers/media/rc/keymaps/rc-imon-mce.mod.c:1: > +arch/arm64/include/asm/hwcap.h:189:26: warning: ‘compat_hwcap2_str’ defined but not used [-Wunused-const-variable=] > + 189 | static const char *const compat_hwcap2_str[] = { > + | ^~~~~~~~~~~~~~~~~ Native default build (defconfig) on arm64 does not throw this warning. I guess this came up with 'make W=n' or something. Anyways if this is indeed an issue, we will have to add in helpers for each HWCAP arrays which will fetch a feature string on index value to be used in c_show (arch/arm64/kernel/cpuinfo.c). I wanted to avoid this to reduce code. > > so I'm dropping this for now. Sure, will respin this later probably after 5.8-rc1. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-05-20 0:28 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-05-07 13:29 [PATCH V2] arm64/cpuinfo: Move HWCAP name arrays alongside their bit definitions Anshuman Khandual 2020-05-07 13:29 ` Anshuman Khandual 2020-05-13 15:04 ` Dave Martin 2020-05-13 15:04 ` Dave Martin 2020-05-14 1:44 ` Anshuman Khandual 2020-05-14 1:44 ` Anshuman Khandual 2020-05-14 7:36 ` Will Deacon 2020-05-14 7:36 ` Will Deacon 2020-05-15 3:28 ` Anshuman Khandual 2020-05-15 3:28 ` Anshuman Khandual 2020-05-18 22:35 ` Will Deacon 2020-05-18 22:35 ` Will Deacon 2020-05-20 0:27 ` Anshuman Khandual [this message] 2020-05-20 0:27 ` Anshuman Khandual
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=f3f3836c-42bb-9745-88ee-a6fe6f653cc5@arm.com \ --to=anshuman.khandual@arm.com \ --cc=Dave.Martin@arm.com \ --cc=ardb@kernel.org \ --cc=broonie@kernel.org \ --cc=catalin.marinas@arm.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=mark.rutland@arm.com \ --cc=suzuki.poulose@arm.com \ --cc=will@kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.