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, 4 May 2011 18:23:38 +0200
From:	Michał Mirosław <mirqus@...il.com>
To:	Per Forlin <per.forlin@...aro.org>
Cc:	linux-mmc@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	linux-kernel@...r.kernel.org, linaro-dev@...ts.linaro.org,
	Chris Ball <cjb@...top.org>,
	Stefan Nilsson XK <stefan.xk.nilsson@...ricsson.com>
Subject: Re: [PATCH v2] sdio: optimized SDIO IRQ handling for single irq

2011/5/4 Per Forlin <per.forlin@...aro.org>:
> From: Stefan Nilsson XK <stefan.xk.nilsson@...ricsson.com>
>
> If there is only 1 function registered it is possible to
> improve performance by directly calling the irq handler
> and avoiding the overhead of reading the CCCR registers.
>
[...]
> --- a/drivers/mmc/core/sdio_irq.c
> +++ b/drivers/mmc/core/sdio_irq.c
> @@ -32,6 +32,16 @@ static int process_sdio_pending_irqs(struct mmc_card *card)
>        int i, ret, count;
>        unsigned char pending;
>
> +       /*
> +        * Optimization, if there is only 1 function registered
> +        * call irq handler directly
> +        */
> +       if (card->sdio_single_irq && card->sdio_single_irq->irq_handler) {
> +               struct sdio_func *func = card->sdio_single_irq;
> +               func->irq_handler(func);
> +               return 1;
> +       }
[...]

The second condition can be avoided:

in process_sdio_pending_irqs():

if (card->sdio_irq_func)
   call handler and return

in sdio_claim_irq():

  card->func->irq_handler = ...
  if (host->sdio_irqs == 1)
    card->sdio_irq_func = func;
  else
    card->sdio_irq_func = NULL;

in sdio_release_irq():

  card->sdio_irq_func = NULL;
  card->func->irq_handler = ...
  sdio_card_irq_put();
  if (host->sdio_irqs == 1)
    sdio_single_irq_set(func->card);

in struct mmc_card:
  struct sdio_func        *sdio_irq_func;

Best Regards,
Michał Mirosław
--
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