trivial: fix an -> a typos in documentation and comments
[safe/jmp/linux-2.6] / include / acpi / actypes.h
index 520f315..8222e8d 100644 (file)
@@ -5,7 +5,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
 #ifndef __ACTYPES_H__
 #define __ACTYPES_H__
 
+/* acpisrc:struct_defs -- for acpisrc conversion */
+
 /*
  * ACPI_MACHINE_WIDTH must be specified in an OS- or compiler-dependent header
- * and must be either 16, 32, or 64
+ * and must be either 32 or 64. 16-bit ACPICA is no longer supported, as of
+ * 12/2006.
  */
 #ifndef ACPI_MACHINE_WIDTH
 #error ACPI_MACHINE_WIDTH not defined
  * usually used for memory allocation, efficient loop counters, and array
  * indexes. The types are similar to the size_t type in the C library and are
  * required because there is no C type that consistently represents the native
- * data width.
+ * data width. ACPI_SIZE is needed because there is no guarantee that a
+ * kernel-level C library is present.
  *
  * ACPI_SIZE        16/32/64-bit unsigned value
- * ACPI_NATIVE_UINT 16/32/64-bit unsigned value
  * ACPI_NATIVE_INT  16/32/64-bit signed value
  *
  */
@@ -144,10 +147,9 @@ typedef int INT32;
 
 /*! [End] no source code translation !*/
 
-typedef u64 acpi_native_uint;
 typedef s64 acpi_native_int;
 
-typedef u64 acpi_table_ptr;
+typedef u64 acpi_size;
 typedef u64 acpi_io_address;
 typedef u64 acpi_physical_address;
 
@@ -184,62 +186,25 @@ typedef int INT32;
 
 /*! [End] no source code translation !*/
 
-typedef u32 acpi_native_uint;
 typedef s32 acpi_native_int;
 
-typedef u64 acpi_table_ptr;
+typedef u32 acpi_size;
 typedef u32 acpi_io_address;
-typedef u64 acpi_physical_address;
+typedef u32 acpi_physical_address;
 
 #define ACPI_MAX_PTR                    ACPI_UINT32_MAX
 #define ACPI_SIZE_MAX                   ACPI_UINT32_MAX
 
-/*******************************************************************************
- *
- * Types specific to 16-bit targets
- *
- ******************************************************************************/
-
-#elif ACPI_MACHINE_WIDTH == 16
-
-/*! [Begin] no source code translation (keep the typedefs as-is) */
-
-typedef unsigned long UINT32;
-typedef short INT16;
-typedef long INT32;
-
-/*! [End] no source code translation !*/
-
-typedef u16 acpi_native_uint;
-typedef s16 acpi_native_int;
-
-typedef u32 acpi_table_ptr;
-typedef u32 acpi_io_address;
-typedef char *acpi_physical_address;
-
-#define ACPI_MAX_PTR                    ACPI_UINT16_MAX
-#define ACPI_SIZE_MAX                   ACPI_UINT16_MAX
-
-#define ACPI_USE_NATIVE_DIVIDE /* No 64-bit integers, ok to use native divide */
-
-/* 64-bit integers cannot be supported */
-
-#define ACPI_NO_INTEGER64_SUPPORT
-
 #else
 
-/* ACPI_MACHINE_WIDTH must be either 64, 32, or 16 */
+/* ACPI_MACHINE_WIDTH must be either 64 or 32 */
 
 #error unknown ACPI_MACHINE_WIDTH
 #endif
 
-/* Variable-width type, used instead of clib size_t */
-
-typedef acpi_native_uint acpi_size;
-
 /*******************************************************************************
  *
- * OS- or compiler-dependent types
+ * OS-dependent and compiler-dependent types
  *
  * If the defaults below are not appropriate for the host system, they can
  * be defined in the compiler-specific or OS-specific header, and this will
@@ -247,27 +212,34 @@ typedef acpi_native_uint acpi_size;
  *
  ******************************************************************************/
 
