lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 13 Mar 2013 17:31:47 +0900
From:	Jaehoon Chung <jh80.chung@...sung.com>
To:	Markos Chandras <markos.chandras@...tec.com>
Cc:	linux-mmc@...r.kernel.org, linux-kernel@...r.kernel.org,
	Seungwon Jeon <tgih.jun@...sung.com>,
	Jaehoon Chung <jh80.chung@...sung.com>,
	Chris Ball <cjb@...top.org>
Subject: Re: [PATCH 1/3] dw_mmc: Don't loop when handling an interrupt

Acked-by: Jaehoon Chung <jh80.chung@...sung.com>

On 03/12/2013 07:53 PM, Markos Chandras wrote:
> There is no reason to loop when handling an interrupt. The "if" clauses
> will handle all of them sequentially. This also eliminates the extra loop
> we used to take with no pending interrupts and we ended up breaking out
> of the while loop.
> 
> Signed-off-by: Markos Chandras <markos.chandras@...tec.com>
> Cc: Seungwon Jeon <tgih.jun@...sung.com>
> Cc: Jaehoon Chung <jh80.chung@...sung.com>
> Cc: Chris Ball <cjb@...top.org>
> ---
> The patch is based on Chris Ball's mmc-next branch
> 
>  drivers/mmc/host/dw_mmc.c |   11 ++++-------
>  1 files changed, 4 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index 60063cc..78c7251 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -1563,11 +1563,11 @@ static irqreturn_t dw_mci_interrupt(int irq, void *dev_id)
>  {
>  	struct dw_mci *host = dev_id;
>  	u32 pending;
> -	unsigned int pass_count = 0;
>  	int i;
>  
> -	do {
> -		pending = mci_readl(host, MINTSTS); /* read-only mask reg */
> +	pending = mci_readl(host, MINTSTS); /* read-only mask reg */
> +
> +	if (pending) {
>  
>  		/*
>  		 * DTO fix - version 2.10a and below, and only if internal DMA
> @@ -1579,9 +1579,6 @@ static irqreturn_t dw_mci_interrupt(int irq, void *dev_id)
>  				pending |= SDMMC_INT_DATA_OVER;
>  		}
>  
> -		if (!pending)
> -			break;
> -
>  		if (pending & DW_MCI_CMD_ERROR_FLAGS) {
>  			mci_writel(host, RINTSTS, DW_MCI_CMD_ERROR_FLAGS);
>  			host->cmd_status = pending;
> @@ -1642,7 +1639,7 @@ static irqreturn_t dw_mci_interrupt(int irq, void *dev_id)
>  			}
>  		}
>  
> -	} while (pass_count++ < 5);
> +	}
>  
>  #ifdef CONFIG_MMC_DW_IDMAC
>  	/* Handle DMA interrupts */
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