arm64: cpuinfo: Add "model name" in /proc/cpuinfo for 64bit tasks also
Subsystems (2)
PATCH 1/1 arm64: cpuinfo: Add "model name" in /proc/cpuinfo for 64bit tasks also
Removed restriction of displaying model name for 32 bit tasks only. Because of this Processor details were not displayed in "System setting -> Details" in Ubuntu model name display is generic and can be printed for 64 bit also.
model name : ARMv8 Processor rev X (v8l)
--- arch/arm64/kernel/cpuinfo.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
arch/arm64/kernel/cpuinfo.c +1 -2
@@ -118,8 +118,7 @@ static int c_show(struct seq_file *m, void *v)* "processor". Give glibc what it expects. */ seq_printf (m,"processor\t: %d\n" , i); -if (compat) -seq_printf (m,"model name\t: ARMv8 Processor rev %d (%s)\n" , +seq_printf (m,"model name\t: ARMv8 Processor rev %d (%s)\n" ,MIDR_REVISION (midr),COMPAT_ELF_PLATFORM ); seq_printf(m, "BogoMIPS\t: %lu.%02lu\n",
Signature · 1 line
2.1.4
Catalin Marinas
maintainerQuoted 8 lines · Sumit Gupta
Removed restriction of displaying model name for 32 bit tasks only. Because of this Processor details were not displayed in "System setting -> Details" in Ubuntu model name display is generic and can be printed for 64 bit also.
model name : ARMv8 Processor rev X (v8l)
Signed-off-by Sumit Gupta <[email protected]>
You didn't give a reason why this is needed. For 32-bit tasks, we did it for backwards compatibility with code checking for it.
Signature · 1 line
Catalin
Quoted 7 lines · Sumit Gupta
Quoted 5 lines
Removed restriction of displaying model name for 32 bit tasks only. Because of this Processor details were not displayed in "System setting -> Details" in Ubuntu model name display is generic and can be printed for 64 bit also.
Quoted 7 lines
Quoted 3 lines
model name : ARMv8 Processor rev X (v8l)
Signed-off-by Sumit Gupta <[email protected]>You didn't give a reason why this is needed. For 32-bit tasks, we did it for backwards compatibility with code checking for it.
Within Ubuntu Home Screen "System setting -> details", processor details were coming as null. It seems those details are retrieved from "model name" in /proc/cpuinfo and because of check for 32 bit tasks only, "model name" was not getting displayed. On removing this check for model name, processor details are getting displayed in Ubuntu Home Screen.
I think model name field is general and can be displayed irrespective of compatibility. Please suggest if I am missing anything.
Quoted 2 lines
--
Catalin
Mark Rutland
reviewerQuoted 9 lines · Sumit Gupta
Quoted 9 lines · Sumit Gupta
Quoted 7 lines
Removed restriction of displaying model name for 32 bit tasks only. Because of this Processor details were not displayed in "System setting -> Details" in Ubuntu model name display is generic and can be printed for 64 bit also.
model name : ARMv8 Processor rev X (v8l)
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
Signed-off-by Sumit Gupta <[email protected]>You didn't give a reason why this is needed. For 32-bit tasks, we did it for backwards compatibility with code checking for it.
Within Ubuntu Home Screen "System setting -> details", processor details were coming as null. It seems those details are retrieved from "model name" in
/proc/cpuinfoand because of check for 32 bit tasks only, "model name" was not getting displayed.
It's worth noting that for arm64, we have never exposed a "model name" field for AArch64 tasks. i.e. the code was looking for something which did not exist to begin with.
Quoted 4 lines
On removing this check for model name, processor details are getting displayed in Ubuntu Home Screen.
I think model name field is general and can be displayed irrespective of compatibility.
The "model name" field is somewhat useless, given we cannot query a usable string from the HW. We'd deliberately chosen to not expose it, to not give the impression that we would support trying to generate a string. We do expose the decoded MIDR_EL1 fields, which we can query from the HW.
As above, this has never existed for arm64, and so 64-bit code relying on this non-existent field has never worked. It would be better to fix the code in question.
Thanks,
Mark.