|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v3 01/23] xen: arm: move declaration of map_device_irqs_to_domain() to common header
On 17-Jun-26 13:17, Oleksii Kurochko wrote: > As map_device_irqs_to_domain() is used unconditionally by common part of > dom0less code it is moved to common header. `it` here reads as if you were moving the function, not the prototype. Also, use imperative mood i.e. `... code, move the prototype to a common header`. > > fdt-domain-build.h is chosen as map_device_irqs_to_domain() could be > also called indirectly in Arm's DOM0-related code. By `indirectly` do you mean `handle_device`? It can also be used in the same way by DT overlay feature. > > Signed-off-by: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx> > --- > Changes in v3: > - Add tag arm and move this patch earlier before RISC-V-related patches. > --- > Changes in v2: > - New patch. > --- > xen/arch/arm/include/asm/setup.h | 3 --- > xen/include/xen/fdt-domain-build.h | 13 +++++++++++++ > 2 files changed, 13 insertions(+), 3 deletions(-) > > diff --git a/xen/arch/arm/include/asm/setup.h > b/xen/arch/arm/include/asm/setup.h > index 0d29b46ea52b..0adfa4993a8f 100644 > --- a/xen/arch/arm/include/asm/setup.h > +++ b/xen/arch/arm/include/asm/setup.h > @@ -53,9 +53,6 @@ void init_traps(void); > int handle_device(struct domain *d, struct dt_device_node *dev, p2m_type_t > p2mt, > struct rangeset *iomem_ranges, struct rangeset > *irq_ranges); > > -int map_device_irqs_to_domain(struct domain *d, struct dt_device_node *dev, > - bool need_mapping, struct rangeset > *irq_ranges); > - > int map_irq_to_domain(struct domain *d, unsigned int irq, > bool need_mapping, const char *devname); > > diff --git a/xen/include/xen/fdt-domain-build.h > b/xen/include/xen/fdt-domain-build.h > index 671486c1c837..8612e98dfda5 100644 > --- a/xen/include/xen/fdt-domain-build.h > +++ b/xen/include/xen/fdt-domain-build.h I don't see fdt-domain-build.h being included in Arm's device.c, where the definition (that needs to see the prototype) resides. > @@ -12,6 +12,7 @@ > > struct domain; > struct page_info; > +struct rangeset; > struct membanks; > > typedef bool (*alloc_domheap_mem_cb)(struct domain *d, struct page_info *pg, > @@ -79,6 +80,18 @@ static inline void set_domain_type(struct domain *d, const > struct kernel_info *k > #endif > } > > +/* > + * Retrieves the interrupts configuration from a device tree node and maps > + * those interrupts to the target domain. > + * > + * Returns: > + * < 0 error > + * 0 success > + */ By adding the description to a prototype, there's no need for it to also exist at the definition. > +int map_device_irqs_to_domain(struct domain *d, struct dt_device_node *dev, > + bool need_mapping, > + struct rangeset *irq_ranges); > + > #endif /* __XEN_FDT_DOMAIN_BUILD_H__ */ > > /* ~Michal
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |