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 D7074C25B79 for ; Fri, 17 May 2024 16:38:06 +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=j2kfbCZyzVFn2eeUIiaBJgoUJusG8GiBc5bZNLoco20=; b=Vue1l0Ts7eu80e cRgU38HxvKZddwFzL7Ogeu6w7XzHCqYX6Lta9LYBzG8P5vtIXOyIboFmBGjHHJbrm0iBjozGWR7LA JjeqWJgu6u9Cth3iXP6DN66dea8HKXaoqmEIIDc0EmzL6l1Yt5UMP1Ewb+XKdd6ueBJHgPQHZfzby j4vO8g59/4JKAf+JXCJFsehQDMqoAVBzirJpX6Nd7uz6scP87es5hPUoJR6Zw8WlosJFsEKHQRlF/ 1RzjBzFYqKAPHjUy7EVZu9rv4X7LkEiVY+nu79oBooWauhaIJyLobihj9nt6QcBChAUGniEWiixD1 gZQS4t6UMt/tKiDrgRGA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s80ah-00000008Px2-3AI2; Fri, 17 May 2024 16:37:55 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s80ae-00000008PvH-1myd for linux-arm-kernel@lists.infradead.org; Fri, 17 May 2024 16:37:54 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 66577CE1A6B; Fri, 17 May 2024 16:37:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AB186C2BD10; Fri, 17 May 2024 16:37:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715963867; bh=gA3mNN9MSiUL2l01xoNls8gykjiUtJVzzR6Yjq2NXA8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=lt6AWjSHgZTioAB8W3Cl7gBYgJ06Fj/XwuSJFRHTZaCxs5+9k8l4+9RL06sWr5reR 5Enz+EN/pSoXlIIKh1hghqoX8L/h7oMVFr9LSm+2TpRayQwTBzZiUWmViloILf1XuL zeE+s+ROfP/ri7VVZ0O+O5xQhSzYU3vD47TWcsAXTjwSE8O4IW14GBlH2m/BlHHI6e iXSYlOzimRvjkWnMs6I+8CvZEIQr4STvetqtfi3pt4IgehHeu3PpT1qwPGklucwDv7 a/5IdQtZ8hEVUAYJwmpWABIf0FhsKfpscAwz7o9VYf7MoEAAZE6s6ySZbf4snxy9tk XKhPffVTmGYwA== Date: Fri, 17 May 2024 17:37:42 +0100 From: Will Deacon To: Douglas Anderson Cc: Robin Murphy , Joerg Roedel , Stephen Boyd , Chen Lin , iommu@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] iommu/arm-smmu: Don't disable next-page prefetcher on devices it works on Message-ID: <20240517163742.GA525@willie-the-truck> References: <20240513161343.1.I5db5530070a1335e6cc3c55e056c2a84b1031308@changeid> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240513161343.1.I5db5530070a1335e6cc3c55e056c2a84b1031308@changeid> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240517_093753_011957_D98D1E4A X-CRM114-Status: GOOD ( 22.79 ) 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 Hi Doug, On Mon, May 13, 2024 at 04:13:47PM -0700, Douglas Anderson wrote: > On sc7180 trogdor devices we get a scary warning at bootup: > arm-smmu 15000000.iommu: > Failed to disable prefetcher [errata #841119 and #826419], check ACR.CACHE_LOCK > > We spent some time trying to figure out how we were going to fix these > errata and whether we needed to do a firmware update. Upon closer > inspection, however, we realized that the errata don't apply to us. > Specifically, the errata document says that for these errata: > * Found in: r0p0 > * Fixed in: r2p2 > > ...and trogdor devices appear to be running r2p4. That means that they > are unaffected despite the scary warning. > > The issue is that the kernel unconditionally tries to disable the > prefetcher even on unaffected devices and then warns when it's unable > to. > > Let's change the kernel to only disable the prefetcher on affected > devices, which will get rid of the scary warning on devices that are > unaffected. As per the comment the prefetcher is > "not-particularly-beneficial" but it shouldn't hurt to leave it on for > devices where it doesn't cause problems. > > Fixes: f87f6e5b4539 ("iommu/arm-smmu: Warn once when the perfetcher errata patch fails to apply") > Signed-off-by: Douglas Anderson > --- > > drivers/iommu/arm/arm-smmu/arm-smmu-impl.c | 21 +++++++++++++-------- > 1 file changed, 13 insertions(+), 8 deletions(-) Just curious, but did you see any performance impact (good or bad) as a result of this patch? The next-page prefetcher has always looked a little naive to me and, with a tendency for tiny TLBs in some implementations, there's a possibility it could do more harm than good. Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel