From 6e1783612df72139c2c53ef091709fe55412c789 Mon Sep 17 00:00:00 2001 From: Niklas Eiling Date: Wed, 7 Feb 2024 15:14:04 +0100 Subject: [PATCH] ips/intc: remove access to xilinx driver in case we are using VFIO Signed-off-by: Niklas Eiling --- fpga/lib/ips/intc.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fpga/lib/ips/intc.cpp b/fpga/lib/ips/intc.cpp index 99d9af2f7..2d79e35e0 100644 --- a/fpga/lib/ips/intc.cpp +++ b/fpga/lib/ips/intc.cpp @@ -120,9 +120,8 @@ InterruptController::disableInterrupt(InterruptController::IrqMaskType mask) ssize_t InterruptController::waitForInterrupt(int irq) { assert(irq < maxIrqs); - const uintptr_t base = getBaseAddr(registerMemory); - if (this->polling[irq]) { + const uintptr_t base = getBaseAddr(registerMemory); uint32_t isr, mask = 1 << irq; do { @@ -150,6 +149,7 @@ ssize_t InterruptController::waitForInterrupt(int irq) { return -1; } else if (sret == 0) { logger->warn("timeout waiting for interrupt {}", irq); + return -1; } // Block until there has been an interrupt, read number of interrupts @@ -159,8 +159,6 @@ ssize_t InterruptController::waitForInterrupt(int irq) { return -1; } - logger->debug("Received {} interrupts on {}", count, irq); - return count; } }