Commit d3d74453 authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Ingo Molnar

hrtimer: fixup the HRTIMER_CB_IRQSAFE_NO_SOFTIRQ fallback

Currently all highres=off timers are run from softirq context, but
HRTIMER_CB_IRQSAFE_NO_SOFTIRQ timers expect to run from irq context.

Fix this up by splitting it similar to the highres=on case.
Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 2d44ae4d
...@@ -115,10 +115,8 @@ struct hrtimer { ...@@ -115,10 +115,8 @@ struct hrtimer {
enum hrtimer_restart (*function)(struct hrtimer *); enum hrtimer_restart (*function)(struct hrtimer *);
struct hrtimer_clock_base *base; struct hrtimer_clock_base *base;
unsigned long state; unsigned long state;
#ifdef CONFIG_HIGH_RES_TIMERS
enum hrtimer_cb_mode cb_mode; enum hrtimer_cb_mode cb_mode;
struct list_head cb_entry; struct list_head cb_entry;
#endif
#ifdef CONFIG_TIMER_STATS #ifdef CONFIG_TIMER_STATS
void *start_site; void *start_site;
char start_comm[16]; char start_comm[16];
...@@ -194,10 +192,10 @@ struct hrtimer_cpu_base { ...@@ -194,10 +192,10 @@ struct hrtimer_cpu_base {
spinlock_t lock; spinlock_t lock;
struct lock_class_key lock_key; struct lock_class_key lock_key;
struct hrtimer_clock_base clock_base[HRTIMER_MAX_CLOCK_BASES]; struct hrtimer_clock_base clock_base[HRTIMER_MAX_CLOCK_BASES];
struct list_head cb_pending;
#ifdef CONFIG_HIGH_RES_TIMERS #ifdef CONFIG_HIGH_RES_TIMERS
ktime_t expires_next; ktime_t expires_next;
int hres_active; int hres_active;
struct list_head cb_pending;
unsigned long nr_events; unsigned long nr_events;
#endif #endif
}; };
...@@ -319,6 +317,7 @@ extern void hrtimer_init_sleeper(struct hrtimer_sleeper *sl, ...@@ -319,6 +317,7 @@ extern void hrtimer_init_sleeper(struct hrtimer_sleeper *sl,
/* Soft interrupt function to run the hrtimer queues: */ /* Soft interrupt function to run the hrtimer queues: */
extern void hrtimer_run_queues(void); extern void hrtimer_run_queues(void);
extern void hrtimer_run_pending(void);
/* Bootup initialization: */ /* Bootup initialization: */
extern void __init hrtimers_init(void); extern void __init hrtimers_init(void);
......
This diff is collapsed.
...@@ -896,7 +896,7 @@ static void run_timer_softirq(struct softirq_action *h) ...@@ -896,7 +896,7 @@ static void run_timer_softirq(struct softirq_action *h)
{ {
tvec_base_t *base = __get_cpu_var(tvec_bases); tvec_base_t *base = __get_cpu_var(tvec_bases);
hrtimer_run_queues(); hrtimer_run_pending();
if (time_after_eq(jiffies, base->timer_jiffies)) if (time_after_eq(jiffies, base->timer_jiffies))
__run_timers(base); __run_timers(base);
...@@ -907,6 +907,7 @@ static void run_timer_softirq(struct softirq_action *h) ...@@ -907,6 +907,7 @@ static void run_timer_softirq(struct softirq_action *h)
*/ */
void run_local_timers(void) void run_local_timers(void)
{ {
hrtimer_run_queues();
raise_softirq(TIMER_SOFTIRQ); raise_softirq(TIMER_SOFTIRQ);
softlockup_tick(); softlockup_tick();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment