diff options
author | Patrick Williams <iawillia@us.ibm.com> | 2014-01-16 17:24:40 -0600 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2014-01-17 10:29:30 -0600 |
commit | 44f7757327777f888cb16334a075bc31a1ef7d9f (patch) | |
tree | ba7d452e3e7fe45d3bd07a4023716712c7f81d3b /src | |
parent | f9335347ecafd62bd2fa72b03e967f9cb7449fd1 (diff) | |
download | talos-hostboot-44f7757327777f888cb16334a075bc31a1ef7d9f.tar.gz talos-hostboot-44f7757327777f888cb16334a075bc31a1ef7d9f.zip |
Bad address when start_payload executes from non-master core.
Change-Id: I913f072e8c3adda990072a226d23e8ffd82767aa
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/8116
Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com>
Reviewed-by: Michael Baiocchi <baiocchi@us.ibm.com>
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/usr/hwpf/hwp/start_payload/start_payload.C | 12 | ||||
-rw-r--r-- | src/usr/runtime/populate_attributes.C | 10 | ||||
-rw-r--r-- | src/usr/targeting/namedtarget.C | 6 |
3 files changed, 20 insertions, 8 deletions
diff --git a/src/usr/hwpf/hwp/start_payload/start_payload.C b/src/usr/hwpf/hwp/start_payload/start_payload.C index f2d50bae5..9b134263e 100644 --- a/src/usr/hwpf/hwp/start_payload/start_payload.C +++ b/src/usr/hwpf/hwp/start_payload/start_payload.C @@ -70,7 +70,7 @@ #include <runtime/runtime.H> #include <devtree/devtreeif.H> #include <sys/task.h> -#include <kernel/cpu.H> // for KERNEL_MAX_SUPPORTED_CPUS_PER_NODE +#include <intr/interrupt.H> #include <kernel/ipc.H> // for internode data areas #include <mbox/ipc_msg_types.H> @@ -405,8 +405,14 @@ void* call_host_start_payload( void *io_pArgs ) TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_host_start_payload entry" ); - uint64_t this_node = - task_getcpuid()/KERNEL_MAX_SUPPORTED_CPUS_PER_NODE; + // For single-node systems, the non-master processors can be in a + // different logical (powerbus) node. Need to migrate task to master. + task_affinity_pin(); + task_affinity_migrate_to_master(); + + uint64_t this_node = INTR::PIR_t(task_getcpuid()).nodeId; + + task_affinity_unpin(); // broadcast shutdown to other HB instances. l_errl = broadcastShutdown(this_node); diff --git a/src/usr/runtime/populate_attributes.C b/src/usr/runtime/populate_attributes.C index 5c47730b3..428292de4 100644 --- a/src/usr/runtime/populate_attributes.C +++ b/src/usr/runtime/populate_attributes.C @@ -40,7 +40,7 @@ #include "common/hsvc_attribute_structs.H" #include <mbox/ipc_msg_types.H> #include <sys/task.h> -#include <kernel/cpu.H> // for KERNEL_MAX_SUPPORTED_CPUS_PER_NODE +#include <intr/interrupt.H> trace_desc_t *g_trac_runtime = NULL; TRAC_INIT(&g_trac_runtime, RUNTIME_COMP_NAME, KILOBYTE); @@ -688,8 +688,10 @@ errlHndl_t populate_attributes( void ) // The assertion is that the hostboot instance must be equal to // the logical node we are running on. The ideal would be to have // a function call that would return the HB instance number. - uint64_t this_node = - task_getcpuid()/KERNEL_MAX_SUPPORTED_CPUS_PER_NODE; + task_affinity_pin(); + task_affinity_migrate_to_master(); + uint64_t this_node = INTR::PIR_t(task_getcpuid()).nodeId; + task_affinity_unpin(); //loop though all possible drawers whether they exist or not @@ -723,7 +725,7 @@ errlHndl_t populate_attributes( void ) break; } } - } + } } if(errhdl == NULL) diff --git a/src/usr/targeting/namedtarget.C b/src/usr/targeting/namedtarget.C index 7784ddf30..eda9b009b 100644 --- a/src/usr/targeting/namedtarget.C +++ b/src/usr/targeting/namedtarget.C @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* COPYRIGHT International Business Machines Corp. 2012,2014 */ /* */ /* p1 */ /* */ @@ -53,7 +53,11 @@ namespace TARGETING const TARGETING::Target * getMasterCore( ) { + task_affinity_pin(); + task_affinity_migrate_to_master(); uint64_t l_masterCoreID = task_getcpuid() & ~7; + task_affinity_unpin(); + const TARGETING::Target * l_masterCore = NULL; TARGETING::Target * l_processor = NULL; |