hv: multi-arch: abstract some pcpu related interfaces and macros

The following pcpu related interfaces are moved into common:
- common/cpu.c::start_pcpus
- include/common/cpu.h::get_pcpu_id
- include/common/cpu.h::set_current_pcpu_id
Their arch specific implementations are moved into arch/$(ARCH):
- arch/$(ARCH)/cpu.c::arch_start_pcpu
- include/arch/$(ARCH)/asm/cpu.h::arch_get_pcpu_id
- include/arch/$(ARCH)/asm/cpu.h::arch_set_current_pcpu_id
The following interface is moved into common:
- pcpu_set_current_state (from arch/x86/cpu.c -> common/cpu.c)
The following MACROs are moved into include/common/cpu.h:
- CPU_UP_TIMEOUT
- CPU_DOWN_TIMEOUT
- BSP_CPU_ID
- INVALID_CPU_ID

Tracked-On: #8791
Signed-off-by: Jian Jun Chen <jian.jun.chen@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
This commit is contained in:
Jian Jun Chen
2025-09-09 15:09:38 +08:00
committed by acrnsi-robot
parent b4092965a4
commit e5831fec1e
10 changed files with 105 additions and 91 deletions

View File

@@ -4,9 +4,9 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <asm/cpu.h>
#include <asm/irq.h>
#include <debug/dump.h>
#include <cpu.h>
void dispatch_exception(struct intr_excp_ctx *ctx)
{