Date: Tue, 18 Jun 2013 12:20:14 +0200 From: Niclas Zeising <zeising@freebsd.org> To: arch@freebsd.org Subject: Bus space routines Message-ID: <51C0345E.4000309@freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?51C0345E.4000309>