acpi/ghes: move offset calculus to a separate function
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 15 Jan 2025 12:50:30 +0000 (13:50 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 15 Jan 2025 18:07:15 +0000 (13:07 -0500)
commit1cd59b8981ce234c1d790111afce4a32218a88dd
treee0a5577065b5a91a80dff7e4822becc7e1cfd9c5
parent652f6d86cbb60e193edc2510c365b75229734ccf
acpi/ghes: move offset calculus to a separate function

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>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Message-Id: <60fdd1bf379ba1db3099710868802aa49a27febb.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