From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Rafael J. Wysocki" Subject: Re: x86_64 restore_image declaration needs asmlinkage? Date: Wed, 28 Jun 2006 13:53:15 +0200 Message-ID: <200606281353.15252.rjw@sisk.pl> References: <200606282048.38746.ncunningham@linuxmail.org> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <200606282048.38746.ncunningham@linuxmail.org> Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: suspend2-devel-bounces@lists.suspend2.net Errors-To: suspend2-devel-bounces@lists.suspend2.net To: Nigel Cunningham Cc: Linux-pm mailing list , Linux Kernel Mailing List , suspend2-devel@lists.suspend2.net List-Id: linux-pm@vger.kernel.org Hi, On Wednesday 28 June 2006 12:48, Nigel Cunningham wrote: > I received a report of problems with CONFIG_REGPARM and suspending, that led > me to recheck asm calls and declarations. Not being a guru on these things, I > want to ask advice from those who know more. > > Along the way I noticed that current git has: > > extern asmlinkage int swsusp_arch_suspend(void); > extern asmlinkage int swsusp_arch_resume(void); > > This is right for x86, but for x86_64, we actually call a C routine in > arch/x86_64/kernel/suspend.c, which calls restore_image in > arch/x86_64/kernel/suspend_asm.S. Restore image is declared in suspend.c as > > extern int restore_image(void); > > should it be: > > extern asmlinkage int restore_image(void); > > Having swsusp_arch_resume declared as asmlinkage doesn't matter, does it? No, it doesn't. It would have mattered on i386 if the function had taken any arguments. AFAICT, on x86_64 it desn't matter at all. Greetings, Rafael