From patchwork Sun Oct 15 08:40:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ingo Molnar X-Patchwork-Id: 152994 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp2832715vqb; Sun, 15 Oct 2023 01:41:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHHJyGJrVpibvgSJOerl743nrrtHR6+Ot/xS4EeTf6Z83Ipbp7iETziEuplLFe1opQNyLgU X-Received: by 2002:a05:6870:b87:b0:1ea:972:d2b6 with SMTP id lg7-20020a0568700b8700b001ea0972d2b6mr3214212oab.3.1697359287578; Sun, 15 Oct 2023 01:41:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697359287; cv=none; d=google.com; s=arc-20160816; b=YYsx4MS9KvteQg1iwkmuE/bLUnGufjyfNwzI1jdpIDDy+YpljD52b+uu7IkZE97JPC eTW3FbHc6mVHU7i9kwMQRX8R8i5C3C/Jg8MzTsupz94nbtDOkNOB11SOR1lqiz6AvVuP bMO4F83E2JwcYxtZz7LvuoRK6PQ4nBtuvzdjmAXUuNSupTxPi5hvcdWqCvxWgK6YgsF+ r7icQepX57whR+w1K06vK3vhf+aUBOTIaj5IvtMfOm2yacDkwpEyNw/Yh3O8klmR1/F8 F79FIUehI6/7TtHmUwU7VfK4baEzjlPWN1xg+rt3wePWTa23qJe27HsDH1cSDMwblHiD KZuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:sender:dkim-signature; bh=g4DjT3Phka8w5skOZXUV7G8lYOeliLen0y3NNyRZq5o=; fh=eZPbrubx8Rv21UaiEomkwNNoIQZBQZMVNnMdG5KSphc=; b=dY4w5ZmngOI6HVIqccQrYsL1dm2YLGF5mibDveN4C1ObkLa0QIcdn7d+A2RLz5UZXl CGquxS/TecY5GBHHKInZDum6kmAJx/wush8bmwpXewubCuRJv9EfMDd3FHR0POud7vSX XW16LPGnaaNDyUpk96/7SdGNTvyqXsWNLjPaPIaynUQUe6USDSSeUvc+u8uUX+atuQlL EGYG4E2EwbQ6U+4eZkIckP5m6yQWDlMcyGHxHTQKOq1gazygZXQtnClKabH9z2BNAsK/ pkzkUzPkqf2GPD2FsYZyIHJAtSqWkcYXdM6G58UiC52lv9HMppdDK/syVhu//NgF+fOM OCAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=JBXxB91l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id h35-20020a635323000000b00578bb5917d7si4717938pgb.153.2023.10.15.01.41.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Oct 2023 01:41:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=JBXxB91l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id BB95F803BEAE; Sun, 15 Oct 2023 01:41:22 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233521AbjJOIlG (ORCPT + 19 others); Sun, 15 Oct 2023 04:41:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233421AbjJOIlF (ORCPT ); Sun, 15 Oct 2023 04:41:05 -0400 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 257EAC5 for ; Sun, 15 Oct 2023 01:41:03 -0700 (PDT) Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-9adb9fa7200so713098266b.0 for ; Sun, 15 Oct 2023 01:41:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697359261; x=1697964061; darn=vger.kernel.org; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :sender:from:to:cc:subject:date:message-id:reply-to; bh=g4DjT3Phka8w5skOZXUV7G8lYOeliLen0y3NNyRZq5o=; b=JBXxB91lV4iZkpjOv0s3XN+IGPm0R9boPcfz9AG+4Ecth3R73bztBxoGeOTWPkv9Gb UrtLxLX6CYqE7g7d8UlTDz8mYliCwfzo7TJ510yfMRYV3JZ92+OS2aNJUOEaR872GQO0 D7MXDZbBtmTEKy82IiA1xXQrD8Zve+Wv7U/u4Qj14wNiJK+aTWCpy+pbyhwZl1A3/Bm6 RAl1KTkzwV4W9UMViFZyp/WaHs+DnkqKWyVMcO7j8F50vqQ+BpNjah8WKbqIgfeycNZk fIf/vtEA6X/8o2/ftxGs4oPEWJya5mxkEGsU2gTcr0wHvgPZjEXsSgDzIXN2oD+IH5oy Qv7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697359261; x=1697964061; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=g4DjT3Phka8w5skOZXUV7G8lYOeliLen0y3NNyRZq5o=; b=UbN3vSqUI4oa396ig7zufebirj2ZLts2uitvy/rd2sT29gh3vkIz48yKop2M0sdqu0 TL6ycZ9eM1efVf/3PYnKUme0XOJVfiNeKZJjpM/ODSWAnGg6FpYwjzW9nh142EZtjqJZ z7w8c0jvtAP/qD+v8wZIPH4ZJ0ZhKqd1yhiZwOhmS8wnA+hD/dpeR53Z/QLESu0YzUUS tE6HmQzsxkGhZCnAdkw3oa1gGuubDtVoufN3NHtE77q+Zh7xLVbQsbQdfAF3LQShQG4d 4DrLCc1y/qfcnH25dCInJCxtH/PDY95q6VR7KxjA9mB+v38eASuy1YsLTA3K6AZi1DNh RdGg== X-Gm-Message-State: AOJu0YzcDiN36QwdZp+Og8a5aNmHt7GR7InHEVJSti9e+MSbYX9l5JVQ Tib61jdp9YJ+MAQ6uAsEYNk= X-Received: by 2002:a17:907:7fa8:b0:9aa:206d:b052 with SMTP id qk40-20020a1709077fa800b009aa206db052mr4719301ejc.27.1697359260807; Sun, 15 Oct 2023 01:41:00 -0700 (PDT) Received: from gmail.com (1F2EF7B2.nat.pool.telekom.hu. [31.46.247.178]) by smtp.gmail.com with ESMTPSA id kg9-20020a17090776e900b009b957d5237asm1969699ejc.80.2023.10.15.01.40.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Oct 2023 01:41:00 -0700 (PDT) Sender: Ingo Molnar Date: Sun, 15 Oct 2023 10:40:58 +0200 From: Ingo Molnar To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, Thomas Gleixner , Peter Zijlstra , Borislav Petkov , Andrew Morton Subject: [GIT PULL] CPU hotplug fix Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.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 (fry.vger.email [0.0.0.0]); Sun, 15 Oct 2023 01:41:22 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779810212103260932 X-GMAIL-MSGID: 1779810212103260932 Linus, Please pull the latest smp/urgent git tree from: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git smp-urgent-2023-10-15 # HEAD: c4dd854f740c21ae8dd9903fc67969c5497cb14b cpu-hotplug: Provide prototypes for arch CPU registration Fix a Longsoon build warning by harmonizing the arch_[un]register_cpu() prototypes between architectures. Thanks, Ingo ------------------> Russell King (Oracle) (1): cpu-hotplug: Provide prototypes for arch CPU registration arch/ia64/include/asm/cpu.h | 5 ----- arch/ia64/kernel/topology.c | 2 +- arch/x86/include/asm/cpu.h | 2 -- arch/x86/kernel/topology.c | 2 +- drivers/acpi/acpi_processor.c | 1 + include/acpi/processor.h | 5 ----- include/linux/cpu.h | 2 ++ 7 files changed, 5 insertions(+), 14 deletions(-) diff --git a/arch/ia64/include/asm/cpu.h b/arch/ia64/include/asm/cpu.h index db125df9e088..642d71675ddb 100644 --- a/arch/ia64/include/asm/cpu.h +++ b/arch/ia64/include/asm/cpu.h @@ -15,9 +15,4 @@ DECLARE_PER_CPU(struct ia64_cpu, cpu_devices); DECLARE_PER_CPU(int, cpu_state); -#ifdef CONFIG_HOTPLUG_CPU -extern int arch_register_cpu(int num); -extern void arch_unregister_cpu(int); -#endif - #endif /* _ASM_IA64_CPU_H_ */ diff --git a/arch/ia64/kernel/topology.c b/arch/ia64/kernel/topology.c index 94a848b06f15..741863a187a6 100644 --- a/arch/ia64/kernel/topology.c +++ b/arch/ia64/kernel/topology.c @@ -59,7 +59,7 @@ void __ref arch_unregister_cpu(int num) } EXPORT_SYMBOL(arch_unregister_cpu); #else -static int __init arch_register_cpu(int num) +int __init arch_register_cpu(int num) { return register_cpu(&sysfs_cpus[num].cpu, num); } 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); } diff --git a/drivers/acpi/acpi_processor.c b/drivers/acpi/acpi_processor.c index c711db8a9c33..0f5218e361df 100644 --- a/drivers/acpi/acpi_processor.c +++ b/drivers/acpi/acpi_processor.c @@ -12,6 +12,7 @@ #define pr_fmt(fmt) "ACPI: " fmt #include +#include #include #include #include diff --git a/include/acpi/processor.h b/include/acpi/processor.h index 94181fe9780a..3f34ebb27525 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h @@ -465,9 +465,4 @@ extern int acpi_processor_ffh_lpi_probe(unsigned int cpu); extern int acpi_processor_ffh_lpi_enter(struct acpi_lpi_state *lpi); #endif -#ifdef CONFIG_ACPI_HOTPLUG_CPU -extern int arch_register_cpu(int cpu); -extern void arch_unregister_cpu(int cpu); -#endif - #endif 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);