From patchwork Mon Aug 20 10:47:27 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 1347991 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 0E374DFF0F for ; Mon, 20 Aug 2012 10:51:45 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1T3PXM-0008T1-6E; Mon, 20 Aug 2012 10:48:48 +0000 Received: from mailout1.samsung.com ([203.254.224.24]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1T3PXI-0008S3-TR for linux-arm-kernel@lists.infradead.org; Mon, 20 Aug 2012 10:48:45 +0000 Received: from epcpsbgm2.samsung.com (mailout1.samsung.com [203.254.224.24]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0M9100FYMVBP51P0@mailout1.samsung.com> for linux-arm-kernel@lists.infradead.org; Mon, 20 Aug 2012 19:48:11 +0900 (KST) X-AuditID: cbfee61b-b7faf6d00000476a-4a-503215eba3ce Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 89.4B.18282.BE512305; Mon, 20 Aug 2012 19:48:11 +0900 (KST) Received: from mcdsrvbld02.digital.local ([106.116.37.23]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0M91008OAVBT1S40@mmp2.samsung.com> for linux-arm-kernel@lists.infradead.org; Mon, 20 Aug 2012 19:48:11 +0900 (KST) From: Marek Szyprowski To: linux-arm-kernel@lists.infradead.org, linaro-mm-sig@lists.linaro.org Subject: [PATCH 2/3] ARM: DMA-Mapping: print warning when atomic coherent allocation fails Date: Mon, 20 Aug 2012 12:47:27 +0200 Message-id: <1345459648-24263-3-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.7.10 In-reply-to: <1345459648-24263-1-git-send-email-m.szyprowski@samsung.com> References: <1345459648-24263-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrEJMWRmVeSWpSXmKPExsVy+t9jQd3XokYBBu//cllsenyN1YHRY/OS +gDGKC6blNSczLLUIn27BK6Mrl8zWArmsVf0HjrG1MD4j7WLkZNDQsBE4taGHVC2mMSFe+vZ uhi5OIQEpjNKnDiwlh3C2cwksfj0MSaQKjYBQ4mut11sILaIgIfEkxXnmEGKmAUOMUlMfb4L rEhYIEai8dZ3RhCbRUBVYvekZWA2L1DDrW+tzBDr5CWe3u8DGsTBwSngKTFjfTVIWAioZM3j y6wTGHkXMDKsYhRNLUguKE5KzzXSK07MLS7NS9dLzs/dxAj2+TPpHYyrGiwOMQpwMCrx8BZO NQwQYk0sK67MPcQowcGsJML7R8QoQIg3JbGyKrUoP76oNCe1+BCjNAeLkjgvfx9QtUB6Yklq dmpqQWoRTJaJg1OqgZFl8165vjOblt9s3S7HtOLdPQXTmDLhZYu6/+TNDJBkET7xsWrf/O2r VvfJfGXYe2xSVra6hOeuLsmVqeyJPbw71bYtL7gnYPPi1+aTCydxFqX5lbpmXWnViPvv6LTK lTv4aMirHUdDbHYK+hw99d1VurHwqoXhw+iVdd+m/a6+NNfYuLH4yCclluKMREMt5qLiRABp NxkE9QEAAA== X-TM-AS-MML: No X-Spam-Note: CRM114 invocation failed X-Spam-Score: -7.1 (-------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-7.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [203.254.224.24 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.2 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Andrew Lunn , Russell King - ARM Linux , Jason Cooper , Arnd Bergmann , Aaro Koskinen , Josh Coombs , Kyungmin Park , Marek Szyprowski X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Print a loud warning when system runs out of memory from atomic coherent pool to let users notice the potential problem. Reported-by: Aaro Koskinen Signed-off-by: Marek Szyprowski --- arch/arm/mm/dma-mapping.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index d1cc9c1..25963ea 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c @@ -461,6 +461,9 @@ static void *__alloc_from_pool(size_t size, struct page **ret_page) bitmap_set(pool->bitmap, pageno, count); ptr = pool->vaddr + PAGE_SIZE * pageno; *ret_page = pool->page + pageno; + } else { + pr_err("Atomic coherent pool too small!\n" + "Please increase it with coherent_pool= kernel parameter!\n"); } spin_unlock_irqrestore(&pool->lock, flags);