mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-08-05 10:20:55 +00:00
HV: Remove goto in vlapic_read()
remove goto statement in vlapic_read() routine Tracked-On: #861 Signed-off-by: Chaohong guo <chaohong.guo@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
parent
7a04db7cd8
commit
9efbdc829d
@ -1025,10 +1025,7 @@ vlapic_calcdest(struct acrn_vm *vm, uint64_t *dmask, uint32_t dest,
|
||||
* Broadcast in both logical and physical modes.
|
||||
*/
|
||||
*dmask = vm_active_cpus(vm);
|
||||
return;
|
||||
}
|
||||
|
||||
if (phys) {
|
||||
} else if (phys) {
|
||||
/*
|
||||
* Physical mode: destination is LAPIC ID.
|
||||
*/
|
||||
@ -1464,8 +1461,7 @@ vlapic_read(struct acrn_vlapic *vlapic, uint32_t offset_arg,
|
||||
|
||||
if (offset > sizeof(*lapic)) {
|
||||
*data = 0UL;
|
||||
goto done;
|
||||
}
|
||||
} else {
|
||||
|
||||
offset &= ~0x3UL;
|
||||
switch (offset) {
|
||||
@ -1548,9 +1544,7 @@ vlapic_read(struct acrn_vlapic *vlapic, uint32_t offset_arg,
|
||||
*data = vlapic_get_lvt(vlapic, offset);
|
||||
#ifdef INVARIANTS
|
||||
reg = vlapic_get_lvtptr(vlapic, offset);
|
||||
ASSERT(*data == *reg,
|
||||
"inconsistent lvt value at offset %#x: %#lx/%#x",
|
||||
offset, *data, *reg);
|
||||
ASSERT(*data == *reg, "inconsistent lvt value at offset %#x: %#lx/%#x", offset, *data, *reg);
|
||||
#endif
|
||||
break;
|
||||
case APIC_OFFSET_TIMER_ICR:
|
||||
@ -1572,7 +1566,8 @@ vlapic_read(struct acrn_vlapic *vlapic, uint32_t offset_arg,
|
||||
*data = 0UL;
|
||||
break;
|
||||
}
|
||||
done:
|
||||
}
|
||||
|
||||
dev_dbg(ACRN_DBG_LAPIC,
|
||||
"vlapic read offset %#x, data %#lx", offset, *data);
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user