powerpc/secvar: Extend sysfs to include config vars
authorRussell Currey <ruscur@russell.cc>
Fri, 10 Feb 2023 08:03:45 +0000 (19:03 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Sun, 12 Feb 2023 11:12:37 +0000 (22:12 +1100)
commit86b6c0ae2caee9cadee1256d31b204ea54cb55c0
tree075175fbe0ea8cf401c8e06fb226f971c93ab7fb
parentcaefd3b77450e330845755ea57add2315fd5e4d9
powerpc/secvar: Extend sysfs to include config vars

The forthcoming pseries consumer of the secvar API wants to expose a
number of config variables.  Allowing secvar implementations to provide
their own sysfs attributes makes it easy for consumers to expose what
they need to.

This is not being used by the OPAL secvar implementation at present, and
the config directory will not be created if no attributes are set.

Signed-off-by: Russell Currey <ruscur@russell.cc>
Co-developed-by: Andrew Donnellan <ajd@linux.ibm.com>
Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20230210080401.345462-11-ajd@linux.ibm.com
arch/powerpc/include/asm/secvar.h
arch/powerpc/kernel/secvar-sysfs.c