-/* $OpenBSD: bcm2836_intr.c,v 1.7 2018/02/23 21:47:08 kettenis Exp $ */
+/* $OpenBSD: bcm2836_intr.c,v 1.8 2018/02/24 12:46:45 jsg Exp $ */
/*
* Copyright (c) 2007,2009 Dale Rahn <drahn@openbsd.org>
* Copyright (c) 2015 Patrick Wildt <patrick@blueri.se>
struct intrhand {
TAILQ_ENTRY(intrhand) ih_list; /* link on intrq list */
- int (*ih_fun)(void *); /* handler */
+ int (*ih_func)(void *); /* handler */
void *ih_arg; /* arg for handler */
int ih_ipl; /* IPL_* */
int ih_flags;
{
struct bcm_intc_softc *sc = bcm_intc;
struct intrhand *ih;
- int pri, s;
+ int pri, s, handled;
void *arg;
#ifdef DEBUG_INTC
else
arg = frame;
- if (ih->ih_fun(arg))
+ enable_interrupts();
+ handled = ih->ih_func(arg);
+ disable_interrupts();
+ if (handled)
ih->ih_count.ec_count++;
#ifdef MULTIPROCESSOR
psw = disable_interrupts();
ih = malloc(sizeof *ih, M_DEVBUF, M_WAITOK);
- ih->ih_fun = func;
+ ih->ih_func = func;
ih->ih_arg = arg;
ih->ih_ipl = level & IPL_IRQMASK;
ih->ih_flags = level & IPL_FLAGMASK;