mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-13 11:33:58 +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:
@@ -1,12 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2022 Intel Corporation.
|
||||
* Copyright (C) 2018-2025 Intel Corporation.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
#include <types.h>
|
||||
#include <errno.h>
|
||||
#include <asm/lib/bits.h>
|
||||
#include <bits.h>
|
||||
#include <asm/guest/vm.h>
|
||||
#include <asm/vtd.h>
|
||||
#include <ptdev.h>
|
||||
@@ -67,7 +67,7 @@ static uint32_t calculate_logical_dest_mask(uint64_t pdmask)
|
||||
*/
|
||||
dest_cluster_id = per_cpu(arch.lapic_ldr, pcpu_id) & X2APIC_LDR_CLUSTER_ID_MASK;
|
||||
do {
|
||||
bitmap_clear_nolock(pcpu_id, &pcpu_mask);
|
||||
bitmap_clear_non_atomic(pcpu_id, &pcpu_mask);
|
||||
cluster_id = per_cpu(arch.lapic_ldr, pcpu_id) & X2APIC_LDR_CLUSTER_ID_MASK;
|
||||
if (cluster_id == dest_cluster_id) {
|
||||
logical_id_mask |= (per_cpu(arch.lapic_ldr, pcpu_id) & X2APIC_LDR_LOGICAL_ID_MASK);
|
||||
|
||||
Reference in New Issue
Block a user