All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masayoshi Mizuma <msys.mizuma@gmail.com>
To: Karel Zak <kzak@redhat.com>
Cc: util-linux@vger.kernel.org,
	Heiko Carstens <heiko.carstens@de.ibm.com>,
	Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>,
	Jeremy Linton <jeremy.linton@arm.com>, Cai Qian <qcai@redhat.com>
Subject: Re: new lscpu
Date: Fri, 13 Nov 2020 09:47:57 -0500	[thread overview]
Message-ID: <20201113144757.pkheoz77djpz3usy@gabell> (raw)
In-Reply-To: <20201113095352.5abeznymfp3lnvoo@ws.net.home>

Excellent job, thanks a lot!

Could you apply the following patch? That's because the build
on aarch64 machine fails.

  $ make lscpu
    CC       sys-utils/lscpu-lscpu-virt.o
  sys-utils/lscpu-virt.c: In function 'lscpu_read_virtualization':
  sys-utils/lscpu-virt.c:571:16: error: void value not ignored as it ought to be
     virt->vendor = read_hypervisor_cpuid();
                  ^
  make: *** [Makefile:11444: sys-utils/lscpu-lscpu-virt.o] Error 1
  $

---
 sys-utils/lscpu-virt.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sys-utils/lscpu-virt.c b/sys-utils/lscpu-virt.c
index 5dabe031c..527f7caa4 100644
--- a/sys-utils/lscpu-virt.c
+++ b/sys-utils/lscpu-virt.c
@@ -377,8 +377,9 @@ none:
 }
 
 #else /* ! (__x86_64__ || __i386__) */
-static void read_hypervisor_cpuid(void)
+static int read_hypervisor_cpuid(void)
 {
+	return VIRT_VENDOR_NONE;
 }
 #endif
 
-- 
2.27.0

Thanks,
Masa

On Fri, Nov 13, 2020 at 10:53:52AM +0100, Karel Zak wrote:
> 
> Hi guys,
> 
> I have merged new lscpu(1) to our master branch. Changes:
>                                       
> * code is more readable and better structured (I hope)
> 
> * data about CPU and CPU-type are maintained in separate structs
> 
> * supports multiple CPU-types (model and topology) on one system
>   (the old version reads topology only from CPU0 only)
> 
>   Example from system with A53 and A72 with different number of cores:
>                                      
>         Vendor ID:              ARM   
>           Model name:           Cortex-A53                                     
>             Model:              4     
>             Thread(s) per core: 1     
>             Core(s) per socket: 4     
>             Socket(s):          1     
>             Stepping:           r0p4  
>             CPU max MHz:        1416.0000                                      
>             CPU min MHz:        408.0000                                       
>             BogoMIPS:           48.00 
>             Flags:              fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid
>           Model name:           Cortex-A72                                     
>             Model:              2     
>             Thread(s) per core: 1     
>             Core(s) per socket: 2     
>             Socket(s):          1     
>             Stepping:           r0p2  
>             CPU max MHz:        1800.0000                                      
>             CPU min MHz:        408.0000
>             BogoMIPS:           48.00 
>             Flags:              fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid
>                                       
>                                       
> * the default output on the terminal is organized in sections to make
>   it more readable for humans, non-terminal output (>file, |grep, etc) is
>   still "flat".
>                                       
> * the output for --extended and --parse provides more columns now 
>                                       
> * it uses cache IDs as exported by new kernels; it's possible that 
>   --extended and --parse cache identifiers will not start from zero. 
>   It's an expected change.
>                                       
> * all recent ARM related changes has been merged into the new code too
>                                       
> I have /sys and /proc dumps from many systems, but it's still possible
> that the new lscpu will print non-senses in some cases. Please, test
> it on your machines, exotic or unusual systems, etc. You know ... ;-)
> Thanks!
> 
>  Karel
> 
> -- 
>  Karel Zak  <kzak@redhat.com>
>  http://karelzak.blogspot.com
> 

      reply	other threads:[~2020-11-13 14:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-13  9:53 new lscpu Karel Zak
2020-11-13 14:47 ` Masayoshi Mizuma [this message]

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=20201113144757.pkheoz77djpz3usy@gabell \
    --to=msys.mizuma@gmail.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=jeremy.linton@arm.com \
    --cc=kzak@redhat.com \
    --cc=m.mizuma@jp.fujitsu.com \
    --cc=qcai@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.