-/* Use C99 uintptr_t for pointer casting if available, "void *" otherwise */
+/* Value returned by acpi_os_get_thread_id */
 
-#ifndef acpi_uintptr_t
-#define acpi_uintptr_t                          void *
+#ifndef acpi_thread_id
+#define acpi_thread_id                 acpi_size
 #endif
 
-/*
- * If acpi_cache_t was not defined in the OS-dependent header,
- * define it now. This is typically the case where the local cache
- * manager implementation is to be used (ACPI_USE_LOCAL_CACHE)
- */
-#ifndef acpi_cache_t
-#define acpi_cache_t                            struct acpi_memory_list
+/* Object returned from acpi_os_create_lock */
+
+#ifndef acpi_spinlock
+#define acpi_spinlock                   void *
 #endif
 
-/*
- * Allow the CPU flags word to be defined per-OS to simplify the use of the
- * lock and unlock OSL interfaces.
- */
+/* Flags for acpi_os_acquire_lock/acpi_os_release_lock */
+
 #ifndef acpi_cpu_flags
-#define acpi_cpu_flags                          acpi_native_uint
+#define acpi_cpu_flags                 acpi_size
+#endif
+
+/* Object returned from acpi_os_create_cache */
+
+#ifndef acpi_cache_t
+#define acpi_cache_t                    struct acpi_memory_list
+#endif
+
+/* Use C99 uintptr_t for pointer casting if available, "void *" otherwise */
+
+#ifndef acpi_uintptr_t
+#define acpi_uintptr_t                  void *
 #endif
 
 /*
@@ -296,49 +268,12 @@ typedef acpi_native_uint acpi_size;
 #define ACPI_EXPORT_SYMBOL(symbol)
 #endif
 
-/*
- * thread_id is returned by acpi_os_get_thread_id.
- */
-#ifndef acpi_thread_id
-#define acpi_thread_id                          acpi_native_uint
-#endif
-
 /*******************************************************************************
  *
  * Independent types
  *
  ******************************************************************************/
 
-/*
- * Pointer overlays to avoid lots of typecasting for
- * code that accepts both physical and logical pointers.
- */
-union acpi_pointers {
-       acpi_physical_address physical;
-       void *logical;
-       acpi_table_ptr value;
-};
-
-struct acpi_pointer {
-       u32 pointer_type;
-       union acpi_pointers pointer;
-};
-
-/* pointer_types for above */
-
-#define ACPI_PHYSICAL_POINTER           0x01
-#define ACPI_LOGICAL_POINTER            0x02
-
-/* Processor mode */
-
-#define ACPI_PHYSICAL_ADDRESSING        0x04
-#define ACPI_LOGICAL_ADDRESSING         0x08
-#define ACPI_MEMORY_MODE                0x0C
-
-#define ACPI_PHYSMODE_PHYSPTR           ACPI_PHYSICAL_ADDRESSING | ACPI_PHYSICAL_POINTER
-#define ACPI_LOGMODE_PHYSPTR            ACPI_LOGICAL_ADDRESSING  | ACPI_PHYSICAL_POINTER
-#define ACPI_LOGMODE_LOGPTR             ACPI_LOGICAL_ADDRESSING  | ACPI_LOGICAL_POINTER
-
 /* Logical defines and NULL */
 
 #ifdef FALSE
@@ -378,29 +313,18 @@ struct uint32_struct {
        u32 hi;
 };
 
+/* Synchronization objects */
+
+#define acpi_mutex                      void *
+#define acpi_semaphore                  void *
+
 /*
- * Acpi integer width. In ACPI version 1, integers are
- * 32 bits.  In ACPI version 2, integers are 64 bits.
- * Note that this pertains to the ACPI integer type only, not
- * other integers used in the implementation of the ACPI CA
+ * Acpi integer width. In ACPI version 1, integers are 32 bits.  In ACPI
+ * version 2, integers are 64 bits. Note that this pertains to the ACPI integer
+ * type only, not other integers used in the implementation of the ACPI CA
  * subsystem.
  */
