From nobody Thu Nov 28 09:55:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass(p=quarantine dis=none) header.from=amd.com ARC-Seal: i=2; a=rsa-sha256; t=1671139626; cv=pass; d=zohomail.com; s=zohoarc; b=nZBt5QbUOCz2H6GVsNV4jDcQMK4X5bbuHypdUzz5pHzEin19icnT9zT7V1cOyZegY0sA1M3eT5LOsfbmjisrFnMs3woNAUa+YRwhBgujeyF4ViuiHk+Gl+YltdCg+Y1jBLIAKnYjZnCpcTDo7YPIdpynYZB3i62ELWMg7LhWdl0= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1671139626; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=ljuQWQEtTPReGihcK1oLWIA2nnJYgm6prEGP32L0Pmg=; b=EFOSes9EPSz7/HIfAlFQwDWBCpXs1hxy/xJv2Qewl+CCOQDpArN5ENtF4Ul+R7tqD0OzuLjMXtZwW6xFSsGIMrC954mdZgKw4lQWe2yhYgjDyaBkIHAdQZzebjwOhnWX1ss37F8ZQARoJQMOQOrMTsIKwvyeFO12pCZBnWJa2Bg= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1671139626808548.7554616952783; Thu, 15 Dec 2022 13:27:06 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.463884.722166 (Exim 4.92) (envelope-from ) id 1p5vkO-0008LW-TG; Thu, 15 Dec 2022 21:26:32 +0000 Received: by outflank-mailman (output) from mailman id 463884.722166; Thu, 15 Dec 2022 21:26:32 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1p5vkO-0008LP-QS; Thu, 15 Dec 2022 21:26:32 +0000 Received: by outflank-mailman (input) for mailman id 463884; Thu, 15 Dec 2022 21:26:31 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1p5vkM-0008LI-VQ for xen-devel@lists.xenproject.org; Thu, 15 Dec 2022 21:26:31 +0000 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2069.outbound.protection.outlook.com [40.107.94.69]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 22172d7d-7cbf-11ed-8fd3-01056ac49cbb; Thu, 15 Dec 2022 22:26:28 +0100 (CET) Received: from DS7PR03CA0100.namprd03.prod.outlook.com (2603:10b6:5:3b7::15) by IA0PR12MB8325.namprd12.prod.outlook.com (2603:10b6:208:407::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5924.12; Thu, 15 Dec 2022 21:26:24 +0000 Received: from DS1PEPF0000E642.namprd02.prod.outlook.com (2603:10b6:5:3b7:cafe::43) by DS7PR03CA0100.outlook.office365.com (2603:10b6:5:3b7::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5924.12 via Frontend Transport; Thu, 15 Dec 2022 21:26:24 +0000 Received: from SATLEXMB04.amd.com (165.204.84.17) by DS1PEPF0000E642.mail.protection.outlook.com (10.167.17.198) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5924.8 via Frontend Transport; Thu, 15 Dec 2022 21:26:23 +0000 Received: from SATLEXMB05.amd.com (10.181.40.146) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Thu, 15 Dec 2022 15:26:23 -0600 Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB05.amd.com (10.181.40.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Thu, 15 Dec 2022 15:26:22 -0600 Received: from ubuntu.mshome.net (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server id 15.1.2375.34 via Frontend Transport; Thu, 15 Dec 2022 15:26:20 -0600 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 22172d7d-7cbf-11ed-8fd3-01056ac49cbb ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aiP6j3KmeuQBWChrnEtj1rWSN+G2gjyk5OV87vaRyRoGctXjrLqtoLAqmyprM2ijW0UHBTBqIUWWuftoovuY5CwR6FeA8cwDxg+/+1naGl8ACsYuoN5Ehm7HvAQMLJQbMSKt6P2hgcolVqmAM5VG7NFZ65UBzfCDyNmBDlAgQsVazivnkxN1ffj4SY9IoujRpqMYfQAu5utVUWYxassy2nLynNsuYGD4BMHyL9981L1duf7x0KRGYYwQX9Wt49z0PrjFH3fRcoFAMJtGPGCB9Zlx0dT1WULRAnLQB/CT10IK5zvVy+KYBAVqpv8efUXMI6OcD2Plisd493BudOVcoA== 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=ljuQWQEtTPReGihcK1oLWIA2nnJYgm6prEGP32L0Pmg=; b=J6ObvvrVJz2AxdpaTne+5Af5wv+gRbDG+Fx4CODnaE0gk5O6OgdBopGPf6yWRcKjRiCQrN65QnebVB4Z63e4VAUmVdZGhJP3HLzsAi1lbZbwZozSs5Kz1eYLVizHh+8r51GOVdt9SKUnvhqIN207PgxBZ7jXvsHvcbFnUf9rZRjxcdRE8sQODKG18hYi/9Y3c6OzINvazuossCICsz5NXi4cY4GZrIeemrGliumEPkGnImllc5RvQMcQ6efmyPZXBHm3UhA+Nb1OdVgO17+CdTq3mK9tPiD+MzN8Ru1LPSCzWC0inIkz0evrG1mKvaFUih1dezTQXzN1wFB/1TQUxA== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ljuQWQEtTPReGihcK1oLWIA2nnJYgm6prEGP32L0Pmg=; b=XZbR79SSjXxeQ+55ntkHTeStY8hI6s6X9aZ1LK+Uz+qtymwfzgbPbwY0zYy3yRM85MoRL+ZE/TggPRF2Aocy3zKGr8oRLr93N2aLcX9nYEhS0gK3vdpwuhpbY4gLRy9PSXutiMTz3kbZtPwMmYXl1dNWqTZbPGq6bOEhkdc9UoI= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C From: Stewart Hildebrand To: CC: Stewart Hildebrand , Bertrand Marquis , Rahul Singh , "Stefano Stabellini" , Julien Grall , Volodymyr Babchuk Subject: [PATCH v3] xen/arm: smmuv3: mark arm_smmu_disable_pasid __maybe_unused Date: Thu, 15 Dec 2022 16:26:19 -0500 Message-ID: <20221215212619.78686-1-stewart.hildebrand@amd.com> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS1PEPF0000E642:EE_|IA0PR12MB8325:EE_ X-MS-Office365-Filtering-Correlation-Id: f5646c02-2b89-438e-3ff9-08dadee30449 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: tjpdDUPO11BCjeKkfs9pvRLLsy4Jcd0C3A7kWr86kRoIsP5dCBhBGEUXlbAE8Cjjx4HM8XEOB7+wHqZubjUFJYXqlI80F+h7MhJheOwEa0CdJviHkGy6Josx1h8WWMp+QmM+Af0wU7QIA5QyNTIkiEljvbVdA84/bkEquuNspTU0/Wx0bi5xsln0POmmdiGjTUX2QR3fsNlFUG/rUEStk96HnPFPpi+D2/k+TgY5O4vPFHe24lNt9NTL/gheSXjbuBkI4h1OFvo98GRs3W9pw1VOqzt0pxYRTQJvWmiRgQnmLeNa8bWxhcimILu+0yagUfe6tYbqTbaTVW9mprzrqTd9JhvYlx7HVod/KG/A3FM6BH3DgSW1zmnmijEX6A3VpvgFXuR4P5E7FwLcG6k43hiOjSJesPiwzsyfZ1Lcw8ZAzVPYlfZJLTmGP2Q74DrGuL8V9uUPvVFycJrKtUQGDViir72hwiRkkOqbWQOSaATJaq0LvhkrTndu9fIQYEXBgpHLjH64GhdtHebuXmeSZfI9omU6PvoilJsBktfSvHe5qMNSTzjGSESnjRcpY/UzOi9Ek264pbqbEtQ8MUeIqw1nzJ2R6lMdfhjesEMPzN9kFBGxLrDQqexY+QtY8mI5+MPFb9pvZl7OgQsgco6A0qeU8HtM5OH4FAYwcdIM3FFrHFkyqUTkEP7e0bNBHJvG+FUoeyH8JbCW4o9bqsO3R7xmub+olClcKVJSQsTko6c= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:CA;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230022)(4636009)(376002)(396003)(346002)(39860400002)(136003)(451199015)(40470700004)(46966006)(36840700001)(8676002)(8936002)(4326008)(1076003)(2616005)(36860700001)(70586007)(2906002)(70206006)(36756003)(356005)(82310400005)(186003)(81166007)(26005)(6916009)(44832011)(54906003)(40460700003)(83380400001)(316002)(336012)(40480700001)(5660300002)(47076005)(478600001)(86362001)(82740400003)(41300700001)(426003)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Dec 2022 21:26:23.6417 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f5646c02-2b89-438e-3ff9-08dadee30449 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DS1PEPF0000E642.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR12MB8325 X-ZohoMail-DKIM: pass (identity @amd.com) X-ZM-MESSAGEID: 1671139629109100001 Content-Type: text/plain; charset="utf-8" When building with clang 12 and CONFIG_ARM_SMMU_V3=3Dy, 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 Reviewed-by: Rahul Singh --- v2->v3: Place __maybe_unused after "void" and add newline after __maybe_unused Add Rahul's R-b v1->v2: Add __maybe_unused attribute instead of removing --- xen/drivers/passthrough/arm/smmu-v3.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/xen/drivers/passthrough/arm/smmu-v3.c b/xen/drivers/passthroug= h/arm/smmu-v3.c index 9c9f4630090e..d58c5cd0bf77 100644 --- a/xen/drivers/passthrough/arm/smmu-v3.c +++ b/xen/drivers/passthrough/arm/smmu-v3.c @@ -1376,7 +1376,8 @@ static int arm_smmu_enable_pasid(struct arm_smmu_mast= er *master) return 0; } =20 -static void arm_smmu_disable_pasid(struct arm_smmu_master *master) +static void __maybe_unused +arm_smmu_disable_pasid(struct arm_smmu_master *master) { struct pci_dev *pdev; =20 @@ -1405,7 +1406,8 @@ static inline int arm_smmu_enable_pasid(struct arm_sm= mu_master *master) return 0; } =20 -static inline void arm_smmu_disable_pasid(struct arm_smmu_master *master) = { } +static inline void __maybe_unused +arm_smmu_disable_pasid(struct arm_smmu_master *master) { } #endif /* CONFIG_PCI_ATS */ =20 static void arm_smmu_detach_dev(struct arm_smmu_master *master) --=20 2.39.0