Re: [PATCH v4 1/2] x86/delay: Fix the wrong asm constraint in `delay_loop()`
From: Ammar Faizi
Date: Wed Mar 02 2022 - 19:15:00 EST
On 3/1/22 4:54 PM, David Laight wrote:
Both the function pointers in that code need killing.
They only have two options (each) so conditional branches
will almost certainly always have been better.
Yes, I agree with simply using conditional branches to handle this
case. But to keep the changes minimal for the stable tree, let's fix
the obvious real bug first. Someone can refactor it later, but I
don't see that as an urgent thing to refactor.
I also wonder how well the comment
The additional jump magic is needed to get the timing stable
on all the CPU' we have to worry about.
applies to any modern cpu!
The code is unchanged since (at least) 2.6.27.
(It might have been moved from another file.)
Not sure about that...
Thanks for the feedback.
--
Ammar Faizi