Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp5369282pxv; Wed, 28 Jul 2021 09:09:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+MMRAz4v1Yk0EK7k7MapE9IuZPD4wNnT/konEO1Rm0f9aYqIfGBicrYixwNPgC0t6jLtW X-Received: by 2002:a05:6402:2074:: with SMTP id bd20mr677352edb.123.1627488551957; Wed, 28 Jul 2021 09:09:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627488551; cv=none; d=google.com; s=arc-20160816; b=ImnhEwupP75eKfYvnTwpTdqXF+ecgjYtguMYYIx6bmilbxCD+ReHElA7bEvQiIROdV CyByYJTU30Xxto4Gk750HJA49KP/1VC+vBI4Gggf6UDIEa4qiZyOSB1MtRxJIvph9Pg6 RkoLT2N6C9zZJMuNgVXBsi+V8eb5FyXwElDFR9u+zrZv5RsrTJ/Wb/bE3oFhiqaSmc0b ffOJcmVZGY8tG/FsVMsKTv8SFRqHsuccpRyfr1r6VEaZFWJifozZEiXcOoVt6jzkK/W0 6OV+GzYg7azUkF9zZecLmpGwwmG/IsI2UH5KVF5LYnhZjfKfCrL/FeRsXJba816qGalu R1pA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=t/qygcR6aQUjYaA0Y9wmcx19LQQXq50aj4IE7GZkmNk=; b=BKGG6T7fVwof6m9WFjJ0i5mp18eKM/BrUxwruLMfBFDOecrWYGKUVc9aepZ8ZFeL6g pToWP02rWmY+brFN/a3bR6tAL15iuKWTkrZmBN86IJr02GwnUWRXqtA8j4bLEeJUlYGz A9YCOaM0EPgRJZVPHcGTOKvfQQI+F5LkIOsndFaGxDJN+rebfOGXRLNoOKHZEuaL4FbW wBlU+h4m3VyxjKlcS5l0e99x5nbbIk0ZY1JrHU+ckQWDzvIvYdFKdce+Ut4WPFhYvN3U 2K0TQ7q4kJ38dD0W0y+mjK6uNBCPNoL8MOVOVyd7zaSmODqMgqO2ZbICGaw54ZenrS9P qaAA== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y19si200121ejd.140.2021.07.28.09.08.48; Wed, 28 Jul 2021 09:09:11 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237442AbhG1QAS (ORCPT + 99 others); Wed, 28 Jul 2021 12:00:18 -0400 Received: from foss.arm.com ([217.140.110.172]:59632 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237492AbhG1P7u (ORCPT ); Wed, 28 Jul 2021 11:59:50 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id DC1F41424; Wed, 28 Jul 2021 08:59:48 -0700 (PDT) Received: from 010265703453.arm.com (unknown [10.57.36.146]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 6669C3F70D; Wed, 28 Jul 2021 08:59:47 -0700 (PDT) From: Robin Murphy To: joro@8bytes.org, will@kernel.org Cc: iommu@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, suravee.suthikulpanit@amd.com, baolu.lu@linux.intel.com, john.garry@huawei.com, dianders@chromium.org Subject: [PATCH v2 24/24] iommu: Only log strictness for DMA domains Date: Wed, 28 Jul 2021 16:58:45 +0100 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When passthrough is enabled, the default strictness policy becomes irrelevant, since any subsequent runtime override to a DMA domain type now embodies an explicit choice of strictness as well. Save on noise by only logging the default policy when it is meaningfully in effect. Signed-off-by: Robin Murphy --- drivers/iommu/iommu.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index be399d630953..87d7b299436e 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@ -144,10 +144,11 @@ static int __init iommu_subsys_init(void) (iommu_cmd_line & IOMMU_CMD_LINE_DMA_API) ? "(set via kernel command line)" : ""); - pr_info("DMA domain TLB invalidation policy: %s mode %s\n", - iommu_dma_strict ? "strict" : "lazy", - (iommu_cmd_line & IOMMU_CMD_LINE_STRICT) ? - "(set via kernel command line)" : ""); + if (!iommu_default_passthrough()) + pr_info("DMA domain TLB invalidation policy: %s mode %s\n", + iommu_dma_strict ? "strict" : "lazy", + (iommu_cmd_line & IOMMU_CMD_LINE_STRICT) ? + "(set via kernel command line)" : ""); return 0; } -- 2.25.1