From mboxrd@z Thu Jan 1 00:00:00 1970 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 3BD8DCDB47E for ; Thu, 12 Oct 2023 12:58:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378699AbjJLM6p (ORCPT ); Thu, 12 Oct 2023 08:58:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343971AbjJLM6n (ORCPT ); Thu, 12 Oct 2023 08:58:43 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD888C9 for ; Thu, 12 Oct 2023 05:58:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697115521; x=1728651521; h=message-id:date:mime-version:cc:subject:to:references: from:in-reply-to:content-transfer-encoding; bh=FezBOs4z5b5BdyWfX/5QiwvC0F3/xtHU+YBQMpqAKP8=; b=fArE4YuH5qh2xA2WUXUevVG6uLD2VU7DW4Qe7fNpktJ3CsYaEsPPiURg U/+laN+N2kvnth8gADu7A4EGFNorUk/2eeWj/QIgnPFEnXupBfOhkvwa4 +XknxyfWv8k7mU/RUmsJKeq6lIrXTCqV5aFppADyOWW1HuS32XOY6/V4+ D1iDB+/8vXQ5PWbRG0Chh4Tg4uaUThTMHN7CN6Q5+iZQXVYexm/42rf9s upZ4wN/FSYqd3f9jTJs6ds4AVg4y9JiRRo9a12AhS5jr4/m1fHoGrvYXw P+hUxZxmq2OcE5Ikfwv3aiXLg6eAyVc4dcnKpR1/OgZOkYSxOrzHRnULs A==; X-IronPort-AV: E=McAfee;i="6600,9927,10861"; a="388769151" X-IronPort-AV: E=Sophos;i="6.03,219,1694761200"; d="scan'208";a="388769151" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Oct 2023 05:58:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10861"; a="758008315" X-IronPort-AV: E=Sophos;i="6.03,219,1694761200"; d="scan'208";a="758008315" Received: from blu2-mobl.ccr.corp.intel.com (HELO [10.254.213.230]) ([10.254.213.230]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Oct 2023 05:58:32 -0700 Message-ID: Date: Thu, 12 Oct 2023 20:58:31 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Cc: baolu.lu@linux.intel.com, iommu@lists.linux.dev, jgg@nvidia.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 2/7] iommu: Decouple iommu_present() from bus ops Content-Language: en-US To: Robin Murphy , joro@8bytes.org, will@kernel.org References: <6711338e24dd1edfd02187f25cf40d8622cefdb2.1697047261.git.robin.murphy@arm.com> From: Baolu Lu In-Reply-To: <6711338e24dd1edfd02187f25cf40d8622cefdb2.1697047261.git.robin.murphy@arm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2023/10/12 2:14, Robin Murphy wrote: > Much as I'd like to remove iommu_present(), the final remaining users > are proving stubbornly difficult to clean up, so kick that can down the > road and just rework it to preserve the current behaviour without > depending on bus ops. Since commit 57365a04c921 ("iommu: Move bus setup > to IOMMU device registration"), any registered IOMMU instance is already > considered "present" for every entry in iommu_buses, so it's simply a > case of validating the bus and checking we have at least once IOMMU. > > Reviewed-by: Jason Gunthorpe > Signed-off-by: Robin Murphy Reviewed-by: Lu Baolu Best regards, baolu