[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250520093451.0000245a@huawei.com>
Date: Tue, 20 May 2025 09:34:51 +0100
From: Jonathan Cameron <Jonathan.Cameron@...wei.com>
To: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
CC: Igor Mammedov <imammedo@...hat.com>, "Michael S . Tsirkin"
<mst@...hat.com>, Shiju Jose <shiju.jose@...wei.com>, <qemu-arm@...gnu.org>,
<qemu-devel@...gnu.org>, Ani Sinha <anisinha@...hat.com>, Dongjiu Geng
<gengdongjiu1@...il.com>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v9 04/20] Revert "hw/acpi/ghes: Make
ghes_record_cper_errors() static"
On Tue, 20 May 2025 08:41:23 +0200
Mauro Carvalho Chehab <mchehab+huawei@...nel.org> wrote:
> The ghes_record_cper_errors() function was introduced to be used
> by other types of errors, as part of the error injection
> patch series. That's why it is not static.
>
> Make it non-static again to allow its usage outside ghes.c
>
> This reverts commit 611f3bdb20f7828b0813aa90d47d1275ef18329b.
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
FWIW (which is maybe just that I don't read the commit message
again if you have to do a v10 ;)
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@...wei.com>
> ---
> hw/acpi/ghes.c | 6 ++++--
> include/hw/acpi/ghes.h | 2 ++
> 2 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/hw/acpi/ghes.c b/hw/acpi/ghes.c
> index b85bb48195a0..b709c177cdea 100644
> --- a/hw/acpi/ghes.c
> +++ b/hw/acpi/ghes.c
> @@ -390,8 +390,8 @@ static void get_hw_error_offsets(uint64_t ghes_addr,
> *read_ack_register_addr = ghes_addr + sizeof(uint64_t);
> }
>
> -static void ghes_record_cper_errors(const void *cper, size_t len,
> - uint16_t source_id, Error **errp)
> +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;
> AcpiGedState *acpi_ged_state;
> @@ -440,6 +440,8 @@ static void ghes_record_cper_errors(const void *cper, size_t len,
>
> /* Write the generic error data entry into guest memory */
> cpu_physical_memory_write(cper_addr, cper, len);
> +
> + return;
> }
>
> int acpi_ghes_memory_errors(uint16_t source_id, uint64_t physical_address)
> diff --git a/include/hw/acpi/ghes.h b/include/hw/acpi/ghes.h
> index 578a582203ce..39619a2457cb 100644
> --- a/include/hw/acpi/ghes.h
> +++ b/include/hw/acpi/ghes.h
> @@ -75,6 +75,8 @@ void acpi_build_hest(GArray *table_data, GArray *hardware_errors,
> void acpi_ghes_add_fw_cfg(AcpiGhesState *vms, FWCfgState *s,
> GArray *hardware_errors);
> int acpi_ghes_memory_errors(uint16_t source_id, uint64_t error_physical_addr);
> +void ghes_record_cper_errors(const void *cper, size_t len,
> + uint16_t source_id, Error **errp);
>
> /**
> * acpi_ghes_present: Report whether ACPI GHES table is present
Powered by blists - more mailing lists