diff options
author | Jaymes Wilks <mjwilks@us.ibm.com> | 2017-01-20 11:11:36 -0600 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2017-02-01 12:03:23 -0500 |
commit | 917f945bcd36d257e37a97ff17a0806f9b5fe686 (patch) | |
tree | c56771503ae5efcb41b0389ee1e264ab7b339a99 /src | |
parent | dd31bfd2dbb599bc76963249f6e0a87f2b8b5235 (diff) | |
download | talos-hostboot-917f945bcd36d257e37a97ff17a0806f9b5fe686.tar.gz talos-hostboot-917f945bcd36d257e37a97ff17a0806f9b5fe686.zip |
Fix Sentinel Compile Error
GCC intermitently reports MASTER_PROCESSOR_CHIP_TARGET_SENTINEL
as being multiply-defined. Indeed it has, but the error only shows
up when other errors are present. This commit fixes the underlying
coding problem that exposes the GCC annoyance. Also, there is the
added benefit that the symbol no longer uses duplicate space for
every source file that uses the targeting service.
Change-Id: I96dfaad210ab3e16b173c7482708ca1b66f14524
RTC:000000
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/35589
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Reviewed-by: Stephen M. Cprek <smcprek@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/include/usr/targeting/common/targetservice.H | 7 | ||||
-rw-r--r-- | src/usr/targeting/common/targutilbase.C | 7 |
2 files changed, 9 insertions, 5 deletions
diff --git a/src/include/usr/targeting/common/targetservice.H b/src/include/usr/targeting/common/targetservice.H index 79641e7ff..5eae01fc7 100644 --- a/src/include/usr/targeting/common/targetservice.H +++ b/src/include/usr/targeting/common/targetservice.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2016 */ +/* Contributors Listed Below - COPYRIGHT 2012,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -134,10 +134,7 @@ namespace TARGETING * DD framework to bring PNOR device driver online. Note this target * cannot be used as input to any target service APIs. */ -static Target* const MASTER_PROCESSOR_CHIP_TARGET_SENTINEL - = (sizeof(void*) == 4) ? - reinterpret_cast<TARGETING::Target* const>(0xFFFFFFFF) - : reinterpret_cast<TARGETING::Target* const>(0xFFFFFFFFFFFFFFFFULL); +extern Target* const MASTER_PROCESSOR_CHIP_TARGET_SENTINEL; /** * @brief TargetService class diff --git a/src/usr/targeting/common/targutilbase.C b/src/usr/targeting/common/targutilbase.C index 6209c0fcc..fc4fd9e13 100644 --- a/src/usr/targeting/common/targutilbase.C +++ b/src/usr/targeting/common/targutilbase.C @@ -27,6 +27,13 @@ namespace TARGETING { + +// master sentinel defined here to make available before targeting is up +Target* const MASTER_PROCESSOR_CHIP_TARGET_SENTINEL + = (sizeof(void*) == 4) ? + reinterpret_cast<TARGETING::Target* const>(0xFFFFFFFF) + : reinterpret_cast<TARGETING::Target* const>(0xFFFFFFFFFFFFFFFFULL); + /** * @brief Safely fetch the HUID of a Target */ |