Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1438257 > unrolled thread
| Started by | Matt Redfearn <matt.redfearn@imgtec.com> |
|---|---|
| First post | 2016-07-07 10:00 +0200 |
| Last post | 2016-07-07 10:00 +0200 |
| Articles | 3 — 1 participant |
Back to article view | Back to linux.kernel
[PATCH 0/3] Support for MIPSr6 CPU hotplug. Matt Redfearn <matt.redfearn@imgtec.com> - 2016-07-07 10:00 +0200
[PATCH 3/3] MIPS: Move CPU Hotplug config option into submenu Matt Redfearn <matt.redfearn@imgtec.com> - 2016-07-07 10:00 +0200
[PATCH 1/3] MIPS: smp-cps: Allow booting of CPU other than VP0 within a core Matt Redfearn <matt.redfearn@imgtec.com> - 2016-07-07 10:00 +0200
| From | Matt Redfearn <matt.redfearn@imgtec.com> |
|---|---|
| Date | 2016-07-07 10:00 +0200 |
| Subject | [PATCH 0/3] Support for MIPSr6 CPU hotplug. |
| Message-ID | <rSco2-3Zm-15@gated-at.bofh.it> |
This series adds support for hotplug of MIPSr6 Virtual Processors such as found in the I6400. Patch 1 allows VPs other than VP0 within a MIPSr6 core to start when a core is booted. Patch 2 adds support for removing CPUs, allowing CPU hotpug to be used with MIPSr6 devices. Patch 3 is a tidy up to move the CPU hotplug config option into the Kernel type menu within menuconfig. Based atop 4.7-rc6 Matt Redfearn (3): MIPS: smp-cps: Allow booting of CPU other than VP0 within a core MIPS: smp-cps: Add support for CPU hotplug of MIPSr6 processors MIPS: Move CPU Hotplug config option into submenu arch/mips/Kconfig | 20 ++++++++++---------- arch/mips/kernel/smp-cps.c | 41 ++++++++++++++++++++++++++++++++--------- 2 files changed, 42 insertions(+), 19 deletions(-) -- 2.7.4
[toc] | [next] | [standalone]
| From | Matt Redfearn <matt.redfearn@imgtec.com> |
|---|---|
| Date | 2016-07-07 10:00 +0200 |
| Subject | [PATCH 3/3] MIPS: Move CPU Hotplug config option into submenu |
| Message-ID | <rSco2-3Zm-35@gated-at.bofh.it> |
| In reply to | #1438257 |
The KConfig option HOTPLUG_CPU should appear in the "Kernel Type" submenu. Relocate it to where SMP support is configured. Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com> --- arch/mips/Kconfig | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index ac91939b9b75..fd06bccf2011 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -1111,16 +1111,6 @@ config NEED_DMA_MAP_STATE config SYS_HAS_EARLY_PRINTK bool -config HOTPLUG_CPU - bool "Support for hot-pluggable CPUs" - depends on SMP && SYS_SUPPORTS_HOTPLUG_CPU - help - Say Y here to allow turning CPUs off and on. CPUs can be - controlled through /sys/devices/system/cpu. - (Note: power management support will enable this option - automatically on SMP systems. ) - Say N if you want to disable CPU hotplug. - config SYS_SUPPORTS_HOTPLUG_CPU bool @@ -2634,6 +2624,16 @@ config SMP If you don't know what to do here, say N. +config HOTPLUG_CPU + bool "Support for hot-pluggable CPUs" + depends on SMP && SYS_SUPPORTS_HOTPLUG_CPU + help + Say Y here to allow turning CPUs off and on. CPUs can be + controlled through /sys/devices/system/cpu. + (Note: power management support will enable this option + automatically on SMP systems. ) + Say N if you want to disable CPU hotplug. + config SMP_UP bool -- 2.7.4
[toc] | [prev] | [next] | [standalone]
| From | Matt Redfearn <matt.redfearn@imgtec.com> |
|---|---|
| Date | 2016-07-07 10:00 +0200 |
| Subject | [PATCH 1/3] MIPS: smp-cps: Allow booting of CPU other than VP0 within a core |
| Message-ID | <rSco2-3Zm-43@gated-at.bofh.it> |
| In reply to | #1438257 |
The boot_core function was hardcoded to always start VP0 when starting
a core via the CPC. When hotplugging a CPU this may not be the desired
behaviour.
Make boot_core receive the VP ID to start running on the core, such that
alternate VPs can be started via CPU hotplug.
Also ensure that all other VPs within the core are stopped before
bringing the core out of reset so that only the desired VP starts.
Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com>
Reviewed-by: Paul Burton <paul.burton@imgtec.com>
---
arch/mips/kernel/smp-cps.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/arch/mips/kernel/smp-cps.c b/arch/mips/kernel/smp-cps.c
index 4ed36f288d64..006e99de170d 100644
--- a/arch/mips/kernel/smp-cps.c
+++ b/arch/mips/kernel/smp-cps.c
@@ -206,7 +206,7 @@ err_out:
}
}
-static void boot_core(unsigned core)
+static void boot_core(unsigned int core, unsigned int vpe_id)
{
u32 access, stat, seq_state;
unsigned timeout;
@@ -233,8 +233,9 @@ static void boot_core(unsigned core)
mips_cpc_lock_other(core);
if (mips_cm_revision() >= CM_REV_CM3) {
- /* Run VP0 following the reset */
- write_cpc_co_vp_run(0x1);
+ /* Run only the requested VP following the reset */
+ write_cpc_co_vp_stop(0xf);
+ write_cpc_co_vp_run(1 << vpe_id);
/*
* Ensure that the VP_RUN register is written before the
@@ -306,7 +307,7 @@ static void cps_boot_secondary(int cpu, struct task_struct *idle)
if (!test_bit(core, core_power)) {
/* Boot a VPE on a powered down core */
- boot_core(core);
+ boot_core(core, vpe_id);
goto out;
}
--
2.7.4
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web