Skip to content

Commit 4d17c25

Browse files
Frederic WeisbeckerKAGA-KOKO
Frederic Weisbecker
authored andcommitted
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: 19e2d91 ("delay: Rework udelay and ndelay") Reported-by: Chen-Yu Tsai <[email protected]> Signed-off-by: Frederic Weisbecker <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Tested-by: Chen-Yu Tsai <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Reviewed-by: Chen-Yu Tsai <[email protected]> Link: https://lore.kernel.org/all/[email protected]
1 parent f5807b0 commit 4d17c25

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/asm-generic/delay.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,11 @@ static __always_inline void ndelay(unsigned long nsec)
7575
{
7676
if (__builtin_constant_p(nsec)) {
7777
if (nsec >= DELAY_CONST_MAX)
78-
__bad_udelay();
78+
__bad_ndelay();
7979
else
8080
__const_udelay(nsec * NDELAY_CONST_MULT);
8181
} else {
82-
__udelay(nsec);
82+
__ndelay(nsec);
8383
}
8484
}
8585
#define ndelay(x) ndelay(x)

0 commit comments

Comments
 (0)