diff options
Diffstat (limited to 'arch')
| -rw-r--r-- | arch/sparc/include/asm/hypervisor.h | 24 | ||||
| -rw-r--r-- | arch/sparc64/kernel/hvcalls.S | 32 | ||||
| -rw-r--r-- | arch/sparc64/kernel/sparc64_ksyms.c | 6 |
3 files changed, 62 insertions, 0 deletions
diff --git a/arch/sparc/include/asm/hypervisor.h b/arch/sparc/include/asm/hypervisor.h index 109ae24ba242..bafe5a631b6d 100644 --- a/arch/sparc/include/asm/hypervisor.h +++ b/arch/sparc/include/asm/hypervisor.h | |||
| @@ -2713,6 +2713,30 @@ extern unsigned long sun4v_ldc_revoke(unsigned long channel, | |||
| 2713 | */ | 2713 | */ |
| 2714 | #define HV_FAST_SET_PERFREG 0x101 | 2714 | #define HV_FAST_SET_PERFREG 0x101 |
| 2715 | 2715 | ||
| 2716 | #define HV_N2_PERF_SPARC_CTL 0x0 | ||
| 2717 | #define HV_N2_PERF_DRAM_CTL0 0x1 | ||
| 2718 | #define HV_N2_PERF_DRAM_CNT0 0x2 | ||
| 2719 | #define HV_N2_PERF_DRAM_CTL1 0x3 | ||
| 2720 | #define HV_N2_PERF_DRAM_CNT1 0x4 | ||
| 2721 | #define HV_N2_PERF_DRAM_CTL2 0x5 | ||
| 2722 | #define HV_N2_PERF_DRAM_CNT2 0x6 | ||
| 2723 | #define HV_N2_PERF_DRAM_CTL3 0x7 | ||
| 2724 | #define HV_N2_PERF_DRAM_CNT3 0x8 | ||
| 2725 | |||
| 2726 | #define HV_FAST_N2_GET_PERFREG 0x104 | ||
| 2727 | #define HV_FAST_N2_SET_PERFREG 0x105 | ||
| 2728 | |||
| 2729 | #ifndef __ASSEMBLY__ | ||
| 2730 | extern unsigned long sun4v_niagara_getperf(unsigned long reg, | ||
| 2731 | unsigned long *val); | ||
| 2732 | extern unsigned long sun4v_niagara_setperf(unsigned long reg, | ||
| 2733 | unsigned long val); | ||
| 2734 | extern unsigned long sun4v_niagara2_getperf(unsigned long reg, | ||
| 2735 | unsigned long *val); | ||
| 2736 | extern unsigned long sun4v_niagara2_setperf(unsigned long reg, | ||
| 2737 | unsigned long val); | ||
| 2738 | #endif | ||
| 2739 | |||
| 2716 | /* MMU statistics services. | 2740 | /* MMU statistics services. |
| 2717 | * | 2741 | * |
| 2718 | * The hypervisor maintains MMU statistics and privileged code provides | 2742 | * The hypervisor maintains MMU statistics and privileged code provides |
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) | |||
| 766 | retl | 766 | retl |
| 767 | nop | 767 | nop |
| 768 | ENDPROC(sun4v_mmu_demap_all) | 768 | ENDPROC(sun4v_mmu_demap_all) |
| 769 | |||
| 770 | ENTRY(sun4v_niagara_getperf) | ||
| 771 | mov %o0, %o4 | ||
| 772 | mov HV_FAST_GET_PERFREG, %o5 | ||
| 773 | ta HV_FAST_TRAP | ||
| 774 | stx %o1, [%o4] | ||
| 775 | retl | ||
| 776 | nop | ||
| 777 | ENDPROC(sun4v_niagara_getperf) | ||
| 778 | |||
| 779 | ENTRY(sun4v_niagara_setperf) | ||
| 780 | mov HV_FAST_SET_PERFREG, %o5 | ||
| 781 | ta HV_FAST_TRAP | ||
| 782 | retl | ||
| 783 | nop | ||
| 784 | ENDPROC(sun4v_niagara_setperf) | ||
| 785 | |||
| 786 | ENTRY(sun4v_niagara2_getperf) | ||
| 787 | mov %o0, %o4 | ||
| 788 | mov HV_FAST_N2_GET_PERFREG, %o5 | ||
| 789 | ta HV_FAST_TRAP | ||
| 790 | stx %o1, [%o4] | ||
| 791 | retl | ||
| 792 | nop | ||
| 793 | ENDPROC(sun4v_niagara2_getperf) | ||
| 794 | |||
| 795 | ENTRY(sun4v_niagara2_setperf) | ||
| 796 | mov HV_FAST_N2_SET_PERFREG, %o5 | ||
| 797 | ta HV_FAST_TRAP | ||
| 798 | retl | ||
| 799 | nop | ||
| 800 | 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 @@ | |||
| 49 | #include <asm/timer.h> | 49 | #include <asm/timer.h> |
| 50 | #include <asm/cpudata.h> | 50 | #include <asm/cpudata.h> |
| 51 | #include <asm/ftrace.h> | 51 | #include <asm/ftrace.h> |
| 52 | #include <asm/hypervisor.h> | ||
| 52 | 53 | ||
| 53 | struct poll { | 54 | struct poll { |
| 54 | int fd; | 55 | int fd; |
| @@ -148,6 +149,11 @@ EXPORT_SYMBOL(flush_dcache_page); | |||
| 148 | EXPORT_SYMBOL(__flush_dcache_range); | 149 | EXPORT_SYMBOL(__flush_dcache_range); |
| 149 | #endif | 150 | #endif |
| 150 | 151 | ||
| 152 | EXPORT_SYMBOL(sun4v_niagara_getperf); | ||
| 153 | EXPORT_SYMBOL(sun4v_niagara_setperf); | ||
| 154 | EXPORT_SYMBOL(sun4v_niagara2_getperf); | ||
| 155 | EXPORT_SYMBOL(sun4v_niagara2_setperf); | ||
| 156 | |||
| 151 | #ifdef CONFIG_SUN_AUXIO | 157 | #ifdef CONFIG_SUN_AUXIO |
| 152 | EXPORT_SYMBOL(auxio_set_led); | 158 | EXPORT_SYMBOL(auxio_set_led); |
| 153 | EXPORT_SYMBOL(auxio_set_lte); | 159 | EXPORT_SYMBOL(auxio_set_lte); |
