aboutsummaryrefslogtreecommitdiff
path: root/modules/devices
diff options
context:
space:
mode:
authorzhuyaliang <15132211195@163.com>2023-02-14 16:50:54 +0800
committerL. A. F. Pereira <l@tia.mat.br>2023-02-16 09:12:16 -0800
commit6ef2348519352a4d7000bb4990c0fa1e58635185 (patch)
treed47aad259766f45bb53e40621c3a20139fded527 /modules/devices
parenta798cbaed6f1b083cc3c26dbede74cf40947d0ef (diff)
Update loongarch architecture processor information
The previous LoongArch support added in commit 56e590d was based on the kernel behavior before the official upstream merge. Stable cpuinfo: https://git.kernel.org/torvalds/c/7153c3c
Diffstat (limited to 'modules/devices')
-rw-r--r--modules/devices/loongarch64/processor.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/modules/devices/loongarch64/processor.c b/modules/devices/loongarch64/processor.c
index 979092cd..b207a9fd 100644
--- a/modules/devices/loongarch64/processor.c
+++ b/modules/devices/loongarch64/processor.c
@@ -40,9 +40,12 @@ processor_scan(void)
tmp[1] = g_strstrip(tmp[1]);
get_str("system type", processor->vendor_id);
- get_str("model name", processor->model_name);
+ get_str("CPU Family", processor->family);
+ get_str("Model Name", processor->model_name);
+ get_int("CPU Revision", processor->revision);
get_float("CPU MHz", processor->cpu_mhz);
get_float("BogoMIPS", processor->bogomips);
+ get_str("Features", processor->features);
}
g_strfreev(tmp);
}
@@ -66,16 +69,22 @@ processor_get_info(GSList *processors)
Processor *processor = (Processor *)processors->data;
return g_strdup_printf("[%s]\n"
- "%s=%s\n"
- "%s=%s\n"
+ "%s=%s\n" /* vendor */
+ "%s=%s\n" /* family */
+ "%s=%s\n" /* name */
+ "%s=%d\n" /* revision */
"%s=%.2f %s\n" /* frequency */
"%s=%.2f\n" /* bogoMIPS */
+ "%s=%s\n" /* features */
"%s=%s\n", /* byte order */
_("Processor"),
- _("Model"), processor->model_name,
_("System Type"), processor->vendor_id,
+ _("Family"), processor->family,
+ _("Model"), processor->model_name,
+ _("Revision"), processor->revision,
_("Frequency"), processor->cpu_mhz, _("MHz"),
_("BogoMIPS"), processor->bogomips,
+ _("Features"), processor->features,
_("Byte Order"), byte_order_str()
);
}