From 7e6d0a217623d66b0071db6790744b1ae9dd2df4 Mon Sep 17 00:00:00 2001 From: Huihuang Shi Date: Wed, 7 Nov 2018 17:41:14 +0800 Subject: [PATCH] HV:pic fix "Recursion in procedure calls found" 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 reviewed-by: Junjie Mao Acked-by: Anthony Xu --- hypervisor/dm/vpic.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hypervisor/dm/vpic.c b/hypervisor/dm/vpic.c index 709a1af6f..d5a614198 100644 --- a/hypervisor/dm/vpic.c +++ b/hypervisor/dm/vpic.c @@ -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); } /** @@ -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)); }