Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3828289rdb; Thu, 14 Sep 2023 04:08:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF5mIYxuuMftLfEgLL0iCyN8IDNsCxvfwFTznbsyT+2Fx0HQ1f0nRlwuNJqcRE8tB5zok1j X-Received: by 2002:a17:902:ea0e:b0:1c0:7e86:4f6 with SMTP id s14-20020a170902ea0e00b001c07e8604f6mr6393266plg.14.1694689681454; Thu, 14 Sep 2023 04:08:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694689681; cv=none; d=google.com; s=arc-20160816; b=lUBEkPH7LeYaPM6hVamctz2w4yh1Iu7pBELvbh5mhFYHEAXLh7ID4lhPloYe9l3e+v HjsTe91xgWEdtpxRC5jeNSrRcH/JsET0gMrZ+WWolJCXlxa/vziDB5Bu48XJUM2pJO2j FPCmpmPL2XMahoPb9CQ+Jnv4802WuYQ/4xA6oAAH2DwIZt54qd2CQSyK4HSPbwvWw+TW zsakheWms7TMDtK1KQy5R6HcjLJ9jprThKHaWwWjN1QU06iWT+Ac3qO8LYjCrXtet8lY 6B1+4CW4emQKXTw1Wy3Bi6h5O2B/XCp4z4ZF3gASCL0L0dG+HTsvZNwoou/dJOufSjcV l+LA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=LYjT7p+7ApiP3HUSxb8bC2YhJAJoZsqaqc6wQJxetIk=; fh=oO43h3w0Gnh1/uzgjBLTRg+oe1Gv6aFHPIod5z8aS5s=; b=DQQpCAbxuKxlgdBS8RIVV1luzotPlF3q2Rpdhsjh6UmlJNJtaEO0LmA0a4i6FTmKz0 cQyM9RM0lDruD8o5sqbv06n0VQuvfpByMo2ArSxFH1wN7O/XKdQHjUhAoMV1+RKv4Q+E mWYxkQq0LOFq+A3FktE5bJlRBfG8fZwX1RgoUKGzAp+/p6mosoBPWkyUQWNZyEvBovW4 92OBdyYtnM48bKDooG53msCoksqU0wxNJv9Opk52TV1+whiJhGHNyu+IEuSt9PZ/G9Ng 96o0RX63fx1WcMUe7XGPKZCU+lbjtqR+jT69dRG2NCPbehKZ9go3Oln5umgQWAbyriGP AfXA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id m9-20020a170902db0900b001c0ebd96c51si607820plx.602.2023.09.14.04.07.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 04:08:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 85E0E812D237; Thu, 14 Sep 2023 03:56:56 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235935AbjINK4z (ORCPT + 99 others); Thu, 14 Sep 2023 06:56:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230413AbjINK4x (ORCPT ); Thu, 14 Sep 2023 06:56:53 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B071D1BFE; Thu, 14 Sep 2023 03:56:49 -0700 (PDT) Received: from lhrpeml500005.china.huawei.com (unknown [172.18.147.226]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4RmYzn43fRz6J6LX; Thu, 14 Sep 2023 18:52:05 +0800 (CST) Received: from localhost (10.202.227.76) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Thu, 14 Sep 2023 11:56:45 +0100 Date: Thu, 14 Sep 2023 11:56:44 +0100 From: Jonathan Cameron To: James Morse CC: , , , , , , , , , Salil Mehta , Russell King , Jean-Philippe Brucker , , Subject: Re: [RFC PATCH v2 02/35] drivers: base: Use present CPUs in GENERIC_CPU_DEVICES Message-ID: <20230914115644.00005182@Huawei.com> In-Reply-To: <20230913163823.7880-3-james.morse@arm.com> References: <20230913163823.7880-1-james.morse@arm.com> <20230913163823.7880-3-james.morse@arm.com> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.202.227.76] X-ClientProxiedBy: lhrpeml100004.china.huawei.com (7.191.162.219) To lhrpeml500005.china.huawei.com (7.191.163.240) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 14 Sep 2023 03:56:56 -0700 (PDT) > Signed-off-by: James Morse Seems sensible and well reasoned cleanup to me. Technically an ABI change, but would be seriously odd if any real code relied on the current pointless behavior on the few architectures where is changing. FWIW review is really of your analysis rather than the change :) Seems like there may be some additional cleanup that makes sense from Russell's analysis, but that's perhaps a parallel job. Reviewed-by: Jonathan Cameron > --- > drivers/base/cpu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c > index 9ea22e165acd..34b48f660b6b 100644 > --- a/drivers/base/cpu.c > +++ b/drivers/base/cpu.c > @@ -533,7 +533,7 @@ static void __init cpu_dev_register_generic(void) > #ifdef CONFIG_GENERIC_CPU_DEVICES > int i; > > - for_each_possible_cpu(i) { > + for_each_present_cpu(i) { > if (register_cpu(&per_cpu(cpu_devices, i), i)) > panic("Failed to register CPU device"); > }