git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'timers/for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[pandora-kernel.git]
/
kernel
/
hrtimer.c
diff --git
a/kernel/hrtimer.c
b/kernel/hrtimer.c
index
9af1d6a
..
2913a8b
100644
(file)
--- a/
kernel/hrtimer.c
+++ b/
kernel/hrtimer.c
@@
-153,15
+153,6
@@
static void hrtimer_get_softirq_time(struct hrtimer_cpu_base *base)
ktime_add(xtim, tomono);
}
ktime_add(xtim, tomono);
}
-/*
- * Helper function to check, whether the timer is running the callback
- * function
- */
-static inline int hrtimer_callback_running(struct hrtimer *timer)
-{
- return timer->state & HRTIMER_STATE_CALLBACK;
-}
-
/*
* Functions and macros which are different for UP/SMP systems are kept in a
* single place
/*
* Functions and macros which are different for UP/SMP systems are kept in a
* single place
@@
-309,11
+300,10
@@
EXPORT_SYMBOL_GPL(ktime_sub_ns);
*/
u64 ktime_divns(const ktime_t kt, s64 div)
{
*/
u64 ktime_divns(const ktime_t kt, s64 div)
{
- u64 dclc
, inc, dns
;
+ u64 dclc;
int sft = 0;
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++;
/* Make sure the divisor is less than 2^32: */
while (div >> 32) {
sft++;
@@
-641,8
+631,6
@@
void clock_was_set(void)
*/
void hres_timers_resume(void)
{
*/
void hres_timers_resume(void)
{
- WARN_ON_ONCE(num_online_cpus() > 1);
-
/* Retrigger the CPU local events: */
retrigger_next_event(NULL);
}
/* Retrigger the CPU local events: */
retrigger_next_event(NULL);
}
@@
-1012,10
+1000,18
@@
hrtimer_start(struct hrtimer *timer, ktime_t tim, const enum hrtimer_mode mode)
*/
raise = timer->state == HRTIMER_STATE_PENDING;
*/
raise = timer->state == HRTIMER_STATE_PENDING;
+ /*
+ * We use preempt_disable to prevent this task from migrating after
+ * setting up the softirq and raising it. Otherwise, if me migrate
+ * we will raise the softirq on the wrong CPU.
+ */
+ preempt_disable();
+
unlock_hrtimer_base(timer, &flags);
if (raise)
hrtimer_raise_softirq();
unlock_hrtimer_base(timer, &flags);
if (raise)
hrtimer_raise_softirq();
+ preempt_enable();
return ret;
}
return ret;
}
@@
-1087,7
+1083,7
@@
ktime_t hrtimer_get_remaining(const struct hrtimer *timer)
}
EXPORT_SYMBOL_GPL(hrtimer_get_remaining);
}
EXPORT_SYMBOL_GPL(hrtimer_get_remaining);
-#if
defined(CONFIG_NO_IDLE_HZ) || defined(CONFIG_NO_HZ)
+#if
def CONFIG_NO_HZ
/**
* hrtimer_get_next_event - get the time until next expiry event
*
/**
* hrtimer_get_next_event - get the time until next expiry event
*
@@
-1678,7
+1674,7
@@
void __init hrtimers_init(void)
(void *)(long)smp_processor_id());
register_cpu_notifier(&hrtimers_nb);
#ifdef CONFIG_HIGH_RES_TIMERS
(void *)(long)smp_processor_id());
register_cpu_notifier(&hrtimers_nb);
#ifdef CONFIG_HIGH_RES_TIMERS
- open_softirq(HRTIMER_SOFTIRQ, run_hrtimer_softirq
, NULL
);
+ open_softirq(HRTIMER_SOFTIRQ, run_hrtimer_softirq);
#endif
}
#endif
}