pci rework not quite ready yet?
jbarnes at virtuousgeek.org
Mon Oct 1 08:31:51 PDT 2007
On Saturday, September 29, 2007 9:13:08 pm Josh Triplett wrote:
> To help keep address spaces straight, you might consider using the
> address_space attribute of Sparse, like the Linux kernel does:
> #ifdef __CHECKER__
> #define __physical __attribute__((address_space(1)))
> #define __gtt_virtual __attribute__((address_space(2)))
> #define __physical
> extern void needs_a_gtt_virtual(void __gtt_virtual *);
> void has_a_physical(void __physical *foo)
> needs_a_gtt_virtual(foo); /* Will warn */
> You can also throw in the attribute "noderef" as well, to prevent
> dereferencing foo.
Yeah, I think this would be helpful. We could track IO and MMIO regions in
the same way. I've been wanting to do this for awhile but haven't got around
to doing it yet...
More information about the xorg