Skip to content

Commit

Permalink
HV:pic fix "Recursion in procedure calls found"
Browse files Browse the repository at this point in the history
Functions shall not call themselves, either directly or indirectly.

vpic_set_pinstate will cal vpic_notify_intr and results to recursion
violations,fix it out by mov vpic_notify_intr out of vpic_set_pinstate.

Tracked-On: #861
Signed-off-by: Huihuang Shi <huihuang.shi@intel.com>
reviewed-by: Junjie Mao <junjie.mao@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
  • Loading branch information
Shawnshh authored and wenlingz committed Nov 14, 2018
1 parent 0a9d684 commit 7e6d0a2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions hypervisor/dm/vpic.c
Expand Up @@ -434,8 +434,6 @@ static void vpic_set_pinstate(struct acrn_vpic *vpic, uint8_t pin,
dev_dbg(ACRN_DBG_PIC, "pic pin%hhu: %s, ignored\n",
pin, (level != 0U) ? "asserted" : "deasserted");
}

vpic_notify_intr(vpic);
}

/**
Expand Down Expand Up @@ -488,6 +486,7 @@ void vpic_set_irq(struct acrn_vm *vm, uint32_t irq, uint32_t operation)
*/
break;
}
vpic_notify_intr(vpic);
spinlock_release(&(vpic->lock));
}

Expand Down

0 comments on commit 7e6d0a2

Please sign in to comment.