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.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/s390/oprofile/init.c b/arch/s390/oprofile/init.c
index 0c2d94b94f0..6efc18b5e60 100644
--- a/arch/s390/oprofile/init.c
+++ b/arch/s390/oprofile/init.c
@@ -23,7 +23,7 @@ extern void s390_backtrace(struct pt_regs * const regs, unsigned int depth);
23 23
24#include "hwsampler.h" 24#include "hwsampler.h"
25 25
26#define DEFAULT_INTERVAL 4096 26#define DEFAULT_INTERVAL 4127518
27 27
28#define DEFAULT_SDBT_BLOCKS 1 28#define DEFAULT_SDBT_BLOCKS 1
29#define DEFAULT_SDB_BLOCKS 511 29#define DEFAULT_SDB_BLOCKS 511
@@ -149,6 +149,12 @@ static int oprofile_hwsampler_init(struct oprofile_operations *ops)
149 if (oprofile_max_interval == 0) 149 if (oprofile_max_interval == 0)
150 return -ENODEV; 150 return -ENODEV;
151 151
152 /* The initial value should be sane */
153 if (oprofile_hw_interval < oprofile_min_interval)
154 oprofile_hw_interval = oprofile_min_interval;
155 if (oprofile_hw_interval > oprofile_max_interval)
156 oprofile_hw_interval = oprofile_max_interval;
157
152 if (oprofile_timer_init(ops)) 158 if (oprofile_timer_init(ops))
153 return -ENODEV; 159 return -ENODEV;
154 160