linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH ] arm64: cpuinfo: Add "model name" in /proc/cpuinfo for 64bit tasks also
@ 2016-08-29  9:02 Sumit Gupta
  2016-08-30  9:19 ` Catalin Marinas
  0 siblings, 1 reply; 4+ messages in thread
From: Sumit Gupta @ 2016-08-29  9:02 UTC (permalink / raw)
  To: catalin.marinas, linux-arm-kernel, linux-kernel
  Cc: will.deacon, suzuki.poulose, james.morse, mark.rutland, yang.shi,
	julien.grall, steve.capper, bbasu, linux-tegra, 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 <sumitg@nvidia.com>
---
 arch/arm64/kernel/cpuinfo.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c
index ed1b84fe6925..13224f533ddb 100644
--- a/arch/arm64/kernel/cpuinfo.c
+++ b/arch/arm64/kernel/cpuinfo.c
@@ -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",
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH ] arm64: cpuinfo: Add "model name" in /proc/cpuinfo for 64bit tasks also
  2016-08-29  9:02 [PATCH ] arm64: cpuinfo: Add "model name" in /proc/cpuinfo for 64bit tasks also Sumit Gupta
@ 2016-08-30  9:19 ` Catalin Marinas
  2016-08-30 10:35   ` Sumit Gupta
  0 siblings, 1 reply; 4+ messages in thread
From: Catalin Marinas @ 2016-08-30  9:19 UTC (permalink / raw)
  To: Sumit Gupta
  Cc: linux-arm-kernel, linux-kernel, mark.rutland, yang.shi,
	steve.capper, suzuki.poulose, will.deacon, julien.grall, bbasu,
	james.morse, linux-tegra

On Mon, Aug 29, 2016 at 02:32:25PM +0530, Sumit Gupta wrote:
> 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 <sumitg@nvidia.com>

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.

-- 
Catalin

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH ] arm64: cpuinfo: Add "model name" in /proc/cpuinfo for 64bit tasks also
  2016-08-30  9:19 ` Catalin Marinas
@ 2016-08-30 10:35   ` Sumit Gupta
  2016-08-30 10:52     ` Mark Rutland
  0 siblings, 1 reply; 4+ messages in thread
From: Sumit Gupta @ 2016-08-30 10:35 UTC (permalink / raw)
  To: Catalin Marinas
  Cc: linux-arm-kernel, linux-kernel, mark.rutland, yang.shi,
	steve.capper, suzuki.poulose, will.deacon, julien.grall,
	Bibek Basu, james.morse, linux-tegra

 
> On Mon, Aug 29, 2016 at 02:32:25PM +0530, Sumit Gupta wrote:
> > 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 <sumitg@nvidia.com>
> 
> 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.

> --
> Catalin

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH ] arm64: cpuinfo: Add "model name" in /proc/cpuinfo for 64bit tasks also
  2016-08-30 10:35   ` Sumit Gupta
@ 2016-08-30 10:52     ` Mark Rutland
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Rutland @ 2016-08-30 10:52 UTC (permalink / raw)
  To: Sumit Gupta
  Cc: Catalin Marinas, linux-arm-kernel, linux-kernel, yang.shi,
	steve.capper, suzuki.poulose, will.deacon, julien.grall,
	Bibek Basu, james.morse, linux-tegra

On Tue, Aug 30, 2016 at 10:35:56AM +0000, Sumit Gupta wrote:
>  
> > On Mon, Aug 29, 2016 at 02:32:25PM +0530, Sumit Gupta wrote:
> > > 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 <sumitg@nvidia.com>
> > 
> > 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.

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.

> 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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-08-30 10:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-29  9:02 [PATCH ] arm64: cpuinfo: Add "model name" in /proc/cpuinfo for 64bit tasks also Sumit Gupta
2016-08-30  9:19 ` Catalin Marinas
2016-08-30 10:35   ` Sumit Gupta
2016-08-30 10:52     ` Mark Rutland

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).