From: tip-bot for Cyrill Gorcunov <gorcunov@openvz.org>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
gorcunov@openvz.org, tglx@linutronix.de, mingo@elte.hu
Subject: [tip:perf/core] x86, perf: Use apic_write unconditionally
Date: Thu, 18 Mar 2010 17:37:45 GMT [thread overview]
Message-ID: <tip-7335f75e9ca166044e38a96abad422d8e6e364b5@git.kernel.org> (raw)
In-Reply-To: <20100317104356.232371479@openvz.org>
Commit-ID: 7335f75e9ca166044e38a96abad422d8e6e364b5
Gitweb: http://git.kernel.org/tip/7335f75e9ca166044e38a96abad422d8e6e364b5
Author: Cyrill Gorcunov <gorcunov@openvz.org>
AuthorDate: Wed, 17 Mar 2010 13:37:01 +0300
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Thu, 18 Mar 2010 17:03:22 +0100
x86, perf: Use apic_write unconditionally
Since apic_write() maps to a plain noop in the !CONFIG_X86_LOCAL_APIC
case we're safe to remove this conditional compilation and clean up
the code a bit.
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: fweisbec@gmail.com
Cc: acme@redhat.com
Cc: eranian@google.com
Cc: peterz@infradead.org
LKML-Reference: <20100317104356.232371479@openvz.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
arch/x86/kernel/cpu/perf_event.c | 4 ----
arch/x86/kernel/cpu/perf_event_p4.c | 2 --
2 files changed, 0 insertions(+), 6 deletions(-)
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
index c97d5b5..14eca80 100644
--- a/arch/x86/kernel/cpu/perf_event.c
+++ b/arch/x86/kernel/cpu/perf_event.c
@@ -1136,7 +1136,6 @@ void set_perf_event_pending(void)
void perf_events_lapic_init(void)
{
-#ifdef CONFIG_X86_LOCAL_APIC
if (!x86_pmu.apic || !x86_pmu_initialized())
return;
@@ -1144,7 +1143,6 @@ void perf_events_lapic_init(void)
* Always use NMI for PMU
*/
apic_write(APIC_LVTPC, APIC_DM_NMI);
-#endif
}
static int __kprobes
@@ -1168,9 +1166,7 @@ perf_event_nmi_handler(struct notifier_block *self,
regs = args->regs;
-#ifdef CONFIG_X86_LOCAL_APIC
apic_write(APIC_LVTPC, APIC_DM_NMI);
-#endif
/*
* Can't rely on the handled return value to say it was our NMI, two
* events could trigger 'simultaneously' raising two back-to-back NMIs.
diff --git a/arch/x86/kernel/cpu/perf_event_p4.c b/arch/x86/kernel/cpu/perf_event_p4.c
index a11ce73..0367889 100644
--- a/arch/x86/kernel/cpu/perf_event_p4.c
+++ b/arch/x86/kernel/cpu/perf_event_p4.c
@@ -363,10 +363,8 @@ static int p4_pmu_handle_irq(struct pt_regs *regs)
}
if (handled) {
-#ifdef CONFIG_X86_LOCAL_APIC
/* p4 quirk: unmask it again */
apic_write(APIC_LVTPC, apic_read(APIC_LVTPC) & ~APIC_LVT_MASKED);
-#endif
inc_irq_stat(apic_perf_irqs);
}
prev parent reply other threads:[~2010-03-18 17:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-17 10:36 [patch 0/2] x86, apic, perf - make apic_write/read noop on !APIC case Cyrill Gorcunov
2010-03-17 10:37 ` [patch 1/2] x86, apic: Allow to use sertain functions without APIC built-in support Cyrill Gorcunov
2010-03-18 17:37 ` [tip:perf/core] x86, apic: Allow to use certain " tip-bot for Cyrill Gorcunov
2010-03-17 10:37 ` [patch 2/2] x86, perf: Use apic_write unconditionally Cyrill Gorcunov
2010-03-18 17:37 ` tip-bot for Cyrill Gorcunov [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-7335f75e9ca166044e38a96abad422d8e6e364b5@git.kernel.org \
--to=gorcunov@openvz.org \
--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®