diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2024-03-29 21:09:05 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2024-03-29 21:09:05 +0000 |
commit | b7759788f0cdc840516ccfc623404c5d5a2755d0 (patch) | |
tree | 881f742ed6cae82ca7f0128832c4d5e4687aaba3 /sys/arch | |
parent | ef6abb9e037828ee7879337758f9793bd983396f (diff) |
Remove dead code. Some of it had been dead since the very beginning of the
sparc64 port.
ok claudio@ kettenis@
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/sparc64/dev/z8530kbd.c | 8 | ||||
-rw-r--r-- | sys/arch/sparc64/dev/zs.c | 31 | ||||
-rw-r--r-- | sys/arch/sparc64/include/cpu.h | 7 | ||||
-rw-r--r-- | sys/arch/sparc64/sparc64/autoconf.c | 19 | ||||
-rw-r--r-- | sys/arch/sparc64/sparc64/intr.c | 46 | ||||
-rw-r--r-- | sys/arch/sparc64/sparc64/locore.s | 11 | ||||
-rw-r--r-- | sys/arch/sparc64/sparc64/trap.c | 12 |
7 files changed, 11 insertions, 123 deletions
diff --git a/sys/arch/sparc64/dev/z8530kbd.c b/sys/arch/sparc64/dev/z8530kbd.c index 689d35c7f62..6d7ceb34611 100644 --- a/sys/arch/sparc64/dev/z8530kbd.c +++ b/sys/arch/sparc64/dev/z8530kbd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: z8530kbd.c,v 1.30 2021/10/24 17:05:04 mpi Exp $ */ +/* $OpenBSD: z8530kbd.c,v 1.31 2024/03/29 21:09:04 miod Exp $ */ /* $NetBSD: z8530tty.c,v 1.77 2001/05/30 15:24:24 lukem Exp $ */ /*- @@ -1032,12 +1032,6 @@ struct zsops zsops_kbd = { void zskbd_cnpollc(void *v, int on) { - extern int swallow_zsintrs; - - if (on) - swallow_zsintrs++; - else - swallow_zsintrs--; } void diff --git a/sys/arch/sparc64/dev/zs.c b/sys/arch/sparc64/dev/zs.c index f6d592f69cf..2ccecff4aec 100644 --- a/sys/arch/sparc64/dev/zs.c +++ b/sys/arch/sparc64/dev/zs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: zs.c,v 1.32 2021/10/24 17:05:04 mpi Exp $ */ +/* $OpenBSD: zs.c,v 1.33 2024/03/29 21:09:04 miod Exp $ */ /* $NetBSD: zs.c,v 1.29 2001/05/30 15:24:24 lukem Exp $ */ /*- @@ -120,14 +120,13 @@ static u_char zs_init_reg[16] = { /* Console ops */ static int zscngetc(dev_t); static void zscnputc(dev_t, int); -static void zscnpollc(dev_t, int); struct consdev zs_consdev = { NULL, NULL, zscngetc, zscnputc, - zscnpollc, + nullcnpollc, NULL, }; @@ -154,9 +153,6 @@ const struct cfattach zs_fhc_ca = { sizeof(struct zsc_softc), zs_match_fhc, zs_attach_fhc }; -extern int stdinnode; -extern int fbnode; - /* Interrupt handlers. */ static int zshard(void *); static void zssoft(void *); @@ -301,11 +297,6 @@ zs_attach(struct zsc_softc *zsc, struct zsdevice *zsd, int pri) struct zs_chanstate *cs; int s, channel, softpri = PIL_TTY; - if (zsd == NULL) { - printf("configuration incomplete\n"); - return; - } - printf(" softpri %d\n", softpri); /* @@ -746,24 +737,6 @@ zscnputc(dev_t dev, int c) zs_putc(zs_conschan_put, c); } -int swallow_zsintrs; - -static void -zscnpollc(dev_t dev, int on) -{ - /* - * Need to tell zs driver to acknowledge all interrupts or we get - * annoying spurious interrupt messages. This is because mucking - * with spl() levels during polling does not prevent interrupts from - * being generated. - */ - - if (on) - swallow_zsintrs++; - else - swallow_zsintrs--; -} - int zs_console_flags(int promunit, int node, int channel) { diff --git a/sys/arch/sparc64/include/cpu.h b/sys/arch/sparc64/include/cpu.h index c770e703ce0..65864762b56 100644 --- a/sys/arch/sparc64/include/cpu.h +++ b/sys/arch/sparc64/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.105 2024/03/29 21:06:14 miod Exp $ */ +/* $OpenBSD: cpu.h,v 1.106 2024/03/29 21:09:04 miod Exp $ */ /* $NetBSD: cpu.h,v 1.28 2001/06/14 22:56:58 thorpej Exp $ */ /* @@ -269,9 +269,8 @@ do { \ } while (0) /* - * Arguments to hardclock, softclock and gatherstats encapsulate the - * previous machine state in an opaque clockframe. The ipl is here - * as well for strayintr (see locore.s:interrupt and intr.c:strayintr). + * Arguments to clockintr_dispatch encapsulate the + * previous machine state in an opaque clockframe. */ struct clockframe { struct trapframe t; diff --git a/sys/arch/sparc64/sparc64/autoconf.c b/sys/arch/sparc64/sparc64/autoconf.c index 1bd9978679e..3646d1306ac 100644 --- a/sys/arch/sparc64/sparc64/autoconf.c +++ b/sys/arch/sparc64/sparc64/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.145 2023/11/09 14:26:34 kn Exp $ */ +/* $OpenBSD: autoconf.c,v 1.146 2024/03/29 21:09:04 miod Exp $ */ /* $NetBSD: autoconf.c,v 1.51 2001/07/24 19:32:11 eeh Exp $ */ /* @@ -123,7 +123,6 @@ static int rootnode; static char *str2hex(char *, long *); static int mbprint(void *, const char *); -void sync_crash(void); int mainbus_match(struct device *, void *, void *); static void mainbus_attach(struct device *, struct device *, void *); int get_ncpus(void); @@ -711,11 +710,6 @@ cpu_configure(void) #endif } -#if notyet - /* FIXME FIXME FIXME This is probably *WRONG!!!**/ - OF_set_callback(sync_crash); -#endif - /* block clock interrupts and anything below */ splclock(); /* Enable device interrupts */ @@ -817,17 +811,6 @@ diskconf(void) dumpconf(); } -/* - * Console `sync' command. SunOS just does a `panic: zero' so I guess - * no one really wants anything fancy... - */ -void -sync_crash(void) -{ - - panic("PROM sync command"); -} - char * clockfreq(long freq) { diff --git a/sys/arch/sparc64/sparc64/intr.c b/sys/arch/sparc64/sparc64/intr.c index 0cfcf99e8ab..0b6311e1bc1 100644 --- a/sys/arch/sparc64/sparc64/intr.c +++ b/sys/arch/sparc64/sparc64/intr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: intr.c,v 1.63 2022/10/21 18:55:42 miod Exp $ */ +/* $OpenBSD: intr.c,v 1.64 2024/03/29 21:09:04 miod Exp $ */ /* $NetBSD: intr.c,v 1.39 2001/07/19 23:38:11 eeh Exp $ */ /* @@ -67,54 +67,10 @@ struct intrhand *intrlev[MAXINTNUM]; #define INTR_DEVINO 0x8000 -void strayintr(const struct trapframe *, int); -int softintr(void *); int intr_handler(struct trapframe *, struct intrhand *); int intr_list_handler(void *); void intr_ack(struct intrhand *); -/* - * Stray interrupt handler. Clear it if possible. - * If not, and if we get 10 interrupts in 10 seconds, panic. - */ -int ignore_stray = 1; -int straycnt[16]; - -void -strayintr(const struct trapframe *fp, int vectored) -{ - static int straytime, nstray; - int timesince; -#if 0 - extern int swallow_zsintrs; -#endif - - if (fp->tf_pil < 16) - straycnt[(int)fp->tf_pil]++; - - if (ignore_stray) - return; - - /* If we're in polled mode ignore spurious interrupts */ - if ((fp->tf_pil == PIL_SER) /* && swallow_zsintrs */) return; - - printf("stray interrupt ipl %u pc=%llx npc=%llx pstate=%llb " - "vectored=%d\n", fp->tf_pil, fp->tf_pc, fp->tf_npc, - fp->tf_tstate >> TSTATE_PSTATE_SHIFT, PSTATE_BITS, vectored); - - timesince = gettime() - straytime; - if (timesince <= 10) { - if (++nstray > 500) - panic("crazy interrupts"); - } else { - straytime = gettime(); - nstray = 1; - } -#ifdef DDB - db_enter(); -#endif -} - int intr_handler(struct trapframe *tf, struct intrhand *ih) { diff --git a/sys/arch/sparc64/sparc64/locore.s b/sys/arch/sparc64/sparc64/locore.s index 0ed5e4af914..1463c5f410f 100644 --- a/sys/arch/sparc64/sparc64/locore.s +++ b/sys/arch/sparc64/sparc64/locore.s @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.s,v 1.205 2024/03/29 21:06:14 miod Exp $ */ +/* $OpenBSD: locore.s,v 1.206 2024/03/29 21:09:04 miod Exp $ */ /* $NetBSD: locore.s,v 1.137 2001/08/13 06:10:10 jdolecek Exp $ */ /* @@ -4163,7 +4163,6 @@ END(ipi_db) * intrpending[intlev][i] = NULL; * if ((*ih->ih_fun)(ih->ih_arg ? ih->ih_arg : &frame)) * return; - * strayintr(&frame); * return; * } * @@ -4174,14 +4173,11 @@ END(ipi_db) * they took care of the interrupt. If a handler claims the interrupt, * we exit (hardware interrupts are latched in the requestor so we'll * just take another interrupt in the unlikely event of simultaneous - * interrupts from two different devices at the same level). If we go - * through all the registered handlers and no one claims it, we report a - * stray interrupt. This is more or less done as: + * interrupts from two different devices at the same level). * * for (ih = intrhand[intlev]; ih; ih = ih->ih_next) * if ((*ih->ih_fun)(ih->ih_arg ? ih->ih_arg : &frame)) * return; - * strayintr(&frame); * * Inputs: * %l0 = %tstate @@ -6202,9 +6198,6 @@ END(Lfsprobe) * the contents of the D$. We will execute a flush at the end * to sync the I$. */ - .data -paginuse: - .word 0 .text ENTRY(pmap_zero_phys) set NBPG, %o2 ! Loop count diff --git a/sys/arch/sparc64/sparc64/trap.c b/sys/arch/sparc64/sparc64/trap.c index 54b868789ba..35bdd3eaa15 100644 --- a/sys/arch/sparc64/sparc64/trap.c +++ b/sys/arch/sparc64/sparc64/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.121 2024/03/29 21:08:11 miod Exp $ */ +/* $OpenBSD: trap.c,v 1.122 2024/03/29 21:09:04 miod Exp $ */ /* $NetBSD: trap.c,v 1.73 2001/08/09 01:03:01 eeh Exp $ */ /* @@ -552,16 +552,6 @@ dopanic: case T_ALIGN: case T_LDDF_ALIGN: case T_STDF_ALIGN: -#if 0 - { - int64_t dsfsr, dsfar=0, isfsr; - - dsfsr = ldxa(SFSR, ASI_DMMU); - if (dsfsr & SFSR_FV) - dsfar = ldxa(SFAR, ASI_DMMU); - isfsr = ldxa(SFSR, ASI_IMMU); - } -#endif /* * If we're busy doing copyin/copyout continue */ |