From patchwork Fri Jan 27 16:03:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 9542173 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 74B2B60429 for ; Fri, 27 Jan 2017 16:12:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6861124DA2 for ; Fri, 27 Jan 2017 16:12:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5CC5D27D4A; Fri, 27 Jan 2017 16:12:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2E59024DA2 for ; Fri, 27 Jan 2017 16:12:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932521AbdA0QLt (ORCPT ); Fri, 27 Jan 2017 11:11:49 -0500 Received: from leibniz.telenet-ops.be ([195.130.137.77]:57162 "EHLO leibniz.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932188AbdA0QLa (ORCPT ); Fri, 27 Jan 2017 11:11:30 -0500 Received: from baptiste.telenet-ops.be (baptiste.telenet-ops.be [IPv6:2a02:1800:120:4::f00:13]) by leibniz.telenet-ops.be (Postfix) with ESMTPS id 3v93WV72TSzMqg5t for ; Fri, 27 Jan 2017 17:04:22 +0100 (CET) Received: from ayla.of.borg ([84.193.137.253]) by baptiste.telenet-ops.be with bizsmtp id dU3K1u00U5UCtCs01U3KR3; Fri, 27 Jan 2017 17:03:20 +0100 Received: from ramsan.of.borg ([192.168.97.29] helo=ramsan) by ayla.of.borg with esmtp (Exim 4.82) (envelope-from ) id 1cX8zf-0006dm-Fs; Fri, 27 Jan 2017 17:03:19 +0100 Received: from geert by ramsan with local (Exim 4.82) (envelope-from ) id 1cX8zl-000597-8H; Fri, 27 Jan 2017 17:03:25 +0100 From: Geert Uytterhoeven To: Marek Szyprowski , Catalin Marinas , Will Deacon , Arnd Bergmann Cc: Magnus Damm , linux-arm-kernel@lists.infradead.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH/RFC] arm64: defconfig: Enlarge CMA alignment to 2 MiB Date: Fri, 27 Jan 2017 17:03:16 +0100 Message-Id: <1485532996-19719-1-git-send-email-geert+renesas@glider.be> X-Mailer: git-send-email 1.9.1 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Some IOMMUs (e.g. Renesas IPMMU/VMSA) support only page sizes of 4 KiB, 2 MiB, and 1 GiB. With the default setting of CONFIG_CMA_ALIGNMENT = 8, allocations larger than 1 MiB are aligned to a 1 MiB boundary only. Hence a 2 MiB allocation may not be aligned, leading to a mapping of 512 4 KiB pages. Increase CONFIG_CMA_ALIGNMENT to allow mapping a 2 MiB buffer using a single PTE, decreasing memory usage and TLB pressure. Signed-off-by: Geert Uytterhoeven --- Is this useful? Should there instead be different defaults in Kconfig, depending on enabled platform support? --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index cea17afae855f589..1acc422052050770 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -143,6 +143,7 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS_MOUNT=y CONFIG_DMA_CMA=y +CONFIG_CMA_ALIGNMENT=9 CONFIG_MTD=y CONFIG_MTD_M25P80=y CONFIG_MTD_SPI_NOR=y