Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp1159024lqb; Thu, 30 May 2024 01:54:22 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX9J4+RaBKy1sJaVUSdqdO4tDSsnljw5gnMZKK0QVriQBk/ME4nrzVP6gwJv3+rLTrlVa0dFc73SdzLJrYaSJ2mZ71HN+glgOUJg4puUA== X-Google-Smtp-Source: AGHT+IHbEWqbWtvxS6JhMpQecVBtUuKDmouQnyydzINx6ciN7yrCnKSUvcz61M6JqoP4vbHxPKG2 X-Received: by 2002:a17:902:d4d1:b0:1f6:f05:3189 with SMTP id d9443c01a7336-1f619610f4dmr13848185ad.40.1717059262354; Thu, 30 May 2024 01:54:22 -0700 (PDT) Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f60c14b94esi16780075ad.625.2024.05.30.01.54.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 01:54:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-195094-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=BYjZtNfn; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-195094-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195094-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 9D694B229CA for ; Thu, 30 May 2024 08:52:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5AC236F311; Thu, 30 May 2024 08:52:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="BYjZtNfn" Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2083.outbound.protection.outlook.com [40.107.94.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ADD0A1761BF for ; Thu, 30 May 2024 08:52:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.94.83 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717059139; cv=fail; b=lgRzqKIIs4kz2VVUssUAO8exWeEhHby0fBLzcs6wQpzcFWuwnxDnEDHPmRBHpKxw3HogOsOrLOPmxP6vogII62Ue+GN5TczNfYCmkPw/DpQ/l6HYb/VlRmc4cbLS+Awnb1MtIWePeDNoJBu+ZYCqNpGKYATH8L67i0Md8SgO5F0= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717059139; c=relaxed/simple; bh=NNZSrdl2Kg7UKYkaV9g3SCPhkqxNOMlgq7y8iiuCyno=; h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To: Content-Type:MIME-Version; b=MSl/zdpOXvOwF903//vVMfMZE6dTPZ5W2boXrr9o4U16svPiylySw8s8W0g8PaQ7DgBiVXKBOMBgKMp/b2vnqUVaE+8fF04gnnJSq3lhot6jgWiv9qc6FWHL/ax7EfP0YIIr0+p4Q/rpk41FDKC6l+Cr49G8wIM4i+PPz/rss8s= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=BYjZtNfn; arc=fail smtp.client-ip=40.107.94.83 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Jd/o1ShdhI/xqiUXZSM+gDhk7li9Q7gLysc0KDqzd4tdMW2zxZy5v86wJNFE7IJnD7AZYfrecvBUkQvu+jFRnN17lUB2I4nBhtKbDA7IR+dvU+KppNlmr+rgJcLbZ97HLwZaSqUaHSeTPLZOyGozgv2J5p+rdDqn0lHXDLm0fxAA+DRy+auwCwWIjUhYlCDAE5x72u/GttqbIbW7Mf6r0lcjfP4u4GWSpz8ZQT8M20XkhRVRd605RbQI8noDDFXnF2P6kdGCp+1ZzdICt1Z0IEiK9XUdbr5RGrsPJ72koHuj4y6X1CkfLq9cbx5eLKADCIKYRgOo+ls2sxe8dDspow== 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=8lauZGaPHD3SGJOPpT35zEKhTlWfBuCB8NhQ8CaUaNI=; b=H0G+E1BOpBN9z3ZfdejtqZBBOUhxW6Fxh/QaSknqv8+yvJFhxYpnRwEuyGhhy+rtjLJsVCQyv8Vak5QyIVXWjWrXhDl+QD+XyP3cVR9p1mLWIMKrmQTSm/Qhb92AGzRzXSZ2woqL2zYphHRR1Eha8Ni81Sn0gHsC3eSvLIQ1B4IUxpnlgFs9H45WYmHrkEZ55mu+QWxhOoIRPyYBgS2DLSfArMGqkb7TtUFshVE1o6rN2Q3xn/c1O8bnHQgPnPshtyNLHj4CLGczY/Ed/MmXsCabrQ3jsjBcy1TuCzRkmMGZZfw9YUP6xIL9N6n0Mb6Nn4coKqCaKJlJNKfZFvRpSg== 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 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=8lauZGaPHD3SGJOPpT35zEKhTlWfBuCB8NhQ8CaUaNI=; b=BYjZtNfn4tBonqscm8QfevtTuZRQ4x3fYoWJPx9VHdbWXYDvja9tfH3pMXqGrJtFPGyNU1zcjVqOehrjfQgRPkF0ru8l5uShXxqu54bCHwiWSZ3iy8xzNXsVMYKwA7+so7Ev0gtwTh7kMqj9MR6tqFE7cDOHCySw7oB1Vo+JnV4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from DS7PR12MB6048.namprd12.prod.outlook.com (2603:10b6:8:9f::5) by CY5PR12MB6432.namprd12.prod.outlook.com (2603:10b6:930:38::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.19; Thu, 30 May 2024 08:52:14 +0000 Received: from DS7PR12MB6048.namprd12.prod.outlook.com ([fe80::6318:26e5:357a:74a5]) by DS7PR12MB6048.namprd12.prod.outlook.com ([fe80::6318:26e5:357a:74a5%6]) with mapi id 15.20.7633.018; Thu, 30 May 2024 08:52:14 +0000 Message-ID: Date: Thu, 30 May 2024 14:22:04 +0530 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/1] iommu: Make iommu_sva_domain_alloc() static To: Lu Baolu , Joerg Roedel , Will Deacon , Robin Murphy , Jason Gunthorpe , Kevin Tian , Jean-Philippe Brucker Cc: iommu@lists.linux.dev, linux-kernel@vger.kernel.org References: <20240528045458.81458-1-baolu.lu@linux.intel.com> Content-Language: en-US From: Vasant Hegde In-Reply-To: <20240528045458.81458-1-baolu.lu@linux.intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: MA1P287CA0018.INDP287.PROD.OUTLOOK.COM (2603:1096:a00:35::27) To DS7PR12MB6048.namprd12.prod.outlook.com (2603:10b6:8:9f::5) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS7PR12MB6048:EE_|CY5PR12MB6432:EE_ X-MS-Office365-Filtering-Correlation-Id: c3da0f2d-4d17-4af9-b650-08dc8085cd14 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|1800799015|366007|376005; X-Microsoft-Antispam-Message-Info: =?utf-8?B?TGJDQS92ZmtJdXM2VFBlSWs3R2xHK1c2S2Ezd1p4TVQxbENVRU1iQnhSbHpI?= =?utf-8?B?aEU0SGY0NEk5UlYvZ1lDVUhzWGRYbEpkL3k1UUxZeU80OTN2UHo4V09hdXZE?= =?utf-8?B?Q0Q2MklKS1AvVkE1cDgwanRiUzJiTWRHSE1NTndUZ3llTW4xYm1tU2ZhdGhl?= =?utf-8?B?REtuOEtnUjB1SXkyR29nbVlLRUNpWVlpZUh3NkF5bjZ1TSsrNXcya3NaYnJC?= =?utf-8?B?eXMxczdqQTZEeU41Wm0zUHZiVzFlZVhYMVpJcTJwcnZnOUpHSHpwR09JUkVm?= =?utf-8?B?WGVveEZxR2FOUysyZW5wcU9BRVBRME85czd3WHBSY2wrMllUSzJRRU5BY2NJ?= =?utf-8?B?Z0pBM1BSN3NUbUY4Y1JGZy9qOC9LNmYxYkdiMy93M2tNN3ZQbHFVUzVtbkZG?= =?utf-8?B?TWcwcTdlb1daTUVJaklCR1NISDNJUStmZTU3Z0M1b0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QL2pPOHRzN3diazRTSWdEN2U1ditCYTBBZC90Y09DNVdS?= =?utf-8?B?cUR5VmpUb2xGRWFMUktyNkgyV1MwT1BrZG1ONUFMcHVuMzE4TnZHZHdBUGJW?= =?utf-8?B?dnlmVzhvU3pISTJXcmFYZXpOOTZObS95UmNTQW1BKzNWUlhpelhTa2dCR0dS?= =?utf-8?B?S2lVQ0MvckM0VjhVaFpQMUkzVUJNVVpSNTMreU01eGdiVkpLRXVEZjJDWG9L?= =?utf-8?B?RVdrbnloaXlmeUhnSHJsbUJZQzViMkJCRHF4OVdKOGZpSSttNEZvVHNTbUpq?= =?utf-8?B?L3hQV3YxNERpQmxSMUp0Y3V1SEVyQVVMdTlGZE54blFXSWptZE54Z3dOeU51?= =?utf-8?B?aUQwL3ZmYVVqU094MFpIakc1RVpLeUhXaHBSMXVFTVdZaXNHbEtDMmRRPT0=?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS7PR12MB6048.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(1800799015)(366007)(376005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?QmRlbUNXZjByTDYwZ0xFdlJ1bk9rNXU0WXNiSkF2bUxJSVNkakZpSFpicUJ1?= =?utf-8?B?eVIvc1ZQcGM1YXdXSTI3M2pXQWdFNEdTNzM2cWZGVUhJWFQ4RjdqWkc5SVZu?= =?utf-8?B?U09PazlvS1VDV1dDWkkvcERYOFJ6ZmJaTE5PR2VsdXBsTno0T3BKNFFxOGw0?= =?utf-8?B?L2cycjdXWEl0TlN3VDhlNno1YmVjRERicXBZUXN0VnVCOXBLcnVYRUdwSnQ5?= =?utf-8?B?eGNUcE5ibHlFOEVKbTFjaUFib1NjN0NabUlIK2kwR0E5d0RtTUJWVVNSS0dT?= =?utf-8?B?ek1EbDJZRm9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ZDJrQ214KzdI?= =?utf-8?Q?f3TqlPjmsLf7h6mA/TXdUVrU/?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: c3da0f2d-4d17-4af9-b650-08dc8085cd14 X-MS-Exchange-CrossTenant-AuthSource: DS7PR12MB6048.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 May 2024 08:52:14.2963 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: p+kgoNGQihtWsjyx33ROxng//QfzecTK/twSJXSJrPYXwz1NMKRGO0HvjoWQ99QElSOBI2vPx0mZYydvZ8pwOw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR12MB6432 Hi Lu, On 5/28/2024 10:24 AM, Lu Baolu wrote: > iommu_sva_domain_alloc() is only called in iommu-sva.c, hence make it > static. > > On the other hand, iommu_sva_domain_alloc() should not return NULL anymore > after commit <80af5a452024> ("iommu: Add ops->domain_alloc_sva()"), the > removal of inline code avoids potential confusion. > > Fixes: 80af5a452024 ("iommu: Add ops->domain_alloc_sva()") > Signed-off-by: Lu Baolu > --- > include/linux/iommu.h | 8 -------- > drivers/iommu/iommu-sva.c | 6 ++++-- > 2 files changed, 4 insertions(+), 10 deletions(-) > > diff --git a/include/linux/iommu.h b/include/linux/iommu.h > index 7bc8dff7cf6d..5cdd3d41b87b 100644 > --- a/include/linux/iommu.h > +++ b/include/linux/iommu.h > @@ -1527,8 +1527,6 @@ struct iommu_sva *iommu_sva_bind_device(struct device *dev, > struct mm_struct *mm); > void iommu_sva_unbind_device(struct iommu_sva *handle); > u32 iommu_sva_get_pasid(struct iommu_sva *handle); > -struct iommu_domain *iommu_sva_domain_alloc(struct device *dev, > - struct mm_struct *mm); > #else > static inline struct iommu_sva * > iommu_sva_bind_device(struct device *dev, struct mm_struct *mm) > @@ -1553,12 +1551,6 @@ static inline u32 mm_get_enqcmd_pasid(struct mm_struct *mm) > } > > static inline void mm_pasid_drop(struct mm_struct *mm) {} > - > -static inline struct iommu_domain * > -iommu_sva_domain_alloc(struct device *dev, struct mm_struct *mm) > -{ > - return NULL; > -} > #endif /* CONFIG_IOMMU_SVA */ > > #ifdef CONFIG_IOMMU_IOPF > diff --git a/drivers/iommu/iommu-sva.c b/drivers/iommu/iommu-sva.c > index 18a35e798b72..25e581299226 100644 > --- a/drivers/iommu/iommu-sva.c > +++ b/drivers/iommu/iommu-sva.c > @@ -10,6 +10,8 @@ > #include "iommu-priv.h" > > static DEFINE_MUTEX(iommu_sva_lock); > +static struct iommu_domain *iommu_sva_domain_alloc(struct device *dev, > + struct mm_struct *mm); If we move move iommu_sva_domain_alloc() before iommu_sva_bind_device() then we can avoid this forward declaration. -Vasant