From patchwork Sat May 28 20:57:01 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 827132 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 p4SL1NwC016690 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 28 May 2011 21:01: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 1QQQZM-00023k-GI; Sat, 28 May 2011 20:57:12 +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 1QQQZK-0005MR-7C; Sat, 28 May 2011 20:57:10 +0000 Received: from mail-bw0-f49.google.com ([209.85.214.49]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QQQZF-0005Lz-GM for linux-arm-kernel@lists.infradead.org; Sat, 28 May 2011 20:57:06 +0000 Received: by bwz1 with SMTP id 1so2650752bwz.36 for ; Sat, 28 May 2011 13:57:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:date:from:to:cc:subject:message-id:mime-version :content-type:content-disposition:user-agent; bh=2mtKZSCjDFbB6DobVSCEYLC919tsWUDnweyhOPNrP1Q=; b=pkPRb/mabTAd/1vGHnLLQzJtwIef65qPYD0L2lE2q5nbKFP4kcNkU9o0fh936x4E4/ VUliX2cy72k53CtKeKSpF633g3MQVR64rW5pBpzZBba+/7bzUZ9pTDndXuacHawyfW8Q C0quAyGO52PQJuS7wsMttcfrZ4RYd4Vgyz+10= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=HnUqe+QhFmh1r2AwKsTYa7OYKtaUZuxokfiZa4cGI1sxXCn/lKzNRs6tNA+d13ePaX Y4mZe5fN+raskns5JMBXPh1Qs+1g/rob5Q4GXP75RvD/PesOr7IaVoN7/IAt40wCCxGy 0yVZZno64NcZzb1v77tO+0/1Z5fJU6cPEo9bQ= Received: by 10.204.126.29 with SMTP id a29mr1242446bks.167.1306616220022; Sat, 28 May 2011 13:57:00 -0700 (PDT) Received: from doriath.ww600.siemens.net (95-55-113-90.dynamic.avangarddsl.ru [95.55.113.90]) by mx.google.com with ESMTPS id 16sm2244414bkm.14.2011.05.28.13.56.57 (version=SSLv3 cipher=OTHER); Sat, 28 May 2011 13:56:59 -0700 (PDT) Date: Sun, 29 May 2011 00:57:01 +0400 From: Dmitry Eremin-Solenikov To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: IrDA driver fails on PXA255 Message-ID: <20110528205701.GA1788@doriath.ww600.siemens.net> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110528_165705_956268_4811FD9C X-CRM114-Status: GOOD ( 17.83 ) X-Spam-Score: -0.8 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-0.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is freemail (dbaryshkov[at]gmail.com) -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.214.49 listed in list.dnswl.org] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 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: Samuel Ortiz , Eric Miao , David Rientjes 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: , 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]); Sat, 28 May 2011 21:01:46 +0000 (UTC) Hello, Since a197b59ae6e8bee56fcef37ea2482dc08414e2ac (mm: fail GFP_DMA allocations when ZONE_DMA is not configured), pxaficp_ir.c driver fails to probe: pxa_irda_init_iobuf asks for a buffer with GFP_KERNEL | GFP_DMA flags, which fail nicely with the following trace: ------------[ cut here ]------------ WARNING: at mm/page_alloc.c:2251 __alloc_pages_nodemask+0xa0/0x5ac() Modules linked in: [] (unwind_backtrace+0x0/0xf0) from [] (warn_slowpath_common+0x4c/0x64) [] (warn_slowpath_common+0x4c/0x64) from [] (warn_slowpath_null+0x18/0x1c) [] (warn_slowpath_null+0x18/0x1c) from [] (__alloc_pages_nodemask+0xa0/0x5ac) [] (__alloc_pages_nodemask+0xa0/0x5ac) from [] (__get_free_pages+0x10/0x3c) [] (__get_free_pages+0x10/0x3c) from [] (pxa_irda_init_iobuf+0x18/0x48) [] (pxa_irda_init_iobuf+0x18/0x48) from [] (pxa_irda_probe+0x11c/0x32c) [] (pxa_irda_probe+0x11c/0x32c) from [] (platform_drv_probe+0x14/0x18) [] (platform_drv_probe+0x14/0x18) from [] (really_probe+0xa0/0x158) [] (really_probe+0xa0/0x158) from [] (driver_probe_device+0x4c/0x64) [] (driver_probe_device+0x4c/0x64) from [] (__driver_attach+0x60/0x84) [] (__driver_attach+0x60/0x84) from [] (bus_for_each_dev+0x48/0x84) [] (bus_for_each_dev+0x48/0x84) from [] (bus_add_driver+0xa8/0x220) [] (bus_add_driver+0xa8/0x220) from [] (driver_register+0xac/0x13c) [] (driver_register+0xac/0x13c) from [] (do_one_initcall+0x94/0x16c) [] (do_one_initcall+0x94/0x16c) from [] (kernel_init+0x94/0x140) [] (kernel_init+0x94/0x140) from [] (kernel_thread_exit+0x0/0x8) ---[ end trace 0b8bf08f70147098 ]--- And then I get: pxa2xx-ir: probe of pxa2xx-ir failed with error -12 Of course one can ask for a buffer w/o GFP_DMA (see attachment), but I ain't sure that it's correct. From 18f033175030a1d42cf58b4930682a35de3e7412 Mon Sep 17 00:00:00 2001 From: Dmitry Eremin-Solenikov Date: Sun, 29 May 2011 00:53:29 +0400 Subject: [PATCH] pxa: don't ask for a buffer from DMA zone PXA don't have special DMA zone. And since 197b59ae6e8bee56fcef37ea2482dc08414e2ac (mm: fail GFP_DMA allocations when ZONE_DMA is not configured) allocation with GFP_DMA set will fail with a trace like this: ------------[ cut here ]------------ WARNING: at mm/page_alloc.c:2251 __alloc_pages_nodemask+0xa0/0x5ac() Modules linked in: [] (unwind_backtrace+0x0/0xf0) from [] (warn_slowpath_common+0x4c/0x64) [] (warn_slowpath_common+0x4c/0x64) from [] (warn_slowpath_null+0x18/0x1c) [] (warn_slowpath_null+0x18/0x1c) from [] (__alloc_pages_nodemask+0xa0/0x5ac) [] (__alloc_pages_nodemask+0xa0/0x5ac) from [] (__get_free_pages+0x10/0x3c) [] (__get_free_pages+0x10/0x3c) from [] (pxa_irda_init_iobuf+0x18/0x48) [] (pxa_irda_init_iobuf+0x18/0x48) from [] (pxa_irda_probe+0x11c/0x32c) [] (pxa_irda_probe+0x11c/0x32c) from [] (platform_drv_probe+0x14/0x18) [] (platform_drv_probe+0x14/0x18) from [] (really_probe+0xa0/0x158) [] (really_probe+0xa0/0x158) from [] (driver_probe_device+0x4c/0x64) [] (driver_probe_device+0x4c/0x64) from [] (__driver_attach+0x60/0x84) [] (__driver_attach+0x60/0x84) from [] (bus_for_each_dev+0x48/0x84) [] (bus_for_each_dev+0x48/0x84) from [] (bus_add_driver+0xa8/0x220) [] (bus_add_driver+0xa8/0x220) from [] (driver_register+0xac/0x13c) [] (driver_register+0xac/0x13c) from [] (do_one_initcall+0x94/0x16c) [] (do_one_initcall+0x94/0x16c) from [] (kernel_init+0x94/0x140) [] (kernel_init+0x94/0x140) from [] (kernel_thread_exit+0x0/0x8) ---[ end trace 0b8bf08f70147098 ]--- Signed-off-by: Dmitry Eremin-Solenikov --- drivers/net/irda/pxaficp_ir.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/irda/pxaficp_ir.c b/drivers/net/irda/pxaficp_ir.c index 001ed0a..a5ebaef 100644 --- a/drivers/net/irda/pxaficp_ir.c +++ b/drivers/net/irda/pxaficp_ir.c @@ -805,7 +805,7 @@ static int pxa_irda_resume(struct platform_device *_dev) static int pxa_irda_init_iobuf(iobuff_t *io, int size) { - io->head = kmalloc(size, GFP_KERNEL | GFP_DMA); + io->head = kmalloc(size, GFP_KERNEL); if (io->head != NULL) { io->truesize = size; io->in_frame = FALSE; -- 1.7.4.4