Skip to content

Commit

Permalink
sh: oprofile: Make sure the backtrace op is available for timer-fallb…
Browse files Browse the repository at this point in the history
…ack.

Presently with hardware counter support disabled the backtrace op never
gets initialized. This is a regression over the previous behaviour, so
simply add it back in.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Paul Mundt committed Oct 27, 2010
1 parent d1ba71f commit 7c84247
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/sh/oprofile/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
#include <linux/slab.h>
#include <asm/processor.h>

#ifdef CONFIG_HW_PERF_EVENTS
extern void sh_backtrace(struct pt_regs * const regs, unsigned int depth);

#ifdef CONFIG_HW_PERF_EVENTS
/*
* This will need to be reworked when multiple PMUs are supported.
*/
Expand Down Expand Up @@ -57,7 +57,7 @@ void __exit oprofile_arch_exit(void)
#else
int __init oprofile_arch_init(struct oprofile_operations *ops)
{
pr_info("oprofile: hardware counters not available\n");
ops->backtrace = sh_backtrace;
return -ENODEV;
}
void __exit oprofile_arch_exit(void) {}
Expand Down

0 comments on commit 7c84247

Please sign in to comment.