Date: Wed, 10 Jun 2026 04:01:17 +0000 From: Kyle Evans <kevans@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: a53d4b5b2a08 - stable/15 - kern: ofw: provide ofw_bus_destroy_iinfo to teardown interrupt-map Message-ID: <6a28e18d.2733e.51898d05@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch stable/15 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=a53d4b5b2a08e4de390f9800d69367078b8affcf commit a53d4b5b2a08e4de390f9800d69367078b8affcf Author: Kyle Evans <kevans@FreeBSD.org> AuthorDate: 2026-05-09 02:42:50 +0000 Commit: Kyle Evans <kevans@FreeBSD.org> CommitDate: 2026-06-10 04:00:37 +0000 kern: ofw: provide ofw_bus_destroy_iinfo to teardown interrupt-map For symmetry with ofw_bus_setup_iinfo, the next commits will use it to properly cleanup on failure in bcm2838_pci. Reviewed by: andrew (cherry picked from commit b230a7b9a52c0fc948f4f1dcd1225a94674073f6) --- sys/dev/ofw/ofw_bus_subr.c | 12 ++++++++++++ sys/dev/ofw/ofw_bus_subr.h | 1 + 2 files changed, 13 insertions(+) diff --git a/sys/dev/ofw/ofw_bus_subr.c b/sys/dev/ofw/ofw_bus_subr.c index b99d784929bc..8e7c60cdb98d 100644 --- a/sys/dev/ofw/ofw_bus_subr.c +++ b/sys/dev/ofw/ofw_bus_subr.c @@ -349,6 +349,18 @@ ofw_bus_setup_iinfo(phandle_t node, struct ofw_bus_iinfo *ii, int intrsz) } } +void +ofw_bus_destroy_iinfo(struct ofw_bus_iinfo *ii) +{ + + if (ii->opi_imapsz > 0) { + OF_prop_free(ii->opi_imapmsk); + ii->opi_imapsz = 0; + } + + OF_prop_free(ii->opi_imap); +} + int ofw_bus_lookup_imap(phandle_t node, struct ofw_bus_iinfo *ii, void *reg, int regsz, void *pintr, int pintrsz, void *mintr, int mintrsz, diff --git a/sys/dev/ofw/ofw_bus_subr.h b/sys/dev/ofw/ofw_bus_subr.h index 1a33d7655f77..2e13f29a67f6 100644 --- a/sys/dev/ofw/ofw_bus_subr.h +++ b/sys/dev/ofw/ofw_bus_subr.h @@ -86,6 +86,7 @@ bus_get_device_path_t ofw_bus_gen_get_device_path; /* Routines for processing firmware interrupt maps */ void ofw_bus_setup_iinfo(phandle_t, struct ofw_bus_iinfo *, int); +void ofw_bus_destroy_iinfo(struct ofw_bus_iinfo *); int ofw_bus_lookup_imap(phandle_t, struct ofw_bus_iinfo *, void *, int, void *, int, void *, int, phandle_t *); int ofw_bus_search_intrmap(void *, int, void *, int, void *, int, void *,home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a28e18d.2733e.51898d05>
