]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/powernv: Add OPAL exports attributes to sysfs
authorMatt Brown <matthew.brown.dev@gmail.com>
Wed, 29 Mar 2017 23:28:01 +0000 (10:28 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 4 Apr 2017 04:11:22 +0000 (14:11 +1000)
commit35e035ef18d64513815705e4db8c7a667ca1b6f3
tree2c6652b6e3dac7ff778bf4880b56ba4f38027d82
parenta0eecffc2b125cc8e8d8c3c5fd40959ee67f8a47
powerpc/powernv: Add OPAL exports attributes to sysfs

New versions of OPAL have a device node /ibm,opal/firmware/exports, each
property of which describes a range of memory in OPAL that Linux might
want to export to userspace for debugging.

This patch adds a sysfs file under 'opal/exports' for each property
found there, and makes it read-only by root.

Signed-off-by: Matt Brown <matthew.brown.dev@gmail.com>
[mpe: Drop counting of props, rename to attr, free on sysfs error, c'log]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/powernv/opal.c