From: Jonathan Cameron via <qemu-devel@nongnu.org>
To: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Cc: Igor Mammedov <imammedo@redhat.com>,
Shiju Jose <shiju.jose@huawei.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Ani Sinha <anisinha@redhat.com>,
Dongjiu Geng <gengdongjiu1@gmail.com>,
<linux-kernel@vger.kernel.org>, <qemu-arm@nongnu.org>,
<qemu-devel@nongnu.org>
Subject: Re: [PATCH v3 14/15] acpi/ghes: Change ghes fill logic to work with only one source
Date: Wed, 20 Nov 2024 14:24:54 +0000 [thread overview]
Message-ID: <20241120142454.000020f5@huawei.com> (raw)
In-Reply-To: <3cf3d0f0253faf8d2497175e8473431d8ef25810.1731406254.git.mchehab+huawei@kernel.org>
On Tue, 12 Nov 2024 11:14:58 +0100
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> wrote:
> Extending to multiple sources require a BIOS pointer to the
> beginning of the HEST table, which in turn requires a backward-compatible
> code.
>
> So, the current code supports only one source. Ensure that and simplify
> the code.
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
One trivial comment.
Otherwise LGTM
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> ---
> void ghes_record_cper_errors(const void *cper, size_t len,
> uint16_t source_id, Error **errp)
> {
> uint64_t cper_addr = 0, read_ack_register_addr = 0, read_ack_register;
> - uint64_t start_addr;
> AcpiGedState *acpi_ged_state;
> AcpiGhesState *ags;
>
> @@ -418,11 +416,8 @@ void ghes_record_cper_errors(const void *cper, size_t len,
> }
> ags = &acpi_ged_state->ghes_state;
>
> - start_addr = le64_to_cpu(ags->hw_error_le);
> -
> - start_addr += source_id * sizeof(uint64_t);
> -
> - get_ghes_offsets(start_addr, &cper_addr, &read_ack_register_addr);
> + assert(ACPI_GHES_ERROR_SOURCE_COUNT == 1);
> + get_ghes_offsets(le64_to_cpu(ags->hw_error_le), &cper_addr, &read_ack_register_addr);
Long line. I'd break it.
>
> cper_addr = le64_to_cpu(cper_addr);
> if (!cper_addr) {
next prev parent reply other threads:[~2024-11-20 14:25 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-12 10:14 [PATCH v3 00/15] Prepare GHES driver to support error injection Mauro Carvalho Chehab
2024-11-12 10:14 ` [PATCH v3 01/15] acpi/ghes: get rid of ACPI_HEST_SRC_ID_RESERVED Mauro Carvalho Chehab
2024-11-12 10:14 ` [PATCH v3 02/15] acpi/ghes: simplify acpi_ghes_record_errors() code Mauro Carvalho Chehab
2024-11-12 10:14 ` [PATCH v3 03/15] acpi/ghes: simplify the per-arch caller to build HEST table Mauro Carvalho Chehab
2024-11-12 10:14 ` [PATCH v3 04/15] acpi/ghes: better handle source_id and notification Mauro Carvalho Chehab
2024-11-12 10:14 ` [PATCH v3 05/15] acpi/ghes: Fix acpi_ghes_record_errors() argument Mauro Carvalho Chehab
2024-11-12 10:14 ` [PATCH v3 06/15] acpi/ghes: Remove a duplicated out of bounds check Mauro Carvalho Chehab
2024-11-12 10:14 ` [PATCH v3 07/15] acpi/ghes: Change the type for source_id Mauro Carvalho Chehab
2024-11-12 10:14 ` [PATCH v3 08/15] acpi/ghes: make the GHES record generation more generic Mauro Carvalho Chehab
2024-11-20 14:18 ` Jonathan Cameron via
2024-11-22 8:24 ` Mauro Carvalho Chehab
2024-11-12 10:14 ` [PATCH v3 09/15] acpi/ghes: better name GHES memory error function Mauro Carvalho Chehab
2024-11-20 14:22 ` Jonathan Cameron via
2024-11-12 10:14 ` [PATCH v3 10/15] acpi/ghes: don't crash QEMU if ghes GED is not found Mauro Carvalho Chehab
2024-11-20 14:22 ` Jonathan Cameron via
2024-11-12 10:14 ` [PATCH v3 11/15] acpi/ghes: rename etc/hardware_error file macros Mauro Carvalho Chehab
2024-11-12 10:14 ` [PATCH v3 12/15] acpi/ghes: better name the offset of the hardware error firmware Mauro Carvalho Chehab
2024-11-12 10:14 ` [PATCH v3 13/15] acpi/ghes: move offset calculus to a separate function Mauro Carvalho Chehab
2024-11-12 10:14 ` [PATCH v3 14/15] acpi/ghes: Change ghes fill logic to work with only one source Mauro Carvalho Chehab
2024-11-20 14:24 ` Jonathan Cameron via [this message]
2024-11-12 10:14 ` [PATCH v3 15/15] docs: acpi_hest_ghes: fix documentation for CPER size Mauro Carvalho Chehab
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=20241120142454.000020f5@huawei.com \
--to=qemu-devel@nongnu.org \
--cc=Jonathan.Cameron@huawei.com \
--cc=anisinha@redhat.com \
--cc=gengdongjiu1@gmail.com \
--cc=imammedo@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab+huawei@kernel.org \
--cc=mst@redhat.com \
--cc=qemu-arm@nongnu.org \
--cc=shiju.jose@huawei.com \
/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;
as well as URLs for NNTP newsgroup(s).