From: Ralf Baechle <ralf@linux-mips.org>
To: Jon Fraser <jfraser@broadcom.com>
Cc: "linux-mips@linux-mips.org" <linux-mips@linux-mips.org>
Subject: Re: HIGHMEM fix for r24k
Date: Fri, 24 Apr 2009 17:43:49 +0200 [thread overview]
Message-ID: <20090424154349.GB3614@linux-mips.org> (raw)
In-Reply-To: <1240525424.15448.33.camel@chaos.ne.broadcom.com>
On Thu, Apr 23, 2009 at 06:23:44PM -0400, Jon Fraser wrote:
> For all you guys working on HIGMEM.
>
> I found a bug that was keeping HIGHMEM from working on mips 24k
> processors starting at 2.6.26.
>
>
> 2008-04-28 Chris Dearman [MIPS] Allow setting of the cache attribute at
> run ...
>
> This commit introduces the variable _page_cachable_default, which
> defaults to zero.
>
> arch/mips/mm/cache.c:
> unsigned long _page_cachable_default;
>
> The variable is used to create the prototype PTE for __kmap_atomic in
> arch/mips/mm/init.c:kmap_init.
>
> The variable is initialized in arch/mips/mm/c-r4k.c:coherency_setup.
>
> Unfortunately, the variable is used before it is initialized properly.
> As a result, all kmap_atomic PTE have the cache coherency algorithm mode set to 0.
> Mode 0 is "cacheable, nocoherent, write-through, no write allocate".
> This is not valid on my r24k and my not be on any r24k.
>
> The result is that writes to kmap_atomic pages get corrupted. This was confirmed
> using a jtag probe, examining uncached memory, the D cache itself, and cached memory.
>
> I've changed the variable declaration to be:
> unsigned long _page_cachable_default = _CACHE_CACHABLE_NONCOHERENT;
There is no safe value of _page_cachable_default; it's all processor and
even platform dependent. What you found is essentially an ordering bug
so let's fix the ordering!
Ralf
next prev parent reply other threads:[~2009-04-24 15:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-23 22:23 HIGHMEM fix for r24k Jon Fraser
2009-04-24 1:17 ` David VomLehn
2009-04-24 15:43 ` Ralf Baechle [this message]
2009-04-24 16:13 ` Jon Fraser
2009-04-25 9:24 ` Ralf Baechle
2009-05-04 14:49 ` Jon Fraser
2009-05-04 17:23 ` David VomLehn (dvomlehn)
2009-05-04 17:23 ` David VomLehn (dvomlehn)
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=20090424154349.GB3614@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=jfraser@broadcom.com \
--cc=linux-mips@linux-mips.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.