mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-29 21:49:05 +00:00
hv: multi-arch reconstruct bits library
Extract common interface to include/lib/bits.h, and invoke the variant implementation of arch. Re-implement unlocked functions as C in common library. Rename bitmap*lock() to bitmap*(), bitmap*nolock() to bitmap*non_atomic(). Tracked-On: #8803 Signed-off-by: Haoyu Tang <haoyu.tang@intel.com> Reviewed-by: Yifan Liu <yifan1.liu@intel.com> Acked-by: Wang, Yu1 <yu1.wang@intel.com>
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
#include <cpu.h>
|
||||
#include <asm/lib/bits.h>
|
||||
#include <bits.h>
|
||||
|
||||
|
||||
static volatile uint64_t pcpu_active_bitmap = 0UL;
|
||||
@@ -24,13 +24,13 @@ bool is_pcpu_active(uint16_t pcpu_id)
|
||||
|
||||
void set_pcpu_active(uint16_t pcpu_id)
|
||||
{
|
||||
bitmap_set_lock(pcpu_id, &pcpu_active_bitmap);
|
||||
bitmap_set(pcpu_id, &pcpu_active_bitmap);
|
||||
}
|
||||
|
||||
void clear_pcpu_active(uint16_t pcpu_id)
|
||||
{
|
||||
|
||||
bitmap_clear_lock(pcpu_id, &pcpu_active_bitmap);
|
||||
bitmap_clear(pcpu_id, &pcpu_active_bitmap);
|
||||
}
|
||||
|
||||
bool check_pcpus_active(uint64_t mask)
|
||||
|
||||
Reference in New Issue
Block a user