arm: exynos: add generic function to calculate cpu number
Subsystems (3)
PATCH 1/1 arm: exynos: add generic function to calculate cpu number
The address of cpu power registers in pmu is based on cpu number offsets. This function calculate the same. This is essentially required in case of multicluster SoC's e.g Exynos5420.
--- arch/arm/mach-exynos/regs-pmu.h | 9 +++++++++ 1 file changed, 9 insertions(+)
arch/arm/mach-exynos/regs-pmu.h +9 -0
@@ -313,4 +313,13 @@#define EXYNOS5_OPTION_USE_RETENTION (1 << 4) +#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 */
Signature · 1 line
1.7.9.5
Quoted 29 lines · Chander Kashyap
The address of cpu power registers in pmu is based on cpu number offsets. This function calculate the same. This is essentially required in case of multicluster SoC's e.g Exynos5420.
Signed-off-by Chander Kashyap <[email protected]>Signed-off-by Chander Kashyap <[email protected]>--- arch/arm/mach-exynos/regs-pmu.h | 9 +++++++++ 1 file changed, 9 insertions(+)arch/arm/mach-exynos/regs-pmu.h +9
-1@@ -313,4 +313,13 @@#define EXYNOS5_OPTION_USE_RETENTION (1 << 4) +#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 */ --
Quoted 2 lines
1.7.9.5
Kukjin, Can you please have a look.
Signature · 2 lines
with warm regards, Chander Kashyap
Quoted 37 lines · Chander Kashyap
Quoted 29 lines · Chander Kashyap
The address of cpu power registers in pmu is based on cpu number offsets. This function calculate the same. This is essentially required in case of multicluster SoC's e.g Exynos5420.
Signed-off-by Chander Kashyap <[email protected]>Signed-off-by Chander Kashyap <[email protected]>--- arch/arm/mach-exynos/regs-pmu.h | 9 +++++++++ 1 file changed, 9 insertions(+)arch/arm/mach-exynos/regs-pmu.h +9
-1@@ -313,4 +313,13 @@#define EXYNOS5_OPTION_USE_RETENTION (1 << 4) +#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 */ --Quoted 2 lines
1.7.9.5
Kukjin, Can you please have a look.
Quoted 3 lines
--
with warm regards,
Chander Kashyap
Hi Kgene,
Can you take this patch if no issues with it.
Signature · 2 lines
with warm regards, Chander Kashyap
Hi Chander,
Quoted 38 lines · Chander Kashyap
Quoted 37 lines · Chander Kashyap
Quoted 29 lines · Chander Kashyap
The address of cpu power registers in pmu is based on cpu number offsets. This function calculate the same. This is essentially required in case of multicluster SoC's e.g Exynos5420.
Signed-off-by Chander Kashyap <[email protected]>Signed-off-by Chander Kashyap <[email protected]>--- arch/arm/mach-exynos/regs-pmu.h | 9 +++++++++ 1 file changed, 9 insertions(+)arch/arm/mach-exynos/regs-pmu.h +9
-1@@ -313,4 +313,13 @@#define EXYNOS5_OPTION_USE_RETENTION (1 << 4) +#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 */ --Quoted 2 lines
1.7.9.5
Kukjin, Can you please have a look.
Quoted 5 lines
Quoted 3 lines
--
with warm regards,
Chander KashyapHi Kgene,
Can you take this patch if no issues with it.
Is there any user for this function right now? Shouldn't this patch rather be included as a part of some series that adds actual users of it?
Best regards,
Tomasz
Quoted 41 lines · Tomasz Figa
Hi Chander,
Quoted 38 lines · Chander Kashyap
Quoted 37 lines · Chander Kashyap
Quoted 29 lines · Chander Kashyap
The address of cpu power registers in pmu is based on cpu number offsets. This function calculate the same. This is essentially required in case of multicluster SoC's e.g Exynos5420.
Signed-off-by Chander Kashyap <[email protected]>Signed-off-by Chander Kashyap <[email protected]>--- arch/arm/mach-exynos/regs-pmu.h | 9 +++++++++ 1 file changed, 9 insertions(+)arch/arm/mach-exynos/regs-pmu.h +9
-1@@ -313,4 +313,13 @@#define EXYNOS5_OPTION_USE_RETENTION (1 << 4) +#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 */ --Quoted 2 lines
1.7.9.5
Kukjin, Can you please have a look.
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
--
with warm regards,
Chander KashyapHi Kgene,
Can you take this patch if no issues with it.Is there any user for this function right now? Shouldn't this patch rather be included as a part of some series that adds actual users of it?
Hi Tomasz,
Exynos5420 patches have dependency on this.
Those patches already posted.
Quoted 4 lines
Best regards,
Tomasz
Signature · 2 lines
with warm regards, Chander Kashyap
Quoted 48 lines · Chander Kashyap
Quoted 47 lines · Tomasz Figa
Hi Chander,
Quoted 43 lines · Chander Kashyap
Quoted 37 lines · Chander Kashyap
Quoted 29 lines · Chander Kashyap
The address of cpu power registers in pmu is based on cpu number offsets. This function calculate the same. This is essentially required in case of multicluster SoC's e.g Exynos5420.
Signed-off-by Chander Kashyap <[email protected]>Signed-off-by Chander Kashyap <[email protected]>--- arch/arm/mach-exynos/regs-pmu.h | 9 +++++++++ 1 file changed, 9 insertions(+)arch/arm/mach-exynos/regs-pmu.h +9
-1@@ -313,4 +313,13 @@#define EXYNOS5_OPTION_USE_RETENTION (1 << 4) +#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 */ --Quoted 2 lines
1.7.9.5
Kukjin, Can you please have a look.
Quoted 3 lines
--
with warm regards,
Chander KashyapHi Kgene,
Can you take this patch if no issues with it.
Quoted 7 lines
Quoted 2 lines
Is there any user for this function right now? Shouldn't this patch rather be included as a part of some series that adds actual users of it?
Hi Tomasz,
Exynos5420 patches have dependency on this.
Those patches already posted.
Please ignore. Sending this with cpuidle patches
Quoted 11 lines
Quoted 5 lines
Best regards,
Tomasz--
with warm regards,
Chander Kashyap
Signature · 2 lines
with warm regards, Chander Kashyap