From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Stanislav Meduna <stano@meduna.org>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>,
zbr@ioremap.net,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-rt-users@vger.kernel.org" <linux-rt-users@vger.kernel.org>
Subject: Re: w1-gpio: sleeping function called from invalid context
Date: Mon, 16 Feb 2015 14:29:36 +0100 [thread overview]
Message-ID: <20150216132936.GC21649@linutronix.de> (raw)
In-Reply-To: <534FE2A8.2030203@meduna.org>
* Stanislav Meduna | 2014-04-17 16:18:16 [+0200]:
>diff --git a/drivers/w1/w1_io.c b/drivers/w1/w1_io.c
>index e10acc2..7065486 100644
>--- a/drivers/w1/w1_io.c
>+++ b/drivers/w1/w1_io.c
>@@ -170,14 +170,14 @@ static u8 w1_read_bit(struct w1_master *dev)
> unsigned long flags = 0;
>
> /* sample timing is critical here */
>- local_irq_save(flags);
>+ if(w1_disable_irqs) local_irq_save(flags);
> dev->bus_master->write_bit(dev->bus_master->data, 0);
> w1_delay(6);
> dev->bus_master->write_bit(dev->bus_master->data, 1);
> w1_delay(9);
>
> result = dev->bus_master->read_bit(dev->bus_master->data);
>- local_irq_restore(flags);
>+ if(w1_disable_irqs) local_irq_restore(flags);
>
> w1_delay(55);
>
there is local_irq_save_nort() and its friends.
Sebastian
prev parent reply other threads:[~2015-02-16 13:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-16 14:46 w1-gpio: sleeping function called from invalid context Stanislav Meduna
2014-04-16 19:21 ` Paul Gortmaker
2014-04-16 19:58 ` Stanislav Meduna
2014-04-17 14:18 ` Stanislav Meduna
2015-02-16 13:29 ` Sebastian Andrzej Siewior [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=20150216132936.GC21649@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=paul.gortmaker@windriver.com \
--cc=stano@meduna.org \
--cc=zbr@ioremap.net \
/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).