diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2016-07-24 09:27:19 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2016-08-22 15:26:51 +1000 |
commit | 36be5e0ac86e6aeb020a2e37cc146cc2ff7a6bb5 (patch) | |
tree | 221917586e0dd5bda44d277c07176b370420da36 /include | |
parent | 373bd8314bcc27c2093a56d456db960e9980d494 (diff) | |
download | skiboot-36be5e0ac86e6aeb020a2e37cc146cc2ff7a6bb5.zip skiboot-36be5e0ac86e6aeb020a2e37cc146cc2ff7a6bb5.tar.gz skiboot-36be5e0ac86e6aeb020a2e37cc146cc2ff7a6bb5.tar.bz2 |
cpu: Add cpu_idle() which we call when waiting for a job
For now a simple generic implementation using cpu_relax()
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/cpu.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/cpu.h b/include/cpu.h index 1188168..256fc5b 100644 --- a/include/cpu.h +++ b/include/cpu.h @@ -43,6 +43,11 @@ enum cpu_thread_state { struct cpu_job; struct xive_cpu_state; +enum cpu_wake_cause { + cpu_wake_on_job, + cpu_wake_on_dec, +}; + struct cpu_thread { uint32_t pir; uint32_t server_no; @@ -253,4 +258,6 @@ static inline void cpu_give_self_os(void) extern unsigned long __attrconst cpu_stack_bottom(unsigned int pir); extern unsigned long __attrconst cpu_stack_top(unsigned int pir); +extern void cpu_idle(enum cpu_wake_cause wake_on); + #endif /* __CPU_H */ |