- fix prototype for ctrl_int2 port (u_char -> uint8_t) in intr.h
- use proper macro to assert/clear ctrl_int2 port for softintr - use KDASSERT() rather than #ifdef DEBUG + assert() - don't count uvmexp.softs twice in softintr_dispatch() XXX: Maybe we should have common m68k/softintr.c like mips ports.
This commit is contained in:
parent
6da4c2af88
commit
67b858ce4e
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: intr.h,v 1.14 2007/02/10 02:03:51 tsutsui Exp $ */
|
||||
/* $NetBSD: intr.h,v 1.15 2007/02/10 13:08:30 tsutsui Exp $ */
|
||||
|
||||
/*
|
||||
*
|
||||
|
@ -122,10 +122,11 @@ splx(int sr)
|
|||
* simulated software interrupt register
|
||||
*/
|
||||
#define SOFTINTR_IPL 2
|
||||
extern volatile u_char *ctrl_int2;
|
||||
extern volatile uint8_t *ctrl_int2;
|
||||
|
||||
#define setsoft(x) x = 0
|
||||
#define softintr_assert() *ctrl_int2 = 0xff
|
||||
#define setsoft(x) (x = 0)
|
||||
#define softintr_assert() (*ctrl_int2 = 0xff)
|
||||
#define softintr_clear() (*ctrl_int2 = 0)
|
||||
|
||||
struct news68k_soft_intrhand {
|
||||
LIST_ENTRY(news68k_soft_intrhand) sih_q;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: softintr.c,v 1.1 2007/02/10 02:57:46 tsutsui Exp $ */
|
||||
/* $NetBSD: softintr.c,v 1.2 2007/02/10 13:08:30 tsutsui Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2000 The NetBSD Foundation, Inc.
|
||||
|
@ -85,7 +85,7 @@ ssir_pending(volatile unsigned char *ssptr)
|
|||
/*
|
||||
* softintr_init()
|
||||
*
|
||||
* Initialise mvme68k software interrupt subsystem.
|
||||
* Initialise news68k software interrupt subsystem.
|
||||
*/
|
||||
void
|
||||
softintr_init(void)
|
||||
|
@ -107,9 +107,7 @@ softintr_init(void)
|
|||
softnet_intrhand = softintr_establish(IPL_SOFTNET,
|
||||
(void (*)(void *))netintr, NULL);
|
||||
|
||||
#ifdef DEBUG
|
||||
assert(softnet_intrhand != NULL);
|
||||
#endif
|
||||
KDASSERT(softnet_intrhand != NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -124,9 +122,7 @@ softintr_dispatch(void)
|
|||
struct news68k_soft_intrhand *sih;
|
||||
int handled;
|
||||
|
||||
/* disable level 2 interrupt */
|
||||
*ctrl_int2 = 0;
|
||||
uvmexp.softs++;
|
||||
softintr_clear();
|
||||
|
||||
do {
|
||||
for (nsi = news68k_soft_intrs, handled = 0;
|
||||
|
|
Loading…
Reference in New Issue