[PATCH RFC] arm64: improve display about CPU architecture in cpuinfo

Robin Murphy robin.murphy at arm.com
Mon Mar 7 08:48:51 PST 2022


On 07/03/2022 12:23 pm, Marc Zyngier wrote:
> On Mon, 07 Mar 2022 12:13:50 +0000,
> Rongwei Wang <rongwei.wang at linux.alibaba.com> wrote:
>>
>>
>>
>> On 3/7/22 4:45 PM, Marc Zyngier wrote:
>>> On Mon, 07 Mar 2022 03:04:17 +0000,
>>> Rongwei Wang <rongwei.wang at linux.alibaba.com> wrote:
>>>>
>>>> Now, it is unsuitable for both ARMv8 and ARMv9 to show a
>>>> fixed string "CPU architecture: 8" in /proc/cpuinfo.
>>>
>>> Please read the various threads that have been going on over the past
>>> 10+ years about *why* we don't allow this sort of change (TL;DR: it
>>> breaks userspace, and we don't do that).
>>>
>>> Also, there is no material difference between v8 and v9 that would be
>>> observable from userspace outside of the "Features:" line. And if that
>>> doesn't convince you, just think of '8' as the number of bytes
>>> used by
> 
>> I got your point. It seems that we can regard '8' as the number of
>> bytes. But what make me do this is that 'CPU architecture: 8' is
>> confusing, especially those responsible for testing.
>> And I believe that most people regard this '8' as ARMv8, maybe not.
> 
> That was the original intention. But given that there is no userspace
> visible difference between v8, v9 and  whatever comes after it, this
> is a pointless change. My comment about the size of a VA was just a
> joke, and not something to be taken seriously.
> 
>> In fact, I'm not sure it has potential ABI implications, so seek your
>> advice.
> 
> Plenty of userspace programs parse /proc/cpuinfo. If you replace '8'
> with anything else, they will fail. Which is why although your patch
> makes sense, it comes 10 years too late, and we can't change this
> anymore.

And arguably it's not even too late, because 10 years ago this *did* say 
"AArch64". I don't remember all the exact details behind commit 
44b82b7700d0 ("arm64: Fix up /proc/cpuinfo") - this just tickled enough 
of a memory to go and look up the git history - but I don't think we 
changed any of those fields without a real reason.

Robin.



More information about the linux-arm-kernel mailing list