Re: resending patch: Documentation/pci.txt

Jeff Garzik (jgarzik@mandrakesoft.com)
Wed, 17 Nov 1999 21:44:45 +0000


Bret Indrelee wrote:
>
> Alan Cox [mailto:alan@lxorguk.ukuu.org.uk] wrote:
> > > Damn it! The name appears to have changed between 2.2 and 2.3.
> >
> > It did. That maybe good to note
>
> Yeah, and also goes a long way towards explaining why my documentation
> changes never went anywhere.
>
> They are wrong for 2.3, but mostly right for 2.2.
>
> Shall I resubmit them as a patch to 2.2 documentation, taking out the stuff
> about check_/request_/release_*_region? Or am I still misunderstanding
> something in the 2.2 kernel?

check_region and friends should be used in 2.2, but check_mem_region and
friends do not exist.

> It is a 'converted BAR', not the value in the PCI BAR. It is the physical
> address on that system bus, although someone mentioned this should probably
> be treated more as a cookie in order to be architechure neutral.
>
> In any case, on 2.2.x I was told that it was the value to pass into
> ioremap().

Not directly, you need to mask it against PCI_BASE_ADDRESS_MEM_MASK.

In 2.3.x, you can pass resource[i].start directly to ioremap.

> > With 2.3.x you get told the start/end/size of each resource
> > and if it is
> > I/O or memory. Resource objects are portable for all busses.
> > Also they do the
> > things like 64bit using dual BAR's properly for you, and they
> > can do magic
> > mappings as needed.
>
> Great. Sounds like someone should document this somewhere.
>
> Going to make for a reasonable amount of ifdefs() in drivers that are used
> on both 2.2 and the development kernel. Yuck.

Yep. But 2.4.x will be out soon, and you can remove those ifdefs. And
except for the base_address/resource changes, a lot of the changes can
be masked (removing the ifdefs) if you use a k_compat.h file in your
distribution...

-- 
Jeff Garzik              | Just once, I wish we would encounter
Building 1024            | an alien menace that wasn't immune to
MandrakeSoft, Inc.       | bullets.   -- The Brigadier, "Dr. Who"

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