-#ifdef ACPI_NO_INTEGER64_SUPPORT
-
-/* 32-bit integers only, no 64-bit support */
-
-typedef u32 acpi_integer;
-#define ACPI_INTEGER_MAX                ACPI_UINT32_MAX
-#define ACPI_INTEGER_BIT_SIZE           32
-#define ACPI_MAX_DECIMAL_DIGITS         10     /* 2^32 = 4,294,967,296 */
-
-#define ACPI_USE_NATIVE_DIVIDE /* Use compiler native 32-bit divide */
-
-#else
-
-/* 64-bit integers */
-
-typedef u64 acpi_integer;
+typedef unsigned long long acpi_integer;
 #define ACPI_INTEGER_MAX                ACPI_UINT64_MAX
 #define ACPI_INTEGER_BIT_SIZE           64
 #define ACPI_MAX_DECIMAL_DIGITS         20     /* 2^64 = 18,446,744,073,709,551,616 */
@@ -408,7 +332,6 @@ typedef u64 acpi_integer;
 #if ACPI_MACHINE_WIDTH == 64
 #define ACPI_USE_NATIVE_DIVIDE /* Use compiler native 64-bit divide */
 #endif
-#endif
 
 #define ACPI_MAX64_DECIMAL_DIGITS       20
 #define ACPI_MAX32_DECIMAL_DIGITS       10
@@ -435,7 +358,8 @@ typedef u64 acpi_integer;
 /*
  * Initialization state
  */
-#define ACPI_INITIALIZED_OK             0x01
+#define ACPI_SUBSYSTEM_INITIALIZE       0x01
+#define ACPI_INITIALIZED_OK             0x02
 
 /*
  * Power state values
@@ -474,29 +398,20 @@ typedef u64 acpi_integer;
 /*
  * Standard notify values
  */
-#define ACPI_NOTIFY_BUS_CHECK           (u8) 0
-#define ACPI_NOTIFY_DEVICE_CHECK        (u8) 1
-#define ACPI_NOTIFY_DEVICE_WAKE         (u8) 2
-#define ACPI_NOTIFY_EJECT_REQUEST       (u8) 3
-#define ACPI_NOTIFY_DEVICE_CHECK_LIGHT  (u8) 4
-#define ACPI_NOTIFY_FREQUENCY_MISMATCH  (u8) 5
-#define ACPI_NOTIFY_BUS_MODE_MISMATCH   (u8) 6
-#define ACPI_NOTIFY_POWER_FAULT         (u8) 7
-
-/*
- *  Table types.  These values are passed to the table related APIs
- */
-typedef u32 acpi_table_type;
-
-#define ACPI_TABLE_RSDP                 (acpi_table_type) 0
-#define ACPI_TABLE_DSDT                 (acpi_table_type) 1
-#define ACPI_TABLE_FADT                 (acpi_table_type) 2
-#define ACPI_TABLE_FACS                 (acpi_table_type) 3
-#define ACPI_TABLE_PSDT                 (acpi_table_type) 4
-#define ACPI_TABLE_SSDT                 (acpi_table_type) 5
-#define ACPI_TABLE_XSDT                 (acpi_table_type) 6
-#define ACPI_TABLE_MAX                  6
-#define NUM_ACPI_TABLE_TYPES            (ACPI_TABLE_MAX+1)
+#define ACPI_NOTIFY_BUS_CHECK           (u8) 0x00
+#define ACPI_NOTIFY_DEVICE_CHECK        (u8) 0x01
+#define ACPI_NOTIFY_DEVICE_WAKE         (u8) 0x02
+#define ACPI_NOTIFY_EJECT_REQUEST       (u8) 0x03
+#define ACPI_NOTIFY_DEVICE_CHECK_LIGHT  (u8) 0x04
+#define ACPI_NOTIFY_FREQUENCY_MISMATCH  (u8) 0x05
+#define ACPI_NOTIFY_BUS_MODE_MISMATCH   (u8) 0x06
+#define ACPI_NOTIFY_POWER_FAULT         (u8) 0x07
+#define ACPI_NOTIFY_CAPABILITIES_CHECK  (u8) 0x08
+#define ACPI_NOTIFY_DEVICE_PLD_CHECK    (u8) 0x09
+#define ACPI_NOTIFY_RESERVED            (u8) 0x0A
+#define ACPI_NOTIFY_LOCALITY_UPDATE     (u8) 0x0B
+
+#define ACPI_NOTIFY_MAX                 0x0B
 
 /*
  * Types associated with ACPI names and objects.  The first group of
@@ -552,7 +467,7 @@ typedef u32 acpi_object_type;
 
 /*
  * These are special object types that never appear in
- * a Namespace node, only in an union acpi_operand_object
+ * a Namespace node, only in a union acpi_operand_object
  */
 #define ACPI_TYPE_LOCAL_EXTRA           0x1C
 #define ACPI_TYPE_LOCAL_DATA            0x1D
