Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp637658pxb; Thu, 19 Nov 2020 09:57:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJxn0wASW+zuKneVdUWaMkDbMWCNN15oYGm2sUKa71iA8TWE3rsmdGVh4h8xGlStWuDrsd0g X-Received: by 2002:a17:906:578b:: with SMTP id k11mr29868622ejq.330.1605808624207; Thu, 19 Nov 2020 09:57:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605808624; cv=none; d=google.com; s=arc-20160816; b=lbStcwtMCdRhGdH+DAhAf8R5p4LOmKLhYFCZipmiMTjpVIZWpTXCx0dmDd+8q49IV+ hwKQzkcXkXI9sz6vcPYjcTZIt5mSfwq6oMUCQ2i7qadlRxI4i2ZqTdfi3M95uePURngo 9nPPgRsfuaB63vQyJz/mli38PW3rqqffOZeysjgyrvS9LEyCw5Rcco0TNpCpG4OcYF+k cr1Zu30/AVByIy4o5r8wR+FFvbTD4L/RCwg0iSD5UWkGZ1Y/iSLAwZg2RhxXqVie17fw NyOnggPD7IsWe6i5dgGa2wPvubWnr/L2OwthQ14kLnttC7fJ6mIv8AqS5AUn5q0MpCeA gvrg== 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=iXNBoOw0qHKeqm6yKDYmE4VNJr5+d5/hMCqp+zn4TCk=; b=u87T+WJA4hjKxUGLFEv8khQk3+zQ9A1oheqjwclAOeVF5iQ5djsXBCSXIurOP28ATt 2d5B75bZUHrobWWzSCmlI5k+cH6VC2oAwIUQFu/uneex/o5moqq2qXYBHIxy680NardN 645qsPJs8vf7Y/9qfp91gGlTTOGTeHMH8JtRZJFKeyyh5ggrqOpyKqsnDN1lTkrm22ed Y0rFbnP0Hvui015QJJAPq2/iFT/7ImqWMFCwnrpQRlX5R3Ux2ruqR7XZTa9rPg8iAPBC dO9ayarj1mroRzHs5qBhnjX/bObJMekFNucobtPhdcfODjDzsuowDyKqIQ2IYtKfRsZP 5DKw== 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 z17si269367eja.372.2020.11.19.09.56.41; Thu, 19 Nov 2020 09:57:04 -0800 (PST) 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 S1729534AbgKSRyI (ORCPT + 99 others); Thu, 19 Nov 2020 12:54:08 -0500 Received: from mx2.suse.de ([195.135.220.15]:40660 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729335AbgKSRyH (ORCPT ); Thu, 19 Nov 2020 12:54:07 -0500 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 408CFAC22; Thu, 19 Nov 2020 17:54:06 +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 v7 0/7] arm64: Default to 32-bit wide ZONE_DMA Date: Thu, 19 Nov 2020 18:53:52 +0100 Message-Id: <20201119175400.9995-1-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.29.2 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 v6: - Update patch #1 so we reserve crashkernel before request_standard_resources() - Tested on top of Catalin's mem_init() patches. Changes since v5: - Unify ACPI/DT functions Changes since v4: - Fix of_dma_get_max_cpu_address() so it returns the last addressable addres, not the limit 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 | 22 +++++++++------- drivers/acpi/arm64/iort.c | 55 +++++++++++++++++++++++++++++++++++++++ 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, 139 insertions(+), 29 deletions(-) -- 2.29.2