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

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


  • To: Oleksii Moisieiev <Oleksii_Moisieiev@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: "Orzel, Michal" <michal.orzel@xxxxxxx>
  • Date: Wed, 22 Apr 2026 13:33:40 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=epam.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • 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=eZMZXDDbbPO0GfoVZ0EsLEYY/U/YhZXetgZxk6vOxiM=; b=clPq1i/pMQn3DbT4QGg03jmznuNY6RnIcaARNl5UjJ26lfC9mDrC29J0SQTfZMZS3LrbEunh3MtUuMS1UtBq4LR+GLY59G1sK/VtsQACSQrp7pYIS0vCJ3dvG8BAK4LBPmaD4iRpMnnvsN8l6r1VJ/r/uR0VjJ7o5mV8Lmq5j3a85DZmnyz7Ph43rjT9yvwg1IkF5XAJbxzmfY7SCxTMl7+mRR/fpuO9Qk0anRuq2P903k91PQb6Fvj6lE4abGCFzwwLGb+HVs+MmR01eFy0y8YBBIqROiTrCSE1hkfc9ubWVi3rQ60eM5fBSxrai/BWecRwTez6aVZ5RnV+RYooyg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=h2RL/S1vmcawRkyWqF7ltm6ZnTTIPl9a72Bx6UwNC/quOMNYJihJuC4A5zTWSZ/ppfB7aZAsUtUSCHjvzZ/TDBGTt8gmtWUk2XmrxAZX749I29yhtknZ2fxqjjWvN87k/OPy5AkFhCZ6b9VlEUNnVknFQ02U9SWbvXh8+T0H3lCXAARteZnjHE/0fMV7N23L+fbgx+0Alqmllh746cCmjCnF8La0MeEICSm6nSIHRL7655HeZaNLDDkIlZrgi+txTM3Su5mFExkeP2DR0ou+sfbdPSB2qWdvAv/vsK4r6uw/xouSyCesH0NMDMZY0RxnKP1tJBhUIBTYj0+wcNE0Bw==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=amd.com header.i="@amd.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
  • Cc: Bertrand Marquis <bertrand.marquis@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, "Volodymyr Babchuk" <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Wed, 22 Apr 2026 11:34:11 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>


On 22/04/2026 11:33, Oleksii Moisieiev wrote:
> 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>
> ---
> 
> 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 | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/xen/drivers/char/exynos4210-uart.c 
> b/xen/drivers/char/exynos4210-uart.c
> index 58901df554..2e5860ea2b 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",
>                  uart->irq);
> +        /* Don't enable interrupts if irq setup was failed */
NIT: Not sure why this comment differs from one patch to another. Preferably
they should all be the same.

Reviewed-by: Michal Orzel <michal.orzel@xxxxxxx>

~Michal




 


Rackspace

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