diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-11-13 19:12:47 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-11-13 19:29:17 -0500 |
commit | 688bcaff291cf2fe2734e43f2793d4d05b850518 (patch) | |
tree | 95078fb51e922800c568b1a33b65608f924eb154 /include | |
parent | 687b16fb617bd446439425a368ad7c7bbd202c73 (diff) |
hw-breakpoints: Fix build on !perf architectures
the arch/alpha build fails with:
In file included from tip/kernel/exit.c:52:
tip/include/linux/hw_breakpoint.h: In function 'hw_breakpoint_addr':
tip/include/linux/hw_breakpoint.h:21: error: 'struct perf_event' has no member named 'attr'
[...]
Move these helper inlines inside the CONFIG_HAVE_HW_BREAKPOINT ifdef.
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Prasad <prasad@linux.vnet.ibm.com>
LKML-Reference: <1258114575-32655-1-git-send-email-fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/hw_breakpoint.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/hw_breakpoint.h b/include/linux/hw_breakpoint.h index 18710e0c84bd..0b98cbf76da7 100644 --- a/include/linux/hw_breakpoint.h +++ b/include/linux/hw_breakpoint.h | |||
@@ -16,6 +16,8 @@ enum { | |||
16 | HW_BREAKPOINT_X = 4, | 16 | HW_BREAKPOINT_X = 4, |
17 | }; | 17 | }; |
18 | 18 | ||
19 | #ifdef CONFIG_HAVE_HW_BREAKPOINT | ||
20 | |||
19 | static inline unsigned long hw_breakpoint_addr(struct perf_event *bp) | 21 | static inline unsigned long hw_breakpoint_addr(struct perf_event *bp) |
20 | { | 22 | { |
21 | return bp->attr.bp_addr; | 23 | return bp->attr.bp_addr; |
@@ -31,7 +33,6 @@ static inline int hw_breakpoint_len(struct perf_event *bp) | |||
31 | return bp->attr.bp_len; | 33 | return bp->attr.bp_len; |
32 | } | 34 | } |
33 | 35 | ||
34 | #ifdef CONFIG_HAVE_HW_BREAKPOINT | ||
35 | extern struct perf_event * | 36 | extern struct perf_event * |
36 | register_user_hw_breakpoint(unsigned long addr, | 37 | register_user_hw_breakpoint(unsigned long addr, |
37 | int len, | 38 | int len, |