diff options
author | David Howells <dhowells@redhat.com> | 2017-11-13 15:36:33 +0000 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2017-11-13 15:36:33 +0000 |
commit | 81445e63e67a1e98b1c2575fa2b406d4289d2754 (patch) | |
tree | 2d121d1873b3e8ec7b71086c4db2f5cb207a46ec /drivers/clocksource/mips-gic-timer.c | |
parent | ede372dcae15d3ba1d3d52ac45be7a27ce31be28 (diff) | |
parent | b24591e2fcf852ad7ad2ccf745c8220bf378d312 (diff) |
Merge remote-tracking branch 'tip/timers/core' into afs-next
These AFS patches need the timer_reduce() patch from timers/core.
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'drivers/clocksource/mips-gic-timer.c')
-rw-r--r-- | drivers/clocksource/mips-gic-timer.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/clocksource/mips-gic-timer.c b/drivers/clocksource/mips-gic-timer.c index ae3167c28b12..a04808a21d4e 100644 --- a/drivers/clocksource/mips-gic-timer.c +++ b/drivers/clocksource/mips-gic-timer.c @@ -39,16 +39,18 @@ static u64 notrace gic_read_count(void) static int gic_next_event(unsigned long delta, struct clock_event_device *evt) { - unsigned long flags; + int cpu = cpumask_first(evt->cpumask); u64 cnt; int res; cnt = gic_read_count(); cnt += (u64)delta; - local_irq_save(flags); - write_gic_vl_other(mips_cm_vp_id(cpumask_first(evt->cpumask))); - write_gic_vo_compare(cnt); - local_irq_restore(flags); + if (cpu == raw_smp_processor_id()) { + write_gic_vl_compare(cnt); + } else { + write_gic_vl_other(mips_cm_vp_id(cpu)); + write_gic_vo_compare(cnt); + } res = ((int)(gic_read_count() - cnt) >= 0) ? -ETIME : 0; return res; } |