From 8229df2093a21b8812eeced352e3f579fd2b8053 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 22 Jan 2018 13:08:11 +0100 Subject: lscpu: move ARM decoding to lscpu-arm.c Signed-off-by: Karel Zak --- sys-utils/lscpu.c | 42 ------------------------------------------ 1 file changed, 42 deletions(-) (limited to 'sys-utils/lscpu.c') diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c index 08e5df5bc..6d1fde555 100644 --- a/sys-utils/lscpu.c +++ b/sys-utils/lscpu.c @@ -62,7 +62,6 @@ #include "optutils.h" #include "lscpu.h" -#include "lscpu-arm.h" #define CACHE_MAX 100 @@ -386,47 +385,6 @@ static void read_physical_info_powerpc( } #endif -static void -arm_cpu_decode(struct lscpu_desc *desc) -{ - int j, impl, part; - const struct id_part *parts = NULL; - char buf[8]; - if (desc->vendor == NULL || desc->model == NULL) - return; - if ((strncmp(desc->vendor,"0x",2) || - strncmp(desc->model,"0x",2) )) - return; - - impl=(int)strtol(desc->vendor, NULL, 0); - part=(int)strtol(desc->model, NULL, 0); - - for (j = 0; hw_implementer[j].id != -1; j++) { - if (hw_implementer[j].id == impl) { - parts = hw_implementer[j].parts; - desc->vendor = (char *)hw_implementer[j].name; - break; - } - } - if ( parts == NULL) - return; - - for (j = 0; parts[j].id != -1; j++) { - if (parts[j].id == part) { - desc->modelname = (char *)parts[j].name; - break; - } - } - - /* Print out the rXpY string for ARM cores */ - if (impl == 0x41 && desc->revision != NULL && - desc->stepping != NULL) { - int revision = atoi(desc->revision); - int variant = (int)strtol(desc->stepping, NULL, 0); - snprintf(buf, sizeof(buf), "r%dp%d", variant, revision ); - desc->stepping=xstrdup(buf); - } -} static void read_basicinfo(struct lscpu_desc *desc, struct lscpu_modifier *mod) -- cgit v1.2.3-55-g7522