Skip to content

Commit 8bca84b

Browse files
committed
Merge back earlier ACPICA material for 6.16
2 parents 9c32cda + cde89fd commit 8bca84b

File tree

9 files changed

+98
-51
lines changed

9 files changed

+98
-51
lines changed

drivers/acpi/acpica/acinterp.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,9 @@ void
120120
acpi_ex_trace_point(acpi_trace_event_type type,
121121
u8 begin, u8 *aml, char *pathname);
122122

123+
void
124+
acpi_ex_trace_args(union acpi_operand_object **params, u32 count);
125+
123126
/*
124127
* exfield - ACPI AML (p-code) execution - field manipulation
125128
*/

drivers/acpi/acpica/dsmthdat.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ acpi_ds_method_data_init_args(union acpi_operand_object **params,
188188

189189
index++;
190190
}
191+
acpi_ex_trace_args(params, index);
191192

192193
ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "%u args passed to method\n", index));
193194
return_ACPI_STATUS(AE_OK);

drivers/acpi/acpica/dsutils.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -668,6 +668,8 @@ acpi_ds_create_operands(struct acpi_walk_state *walk_state,
668668
union acpi_parse_object *arguments[ACPI_OBJ_NUM_OPERANDS];
669669
u32 arg_count = 0;
670670
u32 index = walk_state->num_operands;
671+
u32 prev_num_operands = walk_state->num_operands;
672+
u32 new_num_operands;
671673
u32 i;
672674

673675
ACPI_FUNCTION_TRACE_PTR(ds_create_operands, first_arg);
@@ -696,6 +698,7 @@ acpi_ds_create_operands(struct acpi_walk_state *walk_state,
696698

697699
/* Create the interpreter arguments, in reverse order */
698700

701+
new_num_operands = index;
699702
index--;
700703
for (i = 0; i < arg_count; i++) {
701704
arg = arguments[index];
@@ -720,7 +723,11 @@ acpi_ds_create_operands(struct acpi_walk_state *walk_state,
720723
* pop everything off of the operand stack and delete those
721724
* objects
722725
*/
723-
acpi_ds_obj_stack_pop_and_delete(arg_count, walk_state);
726+
walk_state->num_operands = (u8)(i);
727+
acpi_ds_obj_stack_pop_and_delete(new_num_operands, walk_state);
728+
729+
/* Restore operand count */
730+
walk_state->num_operands = (u8)(prev_num_operands);
724731

725732
ACPI_EXCEPTION((AE_INFO, status, "While creating Arg %u", index));
726733
return_ACPI_STATUS(status);

drivers/acpi/acpica/exserial.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,12 @@ acpi_ex_read_serial_bus(union acpi_operand_object *obj_desc,
201201
function = ACPI_READ;
202202
break;
203203

204+
case ACPI_ADR_SPACE_FIXED_HARDWARE:
205+
206+
buffer_length = ACPI_FFH_INPUT_BUFFER_SIZE;
207+
function = ACPI_READ;
208+
break;
209+
204210
default:
205211
return_ACPI_STATUS(AE_AML_INVALID_SPACE_ID);
206212
}

drivers/acpi/acpica/extrace.c

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,57 @@ acpi_ex_trace_point(acpi_trace_event_type type,
147147
}
148148
}
149149

150+
/*******************************************************************************
151+
*
152+
* FUNCTION: acpi_ex_trace_args
153+
*
154+
* PARAMETERS: params - AML method arguments
155+
* count - numer of method arguments
156+
*
157+
* RETURN: None
158+
*
159+
* DESCRIPTION: Trace any arguments
160+
*
161+
******************************************************************************/
162+
163+
void
164+
acpi_ex_trace_args(union acpi_operand_object **params, u32 count)
165+
{
166+
u32 i;
167+
168+
ACPI_FUNCTION_NAME(ex_trace_args);
169+
170+
for (i = 0; i < count; i++) {
171+
union acpi_operand_object *obj_desc = params[i];
172+
173+
if (!i) {
174+
ACPI_DEBUG_PRINT((ACPI_DB_TRACE_POINT, " "));
175+
}
176+
177+
switch (obj_desc->common.type) {
178+
case ACPI_TYPE_INTEGER:
179+
ACPI_DEBUG_PRINT_RAW((ACPI_DB_TRACE_POINT, "%llx", obj_desc->integer.value));
180+
break;
181+
case ACPI_TYPE_STRING:
182+
if (!obj_desc->string.length) {
183+
ACPI_DEBUG_PRINT_RAW((ACPI_DB_TRACE_POINT, "NULL"));
184+
continue;
185+
}
186+
if (ACPI_IS_DEBUG_ENABLED(ACPI_LV_TRACE_POINT, _COMPONENT))
187+
acpi_ut_print_string(obj_desc->string.pointer, ACPI_UINT8_MAX);
188+
break;
189+
default:
190+
ACPI_DEBUG_PRINT_RAW((ACPI_DB_TRACE_POINT, "Unknown"));
191+
break;
192+
}
193+
if (i+1 == count) {
194+
ACPI_DEBUG_PRINT_RAW((ACPI_DB_TRACE_POINT, "\n"));
195+
} else {
196+
ACPI_DEBUG_PRINT_RAW((ACPI_DB_TRACE_POINT, ", "));
197+
}
198+
}
199+
}
200+
150201
/*******************************************************************************
151202
*
152203
* FUNCTION: acpi_ex_start_trace_method

drivers/acpi/acpica/psobject.c

Lines changed: 15 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,8 @@ acpi_status
636636
acpi_ps_complete_final_op(struct acpi_walk_state *walk_state,
637637
union acpi_parse_object *op, acpi_status status)
638638
{
639-
acpi_status status2;
639+
acpi_status return_status = status;
640+
u8 ascending = TRUE;
640641

641642
ACPI_FUNCTION_TRACE_PTR(ps_complete_final_op, walk_state);
642643

@@ -650,7 +651,7 @@ acpi_ps_complete_final_op(struct acpi_walk_state *walk_state,
650651
op));
651652
do {
652653
if (op) {
653-
if (walk_state->ascending_callback != NULL) {
654+
if (ascending && walk_state->ascending_callback != NULL) {
654655
walk_state->op = op;
655656
walk_state->op_info =
656657
acpi_ps_get_opcode_info(op->common.
@@ -672,49 +673,26 @@ acpi_ps_complete_final_op(struct acpi_walk_state *walk_state,
672673
}
673674

674675
if (status == AE_CTRL_TERMINATE) {
675-
status = AE_OK;
676-
677-
/* Clean up */
678-
do {
679-
if (op) {
680-
status2 =
681-
acpi_ps_complete_this_op
682-
(walk_state, op);
683-
if (ACPI_FAILURE
684-
(status2)) {
685-
return_ACPI_STATUS
686-
(status2);
687-
}
688-
}
689-
690-
acpi_ps_pop_scope(&
691-
(walk_state->
692-
parser_state),
693-
&op,
694-
&walk_state->
695-
arg_types,
696-
&walk_state->
697-
arg_count);
698-
699-
} while (op);
700-
701-
return_ACPI_STATUS(status);
676+
ascending = FALSE;
677+
return_status = AE_CTRL_TERMINATE;
702678
}
703679

704680
else if (ACPI_FAILURE(status)) {
705681

706682
/* First error is most important */
707683

708-
(void)
709-
acpi_ps_complete_this_op(walk_state,
710-
op);
711-
return_ACPI_STATUS(status);
684+
ascending = FALSE;
685+
return_status = status;
712686
}
713687
}
714688

715-
status2 = acpi_ps_complete_this_op(walk_state, op);
716-
if (ACPI_FAILURE(status2)) {
717-
return_ACPI_STATUS(status2);
689+
status = acpi_ps_complete_this_op(walk_state, op);
690+
if (ACPI_FAILURE(status)) {
691+
ascending = FALSE;
692+
if (ACPI_SUCCESS(return_status) ||
693+
return_status == AE_CTRL_TERMINATE) {
694+
return_status = status;
695+
}
718696
}
719697
}
720698

@@ -724,5 +702,5 @@ acpi_ps_complete_final_op(struct acpi_walk_state *walk_state,
724702

725703
} while (op);
726704

727-
return_ACPI_STATUS(status);
705+
return_ACPI_STATUS(return_status);
728706
}

include/acpi/acpixf.h

Lines changed: 1 addition & 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 0x20240827
15+
#define ACPI_CA_VERSION 0x20241212
1616

1717
#include <acpi/acconfig.h>
1818
#include <acpi/actypes.h>

include/acpi/actbl1.h

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1024,17 +1024,18 @@ struct acpi_einj_entry {
10241024
/* Values for Action field above */
10251025

10261026
enum acpi_einj_actions {
1027-
ACPI_EINJ_BEGIN_OPERATION = 0,
1028-
ACPI_EINJ_GET_TRIGGER_TABLE = 1,
1029-
ACPI_EINJ_SET_ERROR_TYPE = 2,
1030-
ACPI_EINJ_GET_ERROR_TYPE = 3,
1031-
ACPI_EINJ_END_OPERATION = 4,
1032-
ACPI_EINJ_EXECUTE_OPERATION = 5,
1033-
ACPI_EINJ_CHECK_BUSY_STATUS = 6,
1034-
ACPI_EINJ_GET_COMMAND_STATUS = 7,
1035-
ACPI_EINJ_SET_ERROR_TYPE_WITH_ADDRESS = 8,
1036-
ACPI_EINJ_GET_EXECUTE_TIMINGS = 9,
1037-
ACPI_EINJ_ACTION_RESERVED = 10, /* 10 and greater are reserved */
1027+
ACPI_EINJ_BEGIN_OPERATION = 0x0,
1028+
ACPI_EINJ_GET_TRIGGER_TABLE = 0x1,
1029+
ACPI_EINJ_SET_ERROR_TYPE = 0x2,
1030+
ACPI_EINJ_GET_ERROR_TYPE = 0x3,
1031+
ACPI_EINJ_END_OPERATION = 0x4,
1032+
ACPI_EINJ_EXECUTE_OPERATION = 0x5,
1033+
ACPI_EINJ_CHECK_BUSY_STATUS = 0x6,
1034+
ACPI_EINJ_GET_COMMAND_STATUS = 0x7,
1035+
ACPI_EINJ_SET_ERROR_TYPE_WITH_ADDRESS = 0x8,
1036+
ACPI_EINJ_GET_EXECUTE_TIMINGS = 0x9,
1037+
ACPI_EINJV2_GET_ERROR_TYPE = 0x11,
1038+
ACPI_EINJ_ACTION_RESERVED = 0x12, /* 0x12 and greater are reserved */
10381039
ACPI_EINJ_TRIGGER_ERROR = 0xFF /* Except for this value */
10391040
};
10401041

include/acpi/actbl3.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ struct acpi_srat_gicc_affinity {
269269

270270
#define ACPI_SRAT_GICC_ENABLED (1) /* 00: Use affinity structure */
271271

272-
/* 4: GCC ITS Affinity (ACPI 6.2) */
272+
/* 4: GIC ITS Affinity (ACPI 6.2) */
273273

274274
struct acpi_srat_gic_its_affinity {
275275
struct acpi_subtable_header header;

0 commit comments

Comments
 (0)