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