From: avanbrunt@nvidia.com (Alex Van Brunt)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: setup: report non-optional CPU features
Date: Mon, 27 Jan 2014 17:23:41 -0800 [thread overview]
Message-ID: <alpine.DEB.2.02.1401271712340.10177@avanbrunt-dt> (raw)
There are a large number of popular applications compiled for ARMv7-A that read
/proc/cpuinfo to find out what features the CPU has. But, when they are run
on an arm64 kernel, they fail to run. This is because features that were
optional on ARMv7 or earlier but are not optional on ARMv8-A like Thumb are not
listed as a CPU feature using the arm64 kernel. To make those applications run,
the kernel still needs to print the features in the list.
This patch changes "cat /proc/cpuinfo" from printing:
Features : fp asimd
To printing:
Features : fp asimd wp half thumb fastmult vfp edsp neon vfpv3d16 tlsi vfpv4 idiva idivt
Subject: [PATCH] arm64: setup: report non-optional CPU features
Many ARM applications read the CPU features list provided by the
kernel in /proc/cpuinfo to determine which features to use. If a
feature is not listed, the application with either run slower or will
not run at all.
CPU features that are no longer optional in ARMv8-A, but were
optional in previous architectures still need to be printed. To
achieve this, always report these features.
Change-Id: I0a8092ee07926ae5410d7863a270a76fa224297d
Signed-off-by: Alex Van Brunt <avanbrunt@nvidia.com>
---
arch/arm64/kernel/setup.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c
index bd9bbd0..7f8e9bd 100644
--- a/arch/arm64/kernel/setup.c
+++ b/arch/arm64/kernel/setup.c
@@ -302,6 +302,8 @@ static int c_show(struct seq_file *m, void *v)
for (i = 0; hwcap_str[i]; i++)
if (elf_hwcap & (1 << i))
seq_printf(m, "%s ", hwcap_str[i]);
+ /* Print non-optional features in ARMv8 */
+ seq_printf(m, "half thumb fastmult vfp neon vfpv3 vfpv4 idiva");
seq_printf(m, "\nCPU implementer\t: 0x%02x\n", read_cpuid_id() >> 24);
seq_printf(m, "CPU architecture: AArch64\n");
--
1.8.1.5
next reply other threads:[~2014-01-28 1:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-28 1:23 Alex Van Brunt [this message]
2014-01-28 17:22 ` [PATCH] arm64: setup: report non-optional CPU features Catalin Marinas
2014-01-28 17:48 ` Alexander Van Brunt
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=alpine.DEB.2.02.1401271712340.10177@avanbrunt-dt \
--to=avanbrunt@nvidia.com \
--cc=linux-arm-kernel@lists.infradead.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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox