*/
#include <linux/cpumask.h>
- #include <linux/err.h>
- #include <linux/errno.h>
#include <linux/init.h>
#include <linux/mutex.h>
#include <linux/oprofile.h>
return NULL;
}
}
+ #endif
static int report_trace(struct stackframe *frame, void *d)
{
/* frame pointers should strictly progress back up the stack
* (towards higher addresses) */
- if (tail >= buftail[0].fp)
+ if (tail + 1 >= buftail[0].fp)
return NULL;
return buftail[0].fp-1;
int __init oprofile_arch_init(struct oprofile_operations *ops)
{
+ /* provide backtrace support also in timer mode: */
ops->backtrace = arm_backtrace;
return oprofile_perf_init(ops);
{
oprofile_perf_exit();
}
- #else
- int __init oprofile_arch_init(struct oprofile_operations *ops)
- {
- pr_info("oprofile: hardware counters not available\n");
- return -ENODEV;
- }
- void __exit oprofile_arch_exit(void) {}
- #endif /* CONFIG_HW_PERF_EVENTS */