[lkml]   [2001]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: The IO problem on multiple PCI busses
Benjamin Herrenschmidt wrote:
> >No, don't do this, it is evil. Use mappings, specify the device
> >related info somehow when creating the mapping (in the userspace
> >variant you do this by openning a specific device to mmap, in the
> >kernel variant you can encode the bus/dev/etc. info in the device's
> >resource and decode this at ioremap() time, see?).
> Well, except that drivers doing IOs don't ioremap...
> Maybe we could define an ioremap-like function for IOs, but the more

I/O is not supposed to be fast, that's what MMIO is for. :) Just do

void outb (u8 val, u16 addr)
void *addr = ioremap (ISA_IO_BASE + addr);
if (addr) {
writeb (val, addr);
iounmap (addr);

You can map and unmap for each call :) Ugly and slow, but hey, it's

Jeff Garzik | "You see, in this world there's two kinds of
Building 1024 | people, my friend: Those with loaded guns
MandrakeSoft | and those who dig. You dig." --Blondie
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.087 / U:2.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site