Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7c842470 authored by Paul Mundt's avatar Paul Mundt
Browse files

sh: oprofile: Make sure the backtrace op is available for timer-fallback.



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: default avatarPaul Mundt <lethal@linux-sh.org>
parent d1ba71f7
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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.
 */
@@ -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) {}