[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
- To: "Orzel, Michal" <michal.orzel@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- From: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
- Date: Wed, 24 Jun 2026 11:00:44 +0200
- Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=20251104 header.d=gmail.com header.i="@gmail.com" header.h="Content-Transfer-Encoding:In-Reply-To:From:Content-Language:References:Cc:To:Subject:User-Agent:MIME-Version:Date:Message-ID"
- Cc: Romain Caritey <Romain.Caritey@xxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Delivery-date: Wed, 24 Jun 2026 09:00:58 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 6/24/26 9:02 AM, Orzel, Michal wrote:
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`.
I will apply your suggestion.
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.
Yes, I meant `handle_device`. I will update the commit message then to:
"... Arm's DOM0-related code and 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.
Agree, it should be added to Arm's device.c. I'll do that in the next
version.
@@ -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.
I will drop it than.
+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__ */
/*
Thanks.
~ Oleksii
|