Pull release into acpica branch
[linux-2.6] / drivers / acpi / executer / exresop.c
1
2 /******************************************************************************
3  *
4  * Module Name: exresop - AML Interpreter operand/object resolution
5  *
6  *****************************************************************************/
7
8 /*
9  * Copyright (C) 2000 - 2006, R. Byron Moore
10  * All rights reserved.
11  *
12  * Redistribution and use in source and binary forms, with or without
13  * modification, are permitted provided that the following conditions
14  * are met:
15  * 1. Redistributions of source code must retain the above copyright
16  *    notice, this list of conditions, and the following disclaimer,
17  *    without modification.
18  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
19  *    substantially similar to the "NO WARRANTY" disclaimer below
20  *    ("Disclaimer") and any redistribution must be conditioned upon
21  *    including a substantially similar Disclaimer requirement for further
22  *    binary redistribution.
23  * 3. Neither the names of the above-listed copyright holders nor the names
24  *    of any contributors may be used to endorse or promote products derived
25  *    from this software without specific prior written permission.
26  *
27  * Alternatively, this software may be distributed under the terms of the
28  * GNU General Public License ("GPL") version 2 as published by the Free
29  * Software Foundation.
30  *
31  * NO WARRANTY
32  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
33  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
34  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
35  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
36  * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
37  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
38  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
39  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
40  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
41  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
42  * POSSIBILITY OF SUCH DAMAGES.
43  */
44
45 #include <acpi/acpi.h>
46 #include <acpi/amlcode.h>
47 #include <acpi/acparser.h>
48 #include <acpi/acinterp.h>
49
50 #define _COMPONENT          ACPI_EXECUTER
51 ACPI_MODULE_NAME("exresop")
52
53 /* Local prototypes */
54 static acpi_status
55 acpi_ex_check_object_type(acpi_object_type type_needed,
56                           acpi_object_type this_type, void *object);
57
58 /*******************************************************************************
59  *
60  * FUNCTION:    acpi_ex_check_object_type
61  *
62  * PARAMETERS:  type_needed         Object type needed
63  *              this_type           Actual object type
64  *              Object              Object pointer
65  *
66  * RETURN:      Status
67  *
68  * DESCRIPTION: Check required type against actual type
69  *
70  ******************************************************************************/
71
72 static acpi_status
73 acpi_ex_check_object_type(acpi_object_type type_needed,
74                           acpi_object_type this_type, void *object)
75 {
76         ACPI_FUNCTION_ENTRY();
77
78         if (type_needed == ACPI_TYPE_ANY) {
79                 /* All types OK, so we don't perform any typechecks */
80
81                 return (AE_OK);
82         }
83
84         if (type_needed == ACPI_TYPE_LOCAL_REFERENCE) {
85                 /*
86                  * Allow the AML "Constant" opcodes (Zero, One, etc.) to be reference
87                  * objects and thus allow them to be targets.  (As per the ACPI
88                  * specification, a store to a constant is a noop.)
89                  */
90                 if ((this_type == ACPI_TYPE_INTEGER) &&
91                     (((union acpi_operand_object *)object)->common.
92                      flags & AOPOBJ_AML_CONSTANT)) {
93                         return (AE_OK);
94                 }
95         }
96
97         if (type_needed != this_type) {
98                 ACPI_REPORT_ERROR(("Needed type [%s], found [%s] %p\n",
99                                    acpi_ut_get_type_name(type_needed),
100                                    acpi_ut_get_type_name(this_type), object));
101
102                 return (AE_AML_OPERAND_TYPE);
103         }
104
105         return (AE_OK);
106 }
107
108 /*******************************************************************************
109  *
110  * FUNCTION:    acpi_ex_resolve_operands
111  *
112  * PARAMETERS:  Opcode              - Opcode being interpreted
113  *              stack_ptr           - Pointer to the operand stack to be
114  *                                    resolved
115  *              walk_state          - Current state
116  *
117  * RETURN:      Status
118  *
119  * DESCRIPTION: Convert multiple input operands to the types required by the
120  *              target operator.
121  *
122  *      Each 5-bit group in arg_types represents one required
123  *      operand and indicates the required Type. The corresponding operand
124  *      will be converted to the required type if possible, otherwise we
125  *      abort with an exception.
126  *
127  ******************************************************************************/
128
129 acpi_status
130 acpi_ex_resolve_operands(u16 opcode,
131                          union acpi_operand_object ** stack_ptr,
132                          struct acpi_walk_state * walk_state)
133 {
134         union acpi_operand_object *obj_desc;
135         acpi_status status = AE_OK;
136         u8 object_type;
137         void *temp_node;
138         u32 arg_types;
139         const struct acpi_opcode_info *op_info;
140         u32 this_arg_type;
141         acpi_object_type type_needed;
142         u16 target_op = 0;
143
144         ACPI_FUNCTION_TRACE_U32("ex_resolve_operands", opcode);
145
146         op_info = acpi_ps_get_opcode_info(opcode);
147         if (op_info->class == AML_CLASS_UNKNOWN) {
148                 return_ACPI_STATUS(AE_AML_BAD_OPCODE);
149         }
150
151         arg_types = op_info->runtime_args;
152         if (arg_types == ARGI_INVALID_OPCODE) {
153                 ACPI_REPORT_ERROR(("Unknown AML opcode %X\n", opcode));
154
155                 return_ACPI_STATUS(AE_AML_INTERNAL);
156         }
157
158         ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
159                           "Opcode %X [%s] required_operand_types=%8.8X\n",
160                           opcode, op_info->name, arg_types));
161
162         /*
163          * Normal exit is with (arg_types == 0) at end of argument list.
164          * Function will return an exception from within the loop upon
165          * finding an entry which is not (or cannot be converted
166          * to) the required type; if stack underflows; or upon
167          * finding a NULL stack entry (which should not happen).
168          */
169         while (GET_CURRENT_ARG_TYPE(arg_types)) {
170                 if (!stack_ptr || !*stack_ptr) {
171                         ACPI_REPORT_ERROR(("Null stack entry at %p\n",
172                                            stack_ptr));
173
174                         return_ACPI_STATUS(AE_AML_INTERNAL);
175                 }
176
177                 /* Extract useful items */
178
179                 obj_desc = *stack_ptr;
180
181                 /* Decode the descriptor type */
182
183                 switch (ACPI_GET_DESCRIPTOR_TYPE(obj_desc)) {
184                 case ACPI_DESC_TYPE_NAMED:
185
186                         /* Namespace Node */
187
188                         object_type =
189                             ((struct acpi_namespace_node *)obj_desc)->type;
190                         break;
191
192                 case ACPI_DESC_TYPE_OPERAND:
193
194                         /* ACPI internal object */
195
196                         object_type = ACPI_GET_OBJECT_TYPE(obj_desc);
197
198                         /* Check for bad acpi_object_type */
199
200                         if (!acpi_ut_valid_object_type(object_type)) {
201                                 ACPI_REPORT_ERROR(("Bad operand object type [%X]\n", object_type));
202
203                                 return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
204                         }
205
206                         if (object_type == (u8) ACPI_TYPE_LOCAL_REFERENCE) {
207                                 /* Decode the Reference */
208
209                                 op_info = acpi_ps_get_opcode_info(opcode);
210                                 if (op_info->class == AML_CLASS_UNKNOWN) {
211                                         return_ACPI_STATUS(AE_AML_BAD_OPCODE);
212                                 }
213
214                                 switch (obj_desc->reference.opcode) {
215                                 case AML_DEBUG_OP:
216                                         target_op = AML_DEBUG_OP;
217
218                                         /*lint -fallthrough */
219
220                                 case AML_NAME_OP:
221                                 case AML_INDEX_OP:
222                                 case AML_REF_OF_OP:
223                                 case AML_ARG_OP:
224                                 case AML_LOCAL_OP:
225                                 case AML_LOAD_OP:       /* ddb_handle from LOAD_OP or LOAD_TABLE_OP */
226                                 case AML_INT_NAMEPATH_OP:       /* Reference to a named object */
227
228                                         ACPI_DEBUG_ONLY_MEMBERS(ACPI_DEBUG_PRINT
229                                                                 ((ACPI_DB_EXEC,
230                                                                   "Operand is a Reference, ref_opcode [%s]\n",
231                                                                   (acpi_ps_get_opcode_info
232                                                                    (obj_desc->
233                                                                     reference.
234                                                                     opcode))->
235                                                                   name)));
236                                         break;
237
238                                 default:
239                                         ACPI_REPORT_ERROR(("Operand is a Reference, Unknown Reference Opcode: %X\n", obj_desc->reference.opcode));
240
241                                         return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
242                                 }
243                         }
244                         break;
245
246                 default:
247
248                         /* Invalid descriptor */
249
250                         ACPI_REPORT_ERROR(("Invalid descriptor %p [%s]\n",
251                                            obj_desc,
252                                            acpi_ut_get_descriptor_name
253                                            (obj_desc)));
254
255                         return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
256                 }
257
258                 /* Get one argument type, point to the next */
259
260                 this_arg_type = GET_CURRENT_ARG_TYPE(arg_types);
261                 INCREMENT_ARG_LIST(arg_types);
262
263                 /*
264                  * Handle cases where the object does not need to be
265                  * resolved to a value
266                  */
267                 switch (this_arg_type) {
268                 case ARGI_REF_OR_STRING:        /* Can be a String or Reference */
269
270                         if ((ACPI_GET_DESCRIPTOR_TYPE(obj_desc) ==
271                              ACPI_DESC_TYPE_OPERAND)
272                             && (ACPI_GET_OBJECT_TYPE(obj_desc) ==
273                                 ACPI_TYPE_STRING)) {
274                                 /*
275                                  * String found - the string references a named object and
276                                  * must be resolved to a node
277                                  */
278                                 goto next_operand;
279                         }
280
281                         /*
282                          * Else not a string - fall through to the normal Reference
283                          * case below
284                          */
285                         /*lint -fallthrough */
286
287                 case ARGI_REFERENCE:    /* References: */
288                 case ARGI_INTEGER_REF:
289                 case ARGI_OBJECT_REF:
290                 case ARGI_DEVICE_REF:
291                 case ARGI_TARGETREF:    /* Allows implicit conversion rules before store */
292                 case ARGI_FIXED_TARGET: /* No implicit conversion before store to target */
293                 case ARGI_SIMPLE_TARGET:        /* Name, Local, or Arg - no implicit conversion  */
294
295                         /*
296                          * Need an operand of type ACPI_TYPE_LOCAL_REFERENCE
297                          * A Namespace Node is OK as-is
298                          */
299                         if (ACPI_GET_DESCRIPTOR_TYPE(obj_desc) ==
300                             ACPI_DESC_TYPE_NAMED) {
301                                 goto next_operand;
302                         }
303
304                         status =
305                             acpi_ex_check_object_type(ACPI_TYPE_LOCAL_REFERENCE,
306                                                       object_type, obj_desc);
307                         if (ACPI_FAILURE(status)) {
308                                 return_ACPI_STATUS(status);
309                         }
310
311                         if (obj_desc->reference.opcode == AML_NAME_OP) {
312                                 /* Convert a named reference to the actual named object */
313
314                                 temp_node = obj_desc->reference.object;
315                                 acpi_ut_remove_reference(obj_desc);
316                                 (*stack_ptr) = temp_node;
317                         }
318                         goto next_operand;
319
320                 case ARGI_DATAREFOBJ:   /* Store operator only */
321
322                         /*
323                          * We don't want to resolve index_op reference objects during
324                          * a store because this would be an implicit de_ref_of operation.
325                          * Instead, we just want to store the reference object.
326                          * -- All others must be resolved below.
327                          */
328                         if ((opcode == AML_STORE_OP) &&
329                             (ACPI_GET_OBJECT_TYPE(*stack_ptr) ==
330                              ACPI_TYPE_LOCAL_REFERENCE)
331                             && ((*stack_ptr)->reference.opcode ==
332                                 AML_INDEX_OP)) {
333                                 goto next_operand;
334                         }
335                         break;
336
337                 default:
338                         /* All cases covered above */
339                         break;
340                 }
341
342                 /*
343                  * Resolve this object to a value
344                  */
345                 status = acpi_ex_resolve_to_value(stack_ptr, walk_state);
346                 if (ACPI_FAILURE(status)) {
347                         return_ACPI_STATUS(status);
348                 }
349
350                 /* Get the resolved object */
351
352                 obj_desc = *stack_ptr;
353
354                 /*
355                  * Check the resulting object (value) type
356                  */
357                 switch (this_arg_type) {
358                         /*
359                          * For the simple cases, only one type of resolved object
360                          * is allowed
361                          */
362                 case ARGI_MUTEX:
363
364                         /* Need an operand of type ACPI_TYPE_MUTEX */
365
366                         type_needed = ACPI_TYPE_MUTEX;
367                         break;
368
369                 case ARGI_EVENT:
370
371                         /* Need an operand of type ACPI_TYPE_EVENT */
372
373                         type_needed = ACPI_TYPE_EVENT;
374                         break;
375
376                 case ARGI_PACKAGE:      /* Package */
377
378                         /* Need an operand of type ACPI_TYPE_PACKAGE */
379
380                         type_needed = ACPI_TYPE_PACKAGE;
381                         break;
382
383                 case ARGI_ANYTYPE:
384
385                         /* Any operand type will do */
386
387                         type_needed = ACPI_TYPE_ANY;
388                         break;
389
390                 case ARGI_DDBHANDLE:
391
392                         /* Need an operand of type ACPI_TYPE_DDB_HANDLE */
393
394                         type_needed = ACPI_TYPE_LOCAL_REFERENCE;
395                         break;
396
397                         /*
398                          * The more complex cases allow multiple resolved object types
399                          */
400                 case ARGI_INTEGER:
401
402                         /*
403                          * Need an operand of type ACPI_TYPE_INTEGER,
404                          * But we can implicitly convert from a STRING or BUFFER
405                          * Aka - "Implicit Source Operand Conversion"
406                          */
407                         status =
408                             acpi_ex_convert_to_integer(obj_desc, stack_ptr, 16);
409                         if (ACPI_FAILURE(status)) {
410                                 if (status == AE_TYPE) {
411                                         ACPI_REPORT_ERROR(("Needed [Integer/String/Buffer], found [%s] %p\n", acpi_ut_get_object_type_name(obj_desc), obj_desc));
412
413                                         return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
414                                 }
415
416                                 return_ACPI_STATUS(status);
417                         }
418
419                         if (obj_desc != *stack_ptr) {
420                                 acpi_ut_remove_reference(obj_desc);
421                         }
422                         goto next_operand;
423
424                 case ARGI_BUFFER:
425
426                         /*
427                          * Need an operand of type ACPI_TYPE_BUFFER,
428                          * But we can implicitly convert from a STRING or INTEGER
429                          * Aka - "Implicit Source Operand Conversion"
430                          */
431                         status = acpi_ex_convert_to_buffer(obj_desc, stack_ptr);
432                         if (ACPI_FAILURE(status)) {
433                                 if (status == AE_TYPE) {
434                                         ACPI_REPORT_ERROR(("Needed [Integer/String/Buffer], found [%s] %p\n", acpi_ut_get_object_type_name(obj_desc), obj_desc));
435
436                                         return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
437                                 }
438
439                                 return_ACPI_STATUS(status);
440                         }
441
442                         if (obj_desc != *stack_ptr) {
443                                 acpi_ut_remove_reference(obj_desc);
444                         }
445                         goto next_operand;
446
447                 case ARGI_STRING:
448
449                         /*
450                          * Need an operand of type ACPI_TYPE_STRING,
451                          * But we can implicitly convert from a BUFFER or INTEGER
452                          * Aka - "Implicit Source Operand Conversion"
453                          */
454                         status = acpi_ex_convert_to_string(obj_desc, stack_ptr,
455                                                            ACPI_IMPLICIT_CONVERT_HEX);
456                         if (ACPI_FAILURE(status)) {
457                                 if (status == AE_TYPE) {
458                                         ACPI_REPORT_ERROR(("Needed [Integer/String/Buffer], found [%s] %p\n", acpi_ut_get_object_type_name(obj_desc), obj_desc));
459
460                                         return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
461                                 }
462
463                                 return_ACPI_STATUS(status);
464                         }
465
466                         if (obj_desc != *stack_ptr) {
467                                 acpi_ut_remove_reference(obj_desc);
468                         }
469                         goto next_operand;
470
471                 case ARGI_COMPUTEDATA:
472
473                         /* Need an operand of type INTEGER, STRING or BUFFER */
474
475                         switch (ACPI_GET_OBJECT_TYPE(obj_desc)) {
476                         case ACPI_TYPE_INTEGER:
477                         case ACPI_TYPE_STRING:
478                         case ACPI_TYPE_BUFFER:
479
480                                 /* Valid operand */
481                                 break;
482
483                         default:
484                                 ACPI_REPORT_ERROR(("Needed [Integer/String/Buffer], found [%s] %p\n", acpi_ut_get_object_type_name(obj_desc), obj_desc));
485
486                                 return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
487                         }
488                         goto next_operand;
489
490                 case ARGI_BUFFER_OR_STRING:
491
492                         /* Need an operand of type STRING or BUFFER */
493
494                         switch (ACPI_GET_OBJECT_TYPE(obj_desc)) {
495                         case ACPI_TYPE_STRING:
496                         case ACPI_TYPE_BUFFER:
497
498                                 /* Valid operand */
499                                 break;
500
501                         case ACPI_TYPE_INTEGER:
502
503                                 /* Highest priority conversion is to type Buffer */
504
505                                 status =
506                                     acpi_ex_convert_to_buffer(obj_desc,
507                                                               stack_ptr);
508                                 if (ACPI_FAILURE(status)) {
509                                         return_ACPI_STATUS(status);
510                                 }
511
512                                 if (obj_desc != *stack_ptr) {
513                                         acpi_ut_remove_reference(obj_desc);
514                                 }
515                                 break;
516
517                         default:
518                                 ACPI_REPORT_ERROR(("Needed [Integer/String/Buffer], found [%s] %p\n", acpi_ut_get_object_type_name(obj_desc), obj_desc));
519
520                                 return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
521                         }
522                         goto next_operand;
523
524                 case ARGI_DATAOBJECT:
525                         /*
526                          * ARGI_DATAOBJECT is only used by the size_of operator.
527                          * Need a buffer, string, package, or ref_of reference.
528                          *
529                          * The only reference allowed here is a direct reference to
530                          * a namespace node.
531                          */
532                         switch (ACPI_GET_OBJECT_TYPE(obj_desc)) {
533                         case ACPI_TYPE_PACKAGE:
534                         case ACPI_TYPE_STRING:
535                         case ACPI_TYPE_BUFFER:
536                         case ACPI_TYPE_LOCAL_REFERENCE:
537
538                                 /* Valid operand */
539                                 break;
540
541                         default:
542                                 ACPI_REPORT_ERROR(("Needed [Buffer/String/Package/Reference], found [%s] %p\n", acpi_ut_get_object_type_name(obj_desc), obj_desc));
543
544                                 return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
545                         }
546                         goto next_operand;
547
548                 case ARGI_COMPLEXOBJ:
549
550                         /* Need a buffer or package or (ACPI 2.0) String */
551
552                         switch (ACPI_GET_OBJECT_TYPE(obj_desc)) {
553                         case ACPI_TYPE_PACKAGE:
554                         case ACPI_TYPE_STRING:
555                         case ACPI_TYPE_BUFFER:
556
557                                 /* Valid operand */
558                                 break;
559
560                         default:
561                                 ACPI_REPORT_ERROR(("Needed [Buffer/String/Package], found [%s] %p\n", acpi_ut_get_object_type_name(obj_desc), obj_desc));
562
563                                 return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
564                         }
565                         goto next_operand;
566
567                 case ARGI_REGION_OR_FIELD:
568
569                         /* Need an operand of type REGION or a FIELD in a region */
570
571                         switch (ACPI_GET_OBJECT_TYPE(obj_desc)) {
572                         case ACPI_TYPE_REGION:
573                         case ACPI_TYPE_LOCAL_REGION_FIELD:
574                         case ACPI_TYPE_LOCAL_BANK_FIELD:
575                         case ACPI_TYPE_LOCAL_INDEX_FIELD:
576
577                                 /* Valid operand */
578                                 break;
579
580                         default:
581                                 ACPI_REPORT_ERROR(("Needed [Region/region_field], found [%s] %p\n", acpi_ut_get_object_type_name(obj_desc), obj_desc));
582
583                                 return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
584                         }
585                         goto next_operand;
586
587                 case ARGI_DATAREFOBJ:
588
589                         /* Used by the Store() operator only */
590
591                         switch (ACPI_GET_OBJECT_TYPE(obj_desc)) {
592                         case ACPI_TYPE_INTEGER:
593                         case ACPI_TYPE_PACKAGE:
594                         case ACPI_TYPE_STRING:
595                         case ACPI_TYPE_BUFFER:
596                         case ACPI_TYPE_BUFFER_FIELD:
597                         case ACPI_TYPE_LOCAL_REFERENCE:
598                         case ACPI_TYPE_LOCAL_REGION_FIELD:
599                         case ACPI_TYPE_LOCAL_BANK_FIELD:
600                         case ACPI_TYPE_LOCAL_INDEX_FIELD:
601                         case ACPI_TYPE_DDB_HANDLE:
602
603                                 /* Valid operand */
604                                 break;
605
606                         default:
607
608                                 if (acpi_gbl_enable_interpreter_slack) {
609                                         /*
610                                          * Enable original behavior of Store(), allowing any and all
611                                          * objects as the source operand.  The ACPI spec does not
612                                          * allow this, however.
613                                          */
614                                         break;
615                                 }
616
617                                 if (target_op == AML_DEBUG_OP) {
618                                         /* Allow store of any object to the Debug object */
619
620                                         break;
621                                 }
622
623                                 ACPI_REPORT_ERROR(("Needed Integer/Buffer/String/Package/Ref/Ddb], found [%s] %p\n", acpi_ut_get_object_type_name(obj_desc), obj_desc));
624
625                                 return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
626                         }
627                         goto next_operand;
628
629                 default:
630
631                         /* Unknown type */
632
633                         ACPI_REPORT_ERROR(("Internal - Unknown ARGI (required operand) type %X\n", this_arg_type));
634
635                         return_ACPI_STATUS(AE_BAD_PARAMETER);
636                 }
637
638                 /*
639                  * Make sure that the original object was resolved to the
640                  * required object type (Simple cases only).
641                  */
642                 status = acpi_ex_check_object_type(type_needed,
643                                                    ACPI_GET_OBJECT_TYPE
644                                                    (*stack_ptr), *stack_ptr);
645                 if (ACPI_FAILURE(status)) {
646                         return_ACPI_STATUS(status);
647                 }
648
649               next_operand:
650                 /*
651                  * If more operands needed, decrement stack_ptr to point
652                  * to next operand on stack
653                  */
654                 if (GET_CURRENT_ARG_TYPE(arg_types)) {
655                         stack_ptr--;
656                 }
657         }
658
659         return_ACPI_STATUS(status);
660 }