mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-11-22 07:24:08 +00:00
enable riscv common file compile and add PAGE_SIZE definition to make riscv compile pass. Tracked-On: #8801 Signed-off-by: hangliu1 <hang1.liu@intel.com> Reviewed-by: Wang, Yu1 <yu1.wang@intel.com> Reviewed-by: Liu, Yifan1 <yifan1.liu@intel.com> Acked-by: Wang, Yu1 <yu1.wang@intel.com>
30 lines
619 B
C
30 lines
619 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/notify.h>
|
|
#include <types.h>
|
|
#include <board_info.h>
|
|
#include <asm/page.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 */
|