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: 10798 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id D840D23F70 for ; Mon, 20 Aug 2012 10:48:19 +0000 (UTC) Received: from mail-yx0-f180.google.com (mail-yx0-f180.google.com [209.85.213.180]) by fiordland.canonical.com (Postfix) with ESMTP id 24A88A1872F for ; Mon, 20 Aug 2012 10:48:14 +0000 (UTC) Received: by yenl8 with SMTP id l8so5182391yen.11 for ; Mon, 20 Aug 2012 03:48:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:x-auditid :from:to:date:message-id:x-mailer:in-reply-to:references :x-brightmail-tracker:x-tm-as-mml:cc:subject:x-beenthere :x-mailman-version:precedence:list-id:list-unsubscribe:list-archive :list-post:list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:sender:errors-to:x-gm-message-state; bh=9KCS9w0ckf2AIhOE13UDAm///bApqpNPXDMB9R1cuHY=; b=IwtnXNBdcKbsctcpDqv3uejLfdR9dY0P8+lrNlmlRUZ3VAWyA7nmkO1cJHkTpg5qL1 Ih9QlCYrgNXaMh/x/zwbS6zZ6qQjcietoVQeEMk5yz3cjq9PRZXoDvcadfD2gEt4yZKG B8qiXFeCK+BV17gZ51CiHEd8PC3UdxKfexBf5G3O6D+oQ47Ps/oYhcg0KjDszgctwFi/ Z9/mVEG9aGw5Su4K+eIpLeEEemTdhuKEGzo9DQWTHCwt8uZ4txlamixYPUVF2gI6j6+V sJzQWCoQpfU1V3kV9Zwd1MiQcXpdlgmZ6TBAkJRzXS4rykbbB4JQQudFoavI60hcVdNk hlPg== Received: by 10.50.10.201 with SMTP id k9mr9357664igb.28.1345459698641; Mon, 20 Aug 2012 03:48:18 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.184.232 with SMTP id ex8csp76921igc; Mon, 20 Aug 2012 03:48:18 -0700 (PDT) Received: by 10.216.198.145 with SMTP id v17mr7585500wen.1.1345459697080; Mon, 20 Aug 2012 03:48:17 -0700 (PDT) Received: from mombin.canonical.com (mombin.canonical.com. [91.189.95.16]) by mx.google.com with ESMTP id o9si20993822wea.62.2012.08.20.03.48.16; Mon, 20 Aug 2012 03:48:17 -0700 (PDT) Received-SPF: neutral (google.com: 91.189.95.16 is neither permitted nor denied by best guess record for domain of linaro-mm-sig-bounces@lists.linaro.org) client-ip=91.189.95.16; Authentication-Results: mx.google.com; spf=neutral (google.com: 91.189.95.16 is neither permitted nor denied by best guess record for domain of linaro-mm-sig-bounces@lists.linaro.org) smtp.mail=linaro-mm-sig-bounces@lists.linaro.org Received: from localhost ([127.0.0.1] helo=mombin.canonical.com) by mombin.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1T3PWp-0001B7-8t; Mon, 20 Aug 2012 10:48:15 +0000 Received: from mailout3.samsung.com ([203.254.224.33]) by mombin.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1T3PWn-0001Az-Qf for linaro-mm-sig@lists.linaro.org; Mon, 20 Aug 2012 10:48:14 +0000 Received: from epcpsbgm1.samsung.com (mailout3.samsung.com [203.254.224.33]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0M910013DVCB87U0@mailout3.samsung.com> for linaro-mm-sig@lists.linaro.org; Mon, 20 Aug 2012 19:48:11 +0900 (KST) X-AuditID: cbfee61a-b7fc66d0000043b7-13-503215eb54b0 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id DC.FD.17335.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 linaro-mm-sig@lists.linaro.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 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+NgFnrMJMWRmVeSWpSXmKPExsVy+t9jQd3XokYBBhd+cll8ufKQyYHR4/a/ x8wBjFFcNimpOZllqUX6dglcGV2/ZrAUzGOv6D10jKmB8R9rFyMnh4SAicSXB2uZIGwxiQv3 1rN1MXJxCAlMZ5Q4PaGFHcJZyyQx89c3ZpAqNgFDia63XWwgtoiAh8STFeeYQYqYBQ4xSUx9 vgtslLBAjETjre+MIDaLgKrE7knLwGxeoIZb31qZIdbJSzy93wc0iIODU8BTYsb6apCwEFDJ mseXWScw8i5gZFjFKJpakFxQnJSea6hXnJhbXJqXrpecn7uJEez1Z1I7GFc2WBxiFOBgVOLh PTndMECINbGsuDL3EKMEB7OSCO8fEaMAId6UxMqq1KL8+KLSnNTiQ4zSHCxK4rz8fUDVAumJ JanZqakFqUUwWSYOTqkGxrrggLpXnCf7tW8vyLmxaaZNTv//xjSeOVkCC33VjP/Fu4WuXv6L zX45j2vu8bP15pyhRbI7coKOCPinnJmk07fOKsbgXZs9q8/S5AnvV0jV7eZ5lqtuX3DFf0mv XcazvfXOcu96t3L+bd38y/WFQPZN5i4rJvbN0z+we/6e9CVdWWHObGc1JZbijERDLeai4kQA I5rMefYBAAA= X-TM-AS-MML: No Cc: Andrew Lunn , Russell King - ARM Linux , Jason Cooper , Arnd Bergmann , Aaro Koskinen , Josh Coombs , Kyungmin Park Subject: [Linaro-mm-sig] [PATCH 2/3] ARM: DMA-Mapping: print warning when atomic coherent allocation fails X-BeenThere: linaro-mm-sig@lists.linaro.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Unified memory management interest group." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linaro-mm-sig-bounces@lists.linaro.org Errors-To: linaro-mm-sig-bounces@lists.linaro.org X-Gm-Message-State: ALoCoQnGw+rxuE57W/bEOTzBxPv2F6g2OIzIenixGCAiw33tz/ke4Dtd42HeCdCViPmQYY+7psuK 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);