From: Tom Rini <trini@kernel.crashing.org>
To: Adrian Cox <adrian@humboldt.co.uk>
Cc: linuxppc-embedded@lists.linuxppc.org
Subject: Re: Caching in the MPC107, linux 2.6
Date: Sat, 13 Mar 2004 10:07:09 -0700 [thread overview]
Message-ID: <20040313170708.GA20738@smtp.west.cox.net> (raw)
In-Reply-To: <1079088369.691.43.camel@newt>
On Fri, Mar 12, 2004 at 10:46:09AM +0000, Adrian Cox wrote:
> I discovered this problem back in 2002:
>
> http://lists.linuxppc.org/results.html?words=caching+mpc107&method=and&sort=score&restrict=linuxppc-embedded
>
> The 2.6 kernel requires a fix to use a MPC745x along with a MPC107
> bridge. My proposed patch is below - any comments?
How about:
> diff -Nru a/arch/ppc/mm/hashtable.S b/arch/ppc/mm/hashtable.S
> --- a/arch/ppc/mm/hashtable.S Fri Mar 12 10:43:37 2004
> +++ b/arch/ppc/mm/hashtable.S Fri Mar 12 10:43:37 2004
> @@ -348,6 +348,13 @@
> andc r8,r5,r8 /* PP = user? (rw&dirty? 2: 3): 0 */
> #ifdef CONFIG_SMP
> ori r8,r8,_PAGE_COHERENT /* set M (coherence required) */
> +#elif defined(CONFIG_CACHING_HOSTBRIDGE)
> + /* The MPC107 PCI bridge contains a cache, which must remain
> + coherent with the CPU cache. This is only necessary for the
> + MPC745x family, as they support the shared state. */
> +BEGIN_FTR_SECTION
> + ori r8,r8,_PAGE_COHERENT
> +END_FTR_SECTION_IFSET(CPU_FTR_SPEC7450)
> #endif
Instead do:
BEGIN_FTR_SECTION
ori r8,r8,_PAGE_COHERENT
END_FTR_SECTION_IFSET(CPU_FTR_745X_MPC107)
And have the code that sets SPEC7450 also check for an MPC107.
> diff -Nru a/arch/ppc/mm/ppc_mmu.c b/arch/ppc/mm/ppc_mmu.c
> --- a/arch/ppc/mm/ppc_mmu.c Fri Mar 12 10:43:37 2004
> +++ b/arch/ppc/mm/ppc_mmu.c Fri Mar 12 10:43:37 2004
And make this depend on the new feature as well.
--
Tom Rini
http://gate.crashing.org/~trini/
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~2004-03-13 17:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-12 10:46 Caching in the MPC107, linux 2.6 Adrian Cox
2004-03-12 22:32 ` Tom Rini
2004-03-13 11:32 ` Adrian Cox
2004-03-13 17:07 ` Tom Rini [this message]
2004-03-15 20:03 ` Adrian Cox
2004-03-15 20:38 ` Tom Rini
2004-03-15 22:42 ` Adrian Cox
2004-03-15 22:48 ` Tom Rini
2004-03-16 18:06 ` Adrian Cox
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=20040313170708.GA20738@smtp.west.cox.net \
--to=trini@kernel.crashing.org \
--cc=adrian@humboldt.co.uk \
--cc=linuxppc-embedded@lists.linuxppc.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 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).