linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org,
	"David S. Miller" <davem@davemloft.net>,
	Jens Axboe <axboe@kernel.dk>,
	tglx@linutronix.de
Subject: Re: [PATCH v2 1/2] ide/Falcon: Remove in_interrupt() usage.
Date: Fri, 20 Nov 2020 14:35:35 -0800	[thread overview]
Message-ID: <20201120143535.fa533caeb5486f8c3abd605a@linux-foundation.org> (raw)
In-Reply-To: <20201120092421.1023428-2-bigeasy@linutronix.de>

On Fri, 20 Nov 2020 10:24:20 +0100 Sebastian Andrzej Siewior <bigeasy@linutronix.de> wrote:

> falconide_get_lock() is called by ide_lock_host() and its caller
> (ide_issue_rq()) has already a might_sleep() check.
> 
> stdma_lock() has wait_event() which also has a might_sleep() check.
> 
> Remove the in_interrupt() check.
> 
> ...
>
> --- a/drivers/ide/falconide.c
> +++ b/drivers/ide/falconide.c
> @@ -51,8 +51,6 @@ static void falconide_release_lock(void)
>  static void falconide_get_lock(irq_handler_t handler, void *data)
>  {
>  	if (falconide_intr_lock == 0) {
> -		if (in_interrupt() > 0)
> -			panic("Falcon IDE hasn't ST-DMA lock in interrupt");
>  		stdma_lock(handler, data);
>  		falconide_intr_lock = 1;
>  	}

The current mainline falconide_get_lock() is very different:

static void falconide_release_lock(void)
{
	if (falconide_intr_lock == 0) {
		printk(KERN_ERR "%s: bug\n", __func__);
		return;
	}
	falconide_intr_lock = 0;
	stdma_release();
}


  reply	other threads:[~2020-11-20 22:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-20  9:24 [PATCH v2 0/2] ide: Remove in_interrupt() Sebastian Andrzej Siewior
2020-11-20  9:24 ` [PATCH v2 1/2] ide/Falcon: Remove in_interrupt() usage Sebastian Andrzej Siewior
2020-11-20 22:35   ` Andrew Morton [this message]
2020-11-21 12:44     ` Sebastian Andrzej Siewior
2020-11-24  3:46       ` Andrew Morton
2020-11-20  9:24 ` [PATCH v2 2/2] ide: Remove BUG_ON(in_interrupt() || irqs_disabled()) from ide_unregister() Sebastian Andrzej Siewior

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=20201120143535.fa533caeb5486f8c3abd605a@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=axboe@kernel.dk \
    --cc=bigeasy@linutronix.de \
    --cc=davem@davemloft.net \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).