Hi Vikram,
On 11/04/2023 21:16, Vikram Garhwal wrote:
Remove __init from following function to access during runtime:
1. map_irq_to_domain()
2. handle_device_interrupt()
s/interrupt/interrupts/ since there is no handle_device_interrupt() function.
3. map_range_to_domain()
4. unflatten_dt_node()
5. unflatten_device_tree()
Move map_irq_to_domain() prototype from domain_build.h to setup.h.
To avoid the breaking the build, following changes are also done:
'avoid breaking' instead of 'avoid the breaking'.
1. Move map_irq_to_domain(), handle_device_interrupt() and
map_range_to_domain() to
s/interrupt/interrupts/
device.c. After removing __init type, these functions are not specific to
domain building, so moving them out of domain_build.c to device.c.
2. Remove static type from handle_device_interrupt().
Overall, these changes are done to support the dynamic programming of a nodes
where an overlay node will be added to fdt and unflattened node will be added to
dt_host. Furthermore, IRQ and mmio mapping will be done for the added node.
Signed-off-by: Vikram Garhwal <vikram.garhwal@xxxxxxx>
---
xen/arch/arm/device.c | 145 ++++++++++++++++++++++++
xen/arch/arm/domain_build.c | 142 -----------------------
xen/arch/arm/include/asm/domain_build.h | 2 -
xen/arch/arm/include/asm/setup.h | 6 +
xen/common/device_tree.c | 16 +--
5 files changed, 159 insertions(+), 152 deletions(-)
diff --git a/xen/arch/arm/device.c b/xen/arch/arm/device.c
index ca8539dee5..fec6e29c42 100644
--- a/xen/arch/arm/device.c
+++ b/xen/arch/arm/device.c
@@ -12,6 +12,9 @@
#include <xen/errno.h>
#include <xen/init.h>
#include <xen/lib.h>
+#include <xen/iocap.h>
+#include <asm/domain_build.h>
I can't see why do we need to include this header.