linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iommu: dart: Use readl instead of readl_relaxed for consistency
@ 2023-11-26 16:20 Sven Peter
  2023-11-26 16:54 ` Alyssa Rosenzweig
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Sven Peter @ 2023-11-26 16:20 UTC (permalink / raw)
  To: Hector Martin, Sven Peter, Joerg Roedel, Will Deacon,
	Robin Murphy
  Cc: Alyssa Rosenzweig, asahi, linux-arm-kernel, iommu, linux-kernel

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 <sven@svenpeter.dev>
---
 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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] iommu: dart: Use readl instead of readl_relaxed for consistency
  2023-11-26 16:20 [PATCH] iommu: dart: Use readl instead of readl_relaxed for consistency Sven Peter
@ 2023-11-26 16:54 ` Alyssa Rosenzweig
  2023-11-26 17:31 ` Neal Gompa
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Alyssa Rosenzweig @ 2023-11-26 16:54 UTC (permalink / raw)
  To: Sven Peter
  Cc: Hector Martin, Joerg Roedel, Will Deacon, Robin Murphy, asahi,
	linux-arm-kernel, iommu, linux-kernel

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 <sven@svenpeter.dev>
> ---
>  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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] iommu: dart: Use readl instead of readl_relaxed for consistency
  2023-11-26 16:20 [PATCH] iommu: dart: Use readl instead of readl_relaxed for consistency Sven Peter
  2023-11-26 16:54 ` Alyssa Rosenzweig
@ 2023-11-26 17:31 ` Neal Gompa
  2023-11-27  5:59 ` Hector Martin
  2023-11-27 10:18 ` Joerg Roedel
  3 siblings, 0 replies; 5+ messages in thread
From: Neal Gompa @ 2023-11-26 17:31 UTC (permalink / raw)
  To: Sven Peter
  Cc: Hector Martin, Joerg Roedel, Will Deacon, Robin Murphy,
	Alyssa Rosenzweig, asahi, linux-arm-kernel, iommu, linux-kernel

On Sun, Nov 26, 2023 at 11:20 AM Sven Peter <sven@svenpeter.dev> 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 <sven@svenpeter.dev>
> ---
>  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
>
>

Reviewed-by: Neal Gompa <neal@gompa.dev>


-- 
真実はいつも一つ!/ Always, there's only one truth!

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] iommu: dart: Use readl instead of readl_relaxed for consistency
  2023-11-26 16:20 [PATCH] iommu: dart: Use readl instead of readl_relaxed for consistency Sven Peter
  2023-11-26 16:54 ` Alyssa Rosenzweig
  2023-11-26 17:31 ` Neal Gompa
@ 2023-11-27  5:59 ` Hector Martin
  2023-11-27 10:18 ` Joerg Roedel
  3 siblings, 0 replies; 5+ messages in thread
From: Hector Martin @ 2023-11-27  5:59 UTC (permalink / raw)
  To: Sven Peter, Joerg Roedel, Will Deacon, Robin Murphy
  Cc: Alyssa Rosenzweig, asahi, linux-arm-kernel, iommu, linux-kernel

On 2023/11/27 1:20, 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 <sven@svenpeter.dev>
> ---
>  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));

Acked-by: Hector Martin <marcan@marcan.st>

- Hector

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] iommu: dart: Use readl instead of readl_relaxed for consistency
  2023-11-26 16:20 [PATCH] iommu: dart: Use readl instead of readl_relaxed for consistency Sven Peter
                   ` (2 preceding siblings ...)
  2023-11-27  5:59 ` Hector Martin
@ 2023-11-27 10:18 ` Joerg Roedel
  3 siblings, 0 replies; 5+ messages in thread
From: Joerg Roedel @ 2023-11-27 10:18 UTC (permalink / raw)
  To: Sven Peter
  Cc: Hector Martin, Will Deacon, Robin Murphy, Alyssa Rosenzweig,
	asahi, linux-arm-kernel, iommu, linux-kernel

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 <sven@svenpeter.dev>
> ---
>  drivers/iommu/apple-dart.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

In the future, can you please use "iommu/apple-dart:" as the prefix for
you patch subject-lines? That fits better into the overall convention in
the iommu-tree, thanks.

Regards,

	Joerg

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-11-27 10:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-26 16:20 [PATCH] iommu: dart: Use readl instead of readl_relaxed for consistency Sven Peter
2023-11-26 16:54 ` Alyssa Rosenzweig
2023-11-26 17:31 ` Neal Gompa
2023-11-27  5:59 ` Hector Martin
2023-11-27 10:18 ` Joerg Roedel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).