From: Peter Zijlstra <peterz@infradead.org>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
a.p.zijlstra@chello.nl, jaswinder@kernel.org,
peterz@infradead.org, tglx@linutronix.de, mingo@elte.hu
Subject: [tip:perfcounters/core] x86: perf_counter cleanup
Date: Sun, 8 Mar 2009 15:52:06 GMT [thread overview]
Message-ID: <tip-184fe4ab1f2e4dfa45584889bb3820031648386b@git.kernel.org> (raw)
In-Reply-To: <1236508459.22914.3645.camel@twins>
Commit-ID: 184fe4ab1f2e4dfa45584889bb3820031648386b
Gitweb: http://git.kernel.org/tip/184fe4ab1f2e4dfa45584889bb3820031648386b
Author: "Peter Zijlstra" <peterz@infradead.org>
AuthorDate: Sun, 8 Mar 2009 11:34:19 +0100
Commit: Ingo Molnar <mingo@elte.hu>
CommitDate: Sun, 8 Mar 2009 16:24:49 +0100
x86: perf_counter cleanup
Use and actual unsigned long bitmap instead of casting our way around.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Jaswinder Singh Rajput <jaswinder@kernel.org>
LKML-Reference: <1236508459.22914.3645.camel@twins>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
arch/x86/kernel/cpu/perf_counter.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/x86/kernel/cpu/perf_counter.c b/arch/x86/kernel/cpu/perf_counter.c
index f585371..1df4210 100644
--- a/arch/x86/kernel/cpu/perf_counter.c
+++ b/arch/x86/kernel/cpu/perf_counter.c
@@ -37,7 +37,7 @@ struct cpu_hw_counters {
unsigned long used[BITS_TO_LONGS(X86_PMC_IDX_MAX)];
unsigned long interrupts;
u64 throttle_ctrl;
- u64 active_mask;
+ unsigned long active_mask[BITS_TO_LONGS(X86_PMC_IDX_MAX)];
int enabled;
};
@@ -291,7 +291,7 @@ static void pmc_amd_restore_all(u64 ctrl)
return;
for (idx = 0; idx < nr_counters_generic; idx++) {
- if (test_bit(idx, (unsigned long *)&cpuc->active_mask)) {
+ if (test_bit(idx, cpuc->active_mask)) {
u64 val;
rdmsrl(MSR_K7_EVNTSEL0 + idx, val);
@@ -377,7 +377,7 @@ static void pmc_amd_enable(int idx, u64 config)
{
struct cpu_hw_counters *cpuc = &__get_cpu_var(cpu_hw_counters);
- set_bit(idx, (unsigned long *)&cpuc->active_mask);
+ set_bit(idx, cpuc->active_mask);
if (cpuc->enabled)
config |= ARCH_PERFMON_EVENTSEL0_ENABLE;
@@ -401,7 +401,7 @@ static void pmc_amd_disable(int idx, u64 config)
{
struct cpu_hw_counters *cpuc = &__get_cpu_var(cpu_hw_counters);
- clear_bit(idx, (unsigned long *)&cpuc->active_mask);
+ clear_bit(idx, cpuc->active_mask);
wrmsrl(MSR_K7_EVNTSEL0 + idx, config);
}
next prev parent reply other threads:[~2009-03-08 15:53 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-08 10:13 [git-pull -tip] x86:perf_counter cleanup Jaswinder Singh Rajput
2009-03-08 10:20 ` Peter Zijlstra
2009-03-08 10:39 ` Jaswinder Singh Rajput
2009-03-08 10:41 ` Ingo Molnar
2009-03-08 11:39 ` Jaswinder Singh Rajput
2009-03-08 10:46 ` Peter Zijlstra
2009-03-08 10:32 ` Peter Zijlstra
2009-03-08 10:34 ` Peter Zijlstra
2009-03-08 15:52 ` Peter Zijlstra [this message]
[not found] <tip-e255357764f92afcafafbd4879b222b8c752065a@git.kernel.org>
2009-03-08 20:59 ` [tip:perfcounters/core] x86: perf_counter cleanup Peter Zijlstra
2009-03-08 21:03 ` H. Peter Anvin
2009-03-08 21:05 ` Ingo Molnar
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-184fe4ab1f2e4dfa45584889bb3820031648386b@git.kernel.org \
--to=peterz@infradead.org \
--cc=a.p.zijlstra@chello.nl \
--cc=hpa@zytor.com \
--cc=jaswinder@kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.