From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-187.mta1.migadu.com (out-187.mta1.migadu.com [95.215.58.187]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9D29DD30D for ; Sun, 26 Nov 2023 16:54:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=rosenzweig.io Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rosenzweig.io Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=rosenzweig.io header.i=@rosenzweig.io header.b="wtKzHquY" Date: Sun, 26 Nov 2023 12:54:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rosenzweig.io; s=key1; t=1701017661; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ZAmJjrTeu7RdpM+b+JpbyW5DOb3ge7UnfELqR9X21vo=; b=wtKzHquY9kuLOewD37q4BwVrha6NkJj6WgOHRMW2fatDWrh95MB18j0uarel5fLWSUlwzm qMFnbyvDB/aofTADTJ/nlhFvUuQllx8s/wZampc23S0zO6pAPeakTYc2B72HvYNGO0ViZj ZmTQ56CtscqX2ywNCKwpNtBVW1BgBeWIle2yzRtaYZKzXdq24efeXVX9GmJhOG2xoixOzh DimbDLLlpYvGnSBjMNL0rSQqoGv07vao0UMgEopo43J6LvDeCyvYPBrp7gTcbarL4bdbDN TgHm6XFBme6tpkYZ9h6dMbGtwAGPEDCLLWRg4CxtmbklMpqA5AXPGobkAlsKRw== X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Alyssa Rosenzweig To: Sven Peter Cc: Hector Martin , Joerg Roedel , Will Deacon , Robin Murphy , asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH] iommu: dart: Use readl instead of readl_relaxed for consistency Message-ID: References: <20231126162009.17934-1-sven@svenpeter.dev> Precedence: bulk X-Mailing-List: asahi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231126162009.17934-1-sven@svenpeter.dev> X-Migadu-Flow: FLOW_OUT r-b On Sun, Nov 26, 2023 at 05:20:09PM +0100, Sven Peter wrote: > While the readl_relaxed in apple_dart_suspend is correct the rest of the > driver uses the non-relaxed variants everywhere and the single > readl_relaxed is inconsistent and possibly confusing. > > Signed-off-by: Sven Peter > --- > drivers/iommu/apple-dart.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/iommu/apple-dart.c b/drivers/iommu/apple-dart.c > index 59cf256bf40f..c7f047ce0a7a 100644 > --- a/drivers/iommu/apple-dart.c > +++ b/drivers/iommu/apple-dart.c > @@ -1272,7 +1272,7 @@ static __maybe_unused int apple_dart_suspend(struct device *dev) > unsigned int sid, idx; > > for (sid = 0; sid < dart->num_streams; sid++) { > - dart->save_tcr[sid] = readl_relaxed(dart->regs + DART_TCR(dart, sid)); > + dart->save_tcr[sid] = readl(dart->regs + DART_TCR(dart, sid)); > for (idx = 0; idx < dart->hw->ttbr_count; idx++) > dart->save_ttbr[sid][idx] = > readl(dart->regs + DART_TTBR(dart, sid, idx)); > -- > 2.34.1 > 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 53E77C4167B for ; Sun, 26 Nov 2023 16:55:11 +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=ei+SNedsBzWXcvJO3S5uQt16tOpmkZkcjdU2bWiR1OE=; b=w+0EfskD2iQ6wc PFcOSjYfqD+o5pw+R8HLXl5riK0SnEv/qBJH/VxbrWyRFiHi9jxisPdTwfULVresv+iuFLJbUXETh JLxBXh3IHpwPlFJMx6Zx+Kc/JyqQNmyuhxu2p0mMnPzcxu5KUPDsITqwBOhWh8zvq9RHdsyWAf9MA UKwdNQ5L3aK1wLbTQA6X4MmCLbK1yqcDiIzAvIq1uB7mqp46XZW1ijAJCMvsJ/wyxvT87DsobDxG4 QwHi82SJWg8GQKuvV3uaHAnqvsTgEL513eeHnvzYexuiMWjeRyjFGdALb9AUtCG7IdiVgWnatP2J1 cb8QAElo+FdcjWwVe8nQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r7IOv-00D6Ob-2Q; Sun, 26 Nov 2023 16:54:33 +0000 Received: from out-175.mta1.migadu.com ([2001:41d0:203:375::af]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r7IOs-00D6IN-00 for linux-arm-kernel@lists.infradead.org; Sun, 26 Nov 2023 16:54:32 +0000 Date: Sun, 26 Nov 2023 12:54:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rosenzweig.io; s=key1; t=1701017661; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ZAmJjrTeu7RdpM+b+JpbyW5DOb3ge7UnfELqR9X21vo=; b=wtKzHquY9kuLOewD37q4BwVrha6NkJj6WgOHRMW2fatDWrh95MB18j0uarel5fLWSUlwzm qMFnbyvDB/aofTADTJ/nlhFvUuQllx8s/wZampc23S0zO6pAPeakTYc2B72HvYNGO0ViZj ZmTQ56CtscqX2ywNCKwpNtBVW1BgBeWIle2yzRtaYZKzXdq24efeXVX9GmJhOG2xoixOzh DimbDLLlpYvGnSBjMNL0rSQqoGv07vao0UMgEopo43J6LvDeCyvYPBrp7gTcbarL4bdbDN TgHm6XFBme6tpkYZ9h6dMbGtwAGPEDCLLWRg4CxtmbklMpqA5AXPGobkAlsKRw== X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Alyssa Rosenzweig To: Sven Peter Cc: Hector Martin , Joerg Roedel , Will Deacon , Robin Murphy , asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH] iommu: dart: Use readl instead of readl_relaxed for consistency Message-ID: References: <20231126162009.17934-1-sven@svenpeter.dev> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20231126162009.17934-1-sven@svenpeter.dev> X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231126_085430_593853_8C4B9B55 X-CRM114-Status: GOOD ( 16.42 ) 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 r-b On Sun, Nov 26, 2023 at 05:20:09PM +0100, Sven Peter wrote: > While the readl_relaxed in apple_dart_suspend is correct the rest of the > driver uses the non-relaxed variants everywhere and the single > readl_relaxed is inconsistent and possibly confusing. > > Signed-off-by: Sven Peter > --- > drivers/iommu/apple-dart.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/iommu/apple-dart.c b/drivers/iommu/apple-dart.c > index 59cf256bf40f..c7f047ce0a7a 100644 > --- a/drivers/iommu/apple-dart.c > +++ b/drivers/iommu/apple-dart.c > @@ -1272,7 +1272,7 @@ static __maybe_unused int apple_dart_suspend(struct device *dev) > unsigned int sid, idx; > > for (sid = 0; sid < dart->num_streams; sid++) { > - dart->save_tcr[sid] = readl_relaxed(dart->regs + DART_TCR(dart, sid)); > + dart->save_tcr[sid] = readl(dart->regs + DART_TCR(dart, sid)); > for (idx = 0; idx < dart->hw->ttbr_count; idx++) > dart->save_ttbr[sid][idx] = > readl(dart->regs + DART_TTBR(dart, sid, idx)); > -- > 2.34.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel