Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp451116rdb; Thu, 30 Nov 2023 08:54:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IG3HmEdVCA6GjpIykB/f+ERMFtmQX8OUHxGbyfIic6UXbcOKbXCo6BQ8qZqFGzYeq7xVUhG X-Received: by 2002:a17:903:4d2:b0:1cf:aca3:186c with SMTP id jm18-20020a17090304d200b001cfaca3186cmr18609481plb.30.1701363262129; Thu, 30 Nov 2023 08:54:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701363262; cv=none; d=google.com; s=arc-20160816; b=GqloEaTKDbcJYTQbBYEZaH4ooRMK9t9ytbDvMU7hoqThxwz7j5GzAFTb3huXzGQBPg EAdYei3HELwBofKQN/vveR6r2n8DcaFZ0BGJFXjHthoBS78UtTg421laadU1d+lzWFwC OzlRk0d/qfm1QqYCB2mhCnNQAvXG/2rvYAKi2G+7qPMZ+YxRBWelPM5CGxeLzve+WTUY yomvcKtWXc2RVPR5xOOXBN3Fc9uj3XPxoBYaKfbwAX+pKYfMqy3jjQyOxt0txtpsV9Ty /Nts+HwQcT5e7l84biUBZX/PTUpxOY+MoOC+6EOfObay5Y7ZpsOv816jhSK61FK+6wI6 RGNQ== 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=r6sMCsw1BqEqnA618ZKOyOFm1beo4fnSn1v8jO/XGNI=; fh=mI8uJHnDYgSKQWcFpq1nbiO6i8V9zzBi/xCj7DJkUGg=; b=reyEk0lYXYuygJZhv4oOW6v8GdjvdZ3NtjDAWNzcNnSKCr7p5kGpr3ZxLKZIpZvMkA A2pgln20WvbkyS5WoMlgU5I+mrfr6Ffmi3lZdf0pfIEh7eOJly9sOA43x5vM4hzOnmz9 YkJtm/zbZM21K15E/1TM0EFw4Fu6RRJ4pPF5YbMMu7LkPZBb+Z86JXL6zE4hTXk0qGvn mXSyni0mdcq//BjXRwWS/OqEeZ1I/DUxMILPJq9Dyy2Oj5i30iuUZ61Cz+0mvXIIKMbE 1gVTyBa/4C9RNJEERRgx2U1S5NQxViETxhiQ/A3ZJdGjJ9p70OKRDMzTNUTuyPchgQle HR+g== 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:5 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 groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id jh17-20020a170903329100b001cfd2c5ae92si1448171plb.521.2023.11.30.08.54.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 08:54:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (Postfix) with ESMTP id A3F4A807832D; Thu, 30 Nov 2023 08:54:19 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345646AbjK3QyE (ORCPT + 99 others); Thu, 30 Nov 2023 11:54:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231796AbjK3QyC (ORCPT ); Thu, 30 Nov 2023 11:54:02 -0500 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DB85D7D; Thu, 30 Nov 2023 08:54:09 -0800 (PST) Received: from mail.maildlp.com (unknown [172.18.186.31]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4Sh2L713lCz6K96M; Fri, 1 Dec 2023 00:52:31 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id C7D2B1404F4; Fri, 1 Dec 2023 00:54:07 +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.35; Thu, 30 Nov 2023 16:54:07 +0000 Date: Thu, 30 Nov 2023 16:54:06 +0000 From: Jonathan Cameron To: Russell King CC: , , , , , , , , , , , , , Salil Mehta , Jean-Philippe Brucker , , , James Morse , Catalin Marinas , Will Deacon Subject: Re: [PATCH 12/21] arm64: setup: Switch over to GENERIC_CPU_DEVICES using arch_register_cpu() Message-ID: <20231130165406.00007d90@Huawei.com> In-Reply-To: References: 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: lhrpeml100005.china.huawei.com (7.191.160.25) To lhrpeml500005.china.huawei.com (7.191.163.240) X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email 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 (groat.vger.email [0.0.0.0]); Thu, 30 Nov 2023 08:54:19 -0800 (PST) On Tue, 21 Nov 2023 13:44:51 +0000 Russell King wrote: > From: James Morse > > To allow ACPI's _STA value to hide CPUs that are present, but not > available to online right now due to VMM or firmware policy, the > register_cpu() call needs to be made by the ACPI machinery when ACPI > is in use. This allows it to hide CPUs that are unavailable from sysfs. > > Switching to GENERIC_CPU_DEVICES is an intermediate step to allow all > five ACPI architectures to be modified at once. > > Switch over to GENERIC_CPU_DEVICES, and provide an arch_register_cpu() > that populates the hotpluggable flag. arch_register_cpu() is also the > interface the ACPI machinery expects. > > The struct cpu in struct cpuinfo_arm64 is never used directly, remove > it to use the one GENERIC_CPU_DEVICES provides. > > This changes the CPUs visible in sysfs from possible to present, but > on arm64 smp_prepare_cpus() ensures these are the same. > > This patch also has the effect of moving the registration of CPUs from > subsys to driver core initialisation, prior to any initcalls running. > > Signed-off-by: James Morse > Reviewed-by: Russell King (Oracle) > Reviewed-by: Shaoqin Huang > Reviewed-by: Gavin Shan > Signed-off-by: Russell King (Oracle) Reviewed-by: Jonathan Cameron