aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2006-01-12 05:36:14 -0500
committerThomas Gleixner <tglx@linutronix.de>2006-01-12 05:36:14 -0500
commite2787630c1abb075c935cf47e91beb7c656f48c4 (patch)
tree43b6ee44b9f81fdb33283313f167d6ecec2b0243 /kernel
parent288867ec5c377db82933b64460ce050e5c998ee9 (diff)
[hrtimer] Change resolution storage to ktime_t format
Change the storage format of the per base resolution to ktime_t to make it easier accessible in the hrtimers code. Change the resolution from (NSEC_PER_SEC/HZ) to TICK_NSEC as Roman pointed out. TICK_NSEC is closer to the real resolution. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/hrtimer.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c
index e6e8278bcb18..76d759ce6231 100644
--- a/kernel/hrtimer.c
+++ b/kernel/hrtimer.c
@@ -518,9 +518,8 @@ int hrtimer_get_res(const clockid_t which_clock, struct timespec *tp)
518{ 518{
519 struct hrtimer_base *bases; 519 struct hrtimer_base *bases;
520 520
521 tp->tv_sec = 0;
522 bases = per_cpu(hrtimer_bases, raw_smp_processor_id()); 521 bases = per_cpu(hrtimer_bases, raw_smp_processor_id());
523 tp->tv_nsec = bases[which_clock].resolution; 522 *tp = ktime_to_timespec(bases[which_clock].resolution);
524 523
525 return 0; 524 return 0;
526} 525}