Skip to content

Commit ab80f77

Browse files
committed
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
2 parents 496f937 + 54ba907 commit ab80f77

File tree

16 files changed

+72
-25
lines changed

16 files changed

+72
-25
lines changed

drivers/acpi/acpica/acdebug.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ struct acpi_db_argument_info {
3737
struct acpi_db_execute_walk {
3838
u32 count;
3939
u32 max_count;
40-
char name_seg[ACPI_NAMESEG_SIZE + 1] ACPI_NONSTRING;
40+
char name_seg[ACPI_NAMESEG_SIZE + 1];
4141
};
4242

4343
#define PARAM_LIST(pl) pl

drivers/acpi/acpica/aclocal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1141,7 +1141,7 @@ struct acpi_port_info {
11411141
#define ACPI_RESOURCE_NAME_PIN_GROUP_FUNCTION 0x91
11421142
#define ACPI_RESOURCE_NAME_PIN_GROUP_CONFIG 0x92
11431143
#define ACPI_RESOURCE_NAME_CLOCK_INPUT 0x93
1144-
#define ACPI_RESOURCE_NAME_LARGE_MAX 0x94
1144+
#define ACPI_RESOURCE_NAME_LARGE_MAX 0x93
11451145

11461146
/*****************************************************************************
11471147
*

drivers/acpi/acpica/acpredef.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,8 @@ const union acpi_predefined_info acpi_gbl_predefined_methods[] = {
450450

451451
{{"_DSM",
452452
METHOD_4ARGS(ACPI_TYPE_BUFFER, ACPI_TYPE_INTEGER, ACPI_TYPE_INTEGER,
453-
ACPI_TYPE_ANY) | ARG_COUNT_IS_MINIMUM,
453+
ACPI_TYPE_ANY | ACPI_TYPE_PACKAGE) |
454+
ARG_COUNT_IS_MINIMUM,
454455
METHOD_RETURNS(ACPI_RTYPE_ALL)}}, /* Must return a value, but it can be of any type */
455456

456457
{{"_DSS", METHOD_1ARGS(ACPI_TYPE_INTEGER),

drivers/acpi/acpica/dsmethod.c

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,6 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread,
462462
struct acpi_walk_state *next_walk_state = NULL;
463463
union acpi_operand_object *obj_desc;
464464
struct acpi_evaluate_info *info;
465-
u32 i;
466465

467466
ACPI_FUNCTION_TRACE_PTR(ds_call_control_method, this_walk_state);
468467

@@ -484,10 +483,17 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread,
484483
}
485484

486485
if (this_walk_state->num_operands < obj_desc->method.param_count) {
487-
ACPI_ERROR((AE_INFO, "Missing argument for method [%4.4s]",
486+
ACPI_ERROR((AE_INFO, "Missing argument(s) for method [%4.4s]",
488487
acpi_ut_get_node_name(method_node)));
489488

490-
return_ACPI_STATUS(AE_AML_UNINITIALIZED_ARG);
489+
return_ACPI_STATUS(AE_AML_TOO_FEW_ARGUMENTS);
490+
}
491+
492+
else if (this_walk_state->num_operands > obj_desc->method.param_count) {
493+
ACPI_ERROR((AE_INFO, "Too many arguments for method [%4.4s]",
494+
acpi_ut_get_node_name(method_node)));
495+
496+
return_ACPI_STATUS(AE_AML_TOO_MANY_ARGUMENTS);
491497
}
492498

493499
/* Init for new method, possibly wait on method mutex */
@@ -546,14 +552,7 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread,
546552
* Delete the operands on the previous walkstate operand stack
547553
* (they were copied to new objects)
548554
*/
549-
for (i = 0; i < obj_desc->method.param_count; i++) {
550-
acpi_ut_remove_reference(this_walk_state->operands[i]);
551-
this_walk_state->operands[i] = NULL;
552-
}
553-
554-
/* Clear the operand stack */
555-
556-
this_walk_state->num_operands = 0;
555+
acpi_ds_clear_operands(this_walk_state);
557556

558557
ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH,
559558
"**** Begin nested execution of [%4.4s] **** WalkState=%p\n",

drivers/acpi/acpica/evglock.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ acpi_status acpi_ev_init_global_lock_handler(void)
4242
return_ACPI_STATUS(AE_OK);
4343
}
4444

45+
if (!acpi_gbl_use_global_lock) {
46+
return_ACPI_STATUS(AE_OK);
47+
}
48+
4549
/* Attempt installation of the global lock handler */
4650

4751
status = acpi_install_fixed_event_handler(ACPI_EVENT_GLOBAL,

drivers/acpi/acpica/psopinfo.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ static const u8 acpi_gbl_argument_count[] =
3434

3535
const struct acpi_opcode_info *acpi_ps_get_opcode_info(u16 opcode)
3636
{
37-
#ifdef ACPI_DEBUG_OUTPUT
37+
#if defined ACPI_ASL_COMPILER && defined ACPI_DEBUG_OUTPUT
3838
const char *opcode_name = "Unknown AML opcode";
3939
#endif
4040

@@ -102,11 +102,11 @@ const struct acpi_opcode_info *acpi_ps_get_opcode_info(u16 opcode)
102102
default:
103103
break;
104104
}
105-
#endif
106105

107106
/* Unknown AML opcode */
108107

109108
ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "%s [%4.4X]\n", opcode_name, opcode));
109+
#endif
110110

111111
return (&acpi_gbl_aml_op_info[_UNK]);
112112
}

drivers/acpi/acpica/tbprint.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,14 @@ acpi_tb_print_table_header(acpi_physical_address address,
121121
ACPI_CAST_PTR(struct acpi_table_rsdp,
122122
header)->revision,
123123
local_header.oem_id));
124+
} else if (acpi_gbl_CDAT && !acpi_ut_valid_nameseg(header->signature)) {
125+
126+
/* CDAT does not use the common ACPI table header */
127+
128+
ACPI_INFO(("%-4.4s 0x%8.8X%8.8X %06X",
129+
ACPI_SIG_CDAT, ACPI_FORMAT_UINT64(address),
130+
ACPI_CAST_PTR(struct acpi_table_cdat,
131+
header)->length));
124132
} else {
125133
/* Standard ACPI table with full common header */
126134

drivers/acpi/tables.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ static const char table_sigs[][ACPI_NAMESEG_SIZE] __nonstring_array __initconst
408408
ACPI_SIG_PSDT, ACPI_SIG_RSDT, ACPI_SIG_XSDT, ACPI_SIG_SSDT,
409409
ACPI_SIG_IORT, ACPI_SIG_NFIT, ACPI_SIG_HMAT, ACPI_SIG_PPTT,
410410
ACPI_SIG_NHLT, ACPI_SIG_AEST, ACPI_SIG_CEDT, ACPI_SIG_AGDI,
411-
ACPI_SIG_NBFT };
411+
ACPI_SIG_NBFT, ACPI_SIG_SWFT};
412412

