qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hw/riscv: fix build error with clang
@ 2024-11-01 17:08 Pierrick Bouvier
  2024-11-01 17:35 ` Daniel Henrique Barboza
  2024-11-04 22:23 ` Pierrick Bouvier
  0 siblings, 2 replies; 13+ messages in thread
From: Pierrick Bouvier @ 2024-11-01 17:08 UTC (permalink / raw)
  To: qemu-devel
  Cc: Cleber Rosa, qemu-riscv, Liu Zhiwei, Mahmoud Mandour,
	Alistair Francis, John Snow, Stefano Garzarella, Thomas Huth,
	Marc-André Lureau, Michael S. Tsirkin, Weiwei Li,
	Philippe Mathieu-Daudé, Konstantin Kostiuk, Pierrick Bouvier,
	Bin Meng, Paolo Bonzini, Alexandre Iooss, Michael Roth,
	Alex Bennée, Daniel P. Berrangé,
	Daniel Henrique Barboza, Palmer Dabbelt

Introduced in 0c54ac, "hw/riscv: add RISC-V IOMMU base emulation"

../hw/riscv/riscv-iommu.c:187:17: error: redefinition of '_pext_u64'

  187 | static uint64_t _pext_u64(uint64_t val, uint64_t ext)

      |                 ^

D:/a/_temp/msys64/clang64/lib/clang/18/include/bmi2intrin.h:217:1: note: previous definition is here

  217 | _pext_u64(unsigned long long __X, unsigned long long __Y)

      | ^

Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
---
 hw/riscv/riscv-iommu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/riscv/riscv-iommu.c b/hw/riscv/riscv-iommu.c
index feb650549ac..f738570bac2 100644
--- a/hw/riscv/riscv-iommu.c
+++ b/hw/riscv/riscv-iommu.c
@@ -184,7 +184,7 @@ static void riscv_iommu_pri(RISCVIOMMUState *s,
 }
 
 /* Portable implementation of pext_u64, bit-mask extraction. */
-static uint64_t _pext_u64(uint64_t val, uint64_t ext)
+static uint64_t pext_u64(uint64_t val, uint64_t ext)
 {
     uint64_t ret = 0;
     uint64_t rot = 1;
@@ -528,7 +528,7 @@ static MemTxResult riscv_iommu_msi_write(RISCVIOMMUState *s,
     int cause;
 
     /* Interrupt File Number */
-    intn = _pext_u64(PPN_DOWN(gpa), ctx->msi_addr_mask);
+    intn = pext_u64(PPN_DOWN(gpa), ctx->msi_addr_mask);
     if (intn >= 256) {
         /* Interrupt file number out of range */
         res = MEMTX_ACCESS_ERROR;
-- 
2.39.5



^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2024-11-04 22:24 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-01 17:08 [PATCH] hw/riscv: fix build error with clang Pierrick Bouvier
2024-11-01 17:35 ` Daniel Henrique Barboza
2024-11-01 17:38   ` Daniel Henrique Barboza
2024-11-01 17:48   ` Peter Maydell
2024-11-01 18:04     ` Pierrick Bouvier
2024-11-01 18:13     ` Daniel Henrique Barboza
2024-11-01 18:49       ` Peter Maydell
2024-11-01 19:23         ` Tomasz Jeznach
2024-11-01 20:46           ` Daniel Henrique Barboza
2024-11-01 20:52             ` Pierrick Bouvier
2024-11-02 13:09             ` Peter Maydell
2024-11-01 18:05   ` Pierrick Bouvier
2024-11-04 22:23 ` Pierrick Bouvier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).