diff options
| author | Ingo Molnar <mingo@elte.hu> | 2008-06-16 05:19:53 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2008-06-16 05:19:53 -0400 |
| commit | 064a32d82c20cdcb0119a8b316eb520608d8c647 (patch) | |
| tree | c67d534bd4458b1482c11f11c724fe93beca4f80 /drivers/acpi | |
| parent | 0327318445d55808991a63137cfb698a90ab6adf (diff) | |
| parent | 066519068ad2fbe98c7f45552b1f592903a9c8c8 (diff) | |
Merge branch 'linus' into x86/memtest
Diffstat (limited to 'drivers/acpi')
| -rw-r--r-- | drivers/acpi/bay.c | 16 | ||||
| -rw-r--r-- | drivers/acpi/dispatcher/dsfield.c | 5 | ||||
| -rw-r--r-- | drivers/acpi/dispatcher/dsmethod.c | 2 | ||||
| -rw-r--r-- | drivers/acpi/dock.c | 2 | ||||
| -rw-r--r-- | drivers/acpi/ec.c | 2 | ||||
| -rw-r--r-- | drivers/acpi/executer/exconfig.c | 10 | ||||
| -rw-r--r-- | drivers/acpi/executer/exmutex.c | 4 | ||||
| -rw-r--r-- | drivers/acpi/glue.c | 6 | ||||
| -rw-r--r-- | drivers/acpi/hardware/hwsleep.c | 8 | ||||
| -rw-r--r-- | drivers/acpi/numa.c | 31 | ||||
| -rw-r--r-- | drivers/acpi/parser/psargs.c | 4 | ||||
| -rw-r--r-- | drivers/acpi/processor_core.c | 1 | ||||
| -rw-r--r-- | drivers/acpi/processor_idle.c | 13 | ||||
| -rw-r--r-- | drivers/acpi/sleep/proc.c | 6 | ||||
| -rw-r--r-- | drivers/acpi/system.c | 15 | ||||
| -rw-r--r-- | drivers/acpi/tables/tbinstal.c | 25 | ||||
| -rw-r--r-- | drivers/acpi/tables/tbxface.c | 2 | ||||
| -rw-r--r-- | drivers/acpi/thermal.c | 11 | ||||
| -rw-r--r-- | drivers/acpi/utilities/utmisc.c | 2 |
19 files changed, 97 insertions, 68 deletions
diff --git a/drivers/acpi/bay.c b/drivers/acpi/bay.c index d2fc94161848..26038c2a2a71 100644 --- a/drivers/acpi/bay.c +++ b/drivers/acpi/bay.c | |||
| @@ -301,16 +301,20 @@ static int bay_add(acpi_handle handle, int id) | |||
| 301 | */ | 301 | */ |
| 302 | pdev->dev.uevent_suppress = 0; | 302 | pdev->dev.uevent_suppress = 0; |
| 303 | 303 | ||
| 304 | if (acpi_bay_add_fs(new_bay)) { | ||
| 305 | platform_device_unregister(new_bay->pdev); | ||
| 306 | goto bay_add_err; | ||
| 307 | } | ||
| 308 | |||
| 309 | /* register for events on this device */ | 304 | /* register for events on this device */ |
| 310 | status = acpi_install_notify_handler(handle, ACPI_SYSTEM_NOTIFY, | 305 | status = acpi_install_notify_handler(handle, ACPI_SYSTEM_NOTIFY, |
| 311 | bay_notify, new_bay); | 306 | bay_notify, new_bay); |
| 312 | if (ACPI_FAILURE(status)) { | 307 | if (ACPI_FAILURE(status)) { |
| 313 | printk(KERN_ERR PREFIX "Error installing bay notify handler\n"); | 308 | printk(KERN_INFO PREFIX "Error installing bay notify handler\n"); |
| 309 | platform_device_unregister(new_bay->pdev); | ||
| 310 | goto bay_add_err; | ||
| 311 | } | ||
| 312 | |||
| 313 | if (acpi_bay_add_fs(new_bay)) { | ||
| 314 | acpi_remove_notify_handler(handle, ACPI_SYSTEM_NOTIFY, | ||
| 315 | bay_notify); | ||
| 316 | platform_device_unregister(new_bay->pdev); | ||
| 317 | goto bay_add_err; | ||
| 314 | } | 318 | } |
| 315 | 319 | ||
| 316 | /* if we are on a dock station, we should register for dock | 320 | /* if we are on a dock station, we should register for dock |
diff --git a/drivers/acpi/dispatcher/dsfield.c b/drivers/acpi/dispatcher/dsfield.c index c78078315be9..f988a5e7d2b4 100644 --- a/drivers/acpi/dispatcher/dsfield.c +++ b/drivers/acpi/dispatcher/dsfield.c | |||
| @@ -450,10 +450,6 @@ acpi_ds_init_field_objects(union acpi_parse_object *op, | |||
| 450 | return_ACPI_STATUS(AE_BAD_PARAMETER); | 450 | return_ACPI_STATUS(AE_BAD_PARAMETER); |
| 451 | } | 451 | } |
| 452 | 452 | ||
| 453 | if (!arg) { | ||
| 454 | return_ACPI_STATUS(AE_AML_NO_OPERAND); | ||
| 455 | } | ||
| 456 | |||
| 457 | /* Creating new namespace node(s), should not already exist */ | 453 | /* Creating new namespace node(s), should not already exist */ |
| 458 | 454 | ||
| 459 | flags = ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE | | 455 | flags = ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE | |
| @@ -467,6 +463,7 @@ acpi_ds_init_field_objects(union acpi_parse_object *op, | |||
| 467 | 463 | ||
| 468 | /* | 464 | /* |
| 469 | * Walk the list of entries in the field_list | 465 | * Walk the list of entries in the field_list |
| 466 | * Note: field_list can be of zero length. In this case, Arg will be NULL. | ||
| 470 | */ | 467 | */ |
| 471 | while (arg) { | 468 | while (arg) { |
| 472 | /* | 469 | /* |
diff --git a/drivers/acpi/dispatcher/dsmethod.c b/drivers/acpi/dispatcher/dsmethod.c index e48a3ea03117..2509809a36cf 100644 --- a/drivers/acpi/dispatcher/dsmethod.c +++ b/drivers/acpi/dispatcher/dsmethod.c | |||
| @@ -565,7 +565,7 @@ acpi_ds_terminate_control_method(union acpi_operand_object *method_desc, | |||
| 565 | 565 | ||
| 566 | acpi_os_release_mutex(method_desc->method. | 566 | acpi_os_release_mutex(method_desc->method. |
| 567 | mutex->mutex.os_mutex); | 567 | mutex->mutex.os_mutex); |
| 568 | method_desc->method.mutex->mutex.thread_id = 0; | 568 | method_desc->method.mutex->mutex.thread_id = NULL; |
| 569 | } | 569 | } |
| 570 | } | 570 | } |
| 571 | 571 | ||
diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c index fa44fb96fc34..96c542f7fded 100644 --- a/drivers/acpi/dock.c +++ b/drivers/acpi/dock.c | |||
| @@ -834,7 +834,7 @@ static int dock_add(acpi_handle handle) | |||
| 834 | goto dock_add_err; | 834 | goto dock_add_err; |
| 835 | } | 835 | } |
| 836 | 836 | ||
| 837 | printk(KERN_INFO PREFIX "%s \n", ACPI_DOCK_DRIVER_DESCRIPTION); | 837 | printk(KERN_INFO PREFIX "%s\n", ACPI_DOCK_DRIVER_DESCRIPTION); |
| 838 | 838 | ||
| 839 | return 0; | 839 | return 0; |
| 840 | 840 | ||
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 0924992187e8..5622aee996b2 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c | |||
| @@ -194,7 +194,7 @@ static int acpi_ec_wait(struct acpi_ec *ec, enum ec_event event, int force_poll) | |||
| 194 | while (time_before(jiffies, delay)) { | 194 | while (time_before(jiffies, delay)) { |
| 195 | if (acpi_ec_check_status(ec, event)) | 195 | if (acpi_ec_check_status(ec, event)) |
| 196 | return 0; | 196 | return 0; |
| 197 | udelay(ACPI_EC_UDELAY); | 197 | msleep(1); |
| 198 | } | 198 | } |
| 199 | } | 199 | } |
| 200 | pr_err(PREFIX "acpi_ec_wait timeout, status = 0x%2.2x, event = %s\n", | 200 | pr_err(PREFIX "acpi_ec_wait timeout, status = 0x%2.2x, event = %s\n", |
diff --git a/drivers/acpi/executer/exconfig.c b/drivers/acpi/executer/exconfig.c index 24da921d13e3..39d742190584 100644 --- a/drivers/acpi/executer/exconfig.c +++ b/drivers/acpi/executer/exconfig.c | |||
| @@ -375,9 +375,15 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc, | |||
| 375 | goto cleanup; | 375 | goto cleanup; |
| 376 | } | 376 | } |
| 377 | 377 | ||
| 378 | /* | ||
| 379 | * Add the table to the namespace. | ||
| 380 | * | ||
| 381 | * Note: We load the table objects relative to the root of the namespace. | ||
| 382 | * This appears to go against the ACPI specification, but we do it for | ||
| 383 | * compatibility with other ACPI implementations. | ||
| 384 | */ | ||
| 378 | status = | 385 | status = |
| 379 | acpi_ex_add_table(table_index, walk_state->scope_info->scope.node, | 386 | acpi_ex_add_table(table_index, acpi_gbl_root_node, &ddb_handle); |
| 380 | &ddb_handle); | ||
| 381 | if (ACPI_FAILURE(status)) { | 387 | if (ACPI_FAILURE(status)) { |
| 382 | 388 | ||
| 383 | /* On error, table_ptr was deallocated above */ | 389 | /* On error, table_ptr was deallocated above */ |
diff --git a/drivers/acpi/executer/exmutex.c b/drivers/acpi/executer/exmutex.c index c873ab40cd0e..a8bf3d713e28 100644 --- a/drivers/acpi/executer/exmutex.c +++ b/drivers/acpi/executer/exmutex.c | |||
| @@ -326,7 +326,7 @@ acpi_status acpi_ex_release_mutex_object(union acpi_operand_object *obj_desc) | |||
| 326 | 326 | ||
| 327 | /* Clear mutex info */ | 327 | /* Clear mutex info */ |
| 328 | 328 | ||
| 329 | obj_desc->mutex.thread_id = 0; | 329 | obj_desc->mutex.thread_id = NULL; |
| 330 | return_ACPI_STATUS(status); | 330 | return_ACPI_STATUS(status); |
| 331 | } | 331 | } |
| 332 | 332 | ||
| @@ -463,7 +463,7 @@ void acpi_ex_release_all_mutexes(struct acpi_thread_state *thread) | |||
| 463 | /* Mark mutex unowned */ | 463 | /* Mark mutex unowned */ |
| 464 | 464 | ||
| 465 | obj_desc->mutex.owner_thread = NULL; | 465 | obj_desc->mutex.owner_thread = NULL; |
| 466 | obj_desc->mutex.thread_id = 0; | 466 | obj_desc->mutex.thread_id = NULL; |
| 467 | 467 | ||
| 468 | /* Update Thread sync_level (Last mutex is the important one) */ | 468 | /* Update Thread sync_level (Last mutex is the important one) */ |
| 469 | 469 | ||
diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c index 06f8634fe58b..2808dc60fd67 100644 --- a/drivers/acpi/glue.c +++ b/drivers/acpi/glue.c | |||
| @@ -272,6 +272,12 @@ static u32 rtc_handler(void *context) | |||
| 272 | static inline void rtc_wake_setup(void) | 272 | static inline void rtc_wake_setup(void) |
| 273 | { | 273 | { |
| 274 | acpi_install_fixed_event_handler(ACPI_EVENT_RTC, rtc_handler, NULL); | 274 | acpi_install_fixed_event_handler(ACPI_EVENT_RTC, rtc_handler, NULL); |
| 275 | /* | ||
| 276 | * After the RTC handler is installed, the Fixed_RTC event should | ||
| 277 | * be disabled. Only when the RTC alarm is set will it be enabled. | ||
| 278 | */ | ||
| 279 | acpi_clear_event(ACPI_EVENT_RTC); | ||
| 280 | acpi_disable_event(ACPI_EVENT_RTC, 0); | ||
| 275 | } | 281 | } |
| 276 | 282 | ||
| 277 | static void rtc_wake_on(struct device *dev) | 283 | static void rtc_wake_on(struct device *dev) |
diff --git a/drivers/acpi/hardware/hwsleep.c b/drivers/acpi/hardware/hwsleep.c index d9937e05ec6a..dba3cfbe8cba 100644 --- a/drivers/acpi/hardware/hwsleep.c +++ b/drivers/acpi/hardware/hwsleep.c | |||
| @@ -223,15 +223,17 @@ acpi_status acpi_enter_sleep_state_prep(u8 sleep_state) | |||
| 223 | break; | 223 | break; |
| 224 | } | 224 | } |
| 225 | 225 | ||
| 226 | /* Set the system indicators to show the desired sleep state. */ | 226 | /* |
| 227 | 227 | * Set the system indicators to show the desired sleep state. | |
| 228 | * _SST is an optional method (return no error if not found) | ||
| 229 | */ | ||
| 228 | status = acpi_evaluate_object(NULL, METHOD_NAME__SST, &arg_list, NULL); | 230 | status = acpi_evaluate_object(NULL, METHOD_NAME__SST, &arg_list, NULL); |
| 229 | if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { | 231 | if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { |
| 230 | ACPI_EXCEPTION((AE_INFO, status, | 232 | ACPI_EXCEPTION((AE_INFO, status, |
| 231 | "While executing method _SST")); | 233 | "While executing method _SST")); |
| 232 | } | 234 | } |
| 233 | 235 | ||
| 234 | return_ACPI_STATUS(status); | 236 | return_ACPI_STATUS(AE_OK); |
| 235 | } | 237 | } |
| 236 | 238 | ||
| 237 | ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state_prep) | 239 | ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state_prep) |
diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c index 5d59cb33b1a5..658e5f3abae0 100644 --- a/drivers/acpi/numa.c +++ b/drivers/acpi/numa.c | |||
| @@ -140,19 +140,42 @@ acpi_table_print_srat_entry(struct acpi_subtable_header *header) | |||
| 140 | } | 140 | } |
| 141 | } | 141 | } |
| 142 | 142 | ||
| 143 | /* | ||
| 144 | * A lot of BIOS fill in 10 (= no distance) everywhere. This messes | ||
| 145 | * up the NUMA heuristics which wants the local node to have a smaller | ||
| 146 | * distance than the others. | ||
| 147 | * Do some quick checks here and only use the SLIT if it passes. | ||
| 148 | */ | ||
| 149 | static __init int slit_valid(struct acpi_table_slit *slit) | ||
| 150 | { | ||
| 151 | int i, j; | ||
| 152 | int d = slit->locality_count; | ||
| 153 | for (i = 0; i < d; i++) { | ||
| 154 | for (j = 0; j < d; j++) { | ||
| 155 | u8 val = slit->entry[d*i + j]; | ||
| 156 | if (i == j) { | ||
| 157 | if (val != LOCAL_DISTANCE) | ||
| 158 | return 0; | ||
| 159 | } else if (val <= LOCAL_DISTANCE) | ||
| 160 | return 0; | ||
| 161 | } | ||
| 162 | } | ||
| 163 | return 1; | ||
| 164 | } | ||
| 165 | |||
| 143 | static int __init acpi_parse_slit(struct acpi_table_header *table) | 166 | static int __init acpi_parse_slit(struct acpi_table_header *table) |
| 144 | { | 167 | { |
| 145 | struct acpi_table_slit *slit; | 168 | struct acpi_table_slit *slit; |
| 146 | u32 localities; | ||
| 147 | 169 | ||
| 148 | if (!table) | 170 | if (!table) |
| 149 | return -EINVAL; | 171 | return -EINVAL; |
| 150 | 172 | ||
| 151 | slit = (struct acpi_table_slit *)table; | 173 | slit = (struct acpi_table_slit *)table; |
| 152 | 174 | ||
| 153 | /* downcast just for %llu vs %lu for i386/ia64 */ | 175 | if (!slit_valid(slit)) { |
| 154 | localities = (u32) slit->locality_count; | 176 | printk(KERN_INFO "ACPI: SLIT table looks invalid. Not used.\n"); |
| 155 | 177 | return -EINVAL; | |
| 178 | } | ||
| 156 | acpi_numa_slit_init(slit); | 179 | acpi_numa_slit_init(slit); |
| 157 | 180 | ||
| 158 | return 0; | 181 | return 0; |
diff --git a/drivers/acpi/parser/psargs.c b/drivers/acpi/parser/psargs.c index f1e8bf65e24e..e94463778845 100644 --- a/drivers/acpi/parser/psargs.c +++ b/drivers/acpi/parser/psargs.c | |||
| @@ -268,7 +268,7 @@ acpi_ps_get_next_namepath(struct acpi_walk_state *walk_state, | |||
| 268 | */ | 268 | */ |
| 269 | if (ACPI_SUCCESS(status) && | 269 | if (ACPI_SUCCESS(status) && |
| 270 | possible_method_call && (node->type == ACPI_TYPE_METHOD)) { | 270 | possible_method_call && (node->type == ACPI_TYPE_METHOD)) { |
| 271 | if (walk_state->op->common.aml_opcode == AML_UNLOAD_OP) { | 271 | if (walk_state->opcode == AML_UNLOAD_OP) { |
| 272 | /* | 272 | /* |
| 273 | * acpi_ps_get_next_namestring has increased the AML pointer, | 273 | * acpi_ps_get_next_namestring has increased the AML pointer, |
| 274 | * so we need to restore the saved AML pointer for method call. | 274 | * so we need to restore the saved AML pointer for method call. |
| @@ -691,7 +691,7 @@ acpi_ps_get_next_arg(struct acpi_walk_state *walk_state, | |||
| 691 | 691 | ||
| 692 | /* To support super_name arg of Unload */ | 692 | /* To support super_name arg of Unload */ |
| 693 | 693 | ||
| 694 | if (walk_state->op->common.aml_opcode == AML_UNLOAD_OP) { | 694 | if (walk_state->opcode == AML_UNLOAD_OP) { |
| 695 | status = | 695 | status = |
| 696 | acpi_ps_get_next_namepath(walk_state, | 696 | acpi_ps_get_next_namepath(walk_state, |
| 697 | parser_state, arg, | 697 | parser_state, arg, |
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c index 386e5aa48834..9dd0fa93b9e1 100644 --- a/drivers/acpi/processor_core.c +++ b/drivers/acpi/processor_core.c | |||
| @@ -86,7 +86,6 @@ static int acpi_processor_info_open_fs(struct inode *inode, struct file *file); | |||
| 86 | static void acpi_processor_notify(acpi_handle handle, u32 event, void *data); | 86 | static void acpi_processor_notify(acpi_handle handle, u32 event, void *data); |
| 87 | static acpi_status acpi_processor_hotadd_init(acpi_handle handle, int *p_cpu); | 87 | static acpi_status acpi_processor_hotadd_init(acpi_handle handle, int *p_cpu); |
| 88 | static int acpi_processor_handle_eject(struct acpi_processor *pr); | 88 | static int acpi_processor_handle_eject(struct acpi_processor *pr); |
| 89 | extern int acpi_processor_tstate_has_changed(struct acpi_processor *pr); | ||
| 90 | 89 | ||
| 91 | 90 | ||
| 92 | static const struct acpi_device_id processor_device_ids[] = { | 91 | static const struct acpi_device_id processor_device_ids[] = { |
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 2dd2c1f3a01c..556ee1585192 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c | |||
| @@ -1669,6 +1669,7 @@ static int acpi_processor_setup_cpuidle(struct acpi_processor *pr) | |||
| 1669 | return -EINVAL; | 1669 | return -EINVAL; |
| 1670 | } | 1670 | } |
| 1671 | 1671 | ||
| 1672 | dev->cpu = pr->id; | ||
| 1672 | for (i = 0; i < CPUIDLE_STATE_MAX; i++) { | 1673 | for (i = 0; i < CPUIDLE_STATE_MAX; i++) { |
| 1673 | dev->states[i].name[0] = '\0'; | 1674 | dev->states[i].name[0] = '\0'; |
| 1674 | dev->states[i].desc[0] = '\0'; | 1675 | dev->states[i].desc[0] = '\0'; |
| @@ -1738,7 +1739,7 @@ static int acpi_processor_setup_cpuidle(struct acpi_processor *pr) | |||
| 1738 | 1739 | ||
| 1739 | int acpi_processor_cst_has_changed(struct acpi_processor *pr) | 1740 | int acpi_processor_cst_has_changed(struct acpi_processor *pr) |
| 1740 | { | 1741 | { |
| 1741 | int ret; | 1742 | int ret = 0; |
| 1742 | 1743 | ||
| 1743 | if (boot_option_idle_override) | 1744 | if (boot_option_idle_override) |
| 1744 | return 0; | 1745 | return 0; |
| @@ -1756,8 +1757,10 @@ int acpi_processor_cst_has_changed(struct acpi_processor *pr) | |||
| 1756 | cpuidle_pause_and_lock(); | 1757 | cpuidle_pause_and_lock(); |
| 1757 | cpuidle_disable_device(&pr->power.dev); | 1758 | cpuidle_disable_device(&pr->power.dev); |
| 1758 | acpi_processor_get_power_info(pr); | 1759 | acpi_processor_get_power_info(pr); |
| 1759 | acpi_processor_setup_cpuidle(pr); | 1760 | if (pr->flags.power) { |
| 1760 | ret = cpuidle_enable_device(&pr->power.dev); | 1761 | acpi_processor_setup_cpuidle(pr); |
| 1762 | ret = cpuidle_enable_device(&pr->power.dev); | ||
| 1763 | } | ||
| 1761 | cpuidle_resume_and_unlock(); | 1764 | cpuidle_resume_and_unlock(); |
| 1762 | 1765 | ||
| 1763 | return ret; | 1766 | return ret; |
| @@ -1813,7 +1816,6 @@ int __cpuinit acpi_processor_power_init(struct acpi_processor *pr, | |||
| 1813 | if (pr->flags.power) { | 1816 | if (pr->flags.power) { |
| 1814 | #ifdef CONFIG_CPU_IDLE | 1817 | #ifdef CONFIG_CPU_IDLE |
| 1815 | acpi_processor_setup_cpuidle(pr); | 1818 | acpi_processor_setup_cpuidle(pr); |
| 1816 | pr->power.dev.cpu = pr->id; | ||
| 1817 | if (cpuidle_register_device(&pr->power.dev)) | 1819 | if (cpuidle_register_device(&pr->power.dev)) |
| 1818 | return -EIO; | 1820 | return -EIO; |
| 1819 | #endif | 1821 | #endif |
| @@ -1850,8 +1852,7 @@ int acpi_processor_power_exit(struct acpi_processor *pr, | |||
| 1850 | return 0; | 1852 | return 0; |
| 1851 | 1853 | ||
| 1852 | #ifdef CONFIG_CPU_IDLE | 1854 | #ifdef CONFIG_CPU_IDLE |
| 1853 | if (pr->flags.power) | 1855 | cpuidle_unregister_device(&pr->power.dev); |
| 1854 | cpuidle_unregister_device(&pr->power.dev); | ||
| 1855 | #endif | 1856 | #endif |
| 1856 | pr->flags.power_setup_done = 0; | 1857 | pr->flags.power_setup_done = 0; |
| 1857 | 1858 | ||
diff --git a/drivers/acpi/sleep/proc.c b/drivers/acpi/sleep/proc.c index 8a5fe8710513..224c57c03381 100644 --- a/drivers/acpi/sleep/proc.c +++ b/drivers/acpi/sleep/proc.c | |||
| @@ -495,6 +495,12 @@ static int __init acpi_sleep_proc_init(void) | |||
| 495 | acpi_root_dir, &acpi_system_alarm_fops); | 495 | acpi_root_dir, &acpi_system_alarm_fops); |
| 496 | 496 | ||
| 497 | acpi_install_fixed_event_handler(ACPI_EVENT_RTC, rtc_handler, NULL); | 497 | acpi_install_fixed_event_handler(ACPI_EVENT_RTC, rtc_handler, NULL); |
| 498 | /* | ||
| 499 | * Disable the RTC event after installing RTC handler. | ||
| 500 | * Only when RTC alarm is set will it be enabled. | ||
| 501 | */ | ||
| 502 | acpi_clear_event(ACPI_EVENT_RTC); | ||
| 503 | acpi_disable_event(ACPI_EVENT_RTC, 0); | ||
| 498 | #endif /* HAVE_ACPI_LEGACY_ALARM */ | 504 | #endif /* HAVE_ACPI_LEGACY_ALARM */ |
| 499 | 505 | ||
| 500 | /* 'wakeup device' [R/W] */ | 506 | /* 'wakeup device' [R/W] */ |
diff --git a/drivers/acpi/system.c b/drivers/acpi/system.c index 769f24855eb6..5bd2dec9a7ac 100644 --- a/drivers/acpi/system.c +++ b/drivers/acpi/system.c | |||
| @@ -77,7 +77,6 @@ static ssize_t acpi_table_show(struct kobject *kobj, | |||
| 77 | container_of(bin_attr, struct acpi_table_attr, attr); | 77 | container_of(bin_attr, struct acpi_table_attr, attr); |
| 78 | struct acpi_table_header *table_header = NULL; | 78 | struct acpi_table_header *table_header = NULL; |
| 79 | acpi_status status; | 79 | acpi_status status; |
| 80 | ssize_t ret_count = count; | ||
| 81 | 80 | ||
| 82 | status = | 81 | status = |
| 83 | acpi_get_table(table_attr->name, table_attr->instance, | 82 | acpi_get_table(table_attr->name, table_attr->instance, |
| @@ -85,18 +84,8 @@ static ssize_t acpi_table_show(struct kobject *kobj, | |||
| 85 | if (ACPI_FAILURE(status)) | 84 | if (ACPI_FAILURE(status)) |
| 86 | return -ENODEV; | 85 | return -ENODEV; |
| 87 | 86 | ||
| 88 | if (offset >= table_header->length) { | 87 | return memory_read_from_buffer(buf, count, &offset, |
| 89 | ret_count = 0; | 88 | table_header, table_header->length); |
| 90 | goto end; | ||
| 91 | } | ||
| 92 | |||
| 93 | if (offset + ret_count > table_header->length) | ||
| 94 | ret_count = table_header->length - offset; | ||
| 95 | |||
| 96 | memcpy(buf, ((char *)table_header) + offset, ret_count); | ||
| 97 | |||
| 98 | end: | ||
| 99 | return ret_count; | ||
| 100 | } | 89 | } |
| 101 | 90 | ||
| 102 | static void acpi_table_attr_init(struct acpi_table_attr *table_attr, | 91 | static void acpi_table_attr_init(struct acpi_table_attr *table_attr, |
diff --git a/drivers/acpi/tables/tbinstal.c b/drivers/acpi/tables/tbinstal.c index 402f93e1ff20..5336ce88f89f 100644 --- a/drivers/acpi/tables/tbinstal.c +++ b/drivers/acpi/tables/tbinstal.c | |||
| @@ -123,24 +123,13 @@ acpi_tb_add_table(struct acpi_table_desc *table_desc, | |||
| 123 | } | 123 | } |
| 124 | } | 124 | } |
| 125 | 125 | ||
| 126 | /* The table must be either an SSDT or a PSDT or an OEMx */ | 126 | /* |
| 127 | 127 | * Originally, we checked the table signature for "SSDT" or "PSDT" here. | |
| 128 | if (!ACPI_COMPARE_NAME(table_desc->pointer->signature, ACPI_SIG_PSDT)&& | 128 | * Next, we added support for OEMx tables, signature "OEM". |
| 129 | !ACPI_COMPARE_NAME(table_desc->pointer->signature, ACPI_SIG_SSDT)&& | 129 | * Valid tables were encountered with a null signature, so we've just |
| 130 | strncmp(table_desc->pointer->signature, "OEM", 3)) { | 130 | * given up on validating the signature, since it seems to be a waste |
| 131 | /* Check for a printable name */ | 131 | * of code. The original code was removed (05/2008). |
| 132 | if (acpi_ut_valid_acpi_name( | 132 | */ |
| 133 | *(u32 *) table_desc->pointer->signature)) { | ||
| 134 | ACPI_ERROR((AE_INFO, "Table has invalid signature " | ||
| 135 | "[%4.4s], must be SSDT or PSDT", | ||
| 136 | table_desc->pointer->signature)); | ||
| 137 | } else { | ||
| 138 | ACPI_ERROR((AE_INFO, "Table has invalid signature " | ||
| 139 | "(0x%8.8X), must be SSDT or PSDT", | ||
| 140 | *(u32 *) table_desc->pointer->signature)); | ||
| 141 | } | ||
| 142 | return_ACPI_STATUS(AE_BAD_SIGNATURE); | ||
| 143 | } | ||
| 144 | 133 | ||
| 145 | (void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES); | 134 | (void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES); |
| 146 | 135 | ||
diff --git a/drivers/acpi/tables/tbxface.c b/drivers/acpi/tables/tbxface.c index fb57b93c2495..0e319604d3e7 100644 --- a/drivers/acpi/tables/tbxface.c +++ b/drivers/acpi/tables/tbxface.c | |||
| @@ -540,7 +540,7 @@ static acpi_status acpi_tb_load_namespace(void) | |||
| 540 | acpi_tb_print_table_header(0, table); | 540 | acpi_tb_print_table_header(0, table); |
| 541 | 541 | ||
| 542 | if (no_auto_ssdt == 0) { | 542 | if (no_auto_ssdt == 0) { |
| 543 | printk(KERN_WARNING "ACPI: DSDT override uses original SSDTs unless \"acpi_no_auto_ssdt\""); | 543 | printk(KERN_WARNING "ACPI: DSDT override uses original SSDTs unless \"acpi_no_auto_ssdt\"\n"); |
| 544 | } | 544 | } |
| 545 | } | 545 | } |
| 546 | 546 | ||
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index 504385b1f211..84c795fb9b1e 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c | |||
| @@ -364,10 +364,17 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag) | |||
| 364 | if (flag & ACPI_TRIPS_CRITICAL) { | 364 | if (flag & ACPI_TRIPS_CRITICAL) { |
| 365 | status = acpi_evaluate_integer(tz->device->handle, | 365 | status = acpi_evaluate_integer(tz->device->handle, |
| 366 | "_CRT", NULL, &tz->trips.critical.temperature); | 366 | "_CRT", NULL, &tz->trips.critical.temperature); |
| 367 | if (ACPI_FAILURE(status)) { | 367 | /* |
| 368 | * Treat freezing temperatures as invalid as well; some | ||
| 369 | * BIOSes return really low values and cause reboots at startup. | ||
| 370 | * Below zero (Celcius) values clearly aren't right for sure.. | ||
| 371 | * ... so lets discard those as invalid. | ||
| 372 | */ | ||
| 373 | if (ACPI_FAILURE(status) || | ||
| 374 | tz->trips.critical.temperature <= 2732) { | ||
| 368 | tz->trips.critical.flags.valid = 0; | 375 | tz->trips.critical.flags.valid = 0; |
| 369 | ACPI_EXCEPTION((AE_INFO, status, | 376 | ACPI_EXCEPTION((AE_INFO, status, |
| 370 | "No critical threshold")); | 377 | "No or invalid critical threshold")); |
| 371 | return -ENODEV; | 378 | return -ENODEV; |
| 372 | } else { | 379 | } else { |
| 373 | tz->trips.critical.flags.valid = 1; | 380 | tz->trips.critical.flags.valid = 1; |
diff --git a/drivers/acpi/utilities/utmisc.c b/drivers/acpi/utilities/utmisc.c index e4ba7192cd15..1f057b71db1a 100644 --- a/drivers/acpi/utilities/utmisc.c +++ b/drivers/acpi/utilities/utmisc.c | |||
| @@ -1048,6 +1048,7 @@ acpi_ut_exception(char *module_name, | |||
| 1048 | va_start(args, format); | 1048 | va_start(args, format); |
| 1049 | acpi_os_vprintf(format, args); | 1049 | acpi_os_vprintf(format, args); |
| 1050 | acpi_os_printf(" [%X]\n", ACPI_CA_VERSION); | 1050 | acpi_os_printf(" [%X]\n", ACPI_CA_VERSION); |
| 1051 | va_end(args); | ||
| 1051 | } | 1052 | } |
| 1052 | 1053 | ||
| 1053 | EXPORT_SYMBOL(acpi_ut_exception); | 1054 | EXPORT_SYMBOL(acpi_ut_exception); |
| @@ -1063,7 +1064,6 @@ acpi_ut_warning(char *module_name, u32 line_number, char *format, ...) | |||
| 1063 | acpi_os_vprintf(format, args); | 1064 | acpi_os_vprintf(format, args); |
| 1064 | acpi_os_printf(" [%X]\n", ACPI_CA_VERSION); | 1065 | acpi_os_printf(" [%X]\n", ACPI_CA_VERSION); |
| 1065 | va_end(args); | 1066 | va_end(args); |
| 1066 | va_end(args); | ||
| 1067 | } | 1067 | } |
| 1068 | 1068 | ||
| 1069 | void ACPI_INTERNAL_VAR_XFACE | 1069 | void ACPI_INTERNAL_VAR_XFACE |
