Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp755645pxu; Fri, 23 Oct 2020 12:25:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxs7k23tJHEiaH5gndkm3q4PcIrKzrvq57QVI47uCvMW6/8qC61l1rUrFvSXu0hzJPczyeR X-Received: by 2002:a05:6402:156:: with SMTP id s22mr3840266edu.178.1603481124969; Fri, 23 Oct 2020 12:25:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603481124; cv=none; d=google.com; s=arc-20160816; b=HPs9rk0NgEY1Okj7/3WwMtx4SbWByRizG0qRProbSEjU0pm9ZKtJdcxpdOifrBrCsZ /B31uTCpqCaB/IwGXzIt6CcAhC63SZPMJNA6hpwKM4GgyARbcr7S70p0n3u1GwbWCV7U w8SziWZ7uYNxsjsroWlw3s99QT0aYQyMDWWjGOtqqWaBC/Kc19iSkX5KiqE6h3Wl/7p+ 5OPSDtNd2rbwjFjMxNznpe8cQQbKjT43IInh8wsqQCJu7rYXZzZ/r4OHtyUo9ljDg3V0 VI2ylAEFK+ECM5QuSP3DzwjiuBe8FypGQ6vUmx82exIxTBmIvQ/b800kIZ/lPBVlIBIe y4Sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=qWiaaqNeQ1zkKAuxmM2s7mdjzCZ2t6Wp5LGGKZOujP8=; b=dwkBZrxWhukfgy81LAgG5hsOUPAVtnQj3Mb+x7byMBBDYJBmlRIebGkaZ+m9jQNkxS JkczCeVfjCmdfT/n1QcRG3zNb9nTF9WJTUVuJKrZcsUiCSs3DIazM1PzhZDWAZ2sWRIm ff9owMEuU2w14R0wBmBYRtsIdf3kqGNeAYO8jZNaIynemDy5oBedYk/+Hr9VH4m+Gh9s NrWDIBtDFLHjA02CQsffd1HiMWSwJNfASkPV8OuQE+CZAFxKiUVPd5aontl4ahCVFulX v4wOhOeBtobafKP0LGwKUPkklAQ+UvQQaFkkoS9v2OvLmB2VprCd4VpAlU1aCiG+qmd5 RSJw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w2si2064410edi.24.2020.10.23.12.25.03; Fri, 23 Oct 2020 12:25:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753888AbgJWTFw (ORCPT + 99 others); Fri, 23 Oct 2020 15:05:52 -0400 Received: from foss.arm.com ([217.140.110.172]:58414 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S462847AbgJWTFw (ORCPT ); Fri, 23 Oct 2020 15:05:52 -0400 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) >