Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-2-0]: src/sys/arch/powerpc/marvell Pullup rev 1.12 (requested by ...
details: https://anonhg.NetBSD.org/src/rev/a313e4e64e2a
branches: netbsd-2-0
changeset: 561272:a313e4e64e2a
user: jmc <jmc%NetBSD.org@localhost>
date: Fri Jun 04 03:40:06 2004 +0000
description:
Pullup rev 1.12 (requested by matt in ticket #436)
Fix softnet intr handling (to be like the generic ppc softintr).
diffstat:
sys/arch/powerpc/marvell/extintr.c | 31 +++++++++----------------------
1 files changed, 9 insertions(+), 22 deletions(-)
diffs (66 lines):
diff -r d116750e7224 -r a313e4e64e2a sys/arch/powerpc/marvell/extintr.c
--- a/sys/arch/powerpc/marvell/extintr.c Fri Jun 04 03:40:03 2004 +0000
+++ b/sys/arch/powerpc/marvell/extintr.c Fri Jun 04 03:40:06 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: extintr.c,v 1.11 2003/07/15 02:54:45 lukem Exp $ */
+/* $NetBSD: extintr.c,v 1.11.2.1 2004/06/04 03:40:06 jmc Exp $ */
/*
* Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc.
@@ -76,7 +76,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: extintr.c,v 1.11 2003/07/15 02:54:45 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: extintr.c,v 1.11.2.1 2004/06/04 03:40:06 jmc Exp $");
#include "opt_marvell.h"
#include "opt_kgdb.h"
@@ -156,6 +156,8 @@
struct intrsource intr_sources[NIRQ];
+struct intrhand *softnet_handlers[32];
+
const char intr_source_strings[NIRQ][16] = {
"unknown 0", "dev", "dma", "cpu",
"idma 01", "idma 23", "idma 45", "idma 67",
@@ -269,23 +271,6 @@
return a;
}
-static void
-xsoftnet(void *arg)
-{
- int pendisr;
- __asm __volatile(
- "1: lwarx %0,0,%2\n"
- " stwcx. %1,0,%2\n"
- " bne- 1b\n"
- " sync"
- : "=&r"(pendisr)
- : "r"(0), "r"(&netisr)
- : "cr0");
- softnet(pendisr);
-}
-
-void *softnet_si;
-
/*
* softintr_init - establish softclock, softnet; reserve SIR_HWCLOCK
*/
@@ -294,9 +279,11 @@
{
intr_sources[SIR_HWCLOCK].is_type = IST_CLOCK; /* exclusive */
- softnet_si = softintr_establish(IPL_SOFTNET, xsoftnet, NULL);
- if (softnet_si == NULL)
- panic("softintr_init: cannot softintr_establish IPL_SOFTNET");
+#define DONETISR(n, f) \
+ softnet_handlers[(n)] = \
+ softintr_establish(IPL_SOFTNET, (void (*)(void *))(f), NULL)
+#include <net/netisr_dispatch.h>
+#undef DONETISR
}
/*
Home |
Main Index |
Thread Index |
Old Index