public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
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, peterz@infradead.org, ming.m.lin@intel.com,
	tglx@linutronix.de, mingo@elte.hu
Subject: [tip:perf/core] x86, perf: Unmask LVTPC only if we have APIC supported
Date: Sat, 13 Mar 2010 16:21:37 GMT	[thread overview]
Message-ID: <tip-8576e1971663ffdb6139041de97cdd2e1d4791cc@git.kernel.org> (raw)
In-Reply-To: <20100313081116.GA5179@lenovo>

Commit-ID:  8576e1971663ffdb6139041de97cdd2e1d4791cc
Gitweb:     http://git.kernel.org/tip/8576e1971663ffdb6139041de97cdd2e1d4791cc
Author:     Cyrill Gorcunov <gorcunov@openvz.org>
AuthorDate: Sat, 13 Mar 2010 11:11:16 +0300
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Sat, 13 Mar 2010 13:32:27 +0100

x86, perf: Unmask LVTPC only if we have APIC supported

Ingo reported:

 |
 | There's a build failure on -tip with the P4 driver, on UP 32-bit, if
 | PERF_EVENTS is enabled but UP_APIC is disabled:
 |
 | arch/x86/built-in.o: In function `p4_pmu_handle_irq':
 | perf_event.c:(.text+0xa756): undefined reference to `apic'
 | perf_event.c:(.text+0xa76e): undefined reference to `apic'
 |

So we have to unmask LVTPC only if we're configured to have one.

Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
CC: Lin Ming <ming.m.lin@intel.com>
CC: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <20100313081116.GA5179@lenovo>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 arch/x86/kernel/cpu/perf_event_p4.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/cpu/perf_event_p4.c b/arch/x86/kernel/cpu/perf_event_p4.c
index 381f593..ef861da 100644
--- a/arch/x86/kernel/cpu/perf_event_p4.c
+++ b/arch/x86/kernel/cpu/perf_event_p4.c
@@ -365,8 +365,10 @@ 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);
 	}
 

      parent reply	other threads:[~2010-03-13 16:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-13  8:11 [PATCH] x86,perf: Unmask LVTPC only if we have APIC supported Cyrill Gorcunov
2010-03-13 12:24 ` Ingo Molnar
2010-03-13 12:32   ` Cyrill Gorcunov
2010-03-13 12:40     ` Ingo Molnar
2010-03-13 12:42       ` Ingo Molnar
2010-03-13 13:42       ` Cyrill Gorcunov
2010-03-13 13:50         ` Ingo Molnar
2010-03-13 14:08           ` Cyrill Gorcunov
2010-03-13 15:03           ` Cyrill Gorcunov
2010-03-13 16:21 ` 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-8576e1971663ffdb6139041de97cdd2e1d4791cc@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=ming.m.lin@intel.com \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --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