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/sparc64/include | |
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/sparc64/include')
-rw-r--r-- | sys/arch/sparc64/include/pmap.h | 23 | ||||
-rw-r--r-- | sys/arch/sparc64/include/vmparam.h | 26 |
2 files changed, 23 insertions, 26 deletions
diff --git a/sys/arch/sparc64/include/pmap.h b/sys/arch/sparc64/include/pmap.h index d674032a908..e7556b4ca00 100644 --- a/sys/arch/sparc64/include/pmap.h +++ b/sys/arch/sparc64/include/pmap.h @@ -188,7 +188,28 @@ void switchexit(struct proc *); int ctx_alloc(struct pmap*); void ctx_free(struct pmap*); - #endif /* _KERNEL */ + +/* + * For each struct vm_page, there is a list of all currently valid virtual + * mappings of that page. + */ +typedef 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 */ +} *pv_entry_t; +/* PV flags encoded in the low bits of the VA of the first pv_entry */ + +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; \ +} while (0) + #endif /* _LOCORE */ #endif /* _MACHINE_PMAP_H_ */ diff --git a/sys/arch/sparc64/include/vmparam.h b/sys/arch/sparc64/include/vmparam.h index 7cf65c04adf..2994e461032 100644 --- a/sys/arch/sparc64/include/vmparam.h +++ b/sys/arch/sparc64/include/vmparam.h @@ -1,4 +1,4 @@ -/* $OpenBSD: vmparam.h,v 1.24 2014/01/23 22:06:30 miod Exp $ */ +/* $OpenBSD: vmparam.h,v 1.25 2014/01/30 18:16:41 miod Exp $ */ /* $NetBSD: vmparam.h,v 1.18 2001/05/01 02:19:19 thorpej Exp $ */ /* @@ -115,30 +115,6 @@ #define VM_PHYSSEG_STRAT VM_PSTRAT_BSEARCH #define VM_PHYSSEG_NOADD /* can't add RAM after vm_mem_init */ -/* - * For each struct vm_page, there is a list of all currently valid virtual - * mappings of that page. An entry is a pv_entry_t, the list is pv_table. - * - * XXX - this doesn't belong here, but for now we have to keep it here - * because of include ordering issues. - */ -typedef 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 */ -} *pv_entry_t; -/* PV flags encoded in the low bits of the VA of the first pv_entry */ - -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; \ -} while (0) - #if defined (_KERNEL) && !defined(_LOCORE) struct vm_map; vaddr_t dvma_mapin(struct vm_map *, vaddr_t, int, int); |