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:
Xiangyang Wu
2018-07-04 10:37:43 +08:00
committed by lijinxia
parent 188210ab03
commit b76c92bf3e
11 changed files with 73 additions and 73 deletions

View File

@@ -277,7 +277,7 @@ struct vcpu {
/* External Interfaces */
struct vcpu* get_ever_run_vcpu(uint16_t pcpu_id);
int create_vcpu(uint16_t cpu_id, struct vm *vm, struct vcpu **rtn_vcpu_handle);
int create_vcpu(uint16_t pcpu_id, struct vm *vm, struct vcpu **rtn_vcpu_handle);
int start_vcpu(struct vcpu *vcpu);
int shutdown_vcpu(struct vcpu *vcpu);
void destroy_vcpu(struct vcpu *vcpu);

View File

@@ -105,7 +105,7 @@ int exception_vmexit_handler(struct vcpu *vcpu);
int interrupt_window_vmexit_handler(struct vcpu *vcpu);
int external_interrupt_vmexit_handler(struct vcpu *vcpu);
int acrn_handle_pending_request(struct vcpu *vcpu);
int interrupt_init(uint32_t logical_id);
int interrupt_init(uint16_t pcpu_id);
void cancel_event_injection(struct vcpu *vcpu);

View File

@@ -14,7 +14,7 @@ struct intr_excp_ctx;
#define DUMP_STACK_SIZE 0x200U
void dump_intr_excp_frame(struct intr_excp_ctx *ctx);
void dump_exception(struct intr_excp_ctx *ctx, uint32_t cpu_id);
void dump_exception(struct intr_excp_ctx *ctx, uint16_t pcpu_id);
#else
static inline void dump_intr_excp_frame(__unused struct intr_excp_ctx *ctx)
@@ -22,7 +22,7 @@ static inline void dump_intr_excp_frame(__unused struct intr_excp_ctx *ctx)
}
static inline void dump_exception(__unused struct intr_excp_ctx *ctx,
__unused uint32_t cpu_id)
__unused uint16_t pcpu_id)
{
}

View File

@@ -30,7 +30,7 @@
extern uint32_t console_loglevel;
extern uint32_t mem_loglevel;
void init_logmsg(uint32_t mem_size, uint32_t flags);
void print_logmsg_buffer(uint32_t cpu_id);
void print_logmsg_buffer(uint16_t pcpu_id);
void do_logmsg(uint32_t severity, const char *fmt, ...);
#else /* HV_DEBUG */
@@ -45,7 +45,7 @@ static inline void do_logmsg(__unused uint32_t severity,
{
}
static inline void print_logmsg_buffer(__unused uint32_t cpu_id)
static inline void print_logmsg_buffer(__unused uint16_t pcpu_id)
{
}