From patchwork Tue Nov 6 03:40:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 10669545 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 9493214E2 for ; Tue, 6 Nov 2018 03:41:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 854CE2A183 for ; Tue, 6 Nov 2018 03:41:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 78B112A189; Tue, 6 Nov 2018 03:41:14 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 211082A183 for ; Tue, 6 Nov 2018 03:41:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387438AbeKFNES (ORCPT ); Tue, 6 Nov 2018 08:04:18 -0500 Received: from mail-eopbgr80045.outbound.protection.outlook.com ([40.107.8.45]:37270 "EHLO EUR04-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2387450AbeKFNES (ORCPT ); Tue, 6 Nov 2018 08:04:18 -0500 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=d9rTtDYbiL7B8vl8dIg1hMsywgfV6CT5SUFuHUvESOc=; b=eA4BBthvT+UBsx/SDKUo0eAnH5YMTwpuQKysR/NanuBlrpNpaYM6fyRl67BSd1OhAcGW7X2hw4L2Fsw9IMFcOAkB+JkM533JM2qsjsf8JEjKz2cScbg09TaLJEtXQSRvWPBjnzm7yhMdvUUpieRTN737jwh2Dswqpj5HdoiJHSs= Received: from DB7PR04MB4538.eurprd04.prod.outlook.com (52.135.138.28) by DB7PR04MB5226.eurprd04.prod.outlook.com (20.176.236.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.21; Tue, 6 Nov 2018 03:40:37 +0000 Received: from DB7PR04MB4538.eurprd04.prod.outlook.com ([fe80::1d00:effc:853f:267]) by DB7PR04MB4538.eurprd04.prod.outlook.com ([fe80::1d00:effc:853f:267%3]) with mapi id 15.20.1294.032; Tue, 6 Nov 2018 03:40:37 +0000 From: Robin Gong To: "vkoul@kernel.org" , "l.stach@pengutronix.de" CC: "dmaengine@vger.kernel.org" , "linux-kernel@vger.kernel.org" , dl-linux-imx Subject: [PATCH v3 4/4] dmaengine: imx-sdma: use GFP_NOWAIT for dma descriptor allocations Thread-Topic: [PATCH v3 4/4] dmaengine: imx-sdma: use GFP_NOWAIT for dma descriptor allocations Thread-Index: AQHUdYJ7NPRe1R2FAUCQpmyE6px9sw== Date: Tue, 6 Nov 2018 03:40:37 +0000 Message-ID: <1541504525-25720-5-git-send-email-yibin.gong@nxp.com> References: <1541504525-25720-1-git-send-email-yibin.gong@nxp.com> In-Reply-To: <1541504525-25720-1-git-send-email-yibin.gong@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.7.4 x-clientproxiedby: HK0PR04CA0004.apcprd04.prod.outlook.com (2603:1096:203:36::16) To DB7PR04MB4538.eurprd04.prod.outlook.com (2603:10a6:5:35::28) authentication-results: spf=none (sender IP is ) smtp.mailfrom=yibin.gong@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [119.31.174.66] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DB7PR04MB5226;6:/5YnU1lUWk1P85ykz/nviQ04XfhwFbBEra8DPRRjAZHE8FqFjJA3TwsNHomeMQi2RzrIg0YkqKXfQNCZurYZtkGMT5aUN+zA2HuhDTCBo2npC4WINkVRuCJwDBMjzFBR9QWaKtG5jX+JX62jwzpln1TOCrNcNe8prRMyf5zPHPIQSSeyYhpgxMqp2BHi3/bbV7ZME9rBRcUXEvHp6ZcutYiJwUMXLZBC8RUVsXRTQW94ueYPE2ox1XtB/VoOVgaJp8zAPIVGTBCEpEPbEVd2bHUUw9u66h2poPJd5n5LbZf6oJjI9wdAqWrfuyoIQxkQSnrDr/Lpcsy1qAdyIA/vwBH6QTfMtIOFrpn1Eaq/zyPPZn5ESxRODQsIaC1r7kIIopw6HO/n4upHtAj0q14sm+N9QD3FKGqE94ntRj4tay0Boyw+PT4W341FrURfC/Rf4bCEEHD9CGaX/Iy/MaWQ5Q==;5:wLDq9E9YvFfK/mPj/qy72q/w0I2R20+iMRtsKc1EdWNrYWo5NHI64SQowBKfSMeM3o5bJKdyLstLquaPaxusDEE3acPN0w1SOCCeJK3dLce2/t0R1ys12MRngcZj6S5S0emH0G9XE11oTWRzEeI1TcEMn1xot8RoaYy7uC8ahpw=;7:oshJKcqhsX7tjSvzodD4W551D7EPzziIdiotHl2XGD6/zFfanYVCnDFv2IJHAm1EO97a1xvQFn1inqFUp5Zl04t9euw0brDPgcFzpMO6w0CAg5W2xKtCi8CM0W2MBXUOOyU0IA60weRsbjc8VC5TyA== x-ms-office365-filtering-correlation-id: a025e653-68c8-4bec-f4fe-08d643999d92 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020);SRVR:DB7PR04MB5226; x-ms-traffictypediagnostic: DB7PR04MB5226: 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)(5005006)(8121501046)(10201501046)(3002001)(3231382)(944501410)(52105095)(93006095)(93001095)(6055026)(148016)(149066)(150057)(6041310)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(20161123560045)(201708071742011)(7699051)(76991095);SRVR:DB7PR04MB5226;BCL:0;PCL:0;RULEID:;SRVR:DB7PR04MB5226; x-forefront-prvs: 0848C1A6AA x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(39860400002)(376002)(366004)(346002)(136003)(396003)(189003)(199004)(81166006)(54906003)(316002)(186003)(446003)(25786009)(478600001)(2501003)(71200400001)(6116002)(3846002)(2906002)(71190400001)(110136005)(99286004)(7736002)(11346002)(305945005)(6486002)(4326008)(476003)(86362001)(50226002)(6506007)(14444005)(486006)(6512007)(106356001)(36756003)(386003)(5660300001)(26005)(105586002)(256004)(2616005)(66066001)(102836004)(8936002)(68736007)(76176011)(53936002)(52116002)(6436002)(14454004)(8676002)(97736004)(81156014)(2900100001);DIR:OUT;SFP:1101;SCL:1;SRVR:DB7PR04MB5226;H:DB7PR04MB4538.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: jlUL/6X95PDp8fzB35DF/KAZchkMa7JLkeqgSDCSRc0dLuTasjL5WQwE+GXWGIAcMGjBMV8+7pP51cRuTA2rGkcn5of7lzm/S+HzK2TaLnI8R+Np9awnbWmpDRt4fK8pTXNkHxazOqKD7xcCBYllf0cq8F4IJgFAFF5n4nB0570lussEPWm3m4N0OOCXb4Zbma+E2aBfWe2p1j8jG0n6AsIEcU8lb+Ab/mUQ/+jv7kfjsvSIKyG1MbTPI7/D5woOwwz2EuUylYzq75Ak/QZvqf8fv/dQY+bAj1Xjq4ZtwRbM1Iri6fhyIVbLIEnA9oTRwppF3lpFvZdXtgOh1nQz2E6jHMpL6hzuVzTD4yQwsso= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a025e653-68c8-4bec-f4fe-08d643999d92 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Nov 2018 03:40:37.6698 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB5226 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Lucas Stach DMA buffer descriptors aren't allocated from atomic context, so they can use the less heavyweigth GFP_NOWAIT. Signed-off-by: Lucas Stach Signed-off-by: Robin Gong --- drivers/dma/imx-sdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index 03d46f1..cb1b44d 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -1214,7 +1214,7 @@ static int sdma_alloc_bd(struct sdma_desc *desc) int ret = 0; desc->bd = dma_zalloc_coherent(NULL, bd_size, &desc->bd_phys, - GFP_ATOMIC); + GFP_NOWAIT); if (!desc->bd) { ret = -ENOMEM; goto out;