From patchwork Mon Feb 13 11:04:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 9569347 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 1F5AB60578 for ; Mon, 13 Feb 2017 11:04:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1CA7527FAC for ; Mon, 13 Feb 2017 11:04:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 118A927FC0; Mon, 13 Feb 2017 11:04:53 +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 C166327FAD for ; Mon, 13 Feb 2017 11:04:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752456AbdBMLEk (ORCPT ); Mon, 13 Feb 2017 06:04:40 -0500 Received: from andre.telenet-ops.be ([195.130.132.53]:48038 "EHLO andre.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751023AbdBMLEi (ORCPT ); Mon, 13 Feb 2017 06:04:38 -0500 Received: from ayla.of.borg ([84.193.137.253]) by andre.telenet-ops.be with bizsmtp id kB4b1u00a5UCtCs01B4cer; Mon, 13 Feb 2017 12:04:36 +0100 Received: from ramsan.of.borg ([192.168.97.29] helo=ramsan) by ayla.of.borg with esmtp (Exim 4.82) (envelope-from ) id 1cdEQt-0005Su-Tj; Mon, 13 Feb 2017 12:04:35 +0100 Received: from geert by ramsan with local (Exim 4.82) (envelope-from ) id 1cdEQu-0002z2-Jo; Mon, 13 Feb 2017 12:04:36 +0100 From: Geert Uytterhoeven To: Marek Szyprowski , Catalin Marinas , Will Deacon , Arnd Bergmann , Robin Murphy Cc: Magnus Damm , linux-arm-kernel@lists.infradead.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH/RESEND] arm64: defconfig: Enlarge CMA alignment to 2 MiB Date: Mon, 13 Feb 2017 12:04:18 +0100 Message-Id: <1486983858-11362-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 7735cfba01c8e650..7af449f3f41435bc 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -144,6 +144,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_BLOCK=y CONFIG_MTD_M25P80=y