mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-11-13 17:34:12 +00:00
Since smpcall depends on the per_cpu_region data structure to access smp_call_info_data, this patch adds the initial version of per_cpu support on RISC-V. For now it only includes SMP call related info. Further refinement will be done in the platform initialization patchset (by Hang). Tracked-On: #8786 Signed-off-by: Haicheng Li <haicheng.li@intel.com> Co-developed-by: Shiqing Gao <shiqing.gao@intel.com> Signed-off-by: Shiqing Gao <shiqing.gao@intel.com> Acked-by: Wang, Yu1 <yu1.wang@intel.com>
28 lines
570 B
C
28 lines
570 B
C
/*
|
|
* Copyright (C) 2025 Intel Corporation.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*
|
|
* Authors:
|
|
* Haicheng Li <haicheng.li@intel.com>
|
|
*/
|
|
|
|
#ifndef RISCV_PERCPU_H
|
|
#define RISCV_PERCPU_H
|
|
|
|
#include <common/smp.h>
|
|
#include <types.h>
|
|
|
|
struct per_cpu_region {
|
|
struct smp_call_info_data smp_call_info;
|
|
} __aligned(PAGE_SIZE); /* per_cpu_region size aligned with PAGE_SIZE */
|
|
|
|
extern struct per_cpu_region per_cpu_data[MAX_PCPU_NUM];
|
|
/*
|
|
* get percpu data for pcpu_id.
|
|
*/
|
|
#define per_cpu(name, pcpu_id) \
|
|
(per_cpu_data[(pcpu_id)].name)
|
|
|
|
#endif /* RISCV_PERCPU_H */
|