From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Matt Sealey <matt@genesi-usa.com>
Cc: Paul Mackerras <paulus@samba.org>,
bbrv@genesi-usa.com, David Woodhouse <dwmw2@infradead.org>,
Linux PPC DEV <linuxppc-dev@ozlabs.org>
Subject: Re: [PATCH] Probe Efika platform before CHRP.
Date: Mon, 08 Jan 2007 09:35:29 +1100 [thread overview]
Message-ID: <1168209329.22458.72.camel@localhost.localdomain> (raw)
In-Reply-To: <45A16FF1.5000401@genesi-usa.com>
On Sun, 2007-01-07 at 22:10 +0000, Matt Sealey wrote:
> mpc5200b-fec, mpc5200-fec, mpc52xx-fec doesn't tell you anything.
It does. It tells you exactly what you need. It tells you that you are
dealing, from the more precise to the more generic:
- It's the implementation of the FEC cell in the mpc5200b
- It's the implementation of the FEC cell in an mpc5200
- it's the implementation of the FEC cell in a mpc52xx family chip
In addition, it really only tells you that it's compatible with those.
If we were to have 5500 or 5120, we could just say they are compatible
with mpc52xx. It doesn't matter, it's an arbitrary name chosen to
represent this cell because it wasn't given us a better name by the
constructor. The coutner example is IBM EMAC which has a proper name ...
EMAC :-). "FEC" is too generic, freescale calls "FEC" anything that
looks remotely like an ethernet controller, so we needed somethign more
precise.
> and
> then with the 5500 or 5120 or something, you then have worked out you
> named your original devices wrong, and now need to make it compatible
> with those?
If they are compatible, they are compatible. In which case, there is
nothing wrong in having:
mpc5500-fec\0mpc52xx-fec in the "compatible" property. A bit clumsy
maybe but not wrong.
> Do you switch features on and off based on a string comparison?
Yes, when the string is well defined. An example is the processor types
passed down via AT_PLATFORM to glibc and/or gcc. A string is much better
than a number, because at least, it's somewhat self-explanatory.
> What if a certain chip revision has a bug you need to work around (there
> are plenty in the original MPC5200!), is that meant to be encoded in the
> "compatible" property too, somehow?
Yes, it should tell you precisely what chip you are talking about,
again, from the more specific to the more generic. Of course, it's good
to have a more complete information there, thus a "model" property will
do no harm (could contain a part number if it's in the SoC bus), that
sort of thing in case there is some ambiguity that wasn't foreseen when
defining the initial binding, but most of the time, it can be avoided.
> Or would you check the SVR too?
Best to avoid. Beside, SVR is completely specific to a given vendor.
> If
> you would check that, why not use this as the basis of the support for
> that driver?
Because the SVR represent the whole chip, every single part/cell in it.
We are specifically interested about a specific cell. In many cases,
they aren't any significant differences between implementations that
would require driver changes for every SVR out there.
Or take the case I gave in another email of Axon. the 4xx coreconnect
bits start to be used on non-4xx CPUs as part of a southbridge.... if we
had used some SVR-like thingy or even a PVR, suddenly, our entire
identification scheme stops working because those exact same cells are
no longer tied to a given CPU at all, they are in a south bridge !
> For a PCI device, you are given basically a 32-bit UID for
> each device, which is attached to a unique domain, host, bus, device
> and function number. You manage well here without giving it names.
>
> An Intel processor might return a string for CPUID - mine says it's a
> "Intel(R) Pentium(R) M 1.70GHz". That string is absolutely useless in
> determining it's compatibility. It's just a name. It may as well say
> "Fight Famine In Rwanda" for all the good it does.
We don't care, we do care however what family of processor it is, which
version of the instruction set it adheres to, and that -is- generally
expressed by a string. In addition, we have implementation specific
"features" that don't necessarily need to be represented in there. And
in case we have to deal with a really specific bug, we -also- want
things like part number or mask revision etc... But we don't use that
all the time, only for specific quirks.
> I think there are better ways and better places to encode certain
> properties of the system as a whole (as the system is a lot more than
> just that single chip) than having a bunch of strings in a property
> which claim that it is compatible with something else, strictly defined
> naming conventions and so on across chip ranges. Although we are talking
> here mostly about two boards with the same chip basically - Lite5200
> and Efika, there may be more boards with similar hardware supported,
> extra hardware supported, new chips which look very much like the 5200
> but have slightly different or bugfixed operation (and here is my point)
> which I do not think you can encode in names and compatibile names.
You logic escapes me.
Ben.
next prev parent reply other threads:[~2007-01-07 22:37 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-19 6:23 Bug fixes for 2.6.20 Paul Mackerras
2006-12-19 9:54 ` [PATCH] Probe Efika platform before CHRP David Woodhouse
2006-12-19 11:39 ` Benjamin Herrenschmidt
2006-12-19 11:55 ` Sylvain Munaut
2006-12-19 14:29 ` David Woodhouse
2006-12-19 15:46 ` Grant Likely
2006-12-19 19:58 ` Benjamin Herrenschmidt
2006-12-19 22:33 ` Sylvain Munaut
2007-01-02 21:29 ` David Woodhouse
2007-01-02 21:37 ` Benjamin Herrenschmidt
2007-01-02 22:04 ` David Woodhouse
2007-01-02 23:04 ` Grant Likely
[not found] ` <45A01416.6080401@genesi-usa.com>
2007-01-06 22:23 ` Grant Likely
2007-01-06 23:13 ` David Woodhouse
2007-01-06 23:37 ` Grant Likely
2007-01-07 2:55 ` Sylvain Munaut
2007-01-07 9:11 ` Raquel Velasco and Bill Buck
2007-03-31 13:15 ` David Woodhouse
2007-03-31 13:18 ` Raquel Velasco and Bill Buck
2007-03-31 13:21 ` David Woodhouse
2007-05-09 11:42 ` Olaf Hering
2007-05-09 11:45 ` Raquel Velasco and Bill Buck
2007-01-07 20:09 ` Matt Sealey
2007-01-07 20:24 ` Segher Boessenkool
2007-01-07 22:10 ` Matt Sealey
2007-01-07 22:35 ` Benjamin Herrenschmidt [this message]
2007-01-07 22:35 ` Sylvain Munaut
2007-01-07 23:04 ` Segher Boessenkool
2007-01-07 23:07 ` Matt Sealey
2007-01-07 23:38 ` Sylvain Munaut
2007-01-08 0:37 ` Benjamin Herrenschmidt
2007-01-07 22:32 ` Matt Sealey
2007-01-07 22:39 ` Matt Sealey
2007-01-07 23:27 ` Segher Boessenkool
2007-01-07 21:16 ` Benjamin Herrenschmidt
2007-01-08 2:17 ` David Woodhouse
2007-01-08 9:18 ` Matt Sealey
2007-01-08 12:52 ` Sylvain Munaut
2007-01-08 13:16 ` Sylvain Munaut
2007-01-08 17:25 ` Matt Sealey
2007-01-08 15:44 ` Sylvain Munaut
2007-01-08 17:25 ` Matt Sealey
2007-01-08 17:24 ` Matt Sealey
2007-01-08 17:59 ` Sylvain Munaut
2006-12-19 19:02 ` [PATCH] powerpc export rtas_set_slot_reset() Linas Vepstas
2006-12-19 22:08 ` Brian King
2006-12-19 19:06 ` [PATCH] powerpc fixup error message Linas Vepstas
2006-12-19 20:00 ` [PATCH] powerpc initialize pci device channel state Linas Vepstas
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=1168209329.22458.72.camel@localhost.localdomain \
--to=benh@kernel.crashing.org \
--cc=bbrv@genesi-usa.com \
--cc=dwmw2@infradead.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=matt@genesi-usa.com \
--cc=paulus@samba.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).