From: Jun Sun <jsun@mvista.com>
To: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: Justin Carlson <carlson@sibyte.com>, linux-mips@oss.sgi.com
Subject: Re: broken RM7000 in CVS
Date: Mon, 15 Jan 2001 10:45:22 -0800 [thread overview]
Message-ID: <3A634542.65815387@mvista.com> (raw)
In-Reply-To: Pine.GSO.4.10.10101150730420.4392-100000@escobaria.sonytel.be
Geert Uytterhoeven wrote:
>
> On Fri, 12 Jan 2001, Justin Carlson wrote:
> > I still would rather stick to the switch style of doing things in the future,
> > though, because it's a bit more flexible; if you've got companies that fix
> > errata without stepping PrID revisions or some such, then the table's going to
> > have some strange special cases that don't quite fit.
> >
> > But this is much more workable than what I *thought* you were proposing. And
> > not worth nearly as much trouble as I've been giving you over it.
>
> Then don't use a probe table, but a switch based CPU detection routine that
> fills in a table of function pointers. So you need the switch only once.
>
Geert,
Is there some concerns about using table?
mips_cpu structure is probably a mixture of data and function pointers. To
use a switch statement, one either supplies a function which will fill out the
rest of member data in the structure, or fills in all the member data in the
case block. Compared with the table solution, the former case is too
restricting (it mandates every CPU has its own "setup" routine") and the later
case is less clean-looking.
Performance-wise table should be basically identical to switch statements. It
is a linear search of some integers (PrID).
Jun
next prev parent reply other threads:[~2001-01-15 18:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-12 21:54 broken RM7000 in CVS Justin Carlson
2001-01-12 22:23 ` Jun Sun
2001-01-15 6:31 ` Geert Uytterhoeven
2001-01-15 18:45 ` Jun Sun [this message]
2001-01-16 6:46 ` Geert Uytterhoeven
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=3A634542.65815387@mvista.com \
--to=jsun@mvista.com \
--cc=Geert.Uytterhoeven@sonycom.com \
--cc=carlson@sibyte.com \
--cc=linux-mips@oss.sgi.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox