From patchwork Thu May 13 19:26:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guillaume Ranquet X-Patchwork-Id: 12256375 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3D6C1C433B4 for ; Thu, 13 May 2021 19:33:07 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CC11F61404 for ; Thu, 13 May 2021 19:33:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CC11F61404 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=EOmr+boTQuYuJhpvUlkViqJo8y9RXFe7ZpencmwUtAI=; b=JufcLw8B/sueggV3mAZBeQT33 Pn7ygRI3YZVIgRFuGAte+58SRtuJVEDFpIpgp6uFHzaxMGazv9qTIcmRXVOJ6UmKNW8D+4pDyibCh Y/pjwtwdAV3Eq+/PC6noE6xG09bAbvORqKUlydlJhDmi0yFvQY18gT11yCtJN/kc3GxdXTYl6W0A6 5jSq5tV9SF7ILVsA7aO8KWDItpHX/8AVamnXyIT7V/perQuleYA8HoW2cjswDnupdguB2aLh9sO2y vSyl5uuOL8F8Is0Vseu3Kku0A5EhoPtpnZLvjCfEljGFF3DI75RaP2QhuJ1yUyIacrw1lBZJUThYY 8KgghdKIw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lhH2h-006Gp2-2m; Thu, 13 May 2021 19:30:43 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lhGzG-006GVf-NZ for linux-arm-kernel@desiato.infradead.org; Thu, 13 May 2021 19:27:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=Hz2oyLCaodXd740ljA7xd9Idy1mmKCo0jqV0VyN8IUY=; b=dohBC+DlhmegBqYOuRHjw3ztXp K62yiqq3NPd14EsAcP9CQXQU8LGETJ4aP+y2t81MDLehvmfPgp2YaxY2hUPd3uyb4JpbDUJww8D2n B3s5/QyoPiiE/9211hTF72zPSPRx6EXr75+/ZDGntFjuis0JKbGNgtTaIqqnY90X3OLQ/fw8EoIhi N8B1cUGMWTvsyyLu8ocbsJCMnrBzbJ5GQDWhsTlFryDC4B781j3pXIlDPoBkNxfspVOApRXMBZCV0 yT5n3fd04XyjK+WQlIm4C0f8QvSJx5XxXTbrGND6fy1ZgTRAvfTtWUK3I18IRmDmhd45vTL17T4/m 6ShBZ0Aw==; Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lhGzE-00BTYr-6r for linux-arm-kernel@lists.infradead.org; Thu, 13 May 2021 19:27:09 +0000 Received: by mail-wm1-x32f.google.com with SMTP id n84so15139756wma.0 for ; Thu, 13 May 2021 12:27:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Hz2oyLCaodXd740ljA7xd9Idy1mmKCo0jqV0VyN8IUY=; b=sZXPaAsyf4ffDKyjs8O74Zge/X6jI76n+7YbKvJU+8109bI8MJgtyqcVubGJ1uWW3E yDI9/5+ruZ4+gDkA88wjjw7c7yGdcOc5GeYdkAgSZE/HDGkj6E54ITAKOUGug7YWoeGE 2hPNROBUj4fBoXzzlqCyO0VisN7iG4jbaHqw0FyrMUMX2IRNx9ztDhzXBMP+JLfD8ZlD +J/1MFdbJ1AZEiyMFKQhzoXwkDk/uzYp0cQv1BIz/zE3RbspfofQ8QqrzLHd5CH5i6Jb 5X1We59Js9IgROMufEwo3ZfD24fE47qy+g0tKH0ENk02rjwb0aKMBHniaUD5g41LYQC1 zIag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Hz2oyLCaodXd740ljA7xd9Idy1mmKCo0jqV0VyN8IUY=; b=qPtWeDfcVXMGmJPgMpUK1yi0KyW5Dp36IUS8qz3v512VXMpVyDecyYpud17Zfgtm7a z+AFS4cMmsubhdm9m1sQC+3cpOU/B4QVkJ19ziLTmYJzr+AEs55gkVz0I2iF0+wNN1zI pL96gXpfNKqpSqSSY9y5sQgcazQhAotB2uPFPKCEp+C/N/6iV13GaZLW/P7dDQvQPlc/ 5bOhmIF33tnahEnn8G76Ejtd2O4dp0a5S0lAKACudvRQgThIrhTcFEWxdPHXulyVhTu8 4NZh5bj9VPQBN3B78kL4hkdJcOcDx2VenyttDe0dLgDsoVofwECBnH2+tnWjycMQy4h5 N3Ew== X-Gm-Message-State: AOAM532fWF0VF2AD04nsLUCV6RCDBnTDuq1wzE4GYQFIg6HfX63rb2s+ r2uCSCtPg1kH9ZPGYbDhoEtk3A== X-Google-Smtp-Source: ABdhPJyzpUQgQL+VR9Dht+XY5fDnyA8jmiEPMMbUTAkreqWtyug65TxodZHPUV0tmb60GFcF2HSkQg== X-Received: by 2002:a1c:b342:: with SMTP id c63mr46096700wmf.162.1620934026480; Thu, 13 May 2021 12:27:06 -0700 (PDT) Received: from localhost.localdomain (2a02-8440-6341-d842-3074-96af-9642-0002.rev.sfr.net. [2a02:8440:6341:d842:3074:96af:9642:2]) by smtp.gmail.com with ESMTPSA id h9sm3053621wmb.35.2021.05.13.12.27.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 May 2021 12:27:06 -0700 (PDT) From: Guillaume Ranquet To: Cc: Sean Wang , Vinod Koul , Matthias Brugger , dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 3/3] dmaengine: mediatek: use GFP_NOWAIT instead of GFP_ATOMIC in prep_dma Date: Thu, 13 May 2021 21:26:42 +0200 Message-Id: <20210513192642.29446-4-granquet@baylibre.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210513192642.29446-1-granquet@baylibre.com> References: <20210513192642.29446-1-granquet@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210513_122708_268772_CC797A6D X-CRM114-Status: UNSURE ( 9.90 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org As recommended by the doc in: Documentation/drivers-api/dmaengine/provider.rst Use GFP_NOWAIT to not deplete the emergency pool. Signed-off-by: Guillaume Ranquet diff --git a/drivers/dma/mediatek/mtk-uart-apdma.c b/drivers/dma/mediatek/mtk-uart-apdma.c index a09ab2dd3b46..375e7e647df6 100644 --- a/drivers/dma/mediatek/mtk-uart-apdma.c +++ b/drivers/dma/mediatek/mtk-uart-apdma.c @@ -349,7 +349,7 @@ static struct dma_async_tx_descriptor *mtk_uart_apdma_prep_slave_sg return NULL; /* Now allocate and setup the descriptor */ - d = kzalloc(sizeof(*d), GFP_ATOMIC); + d = kzalloc(sizeof(*d), GFP_NOWAIT); if (!d) return NULL;