Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 36595C7EE32 for ; Thu, 2 Mar 2023 16:43:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229998AbjCBQn4 (ORCPT ); Thu, 2 Mar 2023 11:43:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229849AbjCBQnx (ORCPT ); Thu, 2 Mar 2023 11:43:53 -0500 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6AE9F15C9D; Thu, 2 Mar 2023 08:43:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1677775432; x=1709311432; h=date:from:to:cc:subject:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ZVR0fEMxC1xCM/KNPaB7wfbb6IVdTmO+3FaxenBdqhA=; b=GGdMrMFdYPTIw7S5/9i8iXqU+qPX2IvPAdDRgXoX+Y3rJ5xkMPOliG8n 6pIWCchiOIa3pQGi1fSdC0ld9p/LWQ3Mzha/eCpOpCJrfDTlPyJRK+5XM JPfAZr7NbHzFHioW9bp6QN6FfZ8b2HG6J3JYEGuhdFGPCpnB5mchhFyFt z1IwC+LK3ZN0Jan/V4KWtap5zll1qNIsZ2sH4iilvdczp6TPvr3XI9wj6 msBslFyAIz9qph8Gel1Xkm5CyEcNdwFH08ogTijqoVO4F0kqCpIjiFXLQ NxCVeDo1WC4pYlSTtPqYgriIBl/zAhijoJZ3NkoWAcjHL5XgsRkm2rqhb A==; X-IronPort-AV: E=McAfee;i="6500,9779,10637"; a="334801851" X-IronPort-AV: E=Sophos;i="5.98,228,1673942400"; d="scan'208";a="334801851" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2023 08:43:51 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10637"; a="668314513" X-IronPort-AV: E=Sophos;i="5.98,228,1673942400"; d="scan'208";a="668314513" Received: from jacob-builder.jf.intel.com (HELO jacob-builder) ([10.24.100.114]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2023 08:43:50 -0800 Date: Thu, 2 Mar 2023 08:47:39 -0800 From: Jacob Pan To: "Tian, Kevin" Cc: LKML , "iommu@lists.linux.dev" , Jason Gunthorpe , Lu Baolu , Joerg Roedel , "Jean-Philippe Brucker" , "Hansen, Dave" , Thomas Gleixner , X86 Kernel , "bp@alien8.de" , "H. Peter Anvin" , "Peter Zijlstra" , "corbet@lwn.net" , "vkoul@kernel.org" , "dmaengine@vger.kernel.org" , "linux-doc@vger.kernel.org" , Robin Murphy , Will Deacon , "David Woodhouse" , "Raj, Ashok" , "Liu, Yi L" , "Yu, Fenghua" , "Jiang, Dave" , Kirill Shutemov , jacob.jun.pan@linux.intel.com Subject: Re: [PATCH v4 2/6] iommu/sva: Move PASID helpers to sva code Message-ID: <20230302084518.33712064@jacob-builder> In-Reply-To: References: <20230301235646.2692846-1-jacob.jun.pan@linux.intel.com> <20230301235646.2692846-3-jacob.jun.pan@linux.intel.com> Organization: OTC X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Kevin, On Thu, 2 Mar 2023 09:03:52 +0000, "Tian, Kevin" wrote: > > From: Jacob Pan > > Sent: Thursday, March 2, 2023 7:57 AM > > > > -static inline void mm_pasid_drop(struct mm_struct *mm) > > -{ > > - if (pasid_valid(mm->pasid)) { > > - ioasid_free(mm->pasid); > > - mm->pasid = INVALID_IOASID; > > - } > > -} > > +void mm_pasid_drop(struct mm_struct *mm); > > Is it good to have a function declared in a header file of one > subsystem while being implemented in another subsystem? Good point! I will move it to iommu_helper.h Thanks, Jacob