diff options
author | David S. Miller <davem@davemloft.net> | 2008-03-18 03:37:55 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-03-18 03:37:55 -0400 |
commit | 577f99c1d08cf9cbdafd4e858dd13ff04d855090 (patch) | |
tree | 0f726bbda9b18d311d4c95198bbd96cb7ac01db0 /drivers/acpi | |
parent | 26c0f03f6b77c513cb7bc37b73a06819bdbb791b (diff) | |
parent | 2f633928cbba8a5858bb39b11e7219a41b0fbef5 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/wireless/rt2x00/rt2x00dev.c
net/8021q/vlan_dev.c
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/Kconfig | 26 | ||||
-rw-r--r-- | drivers/acpi/bus.c | 2 | ||||
-rw-r--r-- | drivers/acpi/button.c | 1 | ||||
-rw-r--r-- | drivers/acpi/ec.c | 17 | ||||
-rw-r--r-- | drivers/acpi/osl.c | 86 | ||||
-rw-r--r-- | drivers/acpi/pci_irq.c | 98 | ||||
-rw-r--r-- | drivers/acpi/pci_root.c | 2 | ||||
-rw-r--r-- | drivers/acpi/processor_core.c | 25 | ||||
-rw-r--r-- | drivers/acpi/scan.c | 5 | ||||
-rw-r--r-- | drivers/acpi/sleep/main.c | 2 | ||||
-rw-r--r-- | drivers/acpi/system.c | 2 | ||||
-rw-r--r-- | drivers/acpi/thermal.c | 12 | ||||
-rw-r--r-- | drivers/acpi/toshiba_acpi.c | 7 | ||||
-rw-r--r-- | drivers/acpi/utilities/utdebug.c | 2 | ||||
-rw-r--r-- | drivers/acpi/utilities/utobject.c | 2 | ||||
-rw-r--r-- | drivers/acpi/utils.c | 6 | ||||
-rw-r--r-- | drivers/acpi/video.c | 4 | ||||
-rw-r--r-- | drivers/acpi/wmi.c | 10 |
18 files changed, 170 insertions, 139 deletions
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig index f688c214be0c..b4f5e8542829 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig | |||
@@ -283,34 +283,22 @@ config ACPI_TOSHIBA | |||
283 | If you have a legacy free Toshiba laptop (such as the Libretto L1 | 283 | If you have a legacy free Toshiba laptop (such as the Libretto L1 |
284 | series), say Y. | 284 | series), say Y. |
285 | 285 | ||
286 | config ACPI_CUSTOM_DSDT | 286 | config ACPI_CUSTOM_DSDT_FILE |
287 | bool "Include Custom DSDT" | 287 | string "Custom DSDT Table file to include" |
288 | default "" | ||
288 | depends on !STANDALONE | 289 | depends on !STANDALONE |
289 | default n | ||
290 | help | 290 | help |
291 | This option supports a custom DSDT by linking it into the kernel. | 291 | This option supports a custom DSDT by linking it into the kernel. |
292 | See Documentation/acpi/dsdt-override.txt | 292 | See Documentation/acpi/dsdt-override.txt |
293 | 293 | ||
294 | If unsure, say N. | ||
295 | |||
296 | config ACPI_CUSTOM_DSDT_FILE | ||
297 | string "Custom DSDT Table file to include" | ||
298 | depends on ACPI_CUSTOM_DSDT | ||
299 | default "" | ||
300 | help | ||
301 | Enter the full path name to the file which includes the AmlCode | 294 | Enter the full path name to the file which includes the AmlCode |
302 | declaration. | 295 | declaration. |
303 | 296 | ||
304 | config ACPI_CUSTOM_DSDT_INITRD | 297 | If unsure, don't enter a file name. |
305 | bool "Read Custom DSDT from initramfs" | ||
306 | depends on BLK_DEV_INITRD | ||
307 | default n | ||
308 | help | ||
309 | This option supports a custom DSDT by optionally loading it from initrd. | ||
310 | See Documentation/acpi/dsdt-override.txt | ||
311 | 298 | ||
312 | If you are not using this feature now, but may use it later, | 299 | config ACPI_CUSTOM_DSDT |
313 | it is safe to say Y here. | 300 | bool |
301 | default ACPI_CUSTOM_DSDT_FILE != "" | ||
314 | 302 | ||
315 | config ACPI_BLACKLIST_YEAR | 303 | config ACPI_BLACKLIST_YEAR |
316 | int "Disable ACPI for systems before Jan 1st this year" if X86_32 | 304 | int "Disable ACPI for systems before Jan 1st this year" if X86_32 |
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index ce3c0a2cbac4..5b6760e0f957 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c | |||
@@ -776,7 +776,7 @@ static int __init acpi_init(void) | |||
776 | 776 | ||
777 | acpi_kobj = kobject_create_and_add("acpi", firmware_kobj); | 777 | acpi_kobj = kobject_create_and_add("acpi", firmware_kobj); |
778 | if (!acpi_kobj) { | 778 | if (!acpi_kobj) { |
779 | printk(KERN_WARNING "%s: kset create error\n", __FUNCTION__); | 779 | printk(KERN_WARNING "%s: kset create error\n", __func__); |
780 | acpi_kobj = NULL; | 780 | acpi_kobj = NULL; |
781 | } | 781 | } |
782 | 782 | ||
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c index 24a7865a57cb..6c5da83cdb68 100644 --- a/drivers/acpi/button.c +++ b/drivers/acpi/button.c | |||
@@ -449,6 +449,7 @@ static int acpi_button_add(struct acpi_device *device) | |||
449 | input->phys = button->phys; | 449 | input->phys = button->phys; |
450 | input->id.bustype = BUS_HOST; | 450 | input->id.bustype = BUS_HOST; |
451 | input->id.product = button->type; | 451 | input->id.product = button->type; |
452 | input->dev.parent = &device->dev; | ||
452 | 453 | ||
453 | switch (button->type) { | 454 | switch (button->type) { |
454 | case ACPI_BUTTON_TYPE_POWER: | 455 | case ACPI_BUTTON_TYPE_POWER: |
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index caf873c14bfb..e7e197e3a4ff 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c | |||
@@ -129,6 +129,7 @@ static struct acpi_ec { | |||
129 | struct mutex lock; | 129 | struct mutex lock; |
130 | wait_queue_head_t wait; | 130 | wait_queue_head_t wait; |
131 | struct list_head list; | 131 | struct list_head list; |
132 | atomic_t irq_count; | ||
132 | u8 handlers_installed; | 133 | u8 handlers_installed; |
133 | } *boot_ec, *first_ec; | 134 | } *boot_ec, *first_ec; |
134 | 135 | ||
@@ -181,6 +182,8 @@ static int acpi_ec_wait(struct acpi_ec *ec, enum ec_event event, int force_poll) | |||
181 | { | 182 | { |
182 | int ret = 0; | 183 | int ret = 0; |
183 | 184 | ||
185 | atomic_set(&ec->irq_count, 0); | ||
186 | |||
184 | if (unlikely(event == ACPI_EC_EVENT_OBF_1 && | 187 | if (unlikely(event == ACPI_EC_EVENT_OBF_1 && |
185 | test_bit(EC_FLAGS_NO_OBF1_GPE, &ec->flags))) | 188 | test_bit(EC_FLAGS_NO_OBF1_GPE, &ec->flags))) |
186 | force_poll = 1; | 189 | force_poll = 1; |
@@ -227,6 +230,7 @@ static int acpi_ec_wait(struct acpi_ec *ec, enum ec_event event, int force_poll) | |||
227 | while (time_before(jiffies, delay)) { | 230 | while (time_before(jiffies, delay)) { |
228 | if (acpi_ec_check_status(ec, event)) | 231 | if (acpi_ec_check_status(ec, event)) |
229 | goto end; | 232 | goto end; |
233 | msleep(5); | ||
230 | } | 234 | } |
231 | } | 235 | } |
232 | pr_err(PREFIX "acpi_ec_wait timeout," | 236 | pr_err(PREFIX "acpi_ec_wait timeout," |
@@ -529,6 +533,13 @@ static u32 acpi_ec_gpe_handler(void *data) | |||
529 | struct acpi_ec *ec = data; | 533 | struct acpi_ec *ec = data; |
530 | 534 | ||
531 | pr_debug(PREFIX "~~~> interrupt\n"); | 535 | pr_debug(PREFIX "~~~> interrupt\n"); |
536 | atomic_inc(&ec->irq_count); | ||
537 | if (atomic_read(&ec->irq_count) > 5) { | ||
538 | pr_err(PREFIX "GPE storm detected, disabling EC GPE\n"); | ||
539 | acpi_disable_gpe(NULL, ec->gpe, ACPI_ISR); | ||
540 | clear_bit(EC_FLAGS_GPE_MODE, &ec->flags); | ||
541 | return ACPI_INTERRUPT_HANDLED; | ||
542 | } | ||
532 | clear_bit(EC_FLAGS_WAIT_GPE, &ec->flags); | 543 | clear_bit(EC_FLAGS_WAIT_GPE, &ec->flags); |
533 | if (test_bit(EC_FLAGS_GPE_MODE, &ec->flags)) | 544 | if (test_bit(EC_FLAGS_GPE_MODE, &ec->flags)) |
534 | wake_up(&ec->wait); | 545 | wake_up(&ec->wait); |
@@ -943,11 +954,7 @@ int __init acpi_ec_ecdt_probe(void) | |||
943 | boot_ec->command_addr = ecdt_ptr->control.address; | 954 | boot_ec->command_addr = ecdt_ptr->control.address; |
944 | boot_ec->data_addr = ecdt_ptr->data.address; | 955 | boot_ec->data_addr = ecdt_ptr->data.address; |
945 | boot_ec->gpe = ecdt_ptr->gpe; | 956 | boot_ec->gpe = ecdt_ptr->gpe; |
946 | if (ACPI_FAILURE(acpi_get_handle(NULL, ecdt_ptr->id, | 957 | boot_ec->handle = ACPI_ROOT_OBJECT; |
947 | &boot_ec->handle))) { | ||
948 | pr_info("Failed to locate handle for boot EC\n"); | ||
949 | boot_ec->handle = ACPI_ROOT_OBJECT; | ||
950 | } | ||
951 | } else { | 958 | } else { |
952 | /* This workaround is needed only on some broken machines, | 959 | /* This workaround is needed only on some broken machines, |
953 | * which require early EC, but fail to provide ECDT */ | 960 | * which require early EC, but fail to provide ECDT */ |
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index 8edba7b678eb..a697fb6cf050 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c | |||
@@ -91,10 +91,6 @@ static DEFINE_SPINLOCK(acpi_res_lock); | |||
91 | #define OSI_STRING_LENGTH_MAX 64 /* arbitrary */ | 91 | #define OSI_STRING_LENGTH_MAX 64 /* arbitrary */ |
92 | static char osi_additional_string[OSI_STRING_LENGTH_MAX]; | 92 | static char osi_additional_string[OSI_STRING_LENGTH_MAX]; |
93 | 93 | ||
94 | #ifdef CONFIG_ACPI_CUSTOM_DSDT_INITRD | ||
95 | static int acpi_no_initrd_override; | ||
96 | #endif | ||
97 | |||
98 | /* | 94 | /* |
99 | * "Ode to _OSI(Linux)" | 95 | * "Ode to _OSI(Linux)" |
100 | * | 96 | * |
@@ -324,67 +320,6 @@ acpi_os_predefined_override(const struct acpi_predefined_names *init_val, | |||
324 | return AE_OK; | 320 | return AE_OK; |
325 | } | 321 | } |
326 | 322 | ||
327 | #ifdef CONFIG_ACPI_CUSTOM_DSDT_INITRD | ||
328 | static struct acpi_table_header *acpi_find_dsdt_initrd(void) | ||
329 | { | ||
330 | struct file *firmware_file; | ||
331 | mm_segment_t oldfs; | ||
332 | unsigned long len, len2; | ||
333 | struct acpi_table_header *dsdt_buffer, *ret = NULL; | ||
334 | struct kstat stat; | ||
335 | char *ramfs_dsdt_name = "/DSDT.aml"; | ||
336 | |||
337 | printk(KERN_INFO PREFIX "Checking initramfs for custom DSDT\n"); | ||
338 | |||
339 | /* | ||
340 | * Never do this at home, only the user-space is allowed to open a file. | ||
341 | * The clean way would be to use the firmware loader. | ||
342 | * But this code must be run before there is any userspace available. | ||
343 | * A static/init firmware infrastructure doesn't exist yet... | ||
344 | */ | ||
345 | if (vfs_stat(ramfs_dsdt_name, &stat) < 0) | ||
346 | return ret; | ||
347 | |||
348 | len = stat.size; | ||
349 | /* check especially against empty files */ | ||
350 | if (len <= 4) { | ||
351 | printk(KERN_ERR PREFIX "Failed: DSDT only %lu bytes.\n", len); | ||
352 | return ret; | ||
353 | } | ||
354 | |||
355 | firmware_file = filp_open(ramfs_dsdt_name, O_RDONLY, 0); | ||
356 | if (IS_ERR(firmware_file)) { | ||
357 | printk(KERN_ERR PREFIX "Failed to open %s.\n", ramfs_dsdt_name); | ||
358 | return ret; | ||
359 | } | ||
360 | |||
361 | dsdt_buffer = kmalloc(len, GFP_ATOMIC); | ||
362 | if (!dsdt_buffer) { | ||
363 | printk(KERN_ERR PREFIX "Failed to allocate %lu bytes.\n", len); | ||
364 | goto err; | ||
365 | } | ||
366 | |||
367 | oldfs = get_fs(); | ||
368 | set_fs(KERNEL_DS); | ||
369 | len2 = vfs_read(firmware_file, (char __user *)dsdt_buffer, len, | ||
370 | &firmware_file->f_pos); | ||
371 | set_fs(oldfs); | ||
372 | if (len2 < len) { | ||
373 | printk(KERN_ERR PREFIX "Failed to read %lu bytes from %s.\n", | ||
374 | len, ramfs_dsdt_name); | ||
375 | ACPI_FREE(dsdt_buffer); | ||
376 | goto err; | ||
377 | } | ||
378 | |||
379 | printk(KERN_INFO PREFIX "Found %lu byte DSDT in %s.\n", | ||
380 | len, ramfs_dsdt_name); | ||
381 | ret = dsdt_buffer; | ||
382 | err: | ||
383 | filp_close(firmware_file, NULL); | ||
384 | return ret; | ||
385 | } | ||
386 | #endif | ||
387 | |||
388 | acpi_status | 323 | acpi_status |
389 | acpi_os_table_override(struct acpi_table_header * existing_table, | 324 | acpi_os_table_override(struct acpi_table_header * existing_table, |
390 | struct acpi_table_header ** new_table) | 325 | struct acpi_table_header ** new_table) |
@@ -398,16 +333,6 @@ acpi_os_table_override(struct acpi_table_header * existing_table, | |||
398 | if (strncmp(existing_table->signature, "DSDT", 4) == 0) | 333 | if (strncmp(existing_table->signature, "DSDT", 4) == 0) |
399 | *new_table = (struct acpi_table_header *)AmlCode; | 334 | *new_table = (struct acpi_table_header *)AmlCode; |
400 | #endif | 335 | #endif |
401 | #ifdef CONFIG_ACPI_CUSTOM_DSDT_INITRD | ||
402 | if ((strncmp(existing_table->signature, "DSDT", 4) == 0) && | ||
403 | !acpi_no_initrd_override) { | ||
404 | struct acpi_table_header *initrd_table; | ||
405 | |||
406 | initrd_table = acpi_find_dsdt_initrd(); | ||
407 | if (initrd_table) | ||
408 | *new_table = initrd_table; | ||
409 | } | ||
410 | #endif | ||
411 | if (*new_table != NULL) { | 336 | if (*new_table != NULL) { |
412 | printk(KERN_WARNING PREFIX "Override [%4.4s-%8.8s], " | 337 | printk(KERN_WARNING PREFIX "Override [%4.4s-%8.8s], " |
413 | "this is unsafe: tainting kernel\n", | 338 | "this is unsafe: tainting kernel\n", |
@@ -418,15 +343,6 @@ acpi_os_table_override(struct acpi_table_header * existing_table, | |||
418 | return AE_OK; | 343 | return AE_OK; |
419 | } | 344 | } |
420 | 345 | ||
421 | #ifdef CONFIG_ACPI_CUSTOM_DSDT_INITRD | ||
422 | static int __init acpi_no_initrd_override_setup(char *s) | ||
423 | { | ||
424 | acpi_no_initrd_override = 1; | ||
425 | return 1; | ||
426 | } | ||
427 | __setup("acpi_no_initrd_override", acpi_no_initrd_override_setup); | ||
428 | #endif | ||
429 | |||
430 | static irqreturn_t acpi_irq(int irq, void *dev_id) | 346 | static irqreturn_t acpi_irq(int irq, void *dev_id) |
431 | { | 347 | { |
432 | u32 handled; | 348 | u32 handled; |
@@ -1237,7 +1153,7 @@ int acpi_check_resource_conflict(struct resource *res) | |||
1237 | 1153 | ||
1238 | if (clash) { | 1154 | if (clash) { |
1239 | if (acpi_enforce_resources != ENFORCE_RESOURCES_NO) { | 1155 | if (acpi_enforce_resources != ENFORCE_RESOURCES_NO) { |
1240 | printk(KERN_INFO "%sACPI: %s resource %s [0x%llx-0x%llx]" | 1156 | printk("%sACPI: %s resource %s [0x%llx-0x%llx]" |
1241 | " conflicts with ACPI region %s" | 1157 | " conflicts with ACPI region %s" |
1242 | " [0x%llx-0x%llx]\n", | 1158 | " [0x%llx-0x%llx]\n", |
1243 | acpi_enforce_resources == ENFORCE_RESOURCES_LAX | 1159 | acpi_enforce_resources == ENFORCE_RESOURCES_LAX |
diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c index 7f19859580c7..7af414a3c63e 100644 --- a/drivers/acpi/pci_irq.c +++ b/drivers/acpi/pci_irq.c | |||
@@ -25,6 +25,7 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | 27 | ||
28 | #include <linux/dmi.h> | ||
28 | #include <linux/kernel.h> | 29 | #include <linux/kernel.h> |
29 | #include <linux/module.h> | 30 | #include <linux/module.h> |
30 | #include <linux/init.h> | 31 | #include <linux/init.h> |
@@ -76,6 +77,101 @@ static struct acpi_prt_entry *acpi_pci_irq_find_prt_entry(int segment, | |||
76 | return NULL; | 77 | return NULL; |
77 | } | 78 | } |
78 | 79 | ||
80 | /* http://bugzilla.kernel.org/show_bug.cgi?id=4773 */ | ||
81 | static struct dmi_system_id medion_md9580[] = { | ||
82 | { | ||
83 | .ident = "Medion MD9580-F laptop", | ||
84 | .matches = { | ||
85 | DMI_MATCH(DMI_SYS_VENDOR, "MEDIONNB"), | ||
86 | DMI_MATCH(DMI_PRODUCT_NAME, "A555"), | ||
87 | }, | ||
88 | }, | ||
89 | { } | ||
90 | }; | ||
91 | |||
92 | /* http://bugzilla.kernel.org/show_bug.cgi?id=5044 */ | ||
93 | static struct dmi_system_id dell_optiplex[] = { | ||
94 | { | ||
95 | .ident = "Dell Optiplex GX1", | ||
96 | .matches = { | ||
97 | DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"), | ||
98 | DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex GX1 600S+"), | ||
99 | }, | ||
100 | }, | ||
101 | { } | ||
102 | }; | ||
103 | |||
104 | /* http://bugzilla.kernel.org/show_bug.cgi?id=10138 */ | ||
105 | static struct dmi_system_id hp_t5710[] = { | ||
106 | { | ||
107 | .ident = "HP t5710", | ||
108 | .matches = { | ||
109 | DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), | ||
110 | DMI_MATCH(DMI_PRODUCT_NAME, "hp t5000 series"), | ||
111 | DMI_MATCH(DMI_BOARD_NAME, "098Ch"), | ||
112 | }, | ||
113 | }, | ||
114 | { } | ||
115 | }; | ||
116 | |||
117 | struct prt_quirk { | ||
118 | struct dmi_system_id *system; | ||
119 | unsigned int segment; | ||
120 | unsigned int bus; | ||
121 | unsigned int device; | ||
122 | unsigned char pin; | ||
123 | char *source; /* according to BIOS */ | ||
124 | char *actual_source; | ||
125 | }; | ||
126 | |||
127 | /* | ||
128 | * These systems have incorrect _PRT entries. The BIOS claims the PCI | ||
129 | * interrupt at the listed segment/bus/device/pin is connected to the first | ||
130 | * link device, but it is actually connected to the second. | ||
131 | */ | ||
132 | static struct prt_quirk prt_quirks[] = { | ||
133 | { medion_md9580, 0, 0, 9, 'A', | ||
134 | "\\_SB_.PCI0.ISA.LNKA", | ||
135 | "\\_SB_.PCI0.ISA.LNKB"}, | ||
136 | { dell_optiplex, 0, 0, 0xd, 'A', | ||
137 | "\\_SB_.LNKB", | ||
138 | "\\_SB_.LNKA"}, | ||
139 | { hp_t5710, 0, 0, 1, 'A', | ||
140 | "\\_SB_.PCI0.LNK1", | ||
141 | "\\_SB_.PCI0.LNK3"}, | ||
142 | }; | ||
143 | |||
144 | static void | ||
145 | do_prt_fixups(struct acpi_prt_entry *entry, struct acpi_pci_routing_table *prt) | ||
146 | { | ||
147 | int i; | ||
148 | struct prt_quirk *quirk; | ||
149 | |||
150 | for (i = 0; i < ARRAY_SIZE(prt_quirks); i++) { | ||
151 | quirk = &prt_quirks[i]; | ||
152 | |||
153 | /* All current quirks involve link devices, not GSIs */ | ||
154 | if (!prt->source) | ||
155 | continue; | ||
156 | |||
157 | if (dmi_check_system(quirk->system) && | ||
158 | entry->id.segment == quirk->segment && | ||
159 | entry->id.bus == quirk->bus && | ||
160 | entry->id.device == quirk->device && | ||
161 | entry->pin + 'A' == quirk->pin && | ||
162 | !strcmp(prt->source, quirk->source) && | ||
163 | strlen(prt->source) >= strlen(quirk->actual_source)) { | ||
164 | printk(KERN_WARNING PREFIX "firmware reports " | ||
165 | "%04x:%02x:%02x[%c] connected to %s; " | ||
166 | "changing to %s\n", | ||
167 | entry->id.segment, entry->id.bus, | ||
168 | entry->id.device, 'A' + entry->pin, | ||
169 | prt->source, quirk->actual_source); | ||
170 | strcpy(prt->source, quirk->actual_source); | ||
171 | } | ||
172 | } | ||
173 | } | ||
174 | |||
79 | static int | 175 | static int |
80 | acpi_pci_irq_add_entry(acpi_handle handle, | 176 | acpi_pci_irq_add_entry(acpi_handle handle, |
81 | int segment, int bus, struct acpi_pci_routing_table *prt) | 177 | int segment, int bus, struct acpi_pci_routing_table *prt) |
@@ -96,6 +192,8 @@ acpi_pci_irq_add_entry(acpi_handle handle, | |||
96 | entry->id.function = prt->address & 0xFFFF; | 192 | entry->id.function = prt->address & 0xFFFF; |
97 | entry->pin = prt->pin; | 193 | entry->pin = prt->pin; |
98 | 194 | ||
195 | do_prt_fixups(entry, prt); | ||
196 | |||
99 | /* | 197 | /* |
100 | * Type 1: Dynamic | 198 | * Type 1: Dynamic |
101 | * --------------- | 199 | * --------------- |
diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c index f14ff1ffab29..c3fed31166b5 100644 --- a/drivers/acpi/pci_root.c +++ b/drivers/acpi/pci_root.c | |||
@@ -184,7 +184,7 @@ static void acpi_pci_bridge_scan(struct acpi_device *device) | |||
184 | } | 184 | } |
185 | } | 185 | } |
186 | 186 | ||
187 | static int acpi_pci_root_add(struct acpi_device *device) | 187 | static int __devinit acpi_pci_root_add(struct acpi_device *device) |
188 | { | 188 | { |
189 | int result = 0; | 189 | int result = 0; |
190 | struct acpi_pci_root *root = NULL; | 190 | struct acpi_pci_root *root = NULL; |
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c index a3cc8a98255c..36a68fa114e3 100644 --- a/drivers/acpi/processor_core.c +++ b/drivers/acpi/processor_core.c | |||
@@ -840,17 +840,19 @@ static int is_processor_present(acpi_handle handle) | |||
840 | 840 | ||
841 | 841 | ||
842 | status = acpi_evaluate_integer(handle, "_STA", NULL, &sta); | 842 | status = acpi_evaluate_integer(handle, "_STA", NULL, &sta); |
843 | /* | ||
844 | * if a processor object does not have an _STA object, | ||
845 | * OSPM assumes that the processor is present. | ||
846 | */ | ||
847 | if (status == AE_NOT_FOUND) | ||
848 | return 1; | ||
849 | 843 | ||
850 | if (ACPI_SUCCESS(status) && (sta & ACPI_STA_DEVICE_PRESENT)) | 844 | if (ACPI_SUCCESS(status) && (sta & ACPI_STA_DEVICE_PRESENT)) |
851 | return 1; | 845 | return 1; |
852 | 846 | ||
853 | ACPI_EXCEPTION((AE_INFO, status, "Processor Device is not present")); | 847 | /* |
848 | * _STA is mandatory for a processor that supports hot plug | ||
849 | */ | ||
850 | if (status == AE_NOT_FOUND) | ||
851 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | ||
852 | "Processor does not support hot plug\n")); | ||
853 | else | ||
854 | ACPI_EXCEPTION((AE_INFO, status, | ||
855 | "Processor Device is not present")); | ||
854 | return 0; | 856 | return 0; |
855 | } | 857 | } |
856 | 858 | ||
@@ -886,8 +888,8 @@ int acpi_processor_device_add(acpi_handle handle, struct acpi_device **device) | |||
886 | return 0; | 888 | return 0; |
887 | } | 889 | } |
888 | 890 | ||
889 | static void | 891 | static void __ref acpi_processor_hotplug_notify(acpi_handle handle, |
890 | acpi_processor_hotplug_notify(acpi_handle handle, u32 event, void *data) | 892 | u32 event, void *data) |
891 | { | 893 | { |
892 | struct acpi_processor *pr; | 894 | struct acpi_processor *pr; |
893 | struct acpi_device *device = NULL; | 895 | struct acpi_device *device = NULL; |
@@ -897,9 +899,10 @@ acpi_processor_hotplug_notify(acpi_handle handle, u32 event, void *data) | |||
897 | switch (event) { | 899 | switch (event) { |
898 | case ACPI_NOTIFY_BUS_CHECK: | 900 | case ACPI_NOTIFY_BUS_CHECK: |
899 | case ACPI_NOTIFY_DEVICE_CHECK: | 901 | case ACPI_NOTIFY_DEVICE_CHECK: |
900 | printk("Processor driver received %s event\n", | 902 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, |
903 | "Processor driver received %s event\n", | ||
901 | (event == ACPI_NOTIFY_BUS_CHECK) ? | 904 | (event == ACPI_NOTIFY_BUS_CHECK) ? |
902 | "ACPI_NOTIFY_BUS_CHECK" : "ACPI_NOTIFY_DEVICE_CHECK"); | 905 | "ACPI_NOTIFY_BUS_CHECK" : "ACPI_NOTIFY_DEVICE_CHECK")); |
903 | 906 | ||
904 | if (!is_processor_present(handle)) | 907 | if (!is_processor_present(handle)) |
905 | break; | 908 | break; |
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 3fac011f9cf9..57570ac47803 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c | |||
@@ -609,7 +609,8 @@ acpi_bus_get_ejd(acpi_handle handle, acpi_handle *ejd) | |||
609 | status = acpi_evaluate_object(handle, "_EJD", NULL, &buffer); | 609 | status = acpi_evaluate_object(handle, "_EJD", NULL, &buffer); |
610 | if (ACPI_SUCCESS(status)) { | 610 | if (ACPI_SUCCESS(status)) { |
611 | obj = buffer.pointer; | 611 | obj = buffer.pointer; |
612 | status = acpi_get_handle(NULL, obj->string.pointer, ejd); | 612 | status = acpi_get_handle(ACPI_ROOT_OBJECT, obj->string.pointer, |
613 | ejd); | ||
613 | kfree(buffer.pointer); | 614 | kfree(buffer.pointer); |
614 | } | 615 | } |
615 | return status; | 616 | return status; |
@@ -966,7 +967,7 @@ static void acpi_device_set_id(struct acpi_device *device, | |||
966 | case ACPI_BUS_TYPE_DEVICE: | 967 | case ACPI_BUS_TYPE_DEVICE: |
967 | status = acpi_get_object_info(handle, &buffer); | 968 | status = acpi_get_object_info(handle, &buffer); |
968 | if (ACPI_FAILURE(status)) { | 969 | if (ACPI_FAILURE(status)) { |
969 | printk(KERN_ERR PREFIX "%s: Error reading device info\n", __FUNCTION__); | 970 | printk(KERN_ERR PREFIX "%s: Error reading device info\n", __func__); |
970 | return; | 971 | return; |
971 | } | 972 | } |
972 | 973 | ||
diff --git a/drivers/acpi/sleep/main.c b/drivers/acpi/sleep/main.c index 293a1cbb47c0..d2f71a54726c 100644 --- a/drivers/acpi/sleep/main.c +++ b/drivers/acpi/sleep/main.c | |||
@@ -504,7 +504,7 @@ static void acpi_power_off_prepare(void) | |||
504 | static void acpi_power_off(void) | 504 | static void acpi_power_off(void) |
505 | { | 505 | { |
506 | /* acpi_sleep_prepare(ACPI_STATE_S5) should have already been called */ | 506 | /* acpi_sleep_prepare(ACPI_STATE_S5) should have already been called */ |
507 | printk("%s called\n", __FUNCTION__); | 507 | printk("%s called\n", __func__); |
508 | local_irq_disable(); | 508 | local_irq_disable(); |
509 | acpi_enable_wakeup_device(ACPI_STATE_S5); | 509 | acpi_enable_wakeup_device(ACPI_STATE_S5); |
510 | acpi_enter_sleep_state(ACPI_STATE_S5); | 510 | acpi_enter_sleep_state(ACPI_STATE_S5); |
diff --git a/drivers/acpi/system.c b/drivers/acpi/system.c index 55cf4c05bb74..4749f379a915 100644 --- a/drivers/acpi/system.c +++ b/drivers/acpi/system.c | |||
@@ -319,7 +319,7 @@ void acpi_irq_stats_init(void) | |||
319 | goto fail; | 319 | goto fail; |
320 | 320 | ||
321 | for (i = 0; i < num_counters; ++i) { | 321 | for (i = 0; i < num_counters; ++i) { |
322 | char buffer[10]; | 322 | char buffer[12]; |
323 | char *name; | 323 | char *name; |
324 | 324 | ||
325 | if (i < num_gpes) | 325 | if (i < num_gpes) |
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index 8d4b79b4f933..c4e00ac8ea85 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c | |||
@@ -879,6 +879,8 @@ static void acpi_thermal_check(void *data) | |||
879 | } | 879 | } |
880 | 880 | ||
881 | /* sys I/F for generic thermal sysfs support */ | 881 | /* sys I/F for generic thermal sysfs support */ |
882 | #define KELVIN_TO_MILLICELSIUS(t) (t * 100 - 273200) | ||
883 | |||
882 | static int thermal_get_temp(struct thermal_zone_device *thermal, char *buf) | 884 | static int thermal_get_temp(struct thermal_zone_device *thermal, char *buf) |
883 | { | 885 | { |
884 | struct acpi_thermal *tz = thermal->devdata; | 886 | struct acpi_thermal *tz = thermal->devdata; |
@@ -886,7 +888,7 @@ static int thermal_get_temp(struct thermal_zone_device *thermal, char *buf) | |||
886 | if (!tz) | 888 | if (!tz) |
887 | return -EINVAL; | 889 | return -EINVAL; |
888 | 890 | ||
889 | return sprintf(buf, "%ld\n", KELVIN_TO_CELSIUS(tz->temperature)); | 891 | return sprintf(buf, "%ld\n", KELVIN_TO_MILLICELSIUS(tz->temperature)); |
890 | } | 892 | } |
891 | 893 | ||
892 | static const char enabled[] = "kernel"; | 894 | static const char enabled[] = "kernel"; |
@@ -980,21 +982,21 @@ static int thermal_get_trip_temp(struct thermal_zone_device *thermal, | |||
980 | 982 | ||
981 | if (tz->trips.critical.flags.valid) { | 983 | if (tz->trips.critical.flags.valid) { |
982 | if (!trip) | 984 | if (!trip) |
983 | return sprintf(buf, "%ld\n", KELVIN_TO_CELSIUS( | 985 | return sprintf(buf, "%ld\n", KELVIN_TO_MILLICELSIUS( |
984 | tz->trips.critical.temperature)); | 986 | tz->trips.critical.temperature)); |
985 | trip--; | 987 | trip--; |
986 | } | 988 | } |
987 | 989 | ||
988 | if (tz->trips.hot.flags.valid) { | 990 | if (tz->trips.hot.flags.valid) { |
989 | if (!trip) | 991 | if (!trip) |
990 | return sprintf(buf, "%ld\n", KELVIN_TO_CELSIUS( | 992 | return sprintf(buf, "%ld\n", KELVIN_TO_MILLICELSIUS( |
991 | tz->trips.hot.temperature)); | 993 | tz->trips.hot.temperature)); |
992 | trip--; | 994 | trip--; |
993 | } | 995 | } |
994 | 996 | ||
995 | if (tz->trips.passive.flags.valid) { | 997 | if (tz->trips.passive.flags.valid) { |
996 | if (!trip) | 998 | if (!trip) |
997 | return sprintf(buf, "%ld\n", KELVIN_TO_CELSIUS( | 999 | return sprintf(buf, "%ld\n", KELVIN_TO_MILLICELSIUS( |
998 | tz->trips.passive.temperature)); | 1000 | tz->trips.passive.temperature)); |
999 | trip--; | 1001 | trip--; |
1000 | } | 1002 | } |
@@ -1002,7 +1004,7 @@ static int thermal_get_trip_temp(struct thermal_zone_device *thermal, | |||
1002 | for (i = 0; i < ACPI_THERMAL_MAX_ACTIVE && | 1004 | for (i = 0; i < ACPI_THERMAL_MAX_ACTIVE && |
1003 | tz->trips.active[i].flags.valid; i++) { | 1005 | tz->trips.active[i].flags.valid; i++) { |
1004 | if (!trip) | 1006 | if (!trip) |
1005 | return sprintf(buf, "%ld\n", KELVIN_TO_CELSIUS( | 1007 | return sprintf(buf, "%ld\n", KELVIN_TO_MILLICELSIUS( |
1006 | tz->trips.active[i].temperature)); | 1008 | tz->trips.active[i].temperature)); |
1007 | trip--; | 1009 | trip--; |
1008 | } | 1010 | } |
diff --git a/drivers/acpi/toshiba_acpi.c b/drivers/acpi/toshiba_acpi.c index 9e8c20c6a0b7..0a43c8e0eff3 100644 --- a/drivers/acpi/toshiba_acpi.c +++ b/drivers/acpi/toshiba_acpi.c | |||
@@ -99,6 +99,13 @@ MODULE_LICENSE("GPL"); | |||
99 | #define HCI_VIDEO_OUT_CRT 0x2 | 99 | #define HCI_VIDEO_OUT_CRT 0x2 |
100 | #define HCI_VIDEO_OUT_TV 0x4 | 100 | #define HCI_VIDEO_OUT_TV 0x4 |
101 | 101 | ||
102 | static const struct acpi_device_id toshiba_device_ids[] = { | ||
103 | {"TOS6200", 0}, | ||
104 | {"TOS1900", 0}, | ||
105 | {"", 0}, | ||
106 | }; | ||
107 | MODULE_DEVICE_TABLE(acpi, toshiba_device_ids); | ||
108 | |||
102 | /* utility | 109 | /* utility |
103 | */ | 110 | */ |
104 | 111 | ||
diff --git a/drivers/acpi/utilities/utdebug.c b/drivers/acpi/utilities/utdebug.c index c7e128e5369b..7361204b1eef 100644 --- a/drivers/acpi/utilities/utdebug.c +++ b/drivers/acpi/utilities/utdebug.c | |||
@@ -109,7 +109,7 @@ void acpi_ut_track_stack_ptr(void) | |||
109 | * RETURN: Updated pointer to the function name | 109 | * RETURN: Updated pointer to the function name |
110 | * | 110 | * |
111 | * DESCRIPTION: Remove the "Acpi" prefix from the function name, if present. | 111 | * DESCRIPTION: Remove the "Acpi" prefix from the function name, if present. |
112 | * This allows compiler macros such as __FUNCTION__ to be used | 112 | * This allows compiler macros such as __func__ to be used |
113 | * with no change to the debug output. | 113 | * with no change to the debug output. |
114 | * | 114 | * |
115 | ******************************************************************************/ | 115 | ******************************************************************************/ |
diff --git a/drivers/acpi/utilities/utobject.c b/drivers/acpi/utilities/utobject.c index 76ee766c84f9..e08b3fa6639f 100644 --- a/drivers/acpi/utilities/utobject.c +++ b/drivers/acpi/utilities/utobject.c | |||
@@ -432,7 +432,7 @@ acpi_ut_get_simple_object_size(union acpi_operand_object *internal_object, | |||
432 | * element -- which is legal) | 432 | * element -- which is legal) |
433 | */ | 433 | */ |
434 | if (!internal_object) { | 434 | if (!internal_object) { |
435 | *obj_length = 0; | 435 | *obj_length = sizeof(union acpi_object); |
436 | return_ACPI_STATUS(AE_OK); | 436 | return_ACPI_STATUS(AE_OK); |
437 | } | 437 | } |
438 | 438 | ||
diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c index eba55b7d6c95..44ea60cf21c0 100644 --- a/drivers/acpi/utils.c +++ b/drivers/acpi/utils.c | |||
@@ -407,6 +407,12 @@ acpi_evaluate_reference(acpi_handle handle, | |||
407 | break; | 407 | break; |
408 | } | 408 | } |
409 | 409 | ||
410 | if (!element->reference.handle) { | ||
411 | printk(KERN_WARNING PREFIX "Invalid reference in" | ||
412 | " package %s\n", pathname); | ||
413 | status = AE_NULL_ENTRY; | ||
414 | break; | ||
415 | } | ||
410 | /* Get the acpi_handle. */ | 416 | /* Get the acpi_handle. */ |
411 | 417 | ||
412 | list->handles[i] = element->reference.handle; | 418 | list->handles[i] = element->reference.handle; |
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index 12cce69b5441..1bc0c74f2755 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c | |||
@@ -713,7 +713,7 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device) | |||
713 | 713 | ||
714 | kfree(obj); | 714 | kfree(obj); |
715 | 715 | ||
716 | if (device->cap._BCL && device->cap._BCM && device->cap._BQC && max_level > 0){ | 716 | if (device->cap._BCL && device->cap._BCM && max_level > 0) { |
717 | int result; | 717 | int result; |
718 | static int count = 0; | 718 | static int count = 0; |
719 | char *name; | 719 | char *name; |
@@ -1201,7 +1201,7 @@ static int acpi_video_bus_ROM_seq_show(struct seq_file *seq, void *offset) | |||
1201 | if (!video) | 1201 | if (!video) |
1202 | goto end; | 1202 | goto end; |
1203 | 1203 | ||
1204 | printk(KERN_INFO PREFIX "Please implement %s\n", __FUNCTION__); | 1204 | printk(KERN_INFO PREFIX "Please implement %s\n", __func__); |
1205 | seq_printf(seq, "<TODO>\n"); | 1205 | seq_printf(seq, "<TODO>\n"); |
1206 | 1206 | ||
1207 | end: | 1207 | end: |
diff --git a/drivers/acpi/wmi.c b/drivers/acpi/wmi.c index efacc9f8bfe3..c33b1c6e93b1 100644 --- a/drivers/acpi/wmi.c +++ b/drivers/acpi/wmi.c | |||
@@ -293,7 +293,7 @@ struct acpi_buffer *out) | |||
293 | { | 293 | { |
294 | struct guid_block *block = NULL; | 294 | struct guid_block *block = NULL; |
295 | struct wmi_block *wblock = NULL; | 295 | struct wmi_block *wblock = NULL; |
296 | acpi_handle handle; | 296 | acpi_handle handle, wc_handle; |
297 | acpi_status status, wc_status = AE_ERROR; | 297 | acpi_status status, wc_status = AE_ERROR; |
298 | struct acpi_object_list input, wc_input; | 298 | struct acpi_object_list input, wc_input; |
299 | union acpi_object wc_params[1], wq_params[1]; | 299 | union acpi_object wc_params[1], wq_params[1]; |
@@ -338,8 +338,10 @@ struct acpi_buffer *out) | |||
338 | * expensive, but have no corresponding WCxx method. So we | 338 | * expensive, but have no corresponding WCxx method. So we |
339 | * should not fail if this happens. | 339 | * should not fail if this happens. |
340 | */ | 340 | */ |
341 | wc_status = acpi_evaluate_object(handle, wc_method, | 341 | wc_status = acpi_get_handle(handle, wc_method, &wc_handle); |
342 | &wc_input, NULL); | 342 | if (ACPI_SUCCESS(wc_status)) |
343 | wc_status = acpi_evaluate_object(handle, wc_method, | ||
344 | &wc_input, NULL); | ||
343 | } | 345 | } |
344 | 346 | ||
345 | strcpy(method, "WQ"); | 347 | strcpy(method, "WQ"); |
@@ -351,7 +353,7 @@ struct acpi_buffer *out) | |||
351 | * If ACPI_WMI_EXPENSIVE, call the relevant WCxx method, even if | 353 | * If ACPI_WMI_EXPENSIVE, call the relevant WCxx method, even if |
352 | * the WQxx method failed - we should disable collection anyway. | 354 | * the WQxx method failed - we should disable collection anyway. |
353 | */ | 355 | */ |
354 | if ((block->flags & ACPI_WMI_EXPENSIVE) && wc_status) { | 356 | if ((block->flags & ACPI_WMI_EXPENSIVE) && ACPI_SUCCESS(wc_status)) { |
355 | wc_params[0].integer.value = 0; | 357 | wc_params[0].integer.value = 0; |
356 | status = acpi_evaluate_object(handle, | 358 | status = acpi_evaluate_object(handle, |
357 | wc_method, &wc_input, NULL); | 359 | wc_method, &wc_input, NULL); |