* [PATCH] rpmsg: reduce rpmsg_virtio verbosity
@ 2013-10-03 18:36 David Cohen
2013-10-16 16:15 ` David Cohen
2014-02-24 15:11 ` Ohad Ben-Cohen
0 siblings, 2 replies; 4+ messages in thread
From: David Cohen @ 2013-10-03 18:36 UTC (permalink / raw)
To: ohad; +Cc: linux-kernel, Jocelyn Falempe, David Cohen
From: Jocelyn Falempe <jocelyn.falempe@intel.com>
rpmsg_virtio TX/RX messages are very verbose, overflowing kernel printk
buffer. This patch makes the guilty print_hex_dump()'s to act as
dev_dbg() and do nothing in case neither DEBUG nor CONFIG_DYNAMIC_DEBUG
are defined.
Signed-off-by: Jocelyn Falempe <jocelyn.falempe@intel.com>
Signed-off-by: David Cohen <david.a.cohen@linux.intel.com>
---
drivers/rpmsg/virtio_rpmsg_bus.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/rpmsg/virtio_rpmsg_bus.c b/drivers/rpmsg/virtio_rpmsg_bus.c
index b6135d4..e7c5927 100644
--- a/drivers/rpmsg/virtio_rpmsg_bus.c
+++ b/drivers/rpmsg/virtio_rpmsg_bus.c
@@ -749,8 +749,10 @@ int rpmsg_send_offchannel_raw(struct rpmsg_channel *rpdev, u32 src, u32 dst,
dev_dbg(dev, "TX From 0x%x, To 0x%x, Len %d, Flags %d, Reserved %d\n",
msg->src, msg->dst, msg->len,
msg->flags, msg->reserved);
- print_hex_dump(KERN_DEBUG, "rpmsg_virtio TX: ", DUMP_PREFIX_NONE, 16, 1,
+#if defined(CONFIG_DYNAMIC_DEBUG) || defined(DEBUG)
+ print_hex_dump_debug("rpmsg_virtio TX: ", DUMP_PREFIX_NONE, 16, 1,
msg, sizeof(*msg) + msg->len, true);
+#endif
sg_init_one(&sg, msg, sizeof(*msg) + len);
@@ -786,8 +788,10 @@ static int rpmsg_recv_single(struct virtproc_info *vrp, struct device *dev,
dev_dbg(dev, "From: 0x%x, To: 0x%x, Len: %d, Flags: %d, Reserved: %d\n",
msg->src, msg->dst, msg->len,
msg->flags, msg->reserved);
- print_hex_dump(KERN_DEBUG, "rpmsg_virtio RX: ", DUMP_PREFIX_NONE, 16, 1,
+#if defined(CONFIG_DYNAMIC_DEBUG) || defined(DEBUG)
+ print_hex_dump_debug("rpmsg_virtio RX: ", DUMP_PREFIX_NONE, 16, 1,
msg, sizeof(*msg) + msg->len, true);
+#endif
/*
* We currently use fixed-sized buffers, so trivially sanitize
--
1.8.4.rc3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] rpmsg: reduce rpmsg_virtio verbosity
2013-10-03 18:36 [PATCH] rpmsg: reduce rpmsg_virtio verbosity David Cohen
@ 2013-10-16 16:15 ` David Cohen
2013-11-12 21:48 ` David Cohen
2014-02-24 15:11 ` Ohad Ben-Cohen
1 sibling, 1 reply; 4+ messages in thread
From: David Cohen @ 2013-10-16 16:15 UTC (permalink / raw)
To: ohad; +Cc: linux-kernel, Jocelyn Falempe
On 10/03/2013 11:36 AM, David Cohen wrote:
> From: Jocelyn Falempe <jocelyn.falempe@intel.com>
>
> rpmsg_virtio TX/RX messages are very verbose, overflowing kernel printk
> buffer. This patch makes the guilty print_hex_dump()'s to act as
> dev_dbg() and do nothing in case neither DEBUG nor CONFIG_DYNAMIC_DEBUG
> are defined.
>
> Signed-off-by: Jocelyn Falempe <jocelyn.falempe@intel.com>
> Signed-off-by: David Cohen <david.a.cohen@linux.intel.com>
> ---
Ping :)
Comments here?
Br, David Cohen
> drivers/rpmsg/virtio_rpmsg_bus.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/rpmsg/virtio_rpmsg_bus.c b/drivers/rpmsg/virtio_rpmsg_bus.c
> index b6135d4..e7c5927 100644
> --- a/drivers/rpmsg/virtio_rpmsg_bus.c
> +++ b/drivers/rpmsg/virtio_rpmsg_bus.c
> @@ -749,8 +749,10 @@ int rpmsg_send_offchannel_raw(struct rpmsg_channel *rpdev, u32 src, u32 dst,
> dev_dbg(dev, "TX From 0x%x, To 0x%x, Len %d, Flags %d, Reserved %d\n",
> msg->src, msg->dst, msg->len,
> msg->flags, msg->reserved);
> - print_hex_dump(KERN_DEBUG, "rpmsg_virtio TX: ", DUMP_PREFIX_NONE, 16, 1,
> +#if defined(CONFIG_DYNAMIC_DEBUG) || defined(DEBUG)
> + print_hex_dump_debug("rpmsg_virtio TX: ", DUMP_PREFIX_NONE, 16, 1,
> msg, sizeof(*msg) + msg->len, true);
> +#endif
>
> sg_init_one(&sg, msg, sizeof(*msg) + len);
>
> @@ -786,8 +788,10 @@ static int rpmsg_recv_single(struct virtproc_info *vrp, struct device *dev,
> dev_dbg(dev, "From: 0x%x, To: 0x%x, Len: %d, Flags: %d, Reserved: %d\n",
> msg->src, msg->dst, msg->len,
> msg->flags, msg->reserved);
> - print_hex_dump(KERN_DEBUG, "rpmsg_virtio RX: ", DUMP_PREFIX_NONE, 16, 1,
> +#if defined(CONFIG_DYNAMIC_DEBUG) || defined(DEBUG)
> + print_hex_dump_debug("rpmsg_virtio RX: ", DUMP_PREFIX_NONE, 16, 1,
> msg, sizeof(*msg) + msg->len, true);
> +#endif
>
> /*
> * We currently use fixed-sized buffers, so trivially sanitize
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] rpmsg: reduce rpmsg_virtio verbosity
2013-10-16 16:15 ` David Cohen
@ 2013-11-12 21:48 ` David Cohen
0 siblings, 0 replies; 4+ messages in thread
From: David Cohen @ 2013-11-12 21:48 UTC (permalink / raw)
To: ohad; +Cc: linux-kernel, Jocelyn Falempe
Hi,
On 10/16/2013 09:15 AM, David Cohen wrote:
> On 10/03/2013 11:36 AM, David Cohen wrote:
>> From: Jocelyn Falempe <jocelyn.falempe@intel.com>
>>
>> rpmsg_virtio TX/RX messages are very verbose, overflowing kernel printk
>> buffer. This patch makes the guilty print_hex_dump()'s to act as
>> dev_dbg() and do nothing in case neither DEBUG nor CONFIG_DYNAMIC_DEBUG
>> are defined.
>>
>> Signed-off-by: Jocelyn Falempe <jocelyn.falempe@intel.com>
>> Signed-off-by: David Cohen <david.a.cohen@linux.intel.com>
>> ---
>
> Ping :)
> Comments here?
Ping again :)
>
> Br, David Cohen
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] rpmsg: reduce rpmsg_virtio verbosity
2013-10-03 18:36 [PATCH] rpmsg: reduce rpmsg_virtio verbosity David Cohen
2013-10-16 16:15 ` David Cohen
@ 2014-02-24 15:11 ` Ohad Ben-Cohen
1 sibling, 0 replies; 4+ messages in thread
From: Ohad Ben-Cohen @ 2014-02-24 15:11 UTC (permalink / raw)
To: David Cohen; +Cc: linux-kernel@vger.kernel.org, Jocelyn Falempe
Hi David,
Sorry for the late response.
On Thu, Oct 3, 2013 at 9:36 PM, David Cohen
<david.a.cohen@linux.intel.com> wrote:
> From: Jocelyn Falempe <jocelyn.falempe@intel.com>
>
> rpmsg_virtio TX/RX messages are very verbose, overflowing kernel printk
> buffer. This patch makes the guilty print_hex_dump()'s to act as
> dev_dbg() and do nothing in case neither DEBUG nor CONFIG_DYNAMIC_DEBUG
> are defined.
>
> Signed-off-by: Jocelyn Falempe <jocelyn.falempe@intel.com>
> Signed-off-by: David Cohen <david.a.cohen@linux.intel.com>
This sounds like a good thing to do, but I wonder if it should be
implemented in a more generic way, so other users of
print_hex_dump_debug can benefit from this as well?
Thanks,
Ohad.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-02-24 15:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-03 18:36 [PATCH] rpmsg: reduce rpmsg_virtio verbosity David Cohen
2013-10-16 16:15 ` David Cohen
2013-11-12 21:48 ` David Cohen
2014-02-24 15:11 ` Ohad Ben-Cohen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox