add cpuidle support for Exynos5420
Subsystems (5)
A message that is not in the archive (sent off-list or not yet received): ANuQgHGSPJ45tbrVppAVpOqF0OfHacPWfX=S5mOVxTPr66f7vg@mail.gmail.com
v5 cover add cpuidle support for Exynos5420
Exynos5420 is a big-little Soc from Samsung. It has 4 A15 and 4 A7 cores.
This patchset adds cpuidle support for Exynos5420 SoC based on generic big.little cpuidle driver.
Tested on SMDK5420.
This patch set depends on:
1. [PATCH 0/5] MCPM backend for Exynos5420 http://www.spinics.net/lists/arm-kernel/msg331100.html
Changelog is in respective patches.
Chander Kashyap (5):
driver: cpuidle-big-little: add of_device_id structure
arm: exynos: add generic function to calculate cpu number
cpuidle: config: Add ARCH_EXYNOS entry to select cpuidle-big-little
driver
driver: cpuidle: cpuidle-big-little: init driver for Exynos5420
exynos: cpuidle: do not allow cpuidle registration for Exynos5420
mcpm: exynos: populate suspend and powered_up callbacks
arch/arm/mach-exynos/cpuidle.c | 3 +++ arch/arm/mach-exynos/mcpm-exynos.c | 36 ++++++++++++++++++++++++++++++++++ arch/arm/mach-exynos/regs-pmu.h | 9 +++++++++ drivers/cpuidle/Kconfig.arm | 2 +- drivers/cpuidle/cpuidle-big_little.c | 12 +++++++++++- 5 files changed, 60 insertions(+), 2 deletions(-)
Signature · 1 line
1.7.9.5
PATCH v5 1/6 driver: cpuidle-big-little: add of_device_id structure
This driver will be used by many big.Little Soc's. As of now it does string matching of hardcoded compatible string to init the driver. This comparison list will keep on growing with addition of new SoC's. Hence add of_device_id structure to collect the compatible strings of SoC's using this driver.
--- drivers/cpuidle/cpuidle-big_little.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
drivers/cpuidle/cpuidle-big_little.c +10 -1
@@ -163,14 +163,23 @@ static int __init bl_idle_driver_init(struct cpuidle_driver *drv, int cpu_id)return 0 ; } +static const struct of_device_id compatible_machine_match[] = { + { .compatible ="arm,vexpress,v2p-ca15_a7" }, + {}, +}; +static int __init bl_idle_init (void ) {int ret; +struct device_node *root =of_find_node_by_path ("/" ); + +if (!root) +return -ENODEV ;/* * Initialize the driver just for a compliant set of machines */ -if (!of_machine_is_compatible ("arm,vexpress,v2p-ca15_a7" )) +if (!of_match_node (compatible_machine_match, root))return -ENODEV ;/* * For now the differentiation between little and big cores
Signature · 1 line
1.7.9.5
PATCH v5 2/6 arm: exynos: add generic function to calculate cpu number
In reply to Chander KashyapThe 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 multi-cluster 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
@@ -325,4 +325,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 */
Signature · 1 line
1.7.9.5
PATCH v5 3/6 cpuidle: config: Add ARCH_EXYNOS entry to select cpuidle-big-little driver
In reply to Chander KashyapAdd support to select generic big-little cpuidle driver for Samsung Exynos series SoC's. This is required for Exynos big-little SoC's eg, Exynos5420.
---
Changes in v4:
1. Typo fixed from SOC_EXYNOS5420 to ARCH_EXYNOS
2. Commit message updated
Changes in v3: None
Changes in v2:
1. Changed config macro from SOC_EXYNOS5420 to ARCH_EXYNOS
drivers/cpuidle/Kconfig.arm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/cpuidle/Kconfig.arm +1 -1
@@ -4,7 +4,7 @@ config ARM_BIG_LITTLE_CPUIDLE bool "Support for ARM big.LITTLE processors" - depends on ARCH_VEXPRESS_TC2_PM + depends on ARCH_VEXPRESS_TC2_PM || ARCH_EXYNOS select ARM_CPU_SUSPEND select CPU_IDLE_MULTIPLE_DRIVERS help
Signature · 1 line
1.7.9.5
PATCH v5 4/6 driver: cpuidle: cpuidle-big-little: init driver for Exynos5420
In reply to Chander KashyapAdd "samsung,exynos5420" compatible string to initialize generic big-little cpuidle driver for Exynos5420.
---
Changes in v4: None
Changes in v3:
1. Add compatible string to of_device_id table insted comparing directoly
Changes in v2: none
drivers/cpuidle/cpuidle-big_little.c | 1 + 1 file changed, 1 insertion(+)
drivers/cpuidle/cpuidle-big_little.c +1 -0
@@ -165,6 +165,7 @@ static int __init bl_idle_driver_init(struct cpuidle_driver *drv, int cpu_id)static const struct of_device_id compatible_machine_match[] = { { .compatible ="arm,vexpress,v2p-ca15_a7" }, + { .compatible ="samsung,exynos5420" }, {}, };
Signature · 1 line
1.7.9.5
Re: [PATCH v5 4/6] driver: cpuidle: cpuidle-big-little: init driver for Exynos5420
drivers/cpuidle/cpuidle-big_little.c static int __init bl_idle_driver_init(struct cpuidle_driver *drv, int cpu_id) · line 170
Quoted 12 lines · On Wednesday 14 May 2014 13:33:55 Chander Kashyap wrote:
drivers/cpuidle/cpuidle-big_little.c +1
-0@@ -165,6 +165,7 @@ static int __init bl_idle_driver_init(struct cpuidle_driver *drv, int cpu_id)static const struct of_device_id compatible_machine_match[] = { { .compatible ="arm,vexpress,v2p-ca15_a7" }, + { .compatible ="samsung,exynos5420" }, {}, };
Does the cpuidle-big_little driver actually care about the platform? If not, it would be good to add a generic string here as well, for future platforms to match.
It still makes sense to list both the generic string and the platform specific one though, in case we have to work around subtle differences.
Arnd
Re: [PATCH v5 4/6] driver: cpuidle: cpuidle-big-little: init driver for Exynos5420
Quoted 8 lines · Arnd Bergmann
Quoted 7 lines · On Wednesday 14 May 2014 13:33:55 Chander Kashyap wrote:
drivers/cpuidle/cpuidle-big_little.c +0
-0@@ -165,6 +165,7 @@ static int __init bl_idle_driver_init(struct cpuidle_driver *drv, int cpu_id)
Quoted 7 lines
drivers/cpuidle/cpuidle-big_little.c static int __init bl_idle_driver_init(struct cpuidle_driver *drv, int cpu_id) · line 170
Quoted 5 lines
drivers/cpuidle/cpuidle-big_little.c +1
-0static const struct of_device_id compatible_machine_match[] = { { .compatible ="arm,vexpress,v2p-ca15_a7" }, + { .compatible ="samsung,exynos5420" }, {}, };Does the cpuidle-big_little driver actually care about the platform?
No, platform specific bits are hidden behind MCPM. Apart from idle states data, that will soon be initialized through DT too.
Actually, when idle for arm64 is merged we can even rework it and end up with a single driver, DT based, that's the ultimate goal.
Quoted 2 lines
If not, it would be good to add a generic string here as well, for future platforms to match.
Yes, you have a point.
Quoted 2 lines
It still makes sense to list both the generic string and the platform specific one though, in case we have to work around subtle differences.
Agreed, but subtle differences do not belong in this driver, that's the purpose of abstracting it the best we can. I have no problem in leaving platform specific compatible there though.
Lorenzo
Quoted 8 lines
Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH v5 5/6 exynos: cpuidle: do not allow cpuidle registration for Exynos5420
In reply to Chander KashyapExynos5420 is big.Little Soc. It uses cpuidle-big-litle generic cpuidle driver. Hence do not allow exynos cpuidle driver registration for Exynos5420.
--- arch/arm/mach-exynos/cpuidle.c | 3 +++ 1 file changed, 3 insertions(+)
arch/arm/mach-exynos/cpuidle.c +3 -0
@@ -218,6 +218,9 @@ static int exynos_cpuidle_probe(struct platform_device *pdev)int cpu_id, ret;struct cpuidle_device *device; +if (soc_is_exynos5420 ()) +return -ENODEV ; +if (soc_is_exynos5250 ())exynos5_core_down_clk ();
Signature · 1 line
1.7.9.5
Re: [PATCH v5 5/6] exynos: cpuidle: do not allow cpuidle registration for Exynos5420
Hi Chander,
Quoted 16 lines · Chander Kashyap
Exynos5420 is big.Little Soc. It uses cpuidle-big-litle generic cpuidle driver. Hence do not allow exynos cpuidle driver registration for Exynos5420.
Signed-off-by Chander Kashyap <[email protected]>Signed-off-by Chander Kashyap <[email protected]>Acked-by Daniel Lezcano <[email protected]>--- arch/arm/mach-exynos/cpuidle.c | 3 +++ 1 file changed, 3 insertions(+)arch/arm/mach-exynos/cpuidle.c +0
-0
arch/arm/mach-exynos/cpuidle.c static int exynos_cpuidle_probe(struct platform_device *pdev) · line 226
Quoted 9 lines
arch/arm/mach-exynos/cpuidle.c +3
-0@@ -218,6 +218,9 @@ static int exynos_cpuidle_probe(struct platform_device *pdev)int cpu_id, ret;struct cpuidle_device *device; +if (soc_is_exynos5420 ()) +return -ENODEV ; +if (soc_is_exynos5250 ())exynos5_core_down_clk ();
Why not put this in exynos.c in exynos_dt_machine_init(), so exynos_cpuidle_init() is called only if not running on Exynos5420?
Best regards,
Tomasz
Re: [PATCH v5 5/6] exynos: cpuidle: do not allow cpuidle registration for Exynos5420
Hi Tomasz,
Quoted 21 lines · Tomasz Figa
Hi Chander,
Quoted 18 lines · Chander Kashyap
Exynos5420 is big.Little Soc. It uses cpuidle-big-litle generic cpuidle driver. Hence do not allow exynos cpuidle driver registration for Exynos5420.
Signed-off-by Chander Kashyap <[email protected]>Signed-off-by Chander Kashyap <[email protected]>Acked-by Daniel Lezcano <[email protected]>--- arch/arm/mach-exynos/cpuidle.c | 3 +++ 1 file changed, 3 insertions(+)arch/arm/mach-exynos/cpuidle.c +0
-0@@ -218,6 +218,9 @@ static int exynos_cpuidle_probe(struct platform_device *pdev)int cpu_id, ret;struct cpuidle_device *device;
Quoted 11 lines
arch/arm/mach-exynos/cpuidle.c static int exynos_cpuidle_probe(struct platform_device *pdev) · line 226
Quoted 7 lines
arch/arm/mach-exynos/cpuidle.c +3
-0+if (soc_is_exynos5420 ()) +return -ENODEV ; +if (soc_is_exynos5250 ())exynos5_core_down_clk ();Why not put this in
exynos.cinexynos_dt_machine_init(), soexynos_cpuidle_init()is called only if not running on Exynos5420?
That makes more sense.
I will update this
Thanks
Quoted 2 lines
Best regards,
Tomasz
Signature · 2 lines
with warm regards, Chander Kashyap
v6 cover add cpuidle support for Exynos5420
Exynos5420 is a big-little Soc from Samsung. It has 4 A15 and 4 A7 cores.
This patchset adds cpuidle support for Exynos5420 SoC based on generic big.little cpuidle driver.
Tested on SMDK5420.
This patch set depends on:
1. [PATCH 0/5] MCPM backend for Exynos5420 http://www.spinics.net/lists/arm-kernel/msg331100.html
Changelog is in respective patches.
Chander Kashyap (5):
driver: cpuidle-big-little: add of_device_id structure
arm: exynos: add generic function to calculate cpu number
cpuidle: config: Add ARCH_EXYNOS entry to select cpuidle-big-little
driver
driver: cpuidle: cpuidle-big-little: init driver for Exynos5420
exynos: cpuidle: do not allow cpuidle registration for Exynos5420
mcpm: exynos: populate suspend and powered_up callbacks
arch/arm/mach-exynos/exynos.c | 4 +++- arch/arm/mach-exynos/mcpm-exynos.c | 36 ++++++++++++++++++++++++++++++++++ arch/arm/mach-exynos/regs-pmu.h | 9 +++++++++ drivers/cpuidle/Kconfig.arm | 2 +- drivers/cpuidle/cpuidle-big_little.c | 12 +++++++++++- 5 files changed, 60 insertions(+), 3 deletions(-)
Signature · 1 line
1.7.9.5
PATCH v6 1/6 driver: cpuidle-big-little: add of_device_id structure
This driver will be used by many big.Little Soc's. As of now it does string matching of hardcoded compatible string to init the driver. This comparison list will keep on growing with addition of new SoC's. Hence add of_device_id structure to collect the compatible strings of SoC's using this driver.
--- drivers/cpuidle/cpuidle-big_little.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
drivers/cpuidle/cpuidle-big_little.c +10 -1
@@ -163,14 +163,23 @@ static int __init bl_idle_driver_init(struct cpuidle_driver *drv, int cpu_id)return 0 ; } +static const struct of_device_id compatible_machine_match[] = { + { .compatible ="arm,vexpress,v2p-ca15_a7" }, + {}, +}; +static int __init bl_idle_init (void ) {int ret; +struct device_node *root =of_find_node_by_path ("/" ); + +if (!root) +return -ENODEV ;/* * Initialize the driver just for a compliant set of machines */ -if (!of_machine_is_compatible ("arm,vexpress,v2p-ca15_a7" )) +if (!of_match_node (compatible_machine_match, root))return -ENODEV ;/* * For now the differentiation between little and big cores
Signature · 1 line
1.7.9.5
Re: [PATCH v6 1/6] driver: cpuidle-big-little: add of_device_id structure
Quoted 8 lines · Chander Kashyap
This driver will be used by many big.Little Soc's. As of now it does string matching of hardcoded compatible string to init the driver. This comparison list will keep on growing with addition of new SoC's. Hence add
of_device_idstructure to collect the compatible strings of SoC's using this driver.Signed-off-by Chander Kashyap <[email protected]>Signed-off-by Chander Kashyap <[email protected]>
Quoted 34 lines
--- drivers/cpuidle/cpuidle-big_little.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)drivers/cpuidle/cpuidle-big_little.c +10
-1@@ -163,14 +163,23 @@ static int __init bl_idle_driver_init(struct cpuidle_driver *drv, int cpu_id)return 0 ; } +static const struct of_device_id compatible_machine_match[] = { + { .compatible ="arm,vexpress,v2p-ca15_a7" }, + {}, +}; +static int __init bl_idle_init (void ) {int ret; +struct device_node *root =of_find_node_by_path ("/" ); + +if (!root) +return -ENODEV ;/* * Initialize the driver just for a compliant set of machines */ -if (!of_machine_is_compatible ("arm,vexpress,v2p-ca15_a7" )) +if (!of_match_node (compatible_machine_match, root))return -ENODEV ;/* * For now the differentiation between little and big cores
Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog
PATCH v6 2/6 arm: exynos: add generic function to calculate cpu number
In reply to Chander KashyapThe 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 multi-cluster 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
@@ -325,4 +325,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 */
Signature · 1 line
1.7.9.5
PATCH v6 3/6 cpuidle: config: Add ARCH_EXYNOS entry to select cpuidle-big-little driver
In reply to Chander KashyapAdd support to select generic big-little cpuidle driver for Samsung Exynos series SoC's. This is required for Exynos big-llittle SoC's eg, Exynos5420.
---
Changes in v4:
1. Typo fixed from SOC_EXYNOS5420 to ARCH_EXYNOS
2. Commit message updated
Changes in v3: None
Changes in v2:
1. Changed config macro from SOC_EXYNOS5420 to ARCH_EXYNOS
drivers/cpuidle/Kconfig.arm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/cpuidle/Kconfig.arm +1 -1
@@ -4,7 +4,7 @@ config ARM_BIG_LITTLE_CPUIDLE bool "Support for ARM big.LITTLE processors" - depends on ARCH_VEXPRESS_TC2_PM + depends on ARCH_VEXPRESS_TC2_PM || ARCH_EXYNOS select ARM_CPU_SUSPEND select CPU_IDLE_MULTIPLE_DRIVERS help
Signature · 1 line
1.7.9.5
Re: [PATCH v6 3/6] cpuidle: config: Add ARCH_EXYNOS entry to select cpuidle-big-little driver
Quoted 5 lines · Chander Kashyap
Add support to select generic big-little cpuidle driver for Samsung Exynos series SoC's. This is required for Exynos big-llittle SoC's eg, Exynos5420.
Signed-off-by Chander Kashyap <[email protected]>Signed-off-by Chander Kashyap <[email protected]>
Quoted 24 lines
---
Changes in v4:
1. Typo fixed fromSOC_EXYNOS5420toARCH_EXYNOS
2. Commit message updated
Changes in v3: None
Changes in v2:
1. Changed config macro fromSOC_EXYNOS5420toARCH_EXYNOSdrivers/cpuidle/Kconfig.arm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/cpuidle/Kconfig.arm +1
-1@@ -4,7 +4,7 @@ config ARM_BIG_LITTLE_CPUIDLE bool "Support for ARM big.LITTLE processors" - depends on ARCH_VEXPRESS_TC2_PM + depends on ARCH_VEXPRESS_TC2_PM || ARCH_EXYNOS select ARM_CPU_SUSPEND select CPU_IDLE_MULTIPLE_DRIVERS help
Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog
PATCH v6 4/6 driver: cpuidle: cpuidle-big-little: init driver for Exynos5420
In reply to Chander KashyapAdd "samsung,exynos5420" compatible string to initialize generic big-little cpuidle driver for Exynos5420.
---
Changes in v5: None
Changes in v4: None
Changes in v3:
1. Add compatible string to of_device_id table insted comparing directoly
Changes in v2: none
drivers/cpuidle/cpuidle-big_little.c | 1 + 1 file changed, 1 insertion(+)
drivers/cpuidle/cpuidle-big_little.c +1 -0
@@ -165,6 +165,7 @@ static int __init bl_idle_driver_init(struct cpuidle_driver *drv, int cpu_id)static const struct of_device_id compatible_machine_match[] = { { .compatible ="arm,vexpress,v2p-ca15_a7" }, + { .compatible ="samsung,exynos5420" }, {}, };
Signature · 1 line
1.7.9.5
PATCH v6 5/6 exynos: cpuidle: do not allow cpuidle registration for Exynos5420
In reply to Chander KashyapExynos5420 is big.Little Soc. It uses cpuidle-big-litle generic cpuidle driver. Hence do not allow exynos cpuidle driver registration for Exynos5420.
---
Changes in v6:
1. Move cpuidle registration check to exynos.c from cpuidle.c and use "samsung,exynos5420" compatible string to avvoid registration
arch/arm/mach-exynos/exynos.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
arch/arm/mach-exynos/exynos.c +3 -1
@@ -286,7 +286,9 @@ static void __init exynos_dt_machine_init(void) } } -exynos_cpuidle_init (); +if (!of_machine_is_compatible ("samsung,exynos5420" )) +exynos_cpuidle_init (); +exynos_cpufreq_init ();of_platform_populate (NULL , of_default_bus_match_table,NULL ,NULL );
Signature · 1 line
1.7.9.5
PATCH v6 6/6 mcpm: exynos: populate suspend and powered_up callbacks
In reply to Chander KashyapIn order to support cpuidle through mcpm, suspend and powered-up callbacks are required in mcpm platform code.
Hence populate the same callbacks.
---
Changes in v6: None
Changes in v5:
1. Add comment to address cache access while c-bit is cleared in SCLTR
2. Make exynos_powered_up static
Changes in v4: None
Changes in v3:
1. Removed coherency enablement after suspend failure.
2. Use generic function to poweron cpu.
changes in v2:
1. Fixed typo: enynos_pmu_cpunr to exynos_pmu_cpunr
arch/arm/mach-exynos/mcpm-exynos.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+)
arch/arm/mach-exynos/mcpm-exynos.c +36 -0
@@ -253,10 +253,46 @@ static int exynos_power_down_finish(unsigned int cpu, unsigned int cluster)return -ETIMEDOUT ;/* timeout */ } +static void exynos_powered_up (void ) +{ +unsigned int mpidr, cpu, cluster; + + mpidr =read_cpuid_mpidr (); + cpu =MPIDR_AFFINITY_LEVEL (mpidr,0 ); + cluster =MPIDR_AFFINITY_LEVEL (mpidr,1 ); + +arch_spin_lock (&exynos_mcpm_lock); +if (cpu_use_count[cpu][cluster] ==0 ) + cpu_use_count[cpu][cluster] =1 ; +arch_spin_unlock (&exynos_mcpm_lock); +} + +static void exynos_suspend (u64 residency) +{ +unsigned int mpidr, cpunr; + +exynos_power_down (); + +/* +* Execution reaches here only if cpu did not power down. +* Hence roll back the changes done in exynos_power_down function. +* +* CAUTION: "This function requires the stack data to be visible through +* power down and can only be executed on processors like A15 and A7 +* that hit the cache with the C bit clear in the SCTLR register." +*/ + mpidr =read_cpuid_mpidr (); + cpunr =exynos_pmu_cpunr (mpidr); + +exynos_cpu_power_up (cpunr); +} +static const struct mcpm_platform_ops exynos_power_ops = { .power_up = exynos_power_up, .power_down = exynos_power_down, .power_down_finish = exynos_power_down_finish, + .suspend = exynos_suspend, + .powered_up = exynos_powered_up, };static void __init exynos_mcpm_usage_count_init (void )
Signature · 1 line
1.7.9.5
Hi Daniel/Kgene,
Quoted 27 lines · Chander Kashyap
Exynos5420 is a big-little Soc from Samsung. It has 4 A15 and 4 A7 cores.
This patchset adds cpuidle support for Exynos5420 SoC based on generic big.little cpuidle driver.
Tested on SMDK5420.
This patch set depends on:
1. [PATCH 0/5] MCPM backend for Exynos5420
http://www.spinics.net/lists/arm-kernel/msg331100.html
Changelog is in respective patches.
Chander Kashyap (5):
driver: cpuidle-big-little: addof_device_idstructure
arm: exynos: add generic function to calculate cpu number
cpuidle: config: AddARCH_EXYNOSentry to select cpuidle-big-little
driver
driver: cpuidle: cpuidle-big-little: init driver for Exynos5420
exynos: cpuidle: do not allow cpuidle registration for Exynos5420
mcpm: exynos: populate suspend andpowered_upcallbacksarch/arm/mach-exynos/exynos.c | 4 +++- arch/arm/mach-exynos/mcpm-exynos.c | 36 ++++++++++++++++++++++++++++++++++ arch/arm/mach-exynos/regs-pmu.h | 9 +++++++++ drivers/cpuidle/Kconfig.arm | 2 +- drivers/cpuidle/cpuidle-big_little.c | 12 +++++++++++- 5 files changed, 60 insertions(+), 3 deletions(-)
Quoted 3 lines
--
1.7.9.5
As dependency patches are merged. If their are no further comment, can these patches be taken?
Signature · 2 lines
with warm regards, Chander Kashyap
Quoted 30 lines · Chander Kashyap
Hi Daniel/Kgene,
Quoted 27 lines · Chander Kashyap
Exynos5420 is a big-little Soc from Samsung. It has 4 A15 and 4 A7 cores.
This patchset adds cpuidle support for Exynos5420 SoC based on generic big.little cpuidle driver.
Tested on SMDK5420.
This patch set depends on:
1. [PATCH 0/5] MCPM backend for Exynos5420
http://www.spinics.net/lists/arm-kernel/msg331100.html
Changelog is in respective patches.
Chander Kashyap (5):
driver: cpuidle-big-little: addof_device_idstructure
arm: exynos: add generic function to calculate cpu number
cpuidle: config: AddARCH_EXYNOSentry to select cpuidle-big-little
driver
driver: cpuidle: cpuidle-big-little: init driver for Exynos5420
exynos: cpuidle: do not allow cpuidle registration for Exynos5420
mcpm: exynos: populate suspend andpowered_upcallbacksarch/arm/mach-exynos/exynos.c | 4 +++- arch/arm/mach-exynos/mcpm-exynos.c | 36 ++++++++++++++++++++++++++++++++++ arch/arm/mach-exynos/regs-pmu.h | 9 +++++++++ drivers/cpuidle/Kconfig.arm | 2 +- drivers/cpuidle/cpuidle-big_little.c | 12 +++++++++++- 5 files changed, 60 insertions(+), 3 deletions(-)
Quoted 7 lines
Quoted 3 lines
--
1.7.9.5As dependency patches are merged. If their are no further comment, can these patches be taken?
ping
Quoted 3 lines
--
with warm regards,
Chander Kashyap
Signature · 2 lines
with warm regards, Chander Kashyap
Hi Chander,
Quoted 20 lines · Chander Kashyap
Exynos5420 is a big-little Soc from Samsung. It has 4 A15 and 4 A7 cores.
This patchset adds cpuidle support for Exynos5420 SoC based on generic big.little cpuidle driver.
Tested on SMDK5420.
This patch set depends on:
1. [PATCH 0/5] MCPM backend for Exynos5420 http://www.spinics.net/lists/arm-kernel/msg331100.htmlChangelog is in respective patches.
Chander Kashyap (5):
driver: cpuidle-big-little: addof_device_idstructure
arm: exynos: add generic function to calculate cpu number
cpuidle: config: AddARCH_EXYNOSentry to select cpuidle-big-little
driver
driver: cpuidle: cpuidle-big-little: init driver for Exynos5420
exynos: cpuidle: do not allow cpuidle registration for Exynos5420
mcpm: exynos: populate suspend andpowered_upcallbacks
Quoted 7 lines
arch/arm/mach-exynos/exynos.c | 4 +++- arch/arm/mach-exynos/mcpm-exynos.c | 36 ++++++++++++++++++++++++++++++++++ arch/arm/mach-exynos/regs-pmu.h | 9 +++++++++ drivers/cpuidle/Kconfig.arm | 2 +- drivers/cpuidle/cpuidle-big_little.c | 12 +++++++++++- 5 files changed, 60 insertions(+), 3 deletions(-)
For the whole series,
Best regards,
Tomasz
Quoted 31 lines · Tomasz Figa
Hi Chander,
Quoted 20 lines · Chander Kashyap
Exynos5420 is a big-little Soc from Samsung. It has 4 A15 and 4 A7 cores.
This patchset adds cpuidle support for Exynos5420 SoC based on generic big.little cpuidle driver.
Tested on SMDK5420.
This patch set depends on:
1. [PATCH 0/5] MCPM backend for Exynos5420
http://www.spinics.net/lists/arm-kernel/msg331100.html
Changelog is in respective patches.
Chander Kashyap (5):
driver: cpuidle-big-little: addof_device_idstructure
arm: exynos: add generic function to calculate cpu number
cpuidle: config: AddARCH_EXYNOSentry to select cpuidle-big-little
driver
driver: cpuidle: cpuidle-big-little: init driver for Exynos5420
exynos: cpuidle: do not allow cpuidle registration for Exynos5420
mcpm: exynos: populate suspend andpowered_upcallbacksQuoted 7 lines
arch/arm/mach-exynos/exynos.c | 4 +++- arch/arm/mach-exynos/mcpm-exynos.c | 36 ++++++++++++++++++++++++++++++++++ arch/arm/mach-exynos/regs-pmu.h | 9 +++++++++ drivers/cpuidle/Kconfig.arm | 2 +- drivers/cpuidle/cpuidle-big_little.c | 12 +++++++++++- 5 files changed, 60 insertions(+), 3 deletions(-)
Quoted 3 lines
For the whole series,
Reviewed-by Tomasz Figa <[email protected]>
Thanks Tomasz.
Dear Kukjin,
Can you take these patches.
Quoted 3 lines
Best regards,
Tomasz
Signature · 2 lines
with warm regards, Chander Kashyap
Quoted 35 lines · Chander Kashyap
Quoted 4 lines · Tomasz Figa
Hi Chander,
Quoted 1 line · Chander Kashyap
Exynos5420 is a big-little Soc from Samsung. It has 4 A15 and 4 A7
cores.
Quoted 19 lines
Quoted 19 lines
This patchset adds cpuidle support for Exynos5420 SoC based on generic big.little cpuidle driver.
Tested on SMDK5420.
This patch set depends on:
1. [PATCH 0/5] MCPM backend for Exynos5420
http://www.spinics.net/lists/arm-kernel/msg331100.html
Changelog is in respective patches.
Chander Kashyap (5):
driver: cpuidle-big-little: addof_device_idstructure
arm: exynos: add generic function to calculate cpu number
cpuidle: config: AddARCH_EXYNOSentry to select cpuidle-big-little
driver
driver: cpuidle: cpuidle-big-little: init driver for Exynos5420
exynos: cpuidle: do not allow cpuidle registration for Exynos5420
mcpm: exynos: populate suspend andpowered_upcallbacksQuoted 2 lines
Quoted 2 lines
arch/arm/mach-exynos/exynos.c | 4 +++- arch/arm/mach-exynos/mcpm-exynos.c | 36++++++++++++++++++++++++++++++++++
Quoted 6 lines
Quoted 5 lines
arch/arm/mach-exynos/regs-pmu.h | 9 +++++++++ drivers/cpuidle/Kconfig.arm | 2 +- drivers/cpuidle/cpuidle-big_little.c | 12 +++++++++++- 5 files changed, 60 insertions(+), 3 deletions(-)
Quoted 9 lines
Quoted 3 lines
For the whole series,
Reviewed-by Tomasz Figa <[email protected]>Thanks Tomasz.
Dear Kukjin,
Can you take these patches.Quoted 1 line
When I looked at this series quickly, looks good to me but I need to get ack from cpuidle maintainer Rafael or Daniel.
Thanks,
Kukjin
Quoted 38 lines · Kukjin Kim
Quoted 37 lines · Chander Kashyap
Quoted 4 lines · Tomasz Figa
Hi Chander,
Quoted 1 line · Chander Kashyap
Exynos5420 is a big-little Soc from Samsung. It has 4 A15 and 4 A7
cores.
Quoted 19 lines
Quoted 19 lines
This patchset adds cpuidle support for Exynos5420 SoC based on generic big.little cpuidle driver.
Tested on SMDK5420.
This patch set depends on:
1. [PATCH 0/5] MCPM backend for Exynos5420
http://www.spinics.net/lists/arm-kernel/msg331100.html
Changelog is in respective patches.
Chander Kashyap (5):
driver: cpuidle-big-little: addof_device_idstructure
arm: exynos: add generic function to calculate cpu number
cpuidle: config: AddARCH_EXYNOSentry to select cpuidle-big-little
driver
driver: cpuidle: cpuidle-big-little: init driver for Exynos5420
exynos: cpuidle: do not allow cpuidle registration for Exynos5420
mcpm: exynos: populate suspend andpowered_upcallbacksQuoted 2 lines
Quoted 2 lines
arch/arm/mach-exynos/exynos.c | 4 +++- arch/arm/mach-exynos/mcpm-exynos.c | 36++++++++++++++++++++++++++++++++++
Quoted 8 lines
Quoted 5 lines
arch/arm/mach-exynos/regs-pmu.h | 9 +++++++++ drivers/cpuidle/Kconfig.arm | 2 +- drivers/cpuidle/cpuidle-big_little.c | 12 +++++++++++- 5 files changed, 60 insertions(+), 3 deletions(-)For the whole series,
Quoted 8 lines
Quoted 7 lines
Quoted 1 line
Reviewed-by Tomasz Figa <[email protected]>Thanks Tomasz.
Dear Kukjin,
Can you take these patches.Quoted 1 line
When I looked at this series quickly, looks good to me but I need to get ack from cpuidle maintainer Rafael or Daniel.
Acked the different cpuidle bits.
Thanks
-- Daniel
Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog
Quoted 56 lines · Daniel Lezcano
Quoted 55 lines · Kukjin Kim
Quoted 53 lines · Chander Kashyap
Quoted 6 lines · Tomasz Figa
Hi Chander,
Quoted 2 lines · Chander Kashyap
Exynos5420 is a big-little Soc from Samsung. It has 4 A15 and 4 A7
cores.
Quoted 20 lines
Quoted 20 lines
This patchset adds cpuidle support for Exynos5420 SoC based on generic big.little cpuidle driver.
Tested on SMDK5420.
This patch set depends on:
1. [PATCH 0/5] MCPM backend for Exynos5420
http://www.spinics.net/lists/arm-kernel/msg331100.html
Changelog is in respective patches.
Chander Kashyap (5):
driver: cpuidle-big-little: addof_device_idstructure
arm: exynos: add generic function to calculate cpu number
cpuidle: config: AddARCH_EXYNOSentry to select cpuidle-big-little
driver
driver: cpuidle: cpuidle-big-little: init driver for Exynos5420
exynos: cpuidle: do not allow cpuidle registration for Exynos5420
mcpm: exynos: populate suspend andpowered_upcallbacksQuoted 2 lines
Quoted 2 lines
arch/arm/mach-exynos/exynos.c | 4 +++- arch/arm/mach-exynos/mcpm-exynos.c | 36++++++++++++++++++++++++++++++++++
Quoted 10 lines
Quoted 6 lines
arch/arm/mach-exynos/regs-pmu.h | 9 +++++++++ drivers/cpuidle/Kconfig.arm | 2 +- drivers/cpuidle/cpuidle-big_little.c | 12 +++++++++++- 5 files changed, 60 insertions(+), 3 deletions(-)For the whole series,
Reviewed-by Tomasz Figa <[email protected]>Thanks Tomasz.
Dear Kukjin,
Can you take these patches.Quoted 2 lines
Quoted 5 lines
Quoted 2 lines
When I looked at this series quickly, looks good to me but I need to get ack from cpuidle maintainer Rafael or Daniel.
Acked the different cpuidle bits.
Hi Kukjin,
Can you take it now?
Quoted 12 lines
Thanks
-- Daniel--
<http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCsFollow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
Signature · 2 lines
with warm regards, Chander Kashyap
Quoted 57 lines · Chander Kashyap
Quoted 56 lines · Daniel Lezcano
Quoted 55 lines · Kukjin Kim
Quoted 53 lines · Chander Kashyap
Quoted 6 lines · Tomasz Figa
Hi Chander,
Quoted 2 lines · Chander Kashyap
Exynos5420 is a big-little Soc from Samsung. It has 4 A15 and 4 A7
cores.
Quoted 20 lines
Quoted 20 lines
This patchset adds cpuidle support for Exynos5420 SoC based on generic big.little cpuidle driver.
Tested on SMDK5420.
This patch set depends on:
1. [PATCH 0/5] MCPM backend for Exynos5420
http://www.spinics.net/lists/arm-kernel/msg331100.html
Changelog is in respective patches.
Chander Kashyap (5):
driver: cpuidle-big-little: addof_device_idstructure
arm: exynos: add generic function to calculate cpu number
cpuidle: config: AddARCH_EXYNOSentry to select cpuidle-big-little
driver
driver: cpuidle: cpuidle-big-little: init driver for Exynos5420
exynos: cpuidle: do not allow cpuidle registration for Exynos5420
mcpm: exynos: populate suspend andpowered_upcallbacksQuoted 2 lines
Quoted 2 lines
arch/arm/mach-exynos/exynos.c | 4 +++- arch/arm/mach-exynos/mcpm-exynos.c | 36++++++++++++++++++++++++++++++++++
Quoted 10 lines
Quoted 6 lines
arch/arm/mach-exynos/regs-pmu.h | 9 +++++++++ drivers/cpuidle/Kconfig.arm | 2 +- drivers/cpuidle/cpuidle-big_little.c | 12 +++++++++++- 5 files changed, 60 insertions(+), 3 deletions(-)For the whole series,
Reviewed-by Tomasz Figa <[email protected]>Thanks Tomasz.
Dear Kukjin,
Can you take these patches.Quoted 2 lines
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
When I looked at this series quickly, looks good to me but I need to get ack from cpuidle maintainer Rafael or Daniel.
Acked the different cpuidle bits.
Hi Kukjin,
Can you take it now?
ping
Sorry for previous html messages.
Quoted 20 lines
Quoted 7 lines
Thanks
-- DanielQuoted 7 lines
--
<http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCsFollow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog--
with warm regards,
Chander Kashyap
Signature · 4 lines
thanks and regards, Chander M. Kashyap Contact Number: +918123738320 ------- TENSION LENE KA NAHI, DENE KE-----
PATCH v5 6/6 mcpm: exynos: populate suspend and powered_up callbacks
In reply to Chander KashyapIn order to support cpuidle through mcpm, suspend and powered-up callbacks are required in mcpm platform code.
Hence populate the same callbacks.
---
Changes in v5:
1. Add comment to address cache access while c-bit is cleared in SCLTR
2. Make exynos_powered_up static
Changes in v4: None
Changes in v3:
1. Removed coherency enablement after suspend failure.
2. Use generic function to poweron cpu.
changes in v2:
1. Fixed typo: enynos_pmu_cpunr to exynos_pmu_cpunr
arch/arm/mach-exynos/mcpm-exynos.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+)
arch/arm/mach-exynos/mcpm-exynos.c +36 -0
@@ -253,10 +253,46 @@ static int exynos_power_down_finish(unsigned int cpu, unsigned int cluster)return -ETIMEDOUT ;/* timeout */ } +static void exynos_powered_up (void ) +{ +unsigned int mpidr, cpu, cluster; + + mpidr =read_cpuid_mpidr (); + cpu =MPIDR_AFFINITY_LEVEL (mpidr,0 ); + cluster =MPIDR_AFFINITY_LEVEL (mpidr,1 ); + +arch_spin_lock (&exynos_mcpm_lock); +if (cpu_use_count[cpu][cluster] ==0 ) + cpu_use_count[cpu][cluster] =1 ; +arch_spin_unlock (&exynos_mcpm_lock); +} + +static void exynos_suspend (u64 residency) +{ +unsigned int mpidr, cpunr; + +exynos_power_down (); + +/* +* Execution reaches here only if cpu did not power down. +* Hence roll back the changes done in exynos_power_down function. +* +* CAUTION: "This function requires the stack data to be visible through +* power down and can only be executed on processors like A15 and A7 +* that hit the cache with the C bit clear in the SCTLR register." +*/ + mpidr =read_cpuid_mpidr (); + cpunr =exynos_pmu_cpunr (mpidr); + +exynos_cpu_power_up (cpunr); +} +static const struct mcpm_platform_ops exynos_power_ops = { .power_up = exynos_power_up, .power_down = exynos_power_down, .power_down_finish = exynos_power_down_finish, + .suspend = exynos_suspend, + .powered_up = exynos_powered_up, };static void __init exynos_mcpm_usage_count_init (void )
Signature · 1 line
1.7.9.5
Quoted 4 lines · Chander Kashyap
Exynos5420 is a big-little Soc from Samsung. It has 4 A15 and 4 A7 cores.
This patchset adds cpuidle support for Exynos5420 SoC based on generic big.little cpuidle driver.
Hi Chander,
just a side question. I am not succeeding to have both cluster A7/A15 with the upstream kernel.
How can I test your driver ?
Did I miss something ?
Thanks
-- Daniel
Quoted 22 lines
Tested on SMDK5420.
This patch set depends on:
1. [PATCH 0/5] MCPM backend for Exynos5420 http://www.spinics.net/lists/arm-kernel/msg331100.htmlChangelog is in respective patches.
Chander Kashyap (5):
driver: cpuidle-big-little: addof_device_idstructure
arm: exynos: add generic function to calculate cpu number
cpuidle: config: AddARCH_EXYNOSentry to select cpuidle-big-little
driver
driver: cpuidle: cpuidle-big-little: init driver for Exynos5420
exynos: cpuidle: do not allow cpuidle registration for Exynos5420
mcpm: exynos: populate suspend andpowered_upcallbacksarch/arm/mach-exynos/cpuidle.c | 3 +++ arch/arm/mach-exynos/mcpm-exynos.c | 36 ++++++++++++++++++++++++++++++++++ arch/arm/mach-exynos/regs-pmu.h | 9 +++++++++ drivers/cpuidle/Kconfig.arm | 2 +- drivers/cpuidle/cpuidle-big_little.c | 12 +++++++++++- 5 files changed, 60 insertions(+), 2 deletions(-)
Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog
Hi Daniel,
Quoted 8 lines · Daniel Lezcano
Quoted 5 lines · Chander Kashyap
Exynos5420 is a big-little Soc from Samsung. It has 4 A15 and 4 A7 cores.
This patchset adds cpuidle support for Exynos5420 SoC based on generic big.little cpuidle driver.
Quoted 6 lines
Hi Chander,
just a side question. I am not succeeding to have both cluster A7/A15 with the upstream kernel.
How can I test your driver ?
Hmm on octa can be tested only for 4 cores. as cci is disabled.
Quoted 39 lines
Did I miss something ?
Thanks
-- DanielQuoted 15 lines
Tested on SMDK5420.
This patch set depends on:
1. [PATCH 0/5] MCPM backend for Exynos5420
http://www.spinics.net/lists/arm-kernel/msg331100.html
Changelog is in respective patches.
Chander Kashyap (5):
driver: cpuidle-big-little: addof_device_idstructure
arm: exynos: add generic function to calculate cpu number
cpuidle: config: AddARCH_EXYNOSentry to select cpuidle-big-little
driver
driver: cpuidle: cpuidle-big-little: init driver for Exynos5420
exynos: cpuidle: do not allow cpuidle registration for Exynos5420
mcpm: exynos: populate suspend andpowered_upcallbacksQuoted 8 lines
arch/arm/mach-exynos/cpuidle.c | 3 +++ arch/arm/mach-exynos/mcpm-exynos.c | 36 ++++++++++++++++++++++++++++++++++ arch/arm/mach-exynos/regs-pmu.h | 9 +++++++++ drivers/cpuidle/Kconfig.arm | 2 +- drivers/cpuidle/cpuidle-big_little.c | 12 +++++++++++- 5 files changed, 60 insertions(+), 2 deletions(-)--
<http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCsFollow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
Signature · 2 lines
with warm regards, Chander Kashyap