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	17 Dec 2018 06:53:29 -0000
@@ -271,6 +271,11 @@
 #endif
 
 /*
+ * This macro was added to convert uvmexp.npages from int to psize_t
+ */
+#define INT_TO_PSIZE_T(X) (psize_t)X
+
+/*
  * Test Fixture SetUp().
  */
 static void
@@ -498,7 +503,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 +711,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 +894,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 +2284,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());
 }
