Messages in this thread |  | | Date | Wed, 3 Oct 2001 17:29:49 -0700 | From | David Mosberger <> | Subject | ioremap() vs. ioremap_nocache() |
| |
Jes Sorensen was kind enough to point out a longstanding mis-conception that I had about ioremap(): I thought that ioremap() was being deprecated in favor of ioremap_nocache() because the former does not clearly define what kind of memory attribute will be used to access the mapped memory (cached, write-through cached, write-coalescing, etc). But I seem to have been wrong about that. Now, as far as I know, on x86, ioremap() will give write-through cached mappings (in the absence of mtrr games). If this is true, how can this work? There are many drivers out there that use ioremap() on memory mapped I/O regions that do NOT have the "Prefetchable" bit set in the PCI BAR. For example, the eepro100 driver does this and it has a routine called wait_for_cmd_done(), which spins on an ioremapped read. On an x86, what prevents these reads from being cached?
Thanks,
--david - 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/
|  |