Make softclock a generic soft interrupt of the API is available,

adding the requisite void * argument to softclock().
This commit is contained in:
thorpej 2001-01-15 20:19:50 +00:00
parent d04bab724e
commit d74e432ed3
44 changed files with 104 additions and 157 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: interrupt.c,v 1.54 2000/11/22 08:39:48 thorpej Exp $ */
/* $NetBSD: interrupt.c,v 1.55 2001/01/15 20:19:50 thorpej Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -72,7 +72,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.54 2000/11/22 08:39:48 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.55 2001/01/15 20:19:50 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -383,7 +383,7 @@ netintr()
struct alpha_soft_intr alpha_soft_intrs[IPL_NSOFT];
/* XXX For legacy software interrupts. */
struct alpha_soft_intrhand *softnet_intrhand, *softclock_intrhand;
struct alpha_soft_intrhand *softnet_intrhand;
/*
* softintr_init:
@ -409,11 +409,8 @@ softintr_init()
/* XXX Establish legacy software interrupt handlers. */
softnet_intrhand = softintr_establish(IPL_SOFTNET,
(void (*)(void *))netintr, NULL);
softclock_intrhand = softintr_establish(IPL_SOFTCLOCK,
(void (*)(void *))softclock, NULL);
assert(softnet_intrhand != NULL);
assert(softclock_intrhand != NULL);
}
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: intr.h,v 1.39 2001/01/14 23:50:29 thorpej Exp $ */
/* $NetBSD: intr.h,v 1.40 2001/01/15 20:19:51 thorpej Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -243,10 +243,8 @@ do { \
/* XXX For legacy software interrupts. */
extern struct alpha_soft_intrhand *softnet_intrhand;
extern struct alpha_soft_intrhand *softclock_intrhand;
#define setsoftnet() softintr_schedule(softnet_intrhand)
#define setsoftclock() softintr_schedule(softclock_intrhand)
struct alpha_shared_intr *alpha_shared_intr_alloc(unsigned int, unsigned int);
int alpha_shared_intr_dispatch(struct alpha_shared_intr *,

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.156 2000/09/13 15:00:16 thorpej Exp $ */
/* $NetBSD: machdep.c,v 1.157 2001/01/15 20:19:51 thorpej Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -1408,14 +1408,6 @@ intrhand(sr)
uvmexp.softs++;
netintr();
}
if (ssir_active & SIR_CLOCK) {
#ifdef REALLYDEBUG
printf("calling softclock\n");
#endif
uvmexp.softs++;
/* XXXX softclock(&frame.f_stackadj); */
softclock();
}
if (ssir_active & SIR_CBACK) {
#ifdef REALLYDEBUG
printf("calling softcallbacks\n");

View File

@ -1,4 +1,4 @@
/* $NetBSD: mtpr.h,v 1.14 1998/11/28 16:39:25 is Exp $ */
/* $NetBSD: mtpr.h,v 1.15 2001/01/15 20:19:52 thorpej Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -63,7 +63,6 @@
extern unsigned char ssir;
#define SIR_NET 0x1 /* call netintr */
#define SIR_CLOCK 0x2 /* call softclock */
#define SIR_CBACK 0x4 /* walk the sicallback-chain */
#define siroff(x) ssir &= ~(x)
@ -84,7 +83,6 @@ extern unsigned char ssir;
#endif
#define setsoftnet() do {ssir |= SIR_NET; setsoftint(); } while (0)
#define setsoftclock() do {ssir |= SIR_CLOCK; setsoftint(); } while (0)
#define setsoftcback() do {ssir |= SIR_CBACK; setsoftint(); } while (0)
void softintr_schedule __P((void *));

View File

@ -1,4 +1,4 @@
/* $NetBSD: intr.h,v 1.5 2001/01/14 23:50:29 thorpej Exp $ */
/* $NetBSD: intr.h,v 1.6 2001/01/15 20:19:52 thorpej Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@ -97,9 +97,6 @@ struct intrhand {
int ih_irq;
};
/*
void setsoftclock __P((void));
*/
void clearsoftclock __P((void));
int splsoftclock __P((void));
/*
@ -232,7 +229,6 @@ softintr(ipl)
#define spl0() spllower(0)
/*
#define setsoftclock() softintr(SIR_CLOCK)
#define setsoftnet() softintr(SIR_NET)
#define setsoftserial() softintr(SIR_SERIAL)
*/

View File

@ -1,4 +1,4 @@
/* $NetBSD: arc_trap.c,v 1.17 2000/12/24 09:25:24 ur Exp $ */
/* $NetBSD: arc_trap.c,v 1.18 2001/01/15 20:19:52 thorpej Exp $ */
/* $OpenBSD: trap.c,v 1.22 1999/05/24 23:08:59 jason Exp $ */
/*
@ -197,6 +197,6 @@ cpu_intr(status, cause, pc, ipending)
clearsoftclock();
uvmexp.softs++;
intrcnt[SOFTCLOCK_INTR]++;
softclock();
softclock(NULL);
}
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: softintr.c,v 1.7 2000/08/22 21:22:51 bjh21 Exp $ */
/* $NetBSD: softintr.c,v 1.8 2001/01/15 20:19:52 thorpej Exp $ */
/*
* Copyright (c) 1999 Ben Harris.
@ -38,7 +38,7 @@
#include <sys/param.h>
__RCSID("$NetBSD: softintr.c,v 1.7 2000/08/22 21:22:51 bjh21 Exp $");
__RCSID("$NetBSD: softintr.c,v 1.8 2001/01/15 20:19:52 thorpej Exp $");
#include <sys/malloc.h>
#include <sys/queue.h>
@ -66,10 +66,8 @@ LIST_HEAD(sh_head, softintr_handler);
static struct sh_head sh_head;
static struct softintr_handler *sh_softnet;
static struct softintr_handler *sh_softclock;
static void dosoftnet(void *);
static void dosoftclock(void *);
extern int hardsplx(int); /* XXX should be in a header somewhere */
@ -79,14 +77,6 @@ softintr_init()
LIST_INIT(&sh_head);
sh_softnet = softintr_establish(IPL_SOFTNET, dosoftnet, NULL);
sh_softclock = softintr_establish(IPL_SOFTCLOCK, dosoftclock, NULL);
}
void
setsoftclock()
{
softintr_schedule(sh_softclock);
}
void
@ -152,13 +142,6 @@ softintr_schedule(void *cookie)
sh->sh_pending = 1;
}
static void
dosoftclock(void *arg)
{
softclock();
}
static void
dosoftnet(void *arg)
{

View File

@ -1,4 +1,4 @@
/* $NetBSD: intr.h,v 1.6 2001/01/14 23:50:30 thorpej Exp $ */
/* $NetBSD: intr.h,v 1.7 2001/01/15 20:19:52 thorpej Exp $ */
/*-
* Copyright (c) 1998, 2000 Ben Harris
* All rights reserved.
@ -106,7 +106,6 @@ extern int hardsplx(int);
*/
/* Old-fashioned soft interrupts */
extern void setsoftclock(void);
extern void setsoftnet(void);
/* New-fangled generic soft interrupts */

View File

@ -1,4 +1,4 @@
/* $NetBSD: intr.c,v 1.22 2000/12/12 06:06:05 mycroft Exp $ */
/* $NetBSD: intr.c,v 1.23 2001/01/15 20:19:52 thorpej Exp $ */
/*
* Copyright (c) 1994-1998 Mark Brinicombe.
@ -132,7 +132,7 @@ dosoftints()
++COUNT;
INC_SINTRCNT(SOFTIRQ_CLOCK);
clearsoftintr(SOFTIRQ_BIT(SOFTIRQ_CLOCK));
softclock();
softclock(NULL);
(void)splx(s);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.104 2001/01/07 21:12:31 leo Exp $ */
/* $NetBSD: machdep.c,v 1.105 2001/01/15 20:19:53 thorpej Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -738,7 +738,7 @@ softint()
siroff(SIR_CLOCK);
uvmexp.softs++;
/* XXXX softclock(&frame.f_stackadj); */
softclock();
softclock(NULL);
}
if (ssir & SIR_CBACK) {
siroff(SIR_CBACK);

View File

@ -1,4 +1,4 @@
/* $NetBSD: extintr.c,v 1.14 2000/08/14 10:09:06 kleink Exp $ */
/* $NetBSD: extintr.c,v 1.15 2001/01/15 20:19:53 thorpej Exp $ */
/* $OpenBSD: isabus.c,v 1.1 1997/10/11 11:53:00 pefo Exp $ */
/*-
@ -430,7 +430,7 @@ do_pending_int()
if ((ipending & ~pcpl) & SINT_CLOCK) {
ipending &= ~SINT_CLOCK;
softclock();
softclock(NULL);
intrcnt[CNT_SINT_CLOCK]++;
}
if ((ipending & ~pcpl) & SINT_NET) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.24 2000/11/27 05:57:26 soren Exp $ */
/* $NetBSD: machdep.c,v 1.25 2001/01/15 20:19:53 thorpej Exp $ */
/*
* Copyright (c) 2000 Soren S. Jorvang. All rights reserved.
@ -525,6 +525,6 @@ cpu_intr(status, cause, pc, ipending)
clearsoftclock();
uvmexp.softs++;
intrcnt[SOFTCLOCK_INTR]++;
softclock();
softclock(NULL);
}
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: shb.c,v 1.1 2000/12/11 18:19:13 marcus Exp $ */
/* $NetBSD: shb.c,v 1.2 2001/01/15 20:19:53 thorpej Exp $ */
/*-
* Copyright (c) 1993, 1994 Charles Hannum. All rights reserved.
@ -744,7 +744,7 @@ void
Xsoftclock(void)
{
softclock();
softclock(NULL);
}
#define LEGAL_IRQ(x) ((x) >= 0 && (x) < SHB_MAX_HARDINTR && (x) != 2)

View File

@ -1,4 +1,4 @@
/* $NetBSD: shb.c,v 1.12 2000/09/29 08:08:37 msaitoh Exp $ */
/* $NetBSD: shb.c,v 1.13 2001/01/15 20:19:53 thorpej Exp $ */
/*-
* Copyright (c) 1993, 1994 Charles Hannum. All rights reserved.
@ -744,7 +744,7 @@ void
Xsoftclock(void)
{
softclock();
softclock(NULL);
}
#define LEGAL_IRQ(x) ((x) >= 0 && (x) < SHB_MAX_HARDINTR && (x) != 2)

View File

@ -1,4 +1,4 @@
/* $NetBSD: trap.c,v 1.85 2000/12/23 09:35:52 jdolecek Exp $ */
/* $NetBSD: trap.c,v 1.86 2001/01/15 20:19:54 thorpej Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -530,7 +530,7 @@ trap(type, code, v, frame)
if (ssir & SIR_CLOCK) {
siroff(SIR_CLOCK);
uvmexp.softs++;
softclock();
softclock(NULL);
}
/*
* If this was not an AST trap, we are all done.

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.37 2000/12/03 12:57:37 takemura Exp $ */
/* $NetBSD: machdep.c,v 1.38 2001/01/15 20:19:54 thorpej Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -43,7 +43,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.37 2000/12/03 12:57:37 takemura Exp $");
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.38 2001/01/15 20:19:54 thorpej Exp $");
/* from: Utah Hdr: machdep.c 1.63 91/04/24 */
#include "opt_vr41x1.h"
@ -770,7 +770,7 @@ cpu_intr(status, cause, pc, ipending)
_clrsoftintr(MIPS_SOFT_INT_MASK_0);
uvmexp.softs++;
intrcnt[SOFTCLOCK_INTR]++;
softclock();
softclock(NULL);
}
return;

