From patchwork Fri Apr 22 01:50:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 8905111 Return-Path: X-Original-To: patchwork-dmaengine@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 39375BF29F for ; Fri, 22 Apr 2016 01:50:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F03132026F for ; Fri, 22 Apr 2016 01:50:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6A80F2025A for ; Fri, 22 Apr 2016 01:50:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751920AbcDVBuP (ORCPT ); Thu, 21 Apr 2016 21:50:15 -0400 Received: from relmlor3.renesas.com ([210.160.252.173]:14641 "EHLO relmlie2.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751594AbcDVBuN (ORCPT ); Thu, 21 Apr 2016 21:50:13 -0400 Received: from unknown (HELO relmlir1.idc.renesas.com) ([10.200.68.151]) by relmlie2.idc.renesas.com with ESMTP; 22 Apr 2016 10:50:08 +0900 Received: from relmlac2.idc.renesas.com (relmlac2.idc.renesas.com [10.200.69.22]) by relmlir1.idc.renesas.com (Postfix) with ESMTP id B31FB4802C; Fri, 22 Apr 2016 10:50:08 +0900 (JST) Received: by relmlac2.idc.renesas.com (Postfix, from userid 0) id 9AA182806E; Fri, 22 Apr 2016 10:50:08 +0900 (JST) Received: from relmlac2.idc.renesas.com (localhost [127.0.0.1]) by relmlac2.idc.renesas.com (Postfix) with ESMTP id 94D022806D; Fri, 22 Apr 2016 10:50:08 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac2.idc.renesas.com with ESMTP id LAF12865; Fri, 22 Apr 2016 10:50:08 +0900 X-IronPort-AV: E=Sophos;i="5.22,559,1449500400"; d="scan'";a="209462720" Received: from mail-pu1apc01lp0016.outbound.protection.outlook.com (HELO APC01-PU1-obe.outbound.protection.outlook.com) ([65.55.88.16]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA; 22 Apr 2016 10:50:07 +0900 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesasgroup.onmicrosoft.com; s=selector1-renesas-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=B98c5RKBP7F9odgNICOwxGKQ/nQ6qfB+ndIUaTrwz+A=; b=VLctICRctvxDYwfL9Y+pBPwXiodsMUwTqNySjAyxZ8uKS1zUnf1HdHBQct+HPrQ91wT50ngeNM8ddRXhYa61lx1H+Mkk33QcKgLZoskWdbYjKgXFLvZ/8vTvWo5kljSALOeyFPXYVO6nIBMFcUrCEm5Yje7clbfAhaN/wIZuypQ= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none; intel.com; dmarc=none action=none header.from=renesas.com; Received: from morimoto-PC.renesas.com (211.11.155.144) by SG2PR06MB1709.apcprd06.prod.outlook.com (10.167.82.139) with Microsoft SMTP Server (TLS) id 15.1.466.19; Fri, 22 Apr 2016 01:50:04 +0000 Message-ID: <87r3dywh6u.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH] dma: rcar-dmac: use list_add() on rcar_dmac_desc_put() User-Agent: Wanderlust/2.15.9 Emacs/24.3 Mule/6.0 To: Vinod Koul , Geert Uytterhoeven , Laurent Pinchart CC: sakato , OSD2 ML , , In-Reply-To: <1645988.6VIRltF7C5@avalon> References: <8760w7xq3n.wl%kuninori.morimoto.gx@renesas.com> <874mbrxnft.wl%kuninori.morimoto.gx@renesas.com> <1645988.6VIRltF7C5@avalon> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Date: Fri, 22 Apr 2016 01:50:04 +0000 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: TY1PR01CA0008.jpnprd01.prod.outlook.com (10.161.131.146) To SG2PR06MB1709.apcprd06.prod.outlook.com (10.167.82.139) X-MS-Office365-Filtering-Correlation-Id: 694837e2-d255-4687-28d9-08d36a506d7e X-Microsoft-Exchange-Diagnostics: 1; SG2PR06MB1709; 2:kBOufP2wukPxqnn+1a/QJrHjyf/MSp1t4acbyPumKW6QEnvY/1qsXceho32aaDBO19MBg50Q8iOCcudJQn9xnBBilEHDg2tXDxjygzFBiwZf+XNT12maoWmiW+fTzbpb7IS77hStcCZ5GqqSAdf+3dCXtmRin4fEhtaRKIUpCuS0mmGTfYChOeJamMBKfGiV; 3:vMCZpYseq7DJm2rhwuvuuNFSEbFpp3XoeL+HhHbXaNGKMI9iexR2/JLJi/qK/z7Sq6gkQjzM+DeCLfANot1tSLlLfiZhmCBsWfh/N0+3EwADIihguSH7+BmWvejv4znc X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:SG2PR06MB1709; X-Microsoft-Exchange-Diagnostics: 1; SG2PR06MB1709; 25:9Cust23XIvOpvAgfso7wJ1TV5FtPi0/DM0gMa/yyfj7Niv/HHUwUFcM5CbHmDUpu2ZttZP/2uCwVKTWGjWYToBC2vrNpLlq7shOjXyqUPTBcUDbVvWlYhXY2GqWtnn/1JHOBI/ujomkMEv2OU+loJ3VPBwprzt3vTqwFKKqwhqsyD9FcXkXyOCeovbBG4Ly9OR8UOCmjljhBBQ5sdhFuO9XaYE5lqMCnZsB7D1cl/zOr51o6KvKo14qDZuASEycDRZnOIAgZfT8EV0KUWyZ5Isx5emvd/ncDhrUFjVCqAzvOIcTCW+NEkPbDWzA79yCTY4ubyG9GALe+3nvOdXrJ+bME89U+a2FrPFBzIXSap+qqCwlLVZCzc5ZNzL5GL1xmFjlL/X5y2gEbfV0ouD7zt0l4lpGVv1WzT+vTR+nfKm4cNip0qdtCHXA9Q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dWuYAXemSn+cPPVxOO90B8fZ+SIVUMvxlgNAnpLPWJq/cRDy/W1j7wQQc7/CVRHdXTKvime8J6IxXZyKa8e/KDH3++FwwxfGKF1BzuCLK43+pnefmx94gyE09N VJRUk= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(9101521026)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6055026); SRVR:SG2PR06MB1709; BCL:0; PCL:0; RULEID:; SRVR:SG2PR06MB1709; X-Forefront-PRVS: 0920602B08 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(229853001)(2950100001)(83506001)(5004730100002)(19580405001)(19580395003)(92566002)(77096005)(189998001)(66066001)(53416004)(42186005)(93886004)(76176999)(54356999)(50986999)(47776003)(4001350100001)(6116002)(1096002)(586003)(3846002)(23726003)(36756003)(5008740100001)(2906002)(33646002)(50466002)(81166005)(46406003)(4326007)(5001770100001)(86362001)(16060500001); DIR:OUT; SFP:1102; SCL:1; SRVR:SG2PR06MB1709; H:morimoto-PC.renesas.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SG2PR06MB1709; 23:MlepVQJVG496uJVugi6f/k3ACSs0Gtu+UYe1gFq9q?= =?us-ascii?Q?okWyOCXizBbYmNV81Nmm0R0qJL+Cyy10d6hsuZqcwahkFU7ZQZskH0uIlsW0?= =?us-ascii?Q?PJug+Trf9JTEPMcYJdPHjxrBrmDO230Q8R9oiYFDDXZHwyEQP16n2JcbJejA?= =?us-ascii?Q?burBf+U1wUhJUGFG82+6EGa00Y9W5IBcwM+7q96BFgAX3mUC+m6vK6JndyWE?= =?us-ascii?Q?p4Ex4BxRTj6hBhSveMNOyK1onGkMVlm/LKM9eNoZHf8Z38Rl55n9l2i57Pil?= =?us-ascii?Q?C/rwcIJCtxNsjQKAqQrW960M486Kjp3MM93fS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5Uy; 24:mIcjde/a9pfbIZ09eYYjOw2RC6rba/vAmkzNfsEM4Xq96G7NtwtCCLdBCgRXcs1fITQu1ur5X5adiTdCuq9d5rdmdCeMJUoyFpYys0pT27g=; 7:inIXcRqWNjuBqlHIGXUM9/XrrpnAgYTxKZIvZzExsj6F9Ss71L//3TCFVMw7YHXv1nSEiFTeosTG5nd1XNuNpYZBPvtZflznD6dL+mFVxJhmdoHOouRMsOlX6asJGnLmbtyr4MP26fvt8NR6eHpi7bWNJAPe7haPcaXF+HP5h7OgoBQjM7bxBY+VKV1i9VFwOkNonds/Y4HvbvDRHfKo9KdHPIcbAH67wzM3uIFHCcI=; 20:yuJ5W2rrxzerWft4IYL7J9+yMmzvIKVgLI9xHCWfA/dBGDVAyPs9wvP2hOtEN1Z7PdhOXzCYednw6iWAzyCfnp5E+qArikCITFAIi2namh8VBW+/M5XunEtimXc+tsOZdYS1Qpz/R8IREitCZWlbO7Shwfv+fvblyMvSyr+bQc8= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Apr 2016 01:50:04.9096 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR06MB1709 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Kuninori Morimoto Current rcar_dmac_desc_put() is using list_add_tail() in order to push used descriptor to list of free descriptors, and next DMA transfer try to reuse it from this list. But because it is using *_tail(), this reuse effect can't be obtained without using all of them. For a longer-term solution, we should allocate hardware descriptors using GFP_KERNEL instead of GFP_NOWAIT, but it is difficult today. This patch uses list_add() instead of list_add_tail() for short-term solution. Signed-off-by: Kuninori Morimoto --- drivers/dma/sh/rcar-dmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/sh/rcar-dmac.c b/drivers/dma/sh/rcar-dmac.c index 02b86c6..616c63a 100644 --- a/drivers/dma/sh/rcar-dmac.c +++ b/drivers/dma/sh/rcar-dmac.c @@ -519,7 +519,7 @@ static void rcar_dmac_desc_put(struct rcar_dmac_chan *chan, spin_lock_irqsave(&chan->lock, flags); list_splice_tail_init(&desc->chunks, &chan->desc.chunks_free); - list_add_tail(&desc->node, &chan->desc.free); + list_add(&desc->node, &chan->desc.free); spin_unlock_irqrestore(&chan->lock, flags); }