Date: Mon, 1 Feb 2021 07:59:19 GMT From: Oleksandr Tymoshenko <gonzo@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: d6f9c5a6d2f8 - main - mips: fix NLM platforms breakage caused by e0a0a3ef Message-ID: <202102010759.1117xJS9022040@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by gonzo: URL: https://cgit.FreeBSD.org/src/commit/?id=d6f9c5a6d2f87865f9714d2b8dfd1a9f3080c71e commit d6f9c5a6d2f87865f9714d2b8dfd1a9f3080c71e Author: Oleksandr Tymoshenko <gonzo@FreeBSD.org> AuthorDate: 2021-02-01 07:56:22 +0000 Commit: Oleksandr Tymoshenko <gonzo@FreeBSD.org> CommitDate: 2021-02-01 07:56:22 +0000 mips: fix NLM platforms breakage caused by e0a0a3ef NetLogic platforms have their own implementation of cpu_init_interrupts. Apply the same logic to it as to intr_machdep.c. PR: 253051 --- sys/mips/nlm/intr_machdep.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/sys/mips/nlm/intr_machdep.c b/sys/mips/nlm/intr_machdep.c index b66118c06ee8..33bfad1fe882 100644 --- a/sys/mips/nlm/intr_machdep.c +++ b/sys/mips/nlm/intr_machdep.c @@ -59,6 +59,17 @@ __FBSDID("$FreeBSD$"); #include <mips/nlm/hal/pic.h> #include <mips/nlm/xlp.h> +#define INTRCNT_COUNT 256 +#define INTRNAME_LEN (2*MAXCOMLEN + 1) + +MALLOC_DECLARE(M_MIPSINTR); +MALLOC_DEFINE(M_MIPSINTR, "mipsintr", "MIPS interrupt handling"); + +u_long *intrcnt; +char *intrnames; +size_t sintrcnt; +size_t sintrnames; + struct xlp_intrsrc { void (*bus_ack)(int, void *); /* Additional ack */ void *bus_ack_arg; /* arg for additional ack */ @@ -295,6 +306,13 @@ cpu_init_interrupts() int i; char name[MAXCOMLEN + 1]; + intrcnt = mallocarray(INTRCNT_COUNT, sizeof(u_long), M_MIPSINTR, + M_WAITOK | M_ZERO); + intrnames = mallocarray(INTRCNT_COUNT, INTRNAME_LEN, M_MIPSINTR, + M_WAITOK | M_ZERO); + sintrcnt = INTRCNT_COUNT * sizeof(u_long); + sintrnames = INTRCNT_COUNT * INTRNAME_LEN; + /* * Initialize all available vectors so spare IRQ * would show up in systat output
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202102010759.1117xJS9022040>