HV: Add prefix 'p' before 'cpu' to physical cpu related functions

This patch adds prefix 'p' before 'cpu' to physical cpu related functions.
And there is no code logic change.

Tracked-On: #2991
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Kaige Fu
2019-04-21 21:52:12 +00:00
committed by wenlingz
parent 25741b62db
commit a85d11ca7a
38 changed files with 177 additions and 177 deletions

View File

@@ -81,7 +81,7 @@ void vcpu_thread(struct sched_object *obj)
void default_idle(__unused struct sched_object *obj)
{
uint16_t pcpu_id = get_cpu_id();
uint16_t pcpu_id = get_pcpu_id();
while (1) {
if (need_reschedule(pcpu_id)) {

View File

@@ -181,7 +181,7 @@ void ptirq_deactivate_entry(struct ptirq_remapping_info *entry)
void ptdev_init(void)
{
if (get_cpu_id() == BOOT_CPU_ID) {
if (get_pcpu_id() == BOOT_CPU_ID) {
spinlock_init(&ptdev_lock);
register_softirq(SOFTIRQ_PTDEV, ptirq_softirq);

View File

@@ -113,7 +113,7 @@ void make_reschedule_request(uint16_t pcpu_id, uint16_t delmode)
struct sched_context *ctx = &per_cpu(sched_ctx, pcpu_id);
bitmap_set_lock(NEED_RESCHEDULE, &ctx->flags);
if (get_cpu_id() != pcpu_id) {
if (get_pcpu_id() != pcpu_id) {
switch (delmode) {
case DEL_MODE_IPI:
send_single_ipi(pcpu_id, VECTOR_NOTIFY_VCPU);
@@ -140,7 +140,7 @@ void make_pcpu_offline(uint16_t pcpu_id)
struct sched_context *ctx = &per_cpu(sched_ctx, pcpu_id);
bitmap_set_lock(NEED_OFFLINE, &ctx->flags);
if (get_cpu_id() != pcpu_id) {
if (get_pcpu_id() != pcpu_id) {
send_single_ipi(pcpu_id, VECTOR_NOTIFY_VCPU);
}
}
@@ -168,7 +168,7 @@ static void prepare_switch(struct sched_object *prev, struct sched_object *next)
void schedule(void)
{
uint16_t pcpu_id = get_cpu_id();
uint16_t pcpu_id = get_pcpu_id();
struct sched_context *ctx = &per_cpu(sched_ctx, pcpu_id);
struct sched_object *next = NULL;
struct sched_object *prev = ctx->curr_obj;
@@ -198,7 +198,7 @@ void run_sched_thread(struct sched_object *obj)
void switch_to_idle(run_thread_t idle_thread)
{
uint16_t pcpu_id = get_cpu_id();
uint16_t pcpu_id = get_pcpu_id();
struct sched_object *idle = &per_cpu(idle, pcpu_id);
char idle_name[16];

View File

@@ -29,12 +29,12 @@ void register_softirq(uint16_t nr, softirq_handler handler)
*/
void fire_softirq(uint16_t nr)
{
bitmap_set_lock(nr, &per_cpu(softirq_pending, get_cpu_id()));
bitmap_set_lock(nr, &per_cpu(softirq_pending, get_pcpu_id()));
}
void do_softirq(void)
{
uint16_t cpu_id = get_cpu_id();
uint16_t cpu_id = get_pcpu_id();
volatile uint64_t *softirq_pending_bitmap =
&per_cpu(softirq_pending, cpu_id);
uint16_t nr = ffs64(*softirq_pending_bitmap);