summaryrefslogtreecommitdiff
path: root/src/mainboard/intel
diff options
context:
space:
mode:
authorPatrick Georgi <patrick@georgi-clan.de>2012-04-20 19:19:47 +0200
committerPatrick Georgi <patrick@georgi-clan.de>2012-04-20 21:18:02 +0200
commit26b00e6d3954dcfa00ee4d7c874161b2fbdd2ce2 (patch)
treecc4549a622b5cd43578b0cabe2cfb622114c4b11 /src/mainboard/intel
parentd6e4d518b1dbfdcfbea7b56113530900ba3e03b1 (diff)
downloadcoreboot-26b00e6d3954dcfa00ee4d7c874161b2fbdd2ce2.tar.xz
Refactor some alignment handling
Made using coccinelle: @@ expression E; @@ -(E + 7) & -8 +ALIGN(E, 8) @@ expression E; @@ -(E + 15) & -16 +ALIGN(E, 16) Change-Id: I071d2c98cd95580d7de21d256c31b6368a3dc70b Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-on: http://review.coreboot.org/910 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/mainboard/intel')
-rw-r--r--src/mainboard/intel/d945gclf/acpi_tables.c2
-rw-r--r--src/mainboard/intel/eagleheights/acpi_tables.c2
-rw-r--r--src/mainboard/intel/xe7501devkit/acpi_tables.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/mainboard/intel/d945gclf/acpi_tables.c b/src/mainboard/intel/d945gclf/acpi_tables.c
index 0435bddc92..d32dc811f8 100644
--- a/src/mainboard/intel/d945gclf/acpi_tables.c
+++ b/src/mainboard/intel/d945gclf/acpi_tables.c
@@ -115,7 +115,7 @@ unsigned long acpi_fill_srat(unsigned long current)
void smm_setup_structures(void *gnvs, void *tcg, void *smi1);
#endif
-#define ALIGN_CURRENT current = ((current + 0x0f) & -0x10)
+#define ALIGN_CURRENT current = (ALIGN(current, 16))
unsigned long write_acpi_tables(unsigned long start)
{
unsigned long current;
diff --git a/src/mainboard/intel/eagleheights/acpi_tables.c b/src/mainboard/intel/eagleheights/acpi_tables.c
index 123ddbcb6b..ce67645ca8 100644
--- a/src/mainboard/intel/eagleheights/acpi_tables.c
+++ b/src/mainboard/intel/eagleheights/acpi_tables.c
@@ -135,7 +135,7 @@ unsigned long acpi_fill_srat(unsigned long current)
}
-#define ALIGN_CURRENT current = ((current + 0x0f) & -0x10)
+#define ALIGN_CURRENT current = (ALIGN(current, 16))
unsigned long write_acpi_tables(unsigned long start)
{
unsigned long current;
diff --git a/src/mainboard/intel/xe7501devkit/acpi_tables.c b/src/mainboard/intel/xe7501devkit/acpi_tables.c
index 9324144026..b3c20ba797 100644
--- a/src/mainboard/intel/xe7501devkit/acpi_tables.c
+++ b/src/mainboard/intel/xe7501devkit/acpi_tables.c
@@ -103,7 +103,7 @@ unsigned long write_acpi_tables(unsigned long start)
acpi_madt_t *madt;
/* Align ACPI tables to 16byte */
- start = ( start + 0x0f ) & -0x10;
+ start = ALIGN(start, 16);
current = start;
printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx...\n", start);