View File

@ -1,4 +1,4 @@
/* $NetBSD: trap.c,v 1.12 2000/12/23 09:35:52 jdolecek Exp $ */
/* $NetBSD: trap.c,v 1.13 2001/01/15 20:19:54 thorpej Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -44,7 +44,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.12 2000/12/23 09:35:52 jdolecek Exp $");
__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.13 2001/01/15 20:19:54 thorpej Exp $");
#include "opt_ddb.h"
#include "opt_execfmt.h"
@ -468,7 +468,7 @@ trap(type, code, v, frame)
if (ssir & SIR_CLOCK) {
siroff(SIR_CLOCK);
uvmexp.softs++;
softclock();
softclock(NULL);
}
/*
* If this was not an AST trap, we are all done.

View File

@ -1,4 +1,4 @@
/* $NetBSD: trap.c,v 1.88 2000/12/22 22:58:54 jdolecek Exp $ */
/* $NetBSD: trap.c,v 1.89 2001/01/15 20:19:54 thorpej Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -507,7 +507,7 @@ copyfault:
void softclock __P((void));
siroff(SIR_CLOCK);
uvmexp.softs++;
softclock();
softclock(NULL);
}
if (ssir & SIR_DTMGR) {
void mrg_execute_deferred __P((void));

View File

@ -1,4 +1,4 @@
/* $NetBSD: extintr.c,v 1.21 2001/01/04 15:01:25 tsubai Exp $ */
/* $NetBSD: extintr.c,v 1.22 2001/01/15 20:19:54 thorpej Exp $ */
/*-
* Copyright (c) 1995 Per Fogelstrom
@ -690,7 +690,7 @@ softagain:
}
if ((ipending & ~pcpl) & (1 << SIR_CLOCK)) {
ipending &= ~(1 << SIR_CLOCK);
softclock();
softclock(NULL);
intrcnt[CNT_SOFTCLOCK]++;
goto softagain;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.13 2000/11/27 05:57:26 soren Exp $ */
/* $NetBSD: machdep.c,v 1.14 2001/01/15 20:19:55 thorpej Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -43,7 +43,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.13 2000/11/27 05:57:26 soren Exp $");
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.14 2001/01/15 20:19:55 thorpej Exp $");
/* from: Utah Hdr: machdep.c 1.63 91/04/24 */
@ -744,7 +744,7 @@ cpu_intr(status, cause, pc, ipending)
_clrsoftintr(MIPS_SOFT_INT_MASK_0);
uvmexp.softs++;
soft_evcnt[IPL_SOFTCLOCK].ev_count++;
softclock();
softclock(NULL);
}
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: shb.c,v 1.7 2000/07/02 04:40:41 cgd Exp $ */
/* $NetBSD: shb.c,v 1.8 2001/01/15 20:19:55 thorpej Exp $ */
/*-
* Copyright (c) 1993, 1994 Charles Hannum. All rights reserved.
@ -584,7 +584,7 @@ void
Xsoftclock(void)
{
softclock();
softclock(NULL);
}
#define LEGAL_IRQ(x) ((x) >= 0 && (x) < SHB_MAX_HARDINTR && (x) != 2)

View File

@ -1,4 +1,4 @@
/* $NetBSD: intr.h,v 1.8 2001/01/14 23:50:30 thorpej Exp $ */
/* $NetBSD: intr.h,v 1.9 2001/01/15 20:19:55 thorpej Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -159,10 +159,8 @@ void softintr_dispatch(void);
/* XXX For legacy software interrupts */
extern struct mvme68k_soft_intrhand *softnet_intrhand;
extern struct mvme68k_soft_intrhand *softclock_intrhand;
#define setsoftnet() softintr_schedule(softnet_intrhand)
#define setsoftclock() softintr_schedule(softclock_intrhand)
#endif /* !_LOCORE */
#endif /* _KERNEL */

