Use newly introduced intrhand_alloc().
This commit is contained in:
parent
4b8507f0c9
commit
78ba29b05a
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ebus_mainbus.c,v 1.15 2014/11/04 18:11:42 palle Exp $ */
|
||||
/* $NetBSD: ebus_mainbus.c,v 1.16 2016/05/13 21:22:47 nakayama Exp $ */
|
||||
/* $OpenBSD: ebus_mainbus.c,v 1.7 2010/11/11 17:58:23 miod Exp $ */
|
||||
|
||||
/*
|
||||
@ -18,7 +18,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ebus_mainbus.c,v 1.15 2014/11/04 18:11:42 palle Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ebus_mainbus.c,v 1.16 2016/05/13 21:22:47 nakayama Exp $");
|
||||
|
||||
#ifdef DEBUG
|
||||
#define EDB_PROM 0x01
|
||||
@ -350,9 +350,7 @@ XXX
|
||||
intrclrptr = &iclr[ino];
|
||||
ino |= INTVEC(ihandle);
|
||||
|
||||
ih = malloc(sizeof *ih, M_DEVBUF, M_NOWAIT);
|
||||
if (ih == NULL)
|
||||
return (NULL);
|
||||
ih = intrhand_alloc();
|
||||
|
||||
/* Register the map and clear intr registers */
|
||||
ih->ih_map = intrmapptr;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.283 2015/11/22 09:32:34 martin Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.284 2016/05/13 21:22:47 nakayama Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
|
||||
@ -71,7 +71,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.283 2015/11/22 09:32:34 martin Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.284 2016/05/13 21:22:47 nakayama Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_multiprocessor.h"
|
||||
@ -2368,11 +2368,7 @@ sparc_mainbus_intr_establish(bus_space_tag_t t, int pil, int level,
|
||||
{
|
||||
struct intrhand *ih;
|
||||
|
||||
ih = (struct intrhand *)
|
||||
malloc(sizeof(struct intrhand), M_DEVBUF, M_NOWAIT);
|
||||
if (ih == NULL)
|
||||
return (NULL);
|
||||
|
||||
ih = intrhand_alloc();
|
||||
ih->ih_fun = handler;
|
||||
ih->ih_arg = arg;
|
||||
intr_establish(pil, level != IPL_VM, ih);
|
||||
|
Loading…
Reference in New Issue
Block a user