aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/oprofile/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/oprofile/init.c')
-rw-r--r--arch/s390/oprofile/init.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/arch/s390/oprofile/init.c b/arch/s390/oprofile/init.c
index 16c76def4a9d..c63d7e58352b 100644
--- a/arch/s390/oprofile/init.c
+++ b/arch/s390/oprofile/init.c
@@ -18,6 +18,11 @@
18#include <linux/fs.h> 18#include <linux/fs.h>
19 19
20#include "../../../drivers/oprofile/oprof.h" 20#include "../../../drivers/oprofile/oprof.h"
21
22extern void s390_backtrace(struct pt_regs * const regs, unsigned int depth);
23
24#ifdef CONFIG_64BIT
25
21#include "hwsampler.h" 26#include "hwsampler.h"
22 27
23#define DEFAULT_INTERVAL 4096 28#define DEFAULT_INTERVAL 4096
@@ -37,8 +42,6 @@ static int hwsampler_running; /* start_mutex must be held to change */
37 42
38static struct oprofile_operations timer_ops; 43static struct oprofile_operations timer_ops;
39 44
40extern void s390_backtrace(struct pt_regs * const regs, unsigned int depth);
41
42static int oprofile_hwsampler_start(void) 45static int oprofile_hwsampler_start(void)
43{ 46{
44 int retval; 47 int retval;
@@ -172,14 +175,22 @@ static void oprofile_hwsampler_exit(void)
172 hwsampler_shutdown(); 175 hwsampler_shutdown();
173} 176}
174 177
178#endif /* CONFIG_64BIT */
179
175int __init oprofile_arch_init(struct oprofile_operations *ops) 180int __init oprofile_arch_init(struct oprofile_operations *ops)
176{ 181{
177 ops->backtrace = s390_backtrace; 182 ops->backtrace = s390_backtrace;
178 183
184#ifdef CONFIG_64BIT
179 return oprofile_hwsampler_init(ops); 185 return oprofile_hwsampler_init(ops);
186#else
187 return -ENODEV;
188#endif
180} 189}
181 190
182void oprofile_arch_exit(void) 191void oprofile_arch_exit(void)
183{ 192{
193#ifdef CONFIG_64BIT
184 oprofile_hwsampler_exit(); 194 oprofile_hwsampler_exit();
195#endif
185} 196}