[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 10/15] acpi/ghes: move offset calculus to a separate function
From: |
Jonathan Cameron |
Subject: |
Re: [PATCH 10/15] acpi/ghes: move offset calculus to a separate function |
Date: |
Thu, 26 Sep 2024 13:03:48 +0100 |
On Wed, 25 Sep 2024 06:04:15 +0200
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> wrote:
> Currently, CPER address location is calculated as an offset of
> the hardware_errors table. It is also badly named, as the
> offset actually used is the address where the CPER data starts,
> and not the beginning of the error source.
>
> Move the logic which calculates such offset to a separate
> function, in preparation for a patch that will be changing the
> logic to calculate it from the HEST table.
>
> While here, properly name the variable which stores the cper
> address.
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Trivial comment inline.
Given this is a placeholder for more radical refactor I'll not comment on
the maths etc being less flexible than it will hopefully end up!
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)
> {
> - /*
> - * As the current version supports only one source, the ack offset is
> - * just sizeof(uint64_t).
> - */
> - read_ack_register_addr = start_addr + sizeof(uint64_t);
> -
> cpu_physical_memory_read(read_ack_register_addr,
> - &read_ack_register,
> sizeof(read_ack_register));
> + &read_ack_register, sizeof(read_ack_register));
>
Wrong patch for this alignment tidy up?
Or are my eyes deceiving me and there is more going on here...
J
- Re: [PATCH 13/15] acpi/ghes: rename etc/hardware_error file macros, (continued)
- [PATCH 11/15] acpi/ghes: better name GHES memory error function, Mauro Carvalho Chehab, 2024/09/25
- [PATCH 09/15] acpi/ghes: make the GHES record generation more generic, Mauro Carvalho Chehab, 2024/09/25
- [PATCH 08/15] acpi/ghes: Prepare to support multiple sources on ghes, Mauro Carvalho Chehab, 2024/09/25
- [PATCH 04/15] acpi/ghes: better handle source_id and notification, Mauro Carvalho Chehab, 2024/09/25
- [PATCH 10/15] acpi/ghes: move offset calculus to a separate function, Mauro Carvalho Chehab, 2024/09/25
- Re: [PATCH 10/15] acpi/ghes: move offset calculus to a separate function,
Jonathan Cameron <=
- [PATCH 14/15] better name the offset of the hardware error firmware, Mauro Carvalho Chehab, 2024/09/25