summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/powernv/opal.c
diff options
context:
space:
mode:
authorAndrew Donnellan2016-02-09 08:17:48 +0100
committerMichael Ellerman2016-02-09 10:27:04 +0100
commit9b4fffa14906fce7aabf1f032ddd7efc7a031bba (patch)
treeecf6a730de9265a94f7760440953af1f1a00d8e8 /arch/powerpc/platforms/powernv/opal.c
parentpowerpc/eeh: fix incorrect function name in comment (diff)
downloadkernel-qcow2-linux-9b4fffa14906fce7aabf1f032ddd7efc7a031bba.tar.gz
kernel-qcow2-linux-9b4fffa14906fce7aabf1f032ddd7efc7a031bba.tar.xz
kernel-qcow2-linux-9b4fffa14906fce7aabf1f032ddd7efc7a031bba.zip
powerpc/powernv: new function to access OPAL msglog
Currently, the OPAL msglog/console buffer is exposed as a sysfs file, with the sysfs read handler responsible for retrieving the log from the OPAL buffer. We'd like to be able to use it in xmon as well. Refactor the OPAL msglog code to create a new function, opal_msglog_copy(), that copies to an arbitrary buffer. Separate the initialisation code into generic memcons init and sysfs file creation. Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/platforms/powernv/opal.c')
-rw-r--r--arch/powerpc/platforms/powernv/opal.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/powerpc/platforms/powernv/opal.c
index 4e0da5af94a1..0256d0729252 100644
--- a/arch/powerpc/platforms/powernv/opal.c
+++ b/arch/powerpc/platforms/powernv/opal.c
@@ -724,6 +724,9 @@ static int __init opal_init(void)
of_node_put(leds);
}
+ /* Initialise OPAL message log interface */
+ opal_msglog_init();
+
/* Create "opal" kobject under /sys/firmware */
rc = opal_sysfs_init();
if (rc == 0) {
@@ -739,8 +742,8 @@ static int __init opal_init(void)
opal_platform_dump_init();
/* Setup system parameters interface */
opal_sys_param_init();
- /* Setup message log interface. */
- opal_msglog_init();
+ /* Setup message log sysfs interface. */
+ opal_msglog_sysfs_init();
}
/* Initialize platform devices: IPMI backend, PRD & flash interface */