Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp408753pxb; Wed, 20 Jan 2021 09:49:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJxsxb+UXphKSt6Fs/s85bQR/jJUz0NmKDmQ5QFUvc+KRZSeiB7U2F1tUnc0YncJ+89jCtaf X-Received: by 2002:a05:6402:4d6:: with SMTP id n22mr8478896edw.27.1611164977894; Wed, 20 Jan 2021 09:49:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611164977; cv=none; d=google.com; s=arc-20160816; b=rrUfZJdnRHkGHujswN/fGtcGKNpT52qFAiQP21worMah7uCYi/arA3Ka+x071GH35K 9QeLm2WtPVb4YTDxJT3kdG2VwOoVZdk6NjJ1bFH6IFhh4tQLl627h11gsik5QhJyJgk6 /Tl/CFfC8l0jUrxCl0mMcsQlCkgPM/RKozy3fzkFzSjOFF1wtZByPCHUVCf9kp2MgOAx 4XDnaWJW8iM28a8ykdKME/fmKq+/ecfpZ6azSBS5N6qpRw5GlokHWP/BC53zX21ePUfR F9zhvLQF4em9AsYMWsyPTPT70v6gr1AmfqVznGcNItopVS+AOBjf2i04LMcvhPCta4ae oRxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Br/9Jhb2pIM3jsWsK/El0R8bMfCO02TFGx7tgtozy24=; b=o3HibP09KLDhFW+7/7QmR90LWv89cjJSkROVXQsa/e9eau2DNLMUWlBrm1qOE5UAko B0d7oDtzJoA8/sz0ZtVU1Xo1bZHwW9AkbJ7ksk/YT9cvoYCHFUOrLzqwJwq5zKfX+XxF 1v/phdnyK6aVdCqtAfnx0H+bbAxGQqXz+oVMaTrL5mNlmd8ovXU1Abh+7WLAMvMWmM/F 8orBxA5AoGkKcQYFabpk1DC+D+NQhZAvUq517DYz8IDz4TrQK3mOjfg48Dd85meQqc7u DAB3Ofg6qZAmncWzL1ftF2r/xzs4iWXYdGldG6n6UcTETBojA6OYBMXkMxVwJ865LWXq 2JqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=o9zGwF+g; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lg17si890468ejb.603.2021.01.20.09.49.12; Wed, 20 Jan 2021 09:49:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=o9zGwF+g; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732084AbhATRrw (ORCPT + 99 others); Wed, 20 Jan 2021 12:47:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391797AbhATRqH (ORCPT ); Wed, 20 Jan 2021 12:46:07 -0500 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1613EC061757 for ; Wed, 20 Jan 2021 09:45:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=Br/9Jhb2pIM3jsWsK/El0R8bMfCO02TFGx7tgtozy24=; b=o9zGwF+gSmutoUV/+gfC9MMcA2 h08w6Ph5gFFkkR2Ck2WC2PnWS8fPAg+9OD3qJBwKe5/mPTFcEi+q1Ke4yBBoMLcTUw0NkdymSly3/ lJD0JWnWw+s8xQz5bllBCwMSyAh0FMEDJ6uwW3JzCFRg4AGPGKSPqnjBIlteq8KuSGSLWL5c211v4 eD3J0dW6+WmLB3rWPi/WYUrHfFIYQWPR+7v85iuz/4gLCO6erZ/b5Sgq3i425AlHm3CdIBtbddqBK n2UIuDpZFEYnJhoVQgRvBJoz9aF8zAd1FYlzWzbN7Rq7/+H26KBPXxUCrLv7y4ZgB9T/8qzcyTFdK lWpVXVUA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2HXk-0006d3-KB; Wed, 20 Jan 2021 17:45:21 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 59D7F3012DF; Wed, 20 Jan 2021 18:45:16 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id B58EB2CEAD191; Wed, 20 Jan 2021 18:45:16 +0100 (CET) Date: Wed, 20 Jan 2021 18:45:16 +0100 From: Peter Zijlstra To: vincent.donnefort@arm.com Cc: tglx@linutronix.de, linux-kernel@vger.kernel.org, valentin.schneider@arm.com Subject: Re: [PATCH 3/4] cpu/hotplug: Add cpuhp_invoke_callback_range() Message-ID: References: <1610385047-92151-1-git-send-email-vincent.donnefort@arm.com> <1610385047-92151-4-git-send-email-vincent.donnefort@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1610385047-92151-4-git-send-email-vincent.donnefort@arm.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 11, 2021 at 05:10:46PM +0000, vincent.donnefort@arm.com wrote: > @@ -475,6 +478,11 @@ cpuhp_set_state(struct cpuhp_cpu_state *st, enum cpuhp_state target) > static inline void > cpuhp_reset_state(struct cpuhp_cpu_state *st, enum cpuhp_state prev_state) > { > + st->target = prev_state; > + > + if (st->rollback) > + return; I'm thinking that if we call rollback while already rollback we're hosed something fierce, no? That like going up, failing, going back down again, also failing, giving up in a fiery death.