aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/pmc.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/include/asm/pmc.h')
-rw-r--r--arch/powerpc/include/asm/pmc.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/pmc.h b/arch/powerpc/include/asm/pmc.h
index c6bbe9778d3c..3c09109e708e 100644
--- a/arch/powerpc/include/asm/pmc.h
+++ b/arch/powerpc/include/asm/pmc.h
@@ -34,6 +34,13 @@ static inline void ppc_set_pmu_inuse(int inuse)
#endif
}
+#ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE
+static inline int ppc_get_pmu_inuse(void)
+{
+ return get_paca()->pmcregs_in_use;
+}
+#endif
+
extern void power4_enable_pmcs(void);
#else /* CONFIG_PPC64 */