public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Mundt <lethal@linux-sh.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Jens Axboe <jens.axboe@oracle.com>,
	David Howells <dhowells@redhat.com>,
	Greg Ungerer <gerg@snapgear.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH -mm] splice: Disable vmsplice on nommu.
Date: Tue, 11 Sep 2007 17:23:07 +0900	[thread overview]
Message-ID: <20070911082307.GB19495@linux-sh.org> (raw)

The vmsplice rework in -mm breaks nommu:

fs/built-in.o: In function `splice_setup_vma':
fs/splice.c:1272: undefined reference to `may_expand_vm'
fs/splice.c:1272: undefined reference to `protection_map'
fs/splice.c:1272: undefined reference to `insert_vm_struct'
fs/splice.c:1272: undefined reference to `vm_stat_account'

This is going to be non-trivial to wire up properly on nommu, and
it's debateable whether there's even any point in trying. For now,
disable vmsplice if CONFIG_MMU=n and wire it up as a cond syscall
for the platforms that support both.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>

--

 fs/splice.c     |    2 ++
 kernel/sys_ni.c |    1 +
 2 files changed, 3 insertions(+)

--- linux-2.6.23-rc4-mm1.orig/fs/splice.c	2007-09-11 15:15:54.000000000 +0900
+++ linux-2.6.23-rc4-mm1/fs/splice.c	2007-09-11 17:11:02.000000000 +0900
@@ -1180,6 +1180,7 @@
 	return -EINVAL;
 }
 
+#ifdef CONFIG_MMU
 /*
  * Undo vmsplice_to_user map. Basically just lookup the vmas and
  * detach/unmap/remove them.
@@ -1686,6 +1687,7 @@
 
 	return error;
 }
+#endif /* CONFIG_MMU */
 
 asmlinkage long sys_splice(int fd_in, loff_t __user *off_in,
 			   int fd_out, loff_t __user *off_out,
--- linux-2.6.23-rc4-mm1.orig/kernel/sys_ni.c	2007-09-11 15:15:56.000000000 +0900
+++ linux-2.6.23-rc4-mm1/kernel/sys_ni.c	2007-09-11 17:09:24.000000000 +0900
@@ -139,6 +139,7 @@
 cond_syscall(sys_madvise);
 cond_syscall(sys_mremap);
 cond_syscall(sys_remap_file_pages);
+cond_syscall(sys_vmsplice);
 cond_syscall(compat_sys_move_pages);
 cond_syscall(compat_sys_migrate_pages);
 

             reply	other threads:[~2007-09-11  8:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-11  8:23 Paul Mundt [this message]
2007-09-11  9:35 ` [PATCH -mm] splice: Disable vmsplice on nommu Jens Axboe
2007-09-11 10:10   ` David Howells
2007-09-11 11:25     ` Jens Axboe
2007-09-11 16:57       ` David Howells

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=20070911082307.GB19495@linux-sh.org \
    --to=lethal@linux-sh.org \
    --cc=akpm@linux-foundation.org \
    --cc=dhowells@redhat.com \
    --cc=gerg@snapgear.com \
    --cc=jens.axboe@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox