Store ITS ID in struct interrupt_controller so it can be used to look up
authorjmatthew <jmatthew@openbsd.org>
Tue, 12 Sep 2023 08:29:28 +0000 (08:29 +0000)
committerjmatthew <jmatthew@openbsd.org>
Tue, 12 Sep 2023 08:29:28 +0000 (08:29 +0000)
the right ITS to use when establishing interrupts.

ok kettenis@ patrick@

sys/arch/arm64/dev/agintc.c
sys/arch/arm64/include/intr.h

index 7f4a31a..81fa97f 100644 (file)
@@ -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 <drahn@dalerahn.com>
  * Copyright (c) 2018 Mark Kettenis <kettenis@openbsd.org>
@@ -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;
 
index 0f1da4d..a162184 100644 (file)
@@ -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);