summary refs log tree commit diff stats
path: root/include/hw/intc/loongarch_ipi.h
diff options
context:
space:
mode:
authorBibo Mao <maobibo@loongson.cn>2024-07-17 23:11:30 +0200
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2024-08-06 10:22:52 +0200
commitc403d5ff935d93ac89ff3e216428609979306cbb (patch)
treeb9b6307b32a46bfbc6e87eabd107203b48cc3954 /include/hw/intc/loongarch_ipi.h
parentec8595578fa2b526dba999c1fe0b87129f5b2c9a (diff)
downloadfocaccia-qemu-c403d5ff935d93ac89ff3e216428609979306cbb.tar.gz
focaccia-qemu-c403d5ff935d93ac89ff3e216428609979306cbb.zip
hw/intc/loongarch_ipi: Add loongarch IPI support
Loongarch IPI is added here, it inherits from class
TYPE_LOONGSON_IPI_COMMON, and two interfaces get_iocsr_as() and
cpu_by_arch_id() are added for Loongarch 3A5000 machine. It can
be used when ipi is emulated in userspace with KVM mode.

Signed-off-by: Bibo Mao <maobibo@loongson.cn>
[PMD: Rebased and simplified]
Co-Developed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Bibo Mao <maobibo@loongson.cn>
Tested-by: Bibo Mao <maobibo@loongson.cn>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Acked-by: Song Gao <gaosong@loongson.cn>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Tested-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Message-Id: <20240805180622.21001-13-philmd@linaro.org>
Diffstat (limited to 'include/hw/intc/loongarch_ipi.h')
-rw-r--r--include/hw/intc/loongarch_ipi.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/include/hw/intc/loongarch_ipi.h b/include/hw/intc/loongarch_ipi.h
new file mode 100644
index 0000000000..276b3040a3
--- /dev/null
+++ b/include/hw/intc/loongarch_ipi.h
@@ -0,0 +1,25 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/*
+ * LoongArch IPI interrupt header files
+ *
+ * Copyright (C) 2024 Loongson Technology Corporation Limited
+ */
+
+#ifndef HW_LOONGARCH_IPI_H
+#define HW_LOONGARCH_IPI_H
+
+#include "qom/object.h"
+#include "hw/intc/loongson_ipi_common.h"
+
+#define TYPE_LOONGARCH_IPI  "loongarch_ipi"
+OBJECT_DECLARE_TYPE(LoongarchIPIState, LoongarchIPIClass, LOONGARCH_IPI)
+
+struct LoongarchIPIState {
+    LoongsonIPICommonState parent_obj;
+};
+
+struct LoongarchIPIClass {
+    LoongsonIPICommonClass parent_class;
+};
+
+#endif