All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARCH_HAS_DEV_MEM_MMAP_MEM fix
@ 2006-11-30 22:36 Alex Williamson
  2006-12-01  9:56 ` Keir Fraser
  0 siblings, 1 reply; 3+ messages in thread
From: Alex Williamson @ 2006-11-30 22:36 UTC (permalink / raw)
  To: Keir Fraser; +Cc: xen-devel


   We can't really define our own mmap_mem external from
driver/xen/char/mem.c as long as drivers/char/mem.c is defining a static
version.  Patch below solves the problem.  Thanks,

	Alex

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
---

diff -r 9a410cc14944 linux-2.6-xen-sparse/drivers/char/mem.c
--- a/linux-2.6-xen-sparse/drivers/char/mem.c	Thu Nov 30 13:20:53 2006 -0700
+++ b/linux-2.6-xen-sparse/drivers/char/mem.c	Thu Nov 30 15:28:14 2006 -0700
@@ -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)
 {

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ARCH_HAS_DEV_MEM_MMAP_MEM fix
  2006-11-30 22:36 [PATCH] ARCH_HAS_DEV_MEM_MMAP_MEM fix Alex Williamson
@ 2006-12-01  9:56 ` Keir Fraser
  2006-12-01 13:15   ` Alex Williamson
  0 siblings, 1 reply; 3+ messages in thread
From: Keir Fraser @ 2006-12-01  9:56 UTC (permalink / raw)
  To: Alex Williamson; +Cc: xen-devel




On 30/11/06 22:36, "Alex Williamson" <alex.williamson@hp.com> wrote:

>    We can't really define our own mmap_mem external from
> driver/xen/char/mem.c as long as drivers/char/mem.c is 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ARCH_HAS_DEV_MEM_MMAP_MEM fix
  2006-12-01  9:56 ` Keir Fraser
@ 2006-12-01 13:15   ` Alex Williamson
  0 siblings, 0 replies; 3+ messages in thread
From: Alex Williamson @ 2006-12-01 13:15 UTC (permalink / raw)
  To: Keir Fraser; +Cc: xen-devel

On Fri, 2006-12-01 at 09:56 +0000, Keir Fraser wrote:
> 
> 
> On 30/11/06 22:36, "Alex Williamson" <alex.williamson@hp.com> wrote:
> 
> >    We can't really define our own mmap_mem external from
> > driver/xen/char/mem.c as long as drivers/char/mem.c is 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?

Hi Keir,

   That's probably a better solution.  Thanks,

	Alex

-- 
Alex Williamson                             HP Open Source & Linux Org.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-12-01 13:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-30 22:36 [PATCH] ARCH_HAS_DEV_MEM_MMAP_MEM fix Alex Williamson
2006-12-01  9:56 ` Keir Fraser
2006-12-01 13:15   ` Alex Williamson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.