]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
mips: fix early kernel panic when setting up interrupt counters
authorOleksandr Tymoshenko <gonzo@FreeBSD.org>
Sat, 30 Jan 2021 06:11:24 +0000 (22:11 -0800)
committerOleksandr Tymoshenko <gonzo@FreeBSD.org>
Sun, 31 Jan 2021 21:44:45 +0000 (13:44 -0800)
commite0a0a3efcb09a10ad1de29aca622ea580b2663d2
tree1f3133aae112c70ca31faeffa5be14637e9d7aec
parent5299d64b2b9f7a25e423ef1785d9402a0ef198d3
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
sys/mips/mips/exception.S
sys/mips/mips/intr_machdep.c