ARM: shmobile: r8a7790 APMU SMP support
Subsystems (5)
Magnus Damm
maintainerv2 cover ARM: shmobile: r8a7790 APMU SMP support
ARM: shmobile: r8a7790 APMU SMP support
[PATCH v2 01/03] ARM: shmobile: Shared APMU SMP support code without DT [PATCH v2 02/03] ARM: shmobile: Add r8a7790 SMP support using APMU code [PATCH v2 03/03] ARM: shmobile: Add r8a7790 CA15 CPU cores
This series adds SMP support to r8a7790 using the included APMU code. The previous version of r8a7790 support depended on the APMU code in "[PATCH] ARM: shmobile: Shared APMU SMP support code", but in this version the APMU code has been reworked to not use DT. In the future r8a73a4 and other SoCs may make use of the APMU as well, but the r8a73a4 code first needs to be adjusted to work with the CCI driver.
With these patches applied r8a7790 CA15 support for SMP boot and CPU Hotplug is known to be working.
Thanks to Sudeep for his feedback.
---
Written against renesas.git renesas-devel-20130829
arch/arm/boot/dts/r8a7790.dtsi | 21 ++ arch/arm/mach-shmobile/Makefile | 1 arch/arm/mach-shmobile/board-lager-reference.c | 1 arch/arm/mach-shmobile/board-lager.c | 1 arch/arm/mach-shmobile/include/mach/common.h | 6 arch/arm/mach-shmobile/include/mach/r8a7790.h | 1 arch/arm/mach-shmobile/platsmp-apmu.c | 178 ++++++++++++++++++++++++ arch/arm/mach-shmobile/setup-r8a7790.c | 1 arch/arm/mach-shmobile/smp-r8a7790.c | 67 +++++++++ 9 files changed, 277 insertions(+)
Magnus Damm
maintainerPATCH v2 1/3 ARM: shmobile: Shared APMU SMP support code without DT
From: Magnus Damm <[email protected]>
Introduce shared APMU SMP code for mach-shmobile. Both SMP boot up and CPU Hotplug is supported. This version does not use DT but if needed this will be added as an incremental feature patch.
The code is designed around CONFIG_NR_CPUS and should in theory support any number of APMUs, however due to the current DT-less static design only a single APMU is supported.
---
Changes since V1:
- Replaced DT bindings with static configuration
- Removed multi-APMU support
arch/arm/mach-shmobile/include/mach/common.h | 6 arch/arm/mach-shmobile/platsmp-apmu.c | 178 ++++++++++++++++++++++++++ 2 files changed, 184 insertions(+)
arch/arm/mach-shmobile/include/mach/common.h +6 -0
@@ -22,6 +22,12 @@ extern int shmobile_smp_scu_boot_seconda struct task_struct *idle);extern void shmobile_smp_scu_cpu_die (unsigned int cpu);extern int shmobile_smp_scu_cpu_kill (unsigned int cpu); +extern void shmobile_smp_apmu_prepare_cpus (unsigned int max_cpus); +extern int shmobile_smp_apmu_boot_secondary (unsigned int cpu, +struct task_struct *idle); +extern void shmobile_smp_apmu_cpu_die (unsigned int cpu); +extern int shmobile_smp_apmu_cpu_kill (unsigned int cpu); +extern void shmobile_invalidate_start (void );struct clk ;extern int shmobile_clk_init (void );extern void shmobile_handle_irq_intc (struct pt_regs *);
arch/arm/mach-shmobile/platsmp-apmu.c new file +178 -0
178 lines not on this page · raw message
Magnus Damm
maintainerPATCH v2 2/3 ARM: shmobile: Add r8a7790 SMP support using APMU code
In reply to Magnus DammFrom: Magnus Damm <[email protected]>
Add r8a7790 SMP support using the shared APMU code. To enable SMP the r8a7790 specific DTS needs to be updated to include CPU cores, and this is happening in a separate patch.
---
Changes since V1:
- use DT_MACHINE ->smp = smp_ops() over set_smp_ops() from ->init_early()
arch/arm/mach-shmobile/Makefile | 1 arch/arm/mach-shmobile/board-lager-reference.c | 1 arch/arm/mach-shmobile/board-lager.c | 1 arch/arm/mach-shmobile/include/mach/r8a7790.h | 1 arch/arm/mach-shmobile/setup-r8a7790.c | 1 arch/arm/mach-shmobile/smp-r8a7790.c | 67 ++++++++++++++++++++++++ 6 files changed, 72 insertions(+)
arch/arm/mach-shmobile/Makefile +1 -0
@@ -34,6 +34,7 @@ endif smp-y := platsmp.o headsmp.o smp-$(CONFIG_ARCH_SH73A0) += smp-sh73a0.o headsmp-scu.o platsmp-scu.o smp-$(CONFIG_ARCH_R8A7779) += smp-r8a7779.o headsmp-scu.o platsmp-scu.o +smp-$(CONFIG_ARCH_R8A7790) += smp-r8a7790.o platsmp-apmu.o smp-$(CONFIG_ARCH_EMEV2) += smp-emev2.o headsmp-scu.o platsmp-scu.o # IRQ objects
arch/arm/mach-shmobile/board-lager-reference.c +1 -0
@@ -38,6 +38,7 @@ static const char *lager_boards_compat_d };DT_MACHINE_START (LAGER_DT ,"lager" ) + .smp = smp_ops(r8a7790_smp_ops), .init_early = r8a7790_init_early, .init_machine = lager_add_standard_devices, .init_time = r8a7790_timer_init,
arch/arm/mach-shmobile/board-lager.c +1 -0
@@ -228,6 +228,7 @@ static const char * const lager_boards_c };DT_MACHINE_START (LAGER_DT ,"lager" ) + .smp = smp_ops(r8a7790_smp_ops), .init_early = r8a7790_init_early, .init_time = r8a7790_timer_init, .init_machine = lager_add_standard_devices,
arch/arm/mach-shmobile/include/mach/r8a7790.h +1 -0
@@ -7,6 +7,7 @@ void r8a7790_clock_init(void);void r8a7790_pinmux_init (void );void r8a7790_init_early (void );void r8a7790_timer_init (void ); +extern struct smp_operations r8a7790_smp_ops;#define MD (nr) BIT(nr)u32 r8a7790_read_mode_pins (void );
arch/arm/mach-shmobile/setup-r8a7790.c +1 -0
@@ -283,6 +283,7 @@ static const char * const r8a7790_boards };DT_MACHINE_START (R8A7790_DT ,"Generic R8A7790 (Flattened Device Tree)" ) + .smp = smp_ops(r8a7790_smp_ops), .init_early = r8a7790_init_early, .init_time = r8a7790_timer_init, .dt_compat = r8a7790_boards_compat_dt,
arch/arm/mach-shmobile/smp-r8a7790.c new file +67 -0
67 lines not on this page · raw message
Magnus Damm
maintainerPATCH v2 3/3 ARM: shmobile: Add r8a7790 CA15 CPU cores
In reply to Magnus DammFrom: Magnus Damm <[email protected]>
Add CA15 CPU cores to r8a7790 for a total of 4 x CA15.
---
Changes since V1:
- Got rid of APMU DT node
arch/arm/boot/dts/r8a7790.dtsi | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
arch/arm/boot/dts/r8a7790.dtsi +21 -0
@@ -24,6 +24,27 @@ reg = <0>; clock-frequency = <1300000000>; }; + + cpu1: cpu at 1 { + device_type = "cpu"; + compatible = "arm,cortex-a15"; + reg = <1>; + clock-frequency = <1300000000>; + }; + + cpu2: cpu at 2 { + device_type = "cpu"; + compatible = "arm,cortex-a15"; + reg = <2>; + clock-frequency = <1300000000>; + }; + + cpu3: cpu at 3 { + device_type = "cpu"; + compatible = "arm,cortex-a15"; + reg = <3>; + clock-frequency = <1300000000>; + }; }; gic: interrupt-controller at f1001000 {
v2 cover ARM: shmobile: r8a7790 APMU SMP support
In reply to Magnus DammQuoted 13 lines · Magnus Damm
ARM: shmobile: r8a7790 APMU SMP support
[PATCH v2 01/03] ARM: shmobile: Shared APMU SMP support code without DT [PATCH v2 02/03] ARM: shmobile: Add r8a7790 SMP support using APMU code [PATCH v2 03/03] ARM: shmobile: Add r8a7790 CA15 CPU cores
This series adds SMP support to r8a7790 using the included APMU code. The previous version of r8a7790 support depended on the APMU code in "[PATCH] ARM: shmobile: Shared APMU SMP support code", but in this version the APMU code has been reworked to not use DT. In the future r8a73a4 and other SoCs may make use of the APMU as well, but the r8a73a4 code first needs to be adjusted to work with the CCI driver.
Quoted 6 lines
With these patches applied r8a7790 CA15 support for SMP boot and CPU Hotplug is known to be working.
Thanks to Sudeep for his feedback.
Signed-off-by Magnus Damm <[email protected]>
Hi Magnus,
can I clarify that these patches are targeted at mainline?
Quoted 20 lines
---
Written against renesas.git renesas-devel-20130829
arch/arm/boot/dts/r8a7790.dtsi | 21 ++ arch/arm/mach-shmobile/Makefile | 1 arch/arm/mach-shmobile/board-lager-reference.c | 1 arch/arm/mach-shmobile/board-lager.c | 1 arch/arm/mach-shmobile/include/mach/common.h | 6 arch/arm/mach-shmobile/include/mach/r8a7790.h | 1 arch/arm/mach-shmobile/platsmp-apmu.c | 178 ++++++++++++++++++++++++ arch/arm/mach-shmobile/setup-r8a7790.c | 1 arch/arm/mach-shmobile/smp-r8a7790.c | 67 +++++++++ 9 files changed, 277 insertions(+)--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Magnus Damm
maintainerv2 cover ARM: shmobile: r8a7790 APMU SMP support
Quoted 17 lines · Simon Horman
Quoted 16 lines · Magnus Damm
ARM: shmobile: r8a7790 APMU SMP support
[PATCH v2 01/03] ARM: shmobile: Shared APMU SMP support code without DT [PATCH v2 02/03] ARM: shmobile: Add r8a7790 SMP support using APMU code [PATCH v2 03/03] ARM: shmobile: Add r8a7790 CA15 CPU cores
This series adds SMP support to r8a7790 using the included APMU code. The previous version of r8a7790 support depended on the APMU code in "[PATCH] ARM: shmobile: Shared APMU SMP support code", but in this version the APMU code has been reworked to not use DT. In the future r8a73a4 and other SoCs may make use of the APMU as well, but the r8a73a4 code first needs to be adjusted to work with the CCI driver.
With these patches applied r8a7790 CA15 support for SMP boot and CPU Hotplug is known to be working.
Quoted 7 lines
Quoted 3 lines
Thanks to Sudeep for his feedback.
Signed-off-by Magnus Damm <[email protected]>Hi Magnus,
can I clarify that these patches are targeted at mainline?
Hi Simon, yes, that's correct. It's possible to back port too if needed.
Actual merge is not rushing though, so please don't interpret this as any last minute v3.12 merge attempt.
Quoted 3 lines
Quoted 3 lines
---
Written against renesas.git renesas-devel-20130829
Oops, typo above, it's supposed to be renesas-devel-20130822.
Thanks,
/ magnus
v2 cover ARM: shmobile: r8a7790 APMU SMP support
Quoted 20 lines · Magnus Damm
Quoted 19 lines · Simon Horman
Quoted 18 lines · Magnus Damm
ARM: shmobile: r8a7790 APMU SMP support
[PATCH v2 01/03] ARM: shmobile: Shared APMU SMP support code without DT [PATCH v2 02/03] ARM: shmobile: Add r8a7790 SMP support using APMU code [PATCH v2 03/03] ARM: shmobile: Add r8a7790 CA15 CPU cores
This series adds SMP support to r8a7790 using the included APMU code. The previous version of r8a7790 support depended on the APMU code in "[PATCH] ARM: shmobile: Shared APMU SMP support code", but in this version the APMU code has been reworked to not use DT. In the future r8a73a4 and other SoCs may make use of the APMU as well, but the r8a73a4 code first needs to be adjusted to work with the CCI driver.
With these patches applied r8a7790 CA15 support for SMP boot and CPU Hotplug is known to be working.
Thanks to Sudeep for his feedback.
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
Signed-off-by Magnus Damm <[email protected]>Hi Magnus,
can I clarify that these patches are targeted at mainline?
Hi Simon, yes, that's correct. It's possible to back port too if needed.
Thanks for the clarification.
Quoted 2 lines
Actual merge is not rushing though, so please don't interpret this as any last minute v3.12 merge attempt.
No problem, I didn't interpret it that way.
v2 cover ARM: shmobile: r8a7790 APMU SMP support
Quoted 27 lines · Simon Horman
Quoted 26 lines · Magnus Damm
Quoted 24 lines · Simon Horman
Quoted 13 lines · Magnus Damm
ARM: shmobile: r8a7790 APMU SMP support
[PATCH v2 01/03] ARM: shmobile: Shared APMU SMP support code without DT [PATCH v2 02/03] ARM: shmobile: Add r8a7790 SMP support using APMU code [PATCH v2 03/03] ARM: shmobile: Add r8a7790 CA15 CPU cores
This series adds SMP support to r8a7790 using the included APMU code. The previous version of r8a7790 support depended on the APMU code in "[PATCH] ARM: shmobile: Shared APMU SMP support code", but in this version the APMU code has been reworked to not use DT. In the future r8a73a4 and other SoCs may make use of the APMU as well, but the r8a73a4 code first needs to be adjusted to work with the CCI driver.
Quoted 6 lines
With these patches applied r8a7790 CA15 support for SMP boot and CPU Hotplug is known to be working.
Thanks to Sudeep for his feedback.
Signed-off-by Magnus Damm <[email protected]>Hi Magnus,
can I clarify that these patches are targeted at mainline?
Quoted 8 lines
Quoted 1 line
Hi Simon, yes, that's correct. It's possible to back port too if needed.
Thanks for the clarification.
Quoted 2 lines
Actual merge is not rushing though, so please don't interpret this as any last minute v3.12 merge attempt.
No problem, I didn't interpret it that way.
I have queued these up for v3.13 and they are present in the freshly baked renesas-devel-20130904 tag.
v2 cover ARM: shmobile: r8a7790 APMU SMP support
Quoted 32 lines · Simon Horman
Quoted 31 lines · Simon Horman
Quoted 20 lines · Magnus Damm
Quoted 19 lines · Simon Horman
Quoted 18 lines · Magnus Damm
ARM: shmobile: r8a7790 APMU SMP support
[PATCH v2 01/03] ARM: shmobile: Shared APMU SMP support code without DT [PATCH v2 02/03] ARM: shmobile: Add r8a7790 SMP support using APMU code [PATCH v2 03/03] ARM: shmobile: Add r8a7790 CA15 CPU cores
This series adds SMP support to r8a7790 using the included APMU code. The previous version of r8a7790 support depended on the APMU code in "[PATCH] ARM: shmobile: Shared APMU SMP support code", but in this version the APMU code has been reworked to not use DT. In the future r8a73a4 and other SoCs may make use of the APMU as well, but the r8a73a4 code first needs to be adjusted to work with the CCI driver.
With these patches applied r8a7790 CA15 support for SMP boot and CPU Hotplug is known to be working.
Thanks to Sudeep for his feedback.
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
Signed-off-by Magnus Damm <[email protected]>Hi Magnus,
can I clarify that these patches are targeted at mainline?
Hi Simon, yes, that's correct. It's possible to back port too if needed.
Thanks for the clarification.
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
Actual merge is not rushing though, so please don't interpret this as any last minute v3.12 merge attempt.
No problem, I didn't interpret it that way.
I have queued these up for v3.13 and they are present in the freshly baked renesas-devel-20130904 tag.
As I already mentioned I asked not to add any custom bindings to support multiple cluster. But this version removed APMU node from DT completely which is not correct.
Also you removed multi cluster support to avoid CCI and MCPM reuse. I think you may have to rework these completely when adding multi-cluster support. I strongly recommend to reuse the CCI and MPCM code from first instead of reworking again, but I leave it SH platform maintainer to decide.
Regards,
Sudeep
v2 cover ARM: shmobile: r8a7790 APMU SMP support
Quoted 45 lines · Sudeep KarkadaNagesha
Quoted 32 lines · Simon Horman
Quoted 31 lines · Simon Horman
Quoted 20 lines · Magnus Damm
Quoted 19 lines · Simon Horman
Quoted 18 lines · Magnus Damm
ARM: shmobile: r8a7790 APMU SMP support
[PATCH v2 01/03] ARM: shmobile: Shared APMU SMP support code without DT [PATCH v2 02/03] ARM: shmobile: Add r8a7790 SMP support using APMU code [PATCH v2 03/03] ARM: shmobile: Add r8a7790 CA15 CPU cores
This series adds SMP support to r8a7790 using the included APMU code. The previous version of r8a7790 support depended on the APMU code in "[PATCH] ARM: shmobile: Shared APMU SMP support code", but in this version the APMU code has been reworked to not use DT. In the future r8a73a4 and other SoCs may make use of the APMU as well, but the r8a73a4 code first needs to be adjusted to work with the CCI driver.
With these patches applied r8a7790 CA15 support for SMP boot and CPU Hotplug is known to be working.
Thanks to Sudeep for his feedback.
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
Signed-off-by Magnus Damm <[email protected]>Hi Magnus,
can I clarify that these patches are targeted at mainline?
Hi Simon, yes, that's correct. It's possible to back port too if needed.
Thanks for the clarification.
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
Actual merge is not rushing though, so please don't interpret this as any last minute v3.12 merge attempt.
No problem, I didn't interpret it that way.
I have queued these up for v3.13 and they are present in the freshly baked renesas-devel-20130904 tag.
As I already mentioned I asked not to add any custom bindings to support multiple cluster. But this version removed APMU node from DT completely which is not correct.
Quoted 5 lines
Also you removed multi cluster support to avoid CCI and MCPM reuse. I think you may have to rework these completely when adding multi-cluster support. I strongly recommend to reuse the CCI and MPCM code from first instead of reworking again, but I leave it SH platform maintainer to decide.
Thanks for your feedback,
I plan to meet with Magnus in person on Friday and I will discuss this issue with him in our capacities as shmobile co-maintainers.
v2 cover ARM: shmobile: r8a7790 APMU SMP support
In reply to Magnus DammQuoted 10 lines · Magnus Damm
ARM: shmobile: r8a7790 APMU SMP support
[PATCH v2 01/03] ARM: shmobile: Shared APMU SMP support code without DT [PATCH v2 02/03] ARM: shmobile: Add r8a7790 SMP support using APMU code [PATCH v2 03/03] ARM: shmobile: Add r8a7790 CA15 CPU cores
This series adds SMP support to r8a7790 using the included APMU code. The previous version of r8a7790 support depended on the APMU code in "[PATCH] ARM: shmobile: Shared APMU SMP support code", but in this version the APMU code has been reworked to not use DT.
You have misunderstood my comments. I clearly said I am not against using DT for APMU. I objected only the new property 'cpus' added to the APMU node(mainly because it's not needed IMO or it was not documented well to explain the need for it)
Quoted 26 lines
In the future
r8a73a4 and other SoCs may make use of the APMU as well, but the r8a73a4 code first needs to be adjusted to work with the CCI driver.With these patches applied r8a7790 CA15 support for SMP boot and CPU Hotplug is known to be working.
Thanks to Sudeep for his feedback.
Signed-off-by Magnus Damm <[email protected]>---
Written against renesas.git renesas-devel-20130829
arch/arm/boot/dts/r8a7790.dtsi | 21 ++ arch/arm/mach-shmobile/Makefile | 1 arch/arm/mach-shmobile/board-lager-reference.c | 1 arch/arm/mach-shmobile/board-lager.c | 1 arch/arm/mach-shmobile/include/mach/common.h | 6 arch/arm/mach-shmobile/include/mach/r8a7790.h | 1 arch/arm/mach-shmobile/platsmp-apmu.c | 178 ++++++++++++++++++++++++ arch/arm/mach-shmobile/setup-r8a7790.c | 1 arch/arm/mach-shmobile/smp-r8a7790.c | 67 +++++++++ 9 files changed, 277 insertions(+)
v2 cover ARM: shmobile: r8a7790 APMU SMP support
In reply to Magnus DammQuoted 13 lines · Magnus Damm
ARM: shmobile: r8a7790 APMU SMP support
[PATCH v2 01/03] ARM: shmobile: Shared APMU SMP support code without DT [PATCH v2 02/03] ARM: shmobile: Add r8a7790 SMP support using APMU code [PATCH v2 03/03] ARM: shmobile: Add r8a7790 CA15 CPU cores
This series adds SMP support to r8a7790 using the included APMU code. The previous version of r8a7790 support depended on the APMU code in "[PATCH] ARM: shmobile: Shared APMU SMP support code", but in this version the APMU code has been reworked to not use DT. In the future r8a73a4 and other SoCs may make use of the APMU as well, but the r8a73a4 code first needs to be adjusted to work with the CCI driver.
Quoted 6 lines
With these patches applied r8a7790 CA15 support for SMP boot and CPU Hotplug is known to be working.
Thanks to Sudeep for his feedback.
Signed-off-by Magnus Damm <[email protected]>
On Lager, for all 3 patches
Thanks
Guennadi
Quoted 15 lines
---
Written against renesas.git renesas-devel-20130829
arch/arm/boot/dts/r8a7790.dtsi | 21 ++ arch/arm/mach-shmobile/Makefile | 1 arch/arm/mach-shmobile/board-lager-reference.c | 1 arch/arm/mach-shmobile/board-lager.c | 1 arch/arm/mach-shmobile/include/mach/common.h | 6 arch/arm/mach-shmobile/include/mach/r8a7790.h | 1 arch/arm/mach-shmobile/platsmp-apmu.c | 178 ++++++++++++++++++++++++ arch/arm/mach-shmobile/setup-r8a7790.c | 1 arch/arm/mach-shmobile/smp-r8a7790.c | 67 +++++++++ 9 files changed, 277 insertions(+)
Quoted 5 lines
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/