From: tip-bot for Frederic Weisbecker <fweisbec@gmail.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
fweisbec@gmail.com, tglx@linutronix.de,
prasad@linux.vnet.ibm.com, mingo@elte.hu
Subject: [tip:perf/core] hw-breakpoints: Provide an off-case for counter_arch_bp()
Date: Sat, 21 Nov 2009 13:38:54 GMT [thread overview]
Message-ID: <tip-687b16fb617bd446439425a368ad7c7bbd202c73@git.kernel.org> (raw)
In-Reply-To: <1258114575-32655-1-git-send-email-fweisbec@gmail.com>
Commit-ID: 687b16fb617bd446439425a368ad7c7bbd202c73
Gitweb: http://git.kernel.org/tip/687b16fb617bd446439425a368ad7c7bbd202c73
Author: Frederic Weisbecker <fweisbec@gmail.com>
AuthorDate: Fri, 13 Nov 2009 13:16:15 +0100
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Sat, 14 Nov 2009 00:27:38 +0100
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>
---
include/linux/hw_breakpoint.h | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/include/linux/hw_breakpoint.h b/include/linux/hw_breakpoint.h
index 7eba9b9..18710e0 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 */
next prev parent reply other threads:[~2009-11-21 13:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-13 12:16 [PATCH] hw-breakpoints: Provide an off-case for counter_arch_bp() Frederic Weisbecker
2009-11-21 13:38 ` tip-bot for Frederic Weisbecker [this message]
2009-11-21 13:39 ` [tip:perf/core] hw-breakpoints: Fix build on !perf architectures tip-bot for Ingo Molnar
2009-11-21 13:39 ` [tip:perf/core] hw-breakpoints, x86: Fix modular KVM build tip-bot for Ingo Molnar
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-687b16fb617bd446439425a368ad7c7bbd202c73@git.kernel.org \
--to=fweisbec@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=prasad@linux.vnet.ibm.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.