Subscribeubject: Re: Trying to run Broadwell

Jean-Sébastien Pédron jean-sebastien.pedron at dumbbell.fr
Mon Dec 28 21:36:11 UTC 2015


On 21/12/2015 23:22, Ben Woods wrote:
>> I believe importing commits from Linux 3.9 would require modifications
>> because of the difference between Linux and FreeBSD?
> 
> Jean-Sebastien would know far more on this subject, but for those
> considering contributing to this effort, I have heard the goal was that if
> any elements of the Linux code to be imported had Linuxisms that don't
> exist in FreeBSD, rather than change the Linux files, FreeBSD would add a
> shim as separate file(s) to translate those Linuxisms into suitable FreeBSD
> replacements.
> 
> That way the continual update to newer Linux versions of the code wouldn't
> require a large patch set to be maintained - the files would be as close to
> the Linux versions as possible.
> 
> Sound about right Jean-Sebastien?

Yes, that's correct. Currently, I try to put wrappers in:
  sys/dev/drm2/drm_os_freebsd.[ch]

It's ugly because all APIs are mixed in those two files and I still need
to change #includes everywhere. The end goal is to use the new linuxkpi
module to avoid this and centralize the Linux shim.

I'm not aiming at the possibility to drop Linux files in FreeBSD without
modifications. Only some APIs will be wrapped. Others, like the calls to
our VM will probably never be wrapped : both VMs don't have the same
behaviour and hiding the differences behind such a shim could be dangerous.

-- 
Jean-Sébastien Pédron

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-x11/attachments/20151228/d62a41b9/attachment.sig>


More information about the freebsd-x11 mailing list