413413
#define ACPI_HEADER_SIZE sizeof(struct acpi_table_header)
414414

include/acpi/acexcep.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,10 @@ struct acpi_exception_info {
173173
#define AE_AML_TARGET_TYPE EXCEP_AML (0x0023)
174174
#define AE_AML_PROTOCOL EXCEP_AML (0x0024)
175175
#define AE_AML_BUFFER_LENGTH EXCEP_AML (0x0025)
176+
#define AE_AML_TOO_FEW_ARGUMENTS EXCEP_AML (0x0026)
177+
#define AE_AML_TOO_MANY_ARGUMENTS EXCEP_AML (0x0027)
176178

177-
#define AE_CODE_AML_MAX 0x0025
179+
#define AE_CODE_AML_MAX 0x0027
178180

179181
/*
180182
* Internal exceptions used for control
@@ -353,7 +355,11 @@ static const struct acpi_exception_info acpi_gbl_exception_names_aml[] = {
353355
"A target operand of an incorrect type was encountered"),
354356
EXCEP_TXT("AE_AML_PROTOCOL", "Violation of a fixed ACPI protocol"),
355357
EXCEP_TXT("AE_AML_BUFFER_LENGTH",
356-
"The length of the buffer is invalid/incorrect")
358+
"The length of the buffer is invalid/incorrect"),
359+
EXCEP_TXT("AE_AML_TOO_FEW_ARGUMENTS",
360+
"There are fewer than expected method arguments"),
361+
EXCEP_TXT("AE_AML_TOO_MANY_ARGUMENTS",
362+
"There are too many arguments for this method")
357363
};
358364

359365
static const struct acpi_exception_info acpi_gbl_exception_names_ctrl[] = {

include/acpi/acpixf.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
/* Current ACPICA subsystem version in YYYYMMDD format */
1414

15-
#define ACPI_CA_VERSION 0x20250404
15+
#define ACPI_CA_VERSION 0x20250807
1616

1717
#include <acpi/acconfig.h>
1818
#include <acpi/actypes.h>
@@ -213,6 +213,12 @@ ACPI_INIT_GLOBAL(u8, acpi_gbl_osi_data, 0);
213213
*/
214214
ACPI_INIT_GLOBAL(u8, acpi_gbl_reduced_hardware, FALSE);
215215

216+
/*
217+
* ACPI Global Lock is mainly used for systems with SMM, so no-SMM systems
218+
* (such as loong_arch) may not have and not use Global Lock.
219+
*/
220+
ACPI_INIT_GLOBAL(u8, acpi_gbl_use_global_lock, TRUE);
221+
216222
/*
217223
* Maximum timeout for While() loop iterations before forced method abort.
218224
* This mechanism is intended to prevent infinite loops during interpreter

0 commit comments

Comments
 (0)