Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp551427pxf; Wed, 17 Mar 2021 10:18:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxAKm4S0mK88btUjKtMh03zUlMnDiykJWvGP5bQ1exO0Y5L2LBLCfOCjvyhbNfCXtZL4FCl X-Received: by 2002:a50:f311:: with SMTP id p17mr44756265edm.188.1616001487605; Wed, 17 Mar 2021 10:18:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616001487; cv=none; d=google.com; s=arc-20160816; b=A/RhushtUaSRQmVNCuUJc4vee7THdOerHtCbFSHiTj2VTlsO32oCg82kQcUVhMNNPy UX4f8HsmCx0r/HufqLEjqIFBWlzOdtYVYYE3E0GLFDUzvk4vUQq4P0st9+hADXEfa2w0 sUlmRC0Q5acaBJA5Q58QbkoFWMLmCd97plJHirlA96Wt2E3MnfKr9WuemZxR/bI8X7vZ uGEhYmrzTJ7NY+52P91EYDneH1VwJU3nn7hyQS3V5UtXulCfrAu7WO8/N8udz72PmVOa eudval3cY4nee1T3KZFHP7Dx60lK/zvvvFWpFf7fkkkra5+WLzHvj1qIQRfuu7q883ed uKqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:from:cc:to:subject :content-transfer-encoding:mime-version:references:in-reply-to :user-agent:date:dkim-signature; bh=CMMz5R1TICGoardcIZbuQbx/IbDn7R6aDFEFgKeLLJw=; b=kfwwL2b9/9/guy/CnNwQda5ZV+nKxxEPF4Wjplilpzf0q2ROjRndOV8hpesncM5b4q t7V3uLM7p+nsrilzKQFZZkj1phplbHq26QR4qi4odCsIEg2mYm2QDh6GlyNthRevEpO8 UL60l/jwLKPArXl8m1eXAC1NfU1GQDLO+yuLMoqclYKdKHvAFcLLg2LLun/u29F+8iLW WHgrBIslx2Dw4qJV13mLRSON6CQyt/QY/YdB+TWBGqSvq3HdRtvhfkLvQTB91pn+HcpZ LiBW3qmkJ6PnmMN84Ho8jnDHscrVqOWeODAH2dZGOCFUdbRA3Z/HiBIsJ0c+XAd9wEV9 UhlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=desiato.20200630 header.b=SgzSOzls; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r9si8865408edd.8.2021.03.17.10.17.44; Wed, 17 Mar 2021 10:18:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=desiato.20200630 header.b=SgzSOzls; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231740AbhCQOPs (ORCPT + 99 others); Wed, 17 Mar 2021 10:15:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231705AbhCQOPi (ORCPT ); Wed, 17 Mar 2021 10:15:38 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2231C06174A; Wed, 17 Mar 2021 07:15:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Message-ID:From:CC:To:Subject: Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To: Date:Sender:Reply-To:Content-ID:Content-Description; bh=CMMz5R1TICGoardcIZbuQbx/IbDn7R6aDFEFgKeLLJw=; b=SgzSOzls4iI1qxq/PGJWPYRBFb rFE1EcVrfc1TpoiIoUGVJ204bhFGtx3WBPohUhVUEX/eHBcWyi1U9NZ5PyuZPqJyKJdeemTaCbIgX sLrB7QPQgpGFD8jrUDTf6MZLOmuL3W6CcGgOS2l3P5DZ28JBNSl126SXOVxMNQg2KqWl7crfFKOq7 GNCBy1CGrI8zlYJ7YiIEKduV42jmovU4yYCRaV+YIDfVN1sD3kSROw5Mtt3x68MKLmep4V7k6uqpV 8GE5wDZdNvKLCYvLbHgbT+o7KsYnkK4hxlvVx7Kq6Z8ZTOyeAra+yeim4JhwslpeXEdIir8gkNZPy EdNrJt6A==; Received: from [2001:8b0:10b:1:6dbf:8591:24f9:c1c2] by desiato.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1lMWxR-003EYd-9t; Wed, 17 Mar 2021 14:15:33 +0000 Date: Wed, 17 Mar 2021 13:37:16 +0000 User-Agent: K-9 Mail for Android In-Reply-To: References: <20210317091037.31374-1-joro@8bytes.org> <20210317091037.31374-3-joro@8bytes.org> <449d4a2d192d23eb504e43b13c35c326f2d0309a.camel@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PATCH 2/3] iommu/amd: Don't call early_amd_iommu_init() when AMD IOMMU is disabled To: Joerg Roedel CC: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, Huang Rui , Suravee Suthikulpanit , Alex Deucher , Xiaojian Du , Joerg Roedel , stable@vger.kernel.org From: David Woodhouse Message-ID: <3014DA56-84D8-474B-94FE-6FDBB6241F9F@infradead.org> X-SRS-Rewrite: SMTP reverse-path rewritten from by desiato.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 17 March 2021 13:32:35 GMT, Joerg Roedel wrote: >On Wed, Mar 17, 2021 at 11:47:11AM +0000, David Woodhouse wrote: >> If you've already moved the Stoney Ridge check out of the way, >there's >> no real reason why you can't just set >init_state=3DIOMMU_CMDLINE_DISABLED >> directly from parse_amd_iommu_options(), is there? Then you don't >need >> the condition here at all? > >True, there is even more room for optimization=2E The amd_iommu_disabled >variable can go away entirely, including its checks in >early_amd_iommu_init()=2E I will do a patch-set on-top of this for v5=2E1= 3 >which does more cleanups=2E If we can get to the point where we don't even need to check amd_iommu_irq= _remap in the =2E=2E=2Eselect() function because the IRQ domain is never ev= en registered in the case where the flag ends up false, all the better :) --=20 Sent from my Android device with K-9 Mail=2E Please excuse my brevity=2E