summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorSergey Korolev <s.korolev@ndmsystems.com>2020-01-22 15:39:08 +0300
committerPaul Burton <paulburton@kernel.org>2020-01-22 10:16:18 -0800
commit0956be29a96c1ce879b6a8fad1cc61f53c140ec8 (patch)
treedca57a17008ca000af1d3f6f9fd70e507c0d413a /arch
parentc0e79fd89749b0cda1c72049e2772dd2eeada86f (diff)
downloadlinux-stable-0956be29a96c1ce879b6a8fad1cc61f53c140ec8.tar.gz
linux-stable-0956be29a96c1ce879b6a8fad1cc61f53c140ec8.tar.bz2
linux-stable-0956be29a96c1ce879b6a8fad1cc61f53c140ec8.zip
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
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/kernel/sync-r4k.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/mips/kernel/sync-r4k.c b/arch/mips/kernel/sync-r4k.c
index f2973ce87f53..abdd7aaa3311 100644
--- a/arch/mips/kernel/sync-r4k.c
+++ b/arch/mips/kernel/sync-r4k.c
@@ -90,6 +90,9 @@ void synchronise_count_master(int cpu)
void synchronise_count_slave(int cpu)
{
int i;
+ unsigned long flags;
+
+ local_irq_save(flags);
/*
* 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 */
write_c0_compare(read_c0_count() + COUNTON);
+
+ local_irq_restore(flags);
}
#undef NR_LOOPS