diff options
author | Frederic Weisbecker <frederic@kernel.org> | 2024-11-21 16:29:31 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2024-11-29 11:40:22 +0100 |
commit | 4d17c25eaf5d8b95d70726e6946e8eb94619e139 (patch) | |
tree | 0b2f6d7bb5f5b2d3513defd542cf5ebe2bbebfcc /include | |
parent | f5807b0606da7ac7c1b74a386b22134ec7702d05 (diff) |
delay: Fix ndelay() spuriously treated as udelay()
A recent rework on delay functions wrongly ended up calling __udelay()
instead of __ndelay() for nanosecond delays, increasing those by 1000.
As a result hangs have been observed on boot
Restore the right function calls.
Fixes: 19e2d91d8cb1 ("delay: Rework udelay and ndelay")
Reported-by: Chen-Yu Tsai <wenst@chromium.org>
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Chen-Yu Tsai <wenst@chromium.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
Link: https://lore.kernel.org/all/20241121152931.51884-1-frederic@kernel.org
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-generic/delay.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/asm-generic/delay.h b/include/asm-generic/delay.h index 76cf237b6e4c..03b0ec7afca6 100644 --- a/include/asm-generic/delay.h +++ b/include/asm-generic/delay.h @@ -75,11 +75,11 @@ static __always_inline void ndelay(unsigned long nsec) { if (__builtin_constant_p(nsec)) { if (nsec >= DELAY_CONST_MAX) - __bad_udelay(); + __bad_ndelay(); else __const_udelay(nsec * NDELAY_CONST_MULT); } else { - __udelay(nsec); + __ndelay(nsec); } } #define ndelay(x) ndelay(x) |