From: Ralf Baechle <ralf@linux-mips.org>
To: Pavel Kiryukhin <vksavl@gmail.com>
Cc: linux-mips@linux-mips.org
Subject: Re: BUG: using smp_processor_id() in preemptible code
Date: Wed, 28 Nov 2007 11:23:39 +0000 [thread overview]
Message-ID: <20071128112338.GA21444@linux-mips.org> (raw)
In-Reply-To: <73cd086a0711270820r92dc164heaa453e94cf1a8c6@mail.gmail.com>
On Tue, Nov 27, 2007 at 07:20:47PM +0300, Pavel Kiryukhin wrote:
> I get the following bug running 2.6.18 on malta34Kc .
>
> Freeing prom memory: 956kb freed
> Freeing firmware memory: 978944k freed
> Freeing unused kernel memory: 180k freed
> BUG: using smp_processor_id() in preemptible [00000000] code: swapper/1
> caller is r4k_dma_cache_wback_inv+0x144/0x2a0
> Call Trace:
> [<80117af8>] r4k_dma_cache_wback_inv+0x144/0x2a0
> [<802e4b84>] debug_smp_processor_id+0xd4/0xf0
> [<802e4b7c>] debug_smp_processor_id+0xcc/0xf0
> ...
> CONFIG_DEBUG_PREEMPT is enabled.
> --
> Bug cause is blast_dcache_range() in preemptible code [in
> r4k_dma_cache_wback_inv()].
> blast_dcache_range() is constructed via __BUILD_BLAST_CACHE_RANGE that
> uses cpu_dcache_line_size(). It uses current_cpu_data that use
> smp_processor_id() in turn. In case of CONFIG_DEBUG_PREEMPT
> smp_processor_id emits BUG if we are executing with preemption
> enabled.
>
> Cpu options of cpu0 are assumed to be the superset of all processors.
>
> Can I make the same assumptions for cache line size and fix this
> issue the following way:
That's safe and probably saner than littlering preempt_disable /
preempt_enable calls over the code.
Ralf
prev parent reply other threads:[~2007-11-28 14:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-27 16:20 BUG: using smp_processor_id() in preemptible code Pavel Kiryukhin
2007-11-28 11:23 ` Ralf Baechle [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=20071128112338.GA21444@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=linux-mips@linux-mips.org \
--cc=vksavl@gmail.com \
/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.