MIPS: BMIPS5200 SMP support
Subsystems (3)
cover MIPS: BMIPS5200 SMP support
Hi all,
This patch series adds BCM7435/BMIPS52000 SMP support, it builds on top of the series submitted here:
https://www.linux-mips.org/archives/linux-mips/2016-01/msg00737.html
Florian Fainelli (4):
MIPS: BMIPS: Add Whirlwind (BMIPS5200) initialization code
MIPS: BMIPS: Add missing 7038 L1 register cells to BCM7435
MIPS: BMIPS: Remove maxcpus from BCM97435SVMB DTS
MIPS: BMIPS: Fill in current_cpu_data.core
arch/mips/boot/dts/brcm/bcm7435.dtsi | 5 +- arch/mips/boot/dts/brcm/bcm97435svmb.dts | 2 +- arch/mips/kernel/Makefile | 2 +- arch/mips/kernel/bmips_5xxx_init.S | 753 +++++++++++++++++++++++++++++++ arch/mips/kernel/bmips_vec.S | 41 +- arch/mips/kernel/smp-bmips.c | 1 + 6 files changed, 797 insertions(+), 7 deletions(-) create mode 100644 arch/mips/kernel/bmips_5xxx_init.S
Signature · 1 line
2.1.0
PATCH 1/4 MIPS: BMIPS: Add Whirlwind (BMIPS5200) initialization code
Import bmips_5xxx_init.S from the stblinux-3.3 tree, and to make sure that this would work nicely with a BMIPS multiplatform kernel (with BMIPS330, BMIPS43XX and BMIPS5000 enabled), update soft_reset to check for the BMIPS5200 processor id (PRID_IMP_BMIPS5200) and execute bmips_5xxx_init for these processors to bring them online.
Tested on 7425, 7429 and 7435 with CPU hotplug. 7435 SMP still needs some additional changes in the L1 interrupt area to work properly with interrupt affinity.
--- arch/mips/kernel/Makefile | 2 +- arch/mips/kernel/bmips_5xxx_init.S | 753 +++++++++++++++++++++++++++++++++++++ arch/mips/kernel/bmips_vec.S | 41 +- 3 files changed, 792 insertions(+), 4 deletions(-) create mode 100644 arch/mips/kernel/bmips_5xxx_init.S
arch/mips/kernel/Makefile +1 -1
@@ -44,7 +44,7 @@ obj-$(CONFIG_CPU_CAVIUM_OCTEON) += r4k_fpu.o octeon_switch.o obj-$(CONFIG_SMP) += smp.o obj-$(CONFIG_SMP_UP) += smp-up.o -obj-$(CONFIG_CPU_BMIPS) += smp-bmips.o bmips_vec.o +obj-$(CONFIG_CPU_BMIPS) += smp-bmips.o bmips_vec.o bmips_5xxx_init.o obj-$(CONFIG_MIPS_MT) += mips-mt.o obj-$(CONFIG_MIPS_MT_FPAFF) += mips-mt-fpaff.o
arch/mips/kernel/bmips_5xxx_init.S new file +753 -0
753 lines not on this page · raw message
arch/mips/kernel/bmips_vec.S +38 -3
58 lines not on this page · raw message
Signature · 1 line
2.1.0
PATCH 2/4 MIPS: BMIPS: Add missing 7038 L1 register cells to BCM7435
In reply to Florian Fainelli7435 has 4 7038 L1 base register address for each of its Core + TP (for a total of 4 threads of execution), add the two missing cells for Core 1. We are providing HW interrupts 2/3 even for Core 1/TP0/TP1 because that's what they are, and we can later decide to remap these in software to provide proper interrupt affinity/parenting.
--- arch/mips/boot/dts/brcm/bcm7435.dtsi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
arch/mips/boot/dts/brcm/bcm7435.dtsi +3 -2
@@ -63,13 +63,14 @@ periph_intc: periph_intc@41b500 { compatible = "brcm,bcm7038-l1-intc"; - reg = <0x41b500 0x40>, <0x41b600 0x40>; + reg = <0x41b500 0x40>, <0x41b600 0x40>, + <0x41b700 0x40>, <0x41b800 0x40>; interrupt-controller; #interrupt-cells = <1>; interrupt-parent = <&cpu_intc>; - interrupts = <2>, <3>; + interrupts = <2>, <3>, <2>, <3>; }; sun_l2_intc: sun_l2_intc@403000 {
Signature · 1 line
2.1.0
PATCH 3/4 MIPS: BMIPS: Remove maxcpus from BCM97435SVMB DTS
In reply to Florian FainelliNow that SMP properly works on 7435, do not restrict the number of core, unleash them all.
--- arch/mips/boot/dts/brcm/bcm97435svmb.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/boot/dts/brcm/bcm97435svmb.dts +1 -1
@@ -14,7 +14,7 @@ }; chosen { - bootargs = "console=ttyS0,115200 maxcpus=1"; + bootargs = "console=ttyS0,115200"; stdout-path = &uart0; }; };
Signature · 1 line
2.1.0
PATCH 4/4 MIPS: BMIPS: Fill in current_cpu_data.core
In reply to Florian FainelliRead the core ID in bmips_smp_finish() for BMIPS5000 CPUs to get appropriate processor parenting in set_cpu_sibling_map().
--- arch/mips/kernel/smp-bmips.c | 1 + 1 file changed, 1 insertion(+)
arch/mips/kernel/smp-bmips.c +1 -0
@@ -243,6 +243,7 @@ static void bmips_init_secondary(void)break ;case CPU_BMIPS5000 :write_c0_brcm_action (ACTION_CLR_IPI (smp_processor_id (),0 )); + current_cpu_data.core = (read_c0_brcm_config () >>25 ) &3 ;break ; } }
Signature · 1 line
2.1.0
Quoted 6 lines · Florian Fainelli
Hi all,
This patch series adds BCM7435/BMIPS52000 SMP support, it builds on top of the series submitted here:
https://www.linux-mips.org/archives/linux-mips/2016-01/msg00737.html
Ralf, can you also queue these for 4.6 if they look okay to you? Thanks!
Quoted 16 lines
Florian Fainelli (4):
MIPS: BMIPS: Add Whirlwind (BMIPS5200) initialization code
MIPS: BMIPS: Add missing 7038 L1 register cells to BCM7435
MIPS: BMIPS: Remove maxcpus from BCM97435SVMB DTS
MIPS: BMIPS: Fill in current_cpu_data.corearch/mips/boot/dts/brcm/bcm7435.dtsi | 5 +- arch/mips/boot/dts/brcm/bcm97435svmb.dts | 2 +- arch/mips/kernel/Makefile | 2 +- arch/mips/kernel/bmips_5xxx_init.S | 753 +++++++++++++++++++++++++++++++ arch/mips/kernel/bmips_vec.S | 41 +- arch/mips/kernel/smp-bmips.c | 1 + 6 files changed, 797 insertions(+), 7 deletions(-) create mode 100644 arch/mips/kernel/bmips_5xxx_init.S
Signature · 1 line
Florian
Quoted 9 lines · Florian Fainelli
Quoted 6 lines · Florian Fainelli
Hi all,
This patch series adds BCM7435/BMIPS52000 SMP support, it builds on top of the series submitted here:
https://www.linux-mips.org/archives/linux-mips/2016-01/msg00737.html
Ralf, can you also queue these for 4.6 if they look okay to you? Thanks!
Same here, can this make it into 4.6? Thanks
Quoted 19 lines
Quoted 17 lines
Florian Fainelli (4):
MIPS: BMIPS: Add Whirlwind (BMIPS5200) initialization code
MIPS: BMIPS: Add missing 7038 L1 register cells to BCM7435
MIPS: BMIPS: Remove maxcpus from BCM97435SVMB DTS
MIPS: BMIPS: Fill in current_cpu_data.corearch/mips/boot/dts/brcm/bcm7435.dtsi | 5 +- arch/mips/boot/dts/brcm/bcm97435svmb.dts | 2 +- arch/mips/kernel/Makefile | 2 +- arch/mips/kernel/bmips_5xxx_init.S | 753 +++++++++++++++++++++++++++++++ arch/mips/kernel/bmips_vec.S | 41 +- arch/mips/kernel/smp-bmips.c | 1 + 6 files changed, 797 insertions(+), 7 deletions(-) create mode 100644 arch/mips/kernel/bmips_5xxx_init.S
Signature · 1 line
Florian