Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp489415imm; Fri, 31 Aug 2018 05:57:10 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaAjXYLkVwhmkzSkfqC4TnX0tcfnNDCSt3qPnP9VoHj/jn1xdUb5j/8/w3vJGIcb5Mlhorl X-Received: by 2002:a63:231c:: with SMTP id j28-v6mr13966953pgj.332.1535720230156; Fri, 31 Aug 2018 05:57:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535720230; cv=none; d=google.com; s=arc-20160816; b=A1qznmHyi/GJx2mVIaL6w2VJzdq3LzvKmIrn5S7ZPD3gvqxboMtMINec92BWOeb7hy tDS+tLGBpYc9Wlzdv8csY0gMdZYWJN9P4Xjn3lhrecrm/G/ZObScg62S9qHARqCzBQ6l GBfcNXpUuZw5sg2Nt9z2aQDq2YX0GmV7K3B+Md6ClmrT7NkxHg87K8U+C1XGNokLo6M8 tzBk1qO2Rn2swCKOBtjsAlPanQxdGv7fL26NwPvkxVq0JursSeDfITFiApyzUpLJP7jT FjzJ1qOrUla0H2b3tG1vMpYtF29WtiNGYxzUg34FPOEmw8p9S4cwnCqFD9A9r8usyaZV VbFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date:arc-authentication-results; bh=TGD6onYPNiaSqKWVSX6KgtWn3qMRS3En9blYZ/qv+3M=; b=ihQDkLAc/oHQdhCSdVr5JwoS1hWY8Tho4EvdjHplrjnJkAtVXhqYwelcNUnjy6D17I ORARNlQe9tIBf2Ta4bMdwFb87jT/SZtGefJ4NnSHhu7Wpdn/Q0w8Sp7V17k3/AOVG+d0 hSp5dcrmA4THr5URia9y4ckmKU/NdPjDTz/0JQ3aFLSipIyRUCaJuI29QITQOTxo2SeZ 3Yh8r2gLf6RE4wtcs5e92+REsQpbV8iVb0hzXxfEzd4DOaVoWpVqLKMXV9Qq0fyqKvPc 4SpmxsbPYYBww0wiZHUayOgR+7B7hKVjpS1fRNtZ1JjYLsCpZ6fsYrUpq+50JUN3HxV6 QTsA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q132-v6si10610712pfc.159.2018.08.31.05.56.55; Fri, 31 Aug 2018 05:57:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728259AbeHaQXu (ORCPT + 99 others); Fri, 31 Aug 2018 12:23:50 -0400 Received: from terminus.zytor.com ([198.137.202.136]:59527 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727942AbeHaQXu (ORCPT ); Fri, 31 Aug 2018 12:23:50 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id w7VCFtBH2143880 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 31 Aug 2018 05:15:55 -0700 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id w7VCFtKc2143877; Fri, 31 Aug 2018 05:15:55 -0700 Date: Fri, 31 Aug 2018 05:15:55 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Mukesh Ojha Message-ID: Cc: mingo@kernel.org, linux-kernel@vger.kernel.org, peterz@infradead.org, tglx@linutronix.de, hpa@zytor.com, mojha@codeaurora.org Reply-To: mojha@codeaurora.org, hpa@zytor.com, tglx@linutronix.de, peterz@infradead.org, linux-kernel@vger.kernel.org, mingo@kernel.org In-Reply-To: <1535439294-31426-1-git-send-email-mojha@codeaurora.org> References: <1535439294-31426-1-git-send-email-mojha@codeaurora.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:smp/urgent] cpu/hotplug: Remove skip_onerr field from cpuhp_step structure Git-Commit-ID: 6fb86d97207880c1286cd4cb3a7e6a598afbc727 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, T_DATE_IN_FUTURE_96_Q autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 6fb86d97207880c1286cd4cb3a7e6a598afbc727 Gitweb: https://git.kernel.org/tip/6fb86d97207880c1286cd4cb3a7e6a598afbc727 Author: Mukesh Ojha AuthorDate: Tue, 28 Aug 2018 12:24:54 +0530 Committer: Thomas Gleixner CommitDate: Fri, 31 Aug 2018 14:13:03 +0200 cpu/hotplug: Remove skip_onerr field from cpuhp_step structure When notifiers were there, `skip_onerr` was used to avoid calling particular step startup/teardown callbacks in the CPU up/down rollback path, which made the hotplug asymmetric. As notifiers are gone now after the full state machine conversion, the `skip_onerr` field is no longer required. Remove it from the structure and its usage. Signed-off-by: Mukesh Ojha Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/1535439294-31426-1-git-send-email-mojha@codeaurora.org --- kernel/cpu.c | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/kernel/cpu.c b/kernel/cpu.c index ed44d7d34c2d..aa7fe85ad62e 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -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 { @@ -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; }; @@ -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, @@ -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); @@ -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) @@ -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,