public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Benoit <paul@os.amperecomputing.com>
To: Jeremy Linton <jeremy.linton@arm.com>, Karel Zak <kzak@redhat.com>
Cc: util-linux@vger.kernel.org
Subject: Re: [PATCH 2/2] lscpu-arm: Remove the "Ampere-1a" part.
Date: Fri, 7 Nov 2025 15:48:03 -0500	[thread overview]
Message-ID: <a758edc3-2d4f-4e5d-8951-8aad0c3a546a@os.amperecomputing.com> (raw)
In-Reply-To: <fb54d607-dccc-419f-b92c-7bc8514213a6@arm.com>

Thanks for your input Jeremy and Karel.

I apologize for taking so long to get back to this project.

On 7/14/2025 4:48 PM, Jeremy Linton wrote:
> On 7/14/25 7:16 AM, Karel Zak wrote:
>> On Fri, Jul 11, 2025 at 02:16:48PM -0700, Paul Benoit wrote:
>>> Remove the "Ampere-1a" part.  On newer Ampere Computing systems, the
>>> system/model name will be obtained from /sys/bus/soc/devices/soc0/ 
>>> machine,
>>> that is populated with the ARM SMC CC SOC_ID Name.
>>
>> If I understand correctly, there are old systems without
>> /sys/.../soc0/machine, right? The change will remove Ampere-1a from
>> the lscpu output. This sounds backward incompatible.
> 
> Thats a good point, but as I understand it, Ampere hasn't been happy 
> with the string that is there.
> 
> If its OK to break whatever scripts/etc might depend on it at the 
> moment, why not just update the string.

For SOCs using SMC CC compliant firmware, I do like that having lscpu
use /sys/bus/soc/devices/soc0/machine means that the name for a new
SMC SOC would be displayed without needing to update the lscpu part(s)
table.  Though, I'm concerned that the SMC CC SOC_ID Name won't always
be a direct mapping to a processor/cpu name.  Especially for a SOC that
contains a mix of BIG/little, performance/efficiency, and/or special
purpose cores.  When all the cores of a SOC are the same, then it is
probably ok to equate the SMC CC SOC_ID Name with the processor/cpu part 
name.

For SMC CC compliant SOCs, perhaps it makes more sense to have lscpu
display the /sys/bus/soc/devices/soc0/machine value as a new
"SOC_ID Name" value in a manner similar to the "BIOS Model name"?  Would
changes be required to lscpu to select such a "SOC_ID Name" field from
the lscpu command line, or would it be sufficient to only display this
SOC_ID Name field in lscpu modes where the detailed/complete
cpu/processor information is displayed?  If lscpu were to display the
/sys/bus/soc/devices/soc0/machines value as "SOC_ID Name", then the
Ampere cpus/processor names would need to continue to come from the
lscpu part(s) table. Though, The existing names in the "ampere_part"
table would still need to change.

> 
> Then invert the check so that the /sys/bus entry is preferred?

Prior to my V1 lscpu patch, when I first made some lscpu changes as a
way to test the SMC CC SOC_ID Name kernel changes, I had originally been
checking for /sys/bus/soc/devices/soc0/machine before looking for an
entry in the part(s) table.  My concern with that was for the non-SMC
SOCs, for which there was both a part(s) table entry and
/sys/bus/soc/devices/soc0/machine was set.  If the string in the part(s)
table was not the same as the /sys/bus/soc/devices/soc0/machine string,
lscpu would then be displaying a different string than it had in the
past.  That is why my V1 patch switched to using the
/sys/bus/soc/devices/soc0/machine value only if there wasn't an entry
in the part(s) table.  A way to reduce the risk, of now using
/sys/bus/soc/devices/soc0/machine instead of the part(s) table entry for
a non-SMC SOC, would be for lscpu to only use the
/sys/bus/soc/devices/soc0/machine value if the value of
/sys/devices/soc0/soc_id starts with "jep106:".
Documentation/ABI/testing/sysfs-devices-soc in the Linux kernel tree
says
     "On many of ARM based silicon with SMCCC v1.2+ compliant firmware
     this will contain the SOC ID appended to the family attribute
     to ensure there is no conflict in this namespace across various
     vendors. The format is "jep106:XXYY:ZZZZ" where XX is identity
     code, YY is continuation code and ZZZZ is the SOC ID."

A search of the Linux kernel code confirms that only
drivers/firmware/smccc/soc_id.c is generating/using the "jep106:"
string.

  parent reply	other threads:[~2025-11-07 20:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-11 21:16 [PATCH 1/2] lscpu-arm: Allow externally sourced model name Paul Benoit
2025-07-11 21:16 ` [PATCH 2/2] lscpu-arm: Remove the "Ampere-1a" part Paul Benoit
2025-07-14 12:16   ` Karel Zak
2025-07-14 20:48     ` Jeremy Linton
2025-07-14 22:22       ` Paul Benoit
2025-07-15  9:19       ` Karel Zak
2025-11-07 21:26         ` Paul Benoit
2025-11-07 20:48       ` Paul Benoit [this message]
2026-02-11 21:23         ` [PATCH v2 1/2] lscpu-arm: Include the ARM SMC CC SOC_ID name Paul Benoit
2026-02-11 21:23         ` [PATCH v2 2/2] lscpu-arm: Correct Ampere part name strings Paul Benoit
2025-07-11 22:22 ` [PATCH 1/2] lscpu-arm: Allow externally sourced model name Jeremy Linton
2025-11-07 21:45   ` Paul Benoit
2025-07-14 12:11 ` Karel Zak

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=a758edc3-2d4f-4e5d-8951-8aad0c3a546a@os.amperecomputing.com \
    --to=paul@os.amperecomputing.com \
    --cc=jeremy.linton@arm.com \
    --cc=kzak@redhat.com \
    --cc=util-linux@vger.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