qemu-riscv
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] target/riscv: fix user-mode build issue because mhartid


From: Víctor Colombo
Subject: Re: [PATCH] target/riscv: fix user-mode build issue because mhartid
Date: Mon, 27 Jun 2022 11:23:50 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1

On 27/06/2022 06:40, Rahul Pathak wrote:
mhartid csr is not available in user-mode code path and
user-mode build fails because of its reference in
riscv_cpu_realize function

Signed-off-by: Rahul Pathak <rpathak@ventanamicro.com>
---
  target/riscv/cpu.c | 6 ++++++
  1 file changed, 6 insertions(+)

diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c
index 0a794ef622..03f23d4b6d 100644
--- a/target/riscv/cpu.c
+++ b/target/riscv/cpu.c
@@ -643,9 +643,15 @@ static void riscv_cpu_realize(DeviceState *dev, Error 
**errp)
          if (isa_ext_is_enabled(cpu, &isa_edata_arr[i]) &&
              (env->priv_ver < isa_edata_arr[i].min_version)) {
              isa_ext_update_enabled(cpu, &isa_edata_arr[i], false);
+#ifndef CONFIG_USER_ONLY
              warn_report("disabling %s extension for hart 0x%lx because "
                          "privilege spec version does not match",
                          isa_edata_arr[i].name, (unsigned long)env->mhartid);
+#else
+            warn_report("disabling %s extension for hart 0x%lx because "
+                        "privilege spec version does not match",
+                        isa_edata_arr[i].name);

Hello, Rahul

Looks like you removed the second argument but didn't update the format
string. The second format specifier is still there.

+#endif
          }
      }

--
2.34.1



Best regards,

--
Víctor Cora Colombo
Instituto de Pesquisas ELDORADO
Aviso Legal - Disclaimer <https://www.eldorado.org.br/disclaimer.html>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]