From patchwork Mon Oct 27 12:42:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 5160201 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7D1149F318 for ; Mon, 27 Oct 2014 12:42:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BC77020254 for ; Mon, 27 Oct 2014 12:42:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E61FE202B8 for ; Mon, 27 Oct 2014 12:42:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753132AbaJ0Mmb (ORCPT ); Mon, 27 Oct 2014 08:42:31 -0400 Received: from galahad.ideasonboard.com ([185.26.127.97]:47522 "EHLO galahad.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752684AbaJ0Mma (ORCPT ); Mon, 27 Oct 2014 08:42:30 -0400 Received: from avalon.ideasonboard.com (dsl-hkibrasgw3-50ddcc-40.dhcp.inet.fi [80.221.204.40]) by galahad.ideasonboard.com (Postfix) with ESMTPSA id F0968223B8; Mon, 27 Oct 2014 13:40:23 +0100 (CET) From: Laurent Pinchart To: dmaengine@vger.kernel.org Cc: linux-sh@vger.kernel.org, Kuninori Morimoto Subject: [PATCH] dmaengine: shdma: Allocate cyclic sg list with GFP_NOWAIT Date: Mon, 27 Oct 2014 14:42:31 +0200 Message-Id: <1414413751-22102-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com> X-Mailer: git-send-email 2.0.4 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, 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 The cyclic preparation handler is called in atomic context by the rcar sound driver. Use GFP_NOWAIT instead of GFP_KERNEL. Signed-off-by: Laurent Pinchart --- drivers/dma/sh/shdma-base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/sh/shdma-base.c b/drivers/dma/sh/shdma-base.c index 42d497416196..b392a74dfa54 100644 --- a/drivers/dma/sh/shdma-base.c +++ b/drivers/dma/sh/shdma-base.c @@ -705,7 +705,7 @@ static struct dma_async_tx_descriptor *shdma_prep_dma_cyclic( * Allocate the sg list dynamically as it would consumer too much stack * space. */ - sgl = kcalloc(sg_len, sizeof(*sgl), GFP_KERNEL); + sgl = kcalloc(sg_len, sizeof(*sgl), GFP_NOWAIT); if (!sgl) return NULL;