From patchwork Sat Jun 3 09:06:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 13266125 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BA9D2C7EE24 for ; Sat, 3 Jun 2023 09:08:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=14ghfD5TNzl+lC/saEYtGVdeXwC2V8d2QWD2SnHdung=; b=1oE0epzlGjL/NO IcMtXEkoo/PXCdwtZlgHwdSv2E/QufiV78SXbPD5mZTlMwNmtg5EFQ7epjQoMAeGi5eZRH8ibCJnE 6EhjR+fLMmBqlZmXzXTHVTcgtatrZsN/XDpkplSS1jPupYdLrhkVYLf8gufDHM3pnr6F8rG/+76Bi MfREXmNetFDmZsXxkq7R58VuyQQJ773dEquGUxLWxxfcM+WbK6voLJGPOZdGl0ZM9RNPcrMlQySbE s7bztuRG1PgqvsMKa9xJQK0RJL++qB49JCFAHBDE8iDSc3TBYOODDkcCmRZxDSVAdfNnE6e9bKpcX pHNPUXCOXuEif9TqF4KQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q5NEV-009AoG-11; Sat, 03 Jun 2023 09:07:35 +0000 Received: from mout.kundenserver.de ([212.227.126.134]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q5NES-009AnG-13 for linux-arm-kernel@lists.infradead.org; Sat, 03 Jun 2023 09:07:34 +0000 Received: from stefanw-SCHENKER ([37.4.248.58]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MzCMN-1qHyAW30GB-00wBcC; Sat, 03 Jun 2023 11:07:19 +0200 From: Stefan Wahren To: Russell King , Arnd Bergmann , Florian Fainelli , Robin Murphy , Christoph Hellwig , Nicolas Saenz Julienne Cc: linux-arm-kernel@lists.infradead.org, Stefan Wahren Subject: [PATCH] ARM: mm: Fix ARCH_LOW_ADDRESS_LIMIT when CONFIG_ZONE_DMA Date: Sat, 3 Jun 2023 11:06:43 +0200 Message-Id: <20230603090643.6799-1-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Provags-ID: V03:K1:hDEgCp4dx28xq1W6AJ43Da045SI1T76Fj7pV2HfQ4zTu23jR3XD Huvlb85DlSzXy+lt7NeWtUHWZSpG64dTTRbep1zh9eCULHmD5Lx2fleQpvo3y+zR646Fm0I dWeBrS3lgkyGrqvf3iiuAxrMHXab54vQcsinbFFSZ33trhLNNIcazJox5HJRSJ+yg+ZSmI2 IIYY4c0DGDJTYjvgqX3qA== UI-OutboundReport: notjunk:1;M01:P0:owKbO37i7Vw=;32d+pTF/213hmCTb+WDdf5hRSWi 0vGEj7OhUS2jN/VEsrE1aXu+IaeolSsYSKkvzWb1/uBcXFLKKL/TIATq0aBHe0UNkjVQ+3T9G UuVwVqivL5Z1seQttOppKsEDc7IbXaw/40h70TkVAbw1Zq7KKtLFP1rjrRDSJShFmSdHt5c7Z GkX9pq2gGlUkRuxALmFYoYp1EXFcgZkJiyfhMC10ATTv++iouAPM2UHb7ASpOn55nkcws4qPQ 85oyiTUaiaOqhxOunYBKrcpmWGgVCSwE8Jc75+WOcd08g+6oemRQ5pLGCA1exFOrObZsHc/sZ OtgfA9WnlHlwjaGiuVgf8st/zhjzlW8O4Rv2YyqqrfAfy0SVA13pFj2ByyZX0IwUQBJIf3H8a bVpJkJiJr4TKHBhNeMlRMxW0fygfQmQKk8C+43Dts3eC42/qRKqYuPbd8DnbvH+4uEhMg4gok Z7GHG7yLy+yep0vANbatOpPfBCfHXX7C0bw9dAZuSOTti31Yevl0ppvSKlwrGKOa6Uptmj4th O3JuR4VNFMrLLMRyNoWQ2OKnrhhRENqPJIjKiekREipvKv39HkKrevj5pwW+mxG4ptT9FdFyt UueUnFe8S0plAkCArAtNCnCj/a6j4+RODqynZgz2eOKczuPrJce35w5wqfMHqrnvA2bS+rnmZ Kz45+YSP5lzDwgwy+7wVCDybqerH/4y7bSTJs+ho8A== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230603_020732_696380_372B5D46 X-CRM114-Status: UNSURE ( 9.63 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Configuring VMSPLIT_2G + LPAE on Raspberry Pi 4 leads to SWIOTLB buffer allocation beyond platform dma_zone_size of SZ_1G, which results in broken SD card boot. So fix this be setting ARCH_LOW_ADDRESS_LIMIT in CONFIG_ZONE_DMA case. Suggested-by: Russell King Fixes: e9faf9b0b07a ("ARM: add multi_v7_lpae_defconfig") Signed-off-by: Stefan Wahren Reviewed-by: Arnd Bergmann --- arch/arm/include/asm/dma.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/include/asm/dma.h b/arch/arm/include/asm/dma.h index c6aded1b069c..e2a1916013e7 100644 --- a/arch/arm/include/asm/dma.h +++ b/arch/arm/include/asm/dma.h @@ -12,6 +12,9 @@ extern phys_addr_t arm_dma_zone_size; \ arm_dma_zone_size && arm_dma_zone_size < (0x100000000ULL - PAGE_OFFSET) ? \ (PAGE_OFFSET + arm_dma_zone_size) : 0xffffffffUL; }) + +extern phys_addr_t arm_dma_limit; +#define ARCH_LOW_ADDRESS_LIMIT arm_dma_limit #endif #ifdef CONFIG_ISA_DMA_API