Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp417926pxb; Wed, 20 Jan 2021 10:03:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJwVpp1ltF2K1QQlXIi5DmTOh2oJU6RBz72eL4pd9cZzu2aPytC2PjmxKk23Lj/x68FZG1q1 X-Received: by 2002:a17:906:2087:: with SMTP id 7mr7133307ejq.232.1611165817937; Wed, 20 Jan 2021 10:03:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611165817; cv=none; d=google.com; s=arc-20160816; b=SKJGK5PqgsN5VVedoVJpfMhPZXkh/WyXik1j3LyYFqanO0qVhe8UWA8qNepFT8HutC q7DpT7qDoziDUL1npmExjPI7oYblrNkHO1NHLo5x9U2oQtSmgL23z0RrieGs+pBQgajf DYlNndILI2F4TaQkhwQ030boVbAg/ULPNo3k78UpOyDCKocwcXlQlofvYriPyzoKso3i etlhSuner6vZ0ky/nmOwXrbD/KTBVlKngqTen7SUBdmcU838/Cz/hLzOUhkUacWAIGvz lW4BHedKkxT0fydo15mcTTF8MPPM3wNsJBe3DQ7jRUTvp5Sf2xL9EafcyS4qoyI+tNU2 y3lw== 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=j8X2B6e/nyEs+NJNeqzCnZuwySVRnniHinpf7QdycqQ=; b=Czuc7hdzIdLcV4IJUeyd2++dJfDxqpe/gs33bE0qwrwNEm3RJ/axk9s79irpn2Urm6 YF7bqpAgbgdPyYqCbPPA8HYNiezSJYUuk2UY9sKmK50EDPoywnUg+KF5zc652aOonQhm 6xNkdfo9+wysdcU5C+opsP2o/mP2uRM/DBhCMHlkSOyOV2WCH1F1WKP+2FULL3a+Hwr9 OfTXAsfhEcg8dCZkKpNenLw8QgQCaidVzr9ZpI8qXVmSH4qHtQF/T/Uk6iPOXzvI6kh3 p1zc8qIvYKXkvLDMK4Ihe4dKX++dAKPVTo2j7o8MZlUQGhYSpE8mtys3/dAc2VFK3Agr B1EQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=fC3BZkih; 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 pw18si896267ejb.416.2021.01.20.10.03.13; Wed, 20 Jan 2021 10:03: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=fC3BZkih; 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 S1729050AbhATR6k (ORCPT + 99 others); Wed, 20 Jan 2021 12:58:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40992 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728756AbhATRzl (ORCPT ); Wed, 20 Jan 2021 12:55:41 -0500 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13D6DC0613D6 for ; Wed, 20 Jan 2021 09:54:48 -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=j8X2B6e/nyEs+NJNeqzCnZuwySVRnniHinpf7QdycqQ=; b=fC3BZkihHPF+tMwceR6naiiutb qfz3Rgpz8x00bj6HuZY4vYB+2Ky1eg90RSTKTqC5EN5BYOjGcKbS/pduZQaG3Dm6LRvopmu+rsW7Y Elvz0OqATEMrsGzfgPpDisuuWQ5N84JbRO4Ah4TDK+rwFS29SGF1ycchknpeClgNvhcdQG//3yMOZ fDyAd3eoOXRswOHJH3AxZO3Y8kk6YjX5x5elSMD5NbHf3L81fYh88QmtS8pEXgjXEUph5Xq7REuL/ 0zbGTjZwbp6Z6NPRKpfa5751LNBxdR1G7ERvMmThR2bl4U5kiT4sUWwTyFCMQhMicuyYdwarRX8Qi 67DXD6Ng==; 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 1l2Hgr-0002It-1h; Wed, 20 Jan 2021 17:54:45 +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 D6414303271; Wed, 20 Jan 2021 18:54:43 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id CB0D120BCCFD7; Wed, 20 Jan 2021 18:54:43 +0100 (CET) Date: Wed, 20 Jan 2021 18:54:43 +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: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 20, 2021 at 02:11:14PM +0100, Peter Zijlstra wrote: > On Mon, Jan 11, 2021 at 05:10:46PM +0000, vincent.donnefort@arm.com wrote: > > @@ -157,26 +162,24 @@ static int cpuhp_invoke_callback(unsigned int cpu, enum cpuhp_state state, > > > > if (st->fail == state) { > > st->fail = CPUHP_INVALID; > > - > > - if (!(bringup ? step->startup.single : step->teardown.single)) > > - return 0; > > - > > return -EAGAIN; > > } > > > > + if (cpuhp_step_empty(bringup, step)) { > > + WARN_ON_ONCE(1); > > + return 0; > > + } > > This changes the behaviour of fail.. might be best to refactor without > changing behaviour. > Aah, the trick is in cpuhp_next_state() skipping empty states, so we'll never get there.