aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Elisei <alexandru.elisei@arm.com>2021-07-13 18:06:28 +0100
committerWill Deacon <will@kernel.org>2021-07-16 16:02:34 +0100
commit070fb918a563f5b25902419231e595f3c98b30ae (patch)
tree71ba54142da7b2ed0edf0c6dd86ee4e6f61f84de
parent415f92c33a227c02f6719d4594af6fad10f07abf (diff)
downloadkvmtool-070fb918a563f5b25902419231e595f3c98b30ae.tar.gz
Move fdt_irq_fn typedef to fdt.h
The device tree code passes the function generate_irq_prop() to MMIO devices to create the "interrupts" property. The typedef fdt_irq_fn is the type used to pass the function to the device. It makes more sense for the typedef to be in fdt.h with the rest of the device tree functions, so move it there. Reviewed-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com> Link: https://lore.kernel.org/r/20210713170631.155595-2-alexandru.elisei@arm.com Signed-off-by: Will Deacon <will@kernel.org>
-rw-r--r--hw/rtc.c1
-rw-r--r--include/kvm/fdt.h2
-rw-r--r--include/kvm/kvm.h1
3 files changed, 3 insertions, 1 deletions
diff --git a/hw/rtc.c b/hw/rtc.c
index aec31c52..9b8785a8 100644
--- a/hw/rtc.c
+++ b/hw/rtc.c
@@ -1,5 +1,6 @@
#include "kvm/rtc.h"
+#include "kvm/fdt.h"
#include "kvm/ioport.h"
#include "kvm/kvm.h"
diff --git a/include/kvm/fdt.h b/include/kvm/fdt.h
index 4e615725..060c37b9 100644
--- a/include/kvm/fdt.h
+++ b/include/kvm/fdt.h
@@ -25,6 +25,8 @@ enum irq_type {
IRQ_TYPE_LEVEL_MASK = (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH),
};
+typedef void (*fdt_irq_fn)(void *fdt, u8 irq, enum irq_type irq_type);
+
extern char *fdt_stdout_path;
/* Helper for the various bits of code that generate FDT nodes */
diff --git a/include/kvm/kvm.h b/include/kvm/kvm.h
index 6c28afa3..56e9c8e3 100644
--- a/include/kvm/kvm.h
+++ b/include/kvm/kvm.h
@@ -44,7 +44,6 @@
struct kvm_cpu;
typedef void (*mmio_handler_fn)(struct kvm_cpu *vcpu, u64 addr, u8 *data,
u32 len, u8 is_write, void *ptr);
-typedef void (*fdt_irq_fn)(void *fdt, u8 irq, enum irq_type irq_type);
enum {
KVM_VMSTATE_RUNNING,