From: Paul Mundt Date: Tue, 12 Oct 2010 22:43:50 +0000 (+0900) Subject: sh: oprofile: Make sure the backtrace op is available for timer-fallback. X-Git-Tag: v2.6.37-rc1~61^2~2 X-Git-Url: https://bbs.cooldavid.org/git/?a=commitdiff_plain;h=7c842470f3ec7457585c277b9c5f535e94796f59;p=net-next-2.6.git 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: Paul Mundt --- diff --git a/arch/sh/oprofile/common.c b/arch/sh/oprofile/common.c index 84533142da9..b4c2d2b946d 100644 --- a/arch/sh/oprofile/common.c +++ b/arch/sh/oprofile/common.c @@ -21,9 +21,9 @@ #include #include -#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) {}