diff options
author | James Morse <james.morse@arm.com> | 2019-01-29 18:48:46 +0000 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2019-02-07 23:10:45 +0100 |
commit | 06ddeadc8d1c4f704b8956f239263bca75a3add8 (patch) | |
tree | df503ec06d4753854e25df8dec4fcb702c07a5bc /drivers/ata/ata_generic.c | |
parent | ee2eb3d4ee175c2fb5c7f67e84f5fe40a8147d92 (diff) |
ACPI / APEI: Don't allow ghes_ack_error() to mask earlier errors
During ghes_proc() we use ghes_ack_error() to tell an external agent
we are done with these records and it can re-use the memory.
rc may hold an error returned by ghes_read_estatus(), ENOENT causes
us to skip ghes_ack_error() (as there is nothing to ack), but rc may
also by EIO, which gets supressed.
ghes_clear_estatus() is where we mark the records as processed for
non GHESv2 error sources, and already spots the ENOENT case as
buf_paddr is set to 0 by ghes_read_estatus().
Move the ghes_ack_error() call in here to avoid extra logic with
the return code in ghes_proc().
This enables GHESv2 acking for NMI-like error sources. This is safe
as the buffer is pre-mapped by map_gen_v2() before the GHES is added
to any NMI handler lists.
This same pre-mapping step means we can't receive an error from
apei_read()/write() here as apei_check_gar() succeeded when it
was mapped, and the mapping was cached, so the address can't be
rejected at runtime. Remove the error-returns as this is now
called from a function with no return.
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/ata/ata_generic.c')
0 files changed, 0 insertions, 0 deletions