public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Robert Richter <robert.richter@amd.com>
To: mingo@redhat.com, hpa@zytor.com, acme@redhat.com,
	eranian@google.com, linux-kernel@vger.kernel.org,
	gorcunov@openvz.org, peterz@infradead.org, fweisbec@gmail.com,
	ming.m.lin@intel.com, tglx@linutronix.de, mingo@elte.hu
Cc: linux-tip-commits@vger.kernel.org
Subject: Re: [tip:perf/x86] perf, x86: Implement initial P4 PMU driver
Date: Tue, 16 Mar 2010 17:07:33 +0100	[thread overview]
Message-ID: <20100316160733.GR1585@erda.amd.com> (raw)
In-Reply-To: <tip-a072738e04f0eb26370e39ec679e9a0d65e49aea@git.kernel.org>

Please see my patch below that fixes ther reporting error code that
returns from x86_pmu.hw_config.

-Robert

On 11.03.10 18:33:55, tip-bot for Cyrill Gorcunov wrote:
> Commit-ID:  a072738e04f0eb26370e39ec679e9a0d65e49aea
> Gitweb:     http://git.kernel.org/tip/a072738e04f0eb26370e39ec679e9a0d65e49aea
> Author:     Cyrill Gorcunov <gorcunov@openvz.org>
> AuthorDate: Thu, 11 Mar 2010 19:54:39 +0300
> Committer:  Ingo Molnar <mingo@elte.hu>
> CommitDate: Thu, 11 Mar 2010 18:51:08 +0100
> 
> perf, x86: Implement initial P4 PMU driver
> 
> The netburst PMU is way different from the "architectural
> perfomance monitoring" specification that current CPUs use.
> P4 uses a tuple of ESCR+CCCR+COUNTER MSR registers to handle
> perfomance monitoring events.

--

From: Robert Richter <robert.richter@amd.com>
Date: Tue, 16 Mar 2010 16:38:19 +0100
Subject: [PATCH] perf, x86: reporting error code that returns from x86_pmu.hw_config()

If x86_pmu.hw_config() fails a fixed error code (-EOPNOTSUPP) is
return even if a different error was reported. This patch fixes this.

Signed-off-by: Robert Richter <robert.richter@amd.com>
---
 arch/x86/kernel/cpu/perf_event.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
index 4e2480f..8982d92 100644
--- a/arch/x86/kernel/cpu/perf_event.c
+++ b/arch/x86/kernel/cpu/perf_event.c
@@ -467,8 +467,9 @@ static int __hw_perf_event_init(struct perf_event *event)
 	hwc->last_tag = ~0ULL;
 
 	/* Processor specifics */
-	if (x86_pmu.hw_config(attr, hwc))
-		return -EOPNOTSUPP;
+	err = x86_pmu.hw_config(attr, hwc);
+	if (err)
+		return err;
 
 	if (!hwc->sample_period) {
 		hwc->sample_period = x86_pmu.max_period;
-- 
1.7.0



-- 
Advanced Micro Devices, Inc.
Operating System Research Center
email: robert.richter@amd.com


  reply	other threads:[~2010-03-16 16:07 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-10 18:31 [RFC] x86,perf: Implement minimal P4 PMU driver v14 Cyrill Gorcunov
2010-03-10 19:29 ` Robert Richter
2010-03-10 19:43   ` Cyrill Gorcunov
2010-03-11  2:32 ` Lin Ming
2010-03-11  4:12   ` Cyrill Gorcunov
2010-03-11 16:54   ` Cyrill Gorcunov
2010-03-11 18:16     ` Ingo Molnar
2010-03-11 18:29       ` Cyrill Gorcunov
2010-03-11 18:39       ` Ingo Molnar
2010-03-11 21:15         ` Cyrill Gorcunov
2010-03-11 21:24           ` Peter Zijlstra
2010-03-11 21:31             ` Cyrill Gorcunov
2010-03-11 21:38               ` Peter Zijlstra
2010-03-11 21:41                 ` Cyrill Gorcunov
2010-03-11 21:50                 ` Cyrill Gorcunov
2010-03-12  9:54                   ` [tip:perf/x86] x86, perf: Fix NULL deref on not assigned x86_pmu tip-bot for Cyrill Gorcunov
2010-03-11 18:33     ` [tip:perf/x86] perf, x86: Implement initial P4 PMU driver tip-bot for Cyrill Gorcunov
2010-03-16 16:07       ` Robert Richter [this message]
2010-03-16 16:23         ` Cyrill Gorcunov
2010-03-17  1:05           ` Lin Ming
2010-03-17  9:48         ` [tip:perf/core] perf, x86: Report error code that returned from x86_pmu.hw_config() tip-bot for Robert Richter

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=20100316160733.GR1585@erda.amd.com \
    --to=robert.richter@amd.com \
    --cc=acme@redhat.com \
    --cc=eranian@google.com \
    --cc=fweisbec@gmail.com \
    --cc=gorcunov@openvz.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=ming.m.lin@intel.com \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    /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