summaryrefslogtreecommitdiff
path: root/sys/arch/mac68k
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2006-06-11 20:48:14 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2006-06-11 20:48:14 +0000
commit153845bbfe0156dbea8440a7bb2ce79968c0180a (patch)
treeafd11a19e979bf7c6e87fd518c6b2638cce1193d /sys/arch/mac68k
parent8afd1e0abdf70e1817d86d751f72f294f5ba1724 (diff)
Move common prototypes to <m68k/{cpu,param}.h> instead of incomplete
declarations in <machine/{cpu,param}.h> and elsewhere.
Diffstat (limited to 'sys/arch/mac68k')
-rw-r--r--sys/arch/mac68k/include/cpu.h40
-rw-r--r--sys/arch/mac68k/include/param.h12
-rw-r--r--sys/arch/mac68k/mac68k/machdep.c4
-rw-r--r--sys/arch/mac68k/mac68k/vm_machdep.c4
4 files changed, 10 insertions, 50 deletions
diff --git a/sys/arch/mac68k/include/cpu.h b/sys/arch/mac68k/include/cpu.h
index 7c65b0a07a2..25445986629 100644
--- a/sys/arch/mac68k/include/cpu.h
+++ b/sys/arch/mac68k/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.37 2006/01/24 06:50:11 miod Exp $ */
+/* $OpenBSD: cpu.h,v 1.38 2006/06/11 20:48:13 miod Exp $ */
/* $NetBSD: cpu.h,v 1.45 1997/02/10 22:13:40 scottr Exp $ */
/*
@@ -104,7 +104,7 @@ struct clockframe {
* or after the current trap/syscall if in system mode.
*/
extern int want_resched; /* resched() was called */
-#define need_resched(ci) { want_resched++; aston(); }
+#define need_resched(ci) { want_resched = 1; aston(); }
/*
* Give a profiling tick to the current process from the softclock
@@ -120,7 +120,7 @@ extern int want_resched; /* resched() was called */
#define signotify(p) aston()
extern int astpending; /* need to trap before returning to user mode */
-#define aston() (astpending++)
+#define aston() (astpending = 1)
#define CPU_CONSDEV 1
#define CPU_MAXID 2
@@ -253,7 +253,7 @@ struct cpu_model_info {
const char *model; /* Model description */
int class; /* Rough class of machine. */
};
-extern struct cpu_model_info *current_mac_model;
+extern const struct cpu_model_info *current_mac_model;
extern unsigned long IOBase; /* Base address of I/O */
extern unsigned long NuBusBase; /* Base address of NuBus */
@@ -280,42 +280,14 @@ extern unsigned long load_addr;
#ifdef _KERNEL
-struct frame;
-struct fpframe;
-struct pcb;
+/* locore.s */
+void PCIA(void);
/* machdep.c */
void mac68k_set_bell_callback(int (*)(void *, int, int, int), void *);
int mac68k_ring_bell(int, int, int);
u_int get_mapping(void);
-/* locore.s */
-void m68881_restore(struct fpframe *);
-void m68881_save(struct fpframe *);
-void DCIA(void);
-void DCIS(void);
-void DCIU(void);
-void ICIA(void);
-void ICPA(void);
-void PCIA(void);
-void TBIA(void);
-void TBIAS(void);
-void TBIAU(void);
-void TBIS(vaddr_t);
-#if defined(M68040)
-void DCFA(void);
-void DCFP(paddr_t);
-void DCFL(paddr_t);
-void DCPL(paddr_t);
-void DCPP(paddr_t);
-void ICPL(paddr_t);
-void ICPP(paddr_t);
-#endif
-int suline(caddr_t, caddr_t);
-void savectx(struct pcb *);
-void proc_trampoline(void);
-void loadustp(int);
-
/* vm_machdep.c */
void physaccess(caddr_t, caddr_t, register int, register int);
void physunaccess(caddr_t, register int);
diff --git a/sys/arch/mac68k/include/param.h b/sys/arch/mac68k/include/param.h
index 0f9ecba6180..c9e1348bc79 100644
--- a/sys/arch/mac68k/include/param.h
+++ b/sys/arch/mac68k/include/param.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: param.h,v 1.20 2005/09/12 23:05:05 miod Exp $ */
+/* $OpenBSD: param.h,v 1.21 2006/06/11 20:48:13 miod Exp $ */
/* $NetBSD: param.h,v 1.28 1997/03/01 06:57:45 scottr Exp $ */
/*
@@ -76,21 +76,13 @@
#ifndef _MAC68K_PARAM_H_
#define _MAC68K_PARAM_H_
-/* Pull in interrupt glue */
-#include <machine/psl.h>
-#include <machine/intr.h>
-
/*
* Machine dependent constants for Macintosh II-and-similar series.
*/
#define _MACHINE mac68k
#define MACHINE "mac68k"
-#define PGSHIFT 12 /* LOG2(NBPG) */
-
#define PAGE_SHIFT 12
-#define PAGE_SIZE (1 << PAGE_SHIFT)
-#define PAGE_MASK (PAGE_SIZE - 1)
#define KERNBASE 0x00000000 /* start of kernel virtual */
@@ -98,8 +90,6 @@
#include <m68k/param.h>
-#define NPTEPG (NBPG/(sizeof (pt_entry_t)))
-
#define MSGBUFSIZE 4096
#if defined(_KERNEL) && !defined(_LOCORE)
diff --git a/sys/arch/mac68k/mac68k/machdep.c b/sys/arch/mac68k/mac68k/machdep.c
index 7a0e812c0a6..5aaf9701196 100644
--- a/sys/arch/mac68k/mac68k/machdep.c
+++ b/sys/arch/mac68k/mac68k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.131 2006/05/19 22:51:09 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.132 2006/06/11 20:48:13 miod Exp $ */
/* $NetBSD: machdep.c,v 1.207 1998/07/08 04:39:34 thorpej Exp $ */
/*
@@ -1519,7 +1519,7 @@ get_machine_info()
mac68k_machine.cpu_model_index = i;
}
-struct cpu_model_info *current_mac_model;
+const struct cpu_model_info *current_mac_model;
/*
* Sets a bunch of machine-specific variables
diff --git a/sys/arch/mac68k/mac68k/vm_machdep.c b/sys/arch/mac68k/mac68k/vm_machdep.c
index b280f493a28..37c98ec68a4 100644
--- a/sys/arch/mac68k/mac68k/vm_machdep.c
+++ b/sys/arch/mac68k/mac68k/vm_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vm_machdep.c,v 1.34 2005/09/25 22:26:16 miod Exp $ */
+/* $OpenBSD: vm_machdep.c,v 1.35 2006/06/11 20:48:13 miod Exp $ */
/* $NetBSD: vm_machdep.c,v 1.29 1998/07/28 18:34:55 thorpej Exp $ */
/*
@@ -116,8 +116,6 @@ cpu_fork(p1, p2, stack, stacksize, func, arg)
pcb->pcb_regs[11] = (int)sf; /* SSP */
}
-void switch_exit(struct proc *);
-
/*
* cpu_exit is called as the last action during exit.
* We release the address space and machine-dependent resources,