From patchwork Sun May 29 09:03:57 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mika Westerberg X-Patchwork-Id: 827302 Received: from bombadil.infradead.org (173-166-109-252-newengland.hfc.comcastbusiness.net [173.166.109.252]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p4T9BOkb031138 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 29 May 2011 09:11:46 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by bombadil.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QQbwo-0006t0-TT; Sun, 29 May 2011 09:06:11 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QQbwm-0007bD-PF; Sun, 29 May 2011 09:06:08 +0000 Received: from mail-ey0-f177.google.com ([209.85.215.177]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QQbwi-0007at-6d for linux-arm-kernel@lists.infradead.org; Sun, 29 May 2011 09:06:05 +0000 Received: by eyh6 with SMTP id 6so1197183eyh.36 for ; Sun, 29 May 2011 02:06:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:from:to:cc:subject:date:message-id :x-mailer; bh=PfTpMKnbZVNjghchqdkhx1VjZfkEyVBG1d7ke7jtwfM=; b=USA6bVdUXXAkdFH9BMKLk5u/qgXfqcMddgDZeD0QZ70d8mtbGgOl0Q1BcdNmVQHosv 9RmjZg49HaN3uCUcqEwNDaS5UpFOxCZx2IycMsWtFjSWeu3uHyutCoCh2VBB9keLRbOt HDJGN3DyDf5S2dFzISfvmzdb++HTPyepf91Gc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer; b=ZLuOw8I+DWEUtLr2ZwpoBqpzHndTsiXH5qBfadt7WsvBdxaji0DWB0vYTwRau1/ZCn PhhdcfKBuZ3fZbwLxmu+t8MsdHX6B+ObP9Xsc1OmWbQIU8xsymnuYSrFOxMia441IGXZ Qjn/6ldkuqN9xqlym8+i2Leo4RU8j6R+28ryM= Received: by 10.213.22.148 with SMTP id n20mr466139ebb.149.1306659962353; Sun, 29 May 2011 02:06:02 -0700 (PDT) Received: from acer.healthdatacare.com (a88-115-37-157.elisa-laajakaista.fi [88.115.37.157]) by mx.google.com with ESMTPS id b1sm2415059eeg.5.2011.05.29.02.06.00 (version=SSLv3 cipher=OTHER); Sun, 29 May 2011 02:06:01 -0700 (PDT) From: Mika Westerberg To: netdev@vger.kernel.org Subject: [PATCH] net: ep93xx_eth: drop GFP_DMA from memory allocations Date: Sun, 29 May 2011 12:03:57 +0300 Message-Id: <1306659837-23553-1-git-send-email-mika.westerberg@iki.fi> X-Mailer: git-send-email 1.7.4.4 X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110529_050604_616074_A10F5D1F X-CRM114-Status: GOOD ( 12.43 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.215.177 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is freemail (mika.westerberg[at]gmail.com) 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 RFC_ABUSE_POST Both abuse and postmaster missing on sender domain 0.0 T_TO_NO_BRKTS_FREEMAIL T_TO_NO_BRKTS_FREEMAIL Cc: hsweeten@visionengravers.com, ryan@bluewatersys.com, kernel@wantstofly.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 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 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Sun, 29 May 2011 09:11:47 +0000 (UTC) Commit a197b59ae6e8 (mm: fail GFP_DMA allocations when ZONE_DMA is not configured) made page allocator to return NULL if GFP_DMA is set but CONFIG_ZONE_DMA is disabled. This causes ep93xx_eth to fail: WARNING: at mm/page_alloc.c:2251 __alloc_pages_nodemask+0x11c/0x638() Modules linked in: [] (unwind_backtrace+0x0/0xf4) from [] (warn_slowpath_common+0x48/0x60) [] (warn_slowpath_common+0x48/0x60) from [] (warn_slowpath_null+0x1c/0x24) [] (warn_slowpath_null+0x1c/0x24) from [] (__alloc_pages_nodemask+0x11c/0x638) [] (__alloc_pages_nodemask+0x11c/0x638) from [] (__dma_alloc+0x8c/0x3ec) [] (__dma_alloc+0x8c/0x3ec) from [] (dma_alloc_coherent+0x54/0x60) [] (dma_alloc_coherent+0x54/0x60) from [] (ep93xx_open+0x20/0x864) [] (ep93xx_open+0x20/0x864) from [] (__dev_open+0xb8/0x108) [] (__dev_open+0xb8/0x108) from [] (__dev_change_flags+0x70/0x128) [] (__dev_change_flags+0x70/0x128) from [] (dev_change_flags+0x10/0x48) [] (dev_change_flags+0x10/0x48) from [] (ip_auto_config+0x190/0xf68) [] (ip_auto_config+0x190/0xf68) from [] (do_one_initcall+0x34/0x18c) [] (do_one_initcall+0x34/0x18c) from [] (kernel_init+0x94/0x134) [] (kernel_init+0x94/0x134) from [] (kernel_thread_exit+0x0/0x8) Since there is no restrictions for DMA on ep93xx, we can fix this by just removing the GFP_DMA flag from the allocations. Signed-off-by: Mika Westerberg --- drivers/net/arm/ep93xx_eth.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/arm/ep93xx_eth.c b/drivers/net/arm/ep93xx_eth.c index 5a77001..e495f76 100644 --- a/drivers/net/arm/ep93xx_eth.c +++ b/drivers/net/arm/ep93xx_eth.c @@ -494,7 +494,7 @@ static int ep93xx_alloc_buffers(struct ep93xx_priv *ep) int i; ep->descs = dma_alloc_coherent(NULL, sizeof(struct ep93xx_descs), - &ep->descs_dma_addr, GFP_KERNEL | GFP_DMA); + &ep->descs_dma_addr, GFP_KERNEL); if (ep->descs == NULL) return 1; @@ -502,7 +502,7 @@ static int ep93xx_alloc_buffers(struct ep93xx_priv *ep) void *page; dma_addr_t d; - page = (void *)__get_free_page(GFP_KERNEL | GFP_DMA); + page = (void *)__get_free_page(GFP_KERNEL); if (page == NULL) goto err; @@ -525,7 +525,7 @@ static int ep93xx_alloc_buffers(struct ep93xx_priv *ep) void *page; dma_addr_t d; - page = (void *)__get_free_page(GFP_KERNEL | GFP_DMA); + page = (void *)__get_free_page(GFP_KERNEL); if (page == NULL) goto err;