2 * acpi_osl.c - OS-dependent functions ($Revision: 83 $)
4 * Copyright (C) 2000 Andrew Henroid
5 * Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com>
6 * Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
8 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
28 #include <linux/config.h>
29 #include <linux/module.h>
30 #include <linux/kernel.h>
31 #include <linux/slab.h>
33 #include <linux/pci.h>
34 #include <linux/smp_lock.h>
35 #include <linux/interrupt.h>
36 #include <linux/kmod.h>
37 #include <linux/delay.h>
38 #include <linux/workqueue.h>
39 #include <linux/nmi.h>
40 #include <acpi/acpi.h>
42 #include <acpi/acpi_bus.h>
43 #include <acpi/processor.h>
44 #include <asm/uaccess.h>
46 #include <linux/efi.h>
49 #define _COMPONENT ACPI_OS_SERVICES
50 ACPI_MODULE_NAME ("osl")
52 #define PREFIX "ACPI: "
56 acpi_osd_exec_callback function;
60 #ifdef CONFIG_ACPI_CUSTOM_DSDT
61 #include CONFIG_ACPI_CUSTOM_DSDT_FILE
64 #ifdef ENABLE_DEBUGGER
65 #include <linux/kdb.h>
67 /* stuff for debugger support */
69 EXPORT_SYMBOL(acpi_in_debugger);
71 extern char line_buf[80];
72 #endif /*ENABLE_DEBUGGER*/
74 int acpi_specific_hotkey_enabled;
75 EXPORT_SYMBOL(acpi_specific_hotkey_enabled);
77 static unsigned int acpi_irq_irq;
78 static acpi_osd_handler acpi_irq_handler;
79 static void *acpi_irq_context;
80 static struct workqueue_struct *kacpid_wq;
83 acpi_os_initialize(void)
89 acpi_os_initialize1(void)
92 * Initialize PCI configuration space access, as we'll need to access
93 * it while walking the namespace (bus 0 and root bridges w/ _BBNs).
95 #ifdef CONFIG_ACPI_PCI
97 printk(KERN_ERR PREFIX "Access to PCI configuration space unavailable\n");
101 kacpid_wq = create_singlethread_workqueue("kacpid");
108 acpi_os_terminate(void)
110 if (acpi_irq_handler) {
111 acpi_os_remove_interrupt_handler(acpi_irq_irq,
115 destroy_workqueue(kacpid_wq);
121 acpi_os_printf(const char *fmt,...)
125 acpi_os_vprintf(fmt, args);
128 EXPORT_SYMBOL(acpi_os_printf);
131 acpi_os_vprintf(const char *fmt, va_list args)
133 static char buffer[512];
135 vsprintf(buffer, fmt, args);
137 #ifdef ENABLE_DEBUGGER
138 if (acpi_in_debugger) {
139 kdb_printf("%s", buffer);
141 printk("%s", buffer);
144 printk("%s", buffer);
149 acpi_os_allocate(acpi_size size)
151 return kmalloc(size, GFP_KERNEL);
155 acpi_os_free(void *ptr)
159 EXPORT_SYMBOL(acpi_os_free);
162 acpi_os_get_root_pointer(u32 flags, struct acpi_pointer *addr)
165 addr->pointer_type = ACPI_PHYSICAL_POINTER;
167 addr->pointer.physical =
168 (acpi_physical_address) virt_to_phys(efi.acpi20);
170 addr->pointer.physical =
171 (acpi_physical_address) virt_to_phys(efi.acpi);
173 printk(KERN_ERR PREFIX "System description tables not found\n");
177 if (ACPI_FAILURE(acpi_find_root_pointer(flags, addr))) {
178 printk(KERN_ERR PREFIX "System description tables not found\n");
187 acpi_os_map_memory(acpi_physical_address phys, acpi_size size, void __iomem **virt)
190 if (EFI_MEMORY_WB & efi_mem_attributes(phys)) {
191 *virt = (void __iomem *) phys_to_virt(phys);
193 *virt = ioremap(phys, size);
196 if (phys > ULONG_MAX) {
197 printk(KERN_ERR PREFIX "Cannot map memory that high\n");
198 return AE_BAD_PARAMETER;
201 * ioremap checks to ensure this is in reserved space
203 *virt = ioremap((unsigned long) phys, size);
213 acpi_os_unmap_memory(void __iomem *virt, acpi_size size)
218 #ifdef ACPI_FUTURE_USAGE
220 acpi_os_get_physical_address(void *virt, acpi_physical_address *phys)
223 return AE_BAD_PARAMETER;
225 *phys = virt_to_phys(virt);
231 #define ACPI_MAX_OVERRIDE_LEN 100
233 static char acpi_os_name[ACPI_MAX_OVERRIDE_LEN];
236 acpi_os_predefined_override (const struct acpi_predefined_names *init_val,
237 acpi_string *new_val)
239 if (!init_val || !new_val)
240 return AE_BAD_PARAMETER;
243 if (!memcmp (init_val->name, "_OS_", 4) && strlen(acpi_os_name)) {
244 printk(KERN_INFO PREFIX "Overriding _OS definition to '%s'\n",
246 *new_val = acpi_os_name;
253 acpi_os_table_override (struct acpi_table_header *existing_table,
254 struct acpi_table_header **new_table)
256 if (!existing_table || !new_table)
257 return AE_BAD_PARAMETER;
259 #ifdef CONFIG_ACPI_CUSTOM_DSDT
260 if (strncmp(existing_table->signature, "DSDT", 4) == 0)
261 *new_table = (struct acpi_table_header*)AmlCode;
271 acpi_irq(int irq, void *dev_id, struct pt_regs *regs)
273 return (*acpi_irq_handler)(acpi_irq_context) ? IRQ_HANDLED : IRQ_NONE;
277 acpi_os_install_interrupt_handler(u32 gsi, acpi_osd_handler handler, void *context)
282 * Ignore the GSI from the core, and use the value in our copy of the
283 * FADT. It may not be the same if an interrupt source override exists
286 gsi = acpi_fadt.sci_int;
287 if (acpi_gsi_to_irq(gsi, &irq) < 0) {
288 printk(KERN_ERR PREFIX "SCI (ACPI GSI %d) not registered\n",
293 acpi_irq_handler = handler;
294 acpi_irq_context = context;
295 if (request_irq(irq, acpi_irq, SA_SHIRQ, "acpi", acpi_irq)) {
296 printk(KERN_ERR PREFIX "SCI (IRQ%d) allocation failed\n", irq);
297 return AE_NOT_ACQUIRED;
305 acpi_os_remove_interrupt_handler(u32 irq, acpi_osd_handler handler)
308 free_irq(irq, acpi_irq);
309 acpi_irq_handler = NULL;
317 * Running in interpreter thread context, safe to sleep
321 acpi_os_sleep(acpi_integer ms)
323 current->state = TASK_INTERRUPTIBLE;
324 schedule_timeout(((signed long) ms * HZ) / 1000);
326 EXPORT_SYMBOL(acpi_os_sleep);
329 acpi_os_stall(u32 us)
337 touch_nmi_watchdog();
341 EXPORT_SYMBOL(acpi_os_stall);
344 * Support ACPI 3.0 AML Timer operand
345 * Returns 64-bit free-running, monotonically increasing timer
346 * with 100ns granularity
349 acpi_os_get_timer (void)
354 /* TBD: use HPET if available */
357 #ifdef CONFIG_X86_PM_TIMER
358 /* TBD: default to PM timer if HPET was not available */
361 printk(KERN_ERR PREFIX "acpi_os_get_timer() TBD\n");
368 acpi_io_address port,
380 *(u8*) value = inb(port);
383 *(u16*) value = inw(port);
386 *(u32*) value = inl(port);
394 EXPORT_SYMBOL(acpi_os_read_port);
398 acpi_io_address port,
419 EXPORT_SYMBOL(acpi_os_write_port);
423 acpi_physical_address phys_addr,
428 void __iomem *virt_addr;
432 if (EFI_MEMORY_WB & efi_mem_attributes(phys_addr)) {
433 /* HACK ALERT! We can use readb/w/l on real memory too.. */
434 virt_addr = (void __iomem *) phys_to_virt(phys_addr);
437 virt_addr = ioremap(phys_addr, width);
440 virt_addr = (void __iomem *) phys_to_virt(phys_addr);
446 *(u8*) value = readb(virt_addr);
449 *(u16*) value = readw(virt_addr);
452 *(u32*) value = readl(virt_addr);
467 acpi_os_write_memory(
468 acpi_physical_address phys_addr,
472 void __iomem *virt_addr;
476 if (EFI_MEMORY_WB & efi_mem_attributes(phys_addr)) {
477 /* HACK ALERT! We can use writeb/w/l on real memory too */
478 virt_addr = (void __iomem *) phys_to_virt(phys_addr);
481 virt_addr = ioremap(phys_addr, width);
484 virt_addr = (void __iomem *) phys_to_virt(phys_addr);
488 writeb(value, virt_addr);
491 writew(value, virt_addr);
494 writel(value, virt_addr);
506 #ifdef CONFIG_ACPI_PCI
509 acpi_os_read_pci_configuration (struct acpi_pci_id *pci_id, u32 reg, void *value, u32 width)
514 return AE_BAD_PARAMETER;
530 BUG_ON(!raw_pci_ops);
532 result = raw_pci_ops->read(pci_id->segment, pci_id->bus,
533 PCI_DEVFN(pci_id->device, pci_id->function),
536 return (result ? AE_ERROR : AE_OK);
538 EXPORT_SYMBOL(acpi_os_read_pci_configuration);
541 acpi_os_write_pci_configuration (struct acpi_pci_id *pci_id, u32 reg, acpi_integer value, u32 width)
559 BUG_ON(!raw_pci_ops);
561 result = raw_pci_ops->write(pci_id->segment, pci_id->bus,
562 PCI_DEVFN(pci_id->device, pci_id->function),
565 return (result ? AE_ERROR : AE_OK);
568 /* TODO: Change code to take advantage of driver model more */
570 acpi_os_derive_pci_id_2 (
571 acpi_handle rhandle, /* upper bound */
572 acpi_handle chandle, /* current node */
573 struct acpi_pci_id **id,
578 struct acpi_pci_id *pci_id = *id;
581 acpi_object_type type;
584 acpi_get_parent(chandle, &handle);
585 if (handle != rhandle) {
586 acpi_os_derive_pci_id_2(rhandle, handle, &pci_id, is_bridge, bus_number);
588 status = acpi_get_type(handle, &type);
589 if ( (ACPI_FAILURE(status)) || (type != ACPI_TYPE_DEVICE) )
592 status = acpi_evaluate_integer(handle, METHOD_NAME__ADR, NULL, &temp);
593 if (ACPI_SUCCESS(status)) {
594 pci_id->device = ACPI_HIWORD (ACPI_LODWORD (temp));
595 pci_id->function = ACPI_LOWORD (ACPI_LODWORD (temp));
598 pci_id->bus = *bus_number;
600 /* any nicer way to get bus number of bridge ? */
601 status = acpi_os_read_pci_configuration(pci_id, 0x0e, &tu8, 8);
602 if (ACPI_SUCCESS(status) &&
603 ((tu8 & 0x7f) == 1 || (tu8 & 0x7f) == 2)) {
604 status = acpi_os_read_pci_configuration(pci_id, 0x18, &tu8, 8);
605 if (!ACPI_SUCCESS(status)) {
606 /* Certainly broken... FIX ME */
611 status = acpi_os_read_pci_configuration(pci_id, 0x19, &tu8, 8);
612 if (ACPI_SUCCESS(status)) {
622 acpi_os_derive_pci_id (
623 acpi_handle rhandle, /* upper bound */
624 acpi_handle chandle, /* current node */
625 struct acpi_pci_id **id)
628 u8 bus_number = (*id)->bus;
630 acpi_os_derive_pci_id_2(rhandle, chandle, id, &is_bridge, &bus_number);
633 #else /*!CONFIG_ACPI_PCI*/
636 acpi_os_write_pci_configuration (
637 struct acpi_pci_id *pci_id,
646 acpi_os_read_pci_configuration (
647 struct acpi_pci_id *pci_id,
656 acpi_os_derive_pci_id (
657 acpi_handle rhandle, /* upper bound */
658 acpi_handle chandle, /* current node */
659 struct acpi_pci_id **id)
663 #endif /*CONFIG_ACPI_PCI*/
666 acpi_os_execute_deferred (
669 struct acpi_os_dpc *dpc = NULL;
671 ACPI_FUNCTION_TRACE ("os_execute_deferred");
673 dpc = (struct acpi_os_dpc *) context;
675 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Invalid (NULL) context.\n"));
679 dpc->function(dpc->context);
687 acpi_os_queue_for_execution(
689 acpi_osd_exec_callback function,
692 acpi_status status = AE_OK;
693 struct acpi_os_dpc *dpc;
694 struct work_struct *task;
696 ACPI_FUNCTION_TRACE ("os_queue_for_execution");
698 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Scheduling function [%p(%p)] for deferred execution.\n", function, context));
701 return_ACPI_STATUS (AE_BAD_PARAMETER);
704 * Allocate/initialize DPC structure. Note that this memory will be
705 * freed by the callee. The kernel handles the tq_struct list in a
706 * way that allows us to also free its memory inside the callee.
707 * Because we may want to schedule several tasks with different
708 * parameters we can't use the approach some kernel code uses of
709 * having a static tq_struct.
710 * We can save time and code by allocating the DPC and tq_structs
711 * from the same memory.
714 dpc = kmalloc(sizeof(struct acpi_os_dpc)+sizeof(struct work_struct), GFP_ATOMIC);
716 return_ACPI_STATUS (AE_NO_MEMORY);
718 dpc->function = function;
719 dpc->context = context;
721 task = (void *)(dpc+1);
722 INIT_WORK(task, acpi_os_execute_deferred, (void*)dpc);
724 if (!queue_work(kacpid_wq, task)) {
725 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Call to queue_work() failed.\n"));
730 return_ACPI_STATUS (status);
732 EXPORT_SYMBOL(acpi_os_queue_for_execution);
735 acpi_os_wait_events_complete(
738 flush_workqueue(kacpid_wq);
740 EXPORT_SYMBOL(acpi_os_wait_events_complete);
743 * Allocate the memory for a spinlock and initialize it.
746 acpi_os_create_lock (
747 acpi_handle *out_handle)
749 spinlock_t *lock_ptr;
751 ACPI_FUNCTION_TRACE ("os_create_lock");
753 lock_ptr = acpi_os_allocate(sizeof(spinlock_t));
755 spin_lock_init(lock_ptr);
757 ACPI_DEBUG_PRINT ((ACPI_DB_MUTEX, "Creating spinlock[%p].\n", lock_ptr));
759 *out_handle = lock_ptr;
761 return_ACPI_STATUS (AE_OK);
766 * Deallocate the memory for a spinlock.
769 acpi_os_delete_lock (
772 ACPI_FUNCTION_TRACE ("os_create_lock");
774 ACPI_DEBUG_PRINT ((ACPI_DB_MUTEX, "Deleting spinlock[%p].\n", handle));
776 acpi_os_free(handle);
782 * Acquire a spinlock.
784 * handle is a pointer to the spinlock_t.
785 * flags is *not* the result of save_flags - it is an ACPI-specific flag variable
786 * that indicates whether we are at interrupt level.
789 acpi_os_acquire_lock (
793 ACPI_FUNCTION_TRACE ("os_acquire_lock");
795 ACPI_DEBUG_PRINT ((ACPI_DB_MUTEX, "Acquiring spinlock[%p] from %s level\n", handle,
796 ((flags & ACPI_NOT_ISR) ? "non-interrupt" : "interrupt")));
798 if (flags & ACPI_NOT_ISR)
801 spin_lock((spinlock_t *)handle);
808 * Release a spinlock. See above.
811 acpi_os_release_lock (
815 ACPI_FUNCTION_TRACE ("os_release_lock");
817 ACPI_DEBUG_PRINT ((ACPI_DB_MUTEX, "Releasing spinlock[%p] from %s level\n", handle,
818 ((flags & ACPI_NOT_ISR) ? "non-interrupt" : "interrupt")));
820 spin_unlock((spinlock_t *)handle);
822 if (flags & ACPI_NOT_ISR)
830 acpi_os_create_semaphore(
835 struct semaphore *sem = NULL;
837 ACPI_FUNCTION_TRACE ("os_create_semaphore");
839 sem = acpi_os_allocate(sizeof(struct semaphore));
841 return_ACPI_STATUS (AE_NO_MEMORY);
842 memset(sem, 0, sizeof(struct semaphore));
844 sema_init(sem, initial_units);
846 *handle = (acpi_handle*)sem;
848 ACPI_DEBUG_PRINT ((ACPI_DB_MUTEX, "Creating semaphore[%p|%d].\n", *handle, initial_units));
850 return_ACPI_STATUS (AE_OK);
852 EXPORT_SYMBOL(acpi_os_create_semaphore);
856 * TODO: A better way to delete semaphores? Linux doesn't have a
857 * 'delete_semaphore()' function -- may result in an invalid
858 * pointer dereference for non-synchronized consumers. Should
859 * we at least check for blocked threads and signal/cancel them?
863 acpi_os_delete_semaphore(
866 struct semaphore *sem = (struct semaphore*) handle;
868 ACPI_FUNCTION_TRACE ("os_delete_semaphore");
871 return_ACPI_STATUS (AE_BAD_PARAMETER);
873 ACPI_DEBUG_PRINT ((ACPI_DB_MUTEX, "Deleting semaphore[%p].\n", handle));
875 acpi_os_free(sem); sem = NULL;
877 return_ACPI_STATUS (AE_OK);
879 EXPORT_SYMBOL(acpi_os_delete_semaphore);
883 * TODO: The kernel doesn't have a 'down_timeout' function -- had to
884 * improvise. The process is to sleep for one scheduler quantum
885 * until the semaphore becomes available. Downside is that this
886 * may result in starvation for timeout-based waits when there's
887 * lots of semaphore activity.
889 * TODO: Support for units > 1?
892 acpi_os_wait_semaphore(
897 acpi_status status = AE_OK;
898 struct semaphore *sem = (struct semaphore*)handle;
901 ACPI_FUNCTION_TRACE ("os_wait_semaphore");
903 if (!sem || (units < 1))
904 return_ACPI_STATUS (AE_BAD_PARAMETER);
907 return_ACPI_STATUS (AE_SUPPORT);
909 ACPI_DEBUG_PRINT ((ACPI_DB_MUTEX, "Waiting for semaphore[%p|%d|%d]\n", handle, units, timeout));
919 * A zero timeout value indicates that we shouldn't wait - just
920 * acquire the semaphore if available otherwise return AE_TIME
921 * (a.k.a. 'would block').
924 if(down_trylock(sem))
932 case ACPI_WAIT_FOREVER:
941 // TODO: A better timeout algorithm?
944 static const int quantum_ms = 1000/HZ;
946 ret = down_trylock(sem);
947 for (i = timeout; (i > 0 && ret < 0); i -= quantum_ms) {
948 current->state = TASK_INTERRUPTIBLE;
950 ret = down_trylock(sem);
959 if (ACPI_FAILURE(status)) {
960 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Failed to acquire semaphore[%p|%d|%d], %s\n",
961 handle, units, timeout, acpi_format_exception(status)));
964 ACPI_DEBUG_PRINT ((ACPI_DB_MUTEX, "Acquired semaphore[%p|%d|%d]\n", handle, units, timeout));
967 return_ACPI_STATUS (status);
969 EXPORT_SYMBOL(acpi_os_wait_semaphore);
973 * TODO: Support for units > 1?
976 acpi_os_signal_semaphore(
980 struct semaphore *sem = (struct semaphore *) handle;
982 ACPI_FUNCTION_TRACE ("os_signal_semaphore");
984 if (!sem || (units < 1))
985 return_ACPI_STATUS (AE_BAD_PARAMETER);
988 return_ACPI_STATUS (AE_SUPPORT);
990 ACPI_DEBUG_PRINT ((ACPI_DB_MUTEX, "Signaling semaphore[%p|%d]\n", handle, units));
994 return_ACPI_STATUS (AE_OK);
996 EXPORT_SYMBOL(acpi_os_signal_semaphore);
998 #ifdef ACPI_FUTURE_USAGE
1000 acpi_os_get_line(char *buffer)
1003 #ifdef ENABLE_DEBUGGER
1004 if (acpi_in_debugger) {
1007 kdb_read(buffer, sizeof(line_buf));
1009 /* remove the CR kdb includes */
1010 chars = strlen(buffer) - 1;
1011 buffer[chars] = '\0';
1017 #endif /* ACPI_FUTURE_USAGE */
1019 /* Assumes no unreadable holes inbetween */
1021 acpi_os_readable(void *ptr, acpi_size len)
1023 #if defined(__i386__) || defined(__x86_64__)
1025 return !__get_user(tmp, (char __user *)ptr) && !__get_user(tmp, (char __user *)ptr + len - 1);
1030 #ifdef ACPI_FUTURE_USAGE
1032 acpi_os_writable(void *ptr, acpi_size len)
1034 /* could do dummy write (racy) or a kernel page table lookup.
1035 The later may be difficult at early boot when kmap doesn't work yet. */
1041 acpi_os_get_thread_id (void)
1044 return current->pid;
1056 case ACPI_SIGNAL_FATAL:
1057 printk(KERN_ERR PREFIX "Fatal opcode executed\n");
1059 case ACPI_SIGNAL_BREAKPOINT:
1062 * ACPI spec. says to treat it as a NOP unless
1063 * you are debugging. So if/when we integrate
1064 * AML debugger into the kernel debugger its
1065 * hook will go here. But until then it is
1066 * not useful to print anything on breakpoints.
1075 EXPORT_SYMBOL(acpi_os_signal);
1078 acpi_os_name_setup(char *str)
1080 char *p = acpi_os_name;
1081 int count = ACPI_MAX_OVERRIDE_LEN-1;
1086 for (; count-- && str && *str; str++) {
1087 if (isalnum(*str) || *str == ' ' || *str == ':')
1089 else if (*str == '\'' || *str == '"')
1100 __setup("acpi_os_name=", acpi_os_name_setup);
1104 * empty string disables _OSI
1105 * TBD additional string adds to _OSI
1108 acpi_osi_setup(char *str)
1110 if (str == NULL || *str == '\0') {
1111 printk(KERN_INFO PREFIX "_OSI method disabled\n");
1112 acpi_gbl_create_osi_method = FALSE;
1116 printk(KERN_ERR PREFIX "_OSI additional string ignored -- %s\n", str);
1122 __setup("acpi_osi=", acpi_osi_setup);
1124 /* enable serialization to combat AE_ALREADY_EXISTS errors */
1126 acpi_serialize_setup(char *str)
1128 printk(KERN_INFO PREFIX "serialize enabled\n");
1130 acpi_gbl_all_methods_serialized = TRUE;
1135 __setup("acpi_serialize", acpi_serialize_setup);
1138 * Wake and Run-Time GPES are expected to be separate.
1139 * We disable wake-GPEs at run-time to prevent spurious
1142 * However, if a system exists that shares Wake and
1143 * Run-time events on the same GPE this flag is available
1144 * to tell Linux to keep the wake-time GPEs enabled at run-time.
1147 acpi_wake_gpes_always_on_setup(char *str)
1149 printk(KERN_INFO PREFIX "wake GPEs not disabled\n");
1151 acpi_gbl_leave_wake_gpes_disabled = FALSE;
1156 __setup("acpi_wake_gpes_always_on", acpi_wake_gpes_always_on_setup);
1159 acpi_hotkey_setup(char *str)
1161 acpi_specific_hotkey_enabled = TRUE;
1165 __setup("acpi_specific_hotkey", acpi_hotkey_setup);
1168 * max_cstate is defined in the base kernel so modules can
1169 * change it w/o depending on the state of the processor module.
1171 unsigned int max_cstate = ACPI_PROCESSOR_MAX_POWER;
1174 EXPORT_SYMBOL(max_cstate);