[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v4 4/4] xen/drivers/char: fix exynos4210 IRQ registration failure propagation


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Oleksii Moisieiev <Oleksii_Moisieiev@xxxxxxxx>
  • Date: Thu, 23 Apr 2026 16:11:42 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=WGOYorYk5IqETMMU68/1IVtJZAZHO3i8w9NcL6A6PSw=; b=wmEX23jMSaMfzqFIlIHK2fkmYTUO7Ol61qsi8uLw9n4/3OtNPbOOQWiYC0xYuCZOXIT13uPqfpupS+6QCoUYkMUmkqNyEp5e6l8jaMayES3YQs5WmX7NPrxrg0f88tUzjsq5HRoeYP4JiQmjkxgllmN/NJfrGjpHZYez9GAPKq2pA1gUKIQx6Cqh2ZgifniygzJogm6FCAYWzFdmofu4JGu2J7h4JhYlPrcYKWyVypy4MjGLHMdmplVo8HBuw3S2KO5MQ6TX3wDV5eIqZQlHK4QMYK2iKUJ/GDq/CfRoCfRBSFNuFu8Mi8gTTRHeiSxXr5dZ4dawQz4uWRRzD42BKg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=UdJH5IOkNN37mK9LVnF/Myt14grTjU33TzCdSWJ+4B+fnJkzfTCkIRT+MO9bld1hLVRxSMZ9dAFC/7rgJdEuGZjm0/M8G8dQssJRAZ2McFL2zSM9Alr3LQtVhTaZP+6+7NrLWiWjVms7QzVQUkgGozs3qZR+1vQNypXldWYGGLItm+KbKqqY8yWXDdSy05cHXpRXQrvYy6Esq37e6FmK+on01UMlIPznH51I8Fp/ecsaBbqsprRdOKhNDPgQCUyTcir3t0QCcCmkK0rsvCZaGZiCfXTVEpHEzdQHKInrZ9eYxA5SihdyXSOQjdZzPTilKucAWOBAL2PFbOlni97GXg==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=epam.com header.i="@epam.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:x-ms-exchange-senderadcheck"
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com;
  • Cc: Bertrand Marquis <bertrand.marquis@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Oleksii Moisieiev <Oleksii_Moisieiev@xxxxxxxx>
  • Delivery-date: Thu, 23 Apr 2026 16:11:49 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHc0zvfSaMcr5qlbkezhiXMQevBTg==
  • Thread-topic: [PATCH v4 4/4] xen/drivers/char: fix exynos4210 IRQ registration failure propagation

In exynos4210_uart_init_postirq(), when setup_irq() returns an error
the failure was only logged via dprintk() and execution continued,
unconditionally clearing UINTM and setting UMCON_INT_EN. This enabled
receive and transmit interrupt lines with no handler registered. On
platforms where the GIC receives these asserted lines, the result is
either repeated spurious-interrupt warnings or an unhandled interrupt
fault.

Add an early return in the setup_irq() error branch so that the
interrupt-enable writes to UINTM and UMCON are skipped when IRQ
registration fails.

Signed-off-by: Oleksii Moisieiev <oleksii_moisieiev@xxxxxxxx>
Reviewed-by: Michal Orzel <michal.orzel@xxxxxxx>
---

Changes in v4:
- update comment on setup_irq
- change %d to %u since irq is unsigned in exynos
- add r-b

Changes in v3:
- skip clearing pending interrupts if setup_irq was failed because
according to the 13.4.1.13 of the RM: it must be cleared after
cleaning interrupt pending in INTC.

 xen/drivers/char/exynos4210-uart.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/xen/drivers/char/exynos4210-uart.c 
b/xen/drivers/char/exynos4210-uart.c
index 58901df554..7addc11c2c 100644
--- a/xen/drivers/char/exynos4210-uart.c
+++ b/xen/drivers/char/exynos4210-uart.c
@@ -199,8 +199,12 @@ static void __init exynos4210_uart_init_postirq(struct 
serial_port *port)
     uart->irqaction.dev_id  = port;
 
     if ( (rc = setup_irq(uart->irq, 0, &uart->irqaction)) != 0 )
-        dprintk(XENLOG_ERR, "Failed to allocated exynos4210_uart IRQ %d\n",
+    {
+        dprintk(XENLOG_ERR, "Failed to allocated exynos4210_uart IRQ %u\n",
                 uart->irq);
+        /* Do not unmask interrupts if irq handler wasn't set */
+        return;
+    }
 
     /* Unmask interrupts */
     exynos4210_write(uart, UINTM, ~UINTM_ALLI);
-- 
2.43.0



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.