HomeFreeBSD

MFC: mips: fix early kernel panic when setting up interrupt counters

Description

MFC: mips: fix early kernel panic when setting up interrupt counters

Commit 248f0ca converted intrcnt and intrnames from u_long[]
and char[] to u_long* and char* respectively, but for non-INTRNG mips
these symbols were defined in .S file as a pre-allocated static arrays,
so the problem wasn't cought at compile time. Conversion from an array
to a pointer requires pointer initialization and it wasn't done
for MIPS, so whatever happenned to be in the begginning of intcnt[]
array was used as a pointer value.

Move intrcnt/intrnames to C code and allocate them dynamically
although with a fixed size at the moment.

Reviewed by: emaste
PR: 253051
Differential Revision: https://reviews.freebsd.org/D28424
MFC after: 1 day

(cherry picked from commit e0a0a3efcb09a10ad1de29aca622ea580b2663d2)

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

(cherry picked from commit d6f9c5a6d2f87865f9714d2b8dfd1a9f3080c71e)

Details

Provenance
gonzoAuthored on Feb 1 2021, 7:56 AM
Reviewer
emaste
Differential Revision
D28424: mips: fix early kernel panic when setting up interrupt counters
Parents
rGc738bfc506af: cxgb(4): Remove assumption of physically contiguous mbufs.
Branches
Unknown
Tags
Unknown