summaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel/hvcalls.S
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-08-16 20:35:41 -0700
committerDavid S. Miller <davem@davemloft.net>2012-08-18 23:03:53 -0700
commit8c79bfa51101354853f0f5d3b02435cec429da51 (patch)
tree412a66bd5885179b65a957956ad7978b6bada7f4 /arch/sparc/kernel/hvcalls.S
parent6f859c0e96f0737a543610a189d12420c569110f (diff)
downloadlinux-8c79bfa51101354853f0f5d3b02435cec429da51.tar.bz2
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)