summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Roth <gaumless@gmail.com>2018-07-15 17:12:12 -0600
committerPatrick Georgi <pgeorgi@google.com>2018-07-17 11:38:28 +0000
commit125506e6fba2ddb22def82234d72ad20e351f72c (patch)
tree5ea23c84215faf650ea28852e1acf98f08832d58
parent780114fb07d3cc1429307497584ecd03d6f5bc02 (diff)
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>
-rw-r--r--src/vendorcode/cavium/include/bdk/bdk-coreboot.h4
1 files changed, 2 insertions, 2 deletions
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);
}