poweroff through ACPI does not work on 2.5.60 ia64
Hi,
Unlike the 2.4.* version that provides poweroff for ia64 through ACPI (power state S5), 2.5.60 only provides poweroff for i386 platforms through acpi/sleep.c.
With the following (not so clean :-) patch, I could have it working on 2.5.60. Thanks for providing a cleaner one.
Xavier
----------------------------------------------------------------------------
drivers/acpi/Kconfig +1 -1
@@ -58,7 +58,7 @@ config ACPI_SLEEP bool "Sleep States" - depends on X86 && ACPI && !ACPI_HT_ONLY && SOFTWARE_SUSPEND + depends on IA64 || X86 && ACPI && !ACPI_HT_ONLY && SOFTWARE_SUSPEND ---help--- This option adds support for ACPI suspend states.
drivers/acpi/sleep.c +9 -4
@@ -34,10 +34,12 @@#define ACPI_SYSTEM_FILE_SLEEP "sleep"#define ACPI_SYSTEM_FILE_ALARM "alarm" +static u8 sleep_states[ACPI_S_STATE_COUNT ]; + +#ifdef CONFIG_X86 static int acpi_system_sleep_open_fs (struct inode *inode,struct file *file);static int acpi_system_alarm_open_fs (struct inode *inode,struct file *file); -static u8 sleep_states[ACPI_S_STATE_COUNT ];static struct file_operations acpi_system_sleep_fops = { .open = acpi_system_sleep_open_fs,
@@ -52,6 +54,7 @@ .llseek = seq_lseek, .release = single_release, }; +#endif /* CONFIG_X86 */ static void acpi_power_off (void )
@@ -61,6 +64,8 @@acpi_enter_sleep_state (ACPI_STATE_S5 ); } +#ifdef CONFIG_X86 +/** * acpi_system_restore_state - OS-specific restoration of state * @state: sleep state we're exiting
@@ -97,7 +102,6 @@printk ("Broken toshiba laptop -> kicking interrupts\n" );init_8259A (0 ); } -return AE_OK ; }
@@ -624,7 +628,7 @@ end: return_VALUE(result ? result : count); } - +#endif /* CONFIG_X86 */ #if defined(CONFIG_MAGIC_SYSRQ ) && defined(CONFIG_PM )
@@ -665,7 +669,7 @@ }printk (")\n" ); - +#ifdef CONFIG_X86 /* 'sleep' [R/W]*/ entry =create_proc_entry (ACPI_SYSTEM_FILE_SLEEP ,S_IFREG |S_IRUGO |S_IWUSR , acpi_root_dir);
@@ -689,6 +693,7 @@ entry->proc_fops = &acpi_system_alarm_fops; entry->proc_fops->write = acpi_system_write_alarm; } +#endif /* CONFIG_X86 */ /* Install the soft-off (S5) handler. */ if (sleep_states[ACPI_STATE_S5 ]) {
Signature · 8 lines
Sincères salutations. _____________________________________________________________________ Xavier BRU BULL ISD/R&D/INTEL office: FREC B1-422 tel : +33 (0)4 76 29 77 45 http://www-frec.bull.fr fax : +33 (0)4 76 29 77 70 mailto:[email protected] addr: BULL, 1 rue de Provence, BP 208, 38432 Echirolles Cedex, FRANCE _____________________________________________________________________
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Xavier Bru
Xavier> Unlike the 2.4.* version that provides poweroff for ia64 Xavier> through ACPI (power state S5), 2.5.60 only provides poweroff Xavier> for i386 platforms through acpi/sleep.c. With the following Xavier> (not so clean :-) patch, I could have it working on Xavier> 2.5.60. Thanks for providing a cleaner one.
This code has been restructured for 2.5.64. Perhaps your patch isn't even needed anymore. Can you recheck once the ia64 patch for 2.5.64 is out?
Thanks,
--david
Hi David,
It is OK with 2.5.64:
Power down.
acpi_power_off called
hwsleep-0257 [01] acpi_enter_sleep_state: Entering sleep state [S5]
Thanks
Xavier
Signature · 8 lines
Sincères salutations. _____________________________________________________________________ Xavier BRU BULL ISD/R&D/INTEL office: FREC B1-422 tel : +33 (0)4 76 29 77 45 http://www-frec.bull.fr fax : +33 (0)4 76 29 77 70 mailto:[email protected] addr: BULL, 1 rue de Provence, BP 208, 38432 Echirolles Cedex, FRANCE _____________________________________________________________________
Quoted 16 lines · David Mosberger
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Xavier Bru
Xavier> Unlike the 2.4.* version that provides poweroff for ia64 Xavier> through ACPI (power state S5), 2.5.60 only provides poweroff Xavier> for i386 platforms through
acpi/sleep.c. With the following Xavier> (not so clean :-) patch, I could have it working on Xavier> 2.5.60. Thanks for providing a cleaner one.This code has been restructured for 2.5.64. Perhaps your patch isn't even needed anymore. Can you recheck once the ia64 patch for 2.5.64 is out?
Thanks,
--david
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Xavier Bru
Xavier> Hi David, It is OK with 2.5.64:
Xavier> Power down. acpi_power_off called hwsleep-0257 [01]
Xavier> acpi_enter_sleep_state: Entering sleep state [S5]
Great! Thanks for confirming.
--david