Bus space routines
Niclas Zeising
zeising at freebsd.org
Tue Jun 18 10:20:20 UTC 2013
This has been discussed before [1], but there seem to still be a lack of
consensus, so I'll ask again.
Should in*/out* macros or bus_space* functions be used in userland code?
The background is that the port devel/libpciaccess uses these routines
on FreeBSD. In a first incarnation it used the bus_space* routines, see
this patch:
http://trillian.chruetertee.ch/ports/browser/trunk/devel/libpciaccess/files/patch-src-freebsd_pci.c?rev=591
This was later changed to use the in*/out* macros directly, with the
motivation that the bus_space* functions is a KPI that shouldn't be used
in userland. See following for an updated patch:
http://trillian.chruetertee.ch/ports/browser/trunk/devel/libpciaccess/files/patch-src-freebsd_pci.c?rev=815
The problem is that the in*/out* macros differ between FreeBSD and
Debian/kFreeBSD, and Debian/kFreeBSD want to switch back to use
bus_space* again.
My question is simply, which one is correct, or should libpciaccess be
reworked in a completely different way?
I hope everything is clear in the above, otherwise poke me and I'll
explain further.
Regards!
--
Niclas
[1] http://lists.freebsd.org/pipermail/freebsd-arch/2012-March/012470.html
More information about the freebsd-arch
mailing list