From: Philby John <pjohn@mvista.com>
To: Jamie Lokier <jamie@shareable.org>
Cc: linux-mtd@lists.infradead.org, linux-mips@linux-mips.org,
David Daney <ddaney@caviumnetworks.com>,
linux-kernel@vger.kernel.org,
Artem Bityutskiy <dedekind1@gmail.com>
Subject: Re: [PATCH] mtd: Fix bug using smp_processor_id() in preemptible ubi_bgt1d kthread
Date: Mon, 14 Jun 2010 22:10:18 +0530 [thread overview]
Message-ID: <1276533618.17818.8.camel@localhost.localdomain> (raw)
In-Reply-To: <20100614150425.GC9550@shareable.org>
On Mon, 2010-06-14 at 16:04 +0100, Jamie Lokier wrote:
> Philby John wrote:
> > mtd: Fix bug using smp_processor_id() in preemptible ubi_bgt1d kthread
> >
> > On a MIPS Cavium Octeon CN5020 when trying to create a UBI volume,
> > on the NOR flash, the kernel thread ubi_bgt1d calls
> > cfi_amdstd_write_buffers() --> do_write_buffer() -->
> > INVALIDATE_CACHE_UDELAY --> __udelay(). Its __udelay() that calls
> > smp_processor_id() in preemptible code, which you are not supposed to.
> > Fix the problem by disabling preemption.
>
> The MTD code just calls udelay().
> Are you sure it isn't permitted to call udelay() from preemptible code?
> I think it is fine.
It isn't really udelay() but smp_processor_id() that you are not to call
from a preemptible thread. Now I also see Ed Swierk has done a similar
thing https://patchwork.kernel.org/patch/4049/ and he comments "..which
calls smp_processor_id(), which is not supposed to be called from a
preemptible thread."
So perhaps I can use preempt_disable() around just this call in function
__udelay()?
Regards,
Philby
WARNING: multiple messages have this Message-ID (diff)
From: Philby John <pjohn@mvista.com>
To: Jamie Lokier <jamie@shareable.org>
Cc: linux-mips@linux-mips.org, Artem Bityutskiy <dedekind1@gmail.com>,
linux-mtd@lists.infradead.org,
David Daney <ddaney@caviumnetworks.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mtd: Fix bug using smp_processor_id() in preemptible ubi_bgt1d kthread
Date: Mon, 14 Jun 2010 22:10:18 +0530 [thread overview]
Message-ID: <1276533618.17818.8.camel@localhost.localdomain> (raw)
In-Reply-To: <20100614150425.GC9550@shareable.org>
On Mon, 2010-06-14 at 16:04 +0100, Jamie Lokier wrote:
> Philby John wrote:
> > mtd: Fix bug using smp_processor_id() in preemptible ubi_bgt1d kthread
> >
> > On a MIPS Cavium Octeon CN5020 when trying to create a UBI volume,
> > on the NOR flash, the kernel thread ubi_bgt1d calls
> > cfi_amdstd_write_buffers() --> do_write_buffer() -->
> > INVALIDATE_CACHE_UDELAY --> __udelay(). Its __udelay() that calls
> > smp_processor_id() in preemptible code, which you are not supposed to.
> > Fix the problem by disabling preemption.
>
> The MTD code just calls udelay().
> Are you sure it isn't permitted to call udelay() from preemptible code?
> I think it is fine.
It isn't really udelay() but smp_processor_id() that you are not to call
from a preemptible thread. Now I also see Ed Swierk has done a similar
thing https://patchwork.kernel.org/patch/4049/ and he comments "..which
calls smp_processor_id(), which is not supposed to be called from a
preemptible thread."
So perhaps I can use preempt_disable() around just this call in function
__udelay()?
Regards,
Philby
next prev parent reply other threads:[~2010-06-14 16:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-14 11:04 [PATCH] mtd: Fix bug using smp_processor_id() in preemptible ubi_bgt1d kthread Philby John
2010-06-14 11:04 ` Philby John
2010-06-14 15:04 ` Jamie Lokier
2010-06-14 15:04 ` Jamie Lokier
2010-06-14 15:37 ` Philby John
2010-06-14 15:37 ` Philby John
2010-06-14 16:40 ` Philby John [this message]
2010-06-14 16:40 ` Philby John
2010-06-15 12:26 ` Philby John
2010-06-15 12:26 ` Philby John
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=1276533618.17818.8.camel@localhost.localdomain \
--to=pjohn@mvista.com \
--cc=ddaney@caviumnetworks.com \
--cc=dedekind1@gmail.com \
--cc=jamie@shareable.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=linux-mtd@lists.infradead.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.