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/amd64/include/pmap.h | 14 +++++++++++++- sys/arch/amd64/include/vmparam.h | 11 +---------- 2 files changed, 14 insertions(+), 11 deletions(-) (limited to 'sys/arch/amd64/include') diff --git a/sys/arch/amd64/include/pmap.h b/sys/arch/amd64/include/pmap.h index 1493759dc07..d1af66c6737 100644 --- a/sys/arch/amd64/include/pmap.h +++ b/sys/arch/amd64/include/pmap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.h,v 1.41 2013/03/31 17:07:02 deraadt Exp $ */ +/* $OpenBSD: pmap.h,v 1.42 2014/01/30 18:16:41 miod Exp $ */ /* $NetBSD: pmap.h,v 1.1 2003/04/26 18:39:46 fvdl Exp $ */ /* @@ -567,4 +567,16 @@ kvtopte(vaddr_t va) #define __HAVE_PMAP_DIRECT #endif /* _KERNEL && !_LOCORE */ + +#ifndef _LOCORE +struct pv_entry; +struct vm_page_md { + struct pv_entry *pv_list; +}; + +#define VM_MDPAGE_INIT(pg) do { \ + (pg)->mdpage.pv_list = NULL; \ +} while (0) +#endif /* !_LOCORE */ + #endif /* _MACHINE_PMAP_H_ */ diff --git a/sys/arch/amd64/include/vmparam.h b/sys/arch/amd64/include/vmparam.h index bd4b65595c8..cc78a8a8b7c 100644 --- a/sys/arch/amd64/include/vmparam.h +++ b/sys/arch/amd64/include/vmparam.h @@ -1,4 +1,4 @@ -/* $OpenBSD: vmparam.h,v 1.17 2014/01/23 22:06:29 miod Exp $ */ +/* $OpenBSD: vmparam.h,v 1.18 2014/01/30 18:16:41 miod Exp $ */ /* $NetBSD: vmparam.h,v 1.1 2003/04/26 18:39:49 fvdl Exp $ */ /*- @@ -110,13 +110,4 @@ #define VM_PHYSSEG_STRAT VM_PSTRAT_BIGFIRST #define VM_PHYSSEG_NOADD /* can't add RAM after vm_mem_init */ -struct pv_entry; -struct vm_page_md { - struct pv_entry *pv_list; -}; - -#define VM_MDPAGE_INIT(pg) do { \ - (pg)->mdpage.pv_list = NULL; \ -} while (0) - #endif /* _MACHINE_VMPARAM_H_ */ -- cgit v1.2.3