Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4802277pxj; Wed, 12 May 2021 13:39:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/eMyX5/kBHkVI7HCXJZpoGtmJaRFpodl79nLXZl5ddN+KdCyblLflw319jdKZ0UxZRuNN X-Received: by 2002:aa7:c7d5:: with SMTP id o21mr46052491eds.166.1620851895087; Wed, 12 May 2021 13:38:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620851895; cv=none; d=google.com; s=arc-20160816; b=PwBFlfwcb9jHaB+ZFKeGvSbe8L0podgPnwEQ5ltbuoAbdxJN/A0I0Tb8D/dOPu/fm0 ueRADjr7a6CBIBO2vagdL6yG1QkCcJBCqzkSYKklO8Vjd7AiaRNhGKVma5MPBHN/e1S/ kOs8qjgXHfUQJFgXjUZzoxWk/jqfisFzsnWQTJtWpAuKDwVLSrwRZtO2ImRKbHG4CFXk BfLSu31gcrkMGFURecbMl4lC5W/gUNuMkYc/zqiAF6RaWXEL/4Px+CXhLZYsRr0y0Sok +9ipOcHIoxeIeEj1bo8wqSg1ACeltelLdh5lGslAYIVZgtD+tVVr/e54XjlBmHf8NwDZ XjkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=u0aRZsDCROGGChCqhidbcjr4DAyOWrb2fpODN9ZfuIM=; b=NmkVvu2X9H8/4DcsXfN+Hxqd31VVcefHv+sC1xaI6YXiz7syTOrD5spGqlMj02fJHF m/tJYXRD5HhMsctrd2h2QuXpQ9WCNJ1ZoKFuOolg54/CrwW4NfHdA4f78Z5qgfCl7M3C WExifGcAhpzFRv6IQYGLH7wBQHV4+TIN28Yq9orqwU3ywQBc+/j6wLuvx4Q2c6/Mn+0v kc+ZtinBNS20X5RXsKzti/PSl0N/WE3yDeUp9iztzlkWC2avC4DacqVOeFTrt6aBhaZl G67c/ZY/OCkSf7TrgfGpCF3otl+WGGFWO63cN9XUfbiLxNg4aMAvTd7RKGmORi8vge1Z RirQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y14si719870edc.72.2021.05.12.13.36.43; Wed, 12 May 2021 13:38:15 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1386352AbhELUUw (ORCPT + 99 others); Wed, 12 May 2021 16:20:52 -0400 Received: from mx3.molgen.mpg.de ([141.14.17.11]:52621 "EHLO mx1.molgen.mpg.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1384013AbhELT4Z (ORCPT ); Wed, 12 May 2021 15:56:25 -0400 Received: from [192.168.0.3] (ip5f5aef16.dynamic.kabel-deutschland.de [95.90.239.22]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: pmenzel) by mx.molgen.mpg.de (Postfix) with ESMTPSA id BAB0561E5FE33; Wed, 12 May 2021 21:55:14 +0200 (CEST) Subject: Re: [RESEND PATCH v2] iommu/amd: Fix extended features logging To: Alexander Monakov Cc: Joerg Roedel , Suravee Suthikulpanit , iommu@lists.linux-foundation.org, LKML References: <20210504102220.1793-1-amonakov@ispras.ru> From: Paul Menzel Message-ID: <189e74f3-40a0-12ec-08fa-982dff3708f2@molgen.mpg.de> Date: Wed, 12 May 2021 21:55:14 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: <20210504102220.1793-1-amonakov@ispras.ru> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 04.05.21 um 12:22 schrieb Alexander Monakov: > 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 Reviewed-by: Paul Menzel Kind regards, Paul