diff options
author | Pranith Kumar <bobby.prani@gmail.com> | 2015-01-22 05:26:09 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2015-01-27 06:04:00 +0300 |
commit | 6501ab5e380cf25dad85705856bfdde439dbcbd2 (patch) | |
tree | 8f070717ef59e97ddfdf0be3234d679d60e27f81 /arch/powerpc/platforms | |
parent | 3df76a9dcc74d5f012b94ea01ed6e7aaf8362c5a (diff) | |
download | linux-6501ab5e380cf25dad85705856bfdde439dbcbd2.tar.xz |
powerpc/powernv: Skip registering log region when CONFIG_PRINTK=n
When CONFIG_PRINTK=n, log_buf_addr_get() returns NULL and log_buf_len_get()
return 0. Check for these return values and skip registering the dump buffer.
Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
Reviewed-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r-- | arch/powerpc/platforms/powernv/opal.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/powerpc/platforms/powernv/opal.c index f10b9ec8c1f5..1db119f0f4ee 100644 --- a/arch/powerpc/platforms/powernv/opal.c +++ b/arch/powerpc/platforms/powernv/opal.c @@ -667,7 +667,13 @@ static void __init opal_dump_region_init(void) /* Register kernel log buffer */ addr = log_buf_addr_get(); + if (addr == NULL) + return; + size = log_buf_len_get(); + if (size == 0) + return; + rc = opal_register_dump_region(OPAL_DUMP_REGION_LOG_BUF, __pa(addr), size); /* Don't warn if this is just an older OPAL that doesn't |