diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2012-03-23 02:19:44 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2012-03-24 02:54:49 +0100 |
commit | 264b750cc2d576beadfd74bcde45ac75edc4aab9 (patch) | |
tree | cd1b50f73e31c9dc577083c49062d695c836933a /linux/dev/glue/net.c | |
parent | 7effecf87173a122c95427dafa971abbbdba3493 (diff) | |
download | gnumach-264b750cc2d576beadfd74bcde45ac75edc4aab9.tar.gz gnumach-264b750cc2d576beadfd74bcde45ac75edc4aab9.tar.bz2 gnumach-264b750cc2d576beadfd74bcde45ac75edc4aab9.zip |
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 'linux/dev/glue/net.c')
-rw-r--r-- | linux/dev/glue/net.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/linux/dev/glue/net.c b/linux/dev/glue/net.c index a60275fc..15732737 100644 --- a/linux/dev/glue/net.c +++ b/linux/dev/glue/net.c @@ -61,6 +61,7 @@ #include <sys/types.h> #include <machine/spl.h> +#include <machine/vm_param.h> #include <mach/mach_types.h> #include <mach/kern_return.h> @@ -449,7 +450,7 @@ device_write (void *d, ipc_port_t reply_port, assert (copy->cpy_npages == 1); skb->copy = copy; - skb->data = ((void *) copy->cpy_page_list[0]->phys_addr + skb->data = ((void *) phystokv(copy->cpy_page_list[0]->phys_addr) + (copy->offset & PAGE_MASK)); skb->len = count; skb->head = skb->data; @@ -463,7 +464,7 @@ device_write (void *d, ipc_port_t reply_port, skb->end = skb->tail; memcpy (skb->data, - ((void *) copy->cpy_page_list[0]->phys_addr + ((void *) phystokv(copy->cpy_page_list[0]->phys_addr) + (copy->offset & PAGE_MASK)), amt); count -= amt; @@ -473,7 +474,7 @@ device_write (void *d, ipc_port_t reply_port, amt = PAGE_SIZE; if (amt > count) amt = count; - memcpy (p, (void *) copy->cpy_page_list[i]->phys_addr, amt); + memcpy (p, (void *) phystokv(copy->cpy_page_list[i]->phys_addr), amt); count -= amt; p += amt; } |