acpi/ghes: make the GHES record generation more generic
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 15 Jan 2025 12:50:25 +0000 (13:50 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 15 Jan 2025 18:07:09 +0000 (13:07 -0500)
commit48b0dcdd67d3fafbd07f6298257259dec4f541ce
tree192d773ca1bf8b42c316382a22df116563ff086b
parent2e223c5ec1146b61163d3372ac629d9240d57cb1
acpi/ghes: make the GHES record generation more generic

Split the code into separate functions to allow using the
common CPER filling code by different error sources.

The generic code was moved to ghes_record_cper_errors(),
and ghes_gen_err_data_uncorrectable_recoverable() now contains
only a logic to fill the Generic Error Data part of the record,
as described at:

ACPI 6.2: 18.3.2.7.1 Generic Error Data

The remaining code to generate a memory error now belongs to
acpi_ghes_record_errors() function.

A further patch will give it a better name.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Message-Id: <68d9f787d8c4fc8d1dbc227d6902fe801e42dea9.1736945236.git.mchehab+huawei@kernel.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/acpi/ghes.c
include/hw/acpi/ghes.h