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

Re: [XEN][PATCH v8 09/19] xen/iommu: Move spin_lock from iommu_dt_device_is_assigned to caller


  • To: Vikram Garhwal <vikram.garhwal@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 17 Aug 2023 09:05:44 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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=3WfiQYImFNfSKDrs+lhuOJEys1uZeZoq6HHzhik/G+4=; b=BtEy4R3k4zRUhU7RpMZHUOUmJA5dV1KIFy/dXRE1WVePU8Cxl7tzg6nCsv795yvSBjZhVVPyfqke/Apec5lVnNRHeCdnuCqzBTllb+5icQ2OdaJnGUbjZIDUCnkKRDSHFT7om4uKwOs65iwgI9l5xSMO3mHy4FNtDUpOqUOWI1QU5ADgY7Kz8el96EWZgaqQTwMnC5gaB+3Nz//GD/U+PVEEQtCEsryDm8tpAad9gosDpJ58o2JSHMd9Hs4szo8pQhiHib/WoE1Aygv1LUemjvtIBfy06SGlf+RsjdtHnpilvVy8sKS1Nuz5StNiC48tyP6LRlt80ZbC/Witi7l8Jg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YUCXKIvjpYHWUXKmYJkaNSS0KbgeCAifWYXXTmYvEjxBMokSwl7/4EaG2SAvFlvdsG9b2NIuV959m2aEDxc0yKFNv0af7bFMTasPu6GKNyWRC6qNlKU7RxXdl2hX6jTcLBMfWcr9Xe8KDF+6vnGwE4NRbjWAtAU0JNKkY9Yw8kLxraVdYQqDpVrRQr69iFObLCOoIszq0EgZs+8zz5BM52xGhhEzm+uVqlfFWYGBHyXEhGe7PtiC2gB1MxlAIRKj+EwoP/msMq9dOUvt7IPADcZj4AuCS26Hn6nNrSfWs05badINP2zSuQhaMxSrdpLuISy3l+tGyqCaE1ZTT9A/cQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: michal.orzel@xxxxxxx, sstabellini@xxxxxxxxxx, Julien Grall <julien@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Thu, 17 Aug 2023 07:06:01 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 17.08.2023 02:39, Vikram Garhwal wrote:
> --- /dev/null
> +++ b/xen/include/xen/iommu-private.h

I don't think private headers should live in include/xen/. Judging from only
the patches I was Cc-ed on, ...

> @@ -0,0 +1,28 @@
> +/* SPDX-License-Identifier: GPL-2.0-only */
> +/*
> + * xen/iommu-private.h
> + */
> +#ifndef __XEN_IOMMU_PRIVATE_H__
> +#define __XEN_IOMMU_PRIVATE_H__
> +
> +#ifdef CONFIG_HAS_DEVICE_TREE
> +#include <xen/device_tree.h>
> +
> +/*
> + * Checks if dt_device_node is assigned to a domain or not. This function
> + * expects to be called with dtdevs_lock acquired by caller.
> + */
> +bool_t iommu_dt_device_is_assigned_locked(const struct dt_device_node *dev);
> +#endif

... I don't even see the need for the declaration, as the function is used
only from the file also defining it. But of course if there is a use
elsewhere (in Arm-only code, as is suggested by the description here), then
the header (under a suitable name) wants to live under drivers/passthrough/
(and of course be included only from anywhere in that sub-tree).

Jan



 


Rackspace

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