All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: "Maciej W. Rozycki" <macro@linux-mips.org>
Cc: weiwei wang <veivei.vang@gmail.com>,
	mason@broadcom.com, linux-mips@linux-mips.org
Subject: Re: [Fwd: [bug report] 0xffffffffc0000000 can't be used on bcm1250]
Date: Mon, 13 Oct 2008 17:29:06 +0100	[thread overview]
Message-ID: <20081013162906.GB7144@linux-mips.org> (raw)
In-Reply-To: <alpine.LFD.1.10.0810131508390.9667@ftp.linux-mips.org>

On Mon, Oct 13, 2008 at 04:18:04PM +0100, Maciej W. Rozycki wrote:

>  /*
> + * To avoid the BCM1250 M3 erratum check whether EntryHi is consistent
> + * with BadVAddr and return for the exception to retrigger if not.
> + */
> +static void __cpuinit build_bcm1250_m3_war(u32 **p, struct uasm_reloc **r)
> +{
> +	uasm_i_dmfc0(p, K0, C0_BADVADDR);
> +	uasm_i_dmfc0(p, K1, C0_ENTRYHI);
> +	uasm_i_xor(p, K0, K0, K1);
> +	uasm_i_dsll(p, K1, K0, 24);
> +	uasm_i_dsrl32(p, K1, K1, (24 + PAGE_SHIFT + 1) - 32);
> +	uasm_i_dsrl32(p, K0, K0, 30);
> +	uasm_i_or(p, K0, K0, K1);
> +	uasm_il_bnez(p, r, K0, label_leave);

The workaround is beginning to be relativly expensive.  We're investing 8
instructions extra only to verify that the content of c0_entryhi is
correct.  I haven't tried yet but me seems by avoiding the use of c0_context
entirely relying only on badvaddr we may be able to get away cheaper.

Btw, adding linux-mips to the cc list.  This really should be public.

  Ralf

       reply	other threads:[~2008-10-13 16:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <48EC9894.4080201@gmail.com>
     [not found] ` <20081008115001.GA21596@linux-mips.org>
     [not found]   ` <48ED5BA5.4070301@gmail.com>
     [not found]     ` <20081009131554.GB22796@linux-mips.org>
     [not found]       ` <48EEBFE8.1000501@gmail.com>
     [not found]         ` <alpine.LFD.1.10.0810101138180.19747@ftp.linux-mips.org>
     [not found]           ` <48F2BC15.70408@gmail.com>
     [not found]             ` <alpine.LFD.1.10.0810131508390.9667@ftp.linux-mips.org>
2008-10-13 16:29               ` Ralf Baechle [this message]
2008-10-13 18:06                 ` [Fwd: [bug report] 0xffffffffc0000000 can't be used on bcm1250] Maciej W. Rozycki
2008-10-14  1:23                   ` Weiwei Wang
2008-10-14 10:11                     ` Weiwei Wang
2008-10-14 10:46                       ` Maciej W. Rozycki

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=20081013162906.GB7144@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=linux-mips@linux-mips.org \
    --cc=macro@linux-mips.org \
    --cc=mason@broadcom.com \
    --cc=veivei.vang@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.