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

[PATCH v2] xen/arm: smmuv3: mark arm_smmu_disable_pasid __maybe_unused


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
  • Date: Tue, 13 Dec 2022 13:18:55 -0500
  • 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=LmPmK2+6Wu9pcJ1F0gBeU8LzctlkNxLzw3IfsluHrjk=; b=NU76HvOGwEh7b4ZGk/VSnZAJcfEErGfiw0Boiwe/mYq+RrHcLWMMWKVpEIpI0KToRfmpMFAbLnSD3gIg/LTiOacSMpvQi8As+BzKcRYIF0SX/SG4f37PusW7tTTk4xva1UdQzavk5hWBHQwP1HlQuWMjENn2D7muvhZ2Ed2iWeBqok2nxzH52MlEw07a+4XOBcUg2xCfAmULT3VTcGtE76/In/gKHMAAZuwbhBmArb07ZatDScVEUk6IQFJAb/LnXqh9tMYXQbd0kgu+00oD4H1TavUFNGzgSJa9FyhGXTGNzTcEEsEwjdhvJmQWuv3O3EVFSAPfsXPPR2L8L4029Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RI8VFlAqqHqimwKDuy1HuZmec6201RvgDJkMloCiuQtAq2XUR3BlPk+OARfPLcYPxbKiRuNga7H8VaWEmoUWD04myp8ot2fTNDgEXAGFM+f89GOq1XlUSp+GTqMHCCPwZKH1KMStzTvb0A3ldtXG2QBTQzYkSt0a6DyEbCWndGYVVhX9Hv4mQ1yZVTYAJGgLQ4Sf8sfNjsUZ/IFAp7hKIiZ3qaFcQVX890jjJ8ThT6V4DruotiaRO2AAaG+dxD7ItQPn+lnjcc8MI4NLvsusr0VoUyOhR3bunAEPG3VzbGnBEfy95UcmVUbbhuxf3LdQQ2ePBPhTuE5eCUe8LKw3qw==
  • Cc: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Rahul Singh <rahul.singh@xxxxxxx>, "Stefano Stabellini" <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Tue, 13 Dec 2022 18:19:20 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

When building with clang 12 and CONFIG_ARM_SMMU_V3=y, we observe the
following build error:

drivers/passthrough/arm/smmu-v3.c:1408:20: error: unused function 
'arm_smmu_disable_pasid' [-Werror,-Wunused-function]
static inline void arm_smmu_disable_pasid(struct arm_smmu_master *master) { }
                   ^

arm_smmu_disable_pasid is not currently called from anywhere in Xen, but
it is inside a section of code guarded by CONFIG_PCI_ATS, which may be
helpful in the future if the PASID feature is to be implemented. Add the
attribute __maybe_unused to the function.

Signed-off-by: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
---
v1->v2:
Add __maybe_unused attribute instead of removing
---
 xen/drivers/passthrough/arm/smmu-v3.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/xen/drivers/passthrough/arm/smmu-v3.c 
b/xen/drivers/passthrough/arm/smmu-v3.c
index 9c9f4630090e..0cdc862f96d1 100644
--- a/xen/drivers/passthrough/arm/smmu-v3.c
+++ b/xen/drivers/passthrough/arm/smmu-v3.c
@@ -1376,6 +1376,7 @@ static int arm_smmu_enable_pasid(struct arm_smmu_master 
*master)
        return 0;
 }
 
+__maybe_unused
 static void arm_smmu_disable_pasid(struct arm_smmu_master *master)
 {
        struct pci_dev *pdev;
@@ -1405,6 +1406,7 @@ static inline int arm_smmu_enable_pasid(struct 
arm_smmu_master *master)
        return 0;
 }
 
+__maybe_unused
 static inline void arm_smmu_disable_pasid(struct arm_smmu_master *master) { }
 #endif /* CONFIG_PCI_ATS */
 
-- 
2.39.0




 


Rackspace

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