Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp2860724pxv; Mon, 12 Jul 2021 03:49:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJySb80V2GblirKE71RJC3Qaq2v8lKAu/Ok6/9B0zxClved1tR6oNA3u2x7sz4P3yxd3UljJ X-Received: by 2002:a05:6e02:1091:: with SMTP id r17mr22123335ilj.160.1626086957448; Mon, 12 Jul 2021 03:49:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626086957; cv=none; d=google.com; s=arc-20160816; b=Uc8voPheM3bORfdPbRUfP1UVieyXaU9/8/PqDEqbAR6cH9hwNau3VjtzwJlPmZpwIc px644gNdHZYIVVco1gzUcXdkG1sHVJrOhERqNA/1AJASGZKvKp+2V1zxNJV82kSHLeUb NfCZJNCZOAhJUlPya+GZZ2Eb0BNA465Komk6+LesJMZh7ne7M7SzhycmovAkuvN2Iu5Y 2Q3sF80UO5PLBMBk9l1/FZU+ploVXbGvEJfPnh9+/EK/lprq9m2BXcFlxB8H9tTAnD4k Mp3rAAzahc7nueekrJz0uLzxj9ofIMVINxKSf1oWo/97ccn7EUUC1xTtjN8af6pL72de tkWQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=N2x91YTtiM+TDr4zaVhsRzMHBGCL/8vM+90IDwxkSfQ=; b=crf4w9zF5FZMd0ck6+qyFJkvhFcAAgCL3WxnDWlC3da0DKlpZnw00NPWTOSEnLdHc6 0MNodBjpB7jtqN0y1aGNCrZpab01bx35dIYRzA3+MKko8KHb2fFYR51GOd3YeBCnY76K AGFEVLT304AypbUthDrcil0lbOpuwAHTBPJ0LhSMAkiCe67i9rTwSgX24Dv9dF2pwy2k U3lVbIbuxszvX+uHPbmW75UuhqJxzxqRREgTk1xvvVRyfhPKqQuwG74QXKjqfkrl0Vx3 qibSkWC//0VTMQ58qi/wiscIruQSEsiChZR53jtjoELqZU3OpRw7k89E0Uf0iiwGS51x rggw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=iJkP+BPd; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s18si13400968jao.15.2021.07.12.03.49.06; Mon, 12 Jul 2021 03:49:17 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=iJkP+BPd; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353414AbhGLICI (ORCPT + 99 others); Mon, 12 Jul 2021 04:02:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:34180 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343577AbhGLHYM (ORCPT ); Mon, 12 Jul 2021 03:24:12 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C57AA613FC; Mon, 12 Jul 2021 07:21:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626074468; bh=jBd8K/LtS279RBWv70A3r2yW/e/MMspYC7ufWmjs2oI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iJkP+BPdgzr9/ggfrhOG5o6GVIaNED2kSF+NZabeVNGw5rQPWETtMKOpBSOOaoLNs CrYYFUwy4a5Bew5GUZrkGxUwNRS6eeBmNucSfFklnLrsNieV8XSPWpK+EUDl4objYi wENZa3kKgOWzLxaQSOa0Dk/DCQUCqtEDhT03zkb0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alexander Monakov , Paul Menzel , Joerg Roedel , Suravee Suthikulpanit , iommu@lists.linux-foundation.org, Sasha Levin Subject: [PATCH 5.12 591/700] iommu/amd: Fix extended features logging Date: Mon, 12 Jul 2021 08:11:14 +0200 Message-Id: <20210712061038.853801729@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210712060924.797321836@linuxfoundation.org> References: <20210712060924.797321836@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alexander Monakov [ Upstream commit 4b21a503adf597773e4b37db05db0e9b16a81d53 ] 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 Reviewed-by: Paul Menzel Link: https://lore.kernel.org/r/20210504102220.1793-1-amonakov@ispras.ru Signed-off-by: Joerg Roedel Signed-off-by: Sasha Levin --- 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 df7b19ff0a9e..ecc7308130ba 100644 --- a/drivers/iommu/amd/init.c +++ b/drivers/iommu/amd/init.c @@ -1911,8 +1911,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]); -- 2.30.2