Module Name:    src
Committed By:   cherry
Date:           Thu Dec 22 13:26:25 UTC 2016

Modified Files:
        src/sys/uvm: Makefile uvm.h uvm_extern.h uvm_page.c

Log Message:
Use uvm_physseg.h:uvm_page_physload() instead of uvm_extern.h

For this, include uvm_physseg.h in the build and include tree, make a
cosmetic modification to the prototype for uvm_page_physload().


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/uvm/Makefile
cvs rdiff -u -r1.66 -r1.67 src/sys/uvm/uvm.h
cvs rdiff -u -r1.199 -r1.200 src/sys/uvm/uvm_extern.h
cvs rdiff -u -r1.187 -r1.188 src/sys/uvm/uvm_page.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/uvm/Makefile
diff -u src/sys/uvm/Makefile:1.9 src/sys/uvm/Makefile:1.10
--- src/sys/uvm/Makefile:1.9	Sat Feb 11 12:45:07 2006
+++ src/sys/uvm/Makefile	Thu Dec 22 13:26:24 2016
@@ -1,11 +1,11 @@
-#	$NetBSD: Makefile,v 1.9 2006/02/11 12:45:07 yamt Exp $
+#	$NetBSD: Makefile,v 1.10 2016/12/22 13:26:24 cherry Exp $
 
 INCSDIR= /usr/include/uvm
 
 INCS=	uvm.h uvm_amap.h uvm_anon.h uvm_aobj.h uvm_device.h \
 	uvm_extern.h uvm_fault.h uvm_fault_i.h uvm_glue.h \
 	uvm_km.h uvm_loan.h \
-	uvm_map.h uvm_object.h uvm_page.h \
+	uvm_map.h uvm_object.h uvm_page.h uvm_physseg.h \
 	uvm_pager.h uvm_param.h uvm_pdaemon.h uvm_pglist.h \
 	uvm_pmap.h uvm_prot.h uvm_stat.h \
 	uvm_swap.h

Index: src/sys/uvm/uvm.h
diff -u src/sys/uvm/uvm.h:1.66 src/sys/uvm/uvm.h:1.67
--- src/sys/uvm/uvm.h:1.66	Mon Apr 13 22:04:44 2015
+++ src/sys/uvm/uvm.h	Thu Dec 22 13:26:24 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm.h,v 1.66 2015/04/13 22:04:44 riastradh Exp $	*/
+/*	$NetBSD: uvm.h,v 1.67 2016/12/22 13:26:24 cherry Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -57,6 +57,7 @@
 #include <uvm/uvm_object.h>
 #include <uvm/uvm_page.h>
 #include <uvm/uvm_pager.h>
+#include <uvm/uvm_physseg.h>
 #include <uvm/uvm_pdaemon.h>
 #include <uvm/uvm_swap.h>
 

Index: src/sys/uvm/uvm_extern.h
diff -u src/sys/uvm/uvm_extern.h:1.199 src/sys/uvm/uvm_extern.h:1.200
--- src/sys/uvm/uvm_extern.h:1.199	Thu Dec 22 12:55:21 2016
+++ src/sys/uvm/uvm_extern.h	Thu Dec 22 13:26:24 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_extern.h,v 1.199 2016/12/22 12:55:21 cherry Exp $	*/
+/*	$NetBSD: uvm_extern.h,v 1.200 2016/12/22 13:26:24 cherry Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -475,6 +475,14 @@ extern bool vm_page_zero_enable;
 #endif
 
 /*
+ * Include the uvm_hotplug(9) API unconditionally until
+ * uvm_page_physload() et. al. are obsoleted
+ *
+ * After this, MD code will have to explicitly include it if needed.
+ */
+#include <uvm/uvm_physseg.h> 
+
+/*
  * helpers for calling ubc_release()
  */
 #ifdef PMAP_CACHE_VIVT
@@ -709,9 +717,6 @@ void			uvm_pagereplace(struct vm_page *,
 			    struct vm_page *);
 void			uvm_pagerealloc(struct vm_page *,
 			    struct uvm_object *, voff_t);
-/* Actually, uvm_page_physload takes PF#s which need their own type */
-void			uvm_page_physload(paddr_t, paddr_t, paddr_t,
-			    paddr_t, int);
 void			uvm_setpagesize(void);
 
 /* uvm_pager.c */

Index: src/sys/uvm/uvm_page.c
diff -u src/sys/uvm/uvm_page.c:1.187 src/sys/uvm/uvm_page.c:1.188
--- src/sys/uvm/uvm_page.c:1.187	Sat Apr 11 19:24:13 2015
+++ src/sys/uvm/uvm_page.c	Thu Dec 22 13:26:25 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_page.c,v 1.187 2015/04/11 19:24:13 joerg Exp $	*/
+/*	$NetBSD: uvm_page.c,v 1.188 2016/12/22 13:26:25 cherry Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -66,7 +66,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.187 2015/04/11 19:24:13 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.188 2016/12/22 13:26:25 cherry Exp $");
 
 #include "opt_ddb.h"
 #include "opt_uvm.h"
@@ -735,7 +735,7 @@ uvm_page_physget(paddr_t *paddrp)
  * => we are limited to VM_PHYSSEG_MAX physical memory segments
  */
 
-void
+uvm_physseg_t
 uvm_page_physload(paddr_t start, paddr_t end, paddr_t avail_start,
     paddr_t avail_end, int free_list)
 {
@@ -761,7 +761,7 @@ uvm_page_physload(paddr_t start, paddr_t
 		printf("\t%d segments allocated, ignoring 0x%llx -> 0x%llx\n",
 		    VM_PHYSSEG_MAX, (long long)start, (long long)end);
 		printf("\tincrease VM_PHYSSEG_MAX\n");
-		return;
+		return 0;
 	}
 
 	/*
@@ -840,6 +840,8 @@ uvm_page_physload(paddr_t start, paddr_t
 	if (!preload) {
 		uvmpdpol_reinit();
 	}
+
+	return 0;
 }
 
 /*

Reply via email to