diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2014-01-30 18:16:42 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2014-01-30 18:16:42 +0000 |
commit | 150ead6262ab7cbac1aa9cd45e3a1c47544e5c15 (patch) | |
tree | 1e82bc7c9335d090e0a0f0f3f4e179717b201a6e /sys/arch/m68k | |
parent | ba74087eb3865e1609b3d666f13601206dc40297 (diff) |
Move declaration of struct vm_page_md from <machine/vmparam.h> to
<machine/pmap.h> where it belongs, and compensate in <uvm/uvm_extern.h>
by including <uvm/uvm_pmap.h> before <uvm/uvm_page.h>. Tested on all
MACHINE_ARCH but amd64 and i386 (and hppa64).
Diffstat (limited to 'sys/arch/m68k')
-rw-r--r-- | sys/arch/m68k/include/pmap_motorola.h | 42 | ||||
-rw-r--r-- | sys/arch/m68k/include/vmparam.h | 40 |
2 files changed, 41 insertions, 41 deletions
diff --git a/sys/arch/m68k/include/pmap_motorola.h b/sys/arch/m68k/include/pmap_motorola.h index e545bdcc1cc..9c727ddb697 100644 --- a/sys/arch/m68k/include/pmap_motorola.h +++ b/sys/arch/m68k/include/pmap_motorola.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap_motorola.h,v 1.26 2011/11/01 21:20:55 miod Exp $ */ +/* $OpenBSD: pmap_motorola.h,v 1.27 2014/01/30 18:16:41 miod Exp $ */ /* * Copyright (c) 1987 Carnegie-Mellon University @@ -39,10 +39,13 @@ #ifndef _M68K_M68K_PMAP_MOTOROLA_H_ #define _M68K_M68K_PMAP_MOTOROLA_H_ +#if !defined(_LOCORE) +#include <machine/pte.h> +#endif + #ifdef _KERNEL #include <machine/cpu.h> -#include <machine/pte.h> /* * Pmap stuff @@ -117,4 +120,39 @@ void pmap_kenter_cache(vaddr_t, paddr_t, pt_entry_t); #endif /* _KERNEL */ +#ifndef _LOCORE + +struct pv_entry { + struct pv_entry *pv_next; /* next pv_entry */ + struct pmap *pv_pmap; /* pmap where mapping lies */ + vaddr_t pv_va; /* virtual address for mapping */ + st_entry_t *pv_ptste; /* non-zero if VA maps a PT page */ + struct pmap *pv_ptpmap; /* if pv_ptste, pmap for PT page */ + int pv_flags; /* flags */ +}; + +/* + * pv_flags carries some PTE permission bits as well - make sure extra flags + * values are > (1 << PG_SHIFT) + */ +/* header: all entries are cache inhibited */ +#define PV_CI (0x01 << PG_SHIFT) +/* header: entry maps a page table page */ +#define PV_PTPAGE (0x02 << PG_SHIFT) + +struct vm_page_md { + struct pv_entry pvent; +}; + +#define VM_MDPAGE_INIT(pg) do { \ + (pg)->mdpage.pvent.pv_next = NULL; \ + (pg)->mdpage.pvent.pv_pmap = NULL; \ + (pg)->mdpage.pvent.pv_va = 0; \ + (pg)->mdpage.pvent.pv_ptste = NULL; \ + (pg)->mdpage.pvent.pv_ptpmap = NULL; \ + (pg)->mdpage.pvent.pv_flags = 0; \ +} while (0) + +#endif /* _LOCORE */ + #endif /* !_M68K_M68K_PMAP_MOTOROLA_H_ */ diff --git a/sys/arch/m68k/include/vmparam.h b/sys/arch/m68k/include/vmparam.h index 5ce336af4a2..c68ac178126 100644 --- a/sys/arch/m68k/include/vmparam.h +++ b/sys/arch/m68k/include/vmparam.h @@ -1,4 +1,4 @@ -/* $OpenBSD: vmparam.h,v 1.12 2014/01/23 22:06:29 miod Exp $ */ +/* $OpenBSD: vmparam.h,v 1.13 2014/01/30 18:16:41 miod Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -114,42 +114,4 @@ */ #define VM_PHYSSEG_NOADD -#ifndef _LOCORE - -#include <machine/pte.h> /* st_entry_t */ - -/* XXX - belongs in pmap.h, but put here because of ordering issues */ -struct pv_entry { - struct pv_entry *pv_next; /* next pv_entry */ - struct pmap *pv_pmap; /* pmap where mapping lies */ - vaddr_t pv_va; /* virtual address for mapping */ - st_entry_t *pv_ptste; /* non-zero if VA maps a PT page */ - struct pmap *pv_ptpmap; /* if pv_ptste, pmap for PT page */ - int pv_flags; /* flags */ -}; - -/* - * pv_flags carries some PTE permission bits as well - make sure extra flags - * values are > (1 << PG_SHIFT) - */ -/* header: all entries are cache inhibited */ -#define PV_CI (0x01 << PG_SHIFT) -/* header: entry maps a page table page */ -#define PV_PTPAGE (0x02 << PG_SHIFT) - -struct vm_page_md { - struct pv_entry pvent; -}; - -#define VM_MDPAGE_INIT(pg) do { \ - (pg)->mdpage.pvent.pv_next = NULL; \ - (pg)->mdpage.pvent.pv_pmap = NULL; \ - (pg)->mdpage.pvent.pv_va = 0; \ - (pg)->mdpage.pvent.pv_ptste = NULL; \ - (pg)->mdpage.pvent.pv_ptpmap = NULL; \ - (pg)->mdpage.pvent.pv_flags = 0; \ -} while (0) - -#endif /* _LOCORE */ - #endif /* !_M68K_VMPARAM_H_ */ |