[PATCH v2 2/2] powerpc/powernv: Skip registering log region when CONFIG_PRINTK=n

Subsystems: linux for powerpc (32-bit and 64-bit), the rest

STALE4217d

6 messages, 3 authors, 2015-01-23 · open the first message on its own page

[PATCH v2 2/2] powerpc/powernv: Skip registering log region when CONFIG_PRINTK=n

From: Pranith Kumar <hidden>
Date: 2015-01-22 02:26:05

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 <redacted>
CC: Michael Ellerman <mpe@ellerman.id.au>
---
 arch/powerpc/platforms/powernv/opal.c | 6 ++++++
 1 file changed, 6 insertions(+)
diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/powerpc/platforms/powernv/opal.c
index f10b9ec..1db119f0 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
-- 
1.9.1

Re: [PATCH v2 2/2] powerpc/powernv: Skip registering log region when CONFIG_PRINTK=n

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2015-01-22 05:19:27

On Wed, 2015-01-21 at 21:26 -0500, Pranith Kumar wrote:
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 <redacted>
CC: Michael Ellerman <mpe@ellerman.id.au>
---
 arch/powerpc/platforms/powernv/opal.c | 6 ++++++
 1 file changed, 6 insertions(+)
What changed since v1? I don't see anything?

cheers

Re: [PATCH v2 2/2] powerpc/powernv: Skip registering log region when CONFIG_PRINTK=n

From: Pranith Kumar <hidden>
Date: 2015-01-22 14:35:12

On Thu, Jan 22, 2015 at 12:19 AM, Michael Ellerman [off-list ref] wrote:
On Wed, 2015-01-21 at 21:26 -0500, Pranith Kumar wrote:
quoted
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 <redacted>
CC: Michael Ellerman <mpe@ellerman.id.au>
---
 arch/powerpc/platforms/powernv/opal.c | 6 ++++++
 1 file changed, 6 insertions(+)
What changed since v1? I don't see anything?
Nothing in this patch but there is a v2 of the first patch in this
series, so had to resend this patch with a v2.

Thanks!
-- 
Pranith

Re: [PATCH v2 2/2] powerpc/powernv: Skip registering log region when CONFIG_PRINTK=n

From: Stewart Smith <hidden>
Date: 2015-01-22 22:35:41

Pranith Kumar [off-list ref] writes:
On Thu, Jan 22, 2015 at 12:19 AM, Michael Ellerman [off-list ref] wrote:
quoted
On Wed, 2015-01-21 at 21:26 -0500, Pranith Kumar wrote:
quoted
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 <redacted>
CC: Michael Ellerman <mpe@ellerman.id.au>
---
 arch/powerpc/platforms/powernv/opal.c | 6 ++++++
 1 file changed, 6 insertions(+)
What changed since v1? I don't see anything?
Nothing in this patch but there is a v2 of the first patch in this
series, so had to resend this patch with a v2.
You also missed my Reviewed-by :)

Re: [PATCH v2 2/2] powerpc/powernv: Skip registering log region when CONFIG_PRINTK=n

From: Pranith Kumar <hidden>
Date: 2015-01-23 04:04:07

On Thu, Jan 22, 2015 at 5:35 PM, Stewart Smith
[off-list ref] wrote:
Pranith Kumar [off-list ref] writes:
quoted
On Thu, Jan 22, 2015 at 12:19 AM, Michael Ellerman [off-list ref] wrote:
quoted
On Wed, 2015-01-21 at 21:26 -0500, Pranith Kumar wrote:
quoted
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 <redacted>
CC: Michael Ellerman <mpe@ellerman.id.au>
---
 arch/powerpc/platforms/powernv/opal.c | 6 ++++++
 1 file changed, 6 insertions(+)
What changed since v1? I don't see anything?
Nothing in this patch but there is a v2 of the first patch in this
series, so had to resend this patch with a v2.
You also missed my Reviewed-by :)
Sincere apologies for the oversight. Maintainers, could you please add
this Reviewed-by tag when picking this up?

Reviewed-by: Stewart Smith <redacted>

Thanks!

-- 
Pranith

Re: [PATCH v2 2/2] powerpc/powernv: Skip registering log region when CONFIG_PRINTK=n

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2015-01-23 04:13:11

On Thu, 2015-01-22 at 23:03 -0500, Pranith Kumar wrote:
On Thu, Jan 22, 2015 at 5:35 PM, Stewart Smith
[off-list ref] wrote:
quoted
Pranith Kumar [off-list ref] writes:
quoted
On Thu, Jan 22, 2015 at 12:19 AM, Michael Ellerman [off-list ref] wrote:
quoted
On Wed, 2015-01-21 at 21:26 -0500, Pranith Kumar wrote:
quoted
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 <redacted>
CC: Michael Ellerman <mpe@ellerman.id.au>
---
 arch/powerpc/platforms/powernv/opal.c | 6 ++++++
 1 file changed, 6 insertions(+)
What changed since v1? I don't see anything?
Nothing in this patch but there is a v2 of the first patch in this
series, so had to resend this patch with a v2.
OK. You didn't send patch 1 to the this list though, so I only saw it on lkml.
Please don't do that in future.
quoted
You also missed my Reviewed-by :)
Sincere apologies for the oversight. Maintainers, could you please add
this Reviewed-by tag when picking this up?

Reviewed-by: Stewart Smith <redacted>
For future reference patchwork will catch these tags automatically. So if you
have forgotten to add them you can always reply to your own patch like you have
here and patchwork will detect them.

eg:

http://patchwork.ozlabs.org/patch/431648/mbox/

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help