mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-02-17 12:30:29 -05:00
Merge branch 'acpica'
Merge ACPICA updates (20250807 release material with a few fixes on top) for 6.18-rc1: - Add SoundWire File Table (SWFT) signature to ACPICA (Maciej Strozek) - Rearrange local variable definition involving #ifdef in ACPICA to avoid using uninitialized variables (Zhe Qiao) - Allow ACPICA to skip Global Lock initialization (Huacai Chen) - Apply ACPI_NONSTRING in more places in ACPICA and fix two regressions related to incorrect ACPI_NONSTRING usage (Ahmed Salem) - Fix printing CDAT table header when dissasebling CDAT AML (Ahmed Salem) - Use acpi_ds_clear_operands() in acpi_ds_call_control_method() in ACPICA (Hans de Goede) - Update dsmethod.c in ACPICA to address unused variable warning (Saket Dumbre) - Print error messages in ACPICA for too few or too many control method arguments (Saket Dumbre) - Update ACPICA version to 20250807 (Saket Dumbre) - Fix largest possible resource descriptor index in ACPICA (Dmitry Antipov) - Add Back-Invalidate restriction to CXL Window for CEDT in ACPICA (Davidlohr Bueso). - Add the package type to acceptable Arg3 types for _DSM in ACPICA because ACPI_TYPE_ANY does not cover it (Saket Dumbre) - Fix return values in ap_is_valid_checksum() in the acpidump utility in ACPICA (Kaushlendra Kumar) * acpica: ACPICA: acpidump: fix return values in ap_is_valid_checksum() ACPICA: ACPI_TYPE_ANY does not include the package type ACPICA: CEDT: Add Back-Invalidate restriction to CXL Window ACPICA: Fix largest possible resource descriptor index ACPICA: Update version to 20250807 ACPICA: Print error messages for too few or too many arguments ACPICA: Update dsmethod.c to get rid of unused variable warning ACPICA: dispatcher: Use acpi_ds_clear_operands() in acpi_ds_call_control_method() ACPICA: Debugger: drop ACPI_NONSTRING attribute from name_seg ACPICA: acpidump: drop ACPI_NONSTRING attribute from file_name ACPICA: iASL: Fix printing CDAT table header ACPICA: Apply ACPI_NONSTRING ACPICA: Allow to skip Global Lock initialization ACPICA: Change the compilation conditions ACPICA: Remove redundant "#ifdef" definitions ACPICA: Modify variable definition position ACPICA: Add SoundWire File Table (SWFT) signature
This commit is contained in:
@@ -37,7 +37,7 @@ struct acpi_db_argument_info {
|
||||
struct acpi_db_execute_walk {
|
||||
u32 count;
|
||||
u32 max_count;
|
||||
char name_seg[ACPI_NAMESEG_SIZE + 1] ACPI_NONSTRING;
|
||||
char name_seg[ACPI_NAMESEG_SIZE + 1];
|
||||
};
|
||||
|
||||
#define PARAM_LIST(pl) pl
|
||||
|
||||
@@ -1141,7 +1141,7 @@ struct acpi_port_info {
|
||||
#define ACPI_RESOURCE_NAME_PIN_GROUP_FUNCTION 0x91
|
||||
#define ACPI_RESOURCE_NAME_PIN_GROUP_CONFIG 0x92
|
||||
#define ACPI_RESOURCE_NAME_CLOCK_INPUT 0x93
|
||||
#define ACPI_RESOURCE_NAME_LARGE_MAX 0x94
|
||||
#define ACPI_RESOURCE_NAME_LARGE_MAX 0x93
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
|
||||
@@ -450,7 +450,8 @@ const union acpi_predefined_info acpi_gbl_predefined_methods[] = {
|
||||
|
||||
{{"_DSM",
|
||||
METHOD_4ARGS(ACPI_TYPE_BUFFER, ACPI_TYPE_INTEGER, ACPI_TYPE_INTEGER,
|
||||
ACPI_TYPE_ANY) | ARG_COUNT_IS_MINIMUM,
|
||||
ACPI_TYPE_ANY | ACPI_TYPE_PACKAGE) |
|
||||
ARG_COUNT_IS_MINIMUM,
|
||||
METHOD_RETURNS(ACPI_RTYPE_ALL)}}, /* Must return a value, but it can be of any type */
|
||||
|
||||
{{"_DSS", METHOD_1ARGS(ACPI_TYPE_INTEGER),
|
||||
|
||||
@@ -462,7 +462,6 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread,
|
||||
struct acpi_walk_state *next_walk_state = NULL;
|
||||
union acpi_operand_object *obj_desc;
|
||||
struct acpi_evaluate_info *info;
|
||||
u32 i;
|
||||
|
||||
ACPI_FUNCTION_TRACE_PTR(ds_call_control_method, this_walk_state);
|
||||
|
||||
@@ -484,10 +483,17 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread,
|
||||
}
|
||||
|
||||
if (this_walk_state->num_operands < obj_desc->method.param_count) {
|
||||
ACPI_ERROR((AE_INFO, "Missing argument for method [%4.4s]",
|
||||
ACPI_ERROR((AE_INFO, "Missing argument(s) for method [%4.4s]",
|
||||
acpi_ut_get_node_name(method_node)));
|
||||
|
||||
return_ACPI_STATUS(AE_AML_UNINITIALIZED_ARG);
|
||||
return_ACPI_STATUS(AE_AML_TOO_FEW_ARGUMENTS);
|
||||
}
|
||||
|
||||
else if (this_walk_state->num_operands > obj_desc->method.param_count) {
|
||||
ACPI_ERROR((AE_INFO, "Too many arguments for method [%4.4s]",
|
||||
acpi_ut_get_node_name(method_node)));
|
||||
|
||||
return_ACPI_STATUS(AE_AML_TOO_MANY_ARGUMENTS);
|
||||
}
|
||||
|
||||
/* Init for new method, possibly wait on method mutex */
|
||||
@@ -546,14 +552,7 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread,
|
||||
* Delete the operands on the previous walkstate operand stack
|
||||
* (they were copied to new objects)
|
||||
*/
|
||||
for (i = 0; i < obj_desc->method.param_count; i++) {
|
||||
acpi_ut_remove_reference(this_walk_state->operands[i]);
|
||||
this_walk_state->operands[i] = NULL;
|
||||
}
|
||||
|
||||
/* Clear the operand stack */
|
||||
|
||||
this_walk_state->num_operands = 0;
|
||||
acpi_ds_clear_operands(this_walk_state);
|
||||
|
||||
ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH,
|
||||
"**** Begin nested execution of [%4.4s] **** WalkState=%p\n",
|
||||
|
||||
@@ -42,6 +42,10 @@ acpi_status acpi_ev_init_global_lock_handler(void)
|
||||
return_ACPI_STATUS(AE_OK);
|
||||
}
|
||||
|
||||
if (!acpi_gbl_use_global_lock) {
|
||||
return_ACPI_STATUS(AE_OK);
|
||||
}
|
||||
|
||||
/* Attempt installation of the global lock handler */
|
||||
|
||||
status = acpi_install_fixed_event_handler(ACPI_EVENT_GLOBAL,
|
||||
|
||||
@@ -34,7 +34,7 @@ static const u8 acpi_gbl_argument_count[] =
|
||||
|
||||
const struct acpi_opcode_info *acpi_ps_get_opcode_info(u16 opcode)
|
||||
{
|
||||
#ifdef ACPI_DEBUG_OUTPUT
|
||||
#if defined ACPI_ASL_COMPILER && defined ACPI_DEBUG_OUTPUT
|
||||
const char *opcode_name = "Unknown AML opcode";
|
||||
#endif
|
||||
|
||||
@@ -102,11 +102,11 @@ const struct acpi_opcode_info *acpi_ps_get_opcode_info(u16 opcode)
|
||||
default:
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Unknown AML opcode */
|
||||
|
||||
ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "%s [%4.4X]\n", opcode_name, opcode));
|
||||
#endif
|
||||
|
||||
return (&acpi_gbl_aml_op_info[_UNK]);
|
||||
}
|
||||
|
||||
@@ -121,6 +121,14 @@ acpi_tb_print_table_header(acpi_physical_address address,
|
||||
ACPI_CAST_PTR(struct acpi_table_rsdp,
|
||||
header)->revision,
|
||||
local_header.oem_id));
|
||||
} else if (acpi_gbl_CDAT && !acpi_ut_valid_nameseg(header->signature)) {
|
||||
|
||||
/* CDAT does not use the common ACPI table header */
|
||||
|
||||
ACPI_INFO(("%-4.4s 0x%8.8X%8.8X %06X",
|
||||
ACPI_SIG_CDAT, ACPI_FORMAT_UINT64(address),
|
||||
ACPI_CAST_PTR(struct acpi_table_cdat,
|
||||
header)->length));
|
||||
} else {
|
||||
/* Standard ACPI table with full common header */
|
||||
|
||||
|
||||
@@ -408,7 +408,7 @@ static const char table_sigs[][ACPI_NAMESEG_SIZE] __nonstring_array __initconst
|
||||
ACPI_SIG_PSDT, ACPI_SIG_RSDT, ACPI_SIG_XSDT, ACPI_SIG_SSDT,
|
||||
ACPI_SIG_IORT, ACPI_SIG_NFIT, ACPI_SIG_HMAT, ACPI_SIG_PPTT,
|
||||
ACPI_SIG_NHLT, ACPI_SIG_AEST, ACPI_SIG_CEDT, ACPI_SIG_AGDI,
|
||||
ACPI_SIG_NBFT };
|
||||
ACPI_SIG_NBFT, ACPI_SIG_SWFT};
|
||||
|
||||
#define ACPI_HEADER_SIZE sizeof(struct acpi_table_header)
|
||||
|
||||
|
||||
@@ -173,8 +173,10 @@ struct acpi_exception_info {
|
||||
#define AE_AML_TARGET_TYPE EXCEP_AML (0x0023)
|
||||
#define AE_AML_PROTOCOL EXCEP_AML (0x0024)
|
||||
#define AE_AML_BUFFER_LENGTH EXCEP_AML (0x0025)
|
||||
#define AE_AML_TOO_FEW_ARGUMENTS EXCEP_AML (0x0026)
|
||||
#define AE_AML_TOO_MANY_ARGUMENTS EXCEP_AML (0x0027)
|
||||
|
||||
#define AE_CODE_AML_MAX 0x0025
|
||||
#define AE_CODE_AML_MAX 0x0027
|
||||
|
||||
/*
|
||||
* Internal exceptions used for control
|
||||
@@ -353,7 +355,11 @@ static const struct acpi_exception_info acpi_gbl_exception_names_aml[] = {
|
||||
"A target operand of an incorrect type was encountered"),
|
||||
EXCEP_TXT("AE_AML_PROTOCOL", "Violation of a fixed ACPI protocol"),
|
||||
EXCEP_TXT("AE_AML_BUFFER_LENGTH",
|
||||
"The length of the buffer is invalid/incorrect")
|
||||
"The length of the buffer is invalid/incorrect"),
|
||||
EXCEP_TXT("AE_AML_TOO_FEW_ARGUMENTS",
|
||||
"There are fewer than expected method arguments"),
|
||||
EXCEP_TXT("AE_AML_TOO_MANY_ARGUMENTS",
|
||||
"There are too many arguments for this method")
|
||||
};
|
||||
|
||||
static const struct acpi_exception_info acpi_gbl_exception_names_ctrl[] = {
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
/* Current ACPICA subsystem version in YYYYMMDD format */
|
||||
|
||||
#define ACPI_CA_VERSION 0x20250404
|
||||
#define ACPI_CA_VERSION 0x20250807
|
||||
|
||||
#include <acpi/acconfig.h>
|
||||
#include <acpi/actypes.h>
|
||||
@@ -213,6 +213,12 @@ ACPI_INIT_GLOBAL(u8, acpi_gbl_osi_data, 0);
|
||||
*/
|
||||
ACPI_INIT_GLOBAL(u8, acpi_gbl_reduced_hardware, FALSE);
|
||||
|
||||
/*
|
||||
* ACPI Global Lock is mainly used for systems with SMM, so no-SMM systems
|
||||
* (such as loong_arch) may not have and not use Global Lock.
|
||||
*/
|
||||
ACPI_INIT_GLOBAL(u8, acpi_gbl_use_global_lock, TRUE);
|
||||
|
||||
/*
|
||||
* Maximum timeout for While() loop iterations before forced method abort.
|
||||
* This mechanism is intended to prevent infinite loops during interpreter
|
||||
|
||||
@@ -73,7 +73,7 @@ struct acpi_table_header {
|
||||
char oem_id[ACPI_OEM_ID_SIZE] ACPI_NONSTRING; /* ASCII OEM identification */
|
||||
char oem_table_id[ACPI_OEM_TABLE_ID_SIZE] ACPI_NONSTRING; /* ASCII OEM table identification */
|
||||
u32 oem_revision; /* OEM revision number */
|
||||
char asl_compiler_id[ACPI_NAMESEG_SIZE]; /* ASCII ASL compiler vendor ID */
|
||||
char asl_compiler_id[ACPI_NAMESEG_SIZE] ACPI_NONSTRING; /* ASCII ASL compiler vendor ID */
|
||||
u32 asl_compiler_revision; /* ASL compiler version */
|
||||
};
|
||||
|
||||
|
||||
@@ -565,6 +565,7 @@ struct acpi_cedt_cfmws_target_element {
|
||||
#define ACPI_CEDT_CFMWS_RESTRICT_VOLATILE (1<<2)
|
||||
#define ACPI_CEDT_CFMWS_RESTRICT_PMEM (1<<3)
|
||||
#define ACPI_CEDT_CFMWS_RESTRICT_FIXED (1<<4)
|
||||
#define ACPI_CEDT_CFMWS_RESTRICT_BI (1<<5)
|
||||
|
||||
/* 2: CXL XOR Interleave Math Structure */
|
||||
|
||||
|
||||
@@ -57,6 +57,7 @@
|
||||
#define ACPI_SIG_SDEI "SDEI" /* Software Delegated Exception Interface Table */
|
||||
#define ACPI_SIG_SDEV "SDEV" /* Secure Devices table */
|
||||
#define ACPI_SIG_SVKL "SVKL" /* Storage Volume Key Location Table */
|
||||
#define ACPI_SIG_SWFT "SWFT" /* SoundWire File Table */
|
||||
#define ACPI_SIG_TDEL "TDEL" /* TD Event Log Table */
|
||||
|
||||
/*
|
||||
@@ -3478,6 +3479,26 @@ enum acpi_svkl_format {
|
||||
ACPI_SVKL_FORMAT_RESERVED = 1 /* 1 and greater are reserved */
|
||||
};
|
||||
|
||||
/*******************************************************************************
|
||||
* SWFT - SoundWire File Table
|
||||
*
|
||||
* Conforms to "Discovery and Configuration (DisCo) Specification for SoundWire"
|
||||
* Version 2.1, 2 October 2023
|
||||
*
|
||||
******************************************************************************/
|
||||
struct acpi_sw_file {
|
||||
u16 vendor_id;
|
||||
u32 file_id;
|
||||
u16 file_version;
|
||||
u32 file_length;
|
||||
u8 data[];
|
||||
};
|
||||
|
||||
struct acpi_table_swft {
|
||||
struct acpi_table_header header;
|
||||
struct acpi_sw_file files[];
|
||||
};
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* TDEL - TD-Event Log
|
||||
|
||||
@@ -995,7 +995,7 @@ static acpi_status osl_list_customized_tables(char *directory)
|
||||
{
|
||||
void *table_dir;
|
||||
u32 instance;
|
||||
char temp_name[ACPI_NAMESEG_SIZE];
|
||||
char temp_name[ACPI_NAMESEG_SIZE] ACPI_NONSTRING;
|
||||
char *filename;
|
||||
acpi_status status = AE_OK;
|
||||
|
||||
@@ -1312,7 +1312,7 @@ osl_get_customized_table(char *pathname,
|
||||
{
|
||||
void *table_dir;
|
||||
u32 current_instance = 0;
|
||||
char temp_name[ACPI_NAMESEG_SIZE];
|
||||
char temp_name[ACPI_NAMESEG_SIZE] ACPI_NONSTRING;
|
||||
char table_filename[PATH_MAX];
|
||||
char *filename;
|
||||
acpi_status status;
|
||||
|
||||
@@ -86,9 +86,10 @@ u8 ap_is_valid_checksum(struct acpi_table_header *table)
|
||||
if (ACPI_FAILURE(status)) {
|
||||
fprintf(stderr, "%4.4s: Warning: wrong checksum in table\n",
|
||||
table->signature);
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
return (AE_OK);
|
||||
return (TRUE);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
|
||||
@@ -103,7 +103,7 @@ int ap_open_output_file(char *pathname)
|
||||
|
||||
int ap_write_to_binary_file(struct acpi_table_header *table, u32 instance)
|
||||
{
|
||||
char filename[ACPI_NAMESEG_SIZE + 16] ACPI_NONSTRING;
|
||||
char filename[ACPI_NAMESEG_SIZE + 16];
|
||||
char instance_str[16];
|
||||
ACPI_FILE file;
|
||||
acpi_size actual;
|
||||
|
||||
Reference in New Issue
Block a user