Commit Graph

61 Commits

Author SHA1 Message Date
Karel Zak 5a6da72c42 lscpu: add lscpu_read_extra()
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-11-13 09:19:02 +01:00
Karel Zak 551f2b4dc9 lscpu: add lscpu_read_cpulists()
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-11-13 09:19:02 +01:00
Karel Zak d34b7f1b82 lscpu: add lscpu_read_architecture()
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-11-13 09:19:02 +01:00
Karel Zak d234a38101 lscpu: (cputype) simplify cpuinfo parsing
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-11-13 09:19:02 +01:00
Karel Zak 855bab2a2e lscpu: add lscpu_cpu to internal API
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-11-13 09:19:02 +01:00
Karel Zak 7079f4662c lscpu: (cputype) move temporary stuff
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-11-13 09:19:02 +01:00
Karel Zak cbf8f1297b lscpu: (cputype) add header file, cleanup patterns code
* move structs definitions to header file
* define set of /proc/cpuinfo parsing patterns for cpu-type and for
  CPUs

Signed-off-by: Karel Zak <kzak@redhat.com>
2020-11-13 09:19:02 +01:00
Karel Zak 329ec35ff0 lscpu: (cputype) add cpuinfo parser
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-11-13 09:19:02 +01:00
Karel Zak 71464ded30 lscpu: (cputype) add ref-counting, allocate context
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-11-13 09:19:02 +01:00
Karel Zak 450cb0b724 lscpu: (cputype) add debug stuff
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-11-13 09:19:02 +01:00
Karel Zak 405d51edf4 lscpu: add very basic cputype code
The current lscpu assumes that all CPUs in the system are the same.
Unfortunately this is not true. We need to split all internal CPUs
descriptions to CPU-type and CPU.

This patch add lscpu-cputype.c where will be CPU-type description --
mostly based on /proc/cpuinfo.

Signed-off-by: Karel Zak <kzak@redhat.com>
2020-11-13 09:19:02 +01:00