* [Linux-ia64] poweroff through ACPI does not work on 2.5.60 ia64
@ 2003-03-05 18:33 Xavier Bru
2003-03-07 6:15 ` David Mosberger
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Xavier Bru @ 2003-03-05 18:33 UTC (permalink / raw)
To: linux-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
----------------------------------------------------------------------------
diff --exclude-from /users/xb/proc/diff.exclude -Nur 2.5.60.ref/drivers/acpi/Kconfig 2.5.60/drivers/acpi/Kconfig
--- 2.5.60.ref/drivers/acpi/Kconfig 2003-02-10 19:39:14.000000000 +0100
+++ 2.5.60/drivers/acpi/Kconfig 2003-03-05 12:04:42.000000000 +0100
@@ -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.
diff --exclude-from /users/xb/proc/diff.exclude -Nur 2.5.60.ref/drivers/acpi/sleep.c 2.5.60/drivers/acpi/sleep.c
--- 2.5.60.ref/drivers/acpi/sleep.c 2003-02-10 19:37:56.000000000 +0100
+++ 2.5.60/drivers/acpi/sleep.c 2003-03-05 19:55:00.000000000 +0100
@@ -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]) {
--
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:Xavier.Bru@bull.net
addr: BULL, 1 rue de Provence, BP 208, 38432 Echirolles Cedex, FRANCE
_____________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Linux-ia64] poweroff through ACPI does not work on 2.5.60 ia64
2003-03-05 18:33 [Linux-ia64] poweroff through ACPI does not work on 2.5.60 ia64 Xavier Bru
@ 2003-03-07 6:15 ` David Mosberger
2003-03-14 16:03 ` Xavier Bru
2003-03-14 19:31 ` David Mosberger
2 siblings, 0 replies; 4+ messages in thread
From: David Mosberger @ 2003-03-07 6:15 UTC (permalink / raw)
To: linux-ia64
>>>>> On Wed, 5 Mar 2003 19:33:34 +0100 (NFT), Xavier Bru <Xavier.Bru@bull.net> said:
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Linux-ia64] poweroff through ACPI does not work on 2.5.60 ia64
2003-03-05 18:33 [Linux-ia64] poweroff through ACPI does not work on 2.5.60 ia64 Xavier Bru
2003-03-07 6:15 ` David Mosberger
@ 2003-03-14 16:03 ` Xavier Bru
2003-03-14 19:31 ` David Mosberger
2 siblings, 0 replies; 4+ messages in thread
From: Xavier Bru @ 2003-03-14 16:03 UTC (permalink / raw)
To: linux-ia64
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
--
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:Xavier.Bru@bull.net
addr: BULL, 1 rue de Provence, BP 208, 38432 Echirolles Cedex, FRANCE
_____________________________________________________________________
David Mosberger writes:
> >>>>> On Wed, 5 Mar 2003 19:33:34 +0100 (NFT), Xavier Bru <Xavier.Bru@bull.net> said:
>
> 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
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Linux-ia64] poweroff through ACPI does not work on 2.5.60 ia64
2003-03-05 18:33 [Linux-ia64] poweroff through ACPI does not work on 2.5.60 ia64 Xavier Bru
2003-03-07 6:15 ` David Mosberger
2003-03-14 16:03 ` Xavier Bru
@ 2003-03-14 19:31 ` David Mosberger
2 siblings, 0 replies; 4+ messages in thread
From: David Mosberger @ 2003-03-14 19:31 UTC (permalink / raw)
To: linux-ia64
>>>>> On Fri, 14 Mar 2003 17:03:26 +0100 (NFT), Xavier Bru <Xavier.Bru@bull.net> said:
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-03-14 19:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-05 18:33 [Linux-ia64] poweroff through ACPI does not work on 2.5.60 ia64 Xavier Bru
2003-03-07 6:15 ` David Mosberger
2003-03-14 16:03 ` Xavier Bru
2003-03-14 19:31 ` David Mosberger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox