From 264b750cc2d576beadfd74bcde45ac75edc4aab9 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Fri, 23 Mar 2012 02:19:44 +0100 Subject: Add missing phystokv/kvtophys calls * i386/i386/vm_param.h [!MACH_XEN]: Do not include . * i386/i386at/model_dep.c (init_alloc_aligned): Use phystokv to compare physical memory addresses with kernel start, end, and symbol table. * i386/intel/pmap.c (pmap_enter): Use kvtophys to convert ptp pointer to pte entry. * linux/dev/init/main.c (alloc_contig_mem, linux_init): Use phystokv to convert allocated pages to virtual pointer. * linux/src/include/asm-i386/io.h: Include . (virt_to_phys): Call _kvtophys. (phys_to_virt): Call phystokv. * linux/src/include/linux/compatmac.h: Include . (ioremap): Use phys_to_virt to convert physical address to virtual pointer. (my_iounmap): Likewise. * linux/dev/include/asm-i386/page.h: Include . (PAGE_SHIFT, PAGE_SIZE, PAGE_MASK): Remove macros. * linux/src/drivers/scsi/ncr53c8xx.c (vm_size_t): Remove type. * linux/dev/glue/net.c: Include (device_write): Call phystokv to convert from physical page address to virtual pointer. * linux/dev/glue/block.c (alloc_buffer, free_buffer, rdwr_full): Likewise. --- linux/dev/init/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'linux/dev/init/main.c') diff --git a/linux/dev/init/main.c b/linux/dev/init/main.c index f5c4832..ecbd0b6 100644 --- a/linux/dev/init/main.c +++ b/linux/dev/init/main.c @@ -149,7 +149,7 @@ linux_init (void) /* * Free unused memory. */ - while (pages && pages->phys_addr < round_page (memory_start)) + while (pages && phystokv(pages->phys_addr) < round_page (memory_start)) pages = (vm_page_t) pages->pageq.next; if (pages) free_contig_mem (pages); @@ -296,7 +296,7 @@ alloc_contig_mem (unsigned size, unsigned limit, kfree ((vm_offset_t) bits, bits_len); if (pages) *pages = page_list; - return (m); + return phystokv(m); } /* -- cgit v1.2.3