[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: Michal Orzel <michal.orzel@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Vikram Garhwal <vikram.garhwal@xxxxxxx>
  • Date: Fri, 14 Apr 2023 10:28:01 -0700
  • 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=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=x+qGWBdzemzbWug6XwXX7zGjoSLRS1maroLJGXzCB7I=; b=RYjHC7wR7FtvlSgmJLENuIUBOLPYQWOJJrBqpFtFiqR+wPJuHEIruJgyABzmgvELnEQyR7J5kbU1aNkMEx5bT8Uws5I9CjpY/A4LU/ifAW/MKRaPghs5DFVCnKHgtrHFfbqu7/EEYV2axjKPC9g0x8BB3Jm82yVZSsb2iwB04/Guuo8Fu+UUZp/Y5Zv/ge26+VO38Hp5TrgaJNkfQoB+BUeNLbtNJNRId3itYveXrGL9IS+8Pq1qEu7LL8sV6s/VUv3SXML+c1WQCQ/NHAp5PIW9Pu9L0NVHAyBYOs0v6GD7mBOncs6xyXO66Lizc1F+3yOjXBcQSrwszRKDxXV+Vw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Vh+BYD92ONCseAd15jP65tOXddlfxL6EBES9X0czPozkCzcIlbm/BR6kIvZlnPtX90eLbRL8KEyl+3LKKJaAfWzH0BorPS4WPOXSu9Hp78k6izHsDvD7SKAB2jLVJXMi5ilHifiPmOOgrSLdsiDVHvIQBUVboWBabKHFeK+q72gjJ18DTMSuT6aq/xvlhbIt4yE+V9+uOBodvO3nM60RFCC16UstAY9gL9LktdZSqo79bwr4cm14/LlRybOp3JLhv0gRvU8pdjiUHqgWmhXG7Kqa2uBTZfhX1Yiq1/R/2vmZ5Vz2671d85ELyJbgBA9NttE3N/EG25S8yKhz2PXS9A==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
  • Cc: sstabellini@xxxxxxxxxx, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Fri, 14 Apr 2023 17:28:22 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi Michal,

On 4/13/23 2:19 AM, Michal Orzel wrote:
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.
I will recheck if this is really needed.

+#include <asm/setup.h>
You should keep the alphabetical order so:
- iocap goes after init.h
- setup.h goes after device.h
Will change it.
Apart from that, it looks ok so:
Thanks!
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®.