From patchwork Thu Jun 14 14:03:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 10463373 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9F967600D0 for ; Thu, 14 Jun 2018 06:06:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8F3A228A1E for ; Thu, 14 Jun 2018 06:06:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8164C28AB8; Thu, 14 Jun 2018 06:06:22 +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=-1.0 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DATE_IN_FUTURE_06_12, DKIM_SIGNED, DKIM_VALID, MAILING_LIST_MULTI 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 2E08A28A1E for ; Thu, 14 Jun 2018 06:06:22 +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=3RTFZwHGi/p/NEQm6Wc5y0R0nvhYArfpmujuzQj+lmw=; b=Uk/fHB4Xrp0j/J rED9qApEBDrUp+BowmLUpn8YwIQAIOYMBeSC21rVCna63LnLjoG4Sdcls24OTM2OAZ6iL27f6vOnO H5T+sAg9xiWI91Yt+dApUnsmHPDTIg0lY0VTwmja4rhtGc8MiN6l5Ts7lyr4gKDBlYTaYP5Nheam3 e7kPcdNszAetHIoeLsH6/B6Dwc2kOZERq8AH5DBeaU18r20IL0X73rcdgr1qCq+c0fmBj2/FCl6En sWD9CO0DtMT9J0ct6n/sJcR7MzV1Dn142RSIiLPue91+9Xa2mlFfVBGiJ5aa2SOUBj3w3vPJ/5lfU 8r/INQUf0q/Prt/2QnwQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fTLOl-0002WT-0D; Thu, 14 Jun 2018 06:06:19 +0000 Received: from mail-ve1eur01on0080.outbound.protection.outlook.com ([104.47.1.80] helo=EUR01-VE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fTLNJ-0000Cc-GB for linux-arm-kernel@lists.infradead.org; Thu, 14 Jun 2018 06:04:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pzXj5DspRIP00rNRShWIPH0cgSdGIn/3XWRtqDe1EZk=; b=f8ma58c6eBMgoWtnxskZ0Y5w2qF+fXnY9NnZIkCc/I6cGTE5mcFPJ4b1++S+Zsg8w+2dBU0cWo7BK/GTtZM9otRnjhVAACRB4FSvqizjREU5b7T5XkVArHy2Y+ElMkCwGyFST92I2z5121wDOklgkypn6XreL5+1xFHBMXmcnrU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=yibin.gong@nxp.com; Received: from robin-OptiPlex-790.ap.freescale.net (119.31.174.66) by AM5PR04MB3219.eurprd04.prod.outlook.com (2603:10a6:206:7::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.863.16; Thu, 14 Jun 2018 06:04:24 +0000 From: Robin Gong To: vkoul@kernel.org, s.hauer@pengutronix.de, l.stach@pengutronix.de, dan.j.williams@intel.com, gregkh@linuxfoundation.org, jslaby@suse.com Subject: [PATCH v4 5/7] dmaengine: imx-sdma: remove the maximum limitation for bd numbers Date: Thu, 14 Jun 2018 22:03:00 +0800 Message-Id: <1528984982-5074-6-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1528984982-5074-1-git-send-email-yibin.gong@nxp.com> References: <1528984982-5074-1-git-send-email-yibin.gong@nxp.com> MIME-Version: 1.0 X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: HK0PR03CA0014.apcprd03.prod.outlook.com (2603:1096:203:2e::26) To AM5PR04MB3219.eurprd04.prod.outlook.com (2603:10a6:206:7::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 1c97dee5-756c-488a-a236-08d5d1bcaffd X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(711020)(2017052603328)(7153060)(7193020); SRVR:AM5PR04MB3219; X-Microsoft-Exchange-Diagnostics: 1; AM5PR04MB3219; 3:1Yv/eT4WdQQOGkfWjQi/7Oxlmvq0bSzFnEMvsqd0kfE1IlWuH3YR7b5ufN/AVlnfFhCUPMWGZ2b5zvGRo9K/GNqSbg5S5XZya/UXCQ0sCOczR1oxy0MFSYYtd0ZZ+ZcpdIOm/OIR/K4T7/GjtufcP8/P7dr/vesLD10AQijN5TPOdNRnczopHvGPsHTBtKFUX18QOHddC5Htu5XS9YGKRGFu+4w3PC5rIDXU59sgzCfnE4I61Q7QUNAuME/UPe+I; 25:Ya3jHtB6PMJEyE7zfMqOG21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K4X2yewlqIYNuWzRWtEI0pg/MOL65fGwPFRbuDZPPiI4lOhe; 4:T5yAN7XYd4Cz3b4oDngZBacc7h4DRU4VldAJ6FjsW9f/aziMteYsHRdYf2BDRGMEv6+EgjOtrI8JEB+O0c17B5/APh0+ey4WSZD2JX/BjUVQ7NwdNidUCXTIb260O+1QQju+Qf/KXxEpPyEmwktO/fE+ec1BNmQ58hjRSlpDbBE03T8CdsBW7fHj3utMrZqPfD4fpjPb+KhHQsH+w9rxXBcXdVtxCcYdXyh9X+z3d+lNT3ca3JNneu7+3L49EnrolnPNfKc04XIk5m9nVu9nZGhk5KDi1wkfSvfpWgfpAa+1dbfDI9GRUBZaRO6fnvKn X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(3231254)(944501410)(52105095)(93006095)(93001095)(10201501046)(6055026)(149027)(150027)(6041310)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123558120)(20161123562045)(6072148)(201708071742011)(7699016); SRVR:AM5PR04MB3219; BCL:0; PCL:0; RULEID:; SRVR:AM5PR04MB3219; X-Forefront-PRVS: 0703B549E4 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(396003)(366004)(346002)(39380400002)(39860400002)(199004)(189003)(68736007)(478600001)(7736002)(8936002)(305945005)(66066001)(50226002)(7416002)(86362001)(6512007)(3846002)(6116002)(47776003)(316002)(16586007)(8676002)(81166006)(16526019)(26005)(186003)(81156014)(386003)(6506007)(2906002)(52116002)(76176011)(51416003)(36756003)(6486002)(5660300001)(4326008)(50466002)(106356001)(25786009)(48376002)(105586002)(97736004)(6666003)(446003)(486006)(476003)(53936002)(2616005)(11346002)(956004); DIR:OUT; SFP:1101; SCL:1; SRVR:AM5PR04MB3219; H:robin-OptiPlex-790.ap.freescale.net; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM5PR04MB3219; 23:K6ujktFAylohkZFlRmv/GUN5AiQUHN3gu2uKHc4Pg?= =?us-ascii?Q?SFKbAToqNxMPLLmRewJr9cvI7gyHhag6peuOkIvL9DmcYmYsPMWruLXgPAbD?= =?us-ascii?Q?pZkWM4EUygG+fa9PPtVKkcFcCiRDIwTt79KHUiSz7NIGgVWc7w8nl8uFQwbY?= =?us-ascii?Q?guNJF2PvXEyvrUaj9kabwQWon06kfgtTHNcZm9n2au2DOMt0rXr/Bc9ELa1M?= =?us-ascii?Q?TZ42gBhQ7F8sc6vS72qcsOaqt7ZJIXX0Clefgx2MZ9YETqdT104rA8B3cBWC?= =?us-ascii?Q?R/Pre3ekc9neUyY5lXwUfDCKool3gGSqbhJDZphBYqvCEaF8k0mp80kKsC8z?= =?us-ascii?Q?pxcsagkZvdzkuVnCaeUv7z53OGtQK3+pWqltWAZZGbNYPBWuIc2SJwVzKUbP?= =?us-ascii?Q?Ltt8boowEk5dou3Vz69rCAot+E3SSZSH6wzzkcB839hskEai/RvBoe0PLb4B?= =?us-ascii?Q?5qT3OcFA+Qh2IdM9uiAlAQYlF+1KVr3IA5bC/4EJ6A8kmNwx3Ypxg9tHKoqr?= =?us-ascii?Q?Uf5BRorFtlCoEjxsUT7jWzQ6oSUGMrYGC3pTOjGT55vR9BNNKI+7IQ1M4XhB?= =?us-ascii?Q?v4xogE0Q9FEnZ3JbQ/aNpHrG2EihHLCyFILBmu2d2PQdQOX5PwOzy7kOiMm0?= =?us-ascii?Q?CH3UCMWdYdsVuQdD26eACzHyiC+KX9xgKcuiiGB7xwTwVT8ljlKgUi3YXSNG?= =?us-ascii?Q?hFN34ge84gGtrUq1gMxk3Oxgf/3tbW5saVU82vRVkqH/nbjA49bS2FM/DQ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75TdDPpA/9QZD3nauQTmEpB09d9LJ3yBFu1WnCcWYSSY1A9tVtj09zgcCAMscSBAz+8yYipnsLUb4bhWu18g/lN1UhJvIqi4G6yFSl8WyjThvap8DZVEMxvPpPi8CA0WegbUDBbKGpcSyZPZjoWN8Ekv2cy/1dsSbYPaP7a8dRPnPGVTrP92cbBEj6A8kbZ7ngd0wacvhYUow==; 5:nckzip0lmU+mQqjDTEzQtYWrB36gv3rszrHzWwX8tcsovl1elgc4fQ8lr4/IXL5zJuSd9Li+alOqFdSDWMC4poYX7H0R3kbbyMKJPbx5D01v77p0EB1xlxAw+eTFM3nuqJMt8M9iGdf1Bkl5xMJEDxjtHId8EHeAC8OuGKObwuU=; 24:frYJUD2tg4lFT0u2HwemGkuoo0JRRFaxXNgaK5iuPKCry/fGCGx7LUUZCvp+bmYeIFRApOQR+OrqswkAutfmg2QDTqQAfEG+4BjZMWZCZIQ= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM5PR04MB3219; 7:vLPKGusHjYWuZFT/8KZBgikFxSh7qpYRUF0mRG83fcuPpXVhnPF8NQtsGlTPaAfOXDodOGbTTclSBMgc1H/UtwmeljmnvER6Dn1tLlQ7zIKFs0lvDpimM2JrC1CGZGDKUQ8ImcegX7+nFpiN/E8DpESO0AM44FZGMm7H+COHVFNkji+Pu/4tRXC5/wCk2tBawgZNTjD+OZbWW33hsfpntxRk1ohoQdxKMlK31fsNI6rQQvpCk4MJoU9V2tNCtGYB X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jun 2018 06:04:24.6701 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1c97dee5-756c-488a-a236-08d5d1bcaffd X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR04MB3219 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180613_230449_557995_4B8AE49E X-CRM114-Status: GOOD ( 11.19 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dmaengine@vger.kernel.org, linux-imx@nxp.com, linux-kernel@vger.kernel.org, linux-serial@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 No this limitation now after virtual dma used since bd is allocated dynamically instead of static. Signed-off-by: Robin Gong --- drivers/dma/imx-sdma.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index 27b76eb..f56226f 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -292,7 +292,6 @@ struct sdma_context_data { u32 scratch7; } __attribute__ ((packed)); -#define NUM_BD (int)(PAGE_SIZE / sizeof(struct sdma_buffer_descriptor)) struct sdma_engine; @@ -1297,13 +1296,6 @@ static struct dma_async_tx_descriptor *sdma_prep_slave_sg( if (ret) goto err_bd_out; - if (sg_len > NUM_BD) { - dev_err(sdma->dev, "SDMA channel %d: maximum number of sg exceeded: %d > %d\n", - channel, sg_len, NUM_BD); - ret = -EINVAL; - goto err_bd_out; - } - desc->chn_count = 0; for_each_sg(sgl, sg, sg_len, i) { struct sdma_buffer_descriptor *bd = &desc->bd[i]; @@ -1413,12 +1405,6 @@ static struct dma_async_tx_descriptor *sdma_prep_dma_cyclic( if (ret) goto err_bd_out; - if (num_periods > NUM_BD) { - dev_err(sdma->dev, "SDMA channel %d: maximum number of sg exceeded: %d > %d\n", - channel, num_periods, NUM_BD); - goto err_bd_out; - } - if (period_len > 0xffff) { dev_err(sdma->dev, "SDMA channel %d: maximum period size exceeded: %zu > %d\n", channel, period_len, 0xffff);