@@ -564,6 +479,8 @@ typedef u32 acpi_object_type;
 #define ACPI_TYPE_INVALID               0x1E
 #define ACPI_TYPE_NOT_FOUND             0xFF
 
+#define ACPI_NUM_NS_TYPES               (ACPI_TYPE_INVALID + 1)
+
 /*
  * All I/O
  */
@@ -608,6 +525,7 @@ typedef u32 acpi_event_status;
 #define ACPI_EVENT_FLAG_ENABLED         (acpi_event_status) 0x01
 #define ACPI_EVENT_FLAG_WAKE_ENABLED    (acpi_event_status) 0x02
 #define ACPI_EVENT_FLAG_SET             (acpi_event_status) 0x04
+#define ACPI_EVENT_FLAG_HANDLE         (acpi_event_status) 0x08
 
 /*
  * General Purpose Events (GPE)
@@ -630,7 +548,7 @@ typedef u32 acpi_event_status;
  *  | | |  +--- Type of dispatch -- to method, handler, or none
  *  | | +--- Enabled for runtime?
  *  | +--- Enabled for wake?
- *  +--- System state when GPE ocurred (running/waking)
+ *  +--- Unused
  */
 #define ACPI_GPE_XRUPT_TYPE_MASK        (u8) 0x01
 #define ACPI_GPE_LEVEL_TRIGGERED        (u8) 0x01
@@ -656,10 +574,6 @@ typedef u32 acpi_event_status;
 
 #define ACPI_GPE_ENABLE_MASK            (u8) 0x60      /* Both run/wake */
 
-#define ACPI_GPE_SYSTEM_MASK            (u8) 0x80
-#define ACPI_GPE_SYSTEM_RUNNING         (u8) 0x80
-#define ACPI_GPE_SYSTEM_WAKING          (u8) 0x00
-
 /*
  * Flags for GPE and Lock interfaces
  */
@@ -673,7 +587,7 @@ typedef u32 acpi_event_status;
 
 #define ACPI_SYSTEM_NOTIFY              0x1
 #define ACPI_DEVICE_NOTIFY              0x2
-#define ACPI_ALL_NOTIFY                 0x3
+#define ACPI_ALL_NOTIFY                 (ACPI_SYSTEM_NOTIFY | ACPI_DEVICE_NOTIFY)
 #define ACPI_MAX_NOTIFY_HANDLER_TYPE    0x3
 
 #define ACPI_MAX_SYS_NOTIFY             0x7f
@@ -694,8 +608,15 @@ typedef u8 acpi_adr_space_type;
 
 /*
  * bit_register IDs
- * These are bitfields defined within the full ACPI registers
+ *
+ * These values are intended to be used by the hardware interfaces
+ * and are mapped to individual bitfields defined within the ACPI
+ * registers. See the acpi_gbl_bit_register_info global table in utglobal.c
+ * for this mapping.
  */
+
+/* PM1 Status register */
+
 #define ACPI_BITREG_TIMER_STATUS                0x00
 #define ACPI_BITREG_BUS_MASTER_STATUS           0x01
 #define ACPI_BITREG_GLOBAL_LOCK_STATUS          0x02
@@ -705,69 +626,79 @@ typedef u8 acpi_adr_space_type;
 #define ACPI_BITREG_WAKE_STATUS                 0x06
 #define ACPI_BITREG_PCIEXP_WAKE_STATUS          0x07
 
+/* PM1 Enable register */
+
 #define ACPI_BITREG_TIMER_ENABLE                0x08
 #define ACPI_BITREG_GLOBAL_LOCK_ENABLE          0x09
 #define ACPI_BITREG_POWER_BUTTON_ENABLE         0x0A
 #define ACPI_BITREG_SLEEP_BUTTON_ENABLE         0x0B
 #define ACPI_BITREG_RT_CLOCK_ENABLE             0x0C
-#define ACPI_BITREG_WAKE_ENABLE                 0x0D
-#define ACPI_BITREG_PCIEXP_WAKE_DISABLE         0x0E
+#define ACPI_BITREG_PCIEXP_WAKE_DISABLE         0x0D
 
-#define ACPI_BITREG_SCI_ENABLE                  0x0F
-#define ACPI_BITREG_BUS_MASTER_RLD              0x10
-#define ACPI_BITREG_GLOBAL_LOCK_RELEASE         0x11
-#define ACPI_BITREG_SLEEP_TYPE_A                0x12
-#define ACPI_BITREG_SLEEP_TYPE_B                0x13
-#define ACPI_BITREG_SLEEP_ENABLE                0x14
+/* PM1 Control register */
 
-#define ACPI_BITREG_ARB_DISABLE                 0x15
+#define ACPI_BITREG_SCI_ENABLE                  0x0E
+#define ACPI_BITREG_BUS_MASTER_RLD              0x0F
+#define ACPI_BITREG_GLOBAL_LOCK_RELEASE         0x10
+#define ACPI_BITREG_SLEEP_TYPE_A                0x11
+#define ACPI_BITREG_SLEEP_TYPE_B                0x12
+#define ACPI_BITREG_SLEEP_ENABLE                0x13
 
-#define ACPI_BITREG_MAX                         0x15
+/* PM2 Control register */
+
+#define ACPI_BITREG_ARB_DISABLE                 0x14
+
+#define ACPI_BITREG_MAX                         0x14
 #define ACPI_NUM_BITREG                         ACPI_BITREG_MAX + 1
 
 /*
  * External ACPI object definition
  */
