Received: by 2002:a05:7208:2204:b0:82:bbfa:f723 with SMTP id s4csp329988rbb; Thu, 18 Apr 2024 07:03:17 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUsoJE5Uni25NAu1fWRuOT7Vme7Xm88IqIcnbHxM2Fo5qrj2JDrezECjkMwdCO3ZKacV5Zap4otmWcGBDv7Y5vKZ1F3Hyt1MPVoxzIUEw== X-Google-Smtp-Source: AGHT+IFHp2YuiQlWDJ+xgHtzBGr3VnvYVszDlpaYj2Z5vQrKVrbL2nNFNNW9MJN8x9noEPYU3rQD X-Received: by 2002:a17:907:76a9:b0:a55:59e8:b780 with SMTP id jw9-20020a17090776a900b00a5559e8b780mr1859538ejc.4.1713448997768; Thu, 18 Apr 2024 07:03:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713448997; cv=pass; d=google.com; s=arc-20160816; b=oYp7I112DO1GTAbBQLBp+h3Zx5BmWkRSr3qh3xnvb2r8WX4yBeJgcm25UbEXQYfkDG Rp9Lv7cUntL9kzO6P+uT9E4rJ9ZMw2B28qEb8Ojx4iGpAOKfm86tu4OhjIDLHeAsN1dD Ydo6tgCUhfQq+6EOAY6BVQ6ssqj0gpVN9X20BT3JC6pOQGitMyN8HTvVCn1TIjsE1wHN nYTJm0CBW9rJaMo5pcHWPGAjltCTTfdelqU+azX0HVmfIcxQZuPXxfhUw2JPBmJ0jg/q UdgimK8nhA1v1JY0tZBAtc3tDhI3m0ISaqA7n60/mcwrtomBy7DDb/ZkCfH4QeacaJ+x YvAw== 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=lLBN2ENPQ5YHW+m2t0+5o+sPZhzxvSTcd6vF/srQ+as=; fh=wmH6eZgtoFCyes/zVTYi+VaxxdPmNW9hqdNd8ZTZ4XU=; b=mS4hWPoQg6Ex942stBvGz5OYDLhoLD1MxLwcoLIIwrToHzBa/G9bJhZQ+Vqf560rfY DnYwvYNe60AihxgpdgggkAzQbbFqWD6qZFEZNBKQlfEqwVd7VVB/4wZtITcusmuVsMde u8NyjzasastjnItHpqMLkzxTbRVp90gkXxtYEnjpgtfsyoq4CcuywOXeZIrbTY2dJW6b o21p08MavGscZokIlDzDe0xRbgyVwO8vpNa7AVWqMt/7Xe1IkB5EmipCgqmBwwzvAkqV GyRc6Mx/Rg9ib2qWe7igrVP0OWuZiv3vj/4wM/1+hqWLJXxH/OeiimPOJDAxgD5C7o4u A4EA==; 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-150234-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-150234-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id c17-20020a170906695100b00a4e51d80e72si899143ejs.564.2024.04.18.07.03.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 07:03:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-150234-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; 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-150234-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-150234-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 0ED121F2426B for ; Thu, 18 Apr 2024 14:02:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 95455168AE9; Thu, 18 Apr 2024 14:01:32 +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 35245165FC2; Thu, 18 Apr 2024 14:01:27 +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=1713448892; cv=none; b=r9EbWALZKR6Ft51TTlt9GjledAMjm8J9OHQDKyzOk6arEmsbSKVYUYDtRXezZeVedSYn40/srMQt73n6tZlRFe2eHBl5QaZfCbiQv3pmQi/5F1czlGMoK+WOpVz3/56Q6NQ5aZh+QHpJ9hmsLdQI3L8eF5OMegPtFWrpWWp7rqo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713448892; c=relaxed/simple; bh=SbGXeSLK8beeZDzTBZrZDvu/cJJOz8jYwN3LyQLDBxY=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=DxgcewgN5IXMMwYGWjEUTQcNr/nLE6OrFv2lW+TjXJukPPwivQCcM+7S7enzsyrhvIosQeeUHr/CK6pOgceMWugEaCOfydP6nKRz+HGooEtjSu0e7BVjL8EbW7vY3jbGIdV9x7toxXceuvDJhMC5RgAfpPbVGu3PSOiiQrDvLyo= 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.231]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4VKzsj6lgQz6K5r4; Thu, 18 Apr 2024 21:59:21 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id 4E3DF14038F; Thu, 18 Apr 2024 22:01:25 +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; Thu, 18 Apr 2024 15:01:24 +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 v7 14/16] arm64: Kconfig: Enable hotplug CPU on arm64 if ACPI_PROCESSOR is enabled. Date: Thu, 18 Apr 2024 14:54:10 +0100 Message-ID: <20240418135412.14730-15-Jonathan.Cameron@huawei.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240418135412.14730-1-Jonathan.Cameron@huawei.com> References: <20240418135412.14730-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: lhrpeml100002.china.huawei.com (7.191.160.241) 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 --- v7: No change. --- 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