]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/acpi/acobject.h
Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
[linux-2.6-omap-h63xx.git] / include / acpi / acobject.h
index 8fdee31119f360c1f896dcda2645ad14a72f4237..e9657dac69b788b6ed391efc4e838c5338f67889 100644 (file)
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2008, Intel Corp.
  * 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
 
 /*******************************************************************************
  *
@@ -101,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;
 };
 
 /*
@@ -146,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 */
@@ -203,9 +213,11 @@ 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;
+       ACPI_COMMON_NOTIFY_INFO acpi_io_address address;
 };
 
 struct acpi_object_thermal_zone {
@@ -406,4 +418,6 @@ union acpi_descriptor {
        union acpi_parse_object op;
 };
 
+#pragma pack()
+
 #endif                         /* _ACOBJECT_H */