From: Aaro Koskinen <aaro.koskinen@nokia.com>
To: ext Simon Kagstrom <simon.kagstrom@netinsight.net>
Cc: "Bityutskiy Artem \(Nokia-D/Helsinki\)"
<Artem.Bityutskiy@nokia.com>,
"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>
Subject: Re: [PATCH 1/2] mtdoops: do not schedule work if we are going to die
Date: Fri, 02 Oct 2009 17:30:51 +0300 [thread overview]
Message-ID: <4AC60E9B.8060704@nokia.com> (raw)
In-Reply-To: <20091002161837.18a5ac94@marrow.netinsight.se>
Hello,
Simon Kagstrom wrote:
> I was working on the same fix :-)
>
> On Thu, 1 Oct 2009 18:16:55 +0300
> Aaro Koskinen <aaro.koskinen@nokia.com> wrote:
>
>> diff --git a/drivers/mtd/mtdoops.c b/drivers/mtd/mtdoops.c
>> index 1060337..ac67833 100644
>> --- a/drivers/mtd/mtdoops.c
>> +++ b/drivers/mtd/mtdoops.c
>> @@ -335,7 +335,7 @@ static void mtdoops_console_sync(void)
>> cxt->ready = 0;
>> spin_unlock_irqrestore(&cxt->writecount_lock, flags);
>>
>> - if (mtd->panic_write && in_interrupt())
>> + if (mtd->panic_write && (in_interrupt() || panic_on_oops))
>> /* Interrupt context, we're going to panic so try and log */
>> mtdoops_write(cxt, 1);
>
> I believe we'll also need to make this module in-kernel with this
> change, since panic_on_oops is not exported. I've sent another patch
> that does these two things together.
Yes, I think you are right.
> I also get problems when mtd->read is called from mtdoops_inc_counter,
> so my patch also skips this if we have panic_on_oops set (there is also
> no point since the board will hang / be restarted after that).
I think you need to call it, otherwise the ready flag does not get set and
you may loose some messages? Which driver you are using? The second patch
I sent for OMAP addressed this problem, basically the driver should know we
are in oops and rely on very minimal functionality in read/write.
A.
next prev parent reply other threads:[~2009-10-02 14:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-01 15:16 [PATCH 1/2] mtdoops: do not schedule work if we are going to die Aaro Koskinen
2009-10-01 15:16 ` [PATCH 2/2] OneNAND: OMAP: do not use DMA if oops in progress Aaro Koskinen
2009-10-02 14:18 ` [PATCH 1/2] mtdoops: do not schedule work if we are going to die Simon Kagstrom
2009-10-02 14:30 ` Aaro Koskinen [this message]
2009-10-02 14:40 ` Simon Kagstrom
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=4AC60E9B.8060704@nokia.com \
--to=aaro.koskinen@nokia.com \
--cc=Artem.Bityutskiy@nokia.com \
--cc=linux-mtd@lists.infradead.org \
--cc=simon.kagstrom@netinsight.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