All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerd Knorr <kraxel@bytesex.org>
To: Paul Giordano <giordano@covad.net>,
	user-mode-linux-devel@lists.sourceforge.net
Subject: [uml-devel] Re: uml-patch-2.6.0-test5
Date: 10 Sep 2003 15:39:40 +0200	[thread overview]
Message-ID: <87ekyo92zn.fsf@bytesex.org> (raw)
In-Reply-To: <1063194344.5333.6.camel@tyan.crapulence.org>

Paul Giordano <giordano@covad.net> writes:

> Seems all the do_mmap_pgoff's will fail with the change made in
> mmap.c.While I understand the change is to enable compilation of a uml
> kernel, it really shouldn't break the normal compiles as well, should
> it?

Patch below should fix that.  At least it did for the -test3 patch :)

  Gerd

==============================[ cut here ]==============================
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:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

      reply	other threads:[~2003-09-10 13:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-10 11:45 [uml-devel] Re: uml-patch-2.6.0-test5 Paul Giordano
2003-09-10 13:39 ` Gerd Knorr [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ekyo92zn.fsf@bytesex.org \
    --to=kraxel@bytesex.org \
    --cc=giordano@covad.net \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.