diff options
author | David S. Miller <davem@davemloft.net> | 2008-11-28 13:26:55 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-12-04 20:17:09 +0300 |
commit | 3178a07c33747305b7f7140bd55b0f77e7f239eb (patch) | |
tree | e4860d742405a4b7d92d3df9e6f911fc057e8123 /arch/sparc64 | |
parent | 6a5726dd6fcc330ef386016e160389e05fd0015d (diff) | |
download | linux-3178a07c33747305b7f7140bd55b0f77e7f239eb.tar.xz |
sparc64: Add performance counter hypervisor calls for sun4v.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64')
-rw-r--r-- | arch/sparc64/kernel/hvcalls.S | 32 | ||||
-rw-r--r-- | arch/sparc64/kernel/sparc64_ksyms.c | 6 |
2 files changed, 38 insertions, 0 deletions
diff --git a/arch/sparc64/kernel/hvcalls.S b/arch/sparc64/kernel/hvcalls.S index e066269d1594..8a5f35ffb15e 100644 --- a/arch/sparc64/kernel/hvcalls.S +++ b/arch/sparc64/kernel/hvcalls.S @@ -766,3 +766,35 @@ ENTRY(sun4v_mmu_demap_all) retl nop ENDPROC(sun4v_mmu_demap_all) + +ENTRY(sun4v_niagara_getperf) + mov %o0, %o4 + mov HV_FAST_GET_PERFREG, %o5 + ta HV_FAST_TRAP + stx %o1, [%o4] + retl + nop +ENDPROC(sun4v_niagara_getperf) + +ENTRY(sun4v_niagara_setperf) + mov HV_FAST_SET_PERFREG, %o5 + ta HV_FAST_TRAP + retl + nop +ENDPROC(sun4v_niagara_setperf) + +ENTRY(sun4v_niagara2_getperf) + mov %o0, %o4 + mov HV_FAST_N2_GET_PERFREG, %o5 + ta HV_FAST_TRAP + stx %o1, [%o4] + retl + nop +ENDPROC(sun4v_niagara2_getperf) + +ENTRY(sun4v_niagara2_setperf) + mov HV_FAST_N2_SET_PERFREG, %o5 + ta HV_FAST_TRAP + retl + nop +ENDPROC(sun4v_niagara2_setperf) diff --git a/arch/sparc64/kernel/sparc64_ksyms.c b/arch/sparc64/kernel/sparc64_ksyms.c index 30bba8b0a3b0..c450825b3fe5 100644 --- a/arch/sparc64/kernel/sparc64_ksyms.c +++ b/arch/sparc64/kernel/sparc64_ksyms.c @@ -49,6 +49,7 @@ #include <asm/timer.h> #include <asm/cpudata.h> #include <asm/ftrace.h> +#include <asm/hypervisor.h> struct poll { int fd; @@ -148,6 +149,11 @@ EXPORT_SYMBOL(flush_dcache_page); EXPORT_SYMBOL(__flush_dcache_range); #endif +EXPORT_SYMBOL(sun4v_niagara_getperf); +EXPORT_SYMBOL(sun4v_niagara_setperf); +EXPORT_SYMBOL(sun4v_niagara2_getperf); +EXPORT_SYMBOL(sun4v_niagara2_setperf); + #ifdef CONFIG_SUN_AUXIO EXPORT_SYMBOL(auxio_set_led); EXPORT_SYMBOL(auxio_set_lte); |