diff options
| author | Ingo Molnar <mingo@kernel.org> | 2017-11-29 09:11:24 +0300 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2017-11-29 09:11:24 +0300 |
| commit | 4fc31ba13d052c2933bf91095c063cf9a39effd0 (patch) | |
| tree | beabb73c2fe245e6541126732895da62e55bc8ee /drivers/clocksource/mips-gic-timer.c | |
| parent | 0e18dd12064e07519f7cbff4149ca7fff620cbed (diff) | |
| parent | b29c6ef7bb1257853c1e31616d84f55e561cf631 (diff) | |
| download | linux-4fc31ba13d052c2933bf91095c063cf9a39effd0.tar.xz | |
Merge branch 'linus' into perf/urgent, to pick up dependent commits
Signed-off-by: Ingo Molnar <mingo@kernel.org>
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; } |
