From: Vijay Kumar <vijay.ac.kumar@oracle.com>
To: davem@davemloft.net, sparclinux@vger.kernel.org
Cc: rob.gardner@oracle.com, anthony.yznaga@oracle.com,
linux-kernel@vger.kernel.org
Subject: [PATCH 1/2] sparc64: Add a new hypercall CPU_POKE
Date: Sat, 8 Jul 2017 14:23:43 -0600 [thread overview]
Message-ID: <1499545424-415240-2-git-send-email-vijay.ac.kumar@oracle.com> (raw)
In-Reply-To: <1499545424-415240-1-git-send-email-vijay.ac.kumar@oracle.com>
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>
---
arch/sparc/include/asm/hypervisor.h | 18 ++++++++++++++++++
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 73cb897..3dc9215 100644
--- a/arch/sparc/include/asm/hypervisor.h
+++ b/arch/sparc/include/asm/hypervisor.h
@@ -298,6 +298,24 @@ unsigned long sun4v_cpu_start(unsigned long cpuid,
unsigned long sun4v_cpu_yield(void);
#endif
+/* cpu_poke()
+ * TRAP: HV_FAST_TRAP
+ * FUNCTION: HV_FAST_CPU_POKE
+ * RET0: status
+ * ERRORS: ENOCPU cpuid refers to a CPU that does not exist
+ * EINVAL cpuid is current CPU
+ *
+ * Poke CPU cpuid. If the target CPU is currently suspended having
+ * invoked the cpu-yield service, that vCPU will be resumed.
+ * Poke interrupts may only be sent to valid, non-local CPUs.
+ * It is not legal to poke the current vCPU.
+ */
+#define HV_FAST_CPU_POKE 0x13
+
+#ifndef __ASSEMBLY__
+unsigned long sun4v_cpu_poke(unsigned long cpuid);
+#endif
+
/* cpu_qconf()
* TRAP: HV_FAST_TRAP
* FUNCTION: HV_FAST_CPU_QCONF
diff --git a/arch/sparc/kernel/hvcalls.S b/arch/sparc/kernel/hvcalls.S
index 4116ee5..e57007f 100644
--- a/arch/sparc/kernel/hvcalls.S
+++ b/arch/sparc/kernel/hvcalls.S
@@ -106,6 +106,17 @@ ENTRY(sun4v_cpu_yield)
nop
ENDPROC(sun4v_cpu_yield)
+ /* %o0: cpuid
+ *
+ * returns %o0: status
+ */
+ENTRY(sun4v_cpu_poke)
+ mov HV_FAST_CPU_POKE, %o5
+ ta HV_FAST_TRAP
+ retl
+ nop
+ENDPROC(sun4v_cpu_poke)
+
/* %o0: type
* %o1: queue paddr
* %o2: num queue entries
--
1.7.1
next prev parent reply other threads:[~2017-07-08 20:23 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-08 20:23 [PATCH 0/2] sparc64: Use low latency path to resume idle cpu Vijay Kumar
2017-07-08 20:23 ` Vijay Kumar [this message]
2017-07-08 20:23 ` [PATCH 2/2] sparc64: Use cpu_poke " Vijay Kumar
2017-07-20 19:58 ` David Miller
2017-07-21 2:47 ` Vijay Kumar
2017-07-20 19:57 ` [PATCH 0/2] sparc64: Use low latency path " David Miller
2017-07-21 2:44 ` Vijay Kumar
2017-07-21 2:55 ` David Miller
2017-07-21 3:36 ` Vijay Kumar
2017-07-21 3:45 ` David Miller
2017-07-21 4:11 ` Vijay Kumar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1499545424-415240-2-git-send-email-vijay.ac.kumar@oracle.com \
--to=vijay.ac.kumar@oracle.com \
--cc=anthony.yznaga@oracle.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=rob.gardner@oracle.com \
--cc=sparclinux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).