alistair23-linux/include/acpi
James Morse 7f17b4a121 ACPI: APEI: Kick the memory_failure() queue for synchronous errors
memory_failure() offlines or repairs pages of memory that have been
discovered to be corrupt. These may be detected by an external
component, (e.g. the memory controller), and notified via an IRQ.
In this case the work is queued as not all of memory_failure()s work
can happen in IRQ context.

If the error was detected as a result of user-space accessing a
corrupt memory location the CPU may take an abort instead. On arm64
this is a 'synchronous external abort', and on a firmware first
system it is replayed using NOTIFY_SEA.

This notification has NMI like properties, (it can interrupt
IRQ-masked code), so the memory_failure() work is queued. If we
return to user-space before the queued memory_failure() work is
processed, we will take the fault again. This loop may cause platform
firmware to exceed some threshold and reboot when Linux could have
recovered from this error.

For NMIlike notifications keep track of whether memory_failure() work
was queued, and make task_work pending to flush out the queue.
To save memory allocations, the task_work is allocated as part of
the ghes_estatus_node, and free()ing it back to the pool is deferred.

Signed-off-by: James Morse <james.morse@arm.com>
Tested-by: Tyler Baicar <baicar@os.amperecomputing.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2020-05-19 19:51:11 +02:00
..
platform ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
acbuffer.h ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
acconfig.h ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
acexcep.h ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
acnames.h ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
acoutput.h ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
acpi.h ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
acpi_bus.h acpi: Remove header dependency 2020-03-21 16:00:21 +01:00
acpi_drivers.h Linux 5.2-rc4 2019-06-14 14:18:53 -06:00
acpi_io.h ACPI: OSL: Make a W=1 kernel-doc warning go away 2019-06-04 17:21:11 +02:00
acpi_lpat.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
acpi_numa.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
acpiosxf.h ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
acpixf.h Merge branch 'acpica' 2020-04-06 16:23:31 +02:00
acrestyp.h ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
actbl.h ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
actbl1.h ACPICA: Fix a couple of typos 2020-02-16 10:19:53 +01:00
actbl2.h ACPICA: Add NHLT table signature 2020-03-30 14:52:33 +02:00
actbl3.h ACPICA: WSMT: Fix typo, no functional change 2020-03-30 14:52:33 +02:00
actypes.h ACPICA: Introduce ACPI_ACCESS_BYTE_WIDTH() macro 2020-02-13 23:51:30 +01:00
acuuid.h ACPICA: Fix a typo in a comment field 2020-03-30 14:52:32 +02:00
apei.h Merge branches 'acpi-pmic', 'acpi-apei' and 'acpi-x86' 2017-11-13 01:37:17 +01:00
battery.h battery: Add the battery hooking API 2018-02-21 23:27:13 +01:00
button.h ACPI: button: move HIDs to acpi/button.h 2020-02-13 23:36:23 +01:00
cppc_acpi.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
ghes.h ACPI: APEI: Kick the memory_failure() queue for synchronous errors 2020-05-19 19:51:11 +02:00
hed.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 428 2019-06-05 17:37:16 +02:00
nfit.h acpi, nfit: Add function to look up nvdimm device and provide SMBIOS handle 2018-03-14 12:43:50 +01:00
pcc.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
pdc_intel.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
processor.h x86: ACPI: fix CPU hotplug deadlock 2020-04-04 16:28:24 +02:00
reboot.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
video.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00