]>
Commit | Line | Data |
---|---|---|
1da177e4 LT |
1 | /****************************************************************************** |
2 | * | |
3 | * Module Name: evregion - ACPI address_space (op_region) handler dispatch | |
4 | * | |
5 | *****************************************************************************/ | |
6 | ||
7 | /* | |
75a44ce0 | 8 | * Copyright (C) 2000 - 2008, Intel Corp. |
1da177e4 LT |
9 | * All rights reserved. |
10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | |
15 | * notice, this list of conditions, and the following disclaimer, | |
16 | * without modification. | |
17 | * 2. Redistributions in binary form must reproduce at minimum a disclaimer | |
18 | * substantially similar to the "NO WARRANTY" disclaimer below | |
19 | * ("Disclaimer") and any redistribution must be conditioned upon | |
20 | * including a substantially similar Disclaimer requirement for further | |
21 | * binary redistribution. | |
22 | * 3. Neither the names of the above-listed copyright holders nor the names | |
23 | * of any contributors may be used to endorse or promote products derived | |
24 | * from this software without specific prior written permission. | |
25 | * | |
26 | * Alternatively, this software may be distributed under the terms of the | |
27 | * GNU General Public License ("GPL") version 2 as published by the Free | |
28 | * Software Foundation. | |
29 | * | |
30 | * NO WARRANTY | |
31 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
32 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
33 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR | |
34 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | |
35 | * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
36 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
37 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
38 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
39 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | |
40 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
41 | * POSSIBILITY OF SUCH DAMAGES. | |
42 | */ | |
43 | ||
1da177e4 LT |
44 | #include <acpi/acpi.h> |
45 | #include <acpi/acevents.h> | |
46 | #include <acpi/acnamesp.h> | |
47 | #include <acpi/acinterp.h> | |
48 | ||
49 | #define _COMPONENT ACPI_EVENTS | |
4be44fcd | 50 | ACPI_MODULE_NAME("evregion") |
1da177e4 | 51 | #define ACPI_NUM_DEFAULT_SPACES 4 |
4be44fcd LB |
52 | static u8 acpi_gbl_default_address_spaces[ACPI_NUM_DEFAULT_SPACES] = { |
53 | ACPI_ADR_SPACE_SYSTEM_MEMORY, | |
54 | ACPI_ADR_SPACE_SYSTEM_IO, | |
55 | ACPI_ADR_SPACE_PCI_CONFIG, | |
56 | ACPI_ADR_SPACE_DATA_TABLE | |
57 | }; | |
1da177e4 | 58 | |
44f6c012 RM |
59 | /* Local prototypes */ |
60 | ||
61 | static acpi_status | |
4be44fcd LB |
62 | acpi_ev_reg_run(acpi_handle obj_handle, |
63 | u32 level, void *context, void **return_value); | |
44f6c012 RM |
64 | |
65 | static acpi_status | |
4be44fcd LB |
66 | acpi_ev_install_handler(acpi_handle obj_handle, |
67 | u32 level, void *context, void **return_value); | |
1da177e4 LT |
68 | |
69 | /******************************************************************************* | |
70 | * | |
71 | * FUNCTION: acpi_ev_install_region_handlers | |
72 | * | |
73 | * PARAMETERS: None | |
74 | * | |
75 | * RETURN: Status | |
76 | * | |
77 | * DESCRIPTION: Installs the core subsystem default address space handlers. | |
78 | * | |
79 | ******************************************************************************/ | |
80 | ||
4be44fcd LB |
81 | acpi_status acpi_ev_install_region_handlers(void) |
82 | { | |
83 | acpi_status status; | |
84 | acpi_native_uint i; | |
1da177e4 | 85 | |
b229cf92 | 86 | ACPI_FUNCTION_TRACE(ev_install_region_handlers); |
1da177e4 | 87 | |
4be44fcd LB |
88 | status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE); |
89 | if (ACPI_FAILURE(status)) { | |
90 | return_ACPI_STATUS(status); | |
1da177e4 LT |
91 | } |
92 | ||
93 | /* | |
94 | * All address spaces (PCI Config, EC, SMBus) are scope dependent | |
95 | * and registration must occur for a specific device. | |
96 | * | |
97 | * In the case of the system memory and IO address spaces there is currently | |
98 | * no device associated with the address space. For these we use the root. | |
99 | * | |
100 | * We install the default PCI config space handler at the root so | |
101 | * that this space is immediately available even though the we have | |
102 | * not enumerated all the PCI Root Buses yet. This is to conform | |
103 | * to the ACPI specification which states that the PCI config | |
104 | * space must be always available -- even though we are nowhere | |
105 | * near ready to find the PCI root buses at this point. | |
106 | * | |
107 | * NOTE: We ignore AE_ALREADY_EXISTS because this means that a handler | |
108 | * has already been installed (via acpi_install_address_space_handler). | |
109 | * Similar for AE_SAME_HANDLER. | |
110 | */ | |
111 | for (i = 0; i < ACPI_NUM_DEFAULT_SPACES; i++) { | |
4be44fcd LB |
112 | status = acpi_ev_install_space_handler(acpi_gbl_root_node, |
113 | acpi_gbl_default_address_spaces | |
114 | [i], | |
115 | ACPI_DEFAULT_HANDLER, | |
116 | NULL, NULL); | |
1da177e4 LT |
117 | switch (status) { |
118 | case AE_OK: | |
119 | case AE_SAME_HANDLER: | |
120 | case AE_ALREADY_EXISTS: | |
121 | ||
122 | /* These exceptions are all OK */ | |
123 | ||
124 | status = AE_OK; | |
125 | break; | |
126 | ||
127 | default: | |
128 | ||
129 | goto unlock_and_exit; | |
130 | } | |
131 | } | |
132 | ||
4be44fcd LB |
133 | unlock_and_exit: |
134 | (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); | |
135 | return_ACPI_STATUS(status); | |
1da177e4 LT |
136 | } |
137 | ||
1da177e4 LT |
138 | /******************************************************************************* |
139 | * | |
140 | * FUNCTION: acpi_ev_initialize_op_regions | |
141 | * | |
142 | * PARAMETERS: None | |
143 | * | |
144 | * RETURN: Status | |
145 | * | |
146 | * DESCRIPTION: Execute _REG methods for all Operation Regions that have | |
147 | * an installed default region handler. | |
148 | * | |
149 | ******************************************************************************/ | |
150 | ||
4be44fcd | 151 | acpi_status acpi_ev_initialize_op_regions(void) |
1da177e4 | 152 | { |
4be44fcd LB |
153 | acpi_status status; |
154 | acpi_native_uint i; | |
1da177e4 | 155 | |
b229cf92 | 156 | ACPI_FUNCTION_TRACE(ev_initialize_op_regions); |
1da177e4 | 157 | |
4be44fcd LB |
158 | status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE); |
159 | if (ACPI_FAILURE(status)) { | |
160 | return_ACPI_STATUS(status); | |
1da177e4 LT |
161 | } |
162 | ||
163 | /* | |
164 | * Run the _REG methods for op_regions in each default address space | |
165 | */ | |
166 | for (i = 0; i < ACPI_NUM_DEFAULT_SPACES; i++) { | |
52fc0b02 | 167 | |
1da177e4 LT |
168 | /* TBD: Make sure handler is the DEFAULT handler, otherwise |
169 | * _REG will have already been run. | |
170 | */ | |
4be44fcd LB |
171 | status = acpi_ev_execute_reg_methods(acpi_gbl_root_node, |
172 | acpi_gbl_default_address_spaces | |
173 | [i]); | |
1da177e4 LT |
174 | } |
175 | ||
4be44fcd LB |
176 | (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); |
177 | return_ACPI_STATUS(status); | |
1da177e4 LT |
178 | } |
179 | ||
1da177e4 LT |
180 | /******************************************************************************* |
181 | * | |
182 | * FUNCTION: acpi_ev_execute_reg_method | |
183 | * | |
44f6c012 RM |
184 | * PARAMETERS: region_obj - Region object |
185 | * Function - Passed to _REG: On (1) or Off (0) | |
1da177e4 LT |
186 | * |
187 | * RETURN: Status | |
188 | * | |
189 | * DESCRIPTION: Execute _REG method for a region | |
190 | * | |
191 | ******************************************************************************/ | |
192 | ||
193 | acpi_status | |
4be44fcd | 194 | acpi_ev_execute_reg_method(union acpi_operand_object *region_obj, u32 function) |
1da177e4 | 195 | { |
4119532c BM |
196 | struct acpi_evaluate_info *info; |
197 | union acpi_operand_object *args[3]; | |
4be44fcd LB |
198 | union acpi_operand_object *region_obj2; |
199 | acpi_status status; | |
1da177e4 | 200 | |
b229cf92 | 201 | ACPI_FUNCTION_TRACE(ev_execute_reg_method); |
1da177e4 | 202 | |
4be44fcd | 203 | region_obj2 = acpi_ns_get_secondary_object(region_obj); |
1da177e4 | 204 | if (!region_obj2) { |
4be44fcd | 205 | return_ACPI_STATUS(AE_NOT_EXIST); |
1da177e4 LT |
206 | } |
207 | ||
208 | if (region_obj2->extra.method_REG == NULL) { | |
4be44fcd | 209 | return_ACPI_STATUS(AE_OK); |
1da177e4 LT |
210 | } |
211 | ||
4119532c BM |
212 | /* Allocate and initialize the evaluation information block */ |
213 | ||
214 | info = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_evaluate_info)); | |
215 | if (!info) { | |
216 | return_ACPI_STATUS(AE_NO_MEMORY); | |
217 | } | |
218 | ||
219 | info->prefix_node = region_obj2->extra.method_REG; | |
220 | info->pathname = NULL; | |
221 | info->parameters = args; | |
222 | info->parameter_type = ACPI_PARAM_ARGS; | |
223 | info->flags = ACPI_IGNORE_RETURN_VALUE; | |
224 | ||
1da177e4 LT |
225 | /* |
226 | * The _REG method has two arguments: | |
227 | * | |
4119532c BM |
228 | * Arg0 - Integer: |
229 | * Operation region space ID Same value as region_obj->Region.space_id | |
230 | * | |
231 | * Arg1 - Integer: | |
232 | * connection status 1 for connecting the handler, 0 for disconnecting | |
233 | * the handler (Passed as a parameter) | |
1da177e4 | 234 | */ |
4119532c BM |
235 | args[0] = acpi_ut_create_internal_object(ACPI_TYPE_INTEGER); |
236 | if (!args[0]) { | |
237 | status = AE_NO_MEMORY; | |
238 | goto cleanup1; | |
1da177e4 LT |
239 | } |
240 | ||
4119532c BM |
241 | args[1] = acpi_ut_create_internal_object(ACPI_TYPE_INTEGER); |
242 | if (!args[1]) { | |
1da177e4 | 243 | status = AE_NO_MEMORY; |
4119532c | 244 | goto cleanup2; |
1da177e4 LT |
245 | } |
246 | ||
247 | /* Setup the parameter objects */ | |
248 | ||
4119532c BM |
249 | args[0]->integer.value = region_obj->region.space_id; |
250 | args[1]->integer.value = function; | |
251 | args[2] = NULL; | |
1da177e4 LT |
252 | |
253 | /* Execute the method, no return value */ | |
254 | ||
4be44fcd | 255 | ACPI_DEBUG_EXEC(acpi_ut_display_init_pathname |
4119532c BM |
256 | (ACPI_TYPE_METHOD, info->prefix_node, NULL)); |
257 | ||
258 | status = acpi_ns_evaluate(info); | |
259 | acpi_ut_remove_reference(args[1]); | |
1da177e4 | 260 | |
4119532c BM |
261 | cleanup2: |
262 | acpi_ut_remove_reference(args[0]); | |
1da177e4 | 263 | |
4119532c BM |
264 | cleanup1: |
265 | ACPI_FREE(info); | |
4be44fcd | 266 | return_ACPI_STATUS(status); |
1da177e4 LT |
267 | } |
268 | ||
1da177e4 LT |
269 | /******************************************************************************* |
270 | * | |
271 | * FUNCTION: acpi_ev_address_space_dispatch | |
272 | * | |
273 | * PARAMETERS: region_obj - Internal region object | |
274 | * Function - Read or Write operation | |
275 | * Address - Where in the space to read or write | |
276 | * bit_width - Field width in bits (8, 16, 32, or 64) | |
958dd242 BM |
277 | * Value - Pointer to in or out value, must be |
278 | * full 64-bit acpi_integer | |
1da177e4 LT |
279 | * |
280 | * RETURN: Status | |
281 | * | |
282 | * DESCRIPTION: Dispatch an address space or operation region access to | |
283 | * a previously installed handler. | |
284 | * | |
285 | ******************************************************************************/ | |
286 | ||
287 | acpi_status | |
4be44fcd LB |
288 | acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj, |
289 | u32 function, | |
290 | acpi_physical_address address, | |
958dd242 | 291 | u32 bit_width, acpi_integer * value) |
1da177e4 | 292 | { |
4be44fcd | 293 | acpi_status status; |
4be44fcd LB |
294 | acpi_adr_space_handler handler; |
295 | acpi_adr_space_setup region_setup; | |
296 | union acpi_operand_object *handler_desc; | |
297 | union acpi_operand_object *region_obj2; | |
298 | void *region_context = NULL; | |
1da177e4 | 299 | |
b229cf92 | 300 | ACPI_FUNCTION_TRACE(ev_address_space_dispatch); |
1da177e4 | 301 | |
4be44fcd | 302 | region_obj2 = acpi_ns_get_secondary_object(region_obj); |
1da177e4 | 303 | if (!region_obj2) { |
4be44fcd | 304 | return_ACPI_STATUS(AE_NOT_EXIST); |
1da177e4 LT |
305 | } |
306 | ||
307 | /* Ensure that there is a handler associated with this region */ | |
308 | ||
309 | handler_desc = region_obj->region.handler; | |
310 | if (!handler_desc) { | |
b8e4d893 BM |
311 | ACPI_ERROR((AE_INFO, |
312 | "No handler for Region [%4.4s] (%p) [%s]", | |
313 | acpi_ut_get_node_name(region_obj->region.node), | |
314 | region_obj, | |
315 | acpi_ut_get_region_name(region_obj->region. | |
316 | space_id))); | |
4be44fcd LB |
317 | |
318 | return_ACPI_STATUS(AE_NOT_EXIST); | |
1da177e4 LT |
319 | } |
320 | ||
321 | /* | |
322 | * It may be the case that the region has never been initialized | |
323 | * Some types of regions require special init code | |
324 | */ | |
325 | if (!(region_obj->region.flags & AOPOBJ_SETUP_COMPLETE)) { | |
326 | /* | |
327 | * This region has not been initialized yet, do it | |
328 | */ | |
329 | region_setup = handler_desc->address_space.setup; | |
330 | if (!region_setup) { | |
52fc0b02 | 331 | |
1da177e4 LT |
332 | /* No initialization routine, exit with error */ |
333 | ||
b8e4d893 BM |
334 | ACPI_ERROR((AE_INFO, |
335 | "No init routine for region(%p) [%s]", | |
336 | region_obj, | |
337 | acpi_ut_get_region_name(region_obj->region. | |
338 | space_id))); | |
4be44fcd | 339 | return_ACPI_STATUS(AE_NOT_EXIST); |
1da177e4 LT |
340 | } |
341 | ||
342 | /* | |
44f6c012 RM |
343 | * We must exit the interpreter because the region |
344 | * setup will potentially execute control methods | |
345 | * (e.g., _REG method for this region) | |
1da177e4 | 346 | */ |
014d433f | 347 | acpi_ex_exit_interpreter(); |
1da177e4 | 348 | |
4be44fcd LB |
349 | status = region_setup(region_obj, ACPI_REGION_ACTIVATE, |
350 | handler_desc->address_space.context, | |
351 | ®ion_context); | |
1da177e4 LT |
352 | |
353 | /* Re-enter the interpreter */ | |
354 | ||
014d433f | 355 | acpi_ex_enter_interpreter(); |
1da177e4 LT |
356 | |
357 | /* Check for failure of the Region Setup */ | |
358 | ||
4be44fcd | 359 | if (ACPI_FAILURE(status)) { |
b8e4d893 BM |
360 | ACPI_EXCEPTION((AE_INFO, status, |
361 | "During region initialization: [%s]", | |
362 | acpi_ut_get_region_name(region_obj-> | |
363 | region. | |
364 | space_id))); | |
4be44fcd | 365 | return_ACPI_STATUS(status); |
1da177e4 LT |
366 | } |
367 | ||
368 | /* | |
369 | * Region initialization may have been completed by region_setup | |
370 | */ | |
371 | if (!(region_obj->region.flags & AOPOBJ_SETUP_COMPLETE)) { | |
372 | region_obj->region.flags |= AOPOBJ_SETUP_COMPLETE; | |
373 | ||
374 | if (region_obj2->extra.region_context) { | |
52fc0b02 | 375 | |
1da177e4 LT |
376 | /* The handler for this region was already installed */ |
377 | ||
8313524a | 378 | ACPI_FREE(region_context); |
4be44fcd | 379 | } else { |
1da177e4 LT |
380 | /* |
381 | * Save the returned context for use in all accesses to | |
382 | * this particular region | |
383 | */ | |
4be44fcd LB |
384 | region_obj2->extra.region_context = |
385 | region_context; | |
1da177e4 LT |
386 | } |
387 | } | |
388 | } | |
389 | ||
390 | /* We have everything we need, we can invoke the address space handler */ | |
391 | ||
392 | handler = handler_desc->address_space.handler; | |
393 | ||
4be44fcd LB |
394 | ACPI_DEBUG_PRINT((ACPI_DB_OPREGION, |
395 | "Handler %p (@%p) Address %8.8X%8.8X [%s]\n", | |
396 | ®ion_obj->region.handler->address_space, handler, | |
1d18c058 | 397 | ACPI_FORMAT_NATIVE_UINT(address), |
4be44fcd LB |
398 | acpi_ut_get_region_name(region_obj->region. |
399 | space_id))); | |
1da177e4 | 400 | |
61686124 BM |
401 | if (!(handler_desc->address_space.handler_flags & |
402 | ACPI_ADDR_HANDLER_DEFAULT_INSTALLED)) { | |
1da177e4 LT |
403 | /* |
404 | * For handlers other than the default (supplied) handlers, we must | |
405 | * exit the interpreter because the handler *might* block -- we don't | |
406 | * know what it will do, so we can't hold the lock on the intepreter. | |
407 | */ | |
014d433f | 408 | acpi_ex_exit_interpreter(); |
1da177e4 LT |
409 | } |
410 | ||
411 | /* Call the handler */ | |
412 | ||
4be44fcd | 413 | status = handler(function, address, bit_width, value, |
1da177e4 LT |
414 | handler_desc->address_space.context, |
415 | region_obj2->extra.region_context); | |
416 | ||
4be44fcd | 417 | if (ACPI_FAILURE(status)) { |
b8e4d893 BM |
418 | ACPI_EXCEPTION((AE_INFO, status, "Returned by Handler for [%s]", |
419 | acpi_ut_get_region_name(region_obj->region. | |
420 | space_id))); | |
1da177e4 LT |
421 | } |
422 | ||
61686124 BM |
423 | if (!(handler_desc->address_space.handler_flags & |
424 | ACPI_ADDR_HANDLER_DEFAULT_INSTALLED)) { | |
1da177e4 LT |
425 | /* |
426 | * We just returned from a non-default handler, we must re-enter the | |
427 | * interpreter | |
428 | */ | |
014d433f | 429 | acpi_ex_enter_interpreter(); |
1da177e4 LT |
430 | } |
431 | ||
4be44fcd | 432 | return_ACPI_STATUS(status); |
1da177e4 LT |
433 | } |
434 | ||
1da177e4 LT |
435 | /******************************************************************************* |
436 | * | |
437 | * FUNCTION: acpi_ev_detach_region | |
438 | * | |
439 | * PARAMETERS: region_obj - Region Object | |
440 | * acpi_ns_is_locked - Namespace Region Already Locked? | |
441 | * | |
442 | * RETURN: None | |
443 | * | |
444 | * DESCRIPTION: Break the association between the handler and the region | |
445 | * this is a two way association. | |
446 | * | |
447 | ******************************************************************************/ | |
448 | ||
449 | void | |
4be44fcd LB |
450 | acpi_ev_detach_region(union acpi_operand_object *region_obj, |
451 | u8 acpi_ns_is_locked) | |
1da177e4 | 452 | { |
4be44fcd LB |
453 | union acpi_operand_object *handler_obj; |
454 | union acpi_operand_object *obj_desc; | |
455 | union acpi_operand_object **last_obj_ptr; | |
456 | acpi_adr_space_setup region_setup; | |
457 | void **region_context; | |
458 | union acpi_operand_object *region_obj2; | |
459 | acpi_status status; | |
1da177e4 | 460 | |
b229cf92 | 461 | ACPI_FUNCTION_TRACE(ev_detach_region); |
1da177e4 | 462 | |
4be44fcd | 463 | region_obj2 = acpi_ns_get_secondary_object(region_obj); |
1da177e4 LT |
464 | if (!region_obj2) { |
465 | return_VOID; | |
466 | } | |
467 | region_context = ®ion_obj2->extra.region_context; | |
468 | ||
469 | /* Get the address handler from the region object */ | |
470 | ||
471 | handler_obj = region_obj->region.handler; | |
472 | if (!handler_obj) { | |
52fc0b02 | 473 | |
1da177e4 LT |
474 | /* This region has no handler, all done */ |
475 | ||
476 | return_VOID; | |
477 | } | |
478 | ||
479 | /* Find this region in the handler's list */ | |
480 | ||
481 | obj_desc = handler_obj->address_space.region_list; | |
482 | last_obj_ptr = &handler_obj->address_space.region_list; | |
483 | ||
484 | while (obj_desc) { | |
52fc0b02 | 485 | |
1da177e4 LT |
486 | /* Is this the correct Region? */ |
487 | ||
488 | if (obj_desc == region_obj) { | |
4be44fcd LB |
489 | ACPI_DEBUG_PRINT((ACPI_DB_OPREGION, |
490 | "Removing Region %p from address handler %p\n", | |
491 | region_obj, handler_obj)); | |
1da177e4 LT |
492 | |
493 | /* This is it, remove it from the handler's list */ | |
494 | ||
495 | *last_obj_ptr = obj_desc->region.next; | |
4be44fcd | 496 | obj_desc->region.next = NULL; /* Must clear field */ |
1da177e4 LT |
497 | |
498 | if (acpi_ns_is_locked) { | |
4be44fcd LB |
499 | status = |
500 | acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); | |
501 | if (ACPI_FAILURE(status)) { | |
1da177e4 LT |
502 | return_VOID; |
503 | } | |
504 | } | |
505 | ||
506 | /* Now stop region accesses by executing the _REG method */ | |
507 | ||
4be44fcd LB |
508 | status = acpi_ev_execute_reg_method(region_obj, 0); |
509 | if (ACPI_FAILURE(status)) { | |
b8e4d893 BM |
510 | ACPI_EXCEPTION((AE_INFO, status, |
511 | "from region _REG, [%s]", | |
512 | acpi_ut_get_region_name | |
513 | (region_obj->region.space_id))); | |
1da177e4 LT |
514 | } |
515 | ||
516 | if (acpi_ns_is_locked) { | |
4be44fcd LB |
517 | status = |
518 | acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE); | |
519 | if (ACPI_FAILURE(status)) { | |
1da177e4 LT |
520 | return_VOID; |
521 | } | |
522 | } | |
523 | ||
f6dd9221 BM |
524 | /* |
525 | * If the region has been activated, call the setup handler | |
526 | * with the deactivate notification | |
527 | */ | |
528 | if (region_obj->region.flags & AOPOBJ_SETUP_COMPLETE) { | |
529 | region_setup = handler_obj->address_space.setup; | |
530 | status = | |
531 | region_setup(region_obj, | |
532 | ACPI_REGION_DEACTIVATE, | |
533 | handler_obj->address_space. | |
534 | context, region_context); | |
1da177e4 | 535 | |
f6dd9221 | 536 | /* Init routine may fail, Just ignore errors */ |
1da177e4 | 537 | |
f6dd9221 BM |
538 | if (ACPI_FAILURE(status)) { |
539 | ACPI_EXCEPTION((AE_INFO, status, | |
540 | "from region handler - deactivate, [%s]", | |
541 | acpi_ut_get_region_name | |
542 | (region_obj->region. | |
543 | space_id))); | |
544 | } | |
1da177e4 | 545 | |
f6dd9221 BM |
546 | region_obj->region.flags &= |
547 | ~(AOPOBJ_SETUP_COMPLETE); | |
1da177e4 LT |
548 | } |
549 | ||
1da177e4 LT |
550 | /* |
551 | * Remove handler reference in the region | |
552 | * | |
f6dd9221 BM |
553 | * NOTE: this doesn't mean that the region goes away, the region |
554 | * is just inaccessible as indicated to the _REG method | |
1da177e4 | 555 | * |
f6dd9221 BM |
556 | * If the region is on the handler's list, this must be the |
557 | * region's handler | |
1da177e4 LT |
558 | */ |
559 | region_obj->region.handler = NULL; | |
4be44fcd | 560 | acpi_ut_remove_reference(handler_obj); |
1da177e4 LT |
561 | |
562 | return_VOID; | |
563 | } | |
564 | ||
565 | /* Walk the linked list of handlers */ | |
566 | ||
567 | last_obj_ptr = &obj_desc->region.next; | |
568 | obj_desc = obj_desc->region.next; | |
569 | } | |
570 | ||
571 | /* If we get here, the region was not in the handler's region list */ | |
572 | ||
4be44fcd LB |
573 | ACPI_DEBUG_PRINT((ACPI_DB_OPREGION, |
574 | "Cannot remove region %p from address handler %p\n", | |
575 | region_obj, handler_obj)); | |
1da177e4 LT |
576 | |
577 | return_VOID; | |
578 | } | |
579 | ||
1da177e4 LT |
580 | /******************************************************************************* |
581 | * | |
582 | * FUNCTION: acpi_ev_attach_region | |
583 | * | |
584 | * PARAMETERS: handler_obj - Handler Object | |
585 | * region_obj - Region Object | |
586 | * acpi_ns_is_locked - Namespace Region Already Locked? | |
587 | * | |
588 | * RETURN: None | |
589 | * | |
590 | * DESCRIPTION: Create the association between the handler and the region | |
591 | * this is a two way association. | |
592 | * | |
593 | ******************************************************************************/ | |
594 | ||
595 | acpi_status | |
4be44fcd LB |
596 | acpi_ev_attach_region(union acpi_operand_object *handler_obj, |
597 | union acpi_operand_object *region_obj, | |
598 | u8 acpi_ns_is_locked) | |
1da177e4 LT |
599 | { |
600 | ||
b229cf92 | 601 | ACPI_FUNCTION_TRACE(ev_attach_region); |
1da177e4 | 602 | |
4be44fcd LB |
603 | ACPI_DEBUG_PRINT((ACPI_DB_OPREGION, |
604 | "Adding Region [%4.4s] %p to address handler %p [%s]\n", | |
605 | acpi_ut_get_node_name(region_obj->region.node), | |
606 | region_obj, handler_obj, | |
607 | acpi_ut_get_region_name(region_obj->region. | |
608 | space_id))); | |
1da177e4 LT |
609 | |
610 | /* Link this region to the front of the handler's list */ | |
611 | ||
612 | region_obj->region.next = handler_obj->address_space.region_list; | |
613 | handler_obj->address_space.region_list = region_obj; | |
614 | ||
615 | /* Install the region's handler */ | |
616 | ||
617 | if (region_obj->region.handler) { | |
4be44fcd | 618 | return_ACPI_STATUS(AE_ALREADY_EXISTS); |
1da177e4 LT |
619 | } |
620 | ||
621 | region_obj->region.handler = handler_obj; | |
4be44fcd | 622 | acpi_ut_add_reference(handler_obj); |
1da177e4 | 623 | |
4be44fcd | 624 | return_ACPI_STATUS(AE_OK); |
1da177e4 LT |
625 | } |
626 | ||
1da177e4 LT |
627 | /******************************************************************************* |
628 | * | |
629 | * FUNCTION: acpi_ev_install_handler | |
630 | * | |
631 | * PARAMETERS: walk_namespace callback | |
632 | * | |
633 | * DESCRIPTION: This routine installs an address handler into objects that are | |
634 | * of type Region or Device. | |
635 | * | |
636 | * If the Object is a Device, and the device has a handler of | |
637 | * the same type then the search is terminated in that branch. | |
638 | * | |
639 | * This is because the existing handler is closer in proximity | |
640 | * to any more regions than the one we are trying to install. | |
641 | * | |
642 | ******************************************************************************/ | |
643 | ||
44f6c012 | 644 | static acpi_status |
4be44fcd LB |
645 | acpi_ev_install_handler(acpi_handle obj_handle, |
646 | u32 level, void *context, void **return_value) | |
1da177e4 | 647 | { |
4be44fcd LB |
648 | union acpi_operand_object *handler_obj; |
649 | union acpi_operand_object *next_handler_obj; | |
650 | union acpi_operand_object *obj_desc; | |
651 | struct acpi_namespace_node *node; | |
652 | acpi_status status; | |
1da177e4 | 653 | |
b229cf92 | 654 | ACPI_FUNCTION_NAME(ev_install_handler); |
1da177e4 | 655 | |
4be44fcd | 656 | handler_obj = (union acpi_operand_object *)context; |
1da177e4 LT |
657 | |
658 | /* Parameter validation */ | |
659 | ||
660 | if (!handler_obj) { | |
661 | return (AE_OK); | |
662 | } | |
663 | ||
664 | /* Convert and validate the device handle */ | |
665 | ||
4be44fcd | 666 | node = acpi_ns_map_handle_to_node(obj_handle); |
1da177e4 LT |
667 | if (!node) { |
668 | return (AE_BAD_PARAMETER); | |
669 | } | |
670 | ||
671 | /* | |
672 | * We only care about regions.and objects | |
673 | * that are allowed to have address space handlers | |
674 | */ | |
675 | if ((node->type != ACPI_TYPE_DEVICE) && | |
4be44fcd | 676 | (node->type != ACPI_TYPE_REGION) && (node != acpi_gbl_root_node)) { |
1da177e4 LT |
677 | return (AE_OK); |
678 | } | |
679 | ||
680 | /* Check for an existing internal object */ | |
681 | ||
4be44fcd | 682 | obj_desc = acpi_ns_get_attached_object(node); |
1da177e4 | 683 | if (!obj_desc) { |
52fc0b02 | 684 | |
1da177e4 LT |
685 | /* No object, just exit */ |
686 | ||
687 | return (AE_OK); | |
688 | } | |
689 | ||
690 | /* Devices are handled different than regions */ | |
691 | ||
4be44fcd | 692 | if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_DEVICE) { |
52fc0b02 | 693 | |
1da177e4 LT |
694 | /* Check if this Device already has a handler for this address space */ |
695 | ||
696 | next_handler_obj = obj_desc->device.handler; | |
697 | while (next_handler_obj) { | |
52fc0b02 | 698 | |
1da177e4 LT |
699 | /* Found a handler, is it for the same address space? */ |
700 | ||
4be44fcd LB |
701 | if (next_handler_obj->address_space.space_id == |
702 | handler_obj->address_space.space_id) { | |
703 | ACPI_DEBUG_PRINT((ACPI_DB_OPREGION, | |
704 | "Found handler for region [%s] in device %p(%p) handler %p\n", | |
705 | acpi_ut_get_region_name | |
706 | (handler_obj->address_space. | |
707 | space_id), obj_desc, | |
708 | next_handler_obj, | |
709 | handler_obj)); | |
1da177e4 LT |
710 | |
711 | /* | |
712 | * Since the object we found it on was a device, then it | |
713 | * means that someone has already installed a handler for | |
714 | * the branch of the namespace from this device on. Just | |
715 | * bail out telling the walk routine to not traverse this | |
716 | * branch. This preserves the scoping rule for handlers. | |
717 | */ | |
718 | return (AE_CTRL_DEPTH); | |
719 | } | |
720 | ||
721 | /* Walk the linked list of handlers attached to this device */ | |
722 | ||
723 | next_handler_obj = next_handler_obj->address_space.next; | |
724 | } | |
725 | ||
726 | /* | |
727 | * As long as the device didn't have a handler for this | |
728 | * space we don't care about it. We just ignore it and | |
729 | * proceed. | |
730 | */ | |
731 | return (AE_OK); | |
732 | } | |
733 | ||
734 | /* Object is a Region */ | |
735 | ||
736 | if (obj_desc->region.space_id != handler_obj->address_space.space_id) { | |
737 | /* | |
738 | * This region is for a different address space | |
739 | * -- just ignore it | |
740 | */ | |
741 | return (AE_OK); | |
742 | } | |
743 | ||
744 | /* | |
745 | * Now we have a region and it is for the handler's address | |
746 | * space type. | |
747 | * | |
748 | * First disconnect region for any previous handler (if any) | |
749 | */ | |
4be44fcd | 750 | acpi_ev_detach_region(obj_desc, FALSE); |
1da177e4 LT |
751 | |
752 | /* Connect the region to the new handler */ | |
753 | ||
4be44fcd | 754 | status = acpi_ev_attach_region(handler_obj, obj_desc, FALSE); |
1da177e4 LT |
755 | return (status); |
756 | } | |
757 | ||
1da177e4 LT |
758 | /******************************************************************************* |
759 | * | |
760 | * FUNCTION: acpi_ev_install_space_handler | |
761 | * | |
762 | * PARAMETERS: Node - Namespace node for the device | |
763 | * space_id - The address space ID | |
764 | * Handler - Address of the handler | |
765 | * Setup - Address of the setup function | |
766 | * Context - Value passed to the handler on each access | |
767 | * | |
768 | * RETURN: Status | |
769 | * | |
770 | * DESCRIPTION: Install a handler for all op_regions of a given space_id. | |
771 | * Assumes namespace is locked | |
772 | * | |
773 | ******************************************************************************/ | |
774 | ||
775 | acpi_status | |
4be44fcd LB |
776 | acpi_ev_install_space_handler(struct acpi_namespace_node * node, |
777 | acpi_adr_space_type space_id, | |
778 | acpi_adr_space_handler handler, | |
779 | acpi_adr_space_setup setup, void *context) | |
1da177e4 | 780 | { |
4be44fcd LB |
781 | union acpi_operand_object *obj_desc; |
782 | union acpi_operand_object *handler_obj; | |
783 | acpi_status status; | |
784 | acpi_object_type type; | |
61686124 | 785 | u8 flags = 0; |
1da177e4 | 786 | |
b229cf92 | 787 | ACPI_FUNCTION_TRACE(ev_install_space_handler); |
1da177e4 LT |
788 | |
789 | /* | |
790 | * This registration is valid for only the types below | |
791 | * and the root. This is where the default handlers | |
792 | * get placed. | |
793 | */ | |
4be44fcd LB |
794 | if ((node->type != ACPI_TYPE_DEVICE) && |
795 | (node->type != ACPI_TYPE_PROCESSOR) && | |
796 | (node->type != ACPI_TYPE_THERMAL) && (node != acpi_gbl_root_node)) { | |
1da177e4 LT |
797 | status = AE_BAD_PARAMETER; |
798 | goto unlock_and_exit; | |
799 | } | |
800 | ||
801 | if (handler == ACPI_DEFAULT_HANDLER) { | |
802 | flags = ACPI_ADDR_HANDLER_DEFAULT_INSTALLED; | |
803 | ||
804 | switch (space_id) { | |
805 | case ACPI_ADR_SPACE_SYSTEM_MEMORY: | |
806 | handler = acpi_ex_system_memory_space_handler; | |
4be44fcd | 807 | setup = acpi_ev_system_memory_region_setup; |
1da177e4 LT |
808 | break; |
809 | ||
810 | case ACPI_ADR_SPACE_SYSTEM_IO: | |
811 | handler = acpi_ex_system_io_space_handler; | |
4be44fcd | 812 | setup = acpi_ev_io_space_region_setup; |
1da177e4 LT |
813 | break; |
814 | ||
815 | case ACPI_ADR_SPACE_PCI_CONFIG: | |
816 | handler = acpi_ex_pci_config_space_handler; | |
4be44fcd | 817 | setup = acpi_ev_pci_config_region_setup; |
1da177e4 LT |
818 | break; |
819 | ||
820 | case ACPI_ADR_SPACE_CMOS: | |
821 | handler = acpi_ex_cmos_space_handler; | |
4be44fcd | 822 | setup = acpi_ev_cmos_region_setup; |
1da177e4 LT |
823 | break; |
824 | ||
825 | case ACPI_ADR_SPACE_PCI_BAR_TARGET: | |
826 | handler = acpi_ex_pci_bar_space_handler; | |
4be44fcd | 827 | setup = acpi_ev_pci_bar_region_setup; |
1da177e4 LT |
828 | break; |
829 | ||
830 | case ACPI_ADR_SPACE_DATA_TABLE: | |
831 | handler = acpi_ex_data_table_space_handler; | |
4be44fcd | 832 | setup = NULL; |
1da177e4 LT |
833 | break; |
834 | ||
835 | default: | |
836 | status = AE_BAD_PARAMETER; | |
837 | goto unlock_and_exit; | |
838 | } | |
839 | } | |
840 | ||
841 | /* If the caller hasn't specified a setup routine, use the default */ | |
842 | ||
843 | if (!setup) { | |
844 | setup = acpi_ev_default_region_setup; | |
845 | } | |
846 | ||
847 | /* Check for an existing internal object */ | |
848 | ||
4be44fcd | 849 | obj_desc = acpi_ns_get_attached_object(node); |
1da177e4 LT |
850 | if (obj_desc) { |
851 | /* | |
852 | * The attached device object already exists. | |
853 | * Make sure the handler is not already installed. | |
854 | */ | |
855 | handler_obj = obj_desc->device.handler; | |
856 | ||
857 | /* Walk the handler list for this device */ | |
858 | ||
859 | while (handler_obj) { | |
52fc0b02 | 860 | |
1da177e4 LT |
861 | /* Same space_id indicates a handler already installed */ |
862 | ||
863 | if (handler_obj->address_space.space_id == space_id) { | |
4be44fcd LB |
864 | if (handler_obj->address_space.handler == |
865 | handler) { | |
1da177e4 LT |
866 | /* |
867 | * It is (relatively) OK to attempt to install the SAME | |
44f6c012 RM |
868 | * handler twice. This can easily happen |
869 | * with PCI_Config space. | |
1da177e4 LT |
870 | */ |
871 | status = AE_SAME_HANDLER; | |
872 | goto unlock_and_exit; | |
4be44fcd | 873 | } else { |
1da177e4 LT |
874 | /* A handler is already installed */ |
875 | ||
876 | status = AE_ALREADY_EXISTS; | |
877 | } | |
878 | goto unlock_and_exit; | |
879 | } | |
880 | ||
881 | /* Walk the linked list of handlers */ | |
882 | ||
883 | handler_obj = handler_obj->address_space.next; | |
884 | } | |
4be44fcd LB |
885 | } else { |
886 | ACPI_DEBUG_PRINT((ACPI_DB_OPREGION, | |
887 | "Creating object on Device %p while installing handler\n", | |
888 | node)); | |
1da177e4 LT |
889 | |
890 | /* obj_desc does not exist, create one */ | |
891 | ||
892 | if (node->type == ACPI_TYPE_ANY) { | |
893 | type = ACPI_TYPE_DEVICE; | |
4be44fcd | 894 | } else { |
1da177e4 LT |
895 | type = node->type; |
896 | } | |
897 | ||
4be44fcd | 898 | obj_desc = acpi_ut_create_internal_object(type); |
1da177e4 LT |
899 | if (!obj_desc) { |
900 | status = AE_NO_MEMORY; | |
901 | goto unlock_and_exit; | |
902 | } | |
903 | ||
904 | /* Init new descriptor */ | |
905 | ||
906 | obj_desc->common.type = (u8) type; | |
907 | ||
908 | /* Attach the new object to the Node */ | |
909 | ||
4be44fcd | 910 | status = acpi_ns_attach_object(node, obj_desc, type); |
1da177e4 LT |
911 | |
912 | /* Remove local reference to the object */ | |
913 | ||
4be44fcd | 914 | acpi_ut_remove_reference(obj_desc); |
1da177e4 | 915 | |
4be44fcd | 916 | if (ACPI_FAILURE(status)) { |
1da177e4 LT |
917 | goto unlock_and_exit; |
918 | } | |
919 | } | |
920 | ||
4be44fcd LB |
921 | ACPI_DEBUG_PRINT((ACPI_DB_OPREGION, |
922 | "Installing address handler for region %s(%X) on Device %4.4s %p(%p)\n", | |
923 | acpi_ut_get_region_name(space_id), space_id, | |
924 | acpi_ut_get_node_name(node), node, obj_desc)); | |
1da177e4 LT |
925 | |
926 | /* | |
927 | * Install the handler | |
928 | * | |
929 | * At this point there is no existing handler. | |
930 | * Just allocate the object for the handler and link it | |
931 | * into the list. | |
932 | */ | |
4be44fcd LB |
933 | handler_obj = |
934 | acpi_ut_create_internal_object(ACPI_TYPE_LOCAL_ADDRESS_HANDLER); | |
1da177e4 LT |
935 | if (!handler_obj) { |
936 | status = AE_NO_MEMORY; | |
937 | goto unlock_and_exit; | |
938 | } | |
939 | ||
940 | /* Init handler obj */ | |
941 | ||
4be44fcd | 942 | handler_obj->address_space.space_id = (u8) space_id; |
61686124 | 943 | handler_obj->address_space.handler_flags = flags; |
1da177e4 | 944 | handler_obj->address_space.region_list = NULL; |
4be44fcd LB |
945 | handler_obj->address_space.node = node; |
946 | handler_obj->address_space.handler = handler; | |
947 | handler_obj->address_space.context = context; | |
948 | handler_obj->address_space.setup = setup; | |
1da177e4 LT |
949 | |
950 | /* Install at head of Device.address_space list */ | |
951 | ||
4be44fcd | 952 | handler_obj->address_space.next = obj_desc->device.handler; |
1da177e4 LT |
953 | |
954 | /* | |
955 | * The Device object is the first reference on the handler_obj. | |
956 | * Each region that uses the handler adds a reference. | |
957 | */ | |
958 | obj_desc->device.handler = handler_obj; | |
959 | ||
960 | /* | |
961 | * Walk the namespace finding all of the regions this | |
962 | * handler will manage. | |
963 | * | |
964 | * Start at the device and search the branch toward | |
965 | * the leaf nodes until either the leaf is encountered or | |
966 | * a device is detected that has an address handler of the | |
967 | * same type. | |
968 | * | |
969 | * In either case, back up and search down the remainder | |
970 | * of the branch | |
971 | */ | |
4be44fcd LB |
972 | status = acpi_ns_walk_namespace(ACPI_TYPE_ANY, node, ACPI_UINT32_MAX, |
973 | ACPI_NS_WALK_UNLOCK, | |
974 | acpi_ev_install_handler, handler_obj, | |
975 | NULL); | |
1da177e4 | 976 | |
4be44fcd LB |
977 | unlock_and_exit: |
978 | return_ACPI_STATUS(status); | |
1da177e4 LT |
979 | } |
980 | ||
1da177e4 LT |
981 | /******************************************************************************* |
982 | * | |
983 | * FUNCTION: acpi_ev_execute_reg_methods | |
984 | * | |
985 | * PARAMETERS: Node - Namespace node for the device | |
986 | * space_id - The address space ID | |
987 | * | |
988 | * RETURN: Status | |
989 | * | |
990 | * DESCRIPTION: Run all _REG methods for the input Space ID; | |
991 | * Note: assumes namespace is locked, or system init time. | |
992 | * | |
993 | ******************************************************************************/ | |
994 | ||
995 | acpi_status | |
4be44fcd LB |
996 | acpi_ev_execute_reg_methods(struct acpi_namespace_node *node, |
997 | acpi_adr_space_type space_id) | |
1da177e4 | 998 | { |
4be44fcd | 999 | acpi_status status; |
1da177e4 | 1000 | |
b229cf92 | 1001 | ACPI_FUNCTION_TRACE(ev_execute_reg_methods); |
1da177e4 LT |
1002 | |
1003 | /* | |
1004 | * Run all _REG methods for all Operation Regions for this | |
1005 | * space ID. This is a separate walk in order to handle any | |
1006 | * interdependencies between regions and _REG methods. (i.e. handlers | |
1007 | * must be installed for all regions of this Space ID before we | |
1008 | * can run any _REG methods) | |
1009 | */ | |
4be44fcd LB |
1010 | status = acpi_ns_walk_namespace(ACPI_TYPE_ANY, node, ACPI_UINT32_MAX, |
1011 | ACPI_NS_WALK_UNLOCK, acpi_ev_reg_run, | |
1012 | &space_id, NULL); | |
1da177e4 | 1013 | |
4be44fcd | 1014 | return_ACPI_STATUS(status); |
1da177e4 LT |
1015 | } |
1016 | ||
1da177e4 LT |
1017 | /******************************************************************************* |
1018 | * | |
1019 | * FUNCTION: acpi_ev_reg_run | |
1020 | * | |
1021 | * PARAMETERS: walk_namespace callback | |
1022 | * | |
958dd242 | 1023 | * DESCRIPTION: Run _REG method for region objects of the requested space_iD |
1da177e4 LT |
1024 | * |
1025 | ******************************************************************************/ | |
1026 | ||
44f6c012 | 1027 | static acpi_status |
4be44fcd LB |
1028 | acpi_ev_reg_run(acpi_handle obj_handle, |
1029 | u32 level, void *context, void **return_value) | |
1da177e4 | 1030 | { |
4be44fcd LB |
1031 | union acpi_operand_object *obj_desc; |
1032 | struct acpi_namespace_node *node; | |
1033 | acpi_adr_space_type space_id; | |
1034 | acpi_status status; | |
1da177e4 | 1035 | |
4be44fcd | 1036 | space_id = *ACPI_CAST_PTR(acpi_adr_space_type, context); |
1da177e4 LT |
1037 | |
1038 | /* Convert and validate the device handle */ | |
1039 | ||
4be44fcd | 1040 | node = acpi_ns_map_handle_to_node(obj_handle); |
1da177e4 LT |
1041 | if (!node) { |
1042 | return (AE_BAD_PARAMETER); | |
1043 | } | |
1044 | ||
1045 | /* | |
1046 | * We only care about regions.and objects | |
1047 | * that are allowed to have address space handlers | |
1048 | */ | |
4be44fcd | 1049 | if ((node->type != ACPI_TYPE_REGION) && (node != acpi_gbl_root_node)) { |
1da177e4 LT |
1050 | return (AE_OK); |
1051 | } | |
1052 | ||
1053 | /* Check for an existing internal object */ | |
1054 | ||
4be44fcd | 1055 | obj_desc = acpi_ns_get_attached_object(node); |
1da177e4 | 1056 | if (!obj_desc) { |
52fc0b02 | 1057 | |
1da177e4 LT |
1058 | /* No object, just exit */ |
1059 | ||
1060 | return (AE_OK); | |
1061 | } | |
1062 | ||
1063 | /* Object is a Region */ | |
1064 | ||
1065 | if (obj_desc->region.space_id != space_id) { | |
1066 | /* | |
1067 | * This region is for a different address space | |
1068 | * -- just ignore it | |
1069 | */ | |
1070 | return (AE_OK); | |
1071 | } | |
1072 | ||
4be44fcd | 1073 | status = acpi_ev_execute_reg_method(obj_desc, 1); |
1da177e4 LT |
1074 | return (status); |
1075 | } |