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 C9048C4332F for ; Mon, 13 Nov 2023 04:14:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233135AbjKMEOF (ORCPT ); Sun, 12 Nov 2023 23:14:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233055AbjKMEOD (ORCPT ); Sun, 12 Nov 2023 23:14:03 -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 13DFC1735 for ; Sun, 12 Nov 2023 20:13:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699848795; 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=OYixRZav3C3iBpUpIpT8jXDG1/jkmr5ugIcaaWqfvjU=; b=OZL+WGrbv969y30HAdb6ZGh2Spj2zw7VPcYnuDt+GtZSosvui9Wukg+zhlNL6J/+FTdzUA L+plwWv734GyM+m5HWbmb9/izkNiN8QUKcAZbq9vU+LG4E4YVcYr0enVwKsBxRosTErF2v CmeA65Mjm9R51/eG3EB5U1oi1i1PfN4= Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-464-AzEUbmTRNka48F4DyBRMtw-1; Sun, 12 Nov 2023 23:13:13 -0500 X-MC-Unique: AzEUbmTRNka48F4DyBRMtw-1 Received: by mail-pl1-f197.google.com with SMTP id d9443c01a7336-1ccdf149e60so38938285ad.0 for ; Sun, 12 Nov 2023 20:13:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699848792; x=1700453592; 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=OYixRZav3C3iBpUpIpT8jXDG1/jkmr5ugIcaaWqfvjU=; b=n2Q0vwWnVgWNOBNElK6twrF4cV4OaTeCwDUWgg7F7KDNJlZvEE9HCI+0xcOA5eB9Ki bD+KdCgKYfqysjsVyj1jYSUQU3MCF7qNvPs2l7V+5kbn2sNvx9oHWJZTBuhLiVMFC+3M 7n/gNR7SghHhnGTYDf9MJzYNg8z7c+CIqyfGY49L+sBfpboMIMv9atJzefaHps2utXgI 53YDtASgAfRyR8MHzF4fgMCXCz7rXdIjYj8IjYtT+6/HW/CVm+oqsZOHVXOwt0i9E7Sl 4ewzed/0zafr+AlsGLpfPtsGBjEWXkuc7IPxvEj/MzMBwhiUguCa2AHo1WUf1jLqGcS5 kEsw== X-Gm-Message-State: AOJu0YxyM0IskUnLRmBKuGRK98A2cLYtW5liwR5YAzZyUBKuqCHwsgv7 mkKIBejT9SyJlMSMa6isqpYyHVeYmNOU9APHgWRPR2Hs0WMG0mID05Y1SE6yMG3HtTvTSdG1vEA k/03hYb2nzNvrAY1WS/A7GRh8 X-Received: by 2002:a17:903:41cd:b0:1cc:6fa6:ab62 with SMTP id u13-20020a17090341cd00b001cc6fa6ab62mr4016457ple.29.1699848792637; Sun, 12 Nov 2023 20:13:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IFeVOFMA0QCBZizKA9tBYcgAmzTI5mhR1cqxGbQYoi32/jpLTsg/y/gXt+4vuBSLdXi2pW82A== X-Received: by 2002:a17:903:41cd:b0:1cc:6fa6:ab62 with SMTP id u13-20020a17090341cd00b001cc6fa6ab62mr4016447ple.29.1699848792330; Sun, 12 Nov 2023 20:13:12 -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 6-20020a170902c10600b001cc41059a11sm3227272pli.196.2023.11.12.20.13.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 12 Nov 2023 20:13:12 -0800 (PST) Message-ID: <9890d7b5-a51b-4556-bd20-96b617e6b880@redhat.com> Date: Mon, 13 Nov 2023 14:13:02 +1000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH RFC 15/22] x86/topology: Switch over to GENERIC_CPU_DEVICES 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 , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" 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 > > Now that GENERIC_CPU_DEVICES calls arch_register_cpu(), which can be > overridden by the arch code, switch over to this to allow common code > to choose when the register_cpu() call is made. > > x86's struct cpus come from struct x86_cpu, which has no other members > or users. Remove this and use the version defined by common code. > > This is an intermediate step to the logic being moved to drivers/acpi, > where GENERIC_CPU_DEVICES will do the work when booting with acpi=off. > > 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 > Signed-off-by: Russell King (Oracle) > ---- > Changes since RFC: > * Fixed the second copy of arch_register_cpu() used for non-hotplug > Changes since RFC v2: > * Remove duplicate of the weak generic arch_register_cpu(), spotted > by Jonathan Cameron. Add note about initialisation order change. > Changes since RFC v3: > * Adapt to removal of EXPORT_SYMBOL()s > --- > arch/x86/Kconfig | 1 + > arch/x86/include/asm/cpu.h | 4 ---- > arch/x86/kernel/topology.c | 27 ++++----------------------- > 3 files changed, 5 insertions(+), 27 deletions(-) > Reviewed-by: Gavin Shan