linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: Add skeleton "generic IO mapping" infrastructure.
       [not found]   ` <41470074.9010900@pobox.com>
@ 2004-09-14 14:56     ` David Woodhouse
  2004-09-14 15:08       ` Jeff Garzik
  0 siblings, 1 reply; 2+ messages in thread
From: David Woodhouse @ 2004-09-14 14:56 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: linux-arch

< moved to linux-arch >

On Tue, 2004-09-14 at 10:30 -0400, Jeff Garzik wrote:
> > Argh! Please no. You can't infer the IO space from the address. Provide
> > a cookie containing {space, address} instead -- or indeed {bus,
> > address}. Let some architectures optimise that by ignoring the bus and
> > working it out from the address if you must, but don't put that in the
> > generic version.
> 
> Override it in your arch if you don't like the generic version ;-)

No, seriously, let's not introduce a new API which is _already_
insufficient to disambiguate between the various things the caller might
want. A 'void *' is not sufficient to give both bus and address. Use a
tuple of { bus, addr } or { dev, addr } instead.

For platforms where it really doesn't matter you can optimise it out by
not looking at the device argument.

-- 
dwmw2

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Add skeleton "generic IO mapping" infrastructure.
  2004-09-14 14:56     ` Add skeleton "generic IO mapping" infrastructure David Woodhouse
@ 2004-09-14 15:08       ` Jeff Garzik
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2004-09-14 15:08 UTC (permalink / raw)
  To: David Woodhouse; +Cc: linux-arch

David Woodhouse wrote:
> No, seriously, let's not introduce a new API which is _already_
> insufficient to disambiguate between the various things the caller might
> want. A 'void *' is not sufficient to give both bus and address. Use a
> tuple of { bus, addr } or { dev, addr } instead.

The existing setup is perfectly sufficient.

You pass (dev,addr) to an arch-specific function which creates the 
cookie in an arch-specific manner.

	Jeff

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-09-14 15:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <200409132206.i8DM6dSC030620@hera.kernel.org>
     [not found] ` <1095152147.9144.254.camel@imladris.demon.co.uk>
     [not found]   ` <41470074.9010900@pobox.com>
2004-09-14 14:56     ` Add skeleton "generic IO mapping" infrastructure David Woodhouse
2004-09-14 15:08       ` Jeff Garzik

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).