linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: oprofile: Always allow backtraces
@ 2011-01-19 20:54 Ari Kauppi
  2011-01-20  9:42 ` Will Deacon
  2011-01-20 12:31 ` Sergei Shtylyov
  0 siblings, 2 replies; 8+ messages in thread
From: Ari Kauppi @ 2011-01-19 20:54 UTC (permalink / raw)
  To: linux-arm-kernel

Always allow backtrace when using oprofile on ARM, even if a PMU
isn't present.

Restores functionality originally introduced in
1b7b56982fdcd9d85effd76f3928cf5d6eb26155 by Richard Purdie.

Signed-off-by: Ari Kauppi <kauppi@papupata.org>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Matt Fleming <matt@console-pimps.org>
---
 arch/arm/oprofile/common.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/arch/arm/oprofile/common.c b/arch/arm/oprofile/common.c
index 8aa9744..a23e5ae 100644
--- a/arch/arm/oprofile/common.c
+++ b/arch/arm/oprofile/common.c
@@ -46,6 +46,7 @@ char *op_name_from_perf_id(void)
 		return NULL;
 	}
 }
+#endif
 
 static int report_trace(struct stackframe *frame, void *d)
 {
@@ -109,6 +110,7 @@ static void arm_backtrace(struct pt_regs * const regs, unsigned int depth)
 		tail = user_backtrace(tail);
 }
 
+#ifdef CONFIG_HW_PERF_EVENTS
 int __init oprofile_arch_init(struct oprofile_operations *ops)
 {
 	ops->backtrace		= arm_backtrace;
@@ -124,6 +126,8 @@ void __exit oprofile_arch_exit(void)
 int __init oprofile_arch_init(struct oprofile_operations *ops)
 {
 	pr_info("oprofile: hardware counters not available\n");
+	ops->backtrace		= arm_backtrace;
+
 	return -ENODEV;
 }
 void __exit oprofile_arch_exit(void) {}
-- 
1.7.4.rc2.3.g60a2e

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-01-20 12:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-19 20:54 [PATCH] ARM: oprofile: Always allow backtraces Ari Kauppi
2011-01-20  9:42 ` Will Deacon
2011-01-20  9:52   ` Robert Richter
2011-01-20  9:57     ` Robert Richter
2011-01-20 10:02     ` Will Deacon
2011-01-20 10:17     ` Ari Kauppi
2011-01-20 10:46       ` Robert Richter
2011-01-20 12:31 ` Sergei Shtylyov

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).