Skip to contentSkip to conversation

NFS server as a module with -mregparm=3

PATCH New Marcelo Tosatti 1 participant 1 message Nov 28, 2005 NFS server

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 NFS server as a module with -mregparm=3

diff-tree b7844980a750ebe9f32ab5a29e370a4e32781e5d (from e8f3e8dd41308fb66c026f51bb86b23205ad48c1)

Author: Krzysztof Strasburger <[email protected]>
Date:   Wed Nov 2 10:43:36 2005 +0100

[PATCH] NFS server as a module with -mregparm=3

This patch makes it possible to compile the nfs server as a module, with -mregparm=3 (at least on x86).

Such a combination did not work, as handle_sys_nfsservctl was called from the sys_nfsservctl function (in fs/filesystems.c) with parameters in registers, but tried to read them from the stack.

Signed-off-by Krzysztof Strasburger
fs/nfsd/nfsctl.c +5 -0
index 59d65f5..287bcad 100644
@@ -212,8 +212,13 @@ static struct {
 };
 #define CMD_MAX (sizeof(sizes)/sizeof(sizes[0])-1)
 
+#ifdef MODULE
+long
+handle_sys_nfsservctl(int cmd, void *opaque_argp, void *opaque_resp)
+#else
 long
 asmlinkage handle_sys_nfsservctl(int cmd, void *opaque_argp, void *opaque_resp)
+#endif
 {
 	struct nfsctl_arg *	argp = opaque_argp;
 	union nfsctl_res *	resp = opaque_resp;