diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2021-05-04 12:46:29 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2021-05-04 12:46:29 +0000 |
commit | f5c5957b280c49d0e43e7fb5a028c1356df3ec16 (patch) | |
tree | e1e798afb288e671f1e95383272fc962cdf51e60 /sys | |
parent | 4e82b828b5c6fca6a5fcfdbf98c2139db8590ffa (diff) |
Add a boot hart ID check in the function that matches secondary CPUs
as well.
ok jsg@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/riscv64/dev/mainbus.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/riscv64/dev/mainbus.c b/sys/arch/riscv64/dev/mainbus.c index faa9831427f..a43d437fff8 100644 --- a/sys/arch/riscv64/dev/mainbus.c +++ b/sys/arch/riscv64/dev/mainbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mainbus.c,v 1.3 2021/05/04 06:32:58 jsg Exp $ */ +/* $OpenBSD: mainbus.c,v 1.4 2021/05/04 12:46:28 kettenis Exp $ */ /* * Copyright (c) 2016 Patrick Wildt <patrick@blueri.se> * Copyright (c) 2017 Mark Kettenis <kettenis@openbsd.org> @@ -335,7 +335,7 @@ mainbus_match_secondary(struct device *parent, void *match, void *aux) struct fdt_attach_args *fa = aux; struct cfdata *cf = match; - if (fa->fa_nreg < 1) + if (fa->fa_nreg < 1 || fa->fa_reg[0].addr == boot_hart) return 0; return (*cf->cf_attach->ca_match)(parent, match, aux); |