+
+/*
+ * Note: Type == ACPI_TYPE_ANY (0) is used to indicate a NULL package element
+ * or an unresolved named reference.
+ */
 union acpi_object {
        acpi_object_type type;  /* See definition of acpi_ns_type for values */
        struct {
-               acpi_object_type type;
+               acpi_object_type type;  /* ACPI_TYPE_INTEGER */
                acpi_integer value;     /* The actual number */
        } integer;
 
        struct {
-               acpi_object_type type;
+               acpi_object_type type;  /* ACPI_TYPE_STRING */
                u32 length;     /* # of bytes in string, excluding trailing null */
                char *pointer;  /* points to the string value */
        } string;
 
        struct {
-               acpi_object_type type;
+               acpi_object_type type;  /* ACPI_TYPE_BUFFER */
                u32 length;     /* # of bytes in buffer */
                u8 *pointer;    /* points to the buffer */
        } buffer;
 
        struct {
-               acpi_object_type type;
-               u32 fill1;
-               acpi_handle handle;     /* object reference */
-       } reference;
-
-       struct {
-               acpi_object_type type;
+               acpi_object_type type;  /* ACPI_TYPE_PACKAGE */
                u32 count;      /* # of elements in package */
                union acpi_object *elements;    /* Pointer to an array of ACPI_OBJECTs */
        } package;
 
        struct {
-               acpi_object_type type;
+               acpi_object_type type;  /* ACPI_TYPE_LOCAL_REFERENCE */
+               acpi_object_type actual_type;   /* Type associated with the Handle */
+               acpi_handle handle;     /* object reference */
+       } reference;
+
+       struct {
+               acpi_object_type type;  /* ACPI_TYPE_PROCESSOR */
                u32 proc_id;
                acpi_io_address pblk_address;
                u32 pblk_length;
        } processor;
 
        struct {
-               acpi_object_type type;
+               acpi_object_type type;  /* ACPI_TYPE_POWER */
                u32 system_level;
                u32 resource_order;
        } power_resource;
@@ -809,13 +740,6 @@ struct acpi_buffer {
 #define ACPI_SYS_MODES_MASK             0x0003
 
 /*
- * ACPI Table Info.  One per ACPI table _type_
- */
-struct acpi_table_info {
-       u32 count;
-};
-
-/*
  * System info returned by acpi_get_system_info()
  */
 struct acpi_system_info {
@@ -826,10 +750,14 @@ struct acpi_system_info {
        u32 reserved2;
        u32 debug_level;
        u32 debug_layer;
-       u32 num_table_types;
-       struct acpi_table_info table_info[NUM_ACPI_TABLE_TYPES];
 };
 
+/* Table Event Types */
+
+#define ACPI_TABLE_EVENT_LOAD           0x0
+#define ACPI_TABLE_EVENT_UNLOAD         0x1
+#define ACPI_NUM_TABLE_EVENTS           2
+
 /*
  * Types specific to the OS service interfaces
  */
@@ -859,6 +787,11 @@ acpi_status(*acpi_exception_handler) (acpi_status aml_status,
                                      u16 opcode,
                                      u32 aml_offset, void *context);
 
+/* Table Event handler (Load, load_table etc) and types */
+
+typedef
+acpi_status(*acpi_tbl_handler) (u32 event, void *table, void *context);
+
 /* Address Spaces (For Operation Regions) */
 
 typedef
@@ -869,7 +802,7 @@ acpi_status(*acpi_adr_space_handler) (u32 function,
                                      void *handler_context,
                                      void *region_context);
 
-#define ACPI_DEFAULT_HANDLER        NULL
+#define ACPI_DEFAULT_HANDLER            NULL
 
 typedef
 acpi_status(*acpi_adr_space_setup) (acpi_handle region_handle,
@@ -892,7 +825,7 @@ acpi_status(*acpi_walk_callback) (acpi_handle obj_handle,
 
 /* Common string version of device HIDs and UIDs */
 
-struct acpi_device_id {
+struct acpica_device_id {
        char value[ACPI_DEVICE_ID_LENGTH];
 };
 
@@ -922,12 +855,13 @@ struct acpi_compatible_id_list {
 #define ACPI_STA_DEVICE_PRESENT         0x01
 #define ACPI_STA_DEVICE_ENABLED         0x02
 #define ACPI_STA_DEVICE_UI              0x04
-#define ACPI_STA_DEVICE_OK              0x08
+#define ACPI_STA_DEVICE_FUNCTIONING     0x08
+#define ACPI_STA_DEVICE_OK              0x08   /* Synonym */
 #define ACPI_STA_BATTERY_PRESENT        0x10
 
 #define ACPI_COMMON_OBJ_INFO \
-       acpi_object_type                    type;           /* ACPI object type */ \
-       acpi_name                           name        /* ACPI object Name */
+       acpi_object_type                type;           /* ACPI object type */ \
+       acpi_name                       name    /* ACPI object Name */
 
 struct acpi_obj_info_header {
        ACPI_COMMON_OBJ_INFO;
@@ -938,11 +872,12 @@ struct acpi_obj_info_header {
 struct acpi_device_info {
        ACPI_COMMON_OBJ_INFO;
 
+       u32 param_count;        /* If a method, required parameter count */
        u32 valid;              /* Indicates which fields below are valid */
        u32 current_status;     /* _STA value */
        acpi_integer address;   /* _ADR value if any */
-       struct acpi_device_id hardware_id;      /* _HID value if any */
-       struct acpi_device_id unique_id;        /* _UID value if any */
+       struct acpica_device_id hardware_id;    /* _HID value if any */
+       struct acpica_device_id unique_id;      /* _UID value if any */
        u8 highest_dstates[4];  /* _sx_d values: 0xFF indicates not valid */
        struct acpi_compatible_id_list compatibility_id;        /* List of _CIDs if any */
 };
@@ -968,7 +903,7 @@ struct acpi_mem_space_context {
  * Definitions for Resource Attributes
  */
 typedef u16 acpi_rs_length;    /* Resource Length field is fixed at 16 bits */
-typedef u32 acpi_rsdesc_size;  /* Max Resource Descriptor size is (length+3) = (64_k-1)+3 */
+typedef u32 acpi_rsdesc_size;  /* Max Resource Descriptor size is (Length+3) = (64_k-1)+3 */
 
 /*
  *  Memory Attributes
@@ -983,8 +918,8 @@ typedef u32 acpi_rsdesc_size;       /* Max Resource Descriptor size is (length+3) = (6
 
 /*
  *  IO Attributes
- *  The ISA Io ranges are:     n000-n0_ffh, n400-n4_ffh, n800-n8_ffh, n_c00-n_cFFh.
- *  The non-ISA Io ranges are: n100-n3_ffh, n500-n7_ffh, n900-n_bFfh, n_cd0-n_fFFh.
+ *  The ISA IO ranges are:     n000-n0_fFh, n400-n4_fFh, n800-n8_fFh, n_c00-n_cFFh.
+ *  The non-ISA IO ranges are: n100-n3_fFh, n500-n7_fFh, n900-n_bFFh, n_cd0-n_fFFh.
  */
 #define ACPI_NON_ISA_ONLY_RANGES        (u8) 0x01
 #define ACPI_ISA_ONLY_RANGES            (u8) 0x02
@@ -1072,6 +1007,7 @@ struct acpi_vendor_uuid {
  *  Structures used to describe device resources
  */
 struct acpi_resource_irq {
+       u8 descriptor_length;
        u8 triggering;
        u8 polarity;
        u8 sharable;
@@ -1088,6 +1024,7 @@ struct acpi_resource_dma {
 };
 
 struct acpi_resource_start_dependent {
+       u8 descriptor_length;
        u8 compatibility_priority;
        u8 performance_robustness;
 };
@@ -1182,12 +1119,12 @@ struct acpi_resource_source {
 /* Fields common to all address descriptors, 16/32/64 bit */
 
 #define ACPI_RESOURCE_ADDRESS_COMMON \
-       u8                                  resource_type; \
-       u8                                  producer_consumer; \
-       u8                                  decode; \
-       u8                                  min_address_fixed; \
-       u8                                  max_address_fixed; \
-       union acpi_resource_attribute       info;
+       u8                              resource_type; \
+       u8                              producer_consumer; \
+       u8                              decode; \
+       u8                              min_address_fixed; \
+       u8                              max_address_fixed; \
+       union acpi_resource_attribute   info;
 
 struct acpi_resource_address {
 ACPI_RESOURCE_ADDRESS_COMMON};
@@ -1302,16 +1239,12 @@ struct acpi_resource {
 
 #pragma pack()
 
-#define ACPI_RS_SIZE_MIN                    12
 #define ACPI_RS_SIZE_NO_DATA                8  /* Id + Length fields */
+#define ACPI_RS_SIZE_MIN                    (u32) ACPI_ROUND_UP_TO_NATIVE_WORD (12)
 #define ACPI_RS_SIZE(type)                  (u32) (ACPI_RS_SIZE_NO_DATA + sizeof (type))
 
 #define ACPI_NEXT_RESOURCE(res)             (struct acpi_resource *)((u8 *) res + res->length)
 
-/*
- * END: of definitions for Resource Attributes
- */
-
 struct acpi_pci_routing_table {
        u32 length;
        u32 pin;
@@ -1320,8 +1253,4 @@ struct acpi_pci_routing_table {
        char source[4];         /* pad to 64 bits so sizeof() works in all cases */
 };
 
-/*
- * END: of definitions for PCI Routing tables
- */
-
 #endif                         /* __ACTYPES_H__ */