Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp3482407pxy; Tue, 4 May 2021 03:24:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz+Osyqhs5w4NnPC7nl2Xiy488udKkOvD55Iqfezi3ZRjyEIoW4ZnML0joIHpFRM2mFbjrJ X-Received: by 2002:a05:6402:b88:: with SMTP id cf8mr25151977edb.227.1620123853606; Tue, 04 May 2021 03:24:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620123853; cv=none; d=google.com; s=arc-20160816; b=zl4X7hVYPxUAB8U7vQDPyjqhhdiEGFkX+x3R6XCK1l2R6tFthlVvf5AmR/8k164aej ZrjFCKUOPB1qcl8HYUhi6DWk2oPsnhURvDPbHH2Nj+7K6nhhsSoWL1rcVaILZOM5x11t ShGrzaSjZLLGKft5eb+INg98T4ySePa/OBPD1SUHAhj8axvcLa2axeuoIn9L7MqS0EXJ 7tB2oKNYeteXenMqFGRUxZ9+4vFPTn+/A1MrYPPB4C5jfTQCYHIwY4hUtddd01MQwutD CkPtZ9di4PzpSSacWlaZjSKWaJzIP6FY1iTuWWsujHM0sAt+dYuyT0K9oFqqqkEKFpjY kXAQ== 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=o9qrNDR0u2HVTiu5+vRyRMSWai5JxHAcfTEp8YjYFtM=; b=EHunU7olGcKVMRA2ukyFeoXOD4gttgT7y+UIuo0Rwm3r9sgXqkKLL8IP07HBeVWkWH nVJm4vljDCVJaTswf9Smr8bAWfJJdogtxd/NeolO1p4o+lJAFBkV0JVA1QG49GNmv0/Q HU67CffectlBX9WLyYHdXQMT+k1AIhvEDACUlojvvqrAa3xqrfXPzM1u86zmLCeq9+vY 0JtwSCVL/MAFIfvXko0L10c0M8FnaKMA4AcYmLDcKd7MmdYqoMTfiuLFmolHkms74n+k qGJ2AaYi2wc5Gvc01QzGyQM9/q5aEDLeEC7Jk53+FKMIFpBr64rVC9/cKfDp1pkEQoPK X1cw== 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 u28si12470642eda.342.2021.05.04.03.23.48; Tue, 04 May 2021 03:24:13 -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 S230202AbhEDKXh (ORCPT + 99 others); Tue, 4 May 2021 06:23:37 -0400 Received: from mail.ispras.ru ([83.149.199.84]:53442 "EHLO mail.ispras.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230153AbhEDKXg (ORCPT ); Tue, 4 May 2021 06:23:36 -0400 Received: from localhost.localdomain (unknown [46.188.10.168]) by mail.ispras.ru (Postfix) with ESMTPSA id E84804076B3A; Tue, 4 May 2021 10:22:38 +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: [RESEND PATCH v2] iommu/amd: Fix extended features logging Date: Tue, 4 May 2021 13:22:20 +0300 Message-Id: <20210504102220.1793-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. Printing the decoded features on the same line would make it quite long. Instead, change pci_info() to pr_info() to omit PCI bus location info, which is also shown in the preceding message. This results in: pci 0000:00:00.2: AMD-Vi: Found IOMMU cap 0x40 AMD-Vi: Extended features (0x206d73ef22254ade): PPR X2APIC NX GT IA GA PC GA_vAPIC AMD-Vi: Interrupt remapping enabled Fixes: 9a295ff0ffc9 ("iommu/amd: Print extended features in one line to fix divergent log levels") Link: https://lore.kernel.org/lkml/alpine.LNX.2.20.13.2104112326460.11104@monopod.intra.ispras.ru 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/amd/init.c b/drivers/iommu/amd/init.c index 429a4baa3aee..8f0eb865119a 100644 --- a/drivers/iommu/amd/init.c +++ b/drivers/iommu/amd/init.c @@ -1954,8 +1954,8 @@ static void print_iommu_info(void) pci_info(pdev, "Found IOMMU cap 0x%x\n", iommu->cap_ptr); if (iommu->cap & (1 << IOMMU_CAP_EFR)) { - pci_info(pdev, "Extended features (%#llx):", - iommu->features); + pr_info("Extended features (%#llx):", iommu->features); + for (i = 0; i < ARRAY_SIZE(feat_str); ++i) { if (iommu_feature(iommu, (1ULL << i))) pr_cont(" %s", feat_str[i]); base-commit: 9f4ad9e425a1d3b6a34617b8ea226d56a119a717 -- 2.30.0