From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754590AbcESLoH (ORCPT ); Thu, 19 May 2016 07:44:07 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:50854 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754282AbcESLoG (ORCPT ); Thu, 19 May 2016 07:44:06 -0400 Subject: Re: [PATCH] arm64: cpuinfo: add AArch64 & elf platform for app compatibility To: Robin Murphy , , References: <1463625873-60016-1-git-send-email-saberlily.xia@hisilicon.com> <573D9DCD.8020308@arm.com> CC: , , , , From: "Xiaqing (A)" Message-ID: <573DA68B.6030006@hisilicon.com> Date: Thu, 19 May 2016 19:42:03 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <573D9DCD.8020308@arm.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.184.222.232] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020206.573DA69B.02F9,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 4ff57f005206a2384bbcfcdc69387a37 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 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 >> --- >> 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", >> > > > . >