mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Ingo Molnar <mingo@kernel.org>,
	Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Arnaldo Carvalho de Melo <acme@infradead.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [GIT PULL] perf changes for v3.11
Date: Wed, 3 Jul 2013 09:55:42 +0200	[thread overview]
Message-ID: <20130703075542.GF23916@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <CA+55aFwJwYRbPBBN1ma8TBHuomo_AJjajxT6YDmdGXJdE4EgrQ@mail.gmail.com>

On Tue, Jul 02, 2013 at 05:50:29PM -0700, Linus Torvalds wrote:
> On Mon, Jul 1, 2013 at 2:03 AM, Ingo Molnar <mingo@kernel.org> wrote:
> >
> >    git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git perf-core-for-linus
> >
> > Kernel improvements:
> >
> >  * AMD IOMMU uncore PMU support by Suravee Suthikulpanit001a
> 
> This one prints a really annoying error message if you're not on an
> AMD platform:
> 
> +       if (!amd_iommu_pc_supported()) {
> +               pr_err("perf: amd_iommu PMU not installed. No support!\n");
> +               return -ENODEV;
> +       }
> 
> and you know what? That's not acceptable. It damn well is *not* an
> error to not have an AMD IOMMU.
> 
> It should - at most - be a pr_info(). Maybe nothing at all. "pr_err()"
> is just totally out of line.

Quite; it prints enough stuff when it does find one so I'm all for
scrapping that one print when it doesn't find it.

Sorry for not seeing that; when I initially read that code I thought it was for
the case where the hardware was expected to have the device but we couldn't
find it for some weird reason.

---
Subject: perf, amd: Do not print an error when the device is not present

As Linus said its not an error to not have an AMD IOMMU; esp. when you're not
even running on an AMD platform.

Requested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
---
 arch/x86/kernel/cpu/perf_event_amd_iommu.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/x86/kernel/cpu/perf_event_amd_iommu.c b/arch/x86/kernel/cpu/perf_event_amd_iommu.c
index 0db655e..639d128 100644
--- a/arch/x86/kernel/cpu/perf_event_amd_iommu.c
+++ b/arch/x86/kernel/cpu/perf_event_amd_iommu.c
@@ -491,10 +491,8 @@ static struct perf_amd_iommu __perf_iommu = {
 static __init int amd_iommu_pc_init(void)
 {
 	/* Make sure the IOMMU PC resource is available */
-	if (!amd_iommu_pc_supported()) {
-		pr_err("perf: amd_iommu PMU not installed. No support!\n");
+	if (!amd_iommu_pc_supported())
 		return -ENODEV;
-	}
 
 	_init_perf_amd_iommu(&__perf_iommu, "amd_iommu");
 


  reply	other threads:[~2013-07-03  7:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-01  9:03 Ingo Molnar
2013-07-03  0:50 ` Linus Torvalds
2013-07-03  7:55   ` Peter Zijlstra [this message]
2013-07-03 17:32     ` Suravee Suthikulpanit
2013-07-05  6:27     ` Ingo Molnar
2013-07-05  6:51     ` [tip:perf/urgent] perf/x86/amd: Do not print an error when the device is not present tip-bot for Peter Zijlstra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130703075542.GF23916@twins.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=acme@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=suravee.suthikulpanit@amd.com \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome