aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2014-02-25 21:28:32 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-02-26 18:45:59 -0500
commit4ac4c5fad8a320f75cb84543403fb8bae5ad2254 (patch)
tree93b6c6a9dbc086412a1c2603cd5b47cc4d322e1f /include
parent4dde507fc1984435f28862ddd1beb90822aa116c (diff)
ACPICA: Headers: Deploy #pragma pack (push) and (pop).
Use push and pop to both guarantee that the correct alignment is used, and to restore the alignment to whatever it was before the header was included. It is reported that the #pragma pack(push/pop) directives are not supported by the specific GCCs, but this patch still doesn't affect kernel build as there are already #pragma pack([1]) directives used in the old ACPICA headers, which means there shouldn't be GCCs that are currently used to compile the ACPI kernels do not support #pragma pack() directives. References: https://bugs.acpica.org/show_bug.cgi?id=1058 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/acpi/acbuffer.h4
-rw-r--r--include/acpi/acconfig.h4
-rw-r--r--include/acpi/acexcep.h4
-rw-r--r--include/acpi/acoutput.h4
-rw-r--r--include/acpi/acpiosxf.h4
-rw-r--r--include/acpi/acpixf.h4
-rw-r--r--include/acpi/acrestyp.h4
-rw-r--r--include/acpi/actbl.h4
-rw-r--r--include/acpi/actbl1.h6
-rw-r--r--include/acpi/actbl2.h6
-rw-r--r--include/acpi/actbl3.h6
-rw-r--r--include/acpi/actypes.h4
12 files changed, 45 insertions, 9 deletions
diff --git a/include/acpi/acbuffer.h b/include/acpi/acbuffer.h
index 88cb477524a6..960c76fb69a1 100644
--- a/include/acpi/acbuffer.h
+++ b/include/acpi/acbuffer.h
@@ -44,6 +44,8 @@
44#ifndef __ACBUFFER_H__ 44#ifndef __ACBUFFER_H__
45#define __ACBUFFER_H__ 45#define __ACBUFFER_H__
46 46
47#pragma pack(push) /* Set default struct packing */
48
47/* 49/*
48 * Contains buffer structures for these predefined names: 50 * Contains buffer structures for these predefined names:
49 * _FDE, _GRT, _GTM, _PLD, _SRT 51 * _FDE, _GRT, _GTM, _PLD, _SRT
@@ -232,4 +234,6 @@ struct acpi_pld_info {
232#define ACPI_PLD_GET_HORIZ_OFFSET(dword) ACPI_GET_BITS (dword, 16, ACPI_16BIT_MASK) 234#define ACPI_PLD_GET_HORIZ_OFFSET(dword) ACPI_GET_BITS (dword, 16, ACPI_16BIT_MASK)
233#define ACPI_PLD_SET_HORIZ_OFFSET(dword,value) ACPI_SET_BITS (dword, 16, ACPI_16BIT_MASK, value) /* Offset 128+16=144, Len 16 */ 235#define ACPI_PLD_SET_HORIZ_OFFSET(dword,value) ACPI_SET_BITS (dword, 16, ACPI_16BIT_MASK, value) /* Offset 128+16=144, Len 16 */
234 236
237#pragma pack(pop) /* Restore original struct packing */
238
235#endif /* ACBUFFER_H */ 239#endif /* ACBUFFER_H */
diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h
index 932a60d6ed82..d8a0ba8f88a5 100644
--- a/include/acpi/acconfig.h
+++ b/include/acpi/acconfig.h
@@ -44,6 +44,8 @@
44#ifndef _ACCONFIG_H 44#ifndef _ACCONFIG_H
45#define _ACCONFIG_H 45#define _ACCONFIG_H
46 46
47#pragma pack(push) /* Set default struct packing */
48
47/****************************************************************************** 49/******************************************************************************
48 * 50 *
49 * Configuration options 51 * Configuration options
@@ -229,4 +231,6 @@
229#define ACPI_DEBUGGER_COMMAND_PROMPT '-' 231#define ACPI_DEBUGGER_COMMAND_PROMPT '-'
230#define ACPI_DEBUGGER_EXECUTE_PROMPT '%' 232#define ACPI_DEBUGGER_EXECUTE_PROMPT '%'
231 233
234#pragma pack(pop) /* Restore original struct packing */
235
232#endif /* _ACCONFIG_H */ 236#endif /* _ACCONFIG_H */
diff --git a/include/acpi/acexcep.h b/include/acpi/acexcep.h
index 8b06e4c1dd5d..f0bcb96b1598 100644
--- a/include/acpi/acexcep.h
+++ b/include/acpi/acexcep.h
@@ -44,6 +44,8 @@
44#ifndef __ACEXCEP_H__ 44#ifndef __ACEXCEP_H__
45#define __ACEXCEP_H__ 45#define __ACEXCEP_H__
46 46
47#pragma pack(push) /* Set default struct packing */
48
47/* This module contains all possible exception codes for acpi_status */ 49/* This module contains all possible exception codes for acpi_status */
48 50
49/* 51/*
@@ -377,4 +379,6 @@ static const struct acpi_exception_info acpi_gbl_exception_names_ctrl[] = {
377 379
378#endif /* EXCEPTION_TABLE */ 380#endif /* EXCEPTION_TABLE */
379 381
382#pragma pack(pop) /* Restore original struct packing */
383
380#endif /* __ACEXCEP_H__ */ 384#endif /* __ACEXCEP_H__ */
diff --git a/include/acpi/acoutput.h b/include/acpi/acoutput.h
index 1baae6edda89..247636fb51a5 100644
--- a/include/acpi/acoutput.h
+++ b/include/acpi/acoutput.h
@@ -44,6 +44,8 @@
44#ifndef __ACOUTPUT_H__ 44#ifndef __ACOUTPUT_H__
45#define __ACOUTPUT_H__ 45#define __ACOUTPUT_H__
46 46
47#pragma pack(push) /* Set default struct packing */
48
47/* 49/*
48 * Debug levels and component IDs. These are used to control the 50 * Debug levels and component IDs. These are used to control the
49 * granularity of the output of the ACPI_DEBUG_PRINT macro -- on a 51 * granularity of the output of the ACPI_DEBUG_PRINT macro -- on a
@@ -456,4 +458,6 @@
456 458
457#endif /* ACPI_DEBUG_OUTPUT */ 459#endif /* ACPI_DEBUG_OUTPUT */
458 460
461#pragma pack(pop) /* Restore original struct packing */
462
459#endif /* __ACOUTPUT_H__ */ 463#endif /* __ACOUTPUT_H__ */
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h
index f6f5f8af2112..a4a2cd39aea9 100644
--- a/include/acpi/acpiosxf.h
+++ b/include/acpi/acpiosxf.h
@@ -49,6 +49,8 @@
49#include <acpi/platform/acenv.h> 49#include <acpi/platform/acenv.h>
50#include <acpi/actypes.h> 50#include <acpi/actypes.h>
51 51
52#pragma pack(push) /* Set default struct packing */
53
52/* Types for acpi_os_execute */ 54/* Types for acpi_os_execute */
53 55
54typedef enum { 56typedef enum {
@@ -399,4 +401,6 @@ char *acpi_os_get_next_filename(void *dir_handle);
399void acpi_os_close_directory(void *dir_handle); 401void acpi_os_close_directory(void *dir_handle);
400#endif 402#endif
401 403
404#pragma pack(pop) /* Restore original struct packing */
405
402#endif /* __ACPIOSXF_H__ */ 406#endif /* __ACPIOSXF_H__ */
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
index 51cdf1bbb862..efa767ffe904 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -55,6 +55,8 @@
55 55
56extern u8 acpi_gbl_permanent_mmap; 56extern u8 acpi_gbl_permanent_mmap;
57 57
58#pragma pack(push) /* Set default struct packing */
59
58/* 60/*
59 * Globals that are publically available 61 * Globals that are publically available
60 */ 62 */
@@ -580,4 +582,6 @@ acpi_debug_print_raw(u32 requested_debug_level,
580 u32 component_id, const char *format, ...); 582 u32 component_id, const char *format, ...);
581#endif 583#endif
582 584
585#pragma pack(pop) /* Restore original struct packing */
586
583#endif /* __ACXFACE_H__ */ 587#endif /* __ACXFACE_H__ */
diff --git a/include/acpi/acrestyp.h b/include/acpi/acrestyp.h
index eb760ca0b2e0..3c83a79c583f 100644
--- a/include/acpi/acrestyp.h
+++ b/include/acpi/acrestyp.h
@@ -44,6 +44,8 @@
44#ifndef __ACRESTYP_H__ 44#ifndef __ACRESTYP_H__
45#define __ACRESTYP_H__ 45#define __ACRESTYP_H__
46 46
47#pragma pack(push) /* Set default struct packing */
48
47/* 49/*
48 * Definitions for Resource Attributes 50 * Definitions for Resource Attributes
49 */ 51 */
@@ -610,4 +612,6 @@ struct acpi_pci_routing_table {
610 char source[4]; /* pad to 64 bits so sizeof() works in all cases */ 612 char source[4]; /* pad to 64 bits so sizeof() works in all cases */
611}; 613};
612 614
615#pragma pack(pop) /* Restore original struct packing */
616
613#endif /* __ACRESTYP_H__ */ 617#endif /* __ACRESTYP_H__ */
diff --git a/include/acpi/actbl.h b/include/acpi/actbl.h
index 3b30e36b53b5..b32a33f1c2df 100644
--- a/include/acpi/actbl.h
+++ b/include/acpi/actbl.h
@@ -44,6 +44,8 @@
44#ifndef __ACTBL_H__ 44#ifndef __ACTBL_H__
45#define __ACTBL_H__ 45#define __ACTBL_H__
46 46
47#pragma pack(push) /* Set default struct packing */
48
47/******************************************************************************* 49/*******************************************************************************
48 * 50 *
49 * Fundamental ACPI tables 51 * Fundamental ACPI tables
@@ -404,4 +406,6 @@ struct acpi_table_desc {
404#define ACPI_FADT_V3_SIZE (u32) (ACPI_FADT_OFFSET (sleep_control)) 406#define ACPI_FADT_V3_SIZE (u32) (ACPI_FADT_OFFSET (sleep_control))
405#define ACPI_FADT_V5_SIZE (u32) (sizeof (struct acpi_table_fadt)) 407#define ACPI_FADT_V5_SIZE (u32) (sizeof (struct acpi_table_fadt))
406 408
409#pragma pack(pop) /* Restore original struct packing */
410
407#endif /* __ACTBL_H__ */ 411#endif /* __ACTBL_H__ */
diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h
index 212c65de75df..b7f0b0c6ff66 100644
--- a/include/acpi/actbl1.h
+++ b/include/acpi/actbl1.h
@@ -44,6 +44,8 @@
44#ifndef __ACTBL1_H__ 44#ifndef __ACTBL1_H__
45#define __ACTBL1_H__ 45#define __ACTBL1_H__
46 46
47#pragma pack(push) /* Set default struct packing */
48
47/******************************************************************************* 49/*******************************************************************************
48 * 50 *
49 * Additional ACPI Tables (1) 51 * Additional ACPI Tables (1)
@@ -972,8 +974,6 @@ struct acpi_srat_x2apic_cpu_affinity {
972 974
973#define ACPI_SRAT_CPU_ENABLED (1) /* 00: Use affinity structure */ 975#define ACPI_SRAT_CPU_ENABLED (1) /* 00: Use affinity structure */
974 976
975/* Reset to default packing */ 977#pragma pack(pop) /* Restore original struct packing */
976
977#pragma pack()
978 978
979#endif /* __ACTBL1_H__ */ 979#endif /* __ACTBL1_H__ */
diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h
index f3372441e3a5..89a26135745b 100644
--- a/include/acpi/actbl2.h
+++ b/include/acpi/actbl2.h
@@ -44,6 +44,8 @@
44#ifndef __ACTBL2_H__ 44#ifndef __ACTBL2_H__
45#define __ACTBL2_H__ 45#define __ACTBL2_H__
46 46
47#pragma pack(push) /* Set default struct packing */
48
47/******************************************************************************* 49/*******************************************************************************
48 * 50 *
49 * Additional ACPI Tables (2) 51 * Additional ACPI Tables (2)
@@ -1229,8 +1231,6 @@ struct acpi_table_wdrt {
1229 u8 units; 1231 u8 units;
1230}; 1232};
1231 1233
1232/* Reset to default packing */ 1234#pragma pack(pop) /* Restore original struct packing */
1233
1234#pragma pack()
1235 1235
1236#endif /* __ACTBL2_H__ */ 1236#endif /* __ACTBL2_H__ */
diff --git a/include/acpi/actbl3.h b/include/acpi/actbl3.h
index c2295cc4a5c0..85ebeea02b81 100644
--- a/include/acpi/actbl3.h
+++ b/include/acpi/actbl3.h
@@ -44,6 +44,8 @@
44#ifndef __ACTBL3_H__ 44#ifndef __ACTBL3_H__
45#define __ACTBL3_H__ 45#define __ACTBL3_H__
46 46
47#pragma pack(push) /* Set default struct packing */
48
47/******************************************************************************* 49/*******************************************************************************
48 * 50 *
49 * Additional ACPI Tables (3) 51 * Additional ACPI Tables (3)
@@ -622,8 +624,6 @@ struct acpi_tpm2_control {
622 u64 response_address; 624 u64 response_address;
623}; 625};
624 626
625/* Reset to default packing */ 627#pragma pack(pop) /* Restore original struct packing */
626
627#pragma pack()
628 628
629#endif /* __ACTBL3_H__ */ 629#endif /* __ACTBL3_H__ */
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h
index e76356574374..c28573da1662 100644
--- a/include/acpi/actypes.h
+++ b/include/acpi/actypes.h
@@ -44,6 +44,8 @@
44#ifndef __ACTYPES_H__ 44#ifndef __ACTYPES_H__
45#define __ACTYPES_H__ 45#define __ACTYPES_H__
46 46
47#pragma pack(push) /* Set default struct packing */
48
47/* acpisrc:struct_defs -- for acpisrc conversion */ 49/* acpisrc:struct_defs -- for acpisrc conversion */
48 50
49/* 51/*
@@ -1223,4 +1225,6 @@ struct acpi_memory_list {
1223#define ACPI_OSI_WIN_7 0x0B 1225#define ACPI_OSI_WIN_7 0x0B
1224#define ACPI_OSI_WIN_8 0x0C 1226#define ACPI_OSI_WIN_8 0x0C
1225 1227
1228#pragma pack(pop) /* Restore original struct packing */
1229
1226#endif /* __ACTYPES_H__ */ 1230#endif /* __ACTYPES_H__ */