Rename __attribute__((packed)) --> __packed

Also unify __attribute__ ((..)) to __attribute__((..)) and
handle ((__packed__)) like ((packed))

Change-Id: Ie60a51c3fa92b5009724a5b7c2932e361bf3490c
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/15921
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
diff --git a/src/northbridge/intel/common/mrc_cache.h b/src/northbridge/intel/common/mrc_cache.h
index 1fb6667..6f0dd6e 100644
--- a/src/northbridge/intel/common/mrc_cache.h
+++ b/src/northbridge/intel/common/mrc_cache.h
@@ -1,6 +1,8 @@
 #ifndef NORTHBRIDGE_INTEL_COMMON_MRC_CACHE_H
 #define NORTHBRIDGE_INTEL_COMMON_MRC_CACHE_H
 
+#include <compiler.h>
+
 #define MRC_DATA_ALIGN           0x1000
 #define MRC_DATA_SIGNATURE       (('M'<<0)|('R'<<8)|('C'<<16)|('D'<<24))
 
@@ -10,7 +12,7 @@
 	u32	mrc_checksum;	// IP style checksum
 	u32	reserved;	// For header alignment
 	u8	mrc_data[0];	// Variable size, platform/run time dependent.
-} __attribute__ ((packed));
+} __packed;
 
 struct mrc_data_container *find_current_mrc_cache(void);
 struct mrc_data_container *store_current_mrc_cache(void *data, unsigned length);
diff --git a/src/northbridge/intel/haswell/haswell.h b/src/northbridge/intel/haswell/haswell.h
index 00616af..2d03a68 100644
--- a/src/northbridge/intel/haswell/haswell.h
+++ b/src/northbridge/intel/haswell/haswell.h
@@ -186,13 +186,14 @@
 #define DMIDRCCFG	0xeb4	/* 32bit */
 
 #ifndef __ASSEMBLER__
+#include <compiler.h>
 static inline void barrier(void) { asm("" ::: "memory"); }
 
 struct ied_header {
 	char signature[10];
 	u32 size;
 	u8 reserved[34];
-} __attribute__ ((packed));
+} __packed;
 
 #define PCI_DEVICE_ID_HSW_MOBILE 0x0c04
 #define PCI_DEVICE_ID_HSW_ULT 0x0a04
diff --git a/src/northbridge/intel/haswell/pei_data.h b/src/northbridge/intel/haswell/pei_data.h
index f92c0a6..f4023e0 100644
--- a/src/northbridge/intel/haswell/pei_data.h
+++ b/src/northbridge/intel/haswell/pei_data.h
@@ -30,6 +30,8 @@
 #ifndef PEI_DATA_H
 #define PEI_DATA_H
 
+#include <compiler.h>
+
 typedef void (*tx_byte_func)(unsigned char byte);
 #define PEI_VERSION 15
 
@@ -56,12 +58,12 @@
 	uint8_t enable;
 	uint8_t over_current_pin;
 	uint8_t location;
-} __attribute__((packed));
+} __packed;
 
 struct usb3_port_setting {
 	uint8_t enable;
 	uint8_t over_current_pin;
-} __attribute__((packed));
+} __packed;
 
 struct pei_data
 {
@@ -110,6 +112,6 @@
 	struct usb3_port_setting usb3_ports[MAX_USB3_PORTS];
 	uint8_t spd_data[4][256];
 	tx_byte_func tx_byte;
-} __attribute__((packed));
+} __packed;
 
 #endif
diff --git a/src/northbridge/intel/i82830/smihandler.c b/src/northbridge/intel/i82830/smihandler.c
index 51841e5..569e62e 100644
--- a/src/northbridge/intel/i82830/smihandler.c
+++ b/src/northbridge/intel/i82830/smihandler.c
@@ -15,6 +15,7 @@
  */
 
 #include <types.h>
+#include <compiler.h>
 #include <string.h>
 #include <arch/io.h>
 #include <console/console.h>
@@ -51,7 +52,7 @@
 	u32 function;
 	u32 retsts;
 	u32 rfu;
-} __attribute__((packed)) banner_id_t;
+} __packed banner_id_t;
 
 #define MSH_OK			0x0000
 #define MSH_OK_RESTART		0x0001
@@ -111,7 +112,7 @@
 	u16 versionmajor;
 	u16 versionminor;
 	u32 smicombuffersize;
