]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - include/acpi/acobject.h
Merge master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
[mv-sheeva.git] / include / acpi / acobject.h
index 28241aa15de919bce2b60c0eacdf95a76d1a9845..04e9735a674214fb49aab10f3b75d273e3f44e0d 100644 (file)
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * to the interpreter, and to keep track of the various handlers such as
  * address space handlers and notify handlers. The object is a constant
  * size in order to allow it to be cached and reused.
+ *
+ * Note: The object is optimized to be aligned and will not work if it is
+ * byte-packed.
  */
+#if ACPI_MACHINE_WIDTH == 64
+#pragma pack(8)
+#else
+#pragma pack(4)
+#endif
 
 /*******************************************************************************
  *
  *
  * descriptor_type is used to differentiate between internal descriptors, and
  * must be in the same place across all descriptors
+ *
+ * Note: The descriptor_type and Type fields must appear in the identical
+ * position in both the struct acpi_namespace_node and union acpi_operand_object
+ * structures.
  */
 #define ACPI_OBJECT_COMMON_HEADER \
        union acpi_operand_object       *next_object;       /* Objects linked to parent NS node */\
@@ -85,6 +97,7 @@
 #define AOPOBJ_OBJECT_INITIALIZED   0x08
 #define AOPOBJ_SETUP_COMPLETE       0x10
 #define AOPOBJ_SINGLE_DATUM         0x20
+#define AOPOBJ_INVALID              0x40       /* Used if host OS won't allow an op_region address */
 
 /******************************************************************************
  *
@@ -96,7 +109,8 @@ struct acpi_object_common {
 ACPI_OBJECT_COMMON_HEADER};
 
 struct acpi_object_integer {
-       ACPI_OBJECT_COMMON_HEADER acpi_integer value;
+       ACPI_OBJECT_COMMON_HEADER u8 fill[3];   /* Prevent warning on some compilers */
+       acpi_integer value;
 };
 
 /*
@@ -135,14 +149,14 @@ struct acpi_object_package {
  *****************************************************************************/
 
 struct acpi_object_event {
-       ACPI_OBJECT_COMMON_HEADER void *semaphore;
+       ACPI_OBJECT_COMMON_HEADER acpi_semaphore os_semaphore;  /* Actual OS synchronization object */
 };
 
 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 */
-       void *semaphore;        /* Actual OS synchronization object */
+       acpi_mutex os_mutex;    /* Actual OS synchronization object */
        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 */
@@ -161,8 +175,8 @@ struct acpi_object_region {
 struct acpi_object_method {
        ACPI_OBJECT_COMMON_HEADER u8 method_flags;
        u8 param_count;
-       u8 concurrency;
-       void *semaphore;
+       u8 sync_level;
+       union acpi_operand_object *mutex;
        u8 *aml_start;
        ACPI_INTERNAL_METHOD implementation;
        u32 aml_length;
@@ -198,7 +212,9 @@ struct acpi_object_power_resource {
 };
 
 struct acpi_object_processor {
-       ACPI_OBJECT_COMMON_HEADER u8 proc_id;
+       ACPI_OBJECT_COMMON_HEADER
+           /* The next two fields take advantage of the 3-byte space before NOTIFY_INFO */
+       u8 proc_id;
        u8 length;
         ACPI_COMMON_NOTIFY_INFO acpi_io_address address;
 };
@@ -244,7 +260,7 @@ struct acpi_object_bank_field {
 struct acpi_object_index_field {
        ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO
            /*
-            * No "region_obj" pointer needed since the Index and Data registers
+            * No "RegionObj" pointer needed since the Index and Data registers
             * are each field definitions unto themselves.
             */
        union acpi_operand_object *index_obj;   /* Index register */
@@ -401,4 +417,6 @@ union acpi_descriptor {
        union acpi_parse_object op;
 };
 
+#pragma pack()
+
 #endif                         /* _ACOBJECT_H */