From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.4 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 394A9C388F9 for ; Fri, 23 Oct 2020 19:05:55 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7364920EDD for ; Fri, 23 Oct 2020 19:05:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7364920EDD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 575F06B005D; Fri, 23 Oct 2020 15:05:53 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 525286B0062; Fri, 23 Oct 2020 15:05:53 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 461B96B0068; Fri, 23 Oct 2020 15:05:53 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0019.hostedemail.com [216.40.44.19]) by kanga.kvack.org (Postfix) with ESMTP id 19B436B005D for ; Fri, 23 Oct 2020 15:05:53 -0400 (EDT) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 9A3561EF1 for ; Fri, 23 Oct 2020 19:05:52 +0000 (UTC) X-FDA: 77404119744.24.oil64_140c7f22725b Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin24.hostedemail.com (Postfix) with ESMTP id 7BC9A1A4A0 for ; Fri, 23 Oct 2020 19:05:52 +0000 (UTC) X-HE-Tag: oil64_140c7f22725b X-Filterd-Recvd-Size: 3465 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf18.hostedemail.com (Postfix) with ESMTP for ; Fri, 23 Oct 2020 19:05:51 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 07FFE101E; Fri, 23 Oct 2020 12:05:51 -0700 (PDT) Received: from [192.168.122.166] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6ABDA3F66E; Fri, 23 Oct 2020 12:05:50 -0700 (PDT) Subject: Re: [PATCH v4 0/7] arm64: Default to 32-bit wide ZONE_DMA To: Nicolas Saenz Julienne , robh+dt@kernel.org, catalin.marinas@arm.com, hch@lst.de, ardb@kernel.org, linux-kernel@vger.kernel.org Cc: robin.murphy@arm.com, linux-arm-kernel@lists.infradead.org, linux-rpi-kernel@lists.infradead.org, iommu@lists.linux-foundation.org, devicetree@vger.kernel.org, will@kernel.org, lorenzo.pieralisi@arm.com, guohanjun@huawei.com, linux-acpi@vger.kernel.org, linux-mm@kvack.org, linux-riscv@lists.infradead.org References: <20201021123437.21538-1-nsaenzjulienne@suse.de> From: Jeremy Linton Message-ID: <9bccc5ef-9457-044b-7193-d002a395e461@arm.com> Date: Fri, 23 Oct 2020 14:05:45 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1 MIME-Version: 1.0 In-Reply-To: <20201021123437.21538-1-nsaenzjulienne@suse.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi, On 10/21/20 7:34 AM, Nicolas Saenz Julienne wrote: > Using two distinct DMA zones turned out to be problematic. Here's an > attempt go back to a saner default. > > I tested this on both a RPi4 and QEMU. I've tested this in ACPI mode on the rpi4 (4+8G with/without the 3G limiter) as well, with Ard's IORT patch. Nothing seems to have regressed. Thanks, Tested-by: Jeremy Linton > > --- > > Changes since v3: > - Drop patch adding define in dma-mapping > - Address small review changes > - Update Ard's patch > - Add new patch removing examples from mmzone.h > > Changes since v2: > - Introduce Ard's patch > - Improve OF dma-ranges parsing function > - Add unit test for OF function > - Address small changes > - Move crashkernel reservation later in boot process > > Changes since v1: > - Parse dma-ranges instead of using machine compatible string > > Ard Biesheuvel (1): > arm64: mm: Set ZONE_DMA size based on early IORT scan > > Nicolas Saenz Julienne (6): > arm64: mm: Move reserve_crashkernel() into mem_init() > arm64: mm: Move zone_dma_bits initialization into zone_sizes_init() > of/address: Introduce of_dma_get_max_cpu_address() > of: unittest: Add test for of_dma_get_max_cpu_address() > arm64: mm: Set ZONE_DMA size based on devicetree's dma-ranges > mm: Remove examples from enum zone_type comment > > arch/arm64/mm/init.c | 16 ++++++------ > drivers/acpi/arm64/iort.c | 52 +++++++++++++++++++++++++++++++++++++++ > drivers/of/address.c | 42 +++++++++++++++++++++++++++++++ > drivers/of/unittest.c | 18 ++++++++++++++ > include/linux/acpi_iort.h | 4 +++ > include/linux/mmzone.h | 20 --------------- > include/linux/of.h | 7 ++++++ > 7 files changed, 130 insertions(+), 29 deletions(-) >