From: saberlily.xia@hisilicon.com (Xiaqing (A))
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: cpuinfo: add AArch64 & elf platform for app compatibility
Date: Thu, 19 May 2016 19:42:03 +0800 [thread overview]
Message-ID: <573DA68B.6030006@hisilicon.com> (raw)
In-Reply-To: <573D9DCD.8020308@arm.com>
? 2016/5/19 19:04, Robin Murphy ??:
> On 19/05/16 03:44, x00195127 wrote:
>> we find that some apps will read cpuinfo when start up,
>> they need the string as follows:
>> "Processor : AArch64 Processor rev 0 (aarch64)"
>>
>> Then thay could load the corresponding libs. But now
>> arm64 platform's cpuinfo don't has this now, so
>> we need add this.
>>
>> Signed-off-by: Qing Xia <saberlily.xia@hisilicon.com>
>> ---
>> arch/arm64/kernel/cpuinfo.c | 3 +++
>> 1 file changed, 3 insertions(+)
>>
>> diff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c
>> index 3808470..c3527ad 100644
>> --- a/arch/arm64/kernel/cpuinfo.c
>> +++ b/arch/arm64/kernel/cpuinfo.c
>> @@ -114,6 +114,9 @@ static int c_show(struct seq_file *m, void *v)
>> * online processors, looking for lines beginning with
>> * "processor". Give glibc what it expects.
>> */
>> + seq_printf(m, "Processor\t: AArch64 Processor rev %d (%s)\n",
>> + read_cpuid_id() & 15, ELF_PLATFORM);
>
> The pre-3.19 behaviour printed this once - now you're printing it for
> every CPU in the system, but all with the same revision of whichever
> core this happens to be running on, which is unjustifiably incorrect.
>
> Furthermore, this string provides virtually no useful information anyway
> - the majority of code running on AArch64 already knows that by virtue
> of the fact that *it's running at all*, and for scripts/interpreted
> code/etc. there are already appropriate mechanisms for discovering the
> platform (e.g. uname).
>
> Robin.
>
Those are 32-bit andriod apps, and according to my tests they really
need this information, although this information is already useless in
my opinion. A lot of android apps update very slowly.
>> +
>> seq_printf(m, "processor\t: %d\n", i);
>>
>> seq_printf(m, "BogoMIPS\t: %lu.%02lu\n",
>>
>
>
> .
>
prev parent reply other threads:[~2016-05-19 11:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-19 2:44 [PATCH] arm64: cpuinfo: add AArch64 & elf platform for app compatibility x00195127
2016-05-19 10:14 ` Martinez Kristofer
2016-05-19 10:49 ` Catalin Marinas
2016-05-19 11:06 ` Xiaqing (A)
2016-05-19 12:50 ` Catalin Marinas
2016-05-19 13:18 ` Catalin Marinas
2016-05-20 3:22 ` Xiaqing (A)
2016-05-20 9:55 ` Catalin Marinas
2016-05-19 11:04 ` Robin Murphy
2016-05-19 11:42 ` Xiaqing (A) [this message]
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=573DA68B.6030006@hisilicon.com \
--to=saberlily.xia@hisilicon.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;
as well as URLs for NNTP newsgroup(s).