* [PATCH] soc: apple: Fix swapped paddr and size shift
@ 2026-11-08 14:35 Sven Peter
2026-11-08 14:58 ` Janne Grunau
2026-11-08 15:07 ` Sven Peter
0 siblings, 2 replies; 3+ messages in thread
From: Sven Peter @ 2026-11-08 14:35 UTC (permalink / raw)
To: Janne Grunau, Neal Gompa
Cc: asahi, linux-arm-kernel, linux-kernel, Sven Peter
Right now we assign the paddr shift to the size shift and vice-versa.
Luckily, this doesn't matter because they are the same for all SART
versions but fixing this doesn't hurt.
Fixes: b170143ae111 ("soc: apple: Add SART driver")
Signed-off-by: Sven Peter <sven@kernel.org>
---
drivers/soc/apple/sart.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/soc/apple/sart.c b/drivers/soc/apple/sart.c
index 66b99955b395..5f1f9ec5d311 100644
--- a/drivers/soc/apple/sart.c
+++ b/drivers/soc/apple/sart.c
@@ -258,8 +258,8 @@ static int sart_set_entry(struct apple_sart *sart, int index, u8 flags,
if (paddr & ((1 << sart->ops->paddr_shift) - 1))
return -EINVAL;
- paddr >>= sart->ops->size_shift;
- size >>= sart->ops->paddr_shift;
+ paddr >>= sart->ops->paddr_shift;
+ size >>= sart->ops->size_shift;
if (size > sart->ops->size_max)
return -EINVAL;
---
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
change-id: 20261108-b4-sart-fix-5bd3c614af66
Best regards,
--
Sven Peter <sven@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] soc: apple: Fix swapped paddr and size shift
2026-11-08 14:35 [PATCH] soc: apple: Fix swapped paddr and size shift Sven Peter
@ 2026-11-08 14:58 ` Janne Grunau
2026-11-08 15:07 ` Sven Peter
1 sibling, 0 replies; 3+ messages in thread
From: Janne Grunau @ 2026-11-08 14:58 UTC (permalink / raw)
To: Sven Peter; +Cc: Neal Gompa, asahi, linux-arm-kernel, linux-kernel
On Sun, Nov 08, 2026 at 03:35:11PM +0100, Sven Peter wrote:
> Right now we assign the paddr shift to the size shift and vice-versa.
> Luckily, this doesn't matter because they are the same for all SART
> versions but fixing this doesn't hurt.
>
> Fixes: b170143ae111 ("soc: apple: Add SART driver")
> Signed-off-by: Sven Peter <sven@kernel.org>
> ---
> drivers/soc/apple/sart.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/soc/apple/sart.c b/drivers/soc/apple/sart.c
> index 66b99955b395..5f1f9ec5d311 100644
> --- a/drivers/soc/apple/sart.c
> +++ b/drivers/soc/apple/sart.c
> @@ -258,8 +258,8 @@ static int sart_set_entry(struct apple_sart *sart, int index, u8 flags,
> if (paddr & ((1 << sart->ops->paddr_shift) - 1))
> return -EINVAL;
>
> - paddr >>= sart->ops->size_shift;
> - size >>= sart->ops->paddr_shift;
> + paddr >>= sart->ops->paddr_shift;
> + size >>= sart->ops->size_shift;
>
> if (size > sart->ops->size_max)
> return -EINVAL;
Reviewed-by: Janne Grunau <j@jannau.net>
Janne
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] soc: apple: Fix swapped paddr and size shift
2026-11-08 14:35 [PATCH] soc: apple: Fix swapped paddr and size shift Sven Peter
2026-11-08 14:58 ` Janne Grunau
@ 2026-11-08 15:07 ` Sven Peter
1 sibling, 0 replies; 3+ messages in thread
From: Sven Peter @ 2026-11-08 15:07 UTC (permalink / raw)
To: Janne Grunau, Neal Gompa, Sven Peter
Cc: asahi, linux-arm-kernel, linux-kernel
On Sun, 08 Nov 2026 15:35:11 +0100, Sven Peter wrote:
> Right now we assign the paddr shift to the size shift and vice-versa.
> Luckily, this doesn't matter because they are the same for all SART
> versions but fixing this doesn't hurt.
Applied to local tree (apple-soc/drivers-7.5), thanks!
[1/1] soc: apple: Fix swapped paddr and size shift
https://github.com/AsahiLinux/linux/commit/7f8656f4f83a
Best regards,
--
Sven Peter <sven@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-11-08 15:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-08 14:35 [PATCH] soc: apple: Fix swapped paddr and size shift Sven Peter
2026-11-08 14:58 ` Janne Grunau
2026-11-08 15:07 ` Sven Peter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®