summaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel/hvcalls.S
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-08-17 05:35:41 +0200
committerDavid S. Miller <davem@davemloft.net>2012-08-19 08:03:53 +0200
commit8c79bfa51101354853f0f5d3b02435cec429da51 (patch)
tree412a66bd5885179b65a957956ad7978b6bada7f4 /arch/sparc/kernel/hvcalls.S
parentsparc64: Add detection for features new in SPARC-T4. (diff)
downloadlinux-8c79bfa51101354853f0f5d3b02435cec429da51.tar.xz
linux-8c79bfa51101354853f0f5d3b02435cec429da51.zip
sparc64: Add hypervisor interfaces for SPARC-T4 perf counter access.
Unlike for previous chips, access to the perf-counter control registers are all hyper-privileged. Therefore, access to them must go through a hypervisor interface. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/kernel/hvcalls.S')
-rw-r--r--arch/sparc/kernel/hvcalls.S16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/sparc/kernel/hvcalls.S b/arch/sparc/kernel/hvcalls.S
index 58d60de4d65b..f3ab509b76a8 100644
--- a/arch/sparc/kernel/hvcalls.S
+++ b/arch/sparc/kernel/hvcalls.S
@@ -805,3 +805,19 @@ ENTRY(sun4v_reboot_data_set)
retl
nop
ENDPROC(sun4v_reboot_data_set)
+
+ENTRY(sun4v_vt_get_perfreg)
+ mov %o1, %o4
+ mov HV_FAST_VT_GET_PERFREG, %o5
+ ta HV_FAST_TRAP
+ stx %o1, [%o4]
+ retl
+ nop
+ENDPROC(sun4v_vt_get_perfreg)
+
+ENTRY(sun4v_vt_set_perfreg)
+ mov HV_FAST_VT_SET_PERFREG, %o5
+ ta HV_FAST_TRAP
+ retl
+ nop
+ENDPROC(sun4v_vt_set_perfreg)