X-Git-Url: http://git.cascardo.info/?a=blobdiff_plain;f=arch%2Farm%2Fmach-exynos%2Fregs-pmu.h;h=aff23bd395e69c94de6f6be815d5dd2c1dcdcf8f;hb=f37ac9e5a47d72eab5185b0ddc14dfc943cc9589;hp=1d13b08708f0055e49baa27e43ac24be6e355530;hpb=f4f9b8fc73f9aa93744f0e91e18f367d7766f523;p=cascardo%2Flinux.git diff --git a/arch/arm/mach-exynos/regs-pmu.h b/arch/arm/mach-exynos/regs-pmu.h index 1d13b08708f0..aff23bd395e6 100644 --- a/arch/arm/mach-exynos/regs-pmu.h +++ b/arch/arm/mach-exynos/regs-pmu.h @@ -323,4 +323,13 @@ #define EXYNOS5420_SWRESET_KFC_SEL 0x3 +#include +#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 */