All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@baylibre.com>
To: Brad Harper <bjharper@gmail.com>,
	linux-amlogic@lists.infradead.org, linux-mmc@vger.kernel.org
Cc: linux-rt-users@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Brad Harper <bjharper@gmail.com>
Subject: Re: [PATCH v2 1/1] mmc: host: meson-gx-mmc: fix possible deadlock condition for preempt_rt
Date: Mon, 28 Sep 2020 17:35:50 -0700	[thread overview]
Message-ID: <7hwo0dmnbt.fsf@baylibre.com> (raw)
In-Reply-To: <20200927025418.12382-2-bjharper@gmail.com>

Brad Harper <bjharper@gmail.com> writes:

> ---
>  drivers/mmc/host/meson-gx-mmc.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)


This patch still needs changelog summarizing the problem and what is
being fixed by the patch.  Most of what's in the cover letter belongs
here.

The cover letter can be used to describe the history/background that you
don't want in the patch itself.  Alternatviely, you could include that
information in the a single patch email also because everything after
the "---" line does not end up in git history.

> diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c
> index 08a3b1c05..3ba8f988d 100644
> --- a/drivers/mmc/host/meson-gx-mmc.c
> +++ b/drivers/mmc/host/meson-gx-mmc.c
> @@ -146,6 +146,7 @@ struct sd_emmc_desc {
>  };
>  
>  struct meson_host {
> +	spinlock_t		lock;
>  	struct	device		*dev;
>  	struct	meson_mmc_data *data;
>  	struct	mmc_host	*mmc;
> @@ -1051,6 +1052,7 @@ static int meson_mmc_probe(struct platform_device *pdev)
>  	host->mmc = mmc;
>  	host->dev = &pdev->dev;
>  	dev_set_drvdata(&pdev->dev, host);
> +	spin_lock_init(&host->lock);

I'm confused about what this lock is intended to do.  You init it here,
but it's never used anywhere.  

>  	/* The G12A SDIO Controller needs an SRAM bounce buffer */
>  	host->dram_access_quirk = device_property_read_bool(&pdev->dev,
> @@ -1139,7 +1141,7 @@ static int meson_mmc_probe(struct platform_device *pdev)
>  	       host->regs + SD_EMMC_IRQ_EN);
>  
>  	ret = request_threaded_irq(host->irq, meson_mmc_irq,
> -				   meson_mmc_irq_thread, IRQF_ONESHOT,
> +				   meson_mmc_irq_thread, 0,
>  				   dev_name(&pdev->dev), host);
>  	if (ret)
>  		goto err_init_clk;

Kevin

WARNING: multiple messages have this Message-ID (diff)
From: Kevin Hilman <khilman@baylibre.com>
To: Brad Harper <bjharper@gmail.com>,
	linux-amlogic@lists.infradead.org, linux-mmc@vger.kernel.org
Cc: Brad Harper <bjharper@gmail.com>,
	linux-rt-users@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/1] mmc: host: meson-gx-mmc: fix possible deadlock condition for preempt_rt
Date: Mon, 28 Sep 2020 17:35:50 -0700	[thread overview]
Message-ID: <7hwo0dmnbt.fsf@baylibre.com> (raw)
In-Reply-To: <20200927025418.12382-2-bjharper@gmail.com>

Brad Harper <bjharper@gmail.com> writes:

> ---
>  drivers/mmc/host/meson-gx-mmc.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)


This patch still needs changelog summarizing the problem and what is
being fixed by the patch.  Most of what's in the cover letter belongs
here.

The cover letter can be used to describe the history/background that you
don't want in the patch itself.  Alternatviely, you could include that
information in the a single patch email also because everything after
the "---" line does not end up in git history.

> diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c
> index 08a3b1c05..3ba8f988d 100644
> --- a/drivers/mmc/host/meson-gx-mmc.c
> +++ b/drivers/mmc/host/meson-gx-mmc.c
> @@ -146,6 +146,7 @@ struct sd_emmc_desc {
>  };
>  
>  struct meson_host {
> +	spinlock_t		lock;
>  	struct	device		*dev;
>  	struct	meson_mmc_data *data;
>  	struct	mmc_host	*mmc;
> @@ -1051,6 +1052,7 @@ static int meson_mmc_probe(struct platform_device *pdev)
>  	host->mmc = mmc;
>  	host->dev = &pdev->dev;
>  	dev_set_drvdata(&pdev->dev, host);
> +	spin_lock_init(&host->lock);

I'm confused about what this lock is intended to do.  You init it here,
but it's never used anywhere.  

>  	/* The G12A SDIO Controller needs an SRAM bounce buffer */
>  	host->dram_access_quirk = device_property_read_bool(&pdev->dev,
> @@ -1139,7 +1141,7 @@ static int meson_mmc_probe(struct platform_device *pdev)
>  	       host->regs + SD_EMMC_IRQ_EN);
>  
>  	ret = request_threaded_irq(host->irq, meson_mmc_irq,
> -				   meson_mmc_irq_thread, IRQF_ONESHOT,
> +				   meson_mmc_irq_thread, 0,
>  				   dev_name(&pdev->dev), host);
>  	if (ret)
>  		goto err_init_clk;

Kevin

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Kevin Hilman <khilman@baylibre.com>
To: Brad Harper <bjharper@gmail.com>,
	linux-amlogic@lists.infradead.org, linux-mmc@vger.kernel.org
Cc: Brad Harper <bjharper@gmail.com>,
	linux-rt-users@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/1] mmc: host: meson-gx-mmc: fix possible deadlock condition for preempt_rt
Date: Mon, 28 Sep 2020 17:35:50 -0700	[thread overview]
Message-ID: <7hwo0dmnbt.fsf@baylibre.com> (raw)
In-Reply-To: <20200927025418.12382-2-bjharper@gmail.com>

Brad Harper <bjharper@gmail.com> writes:

> ---
>  drivers/mmc/host/meson-gx-mmc.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)


This patch still needs changelog summarizing the problem and what is
being fixed by the patch.  Most of what's in the cover letter belongs
here.

The cover letter can be used to describe the history/background that you
don't want in the patch itself.  Alternatviely, you could include that
information in the a single patch email also because everything after
the "---" line does not end up in git history.

> diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c
> index 08a3b1c05..3ba8f988d 100644
> --- a/drivers/mmc/host/meson-gx-mmc.c
> +++ b/drivers/mmc/host/meson-gx-mmc.c
> @@ -146,6 +146,7 @@ struct sd_emmc_desc {
>  };
>  
>  struct meson_host {
> +	spinlock_t		lock;
>  	struct	device		*dev;
>  	struct	meson_mmc_data *data;
>  	struct	mmc_host	*mmc;
> @@ -1051,6 +1052,7 @@ static int meson_mmc_probe(struct platform_device *pdev)
>  	host->mmc = mmc;
>  	host->dev = &pdev->dev;
>  	dev_set_drvdata(&pdev->dev, host);
> +	spin_lock_init(&host->lock);

I'm confused about what this lock is intended to do.  You init it here,
but it's never used anywhere.  

>  	/* The G12A SDIO Controller needs an SRAM bounce buffer */
>  	host->dram_access_quirk = device_property_read_bool(&pdev->dev,
> @@ -1139,7 +1141,7 @@ static int meson_mmc_probe(struct platform_device *pdev)
>  	       host->regs + SD_EMMC_IRQ_EN);
>  
>  	ret = request_threaded_irq(host->irq, meson_mmc_irq,
> -				   meson_mmc_irq_thread, IRQF_ONESHOT,
> +				   meson_mmc_irq_thread, 0,
>  				   dev_name(&pdev->dev), host);
>  	if (ret)
>  		goto err_init_clk;

Kevin

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

  parent reply	other threads:[~2020-09-29  0:35 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-27  2:54 [PATCH v2 0/1] mmc: host: meson-gx-mmc: fix possible deadlock condition for preempt_rt Brad Harper
2020-09-27  2:54 ` Brad Harper
2020-09-27  2:54 ` Brad Harper
2020-09-27  2:54 ` [PATCH v2 1/1] " Brad Harper
2020-09-27  2:54   ` Brad Harper
2020-09-27  2:54   ` Brad Harper
2020-09-28 16:41   ` Sebastian Andrzej Siewior
2020-09-28 16:41     ` Sebastian Andrzej Siewior
2020-09-28 16:41     ` Sebastian Andrzej Siewior
2020-09-29  0:35   ` Kevin Hilman [this message]
2020-09-29  0:35     ` Kevin Hilman
2020-09-29  0:35     ` Kevin Hilman
2020-09-29  8:32     ` Brad Harper
2020-09-29  8:32       ` Brad Harper
2020-09-29  8:32       ` Brad Harper

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=7hwo0dmnbt.fsf@baylibre.com \
    --to=khilman@baylibre.com \
    --cc=bjharper@gmail.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-rt-users@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.