]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/powermac: Use early_* IO variants in via_calibrate_decr()
authorBenjamin Gray <bgray@linux.ibm.com>
Thu, 6 Jul 2023 01:08:16 +0000 (11:08 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Sep 2023 07:42:24 +0000 (09:42 +0200)
commit59c4b9a2caf4b8ec22d83424b8493b4697a78b4f
treee5742f3885d333c527c8384aba3d64b3df4cc757
parent54d3fba7d8c523b52e1733773769755b6a887512
powerpc/powermac: Use early_* IO variants in via_calibrate_decr()

[ Upstream commit 86582e6189dd8f9f52c25d46c70fe5d111da6345 ]

On a powermac platform, via the call path:

  start_kernel()
    time_init()
      ppc_md.calibrate_decr() (pmac_calibrate_decr)
        via_calibrate_decr()

ioremap() and iounmap() are called. The unmap can enable interrupts
unexpectedly (cond_resched() in vunmap_pmd_range()), which causes a
warning later in the boot sequence in start_kernel().

Use the early_* variants of these IO functions to prevent this.

The issue is pre-existing, but is surfaced by commit 721255b9826b
("genirq: Use a maple tree for interrupt descriptor management").

Signed-off-by: Benjamin Gray <bgray@linux.ibm.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230706010816.72682-1-bgray@linux.ibm.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/platforms/powermac/time.c