mirror of
https://github.com/u-boot/u-boot.git
synced 2025-01-19 09:13:31 +08:00
div64: Don't instrument the division function
This function may be called from tracing code, since that code needs to read the timer and this often requires calling do_div(), which calls __div64_32(). If this function is instrumented it causes an infinite loop, since emitting a trace record requests the time, which in turn emits a trace record, etc. Update the prototype to prevent instrumentation code being added. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
ca49b2c6e2
commit
f611a46ef1
@ -25,7 +25,13 @@
|
||||
#if BITS_PER_LONG == 32
|
||||
|
||||
#ifndef __div64_32
|
||||
u32 __attribute__((weak)) __div64_32(u64 *n, u32 base)
|
||||
/*
|
||||
* Don't instrument this function as it may be called from tracing code, since
|
||||
* it needs to read the timer and this often requires calling do_div(), which
|
||||
* calls this function.
|
||||
*/
|
||||
uint32_t __attribute__((weak, no_instrument_function)) __div64_32(u64 *n,
|
||||
u32 base)
|
||||
{
|
||||
u64 rem = *n;
|
||||
u64 b = base;
|
||||
|
Loading…
Reference in New Issue
Block a user