]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - include/linux/hrtimer.h
hrtimer: fixup the HRTIMER_CB_IRQSAFE_NO_SOFTIRQ fallback
[mv-sheeva.git] / include / linux / hrtimer.h
index 5bdbc744e773096dbcbdd49d12a81afe90beaa90..49067f14fac190ea7bb492fceb1befdcf46aadce 100644 (file)
@@ -115,10 +115,8 @@ struct hrtimer {
        enum hrtimer_restart            (*function)(struct hrtimer *);
        struct hrtimer_clock_base       *base;
        unsigned long                   state;
-#ifdef CONFIG_HIGH_RES_TIMERS
        enum hrtimer_cb_mode            cb_mode;
        struct list_head                cb_entry;
-#endif
 #ifdef CONFIG_TIMER_STATS
        void                            *start_site;
        char                            start_comm[16];
@@ -194,10 +192,10 @@ struct hrtimer_cpu_base {
        spinlock_t                      lock;
        struct lock_class_key           lock_key;
        struct hrtimer_clock_base       clock_base[HRTIMER_MAX_CLOCK_BASES];
+       struct list_head                cb_pending;
 #ifdef CONFIG_HIGH_RES_TIMERS
        ktime_t                         expires_next;
        int                             hres_active;
-       struct list_head                cb_pending;
        unsigned long                   nr_events;
 #endif
 };
@@ -206,6 +204,7 @@ struct hrtimer_cpu_base {
 struct clock_event_device;
 
 extern void clock_was_set(void);
+extern void hres_timers_resume(void);
 extern void hrtimer_interrupt(struct clock_event_device *dev);
 
 /*
@@ -216,6 +215,11 @@ static inline ktime_t hrtimer_cb_get_time(struct hrtimer *timer)
        return timer->base->get_time();
 }
 
+static inline int hrtimer_is_hres_active(struct hrtimer *timer)
+{
+       return timer->base->cpu_base->hres_active;
+}
+
 /*
  * The resolution of the clocks. The resolution value is returned in
  * the clock_getres() system call to give application programmers an
@@ -236,6 +240,8 @@ static inline ktime_t hrtimer_cb_get_time(struct hrtimer *timer)
  */
 static inline void clock_was_set(void) { }
 
+static inline void hres_timers_resume(void) { }
+
 /*
  * In non high resolution mode the time reference is taken from
  * the base softirq time variable.
@@ -245,6 +251,10 @@ static inline ktime_t hrtimer_cb_get_time(struct hrtimer *timer)
        return timer->base->softirq_time;
 }
 
+static inline int hrtimer_is_hres_active(struct hrtimer *timer)
+{
+       return 0;
+}
 #endif
 
 extern ktime_t ktime_get(void);
@@ -297,7 +307,7 @@ hrtimer_forward(struct hrtimer *timer, ktime_t now, ktime_t interval);
 
 /* Precise sleep: */
 extern long hrtimer_nanosleep(struct timespec *rqtp,
-                             struct timespec __user *rmtp,
+                             struct timespec *rmtp,
                              const enum hrtimer_mode mode,
                              const clockid_t clockid);
 extern long hrtimer_nanosleep_restart(struct restart_block *restart_block);
@@ -307,6 +317,7 @@ extern void hrtimer_init_sleeper(struct hrtimer_sleeper *sl,
 
 /* Soft interrupt function to run the hrtimer queues: */
 extern void hrtimer_run_queues(void);
+extern void hrtimer_run_pending(void);
 
 /* Bootup initialization: */
 extern void __init hrtimers_init(void);
@@ -326,12 +337,13 @@ extern void sysrq_timer_list_show(void);
 #ifdef CONFIG_TIMER_STATS
 
 extern void timer_stats_update_stats(void *timer, pid_t pid, void *startf,
-                                    void *timerf, char * comm);
+                                    void *timerf, char *comm,
+                                    unsigned int timer_flag);
 
 static inline void timer_stats_account_hrtimer(struct hrtimer *timer)
 {
        timer_stats_update_stats(timer, timer->start_pid, timer->start_site,
-                                timer->function, timer->start_comm);
+                                timer->function, timer->start_comm, 0);
 }
 
 extern void __timer_stats_hrtimer_set_start_info(struct hrtimer *timer,