Index: t_uvm_physseg.c
===================================================================
RCS file: /cvsroot/src/tests/sys/uvm/t_uvm_physseg.c,v
retrieving revision 1.3
diff -u -r1.3 t_uvm_physseg.c
--- t_uvm_physseg.c	8 Feb 2018 09:05:20 -0000	1.3
+++ t_uvm_physseg.c	15 Dec 2018 05:06:55 -0000
@@ -270,6 +270,8 @@
 }
 #endif
 
+#define INT_TO_PSIZE_T(A) (psize_t)A
+
 /*
  * Test Fixture SetUp().
  */
@@ -473,9 +475,9 @@
 	psize_t npages4 = (VALID_END_PFN_4 - VALID_START_PFN_4);
 	struct vm_page *pgs, *slab = malloc(sizeof(struct vm_page) * (npages1
 #if VM_PHYSSEG_MAX > 2
-		+ npages2
+	    + npages2
 #endif
-		+ npages3));
+	    + npages3));
 
 	/* Fake early boot */
 
@@ -498,7 +500,7 @@
 #if VM_PHYSSEG_MAX > 2
 	    + npages2
 #endif
-	    , uvmexp.npages);
+	    , INT_TO_PSIZE_T(uvmexp.npages));
 #if VM_PHYSSEG_MAX > 1
 	/* Scavenge plug - goes into the same slab */
 	ATF_REQUIRE_EQ(uvm_physseg_plug(VALID_START_PFN_3, npages3, &upm3), true);
@@ -706,7 +708,7 @@
 	/* Should return a valid handle */
 	ATF_REQUIRE(uvm_physseg_valid_p(upm));
 
-	ATF_REQUIRE_EQ(npages1 + npages2, uvmexp.npages);
+	ATF_REQUIRE_EQ(npages1 + npages2, INT_TO_PSIZE_T(uvmexp.npages));
 
 	/* After the second call two segments should exist */
 	ATF_CHECK_EQ(2, uvm_physseg_get_entries());
@@ -889,7 +891,7 @@
 
 	uvm_physseg_init_seg(PHYSSEG_NODE_TO_HANDLE(seg), pgs);
 
-	ATF_REQUIRE_EQ(npages, uvmexp.npages);
+	ATF_REQUIRE_EQ(npages, INT_TO_PSIZE_T(uvmexp.npages));
 }
 
 #if 0
@@ -2279,7 +2281,11 @@
 	upm = uvm_physseg_find(VALID_AVAIL_END_PFN_1 - 1, NULL);
 
 	/* It should no longer exist */
+#if defined(UVM_HOTPLUG)
 	ATF_CHECK_EQ(NULL, upm);
+#else
+	ATF_CHECK_EQ(-1, upm);
+#endif
 
 	ATF_CHECK_EQ(1, uvm_physseg_get_entries());
 }
