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

Re: [XEN][PATCH v5 01/17] xen/arm/device: Remove __init from function type


  • To: Vikram Garhwal <vikram.garhwal@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Thu, 13 Apr 2023 11:19:30 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org 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
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=rhId+4L7TrpgnRGi0eVPN6ygrjDhOuIpBpqxIPPVTL4=; b=nd2K3SWXZpgtIy7biFLI9suKMhmBF9vTKi8w4XOiC5XcRLHCYpnPvId6Z09fmwmeNVj0N1AyLMY7ssVeMdk8t0sPsHqrVp+jH7FbcpXblOFAAttDBhnp74tZ4ioK1s2JeH1Ugh6Lh3H5oikAshS40Pnj9fKrsg2TmQuKgxrcLDx0As0ahkFeZ7Vu/+Z/cC7ScoxXR86tymB7qAuDHQxJj+rEJg0aDXBLurEjzIn79LnmApM3u9ebAp14lq2atBrRxX1ScxHSHkU7XIto2vkQRs3O0xRxC8f7UTeiFkcOsAJgDisMf9jDFpu/18/MluMQKvnhCtI+w+FAQGTgY/cGig==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=j1uJH9teiH/Qn4AgQdU7+QbwJa6CGDjg0581Vn62iJTueGlk3B7l48xh2s2eiR0ppkb2pjNk5z+xA6u3bcIVFUsPzbCEmXczFdbOKAUl5dSz/5Gfw6J1lHGYyEWQ+o6cuopLYcmX7Ie7q9K/CEzKZ8TuzHFn0tYymdmTRJqwG01t+Kp6HdfFsnODlPKlXxK2cXi1wk7C+/CkCSciX5n9ZNST9r4xi9cXfzVaL2qSa3be3CHNjlCdUnIXVrDmicJ0Z9poWY+LZ0O8h2sqtER0+uPIEvFQ+WsVs8dz5o0jDxg+5vX/AsY5kvLGlE4B3R33R+AA/k4VEdUponkRP9Qt7g==
  • Cc: <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Thu, 13 Apr 2023 09:19:55 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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.

> +#include <asm/setup.h>
You should keep the alphabetical order so:
- iocap goes after init.h
- setup.h goes after device.h

Apart from that, it looks ok so:
Reviewed-by: Michal Orzel <michal.orzel@xxxxxxx>

~Michal




 


Rackspace

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