* [PATCH] MIPS: sync-r4k: do slave counter synchronization with disabled HW interrupts
@ 2020-01-22 12:39 Sergey Korolev
2020-01-23 19:44 ` Paul Burton
0 siblings, 1 reply; 2+ messages in thread
From: Sergey Korolev @ 2020-01-22 12:39 UTC (permalink / raw)
To: linux-mips
Cc: s.korolev, Ralf Baechle, Paul Burton, James Hogan, linux-kernel
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>
---
arch/mips/kernel/sync-r4k.c | 5 +++++
1 file changed, 5 insertions(+)
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
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] MIPS: sync-r4k: do slave counter synchronization with disabled HW interrupts
2020-01-22 12:39 [PATCH] MIPS: sync-r4k: do slave counter synchronization with disabled HW interrupts Sergey Korolev
@ 2020-01-23 19:44 ` Paul Burton
0 siblings, 0 replies; 2+ messages in thread
From: Paul Burton @ 2020-01-23 19:44 UTC (permalink / raw)
To: Sergey Korolev
Cc: linux-mips, s.korolev, Ralf Baechle, Paul Burton, James Hogan,
linux-kernel, linux-mips
Hello,
Sergey Korolev wrote:
> synchronise_count_slave() called with an enabled in mips_clockevent_init()
> timer interrupt which may decrease synchronization precision.
Applied to mips-next.
> commit 0956be29a96c
> https://git.kernel.org/mips/c/0956be29a96c
>
> Signed-off-by: Sergey Korolev <s.korolev@ndmsystems.com>
> Signed-off-by: Paul Burton <paulburton@kernel.org>
Thanks,
Paul
[ This message was auto-generated; if you believe anything is incorrect
then please email paulburton@kernel.org to report it. ]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-01-23 19:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-22 12:39 [PATCH] MIPS: sync-r4k: do slave counter synchronization with disabled HW interrupts Sergey Korolev
2020-01-23 19:44 ` Paul Burton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).