vendorcode/cavium/include: Make bdk_pop and dpop static
Fix an undefined reference error with GCC 8.1 /cb- build/Testing_coreboot.0/CAVIUM_CN8100_SFF_EVB/romstage/vendorcode/cavium/bdk /libbdk-dram/bdk-dram-size.o: In function `bdk_dram_get_size_mbytes': /home/coreboot/slave-root/workspace/Testing_coreboot/src/vendorcode/cavium/bdk /libbdk-dram/bdk-dram-size.c:198: undefined reference to `bdk_pop' /cb- build/Testing_coreboot.0/CAVIUM_CN8100_SFF_EVB/romstage/vendorcode/cavium/bdk /libbdk-dram/bdk-dram-test.o: In function `bdk_get_num_cores': /home/coreboot/slave- root/workspace/Testing_coreboot/src/vendorcode/cavium/include/bdk/libbdk-hal /bdk-utils.h:164: undefined reference to `bdk_dpop' /cb- build/Testing_coreboot.0/CAVIUM_CN8100_SFF_EVB/romstage/vendorcode/cavium/bdk/libdram /dram-init-ddr3.o: In function `init_octeon3_ddr3_interface': /home/coreboot/slave- root/workspace/Testing_coreboot/src/vendorcode/cavium/bdk/libdram/dram-init- ddr3.c:7550: undefined reference to `bdk_pop' /cb- build/Testing_coreboot.0/CAVIUM_CN8100_SFF_EVB/romstage/vendorcode/cavium/bdk/libdram /dram-l2c.o: In function `bdk_get_num_cores': /home/coreboot/slave- root/workspace/Testing_coreboot/src/vendorcode/cavium/include/bdk/libbdk-hal /bdk-utils.h:164: undefined reference to `bdk_dpop' make[1]: *** [src/arch/arm64/Makefile.inc:119: /cb- build/Testing_coreboot.0/CAVIUM_CN8100_SFF_EVB/cbfs/fallback/romstage.debug] Error 1 Change-Id: Ifcde5476c6f347c0eac7ca44bac88d3fa4017fb7 Signed-off-by: Martin Roth <gaumless@gmail.com> Reviewed-on: https://review.coreboot.org/27493 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
This commit is contained in:
parent
780114fb07
commit
125506e6fb
|
@ -139,7 +139,7 @@ static inline uint8_t bdk_read64_uint8(uint64_t address)
|
||||||
*
|
*
|
||||||
* @return Number of bits set
|
* @return Number of bits set
|
||||||
*/
|
*/
|
||||||
inline uint32_t bdk_pop(uint32_t v)
|
static inline uint32_t bdk_pop(uint32_t v)
|
||||||
{
|
{
|
||||||
/* Use parallel SWAR algorithm */
|
/* Use parallel SWAR algorithm */
|
||||||
v = v - ((v >> 1) & 0x55555555);
|
v = v - ((v >> 1) & 0x55555555);
|
||||||
|
@ -155,7 +155,7 @@ inline uint32_t bdk_pop(uint32_t v)
|
||||||
*
|
*
|
||||||
* @return Number of bits set
|
* @return Number of bits set
|
||||||
*/
|
*/
|
||||||
inline int bdk_dpop(uint64_t val)
|
static inline int bdk_dpop(uint64_t val)
|
||||||
{
|
{
|
||||||
return bdk_pop(val & 0xffffffff) + bdk_pop(val >> 32);
|
return bdk_pop(val & 0xffffffff) + bdk_pop(val >> 32);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue