From: Matthias Brugger <mbrugger@suse.com>
To: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>,
Simon Glass <sjg@chromium.org>
Cc: Peter Robinson <pbrobinson@gmail.com>,
Tom Rini <trini@konsulko.com>, Bin Meng <bmeng.cn@gmail.com>,
Patrick Rudolph <patrick.rudolph@9elements.com>,
Maximilian Brune <maximilian.brune@9elements.com>,
Fiona Klute <fiona.klute@gmx.de>,
Martin Stolpe <martinstolpe@gmail.com>,
Rasmus Villemoes <rasmus.villemoes@prevas.dk>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>,
Moritz Fischer <moritzf@google.com>,
u-boot@lists.denx.de
Subject: Re: [PATCH 5/5] arm: simplify updating ACPI table header checksum
Date: Tue, 25 Mar 2025 16:03:07 +0100 [thread overview]
Message-ID: <77ee8208-b25a-4072-94c3-e8f68e3be352@suse.com> (raw)
In-Reply-To: <20250321232121.251800-6-heinrich.schuchardt@canonical.com>
On 22/03/2025 00:21, Heinrich Schuchardt wrote:
> Use acpi_update_checksum() to update table header.
>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Matthias Brugger <mbrugger@suse.com>
> ---
> arch/arm/mach-bcm283x/bcm2711_acpi.c | 4 ++--
> board/raspberrypi/rpi/rpi.c | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/mach-bcm283x/bcm2711_acpi.c b/arch/arm/mach-bcm283x/bcm2711_acpi.c
> index 79b283353cf..58f8ee232b9 100644
> --- a/arch/arm/mach-bcm283x/bcm2711_acpi.c
> +++ b/arch/arm/mach-bcm283x/bcm2711_acpi.c
> @@ -81,7 +81,7 @@ static int acpi_write_pptt(struct acpi_ctx *ctx, const struct acpi_writer *entry
> }
>
> header->length = ctx->current - ctx->tab_start;
> - header->checksum = table_compute_checksum(header, header->length);
> + acpi_update_checksum(header);
>
> acpi_inc(ctx, header->length);
> acpi_add_table(ctx, header);
> @@ -116,7 +116,7 @@ static int rpi_write_gtdt(struct acpi_ctx *ctx, const struct acpi_writer *entry)
> gtdt->el2_flags = GTDT_FLAG_INT_ACTIVE_LOW;
> gtdt->cnt_read_base = 0xffffffffffffffff;
>
> - header->checksum = table_compute_checksum(header, header->length);
> + acpi_update_checksum(header);
>
> acpi_add_table(ctx, gtdt);
>
> diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c
> index 70d3c35499b..6ecd3eb120f 100644
> --- a/board/raspberrypi/rpi/rpi.c
> +++ b/board/raspberrypi/rpi/rpi.c
> @@ -791,7 +791,7 @@ static int rpi_acpi_write_ssdt(struct acpi_ctx *ctx, const struct acpi_writer *e
>
> /* (Re)calculate length and checksum */
> ssdt->length = ctx->current - (void *)ssdt;
> - ssdt->checksum = table_compute_checksum((void *)ssdt, ssdt->length);
> + acpi_update_checksum(ssdt);
> log_debug("SSDT at %p, length %x\n", ssdt, ssdt->length);
>
> /* Drop the table if it is empty */
next prev parent reply other threads:[~2025-03-25 15:03 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-21 23:21 [PATCH 0/5] acpi: simplify updating ACPI table header checksum Heinrich Schuchardt
2025-03-21 23:21 ` [PATCH 1/5] acpi: new function acpi_update_checksum() Heinrich Schuchardt
2025-03-25 14:49 ` Matthias Brugger
2025-03-26 7:29 ` Ilias Apalodimas
2025-03-21 23:21 ` [PATCH 2/5] acpi: simplify updating header checksum Heinrich Schuchardt
2025-03-25 14:55 ` Matthias Brugger
2025-03-26 7:30 ` Ilias Apalodimas
2025-03-21 23:21 ` [PATCH 3/5] x86/acpi: " Heinrich Schuchardt
2025-03-25 14:58 ` Matthias Brugger
2025-03-21 23:21 ` [PATCH 4/5] qemu-sbsa: simplify updating ACPI table " Heinrich Schuchardt
2025-03-25 15:01 ` Matthias Brugger
2025-03-26 7:30 ` Ilias Apalodimas
2025-03-21 23:21 ` [PATCH 5/5] arm: " Heinrich Schuchardt
2025-03-25 15:03 ` Matthias Brugger [this message]
2025-03-26 7:31 ` Ilias Apalodimas
2025-04-10 1:46 ` [PATCH 0/5] acpi: " Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=77ee8208-b25a-4072-94c3-e8f68e3be352@suse.com \
--to=mbrugger@suse.com \
--cc=bmeng.cn@gmail.com \
--cc=fiona.klute@gmx.de \
--cc=heinrich.schuchardt@canonical.com \
--cc=ilias.apalodimas@linaro.org \
--cc=martinstolpe@gmail.com \
--cc=maximilian.brune@9elements.com \
--cc=moritzf@google.com \
--cc=patrick.rudolph@9elements.com \
--cc=pbrobinson@gmail.com \
--cc=rasmus.villemoes@prevas.dk \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox