Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp637710pxb; Sat, 10 Apr 2021 14:14:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyAnIkpTkCuIs7mWb8g3qVb4+3VFh4Rr2HFEfWZxCS4UAD/okngqcixDIQTMT9fdQDopifm X-Received: by 2002:aa7:c654:: with SMTP id z20mr23264423edr.159.1618089265025; Sat, 10 Apr 2021 14:14:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618089265; cv=none; d=google.com; s=arc-20160816; b=yxUYmW5h8xj0zQIOH5WHn7umMHWWaja4AUhpCocoY0l0d1ZNNv5ArQDxg9Je4YqWUl +ek7f2pk1c58q1ufDlspijxHpwXsMTqaWeKLeDqkq1aJK/aiUKTtUGXA9A19ugpSr1oc HrszSYUUUb0aWWxVbtwBmLNf5pLioPGPRQspudafm5HqAXz+uv+QZ8fxBPqwcY1dlTlo brG2BAJ4SNbI5WBZLnayqY74yTAKly1VsmaWDihTMxxVnqewy4/NKvEx+xye2QnoTQfD xp+53GrkP3kTi44nLWUkIWbD4qx6R0WUUNy20RWXREkUDg4bSNFl2bcifcL9nconY+Gw j4OA== 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 :message-id:date:subject:cc:to:from; bh=/FBqsgnntZ27hCBCPLUp1k47VmKdyhcYEduJIoqYFbw=; b=SNCk4m2mb/v5/37tEDzg0hdfIq9lW076qQJr5B3m4hfz4tabP9XjcQnaDV/gETjkED 1+wwhBRHdja5tMakir2s076+hnaWr5dditR/tTYSmtUeJwQL76JfwuGYlRD4DZ+CXXej egWizSwOF5o6hV4Rq/RfrveupPoJwAbgI0f7ICxH3z+she3EptJHQwc+mXWq2VUGzQFZ Y3tj5aHYINCJM7+mgbXUNYMr6vMC6bVOzn8hEoehztfKl8wS4Msa8E1gW0af979MG91s jZqikUY+QL0W2P6efqx4Gw2xH5DzWYQNlMOgDYyTzteoQ7bsPrcQUizzgC+tXJ2MSqhC fJUQ== 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=ispras.ru Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x11si2452016eju.252.2021.04.10.14.14.01; Sat, 10 Apr 2021 14:14:25 -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=ispras.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235081AbhDJVNF (ORCPT + 99 others); Sat, 10 Apr 2021 17:13:05 -0400 Received: from mail.ispras.ru ([83.149.199.84]:33428 "EHLO mail.ispras.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232659AbhDJVMt (ORCPT ); Sat, 10 Apr 2021 17:12:49 -0400 Received: from localhost.localdomain (unknown [46.188.10.168]) by mail.ispras.ru (Postfix) with ESMTPSA id B9D1F40D403E; Sat, 10 Apr 2021 21:12:28 +0000 (UTC) From: Alexander Monakov To: linux-kernel@vger.kernel.org Cc: Alexander Monakov , Paul Menzel , Joerg Roedel , Suravee Suthikulpanit , iommu@lists.linux-foundation.org Subject: [PATCH] iommu/amd: Fix extended features logging Date: Sun, 11 Apr 2021 00:11:52 +0300 Message-Id: <20210410211152.1938-1-amonakov@ispras.ru> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org print_iommu_info prints the EFR register and then the decoded list of features on a separate line: pci 0000:00:00.2: AMD-Vi: Extended features (0x206d73ef22254ade): PPR X2APIC NX GT IA GA PC GA_vAPIC The second line is emitted via 'pr_cont', which causes it to have a different ('warn') loglevel compared to the previous line ('info'). Commit 9a295ff0ffc9 attempted to rectify this by removing the newline from the pci_info format string, but this doesn't work, as pci_info calls implicitly append a newline anyway. Restore the newline, and call pr_info with empty format string to set the loglevel for subsequent pr_cont calls. The same solution is used in EFI and uvesafb drivers. Fixes: 9a295ff0ffc9 ("iommu/amd: Print extended features in one line to fix divergent log levels") Signed-off-by: Alexander Monakov Cc: Paul Menzel Cc: Joerg Roedel Cc: Suravee Suthikulpanit Cc: iommu@lists.linux-foundation.org --- drivers/iommu/amd/init.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/iommu/amd/init.c b/drivers/iommu/amd/init.c index 596d0c413473..a25e241eff1c 100644 --- a/drivers/iommu/amd/init.c +++ b/drivers/iommu/amd/init.c @@ -1929,8 +1929,11 @@ static void print_iommu_info(void) pci_info(pdev, "Found IOMMU cap 0x%hx\n", iommu->cap_ptr); if (iommu->cap & (1 << IOMMU_CAP_EFR)) { - pci_info(pdev, "Extended features (%#llx):", + pci_info(pdev, "Extended features (%#llx):\n", iommu->features); + + pr_info(""); + for (i = 0; i < ARRAY_SIZE(feat_str); ++i) { if (iommu_feature(iommu, (1ULL << i))) pr_cont(" %s", feat_str[i]); -- 2.30.0