X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=include%2Facpi%2Facobject.h;h=04e9735a674214fb49aab10f3b75d273e3f44e0d;hb=58a3bb59973e33a428d72fa530a3d1d81feb0e8f;hp=8fdee31119f360c1f896dcda2645ad14a72f4237;hpb=0d10e47f9635ecafe5a9dc6e10cb056a87a4daa2;p=mv-sheeva.git diff --git a/include/acpi/acobject.h b/include/acpi/acobject.h index 8fdee31119f..04e9735a674 100644 --- a/include/acpi/acobject.h +++ b/include/acpi/acobject.h @@ -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 @@ -52,7 +52,15 @@ * 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; }; /* @@ -203,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; }; @@ -406,4 +417,6 @@ union acpi_descriptor { union acpi_parse_object op; }; +#pragma pack() + #endif /* _ACOBJECT_H */