From 125506e6fba2ddb22def82234d72ad20e351f72c Mon Sep 17 00:00:00 2001 From: Martin Roth Date: Sun, 15 Jul 2018 17:12:12 -0600 Subject: 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 Reviewed-on: https://review.coreboot.org/27493 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Patrick Georgi Reviewed-by: Patrick Rudolph --- src/vendorcode/cavium/include/bdk/bdk-coreboot.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/vendorcode') diff --git a/src/vendorcode/cavium/include/bdk/bdk-coreboot.h b/src/vendorcode/cavium/include/bdk/bdk-coreboot.h index 7b417b6c02..85cf21a7d7 100644 --- a/src/vendorcode/cavium/include/bdk/bdk-coreboot.h +++ b/src/vendorcode/cavium/include/bdk/bdk-coreboot.h @@ -139,7 +139,7 @@ static inline uint8_t bdk_read64_uint8(uint64_t address) * * @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 @@ inline uint32_t bdk_pop(uint32_t v) * * @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); } -- cgit v1.2.3