diff options
author | Vijay Kumar <vijay.ac.kumar@oracle.com> | 2017-07-21 12:23:56 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-08-10 01:15:10 -0400 |
commit | 28d43de741cc67a9d8748de7dcb6c5f54cfa669c (patch) | |
tree | 5a45e75d3d4b7a392a6b68d9ae69c27dd9071159 /arch/sparc | |
parent | 99274b818a5dc7c3226866970a0cec0d40ed5f0f (diff) |
sparc64: Add a new hypercall CPU_POKE
This adds a new hypercall CPU_POKE for quickly waking up an idle CPU.
CPU_POKE should only be sent to valid non-local CPUs.
Signed-off-by: Rob Gardner <rob.gardner@oracle.com>
Signed-off-by: Vijay Kumar <vijay.ac.kumar@oracle.com>
Reviewed-by: Anthony Yznaga <anthony.yznaga@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc')
-rw-r--r-- | arch/sparc/include/asm/hypervisor.h | 18 | ||||
-rw-r--r-- | arch/sparc/kernel/hvcalls.S | 11 |
2 files changed, 29 insertions, 0 deletions
diff --git a/arch/sparc/include/asm/hypervisor.h b/arch/sparc/include/asm/hypervisor.h index 73cb8978df58..3dc9215d0357 100644 --- a/arch/sparc/include/asm/hypervisor.h +++ b/arch/sparc/include/asm/hypervisor.h | |||
@@ -298,6 +298,24 @@ unsigned long sun4v_cpu_stop(unsigned long cpuid); | |||
298 | unsigned long sun4v_cpu_yield(void); | 298 | unsigned long sun4v_cpu_yield(void); |
299 | #endif | 299 | #endif |
300 | 300 | ||
301 | /* cpu_poke() | ||
302 | * TRAP: HV_FAST_TRAP | ||
303 | * FUNCTION: HV_FAST_CPU_POKE | ||
304 | * RET0: status | ||
305 | * ERRORS: ENOCPU cpuid refers to a CPU that does not exist | ||
306 | * EINVAL cpuid is current CPU | ||
307 | * | ||
308 | * Poke CPU cpuid. If the target CPU is currently suspended having | ||
309 | * invoked the cpu-yield service, that vCPU will be resumed. | ||
310 | * Poke interrupts may only be sent to valid, non-local CPUs. | ||
311 | * It is not legal to poke the current vCPU. | ||
312 | */ | ||
313 | #define HV_FAST_CPU_POKE 0x13 | ||
314 | |||
315 | #ifndef __ASSEMBLY__ | ||
316 | unsigned long sun4v_cpu_poke(unsigned long cpuid); | ||
317 | #endif | ||
318 | |||
301 | /* cpu_qconf() | 319 | /* cpu_qconf() |
302 | * TRAP: HV_FAST_TRAP | 320 | * TRAP: HV_FAST_TRAP |
303 | * FUNCTION: HV_FAST_CPU_QCONF | 321 | * FUNCTION: HV_FAST_CPU_QCONF |
diff --git a/arch/sparc/kernel/hvcalls.S b/arch/sparc/kernel/hvcalls.S index 4116ee5c7791..e57007ff7f8f 100644 --- a/arch/sparc/kernel/hvcalls.S +++ b/arch/sparc/kernel/hvcalls.S | |||
@@ -106,6 +106,17 @@ ENTRY(sun4v_cpu_yield) | |||
106 | nop | 106 | nop |
107 | ENDPROC(sun4v_cpu_yield) | 107 | ENDPROC(sun4v_cpu_yield) |
108 | 108 | ||
109 | /* %o0: cpuid | ||
110 | * | ||
111 | * returns %o0: status | ||
112 | */ | ||
113 | ENTRY(sun4v_cpu_poke) | ||
114 | mov HV_FAST_CPU_POKE, %o5 | ||
115 | ta HV_FAST_TRAP | ||
116 | retl | ||
117 | nop | ||
118 | ENDPROC(sun4v_cpu_poke) | ||
119 | |||
109 | /* %o0: type | 120 | /* %o0: type |
110 | * %o1: queue paddr | 121 | * %o1: queue paddr |
111 | * %o2: num queue entries | 122 | * %o2: num queue entries |