[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] xen: move declarations of device_tree_get_{reg,u32}() to xen/device_tree.h


  • To: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: "Orzel, Michal" <michal.orzel@xxxxxxx>
  • Date: Wed, 11 Jun 2025 13:53:57 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none
  • 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=OrVLsrPx6XW4DEkM6stIzfwimKEjZr3IfOxRKjnMDoQ=; b=IIW6dUQHnY/qrkPP6kTFgts3CSjiw0x+muu+QS1PbiJ6kVoiimF1gavYefx9x8VhZf3Lom0weTe/33GV5Dwz1q+DynMLwwhtQNUBdObZrFVhqvK7YkYzo8gxY9Tee+l5YcQkRDOHSlbA4UkXjAlxC6aHcD7snZXAfYR6D46B6nmhPQsADT/XttqDcZysXhfJCq7W1K0XRfyFZ5wE6Eum/2MQ8NTEc1n8WKNrbTe5pv+bNE4dnnJTWI4vHb+9wnirbxMOg1fKAaBT4vJ98ZU6Ye6UHPfoiPMf18948YtiVS9UeZHICx9fqSbPbEpLtODGO3ebbw+zqEn1qIOA1sVPgA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=HkBGB4dgTnj+Bv68mEu+PT0ukwtxYBC4+rATIr2gXn2QlUqhEci0lGA3s6gqpJZKzg+qAh9ezXl2gYXoekdN3AUPiB4y0H2ZLpp2eemLjXrjBRt/o7MdP2+B4WrcJ1U3UMcC/DJGjVVF6AmKDsqpnbGbgLCcu7p3Kdvw7G+TeEpPWYmNrNLHo8Z/lWbl9MfK/ztPZ8Eru53q06M6D9FHR9lIOHD+MrEUkbnSwyZk+iMEiYP//eonR2V2cKsvSILdygbckHnksIjgojoIRtzyxYB7h652nXbZkLS/IXc8aScUq4Eporlm8+VeH94us0bsim0kSihxC6u/7vCGMueNgA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Wed, 11 Jun 2025 11:54:09 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>


On 11/06/2025 13:44, Oleksii Kurochko wrote:
> There is nothing Arm specific for these functions thereby it makes sense
> to move their declarations to common header: xen/device_tree.h.
I find it a bit odd that you don't mention that the definitions are already in
common and therefore the prototypes should be too. For me that's the main reason
(in fact the prototypes should have been moved together with definitions).

> 
> Signed-off-by: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
Reviewed-by: Michal Orzel <michal.orzel@xxxxxxx>

~Michal

> ---
>  xen/arch/arm/include/asm/setup.h | 6 ------
>  xen/include/xen/device_tree.h    | 6 ++++++
>  2 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/xen/arch/arm/include/asm/setup.h 
> b/xen/arch/arm/include/asm/setup.h
> index 6cf272c160..2b58549c1a 100644
> --- a/xen/arch/arm/include/asm/setup.h
> +++ b/xen/arch/arm/include/asm/setup.h
> @@ -53,12 +53,6 @@ void setup_mm(void);
>  extern uint32_t hyp_traps_vector[];
>  void init_traps(void);
>  
> -void device_tree_get_reg(const __be32 **cell, uint32_t address_cells,
> -                         uint32_t size_cells, paddr_t *start, paddr_t *size);
> -
> -u32 device_tree_get_u32(const void *fdt, int node,
> -                        const char *prop_name, u32 dflt);
> -
>  int handle_device(struct domain *d, struct dt_device_node *dev, p2m_type_t 
> p2mt,
>                    struct rangeset *iomem_ranges, struct rangeset 
> *irq_ranges);
>  
> diff --git a/xen/include/xen/device_tree.h b/xen/include/xen/device_tree.h
> index 6dc1fb5159..75017e4266 100644
> --- a/xen/include/xen/device_tree.h
> +++ b/xen/include/xen/device_tree.h
> @@ -949,6 +949,12 @@ int dt_get_pci_domain_nr(struct dt_device_node *node);
>  
>  struct dt_device_node *dt_find_node_by_phandle(dt_phandle handle);
>  
> +void device_tree_get_reg(const __be32 **cell, uint32_t address_cells,
> +                         uint32_t size_cells, paddr_t *start, paddr_t *size);
> +
> +u32 device_tree_get_u32(const void *fdt, int node,
> +                        const char *prop_name, u32 dflt);
> +
>  #ifdef CONFIG_DEVICE_TREE_DEBUG
>  #define dt_dprintk(fmt, args...)  \
>      printk(XENLOG_DEBUG fmt, ## args)




 


Rackspace

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