From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 904BDC4167D for ; Mon, 13 Nov 2023 04:08:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233108AbjKMEIf (ORCPT ); Sun, 12 Nov 2023 23:08:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233055AbjKMEIa (ORCPT ); Sun, 12 Nov 2023 23:08:30 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E195F1735 for ; Sun, 12 Nov 2023 20:07:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699848468; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4vPpPFrFkMrzqnxNhFYjlLboUr7aR9ku5ew8hulbyck=; b=E0dpLxbI7R5BxBXHoIUwlquXQJXPu9mzaFo1AaAIuiH3eu3V/V/Z7tGFY8rcXTj8RMh638 Cr2IWPNBN6p7cIFx6E+vyO+Q+I6pQmOUXrbpFllSOGPiuElCYouQUR2Y5qd2h/RAwWiN6J r36MGRwHg2IBJkareVBAaVREmfnW+Fs= Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-536-pcRHeA5DPyCoXRKx9eFvlQ-1; Sun, 12 Nov 2023 23:07:46 -0500 X-MC-Unique: pcRHeA5DPyCoXRKx9eFvlQ-1 Received: by mail-pl1-f199.google.com with SMTP id d9443c01a7336-1cc42d3f61eso45249655ad.3 for ; Sun, 12 Nov 2023 20:07:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699848465; x=1700453265; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=4vPpPFrFkMrzqnxNhFYjlLboUr7aR9ku5ew8hulbyck=; b=dA3XqzkpHB3XRcKTa7iogCyx/vfa0vfO1OVhmK0rASg4qI2XLp1o/UxPkIxtdSHc10 8LlVWF6fWJmCAIOLMWwJTFKK54NY7C/2lG+CDm0JXOmynoQ1GMcwqK+f8SigxW+jUM0s NqOSRDBgJhBDCLNOXNKJMyInKpxOYBQK2BsiTZbQYfZlzwI6TVXf6j04uXu59DCA/xVl bzTUnon1Y3vt92/aBj2cWXOkWp5l8p+LUnRVYBF+dVcOdtSAiJ2FdsbheCWGAb4wUIbz ByhsO0+hKId5qzQaD4tdQUK+640alu2F/KHZF2DS1BW4V5P0V7DDWOauJO7v/cwhyijF q0nA== X-Gm-Message-State: AOJu0YyJ/vYFfmXT4X52YpIwPT+kSKpqLFYSuayjqMA0LnVnJJhEwYTR 1tS98mQdcsKnYzV2wh9ZbyF4ZwPtjHVEMRGzAfwqMClGDBgDW404npzBQmIKM0V+hIRphVgKi5U qEMdiS/2XAf/VAD1RhG+XP/KV X-Received: by 2002:a17:903:18f:b0:1c9:b2c1:139c with SMTP id z15-20020a170903018f00b001c9b2c1139cmr7261843plg.62.1699848465412; Sun, 12 Nov 2023 20:07:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IHWMylLMVWpWug6Cxx/NC9nXPjOFm1HEloPQE99Sn7p/Alc1N4hJ0inQY3toOaSbmTdKDWFaA== X-Received: by 2002:a17:903:18f:b0:1c9:b2c1:139c with SMTP id z15-20020a170903018f00b001c9b2c1139cmr7261816plg.62.1699848465098; Sun, 12 Nov 2023 20:07:45 -0800 (PST) Received: from ?IPV6:2001:8003:e5b0:9f00:b890:3e54:96bb:2a15? ([2001:8003:e5b0:9f00:b890:3e54:96bb:2a15]) by smtp.gmail.com with ESMTPSA id b1-20020a170903228100b001cc3098c9f8sm3225162plh.275.2023.11.12.20.07.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 12 Nov 2023 20:07:44 -0800 (PST) Message-ID: Date: Mon, 13 Nov 2023 14:07:36 +1000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH RFC 13/22] arm64: setup: Switch over to GENERIC_CPU_DEVICES using arch_register_cpu() Content-Language: en-US To: "Russell King (Oracle)" , linux-pm@vger.kernel.org, loongarch@lists.linux.dev, linux-acpi@vger.kernel.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org, kvmarm@lists.linux.dev, x86@kernel.org, linux-csky@vger.kernel.org, linux-doc@vger.kernel.org, linux-ia64@vger.kernel.org, linux-parisc@vger.kernel.org Cc: Salil Mehta , Jean-Philippe Brucker , jianyong.wu@arm.com, justin.he@arm.com, James Morse , Catalin Marinas , Will Deacon References: From: Gavin Shan In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/7/23 20:30, Russell King (Oracle) 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) > Signed-off-by: Russell King (Oracle) > --- > Changes since RFC v2: > * Add note about initialisation order change. > --- > arch/arm64/Kconfig | 1 + > arch/arm64/include/asm/cpu.h | 1 - > arch/arm64/kernel/setup.c | 13 ++++--------- > 3 files changed, 5 insertions(+), 10 deletions(-) > Reviewed-by: Gavin Shan