Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: Thiemo Seufer <ths@networkno.de>
Cc: "Maciej W. Rozycki" <macro@linux-mips.org>, linux-mips@linux-mips.org
Subject: Re: [PATCH] Use a sensible tlbex default for unknown CPUs
Date: Sun, 28 Oct 2007 23:39:41 +0000	[thread overview]
Message-ID: <20071028233941.GA16471@linux-mips.org> (raw)
In-Reply-To: <20071025205654.GF3994@networkno.de>

On Thu, Oct 25, 2007 at 09:56:54PM +0100, Thiemo Seufer wrote:

> > > currently the kernel panics when it boots on an unknown CPU model
> > > (with an unknown PRID). Based on the assumption that the majority
> > > of newly supported CPU will conform to Release 2 standard, I wrote
> > > the appended patch which handles unknown CPUs as R2. It isn't
> > > completely bulletproof, as (yet unsupported) non-R1/R2 CPUs may
> > > use the AT config bits for different purposes. I still think this
> > > is good enough a test.
> > 
> >  Good idea in general, but do we have to rely on the undefined?  How 
> > about this:
> > 
> > > +		/* Panic if this isn't a Release 2 CPU. */
> > > +		if (!((read_c0_config() & MIPS_CONF_AT) >> 13)) {
> > 
> > 	if (!(current_cpu_data.isa_level &
> > 	      (MIPS_CPU_ISA_M64R2 | MIPS_CPU_ISA_M32R2))) {
> > 
> > instead for example?
> 
> This is circular, as isa_level won't be initialized for a unknown CPU.
> The *_r2 check suggested by Ralf has the same problem AFAICS, so it
> looks like we have to stick with the original solution.

The ISA level is determined earlier by another probe.  If it cannot be
determined the kernel will already have paniced so the cleaner variant is
ok.

  Ralf

      parent reply	other threads:[~2007-10-28 16:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-25 15:59 [PATCH] Use a sensible tlbex default for unknown CPUs Thiemo Seufer
2007-10-25 16:10 ` Ralf Baechle
2007-10-25 16:53   ` Thiemo Seufer
2007-10-25 17:08 ` Maciej W. Rozycki
2007-10-25 20:56   ` Thiemo Seufer
2007-10-26  9:31     ` Maciej W. Rozycki
2007-10-28 23:39     ` 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=20071028233941.GA16471@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=linux-mips@linux-mips.org \
    --cc=macro@linux-mips.org \
    --cc=ths@networkno.de \
    /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