Date: Thu, 7 Feb 2013 23:43:28 +0400 From: Chagin Dmitry <chagin.dmitry@gmail.com> To: John Baldwin <jhb@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r246085 - in head/sys: amd64/linux32 compat/linprocfs compat/linux i386/linux Message-ID: <20130207194328.GA31364@dchagin.static.corbina.net> In-Reply-To: <201301291841.r0TIfUxs008927@svn.freebsd.org> References: <201301291841.r0TIfUxs008927@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--X1bOJ3K7DJ5YkBrT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jan 29, 2013 at 06:41:30PM +0000, John Baldwin wrote: > Author: jhb > Date: Tue Jan 29 18:41:30 2013 > New Revision: 246085 > URL: http://svnweb.freebsd.org/changeset/base/246085 >=20 > Log: > Reduce duplication between i386/linux/linux.h and amd64/linux32/linux.h > by moving bits that are MI out into headers in compat/linux. > =20 > Reviewed by: Chagin Dmitry dmitry | gmail > MFC after: 2 weeks >=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/amd64/linux32/linux.h Tue Jan 29 18:22:38 2013 (r246084) > +++ head/sys/amd64/linux32/linux.h Tue Jan 29 18:41:30 2013 (r246085) > @@ -107,11 +107,6 @@ typedef struct { > /* > * Miscellaneous > */ > -#define LINUX_NAME_MAX 255 > -#define LINUX_MAX_UTSNAME 65 > - > -#define LINUX_CTL_MAXNAME 10 > - > #define LINUX_AT_COUNT 16 /* Count of used aux entry types. > * Keep this synchronized with > * elf_linux_fixup() code. > @@ -127,11 +122,6 @@ struct l___sysctl_args > l_ulong __spare[4]; > } __packed; > =20 > -/* Scheduling policies */ > -#define LINUX_SCHED_OTHER 0 > -#define LINUX_SCHED_FIFO 1 > -#define LINUX_SCHED_RR 2 > - > /* Resource limits */ > #define LINUX_RLIMIT_CPU 0 > #define LINUX_RLIMIT_FSIZE 1 > @@ -265,15 +255,6 @@ struct l_statfs64 {=20 > l_int f_spare[6]; > } __packed; > =20 > -struct l_new_utsname { > - char sysname[LINUX_MAX_UTSNAME]; > - char nodename[LINUX_MAX_UTSNAME]; > - char release[LINUX_MAX_UTSNAME]; > - char version[LINUX_MAX_UTSNAME]; > - char machine[LINUX_MAX_UTSNAME]; > - char domainname[LINUX_MAX_UTSNAME]; > -} __packed; > - > /* > * Signalling > */ > @@ -535,27 +516,9 @@ struct l_rt_sigframe { > l_handler_t sf_handler; > } __packed; > =20 > -extern int bsd_to_linux_signal[]; > -extern int linux_to_bsd_signal[]; > extern struct sysentvec elf_linux_sysvec; > =20 > /* > - * Pluggable ioctl handlers > - */ > -struct linux_ioctl_args; > -struct thread; > - > -typedef int linux_ioctl_function_t(struct thread *, struct linux_ioctl_a= rgs *); > - > -struct linux_ioctl_handler { > - linux_ioctl_function_t *func; > - int low, high; > -}; > - > -int linux_ioctl_register_handler(struct linux_ioctl_handler *h); > -int linux_ioctl_unregister_handler(struct linux_ioctl_handler *h); > - > -/* > * open/fcntl flags > */ > #define LINUX_O_RDONLY 00000000 > @@ -597,65 +560,6 @@ int linux_ioctl_unregister_handler(struc > #define LINUX_F_WRLCK 1 > #define LINUX_F_UNLCK 2 > =20 > -/* > - * posix_fadvise advice > - */ > -#define LINUX_POSIX_FADV_NORMAL 0 > -#define LINUX_POSIX_FADV_RANDOM 1 > -#define LINUX_POSIX_FADV_SEQUENTIAL 2 > -#define LINUX_POSIX_FADV_WILLNEED 3 > -#define LINUX_POSIX_FADV_DONTNEED 4 > -#define LINUX_POSIX_FADV_NOREUSE 5 > - > -/* > - * mount flags > - */ > -#define LINUX_MS_RDONLY 0x0001 > -#define LINUX_MS_NOSUID 0x0002 > -#define LINUX_MS_NODEV 0x0004 > -#define LINUX_MS_NOEXEC 0x0008 > -#define LINUX_MS_REMOUNT 0x0020 > - > -/* > - * SystemV IPC defines > - */ > -#define LINUX_SEMOP 1 > -#define LINUX_SEMGET 2 > -#define LINUX_SEMCTL 3 > -#define LINUX_MSGSND 11 > -#define LINUX_MSGRCV 12 > -#define LINUX_MSGGET 13 > -#define LINUX_MSGCTL 14 > -#define LINUX_SHMAT 21 > -#define LINUX_SHMDT 22 > -#define LINUX_SHMGET 23 > -#define LINUX_SHMCTL 24 > - > -#define LINUX_IPC_RMID 0 > -#define LINUX_IPC_SET 1 > -#define LINUX_IPC_STAT 2 > -#define LINUX_IPC_INFO 3 > - > -#define LINUX_SHM_LOCK 11 > -#define LINUX_SHM_UNLOCK 12 > -#define LINUX_SHM_STAT 13 > -#define LINUX_SHM_INFO 14 > - > -#define LINUX_SHM_RDONLY 0x1000 > -#define LINUX_SHM_RND 0x2000 > -#define LINUX_SHM_REMAP 0x4000 > - > -/* semctl commands */ > -#define LINUX_GETPID 11 > -#define LINUX_GETVAL 12 > -#define LINUX_GETALL 13 > -#define LINUX_GETNCNT 14 > -#define LINUX_GETZCNT 15 > -#define LINUX_SETVAL 16 > -#define LINUX_SETALL 17 > -#define LINUX_SEM_STAT 18 > -#define LINUX_SEM_INFO 19 > - > union l_semun { > l_int val; > l_uintptr_t buf; > @@ -667,25 +571,6 @@ union l_semun { > /* > * Socket defines > */ > -#define LINUX_SOCKET 1 > -#define LINUX_BIND 2 > -#define LINUX_CONNECT 3 > -#define LINUX_LISTEN 4 > -#define LINUX_ACCEPT 5 > -#define LINUX_GETSOCKNAME 6 > -#define LINUX_GETPEERNAME 7 > -#define LINUX_SOCKETPAIR 8 > -#define LINUX_SEND 9 > -#define LINUX_RECV 10 > -#define LINUX_SENDTO 11 > -#define LINUX_RECVFROM 12 > -#define LINUX_SHUTDOWN 13 > -#define LINUX_SETSOCKOPT 14 > -#define LINUX_GETSOCKOPT 15 > -#define LINUX_SENDMSG 16 > -#define LINUX_RECVMSG 17 > -#define LINUX_ACCEPT4 18 > - > #define LINUX_SOL_SOCKET 1 > #define LINUX_SOL_IP 0 > #define LINUX_SOL_IPX 256 > @@ -714,24 +599,6 @@ union l_semun { > #define LINUX_SO_TIMESTAMP 29 > #define LINUX_SO_ACCEPTCONN 30 > =20 > -#define LINUX_IP_TOS 1 > -#define LINUX_IP_TTL 2 > -#define LINUX_IP_HDRINCL 3 > -#define LINUX_IP_OPTIONS 4 > - > -#define LINUX_IP_MULTICAST_IF 32 > -#define LINUX_IP_MULTICAST_TTL 33 > -#define LINUX_IP_MULTICAST_LOOP 34 > -#define LINUX_IP_ADD_MEMBERSHIP 35 > -#define LINUX_IP_DROP_MEMBERSHIP 36 > - > -#define LINUX_TCP_NODELAY 1 > -#define LINUX_TCP_MAXSEG 2 > -#define LINUX_TCP_KEEPIDLE 4 > -#define LINUX_TCP_KEEPINTVL 5 > -#define LINUX_TCP_KEEPCNT 6 > -#define LINUX_TCP_MD5SIG 14 > - > struct l_sockaddr { > l_ushort sa_family; > char sa_data[14]; > @@ -897,30 +764,6 @@ struct l_user_desc { > #define LINUX_GET_USEABLE(desc) \ > (((desc)->b >> LINUX_ENTRY_B_USEABLE) & 1) > =20 > -#define LINUX_CLOCK_REALTIME 0 > -#define LINUX_CLOCK_MONOTONIC 1 > -#define LINUX_CLOCK_PROCESS_CPUTIME_ID 2 > -#define LINUX_CLOCK_THREAD_CPUTIME_ID 3 > -#define LINUX_CLOCK_REALTIME_HR 4 > -#define LINUX_CLOCK_MONOTONIC_HR 5 > - > -#define LINUX_CLONE_VM 0x00000100 > -#define LINUX_CLONE_FS 0x00000200 > -#define LINUX_CLONE_FILES 0x00000400 > -#define LINUX_CLONE_SIGHAND 0x00000800 > -#define LINUX_CLONE_PID 0x00001000 /* No longer exist in Linux */ > -#define LINUX_CLONE_VFORK 0x00004000 > -#define LINUX_CLONE_PARENT 0x00008000 > -#define LINUX_CLONE_THREAD 0x00010000 > -#define LINUX_CLONE_SETTLS 0x00080000 > -#define LINUX_CLONE_PARENT_SETTID 0x00100000 > -#define LINUX_CLONE_CHILD_CLEARTID 0x00200000 > -#define LINUX_CLONE_CHILD_SETTID 0x01000000 > - > -#define LINUX_THREADING_FLAGS \ > - (LINUX_CLONE_VM | LINUX_CLONE_FS | LINUX_CLONE_FILES | \ > - LINUX_CLONE_SIGHAND | LINUX_CLONE_THREAD) > - > struct iovec; > =20 > struct l_iovec32 { > @@ -942,7 +785,4 @@ struct linux_robust_list_head { > l_uintptr_t pending_list; > }; > =20 > -int linux_set_upcall_kse(struct thread *td, register_t stack); > -int linux_set_cloned_tls(struct thread *td, void *desc); > - > #endif /* !_AMD64_LINUX_H_ */ >=20 > Modified: head/sys/amd64/linux32/linux32_sysvec.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/amd64/linux32/linux32_sysvec.c Tue Jan 29 18:22:38 2013 (r24= 6084) > +++ head/sys/amd64/linux32/linux32_sysvec.c Tue Jan 29 18:41:30 2013 (r24= 6085) > @@ -78,6 +78,7 @@ __FBSDID("$FreeBSD$"); > #include <amd64/linux32/linux32_proto.h> > #include <compat/linux/linux_emul.h> > #include <compat/linux/linux_futex.h> > +#include <compat/linux/linux_ioctl.h> > #include <compat/linux/linux_mib.h> > #include <compat/linux/linux_misc.h> ugh.., moving linux_ioctl_register_handler definition under compat/linux/linux_ioctl.h breaks x11/nvidia-driver build. so, don't merge while port not patched. chd, Have fun! --X1bOJ3K7DJ5YkBrT Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlEUA+AACgkQ0t2Tb3OO/O0oaACgxURH/0j7u4ZWESQqYjRV3HFX ezkAnjcW+r3SxNrESLbt05UDiTBjtQDb =xPja -----END PGP SIGNATURE----- --X1bOJ3K7DJ5YkBrT--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130207194328.GA31364>