ARCH_HAS_DEV_MEM_MMAP_MEM fix
PATCH 1/1 ARCH_HAS_DEV_MEM_MMAP_MEM fix
We can't really define our own mmap_mem external fromdriver/xen/char/mem.c as long as drivers/char/mem.c is defining a static version. Patch below solves the problem. Thanks,
Alex
---
linux-2.6-xen-sparse/drivers/char/mem.c +2 -0
@@ -249,6 +249,7 @@ static pgprot_t phys_mem_access_prot(str }#endif +#ifndef ARCH_HAS_DEV_MEM_MMAP_MEM static int mmap_mem (struct file * file,struct vm_area_struct * vma) {size_t size = vma->vm_end - vma->vm_start;
@@ -269,6 +270,7 @@ static int mmap_mem(struct file * file,return -EAGAIN ; return 0; } +#endif static int mmap_kmem (struct file * file,struct vm_area_struct * vma) {
Quoted 3 lines · Alex Williamson
We can't really define our own
mmap_memexternal fromdriver/xen/char/mem.cas long asdrivers/char/mem.cis defining a static version. Patch below solves the problem. Thanks,
mmap_mem() in drivers/char/mem.c is still used by mmap_kmem(). We'll get a compile warning if the local static definition of mmap_mem() is removed (plus I think the native mmap_mem is the right one to use for mmap_kmem, at least on x86). Perhaps we should rename the Xen mmap_mem to xen_mmap_mem?
-- Keir
Quoted 4 lines · Keir Fraser
On 30/11/06 22:36, "Alex Williamson" <[email protected]> wrote:
Quoted 8 lines
Quoted 3 lines
We can't really define our own
mmap_memexternal fromdriver/xen/char/mem.cas long asdrivers/char/mem.cis defining a static version. Patch below solves the problem. Thanks,
mmap_mem()indrivers/char/mem.cis still used bymmap_kmem(). We'll get a compile warning if the local static definition ofmmap_mem()is removed (plus I think the nativemmap_memis the right one to use formmap_kmem, at least on x86). Perhaps we should rename the Xenmmap_memtoxen_mmap_mem?
Hi Keir,
That's probably a better solution. Thanks,
Alex
Signature · 1 line
Alex Williamson HP Open Source & Linux Org.