[TG3]: Set minimal hw interrupt mitigation.
[linux-2.6/verdex.git] / drivers / acpi / sleep / poweroff.c
blobda237754ded9e53842ec511679a4c1b0ff274bf7
1 /*
2 * poweroff.c - ACPI handler for powering off the system.
4 * AKA S5, but it is independent of whether or not the kernel supports
5 * any other sleep support in the system.
6 */
8 #include <linux/pm.h>
9 #include <linux/init.h>
10 #include <acpi/acpi_bus.h>
11 #include <linux/sched.h>
12 #include "sleep.h"
14 static void
15 acpi_power_off (void)
17 printk("%s called\n",__FUNCTION__);
18 /* Some SMP machines only can poweroff in boot CPU */
19 set_cpus_allowed(current, cpumask_of_cpu(0));
20 acpi_wakeup_gpe_poweroff_prepare();
21 acpi_enter_sleep_state_prep(ACPI_STATE_S5);
22 ACPI_DISABLE_IRQS();
23 acpi_enter_sleep_state(ACPI_STATE_S5);
26 static int acpi_poweroff_init(void)
28 if (!acpi_disabled) {
29 u8 type_a, type_b;
30 acpi_status status;
32 status = acpi_get_sleep_type_data(ACPI_STATE_S5, &type_a, &type_b);
33 if (ACPI_SUCCESS(status))
34 pm_power_off = acpi_power_off;
36 return 0;
39 late_initcall(acpi_poweroff_init);