diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-10-28 21:34:19 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-10-28 21:34:19 -0400 |
| commit | c067affcd316a36a28beaf8ea8c39db22a88c778 (patch) | |
| tree | c6b14e3d832f16403c7f7ca6c241e2c3df3c69ab | |
| parent | b546e0c289f7e9faf86999d34e895ee2b31c719b (diff) | |
| parent | 21e2d9d5292f8a5cd1aa4e63891437589d233d35 (diff) | |
Merge tag 'acpi-4.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull ACPI fixes from Rafael Wysocki:
"These fix recent ACPICA regressions, an older PCI IRQ management
regression, and an incorrect return value of a function in the APEI
code.
Specifics:
- Fix three ACPICA issues related to the interpreter locking and
introduced by recent changes in that area (Lv Zheng).
- Fix a PCI IRQ management regression introduced during the 4.7 cycle
and related to the configuration of shared IRQs on systems with an
ISA bus (Sinan Kaya).
- Fix up a return value of one function in the APEI code (Punit
Agrawal)"
* tag 'acpi-4.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
ACPICA: Dispatcher: Fix interpreter locking around acpi_ev_initialize_region()
ACPICA: Dispatcher: Fix an unbalanced lock exit path in acpi_ds_auto_serialize_method()
ACPICA: Dispatcher: Fix order issue of method termination
ACPI / APEI: Fix incorrect return value of ghes_proc()
ACPI/PCI: pci_link: Include PIRQ_PENALTY_PCI_USING for ISA IRQs
ACPI/PCI: pci_link: penalize SCI correctly
ACPI/PCI/IRQ: assign ISA IRQ directly during early boot stages
| -rw-r--r-- | arch/x86/kernel/acpi/boot.c | 1 | ||||
| -rw-r--r-- | drivers/acpi/acpica/dsinit.c | 11 | ||||
| -rw-r--r-- | drivers/acpi/acpica/dsmethod.c | 50 | ||||
| -rw-r--r-- | drivers/acpi/acpica/dswload2.c | 2 | ||||
| -rw-r--r-- | drivers/acpi/acpica/evrgnini.c | 3 | ||||
| -rw-r--r-- | drivers/acpi/acpica/nsload.c | 2 | ||||
| -rw-r--r-- | drivers/acpi/apei/ghes.c | 2 | ||||
| -rw-r--r-- | drivers/acpi/pci_link.c | 38 | ||||
| -rw-r--r-- | include/linux/acpi.h | 1 |
9 files changed, 54 insertions, 56 deletions
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index 8a5abaa7d453..931ced8ca345 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c | |||
| @@ -454,6 +454,7 @@ static void __init acpi_sci_ioapic_setup(u8 bus_irq, u16 polarity, u16 trigger, | |||
| 454 | polarity = acpi_sci_flags & ACPI_MADT_POLARITY_MASK; | 454 | polarity = acpi_sci_flags & ACPI_MADT_POLARITY_MASK; |
| 455 | 455 | ||
| 456 | mp_override_legacy_irq(bus_irq, polarity, trigger, gsi); | 456 | mp_override_legacy_irq(bus_irq, polarity, trigger, gsi); |
| 457 | acpi_penalize_sci_irq(bus_irq, trigger, polarity); | ||
| 457 | 458 | ||
| 458 | /* | 459 | /* |
| 459 | * stash over-ride to indicate we've been here | 460 | * stash over-ride to indicate we've been here |
diff --git a/drivers/acpi/acpica/dsinit.c b/drivers/acpi/acpica/dsinit.c index f1e6dcc7a827..54d48b90de2c 100644 --- a/drivers/acpi/acpica/dsinit.c +++ b/drivers/acpi/acpica/dsinit.c | |||
| @@ -46,6 +46,7 @@ | |||
| 46 | #include "acdispat.h" | 46 | #include "acdispat.h" |
| 47 | #include "acnamesp.h" | 47 | #include "acnamesp.h" |
| 48 | #include "actables.h" | 48 | #include "actables.h" |
| 49 | #include "acinterp.h" | ||
| 49 | 50 | ||
| 50 | #define _COMPONENT ACPI_DISPATCHER | 51 | #define _COMPONENT ACPI_DISPATCHER |
| 51 | ACPI_MODULE_NAME("dsinit") | 52 | ACPI_MODULE_NAME("dsinit") |
| @@ -214,23 +215,17 @@ acpi_ds_initialize_objects(u32 table_index, | |||
| 214 | 215 | ||
| 215 | /* Walk entire namespace from the supplied root */ | 216 | /* Walk entire namespace from the supplied root */ |
| 216 | 217 | ||
| 217 | status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE); | ||
| 218 | if (ACPI_FAILURE(status)) { | ||
| 219 | return_ACPI_STATUS(status); | ||
| 220 | } | ||
| 221 | |||
| 222 | /* | 218 | /* |
| 223 | * We don't use acpi_walk_namespace since we do not want to acquire | 219 | * We don't use acpi_walk_namespace since we do not want to acquire |
| 224 | * the namespace reader lock. | 220 | * the namespace reader lock. |
| 225 | */ | 221 | */ |
| 226 | status = | 222 | status = |
| 227 | acpi_ns_walk_namespace(ACPI_TYPE_ANY, start_node, ACPI_UINT32_MAX, | 223 | acpi_ns_walk_namespace(ACPI_TYPE_ANY, start_node, ACPI_UINT32_MAX, |
| 228 | ACPI_NS_WALK_UNLOCK, acpi_ds_init_one_object, | 224 | 0, acpi_ds_init_one_object, NULL, &info, |
| 229 | NULL, &info, NULL); | 225 | NULL); |
| 230 | if (ACPI_FAILURE(status)) { | 226 | if (ACPI_FAILURE(status)) { |
| 231 | ACPI_EXCEPTION((AE_INFO, status, "During WalkNamespace")); | 227 | ACPI_EXCEPTION((AE_INFO, status, "During WalkNamespace")); |
| 232 | } | 228 | } |
| 233 | (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); | ||
| 234 | 229 | ||
| 235 | status = acpi_get_table_by_index(table_index, &table); | 230 | status = acpi_get_table_by_index(table_index, &table); |
| 236 | if (ACPI_FAILURE(status)) { | 231 | if (ACPI_FAILURE(status)) { |
diff --git a/drivers/acpi/acpica/dsmethod.c b/drivers/acpi/acpica/dsmethod.c index 32e9ddc0cf2b..2b3210f42a46 100644 --- a/drivers/acpi/acpica/dsmethod.c +++ b/drivers/acpi/acpica/dsmethod.c | |||
| @@ -99,14 +99,11 @@ acpi_ds_auto_serialize_method(struct acpi_namespace_node *node, | |||
| 99 | "Method auto-serialization parse [%4.4s] %p\n", | 99 | "Method auto-serialization parse [%4.4s] %p\n", |
| 100 | acpi_ut_get_node_name(node), node)); | 100 | acpi_ut_get_node_name(node), node)); |
| 101 | 101 | ||
| 102 | acpi_ex_enter_interpreter(); | ||
| 103 | |||
| 104 | /* Create/Init a root op for the method parse tree */ | 102 | /* Create/Init a root op for the method parse tree */ |
| 105 | 103 | ||
| 106 | op = acpi_ps_alloc_op(AML_METHOD_OP, obj_desc->method.aml_start); | 104 | op = acpi_ps_alloc_op(AML_METHOD_OP, obj_desc->method.aml_start); |
| 107 | if (!op) { | 105 | if (!op) { |
| 108 | status = AE_NO_MEMORY; | 106 | return_ACPI_STATUS(AE_NO_MEMORY); |
| 109 | goto unlock; | ||
| 110 | } | 107 | } |
| 111 | 108 | ||
| 112 | acpi_ps_set_name(op, node->name.integer); | 109 | acpi_ps_set_name(op, node->name.integer); |
| @@ -118,8 +115,7 @@ acpi_ds_auto_serialize_method(struct acpi_namespace_node *node, | |||
| 118 | acpi_ds_create_walk_state(node->owner_id, NULL, NULL, NULL); | 115 | acpi_ds_create_walk_state(node->owner_id, NULL, NULL, NULL); |
| 119 | if (!walk_state) { | 116 | if (!walk_state) { |
| 120 | acpi_ps_free_op(op); | 117 | acpi_ps_free_op(op); |
| 121 | status = AE_NO_MEMORY; | 118 | return_ACPI_STATUS(AE_NO_MEMORY); |
| 122 | goto unlock; | ||
| 123 | } | 119 | } |
| 124 | 120 | ||
| 125 | status = acpi_ds_init_aml_walk(walk_state, op, node, | 121 | status = acpi_ds_init_aml_walk(walk_state, op, node, |
| @@ -138,8 +134,6 @@ acpi_ds_auto_serialize_method(struct acpi_namespace_node *node, | |||
| 138 | status = acpi_ps_parse_aml(walk_state); | 134 | status = acpi_ps_parse_aml(walk_state); |
| 139 | 135 | ||
| 140 | acpi_ps_delete_parse_tree(op); | 136 | acpi_ps_delete_parse_tree(op); |
| 141 | unlock: | ||
| 142 | acpi_ex_exit_interpreter(); | ||
| 143 | return_ACPI_STATUS(status); | 137 | return_ACPI_STATUS(status); |
| 144 | } | 138 | } |
| 145 | 139 | ||
| @@ -731,26 +725,6 @@ acpi_ds_terminate_control_method(union acpi_operand_object *method_desc, | |||
| 731 | acpi_ds_method_data_delete_all(walk_state); | 725 | acpi_ds_method_data_delete_all(walk_state); |
| 732 | 726 | ||
| 733 | /* | 727 | /* |
| 734 | * If method is serialized, release the mutex and restore the | ||
| 735 | * current sync level for this thread | ||
| 736 | */ | ||
| 737 | if (method_desc->method.mutex) { | ||
| 738 | |||
| 739 | /* Acquisition Depth handles recursive calls */ | ||
| 740 | |||
| 741 | method_desc->method.mutex->mutex.acquisition_depth--; | ||
| 742 | if (!method_desc->method.mutex->mutex.acquisition_depth) { | ||
| 743 | walk_state->thread->current_sync_level = | ||
| 744 | method_desc->method.mutex->mutex. | ||
| 745 | original_sync_level; | ||
| 746 | |||
| 747 | acpi_os_release_mutex(method_desc->method. | ||
| 748 | mutex->mutex.os_mutex); | ||
| 749 | method_desc->method.mutex->mutex.thread_id = 0; | ||
| 750 | } | ||
| 751 | } | ||
| 752 | |||
| 753 | /* | ||
| 754 | * Delete any namespace objects created anywhere within the | 728 | * Delete any namespace objects created anywhere within the |
| 755 | * namespace by the execution of this method. Unless: | 729 | * namespace by the execution of this method. Unless: |
| 756 | * 1) This method is a module-level executable code method, in which | 730 | * 1) This method is a module-level executable code method, in which |
| @@ -786,6 +760,26 @@ acpi_ds_terminate_control_method(union acpi_operand_object *method_desc, | |||
| 786 | ~ACPI_METHOD_MODIFIED_NAMESPACE; | 760 | ~ACPI_METHOD_MODIFIED_NAMESPACE; |
| 787 | } | 761 | } |
| 788 | } | 762 | } |
| 763 | |||
| 764 | /* | ||
| 765 | * If method is serialized, release the mutex and restore the | ||
| 766 | * current sync level for this thread | ||
| 767 | */ | ||
| 768 | if (method_desc->method.mutex) { | ||
| 769 | |||
| 770 | /* Acquisition Depth handles recursive calls */ | ||
| 771 | |||
| 772 | method_desc->method.mutex->mutex.acquisition_depth--; | ||
| 773 | if (!method_desc->method.mutex->mutex.acquisition_depth) { | ||
| 774 | walk_state->thread->current_sync_level = | ||
| 775 | method_desc->method.mutex->mutex. | ||
| 776 | original_sync_level; | ||
| 777 | |||
| 778 | acpi_os_release_mutex(method_desc->method. | ||
| 779 | mutex->mutex.os_mutex); | ||
| 780 | method_desc->method.mutex->mutex.thread_id = 0; | ||
| 781 | } | ||
| 782 | } | ||
| 789 | } | 783 | } |
| 790 | 784 | ||
| 791 | /* Decrement the thread count on the method */ | 785 | /* Decrement the thread count on the method */ |
diff --git a/drivers/acpi/acpica/dswload2.c b/drivers/acpi/acpica/dswload2.c index 028b22a3154e..e36218206bb0 100644 --- a/drivers/acpi/acpica/dswload2.c +++ b/drivers/acpi/acpica/dswload2.c | |||
| @@ -607,11 +607,9 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state) | |||
| 607 | } | 607 | } |
| 608 | } | 608 | } |
| 609 | 609 | ||
| 610 | acpi_ex_exit_interpreter(); | ||
| 611 | status = | 610 | status = |
| 612 | acpi_ev_initialize_region | 611 | acpi_ev_initialize_region |
| 613 | (acpi_ns_get_attached_object(node), FALSE); | 612 | (acpi_ns_get_attached_object(node), FALSE); |
| 614 | acpi_ex_enter_interpreter(); | ||
| 615 | 613 | ||
| 616 | if (ACPI_FAILURE(status)) { | 614 | if (ACPI_FAILURE(status)) { |
| 617 | /* | 615 | /* |
diff --git a/drivers/acpi/acpica/evrgnini.c b/drivers/acpi/acpica/evrgnini.c index 3843f1fc5dbb..75ddd160a716 100644 --- a/drivers/acpi/acpica/evrgnini.c +++ b/drivers/acpi/acpica/evrgnini.c | |||
| @@ -45,6 +45,7 @@ | |||
| 45 | #include "accommon.h" | ||
