From: jmatthew Date: Tue, 12 Sep 2023 08:29:28 +0000 (+0000) Subject: Store ITS ID in struct interrupt_controller so it can be used to look up X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=550856c913e16627b4fcacb760bc90add0e3cf56;p=openbsd Store ITS ID in struct interrupt_controller so it can be used to look up the right ITS to use when establishing interrupts. ok kettenis@ patrick@ --- diff --git a/sys/arch/arm64/dev/agintc.c b/sys/arch/arm64/dev/agintc.c index 7f4a31aae45..81fa97f70b2 100644 --- a/sys/arch/arm64/dev/agintc.c +++ b/sys/arch/arm64/dev/agintc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: agintc.c,v 1.52 2023/07/07 10:11:39 patrick Exp $ */ +/* $OpenBSD: agintc.c,v 1.53 2023/09/12 08:29:28 jmatthew Exp $ */ /* * Copyright (c) 2007, 2009, 2011, 2017 Dale Rahn * Copyright (c) 2018 Mark Kettenis @@ -1797,6 +1797,8 @@ agintc_msi_attach(struct device *parent, struct device *self, void *aux) sc->sc_ic.ic_establish_msi = agintc_intr_establish_msi; sc->sc_ic.ic_disestablish = agintc_intr_disestablish_msi; sc->sc_ic.ic_barrier = agintc_intr_barrier_msi; + sc->sc_ic.ic_gic_its_id = OF_getpropint(faa->fa_node, + "openbsd,gic-its-id", 0); arm_intr_register_fdt(&sc->sc_ic); return; diff --git a/sys/arch/arm64/include/intr.h b/sys/arch/arm64/include/intr.h index 0f1da4d05eb..a16218458e3 100644 --- a/sys/arch/arm64/include/intr.h +++ b/sys/arch/arm64/include/intr.h @@ -1,4 +1,4 @@ -/* $OpenBSD: intr.h,v 1.21 2022/12/21 22:30:42 kettenis Exp $ */ +/* $OpenBSD: intr.h,v 1.22 2023/09/12 08:29:28 jmatthew Exp $ */ /* * Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -162,6 +162,7 @@ struct interrupt_controller { LIST_ENTRY(interrupt_controller) ic_list; uint32_t ic_phandle; uint32_t ic_cells; + uint32_t ic_gic_its_id; }; void arm_intr_init_fdt(void);