Felix Held has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/33627
Change subject: arch/x86/acpi: use ALIGN_UP instead of ALIGN ......................................................................
arch/x86/acpi: use ALIGN_UP instead of ALIGN
The ALIGN_UP macro is basically an alias of the ALIGN macro; with this change it's more obvious in which direction the alignment happens.
Change-Id: I6f1b9f9bbcafeb85a6ef5c10ce4b57edc0740e72 Signed-off-by: Felix Held felix-coreboot@felixheld.de --- M src/arch/x86/acpi.c M src/arch/x86/include/arch/acpi.h 2 files changed, 3 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/27/33627/1
diff --git a/src/arch/x86/acpi.c b/src/arch/x86/acpi.c index bf9813c..635f0fa 100644 --- a/src/arch/x86/acpi.c +++ b/src/arch/x86/acpi.c @@ -813,7 +813,7 @@
hpet = (acpi_hpet_t *) current; current += sizeof(acpi_hpet_t); - current = ALIGN(current, 16); + current = ALIGN_UP(current, 16); acpi_create_hpet(hpet); acpi_add_table(rsdp, hpet);
@@ -1271,7 +1271,7 @@ acpi_write_xsdt(xsdt, oem_id, oem_table_id);
printk(BIOS_DEBUG, "ACPI: * FACS\n"); - current = (ALIGN(current, 64)); + current = (ALIGN_UP(current, 64)); facs = (acpi_facs_t *) current; current += sizeof(acpi_facs_t); current = acpi_align_current(current); diff --git a/src/arch/x86/include/arch/acpi.h b/src/arch/x86/include/arch/acpi.h index dbf46a9..a17729a 100644 --- a/src/arch/x86/include/arch/acpi.h +++ b/src/arch/x86/include/arch/acpi.h @@ -958,7 +958,7 @@
static inline uintptr_t acpi_align_current(uintptr_t current) { - return ALIGN(current, 16); + return ALIGN_UP(current, 16); }
/* ACPI table revisions should match the revision of the ACPI spec
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33627 )
Change subject: arch/x86/acpi: use ALIGN_UP instead of ALIGN ......................................................................
Patch Set 1: Code-Review+1
Kyösti Mälkki has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33627 )
Change subject: arch/x86/acpi: use ALIGN_UP instead of ALIGN ......................................................................
Patch Set 1: Code-Review+2
HAOUAS Elyes has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33627 )
Change subject: arch/x86/acpi: use ALIGN_UP instead of ALIGN ......................................................................
Patch Set 1: Code-Review+1
(2 comments)
https://review.coreboot.org/#/c/33627/1/src/arch/x86/acpi.c File src/arch/x86/acpi.c:
https://review.coreboot.org/#/c/33627/1/src/arch/x86/acpi.c@816 PS1, Line 816: ALIGN_UP Please, where this is defined ?
https://review.coreboot.org/#/c/33627/1/src/arch/x86/acpi.c@1274 PS1, Line 1274: ( not needed
Felix Held has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33627 )
Change subject: arch/x86/acpi: use ALIGN_UP instead of ALIGN ......................................................................
Patch Set 1:
(2 comments)
https://review.coreboot.org/#/c/33627/1/src/arch/x86/acpi.c File src/arch/x86/acpi.c:
https://review.coreboot.org/#/c/33627/1/src/arch/x86/acpi.c@816 PS1, Line 816: ALIGN_UP
Please, where this is defined ?
both ALIGN and ALIGN_UP are defined in src/commonlib/include/commonlib/helpers.h
https://review.coreboot.org/#/c/33627/1/src/arch/x86/acpi.c@1274 PS1, Line 1274: (
not needed
ack
Hello Kyösti Mälkki, HAOUAS Elyes, Patrick Rudolph, Paul Menzel, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33627
to look at the new patch set (#2).
Change subject: arch/x86/acpi: use ALIGN_UP instead of ALIGN ......................................................................
arch/x86/acpi: use ALIGN_UP instead of ALIGN
The ALIGN_UP macro is basically an alias of the ALIGN macro; with this change it's more obvious in which direction the alignment happens.
Change-Id: I6f1b9f9bbcafeb85a6ef5c10ce4b57edc0740e72 Signed-off-by: Felix Held felix-coreboot@felixheld.de --- M src/arch/x86/acpi.c M src/arch/x86/include/arch/acpi.h 2 files changed, 3 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/27/33627/2
HAOUAS Elyes has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33627 )
Change subject: arch/x86/acpi: use ALIGN_UP instead of ALIGN ......................................................................
Patch Set 2: Code-Review+2
Lance Zhao has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33627 )
Change subject: arch/x86/acpi: use ALIGN_UP instead of ALIGN ......................................................................
Patch Set 2: Code-Review+2
Felix Held has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/33627 )
Change subject: arch/x86/acpi: use ALIGN_UP instead of ALIGN ......................................................................
arch/x86/acpi: use ALIGN_UP instead of ALIGN
The ALIGN_UP macro is basically an alias of the ALIGN macro; with this change it's more obvious in which direction the alignment happens.
Change-Id: I6f1b9f9bbcafeb85a6ef5c10ce4b57edc0740e72 Signed-off-by: Felix Held felix-coreboot@felixheld.de Reviewed-on: https://review.coreboot.org/c/coreboot/+/33627 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: HAOUAS Elyes ehaouas@noos.fr Reviewed-by: Lance Zhao lance.zhao@gmail.com --- M src/arch/x86/acpi.c M src/arch/x86/include/arch/acpi.h 2 files changed, 3 insertions(+), 3 deletions(-)
Approvals: build bot (Jenkins): Verified HAOUAS Elyes: Looks good to me, approved Lance Zhao: Looks good to me, approved
diff --git a/src/arch/x86/acpi.c b/src/arch/x86/acpi.c index 1b8aaae..71fc4e2 100644 --- a/src/arch/x86/acpi.c +++ b/src/arch/x86/acpi.c @@ -864,7 +864,7 @@
hpet = (acpi_hpet_t *) current; current += sizeof(acpi_hpet_t); - current = ALIGN(current, 16); + current = ALIGN_UP(current, 16); acpi_create_hpet(hpet); acpi_add_table(rsdp, hpet);
@@ -1322,7 +1322,7 @@ acpi_write_xsdt(xsdt, oem_id, oem_table_id);
printk(BIOS_DEBUG, "ACPI: * FACS\n"); - current = (ALIGN(current, 64)); + current = ALIGN_UP(current, 64); facs = (acpi_facs_t *) current; current += sizeof(acpi_facs_t); current = acpi_align_current(current); diff --git a/src/arch/x86/include/arch/acpi.h b/src/arch/x86/include/arch/acpi.h index e48b2da..6251b98 100644 --- a/src/arch/x86/include/arch/acpi.h +++ b/src/arch/x86/include/arch/acpi.h @@ -1004,7 +1004,7 @@
static inline uintptr_t acpi_align_current(uintptr_t current) { - return ALIGN(current, 16); + return ALIGN_UP(current, 16); }
/* ACPI table revisions should match the revision of the ACPI spec