From linux-kernel-owner+willy=40w.ods.org-S932145AbVK1R43@vger.kernel.org Mon Nov 28 18:57:16 2005 Return-Path: Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by mail.w.ods.org (8.13.3/8.13.3) with ESMTP id jASHvDui010640 for ; Mon, 28 Nov 2005 18:57:14 +0100 (CET) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932145AbVK1R43 (ORCPT ); Mon, 28 Nov 2005 12:56:29 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932149AbVK1R42 (ORCPT ); Mon, 28 Nov 2005 12:56:28 -0500 Received: from hera.kernel.org ([140.211.167.34]:55785 "EHLO hera.kernel.org") by vger.kernel.org with ESMTP id S932145AbVK1R42 (ORCPT ); Mon, 28 Nov 2005 12:56:28 -0500 Received: from logos.cnet (localhost [127.0.0.1]) by hera.kernel.org (8.13.1/8.13.1) with ESMTP id jASHuGHU013277; Mon, 28 Nov 2005 09:56:19 -0800 Received: by logos.cnet (Postfix, from userid 500) id 8021A122E64; Mon, 28 Nov 2005 10:14:34 -0200 (BRST) Date: Mon, 28 Nov 2005 10:14:34 -0200 From: Marcelo Tosatti To: Krzysztof Strasburger , Trond Myklebust Cc: linux-kernel@vger.kernel.org Subject: [2.4 PATCH] NFS server as a module with -mregparm=3 Message-ID: <20051128121434.GA24608@logos.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.5.1i X-Virus-Scanned: ClamAV version 0.85, clamav-milter version 0.85 on localhost X-Virus-Status: Clean Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org Status: RO Content-Length: 1372 Lines: 39 diff-tree b7844980a750ebe9f32ab5a29e370a4e32781e5d (from e8f3e8dd41308fb66c026f51bb86b23205ad48c1) Author: Krzysztof Strasburger 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 diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c index 59d65f5..287bcad 100644 --- a/fs/nfsd/nfsctl.c +++ b/fs/nfsd/nfsctl.c @@ -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; - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/