summaryrefslogtreecommitdiff
path: root/i386/i386at
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2012-03-23 02:19:44 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2012-03-24 02:54:49 +0100
commit264b750cc2d576beadfd74bcde45ac75edc4aab9 (patch)
treecd1b50f73e31c9dc577083c49062d695c836933a /i386/i386at
parent7effecf87173a122c95427dafa971abbbdba3493 (diff)
Add missing phystokv/kvtophys calls
* i386/i386/vm_param.h [!MACH_XEN]: Do not include <xen/public/xen.h>. * 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 <machine/vm_param.h>. (virt_to_phys): Call _kvtophys. (phys_to_virt): Call phystokv. * linux/src/include/linux/compatmac.h: Include <asm/io.h>. (ioremap): Use phys_to_virt to convert physical address to virtual pointer. (my_iounmap): Likewise. * linux/dev/include/asm-i386/page.h: Include <mach/vm_param.h>. (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 <machine/vm_param.h> (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.
Diffstat (limited to 'i386/i386at')
-rw-r--r--i386/i386at/model_dep.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/i386/i386at/model_dep.c b/i386/i386at/model_dep.c
index ef2d672..01d515d 100644
--- a/i386/i386at/model_dep.c
+++ b/i386/i386at/model_dep.c
@@ -703,9 +703,9 @@ init_alloc_aligned(vm_size_t size, vm_offset_t *addrp)
}
/* Skip our own kernel code, data, and bss. */
- if ((avail_next > (vm_offset_t)start) && (addr < (vm_offset_t)end))
+ if ((phystokv(avail_next) > (vm_offset_t)start) && (phystokv(addr) < (vm_offset_t)end))
{
- avail_next = (vm_offset_t)end;
+ avail_next = _kvtophys(end);
goto retry;
}
@@ -720,9 +720,9 @@ init_alloc_aligned(vm_size_t size, vm_offset_t *addrp)
avail_next = mods_end_pa;
goto retry;
}
- if ((avail_next > kern_sym_start) && (addr < kern_sym_end))
+ if ((phystokv(avail_next) > kern_sym_start) && (phystokv(addr) < kern_sym_end))
{
- avail_next = kern_sym_end;
+ avail_next = _kvtophys(kern_sym_end);
goto retry;
}
if (boot_info.flags & MULTIBOOT_MODS)