diff options
author | Alexandru Gagniuc <mr.nuke.me@gmail.com> | 2014-01-12 15:42:58 -0600 |
---|---|---|
committer | Alexandru Gagniuc <mr.nuke.me@gmail.com> | 2014-01-13 04:03:06 +0100 |
commit | af4bd599ca84478c9109a4bdba43a790ec5bbc2f (patch) | |
tree | bc84586a032b9fce953b96084237d1dc56b49a57 /src/include | |
parent | 910ce017571b85f2139c9ab1fcd94a8a88dd4f48 (diff) | |
download | coreboot-af4bd599ca84478c9109a4bdba43a790ec5bbc2f.tar.xz |
lib: Make log2() available in romstage on ARM, not just x86
On x86, log2() is defined as an inline function in arch/io.h. This is
a remnant of ROMCC, and forced us to not include clog2.c in romstage.
As a result, romstage on ARM has no log2().
Use the inline log2 only with ROMCC, but otherwise, use the one in
clog2.c.
Change-Id: Ifef2aa0a7b5a1db071a66f2eec0be421b8b2a56d
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Reviewed-on: http://review.coreboot.org/4681
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/lib.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/include/lib.h b/src/include/lib.h index 5fc390a4a0..3a515332b1 100644 --- a/src/include/lib.h +++ b/src/include/lib.h @@ -23,7 +23,7 @@ #define __LIB_H__ #include <stdint.h> -#ifndef __PRE_RAM__ /* Conflicts with inline function in arch/io.h */ +#if !defined(__ROMCC__) /* Conflicts with inline function in arch/io.h */ /* Defined in src/lib/clog2.c */ unsigned long log2(unsigned long x); #endif |