[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: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: "Orzel, Michal" <michal.orzel@xxxxxxx>
  • Date: Wed, 24 Jun 2026 09:02:09 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=gmail.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=tCt6VIxT4S2TXc0yorHlu1JSvwjmk9ntmAy75ZbcGSA=; b=SGe2/LCzqz+DIORMzJIconBCU5GYSEgrZHkuVFb+aOgAQrkSVQRYI79PybevgxgGwVQDIdWRFQ9HPOHYVwr3CJsmxoCn63KY2TfAEoDfk+lMxrbI5mDVsP6xeHz0f7NQy44/8ydvfdqZm+vzbBWbbu9ckV0bRWfIOgg4sg5RFn4kKddwBHpG44pJmwPUelaG0j0x64YrEu2Tt8wDx8Hw1RebsGnocEMKZQj+zJ6FbFfu/a24ThReF8ZIQi3QXgFuV/sA7zxsFZS9gDbfYOHviPYtNuRxcmZiKwGzGoP3P/teq2kIXhCDTLBOukbqwfTWmqnBN0zHFn8HkivypRDbFA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=gIhp8yO9efeAKycfEUnyYaQfAmFEX1N17cjJeU2BMs9T0rHgoDKLNMBHWPiodtSJGtGyRZL2SPC4/O4s7X8UGKY9pLP9byNrkuP0khDfFzHw9c6IX1FoQkv+BIRS/jndot/0WJAIsBbOt2kpBKuaNjInsQvMPh/Ha116EK01Pavbuf8CPQ0zwHuqk8FDEGPlsjUvN+dBlz7fONQVHu+bZdgC8xZkSauXLvY3MDN05eiLKjapHwYDiKvgbhU+OBUGUm/u1sU5zJc2xmYLmc5sQFt7O0LRvQs7hhriVPDX93aFy+nSbe6jZ7qCy3ggxoHZnF7JBtrpLaCF2rgwHx9Z+A==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=amd.com header.i="@amd.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
  • 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 07:02:55 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>


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





 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.