All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thiemo Seufer <ths@networkno.de>
To: Daniel Laird <daniel.j.laird@nxp.com>
Cc: linux-mips@linux-mips.org
Subject: Re: [PATCH] Fix known HW bug with MIPS core on NXP/Philips PNX8550
Date: Thu, 19 Jul 2007 17:28:17 +0100	[thread overview]
Message-ID: <20070719162817.GA17651@networkno.de> (raw)
In-Reply-To: <469F822D.9040209@nxp.com>

Daniel Laird wrote:
> Update Patch
>
> Fix known bug with MIPS core when using TLB on NXP/Philips PNX8550
>
> Signed-off-by: Daniel Laird <daniel.j.laird@nxp.com>
> ---
> tlb-r4k.c |    4 +++
> tlbex.c   |   71 
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 75 insertions(+)
> ---
> Index: linux-2.6.22.1/arch/mips/mm/tlbex.c
> ===================================================================
> --- linux-2.6.22.1/arch/mips/mm/tlbex.c    (revision 8)
> +++ linux-2.6.22.1/arch/mips/mm/tlbex.c    (working copy)
> @@ -435,6 +435,9 @@
>     label_nopage_tlbm,
>     label_smp_pgtable_change,
>     label_r3000_write_probe_fail,
> +#ifdef CONFIG_PNX8550
> +    label_pnx8550_bac_reset
> +#endif

Please don't use #ifdef where it isn't needed ...

[snip]
> +static void __init build_pnx8550_bug_fix( u32 **p, struct label **l, 
> struct reloc **r)
> +{
> +#define MFC0(_reg, _cp, _sel)    \
> +    ((cop0_op)  << OP_SH    \
> +    | (mfc_op) << RS_SH    \
> +    | (_reg)   << RT_SH    \
> +    | (_cp)    << RD_SH    \
> +    | (_sel))
> +
> +#define MTC0(_reg, _cp, _sel)    \
> +    ((cop0_op)  << OP_SH    \
> +    | (mtc_op) << RS_SH    \
> +    | (_reg)   << RT_SH    \
> +    | (_cp)    << RD_SH    \
> +    | (_sel))

... don't reinvent the wheel ...

[snip]
> @@ -1261,8 +1328,12 @@
>     build_get_ptep(&p, K0, K1);
>     build_update_entries(&p, K0, K1);
> +#ifndef CONFIG_PNX8550
>     build_tlb_write_entry(&p, &l, &r, tlb_random);
>     l_leave(&l, p);
> +#else
> +    build_pnx8550_bug_fix(&p, &l, &r);
> +#endif

... and make that a runtime check.

>     i_eret(&p); /* return from trap */
> #ifdef CONFIG_64BIT
> Index: linux-2.6.22.1/arch/mips/mm/tlb-r4k.c
> ===================================================================
> --- linux-2.6.22.1/arch/mips/mm/tlb-r4k.c    (revision 8)
> +++ linux-2.6.22.1/arch/mips/mm/tlb-r4k.c    (working copy)
> @@ -456,7 +456,11 @@
>      */
>     probe_tlb(config);
>     write_c0_pagemask(PM_DEFAULT_MASK);
> +#ifdef CONFIG_SOC_PNX8550
> +    write_c0_wired(11);
> +#else
>     write_c0_wired(0);
> +#endif

11 wired entries sounds excessive to me. Is it really necessary to
kill that much performance?


Thiemo

  parent reply	other threads:[~2007-07-19 17:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-19 15:24 [PATCH] Fix known HW bug with MIPS core on NXP/Philips PNX8550 Daniel Laird
2007-07-19 15:28 ` Jan-Benedict Glaw
2007-07-19 15:31 ` Maciej W. Rozycki
2007-07-19 16:28 ` Thiemo Seufer [this message]
2007-07-19 17:32 ` Sergei Shtylyov
2007-07-19 20:16   ` danieljlaird
2007-07-19 20:16     ` danieljlaird
  -- strict thread matches above, loose matches on Subject: below --
2007-07-19 14:19 Daniel Laird

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=20070719162817.GA17651@networkno.de \
    --to=ths@networkno.de \
    --cc=daniel.j.laird@nxp.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.