Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1740627

Re: [PATCH 1/3] arm64: cpuinfo: add MPIDR value to /proc/cpuinfo

From Mark Rutland <mark.rutland@arm.com>
Newsgroups linux.kernel
Subject Re: [PATCH 1/3] arm64: cpuinfo: add MPIDR value to /proc/cpuinfo
Date 2017-09-27 13:40 +0200
Message-ID <uuiR3-1LQ-3@gated-at.bofh.it> (permalink)
References <uu6wx-2em-3@gated-at.bofh.it> <uu6wx-2em-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Sep 26, 2017 at 04:23:22PM -0600, Al Stone wrote:
> When displaying cpuinfo on an arm64 system, include the MPIDR register
> value which can be used to understand the CPU topology on a platform.
> This can serve as a cross-check to the information provided in sysfs,
> and has been useful in understanding CPU and NUMA allocation issues.

As mentioend in the cover letter, NAK to modifiying /proc/cpuinfo.

However, I do think that we could expose this elsewhere in a structured
way.

For debugging bringup issues, I think we can update our secondary
bringup messages in dmesg to log the MPIDR (as we do for the boot CPU).
I'll send a patch for that.

> @@ -159,6 +160,12 @@ static int c_show(struct seq_file *m, void *v)
>  		}
>  		seq_puts(m, "\n");
>  
> +		seq_printf(m, "CPU MPIDR\t: 0x%016llx ", mpidr);
> +		seq_printf(m, "(Aff3 %d Aff2 %d Aff1 %d Aff0 %d)\n",
> +			   (u8) MPIDR_AFFINITY_LEVEL(mpidr, 3),
> +			   (u8) MPIDR_AFFINITY_LEVEL(mpidr, 2),
> +			   (u8) MPIDR_AFFINITY_LEVEL(mpidr, 1),
> +			   (u8) MPIDR_AFFINITY_LEVEL(mpidr, 0));

Please don't decode the register like this. We're stuck doing it with
the MIDR for historical reasons, but we shouldn't do it for new
registers.

It's possible (and I suspect likely) that MPIDR will gain more fields in
future, and it creates futher ABI problems (e.g. adding them might break
applications).

If we're going to expose this, we should expose the raw value under
sysfs. Users who require this information will know how to decode it.

Thanks,
Mark.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/3] arm64: cpuinfo: make /proc/cpuinfo more human-readable Al Stone <ahs3@redhat.com> - 2017-09-27 00:30 +0200
  [PATCH 1/3] arm64: cpuinfo: add MPIDR value to /proc/cpuinfo Al Stone <ahs3@redhat.com> - 2017-09-27 00:30 +0200
    Re: [PATCH 1/3] arm64: cpuinfo: add MPIDR value to /proc/cpuinfo Mark Rutland <mark.rutland@arm.com> - 2017-09-27 13:40 +0200
  [PATCH 3/3] arm64: cpuinfo: display product info in /proc/cpuinfo Al Stone <ahs3@redhat.com> - 2017-09-27 00:30 +0200
    Re: [PATCH 3/3] arm64: cpuinfo: display product info in /proc/cpuinfo Florian Fainelli <f.fainelli@gmail.com> - 2017-09-27 02:50 +0200
    Re: [PATCH 3/3] arm64: cpuinfo: display product info in /proc/cpuinfo Robin Murphy <robin.murphy@arm.com> - 2017-09-27 12:50 +0200
      Re: [PATCH 3/3] arm64: cpuinfo: display product info in /proc/cpuinfo Mark Rutland <mark.rutland@arm.com> - 2017-09-27 15:50 +0200
    Re: [PATCH 3/3] arm64: cpuinfo: display product info in /proc/cpuinfo Mark Rutland <mark.rutland@arm.com> - 2017-09-27 13:40 +0200
  [PATCH 2/3] arm64: cpuinfo: add human readable CPU names to /proc/cpuinfo Al Stone <ahs3@redhat.com> - 2017-09-27 00:30 +0200
    Re: [PATCH 2/3] arm64: cpuinfo: add human readable CPU names to  /proc/cpuinfo Robin Murphy <robin.murphy@arm.com> - 2017-09-27 12:40 +0200
    Re: [PATCH 2/3] arm64: cpuinfo: add human readable CPU names to  /proc/cpuinfo Mark Rutland <mark.rutland@arm.com> - 2017-09-27 13:30 +0200
  Re: [PATCH 0/3] arm64: cpuinfo: make /proc/cpuinfo more  human-readable Mark Rutland <mark.rutland@arm.com> - 2017-09-27 12:40 +0200

csiph-web