ACPICA release 20171110
Subsystems (2)
cover ACPICA release 20171110
This series comes from the 20171110 release of ACPICA. This set of patches is meant to be applied on top of the 20170929 release of ACPICA.
Bob Moore (10):
ACPICA: Use local 64-bit divide support for string conversions
ACPICA: Update output from ACPI_EXCEPTION macro
ACPICA: Add an additional error message for EC timeouts
ACPICA: Enhance error messages from namespace create/lookup operations
ACPICA: ACPI 6.0A: Changes to the NFIT ACPI table
ACPICA: Small typo fix, no functional change.
ACPICA: Debugger: add "background" command for method execution
ACPICA: Update mutex error messages, no functional change
ACPICA: Update linkage for get mutex name interface
ACPICA: Update version to 20171110
Colin Ian King (1):
ACPICA: Trivial fix to spelling mistake in comment
Erik Schmauss (2):
ACPICA: ACPICA: style edits to utility function output, no functional
change
ACPICA: Namespace: fix memory leak from building prefixed pathname
Hanjun Guo (1):
ACPICA: iasl: Add SMMUv3 device ID mapping index support
Jeremy Linton (1):
ACPICA: ACPI 6.2: Additional PPTT flags
drivers/acpi/acpica/acdebug.h | 4 ++ drivers/acpi/acpica/aclocal.h | 13 ++-- drivers/acpi/acpica/acmacros.h | 2 +- drivers/acpi/acpica/acnamesp.h | 3 + drivers/acpi/acpica/acutils.h | 19 +++-- drivers/acpi/acpica/dbexec.c | 110 ++++++++++++++++++++++++++++- drivers/acpi/acpica/dbinput.c | 145 +++++++++++++++++++++---------------- drivers/acpi/acpica/dsfield.c | 28 +++++--- drivers/acpi/acpica/dsobject.c | 4 +- drivers/acpi/acpica/dsutils.c | 3 +- drivers/acpi/acpica/dswload.c | 6 +- drivers/acpi/acpica/dswload2.c | 13 ++-- drivers/acpi/acpica/evregion.c | 10 +++ drivers/acpi/acpica/nsconvert.c | 3 +- drivers/acpi/acpica/nsnames.c | 149 +++++++++++++++++++++++++++++++++++++++ drivers/acpi/acpica/psargs.c | 2 +- drivers/acpi/acpica/utdecode.c | 11 +-- drivers/acpi/acpica/uterror.c | 73 +++++++++++++++++++ drivers/acpi/acpica/utmutex.c | 9 +-- drivers/acpi/acpica/utstrsuppt.c | 35 +++++---- drivers/acpi/acpica/uttrack.c | 2 +- drivers/acpi/acpica/utxferror.c | 8 +-- include/acpi/acpixf.h | 2 +- include/acpi/actbl1.h | 84 +++++++++++++++++++++- include/acpi/actbl2.h | 1 + 25 files changed, 611 insertions(+), 128 deletions(-)
Signature · 1 line
2.13.6
PATCH 1/15 ACPICA: Use local 64-bit divide support for string conversions
From: Bob Moore <[email protected]>
ACPICA commit f230f4df26d07b97ef00be39156ecee64250447d
On 32-bit platforms, 64-bit divide often requires a library function which may not be present in the build.
--- drivers/acpi/acpica/utstrsuppt.c | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-)
drivers/acpi/acpica/utstrsuppt.c +21 -14
@@ -52,10 +52,9 @@ static acpi_status acpi_ut_insert_digit(u64 *accumulated_value, u32 base, int ascii_digit);static acpi_status -acpi_ut_strtoul_multiply64 (u64 multiplicand,u64 multiplier,u64 *out_product); +acpi_ut_strtoul_multiply64 (u64 multiplicand,u32 base,u64 *out_product); -static acpi_status -acpi_ut_strtoul_add64 (u64 addend1,u64 addend2,u64 *out_sum); +static acpi_status acpi_ut_strtoul_add64 (u64 addend1,u32 digit,u64 *out_sum);/******************************************************************************* *
@@ -357,7 +356,7 @@ acpi_ut_insert_digit(u64 *accumulated_value, u32 base, int ascii_digit)* FUNCTION: acpi_ut_strtoul_multiply64 * * PARAMETERS: multiplicand - Current accumulated converted integer -* multiplier - Base/Radix +* base - Base/Radix * out_product - Where the product is returned * * RETURN: Status and 64-bit product
@@ -369,24 +368,32 @@ acpi_ut_insert_digit(u64 *accumulated_value, u32 base, int ascii_digit)******************************************************************************/ static acpi_status -acpi_ut_strtoul_multiply64 (u64 multiplicand,u64 multiplier,u64 *out_product) +acpi_ut_strtoul_multiply64 (u64 multiplicand,u32 base,u64 *out_product) {u64 product; +u64 quotient;/* Exit if either operand is zero */ *out_product =0 ; -if (!multiplicand || !multiplier) { +if (!multiplicand || !base) {return (AE_OK ); } -/* Check for 64-bit overflow before the actual multiplication */ - -if (multiplicand > (ACPI_UINT64_MAX / multiplier)) { +/* +* Check for 64-bit overflow before the actual multiplication. +* +* Notes: 64-bit division is often not supported on 32-bit platforms +* (it requires a library function), Therefore ACPICA has a local +* 64-bit divide function. Also, Multiplier is currently only used +* as the radix (8/10/16), to the 64/32 divide will always work. +*/ +acpi_ut_short_divide (ACPI_UINT64_MAX , base, "ient,NULL ); +if (multiplicand > quotient) {return (AE_NUMERIC_OVERFLOW ); } - product = multiplicand * multiplier; + product = multiplicand * base;/* Check for 32-bit overflow if necessary */
@@ -403,7 +410,7 @@ acpi_ut_strtoul_multiply64(u64 multiplicand, u64 multiplier, u64 *out_product)* FUNCTION: acpi_ut_strtoul_add64 * * PARAMETERS: addend1 - Current accumulated converted integer -* addend2 - New hex value/char +* digit - New hex value/char * out_sum - Where sum is returned (Accumulator) * * RETURN: Status and 64-bit sum
@@ -414,17 +421,17 @@ acpi_ut_strtoul_multiply64(u64 multiplicand, u64 multiplier, u64 *out_product)* ******************************************************************************/ -static acpi_status acpi_ut_strtoul_add64 (u64 addend1,u64 addend2,u64 *out_sum) +static acpi_status acpi_ut_strtoul_add64 (u64 addend1,u32 digit,u64 *out_sum) {u64 sum;/* Check for 64-bit overflow before the actual addition */ -if ((addend1 >0 ) && (addend2 > (ACPI_UINT64_MAX - addend1))) { +if ((addend1 >0 ) && (digit > (ACPI_UINT64_MAX - addend1))) {return (AE_NUMERIC_OVERFLOW ); } - sum = addend1 + addend2; + sum = addend1 + digit;/* Check for 32-bit overflow if necessary */
Signature · 1 line
2.13.6
PATCH 2/15 ACPICA: Update output from ACPI_EXCEPTION macro
In reply to Erik SchmaussFrom: Bob Moore <[email protected]>
ACPICA commit b2858b2cc83e1481950a2c976f62d4e1d758bc85
Changes line prefix from "ACPI Exception" to simply "ACPI Error" to match the ACPI_ERROR macro. ACPI_EXCEPTION takes the ACPI status as an argument, decodes and displays it along with the error message.
--- drivers/acpi/acpica/acutils.h | 3 --- drivers/acpi/acpica/utxferror.c | 8 ++++---- 2 files changed, 4 insertions(+), 7 deletions(-)
drivers/acpi/acpica/acutils.h +0 -3
@@ -118,9 +118,6 @@ extern const char *acpi_gbl_ptyp_decode[];#ifndef ACPI_MSG_ERROR #define ACPI_MSG_ERROR "ACPI Error: "#endif -#ifndef ACPI_MSG_EXCEPTION -#define ACPI_MSG_EXCEPTION "ACPI Exception: " -#endif #ifndef ACPI_MSG_WARNING #define ACPI_MSG_WARNING "ACPI Warning: "#endif
drivers/acpi/acpica/utxferror.c +4 -4
@@ -96,8 +96,8 @@ ACPI_EXPORT_SYMBOL(acpi_error)* * RETURN: None * -* DESCRIPTION: Print "ACPI Exception" message with module/line/version info -* and decoded acpi_status. +* DESCRIPTION: Print an "ACPI Error" message with module/line/version +* info as well as decoded acpi_status. * ******************************************************************************/ void ACPI_INTERNAL_VAR_XFACE
@@ -111,10 +111,10 @@ acpi_exception(const char *module_name,/* For AE_OK, just print the message */ if (ACPI_SUCCESS (status)) { -acpi_os_printf (ACPI_MSG_EXCEPTION ); +acpi_os_printf (ACPI_MSG_ERROR ); }else { -acpi_os_printf (ACPI_MSG_EXCEPTION "%s, " , +acpi_os_printf (ACPI_MSG_ERROR "%s, " ,acpi_format_exception (status)); }
Signature · 1 line
2.13.6
PATCH 3/15 ACPICA: Add an additional error message for EC timeouts
In reply to Erik SchmaussFrom: Bob Moore <[email protected]>
ACPICA commit 24dd370b14711b7b3f31d7ca6326f9e0bd177c4e
AE_TIME is seen to be returned from the EC driver/handler so often that an additional error message is added to help clarify the problem.
--- drivers/acpi/acpica/evregion.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
drivers/acpi/acpica/evregion.c +10 -0
@@ -298,6 +298,16 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,ACPI_EXCEPTION ((AE_INFO , status,"Returned by Handler for [%s]" ,acpi_ut_get_region_name (region_obj->region. space_id))); + +/* +* Special case for an EC timeout. These are seen so frequently +* that an additional error message is helpful +*/ +if ((region_obj->region.space_id ==ACPI_ADR_SPACE_EC ) && + (status ==AE_TIME )) { +ACPI_ERROR ((AE_INFO , +"Timeout from EC hardware or EC device driver" )); + } } if (!(handler_desc->address_space.handler_flags &
Signature · 1 line
2.13.6
PATCH 4/15 ACPICA: iasl: Add SMMUv3 device ID mapping index support
In reply to Erik SchmaussFrom: Hanjun Guo <[email protected]>
ACPICA commit 5c371879e035122c5807752f42247fd091d107d6
SMMUv3 device ID mapping index is used for SMMUv3 MSI which is introduced in IORT spec revision c, add its support for iasl.
Tested with iasl -t IORT then get the right SMMUv3 node in iort.asl.
--- include/acpi/actbl2.h | 1 + 1 file changed, 1 insertion(+)
include/acpi/actbl2.h +1 -0
@@ -810,6 +810,7 @@ struct acpi_iort_smmu_v3 {u8 pxm;u8 reserved1;u16 reserved2; +u32 id_mapping_index; };/* Values for Model field above */
Signature · 1 line
2.13.6
PATCH 5/15 ACPICA: ACPICA: style edits to utility function output, no functional change
In reply to Erik SchmaussACPICA commit 8070a23749f1c2eedec313f42f564b5375054137
--- drivers/acpi/acpica/uttrack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/acpica/uttrack.c +1 -1
@@ -717,7 +717,7 @@ void acpi_ut_dump_allocations(u32 component, const char *module)if (!num_outstanding) {ACPI_INFO (("No outstanding allocations" )); }else { -ACPI_ERROR ((AE_INFO ,"%u(0x%X) Outstanding allocations" , +ACPI_ERROR ((AE_INFO ,"%u (0x%X) Outstanding cache allocations" , num_outstanding, num_outstanding)); }
Signature · 1 line
2.13.6
PATCH 6/15 ACPICA: Trivial fix to spelling mistake in comment
In reply to Erik SchmaussFrom: Colin Ian King <[email protected]>
ACPICA commit 62c3ff46de977456155fdedbd9f294f2ff700520
Fix spelling mistake, "Reseved" -> "Reserved"
--- include/acpi/actbl1.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/acpi/actbl1.h +1 -1
@@ -1163,7 +1163,7 @@ struct acpi_nfit_system_address {struct acpi_nfit_header header;u16 range_index;u16 flags; -u32 reserved;/* Reseved, must be zero */ +u32 reserved;/* Reserved, must be zero */ u32 proximity_domain;u8 range_guid[16 ];u64 address;
Signature · 1 line
2.13.6
PATCH 7/15 ACPICA: Enhance error messages from namespace create/lookup operations
In reply to Erik SchmaussFrom: Bob Moore <[email protected]>
ACPICA commit b09c8d7bdc8c5a3db0a8d38bfd6182c023885e12
1) Emit the full pathname (scope+name) instead of just the name
2) For AE_ALREADY_EXISTS and AE_NOT_FOUND, use the "firmware error" string to point to the true problem.
--- drivers/acpi/acpica/acmacros.h | 2 +- drivers/acpi/acpica/acnamesp.h | 3 + drivers/acpi/acpica/acutils.h | 12 ++-- drivers/acpi/acpica/dsfield.c | 28 +++++--- drivers/acpi/acpica/dsobject.c | 4 +- drivers/acpi/acpica/dsutils.c | 3 +- drivers/acpi/acpica/dswload.c | 6 +- drivers/acpi/acpica/dswload2.c | 13 ++-- drivers/acpi/acpica/nsconvert.c | 3 +- drivers/acpi/acpica/nsnames.c | 146 ++++++++++++++++++++++++++++++++++++++++ drivers/acpi/acpica/psargs.c | 2 +- drivers/acpi/acpica/uterror.c | 73 ++++++++++++++++++++ 12 files changed, 270 insertions(+), 25 deletions(-)
drivers/acpi/acpica/acmacros.h +1 -1
@@ -455,7 +455,7 @@* the plist contains a set of parens to allow variable-length lists. * These macros are used for both the debug and non-debug versions of the code. */ -#define ACPI_ERROR_NAMESPACE (s, e) acpi_ut_namespace_error (AE_INFO, s, e); +#define ACPI_ERROR_NAMESPACE (s, p, e) acpi_ut_prefixed_namespace_error (AE_INFO, s, p, e);#define ACPI_ERROR_METHOD (s, n, p, e) acpi_ut_method_error (AE_INFO, s, n, p, e);#define ACPI_WARN_PREDEFINED (plist) acpi_ut_predefined_warning plist#define ACPI_INFO_PREDEFINED (plist) acpi_ut_predefined_info plist
drivers/acpi/acpica/acnamesp.h +3 -0
@@ -289,6 +289,9 @@ acpi_ns_build_normalized_path(struct acpi_namespace_node *node,char *acpi_ns_get_normalized_pathname (struct acpi_namespace_node *node,u8 no_trailing); +char *acpi_ns_build_prefixed_pathname (union acpi_generic_state *prefix_scope, +const char *internal_path); +char *acpi_ns_name_of_current_scope (struct acpi_walk_state *walk_state); acpi_status
drivers/acpi/acpica/acutils.h +7 -5
@@ -126,10 +126,10 @@ extern const char *acpi_gbl_ptyp_decode[];#endif #ifndef ACPI_MSG_BIOS_ERROR -#define ACPI_MSG_BIOS_ERROR "ACPI BIOS Error (bug): " +#define ACPI_MSG_BIOS_ERROR "Firmware Error (ACPI): "#endif #ifndef ACPI_MSG_BIOS_WARNING -#define ACPI_MSG_BIOS_WARNING "ACPI BIOS Warning (bug): " +#define ACPI_MSG_BIOS_WARNING "Firmware Warning (ACPI): "#endif /*
@@ -734,9 +734,11 @@ acpi_ut_predefined_bios_error(const char *module_name, u8 node_flags, const char *format, ...);void -acpi_ut_namespace_error (const char *module_name, -u32 line_number, -const char *internal_name,acpi_status lookup_status); +acpi_ut_prefixed_namespace_error (const char *module_name, +u32 line_number, +union acpi_generic_state *prefix_scope, +const char *internal_name, +acpi_status lookup_status); void acpi_ut_method_error(const char *module_name,
drivers/acpi/acpica/dsfield.c +19 -9
@@ -209,7 +209,8 @@ acpi_ds_create_buffer_field(union acpi_parse_object *op,ACPI_IMODE_LOAD_PASS1 , flags, walk_state, &node);if (ACPI_FAILURE (status)) { -ACPI_ERROR_NAMESPACE (arg->common.value.string, status); +ACPI_ERROR_NAMESPACE (walk_state->scope_info, + arg->common.value.string, status);return_ACPI_STATUS (status); } }
@@ -383,7 +384,9 @@ acpi_ds_get_field_names(struct acpi_create_field_info *info, walk_state, &info->connection_node);if (ACPI_FAILURE (status)) { -ACPI_ERROR_NAMESPACE (child->common. +ACPI_ERROR_NAMESPACE (walk_state-> + scope_info, + child->common. value.name, status);return_ACPI_STATUS (status);
@@ -402,7 +405,8 @@ acpi_ds_get_field_names(struct acpi_create_field_info *info,ACPI_NS_DONT_OPEN_SCOPE , walk_state, &info->field_node);if (ACPI_FAILURE (status)) { -ACPI_ERROR_NAMESPACE ((char *)&arg->named.name, +ACPI_ERROR_NAMESPACE (walk_state->scope_info, + (char *)&arg->named.name, status);return_ACPI_STATUS (status); }else {
@@ -498,7 +502,8 @@ acpi_ds_create_field(union acpi_parse_object *op, ®ion_node);#endif if (ACPI_FAILURE (status)) { -ACPI_ERROR_NAMESPACE (arg->common.value.name, status); +ACPI_ERROR_NAMESPACE (walk_state->scope_info, + arg->common.value.name, status);return_ACPI_STATUS (status); } }
@@ -618,7 +623,8 @@ acpi_ds_init_field_objects(union acpi_parse_object *op,ACPI_IMODE_LOAD_PASS1 , flags, walk_state, &node);if (ACPI_FAILURE (status)) { -ACPI_ERROR_NAMESPACE ((char *)&arg->named.name, +ACPI_ERROR_NAMESPACE (walk_state->scope_info, + (char *)&arg->named.name, status);if (status !=AE_ALREADY_EXISTS ) {return_ACPI_STATUS (status);
@@ -681,7 +687,8 @@ acpi_ds_create_bank_field(union acpi_parse_object *op, ®ion_node);#endif if (ACPI_FAILURE (status)) { -ACPI_ERROR_NAMESPACE (arg->common.value.name, status); +ACPI_ERROR_NAMESPACE (walk_state->scope_info, + arg->common.value.name, status);return_ACPI_STATUS (status); } }
@@ -695,7 +702,8 @@ acpi_ds_create_bank_field(union acpi_parse_object *op,ACPI_NS_SEARCH_PARENT , walk_state, &info.register_node);if (ACPI_FAILURE (status)) { -ACPI_ERROR_NAMESPACE (arg->common.value.string, status); +ACPI_ERROR_NAMESPACE (walk_state->scope_info, + arg->common.value.string, status);return_ACPI_STATUS (status); }
@@ -765,7 +773,8 @@ acpi_ds_create_index_field(union acpi_parse_object *op,ACPI_NS_SEARCH_PARENT , walk_state, &info.register_node);if (ACPI_FAILURE (status)) { -ACPI_ERROR_NAMESPACE (arg->common.value.string, status); +ACPI_ERROR_NAMESPACE (walk_state->scope_info, + arg->common.value.string, status);return_ACPI_STATUS (status); }
@@ -778,7 +787,8 @@ acpi_ds_create_index_field(union acpi_parse_object *op,ACPI_NS_SEARCH_PARENT , walk_state, &info.data_register_node);if (ACPI_FAILURE (status)) { -ACPI_ERROR_NAMESPACE (arg->common.value.string, status); +ACPI_ERROR_NAMESPACE (walk_state->scope_info, + arg->common.value.string, status);return_ACPI_STATUS (status); }
drivers/acpi/acpica/dsobject.c +3 -1
@@ -112,7 +112,9 @@ acpi_ds_build_internal_object(struct acpi_walk_state *walk_state, acpi_namespace_node, &(op->common.node)));if (ACPI_FAILURE (status)) { -ACPI_ERROR_NAMESPACE (op->common.value. +ACPI_ERROR_NAMESPACE (walk_state-> + scope_info, + op->common.value. string, status);return_ACPI_STATUS (status); }
drivers/acpi/acpica/dsutils.c +2 -1
@@ -583,7 +583,8 @@ acpi_ds_create_operand(struct acpi_walk_state *walk_state, }if (ACPI_FAILURE (status)) { -ACPI_ERROR_NAMESPACE (name_string, status); +ACPI_ERROR_NAMESPACE (walk_state->scope_info, + name_string, status); } }
drivers/acpi/acpica/dswload.c +4 -2
@@ -207,7 +207,8 @@ acpi_ds_load1_begin_op(struct acpi_walk_state *walk_state, }#endif if (ACPI_FAILURE (status)) { -ACPI_ERROR_NAMESPACE (path, status); +ACPI_ERROR_NAMESPACE (walk_state->scope_info, path, + status);return_ACPI_STATUS (status); }
@@ -375,7 +376,8 @@ acpi_ds_load1_begin_op(struct acpi_walk_state *walk_state, }if (ACPI_FAILURE (status)) { -ACPI_ERROR_NAMESPACE (path, status); +ACPI_ERROR_NAMESPACE (walk_state->scope_info, + path, status);return_ACPI_STATUS (status); } }
drivers/acpi/acpica/dswload2.c +9 -4
@@ -184,11 +184,14 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state,if (status ==AE_NOT_FOUND ) { status =AE_OK ; }else { -ACPI_ERROR_NAMESPACE (buffer_ptr, +ACPI_ERROR_NAMESPACE (walk_state-> + scope_info, + buffer_ptr, status); }#else -ACPI_ERROR_NAMESPACE (buffer_ptr, status); +ACPI_ERROR_NAMESPACE (walk_state->scope_info, + buffer_ptr, status);#endif return_ACPI_STATUS (status); }
@@ -343,7 +346,8 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state, }if (ACPI_FAILURE (status)) { -ACPI_ERROR_NAMESPACE (buffer_ptr, status); +ACPI_ERROR_NAMESPACE (walk_state->scope_info, + buffer_ptr, status);return_ACPI_STATUS (status); }
@@ -719,7 +723,8 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state)*/ op->common.node = new_node; }else { -ACPI_ERROR_NAMESPACE (arg->common.value.string, status); +ACPI_ERROR_NAMESPACE (walk_state->scope_info, + arg->common.value.string, status); }break ;
drivers/acpi/acpica/nsconvert.c +2 -1
@@ -495,7 +495,8 @@ acpi_ns_convert_to_reference(struct acpi_namespace_node *scope,/* Check if we are resolving a named reference within a package */ -ACPI_ERROR_NAMESPACE (original_object->string.pointer, status); +ACPI_ERROR_NAMESPACE (&scope_info, + original_object->string.pointer, status); goto error_exit; }
drivers/acpi/acpica/nsnames.c +146 -0
161 lines not on this page · raw message
drivers/acpi/acpica/psargs.c +1 -1
@@ -361,7 +361,7 @@ acpi_ps_get_next_namepath(struct acpi_walk_state *walk_state,/* Final exception check (may have been changed from code above) */ if (ACPI_FAILURE (status)) { -ACPI_ERROR_NAMESPACE (path, status); +ACPI_ERROR_NAMESPACE (walk_state->scope_info, path, status);if ((walk_state->parse_flags &ACPI_PARSE_MODE_MASK ) ==ACPI_PARSE_EXECUTE ) {
drivers/acpi/acpica/uterror.c +73 -0
85 lines not on this page · raw message
Signature · 1 line
2.13.6
PATCH 8/15 ACPICA: Namespace: fix memory leak from building prefixed pathname
In reply to Erik SchmaussACPICA commit f8ca5db30605467b851f86d152079631c27eeca8
--- drivers/acpi/acpica/nsnames.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/acpi/acpica/nsnames.c +4 -1
@@ -377,7 +377,7 @@ char *acpi_ns_build_prefixed_pathname(union acpi_generic_state *prefix_scope, {acpi_status status;char *full_path =NULL ; -char *external_path; +char *external_path =NULL ;char *prefix_path =NULL ;u32 prefix_path_length =0 ;
@@ -423,6 +423,9 @@ char *acpi_ns_build_prefixed_pathname(union acpi_generic_state *prefix_scope,if (prefix_path) {ACPI_FREE (prefix_path); } +if (external_path) { +ACPI_FREE (external_path); + }return (full_path); }
Signature · 1 line
2.13.6
PATCH 9/15 ACPICA: ACPI 6.0A: Changes to the NFIT ACPI table
In reply to Erik SchmaussFrom: Bob Moore <[email protected]>
ACPICA commit a42a086b8d682ab8dfbc4666cf6b9c8a5ee23a77
Adds a new subtable.
--- include/acpi/actbl1.h | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 65 insertions(+), 1 deletion(-)
include/acpi/actbl1.h +65 -1
@@ -1150,7 +1150,8 @@ enum acpi_nfit_type {ACPI_NFIT_TYPE_CONTROL_REGION =4 ,ACPI_NFIT_TYPE_DATA_REGION =5 ,ACPI_NFIT_TYPE_FLUSH_ADDRESS =6 , - ACPI_NFIT_TYPE_RESERVED = 7 /* 7 and greater are reserved */ +ACPI_NFIT_TYPE_CAPABILITIES =7 , + ACPI_NFIT_TYPE_RESERVED = 8 /* 8 and greater are reserved */ };/*
@@ -1282,6 +1283,69 @@ struct acpi_nfit_flush_address {u64 hint_address[1 ];/* Variable length */ }; +/* 7: Platform Capabilities Structure */ + +struct acpi_nfit_capabilities { +struct acpi_nfit_header header; +u8 highest_capability; +u8 reserved[3 ];/* Reserved, must be zero */ +u32 capabilities; +u32 reserved2; +}; + +/* Capabilities Flags */ + +#define ACPI_NFIT_CAPABILITY_CACHE_FLUSH (1)/* 00: Cache Flush to NVDIMM capable */ +#define ACPI_NFIT_CAPABILITY_MEM_FLUSH (1<<1)/* 01: Memory Flush to NVDIMM capable */ +#define ACPI_NFIT_CAPABILITY_MEM_MIRRORING (1<<2)/* 02: Memory Mirroring capable */ + +/* +* NFIT/DVDIMM device handle support - used as the _ADR for each NVDIMM +*/ +struct nfit_device_handle { +u32 handle; +}; + +/* Device handle construction and extraction macros */ + +#define ACPI_NFIT_DIMM_NUMBER_MASK 0x0000000F +#define ACPI_NFIT_CHANNEL_NUMBER_MASK 0x000000F0 +#define ACPI_NFIT_MEMORY_ID_MASK 0x00000F00 +#define ACPI_NFIT_SOCKET_ID_MASK 0x0000F000 +#define ACPI_NFIT_NODE_ID_MASK 0x0FFF0000 + +#define ACPI_NFIT_DIMM_NUMBER_OFFSET 0 +#define ACPI_NFIT_CHANNEL_NUMBER_OFFSET 4 +#define ACPI_NFIT_MEMORY_ID_OFFSET 8 +#define ACPI_NFIT_SOCKET_ID_OFFSET 12 +#define ACPI_NFIT_NODE_ID_OFFSET 16 + +/* Macro to construct a NFIT/NVDIMM device handle */ + +#define ACPI_NFIT_BUILD_DEVICE_HANDLE (dimm, channel, memory, socket, node) \ + ((dimm) | \ + ((channel) << ACPI_NFIT_CHANNEL_NUMBER_OFFSET) | \ + ((memory) << ACPI_NFIT_MEMORY_ID_OFFSET) | \ + ((socket) << ACPI_NFIT_SOCKET_ID_OFFSET) | \ + ((node) << ACPI_NFIT_NODE_ID_OFFSET)) + +/* Macros to extract individual fields from a NFIT/NVDIMM device handle */ + +#define ACPI_NFIT_GET_DIMM_NUMBER (handle) \ + ((handle) & ACPI_NFIT_DIMM_NUMBER_MASK) + +#define ACPI_NFIT_GET_CHANNEL_NUMBER (handle) \ + (((handle) & ACPI_NFIT_CHANNEL_NUMBER_MASK) >> ACPI_NFIT_CHANNEL_NUMBER_OFFSET) + +#define ACPI_NFIT_GET_MEMORY_ID (handle) \ + (((handle) & ACPI_NFIT_MEMORY_ID_MASK) >> ACPI_NFIT_MEMORY_ID_OFFSET) + +#define ACPI_NFIT_GET_SOCKET_ID (handle) \ + (((handle) & ACPI_NFIT_SOCKET_ID_MASK) >> ACPI_NFIT_SOCKET_ID_OFFSET) + +#define ACPI_NFIT_GET_NODE_ID (handle) \ + (((handle) & ACPI_NFIT_NODE_ID_MASK) >> ACPI_NFIT_NODE_ID_OFFSET) +/******************************************************************************* * * PDTT - Platform Debug Trigger Table (ACPI 6.2)
Signature · 1 line
2.13.6
PATCH 10/15 ACPICA: Small typo fix, no functional change.
In reply to Erik SchmaussFrom: Bob Moore <[email protected]>
ACPICA commit 9b03c05305d856274c39f3adbddd8a98ef5d018e
acpi table header.
--- include/acpi/actbl1.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/acpi/actbl1.h +1 -1
@@ -1373,7 +1373,7 @@ struct acpi_pdtt_channel {/* Flags for above */ #define ACPI_PDTT_RUNTIME_TRIGGER (1) -#define ACPI_PPTT_WAIT_COMPLETION (1<<1) +#define ACPI_PDTT_WAIT_COMPLETION (1<<1)/******************************************************************************* *
Signature · 1 line
2.13.6
PATCH 11/15 ACPICA: Debugger: add "background" command for method execution
In reply to Erik SchmaussFrom: Bob Moore <[email protected]>
ACPICA commit d7b44738a48caa9f669b8dbf0024d456711aec31
Allows a single task to execute in the background, while control returns to the debugger prompt.
Also, cleanup the debugger help screen.
--- drivers/acpi/acpica/acdebug.h | 4 ++ drivers/acpi/acpica/aclocal.h | 13 ++-- drivers/acpi/acpica/dbexec.c | 110 +++++++++++++++++++++++++++++++- drivers/acpi/acpica/dbinput.c | 145 +++++++++++++++++++++++++----------------- 4 files changed, 206 insertions(+), 66 deletions(-)
drivers/acpi/acpica/acdebug.h +4 -0
@@ -223,6 +223,10 @@ void acpi_db_execute(char *name, char **args, acpi_object_type *types, u32 flags);void +acpi_db_create_execution_thread (char *method_name_arg, +char **arguments,acpi_object_type *types); + +void acpi_db_create_execution_threads (char *num_threads_arg,char *num_loops_arg,char *method_name_arg);
drivers/acpi/acpica/aclocal.h +7 -6
@@ -1218,16 +1218,17 @@ struct acpi_db_method_info {acpi_object_type *types;/* -* Arguments to be passed to method for the command -* Threads - -* the Number of threads, ID of current thread and -* Index of current thread inside all them created. +* Arguments to be passed to method for the commands Threads and +* Background. Note, ACPI specifies a maximum of 7 arguments (0 - 6). +* +* For the Threads command, the Number of threads, ID of current +* thread and Index of current thread inside all them created. */ char init_args;#ifdef ACPI_DEBUGGER -acpi_object_type arg_types[4 ]; +acpi_object_type arg_types[ACPI_METHOD_NUM_ARGS ];#endif -char *arguments[4 ]; +char *arguments[ACPI_METHOD_NUM_ARGS ];char num_threads_str[11 ];char id_of_thread_str[11 ];char index_of_thread_str[11 ];
drivers/acpi/acpica/dbexec.c +109 -1
128 lines not on this page · raw message
drivers/acpi/acpica/dbinput.c +86 -59
211 lines not on this page · raw message
Signature · 1 line
2.13.6
PATCH 12/15 ACPICA: Update mutex error messages, no functional change
In reply to Erik SchmaussFrom: Bob Moore <[email protected]>
ACPICA commit 22f2b0beb45d277841ed02bc613df1009e5b20cf
Add mutex name on certain acquire/release errors.
--- drivers/acpi/acpica/utmutex.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
drivers/acpi/acpica/utmutex.c +5 -4
@@ -286,8 +286,9 @@ acpi_status acpi_ut_acquire_mutex(acpi_mutex_handle mutex_id) acpi_gbl_mutex_info[mutex_id].thread_id = this_thread_id; }else {ACPI_EXCEPTION ((AE_INFO , status, -"Thread %u could not acquire Mutex [0x%X]" , - (u32 )this_thread_id, mutex_id)); +"Thread %u could not acquire Mutex [%s] (0x%X)" , + (u32 )this_thread_id, +acpi_ut_get_mutex_name (mutex_id), mutex_id)); }return (status);
@@ -322,8 +323,8 @@ acpi_status acpi_ut_release_mutex(acpi_mutex_handle mutex_id)*/ if (acpi_gbl_mutex_info[mutex_id].thread_id ==ACPI_MUTEX_NOT_ACQUIRED ) {ACPI_ERROR ((AE_INFO , -"Mutex [0x%X] is not acquired, cannot release" , - mutex_id)); +"Mutex [%s] (0x%X) is not acquired, cannot release" , +acpi_ut_get_mutex_name (mutex_id), mutex_id));return (AE_NOT_ACQUIRED ); }
Signature · 1 line
2.13.6
PATCH 13/15 ACPICA: Update linkage for get mutex name interface
In reply to Erik SchmaussFrom: Bob Moore <[email protected]>
ACPICA commit cb9a3906ec35da7a6e0b8972f8e6e7895e59c208
Always enable the function.
--- drivers/acpi/acpica/acutils.h | 4 ++-- drivers/acpi/acpica/utdecode.c | 11 ++++++----- 2 files changed, 8 insertions(+), 7 deletions(-)
drivers/acpi/acpica/acutils.h +2 -2
@@ -230,10 +230,10 @@ u64 acpi_ut_implicit_strtoul64(char *string);*/ acpi_status acpi_ut_init_globals (void ); -#if defined(ACPI_DEBUG_OUTPUT ) || defined(ACPI_DEBUGGER ) -const char *acpi_ut_get_mutex_name (u32 mutex_id); +#if defined(ACPI_DEBUG_OUTPUT ) || defined(ACPI_DEBUGGER ) +const char *acpi_ut_get_notify_name (u32 notify_value,acpi_object_type type);#endif
drivers/acpi/acpica/utdecode.c +6 -5
@@ -395,11 +395,6 @@ const char *acpi_ut_get_reference_name(union acpi_operand_object *object)return (acpi_gbl_ref_class_names[object->reference.class]); } -#if defined(ACPI_DEBUG_OUTPUT ) || defined(ACPI_DEBUGGER ) -/* -* Strings and procedures used for debug only -*/ -/******************************************************************************* * * FUNCTION: acpi_ut_get_mutex_name
@@ -433,6 +428,12 @@ const char *acpi_ut_get_mutex_name(u32 mutex_id)return (acpi_gbl_mutex_names[mutex_id]); } +#if defined(ACPI_DEBUG_OUTPUT ) || defined(ACPI_DEBUGGER ) + +/* +* Strings and procedures used for debug only +*/ +/******************************************************************************* * * FUNCTION: acpi_ut_get_notify_name
Signature · 1 line
2.13.6
PATCH 14/15 ACPICA: ACPI 6.2: Additional PPTT flags
In reply to Erik SchmaussFrom: Jeremy Linton <[email protected]>
ACPICA commit fba3ae99b2bc514ca34f0d7b2609c2a043582784
The ACPI 6.2 spec has flags to describe cache allocation, write back, and whether
it is an instruction, data or unified cache.
--- include/acpi/actbl1.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
include/acpi/actbl1.h +14 -0
@@ -1441,6 +1441,20 @@ struct acpi_pptt_cache {#define ACPI_PPTT_MASK_CACHE_TYPE (0x0C)/* Cache type */ #define ACPI_PPTT_MASK_WRITE_POLICY (0x10)/* Write policy */ +/* Attributes describing cache */ +#define ACPI_PPTT_CACHE_READ_ALLOCATE (0x0)/* Cache line is allocated on read */ +#define ACPI_PPTT_CACHE_WRITE_ALLOCATE (0x01)/* Cache line is allocated on write */ +#define ACPI_PPTT_CACHE_RW_ALLOCATE (0x02)/* Cache line is allocated on read and write */ +#define ACPI_PPTT_CACHE_RW_ALLOCATE_ALT (0x03)/* Alternate representation of above */ + +#define ACPI_PPTT_CACHE_TYPE_DATA (0x0)/* Data cache */ +#define ACPI_PPTT_CACHE_TYPE_INSTR (1<<2)/* Instruction cache */ +#define ACPI_PPTT_CACHE_TYPE_UNIFIED (2<<2)/* Unified I & D cache */ +#define ACPI_PPTT_CACHE_TYPE_UNIFIED_ALT (3<<2)/* Alternate representation of above */ + +#define ACPI_PPTT_CACHE_POLICY_WB (0x0)/* Cache is write back */ +#define ACPI_PPTT_CACHE_POLICY_WT (1<<4)/* Cache is write through */ +/* 2: ID Structure */ struct acpi_pptt_id {
Signature · 1 line
2.13.6
PATCH 15/15 ACPICA: Update version to 20171110
In reply to Erik SchmaussFrom: Bob Moore <[email protected]>
ACPICA commit d0ef5a72ca7c01acbf590e4556d19edf69a5b5c4
Version 20171110.
--- include/acpi/acpixf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/acpi/acpixf.h +1 -1
@@ -46,7 +46,7 @@/* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20170929 +#define ACPI_CA_VERSION 0x20171110#include <acpi/acconfig.h> #include <acpi/actypes.h>
Signature · 1 line
2.13.6
Re: [PATCH 04/15] ACPICA: iasl: Add SMMUv3 device ID mapping index support
In reply to Erik SchmaussHi Erik, all,
Quoted 3 lines · Erik Schmauss
From: Hanjun Guo <[email protected]>
ACPICA commit
5c371879e035122c5807752f42247fd091d107d6
Just a request - I would really like to see this series in v4.16 please, so I kindly ask Rafael if it is possible to plan to pull this series for the next kernel cycle - there are patches that provide ARM functionality (ie the one I am replying to) that we need upstream and were queued for a while.
Thank you,
Lorenzo
Quoted 34 lines
SMMUv3 device ID mapping index is used for SMMUv3
MSI which is introduced in IORT spec revision c,
add its support for iasl.Tested with iasl -t IORT then get the right SMMUv3 node in iort.asl.
Signed-off-by Hanjun Guo <[email protected]>Signed-off-by Bob Moore <[email protected]>Signed-off-by Erik Schmauss <[email protected]>--- include/acpi/actbl2.h | 1 + 1 file changed, 1 insertion(+)include/acpi/actbl2.h +1
-0@@ -810,6 +810,7 @@ struct acpi_iort_smmu_v3 {u8 pxm;u8 reserved1;u16 reserved2; +u32 id_mapping_index; };/* Values for Model field above */ Signature · 6 lines
2.13.6 -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Rafael J. Wysocki
maintainerRe: [PATCH 04/15] ACPICA: iasl: Add SMMUv3 device ID mapping index support
Quoted 8 lines · Lorenzo Pieralisi
Hi Erik, all,
Quoted 3 lines · Erik Schmauss
From: Hanjun Guo <[email protected]>
ACPICA commit
5c371879e035122c5807752f42247fd091d107d6Just a request - I would really like to see this series in v4.16 please,
Yes, I'm going to queue this up for 4.16.
Thanks,
Rafael
Quoted 24 lines · CET Erik Schmauss
This series comes from the 20171110 release of ACPICA. This set of patches is meant to be applied on top of the 20170929 release of ACPICA.
Bob Moore (10):
ACPICA: Use local 64-bit divide support for string conversions
ACPICA: Update output fromACPI_EXCEPTIONmacro
ACPICA: Add an additional error message for EC timeouts
ACPICA: Enhance error messages from namespace create/lookup operations
ACPICA: ACPI 6.0A: Changes to the NFIT ACPI table
ACPICA: Small typo fix, no functional change.
ACPICA: Debugger: add "background" command for method execution
ACPICA: Update mutex error messages, no functional change
ACPICA: Update linkage for get mutex name interface
ACPICA: Update version to 20171110Colin Ian King (1):
ACPICA: Trivial fix to spelling mistake in commentErik Schmauss (2):
ACPICA: ACPICA: style edits to utility function output, no functional
change
ACPICA: Namespace: fix memory leak from building prefixed pathname
Quoted 5 lines
Hanjun Guo (1):
ACPICA: iasl: Add SMMUv3 device ID mapping index supportJeremy Linton (1):
ACPICA: ACPI 6.2: Additional PPTT flags
Series applied, thanks!
Rafael