public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: 乱石 <zhangliguang@linux.alibaba.com>
To: Will Deacon <will@kernel.org>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Anshuman Khandual <anshuman.khandual@arm.com>,
	gustavoars@kernel.org, linux-kernel@vger.kernel.org,
	Mark Brown <broonie@kernel.org>,
	Vincenzo Frascino <vincenzo.frascino@arm.com>,
	Dave Martin <Dave.Martin@arm.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] arm64/cpuinfo: Show right CPU architecture information
Date: Tue, 19 Jan 2021 19:26:31 +0800	[thread overview]
Message-ID: <ff3a2f25-083c-2363-5e09-4d6acf5291e7@linux.alibaba.com> (raw)
In-Reply-To: <20210119110131.GA18433@willie-the-truck>

在 2021/1/19 19:01, Will Deacon 写道:
> On Tue, Jan 19, 2021 at 06:55:10PM +0800, Liguang Zhang wrote:
>> CPU architecture is assigned to be a fixed value, it should be obtained
>> from midr register.
>>
>> Signed-off-by: Liguang Zhang <zhangliguang@linux.alibaba.com>
>> ---
>>   arch/arm64/kernel/cpuinfo.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c
>> index 77605aec25fe..0bd11e0fe9f2 100644
>> --- a/arch/arm64/kernel/cpuinfo.c
>> +++ b/arch/arm64/kernel/cpuinfo.c
>> @@ -191,7 +191,7 @@ static int c_show(struct seq_file *m, void *v)
>>   
>>   		seq_printf(m, "CPU implementer\t: 0x%02x\n",
>>   			   MIDR_IMPLEMENTOR(midr));
>> -		seq_printf(m, "CPU architecture: 8\n");
>> +		seq_printf(m, "CPU architecture: %d\n", MIDR_ARCHITECTURE(midr));
> Huh? Won't this always return 0xf?

Hi Will,

I'm not sure. My platform return 0xf, but /proc/cpuinfo show 8. Why we 
assign a fixed

value to cpu architecture?

Regards

Liguang Zhang

>
> Will

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2021-01-19 11:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-19 10:55 [PATCH] arm64/cpuinfo: Show right CPU architecture information Liguang Zhang
2021-01-19 11:01 ` Will Deacon
2021-01-19 11:26   ` 乱石 [this message]
2021-01-19 12:32     ` Catalin Marinas

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=ff3a2f25-083c-2363-5e09-4d6acf5291e7@linux.alibaba.com \
    --to=zhangliguang@linux.alibaba.com \
    --cc=Dave.Martin@arm.com \
    --cc=anshuman.khandual@arm.com \
    --cc=broonie@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=gustavoars@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=suzuki.poulose@arm.com \
    --cc=vincenzo.frascino@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: 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