Merge tag 'exynos-cpuidle' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene...
[cascardo/linux.git] / arch / arm / mach-exynos / regs-pmu.h
index 1d13b08..aff23bd 100644 (file)
 
 #define EXYNOS5420_SWRESET_KFC_SEL                             0x3
 
+#include <asm/cputype.h>
+#define MAX_CPUS_IN_CLUSTER    4
+
+static inline unsigned int exynos_pmu_cpunr(unsigned int mpidr)
+{
+       return ((MPIDR_AFFINITY_LEVEL(mpidr, 1) * MAX_CPUS_IN_CLUSTER)
+                + MPIDR_AFFINITY_LEVEL(mpidr, 0));
+}
+
 #endif /* __ASM_ARCH_REGS_PMU_H */