Garbage-collect Mach_clock_addr outside of machdep.c.
Use as mcclock_addr inside machdep.c, to disable clock interrupts until the clock is autoconfigured.
This commit is contained in:
parent
4c55c4068f
commit
5d53ad5ef5
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: machdep.c,v 1.92 1997/07/28 19:40:44 mhitch Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.93 1997/08/06 12:03:37 jonathan Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
|
@ -208,7 +208,7 @@ int (*Mach_splimp)__P((void)) = splhigh;
|
|||
int (*Mach_splclock)__P((void)) = splhigh;
|
||||
int (*Mach_splstatclock)__P((void)) = splhigh;
|
||||
|
||||
extern volatile struct chiptime *Mach_clock_addr;
|
||||
volatile struct chiptime *mcclock_addr;
|
||||
u_long kmin_tc3_imask, xine_tc3_imask;
|
||||
|
||||
int savectx __P((struct user *up)); /* XXX save state b4 crash*/
|
||||
|
@ -506,7 +506,7 @@ mach_init(argc, argv, code, cv)
|
|||
Mach_splclock = cpu_spl3;
|
||||
Mach_splstatclock = cpu_spl3;
|
||||
|
||||
Mach_clock_addr = (volatile struct chiptime *)
|
||||
mcclock_addr = (volatile struct chiptime *)
|
||||
MIPS_PHYS_TO_KSEG1(KN01_SYS_CLOCK);
|
||||
strcpy(cpu_model, "3100");
|
||||
break;
|
||||
|
@ -527,7 +527,7 @@ mach_init(argc, argv, code, cv)
|
|||
Mach_splimp = Mach_spl2;
|
||||
Mach_splclock = Mach_spl3;
|
||||
Mach_splstatclock = Mach_spl3;
|
||||
Mach_clock_addr = (volatile struct chiptime *)
|
||||
mcclock_addr = (volatile struct chiptime *)
|
||||
MIPS_PHYS_TO_KSEG1(KN01_SYS_CLOCK);
|
||||
strcpy(cpu_model, "5100");
|
||||
break;
|
||||
|
@ -559,7 +559,7 @@ mach_init(argc, argv, code, cv)
|
|||
Mach_splimp = Mach_spl0;
|
||||
Mach_splclock = cpu_spl1;
|
||||
Mach_splstatclock = cpu_spl1;
|
||||
Mach_clock_addr = (volatile struct chiptime *)
|
||||
mcclock_addr = (volatile struct chiptime *)
|
||||
MIPS_PHYS_TO_KSEG1(KN02_SYS_CLOCK);
|
||||
|
||||
}
|
||||
|
@ -592,7 +592,7 @@ mach_init(argc, argv, code, cv)
|
|||
Mach_splimp = splhigh;
|
||||
Mach_splclock = splhigh;
|
||||
Mach_splstatclock = splhigh;
|
||||
Mach_clock_addr = (volatile struct chiptime *)
|
||||
mcclock_addr = (volatile struct chiptime *)
|
||||
MIPS_PHYS_TO_KSEG1(KMIN_SYS_CLOCK);
|
||||
|
||||
|
||||
|
@ -652,7 +652,7 @@ mach_init(argc, argv, code, cv)
|
|||
*/
|
||||
Mach_splclock = cpu_spl3;
|
||||
Mach_splstatclock = cpu_spl3;
|
||||
Mach_clock_addr = (volatile struct chiptime *)
|
||||
mcclock_addr = (volatile struct chiptime *)
|
||||
MIPS_PHYS_TO_KSEG1(XINE_SYS_CLOCK);
|
||||
|
||||
/*
|
||||
|
@ -697,7 +697,7 @@ mach_init(argc, argv, code, cv)
|
|||
*/
|
||||
Mach_splclock = cpu_spl1;
|
||||
Mach_splstatclock = cpu_spl1;
|
||||
Mach_clock_addr = (volatile struct chiptime *)
|
||||
mcclock_addr = (volatile struct chiptime *)
|
||||
MIPS_PHYS_TO_KSEG1(KN03_SYS_CLOCK);
|
||||
|
||||
asic_init(0);
|
||||
|
@ -1316,10 +1316,10 @@ initcpu()
|
|||
*/
|
||||
#if 1 /*XXX*/
|
||||
/* disable clock interrupts (until startrtclock()) */
|
||||
if (Mach_clock_addr) {
|
||||
c = Mach_clock_addr;
|
||||
c->regb = REGB_DATA_MODE | REGB_HOURS_FORMAT;
|
||||
i = c->regc;
|
||||
if (mcclock_addr) {
|
||||
c = mcclock_addr;
|
||||
c->regb = REGB_DATA_MODE | REGB_HOURS_FORMAT;
|
||||
i = c->regc;
|
||||
}
|
||||
return (i);
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pmax_trap.c,v 1.48 1997/07/01 07:21:15 jonathan Exp $ */
|
||||
/* $NetBSD: pmax_trap.c,v 1.49 1997/08/06 12:03:34 jonathan Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
|
@ -140,7 +140,6 @@ extern tc_option_t tc_slot_info[TC_MAX_LOGICAL_SLOTS];
|
|||
extern u_long kmin_tc3_imask, xine_tc3_imask;
|
||||
extern const struct callback *callv;
|
||||
|
||||
extern volatile struct chiptime *Mach_clock_addr;
|
||||
extern u_long intrcnt[];
|
||||
|
||||
/*
|
||||
|
@ -195,7 +194,8 @@ kn01_intr(mask, pc, statusReg, causeReg)
|
|||
unsigned statusReg;
|
||||
unsigned causeReg;
|
||||
{
|
||||
register volatile struct chiptime *c = Mach_clock_addr;
|
||||
register volatile struct chiptime *c =
|
||||
(volatile struct chiptime *)MIPS_PHYS_TO_KSEG1(KN01_SYS_CLOCK);
|
||||
struct clockframe cf;
|
||||
int temp;
|
||||
extern struct cfdriver sii_cd;
|
||||
|
@ -266,7 +266,8 @@ kn02_intr(mask, pc, statusReg, causeReg)
|
|||
unsigned causeReg;
|
||||
{
|
||||
register unsigned i, m;
|
||||
register volatile struct chiptime *c = Mach_clock_addr;
|
||||
register volatile struct chiptime *c =
|
||||
(volatile struct chiptime *) MIPS_PHYS_TO_KSEG1(KN02_SYS_CLOCK);
|
||||
register unsigned csr;
|
||||
int temp;
|
||||
struct clockframe cf;
|
||||
|
@ -344,7 +345,8 @@ kmin_intr(mask, pc, statusReg, causeReg)
|
|||
unsigned causeReg;
|
||||
{
|
||||
register u_int intr;
|
||||
register volatile struct chiptime *c = Mach_clock_addr;
|
||||
register volatile struct chiptime *c =
|
||||
(volatile struct chiptime *) MIPS_PHYS_TO_KSEG1(KMIN_SYS_CLOCK);
|
||||
volatile u_int *imaskp =
|
||||
(volatile u_int *)MIPS_PHYS_TO_KSEG1(KMIN_REG_IMSK);
|
||||
volatile u_int *intrp =
|
||||
|
@ -463,7 +465,8 @@ xine_intr(mask, pc, statusReg, causeReg)
|
|||
unsigned causeReg;
|
||||
{
|
||||
register u_int intr;
|
||||
register volatile struct chiptime *c = Mach_clock_addr;
|
||||
register volatile struct chiptime *c =
|
||||
(volatile struct chiptime *) MIPS_PHYS_TO_KSEG1(XINE_SYS_CLOCK);
|
||||
volatile u_int *imaskp = (volatile u_int *)
|
||||
MIPS_PHYS_TO_KSEG1(XINE_REG_IMSK);
|
||||
volatile u_int *intrp = (volatile u_int *)
|
||||
|
@ -601,7 +604,8 @@ kn03_intr(mask, pc, statusReg, causeReg)
|
|||
unsigned causeReg;
|
||||
{
|
||||
register u_int intr;
|
||||
register volatile struct chiptime *c = Mach_clock_addr;
|
||||
register volatile struct chiptime *c =
|
||||
(volatile struct chiptime *) MIPS_PHYS_TO_KSEG1(KN03_SYS_CLOCK);
|
||||
volatile u_int *imaskp = (volatile u_int *)
|
||||
MIPS_PHYS_TO_KSEG1(KN03_REG_IMSK);
|
||||
volatile u_int *intrp = (volatile u_int *)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mcclock_ioasic.c,v 1.3 1997/07/22 07:51:39 jonathan Exp $ */
|
||||
/* $NetBSD: mcclock_ioasic.c,v 1.4 1997/08/06 12:03:39 jonathan Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
|
||||
|
@ -29,7 +29,7 @@
|
|||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: mcclock_ioasic.c,v 1.3 1997/07/22 07:51:39 jonathan Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: mcclock_ioasic.c,v 1.4 1997/08/06 12:03:39 jonathan Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
|
@ -70,7 +70,6 @@ const struct mcclock_busfns mcclock_ioasic_busfns = {
|
|||
mcclock_ioasic_write, mcclock_ioasic_read,
|
||||
};
|
||||
|
||||
volatile struct chiptime *Mach_clock_addr; /* XXX glue for pmax heritage */
|
||||
|
||||
int
|
||||
mcclock_ioasic_match(parent, match, aux)
|
||||
|
@ -101,7 +100,6 @@ mcclock_ioasic_match(parent, match, aux)
|
|||
}
|
||||
if (strcmp("mc146818", name))
|
||||
return (0);
|
||||
Mach_clock_addr = (struct chiptime *)MIPS_PHYS_TO_KSEG1(addr);
|
||||
return (1);
|
||||
#undef CFMATCH
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue