All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ulf Hansson <ulf.hansson@linaro.org>
To: Adrian Hunter <adrian.hunter@intel.com>
Cc: Baolin Wang <baolin.wang7@gmail.com>,
	linux-mmc <linux-mmc@vger.kernel.org>
Subject: Re: [PATCH 0/5] mmc: sdhci: Reduce maximum time under spinlock in sdhci_send_command()
Date: Fri, 17 Apr 2020 13:29:11 +0200	[thread overview]
Message-ID: <CAPDyKFqKk0uNUQm8SA3ETDXK60ssmcsDsZ0veHGnArWSw5E5Ow@mail.gmail.com> (raw)
In-Reply-To: <20200412090349.1607-1-adrian.hunter@intel.com>

On Sun, 12 Apr 2020 at 11:04, Adrian Hunter <adrian.hunter@intel.com> wrote:
>
> Hi
>
> Here are some patches to reduce maximum time under spinlock in
> sdhci_send_command(), but also pave the way for an atomic request
> function.
>
> I haven't tried it, but with these patches, something like below
> should work.
>
>
>
> static int sdhci_atomic_request(struct mmc_host *mmc,
>                                 struct mmc_request *mrq)
> {
>         struct sdhci_host *host = mmc_priv(mmc);
>         struct mmc_command *cmd;
>         unsigned long flags;
>         int ret = 0;
>
>         spin_lock_irqsave(&host->lock, flags);
>
>         if (sdhci_present_error(host, mrq->cmd, true))
>                 goto out_finish;
>
>         cmd = sdhci_manual_cmd23(host, mrq) ? mrq->sbc : mrq->cmd;
>
>         if (sdhci_send_command(host, cmd))
>                 sdhci_led_activate(host);
>         else
>                 ret = -EBUSY;
>
>         spin_unlock_irqrestore(&host->lock, flags);
>
>         return ret;
>
> out_finish:
>         sdhci_finish_mrq(host, mrq);
>         spin_unlock_irqrestore(&host->lock, flags);
>         return 0;
> }
>
>
>
> Adrian Hunter (5):
>       mmc: sdhci: Add helpers for the auto-CMD23 flag
>       mmc: sdhci: Stop exporting sdhci_send_command()
>       mmc: sdhci: Remove unneeded forward declaration of sdhci_finish_data()
>       mmc: sdhci: Tidy sdhci_request() a bit
>       mmc: sdhci: Reduce maximum time under spinlock in sdhci_send_command()
>
>  drivers/mmc/host/sdhci.c | 182 +++++++++++++++++++++++++++++++++++------------
>  drivers/mmc/host/sdhci.h |   2 +-
>  2 files changed, 139 insertions(+), 45 deletions(-)
>

Applied for next, thanks!

Kind regards
Uffe

      parent reply	other threads:[~2020-04-17 11:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-12  9:03 [PATCH 0/5] mmc: sdhci: Reduce maximum time under spinlock in sdhci_send_command() Adrian Hunter
2020-04-12  9:03 ` [PATCH 1/5] mmc: sdhci: Add helpers for the auto-CMD23 flag Adrian Hunter
2020-04-12  9:03 ` [PATCH 2/5] mmc: sdhci: Stop exporting sdhci_send_command() Adrian Hunter
2020-04-12  9:03 ` [PATCH 3/5] mmc: sdhci: Remove unneeded forward declaration of sdhci_finish_data() Adrian Hunter
2020-04-12  9:03 ` [PATCH 4/5] mmc: sdhci: Tidy sdhci_request() a bit Adrian Hunter
2020-04-12  9:03 ` [PATCH 5/5] mmc: sdhci: Reduce maximum time under spinlock in sdhci_send_command() Adrian Hunter
2020-04-13  2:46 ` [PATCH 0/5] " Baolin Wang
2020-04-17 11:29 ` Ulf Hansson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAPDyKFqKk0uNUQm8SA3ETDXK60ssmcsDsZ0veHGnArWSw5E5Ow@mail.gmail.com \
    --to=ulf.hansson@linaro.org \
    --cc=adrian.hunter@intel.com \
    --cc=baolin.wang7@gmail.com \
    --cc=linux-mmc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.