From: Xavier Bru <Xavier.Bru@bull.net>
To: linux-ia64@vger.kernel.org
Subject: [Linux-ia64] poweroff through ACPI does not work on 2.5.60 ia64
Date: Wed, 05 Mar 2003 18:33:34 +0000 [thread overview]
Message-ID: <marc-linux-ia64-105590709805974@msgid-missing> (raw)
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
_____________________________________________________________________
next reply other threads:[~2003-03-05 18:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-05 18:33 Xavier Bru [this message]
2003-03-07 6:15 ` [Linux-ia64] poweroff through ACPI does not work on 2.5.60 ia64 David Mosberger
2003-03-14 16:03 ` Xavier Bru
2003-03-14 19:31 ` David Mosberger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=marc-linux-ia64-105590709805974@msgid-missing \
--to=xavier.bru@bull.net \
--cc=linux-ia64@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox