forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge master.kernel.org:/pub/scm/linux/kernel/git/lenb/linux-2.6
- Loading branch information
Showing
198 changed files
with
7,755 additions
and
5,428 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
/* | ||
* arch/i386/kernel/acpi/cstate.c | ||
* | ||
* Copyright (C) 2005 Intel Corporation | ||
* Venkatesh Pallipadi <[email protected]> | ||
* - 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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ | |
* Copyright (C) 2001 Jenna Hall <[email protected]> | ||
* Copyright (C) 2001 Takayoshi Kochi <[email protected]> | ||
* Copyright (C) 2002 Erich Focht <[email protected]> | ||
* Copyright (C) 2004 Ashok Raj <[email protected]> | ||
* | ||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
* | ||
|
@@ -67,6 +68,11 @@ EXPORT_SYMBOL(pm_power_off); | |
unsigned char acpi_kbd_controller_present = 1; | ||
unsigned char acpi_legacy_devices; | ||
|
||
static unsigned int __initdata acpi_madt_rev; | ||
|
||
unsigned int acpi_cpei_override; | ||
unsigned int acpi_cpei_phys_cpuid; | ||
|
||
#define MAX_SAPICS 256 | ||
u16 ia64_acpiid_to_sapicid[MAX_SAPICS] = | ||
{ [0 ... MAX_SAPICS - 1] = -1 }; | ||
|
@@ -265,10 +271,56 @@ acpi_parse_plat_int_src ( | |
(plintsrc->flags.trigger == 1) ? IOSAPIC_EDGE : IOSAPIC_LEVEL); | ||
|
||
platform_intr_list[plintsrc->type] = vector; | ||
if (acpi_madt_rev > 1) { | ||
acpi_cpei_override = plintsrc->plint_flags.cpei_override_flag; | ||
} | ||
|
||
/* | ||
* Save the physical id, so we can check when its being removed | ||
*/ | ||
acpi_cpei_phys_cpuid = ((plintsrc->id << 8) | (plintsrc->eid)) & 0xffff; | ||
|
||
return 0; | ||
} | ||
|
||
|
||
unsigned int can_cpei_retarget(void) | ||
{ | ||
extern int cpe_vector; | ||
|
||
/* | ||
* Only if CPEI is supported and the override flag | ||
* is present, otherwise return that its re-targettable | ||
* if we are in polling mode. | ||
*/ | ||
if (cpe_vector > 0 && !acpi_cpei_override) | ||
return 0; | ||
else | ||
return 1; | ||
} | ||
|
||
unsigned int is_cpu_cpei_target(unsigned int cpu) | ||
{ | ||
unsigned int logical_id; | ||
|
||
logical_id = cpu_logical_id(acpi_cpei_phys_cpuid); | ||
|
||
if (logical_id == cpu) | ||
return 1; | ||
else | ||
return 0; | ||
} | ||
|
||
void set_cpei_target_cpu(unsigned int cpu) | ||
{ | ||
acpi_cpei_phys_cpuid = cpu_physical_id(cpu); | ||
} | ||
|
||
unsigned int get_cpei_target_cpu(void) | ||
{ | ||
return acpi_cpei_phys_cpuid; | ||
} | ||
|
||
static int __init | ||
acpi_parse_int_src_ovr ( | ||
acpi_table_entry_header *header, const unsigned long end) | ||
|
@@ -326,6 +378,8 @@ acpi_parse_madt (unsigned long phys_addr, unsigned long size) | |
|
||
acpi_madt = (struct acpi_table_madt *) __va(phys_addr); | ||
|
||
acpi_madt_rev = acpi_madt->header.revision; | ||
|
||
/* remember the value for reference after free_initmem() */ | ||
#ifdef CONFIG_ITANIUM | ||
has_8259 = 1; /* Firmware on old Itanium systems is broken */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.