diff options
| author | Linux Build Service Account <lnxbuild@quicinc.com> | 2017-07-03 07:57:50 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-07-03 07:57:50 -0700 |
| commit | e82415666d470a57a3fd4835a4fc2b952df4a55e (patch) | |
| tree | 0dc7efe91590709a6769479158ead28ccac3419e /kernel | |
| parent | 37541eb4b833b4cb92d9d860b40e40f4e9350e11 (diff) | |
| parent | 76aa496f898a16266be01a1543797804d4baa149 (diff) | |
Merge "cpu-hotplug: Keep atleast 1 online and un-isolated CPU"
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/cpu.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/cpu.c b/kernel/cpu.c index e822cb0e18d5..1a26ef5b7d58 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -361,6 +361,9 @@ static int _cpu_down(unsigned int cpu, int tasks_frozen) if (!cpu_online(cpu)) return -EINVAL; + if (!tasks_frozen && !cpu_isolated(cpu) && num_online_uniso_cpus() == 1) + return -EBUSY; + cpu_hotplug_begin(); err = __cpu_notify(CPU_DOWN_PREPARE | mod, hcpu, -1, &nr_calls); |
