At 3:46 PM -0700 2001-05-01, Linus Torvalds wrote:
>On Tue, 1 May 2001, Russell King wrote:
> >
>> In which case, can we change the following in IO-mapping.txt please?
>
>Oh, sorry. I misread your question. The _return_ value is a cookie.
>
>The first argument should basically be the start of a "struct pci_dev"
>resource entry, but obviously architecture-specific code can (and does)
>know what the thing means. And the ISA space (ie 0xA0000-0x100000) has
>been considered an acceptable special case.
>
>So the only usage that is "portable" is to do something like
>
> cookie = ioremap(pdev->resource[0].start, pdev->resource[0].len);
>
>and I guess we should actually create some helper functions for that too.
>
>You can use ioremap in other ways, but there's nothing to say that they
>will work reliably across multiple PCI buses etc.
What's the Linu[sx] attitude to using a type to help control (and
illuminate) the use of these objects? I'm thinking here in particular
of the cookie returned by ioremap() and used by readx/writex, but I
suppose there might be similar applicability to its first parameter.
-- /Jonathan Lundell. - 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 May 07 2001 - 21:00:13 EST