s390/udelay: make it work for the early code
authorVasily Gorbik <gor@linux.ibm.com>
Tue, 13 Oct 2020 20:35:27 +0000 (22:35 +0200)
committerHeiko Carstens <hca@linux.ibm.com>
Mon, 9 Nov 2020 10:20:58 +0000 (11:20 +0100)
commit85cde0192a983b227341be11af2c3625d39bc374
tree5f2ad53b6f1cc90058350ebe04f7e342b509ca09
parent13b5bd8af41ca56fd11cc0281f2a1201d8342233
s390/udelay: make it work for the early code

Currently udelay relies on working EXT interrupts handler, which is not
the case during early startup. In such cases udelay_simple() has to be
used instead.

To avoid mistakes of calling udelay too early, which could happen from
the common code as well - make udelay work for the early code by
introducing static branch and redirecting all udelay calls to
udelay_simple until EXT interrupts handler is fully initialized and
async stack is allocated.

Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/include/asm/delay.h
arch/s390/kernel/setup.c
arch/s390/lib/delay.c