[lkml]   [2002]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [patch] PCI Cleanup

On Tue, 13 Aug 2002, Matthew Dobson wrote:
> I think that it is definitely a simplification, although I am a bit biased ;)
> It makes it easier for other configuration types to hook into the system as
> well (I'm partial to NUMA-Q as well ;). All they have to do is hijack the
> pci_config_(read|write) function pointers.


Quite frankly, to me it looks like the real issue is that you don't want
to have the byte/word/dword stuff replicated three times.

And your cleanup avoids the replication, but I think it has other badness
in it: in particular it depends on those two global pointers. Which makes
it really hard to have (for example) per-segment functions, or hard for
drivers to hook into it (there's one IDE driver in particular that wants
to do conf2 accesses, and nothing else. So it duplicates its own conf2
functions right now, because it has no way to hook into the generic ones).

If that is the case, wouldn't the _real_ cleanup be to just change the
format of pci_config_read() entirely, and just make it get the size.

Another way of saying this:

Right now the config interface is all based around having unique
functions for all sizes. So callers do "pci_read_config_word()" and that
name-based size calling convention is propagated all the way down.

Your patch multiplexes the sizes at the lowest level.

And I'd suggest multiplexing them at a higher level. Instead of
six different pcibios_read_config_byte etc functions, move the
multiplexing up, make make them just two functions at _that_ level (and
make siz #defines to make it compatible with existing users).



To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:22    [W:0.091 / U:5.648 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site