Re: Some issues with x86's TLS [amd64: USER_LDT (and wine)]

2017-02-12 Thread Maxime Villard
Le 12/02/2017 à 20:21, Joerg Sonnenberger a écrit : On Sun, Feb 12, 2017 at 08:07:06PM +0100, Maxime Villard wrote: I see only two ways of fixing all of that: - change amd64 so that it saves/restores fsgs like i386. This is not desirable since it moves the cost from one-per-context-switch to

Re: Some issues with x86's TLS [amd64: USER_LDT (and wine)]

2017-02-12 Thread Joerg Sonnenberger
On Sun, Feb 12, 2017 at 08:07:06PM +0100, Maxime Villard wrote: > I see only two ways of fixing all of that: > - change amd64 so that it saves/restores fsgs like i386. This is not desirable since it moves the cost from one-per-context-switch to once-per-return-to-userland. That said, for

Some issues with x86's TLS [amd64: USER_LDT (and wine)]

2017-02-12 Thread Maxime Villard
There are several design issues that prevent us from implementing USER_LDT on amd64 easily. I don't quite know how to fix them yet; I'm just posting here some thoughts in case someone is interested or finds an easy way of fixing all of that. Let's consider a 32bit lwp, from netbsd32 for example,

Re: DISKLABEL_EI option for system with MBR

2017-02-12 Thread Rin Okuyama
Michael, Martin, thank you for letting me know about wedge(4). It is exactly what I need! It is more portable than my patch. I withdraw the patch and the PR. Thanks, rin

Re: DISKLABEL_EI option for system with MBR

2017-02-12 Thread Martin Husemann
On Sun, Feb 12, 2017 at 11:23:52AM +0900, Rin Okuyama wrote: > Currently, we have FFS_EI and LFS_EI kernel options, that enable us to > mount UFS partitions written in the different byte order. However, > unfortunately, the system does not recognize disklabels written in the > different byte

Re: How to build Realtek 8169 driver as kernel module?

2017-02-12 Thread Jia-Ju Bai
Thanks for your advice, and I will have a try :) On 2017/2/11 13:35, Taylor R Campbell wrote: Writing a new ethernet driver is a big task! I suggest you start by modularizing re(4), and study re(4) as you do it. Unfortunately, while there is a man page about device drivers in general,

Re: DISKLABEL_EI option for system with MBR

2017-02-12 Thread Michael van Elst
dholland-t...@netbsd.org (David Holland) writes: >On Sun, Feb 12, 2017 at 11:06:35AM +0800, Paul Goyette wrote: > > 5. Does the current FFS_EI allow for creation of opposite-endian > >file systems? I don't see any endian option for newfs(8). >Not that I know of. Also, based on things I saw

Re: DISKLABEL_EI option for system with MBR

2017-02-12 Thread Michael van Elst
p...@whooppee.com (Paul Goyette) writes: >4. Where on the physical device is the wedge configuration saved, >anyway?) There is no special wedge configuration on the disk. Wedges are generated from labels. There is code to handle GPT, MBR and BSD disklabel, the latter is not configured in

Re: DISKLABEL_EI option for system with MBR

2017-02-12 Thread Michael van Elst
rokuy...@rk.phys.keio.ac.jp (Rin Okuyama) writes: >The patch attached to tech-kern/51208 adds DISKLABEL_EI option for ports >using MBR. By this option, the system can mount the disk (image) written >in the different byte order. This should be useful for cross building. >For bi-endian

Re: DISKLABEL_EI option for system with MBR

2017-02-12 Thread David Holland
On Sun, Feb 12, 2017 at 11:06:35AM +0800, Paul Goyette wrote: > 5. Does the current FFS_EI allow for creation of opposite-endian >file systems? I don't see any endian option for newfs(8). Not that I know of. Also, based on things I saw when hacking lfs last year (all of which got fixed), I