Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp4853717pxu; Wed, 21 Oct 2020 07:02:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQgbOb/rIKhDdIODB/NbcyQsOCW9nguVde4o3CQiU+jjukniphIw4VEjYxXKDuJT9A0rLi X-Received: by 2002:a05:600c:296:: with SMTP id 22mr3682989wmk.134.1603288933927; Wed, 21 Oct 2020 07:02:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603288933; cv=none; d=google.com; s=arc-20160816; b=B719i3SUbztN9mSQedF8Dgl8XMqXDnjTp9lyX4/gd8SnRlJpmRaimGVU/78rBVYQfZ 8KIo0bebXZFV4yrLFzgi2JQBojjH3pB7v2s2yQHXAf0ydVjsAvEHAu+yqER+XUHShkR2 IX/3rKD256JXigIS58XZvFQaU9qLi5xDgM/sFqPjSpIIkgqDBwKMoy/0P9AymCLSARKd uR3ekiLIOb1cL8jL+1Y9A5hC1aaSTcbcMBbT2EiHdYeUY7s45yahhrB19F3ByHN3pM/7 QJ/dt/jjWgj3gDPsIjiQ0kkw2JNCOhavWSYjb7ecn3DvI0Lz+NkafJLf8oiNPIOonJHS E9uA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=vF2ZnNchMuF0vcDvvJZEFM/EAGE11lEBK4EDhxSUtkU=; b=LcutROZoyhlRvqa/ehzfKubk5Md0AQeHrMlMye0ZZzZORxgmFGlcfklwYFp5BoSfEc fjoyZ7X0h/yDlSDsJgJa950wNgzcQKE1z1oT9+6KXsF3DwA5p+E65v6eTI+gDduNQJNR EyydaaaxDi9KMJNwg5w1tUasqwEtwDo+fXzJmzRZvDsDoY6OabSzPRoqEgqMn2PHkA3V aZC1gPLAExe9QdPd1UHBM+C2FzN9S3Ei1HEgLsYHTKZ0d11b41UI+/uTE2Z+cly03fLL 0zZKmjlw0dWZD9cs/brLbwgtRBWHnCCJsYAztzf+oBlqZEZg0dO1KkAbPWyuC65tTNKy gpmQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f2si1169766edu.586.2020.10.21.07.01.51; Wed, 21 Oct 2020 07:02:13 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2442379AbgJUMf2 (ORCPT + 99 others); Wed, 21 Oct 2020 08:35:28 -0400 Received: from mx2.suse.de ([195.135.220.15]:50728 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2440413AbgJUMf2 (ORCPT ); Wed, 21 Oct 2020 08:35:28 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id AA83AAC82; Wed, 21 Oct 2020 12:35:26 +0000 (UTC) From: Nicolas Saenz Julienne To: 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, jeremy.linton@arm.com, iommu@lists.linux-foundation.org, devicetree@vger.kernel.org, will@kernel.org, lorenzo.pieralisi@arm.com, guohanjun@huawei.com, Nicolas Saenz Julienne , linux-acpi@vger.kernel.org, linux-mm@kvack.org, linux-riscv@lists.infradead.org Subject: [PATCH v4 0/7] arm64: Default to 32-bit wide ZONE_DMA Date: Wed, 21 Oct 2020 14:34:30 +0200 Message-Id: <20201021123437.21538-1-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. --- 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(-) -- 2.28.0