lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bf97d10b-d5c9-46d6-c440-fc7de09c3abf@flygoat.com>
Date:   Tue, 7 Jun 2022 19:27:36 +0100
From:   Jiaxun Yang <jiaxun.yang@...goat.com>
To:     Marc Zyngier <maz@...nel.org>,
        Dragan Mladjenovic <Dragan.Mladjenovic@...mia.com>
Cc:     Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
        Chao-ying Fu <cfu@...ecomp.com>,
        Daniel Lezcano <daniel.lezcano@...aro.org>,
        Geert Uytterhoeven <geert@...ux-m68k.org>,
        Greg Ungerer <gerg@...nel.org>,
        Hauke Mehrtens <hauke@...ke-m.de>,
        Ilya Lipnitskiy <ilya.lipnitskiy@...il.com>,
        linux-kernel@...r.kernel.org, linux-mips@...r.kernel.org,
        Paul Burton <paulburton@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Serge Semin <fancer.lancer@...il.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Tiezhu Yang <yangtiezhu@...ngson.cn>
Subject: Re: [PATCH v2 11/12] MIPS: Report cluster in /proc/cpuinfo



在 2022/6/6 14:14, Marc Zyngier 写道:
> On Wed, 25 May 2022 13:10:29 +0100,
> Dragan Mladjenovic <Dragan.Mladjenovic@...mia.com> wrote:
>> From: Paul Burton <paulburton@...nel.org>
>>
>> When >= CM3.5 output cluster number.
>>
>> Signed-off-by: Paul Burton <paulburton@...nel.org>
>> Signed-off-by: Dragan Mladjenovic <dragan.mladjenovic@...mia.com>
>>
>> diff --git a/arch/mips/kernel/proc.c b/arch/mips/kernel/proc.c
>> index bb43bf850314..a66e7705315d 100644
>> --- a/arch/mips/kernel/proc.c
>> +++ b/arch/mips/kernel/proc.c
>> @@ -12,6 +12,7 @@
>>   #include <asm/cpu.h>
>>   #include <asm/cpu-features.h>
>>   #include <asm/idle.h>
>> +#include <asm/mips-cps.h>
>>   #include <asm/mipsregs.h>
>>   #include <asm/processor.h>
>>   #include <asm/prom.h>
>> @@ -282,6 +283,8 @@ static int show_cpuinfo(struct seq_file *m, void *v)
>>   	seq_printf(m, "kscratch registers\t: %d\n",
>>   		      hweight8(cpu_data[n].kscratch_mask));
>>   	seq_printf(m, "package\t\t\t: %d\n", cpu_data[n].package);
>> +	if (mips_cm_revision() >= CM_REV_CM3_5)
>> +		seq_printf(m, "cluster\t\t\t: %d\n", cpu_cluster(&cpu_data[n]));
>>   	seq_printf(m, "core\t\t\t: %d\n", cpu_core(&cpu_data[n]));
>>   
>>   #if defined(CONFIG_MIPS_MT_SMP) || defined(CONFIG_CPU_MIPSR6)
> This will break userspace. Please don't do that.
Hmm, userspace always parse cpuinfo line by line so I guess it won't be
a problem if we add a new line here.

We accumulated some new additions to cpuinfo in past years and there
was never a single complain for that.

Though I don't like the idea of using CM version to switch on the cluster
display....

Thanks
- Jiaxun

>
> 	M.
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