From patchwork Fri Aug 9 16:27:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suman Anna X-Patchwork-Id: 11087253 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D7E9C14D5 for ; Fri, 9 Aug 2019 16:27:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C4CA1201BC for ; Fri, 9 Aug 2019 16:27:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B9162201F5; Fri, 9 Aug 2019 16:27:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 512CF203B9 for ; Fri, 9 Aug 2019 16:27:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=y8PK04dcNBRcsyGKiTmYc71Tn/pYcGEP8RsPuNcColk=; b=MUGnT3m6R6/xTC tmyELPqnomPMQJ40QnLDy/6cJfV0l6edesMarznvOXN5qmesQZoA+62TwHe67Szm5j9ewIeYxWqic KGxCT8PG5kDWqBJpaBIlVRDMitfhjg671icetqHL5BmWyTYocLDIZku9yFpPn+8aoOYxvfy5sAYfd Nv+pvY06dHB+sjWv0VgX3smHlIyckLG1rH45n4U5Pf8MpfwCyrZm5uP+14NXF7MCZk/1WUDbs7339 ic0NJzB7O5s2Ego5BK884/qmy5Hg1wzpu3e7PG9rJ35MdFFyFT6bJIwUhkXkkDB+4EG5QHZk7PuW8 6/+RMnOIwTL24vgeTWwQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hw7jf-0000rh-MS; Fri, 09 Aug 2019 16:27:23 +0000 Received: from fllv0016.ext.ti.com ([198.47.19.142]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hw7jb-0000ql-Qm for linux-arm-kernel@lists.infradead.org; Fri, 09 Aug 2019 16:27:21 +0000 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id x79GRHmd008862; Fri, 9 Aug 2019 11:27:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1565368037; bh=ycgZGu5jizhkdNlgseKrh0xuvw11PVPMLsg9Kj5tN+w=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=ybXgvvzX349Gw1IsgaEQY0uV4oCn6ib/HczFWW7kF1QJ4xMNBF1QT/Fi8jo8LX5B9 oq1E/oPW3fqup2kSp3TKnbKqh5tl4spWMvv5FvvAjILqNo2dGRY/QPBkt495Axx2n/ OnDwGeBqfCLJ76FotwO1fSr9+XU5089WJlYyj0/k= Received: from DLEE115.ent.ti.com (dlee115.ent.ti.com [157.170.170.26]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x79GRHR5029802 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 9 Aug 2019 11:27:17 -0500 Received: from DLEE105.ent.ti.com (157.170.170.35) by DLEE115.ent.ti.com (157.170.170.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Fri, 9 Aug 2019 11:27:17 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE105.ent.ti.com (157.170.170.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Fri, 9 Aug 2019 11:27:17 -0500 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id x79GRHlg092929; Fri, 9 Aug 2019 11:27:17 -0500 Received: from localhost (irmo.dhcp.ti.com [128.247.58.153]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id x79GRGZ10540; Fri, 9 Aug 2019 11:27:16 -0500 (CDT) From: Suman Anna To: Bjorn Andersson , Ohad Ben-Cohen Subject: [PATCH 1/2] samples/rpmsg: Replace print_hex_dump() with print_hex_dump_debug() Date: Fri, 9 Aug 2019 11:27:09 -0500 Message-ID: <20190809162710.823-2-s-anna@ti.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190809162710.823-1-s-anna@ti.com> References: <20190809162710.823-1-s-anna@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190809_092719_926097_A85CF8D5 X-CRM114-Status: UNSURE ( 9.94 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Replace the raw print_hex_dump() call in the rpmsg_sample_cb() function with the equivalent print_hex_dump_debug() better suited for dynamic debug. This switch allows flexibility of controlling this trace through dynamic debug when enabled. Signed-off-by: Suman Anna --- samples/rpmsg/rpmsg_client_sample.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/rpmsg/rpmsg_client_sample.c b/samples/rpmsg/rpmsg_client_sample.c index 2a0695573b47..b9a99e621a5c 100644 --- a/samples/rpmsg/rpmsg_client_sample.c +++ b/samples/rpmsg/rpmsg_client_sample.c @@ -29,8 +29,8 @@ static int rpmsg_sample_cb(struct rpmsg_device *rpdev, void *data, int len, dev_info(&rpdev->dev, "incoming msg %d (src: 0x%x)\n", ++idata->rx_count, src); - print_hex_dump(KERN_DEBUG, __func__, DUMP_PREFIX_NONE, 16, 1, - data, len, true); + print_hex_dump_debug(__func__, DUMP_PREFIX_NONE, 16, 1, data, len, + true); /* samples should not live forever */ if (idata->rx_count >= MSG_LIMIT) { From patchwork Fri Aug 9 16:27:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suman Anna X-Patchwork-Id: 11087261 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 521A514D5 for ; Fri, 9 Aug 2019 16:27:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3F080201BC for ; Fri, 9 Aug 2019 16:27:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 339D9201BD; Fri, 9 Aug 2019 16:27:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D521D2022B for ; Fri, 9 Aug 2019 16:27:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Nt7Z/LEuACRz0/yy96x5U1+wY+e0N1O0IqhuILkhMRM=; b=F6xTzeZUqQRLd9 fPPFrnhomF6Z/iAhBZxG9FcIpUqO9kJnxu9Dic0WV4PKEHROEopRfBU+1Xw0B1HWU/916yLvT6H1F anfxPl+RvcOzduscBXMKL9tJl3Z5THG/bA8NWdPNZ7aYvdHspxJTN+QcGGmbu28k48KdU/8susx8g MIZ6rFwuXPCt8LsiSGADdqIVm3zFMJrfCisN5Ya+PuZfgKtxDoQHPIHu4I6EcMctGIAo2InXP2HKT aszbg7wOe49gUTG7MeIUg+YbSRRs0UNSrOu98YrqmZe0eQVxRH12u5RVOcqdGG/+II10yfLJNvjkX MGU6dbCReAhLORZ3J4yA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hw7jw-00017W-Af; Fri, 09 Aug 2019 16:27:40 +0000 Received: from lelv0143.ext.ti.com ([198.47.23.248]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hw7jc-0000qm-DN for linux-arm-kernel@lists.infradead.org; Fri, 09 Aug 2019 16:27:21 +0000 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x79GRIaX068444; Fri, 9 Aug 2019 11:27:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1565368038; bh=hejhV7p35tABFvLqhdiGyN6o5tkE6x3rXXh80KuLZxc=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=olyPnxjTYspFa2lTlq6wq3nFOp8orHB0zNOLMdX60uTyyibXGhVj1omuuYp35mu6K rAp4IyJkbhbO74Iz3K3Xj+jex+dGtlD0KaY+OO+xfMwgtpIL5khaiGFavroPKk+0aF S+1KZMEVsl4Pw2U3IysD3WZbc4JwLdEB4N7CVOAw= Received: from DLEE114.ent.ti.com (dlee114.ent.ti.com [157.170.170.25]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x79GRID0035097 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 9 Aug 2019 11:27:18 -0500 Received: from DLEE103.ent.ti.com (157.170.170.33) by DLEE114.ent.ti.com (157.170.170.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Fri, 9 Aug 2019 11:27:18 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Fri, 9 Aug 2019 11:27:18 -0500 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id x79GRIqC032436; Fri, 9 Aug 2019 11:27:18 -0500 Received: from localhost (irmo.dhcp.ti.com [128.247.58.153]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id x79GRIZ10563; Fri, 9 Aug 2019 11:27:18 -0500 (CDT) From: Suman Anna To: Bjorn Andersson , Ohad Ben-Cohen Subject: [PATCH 2/2] samples/rpmsg: Introduce a module parameter for message count Date: Fri, 9 Aug 2019 11:27:10 -0500 Message-ID: <20190809162710.823-3-s-anna@ti.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190809162710.823-1-s-anna@ti.com> References: <20190809162710.823-1-s-anna@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190809_092720_528812_D724B1FD X-CRM114-Status: GOOD ( 12.96 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The current rpmsg_client_sample uses a fixed number of messages to be sent to each instance. This is currently set at 100. Introduce an optional module parameter 'count' so that the number of messages to be exchanged can be made flexible. Signed-off-by: Suman Anna --- samples/rpmsg/rpmsg_client_sample.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/samples/rpmsg/rpmsg_client_sample.c b/samples/rpmsg/rpmsg_client_sample.c index b9a99e621a5c..ae5081662283 100644 --- a/samples/rpmsg/rpmsg_client_sample.c +++ b/samples/rpmsg/rpmsg_client_sample.c @@ -14,7 +14,9 @@ #include #define MSG "hello world!" -#define MSG_LIMIT 100 + +static int count = 100; +module_param(count, int, 0644); struct instance_data { int rx_count; @@ -33,7 +35,7 @@ static int rpmsg_sample_cb(struct rpmsg_device *rpdev, void *data, int len, true); /* samples should not live forever */ - if (idata->rx_count >= MSG_LIMIT) { + if (idata->rx_count >= count) { dev_info(&rpdev->dev, "goodbye!\n"); return 0; }