Martin Roth has uploaded this change for review. ( https://review.coreboot.org/27493
Change subject: vendorcode/cavium/include: Make bdk_pop and dpop static ......................................................................
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 --- M src/vendorcode/cavium/include/bdk/bdk-coreboot.h 1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/93/27493/1
diff --git a/src/vendorcode/cavium/include/bdk/bdk-coreboot.h b/src/vendorcode/cavium/include/bdk/bdk-coreboot.h index 7b417b6..85cf21a 100644 --- a/src/vendorcode/cavium/include/bdk/bdk-coreboot.h +++ b/src/vendorcode/cavium/include/bdk/bdk-coreboot.h @@ -139,7 +139,7 @@ * * @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 */ v = v - ((v >> 1) & 0x55555555); @@ -155,7 +155,7 @@ * * @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); }