vkernel64: Sync to recent API changes.
authorzrj <rimvydas.jasinskas@gmail.com>
Wed, 27 Mar 2019 12:22:32 +0000 (14:22 +0200)
committerzrj <zrj@dragonflybsd.org>
Wed, 27 Mar 2019 12:38:53 +0000 (14:38 +0200)
sys/platform/vkernel64/platform/pmap.c

index a2d1a39..2ea8766 100644 (file)
@@ -1637,15 +1637,15 @@ pmap_growkernel(vm_offset_t kstart, vm_offset_t kend)
                while ((*pmap_pde(&kernel_pmap, kernel_vm_end) & VPTE_V) != 0) {
                        kernel_vm_end = (kernel_vm_end + PAGE_SIZE * NPTEPG) & ~(PAGE_SIZE * NPTEPG - 1);
                        nkpt++;
-                       if (kernel_vm_end - 1 >= kernel_map.header.end) {
-                               kernel_vm_end = kernel_map.header.end;
+                       if (kernel_vm_end - 1 >= vm_map_max(&kernel_map)) {
+                               kernel_vm_end = vm_map_max(&kernel_map);
                                break;
                        }
                }
        }
        addr = roundup2(addr, PAGE_SIZE * NPTEPG);
-       if (addr - 1 >= kernel_map.header.end)
-               addr = kernel_map.header.end;
+       if (addr - 1 >= vm_map_max(&kernel_map))
+               addr = vm_map_max(&kernel_map);
        while (kernel_vm_end < addr) {
                pde = pmap_pde(&kernel_pmap, kernel_vm_end);
                if (pde == NULL) {
@@ -1671,8 +1671,8 @@ pmap_growkernel(vm_offset_t kstart, vm_offset_t kend)
                if ((*pde & VPTE_V) != 0) {
                        kernel_vm_end = (kernel_vm_end + PAGE_SIZE * NPTEPG) &
                                        ~(PAGE_SIZE * NPTEPG - 1);
-                       if (kernel_vm_end - 1 >= kernel_map.header.end) {
-                               kernel_vm_end = kernel_map.header.end;
+                       if (kernel_vm_end - 1 >= vm_map_max(&kernel_map)) {
+                               kernel_vm_end = vm_map_max(&kernel_map);
                                break;
                        }
                        continue;
@@ -1700,8 +1700,8 @@ pmap_growkernel(vm_offset_t kstart, vm_offset_t kend)
 
                kernel_vm_end = (kernel_vm_end + PAGE_SIZE * NPTEPG) &
                                ~(PAGE_SIZE * NPTEPG - 1);
-               if (kernel_vm_end - 1 >= kernel_map.header.end) {
-                       kernel_vm_end = kernel_map.header.end;
+               if (kernel_vm_end - 1 >= vm_map_max(&kernel_map)) {
+                       kernel_vm_end = vm_map_max(&kernel_map);
                        break;
                }
        }