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 X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 84101C433DB for ; Wed, 17 Mar 2021 13:33:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 21ED964F0F for ; Wed, 17 Mar 2021 13:33:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231218AbhCQNdJ (ORCPT ); Wed, 17 Mar 2021 09:33:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231184AbhCQNcm (ORCPT ); Wed, 17 Mar 2021 09:32:42 -0400 Received: from theia.8bytes.org (8bytes.org [IPv6:2a01:238:4383:600:38bc:a715:4b6d:a889]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82DA7C06174A; Wed, 17 Mar 2021 06:32:41 -0700 (PDT) Received: by theia.8bytes.org (Postfix, from userid 1000) id 5B8992DA; Wed, 17 Mar 2021 14:32:38 +0100 (CET) Date: Wed, 17 Mar 2021 14:32:35 +0100 From: Joerg Roedel To: David Woodhouse 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 Subject: Re: [PATCH 2/3] iommu/amd: Don't call early_amd_iommu_init() when AMD IOMMU is disabled Message-ID: 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=us-ascii Content-Disposition: inline In-Reply-To: <449d4a2d192d23eb504e43b13c35c326f2d0309a.camel@infradead.org> Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 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=IOMMU_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. The amd_iommu_disabled variable can go away entirely, including its checks in early_amd_iommu_init(). I will do a patch-set on-top of this for v5.13 which does more cleanups. Thanks, Joerg