Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp3818447pxu; Mon, 12 Oct 2020 01:49:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzWh+G/QDd4OuZjbcBvFxafV3M0nvRKuZpXpWi/zXX8Sc/2KkCZKkJySCnHRJXeaOHKbibV X-Received: by 2002:aa7:dd01:: with SMTP id i1mr13108723edv.84.1602492580593; Mon, 12 Oct 2020 01:49:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602492580; cv=none; d=google.com; s=arc-20160816; b=TTWJBkRprk7Cvv3hgMV58049gY7imjGuZb5Bzmykf8yUoJ7AAsVugFCRe1oo47Ku75 Pz03HJMi5J4iMT7j6EiHTNMC6sG3R3I7Csam97SaATG7m7cNjlZsaWeFo6gB9bI6Z8Z5 mWduFcFD1TgHieUNu5Sjo0snvHbtW5MVFCptg/c2KHZVtFg6/SedwoKQPg3ftd3DVVfj iV1TF3vN6/EXSwFdRosZdMT54fTWcBcjCS+wFOdDzss1oq8kc4jp0ADjl3IQhwmiCiuD 0NvItxKR/zjDq8wfpDnYKSJDpDu0WJOd2P8x5MtcNC455k8LL8ZqBUPFu+5RwP6rEEht Ab/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=Cil3J1Mez7T+skN6oYzxOBnje+askQIE3ZZaz/bVqjs=; b=WsTCVWD7/5zxnUig9fGi9fevCp9tiRZN17BGVwMcr2h3MyuxS2595R46Lo6UeS1b1q Gxwz7+b5eZh1Nllt888pi28vdYQHZyBBvjEsh+oNEervgflhVVS/0XX9M68yslhL3dnT zMdk89Kfdcywuej1umxjqRVMs6JF8mmcgTQrQAkUGq5K1aP8TGUCHQ82JEiS3ml4eSAv wlKRAYdU+dJc+sZm/PCSWezsulIUYSKwQi+jPPuLXNccbJKiOIoucBoGyCH8on8ftFpJ UxidnJgxGV38j7fegtBspkaiJ42pXT+2g4VG2H2tFBDONsV2SfMa3z3bs7n2leGWwy+3 vGbw== 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 e9si11805356ejd.398.2020.10.12.01.49.17; Mon, 12 Oct 2020 01:49:40 -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 S1726906AbgJLIrx (ORCPT + 99 others); Mon, 12 Oct 2020 04:47:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:34578 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726104AbgJLIrw (ORCPT ); Mon, 12 Oct 2020 04:47:52 -0400 Received: from gaia (unknown [95.149.105.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DFCCE20773; Mon, 12 Oct 2020 08:47:49 +0000 (UTC) Date: Mon, 12 Oct 2020 09:47:47 +0100 From: Catalin Marinas To: Christoph Hellwig Cc: Ard Biesheuvel , Lorenzo Pieralisi , Nicolas Saenz Julienne , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Will Deacon , Linux Kernel Mailing List , Linux Memory Management List , iommu@lists.linux-foundation.org, Rob Herring , linux-rpi-kernel@lists.infradead.org, Frank Rowand , Linux ARM , Robin Murphy Subject: Re: [PATCH 1/4] of/fdt: Update zone_dma_bits when running in bcm2711 Message-ID: <20201012084746.GA9844@gaia> References: <20201002115541.GC7034@gaia> <12f33d487eabd626db4c07ded5a1447795eed355.camel@suse.de> <20201009071013.GA12208@lst.de> <513833810c15b5efeab7c3cbae1963a78c71a79f.camel@suse.de> <20201009152433.GA19953@e121166-lin.cambridge.arm.com> <20201009171051.GL23638@gaia> <20201012064715.GA2548@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201012064715.GA2548@lst.de> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 12, 2020 at 08:47:15AM +0200, Christoph Hellwig wrote: > On Fri, Oct 09, 2020 at 06:10:52PM +0100, Catalin Marinas wrote: > > kdump wants DMA-able memory and, > > DMAable by whom? The only way to guranteed DMAable memory is to use > the DMA memory allocator(s) and pass a specific device to them. Everyting > else is just fundamentally broken. Note that even when device is not > DMAable we can still use swiotlb to access it. What I meant is that the new kexec'ed kernel needs some memory in the ZONE_DMA range, currently set to the bottom 30-bit even for platforms that can cope with the whole 32-bit range (anything other than RPi4). The memory range available to the kdump kernels is limited to what reserve_crashkernel() allocated, which may not fit in the lower 1GB. There are two ongoing threads (complementary): 1. Change the arm64 reserve_crashkernel() similar to x86 which allocates memory above 4G with a small block in the ZONE_DMA range. 2. Allow zone_dma_bits to be 32 for arm64 platforms other than RPi4. The second point also fixes some regressions with CMA reservations that could no longer fit in the lower 1GB. -- Catalin