|
@@ -104,10 +104,14 @@ int __init notsc_setup(char *str)
|
|
|
|
|
|
__setup("notsc", notsc_setup);
|
|
|
|
|
|
+static int no_sched_irq_time;
|
|
|
+
|
|
|
static int __init tsc_setup(char *str)
|
|
|
{
|
|
|
if (!strcmp(str, "reliable"))
|
|
|
tsc_clocksource_reliable = 1;
|
|
|
+ if (!strncmp(str, "noirqtime", 9))
|
|
|
+ no_sched_irq_time = 1;
|
|
|
return 1;
|
|
|
}
|
|
|
|
|
@@ -801,6 +805,7 @@ void mark_tsc_unstable(char *reason)
|
|
|
if (!tsc_unstable) {
|
|
|
tsc_unstable = 1;
|
|
|
sched_clock_stable = 0;
|
|
|
+ disable_sched_clock_irqtime();
|
|
|
printk(KERN_INFO "Marking TSC unstable due to %s\n", reason);
|
|
|
/* Change only the rating, when not registered */
|
|
|
if (clocksource_tsc.mult)
|
|
@@ -987,6 +992,9 @@ void __init tsc_init(void)
|
|
|
/* now allow native_sched_clock() to use rdtsc */
|
|
|
tsc_disabled = 0;
|
|
|
|
|
|
+ if (!no_sched_irq_time)
|
|
|
+ enable_sched_clock_irqtime();
|
|
|
+
|
|
|
lpj = ((u64)tsc_khz * 1000);
|
|
|
do_div(lpj, HZ);
|
|
|
lpj_fine = lpj;
|