From patchwork Thu Jan 14 09:59:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 8030851 Return-Path: X-Original-To: patchwork-dmaengine@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id AD60DBEEE5 for ; Thu, 14 Jan 2016 09:57:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CB43120445 for ; Thu, 14 Jan 2016 09:57:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D4BBC20444 for ; Thu, 14 Jan 2016 09:57:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753233AbcANJ50 (ORCPT ); Thu, 14 Jan 2016 04:57:26 -0500 Received: from mail-pa0-f44.google.com ([209.85.220.44]:34120 "EHLO mail-pa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753168AbcANJ5W (ORCPT ); Thu, 14 Jan 2016 04:57:22 -0500 Received: by mail-pa0-f44.google.com with SMTP id uo6so358856765pac.1; Thu, 14 Jan 2016 01:57:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:date:message-id:subject; bh=MJlFmMCJQP8e0Af6mGe4yTmRSYebnZIOQwITGtbSQ+s=; b=DZQRCcqx9nRYgkDjdJ8wooavrTBiUgWrhvIK/LjJZbePKIdPIqiiLNyimGLUYlIuiU 95hZWIJBBQa/XpuTwHzf9kB5qaJ5hsF/96IG29a1SvdzXp4IVdCj3wiWjMDYnfSiuEQ0 ZeKpeA4sl5LrU/NGKf7h6iAfFDv0BdEo+OH+2b7eSGJxXRQpbTXLVpQAUSkO5fFrAMX1 nacD9wOkE8qjcVoPb7e0IpCYwwaOzPKgG/biujmCWcSTcpMGtHEY6oILQT9o8LNmsvQy YhnfVExLH06D8kx1d0aEQDGATZ/T31SBxkZmGaLfLqoW0+XEi93Sf61pSH7pRw8Kf4Sl 1wUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:date:message-id:subject; bh=MJlFmMCJQP8e0Af6mGe4yTmRSYebnZIOQwITGtbSQ+s=; b=FDUgM71FugsPCDwlKsbZ47PtfWnXoiucw4mEnn0GVBQuCGIrZ1o74vB1dFaEaQcmTY 5MWa3hNRZmNkYi1Hty5uHLfLenjSdkjkI+CicOtwGT0+k/TjlAOrAMy6xp3tTO9+2ry+ iUE/QRTrqjYlKX+6SJITjKyPMuj+CWVlJiz6tUxCQTdfrdutVVbXWSpQKj/8lLMmJ1I2 mUZqlodrR3dmzN5D+CHco5k/wfobCNvX2NvR+rh3tQuGBclfIeR+lz2AE1WuObmgQ0rZ ZLPuNpnSh7LFNrC1XVG6zICHmbY2K4zX8/ppoQ+tEp0rqAs3tGYuuB2x5Rq+u+8ftXMD Es4Q== X-Gm-Message-State: ALoCoQmoXRkg3F9RONgwsUuF2ZkSh46QU1EYtRTJBVOGqaEcXnjevQvnG/3dP4iG/4FcC7Yy6aZuqkrrsCVlA55/x2QcSFnZig== X-Received: by 10.66.166.73 with SMTP id ze9mr4424234pab.67.1452765441827; Thu, 14 Jan 2016 01:57:21 -0800 (PST) Received: from [127.0.0.1] (s214090.ppp.asahi-net.or.jp. [220.157.214.90]) by smtp.gmail.com with ESMTPSA id n5sm8191676pfi.3.2016.01.14.01.57.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Jan 2016 01:57:20 -0800 (PST) From: Magnus Damm To: linux-kernel@vger.kernel.org Cc: laurent.pinchart+renesas@ideasonboard.com, geert+renesas@glider.be, linux-sh@vger.kernel.org, vinod.koul@intel.com, dmaengine@vger.kernel.org, horms+renesas@verge.net.au, Magnus Damm Date: Thu, 14 Jan 2016 18:59:33 +0900 Message-Id: <20160114095933.13778.32364.sendpatchset@little-apple> Subject: [PATCH] dmaengine: rcar-dmac: Rename highmem/lowmem Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Magnus Damm Update the rcar-dmac driver to rework comments and variable names related to lowmem and highmem. Terminology such as highmem and lowmem are commonly used for Linux kernel memory managment. Highmem in particular is about handling more physical memory than can fit into the kernel virtual address space. Highmem and lowmem are related to but not equivalent to the 40-bit address limitation that is the real issue the rcar-dmac driver has to deal with. For instance, with 1 GiB of RAM highmem is usually needed on a 32-bit architecture, but a 32-bit address is still enough. 64-bit architectures tend to not use highmem since the virtual address space is more than enough for loads of lowmem. 32-bit architectures may still need highmem to access all memory. The rcar-dmac driver and the DMA device needs to handle the 40-bit limitation on both 64-bit and 32-bit architectures. This patch renames the highmem variable to fourty_bit_required to avoid confusion. And the comment gets updated as well. Signed-off-by: Magnus Damm --- drivers/dma/sh/rcar-dmac.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe dmaengine" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 0001/drivers/dma/sh/rcar-dmac.c +++ work/drivers/dma/sh/rcar-dmac.c 2016-01-14 18:35:23.780513000 +0900 @@ -889,7 +889,7 @@ rcar_dmac_chan_prep_sg(struct rcar_dmac_ unsigned int nchunks = 0; unsigned int max_chunk_size; unsigned int full_size = 0; - bool highmem = false; + bool fourty_bit_required = false; unsigned int i; desc = rcar_dmac_desc_get(chan); @@ -935,7 +935,7 @@ rcar_dmac_chan_prep_sg(struct rcar_dmac_ * hardware descriptor lists. */ if (dev_addr >> 32 || mem_addr >> 32) - highmem = true; + fourty_bit_required = true; #endif chunk = rcar_dmac_xfer_chunk_get(chan); @@ -977,13 +977,13 @@ rcar_dmac_chan_prep_sg(struct rcar_dmac_ * Use hardware descriptor lists if possible when more than one chunk * needs to be transferred (otherwise they don't make much sense). * - * The highmem check currently covers the whole transfer. As an - * optimization we could use descriptor lists for consecutive lowmem - * chunks and direct manual mode for highmem chunks. Whether the + * The 40-bit address check currently covers the whole transfer. As an + * optimization we could use descriptor lists for consecutive 32-bit + * chunks and direct manual mode for 40-bit chunks. Whether the * performance improvement would be significant enough compared to the * additional complexity remains to be investigated. */ - desc->hwdescs.use = !highmem && nchunks > 1; + desc->hwdescs.use = !fourty_bit_required && nchunks > 1; if (desc->hwdescs.use) { if (rcar_dmac_fill_hwdesc(chan, desc) < 0) desc->hwdescs.use = false;