Erik Schmauss | 9585763 | 2018-03-14 16:13:07 -0700 | [diff] [blame] | 1 | // SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2 | /****************************************************************************** |
| 3 | * |
| 4 | * Module Name: evrgnini- ACPI address_space (op_region) init |
| 5 | * |
Bob Moore | da6f832 | 2018-01-04 10:06:38 -0800 | [diff] [blame] | 6 | * Copyright (C) 2000 - 2018, Intel Corp. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 7 | * |
Erik Schmauss | 9585763 | 2018-03-14 16:13:07 -0700 | [diff] [blame] | 8 | *****************************************************************************/ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 9 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 10 | #include <acpi/acpi.h> |
Len Brown | e2f7a77 | 2009-01-09 00:30:03 -0500 | [diff] [blame] | 11 | #include "accommon.h" |
| 12 | #include "acevents.h" |
| 13 | #include "acnamesp.h" |
Lv Zheng | 8633db6 | 2016-10-26 15:42:01 +0800 | [diff] [blame] | 14 | #include "acinterp.h" |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 15 | |
| 16 | #define _COMPONENT ACPI_EVENTS |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 17 | ACPI_MODULE_NAME("evrgnini") |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 18 | |
| 19 | /******************************************************************************* |
| 20 | * |
| 21 | * FUNCTION: acpi_ev_system_memory_region_setup |
| 22 | * |
Bob Moore | ba494be | 2012-07-12 09:40:10 +0800 | [diff] [blame] | 23 | * PARAMETERS: handle - Region we are interested in |
| 24 | * function - Start or stop |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 25 | * handler_context - Address space handler context |
| 26 | * region_context - Region specific context |
| 27 | * |
| 28 | * RETURN: Status |
| 29 | * |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 30 | * DESCRIPTION: Setup a system_memory operation region |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 31 | * |
| 32 | ******************************************************************************/ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 33 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 34 | acpi_ev_system_memory_region_setup(acpi_handle handle, |
| 35 | u32 function, |
| 36 | void *handler_context, void **region_context) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 37 | { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 38 | union acpi_operand_object *region_desc = |
| 39 | (union acpi_operand_object *)handle; |
| 40 | struct acpi_mem_space_context *local_region_context; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 41 | |
Bob Moore | b229cf9 | 2006-04-21 17:15:00 -0400 | [diff] [blame] | 42 | ACPI_FUNCTION_TRACE(ev_system_memory_region_setup); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 43 | |
| 44 | if (function == ACPI_REGION_DEACTIVATE) { |
| 45 | if (*region_context) { |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 46 | local_region_context = |
| 47 | (struct acpi_mem_space_context *)*region_context; |
| 48 | |
| 49 | /* Delete a cached mapping if present */ |
| 50 | |
| 51 | if (local_region_context->mapped_length) { |
| 52 | acpi_os_unmap_memory(local_region_context-> |
| 53 | mapped_logical_address, |
| 54 | local_region_context-> |
| 55 | mapped_length); |
| 56 | } |
| 57 | ACPI_FREE(local_region_context); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 58 | *region_context = NULL; |
| 59 | } |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 60 | return_ACPI_STATUS(AE_OK); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 61 | } |
| 62 | |
| 63 | /* Create a new context */ |
| 64 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 65 | local_region_context = |
Bob Moore | 8313524 | 2006-10-03 00:00:00 -0400 | [diff] [blame] | 66 | ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_mem_space_context)); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 67 | if (!(local_region_context)) { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 68 | return_ACPI_STATUS(AE_NO_MEMORY); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 69 | } |
| 70 | |
| 71 | /* Save the region length and address for use in the handler */ |
| 72 | |
| 73 | local_region_context->length = region_desc->region.length; |
| 74 | local_region_context->address = region_desc->region.address; |
| 75 | |
| 76 | *region_context = local_region_context; |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 77 | return_ACPI_STATUS(AE_OK); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 78 | } |
| 79 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 80 | /******************************************************************************* |
| 81 | * |
| 82 | * FUNCTION: acpi_ev_io_space_region_setup |
| 83 | * |
Bob Moore | ba494be | 2012-07-12 09:40:10 +0800 | [diff] [blame] | 84 | * PARAMETERS: handle - Region we are interested in |
| 85 | * function - Start or stop |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 86 | * handler_context - Address space handler context |
| 87 | * region_context - Region specific context |
| 88 | * |
| 89 | * RETURN: Status |
| 90 | * |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 91 | * DESCRIPTION: Setup a IO operation region |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 92 | * |
| 93 | ******************************************************************************/ |
| 94 | |
| 95 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 96 | acpi_ev_io_space_region_setup(acpi_handle handle, |
| 97 | u32 function, |
| 98 | void *handler_context, void **region_context) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 99 | { |
Bob Moore | b229cf9 | 2006-04-21 17:15:00 -0400 | [diff] [blame] | 100 | ACPI_FUNCTION_TRACE(ev_io_space_region_setup); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 101 | |
| 102 | if (function == ACPI_REGION_DEACTIVATE) { |
| 103 | *region_context = NULL; |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 104 | } else { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 105 | *region_context = handler_context; |
| 106 | } |
| 107 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 108 | return_ACPI_STATUS(AE_OK); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 109 | } |
| 110 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 111 | /******************************************************************************* |
| 112 | * |
| 113 | * FUNCTION: acpi_ev_pci_config_region_setup |
| 114 | * |
Bob Moore | ba494be | 2012-07-12 09:40:10 +0800 | [diff] [blame] | 115 | * PARAMETERS: handle - Region we are interested in |
| 116 | * function - Start or stop |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 117 | * handler_context - Address space handler context |
| 118 | * region_context - Region specific context |
| 119 | * |
| 120 | * RETURN: Status |
| 121 | * |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 122 | * DESCRIPTION: Setup a PCI_Config operation region |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 123 | * |
| 124 | * MUTEX: Assumes namespace is not locked |
| 125 | * |
| 126 | ******************************************************************************/ |
| 127 | |
| 128 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 129 | acpi_ev_pci_config_region_setup(acpi_handle handle, |
| 130 | u32 function, |
| 131 | void *handler_context, void **region_context) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 132 | { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 133 | acpi_status status = AE_OK; |
Bob Moore | 5df7e6c | 2010-01-21 10:06:32 +0800 | [diff] [blame] | 134 | u64 pci_value; |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 135 | struct acpi_pci_id *pci_id = *region_context; |
| 136 | union acpi_operand_object *handler_obj; |
| 137 | struct acpi_namespace_node *parent_node; |
| 138 | struct acpi_namespace_node *pci_root_node; |
Bob Moore | b7a6980 | 2007-02-02 19:48:21 +0300 | [diff] [blame] | 139 | struct acpi_namespace_node *pci_device_node; |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 140 | union acpi_operand_object *region_obj = |
| 141 | (union acpi_operand_object *)handle; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 142 | |
Bob Moore | b229cf9 | 2006-04-21 17:15:00 -0400 | [diff] [blame] | 143 | ACPI_FUNCTION_TRACE(ev_pci_config_region_setup); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 144 | |
| 145 | handler_obj = region_obj->region.handler; |
| 146 | if (!handler_obj) { |
| 147 | /* |
| 148 | * No installed handler. This shouldn't happen because the dispatch |
| 149 | * routine checks before we get here, but we check again just in case. |
| 150 | */ |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 151 | ACPI_DEBUG_PRINT((ACPI_DB_OPREGION, |
| 152 | "Attempting to init a region %p, with no handler\n", |
| 153 | region_obj)); |
| 154 | return_ACPI_STATUS(AE_NOT_EXIST); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 155 | } |
| 156 | |
| 157 | *region_context = NULL; |
| 158 | if (function == ACPI_REGION_DEACTIVATE) { |
| 159 | if (pci_id) { |
Bob Moore | 8313524 | 2006-10-03 00:00:00 -0400 | [diff] [blame] | 160 | ACPI_FREE(pci_id); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 161 | } |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 162 | return_ACPI_STATUS(status); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 163 | } |
| 164 | |
Alexey Starikovskiy | c45b5c0 | 2010-05-26 11:53:07 +0800 | [diff] [blame] | 165 | parent_node = region_obj->region.node->parent; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 166 | |
| 167 | /* |
| 168 | * Get the _SEG and _BBN values from the device upon which the handler |
| 169 | * is installed. |
| 170 | * |
| 171 | * We need to get the _SEG and _BBN objects relative to the PCI BUS device. |
| 172 | * This is the device the handler has been registered to handle. |
| 173 | */ |
| 174 | |
| 175 | /* |
| 176 | * If the address_space.Node is still pointing to the root, we need |
| 177 | * to scan upward for a PCI Root bridge and re-associate the op_region |
| 178 | * handlers with that device. |
| 179 | */ |
| 180 | if (handler_obj->address_space.node == acpi_gbl_root_node) { |
Bob Moore | 52fc0b0 | 2006-10-02 00:00:00 -0400 | [diff] [blame] | 181 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 182 | /* Start search from the parent object */ |
| 183 | |
| 184 | pci_root_node = parent_node; |
| 185 | while (pci_root_node != acpi_gbl_root_node) { |
Bob Moore | 52fc0b0 | 2006-10-02 00:00:00 -0400 | [diff] [blame] | 186 | |
Bob Moore | b7a6980 | 2007-02-02 19:48:21 +0300 | [diff] [blame] | 187 | /* Get the _HID/_CID in order to detect a root_bridge */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 188 | |
Bob Moore | b7a6980 | 2007-02-02 19:48:21 +0300 | [diff] [blame] | 189 | if (acpi_ev_is_pci_root_bridge(pci_root_node)) { |
| 190 | |
| 191 | /* Install a handler for this PCI root bridge */ |
| 192 | |
Lv Zheng | f5c1e1c | 2016-05-05 12:57:53 +0800 | [diff] [blame] | 193 | status = acpi_install_address_space_handler((acpi_handle)pci_root_node, ACPI_ADR_SPACE_PCI_CONFIG, ACPI_DEFAULT_HANDLER, NULL, NULL); |
Bob Moore | b7a6980 | 2007-02-02 19:48:21 +0300 | [diff] [blame] | 194 | if (ACPI_FAILURE(status)) { |
| 195 | if (status == AE_SAME_HANDLER) { |
| 196 | /* |
Bob Moore | 9f15fc6 | 2008-11-12 16:01:56 +0800 | [diff] [blame] | 197 | * It is OK if the handler is already installed on the |
| 198 | * root bridge. Still need to return a context object |
| 199 | * for the new PCI_Config operation region, however. |
Bob Moore | b7a6980 | 2007-02-02 19:48:21 +0300 | [diff] [blame] | 200 | */ |
| 201 | status = AE_OK; |
| 202 | } else { |
| 203 | ACPI_EXCEPTION((AE_INFO, status, |
Bob Moore | d4913dc | 2009-03-06 10:05:18 +0800 | [diff] [blame] | 204 | "Could not install PciConfig handler " |
| 205 | "for Root Bridge %4.4s", |
Bob Moore | b7a6980 | 2007-02-02 19:48:21 +0300 | [diff] [blame] | 206 | acpi_ut_get_node_name |
| 207 | (pci_root_node))); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 208 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 209 | } |
Bob Moore | b7a6980 | 2007-02-02 19:48:21 +0300 | [diff] [blame] | 210 | break; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 211 | } |
| 212 | |
Alexey Starikovskiy | c45b5c0 | 2010-05-26 11:53:07 +0800 | [diff] [blame] | 213 | pci_root_node = pci_root_node->parent; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 214 | } |
| 215 | |
| 216 | /* PCI root bridge not found, use namespace root node */ |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 217 | } else { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 218 | pci_root_node = handler_obj->address_space.node; |
| 219 | } |
| 220 | |
| 221 | /* |
| 222 | * If this region is now initialized, we are done. |
| 223 | * (install_address_space_handler could have initialized it) |
| 224 | */ |
| 225 | if (region_obj->region.flags & AOPOBJ_SETUP_COMPLETE) { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 226 | return_ACPI_STATUS(AE_OK); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 227 | } |
| 228 | |
| 229 | /* Region is still not initialized. Create a new context */ |
| 230 | |
Bob Moore | 8313524 | 2006-10-03 00:00:00 -0400 | [diff] [blame] | 231 | pci_id = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_pci_id)); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 232 | if (!pci_id) { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 233 | return_ACPI_STATUS(AE_NO_MEMORY); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 234 | } |
| 235 | |
| 236 | /* |
Bob Moore | 9f15fc6 | 2008-11-12 16:01:56 +0800 | [diff] [blame] | 237 | * For PCI_Config space access, we need the segment, bus, device and |
| 238 | * function numbers. Acquire them here. |
Bob Moore | b7a6980 | 2007-02-02 19:48:21 +0300 | [diff] [blame] | 239 | * |
| 240 | * Find the parent device object. (This allows the operation region to be |
| 241 | * within a subscope under the device, such as a control method.) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 242 | */ |
Bob Moore | b7a6980 | 2007-02-02 19:48:21 +0300 | [diff] [blame] | 243 | pci_device_node = region_obj->region.node; |
| 244 | while (pci_device_node && (pci_device_node->type != ACPI_TYPE_DEVICE)) { |
Alexey Starikovskiy | c45b5c0 | 2010-05-26 11:53:07 +0800 | [diff] [blame] | 245 | pci_device_node = pci_device_node->parent; |
Bob Moore | b7a6980 | 2007-02-02 19:48:21 +0300 | [diff] [blame] | 246 | } |
| 247 | |
| 248 | if (!pci_device_node) { |
Jesper Juhl | e691731 | 2007-07-19 00:48:03 +0200 | [diff] [blame] | 249 | ACPI_FREE(pci_id); |
Bob Moore | b7a6980 | 2007-02-02 19:48:21 +0300 | [diff] [blame] | 250 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
| 251 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 252 | |
| 253 | /* |
Bob Moore | 95abccb | 2010-09-15 13:22:46 +0800 | [diff] [blame] | 254 | * Get the PCI device and function numbers from the _ADR object |
| 255 | * contained in the parent's scope. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 256 | */ |
Bob Moore | d4913dc | 2009-03-06 10:05:18 +0800 | [diff] [blame] | 257 | status = acpi_ut_evaluate_numeric_object(METHOD_NAME__ADR, |
| 258 | pci_device_node, &pci_value); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 259 | |
| 260 | /* |
Bob Moore | 9f15fc6 | 2008-11-12 16:01:56 +0800 | [diff] [blame] | 261 | * The default is zero, and since the allocation above zeroed the data, |
| 262 | * just do nothing on failure. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 263 | */ |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 264 | if (ACPI_SUCCESS(status)) { |
| 265 | pci_id->device = ACPI_HIWORD(ACPI_LODWORD(pci_value)); |
| 266 | pci_id->function = ACPI_LOWORD(ACPI_LODWORD(pci_value)); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 267 | } |
| 268 | |
| 269 | /* The PCI segment number comes from the _SEG method */ |
| 270 | |
Bob Moore | d4913dc | 2009-03-06 10:05:18 +0800 | [diff] [blame] | 271 | status = acpi_ut_evaluate_numeric_object(METHOD_NAME__SEG, |
| 272 | pci_root_node, &pci_value); |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 273 | if (ACPI_SUCCESS(status)) { |
| 274 | pci_id->segment = ACPI_LOWORD(pci_value); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 275 | } |
| 276 | |
| 277 | /* The PCI bus number comes from the _BBN method */ |
| 278 | |
Bob Moore | d4913dc | 2009-03-06 10:05:18 +0800 | [diff] [blame] | 279 | status = acpi_ut_evaluate_numeric_object(METHOD_NAME__BBN, |
| 280 | pci_root_node, &pci_value); |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 281 | if (ACPI_SUCCESS(status)) { |
| 282 | pci_id->bus = ACPI_LOWORD(pci_value); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 283 | } |
| 284 | |
Bob Moore | 95abccb | 2010-09-15 13:22:46 +0800 | [diff] [blame] | 285 | /* Complete/update the PCI ID for this device */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 286 | |
Bob Moore | 95abccb | 2010-09-15 13:22:46 +0800 | [diff] [blame] | 287 | status = |
| 288 | acpi_hw_derive_pci_id(pci_id, pci_root_node, |
| 289 | region_obj->region.node); |
| 290 | if (ACPI_FAILURE(status)) { |
| 291 | ACPI_FREE(pci_id); |
| 292 | return_ACPI_STATUS(status); |
| 293 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 294 | |
| 295 | *region_context = pci_id; |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 296 | return_ACPI_STATUS(AE_OK); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 297 | } |
| 298 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 299 | /******************************************************************************* |
| 300 | * |
Bob Moore | b7a6980 | 2007-02-02 19:48:21 +0300 | [diff] [blame] | 301 | * FUNCTION: acpi_ev_is_pci_root_bridge |
| 302 | * |
Bob Moore | ba494be | 2012-07-12 09:40:10 +0800 | [diff] [blame] | 303 | * PARAMETERS: node - Device node being examined |
Bob Moore | b7a6980 | 2007-02-02 19:48:21 +0300 | [diff] [blame] | 304 | * |
| 305 | * RETURN: TRUE if device is a PCI/PCI-Express Root Bridge |
| 306 | * |
| 307 | * DESCRIPTION: Determine if the input device represents a PCI Root Bridge by |
| 308 | * examining the _HID and _CID for the device. |
| 309 | * |
| 310 | ******************************************************************************/ |
| 311 | |
Bob Moore | 8b1cafd | 2018-10-03 11:45:38 -0700 | [diff] [blame^] | 312 | u8 acpi_ev_is_pci_root_bridge(struct acpi_namespace_node *node) |
Bob Moore | b7a6980 | 2007-02-02 19:48:21 +0300 | [diff] [blame] | 313 | { |
| 314 | acpi_status status; |
Lv Zheng | 78e25fe | 2012-10-31 02:25:24 +0000 | [diff] [blame] | 315 | struct acpi_pnp_device_id *hid; |
| 316 | struct acpi_pnp_device_id_list *cid; |
Bob Moore | 67a119f | 2008-06-10 13:42:13 +0800 | [diff] [blame] | 317 | u32 i; |
Bob Moore | 15b8dd5 | 2009-06-29 13:39:29 +0800 | [diff] [blame] | 318 | u8 match; |
Bob Moore | b7a6980 | 2007-02-02 19:48:21 +0300 | [diff] [blame] | 319 | |
Bob Moore | 9f15fc6 | 2008-11-12 16:01:56 +0800 | [diff] [blame] | 320 | /* Get the _HID and check for a PCI Root Bridge */ |
| 321 | |
Bob Moore | b7a6980 | 2007-02-02 19:48:21 +0300 | [diff] [blame] | 322 | status = acpi_ut_execute_HID(node, &hid); |
| 323 | if (ACPI_FAILURE(status)) { |
| 324 | return (FALSE); |
| 325 | } |
| 326 | |
Bob Moore | 15b8dd5 | 2009-06-29 13:39:29 +0800 | [diff] [blame] | 327 | match = acpi_ut_is_pci_root_bridge(hid->string); |
| 328 | ACPI_FREE(hid); |
| 329 | |
| 330 | if (match) { |
Bob Moore | b7a6980 | 2007-02-02 19:48:21 +0300 | [diff] [blame] | 331 | return (TRUE); |
| 332 | } |
| 333 | |
Bob Moore | 9f15fc6 | 2008-11-12 16:01:56 +0800 | [diff] [blame] | 334 | /* The _HID did not match. Get the _CID and check for a PCI Root Bridge */ |
| 335 | |
Bob Moore | b7a6980 | 2007-02-02 19:48:21 +0300 | [diff] [blame] | 336 | status = acpi_ut_execute_CID(node, &cid); |
| 337 | if (ACPI_FAILURE(status)) { |
| 338 | return (FALSE); |
| 339 | } |
| 340 | |
| 341 | /* Check all _CIDs in the returned list */ |
| 342 | |
| 343 | for (i = 0; i < cid->count; i++) { |
Bob Moore | 15b8dd5 | 2009-06-29 13:39:29 +0800 | [diff] [blame] | 344 | if (acpi_ut_is_pci_root_bridge(cid->ids[i].string)) { |
Bob Moore | b7a6980 | 2007-02-02 19:48:21 +0300 | [diff] [blame] | 345 | ACPI_FREE(cid); |
| 346 | return (TRUE); |
| 347 | } |
| 348 | } |
| 349 | |
| 350 | ACPI_FREE(cid); |
| 351 | return (FALSE); |
| 352 | } |
| 353 | |
| 354 | /******************************************************************************* |
| 355 | * |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 356 | * FUNCTION: acpi_ev_pci_bar_region_setup |
| 357 | * |
Bob Moore | ba494be | 2012-07-12 09:40:10 +0800 | [diff] [blame] | 358 | * PARAMETERS: handle - Region we are interested in |
| 359 | * function - Start or stop |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 360 | * handler_context - Address space handler context |
| 361 | * region_context - Region specific context |
| 362 | * |
| 363 | * RETURN: Status |
| 364 | * |
Bob Moore | ba494be | 2012-07-12 09:40:10 +0800 | [diff] [blame] | 365 | * DESCRIPTION: Setup a pci_BAR operation region |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 366 | * |
| 367 | * MUTEX: Assumes namespace is not locked |
| 368 | * |
| 369 | ******************************************************************************/ |
| 370 | |
| 371 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 372 | acpi_ev_pci_bar_region_setup(acpi_handle handle, |
| 373 | u32 function, |
| 374 | void *handler_context, void **region_context) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 375 | { |
Bob Moore | b229cf9 | 2006-04-21 17:15:00 -0400 | [diff] [blame] | 376 | ACPI_FUNCTION_TRACE(ev_pci_bar_region_setup); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 377 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 378 | return_ACPI_STATUS(AE_OK); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 379 | } |
| 380 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 381 | /******************************************************************************* |
| 382 | * |
| 383 | * FUNCTION: acpi_ev_cmos_region_setup |
| 384 | * |
Bob Moore | ba494be | 2012-07-12 09:40:10 +0800 | [diff] [blame] | 385 | * PARAMETERS: handle - Region we are interested in |
| 386 | * function - Start or stop |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 387 | * handler_context - Address space handler context |
| 388 | * region_context - Region specific context |
| 389 | * |
| 390 | * RETURN: Status |
| 391 | * |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 392 | * DESCRIPTION: Setup a CMOS operation region |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 393 | * |
| 394 | * MUTEX: Assumes namespace is not locked |
| 395 | * |
| 396 | ******************************************************************************/ |
| 397 | |
| 398 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 399 | acpi_ev_cmos_region_setup(acpi_handle handle, |
| 400 | u32 function, |
| 401 | void *handler_context, void **region_context) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 402 | { |
Bob Moore | b229cf9 | 2006-04-21 17:15:00 -0400 | [diff] [blame] | 403 | ACPI_FUNCTION_TRACE(ev_cmos_region_setup); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 404 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 405 | return_ACPI_STATUS(AE_OK); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 406 | } |
| 407 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 408 | /******************************************************************************* |
| 409 | * |
| 410 | * FUNCTION: acpi_ev_default_region_setup |
| 411 | * |
Bob Moore | ba494be | 2012-07-12 09:40:10 +0800 | [diff] [blame] | 412 | * PARAMETERS: handle - Region we are interested in |
| 413 | * function - Start or stop |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 414 | * handler_context - Address space handler context |
| 415 | * region_context - Region specific context |
| 416 | * |
| 417 | * RETURN: Status |
| 418 | * |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 419 | * DESCRIPTION: Default region initialization |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 420 | * |
| 421 | ******************************************************************************/ |
| 422 | |
| 423 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 424 | acpi_ev_default_region_setup(acpi_handle handle, |
| 425 | u32 function, |
| 426 | void *handler_context, void **region_context) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 427 | { |
Bob Moore | b229cf9 | 2006-04-21 17:15:00 -0400 | [diff] [blame] | 428 | ACPI_FUNCTION_TRACE(ev_default_region_setup); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 429 | |
| 430 | if (function == ACPI_REGION_DEACTIVATE) { |
| 431 | *region_context = NULL; |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 432 | } else { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 433 | *region_context = handler_context; |
| 434 | } |
| 435 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 436 | return_ACPI_STATUS(AE_OK); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 437 | } |
| 438 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 439 | /******************************************************************************* |
| 440 | * |
| 441 | * FUNCTION: acpi_ev_initialize_region |
| 442 | * |
| 443 | * PARAMETERS: region_obj - Region we are initializing |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 444 | * |
| 445 | * RETURN: Status |
| 446 | * |
| 447 | * DESCRIPTION: Initializes the region, finds any _REG methods and saves them |
| 448 | * for execution at a later time |
| 449 | * |
| 450 | * Get the appropriate address space handler for a newly |
| 451 | * created region. |
| 452 | * |
Bob Moore | 9f15fc6 | 2008-11-12 16:01:56 +0800 | [diff] [blame] | 453 | * This also performs address space specific initialization. For |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 454 | * example, PCI regions must have an _ADR object that contains |
Bob Moore | 9f15fc6 | 2008-11-12 16:01:56 +0800 | [diff] [blame] | 455 | * a PCI address in the scope of the definition. This address is |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 456 | * required to perform an access to PCI config space. |
| 457 | * |
Bob Moore | c9e3ba2 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 458 | * MUTEX: Interpreter should be unlocked, because we may run the _REG |
| 459 | * method for this region. |
| 460 | * |
Lv Zheng | 760235c | 2016-11-30 15:21:12 +0800 | [diff] [blame] | 461 | * NOTE: Possible incompliance: |
| 462 | * There is a behavior conflict in automatic _REG execution: |
| 463 | * 1. When the interpreter is evaluating a method, we can only |
| 464 | * automatically run _REG for the following case: |
| 465 | * operation_region (OPR1, 0x80, 0x1000010, 0x4) |
| 466 | * 2. When the interpreter is loading a table, we can also |
| 467 | * automatically run _REG for the following case: |
| 468 | * operation_region (OPR1, 0x80, 0x1000010, 0x4) |
| 469 | * Though this may not be compliant to the de-facto standard, the |
| 470 | * logic is kept in order not to trigger regressions. And keeping |
| 471 | * this logic should be taken care by the caller of this function. |
| 472 | * |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 473 | ******************************************************************************/ |
| 474 | |
Lv Zheng | 760235c | 2016-11-30 15:21:12 +0800 | [diff] [blame] | 475 | acpi_status acpi_ev_initialize_region(union acpi_operand_object *region_obj) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 476 | { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 477 | union acpi_operand_object *handler_obj; |
| 478 | union acpi_operand_object *obj_desc; |
| 479 | acpi_adr_space_type space_id; |
| 480 | struct acpi_namespace_node *node; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 481 | |
Lv Zheng | 760235c | 2016-11-30 15:21:12 +0800 | [diff] [blame] | 482 | ACPI_FUNCTION_TRACE(ev_initialize_region); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 483 | |
| 484 | if (!region_obj) { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 485 | return_ACPI_STATUS(AE_BAD_PARAMETER); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 486 | } |
| 487 | |
| 488 | if (region_obj->common.flags & AOPOBJ_OBJECT_INITIALIZED) { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 489 | return_ACPI_STATUS(AE_OK); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 490 | } |
| 491 | |
Lv Zheng | 849c257 | 2015-12-29 14:02:58 +0800 | [diff] [blame] | 492 | region_obj->common.flags |= AOPOBJ_OBJECT_INITIALIZED; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 493 | |
Alexey Starikovskiy | c45b5c0 | 2010-05-26 11:53:07 +0800 | [diff] [blame] | 494 | node = region_obj->region.node->parent; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 495 | space_id = region_obj->region.space_id; |
| 496 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 497 | /* |
| 498 | * The following loop depends upon the root Node having no parent |
Bob Moore | 7b73806 | 2015-12-29 14:01:53 +0800 | [diff] [blame] | 499 | * ie: acpi_gbl_root_node->Parent being set to NULL |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 500 | */ |
| 501 | while (node) { |
Bob Moore | 52fc0b0 | 2006-10-02 00:00:00 -0400 | [diff] [blame] | 502 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 503 | /* Check to see if a handler exists */ |
| 504 | |
| 505 | handler_obj = NULL; |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 506 | obj_desc = acpi_ns_get_attached_object(node); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 507 | if (obj_desc) { |
Bob Moore | 52fc0b0 | 2006-10-02 00:00:00 -0400 | [diff] [blame] | 508 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 509 | /* Can only be a handler if the object exists */ |
| 510 | |
| 511 | switch (node->type) { |
| 512 | case ACPI_TYPE_DEVICE: |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 513 | case ACPI_TYPE_PROCESSOR: |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 514 | case ACPI_TYPE_THERMAL: |
| 515 | |
Lv Zheng | aa6abd2 | 2015-12-29 14:02:08 +0800 | [diff] [blame] | 516 | handler_obj = obj_desc->common_notify.handler; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 517 | break; |
| 518 | |
Lin Ming | e31c32c | 2009-12-11 15:28:27 +0800 | [diff] [blame] | 519 | case ACPI_TYPE_METHOD: |
| 520 | /* |
| 521 | * If we are executing module level code, the original |
| 522 | * Node's object was replaced by this Method object and we |
| 523 | * saved the handler in the method object. |
| 524 | * |
Bob Moore | a406dea | 2018-03-14 16:13:09 -0700 | [diff] [blame] | 525 | * Note: Only used for the legacy MLC support. Will |
| 526 | * be removed in the future. |
| 527 | * |
Lin Ming | e31c32c | 2009-12-11 15:28:27 +0800 | [diff] [blame] | 528 | * See acpi_ns_exec_module_code |
| 529 | */ |
Bob Moore | e7d970f | 2018-03-14 16:13:06 -0700 | [diff] [blame] | 530 | if (!acpi_gbl_execute_tables_as_methods && |
Lv Zheng | de56ba9 | 2016-09-07 14:06:54 +0800 | [diff] [blame] | 531 | obj_desc->method. |
Lin Ming | 2629484 | 2011-01-12 09:19:43 +0800 | [diff] [blame] | 532 | info_flags & ACPI_METHOD_MODULE_LEVEL) { |
Lin Ming | e31c32c | 2009-12-11 15:28:27 +0800 | [diff] [blame] | 533 | handler_obj = |
Lin Ming | 2629484 | 2011-01-12 09:19:43 +0800 | [diff] [blame] | 534 | obj_desc->method.dispatch.handler; |
Lin Ming | e31c32c | 2009-12-11 15:28:27 +0800 | [diff] [blame] | 535 | } |
| 536 | break; |
| 537 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 538 | default: |
Chao Guan | 1d1ea1b7 | 2013-06-08 00:58:14 +0000 | [diff] [blame] | 539 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 540 | /* Ignore other objects */ |
Chao Guan | 1d1ea1b7 | 2013-06-08 00:58:14 +0000 | [diff] [blame] | 541 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 542 | break; |
| 543 | } |
| 544 | |
Lv Zheng | f31a99ce | 2015-12-29 14:02:00 +0800 | [diff] [blame] | 545 | handler_obj = |
| 546 | acpi_ev_find_region_handler(space_id, handler_obj); |
| 547 | if (handler_obj) { |
Bob Moore | 52fc0b0 | 2006-10-02 00:00:00 -0400 | [diff] [blame] | 548 | |
Lv Zheng | f31a99ce | 2015-12-29 14:02:00 +0800 | [diff] [blame] | 549 | /* Found correct handler */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 550 | |
Lv Zheng | f31a99ce | 2015-12-29 14:02:00 +0800 | [diff] [blame] | 551 | ACPI_DEBUG_PRINT((ACPI_DB_OPREGION, |
| 552 | "Found handler %p for region %p in obj %p\n", |
| 553 | handler_obj, region_obj, |
| 554 | obj_desc)); |
Bob Moore | 52fc0b0 | 2006-10-02 00:00:00 -0400 | [diff] [blame] | 555 | |
Lv Zheng | 760235c | 2016-11-30 15:21:12 +0800 | [diff] [blame] | 556 | (void)acpi_ev_attach_region(handler_obj, |
| 557 | region_obj, FALSE); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 558 | |
Lv Zheng | f31a99ce | 2015-12-29 14:02:00 +0800 | [diff] [blame] | 559 | /* |
| 560 | * Tell all users that this region is usable by |
| 561 | * running the _REG method |
| 562 | */ |
Lv Zheng | 8633db6 | 2016-10-26 15:42:01 +0800 | [diff] [blame] | 563 | acpi_ex_exit_interpreter(); |
Lv Zheng | 760235c | 2016-11-30 15:21:12 +0800 | [diff] [blame] | 564 | (void)acpi_ev_execute_reg_method(region_obj, |
| 565 | ACPI_REG_CONNECT); |
Lv Zheng | 8633db6 | 2016-10-26 15:42:01 +0800 | [diff] [blame] | 566 | acpi_ex_enter_interpreter(); |
Lv Zheng | f31a99ce | 2015-12-29 14:02:00 +0800 | [diff] [blame] | 567 | return_ACPI_STATUS(AE_OK); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 568 | } |
| 569 | } |
| 570 | |
Bob Moore | 9f15fc6 | 2008-11-12 16:01:56 +0800 | [diff] [blame] | 571 | /* This node does not have the handler we need; Pop up one level */ |
| 572 | |
Alexey Starikovskiy | c45b5c0 | 2010-05-26 11:53:07 +0800 | [diff] [blame] | 573 | node = node->parent; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 574 | } |
| 575 | |
Lv Zheng | 760235c | 2016-11-30 15:21:12 +0800 | [diff] [blame] | 576 | /* |
| 577 | * If we get here, there is no handler for this region. This is not |
| 578 | * fatal because many regions get created before a handler is installed |
| 579 | * for said region. |
| 580 | */ |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 581 | ACPI_DEBUG_PRINT((ACPI_DB_OPREGION, |
Bob Moore | b229cf9 | 2006-04-21 17:15:00 -0400 | [diff] [blame] | 582 | "No handler for RegionType %s(%X) (RegionObj %p)\n", |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 583 | acpi_ut_get_region_name(space_id), space_id, |
| 584 | region_obj)); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 585 | |
Lv Zheng | 760235c | 2016-11-30 15:21:12 +0800 | [diff] [blame] | 586 | return_ACPI_STATUS(AE_OK); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 587 | } |