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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 75E2DCE7A89 for ; Mon, 25 Sep 2023 23:05:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=PVzCKnsN3BoMPW0BXh+Bvks/9sM6gd4k21KaWqqm1a4=; b=x1gWcWr6gHwIcP qRzKnV79xXxKexgToC78ss6M+6+ENZbuljm/ZiHqk57x0IQpYvpCpo5+JdxMkQlazB1mmhxz/NNyN v7rq1zyAb8vzXlll6mavUWh4DkKtictv33/y1PtbzoSnnssrSL9z9rG+iIDIncWSFU7b4i9xgXrCB Y5gD4HDf+s2QW4q7eMBUpVN7N6YowGWjCdq8kouBziDfgWzSLwwrcC8OWXacOTsok3oz7zcAggxzC j1nRGByXnqPjfk4dqIsLLnZDKJNuK9QqOuJbavuyGpL+g9UwHbyPGMpqAJ+NSfAYWGPO7uKuKj320 MlBS2vI+OGAhj/TXV6pw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qkudc-00FByG-1x; Mon, 25 Sep 2023 23:05:12 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qkudY-00FBx3-2p for linux-arm-kernel@lists.infradead.org; Mon, 25 Sep 2023 23:05:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695683099; 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=swf/1TRyjsvwDIsd/YLqft6nJR4VSEYvlPbm2UeV+EA=; b=ACE2clBYMwPwRN/Udi+a+n/5AYXneaa8jPFe5vInkIA2kLbzxvsPZMb7IaSxVY7Xgh/7WG 1fqG8bCiFBABXHTAuK3ALLjdPwTQBa8I2RTTXUHx/+n1tA7hqGwQdVxcER9dKX/w8Cnysq S0BnsfydmkrxD36Wpr0MVGJjBHBC02c= Received: from mail-oo1-f70.google.com (mail-oo1-f70.google.com [209.85.161.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-27-V6dIzaZeP8OOzNkIjUyP9A-1; Mon, 25 Sep 2023 19:04:57 -0400 X-MC-Unique: V6dIzaZeP8OOzNkIjUyP9A-1 Received: by mail-oo1-f70.google.com with SMTP id 006d021491bc7-57b6321d600so12591426eaf.0 for ; Mon, 25 Sep 2023 16:04:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695683097; x=1696287897; 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=swf/1TRyjsvwDIsd/YLqft6nJR4VSEYvlPbm2UeV+EA=; b=veWVvFNaGp4vkjQsnsy7phNKsPbCFpAQx5fLZ0/bWgeq4Umhl6hXTLCt5BkxQuKbmH HhGn0uX0nxsmd6u6M7NcS+v7d3Qc4ColTSdqOW0AJuf3fFi2luRsJfXklJ7wz2gjJMG6 cAkmVDJAKM2ItJhRJZoi5ou2M+RBQPP+BcAgTk2i4pYlOzkbBvq7y9Z9VXHWgtgv8fCv tokjC+x521GFM6/3oAXoJenl0diMK7VMdUzb9p/o53AKc/ldc3iKTJTvmz7CZEF2zXYj D0GEmy4c4lSZZsTtZkakMM3vQH+sVcjSmTsgH+rTk7pw5ycj2Gm6ino9giv9YY1MQWxC MWLA== X-Gm-Message-State: AOJu0YwVAdOVOceoFTEdX5igxV/X8sM0f7QXm2uVlaaJEcq/ZIIWSXKb EPBXiE/5v/kd4ZuJxEgH77fXAwv6PhTFj645osDUgtqZLc8a0ok8f4wGvvaJGmp3F/JfsD57zhF BVbrzRa98jwGUBNgQJgpsrTsg8Q6FnwN/onI= X-Received: by 2002:a05:6358:2823:b0:135:47e8:76e2 with SMTP id k35-20020a056358282300b0013547e876e2mr11329983rwb.4.1695683096750; Mon, 25 Sep 2023 16:04:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFX7uksuEOetyapsty6ZE6ocFLTtk0JAOhDOymew1I5gw+0mo4tG1qOgOieTX36CWp+dKzNwQ== X-Received: by 2002:a05:6358:2823:b0:135:47e8:76e2 with SMTP id k35-20020a056358282300b0013547e876e2mr11329948rwb.4.1695683096324; Mon, 25 Sep 2023 16:04:56 -0700 (PDT) Received: from ?IPV6:2001:8003:e5b0:9f00:dbbc:1945:6e65:ec5? ([2001:8003:e5b0:9f00:dbbc:1945:6e65:ec5]) by smtp.gmail.com with ESMTPSA id z27-20020a637e1b000000b00563e1ef0491sm8538475pgc.8.2023.09.25.16.04.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 25 Sep 2023 16:04:55 -0700 (PDT) Message-ID: Date: Tue, 26 Sep 2023 09:04:46 +1000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH] cpu-hotplug: provide prototypes for arch CPU registration To: "Russell King (Oracle)" , Thomas Gleixner Cc: linux-acpi@vger.kernel.org, James Morse , loongarch@lists.linux.dev, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Ingo Molnar , Jean-Philippe Brucker , jianyong.wu@arm.com, justin.he@arm.com, Borislav Petkov , Dave Hansen , x86@kernel.org, Salil Mehta , "H. Peter Anvin" , Peter Zijlstra , linux-ia64@vger.kernel.org References: From: Gavin Shan In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230925_160509_012094_56A52841 X-CRM114-Status: GOOD ( 26.95 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Russell, On 9/26/23 02:28, Russell King (Oracle) wrote: > Provide common prototypes for arch_register_cpu() and > arch_unregister_cpu(). These are called by acpi_processor.c, with > weak versions, so the prototype for this is already set. It is > generally not necessary for function prototypes to be conditional > on preprocessor macros. > > Some architectures (e.g. Loongarch) are missing the prototype for this, > and rather than add it to Loongarch's asm/cpu.h, lets do the job once > for everyone. > > Since this covers everyone, remove the now unnecessary prototypes in > asm/cpu.h, and we also need to remove the 'static' from one of ia64's > arch_register_cpu() definitions. > > Signed-off-by: Russell King (Oracle) > --- > Changes since RFC v2: > - drop ia64 changes, as ia64 has already been removed. > > arch/x86/include/asm/cpu.h | 2 -- > arch/x86/kernel/topology.c | 2 +- > include/linux/cpu.h | 2 ++ > 3 files changed, 3 insertions(+), 3 deletions(-) > In Linux 6.6.rc3, the prototypes are still existing in arch/ia64/include/asm/cpu.h. They may have been dropped in other ia64 or x86 git repository, which this patch bases on. In the commit message, 'static' from one of ia64's arch_register_cpu() definitions is removed, but there is no changes related to ia64 in this patch. I guess that's probably x86? > diff --git a/arch/x86/include/asm/cpu.h b/arch/x86/include/asm/cpu.h > index 3a233ebff712..25050d953eee 100644 > --- a/arch/x86/include/asm/cpu.h > +++ b/arch/x86/include/asm/cpu.h > @@ -28,8 +28,6 @@ struct x86_cpu { > }; > > #ifdef CONFIG_HOTPLUG_CPU > -extern int arch_register_cpu(int num); > -extern void arch_unregister_cpu(int); > extern void soft_restart_cpu(void); > #endif > > diff --git a/arch/x86/kernel/topology.c b/arch/x86/kernel/topology.c > index ca004e2e4469..0bab03130033 100644 > --- a/arch/x86/kernel/topology.c > +++ b/arch/x86/kernel/topology.c > @@ -54,7 +54,7 @@ void arch_unregister_cpu(int num) > EXPORT_SYMBOL(arch_unregister_cpu); > #else /* CONFIG_HOTPLUG_CPU */ > > -static int __init arch_register_cpu(int num) > +int __init arch_register_cpu(int num) > { > return register_cpu(&per_cpu(cpu_devices, num).cpu, num); > } I think arch/ia64/kernel/topology.c may need same change, as stated in the commit log. In linux 6.6.rc3, 'static' exists in arch/ia64/kernel/topology.c::arch_register_cpu(). Again, your patch may have been based on other git repository. > diff --git a/include/linux/cpu.h b/include/linux/cpu.h > index 0abd60a7987b..eb768a866fe3 100644 > --- a/include/linux/cpu.h > +++ b/include/linux/cpu.h > @@ -80,6 +80,8 @@ extern __printf(4, 5) > struct device *cpu_device_create(struct device *parent, void *drvdata, > const struct attribute_group **groups, > const char *fmt, ...); > +extern int arch_register_cpu(int cpu); > +extern void arch_unregister_cpu(int cpu); > #ifdef CONFIG_HOTPLUG_CPU > extern void unregister_cpu(struct cpu *cpu); > extern ssize_t arch_cpu_probe(const char *, size_t); Thanks, Gavin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel