mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-06 09:06:30 +00:00
HV:treewide:Update cpu_id type as uint_16
There are extra type conversion in the HV since cpu_id type is uint32_t and the return value type of get_cpu_id is uint16_t. BTW, the name of cpu_id is not clear enough to express its usage. So the following updates are made in this patch: Update cpu_id type as unit_16 to reduce type casting; Update related temporary variables type; Update related print argument; Change the input parameter name of interrupt_init as cpu_id to keep align with function implement; Rename cpu_id as pcpu_id as needed. Signed-off-by: Xiangyang Wu <xiangyang.wu@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -211,11 +211,11 @@ int early_init_lapic(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int init_lapic(uint16_t cpu_id)
|
||||
int init_lapic(uint16_t pcpu_id)
|
||||
{
|
||||
/* Set the Logical Destination Register */
|
||||
write_lapic_reg32(LAPIC_LOGICAL_DESTINATION_REGISTER,
|
||||
((1U << cpu_id) << 24));
|
||||
((1U << pcpu_id) << 24U));
|
||||
|
||||
/* Set the Destination Format Register */
|
||||
write_lapic_reg32(LAPIC_DESTINATION_FORMAT_REGISTER, 0xf << 28);
|
||||
|
||||
Reference in New Issue
Block a user