Re: Specifying properly the PCI driver model on all linux architectur

Jeff Garzik (
Tue, 02 Nov 1999 11:31:44 -0500

Bret Indrelee wrote:
> Jes Sorensen [] wrote:
> > This one is not allowed to be accessed directly by the CPU
> > but must use the readl/writel macros, or __raw_readl/__raw_writel
> > ones.
> Where in the heck did you find that?


> I was under the impression that the readb/w/l and writeb/w/l were only for
> spaces marked as I/O space in PCI. I thought that if it was in PCI memory
> space you could directly reference the address after you used ioremap().

architectures, but is not portable. ALWAYS use {read,write}[bwl]

> If this is true, you can't just directly access the virtual address, then
> somebody should really add this information to the Documentation/pci.txt
> file.

It's already in Documentation/IO-mapping.txt

> [ snip ]
> > Remember that the base_address[] value are not some that we just make
> > out of nowhere, they are assigned by the hardware/bios at boot time
> > and we read them out of registers.
> Actually, my understanding is that the base_address[] is assigned in the PCI
> configuration. The configuration registers are programmed with the PCI
> physical address, and the base_address[] is set to the system physical
> address (which may be different.)

base_address[] is a bus address

> If people really want to get the device drivers all working correctly, you
> should probably start by agreeing on AND DOCUMENTING exactly what 'correct'
> is. Without such information available, people are going to keep on having
> problems writing device drivers.

You can't complain if you aren't reading all the docs ;)

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