]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
s390/stp: Remove udelay from stp_sync_clock()
authorSven Schnelle <svens@linux.ibm.com>
Thu, 3 Jul 2025 11:50:27 +0000 (13:50 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:25:56 +0000 (16:25 +0200)
commit02f0fa64233cab06e4ead26a70727291af6a98d5
tree28108fdde267f465280788eaff9c96acc0d42d0f
parent39ffb7859d5e885d4a2016691a1e330c00df7315
s390/stp: Remove udelay from stp_sync_clock()

[ Upstream commit b367017cdac21781a74eff4e208d3d38e1f38d3f ]

When an stp sync check is handled on a system with multiple
cpus each cpu gets a machine check but only the first one
actually handles the sync operation. All other CPUs spin
waiting for the first one to finish with a short udelay().
But udelay can't be used here as the first CPU modifies tod_clock_base
before performing the sync op. During this timeframe
get_tod_clock_monotonic() might return a non-monotonic time.

The time spent waiting should be very short and udelay is a busy loop
anyways, therefore simply remove the udelay.

Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/s390/kernel/time.c