linux/Documentation/ABI/stable
Stewart Smith 774fea1a38 powerpc/powernv: Read OPAL error log and export it through sysfs
Based on a patch by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>

This patch adds support to read error logs from OPAL and export
them to userspace through a sysfs interface.

We export each log entry as a directory in /sys/firmware/opal/elog/

Currently, OPAL will buffer up to 128 error log records, we don't
need to have any knowledge of this limit on the Linux side as that
is actually largely transparent to us.

Each error log entry has the following files: id, type, acknowledge, raw.
Currently we just export the raw binary error log in the 'raw' attribute.
In a future patch, we may parse more of the error log to make it a bit
easier for userspace (e.g. to be able to display a brief summary in
petitboot without having to have a full parser).

If we have >128 logs from OPAL, we'll only be notified of 128 until
userspace starts acknowledging them. This limitation may be lifted in
the future and with this patch, that should "just work" from the linux side.

A userspace daemon should:
- wait for error log entries using normal mechanisms (we announce creation)
- read error log entry
- save error log entry safely to disk
- acknowledge the error log entry
- rinse, repeat.

On the Linux side, we read the error log when we're notified of it. This
possibly isn't ideal as it would be better to only read them on-demand.
However, this doesn't really work with current OPAL interface, so we
read the error log immediately when notified at the moment.

I've tested this pretty extensively and am rather confident that the
linux side of things works rather well. There is currently an issue with
the service processor side of things for >128 error logs though.

Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-03-07 16:19:00 +11:00
..
firewire-cdev firewire: cdev: ABI documentation enhancements 2011-07-16 07:24:32 +02:00
o2cb
syscalls
sysfs-acpi-pmprofile ACPI: Export FADT pm_profile integer value to userspace 2011-11-06 20:48:42 -05:00
sysfs-bus-firewire firewire: core: document is_local sysfs attribute 2012-06-30 10:49:06 +02:00
sysfs-bus-usb ACPI / PM / Documentation: Replace outdated project links and addresses 2013-10-11 13:22:43 +02:00
sysfs-bus-xen-backend xen: document backend sysfs files 2011-11-11 15:37:29 -05:00
sysfs-class-backlight backlight: add backlight type 2011-03-22 17:43:59 -07:00
sysfs-class-rfkill rename new rfkill sysfs knobs 2010-03-19 15:48:25 -04:00
sysfs-class-tpm tpm: add documentation for sysfs interfaces 2013-02-05 09:38:21 -06:00
sysfs-class-ubi
sysfs-devices-node Documentation: ABI: /sys/devices/system/node/ 2012-12-18 15:02:15 -08:00
sysfs-devices-system-xen_memory xen: document balloon driver sysfs files 2011-11-09 16:00:46 -05:00
sysfs-driver-ib_srp IB/srp: Make queue size configurable 2013-11-08 14:43:17 -08:00
sysfs-driver-qla2xxx
sysfs-driver-usb-usbtmc USB: update usbtmc api documentation 2012-04-12 08:26:22 -07:00
sysfs-driver-w1_ds28e04 w1: Add 1-wire slave device driver for DS28E04-100 2012-06-13 16:47:10 -07:00
sysfs-firmware-efi-vars efivars: Add Documentation 2011-03-14 08:40:51 -07:00
sysfs-firmware-opal-elog powerpc/powernv: Read OPAL error log and export it through sysfs 2014-03-07 16:19:00 +11:00
sysfs-module ABI: Clarify when /sys/module/MODULENAME is created 2013-07-02 15:38:20 +09:30
sysfs-transport-srp scsi_transport_srp: Add periodic reconnect support 2013-11-08 14:43:16 -08:00
thermal-notification thermal: Add event notification to thermal framework 2011-01-12 00:08:35 -05:00
vdso Documentation: Add newline at end-of-file to files lacking one 2012-07-20 23:10:28 +02:00