From f5c5957b280c49d0e43e7fb5a028c1356df3ec16 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Tue, 4 May 2021 12:46:29 +0000 Subject: Add a boot hart ID check in the function that matches secondary CPUs as well. ok jsg@ --- sys/arch/riscv64/dev/mainbus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys') 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 * Copyright (c) 2017 Mark Kettenis @@ -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); -- cgit v1.2.3