linux/drivers/acpi
Ira Weiny 5e4a264bf8 acpi/ghes: Process CXL Component Events
BIOS can configure memory devices as firmware first.  This will send CXL
events to the firmware instead of the OS.  The firmware can then inform
the OS of these events via UEFI.

UEFI v2.10 section N.2.14 defines a Common Platform Error Record (CPER)
format for CXL Component Events.  The format is mostly the same as the
CXL Common Event Record Format.  The difference lies in the use of a
GUID as the CPER Section Type which matches the UUID defined in CXL 3.1
Table 8-43.

Currently a configuration such as this will trace a non standard event
in the log omitting useful details of the event.  In addition the CXL
sub-system contains additional region and HPA information useful to the
user.[0]

The CXL code is required to be called from process context as it needs
to take a device lock.  The GHES code may be in interrupt context.  This
complicated the use of a callback.  Dan Williams suggested the use of
work items as an atomic way of switching between the callback execution
and a default handler.[1]

The use of a kfifo simplifies queue processing by providing lock free
fifo operations.  cxl_cper_kfifo_get() allows easier management of the
kfifo between the ghes and cxl modules.

CXL 3.1 Table 8-127 requires a device to have a queue depth of 1 for
each of the four event logs.  A combined queue depth of 32 is chosen to
provide room for 8 entries of each log type.

Add GHES support to detect CXL CPER records.  Add the ability for the
CXL sub-system to register a work queue to process the events.

