* x86_64 restore_image declaration needs asmlinkage?
@ 2006-06-28 10:48 Nigel Cunningham
2006-06-28 11:53 ` Rafael J. Wysocki
0 siblings, 1 reply; 4+ messages in thread
From: Nigel Cunningham @ 2006-06-28 10:48 UTC (permalink / raw)
To: Linux Kernel Mailing List, Linux-pm mailing list, suspend2-devel
[-- Attachment #1.1: Type: text/plain, Size: 871 bytes --]
Hi.
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?
Regards,
Nigel
--
Nigel, Michelle and Alisdair Cunningham
5 Mitchell Street
Cobden 3266
Victoria, Australia
[-- Attachment #1.2: Type: application/pgp-signature, Size: 189 bytes --]
[-- Attachment #2: Type: text/plain, Size: 168 bytes --]
_______________________________________________
Suspend2-devel mailing list
Suspend2-devel@lists.suspend2.net
http://lists.suspend2.net/mailman/listinfo/suspend2-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: x86_64 restore_image declaration needs asmlinkage?
2006-06-28 10:48 x86_64 restore_image declaration needs asmlinkage? Nigel Cunningham
@ 2006-06-28 11:53 ` Rafael J. Wysocki
2006-06-28 12:00 ` Nigel Cunningham
0 siblings, 1 reply; 4+ messages in thread
From: Rafael J. Wysocki @ 2006-06-28 11:53 UTC (permalink / raw)
To: Nigel Cunningham
Cc: Linux-pm mailing list, Linux Kernel Mailing List, suspend2-devel
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: x86_64 restore_image declaration needs asmlinkage?
2006-06-28 11:53 ` Rafael J. Wysocki
@ 2006-06-28 12:00 ` Nigel Cunningham
2006-06-28 12:10 ` Rafael J. Wysocki
0 siblings, 1 reply; 4+ messages in thread
From: Nigel Cunningham @ 2006-06-28 12:00 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Linux Kernel Mailing List, Linux-pm mailing list, suspend2-devel
[-- Attachment #1: Type: text/plain, Size: 1320 bytes --]
Hi.
On Wednesday 28 June 2006 21:53, Rafael J. Wysocki wrote:
> 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.
Right. But what about restore_image lacking the asmlinkage? I'm also wondering
if that does matter.
Regards,
Nigel
--
Nigel, Michelle and Alisdair Cunningham
5 Mitchell Street
Cobden 3266
Victoria, Australia
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: x86_64 restore_image declaration needs asmlinkage?
2006-06-28 12:00 ` Nigel Cunningham
@ 2006-06-28 12:10 ` Rafael J. Wysocki
0 siblings, 0 replies; 4+ messages in thread
From: Rafael J. Wysocki @ 2006-06-28 12:10 UTC (permalink / raw)
To: Nigel Cunningham
Cc: Linux-pm mailing list, Linux Kernel Mailing List, suspend2-devel
On Wednesday 28 June 2006 14:00, Nigel Cunningham wrote:
> Hi.
>
> On Wednesday 28 June 2006 21:53, Rafael J. Wysocki wrote:
> > 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.
>
> Right. But what about restore_image lacking the asmlinkage? I'm also wondering
> if that does matter.
I think asmlinkage would not matter here too (the function is x86_64-specific).
Greetings,
Rafael
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-06-28 12:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-28 10:48 x86_64 restore_image declaration needs asmlinkage? Nigel Cunningham
2006-06-28 11:53 ` Rafael J. Wysocki
2006-06-28 12:00 ` Nigel Cunningham
2006-06-28 12:10 ` Rafael J. Wysocki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox