From: tip-bot for Yinghai Lu <yinghai@kernel.org>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
yinghai@kernel.org, a.p.zijlstra@chello.nl, tglx@linutronix.de,
mingo@elte.hu
Subject: [tip:perfcounters/urgent] perf_counter, x86: Update x86_pmu after WARN()
Date: Mon, 29 Jun 2009 08:21:32 GMT [thread overview]
Message-ID: <tip-4078c444cf667f018c3fc7ebf141131a2b7c9480@git.kernel.org> (raw)
In-Reply-To: <4A487017.4090007@kernel.org>
Commit-ID: 4078c444cf667f018c3fc7ebf141131a2b7c9480
Gitweb: http://git.kernel.org/tip/4078c444cf667f018c3fc7ebf141131a2b7c9480
Author: Yinghai Lu <yinghai@kernel.org>
AuthorDate: Mon, 29 Jun 2009 00:41:11 -0700
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Mon, 29 Jun 2009 10:19:25 +0200
perf_counter, x86: Update x86_pmu after WARN()
The print out should read the value before changing the value.
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <4A487017.4090007@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
arch/x86/kernel/cpu/perf_counter.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/cpu/perf_counter.c b/arch/x86/kernel/cpu/perf_counter.c
index b83474b..d4cf4ce 100644
--- a/arch/x86/kernel/cpu/perf_counter.c
+++ b/arch/x86/kernel/cpu/perf_counter.c
@@ -1496,17 +1496,17 @@ void __init init_hw_perf_counters(void)
pr_cont("%s PMU driver.\n", x86_pmu.name);
if (x86_pmu.num_counters > X86_PMC_MAX_GENERIC) {
- x86_pmu.num_counters = X86_PMC_MAX_GENERIC;
WARN(1, KERN_ERR "hw perf counters %d > max(%d), clipping!",
x86_pmu.num_counters, X86_PMC_MAX_GENERIC);
+ x86_pmu.num_counters = X86_PMC_MAX_GENERIC;
}
perf_counter_mask = (1 << x86_pmu.num_counters) - 1;
perf_max_counters = x86_pmu.num_counters;
if (x86_pmu.num_counters_fixed > X86_PMC_MAX_FIXED) {
- x86_pmu.num_counters_fixed = X86_PMC_MAX_FIXED;
WARN(1, KERN_ERR "hw perf counters fixed %d > max(%d), clipping!",
x86_pmu.num_counters_fixed, X86_PMC_MAX_FIXED);
+ x86_pmu.num_counters_fixed = X86_PMC_MAX_FIXED;
}
perf_counter_mask |=
prev parent reply other threads:[~2009-06-29 8:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-28 21:03 [PATCH] x86/perf_count: update x86_pmu after WARN Yinghai Lu
2009-06-28 21:04 ` [PATCH] x86/perf_count: make perf_count_mask to local Yinghai Lu
2009-06-28 21:04 ` [PATCH] x86/perf_count: change intel_pmu and amd_pmu to initdata Yinghai Lu
2009-06-29 7:41 ` [RESEND PATCH] x86/perf_count: update x86_pmu after WARN Yinghai Lu
2009-06-29 8:21 ` tip-bot for Yinghai Lu [this message]
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=tip-4078c444cf667f018c3fc7ebf141131a2b7c9480@git.kernel.org \
--to=yinghai@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--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