View File

@ -1,4 +1,4 @@
/* $NetBSD: softintr.c,v 1.3 2000/11/24 14:49:44 scw Exp $ */
/* $NetBSD: softintr.c,v 1.4 2001/01/15 20:19:55 thorpej Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -57,7 +57,6 @@
struct mvme68k_soft_intrhand *softnet_intrhand;
struct mvme68k_soft_intrhand *softclock_intrhand;
static struct mvme68k_soft_intr mvme68k_soft_intrs[IPL_NSOFT];
@ -101,12 +100,9 @@ softintr_init()
/* Establish legacy software interrupt handlers */
softnet_intrhand = softintr_establish(IPL_SOFTNET,
(void (*)(void *)) netintr, NULL);
softclock_intrhand = softintr_establish(IPL_SOFTCLOCK,
(void (*)(void *)) softclock, NULL);
#ifdef DEBUG
assert(softnet_intrhand != NULL);
assert(softclock_intrhand != NULL);
#endif
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.13 2001/01/12 17:17:49 tsutsui Exp $ */
/* $NetBSD: machdep.c,v 1.14 2001/01/15 20:19:55 thorpej Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -1122,7 +1122,7 @@ init_sir()
{
sir_routines[SIR_NET] = (void (*) __P((void *)))netintr;
sir_routines[SIR_CLOCK] = (void (*) __P((void *)))softclock;
sir_routines[SIR_CLOCK] = softclock;
next_sir = NEXT_SIR;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.49 2000/11/27 05:57:26 soren Exp $ */
/* $NetBSD: machdep.c,v 1.50 2001/01/15 20:19:55 thorpej Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -43,7 +43,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.49 2000/11/27 05:57:26 soren Exp $");
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.50 2001/01/15 20:19:55 thorpej Exp $");
/* from: Utah Hdr: machdep.c 1.63 91/04/24 */
@ -710,7 +710,7 @@ cpu_intr(status, cause, pc, ipending)
_clrsoftintr(MIPS_SOFT_INT_MASK_0);
uvmexp.softs++;
intrcnt[SOFTCLOCK_INTR]++;
softclock();
softclock(NULL);
}
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: trap.c,v 1.29 2000/12/23 09:35:53 jdolecek Exp $ */
/* $NetBSD: trap.c,v 1.30 2001/01/15 20:19:56 thorpej Exp $ */
/*
* This file was taken from mvme68k/mvme68k/trap.c
@ -1009,6 +1009,6 @@ init_sir()
extern void netintr(void);
sir_routines[0] = (void (*)(void *))netintr;
sir_routines[1] = (void (*)(void *))softclock;
sir_routines[1] = softclock;
next_sir = 2;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: soft_spl.c,v 1.2 1999/08/05 18:08:12 thorpej Exp $ */
/* $NetBSD: soft_spl.c,v 1.3 2001/01/15 20:19:56 thorpej Exp $ */
/*
* Copyright (C) 1997 Wolfgang Solfrank.
@ -134,7 +134,7 @@ soft_splx(new)
cpl |= SPLSOFTCLOCK;
softclockpending = 0;
asm volatile ("mtmsr %0" :: "r"(emsr));
softclock();
softclock(NULL);
continue;
}
if (softnetpending && !(cpl & SPLSOFTNET)) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: cpu.h,v 1.31 2000/08/25 01:04:10 thorpej Exp $ */
/* $NetBSD: cpu.h,v 1.32 2001/01/15 20:19:56 thorpej Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -130,7 +130,6 @@ void save_fpu_context __P((struct pcb *));
/* machdep.c */
void dumpconf __P((void));
void do_softclock __P((void *));
void softnet __P((void *));
/* mainbus.c */

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.117 2001/01/02 19:16:34 matthias Exp $ */
/* $NetBSD: machdep.c,v 1.118 2001/01/15 20:19:56 thorpej Exp $ */
/*-
* Copyright (c) 1996 Matthias Pfaller.
@ -1130,16 +1130,6 @@ cpu_reset()
__asm __volatile("jump @0");
}
/*
* Clock software interrupt routine
*/
void
do_softclock(arg)
void *arg;
{
softclock();
}
/*
* Network software interrupt routine
*/

