Skip to contentSkip to conversation

swsusp/s3: Assembly interactions need asmlinkage

PATCH Pavel Machek 2 participants 3 messages Feb 24, 2004 – Feb 25, 2004

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Hi!

swsusp/s3 assembly parts, and parts called from assembly are not properly marked asmlinkage; that leads to double fault on resume when someone compiles kernel with regparm. Thanks go to Stefan Seyfried for discovering this. Please apply,
Pavel

drivers/acpi/hardware/hwsleep.c renamed from linux/drivers/acpi/hardware/hwsleep.c +1 -1
@@ -205,7 +205,7 @@
  *
  ******************************************************************************/
 
-acpi_status
+acpi_status asmlinkage
 acpi_enter_sleep_state (
 	u8                              sleep_state)
 {
include/linux/suspend.h renamed from linux/include/linux/suspend.h +6 -0
@@ -82,4 +82,10 @@
 }
 #endif	/* CONFIG_PM */
 
+asmlinkage extern void do_magic(int is_resume);
+asmlinkage extern void do_magic_resume_1(void);
+asmlinkage extern void do_magic_resume_2(void);
+asmlinkage extern void do_magic_suspend_1(void);
+asmlinkage extern void do_magic_suspend_2(void);
+
 #endif /* _LINUX_SWSUSP_H */
Signature · 9 lines
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
#1 lore raw
Quoted 6 lines · Pavel Machek

Hi!

swsusp/s3 assembly parts, and parts called from assembly are not properly marked asmlinkage; that leads to double fault on resume when someone compiles kernel with regparm. Thanks go to Stefan Seyfried for discovering this. Please apply,

Does acpi_enter_sleep_state_s4bios() have the same issue ?

Signature · 11 lines
Bruno Ducrot

--  Which is worse:  ignorance or apathy?
--  Don't know.  Don't care.


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
#2 lore raw

Hi!

Quoted 6 lines
Quoted 4 lines

swsusp/s3 assembly parts, and parts called from assembly are not properly marked asmlinkage; that leads to double fault on resume when someone compiles kernel with regparm. Thanks go to Stefan Seyfried for discovering this. Please apply,

Does acpi_enter_sleep_state_s4bios() have the same issue ?

Yes, it does; I missed that. Thanks. Here's the fix.
Pavel

drivers/acpi/hardware/hwsleep.c +1 -1
@@ -359,7 +359,7 @@
  *
  ******************************************************************************/
 
-acpi_status
+acpi_status asmlinkage
 acpi_enter_sleep_state_s4bios (
 	void)
 {
Signature · 9 lines
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click