aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/utinit.c
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2012-02-14 05:14:27 -0500
committerLen Brown <len.brown@intel.com>2012-03-22 01:44:49 -0400
commit33620c5419e8a11814dd11e02a80e6ef77a43407 (patch)
tree8643dbb1e332dd9ece6fb92f22000413e8d8fdc7 /drivers/acpi/acpica/utinit.c
parentd08310fe0d6bd8c82da94e8d8ef48bdbe14d2bd1 (diff)
ACPICA: Support for custom ACPICA build for ACPI 5 reduced hardware
Add ACPI_REDUCED_HARDWARE flag that removes all hardware-related code (about 10% code, 5% static data). Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/utinit.c')
-rw-r--r--drivers/acpi/acpica/utinit.c37
1 files changed, 32 insertions, 5 deletions
diff --git a/drivers/acpi/acpica/utinit.c b/drivers/acpi/acpica/utinit.c
index 8359c0c5dc98..246798e4c938 100644
--- a/drivers/acpi/acpica/utinit.c
+++ b/drivers/acpi/acpica/utinit.c
@@ -53,27 +53,35 @@ ACPI_MODULE_NAME("utinit")
53/* Local prototypes */ 53/* Local prototypes */
54static void acpi_ut_terminate(void); 54static void acpi_ut_terminate(void);
55 55
56#if (!ACPI_REDUCED_HARDWARE)
57
58static void acpi_ut_free_gpe_lists(void);
59
60#else
61
62#define acpi_ut_free_gpe_lists()
63#endif /* !ACPI_REDUCED_HARDWARE */
64
65#if (!ACPI_REDUCED_HARDWARE)
56/****************************************************************************** 66/******************************************************************************
57 * 67 *
58 * FUNCTION: acpi_ut_terminate 68 * FUNCTION: acpi_ut_free_gpe_lists
59 * 69 *
60 * PARAMETERS: none 70 * PARAMETERS: none
61 * 71 *
62 * RETURN: none 72 * RETURN: none
63 * 73 *
64 * DESCRIPTION: Free global memory 74 * DESCRIPTION: Free global GPE lists
65 * 75 *
66 ******************************************************************************/ 76 ******************************************************************************/
67 77
68static void acpi_ut_terminate(void) 78static void acpi_ut_free_gpe_lists(void)
69{ 79{
70 struct acpi_gpe_block_info *gpe_block; 80 struct acpi_gpe_block_info *gpe_block;
71 struct acpi_gpe_block_info *next_gpe_block; 81 struct acpi_gpe_block_info *next_gpe_block;
72 struct acpi_gpe_xrupt_info *gpe_xrupt_info; 82 struct acpi_gpe_xrupt_info *gpe_xrupt_info;
73 struct acpi_gpe_xrupt_info *next_gpe_xrupt_info; 83 struct acpi_gpe_xrupt_info *next_gpe_xrupt_info;
74 84
75 ACPI_FUNCTION_TRACE(ut_terminate);
76
77 /* Free global GPE blocks and related info structures */ 85 /* Free global GPE blocks and related info structures */
78 86
79 gpe_xrupt_info = acpi_gbl_gpe_xrupt_list_head; 87 gpe_xrupt_info = acpi_gbl_gpe_xrupt_list_head;
@@ -91,7 +99,26 @@ static void acpi_ut_terminate(void)
91 ACPI_FREE(gpe_xrupt_info); 99 ACPI_FREE(gpe_xrupt_info);
92 gpe_xrupt_info = next_gpe_xrupt_info; 100 gpe_xrupt_info = next_gpe_xrupt_info;
93 } 101 }
102}
103#endif /* !ACPI_REDUCED_HARDWARE */
104
105/******************************************************************************
106 *
107 * FUNCTION: acpi_ut_terminate
108 *
109 * PARAMETERS: none
110 *
111 * RETURN: none
112 *
113 * DESCRIPTION: Free global memory
114 *
115 ******************************************************************************/
116
117static void acpi_ut_terminate(void)
118{
119 ACPI_FUNCTION_TRACE(ut_terminate);
94 120
121 acpi_ut_free_gpe_lists();
95 acpi_ut_delete_address_lists(); 122 acpi_ut_delete_address_lists();
96 return_VOID; 123 return_VOID;
97} 124}