diff options
author | Richard Braun <rbraun@sceen.net> | 2017-01-13 00:16:09 +0100 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2017-01-13 00:16:09 +0100 |
commit | cf59c5fa63b4639777fbe28fba79cfbd63fa6d4e (patch) | |
tree | 6cd4b64fc94f7cc9c2c1f75ba298169a88248657 /vm/vm_page.c | |
parent | 27e9a04a0a07707d7a85dc65198b4ab8f32888f6 (diff) |
Replace unsigned long with uintptr_t for integer/pointer conversions
This is mostly done for the machine-independent part.
Diffstat (limited to 'vm/vm_page.c')
-rw-r--r-- | vm/vm_page.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/vm/vm_page.c b/vm/vm_page.c index 19f74a40..d1d6349c 100644 --- a/vm/vm_page.c +++ b/vm/vm_page.c @@ -41,6 +41,7 @@ #include <kern/printk.h> #include <kern/sprintf.h> #include <kern/stddef.h> +#include <kern/stdint.h> #include <kern/string.h> #include <kern/thread.h> #include <kern/types.h> @@ -647,7 +648,7 @@ vm_page_setup(void) struct vm_page_zone *zone; struct vm_page *table, *page, *end; size_t nr_pages, table_size; - unsigned long va; + uintptr_t va; unsigned int i; phys_addr_t pa; @@ -666,7 +667,7 @@ vm_page_setup(void) printk("vm_page: page table size: %zu entries (%zuk)\n", nr_pages, table_size >> 10); table = vm_page_bootalloc(table_size); - va = (unsigned long)table; + va = (uintptr_t)table; /* * Initialize the zones, associating them to the page table. When @@ -691,7 +692,7 @@ vm_page_setup(void) table += vm_page_atop(vm_page_zone_size(zone)); } - while (va < (unsigned long)table) { + while (va < (uintptr_t)table) { pa = vm_page_direct_pa(va); page = vm_page_lookup(pa); assert((page != NULL) && (page->type == VM_PAGE_RESERVED)); |