Skip to content

Commit

Permalink
Merge branch 'smp-urgent-for-linus' of git://git.kernel.org/pub/scm/l…
Browse files Browse the repository at this point in the history
…inux/kernel/git/tip/tip

Pull CPU hotplug fix from Thomas Gleixner:
 "Remove the stale skip_onerr member from the hotplug states"

* 'smp-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  cpu/hotplug: Remove skip_onerr field from cpuhp_step structure
  • Loading branch information
torvalds committed Sep 2, 2018
2 parents 501dacb + 6fb86d9 commit 1395d10
Showing 1 changed file with 4 additions and 22 deletions.
26 changes: 4 additions & 22 deletions kernel/cpu.c
Expand Up @@ -102,8 +102,6 @@ static inline void cpuhp_lock_release(bool bringup) { }
* @name: Name of the step
* @startup: Startup function of the step
* @teardown: Teardown function of the step
* @skip_onerr: Do not invoke the functions on error rollback
* Will go away once the notifiers are gone
* @cant_stop: Bringup/teardown can't be stopped at this step
*/
struct cpuhp_step {
Expand All @@ -119,7 +117,6 @@ struct cpuhp_step {
struct hlist_node *node);
} teardown;
struct hlist_head list;
bool skip_onerr;
bool cant_stop;
bool multi_instance;
};
Expand Down Expand Up @@ -550,12 +547,8 @@ static int bringup_cpu(unsigned int cpu)

static void undo_cpu_up(unsigned int cpu, struct cpuhp_cpu_state *st)
{
for (st->state--; st->state > st->target; st->state--) {
struct cpuhp_step *step = cpuhp_get_step(st->state);

if (!step->skip_onerr)
cpuhp_invoke_callback(cpu, st->state, false, NULL, NULL);
}
for (st->state--; st->state > st->target; st->state--)
cpuhp_invoke_callback(cpu, st->state, false, NULL, NULL);
}

static int cpuhp_up_callbacks(unsigned int cpu, struct cpuhp_cpu_state *st,
Expand Down Expand Up @@ -644,12 +637,6 @@ static void cpuhp_thread_fun(unsigned int cpu)

WARN_ON_ONCE(!cpuhp_is_ap_state(state));

if (st->rollback) {
struct cpuhp_step *step = cpuhp_get_step(state);
if (step->skip_onerr)
goto next;
}

if (cpuhp_is_atomic_state(state)) {
local_irq_disable();
st->result = cpuhp_invoke_callback(cpu, state, bringup, st->node, &st->last);
Expand All @@ -673,7 +660,6 @@ static void cpuhp_thread_fun(unsigned int cpu)
st->should_run = false;
}

next:
cpuhp_lock_release(bringup);

if (!st->should_run)
Expand Down Expand Up @@ -916,12 +902,8 @@ void cpuhp_report_idle_dead(void)

static void undo_cpu_down(unsigned int cpu, struct cpuhp_cpu_state *st)
{
for (st->state++; st->state < st->target; st->state++) {
struct cpuhp_step *step = cpuhp_get_step(st->state);

if (!step->skip_onerr)
cpuhp_invoke_callback(cpu, st->state, true, NULL, NULL);
}
for (st->state++; st->state < st->target; st->state++)
cpuhp_invoke_callback(cpu, st->state, true, NULL, NULL);
}

static int cpuhp_down_callbacks(unsigned int cpu, struct cpuhp_cpu_state *st,
Expand Down

0 comments on commit 1395d10

Please sign in to comment.