[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1261010034-7786-1-git-send-regression-fweisbec@gmail.com>
Date: Thu, 17 Dec 2009 01:33:54 +0100
From: Frederic Weisbecker <fweisbec@...il.com>
To: Ingo Molnar <mingo@...e.hu>
Cc: LKML <linux-kernel@...r.kernel.org>,
Frederic Weisbecker <fweisbec@...il.com>,
Peter Zijlstra <peterz@...radead.org>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
Paul Mackerras <paulus@...ba.org>,
Cyrill Gorcunov <gorcunov@...il.com>,
Michal Marek <mmarek@...e.cz>,
Andrew Randrianasulu <randrik_a@...oo.com>,
Randy Dunlap <randy.dunlap@...cle.com>,
"K.Prasad" <prasad@...ux.vnet.ibm.com>
Subject: [PATCH v2] hw-breakpoint: Fix hardware breakpoints -> perf events dependency
The kbuild's select command doesn't propagate through the config
dependencies.
Hence the current rules of hardware breakpoint's config can't
ensure perf can never be disabled under us.
We have:
config X86
selects HAVE_HW_BREAKPOINTS
config HAVE_HW_BREAKPOINTS
select PERF_EVENTS
config PERF_EVENTS
[...]
x86 will select the breakpoints but that won't propagate to perf
events. The user can still disable the latter, but it is necessary
for the breakpoints.
What we need is:
- x86 selects HAVE_HW_BREAKPOINTS and PERF_EVENTS
- HAVE_HW_BREAKPOINTS depends on PERF_EVENTS
so that we ensure PERF_EVENTS is enabled and frozen for x86.
This fixes the following kind of build errors:
In file included from arch/x86/kernel/hw_breakpoint.c:31:
include/linux/hw_breakpoint.h: In function 'hw_breakpoint_addr':
include/linux/hw_breakpoint.h:39: error: 'struct perf_event' has no member named 'attr'
include/linux/hw_breakpoint.h: In function 'hw_breakpoint_type':
include/linux/hw_breakpoint.h:44: error: 'struct perf_event' has no member named 'attr'
include/linux/hw_breakpoint.h: In function 'hw_breakpoint_len':
include/linux/hw_breakpoint.h:49: error: 'struct perf_event' has no member named 'attr'
include/linux/hw_breakpoint.h: In function 'counter_arch_bp':
include/linux/hw_breakpoint.h:85: error: 'struct perf_event' has no member named 'hw'
v2: Select also ANON_INODES from x86, required for perf
Reported-by: Cyrill Gorcunov <gorcunov@...il.com>
Reported-by: Michal Marek <mmarek@...e.cz>
Reported-by: Andrew Randrianasulu <randrik_a@...oo.com>
Signed-off-by: Frederic Weisbecker <fweisbec@...il.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Randy Dunlap <randy.dunlap@...cle.com>
Cc: "K.Prasad" <prasad@...ux.vnet.ibm.com>
---
arch/Kconfig | 4 +---
arch/x86/Kconfig | 2 ++
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/Kconfig b/arch/Kconfig
index 28146cd..32e8b68 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -138,9 +138,7 @@ config HAVE_USER_RETURN_NOTIFIER
config HAVE_HW_BREAKPOINT
bool
- depends on HAVE_PERF_EVENTS
- select ANON_INODES
- select PERF_EVENTS
+ depends on PERF_EVENTS
source "kernel/gcov/Kconfig"
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 098f0d3..cbc1b98 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -50,6 +50,8 @@ config X86
select HAVE_KERNEL_BZIP2
select HAVE_KERNEL_LZMA
select HAVE_HW_BREAKPOINT
+ select PERF_EVENTS
+ select ANON_INODES
select HAVE_ARCH_KMEMCHECK
select HAVE_USER_RETURN_NOTIFIER
--
1.6.2.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists