Loading Documentation/acpi-hotkey.txt 0 → 100644 +35 −0 Original line number Diff line number Diff line driver/acpi/hotkey.c implement: 1. /proc/acpi/hotkey/event_config (event based hotkey or event config interface): a. add a event based hotkey(event) : echo "0:bus::action:method:num:num" > event_config b. delete a event based hotkey(event): echo "1:::::num:num" > event_config c. modify a event based hotkey(event): echo "2:bus::action:method:num:num" > event_config 2. /proc/acpi/hotkey/poll_config (polling based hotkey or event config interface): a.add a polling based hotkey(event) : echo "0:bus:method:action:method:num" > poll_config this adding command will create a proc file /proc/acpi/hotkey/method, which is used to get result of polling. b.delete a polling based hotkey(event): echo "1:::::num" > event_config c.modify a polling based hotkey(event): echo "2:bus:method:action:method:num" > poll_config 3./proc/acpi/hotkey/action (interface to call aml method associated with a specific hotkey(event)) echo "event_num:event_type:event_argument" > /proc/acpi/hotkey/action. The result of the execution of this aml method is attached to /proc/acpi/hotkey/poll_method, which is dnyamically created. Please use command "cat /proc/acpi/hotkey/polling_method" to retrieve it. arch/frv/mb93090-mb00/pci-irq.c +1 −1 Original line number Diff line number Diff line Loading @@ -60,7 +60,7 @@ void __init pcibios_fixup_irqs(void) } } void __init pcibios_penalize_isa_irq(int irq) void __init pcibios_penalize_isa_irq(int irq, int active) { } Loading arch/i386/kernel/acpi/Makefile +4 −0 Original line number Diff line number Diff line Loading @@ -2,3 +2,7 @@ obj-$(CONFIG_ACPI_BOOT) := boot.o obj-$(CONFIG_X86_IO_APIC) += earlyquirk.o obj-$(CONFIG_ACPI_SLEEP) += sleep.o wakeup.o ifneq ($(CONFIG_ACPI_PROCESSOR),) obj-y += cstate.o endif arch/i386/kernel/acpi/cstate.c 0 → 100644 +103 −0 Original line number Diff line number Diff line /* * arch/i386/kernel/acpi/cstate.c * * Copyright (C) 2005 Intel Corporation * Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> * - Added _PDC for SMP C-states on Intel CPUs */ #include <linux/kernel.h> #include <linux/module.h> #include <linux/init.h> #include <linux/acpi.h> #include <acpi/processor.h> #include <asm/acpi.h> static void acpi_processor_power_init_intel_pdc(struct acpi_processor_power *pow) { struct acpi_object_list *obj_list; union acpi_object *obj; u32 *buf; /* allocate and initialize pdc. It will be used later. */ obj_list = kmalloc(sizeof(struct acpi_object_list), GFP_KERNEL); if (!obj_list) { printk(KERN_ERR "Memory allocation error\n"); return; } obj = kmalloc(sizeof(union acpi_object), GFP_KERNEL); if (!obj) { printk(KERN_ERR "Memory allocation error\n"); kfree(obj_list); return; } buf = kmalloc(12, GFP_KERNEL); if (!buf) { printk(KERN_ERR "Memory allocation error\n"); kfree(obj); kfree(obj_list); return; } buf[0] = ACPI_PDC_REVISION_ID; buf[1] = 1; buf[2] = ACPI_PDC_C_CAPABILITY_SMP; obj->type = ACPI_TYPE_BUFFER; obj->buffer.length = 12; obj->buffer.pointer = (u8 *) buf; obj_list->count = 1; obj_list->pointer = obj; pow->pdc = obj_list; return; } /* Initialize _PDC data based on the CPU vendor */ void acpi_processor_power_init_pdc(struct acpi_processor_power *pow, unsigned int cpu) { struct cpuinfo_x86 *c = cpu_data + cpu; pow->pdc = NULL; if (c->x86_vendor == X86_VENDOR_INTEL) acpi_processor_power_init_intel_pdc(pow); return; } EXPORT_SYMBOL(acpi_processor_power_init_pdc); /* * Initialize bm_flags based on the CPU cache properties * On SMP it depends on cache configuration * - When cache is not shared among all CPUs, we flush cache * before entering C3. * - When cache is shared among all CPUs, we use bm_check * mechanism as in UP case * * This routine is called only after all the CPUs are online */ void acpi_processor_power_init_bm_check(struct acpi_processor_flags *flags, unsigned int cpu) { struct cpuinfo_x86 *c = cpu_data + cpu; flags->bm_check = 0; if (num_online_cpus() == 1) flags->bm_check = 1; else if (c->x86_vendor == X86_VENDOR_INTEL) { /* * Today all CPUs that support C3 share cache. * TBD: This needs to look at cache shared map, once * multi-core detection patch makes to the base. */ flags->bm_check = 1; } } EXPORT_SYMBOL(acpi_processor_power_init_bm_check); arch/i386/kernel/acpi/wakeup.S +3 −2 Original line number Diff line number Diff line Loading @@ -74,8 +74,9 @@ wakeup_code: movw %ax,%fs movw $0x0e00 + 'i', %fs:(0x12) # need a gdt lgdt real_save_gdt - wakeup_code # need a gdt -- use lgdtl to force 32-bit operands, in case # the GDT is located past 16 megabytes. lgdtl real_save_gdt - wakeup_code movl real_save_cr0 - wakeup_code, %eax movl %eax, %cr0 Loading Loading
Documentation/acpi-hotkey.txt 0 → 100644 +35 −0 Original line number Diff line number Diff line driver/acpi/hotkey.c implement: 1. /proc/acpi/hotkey/event_config (event based hotkey or event config interface): a. add a event based hotkey(event) : echo "0:bus::action:method:num:num" > event_config b. delete a event based hotkey(event): echo "1:::::num:num" > event_config c. modify a event based hotkey(event): echo "2:bus::action:method:num:num" > event_config 2. /proc/acpi/hotkey/poll_config (polling based hotkey or event config interface): a.add a polling based hotkey(event) : echo "0:bus:method:action:method:num" > poll_config this adding command will create a proc file /proc/acpi/hotkey/method, which is used to get result of polling. b.delete a polling based hotkey(event): echo "1:::::num" > event_config c.modify a polling based hotkey(event): echo "2:bus:method:action:method:num" > poll_config 3./proc/acpi/hotkey/action (interface to call aml method associated with a specific hotkey(event)) echo "event_num:event_type:event_argument" > /proc/acpi/hotkey/action. The result of the execution of this aml method is attached to /proc/acpi/hotkey/poll_method, which is dnyamically created. Please use command "cat /proc/acpi/hotkey/polling_method" to retrieve it.
arch/frv/mb93090-mb00/pci-irq.c +1 −1 Original line number Diff line number Diff line Loading @@ -60,7 +60,7 @@ void __init pcibios_fixup_irqs(void) } } void __init pcibios_penalize_isa_irq(int irq) void __init pcibios_penalize_isa_irq(int irq, int active) { } Loading
arch/i386/kernel/acpi/Makefile +4 −0 Original line number Diff line number Diff line Loading @@ -2,3 +2,7 @@ obj-$(CONFIG_ACPI_BOOT) := boot.o obj-$(CONFIG_X86_IO_APIC) += earlyquirk.o obj-$(CONFIG_ACPI_SLEEP) += sleep.o wakeup.o ifneq ($(CONFIG_ACPI_PROCESSOR),) obj-y += cstate.o endif
arch/i386/kernel/acpi/cstate.c 0 → 100644 +103 −0 Original line number Diff line number Diff line /* * arch/i386/kernel/acpi/cstate.c * * Copyright (C) 2005 Intel Corporation * Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> * - Added _PDC for SMP C-states on Intel CPUs */ #include <linux/kernel.h> #include <linux/module.h> #include <linux/init.h> #include <linux/acpi.h> #include <acpi/processor.h> #include <asm/acpi.h> static void acpi_processor_power_init_intel_pdc(struct acpi_processor_power *pow) { struct acpi_object_list *obj_list; union acpi_object *obj; u32 *buf; /* allocate and initialize pdc. It will be used later. */ obj_list = kmalloc(sizeof(struct acpi_object_list), GFP_KERNEL); if (!obj_list) { printk(KERN_ERR "Memory allocation error\n"); return; } obj = kmalloc(sizeof(union acpi_object), GFP_KERNEL); if (!obj) { printk(KERN_ERR "Memory allocation error\n"); kfree(obj_list); return; } buf = kmalloc(12, GFP_KERNEL); if (!buf) { printk(KERN_ERR "Memory allocation error\n"); kfree(obj); kfree(obj_list); return; } buf[0] = ACPI_PDC_REVISION_ID; buf[1] = 1; buf[2] = ACPI_PDC_C_CAPABILITY_SMP; obj->type = ACPI_TYPE_BUFFER; obj->buffer.length = 12; obj->buffer.pointer = (u8 *) buf; obj_list->count = 1; obj_list->pointer = obj; pow->pdc = obj_list; return; } /* Initialize _PDC data based on the CPU vendor */ void acpi_processor_power_init_pdc(struct acpi_processor_power *pow, unsigned int cpu) { struct cpuinfo_x86 *c = cpu_data + cpu; pow->pdc = NULL; if (c->x86_vendor == X86_VENDOR_INTEL) acpi_processor_power_init_intel_pdc(pow); return; } EXPORT_SYMBOL(acpi_processor_power_init_pdc); /* * Initialize bm_flags based on the CPU cache properties * On SMP it depends on cache configuration * - When cache is not shared among all CPUs, we flush cache * before entering C3. * - When cache is shared among all CPUs, we use bm_check * mechanism as in UP case * * This routine is called only after all the CPUs are online */ void acpi_processor_power_init_bm_check(struct acpi_processor_flags *flags, unsigned int cpu) { struct cpuinfo_x86 *c = cpu_data + cpu; flags->bm_check = 0; if (num_online_cpus() == 1) flags->bm_check = 1; else if (c->x86_vendor == X86_VENDOR_INTEL) { /* * Today all CPUs that support C3 share cache. * TBD: This needs to look at cache shared map, once * multi-core detection patch makes to the base. */ flags->bm_check = 1; } } EXPORT_SYMBOL(acpi_processor_power_init_bm_check);
arch/i386/kernel/acpi/wakeup.S +3 −2 Original line number Diff line number Diff line Loading @@ -74,8 +74,9 @@ wakeup_code: movw %ax,%fs movw $0x0e00 + 'i', %fs:(0x12) # need a gdt lgdt real_save_gdt - wakeup_code # need a gdt -- use lgdtl to force 32-bit operands, in case # the GDT is located past 16 megabytes. lgdtl real_save_gdt - wakeup_code movl real_save_cr0 - wakeup_code, %eax movl %eax, %cr0 Loading