Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp628304lqb; Wed, 17 Apr 2024 06:44:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUqO0hn9GyEIZowSQdMm9R2gK+EvIZkyaLIDFricF8ElCjj49VjawPEmaBAlwLU/SOHH/vY4LfBXSjfNsMEMpu1O/RWzIRyCsZRqW4yxg== X-Google-Smtp-Source: AGHT+IG1nh74J5+gAvspEytzjCYIuj9KNPyuRNfjK/RMdydHxvK8qu42xtL6xmJVW0fAw9hSuU5n X-Received: by 2002:a17:903:2290:b0:1e4:7bf1:521 with SMTP id b16-20020a170903229000b001e47bf10521mr8688034plh.19.1713361481793; Wed, 17 Apr 2024 06:44:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713361481; cv=pass; d=google.com; s=arc-20160816; b=cvk5YaWyECkFF53pn/9sfjCgn3NBccdn8XeJLFy68ef4PWvubCRLw0hhHO4XkXsa7n 5F2rJIOv7AwnhHCaw43D6UzFcmypNWymptYvG0aZX1XvGj95SZmJ02FCTRjLDv/YzrBg tXpwVPmE4ApnipN/NDPbj489iwruEjdRKNN1q7ITNYTJrPKcxMYvUH7qD12g9xy8m4Sa VvtlzMz2x/ksj0ZCWn+eaOEKTgvXwgIq+2L7F6UH0u4kdNpJttQ9JnRn4+e98iWMQlU7 S3wUF858ld8h/VfBVSppGxGeF7bcXRxsMP/2XubY6OQRZYbr8/JZhYOGD614jQNyeRp8 mL0A== 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:references:in-reply-to:message-id :date:subject:cc:to:from; bh=pNr0MTj7vxdv52AcSqQhiA1+6jBf5E68NhVuqNL95wc=; fh=wmH6eZgtoFCyes/zVTYi+VaxxdPmNW9hqdNd8ZTZ4XU=; b=vivyTYYjKAFpBt3azekio8QfLwjKhbgGudqGIY67CPyFB3P3uyJ9MVnxOFtdFfRmd2 +cpcqfcYTcNY5HzpP+MIiTT3JUGju1mSZHjE59AR6t087XWWBvl5mQ7MRu273CU7w94z oh4b8mdKDXbxb1tgK6MrbOWqHl1I4e73fUhwChQy16I8XqLKtCZFv1s5NzMGFfMgsXHl oQl7KXo9siKJaqPEC8IU1tJI+faX9SRpHBZDsbNOPXV7MM92JrS3ItWpovnkGL7h6IhU Q+3Co/2CNBd3r0TyDMmAXtVF2zQakUgiegZ4B02abU0FXIrlA1ao8Ju8BKD3iwgd79fc uKCg==; 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-148568-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-148568-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id q8-20020a170902a3c800b001e2c6947388si11238688plb.87.2024.04.17.06.44.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Apr 2024 06:44:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-148568-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; 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-148568-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-148568-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 2D842B27C10 for ; Wed, 17 Apr 2024 13:28:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B420B1411E6; Wed, 17 Apr 2024 13:26:25 +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 EA91E13F437; Wed, 17 Apr 2024 13:26:23 +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=1713360385; cv=none; b=l1t8Gwl+TpP7rItuzNMC5icPFnkVlmKWUgiSopPuAzRcnApGsi+xf8rtQsrdLmV4nOyiMt42vSLClHu1Il/yZplUM0Xsx6GgiMylVSPM4mWMypNEsQALHSUfTs3fVPfYPD6BlDaSDmNIDF3iDlHvX851tTZiX5R1mF2rYeFfDvY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713360385; c=relaxed/simple; bh=tnjazo7gGiyTwc/AaQZOuCQ5MK+eaqwT/eCEqe3Bly0=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=t4Uzg8E37owCyO2hdGXz4v1QyB2wKXnJ18RRGVMM2Wc6g6S2lEht9OF548ZmRsJtFJX3Bn7vw269L9B169phAtZI3Wa0rip0Zi+BMu/vPqUPiVVH/7Pyd3bsiQ7HSQ2Z5plUl06DgGowjji9SWu/siKJavjLTB3u2dLgt38AMtI= 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.216]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4VKM7m2MPxz6H80c; Wed, 17 Apr 2024 21:24:20 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id 66740140A46; Wed, 17 Apr 2024 21:26:20 +0800 (CST) Received: from SecurePC-101-06.china.huawei.com (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, 17 Apr 2024 14:26:19 +0100 From: Jonathan Cameron To: Thomas Gleixner , Peter Zijlstra , , , , , , , , , Russell King , "Rafael J . Wysocki" , Miguel Luis , James Morse , Salil Mehta , Jean-Philippe Brucker , Catalin Marinas , Will Deacon CC: Ingo Molnar , Borislav Petkov , Dave Hansen , , , Subject: [PATCH v6 14/16] arm64: Kconfig: Enable hotplug CPU on arm64 if ACPI_PROCESSOR is enabled. Date: Wed, 17 Apr 2024 14:19:07 +0100 Message-ID: <20240417131909.7925-15-Jonathan.Cameron@huawei.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240417131909.7925-1-Jonathan.Cameron@huawei.com> References: <20240417131909.7925-1-Jonathan.Cameron@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: lhrpeml500001.china.huawei.com (7.191.163.213) To lhrpeml500005.china.huawei.com (7.191.163.240) In order to move arch_register_cpu() to be called via the same path for initially present CPUs described by ACPI and hotplugged CPUs ACPI_HOTPLUG_CPU needs to be enabled. Signed-off-by: Jonathan Cameron --- arch/arm64/Kconfig | 1 + arch/arm64/kernel/acpi.c | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 7b11c98b3e84..fed7d0d54179 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -5,6 +5,7 @@ config ARM64 select ACPI_CCA_REQUIRED if ACPI select ACPI_GENERIC_GSI if ACPI select ACPI_GTDT if ACPI + select ACPI_HOTPLUG_CPU if ACPI_PROCESSOR select ACPI_IORT if ACPI select ACPI_REDUCED_HARDWARE_ONLY if ACPI select ACPI_MCFG if (ACPI && PCI) diff --git a/arch/arm64/kernel/acpi.c b/arch/arm64/kernel/acpi.c index dba8fcec7f33..a74e80d58df3 100644 --- a/arch/arm64/kernel/acpi.c +++ b/arch/arm64/kernel/acpi.c @@ -29,6 +29,7 @@ #include #include +#include #include #include #include @@ -413,6 +414,21 @@ void arch_reserve_mem_area(acpi_physical_address addr, size_t size) memblock_mark_nomap(addr, size); } +#ifdef CONFIG_ACPI_HOTPLUG_CPU +int acpi_map_cpu(acpi_handle handle, phys_cpuid_t physid, u32 apci_id, + int *pcpu) +{ + return 0; +} +EXPORT_SYMBOL(acpi_map_cpu); /* check why */ + +int acpi_unmap_cpu(int cpu) +{ + return 0; +} +EXPORT_SYMBOL(acpi_unmap_cpu); +#endif /* CONFIG_ACPI_HOTPLUG_CPU */ + #ifdef CONFIG_ACPI_FFH /* * Implements ARM64 specific callbacks to support ACPI FFH Operation Region as -- 2.39.2