diff options
| -rw-r--r-- | Documentation/acpi/method-customizing.txt | 10 | ||||
| -rw-r--r-- | drivers/acpi/acpica/dbnames.c | 1 | ||||
| -rw-r--r-- | drivers/acpi/acpica/dbobject.c | 23 | ||||
| -rw-r--r-- | drivers/acpi/acpica/dsdebug.c | 12 | ||||
| -rw-r--r-- | drivers/acpi/acpica/exconfig.c | 11 | ||||
| -rw-r--r-- | drivers/acpi/acpica/nsdump.c | 3 | ||||
| -rw-r--r-- | drivers/acpi/acpica/psloop.c | 51 | ||||
| -rw-r--r-- | drivers/acpi/acpica/psobject.c | 30 | ||||
| -rw-r--r-- | drivers/acpi/acpica/pswalk.c | 34 | ||||
| -rw-r--r-- | drivers/acpi/acpica/uterror.c | 10 | ||||
| -rw-r--r-- | drivers/acpi/acpica/utosi.c | 1 | ||||
| -rw-r--r-- | include/acpi/acoutput.h | 4 | ||||
| -rw-r--r-- | include/acpi/acpixf.h | 2 | ||||
| -rw-r--r-- | include/acpi/actbl2.h | 25 | ||||
| -rw-r--r-- | include/acpi/actypes.h | 1 |
15 files changed, 192 insertions, 26 deletions
diff --git a/Documentation/acpi/method-customizing.txt b/Documentation/acpi/method-customizing.txt index a3f598e141f2..7235da975f23 100644 --- a/Documentation/acpi/method-customizing.txt +++ b/Documentation/acpi/method-customizing.txt | |||
| @@ -16,7 +16,8 @@ control method rather than override the entire DSDT, because kernel | |||
| 16 | rebuild/reboot is not needed and test result can be got in minutes. | 16 | rebuild/reboot is not needed and test result can be got in minutes. |
| 17 | 17 | ||
| 18 | Note: Only ACPI METHOD can be overridden, any other object types like | 18 | Note: Only ACPI METHOD can be overridden, any other object types like |
| 19 | "Device", "OperationRegion", are not recognized. | 19 | "Device", "OperationRegion", are not recognized. Methods |
| 20 | declared inside scope operators are also not supported. | ||
| 20 | Note: The same ACPI control method can be overridden for many times, | 21 | Note: The same ACPI control method can be overridden for many times, |
| 21 | and it's always the latest one that used by Linux/kernel. | 22 | and it's always the latest one that used by Linux/kernel. |
| 22 | Note: To get the ACPI debug object output (Store (AAAA, Debug)), | 23 | Note: To get the ACPI debug object output (Store (AAAA, Debug)), |
| @@ -32,8 +33,6 @@ Note: To get the ACPI debug object output (Store (AAAA, Debug)), | |||
| 32 | 33 | ||
| 33 | DefinitionBlock ("", "SSDT", 1, "", "", 0x20080715) | 34 | DefinitionBlock ("", "SSDT", 1, "", "", 0x20080715) |
| 34 | { | 35 | { |
| 35 | External (ACON) | ||
| 36 | |||
| 37 | Method (\_SB_.AC._PSR, 0, NotSerialized) | 36 | Method (\_SB_.AC._PSR, 0, NotSerialized) |
| 38 | { | 37 | { |
| 39 | Store ("In AC _PSR", Debug) | 38 | Store ("In AC _PSR", Debug) |
| @@ -42,9 +41,10 @@ Note: To get the ACPI debug object output (Store (AAAA, Debug)), | |||
| 42 | } | 41 | } |
| 43 | Note that the full pathname of the method in ACPI namespace | 42 | Note that the full pathname of the method in ACPI namespace |
| 44 | should be used. | 43 | should be used. |
| 45 | And remember to use "External" to declare external objects. | ||
| 46 | e) assemble the file to generate the AML code of the method. | 44 | e) assemble the file to generate the AML code of the method. |
| 47 | e.g. "iasl psr.asl" (psr.aml is generated as a result) | 45 | e.g. "iasl -vw 6084 psr.asl" (psr.aml is generated as a result) |
| 46 | If parameter "-vw 6084" is not supported by your iASL compiler, | ||
| 47 | please try a newer version. | ||
| 48 | f) mount debugfs by "mount -t debugfs none /sys/kernel/debug" | 48 | f) mount debugfs by "mount -t debugfs none /sys/kernel/debug" |
| 49 | g) override the old method via the debugfs by running | 49 | g) override the old method via the debugfs by running |
| 50 | "cat /tmp/psr.aml > /sys/kernel/debug/acpi/custom_method" | 50 | "cat /tmp/psr.aml > /sys/kernel/debug/acpi/custom_method" |
diff --git a/drivers/acpi/acpica/dbnames.c b/drivers/acpi/acpica/dbnames.c index dc94de91033e..992bd7b92540 100644 --- a/drivers/acpi/acpica/dbnames.c +++ b/drivers/acpi/acpica/dbnames.c | |||
| @@ -322,6 +322,7 @@ acpi_db_walk_and_match_name(acpi_handle obj_handle, | |||
| 322 | acpi_os_printf("Could Not get pathname for object %p\n", | 322 | acpi_os_printf("Could Not get pathname for object %p\n", |
| 323 | obj_handle); | 323 | obj_handle); |
| 324 | } else { | 324 | } else { |
| 325 | info.count = 0; | ||
| 325 | info.owner_id = ACPI_OWNER_ID_MAX; | 326 | info.owner_id = ACPI_OWNER_ID_MAX; |
| 326 | info.debug_level = ACPI_UINT32_MAX; | 327 | info.debug_level = ACPI_UINT32_MAX; |
| 327 | info.display_type = ACPI_DISPLAY_SUMMARY | ACPI_DISPLAY_SHORT; | 328 | info.display_type = ACPI_DISPLAY_SUMMARY | ACPI_DISPLAY_SHORT; |
diff --git a/drivers/acpi/acpica/dbobject.c b/drivers/acpi/acpica/dbobject.c index 58c3253b533a..a1c76bf21122 100644 --- a/drivers/acpi/acpica/dbobject.c +++ b/drivers/acpi/acpica/dbobject.c | |||
| @@ -35,6 +35,15 @@ void | |||
| 35 | acpi_db_dump_method_info(acpi_status status, struct acpi_walk_state *walk_state) | 35 | acpi_db_dump_method_info(acpi_status status, struct acpi_walk_state *walk_state) |
| 36 | { | 36 | { |
| 37 | struct acpi_thread_state *thread; | 37 | struct acpi_thread_state *thread; |
| 38 | struct acpi_namespace_node *node; | ||
| 39 | |||
| 40 | node = walk_state->method_node; | ||
| 41 | |||
| 42 | /* There are no locals or arguments for the module-level code case */ | ||
| 43 | |||
| 44 | if (node == acpi_gbl_root_node) { | ||
| 45 | return; | ||
| 46 | } | ||
| 38 | 47 | ||
| 39 | /* Ignore control codes, they are not errors */ | 48 | /* Ignore control codes, they are not errors */ |
| 40 | 49 | ||
| @@ -384,8 +393,14 @@ void acpi_db_decode_locals(struct acpi_walk_state *walk_state) | |||
| 384 | struct acpi_namespace_node *node; | 393 | struct acpi_namespace_node *node; |
| 385 | u8 display_locals = FALSE; | 394 | u8 display_locals = FALSE; |
| 386 | 395 | ||
| 387 | obj_desc = walk_state->method_desc; | ||
| 388 | node = walk_state->method_node; | 396 | node = walk_state->method_node; |
| 397 | obj_desc = walk_state->method_desc; | ||
| 398 | |||
| 399 | /* There are no locals for the module-level code case */ | ||
| 400 | |||
| 401 | if (node == acpi_gbl_root_node) { | ||
| 402 | return; | ||
| 403 | } | ||
| 389 | 404 | ||
| 390 | if (!node) { | 405 | if (!node) { |
| 391 | acpi_os_printf | 406 | acpi_os_printf |
| @@ -452,6 +467,12 @@ void acpi_db_decode_arguments(struct acpi_walk_state *walk_state) | |||
| 452 | node = walk_state->method_node; | 467 | node = walk_state->method_node; |
| 453 | obj_desc = walk_state->method_desc; | 468 | obj_desc = walk_state->method_desc; |
| 454 | 469 | ||
| 470 | /* There are no arguments for the module-level code case */ | ||
| 471 | |||
| 472 | if (node == acpi_gbl_root_node) { | ||
| 473 | return; | ||
| 474 | } | ||
| 475 | |||
| 455 | if (!node) { | 476 | if (!node) { |
| 456 | acpi_os_printf | 477 | acpi_os_printf |
| 457 | ("No method node (Executing subtree for buffer or opregion)\n"); | 478 | ("No method node (Executing subtree for buffer or opregion)\n"); |
diff --git a/drivers/acpi/acpica/dsdebug.c b/drivers/acpi/acpica/dsdebug.c index 70a2fca60306..9d33f0bb2885 100644 --- a/drivers/acpi/acpica/dsdebug.c +++ b/drivers/acpi/acpica/dsdebug.c | |||
| @@ -162,9 +162,15 @@ acpi_ds_dump_method_stack(acpi_status status, | |||
| 162 | op->common.next = NULL; | 162 | op->common.next = NULL; |
| 163 | 163 | ||
| 164 | #ifdef ACPI_DISASSEMBLER | 164 | #ifdef ACPI_DISASSEMBLER |
| 165 | acpi_os_printf("Failed at "); | 165 | if (walk_state->method_node != |
| 166 | acpi_dm_disassemble(next_walk_state, op, | 166 | acpi_gbl_root_node) { |
| 167 | ACPI_UINT32_MAX); | 167 | |
| 168 | /* More verbose if not module-level code */ | ||
| 169 | |||
| 170 | acpi_os_printf("Failed at "); | ||
| 171 | acpi_dm_disassemble(next_walk_state, op, | ||
| 172 | ACPI_UINT32_MAX); | ||
| 173 | } | ||
| 168 | #endif | 174 | #endif |
| 169 | op->common.next = next; | 175 | op->common.next = next; |
| 170 | } | 176 | } |
diff --git a/drivers/acpi/acpica/exconfig.c b/drivers/acpi/acpica/exconfig.c index f85c6f3271f6..2373a7492151 100644 --- a/drivers/acpi/acpica/exconfig.c +++ b/drivers/acpi/acpica/exconfig.c | |||
| @@ -490,6 +490,17 @@ acpi_status acpi_ex_unload_table(union acpi_operand_object *ddb_handle) | |||
| 490 | ACPI_WARNING((AE_INFO, "Received request to unload an ACPI table")); | 490 | ACPI_WARNING((AE_INFO, "Received request to unload an ACPI table")); |
| 491 | 491 | ||
| 492 | /* | 492 | /* |
| 493 | * May 2018: Unload is no longer supported for the following reasons: | ||
| 494 | * 1) A correct implementation on some hosts may not be possible. | ||
| 495 | * 2) Other ACPI implementations do not correctly/fully support it. | ||
| 496 | * 3) It requires host device driver support which does not exist. | ||
| 497 | * (To properly support namespace unload out from underneath.) | ||
| 498 | * 4) This AML operator has never been seen in the field. | ||
| 499 | */ | ||
| 500 | ACPI_EXCEPTION((AE_INFO, AE_NOT_IMPLEMENTED, | ||
| 501 | "AML Unload operator is not supported")); | ||
| 502 | |||
| 503 | /* | ||
| 493 | * Validate the handle | 504 | * Validate the handle |
| 494 | * Although the handle is partially validated in acpi_ex_reconfiguration() | 505 | * Although the handle is partially validated in acpi_ex_reconfiguration() |
| 495 | * when it calls acpi_ex_resolve_operands(), the handle is more completely | 506 | * when it calls acpi_ex_resolve_operands(), the handle is more completely |
diff --git a/drivers/acpi/acpica/nsdump.c b/drivers/acpi/acpica/nsdump.c index 4bdbd1d8431b..90ccffcd770b 100644 --- a/drivers/acpi/acpica/nsdump.c +++ b/drivers/acpi/acpica/nsdump.c | |||
| @@ -170,6 +170,7 @@ acpi_ns_dump_one_object(acpi_handle obj_handle, | |||
| 170 | } | 170 | } |
| 171 | 171 | ||
| 172 | type = this_node->type; | 172 | type = this_node->type; |
| 173 | info->count++; | ||
| 173 | 174 | ||
| 174 | /* Check if the owner matches */ | 175 | /* Check if the owner matches */ |
| 175 | 176 | ||
| @@ -639,6 +640,7 @@ acpi_ns_dump_objects(acpi_object_type type, | |||
| 639 | return; | 640 | return; |
| 640 | } | 641 | } |
| 641 | 642 | ||
| 643 | info.count = 0; | ||
| 642 | info.debug_level = ACPI_LV_TABLES; | 644 | info.debug_level = ACPI_LV_TABLES; |
| 643 | info.owner_id = owner_id; | 645 | info.owner_id = owner_id; |
| 644 | info.display_type = display_type; | 646 | info.display_type = display_type; |
| @@ -649,6 +651,7 @@ acpi_ns_dump_objects(acpi_object_type type, | |||
| 649 | acpi_ns_dump_one_object, NULL, | 651 | acpi_ns_dump_one_object, NULL, |
| 650 | (void *)&info, NULL); | 652 | (void *)&info, NULL); |
| 651 | 653 | ||
| 654 | acpi_os_printf("\nNamespace node count: %u\n\n", info.count); | ||
| 652 | (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); | 655 | (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); |
| 653 | } | 656 | } |
| 654 | 657 | ||
diff --git a/drivers/acpi/acpica/psloop.c b/drivers/acpi/acpica/psloop.c index 68422afc365f..bc5f05906bd1 100644 --- a/drivers/acpi/acpica/psloop.c +++ b/drivers/acpi/acpica/psloop.c | |||
| @@ -515,6 +515,22 @@ acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state) | |||
| 515 | if (ACPI_FAILURE(status)) { | 515 | if (ACPI_FAILURE(status)) { |
| 516 | return_ACPI_STATUS(status); | 516 | return_ACPI_STATUS(status); |
| 517 | } | 517 | } |
| 518 | if (walk_state->opcode == AML_SCOPE_OP) { | ||
| 519 | /* | ||
| 520 | * If the scope op fails to parse, skip the body of the | ||
| 521 | * scope op because the parse failure indicates that the | ||
| 522 | * device may not exist. | ||
| 523 | */ | ||
| 524 | walk_state->parser_state.aml = | ||
| 525 | walk_state->aml + 1; | ||
| 526 | walk_state->parser_state.aml = | ||
| 527 | acpi_ps_get_next_package_end | ||
| 528 | (&walk_state->parser_state); | ||
| 529 | walk_state->aml = | ||
| 530 | walk_state->parser_state.aml; | ||
| 531 | ACPI_ERROR((AE_INFO, | ||
| 532 | "Skipping Scope block")); | ||
| 533 | } | ||
| 518 | 534 | ||
| 519 | continue; | 535 | continue; |
| 520 | } | 536 | } |
| @@ -557,7 +573,40 @@ acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state) | |||
| 557 | if (ACPI_FAILURE(status)) { | 573 | if (ACPI_FAILURE(status)) { |
| 558 | return_ACPI_STATUS(status); | 574 | return_ACPI_STATUS(status); |
| 559 | } | 575 | } |
| 560 | 576 | if ((walk_state->control_state) && | |
| 577 | ((walk_state->control_state->control. | ||
| 578 | opcode == AML_IF_OP) | ||
| 579 | || (walk_state->control_state->control. | ||
| 580 | opcode == AML_WHILE_OP))) { | ||
| 581 | /* | ||
| 582 | * If the if/while op fails to parse, we will skip parsing | ||
| 583 | * the body of the op. | ||
| 584 | */ | ||
| 585 | parser_state->aml = | ||
| 586 | walk_state->control_state->control. | ||
| 587 | aml_predicate_start + 1; | ||
| 588 | parser_state->aml = | ||
| 589 | acpi_ps_get_next_package_end | ||
| 590 | (parser_state); | ||
| 591 | walk_state->aml = parser_state->aml; | ||
| 592 | |||
| 593 | ACPI_ERROR((AE_INFO, | ||
| 594 | "Skipping While/If block")); | ||
| 595 | if (*walk_state->aml == AML_ELSE_OP) { | ||
| 596 | ACPI_ERROR((AE_INFO, | ||
| 597 | "Skipping Else block")); | ||
| 598 | walk_state->parser_state.aml = | ||
| 599 | walk_state->aml + 1; | ||
| 600 | walk_state->parser_state.aml = | ||
| 601 | acpi_ps_get_next_package_end | ||
| 602 | (parser_state); | ||
| 603 | walk_state->aml = | ||
| 604 | parser_state->aml; | ||
| 605 | } | ||
| 606 | ACPI_FREE(acpi_ut_pop_generic_state | ||
| 607 | (&walk_state->control_state)); | ||
| 608 | } | ||
| 609 | op = NULL; | ||
| 561 | continue; | 610 | continue; |
| 562 | } | 611 | } |
| 563 | } | 612 | } |
diff --git a/drivers/acpi/acpica/psobject.c b/drivers/acpi/acpica/psobject.c index 7d9d0151ee54..3138e7a00da8 100644 --- a/drivers/acpi/acpica/psobject.c +++ b/drivers/acpi/acpica/psobject.c | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | #include "acparser.h" | 12 | #include "acparser.h" |
| 13 | #include "amlcode.h" | 13 | #include "amlcode.h" |
| 14 | #include "acconvert.h" | 14 | #include "acconvert.h" |
| 15 | #include "acnamesp.h" | ||
| 15 | 16 | ||
| 16 | #define _COMPONENT ACPI_PARSER | 17 | #define _COMPONENT ACPI_PARSER |
| 17 | ACPI_MODULE_NAME("psobject") | 18 | ACPI_MODULE_NAME("psobject") |
| @@ -549,6 +550,21 @@ acpi_ps_complete_op(struct acpi_walk_state *walk_state, | |||
| 549 | 550 | ||
| 550 | do { | 551 | do { |
| 551 | if (*op) { | 552 | if (*op) { |
| 553 | /* | ||
| 554 | * These Opcodes need to be removed from the namespace because they | ||
| 555 | * get created even if these opcodes cannot be created due to | ||
| 556 | * errors. | ||
| 557 | */ | ||
| 558 | if (((*op)->common.aml_opcode == AML_REGION_OP) | ||
| 559 | || ((*op)->common.aml_opcode == | ||
| 560 | AML_DATA_REGION_OP)) { | ||
| 561 | acpi_ns_delete_children((*op)->common. | ||
| 562 | node); | ||
| 563 | acpi_ns_remove_node((*op)->common.node); | ||
| 564 | (*op)->common.node = NULL; | ||
| 565 | acpi_ps_delete_parse_tree(*op); | ||
| 566 | } | ||
| 567 | |||
| 552 | status2 = | 568 | status2 = |
| 553 | acpi_ps_complete_this_op(walk_state, *op); | 569 | acpi_ps_complete_this_op(walk_state, *op); |
| 554 | if (ACPI_FAILURE(status2)) { | 570 | if (ACPI_FAILURE(status2)) { |
| @@ -574,6 +590,20 @@ acpi_ps_complete_op(struct acpi_walk_state *walk_state, | |||
| 574 | #endif | 590 | #endif |
| 575 | walk_state->prev_op = NULL; | 591 | walk_state->prev_op = NULL; |
| 576 | walk_state->prev_arg_types = walk_state->arg_types; | 592 | walk_state->prev_arg_types = walk_state->arg_types; |
| 593 | |||
| 594 | if (walk_state->parse_flags & ACPI_PARSE_MODULE_LEVEL) { | ||
| 595 | /* | ||
| 596 | * There was something that went wrong while executing code at the | ||
| 597 | * module-level. We need to skip parsing whatever caused the | ||
| 598 | * error and keep going. One runtime error during the table load | ||
| 599 | * should not cause the entire table to not be loaded. This is | ||
| 600 | * because there could be correct AML beyond the parts that caused | ||
| 601 | * the runtime error. | ||
| 602 | */ | ||
| 603 | ACPI_ERROR((AE_INFO, | ||
| 604 | "Ignore error and continue table load")); | ||
| 605 | return_ACPI_STATUS(AE_OK); | ||
| 606 | } | ||
| 577 | return_ACPI_STATUS(status); | 607 | return_ACPI_STATUS(status); |
| 578 | } | 608 | } |
| 579 | 609 | ||
diff --git a/drivers/acpi/acpica/pswalk.c b/drivers/acpi/acpica/pswalk.c index e0a442b8648b..bd6af8c87d48 100644 --- a/drivers/acpi/acpica/pswalk.c +++ b/drivers/acpi/acpica/pswalk.c | |||
| @@ -25,22 +25,48 @@ ACPI_MODULE_NAME("pswalk") | |||
| 25 | * DESCRIPTION: Delete a portion of or an entire parse tree. | 25 | * DESCRIPTION: Delete a portion of or an entire parse tree. |
| 26 | * | 26 | * |
| 27 | ******************************************************************************/ | 27 | ******************************************************************************/ |
| 28 | #include "amlcode.h" | ||
| 28 | void acpi_ps_delete_parse_tree(union acpi_parse_object *subtree_root) | 29 | void acpi_ps_delete_parse_tree(union acpi_parse_object *subtree_root) |
| 29 | { | 30 | { |
| 30 | union acpi_parse_object *op = subtree_root; | 31 | union acpi_parse_object *op = subtree_root; |
| 31 | union acpi_parse_object *next = NULL; | 32 | union acpi_parse_object *next = NULL; |
| 32 | union acpi_parse_object *parent = NULL; | 33 | union acpi_parse_object *parent = NULL; |
| 34 | u32 level = 0; | ||
| 33 | 35 | ||
| 34 | ACPI_FUNCTION_TRACE_PTR(ps_delete_parse_tree, subtree_root); | 36 | ACPI_FUNCTION_TRACE_PTR(ps_delete_parse_tree, subtree_root); |
| 35 | 37 | ||
| 38 | ACPI_DEBUG_PRINT((ACPI_DB_PARSE_TREES, " root %p\n", subtree_root)); | ||
| 39 | |||
| 36 | /* Visit all nodes in the subtree */ | 40 | /* Visit all nodes in the subtree */ |
| 37 | 41 | ||
| 38 | while (op) { | 42 | while (op) { |
| 39 | |||
| 40 | /* Check if we are not ascending */ | ||
| 41 | |||
| 42 | if (op != parent) { | 43 | if (op != parent) { |
| 43 | 44 | ||
| 45 | /* This is the descending case */ | ||
| 46 | |||
| 47 | if (ACPI_IS_DEBUG_ENABLED | ||
| 48 | (ACPI_LV_PARSE_TREES, _COMPONENT)) { | ||
| 49 | |||
| 50 | /* This debug option will print the entire parse tree */ | ||
| 51 | |||
| 52 | acpi_os_printf(" %*.s%s %p", (level * 4), | ||
| 53 | " ", | ||
| 54 | acpi_ps_get_opcode_name(op-> | ||
| 55 | common. | ||
| 56 | aml_opcode), | ||
| 57 | op); | ||
| 58 | |||
| 59 | if (op->named.aml_opcode == AML_INT_NAMEPATH_OP) { | ||
| 60 | acpi_os_printf(" %4.4s", | ||
| 61 | op->common.value.string); | ||
| 62 | } | ||
| 63 | if (op->named.aml_opcode == AML_STRING_OP) { | ||
| 64 | acpi_os_printf(" %s", | ||
| 65 | op->common.value.string); | ||
| 66 | } | ||
| 67 | acpi_os_printf("\n"); | ||
| 68 | } | ||
| 69 | |||
| 44 | /* Look for an argument or child of the current op */ | 70 | /* Look for an argument or child of the current op */ |
| 45 | 71 | ||
| 46 | next = acpi_ps_get_arg(op, 0); | 72 | next = acpi_ps_get_arg(op, 0); |
| @@ -49,6 +75,7 @@ void acpi_ps_delete_parse_tree(union acpi_parse_object *subtree_root) | |||
| 49 | /* Still going downward in tree (Op is not completed yet) */ | 75 | /* Still going downward in tree (Op is not completed yet) */ |
| 50 | 76 | ||
| 51 | op = next; | 77 | op = next; |
| 78 | level++; | ||
| 52 | continue; | 79 | continue; |
| 53 | } | 80 | } |
| 54 | } | 81 | } |
| @@ -69,6 +96,7 @@ void acpi_ps_delete_parse_tree(union acpi_parse_object *subtree_root) | |||
| 69 | if (next) { | 96 | if (next) { |
| 70 | op = next; | 97 | op = next; |
| 71 | } else { | 98 | } else { |
| 99 | level--; | ||
| 72 | op = parent; | 100 | op = parent; |
| 73 | } | 101 | } |
| 74 | } | 102 | } |
diff --git a/drivers/acpi/acpica/uterror.c b/drivers/acpi/acpica/uterror.c index 12d4a0f6b8d2..5a64ddaed8a3 100644 --- a/drivers/acpi/acpica/uterror.c +++ b/drivers/acpi/acpica/uterror.c | |||
| @@ -182,20 +182,20 @@ acpi_ut_prefixed_namespace_error(const char *module_name, | |||
| 182 | switch (lookup_status) { | 182 | switch (lookup_status) { |
| 183 | case AE_ALREADY_EXISTS: | 183 | case AE_ALREADY_EXISTS: |
| 184 | 184 | ||
| 185 | acpi_os_printf(ACPI_MSG_BIOS_ERROR); | 185 | acpi_os_printf("\n" ACPI_MSG_BIOS_ERROR); |
| 186 | message = "Failure creating"; | 186 | message = "Failure creating"; |
| 187 | break; | 187 | break; |
| 188 | 188 | ||
| 189 | case AE_NOT_FOUND: | 189 | case AE_NOT_FOUND: |
| 190 | 190 | ||
| 191 | acpi_os_printf(ACPI_MSG_BIOS_ERROR); | 191 | acpi_os_printf("\n" ACPI_MSG_BIOS_ERROR); |
| 192 | message = "Failure looking up"; | 192 | message = "Could not resolve"; |
| 193 | break; | 193 | break; |
| 194 | 194 | ||
| 195 | default: | 195 | default: |
| 196 | 196 | ||
| 197 | acpi_os_printf(ACPI_MSG_ERROR); | 197 | acpi_os_printf("\n" ACPI_MSG_ERROR); |
| 198 | message = "Failure looking up"; | 198 | message = "Failure resolving"; |
| 199 | break; | 199 | break; |
| 200 | } | 200 | } |
| 201 | 201 | ||
diff --git a/drivers/acpi/acpica/utosi.c b/drivers/acpi/acpica/utosi.c index 1b415fa90cf8..64b63c81994b 100644 --- a/drivers/acpi/acpica/utosi.c +++ b/drivers/acpi/acpica/utosi.c | |||
| @@ -69,6 +69,7 @@ static struct acpi_interface_info acpi_default_supported_interfaces[] = { | |||
| 69 | {"Windows 2015", NULL, 0, ACPI_OSI_WIN_10}, /* Windows 10 - Added 03/2015 */ | 69 | {"Windows 2015", NULL, 0, ACPI_OSI_WIN_10}, /* Windows 10 - Added 03/2015 */ |
| 70 | {"Windows 2016", NULL, 0, ACPI_OSI_WIN_10_RS1}, /* Windows 10 version 1607 - Added 12/2017 */ | 70 | {"Windows 2016", NULL, 0, ACPI_OSI_WIN_10_RS1}, /* Windows 10 version 1607 - Added 12/2017 */ |
| 71 | {"Windows 2017", NULL, 0, ACPI_OSI_WIN_10_RS2}, /* Windows 10 version 1703 - Added 12/2017 */ | 71 | {"Windows 2017", NULL, 0, ACPI_OSI_WIN_10_RS2}, /* Windows 10 version 1703 - Added 12/2017 */ |
| 72 | {"Windows 2017.2", NULL, 0, ACPI_OSI_WIN_10_RS3}, /* Windows 10 version 1709 - Added 02/2018 */ | ||
| 72 | 73 | ||
| 73 | /* Feature Group Strings */ | 74 | /* Feature Group Strings */ |
| 74 | 75 | ||
diff --git a/include/acpi/acoutput.h b/include/acpi/acoutput.h index 0a6c5bd92256..3a26aa7ead23 100644 --- a/include/acpi/acoutput.h +++ b/include/acpi/acoutput.h | |||
| @@ -80,7 +80,8 @@ | |||
| 80 | #define ACPI_LV_ALLOCATIONS 0x00100000 | 80 | #define ACPI_LV_ALLOCATIONS 0x00100000 |
| 81 | #define ACPI_LV_FUNCTIONS 0x00200000 | 81 | #define ACPI_LV_FUNCTIONS 0x00200000 |
| 82 | #define ACPI_LV_OPTIMIZATIONS 0x00400000 | 82 | #define ACPI_LV_OPTIMIZATIONS 0x00400000 |
| 83 | #define ACPI_LV_VERBOSITY2 0x00700000 | ACPI_LV_VERBOSITY1 | 83 | #define ACPI_LV_PARSE_TREES 0x00800000 |
| 84 | #define ACPI_LV_VERBOSITY2 0x00F00000 | ACPI_LV_VERBOSITY1 | ||
| 84 | #define ACPI_LV_ALL ACPI_LV_VERBOSITY2 | 85 | #define ACPI_LV_ALL ACPI_LV_VERBOSITY2 |
| 85 | 86 | ||
| 86 | /* Trace verbosity level 3 [Threading, I/O, and Interrupts] */ | 87 | /* Trace verbosity level 3 [Threading, I/O, and Interrupts] */ |
| @@ -131,6 +132,7 @@ | |||
| 131 | #define ACPI_DB_TABLES ACPI_DEBUG_LEVEL (ACPI_LV_TABLES) | 132 | #define ACPI_DB_TABLES ACPI_DEBUG_LEVEL (ACPI_LV_TABLES) |
| 132 | #define ACPI_DB_FUNCTIONS ACPI_DEBUG_LEVEL (ACPI_LV_FUNCTIONS) | 133 | #define ACPI_DB_FUNCTIONS ACPI_DEBUG_LEVEL (ACPI_LV_FUNCTIONS) |
| 133 | #define ACPI_DB_OPTIMIZATIONS ACPI_DEBUG_LEVEL (ACPI_LV_OPTIMIZATIONS) | 134 | #define ACPI_DB_OPTIMIZATIONS ACPI_DEBUG_LEVEL (ACPI_LV_OPTIMIZATIONS) |
| 135 | #define ACPI_DB_PARSE_TREES ACPI_DEBUG_LEVEL (ACPI_LV_PARSE_TREES) | ||
| 134 | #define ACPI_DB_VALUES ACPI_DEBUG_LEVEL (ACPI_LV_VALUES) | 136 | #define ACPI_DB_VALUES ACPI_DEBUG_LEVEL (ACPI_LV_VALUES) |
| 135 | #define ACPI_DB_OBJECTS ACPI_DEBUG_LEVEL (ACPI_LV_OBJECTS) | 137 | #define ACPI_DB_OBJECTS ACPI_DEBUG_LEVEL (ACPI_LV_OBJECTS) |
| 136 | #define ACPI_DB_ALLOCATIONS ACPI_DEBUG_LEVEL (ACPI_LV_ALLOCATIONS) | 138 | #define ACPI_DB_ALLOCATIONS ACPI_DEBUG_LEVEL (ACPI_LV_ALLOCATIONS) |
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index 77d71bd1be39..48d84f0d9547 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h | |||
| @@ -12,7 +12,7 @@ | |||
| 12 | 12 | ||
| 13 | /* Current ACPICA subsystem version in YYYYMMDD format */ | 13 | /* Current ACPICA subsystem version in YYYYMMDD format */ |
| 14 | 14 | ||
| 15 | #define ACPI_CA_VERSION 0x20180508 | 15 | #define ACPI_CA_VERSION 0x20180531 |
| 16 | 16 | ||
| 17 | #include <acpi/acconfig.h> | 17 | #include <acpi/acconfig.h> |
| 18 | #include <acpi/actypes.h> | 18 | #include <acpi/actypes.h> |
diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h index 876012da8e6e..c50ef7e6b942 100644 --- a/include/acpi/actbl2.h +++ b/include/acpi/actbl2.h | |||
| @@ -67,7 +67,7 @@ | |||
| 67 | * IORT - IO Remapping Table | 67 | * IORT - IO Remapping Table |
| 68 | * | 68 | * |
| 69 | * Conforms to "IO Remapping Table System Software on ARM Platforms", | 69 | * Conforms to "IO Remapping Table System Software on ARM Platforms", |
| 70 | * Document number: ARM DEN 0049C, May 2017 | 70 | * Document number: ARM DEN 0049D, March 2018 |
| 71 | * | 71 | * |
| 72 | ******************************************************************************/ | 72 | ******************************************************************************/ |
| 73 | 73 | ||
| @@ -98,7 +98,8 @@ enum acpi_iort_node_type { | |||
| 98 | ACPI_IORT_NODE_NAMED_COMPONENT = 0x01, | 98 | ACPI_IORT_NODE_NAMED_COMPONENT = 0x01, |
| 99 | ACPI_IORT_NODE_PCI_ROOT_COMPLEX = 0x02, | 99 | ACPI_IORT_NODE_PCI_ROOT_COMPLEX = 0x02, |
| 100 | ACPI_IORT_NODE_SMMU = 0x03, | 100 | ACPI_IORT_NODE_SMMU = 0x03, |
| 101 | ACPI_IORT_NODE_SMMU_V3 = 0x04 | 101 | ACPI_IORT_NODE_SMMU_V3 = 0x04, |
| 102 | ACPI_IORT_NODE_PMCG = 0x05 | ||
| 102 | }; | 103 | }; |
| 103 | 104 | ||
| 104 | struct acpi_iort_id_mapping { | 105 | struct acpi_iort_id_mapping { |
| @@ -152,10 +153,17 @@ struct acpi_iort_named_component { | |||
| 152 | char device_name[1]; /* Path of namespace object */ | 153 | char device_name[1]; /* Path of namespace object */ |
| 153 | }; | 154 | }; |
| 154 | 155 | ||
| 156 | /* Masks for Flags field above */ | ||
| 157 | |||
| 158 | #define ACPI_IORT_NC_STALL_SUPPORTED (1) | ||
| 159 | #define ACPI_IORT_NC_PASID_BITS (31<<1) | ||
| 160 | |||
| 155 | struct acpi_iort_root_complex { | 161 | struct acpi_iort_root_complex { |
| 156 | u64 memory_properties; /* Memory access properties */ | 162 | u64 memory_properties; /* Memory access properties */ |
| 157 | u32 ats_attribute; | 163 | u32 ats_attribute; |
| 158 | u32 pci_segment_number; | 164 | u32 pci_segment_number; |
| 165 | u8 memory_address_limit; /* Memory address size limit */ | ||
| 166 | u8 reserved[3]; /* Reserved, must be zero */ | ||
| 159 | }; | 167 | }; |
| 160 | 168 | ||
| 161 | /* Values for ats_attribute field above */ | 169 | /* Values for ats_attribute field above */ |
| @@ -209,9 +217,7 @@ struct acpi_iort_smmu_v3 { | |||
| 209 | u32 pri_gsiv; | 217 | u32 pri_gsiv; |
| 210 | u32 gerr_gsiv; | 218 | u32 gerr_gsiv; |
| 211 | u32 sync_gsiv; | 219 | u32 sync_gsiv; |
| 212 | u8 pxm; | 220 | u32 pxm; |
| 213 | u8 reserved1; | ||
| 214 | u16 reserved2; | ||
| 215 | u32 id_mapping_index; | 221 | u32 id_mapping_index; |
| 216 | }; | 222 | }; |
| 217 | 223 | ||
| @@ -224,9 +230,16 @@ struct acpi_iort_smmu_v3 { | |||
| 224 | /* Masks for Flags field above */ | 230 | /* Masks for Flags field above */ |
| 225 | 231 | ||
| 226 | #define ACPI_IORT_SMMU_V3_COHACC_OVERRIDE (1) | 232 | #define ACPI_IORT_SMMU_V3_COHACC_OVERRIDE (1) |
| 227 | #define ACPI_IORT_SMMU_V3_HTTU_OVERRIDE (1<<1) | 233 | #define ACPI_IORT_SMMU_V3_HTTU_OVERRIDE (3<<1) |
| 228 | #define ACPI_IORT_SMMU_V3_PXM_VALID (1<<3) | 234 | #define ACPI_IORT_SMMU_V3_PXM_VALID (1<<3) |
| 229 | 235 | ||
| 236 | struct acpi_iort_pmcg { | ||
| 237 | u64 page0_base_address; | ||
| 238 | u32 overflow_gsiv; | ||
| 239 | u32 node_reference; | ||
| 240 | u64 page1_base_address; | ||
| 241 | }; | ||
| 242 | |||
| 230 | /******************************************************************************* | 243 | /******************************************************************************* |
| 231 | * | 244 | * |
| 232 | * IVRS - I/O Virtualization Reporting Structure | 245 | * IVRS - I/O Virtualization Reporting Structure |
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index 2b1bafa197c0..66ceb12ebc63 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h | |||
| @@ -1272,6 +1272,7 @@ typedef enum { | |||
| 1272 | #define ACPI_OSI_WIN_10 0x0D | 1272 | #define ACPI_OSI_WIN_10 0x0D |
| 1273 | #define ACPI_OSI_WIN_10_RS1 0x0E | 1273 | #define ACPI_OSI_WIN_10_RS1 0x0E |
| 1274 | #define ACPI_OSI_WIN_10_RS2 0x0F | 1274 | #define ACPI_OSI_WIN_10_RS2 0x0F |
| 1275 | #define ACPI_OSI_WIN_10_RS3 0x10 | ||
| 1275 | 1276 | ||
| 1276 | /* Definitions of getopt */ | 1277 | /* Definitions of getopt */ |
| 1277 | 1278 | ||
