summaryrefslogtreecommitdiffstats
path: root/hw/slw.c
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2015-05-06 14:00:52 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-05-07 17:54:30 +1000
commit0a3e75d5988c334197d4cb27d92acb901605019a (patch)
tree28e2da85cb532958da5ca62dbee8176109f11c04 /hw/slw.c
parent00f469a5f9231c50d478407ae7d42fcbad942fc0 (diff)
downloadtalos-skiboot-0a3e75d5988c334197d4cb27d92acb901605019a.tar.gz
talos-skiboot-0a3e75d5988c334197d4cb27d92acb901605019a.zip
Add global CPU job queue
When we have multiple systems trying to start concurrent jobs on different CPUs, they typically pick the first available (operating) CPU to schedule the job on. This works fine when there's only one set of jobs or when we want to bind jobs to specific CPUs. When we have jobs such as asynchronously loading LIDs and scanning PHBs, we don't care which CPUs they run on, we care more that they are not scheduled on CPUs that have existing tasks. This patch adds a global queue of jobs which secondary CPUs will look at for work (if idle). This leads to simplified callers, which just need to queue jobs to NULL (no specific CPU) and then call a magic function that will run the CPU job queue if we don't have secondary CPUs. Additionally, we add a const char *name to cpu_job just to aid with debugging. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw/slw.c')
-rw-r--r--hw/slw.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/slw.c b/hw/slw.c
index 458560c4..ffa9de1e 100644
--- a/hw/slw.c
+++ b/hw/slw.c
@@ -792,7 +792,8 @@ int64_t slw_reinit(uint64_t flags)
has_waker = true;
master = this_cpu();
}
- __cpu_queue_job(cpu, slw_do_rvwinkle, master, true);
+ __cpu_queue_job(cpu, "slw_do_rvwinkle",
+ slw_do_rvwinkle, master, true);
/* Wait for it to claim to be down */
while(cpu->state != cpu_state_rvwinkle)
OpenPOWER on IntegriCloud