summaryrefslogtreecommitdiffstats
path: root/sys/ia64
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2002-05-19 04:42:19 +0000
committermarcel <marcel@FreeBSD.org>2002-05-19 04:42:19 +0000
commit768ae8ea9a50721cc32f333ab616d292a9f546ae (patch)
tree75f802a17493a7feda489841feeaba7eec5a3397 /sys/ia64
parent1d9bed166c9114d035925645959f30f03030bc21 (diff)
downloadFreeBSD-src-768ae8ea9a50721cc32f333ab616d292a9f546ae.zip
FreeBSD-src-768ae8ea9a50721cc32f333ab616d292a9f546ae.tar.gz
o Remove namespace pollution from param.h:
- Don't include ia64_cpu.h and cpu.h - Guard definitions by _NO_NAMESPACE_POLLUTION - Move definition of KERNBASE to vmparam.h o Move definitions of IA64_RR_{BASE|MASK} to vmparam.h o Move definitions of IA64_PHYS_TO_RR{6|7} to vmparam.h o While here, remove some left-over Alpha references.
Diffstat (limited to 'sys/ia64')
-rw-r--r--sys/ia64/acpica/madt.c2
-rw-r--r--sys/ia64/ia64/interrupt.c2
-rw-r--r--sys/ia64/ia64/machdep.c1
-rw-r--r--sys/ia64/ia64/mem.c1
-rw-r--r--sys/ia64/ia64/mp_machdep.c1
-rw-r--r--sys/ia64/ia64/trap.c1
-rw-r--r--sys/ia64/ia64/unwind.c1
-rw-r--r--sys/ia64/include/cpufunc.h1
-rw-r--r--sys/ia64/include/db_machdep.h7
-rw-r--r--sys/ia64/include/ia64_cpu.h9
-rw-r--r--sys/ia64/include/param.h23
-rw-r--r--sys/ia64/include/vmparam.h19
12 files changed, 41 insertions, 27 deletions
diff --git a/sys/ia64/acpica/madt.c b/sys/ia64/acpica/madt.c
index 0ddd374..d827311 100644
--- a/sys/ia64/acpica/madt.c
+++ b/sys/ia64/acpica/madt.c
@@ -28,6 +28,8 @@
#include "acpi.h"
+#include <machine/cpu.h>
+
struct sapic *sapic_create(int, int, u_int64_t);
#pragma pack(1)
diff --git a/sys/ia64/ia64/interrupt.c b/sys/ia64/ia64/interrupt.c
index ec26586..8048868 100644
--- a/sys/ia64/ia64/interrupt.c
+++ b/sys/ia64/ia64/interrupt.c
@@ -52,9 +52,11 @@
#include <sys/smp.h>
#include <machine/clock.h>
+#include <machine/cpu.h>
#include <machine/reg.h>
#include <machine/frame.h>
#include <machine/intr.h>
+#include <machine/pcb.h>
#include <machine/sapicvar.h>
#include <machine/smp.h>
diff --git a/sys/ia64/ia64/machdep.c b/sys/ia64/ia64/machdep.c
index 794ee87..1780335 100644
--- a/sys/ia64/ia64/machdep.c
+++ b/sys/ia64/ia64/machdep.c
@@ -69,6 +69,7 @@
#include <sys/user.h>
#include <sys/ptrace.h>
#include <machine/clock.h>
+#include <machine/cpu.h>
#include <machine/md_var.h>
#include <machine/reg.h>
#include <machine/fpu.h>
diff --git a/sys/ia64/ia64/mem.c b/sys/ia64/ia64/mem.c
index 4ab2292..db98aec 100644
--- a/sys/ia64/ia64/mem.c
+++ b/sys/ia64/ia64/mem.c
@@ -59,6 +59,7 @@
#include <sys/systm.h>
#include <sys/uio.h>
+#include <machine/cpu.h>
#include <machine/frame.h>
#ifdef PERFMON
#include <machine/perfmon.h>
diff --git a/sys/ia64/ia64/mp_machdep.c b/sys/ia64/ia64/mp_machdep.c
index cc7e181..4eb141c 100644
--- a/sys/ia64/ia64/mp_machdep.c
+++ b/sys/ia64/ia64/mp_machdep.c
@@ -44,6 +44,7 @@
#include <vm/vm_kern.h>
#include <machine/atomic.h>
+#include <machine/cpu.h>
#include <machine/pal.h>
#include <machine/pcb.h>
#include <machine/pmap.h>
diff --git a/sys/ia64/ia64/trap.c b/sys/ia64/ia64/trap.c
index eac7272..790e1b6 100644
--- a/sys/ia64/ia64/trap.c
+++ b/sys/ia64/ia64/trap.c
@@ -55,6 +55,7 @@
#include <sys/user.h>
#include <sys/ptrace.h>
#include <machine/clock.h>
+#include <machine/cpu.h>
#include <machine/md_var.h>
#include <machine/reg.h>
#include <machine/pal.h>
diff --git a/sys/ia64/ia64/unwind.c b/sys/ia64/ia64/unwind.c
index 877d699..4c0e4de 100644
--- a/sys/ia64/ia64/unwind.c
+++ b/sys/ia64/ia64/unwind.c
@@ -32,6 +32,7 @@
#include <sys/malloc.h>
#include <sys/queue.h>
+#include <machine/frame.h>
#include <machine/unwind.h>
#include <machine/rse.h>
diff --git a/sys/ia64/include/cpufunc.h b/sys/ia64/include/cpufunc.h
index 5569ab0..ce1cbb7 100644
--- a/sys/ia64/include/cpufunc.h
+++ b/sys/ia64/include/cpufunc.h
@@ -33,6 +33,7 @@
#include <sys/types.h>
#include <machine/ia64_cpu.h>
+#include <machine/vmparam.h>
struct thread;
diff --git a/sys/ia64/include/db_machdep.h b/sys/ia64/include/db_machdep.h
index aed18e1..9a54356 100644
--- a/sys/ia64/include/db_machdep.h
+++ b/sys/ia64/include/db_machdep.h
@@ -28,8 +28,8 @@
* rights to redistribute these changes.
*/
-#ifndef _ALPHA_DB_MACHDEP_H_
-#define _ALPHA_DB_MACHDEP_H_
+#ifndef _MACHINE_DB_MACHDEP_H_
+#define _MACHINE_DB_MACHDEP_H_
/*
* Machine-dependent defines for new kernel debugger.
@@ -38,6 +38,7 @@
#include <sys/param.h>
#include <vm/vm.h>
#include <machine/frame.h>
+#include <machine/ia64_cpu.h>
#define DB_NO_AOUT
@@ -110,4 +111,4 @@ void db_skip_breakpoint(void);
*/
#define DB_ELFSIZE 64
-#endif /* _ALPHA_DB_MACHDEP_H_ */
+#endif /* _MACHINE_DB_MACHDEP_H_ */
diff --git a/sys/ia64/include/ia64_cpu.h b/sys/ia64/include/ia64_cpu.h
index b2e0bff..04f14db 100644
--- a/sys/ia64/include/ia64_cpu.h
+++ b/sys/ia64/include/ia64_cpu.h
@@ -148,15 +148,6 @@
#define IA32_INTERCEPT_SYSTEM_FLAG 2
#define IA32_INTERCEPT_LOCK 4
-/*
- * Manipulating region bits of an address.
- */
-#define IA64_RR_BASE(n) (((u_int64_t) (n)) << 61)
-#define IA64_RR_MASK(x) ((x) & ((1L << 61) - 1))
-
-#define IA64_PHYS_TO_RR6(x) ((x) | IA64_RR_BASE(6))
-#define IA64_PHYS_TO_RR7(x) ((x) | IA64_RR_BASE(7))
-
#ifndef LOCORE
/*
diff --git a/sys/ia64/include/param.h b/sys/ia64/include/param.h
index cd8dd18..1d6fcb8 100644
--- a/sys/ia64/include/param.h
+++ b/sys/ia64/include/param.h
@@ -70,20 +70,23 @@
#ifndef _MACHINE
#define _MACHINE ia64
#endif
-#ifndef MACHINE
-#define MACHINE "ia64"
-#endif
#ifndef _MACHINE_ARCH
#define _MACHINE_ARCH ia64
#endif
+
+#ifndef _NO_NAMESPACE_POLLUTION
+
+#ifndef _MACHINE_PARAM_H_
+#define _MACHINE_PARAM_H_
+
+#ifndef MACHINE
+#define MACHINE "ia64"
+#endif
#ifndef MACHINE_ARCH
#define MACHINE_ARCH "ia64"
#endif
#define MID_MACHINE MID_IA64
-#include <machine/ia64_cpu.h>
-#include <machine/cpu.h>
-
/*
* OBJFORMAT_NAMES is a comma-separated list of the object formats
* that are supported on the architecture.
@@ -132,9 +135,6 @@
#define PAGE_MASK (PAGE_SIZE-1)
#define NPTEPG (PAGE_SIZE/(sizeof (pt_entry_t)))
-#define KERNBASE 0xfffffc0000300000LL /* start of kernel virtual */
-#define BTOPKERNBASE ((u_long)KERNBASE >> PGSHIFT)
-
#define CLSIZE 1
#define CLSIZELOG2 0
@@ -145,8 +145,6 @@
#define KSTACK_PAGES 4 /* pages of kernel stack */
#define UAREA_PAGES 1 /* pages of u-area */
-/* #define KSTACK_GUARD */ /* compile in kstack guard page */
-
/*
* Mach derived conversion macros
*/
@@ -160,3 +158,6 @@
#define ia64_ptob(x) ((unsigned long)(x) << PAGE_SHIFT)
#define pgtok(x) ((x) * (PAGE_SIZE / 1024))
+
+#endif /* !_MACHINE_PARAM_H_ */
+#endif /* !_NO_NAMESPACE_POLLUTION */
diff --git a/sys/ia64/include/vmparam.h b/sys/ia64/include/vmparam.h
index 7c95037..92f2568 100644
--- a/sys/ia64/include/vmparam.h
+++ b/sys/ia64/include/vmparam.h
@@ -1,7 +1,7 @@
/* $FreeBSD$ */
/* From: NetBSD: vmparam.h,v 1.6 1997/09/23 23:23:23 mjacob Exp */
-#ifndef _ALPHA_VMPARAM_H
-#define _ALPHA_VMPARAM_H
+#ifndef _MACHINE_VMPARAM_H
+#define _MACHINE_VMPARAM_H
/*
* Copyright (c) 1988 University of Utah.
* Copyright (c) 1992, 1993
@@ -45,7 +45,7 @@
*/
/*
- * Machine dependent constants for Alpha.
+ * Machine dependent constants for ia64.
*/
/*
* USRTEXT is the start of the user text/data space, while USRSTACK
@@ -121,6 +121,15 @@
protected against replacement */
/*
+ * Manipulating region bits of an address.
+ */
+#define IA64_RR_BASE(n) (((u_int64_t) (n)) << 61)
+#define IA64_RR_MASK(x) ((x) & ((1L << 61) - 1))
+
+#define IA64_PHYS_TO_RR6(x) ((x) | IA64_RR_BASE(6))
+#define IA64_PHYS_TO_RR7(x) ((x) | IA64_RR_BASE(7))
+
+/*
* Mach derived constants
*/
@@ -131,6 +140,8 @@
#define VM_MIN_KERNEL_ADDRESS IA64_RR_BASE(5)
#define VM_MAX_KERNEL_ADDRESS (IA64_RR_BASE(6) - 1)
+#define KERNBASE (VM_MIN_KERNEL_ADDRESS)
+
/* virtual sizes (bytes) for various kernel submaps */
#ifndef VM_KMEM_SIZE
#define VM_KMEM_SIZE (12 * 1024 * 1024)
@@ -150,4 +161,4 @@
#define VM_INITIAL_PAGEIN 16
#endif
-#endif /* !_ALPHA_VMPARAM_H */
+#endif /* !_MACHINE_VMPARAM_H */
OpenPOWER on IntegriCloud