public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH -mm] splice: Disable vmsplice on nommu.
@ 2007-09-11  8:23 Paul Mundt
  2007-09-11  9:35 ` Jens Axboe
  0 siblings, 1 reply; 5+ messages in thread
From: Paul Mundt @ 2007-09-11  8:23 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Jens Axboe, David Howells, Greg Ungerer, linux-kernel

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);
 

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

end of thread, other threads:[~2007-09-11 16:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-11  8:23 [PATCH -mm] splice: Disable vmsplice on nommu Paul Mundt
2007-09-11  9:35 ` Jens Axboe
2007-09-11 10:10   ` David Howells
2007-09-11 11:25     ` Jens Axboe
2007-09-11 16:57       ` David Howells

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox