Skip to content

Commit cdf65d7

Browse files
committed
ACPICA: Add a depth argument to acpi_execute_reg_methods()
A subsequent change will need to pass a depth argument to acpi_execute_reg_methods(), so prepare that function for it. No intentional functional changes. Signed-off-by: Rafael J. Wysocki <[email protected]> Reviewed-by: Hans de Goede <[email protected]> Cc: All applicable <[email protected]> Link: https://patch.msgid.link/[email protected]
1 parent 779bac9 commit cdf65d7

File tree

5 files changed

+14
-7
lines changed

5 files changed

+14
-7
lines changed

drivers/acpi/acpica/acevents.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ acpi_ev_detach_region(union acpi_operand_object *region_obj,
188188
u8 acpi_ns_is_locked);
189189

190190
void
191-
acpi_ev_execute_reg_methods(struct acpi_namespace_node *node,
191+
acpi_ev_execute_reg_methods(struct acpi_namespace_node *node, u32 max_depth,
192192
acpi_adr_space_type space_id, u32 function);
193193

194194
acpi_status

drivers/acpi/acpica/evregion.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ acpi_status acpi_ev_initialize_op_regions(void)
6565
acpi_gbl_default_address_spaces
6666
[i])) {
6767
acpi_ev_execute_reg_methods(acpi_gbl_root_node,
68+
ACPI_UINT32_MAX,
6869
acpi_gbl_default_address_spaces
6970
[i], ACPI_REG_CONNECT);
7071
}
@@ -672,6 +673,7 @@ acpi_ev_execute_reg_method(union acpi_operand_object *region_obj, u32 function)
672673
* FUNCTION: acpi_ev_execute_reg_methods
673674
*
674675
* PARAMETERS: node - Namespace node for the device
676+
* max_depth - Depth to which search for _REG
675677
* space_id - The address space ID
676678
* function - Passed to _REG: On (1) or Off (0)
677679
*
@@ -683,7 +685,7 @@ acpi_ev_execute_reg_method(union acpi_operand_object *region_obj, u32 function)
683685
******************************************************************************/
684686

685687
void
686-
acpi_ev_execute_reg_methods(struct acpi_namespace_node *node,
688+
acpi_ev_execute_reg_methods(struct acpi_namespace_node *node, u32 max_depth,
687689
acpi_adr_space_type space_id, u32 function)
688690
{
689691
struct acpi_reg_walk_info info;
@@ -717,7 +719,7 @@ acpi_ev_execute_reg_methods(struct acpi_namespace_node *node,
717719
* regions and _REG methods. (i.e. handlers must be installed for all
718720
* regions of this Space ID before we can run any _REG methods)
719721
*/
720-
(void)acpi_ns_walk_namespace(ACPI_TYPE_ANY, node, ACPI_UINT32_MAX,
722+
(void)acpi_ns_walk_namespace(ACPI_TYPE_ANY, node, max_depth,
721723
ACPI_NS_WALK_UNLOCK, acpi_ev_reg_run, NULL,
722724
&info, NULL);
723725

drivers/acpi/acpica/evxfregn.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ acpi_install_address_space_handler_internal(acpi_handle device,
8585
/* Run all _REG methods for this address space */
8686

8787
if (run_reg) {
88-
acpi_ev_execute_reg_methods(node, space_id, ACPI_REG_CONNECT);
88+
acpi_ev_execute_reg_methods(node, ACPI_UINT32_MAX, space_id,
89+
ACPI_REG_CONNECT);
8990
}
9091

9192
unlock_and_exit:
@@ -263,6 +264,7 @@ ACPI_EXPORT_SYMBOL(acpi_remove_address_space_handler)
263264
* FUNCTION: acpi_execute_reg_methods
264265
*
265266
* PARAMETERS: device - Handle for the device
267+
* max_depth - Depth to which search for _REG
266268
* space_id - The address space ID
267269
*
268270
* RETURN: Status
@@ -271,7 +273,8 @@ ACPI_EXPORT_SYMBOL(acpi_remove_address_space_handler)
271273
*
272274
******************************************************************************/
273275
acpi_status
274-
acpi_execute_reg_methods(acpi_handle device, acpi_adr_space_type space_id)
276+
acpi_execute_reg_methods(acpi_handle device, u32 max_depth,
277+
acpi_adr_space_type space_id)
275278
{
276279
struct acpi_namespace_node *node;
277280
acpi_status status;
@@ -296,7 +299,8 @@ acpi_execute_reg_methods(acpi_handle device, acpi_adr_space_type space_id)
296299

297300
/* Run all _REG methods for this address space */
298301

299-
acpi_ev_execute_reg_methods(node, space_id, ACPI_REG_CONNECT);
302+
acpi_ev_execute_reg_methods(node, max_depth, space_id,
303+
ACPI_REG_CONNECT);
300304
} else {
301305
status = AE_BAD_PARAMETER;
302306
}

drivers/acpi/ec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1506,7 +1506,7 @@ static int ec_install_handlers(struct acpi_ec *ec, struct acpi_device *device,
15061506
}
15071507

15081508
if (call_reg && !test_bit(EC_FLAGS_EC_REG_CALLED, &ec->flags)) {
1509-
acpi_execute_reg_methods(scope_handle, ACPI_ADR_SPACE_EC);
1509+
acpi_execute_reg_methods(scope_handle, ACPI_UINT32_MAX, ACPI_ADR_SPACE_EC);
15101510
set_bit(EC_FLAGS_EC_REG_CALLED, &ec->flags);
15111511
}
15121512

include/acpi/acpixf.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -660,6 +660,7 @@ ACPI_EXTERNAL_RETURN_STATUS(acpi_status
660660
void *context))
661661
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
662662
acpi_execute_reg_methods(acpi_handle device,
663+
u32 nax_depth,
663664
acpi_adr_space_type
664665
space_id))
665666
ACPI_EXTERNAL_RETURN_STATUS(acpi_status

0 commit comments

Comments
 (0)