You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
hrtimer: Revert CLOCK_MONOTONIC_RAW support
Revert commits:a6e707ddbd: KVM: arm/arm64: timer: Switch to CLOCK_MONOTONIC_RAW9006a01829: hrtimer: Catch illegal clockids9c808765e8: hrtimer: Add support for CLOCK_MONOTONIC_RAW Marc found out, that there are fundamental issues with that patch series because __hrtimer_get_next_event() and hrtimer_forward() need support for CLOCK_MONOTONIC_RAW. Nothing which is easily fixed, so revert the whole lot. Reported-by: Marc Zyngier <marc.zyngier@arm.com> Link: http://lkml.kernel.org/r/56D6CEF0.8060607@arm.com Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
+2
-16
@@ -90,30 +90,19 @@ DEFINE_PER_CPU(struct hrtimer_cpu_base, hrtimer_bases) =
|
||||
.clockid = CLOCK_TAI,
|
||||
.get_time = &ktime_get_clocktai,
|
||||
},
|
||||
{
|
||||
.index = HRTIMER_BASE_MONOTONIC_RAW,
|
||||
.clockid = CLOCK_MONOTONIC_RAW,
|
||||
.get_time = &ktime_get_raw,
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
static const int hrtimer_clock_to_base_table[MAX_CLOCKS] = {
|
||||
/* Make sure we catch unsupported clockids */
|
||||
[0 ... MAX_CLOCKS - 1] = HRTIMER_MAX_CLOCK_BASES,
|
||||
|
||||
[CLOCK_REALTIME] = HRTIMER_BASE_REALTIME,
|
||||
[CLOCK_MONOTONIC] = HRTIMER_BASE_MONOTONIC,
|
||||
[CLOCK_MONOTONIC_RAW] = HRTIMER_BASE_MONOTONIC_RAW,
|
||||
[CLOCK_BOOTTIME] = HRTIMER_BASE_BOOTTIME,
|
||||
[CLOCK_TAI] = HRTIMER_BASE_TAI,
|
||||
};
|
||||
|
||||
static inline int hrtimer_clockid_to_base(clockid_t clock_id)
|
||||
{
|
||||
int base = hrtimer_clock_to_base_table[clock_id];
|
||||
BUG_ON(base == HRTIMER_MAX_CLOCK_BASES);
|
||||
return base;
|
||||
return hrtimer_clock_to_base_table[clock_id];
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1279,10 +1268,7 @@ static void __hrtimer_run_queues(struct hrtimer_cpu_base *cpu_base, ktime_t now)
|
||||
if (!(active & 0x01))
|
||||
continue;
|
||||
|
||||
if (unlikely(base->index == HRTIMER_BASE_MONOTONIC_RAW))
|
||||
basenow = ktime_get_raw();
|
||||
else
|
||||
basenow = ktime_add(now, base->offset);
|
||||
basenow = ktime_add(now, base->offset);
|
||||
|
||||
while ((node = timerqueue_getnext(&base->active))) {
|
||||
struct hrtimer *timer;
|
||||
|
||||
Reference in New Issue
Block a user