This patch adds back the functionality which was removed to fix the
report by Dan Carpenter[2].

Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Rafael J. Wysocki <rafael@kernel.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Borislav Petkov <bp@alien8.de>
Suggested-by: Dan Carpenter <dan.carpenter@linaro.org>
Suggested-by: Dan Williams <dan.j.williams@intel.com>
Link: http://lore.kernel.org/r/cover.1711598777.git.alison.schofield@intel.com [0]
Link: http://lore.kernel.org/r/65d111eb87115_6c745294ac@dwillia2-xfh.jf.intel.com.notmuch [1]
Link: http://lore.kernel.org/r/b963c490-2c13-4b79-bbe7-34c6568423c7@moroto.mountain [2]
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Tony Luck <tony.luck@intel.com>
Tested-by: Smita Koralahalli <Smita.KoralahalliChannabasappa@amd.com>
Link: https://lore.kernel.org/r/20240426-cxl-cper3-v4-1-58076cce1624@intel.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
2024-05-01 09:24:08 -07:00
..
acpica ACPICA: debugger: check status of acpi_evaluate_object() in acpi_db_walk_for_fields() 2024-03-26 13:06:47 +01:00
apei acpi/ghes: Process CXL Component Events 2024-05-01 09:24:08 -07:00
arm64 ACPI: AGDI: Convert to platform remove callback returning void 2024-02-27 15:57:33 +01:00
dptf ACPI: DPTF: Convert to platform remove callback returning void 2024-02-27 15:57:33 +01:00
nfit ACPI: NFIT: Switch to use acpi_evaluate_dsm_typed() 2024-02-02 17:31:50 +01:00
numa cxl/region: Deal with numa nodes not enumerated by SRAT 2024-03-12 14:54:03 -07:00
pmic ACPI: PMIC: Add comments with DSDT power opregion field names 2023-01-30 16:47:13 +01:00
riscv ACPI: RISC-V: Add CPPC driver 2024-03-19 18:30:54 -07:00
x86 ACPI: PM: s2idle: Evaluate all Low-Power S0 Idle _DSM functions 2024-04-23 21:50:15 +02:00
ac.c ACPI: AC: Rename ACPI device from device to adev 2023-10-17 15:43:30 +02:00
acpi_adxl.c
acpi_apd.c ACPI: processor: Check for null return of devm_kzalloc() in fch_misc_setup() 2023-03-20 18:04:58 +01:00
acpi_cmos_rtc.c ACPI: TAD: Install SystemCMOS address space handler for ACPI000E 2023-08-17 20:01:24 +02:00
acpi_configfs.c
acpi_dbg.c
acpi_extlog.c ACPI: extlog: Clear Extended Error Log status when RAS_CEC handled the error 2023-12-13 13:50:00 +01:00
acpi_ffh.c ACPI: FFH: Drop the inclusion of linux/arm-smccc.h 2023-06-12 19:28:20 +02:00
acpi_fpdt.c ACPI: FPDT: properly handle invalid FPDT subtables 2023-10-03 21:12:22 +02:00
acpi_ipmi.c ACPI: IPMI: replace usage of found with dedicated list iterator variable 2022-03-25 18:01:40 +01:00
acpi_lpat.c
acpi_lpit.c ACPI: LPIT: Avoid u32 multiplication overflow 2023-11-22 20:55:20 +01:00
acpi_lpss.c Merge branches 'acpi-resource', 'acpi-numa', 'acpi-soc' and 'acpi-misc' 2024-01-04 13:23:31 +01:00
acpi_memhotplug.c mm/memory_hotplug: allow memmap on memory hotplug request to fallback 2023-08-21 13:37:48 -07:00
acpi_pad.c Many singleton patches against the MM code. The patch series which are 2023-11-02 19:38:47 -10:00
acpi_pcc.c ACPI: PCC: Setup PCC Opregion handler only if platform interrupt is available 2022-11-23 19:06:56 +01:00
acpi_platform.c ACPI: platform: Move SMB0001 HID to the header and reuse 2023-07-04 19:28:20 +02:00
acpi_pnp.c ACPI: PNP: Introduce list of known non-PNP devices 2023-01-17 12:52:11 +01:00
acpi_processor.c Merge branches 'acpi-x86', 'acpi-video', 'acpi-apei' and 'acpi-misc' 2024-03-11 14:42:30 +01:00
acpi_tad.c ACPI: TAD: Convert to platform remove callback returning void 2024-02-27 15:57:33 +01:00
acpi_video.c ACPI: video: Handle fetching EDID that is longer than 256 bytes 2024-02-08 14:03:47 +01:00
acpi_watchdog.c ACPI: use %pe for better readability of errors while printing 2024-02-16 19:31:12 +01:00
battery.c ACPI: bus: Add context argument to acpi_dev_install_notify_handler() 2023-10-06 17:32:51 +02:00
bgrt.c ACPI: BGRT: use static for BGRT_SHOW kobj_attribute defines 2022-04-22 16:55:33 +02:00
blacklist.c
bus.c ACPI: bus: make acpi_bus_type const 2024-02-12 14:42:48 +01:00
button.c ACPI: button: trigger wakeup key events 2023-12-29 18:47:49 +01:00
container.c ACPI: container: Use acpi_dev_for_each_child() 2022-06-20 20:33:05 +02:00
cppc_acpi.c ACPI: CPPC: Fix access width used for PCC registers 2024-04-22 18:58:46 +02:00
debugfs.c
device_pm.c ACPI: PM: Add acpi_device_fix_up_power_children() function 2023-11-20 17:31:49 +01:00
device_sysfs.c Merge branches 'acpi-ec', 'acpi-sysfs', 'acpi-misc' and 'acpi-uid' 2023-10-26 14:59:52 +02:00
dock.c ACPI: Document handle_eject_request() arguments 2024-03-13 21:02:33 +01:00
ec_sys.c ACPI: EC: Mark the ec_sys write_support param as module_param_hw() 2021-12-01 20:19:30 +01:00
ec.c Revert "ACPI: EC: Use a spin lock without disabing interrupts" 2024-02-22 10:35:54 +01:00
event.c
evged.c ACPI: GED: Convert to platform remove callback returning void 2024-02-27 15:57:33 +01:00
fan_attr.c ACPI: fan: Convert to use sysfs_emit_at() API 2022-12-06 12:44:14 +01:00
fan_core.c ACPI: fan: Convert to platform remove callback returning void 2024-02-27 15:57:34 +01:00
fan.h ACPI: DPTF: Support Meteor Lake 2022-05-25 15:37:07 +02:00
glue.c ACPI: Fix selecting wrong ACPI fwnode for the iGPU on some Dell laptops 2023-01-10 20:23:48 +01:00
hed.c ACPI: bus: Add context argument to acpi_dev_install_notify_handler() 2023-10-06 17:32:51 +02:00
internal.h Merge branches 'acpi-tables', 'acpi-processor', 'acpi-property' and 'acpi-thermal' 2024-03-11 14:33:32 +01:00
ioapic.c ACPI: Silence missing prototype warnings 2022-12-30 19:12:30 +01:00
irq.c ACPI: irq: Fix incorrect return value in acpi_register_gsi() 2023-10-18 13:11:04 +02:00
Kconfig RISC-V Patches for the 6.9 Merge Window 2024-03-22 10:41:13 -07:00
Makefile ACPI: Drop the custom_method debugfs interface 2024-02-22 11:17:48 +01:00
mipi-disco-img.c ACPI: property: Polish ignoring bad data nodes 2024-02-26 17:56:11 +01:00
nvs.c
osi.c ACPI: OSI: refactor deprecated strncpy() 2023-09-21 20:55:43 +02:00
osl.c ACPI: OSL: Use spin locks without disabling interrupts 2023-12-28 14:13:52 +01:00
pci_irq.c ACPI / PCI: fix LPIC IRQ model default PCI IRQ polarity 2022-11-26 12:57:18 +00:00
pci_link.c ACPI/PCI: Remove useless NULL pointer checks 2022-07-27 21:21:27 +02:00
pci_mcfg.c PCI: loongson: Add ACPI init support 2022-07-14 15:25:36 -05:00
pci_root.c ACPI: PCI: Switch to use acpi_evaluate_dsm_typed() 2023-10-03 15:46:14 +02:00
pci_slot.c ACPI: use %pe for better readability of errors while printing 2024-02-16 19:31:12 +01:00
pfr_telemetry.c ACPI: pfr_telemetry: Convert to platform remove callback returning void 2024-02-27 15:57:34 +01:00
pfr_update.c ACPI: pfr_update: Convert to platform remove callback returning void 2024-02-27 15:57:34 +01:00
platform_profile.c
power.c ACPI: PM: Do not turn of unused power resources on the Toshiba Click Mini 2023-04-27 18:44:43 +02:00
pptt.c ACPI: PPTT: Fix to avoid sleep in the atomic context when PPTT is absent 2023-03-14 20:34:38 +01:00
prmt.c ACPI: PRM: Annotate struct prm_module_info with __counted_by 2023-10-03 21:24:10 +02:00
proc.c proc: remove PDE_DATA() completely 2022-01-22 08:33:37 +02:00
processor_core.c arm64, irqchip/gic-v3, ACPI: Move MADT GICC enabled check into a helper 2023-10-24 15:12:09 +01:00
processor_driver.c ACPI: cpufreq: Add highest perf change notification 2024-01-31 14:54:50 +01:00
processor_idle.c ACPI: processor_idle: Fix memory leak in acpi_processor_power_exit() 2024-02-15 20:26:40 +01:00
processor_pdc.c ACPI: processor: Fix uninitialized access of buf in acpi_set_pdc_bits() 2023-09-18 12:16:16 +02:00
processor_perflib.c ACPI: processor: perflib: Avoid updating frequency QoS unnecessarily 2022-12-30 19:10:02 +01:00
processor_thermal.c ACPI: processor: reduce CPUFREQ thermal reduction pctg for Tegra241 2023-12-06 20:52:47 +01:00
processor_throttling.c ACPI: processor: throttling: remove variable count 2022-10-28 19:02:45 +02:00
property.c ACPI: property: Ignore bad graph port nodes on Dell XPS 9315 2024-02-15 21:06:06 +01:00
reboot.c
resource.c ACPI: resource: Use IRQ override on Maibenben X565 2024-03-05 21:33:38 +01:00
sbs.c ACPI: SBS: Fix handling of Smart Battery Selectors 2023-03-30 19:01:05 +02:00
sbshc.c ACPI: make remove callback of ACPI driver void 2022-11-23 19:11:22 +01:00
sbshc.h
scan.c ACPI: scan: Do not increase dep_unmet for already met dependencies 2024-04-08 16:44:14 +02:00
sleep.c More ACPI updates for 6.9-rc1 2024-03-19 11:15:14 -07:00
sleep.h ACPI: s2idle: Add a new ->check() callback for platform_s2idle_ops 2022-09-09 17:37:40 +02:00
spcr.c ACPI: SPCR: Amend indentation 2023-03-27 20:50:28 +02:00
sysfs.c ACPI: sysfs: Enable ACPI sysfs support for CCEL records 2023-03-27 20:43:58 +02:00
tables.c lib/firmware_table: Provide buffer length argument to cdat_table_parse() 2024-03-13 00:03:21 -07:00
thermal_lib.c ACPI: thermal_lib: Initialize temp_decik to zero 2024-02-22 20:36:17 +01:00
thermal.c ACPI: thermal: Register thermal zones without valid trip points 2024-04-02 21:38:45 +02:00
tiny-power-button.c ACPI: tiny-power-button: Eliminate the driver notify callback 2023-06-16 19:48:09 +02:00
utils.c ACPI: utils: Make acpi_handle_path() not static 2024-02-15 21:06:06 +01:00
video_detect.c ACPI: video: Add acpi_backlight=vendor quirk for Toshiba Portégé R100 2023-10-03 20:33:58 +02:00
viot.c ACPI: VIOT: Initialize the correct IOMMU fwspec 2023-03-30 19:20:42 +02:00
wakeup.c