From: tip-bot for Robert Richter <robert.richter@amd.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, eranian@google.com, hpa@zytor.com,
mingo@redhat.com, robert.richter@amd.com, a.p.zijlstra@chello.nl,
tglx@linutronix.de, mingo@elte.hu
Subject: [tip:perf/core] perf/core, x86: Remove duplicate perf_event_mask variable
Date: Wed, 17 Mar 2010 12:10:26 GMT [thread overview]
Message-ID: <tip-d6dc0b4ead6e8720096ecfa3d9e899b47ddbc8ed@git.kernel.org> (raw)
In-Reply-To: <1268826553-19518-5-git-send-email-robert.richter@amd.com>
Commit-ID: d6dc0b4ead6e8720096ecfa3d9e899b47ddbc8ed
Gitweb: http://git.kernel.org/tip/d6dc0b4ead6e8720096ecfa3d9e899b47ddbc8ed
Author: Robert Richter <robert.richter@amd.com>
AuthorDate: Wed, 17 Mar 2010 12:49:13 +0100
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Wed, 17 Mar 2010 13:06:59 +0100
perf/core, x86: Remove duplicate perf_event_mask variable
The same information is stored also in x86_pmu.intel_ctrl. This
patch removes perf_event_mask and instead uses
x86_pmu.intel_ctrl directly.
Signed-off-by: Robert Richter <robert.richter@amd.com>
Cc: Stephane Eranian <eranian@google.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1268826553-19518-5-git-send-email-robert.richter@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
arch/x86/kernel/cpu/perf_event.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
index 104292a..c97d5b5 100644
--- a/arch/x86/kernel/cpu/perf_event.c
+++ b/arch/x86/kernel/cpu/perf_event.c
@@ -75,8 +75,6 @@ copy_from_user_nmi(void *to, const void __user *from, unsigned long n)
return len;
}
-static u64 perf_event_mask __read_mostly;
-
struct event_constraint {
union {
unsigned long idxmsk[BITS_TO_LONGS(X86_PMC_IDX_MAX)];
@@ -1406,7 +1404,7 @@ void __init init_hw_perf_events(void)
x86_pmu.num_events, X86_PMC_MAX_GENERIC);
x86_pmu.num_events = X86_PMC_MAX_GENERIC;
}
- perf_event_mask = (1 << x86_pmu.num_events) - 1;
+ x86_pmu.intel_ctrl = (1 << x86_pmu.num_events) - 1;
perf_max_events = x86_pmu.num_events;
if (x86_pmu.num_events_fixed > X86_PMC_MAX_FIXED) {
@@ -1415,9 +1413,8 @@ void __init init_hw_perf_events(void)
x86_pmu.num_events_fixed = X86_PMC_MAX_FIXED;
}
- perf_event_mask |=
+ x86_pmu.intel_ctrl |=
((1LL << x86_pmu.num_events_fixed)-1) << X86_PMC_IDX_FIXED;
- x86_pmu.intel_ctrl = perf_event_mask;
perf_events_lapic_init();
register_die_notifier(&perf_event_nmi_notifier);
@@ -1442,7 +1439,7 @@ void __init init_hw_perf_events(void)
pr_info("... value mask: %016Lx\n", x86_pmu.event_mask);
pr_info("... max period: %016Lx\n", x86_pmu.max_period);
pr_info("... fixed-purpose events: %d\n", x86_pmu.num_events_fixed);
- pr_info("... event mask: %016Lx\n", perf_event_mask);
+ pr_info("... event mask: %016Lx\n", x86_pmu.intel_ctrl);
perf_cpu_notifier(x86_pmu_notifier);
}
next prev parent reply other threads:[~2010-03-17 12:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-17 11:49 [PATCH 0/4] perf/core: some small patches Robert Richter
2010-03-17 11:49 ` [PATCH 1/4] perf/core, x86: reduce number of CONFIG_X86_LOCAL_APIC macros Robert Richter
2010-03-17 12:09 ` [tip:perf/core] perf/core, x86: Reduce " tip-bot for Robert Richter
2010-03-17 11:49 ` [PATCH 2/4] perf/core: correct files in MAINTAINERS entry Robert Richter
2010-03-17 12:09 ` [tip:perf/core] perf/core: Correct " tip-bot for Robert Richter
2010-03-17 11:49 ` [PATCH 3/4] perf/core, x86: remove cpu_hw_events.interrupts Robert Richter
2010-03-17 12:10 ` [tip:perf/core] perf/core, x86: Remove cpu_hw_events.interrupts tip-bot for Robert Richter
2010-03-17 11:49 ` [PATCH 4/4] perf/core, x86: remove duplicate perf_event_mask variable Robert Richter
2010-03-17 12:10 ` tip-bot for Robert Richter [this message]
2010-03-17 12:09 ` [PATCH 0/4] perf/core: some small patches 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-d6dc0b4ead6e8720096ecfa3d9e899b47ddbc8ed@git.kernel.org \
--to=robert.richter@amd.com \
--cc=a.p.zijlstra@chello.nl \
--cc=eranian@google.com \
--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
all inboxes | Powered by JetHome®