MIPS: sync-r4k: do slave counter synchronization with disabled HW interrupts
synchronise_count_slave() called with an enabled in mips_clockevent_init() timer interrupt which may decrease synchronization precision. Signed-off-by: Sergey Korolev <s.korolev@ndmsystems.com> Signed-off-by: Paul Burton <paulburton@kernel.org> Cc: linux-mips@vger.kernel.org Cc: Ralf Baechle <ralf@linux-mips.org> Cc: James Hogan <jhogan@kernel.org> Cc: linux-kernel@vger.kernel.org
This commit is contained in:
parent
c0e79fd897
commit
0956be29a9
|
@ -90,6 +90,9 @@ void synchronise_count_master(int cpu)
|
||||||
void synchronise_count_slave(int cpu)
|
void synchronise_count_slave(int cpu)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
unsigned long flags;
|
||||||
|
|
||||||
|
local_irq_save(flags);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Not every cpu is online at the time this gets called,
|
* Not every cpu is online at the time this gets called,
|
||||||
|
@ -113,5 +116,7 @@ void synchronise_count_slave(int cpu)
|
||||||
}
|
}
|
||||||
/* Arrange for an interrupt in a short while */
|
/* Arrange for an interrupt in a short while */
|
||||||
write_c0_compare(read_c0_count() + COUNTON);
|
write_c0_compare(read_c0_count() + COUNTON);
|
||||||
|
|
||||||
|
local_irq_restore(flags);
|
||||||
}
|
}
|
||||||
#undef NR_LOOPS
|
#undef NR_LOOPS
|
||||||
|
|
Loading…
Reference in New Issue