From: Arjan v. de V. <ar...@re...> - 2004-08-16 10:49:09
|
On Mon, Aug 16, 2004 at 11:42:00AM +0100, Dave Airlie wrote: > > > > > DRM_IOCTL_ARGS, DRM_ERR, DRM_CURRENTPID, DRM_UDELAY, DRM_READMEMORYBARRIER, > > DRM_COPY_FROM_USER_IOCTL etc etc existed prior to freebsd support? Oh my > > god... > > I'm currently open for constructive critics with ideas on how to fix these > things, the DRM is open for business if we can fix things up now it will > be a lot easier while I'm knee deep with time than after I'm finished and > back travelling .. should we have try to implement Linux fns in BSD, what > do we do if more parameters/info are needed from a BSD side, or do we try > and sideline all these into a separate library of functions and wrap them > on both bsd and linux? it's a bit of all of this. If BSD doesn't have a conflicting udelay(), why not just implement one there instead of a superfluous rename. DRM_ERR() otoh should have been dealt with by making a core function for the ioctl with only the really needed/used arguments (probably even such that the arguments are already copied from userspace) and then a linux and a bsd specific API wrapper. The BSD one can then easily flip the sign (that's basically free), it also takes case of DRM_IOCTL_ARGS mess as well and DRM_COPY_FROM_USER_IOCTL if you do it right. DRM_CURRENTPID probably shouldn't exist at all, drivers shouldn't use pid's in general. |