From patchwork Mon Dec 9 13:34:31 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ezequiel Garcia X-Patchwork-Id: 3310981 X-Patchwork-Delegate: dan.j.williams@gmail.com Return-Path: X-Original-To: patchwork-dmaengine@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 CAB669F1F0 for ; Mon, 9 Dec 2013 13:34:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 93092201BB for ; Mon, 9 Dec 2013 13:34:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 599012017D for ; Mon, 9 Dec 2013 13:34:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933351Ab3LINeZ (ORCPT ); Mon, 9 Dec 2013 08:34:25 -0500 Received: from top.free-electrons.com ([176.31.233.9]:35323 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932631Ab3LINeY (ORCPT ); Mon, 9 Dec 2013 08:34:24 -0500 Received: by mail.free-electrons.com (Postfix, from userid 106) id 7BD458A7; Mon, 9 Dec 2013 14:34:28 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from localhost.localdomain (unknown [190.2.98.212]) by mail.free-electrons.com (Postfix) with ESMTPA id EACD1837; Mon, 9 Dec 2013 14:34:25 +0100 (CET) From: Ezequiel Garcia To: Cc: Thomas Petazzoni , Gregory Clement , Lior Amsalem , Dan Williams , Vinod Koul , Ezequiel Garcia Subject: [RFC/PATCH] dmaengine: Unconditionally enable high-order unmap pools Date: Mon, 9 Dec 2013 10:34:31 -0300 Message-Id: <1386596071-24828-1-git-send-email-ezequiel.garcia@free-electrons.com> X-Mailer: git-send-email 1.8.1.5 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP There's no reason for conditioning these pools to CONFIG_ASYNC_TX_DMA. Moreover, the pools are required by dmaengine driver's self-tests and dmatest module. Without this commit you'll get this ugly exception when running dmatest with !CONFIG_ASYNC_TX_DMA. Unable to handle kernel paging request at virtual address 65747960 pgd = c0004000 [65747960] *pgd=00000000 Internal error: Oops: 80000005 [#4] SMP ARM CPU: 0 PID: 1024 Comm: dma3chan0-xor0 Tainted: G D 3.13.0-rc1-g85726de #19 task: dfb18c40 ti: df230000 task.ti: df230000 PC is at 0x65747960 LR is at mempool_alloc+0x44/0x11c pc : [<65747960>] lr : [] psr: 80000113 sp : df231e20 ip : df231e20 fp : df231f64 r10: 00000010 r9 : df230000 r8 : c00494b0 r7 : 000112d0 r6 : 00000e24 r5 : 00011280 r4 : c03da694 r3 : 65747962 r2 : 000110d0 r1 : 00000000 r0 : 00011280 Flags: Nzcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel Control: 10c5387d Table: 1f1fc019 DAC: 00000015 Process dma3chan0-xor0 (pid: 1024, stack limit = 0xdf230240) Stack: (0xdf231e20 to 0xdf232000) 1e20: df231f64 c0011bc0 df1b2388 00001fce df23c000 00001efa 00004000 000000d0 1e40: df8f7410 00000e24 000011aa 00000e24 00002553 000011aa df231f64 c0172bc0 1e60: 00000e24 00000001 fffffff4 c01740fc c04673bc df240000 df231f64 c0173fe8 1e80: d19a0cd2 00000000 00000ad5 00000000 00000028 7030977c dfb18c40 dfb18c40 1ea0: 0000128b 00000001 60604c34 00000002 00000004 00000010 df231f20 00000000 1ec0: ffffffff c0adc340 df231e80 df231e88 00000000 00000000 df95c8b4 c04673bc 1ee0: c000962c 00000001 00000001 c0039adc 00000e24 00000003 00000000 00000000 1f00: df95c848 df1b7480 60604c34 00000002 c00437f0 b150ad6e 00000000 df231f20 1f20: 00000000 df231f24 df231f24 a0000113 c0173c04 c044f340 c044f340 c044f340 1f40: 00000000 00000000 df1b7340 df1b7480 c0173c04 00000000 00000000 00000000 1f60: 00000000 c0035a88 5eadfef9 00000000 5bce9bd2 df1b7480 00000000 00000000 1f80: df231f80 df231f80 00000000 00000000 df231f90 df231f90 df231fac df1b7340 1fa0: c00359c4 00000000 00000000 c000e398 00000000 00000000 00000000 00000000 1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 1fe0: 00000000 00000000 00000000 00000000 00000013 00000000 fedcffd9 fdfdfdb6 [] (mempool_alloc+0x44/0x11c) from [] (dmaengine_get_unmap_data+0x20/0x44) [] (dmaengine_get_unmap_data+0x20/0x44) from [] (dmatest_func+0x4f8/0x1098) [] (dmatest_func+0x4f8/0x1098) from [] (kthread+0xc4/0xe0) [] (kthread+0xc4/0xe0) from [] (ret_from_fork+0x14/0x3c) Code: bad PC value ---[ end trace 63410b5ee737eb3b ]--- Signed-off-by: Ezequiel Garcia --- Altough it fixes a real issue, I'm sending this one as RFC given I'm not entirely sure why the #if was added in the first place. If the fix is correct, it should be pushed for v3.13, with the rest of the dmaengine_unmap_data infrastructure. drivers/dma/dmaengine.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c index ea806bd..c7a61a3 100644 --- a/drivers/dma/dmaengine.c +++ b/drivers/dma/dmaengine.c @@ -912,11 +912,9 @@ struct dmaengine_unmap_pool { #define __UNMAP_POOL(x) { .size = x, .name = "dmaengine-unmap-" __stringify(x) } static struct dmaengine_unmap_pool unmap_pool[] = { __UNMAP_POOL(2), - #if IS_ENABLED(CONFIG_ASYNC_TX_DMA) __UNMAP_POOL(16), __UNMAP_POOL(128), __UNMAP_POOL(256), - #endif }; static struct dmaengine_unmap_pool *__get_unmap_pool(int nr)