]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/acpi/acobject.h
Merge branch 'v28-range-hrtimers-for-linus-v2' of git://git.kernel.org/pub/scm/linux...
[linux-2.6-omap-h63xx.git] / include / acpi / acobject.h
index 7e1211a8b8faf5f84710586a7130d8abfb0fa673..eb6f038b03d9f23d8479fe1a2caa40bab2ee2cb3 100644 (file)
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2007, R. Byron Moore
+ * Copyright (C) 2000 - 2008, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -155,8 +155,9 @@ struct acpi_object_event {
 struct acpi_object_mutex {
        ACPI_OBJECT_COMMON_HEADER u8 sync_level;        /* 0-15, specified in Mutex() call */
        u16 acquisition_depth;  /* Allow multiple Acquires, same thread */
-       struct acpi_thread_state *owner_thread; /* Current owner of the mutex */
        acpi_mutex os_mutex;    /* Actual OS synchronization object */
+       acpi_thread_id thread_id;       /* Current owner of the mutex */
+       struct acpi_thread_state *owner_thread; /* Current owner of the mutex */
        union acpi_operand_object *prev;        /* Link for list of acquired mutexes */
        union acpi_operand_object *next;        /* Link for list of acquired mutexes */
        struct acpi_namespace_node *node;       /* Containing namespace node */
@@ -307,18 +308,34 @@ struct acpi_object_addr_handler {
  *****************************************************************************/
 
 /*
- * The Reference object type is used for these opcodes:
- * Arg[0-6], Local[0-7], index_op, name_op, zero_op, one_op, ones_op, debug_op
+ * The Reference object is used for these opcodes:
+ * Arg[0-6], Local[0-7], index_op, name_op, ref_of_op, load_op, load_table_op, debug_op
+ * The Reference.Class differentiates these types.
  */
 struct acpi_object_reference {
-       ACPI_OBJECT_COMMON_HEADER u8 target_type;       /* Used for index_op */
-       u16 opcode;
+       ACPI_OBJECT_COMMON_HEADER u8 class;     /* Reference Class */
+       u8 target_type;         /* Used for Index Op */
+       u8 reserved;
        void *object;           /* name_op=>HANDLE to obj, index_op=>union acpi_operand_object */
-       struct acpi_namespace_node *node;
-       union acpi_operand_object **where;
-       u32 offset;             /* Used for arg_op, local_op, and index_op */
+       struct acpi_namespace_node *node;       /* ref_of or Namepath */
+       union acpi_operand_object **where;      /* Target of Index */
+       u32 value;              /* Used for Local/Arg/Index/ddb_handle */
 };
 
+/* Values for Reference.Class above */
+
+typedef enum {
+       ACPI_REFCLASS_LOCAL = 0,        /* Method local */
+       ACPI_REFCLASS_ARG = 1,  /* Method argument */
+       ACPI_REFCLASS_REFOF = 2,        /* Result of ref_of() TBD: Split to Ref/Node and Ref/operand_obj? */
+       ACPI_REFCLASS_INDEX = 3,        /* Result of Index() */
+       ACPI_REFCLASS_TABLE = 4,        /* ddb_handle - Load(), load_table() */
+       ACPI_REFCLASS_NAME = 5, /* Reference to a named object */
+       ACPI_REFCLASS_DEBUG = 6,        /* Debug object */
+
+       ACPI_REFCLASS_MAX = 6
+} ACPI_REFERENCE_CLASSES;
+
 /*
  * Extra object is used as additional storage for types that
  * have AML code in their declarations (term_args) that must be
@@ -378,6 +395,13 @@ union acpi_operand_object {
        struct acpi_object_extra extra;
        struct acpi_object_data data;
        struct acpi_object_cache_list cache;
+
+       /*
+        * Add namespace node to union in order to simplify code that accepts both
+        * ACPI_OPERAND_OBJECTs and ACPI_NAMESPACE_NODEs. The structures share
+        * a common descriptor_type field in order to differentiate them.
+        */
+       struct acpi_namespace_node node;
 };
 
 /******************************************************************************