Received: by 2002:ab2:4a89:0:b0:1f4:a8b6:6e69 with SMTP id w9csp108520lqj; Wed, 10 Apr 2024 05:43:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXx7xLH1mjjqycr/6lG/N6DE2mJJr5TsgyerW4d3t54eo+LSTpz1Hwaxpf30dPjFMWxTorfV071IfGGZOZTbj6t6NNKSlkKgQe2fJvEvw== X-Google-Smtp-Source: AGHT+IFGk4FO2Y2ZOyGsyyApqh1ymH3tO3LBEYtfd469SjBuqB1qn97702DmMsznRK8xsF6rd3FM X-Received: by 2002:ae9:e60a:0:b0:78a:454a:1eef with SMTP id z10-20020ae9e60a000000b0078a454a1eefmr2647113qkf.37.1712753019229; Wed, 10 Apr 2024 05:43:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712753019; cv=pass; d=google.com; s=arc-20160816; b=kJFh5Ywn9+K0bpS3gAUQCdHYqHECoE8gLDfc180YzgyBRu/5HjMuZsjVgjC1iNoOog 9e3RvhvmKT/maJcsfHI6D/GL7d9lxMZND8cDqrYa4Bb/MRUeyVDDR8pTaU5Na9Afk7gw t5s+BBskqd+zkMDMzJ1fsG3/R8E6DE2mZe24iI1rMQEKTFBk49za8gDpYQ8DG12PR7L7 k9u1IGnzEDztLmwKl9NeVdoIXSiUDrm6SYxRCRMUoDtvnEC1FabFLknBtB+gFlJfesD/ QWOMniEkD/InxWPItnapNnm2iTBkPzib7gk2jUQz4OrhpBdA76wLNAT0jG86Bf3mUbjP mxXQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:organization:references :in-reply-to:message-id:subject:cc:to:from:date; bh=FJ9qsItRmIx/6AbpTvKWwrXudjd/u+3Dj1wc1XTmMsk=; fh=Bjs3PnFfMvs+BFTyJ9y6tLyJi212q6uorkDK9SVVmsE=; b=fKlPPAABpBymASDNUlGLTLBfhQ1AuTXu5iMa5uYXrWw6bfKdlDvXgqayY9lRa0F2iE Pm0Cu7c/hqx+hVNkqZnok/aChWKeeaziu6K80RD8NkBx8iPsRRy7erTyAeOZ8DuJ6G+m C7N7WcPo8wOKHelGAzz/fSqmtIcRrmU98hjrrdFxIRByzsKDV3H2Frxw/y5KvfvU8mqI 9AiIqAPXyad8+kgn1RrvNoV4GtRATOqBM0alUB80JjANV40cuJN06t2YS6DpeANaMGjY 8n2Hx4Q+pWCTqX79z2RbFAOk25tMllPBsT9C1gsyCvDRSmMHzoS7zFGUUga92JHjtKSo 4Rbw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-138518-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-138518-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id i4-20020a05620a248400b0078d7214a51asi3294274qkn.481.2024.04.10.05.43.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 05:43:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-138518-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-138518-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-138518-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id D8F2A1C2196A for ; Wed, 10 Apr 2024 12:43:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B530215B576; Wed, 10 Apr 2024 12:43:27 +0000 (UTC) Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8237412EBEF; Wed, 10 Apr 2024 12:43:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.176.79.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712753007; cv=none; b=Z5HSWlGl97YtCfHtJCmYRzyFaWcqDt58uurGSJFN+F1W3aKtjAlISuRgzjZy6958PcsrLFsoGUoEvt3xIwVKkOLyTxi/gm9t06jDgz37oB6xJV6Zz5Qs57dAXcndPqghLV1UiyZjx3vmuTv72uhP2lc0Q0f8clXaTLpBaFzMaRg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712753007; c=relaxed/simple; bh=oNXkmJLZw0UUlzScvUERB+oZiwnYTzIkRhGzopuv6w0=; h=Date:From:To:CC:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=OLcJmoohYh4zMuEfFMNApVZR8SGv9dkwP1SUPucNozgW4cC4qrPBKcAyFQ3eDuyjUj2oUuZtFdIw9Lydc7UcZSjtIVqVFUPtyJldlL7G1wuZX82OsEMgW5JqsPePevzbLjo2fA8yXumyFdvwCQMBMcPwzUoWUCJu2UYnCL9NoRM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=185.176.79.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.18.186.231]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4VF2Wn6z5Vz6K6Cs; Wed, 10 Apr 2024 20:41:41 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id AB478140DD4; Wed, 10 Apr 2024 20:43:19 +0800 (CST) Received: from localhost (10.122.247.231) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Wed, 10 Apr 2024 13:43:19 +0100 Date: Wed, 10 Apr 2024 13:43:18 +0100 From: Jonathan Cameron To: "Rafael J. Wysocki" CC: Russell King , , , , , , , , , , , , , , , Salil Mehta , Jean-Philippe Brucker , , , James Morse Subject: Re: [PATCH RFC v4 02/15] ACPI: processor: Register all CPUs from acpi_processor_get_info() Message-ID: <20240410134318.0000193c@huawei.com> In-Reply-To: <20240322185327.00002416@Huawei.com> References: <20240322185327.00002416@Huawei.com> Organization: Huawei Technologies R&D (UK) Ltd. X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.29; x86_64-w64-mingw32) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: lhrpeml500006.china.huawei.com (7.191.161.198) To lhrpeml500005.china.huawei.com (7.191.163.240) > > > > > diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c > > > index 47de0f140ba6..13d052bf13f4 100644 > > > --- a/drivers/base/cpu.c > > > +++ b/drivers/base/cpu.c > > > @@ -553,7 +553,11 @@ static void __init cpu_dev_register_generic(void) > > > { > > > int i, ret; > > > > > > - if (!IS_ENABLED(CONFIG_GENERIC_CPU_DEVICES)) > > > + /* > > > + * When ACPI is enabled, CPUs are registered via > > > + * acpi_processor_get_info(). > > > + */ > > > + if (!IS_ENABLED(CONFIG_GENERIC_CPU_DEVICES) || !acpi_disabled) > > > return; > > > > Honestly, this looks like a quick hack to me and it absolutely > > requires an ACK from the x86 maintainers to go anywhere. > Will address this separately. > So do people prefer this hack, or something along lines of the following? static int __init cpu_dev_register_generic(void) { int i, ret = 0; for_each_online_cpu(i) { if (!get_cpu_device(i)) { ret = arch_register_cpu(i); if (ret) pr_warn("register_cpu %d failed (%d)\n", i, ret); } } //Probably just eat the error. return 0; } subsys_initcall_sync(cpu_dev_register_generic); Which may look familiar at it's effectively patch 3 from v3 which was dealing with CPUs missing from DSDT (something we think doesn't happen). It might be possible to elide the arch_register_cpu() in make_present() but that will mean we use different flows in this patch set for the hotplug and initially present cases which is a bit messy. I've tested this lightly on arm64 and x86 ACPI + DT booting and it "seems" fine. Jonathan > > > > > > > > for_each_present_cpu(i) { > > > -- > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel