mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
hrtimer: Get rid of the resolution field in hrtimer_clock_base
The field has no value because all clock bases have the same resolution. The resolution only changes when we switch to high resolution timer mode. We can evaluate that from a single static variable as well. In the !HIGHRES case its simply a constant. Export the variable, so we can simplify the usage sites. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Preeti U Murthy <preeti@linux.vnet.ibm.com> Acked-by: Peter Zijlstra <peterz@infradead.org> Cc: Viresh Kumar <viresh.kumar@linaro.org> Cc: Marcelo Tosatti <mtosatti@redhat.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Link: http://lkml.kernel.org/r/20150414203500.645454122@linutronix.de Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
parent
d9f0acdeef
commit
398ca17fb5
3 changed files with 17 additions and 23 deletions
|
@ -137,7 +137,6 @@ struct hrtimer_sleeper {
|
|||
* timer to a base on another cpu.
|
||||
* @clockid: clock id for per_cpu support
|
||||
* @active: red black tree root node for the active timers
|
||||
* @resolution: the resolution of the clock, in nanoseconds
|
||||
* @get_time: function to retrieve the current time of the clock
|
||||
* @softirq_time: the time when running the hrtimer queue in the softirq
|
||||
* @offset: offset of this clock to the monotonic base
|
||||
|
@ -147,7 +146,6 @@ struct hrtimer_clock_base {
|
|||
int index;
|
||||
clockid_t clockid;
|
||||
struct timerqueue_head active;
|
||||
ktime_t resolution;
|
||||
ktime_t (*get_time)(void);
|
||||
ktime_t softirq_time;
|
||||
ktime_t offset;
|
||||
|
@ -295,11 +293,15 @@ extern void hrtimer_peek_ahead_timers(void);
|
|||
|
||||
extern void clock_was_set_delayed(void);
|
||||
|
||||
extern unsigned int hrtimer_resolution;
|
||||
|
||||
#else
|
||||
|
||||
# define MONOTONIC_RES_NSEC LOW_RES_NSEC
|
||||
# define KTIME_MONOTONIC_RES KTIME_LOW_RES
|
||||
|
||||
#define hrtimer_resolution LOW_RES_NSEC
|
||||
|
||||
static inline void hrtimer_peek_ahead_timers(void) { }
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue