summaryrefslogtreecommitdiff
path: root/include/linux/hw_breakpoint.h
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2009-11-13 13:16:15 +0100
committerIngo Molnar <mingo@elte.hu>2009-11-14 00:27:38 +0100
commit687b16fb617bd446439425a368ad7c7bbd202c73 (patch)
tree1c0eaf832ed47273daa435b4329bed104accea85 /include/linux/hw_breakpoint.h
parent59d8eb53ea9947db7cad8ebc31b0fb54f23a9851 (diff)
hw-breakpoints: Provide an off-case for counter_arch_bp()
If an arch doesn't support the hw breakpoints, counter_arch_bp() has no off case to cover the missing breakpoint info structure from the perf event. The result is a build error in non-x86 configs. Reported-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: 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> Cc: Prasad <prasad@linux.vnet.ibm.com>
Diffstat (limited to 'include/linux/hw_breakpoint.h')
-rw-r--r--include/linux/hw_breakpoint.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/include/linux/hw_breakpoint.h b/include/linux/hw_breakpoint.h
index 7eba9b92e5f3..18710e0c84bd 100644
--- a/include/linux/hw_breakpoint.h
+++ b/include/linux/hw_breakpoint.h
@@ -16,11 +16,6 @@ enum {
HW_BREAKPOINT_X = 4,
};
-static inline struct arch_hw_breakpoint *counter_arch_bp(struct perf_event *bp)
-{
- return &bp->hw.info;
-}
-
static inline unsigned long hw_breakpoint_addr(struct perf_event *bp)
{
return bp->attr.bp_addr;
@@ -83,6 +78,11 @@ extern void release_bp_slot(struct perf_event *bp);
extern void flush_ptrace_hw_breakpoint(struct task_struct *tsk);
+static inline struct arch_hw_breakpoint *counter_arch_bp(struct perf_event *bp)
+{
+ return &bp->hw.info;
+}
+
#else /* !CONFIG_HAVE_HW_BREAKPOINT */
static inline struct perf_event *
@@ -126,6 +126,11 @@ static inline void release_bp_slot(struct perf_event *bp) { }
static inline void flush_ptrace_hw_breakpoint(struct task_struct *tsk) { }
+static inline struct arch_hw_breakpoint *counter_arch_bp(struct perf_event *bp)
+{
+ return NULL;
+}
+
#endif /* CONFIG_HAVE_HW_BREAKPOINT */
#endif /* _LINUX_HW_BREAKPOINT_H */