From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from canpmsgout06.his.huawei.com (canpmsgout06.his.huawei.com [113.46.200.221]) (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 5298A2571B8; Wed, 24 Jun 2026 09:02:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=113.46.200.221 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782291755; cv=none; b=twCCrWiJ84Cnj4lK+poiwRs0UQg+bR7bgLAIFfRgQuJwmBXXldUqrVcA2xUph5u1Bqh6iTf0Efqm1kVG83CvKh/fdPc7mhn+qQ486J3RmYOZFfXzNMnj47Rj9uyF4ZDsiIjW6ANcDSwk7WAv8X89VXYadmektgfJ700sPIfVmgs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782291755; c=relaxed/simple; bh=xaugaN4SRcSWVzL8uQgwvR/d3F2J8bojv7LC0eQ6JJ0=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type; b=P3lZWtPumIp2uPbgqfNkDA/aGDJHQPfVLpA2oHhfUV6AJrd+46fs+BZAugEqHSdBFfB/Ew3i4kpufel2I+kY90h6xuCgfE8uR1fZNbiZ40gRBPr+CdYyHlDHnEO7VHsz5ZFF3pkgY5nP9DGDtjglp5ZnFeJf4RZF1JcmqT6Ozic= 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; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b=KphrrQhF; arc=none smtp.client-ip=113.46.200.221 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b="KphrrQhF" dkim-signature: v=1; a=rsa-sha256; d=huawei.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=iGpO/CT3jlV2FyumnjfQyfpjXbKZKHQNA+rfz8fJAiw=; b=KphrrQhFzVOQMqKA0iEo2PFdKqmkk7UmvTlgBnIJd82Tsxa/gLl+9wZdKNN3XQCs+jW3GJQcw ek0ztTUD2tbOJM+2td2kz7h8HH4utdZxTsylYi1MDNLULCjcjFY4rqxOviQ6U0tuGz+iZlwrIIC LHKvGUtpH7jEZJGAEwK7WRg= Received: from mail.maildlp.com (unknown [172.19.162.223]) by canpmsgout06.his.huawei.com (SkyGuard) with ESMTPS id 4glbLf67BzzRhSc; Wed, 24 Jun 2026 16:53:14 +0800 (CST) Received: from dggpemf500011.china.huawei.com (unknown [7.185.36.131]) by mail.maildlp.com (Postfix) with ESMTPS id DA70A40561; Wed, 24 Jun 2026 17:02:18 +0800 (CST) Received: from [10.67.109.254] (10.67.109.254) by dggpemf500011.china.huawei.com (7.185.36.131) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Wed, 24 Jun 2026 17:02:16 +0800 Message-ID: Date: Wed, 24 Jun 2026 17:02:15 +0800 Precedence: bulk X-Mailing-List: linux-mips@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 0/4] arm64: Add HOTPLUG_PARALLEL support for secondary CPUs To: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , References: <20260618092444.1316336-1-ruanjinjie@huawei.com> From: Jinjie Ruan In-Reply-To: <20260618092444.1316336-1-ruanjinjie@huawei.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: kwepems200002.china.huawei.com (7.221.188.68) To dggpemf500011.china.huawei.com (7.185.36.131) Please ignore this patchset, will update in v3. On 6/18/2026 5:24 PM, Jinjie Ruan wrote: > Support for parallel secondary CPU bringup is already utilized by x86, > MIPS, and RISC-V. This patch brings this capability to the arm64 > architecture. > > Introduce CONFIG_PARALLEL_SMT_PRIMARY_FIRST to avoid primary SMT threads > to boot first constraint. > > And Add a 'cpu' parameter to update_cpu_boot_status() to allow updating the > boot status at a per-CPU granularity during parallel bringup. > > Rework the global `secondary_data` accessed during early boot into > a per-CPU array `cpu_boot_data` to allow secondary CPUs to boot > in parallel. > > And reuse `__cpu_logical_map` array in the early boot code in head.S > to resolve each secondary CPU's logical ID concurrently. > > Changes in v2: > - Remove RFC. > - Add Tested-by. > - Fix AI review issues in [1]. > - Add arch_cpuhp_init_parallel_bringup() to check psci boot. > - Reuse `__cpu_logical_map` instead of a new aray. > - Defer rcutree_report_cpu_starting() until after > check_local_cpu_capabilities() to prevent a potential control CPU > deadlock if an early capability check fails. > - Move the assembly in head.S to a macro called `mpidr_to_cpuid`. > - Add `SECONDARY_DATA_SHIFT` for `lsl` to access `cpu_boot_data`. > - Add sizeof(struct secondary_data) power of 2 assert check. > - Expand testing with more data collected from real hardware. > > [1] https://sashiko.dev/#/patchset/20260611133809.3854977-1-ruanjinjie%40huawei.com > > Jinjie Ruan (4): > cpu/hotplug: Introduce CONFIG_PARALLEL_SMT_PRIMARY_FIRST > arm64: smp: Pass CPU ID to update_cpu_boot_status() > arm64: smp: Defer RCU reporting until after local CPU capability > checks > arm64: Add HOTPLUG_PARALLEL support for secondary CPUs > > arch/Kconfig | 4 +++ > arch/arm64/Kconfig | 1 + > arch/arm64/include/asm/smp.h | 17 ++++++++++--- > arch/arm64/kernel/asm-offsets.c | 4 +++ > arch/arm64/kernel/cpufeature.c | 22 ++++++++-------- > arch/arm64/kernel/head.S | 36 ++++++++++++++++++++++++++ > arch/arm64/kernel/smp.c | 45 ++++++++++++++++++++++++++++----- > arch/arm64/mm/context.c | 4 +-- > arch/mips/Kconfig | 1 + > arch/riscv/Kconfig | 1 + > arch/x86/Kconfig | 1 + > kernel/cpu.c | 6 ++++- > 12 files changed, 119 insertions(+), 23 deletions(-) >