summaryrefslogtreecommitdiff
path: root/arch/arm/mach-exynos/regs-pmu.h
diff options
context:
space:
mode:
authorKukjin Kim <kgene.kim@samsung.com>2014-07-23 03:18:15 +0400
committerKukjin Kim <kgene.kim@samsung.com>2014-07-23 03:18:15 +0400
commit5f534d10d223636b3cd214376471fcfef71baea2 (patch)
tree38c14b78e01e7270ccce6d6144d124a7129ca707 /arch/arm/mach-exynos/regs-pmu.h
parent036c37c5809585495661d0eb6e78e0a3612ccde3 (diff)
parentfc2cac41ebbfb16da8b036cba6ec6714ab780a6d (diff)
downloadlinux-5f534d10d223636b3cd214376471fcfef71baea2.tar.xz
Merge branch 'v3.17-next/cpuidle-exynos' into v3.17-next/power-exynos
Diffstat (limited to 'arch/arm/mach-exynos/regs-pmu.h')
-rw-r--r--arch/arm/mach-exynos/regs-pmu.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm/mach-exynos/regs-pmu.h b/arch/arm/mach-exynos/regs-pmu.h
index 1993e6bd5388..c45a2dc53e84 100644
--- a/arch/arm/mach-exynos/regs-pmu.h
+++ b/arch/arm/mach-exynos/regs-pmu.h
@@ -319,4 +319,13 @@
#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 */