Prev: [tip:perf/urgent] perf: Fix unexported generic perf_arch_fetch_caller_regs
Next: lock monitor: Separate features related to lock
From: tip-bot for Robert Richter on 17 Mar 2010 05:50 Commit-ID: 984763cb90d4b5444baa0c3e43feff7926bf1834 Gitweb: http://git.kernel.org/tip/984763cb90d4b5444baa0c3e43feff7926bf1834 Author: Robert Richter <robert.richter(a)amd.com> AuthorDate: Tue, 16 Mar 2010 17:07:33 +0100 Committer: Ingo Molnar <mingo(a)elte.hu> CommitDate: Wed, 17 Mar 2010 10:43:50 +0100 perf, x86: Report error code that returned from x86_pmu.hw_config() If x86_pmu.hw_config() fails a fixed error code (-EOPNOTSUPP) is returned even if a different error was reported. This patch fixes this. Signed-off-by: Robert Richter <robert.richter(a)amd.com> Acked-by: Cyrill Gorcunov <gorcunov(a)gmail.com> Acked-by: Lin Ming <ming.m.lin(a)intel.com> Cc: acme(a)redhat.com Cc: eranian(a)google.com Cc: gorcunov(a)openvz.org Cc: peterz(a)infradead.org Cc: fweisbec(a)gmail.com LKML-Reference: <20100316160733.GR1585(a)erda.amd.com> Signed-off-by: Ingo Molnar <mingo(a)elte.hu> --- 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 0d3466c..5dacf63 100644 --- a/arch/x86/kernel/cpu/perf_event.c +++ b/arch/x86/kernel/cpu/perf_event.c @@ -472,8 +472,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; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |