diff options
author | Len Brown <len.brown@intel.com> | 2005-07-12 17:21:56 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2005-07-12 17:21:56 -0400 |
commit | 5028770a42e7bc4d15791a44c28f0ad539323807 (patch) | |
tree | 74800e35129775413c13ce7caf036ca19e3ce56c /arch | |
parent | 9f02d6b7b43d46a74dd385f06090104ecd0fb807 (diff) | |
parent | d8683a0cb5d09cb7f19feefa708424a84577e68f (diff) |
[ACPI] merge acpi-2.6.12 branch into latest Linux 2.6.13-rc...
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/frv/mb93090-mb00/pci-irq.c | 2 | ||||
-rw-r--r-- | arch/i386/kernel/acpi/Makefile | 4 | ||||
-rw-r--r-- | arch/i386/kernel/acpi/cstate.c | 103 | ||||
-rw-r--r-- | arch/i386/kernel/acpi/wakeup.S | 5 | ||||
-rw-r--r-- | arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c | 2 | ||||
-rw-r--r-- | arch/i386/pci/irq.c | 16 | ||||
-rw-r--r-- | arch/i386/pci/visws.c | 2 | ||||
-rw-r--r-- | arch/ia64/kernel/acpi.c | 54 | ||||
-rw-r--r-- | arch/ia64/kernel/mca.c | 2 | ||||
-rw-r--r-- | arch/ia64/kernel/process.c | 1 | ||||
-rw-r--r-- | arch/ia64/kernel/setup.c | 3 | ||||
-rw-r--r-- | arch/ia64/kernel/topology.c | 7 |
12 files changed, 189 insertions, 12 deletions
diff --git a/arch/frv/mb93090-mb00/pci-irq.c b/arch/frv/mb93090-mb00/pci-irq.c index 24622d89b1ca..af981bda015c 100644 --- a/arch/frv/mb93090-mb00/pci-irq.c +++ b/arch/frv/mb93090-mb00/pci-irq.c | |||
@@ -60,7 +60,7 @@ void __init pcibios_fixup_irqs(void) | |||
60 | } | 60 | } |
61 | } | 61 | } |
62 | 62 | ||
63 | void __init pcibios_penalize_isa_irq(int irq) | 63 | void __init pcibios_penalize_isa_irq(int irq, int active) |
64 | { | 64 | { |
65 | } | 65 | } |
66 | 66 | ||
diff --git a/arch/i386/kernel/acpi/Makefile b/arch/i386/kernel/acpi/Makefile index ee75cb286cfe..5e291a20c03d 100644 --- a/arch/i386/kernel/acpi/Makefile +++ b/arch/i386/kernel/acpi/Makefile | |||
@@ -2,3 +2,7 @@ obj-$(CONFIG_ACPI_BOOT) := boot.o | |||
2 | obj-$(CONFIG_X86_IO_APIC) += earlyquirk.o | 2 | obj-$(CONFIG_X86_IO_APIC) += earlyquirk.o |
3 | obj-$(CONFIG_ACPI_SLEEP) += sleep.o wakeup.o | 3 | obj-$(CONFIG_ACPI_SLEEP) += sleep.o wakeup.o |
4 | 4 | ||
5 | ifneq ($(CONFIG_ACPI_PROCESSOR),) | ||
6 | obj-y += cstate.o | ||
7 | endif | ||
8 | |||
diff --git a/arch/i386/kernel/acpi/cstate.c b/arch/i386/kernel/acpi/cstate.c new file mode 100644 index 000000000000..4c3036ba65df --- /dev/null +++ b/arch/i386/kernel/acpi/cstate.c | |||
@@ -0,0 +1,103 @@ | |||
1 | /* | ||
2 | * arch/i386/kernel/acpi/cstate.c | ||
3 | * | ||
4 | * Copyright (C) 2005 Intel Corporation | ||
5 | * Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> | ||
6 | * - Added _PDC for SMP C-states on Intel CPUs | ||
7 | */ | ||
8 | |||
9 | #include <linux/kernel.h> | ||
10 | #include <linux/module.h> | ||
11 | #include <linux/init.h> | ||
12 | #include <linux/acpi.h> | ||
13 | |||
14 | #include <acpi/processor.h> | ||
15 | #include <asm/acpi.h> | ||
16 | |||
17 | static void acpi_processor_power_init_intel_pdc(struct acpi_processor_power | ||
18 | *pow) | ||
19 | { | ||
20 | struct acpi_object_list *obj_list; | ||
21 | union acpi_object *obj; | ||
22 | u32 *buf; | ||
23 | |||
24 | /* allocate and initialize pdc. It will be used later. */ | ||
25 | obj_list = kmalloc(sizeof(struct acpi_object_list), GFP_KERNEL); | ||
26 | if (!obj_list) { | ||
27 | printk(KERN_ERR "Memory allocation error\n"); | ||
28 | return; | ||
29 | } | ||
30 | |||
31 | obj = kmalloc(sizeof(union acpi_object), GFP_KERNEL); | ||
32 | if (!obj) { | ||
33 | printk(KERN_ERR "Memory allocation error\n"); | ||
34 | kfree(obj_list); | ||
35 | return; | ||
36 | } | ||
37 | |||
38 | buf = kmalloc(12, GFP_KERNEL); | ||
39 | if (!buf) { | ||
40 | printk(KERN_ERR "Memory allocation error\n"); | ||
41 | kfree(obj); | ||
42 | kfree(obj_list); | ||
43 | return; | ||
44 | } | ||
45 | |||
46 | buf[0] = ACPI_PDC_REVISION_ID; | ||
47 | buf[1] = 1; | ||
48 | buf[2] = ACPI_PDC_C_CAPABILITY_SMP; | ||
49 | |||
50 | obj->type = ACPI_TYPE_BUFFER; | ||
51 | obj->buffer.length = 12; | ||
52 | obj->buffer.pointer = (u8 *) buf; | ||
53 | obj_list->count = 1; | ||
54 | obj_list->pointer = obj; | ||
55 | pow->pdc = obj_list; | ||
56 | |||
57 | return; | ||
58 | } | ||
59 | |||
60 | /* Initialize _PDC data based on the CPU vendor */ | ||
61 | void acpi_processor_power_init_pdc(struct acpi_processor_power *pow, | ||
62 | unsigned int cpu) | ||
63 | { | ||
64 | struct cpuinfo_x86 *c = cpu_data + cpu; | ||
65 | |||
66 | pow->pdc = NULL; | ||
67 | if (c->x86_vendor == X86_VENDOR_INTEL) | ||
68 | acpi_processor_power_init_intel_pdc(pow); | ||
69 | |||
70 | return; | ||
71 | } | ||
72 | |||
73 | EXPORT_SYMBOL(acpi_processor_power_init_pdc); | ||
74 | |||
75 | /* | ||
76 | * Initialize bm_flags based on the CPU cache properties | ||
77 | * On SMP it depends on cache configuration | ||
78 | * - When cache is not shared among all CPUs, we flush cache | ||
79 | * before entering C3. | ||
80 | * - When cache is shared among all CPUs, we use bm_check | ||
81 | * mechanism as in UP case | ||
82 | * | ||
83 | * This routine is called only after all the CPUs are online | ||
84 | */ | ||
85 | void acpi_processor_power_init_bm_check(struct acpi_processor_flags *flags, | ||
86 | unsigned int cpu) | ||
87 | { | ||
88 | struct cpuinfo_x86 *c = cpu_data + cpu; | ||
89 | |||
90 | flags->bm_check = 0; | ||
91 | if (num_online_cpus() == 1) | ||
92 | flags->bm_check = 1; | ||
93 | else if (c->x86_vendor == X86_VENDOR_INTEL) { | ||
94 | /* | ||
95 | * Today all CPUs that support C3 share cache. | ||
96 | * TBD: This needs to look at cache shared map, once | ||
97 | * multi-core detection patch makes to the base. | ||
98 | */ | ||
99 | flags->bm_check = 1; | ||
100 | } | ||
101 | } | ||
102 | |||
103 | EXPORT_SYMBOL(acpi_processor_power_init_bm_check); | ||
diff --git a/arch/i386/kernel/acpi/wakeup.S b/arch/i386/kernel/acpi/wakeup.S index 39d32484f6f5..44d886c745ec 100644 --- a/arch/i386/kernel/acpi/wakeup.S +++ b/arch/i386/kernel/acpi/wakeup.S | |||
@@ -74,8 +74,9 @@ wakeup_code: | |||
74 | movw %ax,%fs | 74 | movw %ax,%fs |
75 | movw $0x0e00 + 'i', %fs:(0x12) | 75 | movw $0x0e00 + 'i', %fs:(0x12) |
76 | 76 | ||
77 | # need a gdt | 77 | # need a gdt -- use lgdtl to force 32-bit operands, in case |
78 | lgdt real_save_gdt - wakeup_code | 78 | # the GDT is located past 16 megabytes. |
79 | lgdtl real_save_gdt - wakeup_code | ||
79 | 80 | ||
80 | movl real_save_cr0 - wakeup_code, %eax | 81 | movl real_save_cr0 - wakeup_code, %eax |
81 | movl %eax, %cr0 | 82 | movl %eax, %cr0 |
diff --git a/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c b/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c index 7dcbf70fc16f..327a55d4d1c6 100644 --- a/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c +++ b/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c | |||
@@ -375,7 +375,7 @@ static int centrino_cpu_init_acpi(struct cpufreq_policy *policy) | |||
375 | arg0.buffer.pointer = (u8 *) arg0_buf; | 375 | arg0.buffer.pointer = (u8 *) arg0_buf; |
376 | arg0_buf[0] = ACPI_PDC_REVISION_ID; | 376 | arg0_buf[0] = ACPI_PDC_REVISION_ID; |
377 | arg0_buf[1] = 1; | 377 | arg0_buf[1] = 1; |
378 | arg0_buf[2] = ACPI_PDC_EST_CAPABILITY_SMP | ACPI_PDC_EST_CAPABILITY_MSR; | 378 | arg0_buf[2] = ACPI_PDC_EST_CAPABILITY_SMP_MSR; |
379 | 379 | ||
380 | p.pdc = &arg_list; | 380 | p.pdc = &arg_list; |
381 | 381 | ||
diff --git a/arch/i386/pci/irq.c b/arch/i386/pci/irq.c index 78ca1ecbb907..766b104ac1a1 100644 --- a/arch/i386/pci/irq.c +++ b/arch/i386/pci/irq.c | |||
@@ -1051,24 +1051,28 @@ static int __init pcibios_irq_init(void) | |||
1051 | subsys_initcall(pcibios_irq_init); | 1051 | subsys_initcall(pcibios_irq_init); |
1052 | 1052 | ||
1053 | 1053 | ||
1054 | static void pirq_penalize_isa_irq(int irq) | 1054 | static void pirq_penalize_isa_irq(int irq, int active) |
1055 | { | 1055 | { |
1056 | /* | 1056 | /* |
1057 | * If any ISAPnP device reports an IRQ in its list of possible | 1057 | * If any ISAPnP device reports an IRQ in its list of possible |
1058 | * IRQ's, we try to avoid assigning it to PCI devices. | 1058 | * IRQ's, we try to avoid assigning it to PCI devices. |
1059 | */ | 1059 | */ |
1060 | if (irq < 16) | 1060 | if (irq < 16) { |
1061 | pirq_penalty[irq] += 100; | 1061 | if (active) |
1062 | pirq_penalty[irq] += 1000; | ||
1063 | else | ||
1064 | pirq_penalty[irq] += 100; | ||
1065 | } | ||
1062 | } | 1066 | } |
1063 | 1067 | ||
1064 | void pcibios_penalize_isa_irq(int irq) | 1068 | void pcibios_penalize_isa_irq(int irq, int active) |
1065 | { | 1069 | { |
1066 | #ifdef CONFIG_ACPI_PCI | 1070 | #ifdef CONFIG_ACPI_PCI |
1067 | if (!acpi_noirq) | 1071 | if (!acpi_noirq) |
1068 | acpi_penalize_isa_irq(irq); | 1072 | acpi_penalize_isa_irq(irq, active); |
1069 | else | 1073 | else |
1070 | #endif | 1074 | #endif |
1071 | pirq_penalize_isa_irq(irq); | 1075 | pirq_penalize_isa_irq(irq, active); |
1072 | } | 1076 | } |
1073 | 1077 | ||
1074 | static int pirq_enable_irq(struct pci_dev *dev) | 1078 | static int pirq_enable_irq(struct pci_dev *dev) |
diff --git a/arch/i386/pci/visws.c b/arch/i386/pci/visws.c index 6a9248784439..314c933b6b8e 100644 --- a/arch/i386/pci/visws.c +++ b/arch/i386/pci/visws.c | |||
@@ -21,7 +21,7 @@ static int pci_visws_enable_irq(struct pci_dev *dev) { return 0; } | |||
21 | 21 | ||
22 | int (*pcibios_enable_irq)(struct pci_dev *dev) = &pci_visws_enable_irq; | 22 | int (*pcibios_enable_irq)(struct pci_dev *dev) = &pci_visws_enable_irq; |
23 | 23 | ||
24 | void __init pcibios_penalize_isa_irq(int irq) {} | 24 | void __init pcibios_penalize_isa_irq(int irq, int active) {} |
25 | 25 | ||
26 | 26 | ||
27 | unsigned int pci_bus0, pci_bus1; | 27 | unsigned int pci_bus0, pci_bus1; |
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c index 542256e98e60..9609f243e5d0 100644 --- a/arch/ia64/kernel/acpi.c +++ b/arch/ia64/kernel/acpi.c | |||
@@ -11,6 +11,7 @@ | |||
11 | * Copyright (C) 2001 Jenna Hall <jenna.s.hall@intel.com> | 11 | * Copyright (C) 2001 Jenna Hall <jenna.s.hall@intel.com> |
12 | * Copyright (C) 2001 Takayoshi Kochi <t-kochi@bq.jp.nec.com> | 12 | * Copyright (C) 2001 Takayoshi Kochi <t-kochi@bq.jp.nec.com> |
13 | * Copyright (C) 2002 Erich Focht <efocht@ess.nec.de> | 13 | * Copyright (C) 2002 Erich Focht <efocht@ess.nec.de> |
14 | * Copyright (C) 2004 Ashok Raj <ashok.raj@intel.com> | ||
14 | * | 15 | * |
15 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 16 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
16 | * | 17 | * |
@@ -67,6 +68,11 @@ EXPORT_SYMBOL(pm_power_off); | |||
67 | unsigned char acpi_kbd_controller_present = 1; | 68 | unsigned char acpi_kbd_controller_present = 1; |
68 | unsigned char acpi_legacy_devices; | 69 | unsigned char acpi_legacy_devices; |
69 | 70 | ||
71 | static unsigned int __initdata acpi_madt_rev; | ||
72 | |||
73 | unsigned int acpi_cpei_override; | ||
74 | unsigned int acpi_cpei_phys_cpuid; | ||
75 | |||
70 | #define MAX_SAPICS 256 | 76 | #define MAX_SAPICS 256 |
71 | u16 ia64_acpiid_to_sapicid[MAX_SAPICS] = | 77 | u16 ia64_acpiid_to_sapicid[MAX_SAPICS] = |
72 | { [0 ... MAX_SAPICS - 1] = -1 }; | 78 | { [0 ... MAX_SAPICS - 1] = -1 }; |
@@ -265,10 +271,56 @@ acpi_parse_plat_int_src ( | |||
265 | (plintsrc->flags.trigger == 1) ? IOSAPIC_EDGE : IOSAPIC_LEVEL); | 271 | (plintsrc->flags.trigger == 1) ? IOSAPIC_EDGE : IOSAPIC_LEVEL); |
266 | 272 | ||
267 | platform_intr_list[plintsrc->type] = vector; | 273 | platform_intr_list[plintsrc->type] = vector; |
274 | if (acpi_madt_rev > 1) { | ||
275 | acpi_cpei_override = plintsrc->plint_flags.cpei_override_flag; | ||
276 | } | ||
277 | |||
278 | /* | ||
279 | * Save the physical id, so we can check when its being removed | ||
280 | */ | ||
281 | acpi_cpei_phys_cpuid = ((plintsrc->id << 8) | (plintsrc->eid)) & 0xffff; | ||
282 | |||
268 | return 0; | 283 | return 0; |
269 | } | 284 | } |
270 | 285 | ||
271 | 286 | ||
287 | unsigned int can_cpei_retarget(void) | ||
288 | { | ||
289 | extern int cpe_vector; | ||
290 | |||
291 | /* | ||
292 | * Only if CPEI is supported and the override flag | ||
293 | * is present, otherwise return that its re-targettable | ||
294 | * if we are in polling mode. | ||
295 | */ | ||
296 | if (cpe_vector > 0 && !acpi_cpei_override) | ||
297 | return 0; | ||
298 | else | ||
299 | return 1; | ||
300 | } | ||
301 | |||
302 | unsigned int is_cpu_cpei_target(unsigned int cpu) | ||
303 | { | ||
304 | unsigned int logical_id; | ||
305 | |||
306 | logical_id = cpu_logical_id(acpi_cpei_phys_cpuid); | ||
307 | |||
308 | if (logical_id == cpu) | ||
309 | return 1; | ||
310 | else | ||
311 | return 0; | ||
312 | } | ||
313 | |||
314 | void set_cpei_target_cpu(unsigned int cpu) | ||
315 | { | ||
316 | acpi_cpei_phys_cpuid = cpu_physical_id(cpu); | ||
317 | } | ||
318 | |||
319 | unsigned int get_cpei_target_cpu(void) | ||
320 | { | ||
321 | return acpi_cpei_phys_cpuid; | ||
322 | } | ||
323 | |||
272 | static int __init | 324 | static int __init |
273 | acpi_parse_int_src_ovr ( | 325 | acpi_parse_int_src_ovr ( |
274 | acpi_table_entry_header *header, const unsigned long end) | 326 | acpi_table_entry_header *header, const unsigned long end) |
@@ -326,6 +378,8 @@ acpi_parse_madt (unsigned long phys_addr, unsigned long size) | |||
326 | 378 | ||
327 | acpi_madt = (struct acpi_table_madt *) __va(phys_addr); | 379 | acpi_madt = (struct acpi_table_madt *) __va(phys_addr); |
328 | 380 | ||
381 | acpi_madt_rev = acpi_madt->header.revision; | ||
382 | |||
329 | /* remember the value for reference after free_initmem() */ | 383 | /* remember the value for reference after free_initmem() */ |
330 | #ifdef CONFIG_ITANIUM | 384 | #ifdef CONFIG_ITANIUM |
331 | has_8259 = 1; /* Firmware on old Itanium systems is broken */ | 385 | has_8259 = 1; /* Firmware on old Itanium systems is broken */ |
diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c index 736e328b5e61..4ebbf3974381 100644 --- a/arch/ia64/kernel/mca.c +++ b/arch/ia64/kernel/mca.c | |||
@@ -271,7 +271,7 @@ ia64_mca_log_sal_error_record(int sal_info_type) | |||
271 | 271 | ||
272 | #ifdef CONFIG_ACPI | 272 | #ifdef CONFIG_ACPI |
273 | 273 | ||
274 | static int cpe_vector = -1; | 274 | int cpe_vector = -1; |
275 | 275 | ||
276 | static irqreturn_t | 276 | static irqreturn_t |
277 | ia64_mca_cpe_int_handler (int cpe_irq, void *arg, struct pt_regs *ptregs) | 277 | ia64_mca_cpe_int_handler (int cpe_irq, void *arg, struct pt_regs *ptregs) |
diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c index 6e35bff05d59..e484910246ad 100644 --- a/arch/ia64/kernel/process.c +++ b/arch/ia64/kernel/process.c | |||
@@ -196,6 +196,7 @@ update_pal_halt_status(int status) | |||
196 | void | 196 | void |
197 | default_idle (void) | 197 | default_idle (void) |
198 | { | 198 | { |
199 | local_irq_enable(); | ||
199 | while (!need_resched()) | 200 | while (!need_resched()) |
200 | if (can_do_pal_halt) | 201 | if (can_do_pal_halt) |
201 | safe_halt(); | 202 | safe_halt(); |
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c index 2693e1522d7c..5c7c95737bbf 100644 --- a/arch/ia64/kernel/setup.c +++ b/arch/ia64/kernel/setup.c | |||
@@ -40,6 +40,8 @@ | |||
40 | #include <linux/serial_core.h> | 40 | #include <linux/serial_core.h> |
41 | #include <linux/efi.h> | 41 | #include <linux/efi.h> |
42 | #include <linux/initrd.h> | 42 | #include <linux/initrd.h> |
43 | #include <linux/platform.h> | ||
44 | #include <linux/pm.h> | ||
43 | 45 | ||
44 | #include <asm/ia32.h> | 46 | #include <asm/ia32.h> |
45 | #include <asm/machvec.h> | 47 | #include <asm/machvec.h> |
@@ -783,6 +785,7 @@ cpu_init (void) | |||
783 | /* size of physical stacked register partition plus 8 bytes: */ | 785 | /* size of physical stacked register partition plus 8 bytes: */ |
784 | __get_cpu_var(ia64_phys_stacked_size_p8) = num_phys_stacked*8 + 8; | 786 | __get_cpu_var(ia64_phys_stacked_size_p8) = num_phys_stacked*8 + 8; |
785 | platform_cpu_init(); | 787 | platform_cpu_init(); |
788 | pm_idle = default_idle; | ||
786 | } | 789 | } |
787 | 790 | ||
788 | void | 791 | void |
diff --git a/arch/ia64/kernel/topology.c b/arch/ia64/kernel/topology.c index f1aafd4c05f9..d8030f3bd865 100644 --- a/arch/ia64/kernel/topology.c +++ b/arch/ia64/kernel/topology.c | |||
@@ -36,6 +36,13 @@ int arch_register_cpu(int num) | |||
36 | parent = &sysfs_nodes[cpu_to_node(num)]; | 36 | parent = &sysfs_nodes[cpu_to_node(num)]; |
37 | #endif /* CONFIG_NUMA */ | 37 | #endif /* CONFIG_NUMA */ |
38 | 38 | ||
39 | /* | ||
40 | * If CPEI cannot be re-targetted, and this is | ||
41 | * CPEI target, then dont create the control file | ||
42 | */ | ||
43 | if (!can_cpei_retarget() && is_cpu_cpei_target(num)) | ||
44 | sysfs_cpus[num].cpu.no_control = 1; | ||
45 | |||
39 | return register_cpu(&sysfs_cpus[num].cpu, num, parent); | 46 | return register_cpu(&sysfs_cpus[num].cpu, num, parent); |
40 | } | 47 | } |
41 | 48 | ||