Skip to content

Commit

Permalink
Merge commit '900cfa46191a7d87cf1891924cb90499287fd235'; branches 'ti…
Browse files Browse the repository at this point in the history
…mers/nohz', 'timers/clocksource' and 'timers/posixtimers' into timers/for-linus
  • Loading branch information
Thomas Gleixner committed Jul 14, 2008
5 parents 4c2a997 + 900cfa4 + 857f3fd + de32a24 + 81d50bb commit 7dc9719
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 5 deletions.
4 changes: 4 additions & 0 deletions Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1571,6 +1571,10 @@ and is between 256 and 4096 characters. It is defined in the file
Format: { parport<nr> | timid | 0 }
See also Documentation/parport.txt.

pmtmr= [X86] Manual setup of pmtmr I/O Port.
Override pmtimer IOPort with a hex value.
e.g. pmtmr=0x508

pnpacpi= [ACPI]
{ off }

Expand Down
19 changes: 19 additions & 0 deletions drivers/clocksource/acpi_pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,3 +215,22 @@ static int __init init_acpi_pm_clocksource(void)
* but we still need to load before device_initcall
*/
fs_initcall(init_acpi_pm_clocksource);

/*
* Allow an override of the IOPort. Stupid BIOSes do not tell us about
* the PMTimer, but we might know where it is.
*/
static int __init parse_pmtmr(char *arg)
{
unsigned long base;

if (strict_strtoul(arg, 16, &base))
return -EINVAL;

printk(KERN_INFO "PMTMR IOPort override: 0x%04x -> 0x%04x\n",
(unsigned int)pmtmr_ioport, base);
pmtmr_ioport = base;

return 1;
}
__setup("pmtmr=", parse_pmtmr);
7 changes: 2 additions & 5 deletions kernel/hrtimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,11 +300,10 @@ EXPORT_SYMBOL_GPL(ktime_sub_ns);
*/
u64 ktime_divns(const ktime_t kt, s64 div)
{
u64 dclc, inc, dns;
u64 dclc;
int sft = 0;

dclc = dns = ktime_to_ns(kt);
inc = div;
dclc = ktime_to_ns(kt);
/* Make sure the divisor is less than 2^32: */
while (div >> 32) {
sft++;
Expand Down Expand Up @@ -632,8 +631,6 @@ void clock_was_set(void)
*/
void hres_timers_resume(void)
{
WARN_ON_ONCE(num_online_cpus() > 1);

/* Retrigger the CPU local events: */
retrigger_next_event(NULL);
}
Expand Down
3 changes: 3 additions & 0 deletions kernel/posix-cpu-timers.c
Original file line number Diff line number Diff line change
Expand Up @@ -1037,6 +1037,9 @@ static void check_thread_timers(struct task_struct *tsk,
sig->rlim[RLIMIT_RTTIME].rlim_cur +=
USEC_PER_SEC;
}
printk(KERN_INFO
"RT Watchdog Timeout: %s[%d]\n",
tsk->comm, task_pid_nr(tsk));
__group_send_sig_info(SIGXCPU, SEND_SIG_PRIV, tsk);
}
}
Expand Down
8 changes: 8 additions & 0 deletions kernel/time/tick-sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ static void tick_do_update_jiffies64(ktime_t now)
unsigned long ticks = 0;
ktime_t delta;

/*
* Do a quick check without holding xtime_lock:
*/
delta = ktime_sub(now, last_jiffies_update);
if (delta.tv64 < tick_period.tv64)
return;

/* Reevalute with xtime_lock held */
write_seqlock(&xtime_lock);

Expand Down Expand Up @@ -228,6 +235,7 @@ void tick_nohz_stop_sched_tick(void)
local_softirq_pending());
ratelimit++;
}
goto end;
}

ts->idle_calls++;
Expand Down

0 comments on commit 7dc9719

Please sign in to comment.