summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/alpha/include/pmap.h8
-rw-r--r--sys/arch/amd64/include/cpu.h11
-rw-r--r--sys/arch/amd64/include/pmap.h6
-rw-r--r--sys/arch/hppa/include/cpu.h4
-rw-r--r--sys/arch/hppa/include/pmap.h4
-rw-r--r--sys/arch/i386/include/cpu.h5
-rw-r--r--sys/arch/i386/include/pmap.h6
-rw-r--r--sys/arch/sh/include/pmap.h5
-rw-r--r--sys/arch/sparc64/include/pmap.h18
-rw-r--r--sys/arch/sparc64/include/pte.h8
10 files changed, 46 insertions, 29 deletions
diff --git a/sys/arch/alpha/include/pmap.h b/sys/arch/alpha/include/pmap.h
index 10ae6b9ccac..04d202c003b 100644
--- a/sys/arch/alpha/include/pmap.h
+++ b/sys/arch/alpha/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.27 2013/03/25 20:03:02 deraadt Exp $ */
+/* $OpenBSD: pmap.h,v 1.28 2013/03/31 17:07:03 deraadt Exp $ */
/* $NetBSD: pmap.h,v 1.37 2000/11/19 03:16:35 thorpej Exp $ */
/*-
@@ -70,13 +70,13 @@
#ifndef _PMAP_MACHINE_
#define _PMAP_MACHINE_
-#include <sys/lock.h>
-#include <sys/queue.h>
-
#include <machine/pte.h>
#ifdef _KERNEL
+#include <sys/lock.h>
+#include <sys/queue.h>
+
/*
* Machine-dependent virtual memory state.
*
diff --git a/sys/arch/amd64/include/cpu.h b/sys/arch/amd64/include/cpu.h
index c9977c895bb..06a6ef1599c 100644
--- a/sys/arch/amd64/include/cpu.h
+++ b/sys/arch/amd64/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.79 2013/03/12 09:37:16 mpi Exp $ */
+/* $OpenBSD: cpu.h,v 1.80 2013/03/31 17:07:02 deraadt Exp $ */
/* $NetBSD: cpu.h,v 1.1 2003/04/26 18:39:39 fvdl Exp $ */
/*-
@@ -41,16 +41,19 @@
/*
* Definitions unique to x86-64 cpu support.
*/
+#ifdef _KERNEL
#include <machine/frame.h>
#include <machine/segments.h>
-#include <machine/intrdefs.h>
#include <machine/cacheinfo.h>
+#include <machine/intrdefs.h>
#ifdef MULTIPROCESSOR
#include <machine/i82489reg.h>
#include <machine/i82489var.h>
#endif
+#endif /* _KERNEL */
+
#include <sys/device.h>
#include <sys/lock.h>
#include <sys/sched.h>
@@ -211,10 +214,10 @@ extern struct cpu_info cpu_info_primary;
#endif /* MULTIPROCESSOR */
-#endif /* _KERNEL */
-
#include <machine/psl.h>
+#endif /* _KERNEL */
+
#ifdef MULTIPROCESSOR
#include <sys/mplock.h>
#endif
diff --git a/sys/arch/amd64/include/pmap.h b/sys/arch/amd64/include/pmap.h
index a3f257fb20a..1493759dc07 100644
--- a/sys/arch/amd64/include/pmap.h
+++ b/sys/arch/amd64/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.40 2013/03/21 15:50:28 deraadt Exp $ */
+/* $OpenBSD: pmap.h,v 1.41 2013/03/31 17:07:02 deraadt Exp $ */
/* $NetBSD: pmap.h,v 1.1 2003/04/26 18:39:46 fvdl Exp $ */
/*
@@ -76,10 +76,12 @@
#define _MACHINE_PMAP_H_
#ifndef _LOCORE
+#ifdef _KERNEL
#include <machine/cpufunc.h>
-#include <machine/pte.h>
#include <machine/segments.h>
+#endif /* _KERNEL */
#include <uvm/uvm_object.h>
+#include <machine/pte.h>
#endif
/*
diff --git a/sys/arch/hppa/include/cpu.h b/sys/arch/hppa/include/cpu.h
index ebc07d46137..8a90d0b4485 100644
--- a/sys/arch/hppa/include/cpu.h
+++ b/sys/arch/hppa/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.85 2013/03/23 16:12:22 deraadt Exp $ */
+/* $OpenBSD: cpu.h,v 1.86 2013/03/31 17:07:03 deraadt Exp $ */
/*
* Copyright (c) 2000-2004 Michael Shalayeff
@@ -51,8 +51,10 @@
#ifndef _MACHINE_CPU_H_
#define _MACHINE_CPU_H_
+#ifdef _KERNEL
#include <machine/trap.h>
#include <machine/frame.h>
+#endif /* _KERNEL */
/*
* CPU types and features
diff --git a/sys/arch/hppa/include/pmap.h b/sys/arch/hppa/include/pmap.h
index a34a8dbe227..b80b1f4bc02 100644
--- a/sys/arch/hppa/include/pmap.h
+++ b/sys/arch/hppa/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.43 2011/11/14 14:29:53 deraadt Exp $ */
+/* $OpenBSD: pmap.h,v 1.44 2013/03/31 17:07:03 deraadt Exp $ */
/*
* Copyright (c) 2002-2004 Michael Shalayeff
@@ -29,10 +29,10 @@
#ifndef _MACHINE_PMAP_H_
#define _MACHINE_PMAP_H_
-#include <machine/pte.h>
#include <uvm/uvm_object.h>
#ifdef _KERNEL
+#include <machine/pte.h>
struct pmap {
struct uvm_object pm_obj; /* object (lck by object lock) */
diff --git a/sys/arch/i386/include/cpu.h b/sys/arch/i386/include/cpu.h
index 99a7448a763..e28cfdac825 100644
--- a/sys/arch/i386/include/cpu.h
+++ b/sys/arch/i386/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.128 2013/03/12 09:37:16 mpi Exp $ */
+/* $OpenBSD: cpu.h,v 1.129 2013/03/31 17:07:03 deraadt Exp $ */
/* $NetBSD: cpu.h,v 1.35 1996/05/05 19:29:26 christos Exp $ */
/*-
@@ -41,6 +41,7 @@
/*
* Definitions unique to i386 cpu support.
*/
+#ifdef _KERNEL
#include <machine/frame.h>
#include <machine/psl.h>
#include <machine/segments.h>
@@ -51,6 +52,8 @@
#include <machine/i82489var.h>
#endif
+#endif /* _KERNEL */
+
/*
* Arguments to hardclock, softclock and statclock
* encapsulate the previous machine state in an opaque
diff --git a/sys/arch/i386/include/pmap.h b/sys/arch/i386/include/pmap.h
index 1c1e3783e50..ff132c6ad65 100644
--- a/sys/arch/i386/include/pmap.h
+++ b/sys/arch/i386/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.61 2013/03/25 19:32:52 deraadt Exp $ */
+/* $OpenBSD: pmap.h,v 1.62 2013/03/31 17:07:03 deraadt Exp $ */
/* $NetBSD: pmap.h,v 1.44 2000/04/24 17:18:18 thorpej Exp $ */
/*
@@ -40,9 +40,11 @@
#ifndef _MACHINE_PMAP_H_
#define _MACHINE_PMAP_H_
+#ifdef _KERNEL
#include <machine/cpufunc.h>
-#include <machine/pte.h>
#include <machine/segments.h>
+#endif
+#include <machine/pte.h>
#include <uvm/uvm_object.h>
/*
diff --git a/sys/arch/sh/include/pmap.h b/sys/arch/sh/include/pmap.h
index 0cb06945ff0..71fa349d466 100644
--- a/sys/arch/sh/include/pmap.h
+++ b/sys/arch/sh/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.11 2013/03/25 20:15:34 deraadt Exp $ */
+/* $OpenBSD: pmap.h,v 1.12 2013/03/31 17:07:03 deraadt Exp $ */
/* $NetBSD: pmap.h,v 1.28 2006/04/10 23:12:11 uwe Exp $ */
/*-
@@ -39,10 +39,11 @@
#ifndef _SH_PMAP_H_
#define _SH_PMAP_H_
-#include <sys/queue.h>
+
#include <sh/pte.h>
#ifdef _KERNEL
+#include <sys/queue.h>
#define PMAP_STEAL_MEMORY
#define PMAP_GROWKERNEL
diff --git a/sys/arch/sparc64/include/pmap.h b/sys/arch/sparc64/include/pmap.h
index ff566de25a6..6e309699658 100644
--- a/sys/arch/sparc64/include/pmap.h
+++ b/sys/arch/sparc64/include/pmap.h
@@ -36,8 +36,10 @@
#ifndef _LOCORE
#include <machine/pte.h>
+#ifdef _KERNEL
#include <sys/queue.h>
#endif
+#endif
/*
* This scheme uses 2-level page tables.
@@ -86,6 +88,12 @@
#ifndef _LOCORE
+#define va_to_seg(v) (int)((((paddr_t)(v))>>STSHIFT)&STMASK)
+#define va_to_dir(v) (int)((((paddr_t)(v))>>PDSHIFT)&PDMASK)
+#define va_to_pte(v) (int)((((paddr_t)(v))>>PTSHIFT)&PTMASK)
+
+#ifdef _KERNEL
+
/*
* Support for big page sizes. This maps the page size to the
* page bits.
@@ -99,16 +107,6 @@ struct page_size_map {
};
extern struct page_size_map page_size_map[];
-/*
- * Pmap stuff
- */
-
-#define va_to_seg(v) (int)((((paddr_t)(v))>>STSHIFT)&STMASK)
-#define va_to_dir(v) (int)((((paddr_t)(v))>>PDSHIFT)&PDMASK)
-#define va_to_pte(v) (int)((((paddr_t)(v))>>PTSHIFT)&PTMASK)
-
-#ifdef _KERNEL
-
struct pmap {
int pm_ctx; /* Current context */
int pm_refs; /* ref count */
diff --git a/sys/arch/sparc64/include/pte.h b/sys/arch/sparc64/include/pte.h
index f71068baa57..69728745934 100644
--- a/sys/arch/sparc64/include/pte.h
+++ b/sys/arch/sparc64/include/pte.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pte.h,v 1.14 2008/11/26 14:10:23 claudio Exp $ */
+/* $OpenBSD: pte.h,v 1.15 2013/03/31 17:07:03 deraadt Exp $ */
/* $NetBSD: pte.h,v 1.7 2001/07/31 06:55:46 eeh Exp $ */
/*
@@ -24,6 +24,9 @@
*
*/
+#ifndef _MACHINE_PTE_H_
+#define _MACHINE_PTE_H_
+
/*
* Address translation works as follows:
*
@@ -247,3 +250,6 @@ void smp_tlb_flush_ctx(int);
#define IOPTE_RSVD 0x000000f1
#define IOPTE_WRITE 0x00000004
#define IOPTE_VALID 0x00000002
+
+#endif /* _MACHINE_PTE_H_ */
+