Re: Right Semantics for ioremap, remap_page_range

From: Alexander Ehlert (alexander.ehlert@uni-tuebingen.de)
Date: Wed Jul 18 2001 - 07:52:35 EST


Hi,

in the meantime I got it running, just some board setup issues,
I had to introduce some udelays() at the right spot :)

> designed to be used with readl() readw() readb(), writel(), etc.
> For large arrays, you use copy/to/from_io(). It is possible to

Thats what I do anyway.

> than it probably already is. The assumption seems to be that
> when Apple comes out with a 256 bit machine with 128 bit PCI
> and 32, 40 GHz CPUs, you just recompile everything and it will run );

Yeah, there are only about 5 boards at the present time :)

> If your driver is never going to be used for anything but
> a private experiment, the value of a pointer to the remapped
> area is (usually) the (address_you_asked_for) | PAGE_OFFSET.

What I now do is ioremap_nocache and do writel's, readl's on it.
For the mmap stuff, I just call remap_page_range with the physical
address that I get from pci_resource_start(). Is that alright?
I mean it's working for me now, thats most important :)

Cheers, Alex

-- 

When I was younger, I could remember anything, whether it had happened or not; but my faculties are decaying now and soon I shall be so I cannot remember any but the things that never happened. It is sad to go to pieces like this but we all have to do it. -- Mark Twain

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jul 23 2001 - 21:00:10 EST