<p>Martin Roth has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/27493">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">vendorcode/cavium/include: Make bdk_pop and dpop static<br><br>Fix an undefined reference error with GCC 8.1<br><br>/cb-<br>build/Testing_coreboot.0/CAVIUM_CN8100_SFF_EVB/romstage/vendorcode/cavium/bdk<br>/libbdk-dram/bdk-dram-size.o: In function `bdk_dram_get_size_mbytes':<br>/home/coreboot/slave-root/workspace/Testing_coreboot/src/vendorcode/cavium/bdk<br>/libbdk-dram/bdk-dram-size.c:198: undefined reference to `bdk_pop'<br>/cb-<br>build/Testing_coreboot.0/CAVIUM_CN8100_SFF_EVB/romstage/vendorcode/cavium/bdk<br>/libbdk-dram/bdk-dram-test.o: In function `bdk_get_num_cores':<br>/home/coreboot/slave-<br>root/workspace/Testing_coreboot/src/vendorcode/cavium/include/bdk/libbdk-hal<br>/bdk-utils.h:164: undefined reference to `bdk_dpop'<br>/cb-<br>build/Testing_coreboot.0/CAVIUM_CN8100_SFF_EVB/romstage/vendorcode/cavium/bdk/libdram<br>/dram-init-ddr3.o: In function `init_octeon3_ddr3_interface':<br>/home/coreboot/slave-<br>root/workspace/Testing_coreboot/src/vendorcode/cavium/bdk/libdram/dram-init-<br>ddr3.c:7550: undefined reference to `bdk_pop'<br>/cb-<br>build/Testing_coreboot.0/CAVIUM_CN8100_SFF_EVB/romstage/vendorcode/cavium/bdk/libdram<br>/dram-l2c.o: In function `bdk_get_num_cores':<br>/home/coreboot/slave-<br>root/workspace/Testing_coreboot/src/vendorcode/cavium/include/bdk/libbdk-hal<br>/bdk-utils.h:164: undefined reference to `bdk_dpop'<br>make[1]: *** [src/arch/arm64/Makefile.inc:119: /cb-<br>build/Testing_coreboot.0/CAVIUM_CN8100_SFF_EVB/cbfs/fallback/romstage.debug]<br>Error 1<br><br>Change-Id: Ifcde5476c6f347c0eac7ca44bac88d3fa4017fb7<br>Signed-off-by: Martin Roth <gaumless@gmail.com><br>---<br>M src/vendorcode/cavium/include/bdk/bdk-coreboot.h<br>1 file changed, 2 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/93/27493/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/vendorcode/cavium/include/bdk/bdk-coreboot.h b/src/vendorcode/cavium/include/bdk/bdk-coreboot.h</span><br><span>index 7b417b6..85cf21a 100644</span><br><span>--- a/src/vendorcode/cavium/include/bdk/bdk-coreboot.h</span><br><span>+++ b/src/vendorcode/cavium/include/bdk/bdk-coreboot.h</span><br><span>@@ -139,7 +139,7 @@</span><br><span>  *</span><br><span>  * @return Number of bits set</span><br><span>  */</span><br><span style="color: hsl(0, 100%, 40%);">-inline uint32_t bdk_pop(uint32_t v)</span><br><span style="color: hsl(120, 100%, 40%);">+static inline uint32_t bdk_pop(uint32_t v)</span><br><span> {</span><br><span>        /* Use parallel SWAR algorithm */</span><br><span>    v = v - ((v >> 1) & 0x55555555);</span><br><span>@@ -155,7 +155,7 @@</span><br><span>  *</span><br><span>  * @return Number of bits set</span><br><span>  */</span><br><span style="color: hsl(0, 100%, 40%);">-inline int bdk_dpop(uint64_t val)</span><br><span style="color: hsl(120, 100%, 40%);">+static inline int bdk_dpop(uint64_t val)</span><br><span> {</span><br><span>       return bdk_pop(val & 0xffffffff) + bdk_pop(val >> 32);</span><br><span> }</span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/27493">change 27493</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/27493"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Ifcde5476c6f347c0eac7ca44bac88d3fa4017fb7 </div>
<div style="display:none"> Gerrit-Change-Number: 27493 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Martin Roth <martinroth@google.com> </div>