-} __attribute__((packed)) version_t;
+} __packed version_t;
 
 typedef struct {
 	u16 header_id;
@@ -122,14 +123,14 @@
 	u32 type;
 	u32 header_ext;
 	u8 name[0];
-} __attribute__((packed)) mbi_header_t;
+} __packed mbi_header_t;
 
 typedef struct {
 	banner_id_t banner;
 	u64 handle;
 	u32 objnum;
 	mbi_header_t header;
-} __attribute__((packed)) obj_header_t;
+} __packed obj_header_t;
 
 typedef struct {
 	banner_id_t banner;
@@ -139,7 +140,7 @@
 	u32 numbytes;
 	u32 buflen;
 	u32 buffer;
-} __attribute__((packed)) get_object_t;
+} __packed get_object_t;
 
 static void mbi_call(u8 subf, banner_id_t *banner_id)
 {
diff --git a/src/northbridge/intel/i945/raminit.h b/src/northbridge/intel/i945/raminit.h
index bc4491f..4c97d05 100644
--- a/src/northbridge/intel/i945/raminit.h
+++ b/src/northbridge/intel/i945/raminit.h
@@ -16,6 +16,8 @@
 #ifndef RAMINIT_H
 #define RAMINIT_H
 
+#include <compiler.h>
+
 #define DIMM_SOCKETS 2
 
 #define DIMM_TCO_BASE 0x30
@@ -61,7 +63,7 @@
 	u8 banksize[2 * 2 * DIMM_SOCKETS];
 	const u8 *spd_addresses;
 
-} __attribute__ ((packed));
+} __packed;
 
 void receive_enable_adjust(struct sys_info *sysinfo);
 void sdram_initialize(int boot_path, const u8 *sdram_addresses);
diff --git a/src/northbridge/intel/nehalem/raminit.c b/src/northbridge/intel/nehalem/raminit.c
index 122b8ac..b7b445e 100644
--- a/src/northbridge/intel/nehalem/raminit.c
+++ b/src/northbridge/intel/nehalem/raminit.c
@@ -22,6 +22,7 @@
 
 #if REAL
 #include <stdlib.h>
+#include <compiler.h>
 #include <console/console.h>
 #include <string.h>
 #include <arch/io.h>
@@ -1906,7 +1907,7 @@
 		u8 result;
 		u8 field2;
 		u8 unk3[0x48 - 4 - 1];
-	} __attribute__ ((packed)) reply;
+	} __packed reply;
 	struct uma_message {
 		u8 group_id;
 		u8 cmd;
@@ -1916,7 +1917,7 @@
 		u64 heci_uma_addr;
 		u32 memory_reserved_for_heci_mb;
 		u16 c3;
-	} __attribute__ ((packed)) msg = {
+	} __packed msg = {
 	0, MKHI_SET_UMA, 0, 0,
 		    0x82,
 		    info->heci_uma_addr, info->memory_reserved_for_heci_mb, 0};
diff --git a/src/northbridge/intel/sandybridge/pei_data.h b/src/northbridge/intel/sandybridge/pei_data.h
index 136d310..41fc33f 100644
--- a/src/northbridge/intel/sandybridge/pei_data.h
+++ b/src/northbridge/intel/sandybridge/pei_data.h
@@ -30,6 +30,8 @@
 #ifndef PEI_DATA_H
 #define PEI_DATA_H
 
+#include <compiler.h>
+
 typedef struct {
 	uint16_t mode;                // 0: Disable, 1: Enable, 2: Auto, 3: Smart Auto
 	uint16_t hs_port_switch_mask; // 4 bit mask, 1: switchable, 0: not switchable
@@ -129,6 +131,6 @@
 	 * 2 Always enable double rate
 	 */
 	int ddr_refresh_rate_config;
-} __attribute__((packed));
+} __packed;
 
 #endif
diff --git a/src/northbridge/intel/sandybridge/raminit.h b/src/northbridge/intel/sandybridge/raminit.h
index 4e684ec..66a94f4 100644
--- a/src/northbridge/intel/sandybridge/raminit.h
+++ b/src/northbridge/intel/sandybridge/raminit.h
@@ -16,6 +16,7 @@
 #ifndef RAMINIT_H
 #define RAMINIT_H
 
+#include <compiler.h>
 #include "pei_data.h"
 
 struct sys_info {
@@ -23,7 +24,7 @@
 #define BOOT_PATH_NORMAL	0
 #define BOOT_PATH_RESET		1
 #define BOOT_PATH_RESUME	2
-} __attribute__ ((packed));
+} __packed;
 
 void sdram_initialize(struct pei_data *pei_data);
 void save_mrc_data(struct pei_data *pei_data);
diff --git a/src/northbridge/intel/sandybridge/raminit_mrc.c b/src/northbridge/intel/sandybridge/raminit_mrc.c
index 3f7d1c6..7145841 100644
--- a/src/northbridge/intel/sandybridge/raminit_mrc.c
+++ b/src/northbridge/intel/sandybridge/raminit_mrc.c
@@ -13,6 +13,7 @@
  * GNU General Public License for more details.
  */
 
+#include <compiler.h>
 #include <console/console.h>
 #include <console/usb.h>
 #include <bootmode.h>
@@ -183,7 +184,7 @@
 void sdram_initialize(struct pei_data *pei_data)
 {
 	struct sys_info sysinfo;
-	int (*entry) (struct pei_data *pei_data) __attribute__ ((regparm(1)));
+	int (*entry) (struct pei_data *pei_data) __attribute__((regparm(1)));
 
 	report_platform_info();