From 150ead6262ab7cbac1aa9cd45e3a1c47544e5c15 Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Thu, 30 Jan 2014 18:16:42 +0000 Subject: Move declaration of struct vm_page_md from to where it belongs, and compensate in by including before . Tested on all MACHINE_ARCH but amd64 and i386 (and hppa64). --- sys/arch/sparc64/include/pmap.h | 23 ++++++++++++++++++++++- sys/arch/sparc64/include/vmparam.h | 26 +------------------------- 2 files changed, 23 insertions(+), 26 deletions(-) (limited to 'sys/arch/sparc64/include') 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); -- cgit v1.2.3