Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/hp700/hp700 in softintr_init(), malloc the struct d...
details: https://anonhg.NetBSD.org/src/rev/4a227d4fdb02
branches: trunk
changeset: 581040:4a227d4fdb02
user: chs <chs%NetBSD.org@localhost>
date: Sat May 21 23:20:33 2005 +0000
description:
in softintr_init(), malloc the struct device instead of using the stack
since the evcnt stuff will use the dv_xname field later,
diffstat:
sys/arch/hp700/hp700/softintr.c | 19 +++++++++----------
1 files changed, 9 insertions(+), 10 deletions(-)
diffs (48 lines):
diff -r 4da38ab05648 -r 4a227d4fdb02 sys/arch/hp700/hp700/softintr.c
--- a/sys/arch/hp700/hp700/softintr.c Sat May 21 17:18:51 2005 +0000
+++ b/sys/arch/hp700/hp700/softintr.c Sat May 21 23:20:33 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: softintr.c,v 1.3 2002/08/14 16:18:12 fredette Exp $ */
+/* $NetBSD: softintr.c,v 1.4 2005/05/21 23:20:33 chs Exp $ */
/*-
* Copyright (c) 2000, 2001, 2002 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: softintr.c,v 1.3 2002/08/14 16:18:12 fredette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: softintr.c,v 1.4 2005/05/21 23:20:33 chs Exp $");
#include <sys/param.h>
#include <sys/malloc.h>
@@ -88,7 +88,7 @@
softintr_init(void)
{
struct hp700_soft_intr *si;
- struct device dummy_device;
+ struct device *dv;
void *ih;
int i;
@@ -98,14 +98,13 @@
/* Initialize the soft interrupt "bits". */
for (i = 0; i < HP700_NSOFTINTR; i++) {
-
+
/* Register our interrupt handler for this bit. */
- strcpy(dummy_device.dv_xname, hp700_soft_intr_info[i].name);
- ih = hp700_intr_establish(&dummy_device,
- hp700_soft_intr_info[i].ipl,
- softintr_dispatch, (void *) (i + 1),
- &int_reg_soft, i);
-
+ dv = malloc(sizeof (struct device), M_SOFTINTR, M_WAITOK);
+ strcpy(dv->dv_xname, hp700_soft_intr_info[i].name);
+ ih = hp700_intr_establish(dv, hp700_soft_intr_info[i].ipl,
+ softintr_dispatch, (void *) (i + 1), &int_reg_soft, i);
+
si = &hp700_soft_intrs[i];
TAILQ_INIT(&si->softintr_q);
si->softintr_ssir = _hp700_intr_spl_mask(ih);
Home |
Main Index |
Thread Index |
Old Index