From mboxrd@z Thu Jan 1 00:00:00 1970 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 C6DE0C77B7A for ; Wed, 17 May 2023 11:08:47 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=qUXDGqtvkn/WtZWK4qbShZC69UtDn+2H6s4mcpam1zA=; b=J+Bl8uInWpUUZa 4KgriIiBPv/nP68e/o979gnhXUUmDhl6gejlurusQs1+uaZlTe+2mX5alH75EwheHg6E3NaYPH5ok /cZOYcUlsGOB5xqWXvQFc9a6gtOFVnjMRN1gK+a0Hyou3OgCXgnevBOpK9jsuAUlbffGfFVLMZkai Mx0m2uk1iT5pWWb64NQs4x8djXFGnDpMDkB60tkT0a9RTC3h6dFjzwthtTNAtAw44ALYIOF+oryyD htXuk1H6KY+fvIA73NrjFlHHUQ8WrktPsiiZy2WENy5NBbsq4UAZJMO2CIyKLhX+DgwdnBPhexx5q nIDBO7fi4xwYJ9MZq9Uw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pzF13-009Xrw-01; Wed, 17 May 2023 11:08:21 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pzF0z-009Xpj-0B for linux-arm-kernel@lists.infradead.org; Wed, 17 May 2023 11:08:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=M6xwG2+HPH4zkwPeJfSd15pyX+yK0F+1V7TCPUs7M1w=; b=qjWjtserJpWLclm/dVrT1VSVvF PQAWW8eNAZ7qpwTRW1MOEONkITDttu7cXRVqoN2BhNtfGGAu17BXLKbGzAykRNfDFJDVjN44EYwfU 7ehm0YDcFuWvTY8/CTr1Z9zXYAmF3W9RmUabVkV7yv/wFxlFNt3t+ouvMyDz2YD3cCiO9PRLM2eRv d/0hBR1Dt5YJpJQTppBjMxk9GFxyEptLGolSla3TcqGyj9PPLNO6NqueaoJuiObp3ilktYM4R1jD0 IsN2M6Rb0j+Sba3DKsLuyfxKkTpfXIpTgMXPWgOzOUFd45+TBy1ThKa4pteWIc4yUQMzzMTBsxwxT bNAhVW9g==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:55470) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pzF0v-0007cI-8g; Wed, 17 May 2023 12:08:13 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1pzF0u-0001ma-Iu; Wed, 17 May 2023 12:08:12 +0100 Date: Wed, 17 May 2023 12:08:12 +0100 From: "Russell King (Oracle)" To: Arnd Bergmann Cc: Stefan Wahren , Robin Murphy , Florian Fainelli , Maxime Ripard , Christoph Hellwig , Phil Elwell , Linux ARM , Alexander Stein Subject: Re: ARM_LPAE + VMSPLIT_2G cause swiotlb warning on Raspberry Pi 4 Message-ID: References: <41111a5d-cce2-a863-322e-0a5652efa8c5@i2se.com> <58772ea3-ae92-2797-75b9-3b4436211390@arm.com> <6012151c-f60e-8ef9-7f8e-4392366836ca@i2se.com> <5cda1c4b-4c32-4509-9b02-62b2c6b50827@app.fastmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230517_040817_088739_167B48BC X-CRM114-Status: GOOD ( 21.91 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, May 17, 2023 at 12:06:35PM +0100, Russell King (Oracle) wrote: > On Wed, May 17, 2023 at 12:54:30PM +0200, Arnd Bergmann wrote: > > On Wed, May 17, 2023, at 12:34, Arnd Bergmann wrote: > > > On Wed, May 17, 2023, at 12:24, Stefan Wahren wrote: > > >> Am 17.05.23 um 12:06 schrieb Robin Murphy: > > >>> On 2023-05-17 07:23, Stefan Wahren wrote: > > > > > > I think LPAE doesn't affect it, the configurations that Stefan > > > mentioned were LPAE with VMSPLIT_2G (broken), non-LPAE with > > > VMSPLIT_3G (works) and LPAE with VMSPLIT_3G (works). I would assume > > > that non-LPAE with VMSPLIT_2G or VMSPLIT_3G_OPT is also broken. > > > > > >> This one? > > >> [ 0.000000] software IO TLB: area num 4. > > >> [ 0.000000] software IO TLB: mapped [mem > > >> 0x0000000069e7f000-0x000000006de7f000] (64MB) > > > > > > Indeed, that is clearly above the .dma_zone_size value from > > > the machine descriptor. > > > > It looks like Arm does not set the ARCH_LOW_ADDRESS_LIMIT > > constant for swiotlb, so it gets the default 4GB maximum. > > > > I think this would work on arm, though it's probably not the > > correct fix in general, as I think MAX_DMA_ADDRESS is meant > > to refer to the ISA_DMA_API limit, not the ZONE_DMA limit.: > > MAX_DMA_ADDRESS is a _virtual_ address. What is ARCH_LOW_ADDRESS_LIMIT? > > I can find no reference to this in obvious places (mm/ lib/ kernel/ > drivers/base/ drivers/iommu/) Found it... it's a physial address. So your patch is almost certainly wrong, since you're passing a virtual address into a function wanting a physical address. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel