linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Ingo Molnar <mingo@elte.hu>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Don Zickus <dzickus@redhat.com>,
	Cyrill Gorcunov <gorcunov@gmail.com>
Subject: [PATCH 2/4] lockup_detector: Adapt CONFIG_PERF_EVENT_NMI to other archs
Date: Sun, 16 May 2010 04:33:58 +0200	[thread overview]
Message-ID: <1273977240-30800-3-git-send-regression-fweisbec@gmail.com> (raw)
In-Reply-To: <20100515073732.GA17120@elte.hu>

CONFIG_PERF_EVENT_NMI is something that need to be enabled from the
arch. This is fine on x86 as PERF_EVENTS is builtin but if other
archs select it, they will need to handle the PERF_EVENTS dependency.

Instead, handle the dependency in the generic layer:

- archs need to tell what they support through HAVE_PERF_EVENTS_NMI
- Enable magically PERF_EVENTS_NMI if we have PERF_EVENTS and
  HAVE_PERF_EVENTS_NMI.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Cyrill Gorcunov <gorcunov@gmail.com>
---
 arch/Kconfig     |    3 +++
 arch/x86/Kconfig |    2 +-
 init/Kconfig     |    3 +--
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/arch/Kconfig b/arch/Kconfig
index e5eb133..89b0efb 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -145,4 +145,7 @@ config HAVE_HW_BREAKPOINT
 config HAVE_USER_RETURN_NOTIFIER
 	bool
 
+config HAVE_PERF_EVENTS_NMI
+	bool
+
 source "kernel/gcov/Kconfig"
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 3cb28cd..3cb5bb0 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -54,7 +54,7 @@ config X86
 	select HAVE_KERNEL_LZO
 	select HAVE_HW_BREAKPOINT
 	select PERF_EVENTS
-	select PERF_EVENTS_NMI
+	select HAVE_PERF_EVENTS_NMI
 	select ANON_INODES
 	select HAVE_ARCH_KMEMCHECK
 	select HAVE_USER_RETURN_NOTIFIER
diff --git a/init/Kconfig b/init/Kconfig
index e44e254..ab733c3 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -943,8 +943,7 @@ config PERF_USE_VMALLOC
 	  See tools/perf/design.txt for details
 
 config PERF_EVENTS_NMI
-	bool
-	depends on PERF_EVENTS
+	def_bool PERF_EVENTS && HAVE_PERF_EVENTS_NMI
 	help
 	  System hardware can generate an NMI using the perf event
 	  subsystem.  Also has support for calculating CPU cycle events
-- 
1.6.2.3


  parent reply	other threads:[~2010-05-16  2:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-14  5:53 linux-next: build failure after merge of the final tree Stephen Rothwell
2010-05-14 15:03 ` Don Zickus
2010-05-15  7:37   ` Ingo Molnar
2010-05-15 20:28     ` Frederic Weisbecker
2010-05-16  2:33     ` [GIT PULL] Lockup detector build fixes Frederic Weisbecker
2010-05-16  2:36       ` Frederic Weisbecker
2010-05-16  7:56         ` Ingo Molnar
2010-05-17 13:44           ` Don Zickus
2010-05-16  2:33     ` [PATCH 1/4] lockup_detector: Update some config Frederic Weisbecker
2010-05-16  2:33     ` Frederic Weisbecker [this message]
2010-05-16  2:33     ` [PATCH 3/4] lockup_detector: Introduce CONFIG_HARDLOCKUP_DETECTOR Frederic Weisbecker
2010-05-16  2:34     ` [PATCH 4/4] lockup_detector: Cross arch compile fixes Frederic Weisbecker
2010-05-14 15:11 ` linux-next: build failure after merge of the final tree Don Zickus
2010-05-16  9:20   ` [tip:perf/nmi] lockup_detector: Cross arch compile fixes tip-bot for Don Zickus

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=1273977240-30800-3-git-send-regression-fweisbec@gmail.com \
    --to=fweisbec@gmail.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=dzickus@redhat.com \
    --cc=gorcunov@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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;
as well as URLs for NNTP newsgroup(s).