// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 /****************************************************************************** * * Module Name: utinit - Common ACPI subsystem initialization * * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ #include <acpi/acpi.h> #include "accommon.h" #include "acnamesp.h" #include "acevents.h" #include "actables.h" #define _COMPONENT … ACPI_MODULE_NAME("utinit") /* Local prototypes */ static void acpi_ut_terminate(void); #if (!ACPI_REDUCED_HARDWARE) static void acpi_ut_free_gpe_lists(void); #else #define acpi_ut_free_gpe_lists() … #endif /* !ACPI_REDUCED_HARDWARE */ #if (!ACPI_REDUCED_HARDWARE) /****************************************************************************** * * FUNCTION: acpi_ut_free_gpe_lists * * PARAMETERS: none * * RETURN: none * * DESCRIPTION: Free global GPE lists * ******************************************************************************/ static void acpi_ut_free_gpe_lists(void) { struct acpi_gpe_block_info *gpe_block; struct acpi_gpe_block_info *next_gpe_block; struct acpi_gpe_xrupt_info *gpe_xrupt_info; struct acpi_gpe_xrupt_info *next_gpe_xrupt_info; /* Free global GPE blocks and related info structures */ gpe_xrupt_info = acpi_gbl_gpe_xrupt_list_head; while (gpe_xrupt_info) { gpe_block = gpe_xrupt_info->gpe_block_list_head; while (gpe_block) { next_gpe_block = gpe_block->next; ACPI_FREE(gpe_block->event_info); ACPI_FREE(gpe_block->register_info); ACPI_FREE(gpe_block); gpe_block = next_gpe_block; } next_gpe_xrupt_info = gpe_xrupt_info->next; ACPI_FREE(gpe_xrupt_info); gpe_xrupt_info = next_gpe_xrupt_info; } } #endif /* !ACPI_REDUCED_HARDWARE */ /******************************************************************************* * * FUNCTION: acpi_ut_init_globals * * PARAMETERS: None * * RETURN: Status * * DESCRIPTION: Initialize ACPICA globals. All globals that require specific * initialization should be initialized here. This allows for * a warm restart. * ******************************************************************************/ acpi_status acpi_ut_init_globals(void) { … } /****************************************************************************** * * FUNCTION: acpi_ut_terminate * * PARAMETERS: none * * RETURN: none * * DESCRIPTION: Free global memory * ******************************************************************************/ static void acpi_ut_terminate(void) { … } /******************************************************************************* * * FUNCTION: acpi_ut_subsystem_shutdown * * PARAMETERS: None * * RETURN: None * * DESCRIPTION: Shutdown the various components. Do not delete the mutex * objects here, because the AML debugger may be still running. * ******************************************************************************/ void acpi_ut_subsystem_shutdown(void) { … }