mb/amd/*/irq_tables.cmb/*/*/irq_tables.c: Use ALIGN_UP macro

Change-Id: I2bd5e09f51918fe4c7e954edf54ab4d9bc629fd1
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61919
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
This commit is contained in:
Elyes Haouas 2022-09-11 12:02:46 +02:00 committed by Felix Held
parent 593b0f1f23
commit e378cdbb61
8 changed files with 15 additions and 16 deletions

View File

@ -1,6 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */ /* SPDX-License-Identifier: GPL-2.0-only */
#include <console/console.h> #include <console/console.h>
#include <commonlib/bsd/helpers.h>
#include <device/pci_def.h> #include <device/pci_def.h>
#include <string.h> #include <string.h>
#include <stdint.h> #include <stdint.h>
@ -36,8 +37,7 @@ unsigned long write_pirq_routing_table(unsigned long addr)
int i; int i;
/* Align the table to be 16 byte aligned. */ /* Align the table to be 16 byte aligned. */
addr += 15; addr = ALIGN_UP(addr, 16);
addr &= ~15;
/* This table must be between 0xf0000 & 0x100000 */ /* This table must be between 0xf0000 & 0x100000 */
printk(BIOS_INFO, "Writing IRQ routing tables to 0x%lx...", addr); printk(BIOS_INFO, "Writing IRQ routing tables to 0x%lx...", addr);

View File

@ -1,6 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */ /* SPDX-License-Identifier: GPL-2.0-only */
#include <console/console.h> #include <console/console.h>
#include <commonlib/bsd/helpers.h>
#include <device/pci_def.h> #include <device/pci_def.h>
#include <string.h> #include <string.h>
#include <stdint.h> #include <stdint.h>
@ -36,8 +37,7 @@ unsigned long write_pirq_routing_table(unsigned long addr)
int i; int i;
/* Align the table to be 16 byte aligned. */ /* Align the table to be 16 byte aligned. */
addr += 15; addr = ALIGN_UP(addr, 16);
addr &= ~15;
/* This table must be between 0xf0000 & 0x100000 */ /* This table must be between 0xf0000 & 0x100000 */
printk(BIOS_INFO, "Writing IRQ routing tables to 0x%lx...", addr); printk(BIOS_INFO, "Writing IRQ routing tables to 0x%lx...", addr);

View File

@ -1,6 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */ /* SPDX-License-Identifier: GPL-2.0-only */
#include <console/console.h> #include <console/console.h>
#include <commonlib/bsd/helpers.h>
#include <device/pci_def.h> #include <device/pci_def.h>
#include <string.h> #include <string.h>
#include <stdint.h> #include <stdint.h>
@ -36,8 +37,7 @@ unsigned long write_pirq_routing_table(unsigned long addr)
int i; int i;
/* Align the table to be 16 byte aligned. */ /* Align the table to be 16 byte aligned. */
addr += 15; addr = ALIGN_UP(addr, 16);
addr &= ~15;
/* This table must be between 0xf0000 & 0x100000 */ /* This table must be between 0xf0000 & 0x100000 */
printk(BIOS_INFO, "Writing IRQ routing tables to 0x%lx...", addr); printk(BIOS_INFO, "Writing IRQ routing tables to 0x%lx...", addr);

View File

@ -1,6 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */ /* SPDX-License-Identifier: GPL-2.0-only */
#include <console/console.h> #include <console/console.h>
#include <commonlib/bsd/helpers.h>
#include <device/pci_def.h> #include <device/pci_def.h>
#include <string.h> #include <string.h>
#include <stdint.h> #include <stdint.h>
@ -36,8 +37,7 @@ unsigned long write_pirq_routing_table(unsigned long addr)
int i; int i;
/* Align the table to be 16 byte aligned. */ /* Align the table to be 16 byte aligned. */
addr += 15; addr = ALIGN_UP(addr, 16);
addr &= ~15;
/* This table must be between 0xf0000 & 0x100000 */ /* This table must be between 0xf0000 & 0x100000 */
printk(BIOS_INFO, "Writing IRQ routing tables to 0x%lx...", addr); printk(BIOS_INFO, "Writing IRQ routing tables to 0x%lx...", addr);

View File

@ -36,8 +36,7 @@ unsigned long write_pirq_routing_table(unsigned long addr)
int i; int i;
/* Align the table to be 16 byte aligned. */ /* Align the table to be 16 byte aligned. */
addr += 15; addr = ALIGN_UP(addr, 16);
addr &= ~15;
/* This table must be between 0xf0000 & 0x100000 */ /* This table must be between 0xf0000 & 0x100000 */
printk(BIOS_INFO, "Writing IRQ routing tables to 0x%lx...", addr); printk(BIOS_INFO, "Writing IRQ routing tables to 0x%lx...", addr);

View File

@ -1,6 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */ /* SPDX-License-Identifier: GPL-2.0-only */
#include <console/console.h> #include <console/console.h>
#include <commonlib/bsd/helpers.h>
#include <device/pci_def.h> #include <device/pci_def.h>
#include <string.h> #include <string.h>
#include <stdint.h> #include <stdint.h>
@ -36,8 +37,7 @@ unsigned long write_pirq_routing_table(unsigned long addr)
int i; int i;
/* Align the table to be 16 byte aligned. */ /* Align the table to be 16 byte aligned. */
addr += 15; addr = ALIGN_UP(addr, 16);
addr &= ~15;
/* This table must be between 0xf0000 & 0x100000 */ /* This table must be between 0xf0000 & 0x100000 */
printk(BIOS_INFO, "Writing IRQ routing tables to 0x%lx...", addr); printk(BIOS_INFO, "Writing IRQ routing tables to 0x%lx...", addr);

View File

@ -1,6 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */ /* SPDX-License-Identifier: GPL-2.0-only */
#include <console/console.h> #include <console/console.h>
#include <commonlib/bsd/helpers.h>
#include <device/pci_def.h> #include <device/pci_def.h>
#include <string.h> #include <string.h>
#include <stdint.h> #include <stdint.h>
@ -36,8 +37,7 @@ unsigned long write_pirq_routing_table(unsigned long addr)
int i; int i;
/* Align the table to be 16 byte aligned. */ /* Align the table to be 16 byte aligned. */
addr += 15; addr = ALIGN_UP(addr, 16);
addr &= ~15;
/* This table must be between 0xf0000 & 0x100000 */ /* This table must be between 0xf0000 & 0x100000 */
printk(BIOS_INFO, "Writing IRQ routing tables to 0x%lx...", addr); printk(BIOS_INFO, "Writing IRQ routing tables to 0x%lx...", addr);

View File

@ -1,6 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */ /* SPDX-License-Identifier: GPL-2.0-only */
#include <console/console.h> #include <console/console.h>
#include <commonlib/bsd/helpers.h>
#include <device/pci_def.h> #include <device/pci_def.h>
#include <string.h> #include <string.h>
#include <stdint.h> #include <stdint.h>
@ -36,8 +37,7 @@ unsigned long write_pirq_routing_table(unsigned long addr)
int i; int i;
/* Align the table to be 16 byte aligned. */ /* Align the table to be 16 byte aligned. */
addr += 15; addr = ALIGN_UP(addr, 16);
addr &= ~15;
/* This table must be between 0xf0000 & 0x100000 */ /* This table must be between 0xf0000 & 0x100000 */
printk(BIOS_INFO, "Writing IRQ routing tables to 0x%lx...", addr); printk(BIOS_INFO, "Writing IRQ routing tables to 0x%lx...", addr);