From: catalin.marinas@arm.com (Catalin Marinas)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: setup: report non-optional CPU features
Date: Tue, 28 Jan 2014 17:22:53 +0000 [thread overview]
Message-ID: <20140128172253.GD24617@arm.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1401271712340.10177@avanbrunt-dt>
On Tue, Jan 28, 2014 at 01:23:41AM +0000, Alex Van Brunt wrote:
> There are a large number of popular applications compiled for ARMv7-A that read
> /proc/cpuinfo to find out what features the CPU has.
ELF_HWCAP should work fine. Which popular applications are these?
> 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
That's not correct, the features reported are for the AArch64 mode, it
doesn't make sense to overlap the AArch32 features here. There is
COMPAT_ELF_HWCAP and the bits should be passed correctly to AArch32
binaries.
A solution would be to add a check for personality(current->personality)
== PER_LINUX32 and report cpuinfo in an AArch32 compatible way and based
on COMPAT_ELF_HWCAP.
--
Catalin
next prev parent reply other threads:[~2014-01-28 17:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-28 1:23 [PATCH] arm64: setup: report non-optional CPU features Alex Van Brunt
2014-01-28 17:22 ` Catalin Marinas [this message]
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=20140128172253.GD24617@arm.com \
--to=catalin.marinas@arm.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 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.