diff options
author | Patrick Wildt <patrick@cvs.openbsd.org> | 2020-07-15 12:36:02 +0000 |
---|---|---|
committer | Patrick Wildt <patrick@cvs.openbsd.org> | 2020-07-15 12:36:02 +0000 |
commit | 66430577e8d520fadc6b300f95f3957191df49e2 (patch) | |
tree | 0111eb20d00ffce9127707f9350eb670f5d4b11c | |
parent | 475b288d544e4c7de1dd04e7cbb1e1f19b4438fb (diff) |
Fix agintc(4) for non-MULTIPROCESSOR kernels. Due to the recent changes
the driver expected that it can find all CPUs referenced by the interrupt
controller. Since on non-MP we only spin one core up, the driver won't
ever be able to find them. Relax the requirement for non-MP, since the
info extracted there is only needed for MP.
ok kettenis@
-rw-r--r-- | sys/arch/arm64/dev/agintc.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/arch/arm64/dev/agintc.c b/sys/arch/arm64/dev/agintc.c index 222e786d30a..bde190a4ed4 100644 --- a/sys/arch/arm64/dev/agintc.c +++ b/sys/arch/arm64/dev/agintc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: agintc.c,v 1.24 2020/07/14 16:01:08 patrick Exp $ */ +/* $OpenBSD: agintc.c,v 1.25 2020/07/15 12:36:01 patrick Exp $ */ /* * Copyright (c) 2007, 2009, 2011, 2017 Dale Rahn <drahn@dalerahn.com> * Copyright (c) 2018 Mark Kettenis <kettenis@openbsd.org> @@ -442,11 +442,14 @@ agintc_attach(struct device *parent, struct device *self, void *aux) (ci->ci_mpidr & 0x00ffffff))) break; } - if (ci == NULL) + if (ci != NULL) + sc->sc_cpuremap[ci->ci_cpuid] = nredist; +#ifdef MULTIPROCESSOR + else panic("%s: no CPU found for affinity %08x", sc->sc_sbus.sc_dev.dv_xname, affinity); +#endif - sc->sc_cpuremap[ci->ci_cpuid] = nredist; sc->sc_processor[nredist] = bus_space_read_8(sc->sc_iot, sc->sc_redist_base, offset + GICR_TYPER) >> 8; |