]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/panic: Add a u64 divide by 10 for arm32
authorJocelyn Falempe <jfalempe@redhat.com>
Fri, 27 Jun 2025 12:38:19 +0000 (14:38 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:34:43 +0000 (16:34 +0200)
commit7c626f6cb0e013bf82376a1234ac8c66ab78da4f
treed6e90d119a1a1686e5db49937d69efac646c7fc9
parent72097f917f20fd9edc6e9436c98fa31af8f71ffd
drm/panic: Add a u64 divide by 10 for arm32

[ Upstream commit 9af8f2b469c0438620832f3729a3c5c03853b56b ]

On 32bits ARM, u64 divided by a constant is not optimized to a
multiply by inverse by the compiler [1].
So do the multiply by inverse explicitly for this architecture.

Link: https://github.com/llvm/llvm-project/issues/37280
Reported-by: Andrei Lalaev <andrey.lalaev@gmail.com>
Closes: https://lore.kernel.org/dri-devel/c0a2771c-f3f5-4d4c-aa82-d673b3c5cb46@gmail.com/
Fixes: 675008f196ca ("drm/panic: Use a decimal fifo to avoid u64 by u64 divide")
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/drm_panic_qr.rs