[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/4] hw/intc/loongarch_ipi: Guard LoongArch only features with if
|
From: |
Jiaxun Yang |
|
Subject: |
[PATCH 2/4] hw/intc/loongarch_ipi: Guard LoongArch only features with ifdef |
|
Date: |
Sun, 21 May 2023 11:23:05 +0100 |
IOCSR based send features are tied to LoongArch's CPU implmentation,
ifdef them for LoongArch only so we can build loongarch_ipi on MIPS.
Note that Loongson-3A4000 have IOCSR as well, so we may implement
those features for MIPS in future.
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
---
hw/intc/loongarch_ipi.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/hw/intc/loongarch_ipi.c b/hw/intc/loongarch_ipi.c
index 3e453816524e..895a2ee96e1e 100644
--- a/hw/intc/loongarch_ipi.c
+++ b/hw/intc/loongarch_ipi.c
@@ -50,6 +50,7 @@ static uint64_t loongarch_ipi_readl(void *opaque, hwaddr
addr, unsigned size)
return ret;
}
+#ifdef TARGET_LOONGARCH64
static void send_ipi_data(CPULoongArchState *env, uint64_t val, hwaddr addr)
{
int i, mask = 0, data = 0;
@@ -140,6 +141,25 @@ static void any_send(uint64_t val)
env = &cpu->env;
send_ipi_data(env, val, addr);
}
+#else
+static void ipi_send(uint64_t val)
+{
+ qemu_log_mask(LOG_UNIMP, "%s: Unimplemented send 0x%" PRIx64 "\n",
+ __func__, val);
+}
+
+static void mail_send(uint64_t val)
+{
+ qemu_log_mask(LOG_UNIMP, "%s: Unimplemented send 0x%" PRIx64 "\n",
+ __func__, val);
+}
+
+static void any_send(uint64_t val)
+{
+ qemu_log_mask(LOG_UNIMP, "%s: Unimplemented send 0x%" PRIx64 "\n",
+ __func__, val);
+}
+#endif
static void loongarch_ipi_writel(void *opaque, hwaddr addr, uint64_t val,
unsigned size)
--
2.39.2 (Apple Git-143)
- [PATCH 0/4] hw/mips/loongson3_virt: Wire up loongarch_ipi device, Jiaxun Yang, 2023/05/21
- [PATCH 1/4] hw/intc/loongarch_ipi: Bring back all 4 IPI mailboxes, Jiaxun Yang, 2023/05/21
- Re: [PATCH 1/4] hw/intc/loongarch_ipi: Bring back all 4 IPI mailboxes, Huacai Chen, 2023/05/21
- Re: [PATCH 1/4] hw/intc/loongarch_ipi: Bring back all 4 IPI mailboxes, Jiaxun Yang, 2023/05/22
- Re: [PATCH 1/4] hw/intc/loongarch_ipi: Bring back all 4 IPI mailboxes, Philippe Mathieu-Daudé, 2023/05/22
- Re: [PATCH 1/4] hw/intc/loongarch_ipi: Bring back all 4 IPI mailboxes, Song Gao, 2023/05/22
- Re: [PATCH 1/4] hw/intc/loongarch_ipi: Bring back all 4 IPI mailboxes, Jiaxun Yang, 2023/05/22
- Re: [PATCH 1/4] hw/intc/loongarch_ipi: Bring back all 4 IPI mailboxes, Song Gao, 2023/05/23
- Re: [PATCH 1/4] hw/intc/loongarch_ipi: Bring back all 4 IPI mailboxes, Jiaxun Yang, 2023/05/23
- Re: [PATCH 1/4] hw/intc/loongarch_ipi: Bring back all 4 IPI mailboxes, Philippe Mathieu-Daudé, 2023/05/23
[PATCH 2/4] hw/intc/loongarch_ipi: Guard LoongArch only features with ifdef,
Jiaxun Yang <=
[PATCH 4/4] tests/avocado: Add boot_linux_console test for loongson3-virt, Jiaxun Yang, 2023/05/21
[PATCH 3/4] hw/mips/loongson3_virt: Wire up loongarch_ipi device, Jiaxun Yang, 2023/05/21