View File

@ -1,4 +1,4 @@
/* $NetBSD: mainbus.c,v 1.7 1998/04/11 17:44:11 matthias Exp $ */
/* $NetBSD: mainbus.c,v 1.8 2001/01/15 20:19:56 thorpej Exp $ */
/*
* Copyright (c) 1997 Matthias Pfaller.
@ -83,7 +83,7 @@ mbattach(parent, self, aux)
intr_init();
/* Allocate softclock at IPL_NET as splnet() has to block softclock. */
clk = intr_establish(SOFTINT, do_softclock, NULL,
clk = intr_establish(SOFTINT, softclock, NULL,
"softclock", IPL_NET, IPL_NET, 0);
net = intr_establish(SOFTINT, softnet, NULL,
"softnet", IPL_NET, IPL_NET, 0);

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.184 2000/11/27 08:57:08 nisimura Exp $ */
/* $NetBSD: machdep.c,v 1.185 2001/01/15 20:19:56 thorpej Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.184 2000/11/27 08:57:08 nisimura Exp $");
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.185 2001/01/15 20:19:56 thorpej Exp $");
#include "fs_mfs.h"
#include "opt_ddb.h"
@ -776,7 +776,7 @@ cpu_intr(status, cause, pc, ipending)
_clrsoftintr(MIPS_SOFT_INT_MASK_0);
uvmexp.softs++;
intrcnt[SOFTCLOCK_INTR]++;
softclock();
softclock(NULL);
}
return;

View File

@ -1,4 +1,4 @@
/* $NetBSD: soft_spl.c,v 1.1 1997/04/16 21:20:35 thorpej Exp $ */
/* $NetBSD: soft_spl.c,v 1.2 2001/01/15 20:19:57 thorpej Exp $ */
/*
* Copyright (C) 1997 Wolfgang Solfrank.
@ -132,7 +132,7 @@ soft_splx(new)
cpl |= SPLSOFTCLOCK;
softclockpending = 0;
asm volatile ("mtmsr %0" :: "r"(emsr));
softclock();
softclock(NULL);
continue;
}
if (softnetpending && !(cpl & SPLSOFTNET)) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: extintr.c,v 1.5 2000/11/27 08:53:55 matt Exp $ */
/* $NetBSD: extintr.c,v 1.6 2001/01/15 20:19:57 thorpej Exp $ */
/* $OpenBSD: isabus.c,v 1.12 1999/06/15 02:40:05 rahnds Exp $ */
/*-
@ -405,7 +405,7 @@ do_pending_int()
}
if ((ipending & ~pcpl) & SINT_CLOCK) {
ipending &= ~SINT_CLOCK;
softclock();
softclock(NULL);
}
if ((ipending & ~pcpl) & SINT_NET) {
ipending &= ~SINT_NET;

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.7 2000/11/27 05:57:27 soren Exp $ */
/* $NetBSD: machdep.c,v 1.8 2001/01/15 20:19:57 thorpej Exp $ */
/*
* Copyright (c) 2000 Soren S. Jorvang
@ -569,7 +569,7 @@ else
clearsoftclock();
uvmexp.softs++;
intrcnt[SOFTCLOCK_INTR]++;
softclock();
softclock(NULL);
}
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: intr.c,v 1.47 2000/07/02 04:40:44 cgd Exp $ */
/* $NetBSD: intr.c,v 1.48 2001/01/15 20:19:57 thorpej Exp $ */
/*
* Copyright (c) 1992, 1993
@ -139,7 +139,7 @@ soft01intr(fp)
}
if (sir.sir_which[SIR_CLOCK]) {
sir.sir_which[SIR_CLOCK] = 0;
softclock();
softclock(NULL);
}
#if NCOM > 0
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: cpu.h,v 1.26 2000/09/29 17:02:38 eeh Exp $ */
/* $NetBSD: cpu.h,v 1.27 2001/01/15 20:19:57 thorpej Exp $ */
/*
* Copyright (c) 1992, 1993
@ -170,11 +170,9 @@ extern struct intrhand soft01intr, soft01net, soft01clock;
#if 0
#define setsoftint() send_softint(-1, IPL_SOFTINT, &soft01intr)
#define setsoftnet() send_softint(-1, IPL_SOFTNET, &soft01net)
#define setsoftclock() send_softint(-1, IPL_SOFTCLOCK, &soft01clock)
#else
void setsoftint __P((void));
void setsoftnet __P((void));
void setsoftclock __P((void));
#endif
int want_ast;

View File

@ -1,4 +1,4 @@
/* $NetBSD: intr.c,v 1.37 2000/12/04 20:40:07 fvdl Exp $ */
/* $NetBSD: intr.c,v 1.38 2001/01/15 20:19:58 thorpej Exp $ */
/*
* Copyright (c) 1992, 1993
@ -72,7 +72,6 @@ struct intrhand *intrlev[MAXINTNUM];
void strayintr __P((const struct trapframe64 *, int));
int softintr __P((void *));
int softnet __P((void *));
int send_softclock __P((void *));
int intr_list_handler __P((void *));
/*
@ -160,20 +159,8 @@ softnet(fp)
return (1);
}
/*
* Damn softclock doesn't return a value.
*/
int
send_softclock(fp)
void *fp;
{
softclock();
return 1;
}
struct intrhand soft01intr = { softintr, NULL, 1 };
struct intrhand soft01net = { softnet, NULL, 1 };
struct intrhand soft01clock = { send_softclock, NULL, 1 };
#if 1
void
@ -184,10 +171,6 @@ void
setsoftnet() {
send_softint(-1, IPL_SOFTNET, &soft01net);
}
void
setsoftclock() {
send_softint(-1, IPL_SOFTCLOCK, &soft01clock);
}
#endif
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: intreg.c,v 1.14 2000/06/29 07:19:06 mrg Exp $ */
/* $NetBSD: intreg.c,v 1.15 2001/01/15 20:19:58 thorpej Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -151,7 +151,7 @@ soft1intr(arg)
}
if (sir.sir_which[SIR_CLOCK]) {
sir.sir_which[SIR_CLOCK] = 0;
softclock();
softclock(NULL);
}
if (sir.sir_which[SIR_SPARE2]) {
sir.sir_which[SIR_SPARE2] = 0;

View File

@ -1,4 +1,4 @@
/* $NetBSD: intr.h,v 1.9 2001/01/14 23:50:30 thorpej Exp $ */
/* $NetBSD: intr.h,v 1.10 2001/01/15 20:19:58 thorpej Exp $ */
/*
* Copyright (c) 1998 Matt Thomas.
@ -135,7 +135,6 @@ do { \
#define setsoftddb() _setsirr(IPL_SOFTDDB)
#define setsoftserial() _setsirr(IPL_SOFTSERIAL)
#define setsoftnet() _setsirr(IPL_SOFTNET)
#define setsoftclock() _setsirr(IPL_SOFTCLOCK)
#if !defined(_LOCORE)
LIST_HEAD(sh_head, softintr_handler);

View File

@ -1,4 +1,4 @@
/* $NetBSD: intvec.s,v 1.57 2000/12/31 19:27:24 matt Exp $ */
/* $NetBSD: intvec.s,v 1.58 2001/01/15 20:19:58 thorpej Exp $ */
/*
* Copyright (c) 1994, 1997 Ludd, University of Lule}, Sweden.
@ -290,7 +290,8 @@ TRAPCALL(astintr, T_ASTFLT)
SCBENTRY(softclock)
PUSHR
calls $0,_C_LABEL(softclock)
movab _C_LABEL(softclock_head),r0
jsb softintr_dispatch
incl _C_LABEL(softclock_intrcnt)+EV_COUNT
adwc $0,_C_LABEL(softclock_intrcnt)+EV_COUNT+4
POPR

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.110 2000/12/22 22:58:56 jdolecek Exp $ */
/* $NetBSD: machdep.c,v 1.111 2001/01/15 20:19:58 thorpej Exp $ */
/*
* Copyright (c) 1994, 1998 Ludd, University of Lule}, Sweden.
@ -116,6 +116,7 @@ vm_map_t phys_map = NULL;
int iospace_inited = 0;
#endif
struct softintr_head softclock_head = { IPL_SOFTCLOCK };
struct softintr_head softnet_head = { IPL_SOFTNET };
struct softintr_head softserial_head = { IPL_SOFTSERIAL };
@ -736,6 +737,7 @@ softintr_establish(int ipl, void (*func)(void *), void *arg)
struct softintr_head *shd;
switch (ipl) {
case IPL_SOFTCLOCK: shd = &softclock_head; break;
case IPL_SOFTNET: shd = &softnet_head; break;
case IPL_SOFTSERIAL: shd = &softserial_head; break;
default: panic("softintr_establish: unsupported soft IPL");

View File

@ -1,4 +1,4 @@
/* $NetBSD: trap.c,v 1.47 2000/12/23 09:35:53 jdolecek Exp $ */
/* $NetBSD: trap.c,v 1.48 2001/01/15 20:19:58 thorpej Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -557,7 +557,7 @@ trap(type, code, v, frame)
if (ssir & SIR_CLOCK) {
siroff(SIR_CLOCK);
uvmexp.softs++;
softclock();
softclock(NULL);
}
if (ssir & SIR_SERIAL) {
#include "zsc.h"

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_clock.c,v 1.72 2000/12/10 19:29:31 mycroft Exp $ */
/* $NetBSD: kern_clock.c,v 1.73 2001/01/15 20:19:59 thorpej Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -394,6 +394,11 @@ static void callout_stop_locked(struct callout *);
*/
u_int64_t hardclock_ticks, softclock_ticks;
#ifdef __HAVE_GENERIC_SOFT_INTERRUPTS
void softclock(void *);
void *softclock_si;
#endif
/*
* Initialize clock frequencies and start both clocks running.
*/
@ -402,6 +407,12 @@ initclocks(void)
{
int i;
#ifdef __HAVE_GENERIC_SOFT_INTERRUPTS
softclock_si = softintr_establish(IPL_SOFTCLOCK, softclock, NULL);
if (softclock_si == NULL)
panic("initclocks: unable to register softclock intr");
#endif
/*
* Set divisors to 1 (normal case) and let the machine-specific
* code do its bit.
@ -879,10 +890,15 @@ hardclock(struct clockframe *frame)
*/
spllowersoftclock();
KERNEL_LOCK(LK_CANRECURSE|LK_EXCLUSIVE);
softclock();
softclock(NULL);
KERNEL_UNLOCK();
} else
} else {
#ifdef __HAVE_GENERIC_SOFT_INTERRUPTS
softintr_schedule(softclock_si);
#else
setsoftclock();
#endif
}
return;
} else if (softclock_running == 0 &&
(softclock_ticks + 1) == hardclock_ticks) {
@ -897,7 +913,7 @@ hardclock(struct clockframe *frame)
*/
/*ARGSUSED*/
void
softclock(void)
softclock(void *v)
{
struct callout_queue *bucket;
struct callout *c;

View File

@ -1,4 +1,4 @@
/* $NetBSD: systm.h,v 1.123 2000/11/26 11:09:00 takemura Exp $ */
/* $NetBSD: systm.h,v 1.124 2001/01/15 20:19:59 thorpej Exp $ */
/*-
* Copyright (c) 1982, 1988, 1991, 1993
@ -237,7 +237,9 @@ int hzto __P((struct timeval *tv));
void realitexpire __P((void *));
void hardclock __P((struct clockframe *frame));
void softclock __P((void));
#ifndef __HAVE_GENERIC_SOFT_INTERRUPTS
void softclock __P((void *));
#endif
void statclock __P((struct clockframe *frame));
#ifdef NTP
void hardupdate __P((long offset));