[PATCH] target/loongarch: Remove CSR registers relative MERR

Bibo Mao posted 1 patch 2 weeks, 5 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260907024346.2992355-1-maobibo@loongson.cn
Maintainers: Song Gao <17746591750@163.com>, Bibo Mao <maobibo@loongson.cn>, Xianglai Li <lixianglai@loongson.cn>
target/loongarch/cpu.c   | 6 ------
target/loongarch/csr.c   | 6 ------
target/loongarch/disas.c | 6 ------
3 files changed, 18 deletions(-)
[PATCH] target/loongarch: Remove CSR registers relative MERR
Posted by Bibo Mao 2 weeks, 5 days ago
Registers relative with MERR are used for HW error handling, such as CPU
cache etc now both KVM and TCG do not support MERR. Remove these CSR
registers, vmstate keeps unchanged for compatibility.

Signed-off-by: Bibo Mao <maobibo@loongson.cn>
---
 target/loongarch/cpu.c   | 6 ------
 target/loongarch/csr.c   | 6 ------
 target/loongarch/disas.c | 6 ------
 3 files changed, 18 deletions(-)

diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c
index 84a130956d..9d51a0297c 100644
--- a/target/loongarch/cpu.c
+++ b/target/loongarch/cpu.c
@@ -140,12 +140,6 @@ static void loongarch_la464_init_csr(DeviceState *dev)
         }
         set_csr_flag(LOONGARCH_CSR_IMPCTL1, CSRFL_UNUSED);
         set_csr_flag(LOONGARCH_CSR_IMPCTL2, CSRFL_UNUSED);
-        set_csr_flag(LOONGARCH_CSR_MERRCTL, CSRFL_UNUSED);
-        set_csr_flag(LOONGARCH_CSR_MERRINFO1, CSRFL_UNUSED);
-        set_csr_flag(LOONGARCH_CSR_MERRINFO2, CSRFL_UNUSED);
-        set_csr_flag(LOONGARCH_CSR_MERRENTRY, CSRFL_UNUSED);
-        set_csr_flag(LOONGARCH_CSR_MERRERA, CSRFL_UNUSED);
-        set_csr_flag(LOONGARCH_CSR_MERRSAVE, CSRFL_UNUSED);
         set_csr_flag(LOONGARCH_CSR_CTAG, CSRFL_UNUSED);
 
         for (i = env->perf_event_num; i < MAX_PERF_EVENTS; i++) {
diff --git a/target/loongarch/csr.c b/target/loongarch/csr.c
index 309b826ca9..d2ac39dee9 100644
--- a/target/loongarch/csr.c
+++ b/target/loongarch/csr.c
@@ -82,12 +82,6 @@ static CSRInfo csr_info[] = {
     CSR_OFF(TLBRELO1),
     CSR_OFF(TLBREHI),
     CSR_OFF(TLBRPRMD),
-    CSR_OFF(MERRCTL),
-    CSR_OFF(MERRINFO1),
-    CSR_OFF(MERRINFO2),
-    CSR_OFF(MERRENTRY),
-    CSR_OFF(MERRERA),
-    CSR_OFF(MERRSAVE),
     CSR_OFF(CTAG),
     CSR_OFF_ARRAY(DMW, 0),
     CSR_OFF_ARRAY(DMW, 1),
diff --git a/target/loongarch/disas.c b/target/loongarch/disas.c
index 3249ab7ac6..928b8b94c2 100644
--- a/target/loongarch/disas.c
+++ b/target/loongarch/disas.c
@@ -98,12 +98,6 @@ static const char * const csr_names[] = {
     CSR_NAME(TLBRELO1),
     CSR_NAME(TLBREHI),
     CSR_NAME(TLBRPRMD),
-    CSR_NAME(MERRCTL),
-    CSR_NAME(MERRINFO1),
-    CSR_NAME(MERRINFO2),
-    CSR_NAME(MERRENTRY),
-    CSR_NAME(MERRERA),
-    CSR_NAME(MERRSAVE),
     CSR_NAME(CTAG),
     CSR_NAME(DMW(0)),
     CSR_NAME(DMW(1)),

base-commit: eb710c255642cd7dc947f25c9a06c9fc8191e98d
-- 
2.54.0