From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755029AbcCBLX2 (ORCPT ); Wed, 2 Mar 2016 06:23:28 -0500 Received: from bombadil.infradead.org ([198.137.202.9]:54112 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752997AbcCBLX1 (ORCPT ); Wed, 2 Mar 2016 06:23:27 -0500 Date: Wed, 2 Mar 2016 12:23:15 +0100 From: Peter Zijlstra To: rusty@rustcorp.com.au, bigeasy@linutronix.de, rostedt@goodmis.org, oleg@redhat.com, tglx@linutronix.de, pjt@google.com, riel@redhat.com, torvalds@linux-foundation.org, linux-kernel@vger.kernel.org, arjan@linux.intel.com, tj@kernel.org, srivatsa@mit.edu, akpm@linux-foundation.org, mingo@kernel.org, hpa@zytor.com, paulmck@linux.vnet.ibm.com, rafael.j.wysocki@intel.com Cc: linux-tip-commits@vger.kernel.org Subject: Re: [tip:smp/hotplug] cpu/hotplug: Convert to a state machine for the control processor Message-ID: <20160302112315.GD6357@twins.programming.kicks-ass.net> References: <20160226182340.671816690@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 01, 2016 at 11:53:25AM -0800, tip-bot for Thomas Gleixner wrote: > @@ -558,22 +648,22 @@ static int _cpu_up(unsigned int cpu, int tasks_frozen) > > cpuhp_tasks_frozen = tasks_frozen; > > + prev_state = st->state; > + st->target = CPUHP_ONLINE; > + while (st->state < st->target) { > + struct cpuhp_step *step; > + > + st->state++; > + step = cpuhp_bp_states + st->state; > + ret = cpuhp_invoke_callback(cpu, st->state, step->startup); > + if (ret) { > + st->target = prev_state; > + undo_cpu_up(cpu, st); > + break; > + } > + } All your other state loops use for().