Use a SYSINIT to init the array of interrupt names on arm. This was

called from initarm() in arm/machdep.c, but many legacy arm platforms
have their own private initarm(), so a SYSINIT fixes everyone.

Reported by:	jmg
This commit is contained in:
Ian Lepore 2014-08-06 21:27:15 +00:00
parent 4beaa0151a
commit 2ac725a4ec
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=269646
2 changed files with 5 additions and 3 deletions

View file

@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/syslog.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/proc.h>
#include <sys/bus.h>
@ -75,8 +76,8 @@ size_t sintrnames = sizeof(intrnames);
* assumptions of vmstat(8) and the kdb "show intrcnt" command, the two
* consumers of this data.
*/
void
arm_intrnames_init(void)
static void
intr_init(void *unused)
{
int i;
@ -86,6 +87,8 @@ arm_intrnames_init(void)
}
}
SYSINIT(intr_init, SI_SUB_INTR, SI_ORDER_FIRST, intr_init, NULL);
void
arm_setup_irqhandler(const char *name, driver_filter_t *filt,
void (*hand)(void*), void *arg, int irq, int flags, void **cookiep)

View file

@ -1278,7 +1278,6 @@ initarm(struct arm_boot_params *abp)
init_proc0(kernelstack.pv_va);
arm_intrnames_init();
arm_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL);
pmap_bootstrap(freemempos, &kernel_l1pt);
msgbufp = (void *)msgbufpv.pv_va;