All of lore.kernel.org
 help / color / mirror / Atom feed
* [uml-devel] [patch] restore do_mmap_pgoff() semantics
@ 2003-10-30 15:57 Gerd Knorr
  2003-10-30 16:03 ` [uml-devel] [patch] fixmap fix Gerd Knorr
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Gerd Knorr @ 2003-10-30 15:57 UTC (permalink / raw)
  To: Jeff Dike, uml devel

  Hi,

This patch makes do_mmap_pgoff behave as usual and intruduces a
new __do_mmap_pgoff function with the additional struct mm_struct
argument for the callers which need it.

Point of doing that is to allow a kernel tree with uml patch applied
still build non-uml kernels.

  Gerd

diff -u linux-2.6.0-test3/arch/um/kernel/syscall_kern.c linux/arch/um/kernel/syscall_kern.c
--- linux-2.6.0-test3/arch/um/kernel/syscall_kern.c	2003-08-22 09:41:46.000000000 +0000
+++ linux/arch/um/kernel/syscall_kern.c	2003-08-22 09:42:05.000000000 +0000
@@ -81,7 +81,7 @@
 	}
 
 	down_write(&mm->mmap_sem);
-	error = do_mmap_pgoff(mm, file, addr, len, prot, flags, pgoff);
+	error = __do_mmap_pgoff(mm, file, addr, len, prot, flags, pgoff);
 	up_write(&mm->mmap_sem);
 
 	if (file)
diff -u linux-2.6.0-test3/include/linux/mm.h linux/include/linux/mm.h
--- linux-2.6.0-test3/include/linux/mm.h	2003-08-22 08:36:13.000000000 +0000
+++ linux/include/linux/mm.h	2003-08-22 09:40:09.000000000 +0000
@@ -516,10 +516,18 @@
 
 extern unsigned long get_unmapped_area(struct file *, unsigned long, unsigned long, unsigned long, unsigned long);
 
-extern unsigned long do_mmap_pgoff(struct mm_struct *mm, struct file *file, 
-				   unsigned long addr, unsigned long len,
-				   unsigned long prot, unsigned long flag,
-				   unsigned long pgoff);
+extern unsigned long __do_mmap_pgoff(struct mm_struct *mm,
+	struct file *file, unsigned long addr,
+	unsigned long len, unsigned long prot,
+	unsigned long flag, unsigned long pgoff);
+
+static inline unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
+	unsigned long len, unsigned long prot,
+	unsigned long flag, unsigned long pgoff)
+{
+	return __do_mmap_pgoff(current->mm, file, addr, len,
+		               prot, flag, pgoff);
+}
 
 static inline unsigned long do_mmap(struct file *file, unsigned long addr,
 	unsigned long len, unsigned long prot,
@@ -529,8 +537,7 @@
 	if ((offset + PAGE_ALIGN(len)) < offset)
 		goto out;
 	if (!(offset & ~PAGE_MASK))
-		ret = do_mmap_pgoff(current->mm, file, addr, len, prot, flag, 
-				    offset >> PAGE_SHIFT);
+		ret = do_mmap_pgoff(file, addr, len, prot, flag, offset >> PAGE_SHIFT);
 out:
 	return ret;
 }
diff -u linux-2.6.0-test3/mm/mmap.c linux/mm/mmap.c
--- linux-2.6.0-test3/mm/mmap.c	2003-08-22 09:52:40.000000000 +0000
+++ linux/mm/mmap.c	2003-08-22 09:52:48.000000000 +0000
@@ -457,7 +457,7 @@
  * The caller must hold down_write(current->mm->mmap_sem).
  */
 
-unsigned long do_mmap_pgoff(struct mm_struct *mm, struct file * file, 
+unsigned long __do_mmap_pgoff(struct mm_struct *mm, struct file * file, 
 			    unsigned long addr, unsigned long len,
 			    unsigned long prot, unsigned long flags,
 			    unsigned long pgoff)


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

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

end of thread, other threads:[~2003-11-08 21:52 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-30 15:57 [uml-devel] [patch] restore do_mmap_pgoff() semantics Gerd Knorr
2003-10-30 16:03 ` [uml-devel] [patch] fixmap fix Gerd Knorr
2003-10-30 16:05 ` [uml-devel] [patch] serial console support Gerd Knorr
2003-11-08 22:00   ` [uml-devel] " Jeff Dike
2003-10-30 16:20 ` [uml-devel] [patch] kernel cmd line parser fix Gerd Knorr
2003-10-30 16:29 ` [uml-devel] [patch] change ubd names Gerd Knorr
2003-11-03  2:48   ` Jeff Dike
2003-11-03 16:13     ` Adam Heath
2003-11-03 17:44       ` Jeff Dike
2003-11-03 23:00         ` Adam Heath
2003-11-04  8:37     ` Gerd Knorr

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.