]> rtime.felk.cvut.cz Git - zynq/linux.git/commitdiff
rpmsg: Only dump rpmsg if DEBUG is defined
authorWendy Liang <jliang@xilinx.com>
Wed, 14 Sep 2016 16:19:31 +0000 (09:19 -0700)
committerMichal Simek <michal.simek@xilinx.com>
Thu, 13 Oct 2016 12:08:57 +0000 (14:08 +0200)
RPMSG always dump received messages to kernel
log buffer. It impacts rpmsg performance, and if
there are rpmsg keeps running, it quickly fills up
the log buffer, you will only see rpmsg when you run
dmesg.

This patch is to only dump messages if you define DEBUG.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/rpmsg/virtio_rpmsg_bus.c

index 9e9289914c1d253a6a7d65dc32d858bd851b9466..d3300e63eeea08896589232aad2fbe15b2ed775a 100644 (file)
@@ -783,8 +783,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);
+#ifdef DEBUG
        print_hex_dump(KERN_DEBUG, "rpmsg_virtio TX: ", DUMP_PREFIX_NONE, 16, 1,
                                        msg, sizeof(*msg) + msg->len, true);
+#endif
 
        rpmsg_msg_sg_init(vrp, &sg, msg, sizeof(*msg) + len);
 
@@ -820,8 +822,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);
+#ifdef DEBUG
        print_hex_dump(KERN_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