From owner-svn-src-user@FreeBSD.ORG Sun Nov 14 02:35:58 2010 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 08E6810656A9; Sun, 14 Nov 2010 02:35:57 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C03CF8FC29; Sun, 14 Nov 2010 02:35:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAE2Zvws067480; Sun, 14 Nov 2010 02:35:57 GMT (envelope-from weongyo@svn.freebsd.org) Received: (from weongyo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAE2ZvNm067478; Sun, 14 Nov 2010 02:35:57 GMT (envelope-from weongyo@svn.freebsd.org) Message-Id: <201011140235.oAE2ZvNm067478@svn.freebsd.org> From: Weongyo Jeong Date: Sun, 14 Nov 2010 02:35:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215277 - user/weongyo/usb/sys/dev/usb X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 02:35:58 -0000 Author: weongyo Date: Sun Nov 14 02:35:57 2010 New Revision: 215277 URL: http://svn.freebsd.org/changeset/base/215277 Log: Fixes a compile error that missed ';'. Modified: user/weongyo/usb/sys/dev/usb/usb_pf.c Modified: user/weongyo/usb/sys/dev/usb/usb_pf.c ============================================================================== --- user/weongyo/usb/sys/dev/usb/usb_pf.c Sun Nov 14 01:52:19 2010 (r215276) +++ user/weongyo/usb/sys/dev/usb/usb_pf.c Sun Nov 14 02:35:57 2010 (r215277) @@ -1682,7 +1682,7 @@ usbpf_xfertap(struct usb_xfer *xfer, int * not harmful. */ if (usbpf_uifd_cnt == 0) - return + return; /* * XXX TODO From owner-svn-src-user@FreeBSD.ORG Sun Nov 14 02:38:29 2010 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6FDF6106566B; Sun, 14 Nov 2010 02:38:29 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5E41E8FC17; Sun, 14 Nov 2010 02:38:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAE2cTq2067592; Sun, 14 Nov 2010 02:38:29 GMT (envelope-from weongyo@svn.freebsd.org) Received: (from weongyo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAE2cTAS067590; Sun, 14 Nov 2010 02:38:29 GMT (envelope-from weongyo@svn.freebsd.org) Message-Id: <201011140238.oAE2cTAS067590@svn.freebsd.org> From: Weongyo Jeong Date: Sun, 14 Nov 2010 02:38:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215278 - user/weongyo/usb/sys/dev/usb X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 02:38:29 -0000 Author: weongyo Date: Sun Nov 14 02:38:29 2010 New Revision: 215278 URL: http://svn.freebsd.org/changeset/base/215278 Log: Uses taskqueue_cancel(9) interface for sleepout_stop which is recently committed. Modified: user/weongyo/usb/sys/dev/usb/usb_sleepout.c Modified: user/weongyo/usb/sys/dev/usb/usb_sleepout.c ============================================================================== --- user/weongyo/usb/sys/dev/usb/usb_sleepout.c Sun Nov 14 02:35:57 2010 (r215277) +++ user/weongyo/usb/sys/dev/usb/usb_sleepout.c Sun Nov 14 02:38:29 2010 (r215278) @@ -108,7 +108,13 @@ sleepout_pending(struct sleepout_task *s int sleepout_stop(struct sleepout_task *st) { + struct sleepout *s = st->st_sleepout; + /* + * XXX the return value is ignored but one thing clear is that the task + * isn't on the task queue list after this moment. + */ + (void)taskqueue_cancel(s->s_taskqueue, &st->st_task, NULL); return (callout_stop(&st->st_callout)); } From owner-svn-src-user@FreeBSD.ORG Sun Nov 14 06:18:55 2010 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from alona.my.domain (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 775741065670; Sun, 14 Nov 2010 06:18:53 +0000 (UTC) (envelope-from davidxu@freebsd.org) Message-ID: <4CDF7F38.5010000@freebsd.org> Date: Sun, 14 Nov 2010 14:18:32 +0800 From: David Xu User-Agent: Thunderbird 2.0.0.21 (X11/20090522) MIME-Version: 1.0 To: Jilles Tjoelker References: <201011071349.oA7Dn8Po048543@svn.freebsd.org> <20101113151035.GB79975@stack.nl> In-Reply-To: <20101113151035.GB79975@stack.nl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: Re: svn commit: r214915 - user/davidxu/libthr/lib/libthr/thread X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 06:18:55 -0000 Jilles Tjoelker wrote: > On Sun, Nov 07, 2010 at 01:49:08PM +0000, David Xu wrote: > >> Author: davidxu >> Date: Sun Nov 7 13:49:08 2010 >> New Revision: 214915 >> URL: http://svn.freebsd.org/changeset/base/214915 >> > > >> Log: >> Implement robust mutex, the pthread_mutex locking and >> unlocking code are reworked to support robust mutex and >> other mutex must be locked and unlocked by kernel. >> > > The glibc+linux implementation avoids the system call for each robust > mutex lock/unlock by maintaining the list in userland and providing a > pointer to the kernel. Although this is somewhat less reliable in case a > process scribbles over this list, it has better performance. > > There are various ways this list could be maintained, but the glibc way > uses an "in progress" field per thread and a linked list using a field > in the pthread_mutex_t, so if we want that we should make sure we have > the space in the pthread_mutex_t. Alternatively, a simple array could be > used if the number of owned robust mutexes can be limited to a fairly > low value. > > Solaris robust mutexes used to work by entering the kernel for every > lock/unlock, but no longer, see > http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6296770 > Someone complained about that implementation being too slow. > > I don't like the glibc's idea that reading or writing the mutex after unlocked it, why do you think the memory is still valid and being used for the mutex after you unlocked it? There is a use-case that glibc will mysteriously fail: Thread A at userland unlocked the mutex, then another thread B at userland locked it, and thread B reuses the memory area for other purpose, before thread A enters kernel, thread B used it for memory-mapped file buffer, than write some data into the buffer which will be saved into disk file by kernel, but before A runs, the memory happens to contains thread A's thread id, then the thread A enters kernel, and thinks the userland still hasn't unlocked the mutex, and it tries to write some data into mutex, it thinks it unlocked it, but the memory is no longer for mutex now, it just simply corrupted the data thread B saved. This implementation is racy and dangerous. I also know that they have link-entry embedded in mutex, if the mutex is being shared by multiple processes,then I can write a specific value into the link entry and corrupt the owner's link list, even worse, I can write a specific address into the link entry, when the owner unlocks it and unlinks it from its list, he will be happy to write to any address I specified, this may be a security problem or causes very difficult debugging problem if the mutex memory is corrupted. I think if you want robust mutex, //for whatever you do, there is a price, the robust mutex is expensive but reliable. Until you can prove that the glibc's write-mutex-memory-after-unlock is not a problem, I would not follow their idea. Based on the research, I think Solaris must have a reason to not do it in this way, I would not laugh at them that their robust mutex is slow. From owner-svn-src-user@FreeBSD.ORG Sun Nov 14 06:42:31 2010 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from alona.my.domain (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id D789F106564A; Sun, 14 Nov 2010 06:42:26 +0000 (UTC) (envelope-from davidxu@freebsd.org) Message-ID: <4CDF84BE.7000402@freebsd.org> Date: Sun, 14 Nov 2010 14:42:06 +0800 From: David Xu User-Agent: Thunderbird 2.0.0.21 (X11/20090522) MIME-Version: 1.0 To: Jilles Tjoelker References: <201011071349.oA7Dn8Po048543@svn.freebsd.org> <20101113151035.GB79975@stack.nl> <4CDF7F38.5010000@freebsd.org> In-Reply-To: <4CDF7F38.5010000@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: Re: svn commit: r214915 - user/davidxu/libthr/lib/libthr/thread X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 06:42:31 -0000 David Xu wrote: >> > I don't like the glibc's idea that reading or writing the mutex after > unlocked it, > why do you think the memory is still valid and being used for the mutex > after you unlocked it? > > There is a use-case that glibc will mysteriously fail: > Thread A at userland unlocked the mutex, then another thread B at > userland locked it, and thread B reuses the memory area for other > purpose, > before thread A enters kernel, thread B used it for memory-mapped file > buffer, > than write some data into the buffer which will be saved into disk file > by kernel, but before A runs, the memory happens to contains thread A's > thread id, then the thread A enters kernel, and thinks the userland > still hasn't unlocked the mutex, and it tries to write some data into > mutex, > it thinks it unlocked it, but the memory is no longer for mutex now, > it just > simply corrupted the data thread B saved. This implementation is racy and > dangerous. > > I also know that they have link-entry embedded in mutex, > if the mutex is being shared by multiple processes,then I can write a > specific value into the link entry and corrupt the owner's link list, > even worse, I can write a specific address into the link entry, when > the owner unlocks it and unlinks it from its list, he will be happy to > write to any address I specified, this may be a security problem > or causes very difficult debugging problem if the mutex memory > is corrupted. > > I think if you want robust mutex, //for whatever you do, there is a > price, > the robust mutex is expensive but reliable. Until you can prove that > the glibc's write-mutex-memory-after-unlock is not a problem, > I would not follow their idea. Based on the research, I think > Solaris must have a reason to not do it in this way, I would not laugh > at them that their robust mutex is slow. > > > > I also remembered Solaris 's condition varaible is automatically robust if your mutex is robust mutex type, glibc can not provide the feature, when a process crashed, the condition variable's internal lock may be held by the dead thread, and the condition variable is in not usable state. but Solar's condition variable will still be in health state, if a thread found the the pthread_mutex_lock returned EOWNERDEAD, it still can use condition variable without any problem. Without robust condition variable, a robust mutex is less useful. From owner-svn-src-user@FreeBSD.ORG Sun Nov 14 18:16:33 2010 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A0461065670; Sun, 14 Nov 2010 18:16:33 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104]) by mx1.freebsd.org (Postfix) with ESMTP id C7BCF8FC0C; Sun, 14 Nov 2010 18:16:32 +0000 (UTC) Received: from turtle.stack.nl (turtle.stack.nl [IPv6:2001:610:1108:5010::132]) by mx1.stack.nl (Postfix) with ESMTP id C2ACE35A840; Sun, 14 Nov 2010 19:16:31 +0100 (CET) Received: by turtle.stack.nl (Postfix, from userid 1677) id AA1AF1733B; Sun, 14 Nov 2010 19:16:31 +0100 (CET) Date: Sun, 14 Nov 2010 19:16:31 +0100 From: Jilles Tjoelker To: David Xu Message-ID: <20101114181631.GA1831@stack.nl> References: <201011071349.oA7Dn8Po048543@svn.freebsd.org> <20101113151035.GB79975@stack.nl> <4CDF7F38.5010000@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4CDF7F38.5010000@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: Re: svn commit: r214915 - user/davidxu/libthr/lib/libthr/thread X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 18:16:33 -0000 On Sun, Nov 14, 2010 at 02:18:32PM +0800, David Xu wrote: > Jilles Tjoelker wrote: > > On Sun, Nov 07, 2010 at 01:49:08PM +0000, David Xu wrote: > >> Author: davidxu > >> Date: Sun Nov 7 13:49:08 2010 > >> New Revision: 214915 > >> URL: http://svn.freebsd.org/changeset/base/214915 > >> Log: > >> Implement robust mutex, the pthread_mutex locking and > >> unlocking code are reworked to support robust mutex and > >> other mutex must be locked and unlocked by kernel. > > The glibc+linux implementation avoids the system call for each robust > > mutex lock/unlock by maintaining the list in userland and providing a > > pointer to the kernel. Although this is somewhat less reliable in case a > > process scribbles over this list, it has better performance. > > There are various ways this list could be maintained, but the glibc way > > uses an "in progress" field per thread and a linked list using a field > > in the pthread_mutex_t, so if we want that we should make sure we have > > the space in the pthread_mutex_t. Alternatively, a simple array could be > > used if the number of owned robust mutexes can be limited to a fairly > > low value. > > Solaris robust mutexes used to work by entering the kernel for every > > lock/unlock, but no longer, see > > http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6296770 > > Someone complained about that implementation being too slow. > I don't like the glibc's idea that reading or writing the mutex after > unlocked it, > why do you think the memory is still valid and being used for the mutex > after you unlocked it? > There is a use-case that glibc will mysteriously fail: > Thread A at userland unlocked the mutex, then another thread B at > userland locked it, and thread B reuses the memory area for other purpose, > before thread A enters kernel, thread B used it for memory-mapped file > buffer, > than write some data into the buffer which will be saved into disk file > by kernel, but before A runs, the memory happens to contains thread A's > thread id, then the thread A enters kernel, and thinks the userland > still hasn't unlocked the mutex, and it tries to write some data into mutex, > it thinks it unlocked it, but the memory is no longer for mutex now, it just > simply corrupted the data thread B saved. This implementation is racy and > dangerous. That seems rare but very dangerous if it triggers. > I also know that they have link-entry embedded in mutex, > if the mutex is being shared by multiple processes,then I can write a > specific value into the link entry and corrupt the owner's link list, > even worse, I can write a specific address into the link entry, when > the owner unlocks it and unlinks it from its list, he will be happy to > write to any address I specified, this may be a security problem > or causes very difficult debugging problem if the mutex memory > is corrupted. Indeed. Admittedly, shared memory is inherently not very safe, but one would expect the unsafety to be restricted to the shared memory segment. > I think if you want robust mutex, //for whatever you do, there is a price, > the robust mutex is expensive but reliable. Until you can prove that > the glibc's write-mutex-memory-after-unlock is not a problem, > I would not follow their idea. Based on the research, I think > Solaris must have a reason to not do it in this way, I would not laugh > at them that their robust mutex is slow. As I said, they changed it so it does not require a syscall for uncontended lock/unlock. Their implementation seems safer than what glibc+linux does: * The kernel knows all robust mutexes that are mapped and potentially locked in a process (even if there is no thread blocked on them). mutexes are added to this list upon pthread_mutex_init() and pthread_mutex_lock() and removed when the memory region containing them is unmapped. When the process execs or exits, the list is walked and all mutexes owned by a thread in this process do the EOWNERDEAD thing. A copy of the list is maintained in userland to avoid excessive system calls. When a mutex is unmapped, the kernel removes the entry from the userland list as well. * The list of owned robust mutexes is a variable length array instead of a linked list, so there are no pointers to thread-private memory in the mutex. Furthermore, this list is only used when a thread exits, in userland. This approach appears to solve your objections, except if a program destroys a robust mutex and starts using the memory for something else without unmapping it. Perhaps doing some sort of syscall in pthread_mutex_destroy() to remove the mutex entry for all processes that have it mapped can solve this. David Xu wrote: > I also remembered Solaris 's condition varaible is automatically > robust if your mutex is robust mutex type, glibc can not provide > the feature, when a process crashed, the condition variable's internal > lock may be held by the dead thread, and the condition variable is > in not usable state. but Solar's condition variable will still be in > health state, if a thread found the the pthread_mutex_lock returned > EOWNERDEAD, it still can use condition variable without any > problem. Without robust condition variable, a robust mutex is less > useful. Indeed, but it seems more-or-less orthogonal to mostly-userland robust mutex. I think the current kernel condition variable is suitable here, but I have not thought this through completely. -- Jilles Tjoelker From owner-svn-src-user@FreeBSD.ORG Mon Nov 15 00:04:48 2010 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from alona.my.domain (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 09F56106566B; Mon, 15 Nov 2010 00:04:46 +0000 (UTC) (envelope-from davidxu@freebsd.org) Message-ID: <4CE0790B.3040706@freebsd.org> Date: Mon, 15 Nov 2010 08:04:27 +0800 From: David Xu User-Agent: Thunderbird 2.0.0.21 (X11/20090522) MIME-Version: 1.0 To: Jilles Tjoelker References: <201011071349.oA7Dn8Po048543@svn.freebsd.org> <20101113151035.GB79975@stack.nl> <4CDF7F38.5010000@freebsd.org> <20101114181631.GA1831@stack.nl> In-Reply-To: <20101114181631.GA1831@stack.nl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: Re: svn commit: r214915 - user/davidxu/libthr/lib/libthr/thread X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 00:04:48 -0000 Jilles Tjoelker wrote: > On Sun, Nov 14, 2010 at 02:18:32PM +0800, David Xu wrote: > >> Jilles Tjoelker wrote: >> >>> On Sun, Nov 07, 2010 at 01:49:08PM +0000, David Xu wrote: >>> > > >>>> Author: davidxu >>>> Date: Sun Nov 7 13:49:08 2010 >>>> New Revision: 214915 >>>> URL: http://svn.freebsd.org/changeset/base/214915 >>>> > > >>>> Log: >>>> Implement robust mutex, the pthread_mutex locking and >>>> unlocking code are reworked to support robust mutex and >>>> other mutex must be locked and unlocked by kernel. >>>> > > >>> The glibc+linux implementation avoids the system call for each robust >>> mutex lock/unlock by maintaining the list in userland and providing a >>> pointer to the kernel. Although this is somewhat less reliable in case a >>> process scribbles over this list, it has better performance. >>> > > >>> There are various ways this list could be maintained, but the glibc way >>> uses an "in progress" field per thread and a linked list using a field >>> in the pthread_mutex_t, so if we want that we should make sure we have >>> the space in the pthread_mutex_t. Alternatively, a simple array could be >>> used if the number of owned robust mutexes can be limited to a fairly >>> low value. >>> > > >>> Solaris robust mutexes used to work by entering the kernel for every >>> lock/unlock, but no longer, see >>> http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6296770 >>> Someone complained about that implementation being too slow. >>> > > >> I don't like the glibc's idea that reading or writing the mutex after >> unlocked it, >> why do you think the memory is still valid and being used for the mutex >> after you unlocked it? >> > > >> There is a use-case that glibc will mysteriously fail: >> Thread A at userland unlocked the mutex, then another thread B at >> userland locked it, and thread B reuses the memory area for other purpose, >> before thread A enters kernel, thread B used it for memory-mapped file >> buffer, >> than write some data into the buffer which will be saved into disk file >> by kernel, but before A runs, the memory happens to contains thread A's >> thread id, then the thread A enters kernel, and thinks the userland >> still hasn't unlocked the mutex, and it tries to write some data into mutex, >> it thinks it unlocked it, but the memory is no longer for mutex now, it just >> simply corrupted the data thread B saved. This implementation is racy and >> dangerous. >> > > That seems rare but very dangerous if it triggers. > > >> I also know that they have link-entry embedded in mutex, >> if the mutex is being shared by multiple processes,then I can write a >> specific value into the link entry and corrupt the owner's link list, >> even worse, I can write a specific address into the link entry, when >> the owner unlocks it and unlinks it from its list, he will be happy to >> write to any address I specified, this may be a security problem >> or causes very difficult debugging problem if the mutex memory >> is corrupted. >> > > Indeed. Admittedly, shared memory is inherently not very safe, but one > would expect the unsafety to be restricted to the shared memory segment. > > >> I think if you want robust mutex, //for whatever you do, there is a price, >> the robust mutex is expensive but reliable. Until you can prove that >> the glibc's write-mutex-memory-after-unlock is not a problem, >> I would not follow their idea. Based on the research, I think >> Solaris must have a reason to not do it in this way, I would not laugh >> at them that their robust mutex is slow. >> > > As I said, they changed it so it does not require a syscall for > uncontended lock/unlock. Their implementation seems safer than what > glibc+linux does: > > * The kernel knows all robust mutexes that are mapped and potentially > locked in a process (even if there is no thread blocked on them). > mutexes are added to this list upon pthread_mutex_init() and > pthread_mutex_lock() and removed when the memory region containing > them is unmapped. When the process execs or exits, the list is walked > and all mutexes owned by a thread in this process do the EOWNERDEAD > thing. A copy of the list is maintained in userland to avoid excessive > system calls. When a mutex is unmapped, the kernel removes the entry > from the userland list as well. > > * The list of owned robust mutexes is a variable length array instead of > a linked list, so there are no pointers to thread-private memory in > the mutex. Furthermore, this list is only used when a thread exits, in > userland. > > This approach appears to solve your objections, except if a program > destroys a robust mutex and starts using the memory for something else > without unmapping it. Perhaps doing some sort of syscall in > pthread_mutex_destroy() to remove the mutex entry for all processes that > have it mapped can solve this. > I know the Solaris implemented in this way, but I also know because they needs to look up a hash table in userland every time a pthread_mutex_lock() is called, it is still not O(1), and has extra lock contention, even worse, does the userland hash table lock protect priority inversion ? is it safe for real-time thread ? I think they had implemented priority-inherited and priority-protect mutex, even their condition variable supports the real-time thread scheduling. Their implementation also causes impossibility to use robust mutex without thread library, I saw there is a complain of such a problem. > David Xu wrote: > >> I also remembered Solaris 's condition varaible is automatically >> robust if your mutex is robust mutex type, glibc can not provide >> the feature, when a process crashed, the condition variable's internal >> lock may be held by the dead thread, and the condition variable is >> in not usable state. but Solar's condition variable will still be in >> health state, if a thread found the the pthread_mutex_lock returned >> EOWNERDEAD, it still can use condition variable without any >> problem. Without robust condition variable, a robust mutex is less >> useful. >> > > Indeed, but it seems more-or-less orthogonal to mostly-userland robust > mutex. I think the current kernel condition variable is suitable here, > but I have not thought this through completely. > Yes, the pthread is really a very complex beast, all complexity are hidden under a simple group of API, but when you want to implement it, you will find that it is so difficult, sometime you want to give up. From owner-svn-src-user@FreeBSD.ORG Mon Nov 15 03:13:36 2010 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A59521065672; Mon, 15 Nov 2010 03:13:36 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8928D8FC0C; Mon, 15 Nov 2010 03:13:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAF3Dah6002601; Mon, 15 Nov 2010 03:13:36 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAF3DaRu002599; Mon, 15 Nov 2010 03:13:36 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201011150313.oAF3DaRu002599@svn.freebsd.org> From: David Xu Date: Mon, 15 Nov 2010 03:13:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215333 - user/davidxu/libthr/lib/libthr/thread X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 03:13:36 -0000 Author: davidxu Date: Mon Nov 15 03:13:36 2010 New Revision: 215333 URL: http://svn.freebsd.org/changeset/base/215333 Log: Sort priority-mutex in descending order of mutex priority ceiiling, the reason is most program will lock and unlock mutex in reversed order, by sorting in descending order, time to look up a mutex in the list is less then before. Modified: user/davidxu/libthr/lib/libthr/thread/thr_mutex.c Modified: user/davidxu/libthr/lib/libthr/thread/thr_mutex.c ============================================================================== --- user/davidxu/libthr/lib/libthr/thread/thr_mutex.c Mon Nov 15 03:07:42 2010 (r215332) +++ user/davidxu/libthr/lib/libthr/thread/thr_mutex.c Mon Nov 15 03:13:36 2010 (r215333) @@ -650,37 +650,34 @@ _pthread_mutex_setprioceiling(pthread_mu { struct pthread *curthread = _get_curthread(); struct mutex_link *ml, *ml1, *ml2; - int error; if ((mp->__lockflags & UMUTEX_PRIO_PROTECT2) == 0) return (EINVAL); - error = __thr_umutex_set_ceiling((struct umutex *)&mp->__lockword, - ceiling, old_ceiling); - if (error != 0) - return (error); - if (((mp->__lockflags & UMUTEX_SIMPLE) && - (mp->__ownerdata.__ownertd == curthread)) || - (mp->__lockword & UMUTEX_OWNER_MASK) == TID(curthread)) { - TAILQ_FOREACH(ml, &curthread->pp_mutexq, qe) { - if (ml->mutexp == mp) - break; - } - if (ml == NULL) /* howto ? */ - return (0); - ml1 = TAILQ_PREV(ml, mutex_link_list, qe); - ml2 = TAILQ_NEXT(ml, qe); - if ((ml1 != NULL && ml1->mutexp->__ceilings[0] > (u_int)ceiling) || - (ml2 != NULL && ml2->mutexp->__ceilings[0] < (u_int)ceiling)) { - TAILQ_REMOVE(&curthread->pp_mutexq, ml, qe); - TAILQ_FOREACH(ml2, &curthread->pp_mutexq, qe) { - if (ml2->mutexp->__ceilings[0] > (u_int)ceiling) { - TAILQ_INSERT_BEFORE(ml2, ml, qe); - return (0); - } + if (!_mutex_owned(curthread, mp)) + return __thr_umutex_set_ceiling((struct umutex *)&mp->__lockword, + ceiling, old_ceiling); + if (old_ceiling != NULL) + *old_ceiling = mp->__ceilings[0]; + mp->__ceilings[0] = ceiling; + TAILQ_FOREACH(ml, &curthread->pp_mutexq, qe) { + if (ml->mutexp == mp) + break; + } + if (ml == NULL) /* howto ? */ + return (0); + ml1 = TAILQ_PREV(ml, mutex_link_list, qe); + ml2 = TAILQ_NEXT(ml, qe); + if ((ml1 != NULL && ml1->mutexp->__ceilings[0] < (u_int)ceiling) || + (ml2 != NULL && ml2->mutexp->__ceilings[0] > (u_int)ceiling)) { + TAILQ_REMOVE(&curthread->pp_mutexq, ml, qe); + TAILQ_FOREACH(ml2, &curthread->pp_mutexq, qe) { + if (ml2->mutexp->__ceilings[0] < (u_int)ceiling) { + TAILQ_INSERT_BEFORE(ml2, ml, qe); + return (0); } - TAILQ_INSERT_TAIL(&curthread->pp_mutexq, ml, qe); } + TAILQ_INSERT_HEAD(&curthread->pp_mutexq, ml, qe); } return (0); } @@ -788,7 +785,7 @@ set_inherited_priority(struct pthread *c { struct mutex_link *ml2; - ml2 = TAILQ_LAST(&curthread->pp_mutexq, mutex_link_list); + ml2 = TAILQ_FIRST(&curthread->pp_mutexq); if (ml2 != NULL) mp->__ceilings[1] = ml2->mutexp->__ceilings[0]; else @@ -825,7 +822,7 @@ enqueue_mutex(struct pthread *curthread, return; ml = _thr_mutex_link_alloc(); ml->mutexp = mp; - TAILQ_INSERT_TAIL(&curthread->pi_mutexq, ml, qe); + TAILQ_INSERT_HEAD(&curthread->pi_mutexq, ml, qe); } } From owner-svn-src-user@FreeBSD.ORG Mon Nov 15 18:49:43 2010 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 020981065675; Mon, 15 Nov 2010 18:49:43 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E54728FC1A; Mon, 15 Nov 2010 18:49:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAFIng45025254; Mon, 15 Nov 2010 18:49:42 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAFInglo025251; Mon, 15 Nov 2010 18:49:42 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201011151849.oAFInglo025251@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 15 Nov 2010 18:49:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215343 - user/nwhitehorn/ps3/powerpc/ps3 X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 18:49:43 -0000 Author: nwhitehorn Date: Mon Nov 15 18:49:42 2010 New Revision: 215343 URL: http://svn.freebsd.org/changeset/base/215343 Log: Storage bus devices on the PS3 do not appear to require (or allow) use of the I/O MMU. Modified: user/nwhitehorn/ps3/powerpc/ps3/ps3bus.c Modified: user/nwhitehorn/ps3/powerpc/ps3/ps3bus.c ============================================================================== --- user/nwhitehorn/ps3/powerpc/ps3/ps3bus.c Mon Nov 15 17:48:13 2010 (r215342) +++ user/nwhitehorn/ps3/powerpc/ps3/ps3bus.c Mon Nov 15 18:49:42 2010 (r215343) @@ -473,6 +473,9 @@ ps3bus_get_dma_tag(device_t dev, device_ struct ps3bus_softc *sc = device_get_softc(dev); int i, err, flags; + if (dinfo->bustype != PS3_BUSTYPE_SYSBUS) + return (bus_get_dma_tag(dev)); + mtx_lock(&dinfo->iommu_mtx); if (dinfo->dma_tag != NULL) { mtx_unlock(&dinfo->iommu_mtx); From owner-svn-src-user@FreeBSD.ORG Mon Nov 15 21:19:50 2010 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6456E1065673; Mon, 15 Nov 2010 21:19:50 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 537DB8FC08; Mon, 15 Nov 2010 21:19:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAFLJoZm028898; Mon, 15 Nov 2010 21:19:50 GMT (envelope-from weongyo@svn.freebsd.org) Received: (from weongyo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAFLJopB028896; Mon, 15 Nov 2010 21:19:50 GMT (envelope-from weongyo@svn.freebsd.org) Message-Id: <201011152119.oAFLJopB028896@svn.freebsd.org> From: Weongyo Jeong Date: Mon, 15 Nov 2010 21:19:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215346 - user/weongyo/usb/sys/dev/usb X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 21:19:50 -0000 Author: weongyo Date: Mon Nov 15 21:19:50 2010 New Revision: 215346 URL: http://svn.freebsd.org/changeset/base/215346 Log: Stopping / draining the callout should happen first to make sure that the task wouldn't be enqueued during stopping the taskqueue. Pointed by: hps Modified: user/weongyo/usb/sys/dev/usb/usb_sleepout.c Modified: user/weongyo/usb/sys/dev/usb/usb_sleepout.c ============================================================================== --- user/weongyo/usb/sys/dev/usb/usb_sleepout.c Mon Nov 15 19:55:19 2010 (r215345) +++ user/weongyo/usb/sys/dev/usb/usb_sleepout.c Mon Nov 15 21:19:50 2010 (r215346) @@ -109,20 +109,31 @@ int sleepout_stop(struct sleepout_task *st) { struct sleepout *s = st->st_sleepout; + int ret; + + ret = callout_stop(&st->st_callout); /* * XXX the return value is ignored but one thing clear is that the task * isn't on the task queue list after this moment. */ (void)taskqueue_cancel(s->s_taskqueue, &st->st_task, NULL); - return (callout_stop(&st->st_callout)); + + return (ret); } int sleepout_drain(struct sleepout_task *st) { struct sleepout *s = st->st_sleepout; + int ret; + /* + * Always the sequence to stop / drain a sleepout is that callout(9) + * should be handled first to make sure that it's not enqueued at + * the task list. + */ + ret = callout_drain(&st->st_callout); taskqueue_drain(s->s_taskqueue, &st->st_task); - return (callout_drain(&st->st_callout)); + return (ret); } From owner-svn-src-user@FreeBSD.ORG Mon Nov 15 23:22:39 2010 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B8DBE1065694; Mon, 15 Nov 2010 23:22:39 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay04.stack.nl [IPv6:2001:610:1108:5010::107]) by mx1.freebsd.org (Postfix) with ESMTP id 53A608FC1B; Mon, 15 Nov 2010 23:22:39 +0000 (UTC) Received: from turtle.stack.nl (turtle.stack.nl [IPv6:2001:610:1108:5010::132]) by mx1.stack.nl (Postfix) with ESMTP id 558C61DD6B2; Tue, 16 Nov 2010 00:22:38 +0100 (CET) Received: by turtle.stack.nl (Postfix, from userid 1677) id 3E20417319; Tue, 16 Nov 2010 00:22:38 +0100 (CET) Date: Tue, 16 Nov 2010 00:22:38 +0100 From: Jilles Tjoelker To: David Xu Message-ID: <20101115232238.GA32225@stack.nl> References: <201011071349.oA7Dn8Po048543@svn.freebsd.org> <20101113151035.GB79975@stack.nl> <4CDF7F38.5010000@freebsd.org> <20101114181631.GA1831@stack.nl> <4CE0790B.3040706@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4CE0790B.3040706@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: Re: svn commit: r214915 - user/davidxu/libthr/lib/libthr/thread X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 23:22:39 -0000 On Mon, Nov 15, 2010 at 08:04:27AM +0800, David Xu wrote: > I know the Solaris implemented in this way, but I also know because they > needs to look up a hash table in userland every time a pthread_mutex_lock() > is called, it is still not O(1), and has extra lock contention, even > worse, does > the userland hash table lock protect priority inversion ? is it safe for > real-time > thread ? I think they had implemented priority-inherited and > priority-protect > mutex, even their condition variable supports the real-time thread > scheduling. Hmm, true. I have another idea, please tell me why it won't work :) If a thread does pthread_mutex_init() for a robust mutex, store this fact in the kernel with the memory area (such that another process that maps the same area can see it as well). Upon pthread_mutex_destroy(), remove the entry. A sentence in POSIX.1-2008 mmap also allows removing the entry if the memory is no longer mapped in any process: ] The state of synchronization objects such as mutexes, semaphores, ] barriers, and conditional variables placed in shared memory mapped ] with MAP_SHARED becomes undefined when the last region in any process ] containing the synchronization object is unmapped. Provided applications obey this requirement, the kernel then has reliable information about what robust mutexes exist, which can be used to do the EOWNERDEAD thing. Some sort of userland-maintained kernel-accessible list of owned mutexes would be useful for efficiency (but not a linked list through the mutexes themselves). As far as I understand, unmapping a memory area containing a mutex is a programming error that is not required to be handled and may cause the lock to be stuck forever. > Their implementation also causes impossibility to use robust mutex without > thread library, I saw there is a complain of such a problem. I suppose you can still do it, provided you do not use any robust mutexes from the thread library in the same process. It requires replicating a lot of code from the thread library and is probably not portable across kernel versions, but it can be done. The glibc implementation has a similar restriction, except that's "in the same thread" instead of "in the same process". Lock/unlock as syscall seems about the only way to ensure people can roll their own robust mutexes and use them together with thread library robust mutexes. -- Jilles Tjoelker From owner-svn-src-user@FreeBSD.ORG Tue Nov 16 00:21:59 2010 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from alona.my.domain (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id BE1671065670; Tue, 16 Nov 2010 00:21:58 +0000 (UTC) (envelope-from davidxu@freebsd.org) Message-ID: <4CE1CE92.5050608@freebsd.org> Date: Tue, 16 Nov 2010 08:21:38 +0800 From: David Xu User-Agent: Thunderbird 2.0.0.21 (X11/20090522) MIME-Version: 1.0 To: Jilles Tjoelker References: <201011071349.oA7Dn8Po048543@svn.freebsd.org> <20101113151035.GB79975@stack.nl> <4CDF7F38.5010000@freebsd.org> <20101114181631.GA1831@stack.nl> <4CE0790B.3040706@freebsd.org> <20101115232238.GA32225@stack.nl> In-Reply-To: <20101115232238.GA32225@stack.nl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: Re: svn commit: r214915 - user/davidxu/libthr/lib/libthr/thread X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 00:21:59 -0000 Jilles Tjoelker wrote: > On Mon, Nov 15, 2010 at 08:04:27AM +0800, David Xu wrote: > >> I know the Solaris implemented in this way, but I also know because they >> needs to look up a hash table in userland every time a pthread_mutex_lock() >> is called, it is still not O(1), and has extra lock contention, even >> worse, does >> the userland hash table lock protect priority inversion ? is it safe for >> real-time >> thread ? I think they had implemented priority-inherited and >> priority-protect >> mutex, even their condition variable supports the real-time thread >> scheduling. >> > > Hmm, true. > > I have another idea, please tell me why it won't work :) > > If a thread does pthread_mutex_init() for a robust mutex, store this > fact in the kernel with the memory area (such that another process that > maps the same area can see it as well). Upon pthread_mutex_destroy(), > remove the entry. A sentence in POSIX.1-2008 mmap also allows removing > the entry if the memory is no longer mapped in any process: > > ] The state of synchronization objects such as mutexes, semaphores, > ] barriers, and conditional variables placed in shared memory mapped > ] with MAP_SHARED becomes undefined when the last region in any process > ] containing the synchronization object is unmapped. > > Provided applications obey this requirement, the kernel then has > reliable information about what robust mutexes exist, which can be used > to do the EOWNERDEAD thing. Some sort of userland-maintained > kernel-accessible list of owned mutexes would be useful for efficiency > (but not a linked list through the mutexes themselves). > > I don't like the idea, the VM code is already very complex, I would not add trouble code to VM system. If VM code should worry userland mutex code, it is a very bad design, it is cross-layer and dirty, and may be inefficient. In fact, this old Solaris behavior is discouraged in their new code. Also I think removing the robust mutex or setting it to EOWNERDEAD is incorrect by munmap or other VM code, because the file can be mapped into process again, also a mutex which has been initialized pthread_mutex_init can exit in file persistently, if I know it is in stable storage, why should I initialize it again ? If I map it into memory again, should VM code look the signature of userland mutex and create a robust entry in kernel ? this sounds crazy. > As far as I understand, unmapping a memory area containing a mutex is a > programming error that is not required to be handled and may cause the > lock to be stuck forever. So my question is if he know the memory is still being used by mutex code, why does he corrupt or unmap the memory ? he shoot his foot, it looks likes he memset(start_of_data_segment, 0, sbrk() - start_of_data_segment), suicide, nobody can help. >> Their implementation also causes impossibility to use robust mutex without >> thread library, I saw there is a complain of such a problem. >> > > I suppose you can still do it, provided you do not use any robust > mutexes from the thread library in the same process. It requires > replicating a lot of code from the thread library and is probably not > portable across kernel versions, but it can be done. > > This is not practical for normal user, only the thread library developers may have capability to do it. So this is incorrect design. > The glibc implementation has a similar restriction, except that's "in > the same thread" instead of "in the same process". > Very dirty implementation. > Lock/unlock as syscall seems about the only way to ensure people can > roll their own robust mutexes and use them together with thread library > robust mutexes. > > Yes, syscall is clean. From owner-svn-src-user@FreeBSD.ORG Tue Nov 16 01:56:20 2010 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F3A93106566B; Tue, 16 Nov 2010 01:56:19 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D69368FC13; Tue, 16 Nov 2010 01:56:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAG1uJfL035600; Tue, 16 Nov 2010 01:56:19 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG1uJLE035598; Tue, 16 Nov 2010 01:56:19 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201011160156.oAG1uJLE035598@svn.freebsd.org> From: David Xu Date: Tue, 16 Nov 2010 01:56:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215364 - user/davidxu/libthr/sys/kern X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 01:56:20 -0000 Author: davidxu Date: Tue Nov 16 01:56:19 2010 New Revision: 215364 URL: http://svn.freebsd.org/changeset/base/215364 Log: Because umtx_thread_cleanup() no longer is called with process lock held, There is a race that a thread is exiting while another thread tries to add an entry into its mutex contention list, add uq_exiting flag to indicating that a thread is exiting, and a PI entry should not be added to the thread. Modified: user/davidxu/libthr/sys/kern/kern_umtx.c Modified: user/davidxu/libthr/sys/kern/kern_umtx.c ============================================================================== --- user/davidxu/libthr/sys/kern/kern_umtx.c Tue Nov 16 00:32:45 2010 (r215363) +++ user/davidxu/libthr/sys/kern/kern_umtx.c Tue Nov 16 01:56:19 2010 (r215364) @@ -165,7 +165,11 @@ struct umtx_q { int uq_repair_mutex; + /* Robust mutex list */ struct robust_list uq_rob_list; + + /* Thread is exiting. */ + char uq_exiting; }; TAILQ_HEAD(umtxq_head, umtx_q); @@ -324,6 +328,8 @@ static void umtx_thread_cleanup(struct t static void umtx_exec_hook(void *arg __unused, struct proc *p __unused, struct image_params *imgp __unused); static void umtx_exit_hook(void *arg __unused, struct proc *p __unused); +static void umtx_fork_hook(void *arg __unused, struct proc *p1 __unused, + struct proc *p2, int flags __unused); static int robust_alloc(struct robust_info **); static void robust_free(struct robust_info *); static int robust_insert(struct thread *, struct robust_info *); @@ -372,6 +378,8 @@ umtxq_sysinit(void *arg __unused) EVENTHANDLER_PRI_ANY); EVENTHANDLER_REGISTER(process_exit, umtx_exit_hook, NULL, EVENTHANDLER_PRI_ANY); + EVENTHANDLER_REGISTER(process_fork, umtx_fork_hook, NULL, + EVENTHANDLER_PRI_ANY); max_robust_interval.tv_sec = 10; max_robust_interval.tv_usec = 0; @@ -1791,11 +1799,14 @@ umtxq_sleep_pi(struct umtx_q *uq, struct /* XXX Only look up thread in current process. */ td1 = tdfind(owner, curproc->p_pid); mtx_lock_spin(&umtx_lock); - if (td1 != NULL && pi->pi_owner == NULL) { - uq1 = td1->td_umtxq; - umtx_pi_setowner(pi, td1); + if (td1 != NULL) { + if((uq1 = td1->td_umtxq) != NULL && + uq1->uq_exiting == 0) { + if (pi->pi_owner == NULL) + umtx_pi_setowner(pi, td1); + } + PROC_UNLOCK(td1->td_proc); } - PROC_UNLOCK(td1->td_proc); } TAILQ_FOREACH(uq1, &pi->pi_blocked, uq_lockq) { @@ -4351,6 +4362,7 @@ umtx_thread_alloc(struct thread *td) uq = td->td_umtxq; uq->uq_inherited_pri = PRI_MAX; + uq->uq_exiting = 0; KASSERT(uq->uq_flags == 0, ("uq_flags != 0")); KASSERT(uq->uq_thread == td, ("uq_thread != td")); @@ -4374,7 +4386,27 @@ umtx_exec_hook(void *arg __unused, struc static void umtx_exit_hook(void *arg __unused, struct proc *p __unused) { - umtx_thread_cleanup(curthread); + struct umtx_q *uq = curthread->td_umtxq; + + if (uq != NULL) { + uq->uq_exiting = 1; + umtx_thread_cleanup(curthread); + } +} + +/* + * fork() hook. First thread of process never call umtx_thread_alloc() + * again, we should clear uq_exiting here. + */ +void +umtx_fork_hook(void *arg __unused, struct proc *p1 __unused, + struct proc *p2, int flags __unused) +{ + struct thread *td = FIRST_THREAD_IN_PROC(p2); + struct umtx_q *uq = td->td_umtxq; + + if (uq != NULL) + uq->uq_exiting = 0; } /* From owner-svn-src-user@FreeBSD.ORG Tue Nov 16 02:01:13 2010 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32DBE106566C; Tue, 16 Nov 2010 02:01:13 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 21A788FC08; Tue, 16 Nov 2010 02:01:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAG21De9035760; Tue, 16 Nov 2010 02:01:13 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG21D5H035758; Tue, 16 Nov 2010 02:01:13 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201011160201.oAG21D5H035758@svn.freebsd.org> From: David Xu Date: Tue, 16 Nov 2010 02:01:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215365 - user/davidxu/libthr/lib/libthr/thread X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 02:01:13 -0000 Author: davidxu Date: Tue Nov 16 02:01:12 2010 New Revision: 215365 URL: http://svn.freebsd.org/changeset/base/215365 Log: Fix typo. Modified: user/davidxu/libthr/lib/libthr/thread/thr_mutex.c Modified: user/davidxu/libthr/lib/libthr/thread/thr_mutex.c ============================================================================== --- user/davidxu/libthr/lib/libthr/thread/thr_mutex.c Tue Nov 16 01:56:19 2010 (r215364) +++ user/davidxu/libthr/lib/libthr/thread/thr_mutex.c Tue Nov 16 02:01:12 2010 (r215365) @@ -343,7 +343,7 @@ _mutex_lock_common(struct pthread_mutex return (0); } if ((mp->__lockword & UMUTEX_OWNER_MASK) == id) - return mutex_self_trylock(mp); + return mutex_self_lock(mp, abstime); return (EBUSY); } From owner-svn-src-user@FreeBSD.ORG Tue Nov 16 07:03:06 2010 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9C435106564A; Tue, 16 Nov 2010 07:03:06 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8B87A8FC12; Tue, 16 Nov 2010 07:03:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAG736Zk042826; Tue, 16 Nov 2010 07:03:06 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG736Qj042824; Tue, 16 Nov 2010 07:03:06 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201011160703.oAG736Qj042824@svn.freebsd.org> From: David Xu Date: Tue, 16 Nov 2010 07:03:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215375 - user/davidxu/libthr/lib/libthr/thread X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 07:03:06 -0000 Author: davidxu Date: Tue Nov 16 07:03:06 2010 New Revision: 215375 URL: http://svn.freebsd.org/changeset/base/215375 Log: The EBUSY error should be return here, also do not check recursive-mutex twice. Modified: user/davidxu/libthr/lib/libthr/thread/thr_mutex.c Modified: user/davidxu/libthr/lib/libthr/thread/thr_mutex.c ============================================================================== --- user/davidxu/libthr/lib/libthr/thread/thr_mutex.c Tue Nov 16 06:20:12 2010 (r215374) +++ user/davidxu/libthr/lib/libthr/thread/thr_mutex.c Tue Nov 16 07:03:06 2010 (r215375) @@ -342,9 +342,6 @@ _mutex_lock_common(struct pthread_mutex enqueue_mutex(curthread, mp); return (0); } - if ((mp->__lockword & UMUTEX_OWNER_MASK) == id) - return mutex_self_lock(mp, abstime); - return (EBUSY); } if (abstime != NULL && (abstime->tv_sec < 0 || abstime->tv_nsec < 0 || From owner-svn-src-user@FreeBSD.ORG Tue Nov 16 07:06:51 2010 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6EDEF1065670; Tue, 16 Nov 2010 07:06:51 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5E8428FC0A; Tue, 16 Nov 2010 07:06:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAG76prm042933; Tue, 16 Nov 2010 07:06:51 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG76pX8042931; Tue, 16 Nov 2010 07:06:51 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201011160706.oAG76pX8042931@svn.freebsd.org> From: David Xu Date: Tue, 16 Nov 2010 07:06:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215376 - user/davidxu/libthr/sys/sys X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 07:06:51 -0000 Author: davidxu Date: Tue Nov 16 07:06:51 2010 New Revision: 215376 URL: http://svn.freebsd.org/changeset/base/215376 Log: Use int32_t or uint32_t, the size is fixed so it can be shared by 32-bit and 64-bit processes. Modified: user/davidxu/libthr/sys/sys/_pthreadtypes.h Modified: user/davidxu/libthr/sys/sys/_pthreadtypes.h ============================================================================== --- user/davidxu/libthr/sys/sys/_pthreadtypes.h Tue Nov 16 07:03:06 2010 (r215375) +++ user/davidxu/libthr/sys/sys/_pthreadtypes.h Tue Nov 16 07:06:51 2010 (r215376) @@ -102,12 +102,12 @@ struct pthread_mutex { struct pthread_cond { __uint32_t __lock; - int __waiters; - int __signals; + __uint32_t __waiters; + __uint32_t __signals; __uint32_t __seq; __uint64_t __broadcast_seq; - int __refcount; - int __destroying; + __int32_t __refcount; + __int32_t __destroying; /* kernel part */ __uint32_t __kern_has_waiters; __uint32_t __flags; From owner-svn-src-user@FreeBSD.ORG Tue Nov 16 22:26:22 2010 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 952B2106566C; Tue, 16 Nov 2010 22:26:22 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay04.stack.nl [IPv6:2001:610:1108:5010::107]) by mx1.freebsd.org (Postfix) with ESMTP id 2FB3E8FC18; Tue, 16 Nov 2010 22:26:22 +0000 (UTC) Received: from turtle.stack.nl (turtle.stack.nl [IPv6:2001:610:1108:5010::132]) by mx1.stack.nl (Postfix) with ESMTP id 8378B1DD692; Tue, 16 Nov 2010 23:26:21 +0100 (CET) Received: by turtle.stack.nl (Postfix, from userid 1677) id 6CAA717120; Tue, 16 Nov 2010 23:26:21 +0100 (CET) Date: Tue, 16 Nov 2010 23:26:21 +0100 From: Jilles Tjoelker To: David Xu Message-ID: <20101116222621.GA44741@stack.nl> References: <201011120934.oAC9YLN1002510@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201011120934.oAC9YLN1002510@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: Re: svn commit: r215170 - in user/davidxu/libthr/sys: kern sys X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 22:26:22 -0000 On Fri, Nov 12, 2010 at 09:34:21AM +0000, David Xu wrote: > Author: davidxu > Date: Fri Nov 12 09:34:21 2010 > New Revision: 215170 > URL: http://svn.freebsd.org/changeset/base/215170 > Log: > Limit total number of robust mutexes a process can hold. I think a per thread limit is better as it is more predictable. If the limit is exceeded, pthread_mutex_lock() will fail. > [...] > + error = msleep(&max_robust_per_proc, > + &max_robust_lock, 0, "maxrob", 0); I think a PCATCH flag was intended here. If you want to do it this way, it needs to wake up if another thread in the process unlocks something. If one thread uses up max_robust_per_proc, it is stuck forever. It is also possible though rare that this wait forms a cycle with lock waits. -- Jilles Tjoelker From owner-svn-src-user@FreeBSD.ORG Wed Nov 17 01:52:44 2010 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D78121065670; Wed, 17 Nov 2010 01:52:44 +0000 (UTC) (envelope-from davidxu@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id C53938FC13; Wed, 17 Nov 2010 01:52:44 +0000 (UTC) Received: from xyf.my.dom (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id oAH1qgcZ039291; Wed, 17 Nov 2010 01:52:43 GMT (envelope-from davidxu@freebsd.org) Message-ID: <4CE3A5EE.9060803@freebsd.org> Date: Wed, 17 Nov 2010 09:52:46 +0000 From: David Xu User-Agent: Thunderbird 2.0.0.24 (X11/20100630) MIME-Version: 1.0 To: Jilles Tjoelker References: <201011120934.oAC9YLN1002510@svn.freebsd.org> <20101116222621.GA44741@stack.nl> In-Reply-To: <20101116222621.GA44741@stack.nl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: Re: svn commit: r215170 - in user/davidxu/libthr/sys: kern sys X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 01:52:44 -0000 Jilles Tjoelker wrote: > On Fri, Nov 12, 2010 at 09:34:21AM +0000, David Xu wrote: >> Author: davidxu >> Date: Fri Nov 12 09:34:21 2010 >> New Revision: 215170 >> URL: http://svn.freebsd.org/changeset/base/215170 > >> Log: >> Limit total number of robust mutexes a process can hold. > > I think a per thread limit is better as it is more predictable. If the > limit is exceeded, pthread_mutex_lock() will fail. per-thread limit is uncertain. I don't know if I should let pthread_mutex_lock fail, because I saw so much code do not check error code, unlike java, C programmer tends to ignore error code, while java can throw exception in abnormal case, force you to handle it. I even want to change default mutex from error-check to normal. > >> [...] >> + error = msleep(&max_robust_per_proc, >> + &max_robust_lock, 0, "maxrob", 0); > > I think a PCATCH flag was intended here. > > If you want to do it this way, it needs to wake up if another thread in > the process unlocks something. > Good catch. > If one thread uses up max_robust_per_proc, it is stuck forever. It is > also possible though rare that this wait forms a cycle with lock waits. > Yes From owner-svn-src-user@FreeBSD.ORG Wed Nov 17 04:42:47 2010 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A7241106566C; Wed, 17 Nov 2010 04:42:47 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 94CC28FC14; Wed, 17 Nov 2010 04:42:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAH4glqY077322; Wed, 17 Nov 2010 04:42:47 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAH4gl7M077319; Wed, 17 Nov 2010 04:42:47 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201011170442.oAH4gl7M077319@svn.freebsd.org> From: David Xu Date: Wed, 17 Nov 2010 04:42:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215416 - in user/davidxu/libthr/sys: kern sys X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 04:42:47 -0000 Author: davidxu Date: Wed Nov 17 04:42:47 2010 New Revision: 215416 URL: http://svn.freebsd.org/changeset/base/215416 Log: - In function robust_free(), wake up waiters, this is suggested by Jilles Tjoelker. - Reparent sysctl max_robust_mutexes_per_proc from debug.umtx to kern.threads, set its default value to 3000. - Only allocate robust_info after a robust mutex is successfully locked. Modified: user/davidxu/libthr/sys/kern/kern_umtx.c user/davidxu/libthr/sys/sys/proc.h Modified: user/davidxu/libthr/sys/kern/kern_umtx.c ============================================================================== --- user/davidxu/libthr/sys/kern/kern_umtx.c Tue Nov 16 23:26:02 2010 (r215415) +++ user/davidxu/libthr/sys/kern/kern_umtx.c Wed Nov 17 04:42:47 2010 (r215416) @@ -73,6 +73,10 @@ enum { #define _UMUTEX_TRY 1 #define _UMUTEX_WAIT 2 +#define ROB_USER_UNLOCK 0 +#define ROB_THREAD_EXIT 1 +#define ROB_KERNEL_UNLOCK 2 + /* Key to represent a unique userland synchronous object */ struct umtx_key { int hash; @@ -271,11 +275,12 @@ SYSCTL_INT(_debug_umtx, OID_AUTO, umtx_p SYSCTL_INT(_debug_umtx, OID_AUTO, umtx_cvsig_migrate, CTLFLAG_RW, &umtx_cvsig_migrate, 0, "cvsig migrate"); -SYSCTL_PROC(_debug_umtx, OID_AUTO, max_robust_per_proc, +SYSCTL_DECL(_kern_threads); +SYSCTL_PROC(_kern_threads, OID_AUTO, max_robust_mutexs_per_proc, CTLTYPE_INT | CTLFLAG_RW, 0, sizeof(int), set_max_robust, "I", "Set maximum number of robust mutex"); -static int max_robust_per_proc = 1500; +static int max_robust_per_proc = 3000; static struct mtx max_robust_lock; static struct timeval max_robust_lasttime; static struct timeval max_robust_interval; @@ -332,7 +337,7 @@ static void umtx_fork_hook(void *arg __u struct proc *p2, int flags __unused); static int robust_alloc(struct robust_info **); static void robust_free(struct robust_info *); -static int robust_insert(struct thread *, struct robust_info *); +static void robust_insert(struct thread *, struct robust_info *); static void robust_remove(struct thread *, struct umutex *); static int do_unlock_umutex(struct thread *, struct umutex *, int); @@ -1270,19 +1275,20 @@ kern_umtx_wake(struct thread *td, void * } static uint32_t -calc_lockword(uint32_t oldval, uint16_t flags, int qlen, int td_exit, int *nwake) +calc_lockword(uint32_t oldval, uint16_t flags, int qlen, int robact, int *nwake) { uint32_t newval; if (flags & UMUTEX_ROBUST) { - if (td_exit) { + if (robact == ROB_THREAD_EXIT) { /* * Thread is exiting, but did not unlock the mutex, * mark it in OWNER_DEAD state. */ newval = (oldval & ~UMUTEX_OWNER_MASK) | UMUTEX_OWNER_DEAD; *nwake = 1; - } else if ((oldval & UMUTEX_OWNER_DEAD) != 0) { + } else if (robact == ROB_USER_UNLOCK && + (oldval & UMUTEX_OWNER_DEAD) != 0) { /* * if user unlocks it, and previous owner was dead, * mark it in INCONSISTENT state. @@ -1433,7 +1439,7 @@ _do_lock_normal(struct thread *td, struc */ static int do_unlock_normal(struct thread *td, struct umutex *m, uint16_t flags, - int td_exit) + int robact) { struct umtx_key key; uint32_t owner, old, id, newval; @@ -1472,7 +1478,7 @@ do_unlock_normal(struct thread *td, stru umtxq_unlock(&key); owner = fuword32(__DEVOLATILE(uint32_t *, &m->m_owner)); - newval = calc_lockword(owner, flags, count, td_exit, &nwake); + newval = calc_lockword(owner, flags, count, robact, &nwake); old = casuword32(&m->m_owner, owner, newval); umtxq_lock(&key); @@ -2072,7 +2078,7 @@ _do_lock_pi(struct thread *td, struct um */ static int do_unlock_pi(struct thread *td, struct umutex *m, uint32_t flags, - int td_exit) + int robact) { struct umtx_key key; struct umtx_q *uq_first, *uq_first2, *uq_me; @@ -2147,7 +2153,7 @@ do_unlock_pi(struct thread *td, struct u umtxq_unlock(&key); owner = fuword32(__DEVOLATILE(uint32_t *, &m->m_owner)); - newval = calc_lockword(owner, flags, count, td_exit, &nwake); + newval = calc_lockword(owner, flags, count, robact, &nwake); /* * When unlocking the umtx, it must be marked as unowned if @@ -2346,7 +2352,7 @@ out: */ static int do_unlock_pp(struct thread *td, struct umutex *m, uint32_t flags, - int td_exit) + int robact) { struct old_pp_mutex *oldmtx = (struct old_pp_mutex *)m; struct umtx_key key; @@ -2399,7 +2405,7 @@ do_unlock_pp(struct thread *td, struct u umtxq_unlock(&key); owner = fuword32(__DEVOLATILE(uint32_t *, &m->m_owner)); - newval = calc_lockword(owner, flags, count, td_exit, &nwake); + newval = calc_lockword(owner, flags, count, robact, &nwake); if (flags & UMUTEX_PRIO_PROTECT) { /* @@ -2593,21 +2599,6 @@ do_lock_umutex(struct thread *td, struct if (flags == -1) return (EFAULT); - if ((flags & UMUTEX_ROBUST) != 0 && mode != _UMUTEX_WAIT) { - error = robust_alloc(&rob); - if (error != 0) { - if (timeout == NULL) { - if (error == EINTR && mode != _UMUTEX_WAIT) - error = ERESTART; - } else if (error == ERESTART) { - error = EINTR; - } - return (error); - } - rob->ownertd = td; - rob->umtxp = m; - } - if (timeout == NULL) { error = _do_lock_umutex(td, m, flags, 0, mode); /* Mutex locking is restarted if it is interrupted. */ @@ -2648,10 +2639,24 @@ do_lock_umutex(struct thread *td, struct } if (error == 0 || error == EOWNERDEAD) { - if (rob != NULL && robust_insert(td, rob)) - robust_free(rob); - } else if (rob != NULL) { - robust_free(rob); + if ((flags & UMUTEX_ROBUST) != 0 && mode != _UMUTEX_WAIT) { + int error2; + + error2 = robust_alloc(&rob); + if (error2 == 0) { + rob->ownertd = td; + rob->umtxp = m; + robust_insert(td, rob); + } else { + do_unlock_umutex(td, m, ROB_KERNEL_UNLOCK); + if (timeout == NULL) { + error2 = ERESTART; + } else if (error2 == ERESTART) { + error2 = EINTR; + } + error = error2; + } + } } return (error); } @@ -2660,25 +2665,25 @@ do_lock_umutex(struct thread *td, struct * Unlock a userland POSIX mutex. */ static int -do_unlock_umutex(struct thread *td, struct umutex *m, int td_exit) +do_unlock_umutex(struct thread *td, struct umutex *m, int robact) { uint16_t flags; int error; flags = fuword16(&m->m_flags); - if ((flags & UMUTEX_ROBUST) != 0 || td_exit) + if ((flags & UMUTEX_ROBUST) != 0 || robact == ROB_THREAD_EXIT) robust_remove(td, m); switch(flags & (UMUTEX_PRIO_INHERIT | UMUTEX_PRIO_PROTECT)) { case 0: - error = do_unlock_normal(td, m, flags, td_exit); + error = do_unlock_normal(td, m, flags, robact); break; case UMUTEX_PRIO_INHERIT: - error = do_unlock_pi(td, m, flags, td_exit); + error = do_unlock_pi(td, m, flags, robact); break; case UMUTEX_PRIO_PROTECT: case UMUTEX_PRIO_PROTECT2: - error = do_unlock_pp(td, m, flags, td_exit); + error = do_unlock_pp(td, m, flags, robact); break; default: error = EINVAL; @@ -2805,7 +2810,7 @@ ignore: umtxq_unbusy(&uq->uq_key); umtxq_unlock(&uq->uq_key); - error = do_unlock_umutex(td, m, 0); + error = do_unlock_umutex(td, m, ROB_USER_UNLOCK); if (error) { UMTX_STATE_INC(cv_unlock_failure); error = 0; /* ignore the error */ @@ -3816,7 +3821,7 @@ __umtx_op_wake_umutex(struct thread *td, static int __umtx_op_unlock_umutex(struct thread *td, struct _umtx_op_args *uap) { - return do_unlock_umutex(td, uap->obj, 0); + return do_unlock_umutex(td, uap->obj, ROB_USER_UNLOCK); } static int @@ -4251,16 +4256,18 @@ robust_alloc(struct robust_info **robpp) atomic_fetchadd_int(&p->p_robustcount, 1); if (p->p_robustcount > max_robust_per_proc) { mtx_lock(&max_robust_lock); - while (p->p_robustcount >= max_robust_per_proc) { + while (p->p_robustcount > max_robust_per_proc) { if (ratecheck(&max_robust_lasttime, &max_robust_interval)) { printf("Process %lu (%s) exceeded maximum" - "number of robust mutexes\n", + " number of robust mutexes\n", (u_long)p->p_pid, p->p_comm); } + p->p_robustwaiters++; error = msleep(&max_robust_per_proc, - &max_robust_lock, 0, "maxrob", 0); - if (error != 0) { + &max_robust_lock, PCATCH, "maxrob", hz); + p->p_robustwaiters--; + if (error != 0 && error != EWOULDBLOCK) { mtx_unlock(&max_robust_lock); atomic_fetchadd_int(&p->p_robustcount, -1); return (error); @@ -4276,8 +4283,14 @@ static void robust_free(struct robust_info *robp) { struct proc *p = curproc; + int waiters = p->p_robustwaiters; atomic_fetchadd_int(&p->p_robustcount, -1); + if (waiters != 0) { + mtx_lock(&max_robust_lock); + wakeup(&max_robust_per_proc); + mtx_unlock(&max_robust_lock); + } uma_zfree(robust_zone, robp); } @@ -4288,27 +4301,18 @@ robust_hash(struct umutex *m) return ((n * GOLDEN_RATIO_PRIME) >> ROBUST_SHIFTS) % ROBUST_CHAINS; } -static int +static void robust_insert(struct thread *td, struct robust_info *rob) { struct umtx_q *uq = td->td_umtxq; - struct robust_info *rob2; int hash = robust_hash(rob->umtxp); struct robust_chain *robc = &robust_chains[hash]; mtx_lock(&robc->lock); - SLIST_FOREACH(rob2, &robc->rob_list, hash_qe) { - if (rob2->ownertd == td && - rob2->umtxp == rob->umtxp) { - mtx_unlock(&robc->lock); - return (EEXIST); - } - } rob->ownertd = td; SLIST_INSERT_HEAD(&robc->rob_list, rob, hash_qe); mtx_unlock(&robc->lock); LIST_INSERT_HEAD(&uq->uq_rob_list, rob, td_qe); - return (0); } static void @@ -4432,7 +4436,7 @@ umtx_thread_cleanup(struct thread *td) return; while ((rob = LIST_FIRST(&uq->uq_rob_list)) != NULL) - do_unlock_umutex(td, rob->umtxp, 1); + do_unlock_umutex(td, rob->umtxp, ROB_THREAD_EXIT); mtx_lock_spin(&umtx_lock); uq->uq_inherited_pri = PRI_MAX; Modified: user/davidxu/libthr/sys/sys/proc.h ============================================================================== --- user/davidxu/libthr/sys/sys/proc.h Tue Nov 16 23:26:02 2010 (r215415) +++ user/davidxu/libthr/sys/sys/proc.h Wed Nov 17 04:42:47 2010 (r215416) @@ -524,7 +524,9 @@ struct proc { int p_boundary_count;/* (c) Num threads at user boundary */ int p_pendingcnt; /* how many signals are pending */ struct itimers *p_itimers; /* (c) POSIX interval timers. */ - int p_robustcount; /* (*) Total number of robust mutex. */ + int p_robustcount; /* (*) Number of robust mutexes. */ + int p_robustwaiters;/* (*) Number of robust mutex + * waiters. */ /* End area that is zeroed on creation. */ #define p_endzero p_magic From owner-svn-src-user@FreeBSD.ORG Wed Nov 17 08:56:02 2010 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF8EE1065675; Wed, 17 Nov 2010 08:56:02 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A85F18FC14; Wed, 17 Nov 2010 08:56:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAH8u2XN084005; Wed, 17 Nov 2010 08:56:02 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAH8u2F7083983; Wed, 17 Nov 2010 08:56:02 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201011170856.oAH8u2F7083983@svn.freebsd.org> From: "Jayachandran C." Date: Wed, 17 Nov 2010 08:56:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215417 - in user/jchandra/8-stable-mips: . contrib/binutils/bfd contrib/gcc/config/mips contrib/top etc/periodic/daily gnu/lib/libgcc gnu/usr.bin gnu/usr.bin/binutils gnu/usr.bin/binut... X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 08:56:02 -0000 Author: jchandra Date: Wed Nov 17 08:56:01 2010 New Revision: 215417 URL: http://svn.freebsd.org/changeset/base/215417 Log: MFC test for mips changes in -CURRENT. - Pull in vm updates for allocating page table pages. - revert page queue locking code in -CURRENT pmap.c - merge PMC by hand - revert kernel event timer code from -CURRENT tick.c - other fixups Added: user/jchandra/8-stable-mips/gnu/usr.bin/binutils/ld/elf32btsmipn32_fbsd.sh - copied, changed from r204548, head/gnu/usr.bin/binutils/ld/elf32btsmipn32_fbsd.sh user/jchandra/8-stable-mips/gnu/usr.bin/binutils/ld/elf32ltsmipn32_fbsd.sh - copied, changed from r204548, head/gnu/usr.bin/binutils/ld/elf32ltsmipn32_fbsd.sh user/jchandra/8-stable-mips/lib/libc/mips/gen/_ctx_start.S - copied unchanged from r209233, head/lib/libc/mips/gen/_ctx_start.S user/jchandra/8-stable-mips/lib/libc/mips/gen/hardfloat/ - copied from r201856, head/lib/libc/mips/gen/hardfloat/ user/jchandra/8-stable-mips/sys/conf/ldscript.mips.64 - copied unchanged from r209814, head/sys/conf/ldscript.mips.64 user/jchandra/8-stable-mips/sys/conf/ldscript.mips.64.cfe - copied unchanged from r212634, head/sys/conf/ldscript.mips.64.cfe user/jchandra/8-stable-mips/sys/conf/ldscript.mips.n32 - copied unchanged from r209502, head/sys/conf/ldscript.mips.n32 user/jchandra/8-stable-mips/sys/contrib/octeon-sdk/ - copied from r210286, head/sys/contrib/octeon-sdk/ user/jchandra/8-stable-mips/sys/dev/hwpmc/hwpmc_mips.c - copied unchanged from r204635, head/sys/dev/hwpmc/hwpmc_mips.c user/jchandra/8-stable-mips/sys/dev/hwpmc/hwpmc_mips24k.c - copied unchanged from r204635, head/sys/dev/hwpmc/hwpmc_mips24k.c user/jchandra/8-stable-mips/sys/dev/hwpmc/hwpmc_mips24k.h - copied unchanged from r204635, head/sys/dev/hwpmc/hwpmc_mips24k.h user/jchandra/8-stable-mips/sys/mips/alchemy/ - copied from r202041, head/sys/mips/alchemy/ user/jchandra/8-stable-mips/sys/mips/atheros/ - copied from r201906, head/sys/mips/atheros/ user/jchandra/8-stable-mips/sys/mips/atheros/ar71xx_chip.c - copied, changed from r211482, head/sys/mips/atheros/ar71xx_chip.c user/jchandra/8-stable-mips/sys/mips/atheros/ar71xx_chip.h - copied unchanged from r211482, head/sys/mips/atheros/ar71xx_chip.h user/jchandra/8-stable-mips/sys/mips/atheros/ar71xx_cpudef.h - copied unchanged from r211449, head/sys/mips/atheros/ar71xx_cpudef.h user/jchandra/8-stable-mips/sys/mips/atheros/ar71xx_gpio.c - copied, changed from r213239, head/sys/mips/atheros/ar71xx_gpio.c user/jchandra/8-stable-mips/sys/mips/atheros/ar71xx_gpiovar.h - copied unchanged from r213239, head/sys/mips/atheros/ar71xx_gpiovar.h user/jchandra/8-stable-mips/sys/mips/atheros/ar71xx_setup.c - copied, changed from r211482, head/sys/mips/atheros/ar71xx_setup.c user/jchandra/8-stable-mips/sys/mips/atheros/ar71xx_setup.h - copied unchanged from r211482, head/sys/mips/atheros/ar71xx_setup.h user/jchandra/8-stable-mips/sys/mips/atheros/ar724x_chip.c - copied unchanged from r211504, head/sys/mips/atheros/ar724x_chip.c user/jchandra/8-stable-mips/sys/mips/atheros/ar724x_chip.h - copied unchanged from r211504, head/sys/mips/atheros/ar724x_chip.h user/jchandra/8-stable-mips/sys/mips/atheros/ar724xreg.h - copied, changed from r211440, head/sys/mips/atheros/ar724xreg.h user/jchandra/8-stable-mips/sys/mips/atheros/ar91xx_chip.c - copied, changed from r211504, head/sys/mips/atheros/ar91xx_chip.c user/jchandra/8-stable-mips/sys/mips/atheros/ar91xx_chip.h - copied unchanged from r211504, head/sys/mips/atheros/ar91xx_chip.h user/jchandra/8-stable-mips/sys/mips/atheros/ar91xxreg.h - copied, changed from r211440, head/sys/mips/atheros/ar91xxreg.h user/jchandra/8-stable-mips/sys/mips/atheros/pcf2123_rtc.c - copied unchanged from r202839, head/sys/mips/atheros/pcf2123_rtc.c user/jchandra/8-stable-mips/sys/mips/atheros/pcf2123reg.h - copied unchanged from r202839, head/sys/mips/atheros/pcf2123reg.h user/jchandra/8-stable-mips/sys/mips/cavium/ - copied from r201921, head/sys/mips/cavium/ user/jchandra/8-stable-mips/sys/mips/cavium/ciu.c - copied, changed from r210311, head/sys/mips/cavium/ciu.c user/jchandra/8-stable-mips/sys/mips/cavium/cryptocteon/ - copied from r210312, head/sys/mips/cavium/cryptocteon/ user/jchandra/8-stable-mips/sys/mips/cavium/cvmx_config.h - copied unchanged from r210311, head/sys/mips/cavium/cvmx_config.h user/jchandra/8-stable-mips/sys/mips/cavium/octe/ - copied from r210311, head/sys/mips/cavium/octe/ user/jchandra/8-stable-mips/sys/mips/cavium/octe/ethernet-mv88e61xx.c - copied, changed from r213346, head/sys/mips/cavium/octe/ethernet-mv88e61xx.c user/jchandra/8-stable-mips/sys/mips/cavium/octe/ethernet-mv88e61xx.h - copied unchanged from r213346, head/sys/mips/cavium/octe/ethernet-mv88e61xx.h user/jchandra/8-stable-mips/sys/mips/cavium/octe/mv88e61xxphy.c - copied unchanged from r213762, head/sys/mips/cavium/octe/mv88e61xxphy.c user/jchandra/8-stable-mips/sys/mips/cavium/octe/mv88e61xxphyreg.h - copied unchanged from r213762, head/sys/mips/cavium/octe/mv88e61xxphyreg.h user/jchandra/8-stable-mips/sys/mips/cavium/octeon_ds1337.c - copied unchanged from r210311, head/sys/mips/cavium/octeon_ds1337.c user/jchandra/8-stable-mips/sys/mips/cavium/octeon_mp.c - copied, changed from r206721, head/sys/mips/cavium/octeon_mp.c user/jchandra/8-stable-mips/sys/mips/cavium/octeon_rnd.c - copied unchanged from r210311, head/sys/mips/cavium/octeon_rnd.c user/jchandra/8-stable-mips/sys/mips/cavium/octeon_rtc.c - copied unchanged from r210311, head/sys/mips/cavium/octeon_rtc.c user/jchandra/8-stable-mips/sys/mips/cavium/octopci.c - copied, changed from r210311, head/sys/mips/cavium/octopci.c user/jchandra/8-stable-mips/sys/mips/cavium/octopci_bus_space.c - copied unchanged from r210311, head/sys/mips/cavium/octopci_bus_space.c user/jchandra/8-stable-mips/sys/mips/cavium/octopcireg.h - copied, changed from r210311, head/sys/mips/cavium/octopcireg.h user/jchandra/8-stable-mips/sys/mips/cavium/octopcivar.h - copied unchanged from r210311, head/sys/mips/cavium/octopcivar.h user/jchandra/8-stable-mips/sys/mips/cavium/usb/ - copied from r210312, head/sys/mips/cavium/usb/ user/jchandra/8-stable-mips/sys/mips/include/_align.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/include/cdefs.h (contents, props changed) - copied, changed from r202041, head/sys/mips/include/cdefs.h - copied unchanged from r202041, head/sys/mips/include/fls64.h user/jchandra/8-stable-mips/sys/mips/include/tlb.h - copied, changed from r209243, head/sys/mips/include/tlb.h user/jchandra/8-stable-mips/sys/mips/mips/bus_space_generic.c (contents, props changed) - copied, changed from r202041, head/sys/mips/mips/bus_space_generic.c user/jchandra/8-stable-mips/sys/mips/mips/elf_trampoline.c (contents, props changed) - copied, changed from r202041, head/sys/mips/mips/elf_trampoline.c - copied unchanged from r202041, head/sys/mips/mips/inckern.S user/jchandra/8-stable-mips/sys/mips/mips/minidump_machdep.c - copied unchanged from r214903, head/sys/mips/mips/minidump_machdep.c user/jchandra/8-stable-mips/sys/mips/mips/mpboot.S - copied, changed from r203697, head/sys/mips/mips/mpboot.S - copied unchanged from r201976, head/sys/mips/mips/ptrace_machdep.c - copied unchanged from r202041, head/sys/mips/mips/sys_machdep.c user/jchandra/8-stable-mips/sys/mips/mips/tlb.c - copied, changed from r209243, head/sys/mips/mips/tlb.c user/jchandra/8-stable-mips/sys/mips/rmi/ - copied from r201917, head/sys/mips/rmi/ user/jchandra/8-stable-mips/sys/mips/rmi/bus_space_rmi_pci.c - copied, changed from r204137, head/sys/mips/rmi/bus_space_rmi_pci.c user/jchandra/8-stable-mips/sys/mips/rmi/dev/ - copied from r201979, head/sys/mips/rmi/dev/ user/jchandra/8-stable-mips/sys/mips/rmi/dev/nlge/ - copied from r211946, head/sys/mips/rmi/dev/nlge/ user/jchandra/8-stable-mips/sys/mips/rmi/dev/xlr/debug.h - copied unchanged from r211996, head/sys/mips/rmi/dev/xlr/debug.h user/jchandra/8-stable-mips/sys/mips/rmi/fmn.c - copied, changed from r211809, head/sys/mips/rmi/fmn.c user/jchandra/8-stable-mips/sys/mips/rmi/mpwait.S - copied unchanged from r208250, head/sys/mips/rmi/mpwait.S user/jchandra/8-stable-mips/sys/mips/rmi/rmi_boot_info.h - copied unchanged from r211994, head/sys/mips/rmi/rmi_boot_info.h user/jchandra/8-stable-mips/sys/mips/rmi/xlr_pcmcia.c - copied unchanged from r211923, head/sys/mips/rmi/xlr_pcmcia.c user/jchandra/8-stable-mips/sys/mips/sibyte/ - copied from r201905, head/sys/mips/sibyte/ user/jchandra/8-stable-mips/sys/mips/sibyte/sb_bus_space.h - copied unchanged from r203985, head/sys/mips/sibyte/sb_bus_space.h Directory Properties: user/jchandra/8-stable-mips/sys/mips/include/fls64.h (props changed) user/jchandra/8-stable-mips/sys/mips/mips/inckern.S (props changed) user/jchandra/8-stable-mips/sys/mips/mips/ptrace_machdep.c (props changed) user/jchandra/8-stable-mips/sys/mips/mips/sys_machdep.c (props changed) Deleted: user/jchandra/8-stable-mips/lib/libc/mips/gen/fpgetmask.c user/jchandra/8-stable-mips/lib/libc/mips/gen/fpgetround.c user/jchandra/8-stable-mips/lib/libc/mips/gen/fpgetsticky.c user/jchandra/8-stable-mips/lib/libc/mips/gen/fpsetmask.c user/jchandra/8-stable-mips/lib/libc/mips/gen/fpsetround.c user/jchandra/8-stable-mips/lib/libc/mips/gen/fpsetsticky.c user/jchandra/8-stable-mips/sys/mips/include/_bus_octeon.h user/jchandra/8-stable-mips/sys/mips/include/archtype.h user/jchandra/8-stable-mips/sys/mips/include/asmacros.h user/jchandra/8-stable-mips/sys/mips/include/bus_octeon.h user/jchandra/8-stable-mips/sys/mips/include/defs.h user/jchandra/8-stable-mips/sys/mips/include/intr.h user/jchandra/8-stable-mips/sys/mips/include/pltfm.h user/jchandra/8-stable-mips/sys/mips/include/psl.h user/jchandra/8-stable-mips/sys/mips/include/queue.h user/jchandra/8-stable-mips/sys/mips/include/rm7000.h user/jchandra/8-stable-mips/sys/mips/include/segments.h user/jchandra/8-stable-mips/sys/mips/mips/copystr.S user/jchandra/8-stable-mips/sys/mips/mips/psraccess.S user/jchandra/8-stable-mips/sys/mips/mips/tlb.S user/jchandra/8-stable-mips/sys/mips/sentry5/siba_cc.c user/jchandra/8-stable-mips/sys/mips/sentry5/siba_mips.c user/jchandra/8-stable-mips/sys/mips/sentry5/siba_sdram.c Modified: user/jchandra/8-stable-mips/contrib/binutils/bfd/elfxx-mips.c user/jchandra/8-stable-mips/contrib/gcc/config/mips/freebsd.h user/jchandra/8-stable-mips/gnu/lib/libgcc/Makefile user/jchandra/8-stable-mips/gnu/usr.bin/binutils/Makefile.inc0 user/jchandra/8-stable-mips/gnu/usr.bin/binutils/ld/Makefile.mips user/jchandra/8-stable-mips/gnu/usr.bin/binutils/ld/genscripts.sh user/jchandra/8-stable-mips/gnu/usr.bin/cc/Makefile.inc user/jchandra/8-stable-mips/gnu/usr.bin/cc/Makefile.tgt user/jchandra/8-stable-mips/lib/libc/Makefile user/jchandra/8-stable-mips/lib/libc/mips/Makefile.inc user/jchandra/8-stable-mips/lib/libc/mips/SYS.h user/jchandra/8-stable-mips/lib/libc/mips/Symbol.map user/jchandra/8-stable-mips/lib/libc/mips/gen/Makefile.inc user/jchandra/8-stable-mips/lib/libc/mips/gen/_setjmp.S user/jchandra/8-stable-mips/lib/libc/mips/gen/makecontext.c user/jchandra/8-stable-mips/lib/libc/mips/gen/setjmp.S user/jchandra/8-stable-mips/lib/libc/mips/gen/sigsetjmp.S user/jchandra/8-stable-mips/lib/libc/mips/string/bcmp.S user/jchandra/8-stable-mips/lib/libc/mips/string/bcopy.S user/jchandra/8-stable-mips/lib/libc/mips/string/bzero.S user/jchandra/8-stable-mips/lib/libc/mips/string/ffs.S user/jchandra/8-stable-mips/lib/libc/mips/string/index.S user/jchandra/8-stable-mips/lib/libc/mips/string/rindex.S user/jchandra/8-stable-mips/lib/libc/mips/string/strcmp.S user/jchandra/8-stable-mips/lib/libc/mips/string/strlen.S user/jchandra/8-stable-mips/lib/libc/mips/sys/Makefile.inc user/jchandra/8-stable-mips/lib/libc/mips/sys/Ovfork.S user/jchandra/8-stable-mips/lib/libc/mips/sys/brk.S user/jchandra/8-stable-mips/lib/libc/mips/sys/cerror.S user/jchandra/8-stable-mips/lib/libc/mips/sys/exect.S user/jchandra/8-stable-mips/lib/libc/mips/sys/fork.S user/jchandra/8-stable-mips/lib/libc/mips/sys/pipe.S user/jchandra/8-stable-mips/lib/libc/mips/sys/ptrace.S user/jchandra/8-stable-mips/lib/libc/mips/sys/sbrk.S user/jchandra/8-stable-mips/lib/libpmc/libpmc.c user/jchandra/8-stable-mips/lib/libthr/arch/mips/include/pthread_md.h user/jchandra/8-stable-mips/libexec/rtld-elf/mips/reloc.c user/jchandra/8-stable-mips/libexec/rtld-elf/mips/rtld_start.S user/jchandra/8-stable-mips/share/mk/bsd.cpu.mk user/jchandra/8-stable-mips/sys/arm/include/bus.h user/jchandra/8-stable-mips/sys/conf/Makefile.mips user/jchandra/8-stable-mips/sys/conf/files.mips user/jchandra/8-stable-mips/sys/conf/kern.pre.mk user/jchandra/8-stable-mips/sys/conf/kmod.mk user/jchandra/8-stable-mips/sys/conf/ldscript.mips user/jchandra/8-stable-mips/sys/conf/options.mips user/jchandra/8-stable-mips/sys/contrib/octeon-sdk/cvmx-access-native.h user/jchandra/8-stable-mips/sys/contrib/octeon-sdk/cvmx-app-init.h user/jchandra/8-stable-mips/sys/contrib/octeon-sdk/cvmx-asm.h user/jchandra/8-stable-mips/sys/contrib/octeon-sdk/cvmx-cmd-queue.c user/jchandra/8-stable-mips/sys/contrib/octeon-sdk/cvmx-cmd-queue.h user/jchandra/8-stable-mips/sys/contrib/octeon-sdk/cvmx-fpa.c user/jchandra/8-stable-mips/sys/contrib/octeon-sdk/cvmx-helper-board.c user/jchandra/8-stable-mips/sys/contrib/octeon-sdk/cvmx-helper-errata.c user/jchandra/8-stable-mips/sys/contrib/octeon-sdk/cvmx-helper-fpa.c user/jchandra/8-stable-mips/sys/contrib/octeon-sdk/cvmx-helper-loop.c user/jchandra/8-stable-mips/sys/contrib/octeon-sdk/cvmx-helper-npi.c user/jchandra/8-stable-mips/sys/contrib/octeon-sdk/cvmx-helper-rgmii.c user/jchandra/8-stable-mips/sys/contrib/octeon-sdk/cvmx-helper-sgmii.c user/jchandra/8-stable-mips/sys/contrib/octeon-sdk/cvmx-helper-spi.c user/jchandra/8-stable-mips/sys/contrib/octeon-sdk/cvmx-helper-util.c user/jchandra/8-stable-mips/sys/contrib/octeon-sdk/cvmx-helper-util.h user/jchandra/8-stable-mips/sys/contrib/octeon-sdk/cvmx-helper-xaui.c user/jchandra/8-stable-mips/sys/contrib/octeon-sdk/cvmx-helper.c user/jchandra/8-stable-mips/sys/contrib/octeon-sdk/cvmx-helper.h user/jchandra/8-stable-mips/sys/contrib/octeon-sdk/cvmx-pko.c user/jchandra/8-stable-mips/sys/contrib/octeon-sdk/cvmx-platform.h user/jchandra/8-stable-mips/sys/contrib/octeon-sdk/cvmx-rtc.h user/jchandra/8-stable-mips/sys/contrib/octeon-sdk/cvmx-spi.c user/jchandra/8-stable-mips/sys/contrib/octeon-sdk/cvmx-thunder.c user/jchandra/8-stable-mips/sys/contrib/octeon-sdk/cvmx-usb.c user/jchandra/8-stable-mips/sys/contrib/octeon-sdk/cvmx-usb.h user/jchandra/8-stable-mips/sys/contrib/octeon-sdk/octeon-model.h user/jchandra/8-stable-mips/sys/dev/hwpmc/pmc_events.h user/jchandra/8-stable-mips/sys/ia64/ia64/pmap.c user/jchandra/8-stable-mips/sys/kern/link_elf_obj.c user/jchandra/8-stable-mips/sys/kern/sched_ule.c user/jchandra/8-stable-mips/sys/kern/subr_smp.c user/jchandra/8-stable-mips/sys/mips/adm5120/adm5120_machdep.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/adm5120/files.adm5120 (contents, props changed) user/jchandra/8-stable-mips/sys/mips/adm5120/if_admsw.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/adm5120/if_admswvar.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/adm5120/obio.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/adm5120/uart_cpu_adm5120.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/alchemy/alchemy_machdep.c user/jchandra/8-stable-mips/sys/mips/alchemy/obio.c user/jchandra/8-stable-mips/sys/mips/atheros/ar71xx_machdep.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/atheros/ar71xx_pci.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/atheros/ar71xx_spi.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/atheros/ar71xx_wdog.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/atheros/ar71xxreg.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/atheros/files.ar71xx (contents, props changed) user/jchandra/8-stable-mips/sys/mips/atheros/if_arge.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/atheros/if_argevar.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/atheros/uart_bus_ar71xx.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/atheros/uart_cpu_ar71xx.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/cavium/asm_octeon.S user/jchandra/8-stable-mips/sys/mips/cavium/dev/rgmii/octeon_fau.h user/jchandra/8-stable-mips/sys/mips/cavium/dev/rgmii/octeon_fpa.c user/jchandra/8-stable-mips/sys/mips/cavium/dev/rgmii/octeon_fpa.h user/jchandra/8-stable-mips/sys/mips/cavium/dev/rgmii/octeon_ipd.c user/jchandra/8-stable-mips/sys/mips/cavium/dev/rgmii/octeon_ipd.h user/jchandra/8-stable-mips/sys/mips/cavium/dev/rgmii/octeon_pip.h user/jchandra/8-stable-mips/sys/mips/cavium/dev/rgmii/octeon_pko.c user/jchandra/8-stable-mips/sys/mips/cavium/dev/rgmii/octeon_pko.h user/jchandra/8-stable-mips/sys/mips/cavium/dev/rgmii/octeon_rgmx.c user/jchandra/8-stable-mips/sys/mips/cavium/dev/rgmii/octeon_rgmx.h user/jchandra/8-stable-mips/sys/mips/cavium/files.octeon1 (contents, props changed) user/jchandra/8-stable-mips/sys/mips/cavium/obio.c user/jchandra/8-stable-mips/sys/mips/cavium/obiovar.h user/jchandra/8-stable-mips/sys/mips/cavium/octe/cavium-ethernet.h user/jchandra/8-stable-mips/sys/mips/cavium/octe/ethernet-common.c user/jchandra/8-stable-mips/sys/mips/cavium/octe/ethernet-headers.h user/jchandra/8-stable-mips/sys/mips/cavium/octe/ethernet-mdio.c user/jchandra/8-stable-mips/sys/mips/cavium/octe/ethernet-rgmii.c user/jchandra/8-stable-mips/sys/mips/cavium/octe/ethernet-rx.c user/jchandra/8-stable-mips/sys/mips/cavium/octe/ethernet-sgmii.c user/jchandra/8-stable-mips/sys/mips/cavium/octe/ethernet-tx.c user/jchandra/8-stable-mips/sys/mips/cavium/octe/ethernet-xaui.c user/jchandra/8-stable-mips/sys/mips/cavium/octe/ethernet.c user/jchandra/8-stable-mips/sys/mips/cavium/octe/octe.c user/jchandra/8-stable-mips/sys/mips/cavium/octeon_ebt3000_cf.c user/jchandra/8-stable-mips/sys/mips/cavium/octeon_machdep.c user/jchandra/8-stable-mips/sys/mips/cavium/octeon_pcmap_regs.h user/jchandra/8-stable-mips/sys/mips/cavium/std.octeon1 (contents, props changed) user/jchandra/8-stable-mips/sys/mips/cavium/uart_bus_octeonusart.c user/jchandra/8-stable-mips/sys/mips/cavium/uart_cpu_octeonusart.c user/jchandra/8-stable-mips/sys/mips/cavium/uart_dev_oct16550.c user/jchandra/8-stable-mips/sys/mips/cavium/usb/octusb.c user/jchandra/8-stable-mips/sys/mips/conf/ADM5120 (contents, props changed) user/jchandra/8-stable-mips/sys/mips/conf/MALTA (contents, props changed) user/jchandra/8-stable-mips/sys/mips/conf/QEMU (contents, props changed) user/jchandra/8-stable-mips/sys/mips/conf/SENTRY5 (contents, props changed) user/jchandra/8-stable-mips/sys/mips/idt/files.idt (contents, props changed) user/jchandra/8-stable-mips/sys/mips/idt/idt_machdep.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/idt/obio.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/idt/uart_bus_rc32434.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/idt/uart_cpu_rc32434.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/include/_bus.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/include/_inttypes.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/include/_limits.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/include/_stdint.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/include/_types.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/include/asm.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/include/atomic.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/include/bus.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/include/cache.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/include/cache_mipsNN.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/include/clock.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/include/cpu.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/include/cpufunc.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/include/cpuinfo.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/include/cpuregs.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/include/db_machdep.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/include/elf.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/include/endian.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/include/float.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/include/hwfunc.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/include/intr_machdep.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/include/kdb.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/include/locore.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/include/md_var.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/include/memdev.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/include/param.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/include/pcb.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/include/pcpu.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/include/pmap.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/include/pmc_mdep.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/include/proc.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/include/profile.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/include/pte.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/include/regdef.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/include/regnum.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/include/runq.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/include/setjmp.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/include/sf_buf.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/include/smp.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/include/sysarch.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/include/trap.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/include/ucontext.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/include/vm.h user/jchandra/8-stable-mips/sys/mips/include/vmparam.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/malta/files.malta (contents, props changed) user/jchandra/8-stable-mips/sys/mips/malta/gt_pci.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/malta/malta_machdep.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/malta/maltareg.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/malta/obio.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/malta/std.malta (contents, props changed) user/jchandra/8-stable-mips/sys/mips/malta/uart_bus_maltausart.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/malta/uart_cpu_maltausart.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/malta/yamon.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/mips/autoconf.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/mips/busdma_machdep.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/mips/cache.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/mips/cache_mipsNN.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/mips/cpu.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/mips/db_interface.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/mips/db_trace.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/mips/dump_machdep.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/mips/elf_machdep.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/mips/exception.S (contents, props changed) user/jchandra/8-stable-mips/sys/mips/mips/fp.S (contents, props changed) user/jchandra/8-stable-mips/sys/mips/mips/gdb_machdep.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/mips/genassym.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/mips/in_cksum.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/mips/intr_machdep.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/mips/locore.S (contents, props changed) user/jchandra/8-stable-mips/sys/mips/mips/machdep.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/mips/mainbus.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/mips/mem.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/mips/mp_machdep.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/mips/nexus.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/mips/pm_machdep.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/mips/pmap.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/mips/stack_machdep.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/mips/support.S (contents, props changed) user/jchandra/8-stable-mips/sys/mips/mips/swtch.S (contents, props changed) user/jchandra/8-stable-mips/sys/mips/mips/tick.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/mips/trap.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/mips/uio_machdep.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/mips/vm_machdep.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/rmi/board.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/rmi/board.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/rmi/bus_space_rmi.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/rmi/dev/nlge/if_nlge.c user/jchandra/8-stable-mips/sys/mips/rmi/dev/nlge/if_nlge.h user/jchandra/8-stable-mips/sys/mips/rmi/dev/sec/desc.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/rmi/dev/sec/rmilib.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/rmi/dev/sec/rmilib.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/rmi/dev/sec/rmisec.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/rmi/dev/xlr/rge.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/rmi/dev/xlr/rge.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/rmi/ehcireg.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/rmi/ehcivar.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/rmi/files.xlr (contents, props changed) user/jchandra/8-stable-mips/sys/mips/rmi/interrupt.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/rmi/intr_machdep.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/rmi/iodi.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/rmi/iomap.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/rmi/msgring.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/rmi/pcibus.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/rmi/pic.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/rmi/rmi_mips_exts.h (contents, props changed) user/jchandra/8-stable-mips/sys/mips/rmi/std.xlr (contents, props changed) user/jchandra/8-stable-mips/sys/mips/rmi/tick.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/rmi/uart_bus_xlr_iodi.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/rmi/xlr_i2c.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/rmi/xlr_machdep.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/rmi/xlr_pci.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/rmi/xls_ehci.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/sentry5/files.sentry5 (contents, props changed) user/jchandra/8-stable-mips/sys/mips/sentry5/obio.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/sentry5/s5_machdep.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/sentry5/uart_bus_sbusart.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/sentry5/uart_cpu_sbusart.c (contents, props changed) user/jchandra/8-stable-mips/sys/mips/sibyte/sb_asm.S user/jchandra/8-stable-mips/sys/mips/sibyte/sb_machdep.c user/jchandra/8-stable-mips/sys/mips/sibyte/sb_scd.c user/jchandra/8-stable-mips/sys/mips/sibyte/sb_scd.h user/jchandra/8-stable-mips/sys/mips/sibyte/sb_zbbus.c user/jchandra/8-stable-mips/sys/mips/sibyte/sb_zbpci.c user/jchandra/8-stable-mips/sys/sun4v/sun4v/pmap.c user/jchandra/8-stable-mips/sys/sys/kerneldump.h user/jchandra/8-stable-mips/sys/sys/pmc.h user/jchandra/8-stable-mips/sys/vm/pmap.h user/jchandra/8-stable-mips/sys/vm/vm_contig.c user/jchandra/8-stable-mips/sys/vm/vm_extern.h user/jchandra/8-stable-mips/sys/vm/vm_glue.c user/jchandra/8-stable-mips/sys/vm/vm_kern.c user/jchandra/8-stable-mips/sys/vm/vm_map.c user/jchandra/8-stable-mips/sys/vm/vm_map.h user/jchandra/8-stable-mips/sys/vm/vm_page.c user/jchandra/8-stable-mips/sys/vm/vm_page.h user/jchandra/8-stable-mips/sys/vm/vm_pageout.h user/jchandra/8-stable-mips/sys/vm/vm_phys.c user/jchandra/8-stable-mips/sys/vm/vm_phys.h Directory Properties: user/jchandra/8-stable-mips/ (props changed) user/jchandra/8-stable-mips/Makefile (props changed) user/jchandra/8-stable-mips/Makefile.inc1 (props changed) user/jchandra/8-stable-mips/ObsoleteFiles.inc (props changed) user/jchandra/8-stable-mips/UPDATING (props changed) user/jchandra/8-stable-mips/bin/ (props changed) user/jchandra/8-stable-mips/bin/chio/ (props changed) user/jchandra/8-stable-mips/bin/chmod/ (props changed) user/jchandra/8-stable-mips/bin/cp/ (props changed) user/jchandra/8-stable-mips/bin/csh/ (props changed) user/jchandra/8-stable-mips/bin/date/ (props changed) user/jchandra/8-stable-mips/bin/expr/ (props changed) user/jchandra/8-stable-mips/bin/getfacl/ (props changed) user/jchandra/8-stable-mips/bin/kill/ (props changed) user/jchandra/8-stable-mips/bin/ln/ (props changed) user/jchandra/8-stable-mips/bin/ls/ (props changed) user/jchandra/8-stable-mips/bin/mv/ (props changed) user/jchandra/8-stable-mips/bin/pax/ (props changed) user/jchandra/8-stable-mips/bin/pkill/ (props changed) user/jchandra/8-stable-mips/bin/ps/ (props changed) user/jchandra/8-stable-mips/bin/pwait/ (props changed) user/jchandra/8-stable-mips/bin/setfacl/ (props changed) user/jchandra/8-stable-mips/bin/sh/ (props changed) user/jchandra/8-stable-mips/bin/sleep/ (props changed) user/jchandra/8-stable-mips/bin/test/ (props changed) user/jchandra/8-stable-mips/cddl/compat/opensolaris/ (props changed) user/jchandra/8-stable-mips/cddl/contrib/opensolaris/ (props changed) user/jchandra/8-stable-mips/cddl/lib/ (props changed) user/jchandra/8-stable-mips/cddl/lib/libnvpair/ (props changed) user/jchandra/8-stable-mips/cddl/lib/libzpool/ (props changed) user/jchandra/8-stable-mips/cddl/usr.bin/ (props changed) user/jchandra/8-stable-mips/cddl/usr.sbin/ (props changed) user/jchandra/8-stable-mips/contrib/ (props changed) user/jchandra/8-stable-mips/contrib/bind9/ (props changed) user/jchandra/8-stable-mips/contrib/binutils/ (props changed) user/jchandra/8-stable-mips/contrib/bsnmp/ (props changed) user/jchandra/8-stable-mips/contrib/bzip2/ (props changed) user/jchandra/8-stable-mips/contrib/com_err/ (props changed) user/jchandra/8-stable-mips/contrib/csup/ (props changed) user/jchandra/8-stable-mips/contrib/ee/ (props changed) user/jchandra/8-stable-mips/contrib/expat/ (props changed) user/jchandra/8-stable-mips/contrib/file/ (props changed) user/jchandra/8-stable-mips/contrib/gcc/ (props changed) user/jchandra/8-stable-mips/contrib/gdb/ (props changed) user/jchandra/8-stable-mips/contrib/gdtoa/ (props changed) user/jchandra/8-stable-mips/contrib/groff/ (props changed) user/jchandra/8-stable-mips/contrib/ipfilter/ (props changed) user/jchandra/8-stable-mips/contrib/less/ (props changed) user/jchandra/8-stable-mips/contrib/libpcap/ (props changed) user/jchandra/8-stable-mips/contrib/ncurses/ (props changed) user/jchandra/8-stable-mips/contrib/netcat/ (props changed) user/jchandra/8-stable-mips/contrib/ntp/ (props changed) user/jchandra/8-stable-mips/contrib/nvi/ (props changed) user/jchandra/8-stable-mips/contrib/one-true-awk/ (props changed) user/jchandra/8-stable-mips/contrib/openbsm/ (props changed) user/jchandra/8-stable-mips/contrib/openpam/ (props changed) user/jchandra/8-stable-mips/contrib/pf/ (props changed) user/jchandra/8-stable-mips/contrib/sendmail/ (props changed) user/jchandra/8-stable-mips/contrib/tcp_wrappers/ (props changed) user/jchandra/8-stable-mips/contrib/tcpdump/ (props changed) user/jchandra/8-stable-mips/contrib/tcsh/ (props changed) user/jchandra/8-stable-mips/contrib/telnet/ (props changed) user/jchandra/8-stable-mips/contrib/top/ (props changed) user/jchandra/8-stable-mips/contrib/top/install-sh (props changed) user/jchandra/8-stable-mips/contrib/traceroute/ (props changed) user/jchandra/8-stable-mips/contrib/wpa/ (props changed) user/jchandra/8-stable-mips/contrib/xz/ (props changed) user/jchandra/8-stable-mips/crypto/heimdal/ (props changed) user/jchandra/8-stable-mips/crypto/openssh/ (props changed) user/jchandra/8-stable-mips/crypto/openssl/ (props changed) user/jchandra/8-stable-mips/etc/ (props changed) user/jchandra/8-stable-mips/etc/periodic/daily/ (props changed) user/jchandra/8-stable-mips/etc/periodic/daily/800.scrub-zfs (props changed) user/jchandra/8-stable-mips/etc/periodic/security/ (props changed) user/jchandra/8-stable-mips/games/factor/ (props changed) user/jchandra/8-stable-mips/games/fortune/ (props changed) user/jchandra/8-stable-mips/games/grdc/ (props changed) user/jchandra/8-stable-mips/games/pom/ (props changed) user/jchandra/8-stable-mips/gnu/lib/csu/ (props changed) user/jchandra/8-stable-mips/gnu/lib/libstdc++/ (props changed) user/jchandra/8-stable-mips/gnu/usr.bin/ (props changed) user/jchandra/8-stable-mips/gnu/usr.bin/Makefile (props changed) user/jchandra/8-stable-mips/gnu/usr.bin/dialog/ (props changed) user/jchandra/8-stable-mips/gnu/usr.bin/gdb/ (props changed) user/jchandra/8-stable-mips/gnu/usr.bin/gdb/kgdb/ (props changed) user/jchandra/8-stable-mips/gnu/usr.bin/groff/ (props changed) user/jchandra/8-stable-mips/gnu/usr.bin/patch/ (props changed) user/jchandra/8-stable-mips/include/ (props changed) user/jchandra/8-stable-mips/kerberos5/lib/libgssapi_krb5/ (props changed) user/jchandra/8-stable-mips/kerberos5/lib/libgssapi_spnego/ (props changed) user/jchandra/8-stable-mips/kerberos5/usr.bin/kdestroy/ (props changed) user/jchandra/8-stable-mips/kerberos5/usr.bin/kpasswd/ (props changed) user/jchandra/8-stable-mips/lib/ (props changed) user/jchandra/8-stable-mips/lib/bind/ (props changed) user/jchandra/8-stable-mips/lib/csu/ (props changed) user/jchandra/8-stable-mips/lib/libarchive/ (props changed) user/jchandra/8-stable-mips/lib/libbluetooth/ (props changed) user/jchandra/8-stable-mips/lib/libc/ (props changed) user/jchandra/8-stable-mips/lib/libc/locale/ (props changed) user/jchandra/8-stable-mips/lib/libc/stdtime/ (props changed) user/jchandra/8-stable-mips/lib/libc/sys/ (props changed) user/jchandra/8-stable-mips/lib/libc_r/ (props changed) user/jchandra/8-stable-mips/lib/libcam/ (props changed) user/jchandra/8-stable-mips/lib/libcompat/ (props changed) user/jchandra/8-stable-mips/lib/libdevinfo/ (props changed) user/jchandra/8-stable-mips/lib/libdisk/ (props changed) user/jchandra/8-stable-mips/lib/libedit/ (props changed) user/jchandra/8-stable-mips/lib/libelf/ (props changed) user/jchandra/8-stable-mips/lib/libexpat/ (props changed) user/jchandra/8-stable-mips/lib/libfetch/ (props changed) user/jchandra/8-stable-mips/lib/libgeom/ (props changed) user/jchandra/8-stable-mips/lib/libgpib/ (props changed) user/jchandra/8-stable-mips/lib/libgssapi/ (props changed) user/jchandra/8-stable-mips/lib/libjail/ (props changed) user/jchandra/8-stable-mips/lib/libkse/ (props changed) user/jchandra/8-stable-mips/lib/libkvm/ (props changed) user/jchandra/8-stable-mips/lib/liblzma/ (props changed) user/jchandra/8-stable-mips/lib/libmagic/ (props changed) user/jchandra/8-stable-mips/lib/libmemstat/ (props changed) user/jchandra/8-stable-mips/lib/libpam/ (props changed) user/jchandra/8-stable-mips/lib/libpmc/ (props changed) user/jchandra/8-stable-mips/lib/libproc/ (props changed) user/jchandra/8-stable-mips/lib/libradius/ (props changed) user/jchandra/8-stable-mips/lib/librpcsec_gss/ (props changed) user/jchandra/8-stable-mips/lib/librtld_db/ (props changed) user/jchandra/8-stable-mips/lib/libsm/ (props changed) user/jchandra/8-stable-mips/lib/libstand/ (props changed) user/jchandra/8-stable-mips/lib/libtacplus/ (props changed) user/jchandra/8-stable-mips/lib/libthr/ (props changed) user/jchandra/8-stable-mips/lib/libthread_db/ (props changed) user/jchandra/8-stable-mips/lib/libufs/ (props changed) user/jchandra/8-stable-mips/lib/libugidfw/ (props changed) user/jchandra/8-stable-mips/lib/libusb/ (props changed) user/jchandra/8-stable-mips/lib/libusb/usb.h (props changed) user/jchandra/8-stable-mips/lib/libusbhid/ (props changed) user/jchandra/8-stable-mips/lib/libutil/ (props changed) user/jchandra/8-stable-mips/lib/libz/ (props changed) user/jchandra/8-stable-mips/lib/libz/contrib/ (props changed) user/jchandra/8-stable-mips/lib/msun/ (props changed) user/jchandra/8-stable-mips/libexec/ (props changed) user/jchandra/8-stable-mips/libexec/ftpd/ (props changed) user/jchandra/8-stable-mips/libexec/rtld-elf/ (props changed) user/jchandra/8-stable-mips/libexec/tftpd/ (props changed) user/jchandra/8-stable-mips/release/ (props changed) user/jchandra/8-stable-mips/release/doc/en_US.ISO8859-1/hardware/ (props changed) user/jchandra/8-stable-mips/release/picobsd/ (props changed) user/jchandra/8-stable-mips/release/picobsd/floppy.tree/sbin/ (props changed) user/jchandra/8-stable-mips/release/picobsd/floppy.tree/sbin/dhclient-script (props changed) user/jchandra/8-stable-mips/release/picobsd/qemu/ (props changed) user/jchandra/8-stable-mips/release/picobsd/tinyware/login/ (props changed) user/jchandra/8-stable-mips/release/powerpc/ (props changed) user/jchandra/8-stable-mips/sbin/ (props changed) user/jchandra/8-stable-mips/sbin/atacontrol/ (props changed) user/jchandra/8-stable-mips/sbin/bsdlabel/ (props changed) user/jchandra/8-stable-mips/sbin/camcontrol/ (props changed) user/jchandra/8-stable-mips/sbin/ddb/ (props changed) user/jchandra/8-stable-mips/sbin/devd/ (props changed) user/jchandra/8-stable-mips/sbin/devfs/ (props changed) user/jchandra/8-stable-mips/sbin/dhclient/ (props changed) user/jchandra/8-stable-mips/sbin/dump/ (props changed) user/jchandra/8-stable-mips/sbin/dumpfs/ (props changed) user/jchandra/8-stable-mips/sbin/fsck/ (props changed) user/jchandra/8-stable-mips/sbin/fsck_ffs/ (props changed) user/jchandra/8-stable-mips/sbin/fsck_msdosfs/ (props changed) user/jchandra/8-stable-mips/sbin/fsirand/ (props changed) user/jchandra/8-stable-mips/sbin/geom/ (props changed) user/jchandra/8-stable-mips/sbin/geom/class/part/ (props changed) user/jchandra/8-stable-mips/sbin/geom/class/sched/gsched.8 (props changed) user/jchandra/8-stable-mips/sbin/geom/class/stripe/ (props changed) user/jchandra/8-stable-mips/sbin/ggate/ (props changed) user/jchandra/8-stable-mips/sbin/growfs/ (props changed) user/jchandra/8-stable-mips/sbin/hastctl/ (props changed) user/jchandra/8-stable-mips/sbin/hastd/ (props changed) user/jchandra/8-stable-mips/sbin/ifconfig/ (props changed) user/jchandra/8-stable-mips/sbin/ipfw/ (props changed) user/jchandra/8-stable-mips/sbin/iscontrol/ (props changed) user/jchandra/8-stable-mips/sbin/kldload/ (props changed) user/jchandra/8-stable-mips/sbin/kldstat/ (props changed) user/jchandra/8-stable-mips/sbin/mdconfig/ (props changed) user/jchandra/8-stable-mips/sbin/mksnap_ffs/ (props changed) user/jchandra/8-stable-mips/sbin/mount/ (props changed) user/jchandra/8-stable-mips/sbin/mount_cd9660/ (props changed) user/jchandra/8-stable-mips/sbin/mount_msdosfs/ (props changed) user/jchandra/8-stable-mips/sbin/mount_nfs/ (props changed) user/jchandra/8-stable-mips/sbin/natd/ (props changed) user/jchandra/8-stable-mips/sbin/newfs/ (props changed) user/jchandra/8-stable-mips/sbin/newfs_msdos/ (props changed) user/jchandra/8-stable-mips/sbin/ping6/ (props changed) user/jchandra/8-stable-mips/sbin/reboot/ (props changed) user/jchandra/8-stable-mips/sbin/restore/ (props changed) user/jchandra/8-stable-mips/sbin/routed/ (props changed) user/jchandra/8-stable-mips/sbin/setkey/ (props changed) user/jchandra/8-stable-mips/sbin/spppcontrol/ (props changed) user/jchandra/8-stable-mips/sbin/sysctl/ (props changed) user/jchandra/8-stable-mips/sbin/tunefs/ (props changed) user/jchandra/8-stable-mips/sbin/umount/ (props changed) user/jchandra/8-stable-mips/secure/ (props changed) user/jchandra/8-stable-mips/secure/lib/libcrypto/ (props changed) user/jchandra/8-stable-mips/secure/lib/libssl/ (props changed) user/jchandra/8-stable-mips/secure/usr.bin/bdes/ (props changed) user/jchandra/8-stable-mips/secure/usr.bin/openssl/ (props changed) user/jchandra/8-stable-mips/share/dict/ (props changed) user/jchandra/8-stable-mips/share/examples/ (props changed) user/jchandra/8-stable-mips/share/examples/etc/ (props changed) user/jchandra/8-stable-mips/share/examples/kld/syscall/ (props changed) user/jchandra/8-stable-mips/share/man/ (props changed) user/jchandra/8-stable-mips/share/man/man1/ (props changed) user/jchandra/8-stable-mips/share/man/man3/ (props changed) user/jchandra/8-stable-mips/share/man/man4/ (props changed) user/jchandra/8-stable-mips/share/man/man5/ (props changed) user/jchandra/8-stable-mips/share/man/man7/ (props changed) user/jchandra/8-stable-mips/share/man/man8/ (props changed) user/jchandra/8-stable-mips/share/man/man9/ (props changed) user/jchandra/8-stable-mips/share/misc/ (props changed) user/jchandra/8-stable-mips/share/mk/ (props changed) user/jchandra/8-stable-mips/share/termcap/ (props changed) user/jchandra/8-stable-mips/share/timedef/ (props changed) user/jchandra/8-stable-mips/share/zoneinfo/ (props changed) user/jchandra/8-stable-mips/sys/ (props changed) user/jchandra/8-stable-mips/sys/amd64/include/xen/ (props changed) user/jchandra/8-stable-mips/sys/cddl/contrib/opensolaris/ (props changed) user/jchandra/8-stable-mips/sys/contrib/dev/acpica/ (props changed) user/jchandra/8-stable-mips/sys/contrib/pf/ (props changed) user/jchandra/8-stable-mips/sys/dev/xen/xenpci/ (props changed) user/jchandra/8-stable-mips/sys/mips/adm5120/adm5120reg.h (props changed) user/jchandra/8-stable-mips/sys/mips/adm5120/admpci.c (props changed) user/jchandra/8-stable-mips/sys/mips/adm5120/console.c (props changed) user/jchandra/8-stable-mips/sys/mips/adm5120/if_admswreg.h (props changed) user/jchandra/8-stable-mips/sys/mips/adm5120/obiovar.h (props changed) user/jchandra/8-stable-mips/sys/mips/adm5120/std.adm5120 (props changed) user/jchandra/8-stable-mips/sys/mips/adm5120/uart_bus_adm5120.c (props changed) user/jchandra/8-stable-mips/sys/mips/adm5120/uart_dev_adm5120.c (props changed) user/jchandra/8-stable-mips/sys/mips/adm5120/uart_dev_adm5120.h (props changed) user/jchandra/8-stable-mips/sys/mips/alchemy/files.alchemy (props changed) user/jchandra/8-stable-mips/sys/mips/alchemy/std.alchemy (props changed) user/jchandra/8-stable-mips/sys/mips/atheros/apb.c (props changed) user/jchandra/8-stable-mips/sys/mips/atheros/apbvar.h (props changed) user/jchandra/8-stable-mips/sys/mips/atheros/ar71xx_bus_space_reversed.c (props changed) user/jchandra/8-stable-mips/sys/mips/atheros/ar71xx_bus_space_reversed.h (props changed) user/jchandra/8-stable-mips/sys/mips/atheros/ar71xx_ehci.c (props changed) user/jchandra/8-stable-mips/sys/mips/atheros/ar71xx_ohci.c (props changed) user/jchandra/8-stable-mips/sys/mips/atheros/ar71xx_pci_bus_space.c (props changed) user/jchandra/8-stable-mips/sys/mips/atheros/ar71xx_pci_bus_space.h (props changed) user/jchandra/8-stable-mips/sys/mips/cavium/dev/ (props changed) user/jchandra/8-stable-mips/sys/mips/conf/.cvsignore (props changed) user/jchandra/8-stable-mips/sys/mips/conf/ADM5120.hints (props changed) user/jchandra/8-stable-mips/sys/mips/conf/DEFAULTS (props changed) user/jchandra/8-stable-mips/sys/mips/conf/IDT (props changed) user/jchandra/8-stable-mips/sys/mips/conf/IDT.hints (props changed) user/jchandra/8-stable-mips/sys/mips/conf/MALTA.hints (props changed) user/jchandra/8-stable-mips/sys/mips/conf/SENTRY5.hints (props changed) user/jchandra/8-stable-mips/sys/mips/idt/idtpci.c (props changed) user/jchandra/8-stable-mips/sys/mips/idt/idtreg.h (props changed) user/jchandra/8-stable-mips/sys/mips/idt/if_kr.c (props changed) user/jchandra/8-stable-mips/sys/mips/idt/if_krreg.h (props changed) user/jchandra/8-stable-mips/sys/mips/idt/obiovar.h (props changed) user/jchandra/8-stable-mips/sys/mips/idt/std.idt (props changed) user/jchandra/8-stable-mips/sys/mips/include/bootinfo.h (props changed) user/jchandra/8-stable-mips/sys/mips/include/bswap.h (props changed) user/jchandra/8-stable-mips/sys/mips/include/bus_dma.h (props changed) user/jchandra/8-stable-mips/sys/mips/include/cache_r4k.h (props changed) user/jchandra/8-stable-mips/sys/mips/include/clockvar.h (props changed) user/jchandra/8-stable-mips/sys/mips/include/cputypes.h (props changed) user/jchandra/8-stable-mips/sys/mips/include/exec.h (props changed) user/jchandra/8-stable-mips/sys/mips/include/floatingpoint.h (props changed) user/jchandra/8-stable-mips/sys/mips/include/fpu.h (props changed) user/jchandra/8-stable-mips/sys/mips/include/frame.h (props changed) user/jchandra/8-stable-mips/sys/mips/include/gdb_machdep.h (props changed) user/jchandra/8-stable-mips/sys/mips/include/ieee.h (props changed) user/jchandra/8-stable-mips/sys/mips/include/ieeefp.h (props changed) user/jchandra/8-stable-mips/sys/mips/include/in_cksum.h (props changed) user/jchandra/8-stable-mips/sys/mips/include/iodev.h (props changed) user/jchandra/8-stable-mips/sys/mips/include/limits.h (props changed) user/jchandra/8-stable-mips/sys/mips/include/metadata.h (props changed) user/jchandra/8-stable-mips/sys/mips/include/minidump.h (props changed) user/jchandra/8-stable-mips/sys/mips/include/mips_opcode.h (props changed) user/jchandra/8-stable-mips/sys/mips/include/mp_watchdog.h (props changed) user/jchandra/8-stable-mips/sys/mips/include/mutex.h (props changed) user/jchandra/8-stable-mips/sys/mips/include/pci_cfgreg.h (props changed) user/jchandra/8-stable-mips/sys/mips/include/ppireg.h (props changed) user/jchandra/8-stable-mips/sys/mips/include/ptrace.h (props changed) user/jchandra/8-stable-mips/sys/mips/include/reg.h (props changed) user/jchandra/8-stable-mips/sys/mips/include/reloc.h (props changed) user/jchandra/8-stable-mips/sys/mips/include/resource.h (props changed) user/jchandra/8-stable-mips/sys/mips/include/sigframe.h (props changed) user/jchandra/8-stable-mips/sys/mips/include/signal.h (props changed) user/jchandra/8-stable-mips/sys/mips/include/stdarg.h (props changed) user/jchandra/8-stable-mips/sys/mips/include/timerreg.h (props changed) user/jchandra/8-stable-mips/sys/mips/include/varargs.h (props changed) user/jchandra/8-stable-mips/sys/mips/malta/gt.c (props changed) user/jchandra/8-stable-mips/sys/mips/malta/gtreg.h (props changed) user/jchandra/8-stable-mips/sys/mips/malta/gtvar.h (props changed) user/jchandra/8-stable-mips/sys/mips/malta/obiovar.h (props changed) user/jchandra/8-stable-mips/sys/mips/malta/yamon.c (props changed) user/jchandra/8-stable-mips/sys/mips/mips/db_disasm.c (props changed) user/jchandra/8-stable-mips/sys/mips/mips/elf64_machdep.c (props changed) user/jchandra/8-stable-mips/sys/mips/rmi/Makefile.msgring (props changed) user/jchandra/8-stable-mips/sys/mips/rmi/dev/xlr/atx_cpld.h (props changed) user/jchandra/8-stable-mips/sys/mips/rmi/dev/xlr/xgmac_mdio.h (props changed) user/jchandra/8-stable-mips/sys/mips/rmi/msgring.c (props changed) user/jchandra/8-stable-mips/sys/mips/rmi/msgring.cfg (props changed) user/jchandra/8-stable-mips/sys/mips/rmi/msgring_xls.c (props changed) user/jchandra/8-stable-mips/sys/mips/rmi/msgring_xls.cfg (props changed) user/jchandra/8-stable-mips/sys/mips/rmi/rootfs_list.txt (props changed) user/jchandra/8-stable-mips/sys/mips/rmi/uart_cpu_mips_xlr.c (props changed) user/jchandra/8-stable-mips/sys/mips/rmi/xlr_csum_nocopy.S (props changed) user/jchandra/8-stable-mips/sys/mips/sentry5/obiovar.h (props changed) user/jchandra/8-stable-mips/sys/mips/sentry5/s5reg.h (props changed) user/jchandra/8-stable-mips/sys/mips/sibyte/files.sibyte (props changed) user/jchandra/8-stable-mips/tools/ (props changed) user/jchandra/8-stable-mips/tools/build/mk/ (props changed) user/jchandra/8-stable-mips/tools/build/options/ (props changed) user/jchandra/8-stable-mips/tools/debugscripts/ (props changed) user/jchandra/8-stable-mips/tools/kerneldoc/subsys/ (props changed) user/jchandra/8-stable-mips/tools/regression/acltools/ (props changed) user/jchandra/8-stable-mips/tools/regression/aio/aiotest/ (props changed) user/jchandra/8-stable-mips/tools/regression/bin/sh/ (props changed) user/jchandra/8-stable-mips/tools/regression/fifo/ (props changed) user/jchandra/8-stable-mips/tools/regression/geom/ (props changed) user/jchandra/8-stable-mips/tools/regression/lib/libc/ (props changed) user/jchandra/8-stable-mips/tools/regression/lib/msun/test-conj.t (props changed) user/jchandra/8-stable-mips/tools/regression/mqueue/mqtest1/ (props changed) user/jchandra/8-stable-mips/tools/regression/mqueue/mqtest2/ (props changed) user/jchandra/8-stable-mips/tools/regression/mqueue/mqtest3/ (props changed) user/jchandra/8-stable-mips/tools/regression/mqueue/mqtest4/ (props changed) user/jchandra/8-stable-mips/tools/regression/mqueue/mqtest5/ (props changed) user/jchandra/8-stable-mips/tools/regression/poll/ (props changed) user/jchandra/8-stable-mips/tools/regression/posixsem/ (props changed) user/jchandra/8-stable-mips/tools/regression/priv/ (props changed) user/jchandra/8-stable-mips/tools/regression/usr.bin/ (props changed) user/jchandra/8-stable-mips/tools/regression/usr.bin/pkill/pgrep-_g.t (props changed) user/jchandra/8-stable-mips/tools/regression/usr.bin/pkill/pgrep-_s.t (props changed) user/jchandra/8-stable-mips/tools/regression/usr.bin/pkill/pkill-_g.t (props changed) user/jchandra/8-stable-mips/tools/regression/usr.bin/sed/ (props changed) user/jchandra/8-stable-mips/tools/regression/usr.bin/tr/ (props changed) user/jchandra/8-stable-mips/tools/test/ (props changed) user/jchandra/8-stable-mips/tools/tools/ (props changed) user/jchandra/8-stable-mips/tools/tools/ath/ (props changed) user/jchandra/8-stable-mips/tools/tools/ath/common/dumpregs.h (props changed) user/jchandra/8-stable-mips/tools/tools/ath/common/dumpregs_5210.c (props changed) user/jchandra/8-stable-mips/tools/tools/ath/common/dumpregs_5211.c (props changed) user/jchandra/8-stable-mips/tools/tools/ath/common/dumpregs_5212.c (props changed) user/jchandra/8-stable-mips/tools/tools/ath/common/dumpregs_5416.c (props changed) user/jchandra/8-stable-mips/tools/tools/nanobsd/ (props changed) user/jchandra/8-stable-mips/tools/tools/netrate/ (props changed) user/jchandra/8-stable-mips/tools/tools/netrate/tcpp/ (props changed) user/jchandra/8-stable-mips/tools/tools/termcap/termcap.pl (props changed) user/jchandra/8-stable-mips/tools/tools/umastat/ (props changed) user/jchandra/8-stable-mips/tools/tools/vimage/ (props changed) user/jchandra/8-stable-mips/usr.bin/ (props changed) user/jchandra/8-stable-mips/usr.bin/apply/ (props changed) user/jchandra/8-stable-mips/usr.bin/ar/ (props changed) user/jchandra/8-stable-mips/usr.bin/awk/ (props changed) user/jchandra/8-stable-mips/usr.bin/biff/ (props changed) user/jchandra/8-stable-mips/usr.bin/c89/ (props changed) user/jchandra/8-stable-mips/usr.bin/c99/ (props changed) user/jchandra/8-stable-mips/usr.bin/calendar/ (props changed) user/jchandra/8-stable-mips/usr.bin/catman/ (props changed) user/jchandra/8-stable-mips/usr.bin/column/ (props changed) user/jchandra/8-stable-mips/usr.bin/comm/ (props changed) user/jchandra/8-stable-mips/usr.bin/cpio/ (props changed) user/jchandra/8-stable-mips/usr.bin/csup/ (props changed) user/jchandra/8-stable-mips/usr.bin/du/ (props changed) user/jchandra/8-stable-mips/usr.bin/ee/ (props changed) user/jchandra/8-stable-mips/usr.bin/enigma/ (props changed) user/jchandra/8-stable-mips/usr.bin/fetch/ (props changed) user/jchandra/8-stable-mips/usr.bin/find/ (props changed) user/jchandra/8-stable-mips/usr.bin/finger/ (props changed) user/jchandra/8-stable-mips/usr.bin/fold/ (props changed) user/jchandra/8-stable-mips/usr.bin/fstat/ (props changed) user/jchandra/8-stable-mips/usr.bin/gcore/ (props changed) user/jchandra/8-stable-mips/usr.bin/getopt/ (props changed) user/jchandra/8-stable-mips/usr.bin/gzip/ (props changed) user/jchandra/8-stable-mips/usr.bin/hexdump/ (props changed) user/jchandra/8-stable-mips/usr.bin/indent/ (props changed) user/jchandra/8-stable-mips/usr.bin/jot/ (props changed) user/jchandra/8-stable-mips/usr.bin/kdump/ (props changed) user/jchandra/8-stable-mips/usr.bin/killall/ (props changed) user/jchandra/8-stable-mips/usr.bin/ktrace/ (props changed) user/jchandra/8-stable-mips/usr.bin/lex/ (props changed) user/jchandra/8-stable-mips/usr.bin/locale/ (props changed) user/jchandra/8-stable-mips/usr.bin/lockf/ (props changed) user/jchandra/8-stable-mips/usr.bin/look/ (props changed) user/jchandra/8-stable-mips/usr.bin/mail/ (props changed) user/jchandra/8-stable-mips/usr.bin/make/ (props changed) user/jchandra/8-stable-mips/usr.bin/makewhatis/ (props changed) user/jchandra/8-stable-mips/usr.bin/minigzip/ (props changed) user/jchandra/8-stable-mips/usr.bin/ncal/ (props changed) user/jchandra/8-stable-mips/usr.bin/netstat/ (props changed) user/jchandra/8-stable-mips/usr.bin/pathchk/ (props changed) user/jchandra/8-stable-mips/usr.bin/perror/ (props changed) user/jchandra/8-stable-mips/usr.bin/procstat/ (props changed) user/jchandra/8-stable-mips/usr.bin/rpcgen/ (props changed) user/jchandra/8-stable-mips/usr.bin/ruptime/ (props changed) user/jchandra/8-stable-mips/usr.bin/script/ (props changed) user/jchandra/8-stable-mips/usr.bin/sed/ (props changed) user/jchandra/8-stable-mips/usr.bin/sockstat/ (props changed) user/jchandra/8-stable-mips/usr.bin/split/ (props changed) user/jchandra/8-stable-mips/usr.bin/stat/ (props changed) user/jchandra/8-stable-mips/usr.bin/systat/ (props changed) user/jchandra/8-stable-mips/usr.bin/tar/ (props changed) user/jchandra/8-stable-mips/usr.bin/tftp/ (props changed) user/jchandra/8-stable-mips/usr.bin/touch/ (props changed) user/jchandra/8-stable-mips/usr.bin/tr/ (props changed) user/jchandra/8-stable-mips/usr.bin/truss/ (props changed) user/jchandra/8-stable-mips/usr.bin/uname/ (props changed) user/jchandra/8-stable-mips/usr.bin/unifdef/ (props changed) user/jchandra/8-stable-mips/usr.bin/uniq/ (props changed) user/jchandra/8-stable-mips/usr.bin/unzip/ (props changed) user/jchandra/8-stable-mips/usr.bin/uudecode/ (props changed) user/jchandra/8-stable-mips/usr.bin/vmstat/ (props changed) user/jchandra/8-stable-mips/usr.bin/w/ (props changed) user/jchandra/8-stable-mips/usr.bin/whois/ (props changed) user/jchandra/8-stable-mips/usr.bin/xinstall/ (props changed) user/jchandra/8-stable-mips/usr.bin/xlint/ (props changed) user/jchandra/8-stable-mips/usr.bin/yacc/ (props changed) user/jchandra/8-stable-mips/usr.sbin/ (props changed) user/jchandra/8-stable-mips/usr.sbin/Makefile (props changed) user/jchandra/8-stable-mips/usr.sbin/acpi/ (props changed) user/jchandra/8-stable-mips/usr.sbin/arp/ (props changed) user/jchandra/8-stable-mips/usr.sbin/asf/ (props changed) user/jchandra/8-stable-mips/usr.sbin/bluetooth/ (props changed) user/jchandra/8-stable-mips/usr.sbin/bluetooth/bthidcontrol/ (props changed) user/jchandra/8-stable-mips/usr.sbin/bluetooth/bthidd/ (props changed) user/jchandra/8-stable-mips/usr.sbin/boot0cfg/ (props changed) user/jchandra/8-stable-mips/usr.sbin/bsnmpd/ (props changed) user/jchandra/8-stable-mips/usr.sbin/burncd/ (props changed) user/jchandra/8-stable-mips/usr.sbin/cdcontrol/ (props changed) user/jchandra/8-stable-mips/usr.sbin/chown/ (props changed) user/jchandra/8-stable-mips/usr.sbin/config/ (props changed) user/jchandra/8-stable-mips/usr.sbin/cpucontrol/ (props changed) user/jchandra/8-stable-mips/usr.sbin/crashinfo/ (props changed) user/jchandra/8-stable-mips/usr.sbin/cron/ (props changed) user/jchandra/8-stable-mips/usr.sbin/crunch/examples/ (props changed) user/jchandra/8-stable-mips/usr.sbin/ctm/ (props changed) user/jchandra/8-stable-mips/usr.sbin/cxgbtool/ (props changed) user/jchandra/8-stable-mips/usr.sbin/devinfo/ (props changed) user/jchandra/8-stable-mips/usr.sbin/diskinfo/ (props changed) user/jchandra/8-stable-mips/usr.sbin/dumpcis/cardinfo.h (props changed) user/jchandra/8-stable-mips/usr.sbin/dumpcis/cis.h (props changed) user/jchandra/8-stable-mips/usr.sbin/faithd/ (props changed) user/jchandra/8-stable-mips/usr.sbin/fdcontrol/ (props changed) user/jchandra/8-stable-mips/usr.sbin/fdformat/ (props changed) user/jchandra/8-stable-mips/usr.sbin/fdread/ (props changed) user/jchandra/8-stable-mips/usr.sbin/fdwrite/ (props changed) user/jchandra/8-stable-mips/usr.sbin/fifolog/ (props changed) user/jchandra/8-stable-mips/usr.sbin/flowctl/ (props changed) user/jchandra/8-stable-mips/usr.sbin/freebsd-update/ (props changed) user/jchandra/8-stable-mips/usr.sbin/i2c/ (props changed) user/jchandra/8-stable-mips/usr.sbin/inetd/ (props changed) user/jchandra/8-stable-mips/usr.sbin/iostat/ (props changed) user/jchandra/8-stable-mips/usr.sbin/jail/ (props changed) user/jchandra/8-stable-mips/usr.sbin/jls/ (props changed) user/jchandra/8-stable-mips/usr.sbin/lpr/ (props changed) user/jchandra/8-stable-mips/usr.sbin/mailwrapper/ (props changed) user/jchandra/8-stable-mips/usr.sbin/makefs/ffs/ffs_bswap.c (props changed) user/jchandra/8-stable-mips/usr.sbin/makefs/ffs/ffs_subr.c (props changed) user/jchandra/8-stable-mips/usr.sbin/makefs/ffs/ufs_bswap.h (props changed) user/jchandra/8-stable-mips/usr.sbin/makefs/getid.c (props changed) user/jchandra/8-stable-mips/usr.sbin/mergemaster/ (props changed) user/jchandra/8-stable-mips/usr.sbin/mfiutil/ (props changed) user/jchandra/8-stable-mips/usr.sbin/mountd/ (props changed) user/jchandra/8-stable-mips/usr.sbin/moused/ (props changed) user/jchandra/8-stable-mips/usr.sbin/mptutil/ (props changed) user/jchandra/8-stable-mips/usr.sbin/mtest/ (props changed) user/jchandra/8-stable-mips/usr.sbin/mtree/ (props changed) user/jchandra/8-stable-mips/usr.sbin/named/ (props changed) user/jchandra/8-stable-mips/usr.sbin/ndp/ (props changed) user/jchandra/8-stable-mips/usr.sbin/newsyslog/ (props changed) user/jchandra/8-stable-mips/usr.sbin/nfsdumpstate/ (props changed) user/jchandra/8-stable-mips/usr.sbin/ntp/ (props changed) user/jchandra/8-stable-mips/usr.sbin/pciconf/ (props changed) user/jchandra/8-stable-mips/usr.sbin/periodic/ (props changed) user/jchandra/8-stable-mips/usr.sbin/pmcannotate/ (props changed) user/jchandra/8-stable-mips/usr.sbin/pmccontrol/ (props changed) user/jchandra/8-stable-mips/usr.sbin/pmcstat/ (props changed) user/jchandra/8-stable-mips/usr.sbin/powerd/ (props changed) user/jchandra/8-stable-mips/usr.sbin/ppp/ (props changed) user/jchandra/8-stable-mips/usr.sbin/pppctl/ (props changed) user/jchandra/8-stable-mips/usr.sbin/pstat/ (props changed) user/jchandra/8-stable-mips/usr.sbin/rpc.lockd/ (props changed) user/jchandra/8-stable-mips/usr.sbin/rpc.umntall/ (props changed) user/jchandra/8-stable-mips/usr.sbin/rtadvd/ (props changed) user/jchandra/8-stable-mips/usr.sbin/rtsold/ (props changed) user/jchandra/8-stable-mips/usr.sbin/sade/ (props changed) user/jchandra/8-stable-mips/usr.sbin/service/ (props changed) user/jchandra/8-stable-mips/usr.sbin/services_mkdb/ (props changed) user/jchandra/8-stable-mips/usr.sbin/setfmac/ (props changed) user/jchandra/8-stable-mips/usr.sbin/setpmac/ (props changed) user/jchandra/8-stable-mips/usr.sbin/smbmsg/ (props changed) user/jchandra/8-stable-mips/usr.sbin/sysinstall/ (props changed) user/jchandra/8-stable-mips/usr.sbin/syslogd/ (props changed) user/jchandra/8-stable-mips/usr.sbin/traceroute/ (props changed) user/jchandra/8-stable-mips/usr.sbin/traceroute6/ (props changed) user/jchandra/8-stable-mips/usr.sbin/uathload/ (props changed) user/jchandra/8-stable-mips/usr.sbin/ugidfw/ (props changed) user/jchandra/8-stable-mips/usr.sbin/uhsoctl/ (props changed) user/jchandra/8-stable-mips/usr.sbin/usbconfig/ (props changed) user/jchandra/8-stable-mips/usr.sbin/vidcontrol/ (props changed) user/jchandra/8-stable-mips/usr.sbin/watchdogd/ (props changed) user/jchandra/8-stable-mips/usr.sbin/wpa/ (props changed) user/jchandra/8-stable-mips/usr.sbin/ypserv/ (props changed) user/jchandra/8-stable-mips/usr.sbin/zic/ (props changed) Modified: user/jchandra/8-stable-mips/contrib/binutils/bfd/elfxx-mips.c ============================================================================== --- user/jchandra/8-stable-mips/contrib/binutils/bfd/elfxx-mips.c Wed Nov 17 04:42:47 2010 (r215416) +++ user/jchandra/8-stable-mips/contrib/binutils/bfd/elfxx-mips.c Wed Nov 17 08:56:01 2010 (r215417) @@ -4324,6 +4324,15 @@ _bfd_mips_elf_section_processing (bfd *a bfd_mips_elf_swap_options_in (abfd, (Elf_External_Options *) l, &intopt); + if (intopt.size < sizeof (Elf_External_Options)) + { + (*_bfd_error_handler) + (_("Warning: bad `%s' option size %u smaller than its header"), + MIPS_ELF_OPTIONS_SECTION_NAME (abfd), intopt.size); + break; + } + + if (ABI_64_P (abfd) && intopt.kind == ODK_REGINFO) { bfd_byte buf[8]; @@ -4536,6 +4545,14 @@ _bfd_mips_elf_section_from_shdr (bfd *ab bfd_mips_elf_swap_options_in (abfd, (Elf_External_Options *) l, &intopt); + if (intopt.size < sizeof (Elf_External_Options)) + { + (*_bfd_error_handler) + (_("Warning: bad `%s' option size %u smaller than its header"), + MIPS_ELF_OPTIONS_SECTION_NAME (abfd), intopt.size); + break; + } + if (ABI_64_P (abfd) && intopt.kind == ODK_REGINFO) { Elf64_Internal_RegInfo intreg; Modified: user/jchandra/8-stable-mips/contrib/gcc/config/mips/freebsd.h ============================================================================== --- user/jchandra/8-stable-mips/contrib/gcc/config/mips/freebsd.h Wed Nov 17 04:42:47 2010 (r215416) +++ user/jchandra/8-stable-mips/contrib/gcc/config/mips/freebsd.h Wed Nov 17 08:56:01 2010 (r215417) @@ -65,19 +65,23 @@ Boston, MA 02110-1301, USA. */ #undef LINK_SPEC #define LINK_SPEC "\ - %{G*} %{mips1} %{mips2} %{mips3} %{mips4} %{mips32} %{mips32r2} %{mips64} \ + %{EB} %{EL} %(endian_spec) \ + %{G*} %{mips1} %{mips2} %{mips3} %{mips4} \ + %{mips32} %{mips32r2} %{mips64} %{mips64r2} \ %{bestGnum} %{call_shared} %{no_archive} %{exact_version} \ - %(fbsd_link_spec) " -#if 0 - %(endian_spec) -#endif + %{mabi=32:-melf32%{EB:b}%{EL:l}tsmip_fbsd} \ + %{mabi=n32:-melf32%{EB:b}%{EL:l}tsmipn32_fbsd} \ + %{mabi=64:-melf64%{EB:b}%{EL:l}tsmip_fbsd} \ + %{mabi=o64:-melf64%{EB:b}%{EL:l}tsmip_fbsd} \ + %(fbsd_link_spec)" + /* Reset our STARTFILE_SPEC which was properly set in config/freebsd.h but trashed by config/mips/elf.h. */ #undef STARTFILE_SPEC #define STARTFILE_SPEC FBSD_STARTFILE_SPEC -/* Provide an ENDFILE_SPEC appropriate for FreeBSD/i386. */ +/* Provide an ENDFILE_SPEC appropriate for FreeBSD/mips. */ #undef ENDFILE_SPEC #define ENDFILE_SPEC FBSD_ENDFILE_SPEC @@ -97,6 +101,9 @@ Boston, MA 02110-1301, USA. */ Needs to agree with . GCC defaults come from c-decl.c, c-common.c, and config//.h. */ +#undef TARGET_DEFAULT +#define TARGET_DEFAULT (MASK_ABICALLS | MASK_SOFT_FLOAT) + #if TARGET_ENDIAN_DEFAULT != 0 #define TARGET_VERSION fprintf (stderr, " (FreeBSD/mips)"); #else @@ -127,29 +134,107 @@ Boston, MA 02110-1301, USA. */ if (TARGET_MIPS16) \ builtin_define ("__mips16"); \ \ + if (mips_abi == ABI_N32) \ + { \ + builtin_define ("__mips_n32"); \ + builtin_define ("_ABIN32=2"); \ + builtin_define ("_MIPS_SIM=_ABIN32"); \ + builtin_define ("_MIPS_SZLONG=32"); \ + builtin_define ("_MIPS_SZPTR=32"); \ + } \ + else if (mips_abi == ABI_64) \ + { \ + builtin_define ("__mips_n64"); \ + builtin_define ("_ABI64=3"); \ + builtin_define ("_MIPS_SIM=_ABI64"); \ + builtin_define ("_MIPS_SZLONG=64"); \ + builtin_define ("_MIPS_SZPTR=64"); \ + } \ + else if (mips_abi == ABI_O64) \ + { \ + builtin_define ("__mips_o64"); \ + builtin_define ("_ABIO64=4"); \ + builtin_define ("_MIPS_SIM=_ABIO64"); \ + builtin_define ("_MIPS_SZLONG=64"); \ + builtin_define ("_MIPS_SZPTR=64"); \ + } \ + else if (mips_abi == ABI_EABI) \ + { \ + builtin_define ("__mips_eabi"); \ + builtin_define ("_ABIEMB=5"); \ + builtin_define ("_MIPS_SIM=_ABIEMB"); \ + if (TARGET_LONG64) \ + builtin_define ("_MIPS_SZLONG=64"); \ + else \ + builtin_define ("_MIPS_SZLONG=32"); \ + if (TARGET_64BIT) \ + builtin_define ("_MIPS_SZPTR=64"); \ + else \ + builtin_define ("_MIPS_SZPTR=32"); \ + } \ + else \ + { \ + builtin_define ("__mips_o32"); \ + builtin_define ("_ABIO32=1"); \ + builtin_define ("_MIPS_SIM=_ABIO32"); \ + builtin_define ("_MIPS_SZLONG=32"); \ + builtin_define ("_MIPS_SZPTR=32"); \ + } \ + if (TARGET_FLOAT64) \ + builtin_define ("_MIPS_FPSET=32"); \ + else \ + builtin_define ("_MIPS_FPSET=16"); \ + \ + builtin_define ("_MIPS_SZINT=32"); \ + \ MIPS_CPP_SET_PROCESSOR ("_MIPS_ARCH", mips_arch_info); \ MIPS_CPP_SET_PROCESSOR ("_MIPS_TUNE", mips_tune_info); \ \ - if (ISA_MIPS3) \ - builtin_define ("__mips=3"); \ + if (ISA_MIPS1) \ + { \ + builtin_define ("__mips=1"); \ + builtin_define ("_MIPS_ISA=_MIPS_ISA_MIPS1"); \ + } \ + else if (ISA_MIPS2) \ + { \ + builtin_define ("__mips=2"); \ + builtin_define ("_MIPS_ISA=_MIPS_ISA_MIPS2"); \ + } \ + else if (ISA_MIPS3) \ + { \ + builtin_define ("__mips=3"); \ + builtin_define ("_MIPS_ISA=_MIPS_ISA_MIPS3"); \ + } \ else if (ISA_MIPS4) \ - builtin_define ("__mips=4"); \ + { \ + builtin_define ("__mips=4"); \ + builtin_define ("_MIPS_ISA=_MIPS_ISA_MIPS4"); \ + } \ else if (ISA_MIPS32) \ { \ builtin_define ("__mips=32"); \ + builtin_define ("_MIPS_ISA=_MIPS_ISA_MIPS32"); \ builtin_define ("__mips_isa_rev=1"); \ } \ else if (ISA_MIPS32R2) \ { \ builtin_define ("__mips=32"); \ + builtin_define ("_MIPS_ISA=_MIPS_ISA_MIPS32"); \ builtin_define ("__mips_isa_rev=2"); \ } \ else if (ISA_MIPS64) \ { \ builtin_define ("__mips=64"); \ + builtin_define ("_MIPS_ISA=_MIPS_ISA_MIPS64"); \ builtin_define ("__mips_isa_rev=1"); \ } \ - \ +/* else if (ISA_MIPS64R2) \ + { \ + builtin_define ("__mips=64"); \ + builtin_define ("_MIPS_ISA=_MIPS_ISA_MIPS64"); \ + builtin_define ("__mips_isa_rev=2"); \ + } \ +*/ \ if (TARGET_HARD_FLOAT) \ builtin_define ("__mips_hard_float"); \ else if (TARGET_SOFT_FLOAT) \ @@ -164,29 +249,33 @@ Boston, MA 02110-1301, USA. */ builtin_define ("__MIPSEL__"); \ \ /* No language dialect defines. */ \ - \ - if (mips_abi == ABI_EABI) \ - builtin_define ("__mips_eabi"); \ - else if (mips_abi == ABI_N32) \ - builtin_define ("__mips_n32"); \ - else if (mips_abi == ABI_64) \ - builtin_define ("__mips_n64"); \ - else if (mips_abi == ABI_O64) \ - builtin_define ("__mips_o64"); \ - else \ - builtin_define ("__mips_o32"); \ - \ if (TARGET_ABICALLS) \ builtin_define ("__ABICALLS__"); \ } \ while (0) -/* Default to the mips32 ISA */ -#undef DRIVER_SELF_SPECS +/* Default ABI and ISA */ +#undef DRIVER_SELF_SPECS +#if MIPS_ABI_DEFAULT == ABI_N32 #define DRIVER_SELF_SPECS \ - "%{!march=*: -march=mips32}" -#if 0 - "%{!EB:%{!EL:%(endian_spec)}}", + "%{!EB:%{!EL:%(endian_spec)}}", \ + "%{!march=*: -march=mips64}", \ + "%{!mabi=*: -mabi=n32}" +#elif MIPS_ABI_DEFAULT == ABI_64 +#define DRIVER_SELF_SPECS \ + "%{!EB:%{!EL:%(endian_spec)}}", \ + "%{!march=*: -march=mips64}", \ + "%{!mabi=*: -mabi=64}" +#elif MIPS_ABI_DEFAULT == ABI_O64 +#define DRIVER_SELF_SPECS \ + "%{!EB:%{!EL:%(endian_spec)}}", \ + "%{!march=*: -march=mips64}", \ + "%{!mabi=*: -mabi=o64}" +#else /* default to o32 */ +#define DRIVER_SELF_SPECS \ + "%{!EB:%{!EL:%(endian_spec)}}", \ + "%{!march=*: -march=mips32}", \ + "%{!mabi=*: -mabi=32}" #endif #if 0 @@ -238,6 +327,15 @@ Boston, MA 02110-1301, USA. */ #undef LOCAL_LABEL_PREFIX #define LOCAL_LABEL_PREFIX "." +/* Currently we don't support 128bit long doubles, so for now we force + n32 to be 64bit. */ +#undef LONG_DOUBLE_TYPE_SIZE +#define LONG_DOUBLE_TYPE_SIZE 64 + +#ifdef IN_LIBGCC2 +#undef LIBGCC2_LONG_DOUBLE_TYPE_SIZE +#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 64 +#endif /************************[ Debugger stuff ]*********************************/ Modified: user/jchandra/8-stable-mips/gnu/lib/libgcc/Makefile ============================================================================== --- user/jchandra/8-stable-mips/gnu/lib/libgcc/Makefile Wed Nov 17 04:42:47 2010 (r215416) +++ user/jchandra/8-stable-mips/gnu/lib/libgcc/Makefile Wed Nov 17 08:56:01 2010 (r215417) @@ -115,6 +115,10 @@ LIB2FUNCS_EXTRA = floatunsidf.c floatuns # _fixsfsi _fixunssfsi _floatdidf _floatdisf .endif +.if ${TARGET_ARCH} == "mips" +LIB2FUNCS_EXTRA = floatunsidf.c floatunsisf.c +.endif + .if ${TARGET_ARCH} == "ia64" # from config/ia64/t-ia64 LIB1ASMSRC = lib1funcs.asm @@ -179,7 +183,7 @@ OBJ_GRPS = STD DIV # # Floating point emulation functions # -.if ${TARGET_ARCH} == "armNOT_YET" || ${TARGET_ARCH} == "mips" || \ +.if ${TARGET_ARCH} == "armNOT_YET" || \ ${TARGET_ARCH} == "powerpc" || ${TARGET_ARCH} == "sparc64" FPBIT_CFLAGS = -DFINE_GRAINED_LIBRARIES -DFLOAT Modified: user/jchandra/8-stable-mips/gnu/usr.bin/binutils/Makefile.inc0 ============================================================================== --- user/jchandra/8-stable-mips/gnu/usr.bin/binutils/Makefile.inc0 Wed Nov 17 04:42:47 2010 (r215416) +++ user/jchandra/8-stable-mips/gnu/usr.bin/binutils/Makefile.inc0 Wed Nov 17 08:56:01 2010 (r215417) @@ -22,7 +22,8 @@ RELTOP:= .. RELSRC= ${RELTOP}/../../../contrib/binutils SRCDIR= ${.CURDIR}/${RELSRC} -.if ${TARGET_ARCH} == "arm" || ${TARGET_ARCH} == "i386" || ${TARGET_ARCH} == "powerpc" +.if ${TARGET_ARCH} == "arm" || ${TARGET_ARCH} == "i386" || \ + ${TARGET_ARCH} == "powerpc" || ${TARGET_ARCH} == "mips" CFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=32 .else CFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=64 Modified: user/jchandra/8-stable-mips/gnu/usr.bin/binutils/ld/Makefile.mips ============================================================================== --- user/jchandra/8-stable-mips/gnu/usr.bin/binutils/ld/Makefile.mips Wed Nov 17 04:42:47 2010 (r215416) +++ user/jchandra/8-stable-mips/gnu/usr.bin/binutils/ld/Makefile.mips Wed Nov 17 08:56:01 2010 (r215417) @@ -10,15 +10,23 @@ NATIVE_EMULATION=elf${_sz}btsmip_fbsd NATIVE_EMULATION=elf${_sz}ltsmip_fbsd .endif -SRCS+= e${NATIVE_EMULATION}.c -CLEANFILES+= e${NATIVE_EMULATION}.c - +MIPS_ABIS=elf32btsmip_fbsd elf32ltsmip_fbsd elf64btsmip_fbsd elf64ltsmip_fbsd \ + elf32btsmipn32_fbsd elf32ltsmipn32_fbsd +.for abi in ${MIPS_ABIS} +#.if (${abi} != ${NATIVE_EMULATION}) +EMS+= ${abi} +#.endif +.for ext in ${ELF_SCR_EXT} +LDSCRIPTS+= ${abi}.${ext} +.endfor +SRCS+= e${abi}.c +CLEANFILES+= e${abi}.c # nb: elf32 handles both elf32 and elf64 targets -e${NATIVE_EMULATION}.c: ${.CURDIR}/${NATIVE_EMULATION}.sh emultempl/elf32.em \ +e${abi}.c: ${.CURDIR}/${abi}.sh emultempl/elf32.em \ scripttempl/elf.sc genscripts.sh stringify.sed sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${LIBSERACHPATH} \ ${TOOLS_PREFIX}/usr \ ${HOST} ${TARGET_TUPLE} ${TARGET_TUPLE} \ - ${NATIVE_EMULATION} "" no ${NATIVE_EMULATION} ${TARGET_TUPLE} \ - ${.CURDIR}/${NATIVE_EMULATION}.sh - + ${abi} "" no ${abi} ${TARGET_TUPLE} \ + ${.CURDIR}/${abi}.sh +.endfor Copied and modified: user/jchandra/8-stable-mips/gnu/usr.bin/binutils/ld/elf32btsmipn32_fbsd.sh (from r204548, head/gnu/usr.bin/binutils/ld/elf32btsmipn32_fbsd.sh) ============================================================================== --- head/gnu/usr.bin/binutils/ld/elf32btsmipn32_fbsd.sh Tue Mar 2 05:43:04 2010 (r204548, copy source) +++ user/jchandra/8-stable-mips/gnu/usr.bin/binutils/ld/elf32btsmipn32_fbsd.sh Wed Nov 17 08:56:01 2010 (r215417) @@ -1,4 +1,5 @@ # $FreeBSD$ -. ${srcdir}/emulparams/elf32btsmip.sh +. ${srcdir}/emulparams/elf32btsmipn32.sh . ${srcdir}/emulparams/elf_fbsd.sh GENERATE_PIE_SCRIPT=yes +ALIGNMENT=8 Copied and modified: user/jchandra/8-stable-mips/gnu/usr.bin/binutils/ld/elf32ltsmipn32_fbsd.sh (from r204548, head/gnu/usr.bin/binutils/ld/elf32ltsmipn32_fbsd.sh) ============================================================================== --- head/gnu/usr.bin/binutils/ld/elf32ltsmipn32_fbsd.sh Tue Mar 2 05:43:04 2010 (r204548, copy source) +++ user/jchandra/8-stable-mips/gnu/usr.bin/binutils/ld/elf32ltsmipn32_fbsd.sh Wed Nov 17 08:56:01 2010 (r215417) @@ -1,4 +1,5 @@ # $FreeBSD$ -. ${srcdir}/emulparams/elf32ltsmip.sh +. ${srcdir}/emulparams/elf32ltsmipn32.sh . ${srcdir}/emulparams/elf_fbsd.sh GENERATE_PIE_SCRIPT=yes +ALIGNMENT=8 Modified: user/jchandra/8-stable-mips/gnu/usr.bin/binutils/ld/genscripts.sh ============================================================================== --- user/jchandra/8-stable-mips/gnu/usr.bin/binutils/ld/genscripts.sh Wed Nov 17 04:42:47 2010 (r215416) +++ user/jchandra/8-stable-mips/gnu/usr.bin/binutils/ld/genscripts.sh Wed Nov 17 08:56:01 2010 (r215417) @@ -50,6 +50,7 @@ fi if test -d ldscripts; then true else + rm -f ldscripts mkdir ldscripts fi Modified: user/jchandra/8-stable-mips/gnu/usr.bin/cc/Makefile.inc ============================================================================== --- user/jchandra/8-stable-mips/gnu/usr.bin/cc/Makefile.inc Wed Nov 17 04:42:47 2010 (r215416) +++ user/jchandra/8-stable-mips/gnu/usr.bin/cc/Makefile.inc Wed Nov 17 08:56:01 2010 (r215417) @@ -6,6 +6,7 @@ .if !defined(__CC_MAKEFILE_INC__) __CC_MAKEFILE_INC__= ${MFILE} +GCCVER= 4.2 GCCDIR= ${.CURDIR}/../../../../contrib/gcc GCCLIB= ${.CURDIR}/../../../../contrib/gcclibs @@ -15,6 +16,7 @@ GCCLIB= ${.CURDIR}/../../../../contrib/g MD_FILE= ${GCCDIR}/config/${GCC_CPU}/${GCC_CPU}.md GCC_TARGET= ${TARGET_ARCH}-undermydesk-freebsd +CFLAGS+= -DGCCVER=\"${GCCVER}\" CFLAGS+= -DIN_GCC -DHAVE_CONFIG_H CFLAGS+= -DPREFIX=\"${TOOLS_PREFIX}/usr\" #CFLAGS+= -DWANT_COMPILER_INVARIANTS @@ -30,6 +32,39 @@ CFLAGS+= -DLONG_TYPE_SIZE=${LONG_TYPE_SI CFLAGS+= -DCROSS_COMPILE .endif +.if ${TARGET_ARCH} == "mips" +# XXX This is backwards, MIPS should default to BE. +.if !defined(TARGET_BIG_ENDIAN) +CFLAGS += -DTARGET_ENDIAN_DEFAULT=0 +.endif + +.if defined(TARGET_ABI) && ${TARGET_ABI} != "o32" +.if ${TARGET_ABI} == "n32" +MIPS_ABI_DEFAULT=ABI_N32 +.elif ${TARGET_ABI} == "n64" +MIPS_ABI_DEFAULT=ABI_64 +.endif +.endif + +MIPS_ABI_DEFAULT?=ABI_32 +CFLAGS += -DMIPS_ABI_DEFAULT=${MIPS_ABI_DEFAULT} + +# If we are compiling for the O32 ABI, we need to default to MIPS-III rather +# than taking the ISA from the ABI requirements, since FreeBSD is built with +# a number of MIPS-III features/instructions and that is the minimum ISA we +# support, not the O32 default MIPS-I. +.if ${MIPS_ABI_DEFAULT} == "ABI_32" +TARGET_CPUTYPE?=mips3 +.endif + +# GCC by default takes the ISA from the ABI's requirements. If world is built +# with a superior ISA, since we lack multilib, we have to set the right +# default ISA to be able to link against what's in /usr/lib. Terrible stuff. +.if defined(TARGET_CPUTYPE) +CFLAGS += -DMIPS_CPU_STRING_DEFAULT=\"${TARGET_CPUTYPE}\" +.endif +.endif + .if defined(WANT_FORCE_OPTIMIZATION_DOWNGRADE) CFLAGS+= -DFORCE_OPTIMIZATION_DOWNGRADE=${WANT_FORCE_OPTIMIZATION_DOWNGRADE} .endif Modified: user/jchandra/8-stable-mips/gnu/usr.bin/cc/Makefile.tgt ============================================================================== --- user/jchandra/8-stable-mips/gnu/usr.bin/cc/Makefile.tgt Wed Nov 17 04:42:47 2010 (r215416) +++ user/jchandra/8-stable-mips/gnu/usr.bin/cc/Makefile.tgt Wed Nov 17 08:56:01 2010 (r215417) @@ -15,9 +15,6 @@ GCC_CPU= ${TARGET_ARCH} .if ${TARGET_ARCH} == "ia64" TARGET_CPU_DEFAULT= MASK_GNU_AS|MASK_GNU_LD .endif -.if ${TARGET_ARCH} == "mips" -TARGET_CPU_DEFAULT= 16 -.endif .if ${TARGET_ARCH} == "sparc64" TARGET_CPU_DEFAULT= TARGET_CPU_ultrasparc .endif Modified: user/jchandra/8-stable-mips/lib/libc/Makefile ============================================================================== --- user/jchandra/8-stable-mips/lib/libc/Makefile Wed Nov 17 04:42:47 2010 (r215416) +++ user/jchandra/8-stable-mips/lib/libc/Makefile Wed Nov 17 08:56:01 2010 (r215417) @@ -51,7 +51,12 @@ NOASM= .include "${.CURDIR}/posix1e/Makefile.inc" .if ${MACHINE_ARCH} != "amd64" && \ ${MACHINE_ARCH} != "ia64" && \ - ${MACHINE_ARCH} != "sparc64" + ${MACHINE_ARCH} != "sparc64" && \ + ${MACHINE_ARCH} != "mips" +.include "${.CURDIR}/quad/Makefile.inc" +.endif +.if ${MACHINE_ARCH} == "mips" && \ + (!defined(TARGET_ABI) || ${TARGET_ABI} == "o32") .include "${.CURDIR}/quad/Makefile.inc" .endif .include "${.CURDIR}/regex/Makefile.inc" @@ -64,7 +69,7 @@ NOASM= .include "${.CURDIR}/rpc/Makefile.inc" .include "${.CURDIR}/uuid/Makefile.inc" .include "${.CURDIR}/xdr/Makefile.inc" -.if ${MACHINE_ARCH} == "arm" +.if ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "mips" .include "${.CURDIR}/softfloat/Makefile.inc" .endif .if ${MK_NIS} != "no" Modified: user/jchandra/8-stable-mips/lib/libc/mips/Makefile.inc ============================================================================== --- user/jchandra/8-stable-mips/lib/libc/mips/Makefile.inc Wed Nov 17 04:42:47 2010 (r215416) +++ user/jchandra/8-stable-mips/lib/libc/mips/Makefile.inc Wed Nov 17 08:56:01 2010 (r215417) @@ -1,8 +1,6 @@ # $NetBSD: Makefile.inc,v 1.7 2005/09/17 11:49:39 tsutsui Exp $ # $FreeBSD$ -SOFTFLOAT_BITS=32 - CFLAGS+=-DSOFTFLOAT MDSRCS+= machdep_ldisd.c Modified: user/jchandra/8-stable-mips/lib/libc/mips/SYS.h ============================================================================== --- user/jchandra/8-stable-mips/lib/libc/mips/SYS.h Wed Nov 17 04:42:47 2010 (r215416) +++ user/jchandra/8-stable-mips/lib/libc/mips/SYS.h Wed Nov 17 08:56:01 2010 (r215417) @@ -1,4 +1,4 @@ -/* $NetBSD: SYS.h,v 1.18 2003/10/29 12:28:33 pooka Exp $ */ +/* $NetBSD: SYS.h,v 1.19 2009/12/14 01:07:41 matt Exp $ */ /* $FreeBSD$ */ /*- @@ -79,14 +79,22 @@ */ #ifdef __ABICALLS__ .abicalls -# define PIC_PROLOGUE(x,sr) .set noreorder; .cpload sr; .set reorder -# define PIC_CALL(l,sr) la sr, _C_LABEL(l); jr sr +# if defined(__mips_o32) || defined(__mips_o64) +# define PIC_PROLOGUE(x) SETUP_GP +# define PIC_TAILCALL(l) PTR_LA t9, _C_LABEL(l); jr t9 +# define PIC_RETURN() j ra +# else +# define PIC_PROLOGUE(x) SETUP_GP64(t3, x) +# define PIC_TAILCALL(l) PTR_LA t9, _C_LABEL(l); RESTORE_GP64; jr t9 +# define PIC_RETURN() RESTORE_GP64; j ra +# endif #else -# define PIC_PROLOGUE(x,sr) -# define PIC_CALL(l,sr) j _C_LABEL(l) -#endif +# define PIC_PROLOGUE(x) +# define PIC_TAILCALL(l) j _C_LABEL(l) +# define PIC_RETURN() j ra +#endif /* __ABICALLS__ */ -# define SYSTRAP(x) li v0, SYS_ ## x; syscall; +# define SYSTRAP(x) li v0,SYS_ ## x; syscall; /* * Do a syscall that cannot fail (sync, get{p,u,g,eu,eg)id) @@ -106,7 +114,7 @@ */ #define PSEUDO_NOERROR(x) \ LEAF(__sys_ ## x); \ - .weak _C_LABEL(x); \ + .weak _C_LABEL(x); \ _C_LABEL(x) = _C_LABEL(__CONCAT(__sys_,x)); \ .weak _C_LABEL(__CONCAT(_,x)); \ _C_LABEL(__CONCAT(_,x)) = _C_LABEL(__CONCAT(__sys_,x)); \ @@ -116,14 +124,14 @@ LEAF(__sys_ ## x); \ #define PSEUDO(x) \ LEAF(__sys_ ## x); \ - .weak _C_LABEL(x); \ + .weak _C_LABEL(x); \ _C_LABEL(x) = _C_LABEL(__CONCAT(__sys_,x)); \ .weak _C_LABEL(__CONCAT(_,x)); \ _C_LABEL(__CONCAT(_,x)) = _C_LABEL(__CONCAT(__sys_,x)); \ - PIC_PROLOGUE(x,t9); \ + PIC_PROLOGUE(__sys_ ## x); \ SYSTRAP(x); \ bne a3,zero,err; \ - j ra; \ + PIC_RETURN(); \ err: \ - PIC_CALL(__cerror,t9); \ - END(__sys_ ## x) + PIC_TAILCALL(__cerror); \ +END(__sys_ ## x) Modified: user/jchandra/8-stable-mips/lib/libc/mips/Symbol.map ============================================================================== --- user/jchandra/8-stable-mips/lib/libc/mips/Symbol.map Wed Nov 17 04:42:47 2010 (r215416) +++ user/jchandra/8-stable-mips/lib/libc/mips/Symbol.map Wed Nov 17 08:56:01 2010 (r215417) @@ -24,13 +24,9 @@ FBSD_1.0 { sigsetjmp; siglongjmp; htonl; - __htonl; htons; - __htons; ntohl; - __ntohl; ntohs; - __ntohs; vfork; brk; cerror; /* XXX - Should this be .cerror (see sys/cerror.S)? */ @@ -56,9 +52,27 @@ FBSDprivate_1.0 { __siglongjmp; __sys_vfork; _vfork; - end; /* XXX - Should this be _end (see sys/brk.S)? */ - curbrk; + _end; + __curbrk; minbrk; _brk; _sbrk; + + /* softfloat */ + __addsf3; + __adddf3; + __subsf3; + __subdf3; + __mulsf3; + __muldf3; + __divsf3; + __divdf3; + __floatsisf; + __floatsidf; + __fixsfsi; + __fixdfsi; + __fixunssfsi; + __fixunsdfsi; + __extendsfdf2; + __truncdfsf2; }; Modified: user/jchandra/8-stable-mips/lib/libc/mips/gen/Makefile.inc ============================================================================== --- user/jchandra/8-stable-mips/lib/libc/mips/gen/Makefile.inc Wed Nov 17 04:42:47 2010 (r215416) +++ user/jchandra/8-stable-mips/lib/libc/mips/gen/Makefile.inc Wed Nov 17 08:56:01 2010 (r215417) @@ -6,4 +6,4 @@ SRCS+= infinity.c fabs.c ldexp.c modf.c # SRCS+= flt_rounds.c fpgetmask.c fpgetround.c fpgetsticky.c fpsetmask.c \ # fpsetround.c fpsetsticky.c -SRCS+= _set_tp.c _setjmp.S makecontext.c setjmp.S signalcontext.c sigsetjmp.S +SRCS+= _ctx_start.S _set_tp.c _setjmp.S makecontext.c setjmp.S signalcontext.c sigsetjmp.S Copied: user/jchandra/8-stable-mips/lib/libc/mips/gen/_ctx_start.S (from r209233, head/lib/libc/mips/gen/_ctx_start.S) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/jchandra/8-stable-mips/lib/libc/mips/gen/_ctx_start.S Wed Nov 17 08:56:01 2010 (r215417, copy of r209233, head/lib/libc/mips/gen/_ctx_start.S) @@ -0,0 +1,41 @@ +/*- + * Copyright (c) 2010 Juli Mallett. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +/* + * XXX gp? + */ +ENTRY(_ctx_start) + jalr t9 + + move a0, s0 + PTR_LA t9, _ctx_done + jalr t9 + + break 0 +END(_ctx_start) Modified: user/jchandra/8-stable-mips/lib/libc/mips/gen/_setjmp.S ============================================================================== --- user/jchandra/8-stable-mips/lib/libc/mips/gen/_setjmp.S Wed Nov 17 04:42:47 2010 (r215416) +++ user/jchandra/8-stable-mips/lib/libc/mips/gen/_setjmp.S Wed Nov 17 08:56:01 2010 (r215417) @@ -1,4 +1,4 @@ -/* $NetBSD: _setjmp.S,v 1.20 2005/10/07 17:16:40 tsutsui Exp $ */ +/* $NetBSD: _setjmp.S,v 1.20.34.5 2010/02/03 23:46:47 matt Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -36,14 +36,15 @@ __FBSDID("$FreeBSD$"); #include -#if defined(LIBC_SCCS) && !defined(lint) - ASMSTR("from: @(#)_setjmp.s 8.1 (Berkeley) 6/4/93") - ASMSTR("$NetBSD: _setjmp.S,v 1.20 2005/10/07 17:16:40 tsutsui Exp $") -#endif /* LIBC_SCCS and not lint */ +#include "SYS.h" -#ifdef __ABICALLS__ - .abicalls +#if defined(LIBC_SCCS) && !defined(lint) +#if 0 + RCSID("from: @(#)_setjmp.s 8.1 (Berkeley) 6/4/93") +#else + RCSID("$NetBSD: _setjmp.S,v 1.20.34.5 2010/02/03 23:46:47 matt Exp $") #endif +#endif /* LIBC_SCCS and not lint */ /* * C library -- _setjmp, _longjmp @@ -56,62 +57,70 @@ __FBSDID("$FreeBSD$"); * The previous signal state is NOT restored. */ + .set noreorder LEAF(_setjmp) -#ifdef __ABICALLS__ - .set noreorder - .cpload t9 - subu sp, sp, CALLFRAME_SIZ # allocate stack frame - .cprestore 16 + REG_PROLOGUE + REG_LI v0, _JB_MAGIC__SETJMP + REG_S v0, (_JB_MAGIC * SZREG)(a0) + REG_S ra, (_JB_REG_RA * SZREG)(a0) + REG_S s0, (_JB_REG_S0 * SZREG)(a0) + REG_S s1, (_JB_REG_S1 * SZREG)(a0) + REG_S s2, (_JB_REG_S2 * SZREG)(a0) + REG_S s3, (_JB_REG_S3 * SZREG)(a0) + REG_S s4, (_JB_REG_S4 * SZREG)(a0) + REG_S s5, (_JB_REG_S5 * SZREG)(a0) + REG_S s6, (_JB_REG_S6 * SZREG)(a0) + REG_S s7, (_JB_REG_S7 * SZREG)(a0) + REG_S s8, (_JB_REG_S8 * SZREG)(a0) +#if defined(__mips_n32) || defined(__mips_n64) + REG_S gp, (_JB_REG_GP * SZREG)(a0) # newabi gp is callee-saved #endif - li v0, _JB_MAGIC__SETJMP - sw v0, (_JB_MAGIC * SZREG)(a0) - sw ra, (_JB_REG_RA * SZREG)(a0) - sw s0, (_JB_REG_S0 * SZREG)(a0) - sw s1, (_JB_REG_S1 * SZREG)(a0) - sw s2, (_JB_REG_S2 * SZREG)(a0) - sw s3, (_JB_REG_S3 * SZREG)(a0) - sw s4, (_JB_REG_S4 * SZREG)(a0) - sw s5, (_JB_REG_S5 * SZREG)(a0) - sw s6, (_JB_REG_S6 * SZREG)(a0) - sw s7, (_JB_REG_S7 * SZREG)(a0) - sw s8, (_JB_REG_S8 * SZREG)(a0) -#ifdef __ABICALLS__ - addu sp, sp, CALLFRAME_SIZ # un-allocate the stack frame -#endif - sw sp, (_JB_REG_SP * SZREG)(a0) + REG_S sp, (_JB_REG_SP * SZREG)(a0) + REG_EPILOGUE + j ra move v0, zero END(_setjmp) LEAF(_longjmp) -#ifdef __ABICALLS__ - .set noreorder - .cpload t9 - subu sp, sp, CALLFRAME_SIZ # allocate stack frame - .cprestore 16 -#endif - lw v0, (_JB_MAGIC * SZREG)(a0) - lw ra, (_JB_REG_RA * SZREG)(a0) - li t0, _JB_MAGIC__SETJMP - bne v0, t0, botch # jump if error - lw s0, (_JB_REG_S0 * SZREG)(a0) - lw s1, (_JB_REG_S1 * SZREG)(a0) - lw s2, (_JB_REG_S2 * SZREG)(a0) - lw s3, (_JB_REG_S3 * SZREG)(a0) - lw s4, (_JB_REG_S4 * SZREG)(a0) - lw s5, (_JB_REG_S5 * SZREG)(a0) - lw s6, (_JB_REG_S6 * SZREG)(a0) - lw s7, (_JB_REG_S7 * SZREG)(a0) - lw sp, (_JB_REG_SP * SZREG)(a0) - lw s8, (_JB_REG_S8 * SZREG)(a0) + PIC_PROLOGUE(_longjmp) + PTR_SUBU sp, sp, CALLFRAME_SIZ + SAVE_GP(CALLFRAME_GP) + + REG_PROLOGUE + REG_L v0, (_JB_MAGIC * SZREG)(a0) # get magic number + REG_L ra, (_JB_REG_RA * SZREG)(a0) + REG_LI t0, _JB_MAGIC__SETJMP + bne v0, t0, botch # jump if error + PTR_ADDU sp, sp, CALLFRAME_SIZ # does not matter, sanity + REG_L s0, (_JB_REG_S0 * SZREG)(a0) + REG_L s1, (_JB_REG_S1 * SZREG)(a0) + REG_L s2, (_JB_REG_S2 * SZREG)(a0) + REG_L s3, (_JB_REG_S3 * SZREG)(a0) + REG_L s4, (_JB_REG_S4 * SZREG)(a0) + REG_L s5, (_JB_REG_S5 * SZREG)(a0) + REG_L s6, (_JB_REG_S6 * SZREG)(a0) + REG_L s7, (_JB_REG_S7 * SZREG)(a0) +#if defined(__mips_n32) || defined(__mips_n64) + REG_L gp, (_JB_REG_GP * SZREG)(a0) +#endif + REG_L sp, (_JB_REG_SP * SZREG)(a0) + REG_L s8, (_JB_REG_S8 * SZREG)(a0) + REG_EPILOGUE + move v0, a1 # get return value in 1st arg j ra - move v0, a1 + nop botch: - jal _C_LABEL(longjmperror) - nop - jal _C_LABEL(abort) + /* + * We know we aren't returning so we don't care about restoring + * our caller's GP. + */ + PTR_LA t9, _C_LABEL(longjmperror) + jalr t9 nop + + PIC_TAILCALL(abort) END(_longjmp) Modified: user/jchandra/8-stable-mips/lib/libc/mips/gen/makecontext.c ============================================================================== --- user/jchandra/8-stable-mips/lib/libc/mips/gen/makecontext.c Wed Nov 17 04:42:47 2010 (r215416) +++ user/jchandra/8-stable-mips/lib/libc/mips/gen/makecontext.c Wed Nov 17 08:56:01 2010 (r215417) @@ -1,4 +1,4 @@ -/* $NetBSD: makecontext.c,v 1.3 2003/01/19 08:53:36 matt Exp $ */ +/* $NetBSD: makecontext.c,v 1.5 2009/12/14 01:07:42 matt Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -15,13 +15,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED @@ -39,48 +32,92 @@ #include __FBSDID("$FreeBSD$"); #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: makecontext.c,v 1.3 2003/01/19 08:53:36 matt Exp $"); +__RCSID("$NetBSD: makecontext.c,v 1.5 2009/12/14 01:07:42 matt Exp $"); #endif -#include -#include +#include +#include + #include +#include +#include +#include +#include + +__weak_reference(__makecontext, makecontext); + +void _ctx_done(ucontext_t *); +void _ctx_start(void); void -makecontext(ucontext_t *ucp, void (*func)(void), int argc, ...) +__makecontext(ucontext_t *ucp, void (*func)(void), int argc, ...) { - /* XXXMIPS: Implement me */ -#if 0 - __greg_t *gr = ucp->uc_mcontext.__gregs; - uintptr_t *sp; + mcontext_t *mc; + register_t *sp; int i; va_list ap; - void __resumecontext(void); + /* + * XXX/juli + * We need an mc_len or mc_flags like other architectures + * so that we can mark a context as invalid. Store it in + * mc->mc_regs[ZERO] perhaps? + */ + if (argc < 0 || argc > 6 || ucp == NULL || + ucp->uc_stack.ss_sp == NULL || + ucp->uc_stack.ss_size < MINSIGSTKSZ) + return; + mc = &ucp->uc_mcontext; - /* LINTED uintptr_t is safe */ - sp = (uintptr_t *) + sp = (register_t *) ((uintptr_t)ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size); - /* LINTED uintptr_t is safe */ +#if defined(__mips_o32) || defined(__mips_o64) sp -= (argc >= 4 ? argc : 4); /* Make room for >=4 arguments. */ - sp = (uintptr_t *) - ((uintptr_t)sp & ~0x7); /* Align on double-word boundary. */ + sp = (register_t *) + ((uintptr_t)sp & ~0x7); /* Align on double-word boundary. */ +#elif defined(__mips_n32) || defined(__mips_n64) + sp -= (argc > 8 ? argc - 8 : 0); /* Make room for > 8 arguments. */ + sp = (register_t *) + ((uintptr_t)sp & ~0xf); /* Align on quad-word boundary. */ +#endif - gr[_REG_SP] = (__greg_t)sp; - gr[_REG_RA] = (__greg_t)__resumecontext; - gr[_REG_T9] = (__greg_t)func; /* required for .abicalls */ - gr[_REG_EPC] = (__greg_t)func; + mc->mc_regs[SP] = (intptr_t)sp; + mc->mc_regs[S0] = (intptr_t)ucp; + mc->mc_regs[T9] = (intptr_t)func; + mc->mc_pc = (intptr_t)_ctx_start; /* Construct argument list. */ va_start(ap, argc); +#if defined(__mips_o32) || defined(__mips_o64) /* Up to the first four arguments are passed in $a0-3. */ for (i = 0; i < argc && i < 4; i++) - /* LINTED uintptr_t is safe */ - gr[_REG_A0 + i] = va_arg(ap, uintptr_t); + /* LINTED register_t is safe */ + mc->mc_regs[A0 + i] = va_arg(ap, register_t); + /* Pass remaining arguments on the stack above the $a0-3 gap. */ + sp += i; +#endif +#if defined(__mips_n32) || defined(__mips_n64) + /* Up to the first 8 arguments are passed in $a0-7. */ + for (i = 0; i < argc && i < 8; i++) + /* LINTED register_t is safe */ + mc->mc_regs[A0 + i] = va_arg(ap, register_t); /* Pass remaining arguments on the stack above the $a0-3 gap. */ - for (sp += 4; i < argc; i++) +#endif + /* Pass remaining arguments on the stack above the $a0-3 gap. */ + for (; i < argc; i++) /* LINTED uintptr_t is safe */ - *sp++ = va_arg(ap, uintptr_t); + *sp++ = va_arg(ap, register_t); va_end(ap); -#endif +} + +void +_ctx_done(ucontext_t *ucp) +{ + + if (ucp->uc_link == NULL) + exit(0); + else { + setcontext((const ucontext_t *)ucp->uc_link); + abort(); + } } Modified: user/jchandra/8-stable-mips/lib/libc/mips/gen/setjmp.S ============================================================================== --- user/jchandra/8-stable-mips/lib/libc/mips/gen/setjmp.S Wed Nov 17 04:42:47 2010 (r215416) +++ user/jchandra/8-stable-mips/lib/libc/mips/gen/setjmp.S Wed Nov 17 08:56:01 2010 (r215417) @@ -41,6 +41,8 @@ __FBSDID("$FreeBSD$"); ASMSTR("$NetBSD: setjmp.S,v 1.17 2005/09/17 11:49:39 tsutsui Exp $") #endif /* LIBC_SCCS and not lint */ +#include "SYS.h" + #ifdef __ABICALLS__ .abicalls #endif @@ -61,100 +63,102 @@ __FBSDID("$FreeBSD$"); NESTED(setjmp, SETJMP_FRAME_SIZE, ra) .mask 0x80000000, (CALLFRAME_RA - CALLFRAME_SIZ) - .set noreorder -#ifdef __ABICALLS__ - .cpload t9 -#endif - subu sp, sp, SETJMP_FRAME_SIZE # allocate stack frame -#ifdef __ABICALLS__ - .cprestore 16 -#endif - sw ra, CALLFRAME_RA(sp) # save RA - sw a0, CALLFRAME_SIZ(sp) # store env + SETUP_GP + PTR_SUBU sp, sp, SETJMP_FRAME_SIZE # allocate stack frame + SAVE_GP(CALLFRAME_GP) + SETUP_GP64(CALLFRAME_GP, setjmp) + + REG_S ra, CALLFRAME_RA(sp) # save RA + REG_S a0, CALLFRAME_SIZ(sp) # store env /* Get the signal mask. */ - addu a2, a0, _JB_SIGMASK * SZREG # &oenv + PTR_ADDU a2, a0, _JB_SIGMASK * SZREG # &oenv li a0, 1 # SIG_SETBLOCK move a1, zero # &env == 0 - la t9, _C_LABEL(sigprocmask) # get current signal mask - jal t9 - nop + PTR_LA t9, _C_LABEL(sigprocmask) # get current signal mask + jalr t9 - lw a0, CALLFRAME_SIZ(sp) # restore env pointer - lw ra, CALLFRAME_RA(sp) # restore RA - addu sp, sp, SETJMP_FRAME_SIZE # pop stack frame - - li v0, _JB_MAGIC_SETJMP - sw v0, (_JB_MAGIC * SZREG)(a0) - sw ra, (_JB_REG_RA * SZREG)(a0) - sw s0, (_JB_REG_S0 * SZREG)(a0) - sw s1, (_JB_REG_S1 * SZREG)(a0) - sw s2, (_JB_REG_S2 * SZREG)(a0) - sw s3, (_JB_REG_S3 * SZREG)(a0) - sw s4, (_JB_REG_S4 * SZREG)(a0) - sw s5, (_JB_REG_S5 * SZREG)(a0) - sw s6, (_JB_REG_S6 * SZREG)(a0) - sw s7, (_JB_REG_S7 * SZREG)(a0) - sw sp, (_JB_REG_SP * SZREG)(a0) - sw s8, (_JB_REG_S8 * SZREG)(a0) + RESTORE_GP64 + REG_L a0, CALLFRAME_SIZ(sp) # restore env pointer + REG_L ra, CALLFRAME_RA(sp) # restore RA + PTR_ADDU sp, sp, SETJMP_FRAME_SIZE # pop stack frame + + REG_LI v0, _JB_MAGIC_SETJMP + REG_S v0, (_JB_MAGIC * SZREG)(a0) + REG_S ra, (_JB_REG_RA * SZREG)(a0) + REG_S s0, (_JB_REG_S0 * SZREG)(a0) + REG_S s1, (_JB_REG_S1 * SZREG)(a0) + REG_S s2, (_JB_REG_S2 * SZREG)(a0) + REG_S s3, (_JB_REG_S3 * SZREG)(a0) + REG_S s4, (_JB_REG_S4 * SZREG)(a0) + REG_S s5, (_JB_REG_S5 * SZREG)(a0) + REG_S s6, (_JB_REG_S6 * SZREG)(a0) + REG_S s7, (_JB_REG_S7 * SZREG)(a0) + REG_S sp, (_JB_REG_SP * SZREG)(a0) + REG_S s8, (_JB_REG_S8 * SZREG)(a0) +#if defined(__mips_n32) || defined(__mips_n64) + REG_S gp, (_JB_REG_GP * SZREG)(a0) +#endif move v0, zero - j ra + jr ra END(setjmp) #define LONGJMP_FRAME_SIZE (CALLFRAME_SIZ + (SZREG * 2)) NESTED(longjmp, LONGJMP_FRAME_SIZE, ra) .mask 0x80000000, (CALLFRAME_RA - CALLFRAME_SIZ) - .set noreorder -#ifdef __ABICALLS__ - .cpload t9 -#endif - subu sp, sp, LONGJMP_FRAME_SIZE # allocate stack frame *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@FreeBSD.ORG Wed Nov 17 13:52:10 2010 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EDB0810656A3; Wed, 17 Nov 2010 13:52:09 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DBBBE8FC2F; Wed, 17 Nov 2010 13:52:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAHDq9AZ092463; Wed, 17 Nov 2010 13:52:09 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAHDq9OY092461; Wed, 17 Nov 2010 13:52:09 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201011171352.oAHDq9OY092461@svn.freebsd.org> From: David Xu Date: Wed, 17 Nov 2010 13:52:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215424 - user/davidxu/libthr/lib/libthr/thread X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 13:52:10 -0000 Author: davidxu Date: Wed Nov 17 13:52:09 2010 New Revision: 215424 URL: http://svn.freebsd.org/changeset/base/215424 Log: In mutex_try_lock, use _mutex_owned() to simply code, this also fixed some bugs which ignored recursive mutex. In mutex_unlock_common, check recursive mutex correctly. If kernel returned EOWNERDEAD, clear mutex's left-over recursive count, so we can correctly unlock it later. Modified: user/davidxu/libthr/lib/libthr/thread/thr_mutex.c Modified: user/davidxu/libthr/lib/libthr/thread/thr_mutex.c ============================================================================== --- user/davidxu/libthr/lib/libthr/thread/thr_mutex.c Wed Nov 17 10:43:20 2010 (r215423) +++ user/davidxu/libthr/lib/libthr/thread/thr_mutex.c Wed Nov 17 13:52:09 2010 (r215424) @@ -152,7 +152,7 @@ mutex_init(struct pthread_mutex *mp, } if (attr->m_pshared != 0) mp->__lockflags |= USYNC_PROCESS_SHARED; - if (attr->m_robust != PTHREAD_MUTEX_STALLED) + if (attr->m_robust == PTHREAD_MUTEX_ROBUST) mp->__lockflags |= UMUTEX_ROBUST; if (PMUTEX_TYPE(mp->__flags) == PTHREAD_MUTEX_ADAPTIVE_NP) { mp->__spinloops = @@ -213,18 +213,22 @@ mutex_trylock_common(struct pthread_mute return (0); } } + if (_mutex_owned(curthread, mp) == 0) + return mutex_self_trylock(mp); + return (EBUSY); } else if (mp->__lockflags & (UMUTEX_ROBUST | UMUTEX_PRIO_PROTECT2)) { - if (mp->__lockflags & UMUTEX_SIMPLE) { - if (mp->__ownerdata.__ownertd == curthread) - return mutex_self_trylock(mp); - } else { - if ((mp->__lockword & UMUTEX_OWNER_MASK) == - TID(curthread)) - return mutex_self_trylock(mp); - } + if (_mutex_owned(curthread, mp) == 0) + return mutex_self_trylock(mp); error = __thr_umutex_trylock((struct umutex *)&mp->__lockword); - if (error == 0 || error == EOWNERDEAD) + if (error == 0) + enqueue_mutex(curthread, mp); + else if (error == EOWNERDEAD) { + /* + * Fix inconsistent recursive count for robust mutex. + */ + mp->__recurse = 0; enqueue_mutex(curthread, mp); + } return (error); } else if (mp->__lockflags & UMUTEX_PRIO_INHERIT) { id = TID(curthread); @@ -232,7 +236,7 @@ mutex_trylock_common(struct pthread_mute enqueue_mutex(curthread, mp); return (0); } - if ((mp->__lockflags & UMUTEX_OWNER_MASK) == id) + if (_mutex_owned(curthread, mp) == 0) return mutex_self_trylock(mp); return (EBUSY); } @@ -303,8 +307,15 @@ sleep_in_kernel: error = __thr_umutex_timedlock((struct umutex *)&mp->__lockword, id, abstime); } done: - if (error == 0 || error == EOWNERDEAD) + if (error == 0) enqueue_mutex(curthread, mp); + else if (error == EOWNERDEAD) { + /* + * Fix inconsistent recursive count for robust mutex. + */ + mp->__recurse = 0; + enqueue_mutex(curthread, mp); + } return (error); } @@ -344,18 +355,13 @@ _mutex_lock_common(struct pthread_mutex } } + if (_mutex_owned(curthread, mp) == 0) + return mutex_self_lock(mp, abstime); + if (abstime != NULL && (abstime->tv_sec < 0 || abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000)) return (EINVAL); - if (mp->__lockflags & UMUTEX_SIMPLE) { - if (mp->__ownerdata.__ownertd == curthread) - return mutex_self_lock(mp, abstime); - } else { - if ((mp->__lockword & UMUTEX_OWNER_MASK) == TID(curthread)) - return mutex_self_lock(mp, abstime); - } - return mutex_lock_sleep(mp, abstime); } @@ -520,7 +526,7 @@ _mutex_unlock_common(struct pthread_mute uint32_t id; if (__predict_false( - PMUTEX_TYPE(mp->__lockflags) == PTHREAD_MUTEX_RECURSIVE && + PMUTEX_TYPE(mp->__flags) == PTHREAD_MUTEX_RECURSIVE && mp->__recurse > 0)) { mp->__recurse--; if (mp->__flags & PMUTEX_FLAG_PRIVATE) @@ -573,7 +579,7 @@ _mutex_cv_lock(pthread_mutex_t *mp, int int error; error = mutex_lock_common(mp, NULL, 1); - if (error == 0) + if (error == 0 || error == EOWNERDEAD) mp->__recurse += count; return (error); } @@ -721,7 +727,6 @@ _pthread_mutex_consistent(pthread_mutex_ if (_mutex_owned(_get_curthread(), mp) == 0) { if (mp->__lockflags & UMUTEX_ROBUST) { atomic_clear_32(&mp->__lockword, UMUTEX_OWNER_DEAD); - mp->__recurse = 0; return (0); } } @@ -1000,7 +1005,7 @@ _pthread_mutex_unlock_1_0(pthread_mutex_ return (EINVAL); return (EPERM); } - return _pthread_mutex_unlock(mp); + return mutex_unlock_common(mp); } int From owner-svn-src-user@FreeBSD.ORG Thu Nov 18 02:12:46 2010 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3981D106564A; Thu, 18 Nov 2010 02:12:46 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 286058FC17; Thu, 18 Nov 2010 02:12:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAI2CkPO011144; Thu, 18 Nov 2010 02:12:46 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAI2Ck4v011142; Thu, 18 Nov 2010 02:12:46 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201011180212.oAI2Ck4v011142@svn.freebsd.org> From: David Xu Date: Thu, 18 Nov 2010 02:12:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215447 - user/davidxu/libthr/lib/libthr/thread X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2010 02:12:46 -0000 Author: davidxu Date: Thu Nov 18 02:12:45 2010 New Revision: 215447 URL: http://svn.freebsd.org/changeset/base/215447 Log: _mutex_owned() returns error code, not boolean. Modified: user/davidxu/libthr/lib/libthr/thread/thr_mutex.c Modified: user/davidxu/libthr/lib/libthr/thread/thr_mutex.c ============================================================================== --- user/davidxu/libthr/lib/libthr/thread/thr_mutex.c Thu Nov 18 01:21:55 2010 (r215446) +++ user/davidxu/libthr/lib/libthr/thread/thr_mutex.c Thu Nov 18 02:12:45 2010 (r215447) @@ -657,7 +657,7 @@ _pthread_mutex_setprioceiling(pthread_mu if ((mp->__lockflags & UMUTEX_PRIO_PROTECT2) == 0) return (EINVAL); - if (!_mutex_owned(curthread, mp)) + if (_mutex_owned(curthread, mp) != 0) return __thr_umutex_set_ceiling((struct umutex *)&mp->__lockword, ceiling, old_ceiling); if (old_ceiling != NULL) From owner-svn-src-user@FreeBSD.ORG Thu Nov 18 02:16:06 2010 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C425106566B; Thu, 18 Nov 2010 02:16:06 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7A4768FC0C; Thu, 18 Nov 2010 02:16:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAI2G6w5011255; Thu, 18 Nov 2010 02:16:06 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAI2G6TC011249; Thu, 18 Nov 2010 02:16:06 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201011180216.oAI2G6TC011249@svn.freebsd.org> From: David Xu Date: Thu, 18 Nov 2010 02:16:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215448 - in user/davidxu/libthr/lib/libthr: . thread X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2010 02:16:06 -0000 Author: davidxu Date: Thu Nov 18 02:16:06 2010 New Revision: 215448 URL: http://svn.freebsd.org/changeset/base/215448 Log: Create new version for following functins: pthread_barrierattr_setpshared pthread_condattr_setpshared pthread_mutexattr_setpshared pthread_rwlockattr_setpshared These functions allow PTHREAD_PROCESS_SHARED to be set for attribute object. Modified: user/davidxu/libthr/lib/libthr/pthread.map user/davidxu/libthr/lib/libthr/thread/thr_barrierattr.c user/davidxu/libthr/lib/libthr/thread/thr_condattr.c user/davidxu/libthr/lib/libthr/thread/thr_mutexattr.c user/davidxu/libthr/lib/libthr/thread/thr_rwlockattr.c Modified: user/davidxu/libthr/lib/libthr/pthread.map ============================================================================== --- user/davidxu/libthr/lib/libthr/pthread.map Thu Nov 18 02:12:45 2010 (r215447) +++ user/davidxu/libthr/lib/libthr/pthread.map Thu Nov 18 02:16:06 2010 (r215448) @@ -26,7 +26,6 @@ FBSD_1.0 { pthread_barrierattr_destroy; pthread_barrierattr_getpshared; pthread_barrierattr_init; - pthread_barrierattr_setpshared; pthread_attr_destroy; pthread_attr_get_np; pthread_attr_getdetachstate; @@ -57,7 +56,6 @@ FBSD_1.0 { pthread_condattr_getpshared; pthread_condattr_init; pthread_condattr_setclock; - pthread_condattr_setpshared; pthread_create; pthread_detach; pthread_equal; @@ -82,7 +80,6 @@ FBSD_1.0 { pthread_mutexattr_setkind_np; pthread_mutexattr_setprioceiling; pthread_mutexattr_setprotocol; - pthread_mutexattr_setpshared; pthread_mutexattr_settype; pthread_once; pthread_resume_all_np; @@ -90,7 +87,6 @@ FBSD_1.0 { pthread_rwlockattr_destroy; pthread_rwlockattr_getpshared; pthread_rwlockattr_init; - pthread_rwlockattr_setpshared; pthread_set_name_np; pthread_self; pthread_setcancelstate; @@ -371,14 +367,17 @@ FBSD_1.2 { pthread_barrier_destroy; pthread_barrier_init; pthread_barrier_wait; + pthread_barrierattr_setpshared; pthread_cond_broadcast; pthread_cond_destroy; pthread_cond_init; pthread_cond_signal; pthread_cond_timedwait; pthread_cond_wait; + pthread_condattr_setpshared; pthread_mutex_destroy; pthread_mutexattr_getrobust; + pthread_mutexattr_setpshared; pthread_mutexattr_setrobust; pthread_mutex_consistent; pthread_mutex_getprioceiling; @@ -407,6 +406,7 @@ FBSD_1.2 { pthread_rwlock_trywrlock; pthread_rwlock_unlock; pthread_rwlock_wrlock; + pthread_rwlockattr_setpshared; setcontext; swapcontext; }; Modified: user/davidxu/libthr/lib/libthr/thread/thr_barrierattr.c ============================================================================== --- user/davidxu/libthr/lib/libthr/thread/thr_barrierattr.c Thu Nov 18 02:12:45 2010 (r215447) +++ user/davidxu/libthr/lib/libthr/thread/thr_barrierattr.c Thu Nov 18 02:16:06 2010 (r215448) @@ -43,6 +43,10 @@ __weak_reference(_pthread_barrierattr_se __weak_reference(_pthread_barrierattr_getpshared, pthread_barrierattr_getpshared); +int _pthread_barrierattr_setpshared_1_0(pthread_barrierattr_t *, int); + +FB10_COMPAT(_pthread_barrierattr_setpshared_1_0, pthread_barrierattr_setpshared); + int _pthread_barrierattr_destroy(pthread_barrierattr_t *attr) { @@ -88,6 +92,22 @@ _pthread_barrierattr_setpshared(pthread_ return (EINVAL); /* Only PTHREAD_PROCESS_PRIVATE is supported. */ + if (pshared != PTHREAD_PROCESS_PRIVATE && + pshared != PTHREAD_PROCESS_SHARED) + return (EINVAL); + + (*attr)->pshared = pshared; + return (0); +} + +int +_pthread_barrierattr_setpshared_1_0(pthread_barrierattr_t *attr, int pshared) +{ + + if (attr == NULL || *attr == NULL) + return (EINVAL); + + /* Only PTHREAD_PROCESS_PRIVATE is supported. */ if (pshared != PTHREAD_PROCESS_PRIVATE) return (EINVAL); Modified: user/davidxu/libthr/lib/libthr/thread/thr_condattr.c ============================================================================== --- user/davidxu/libthr/lib/libthr/thread/thr_condattr.c Thu Nov 18 02:12:45 2010 (r215447) +++ user/davidxu/libthr/lib/libthr/thread/thr_condattr.c Thu Nov 18 02:16:06 2010 (r215448) @@ -45,6 +45,9 @@ __weak_reference(_pthread_condattr_setcl __weak_reference(_pthread_condattr_getpshared, pthread_condattr_getpshared); __weak_reference(_pthread_condattr_setpshared, pthread_condattr_setpshared); +int _pthread_condattr_setpshared_1_0(pthread_condattr_t *, int); +FB10_COMPAT(_pthread_condattr_setpshared_1_0, pthread_condattr_setpshared); + int _pthread_condattr_init(pthread_condattr_t *attr) { @@ -108,7 +111,7 @@ _pthread_condattr_getpshared(const pthre if (attr == NULL || *attr == NULL) return (EINVAL); - *pshared = PTHREAD_PROCESS_PRIVATE; + *pshared = (*attr)->c_pshared; return (0); } @@ -118,7 +121,23 @@ _pthread_condattr_setpshared(pthread_con if (attr == NULL || *attr == NULL) return (EINVAL); + if (pshared != PTHREAD_PROCESS_PRIVATE && + pshared != PTHREAD_PROCESS_SHARED) + return (EINVAL); + + (*attr)->c_pshared = pshared; + return (0); +} + +int +_pthread_condattr_setpshared_1_0(pthread_condattr_t *attr, int pshared) +{ + if (attr == NULL || *attr == NULL) + return (EINVAL); + if (pshared != PTHREAD_PROCESS_PRIVATE) return (EINVAL); + + (*attr)->c_pshared = pshared; return (0); } Modified: user/davidxu/libthr/lib/libthr/thread/thr_mutexattr.c ============================================================================== --- user/davidxu/libthr/lib/libthr/thread/thr_mutexattr.c Thu Nov 18 02:12:45 2010 (r215447) +++ user/davidxu/libthr/lib/libthr/thread/thr_mutexattr.c Thu Nov 18 02:16:06 2010 (r215448) @@ -84,6 +84,9 @@ __weak_reference(_pthread_mutexattr_setp __weak_reference(_pthread_mutexattr_getrobust, pthread_mutexattr_getrobust); __weak_reference(_pthread_mutexattr_setrobust, pthread_mutexattr_setrobust); +int _pthread_mutexattr_setpshared_1_0(pthread_mutexattr_t *attr, int pshared); +FB10_COMPAT(_pthread_mutexattr_setpshared_1_0, pthread_mutexattr_setpshared); + int _pthread_mutexattr_init(pthread_mutexattr_t *attr) { @@ -179,7 +182,7 @@ _pthread_mutexattr_getpshared(const pthr if (attr == NULL || *attr == NULL) return (EINVAL); - *pshared = PTHREAD_PROCESS_PRIVATE; + *pshared = (*attr)->m_pshared; return (0); } @@ -191,9 +194,11 @@ _pthread_mutexattr_setpshared(pthread_mu return (EINVAL); /* Only PTHREAD_PROCESS_PRIVATE is supported. */ - if (pshared != PTHREAD_PROCESS_PRIVATE) + if (pshared != PTHREAD_PROCESS_PRIVATE && + pshared != PTHREAD_PROCESS_SHARED) return (EINVAL); + (*attr)->m_pshared = pshared; return (0); } @@ -287,3 +292,17 @@ _pthread_mutexattr_setrobust(pthread_mut } return (error); } + +int +_pthread_mutexattr_setpshared_1_0(pthread_mutexattr_t *attr, int pshared) +{ + if (attr == NULL || *attr == NULL) + return (EINVAL); + + /* Only PTHREAD_PROCESS_PRIVATE is supported. */ + if (pshared != PTHREAD_PROCESS_PRIVATE) + return (EINVAL); + + (*attr)->m_pshared = pshared; + return (0); +} Modified: user/davidxu/libthr/lib/libthr/thread/thr_rwlockattr.c ============================================================================== --- user/davidxu/libthr/lib/libthr/thread/thr_rwlockattr.c Thu Nov 18 02:12:45 2010 (r215447) +++ user/davidxu/libthr/lib/libthr/thread/thr_rwlockattr.c Thu Nov 18 02:16:06 2010 (r215448) @@ -39,6 +39,9 @@ __weak_reference(_pthread_rwlockattr_get __weak_reference(_pthread_rwlockattr_init, pthread_rwlockattr_init); __weak_reference(_pthread_rwlockattr_setpshared, pthread_rwlockattr_setpshared); +int _pthread_rwlockattr_setpshared_1_0(pthread_rwlockattr_t *, int); +FB10_COMPAT(_pthread_rwlockattr_setpshared_1_0, pthread_rwlockattr_setpshared); + int _pthread_rwlockattr_destroy(pthread_rwlockattr_t *rwlockattr) { @@ -61,6 +64,9 @@ int _pthread_rwlockattr_getpshared(const pthread_rwlockattr_t *rwlockattr, int *pshared) { + if (rwlockattr == NULL || *rwlockattr == NULL) + return (EINVAL); + *pshared = (*rwlockattr)->pshared; return(0); @@ -89,6 +95,24 @@ _pthread_rwlockattr_init(pthread_rwlocka int _pthread_rwlockattr_setpshared(pthread_rwlockattr_t *rwlockattr, int pshared) { + if (rwlockattr == NULL || *rwlockattr == NULL) + return (EINVAL); + + if (pshared != PTHREAD_PROCESS_PRIVATE && + pshared != PTHREAD_PROCESS_SHARED) + return(EINVAL); + + (*rwlockattr)->pshared = pshared; + + return(0); +} + +int +_pthread_rwlockattr_setpshared_1_0(pthread_rwlockattr_t *rwlockattr, int pshared) +{ + if (rwlockattr == NULL || *rwlockattr == NULL) + return (EINVAL); + /* Only PTHREAD_PROCESS_PRIVATE is supported. */ if (pshared != PTHREAD_PROCESS_PRIVATE) return(EINVAL); From owner-svn-src-user@FreeBSD.ORG Thu Nov 18 11:19:23 2010 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F1D7F1065670; Thu, 18 Nov 2010 11:19:23 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DFBE18FC14; Thu, 18 Nov 2010 11:19:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAIBJNWf027333; Thu, 18 Nov 2010 11:19:23 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAIBJNCp027327; Thu, 18 Nov 2010 11:19:23 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201011181119.oAIBJNCp027327@svn.freebsd.org> From: "Jayachandran C." Date: Thu, 18 Nov 2010 11:19:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215452 - in user/jchandra/8-stable-mips/sys: dev/cfe mips/atheros modules X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2010 11:19:24 -0000 Author: jchandra Date: Thu Nov 18 11:19:23 2010 New Revision: 215452 URL: http://svn.freebsd.org/changeset/base/215452 Log: MFC 202061, 202091,203001 to update dev/cfe MFC 205845 to fix module build Added: - copied unchanged from r202061, head/sys/dev/cfe/cfe_env.c Directory Properties: user/jchandra/8-stable-mips/sys/dev/cfe/cfe_env.c (props changed) Modified: user/jchandra/8-stable-mips/sys/dev/cfe/cfe_api.c user/jchandra/8-stable-mips/sys/dev/cfe/cfe_console.c user/jchandra/8-stable-mips/sys/mips/atheros/apb.c user/jchandra/8-stable-mips/sys/modules/Makefile Directory Properties: user/jchandra/8-stable-mips/sys/ (props changed) user/jchandra/8-stable-mips/sys/amd64/include/xen/ (props changed) user/jchandra/8-stable-mips/sys/cddl/contrib/opensolaris/ (props changed) user/jchandra/8-stable-mips/sys/contrib/dev/acpica/ (props changed) user/jchandra/8-stable-mips/sys/contrib/pf/ (props changed) user/jchandra/8-stable-mips/sys/dev/xen/xenpci/ (props changed) user/jchandra/8-stable-mips/sys/mips/cavium/dev/ (props changed) Modified: user/jchandra/8-stable-mips/sys/dev/cfe/cfe_api.c ============================================================================== --- user/jchandra/8-stable-mips/sys/dev/cfe/cfe_api.c Thu Nov 18 10:34:18 2010 (r215451) +++ user/jchandra/8-stable-mips/sys/dev/cfe/cfe_api.c Thu Nov 18 11:19:23 2010 (r215452) @@ -160,7 +160,7 @@ cfe_enumenv(int idx, char *name, int nam { cfe_xiocb_t xiocb; - xiocb.xiocb_fcode = CFE_CMD_ENV_SET; + xiocb.xiocb_fcode = CFE_CMD_ENV_ENUM; xiocb.xiocb_status = 0; xiocb.xiocb_handle = 0; xiocb.xiocb_flags = 0; Modified: user/jchandra/8-stable-mips/sys/dev/cfe/cfe_console.c ============================================================================== --- user/jchandra/8-stable-mips/sys/dev/cfe/cfe_console.c Thu Nov 18 10:34:18 2010 (r215451) +++ user/jchandra/8-stable-mips/sys/dev/cfe/cfe_console.c Thu Nov 18 11:19:23 2010 (r215452) @@ -84,14 +84,12 @@ CONSOLE_DRIVER(cfe); static void cn_drvinit(void *unused) { - char output[32]; struct tty *tp; if (cfe_consdev.cn_pri != CN_DEAD && cfe_consdev.cn_name[0] != '\0') { tp = tty_alloc(&cfe_ttydevsw, NULL); - tty_makedev(tp, NULL, "%s", output); - tty_makealias(tp, "cfecons"); + tty_makedev(tp, NULL, "cfecons"); } } @@ -117,15 +115,21 @@ cfe_tty_close(struct tty *tp) static void cfe_tty_outwakeup(struct tty *tp) { - int len; + int len, written, rc; u_char buf[CFEBURSTLEN]; for (;;) { len = ttydisc_getc(tp, buf, sizeof buf); if (len == 0) break; - while (cfe_write(conhandle, buf, len) == 0) - continue; + + written = 0; + while (written < len) { + rc = cfe_write(conhandle, &buf[written], len - written); + if (rc < 0) + break; + written += rc; + } } } @@ -184,13 +188,9 @@ cfe_cnterm(struct consdev *cp) static int cfe_cngetc(struct consdev *cp) { - int result; unsigned char ch; - while ((result = cfe_read(conhandle, &ch, 1)) == 0) - continue; - - if (result > 0) { + if (cfe_read(conhandle, &ch, 1) == 1) { #if defined(KDB) && defined(ALT_BREAK_TO_DEBUGGER) int kdb_brk; Copied: user/jchandra/8-stable-mips/sys/dev/cfe/cfe_env.c (from r202061, head/sys/dev/cfe/cfe_env.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/jchandra/8-stable-mips/sys/dev/cfe/cfe_env.c Thu Nov 18 11:19:23 2010 (r215452, copy of r202061, head/sys/dev/cfe/cfe_env.c) @@ -0,0 +1,74 @@ +/*- + * Copyright (c) 2009 Neelkanth Natu + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include +#include + +#include + +__FBSDID("$FreeBSD$"); + +#ifndef CFE_ENV_SIZE +#define CFE_ENV_SIZE PAGE_SIZE /* default is one page */ +#endif + +extern void cfe_env_init(void); + +static char cfe_env_buf[CFE_ENV_SIZE]; + +void +cfe_env_init(void) +{ + int idx, len; + char name[64], val[128], *cp, *cplim; + + cp = cfe_env_buf; + cplim = cp + CFE_ENV_SIZE; + + idx = 0; + while (1) { + if (cfe_enumenv(idx, name, sizeof(name), val, sizeof(val)) != 0) + break; + + if (bootverbose) + printf("Importing CFE env: \"%s=%s\"\n", name, val); + + /* + * name=val\0\0 + */ + len = strlen(name) + 1 + strlen(val) + 1 + 1; + if (cplim - cp < len) + printf("No space to store CFE env: \"%s=%s\"\n", + name, val); + else + cp += sprintf(cp, "%s=%s", name, val) + 1; + ++idx; + } + *cp++ = '\0'; + + kern_envp = cfe_env_buf; +} Modified: user/jchandra/8-stable-mips/sys/mips/atheros/apb.c ============================================================================== --- user/jchandra/8-stable-mips/sys/mips/atheros/apb.c Thu Nov 18 10:34:18 2010 (r215451) +++ user/jchandra/8-stable-mips/sys/mips/atheros/apb.c Thu Nov 18 11:19:23 2010 (r215452) @@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$"); static int apb_activate_resource(device_t, device_t, int, int, struct resource *); -static device_t apb_add_child(device_t, int, const char *, int); +static device_t apb_add_child(device_t, u_int, const char *, int); static struct resource * apb_alloc_resource(device_t, device_t, int, int *, u_long, u_long, u_long, u_int); @@ -397,7 +397,7 @@ apb_hinted_child(device_t bus, const cha } static device_t -apb_add_child(device_t bus, int order, const char *name, int unit) +apb_add_child(device_t bus, u_int order, const char *name, int unit) { device_t child; struct apb_ivar *ivar; Modified: user/jchandra/8-stable-mips/sys/modules/Makefile ============================================================================== --- user/jchandra/8-stable-mips/sys/modules/Makefile Thu Nov 18 10:34:18 2010 (r215451) +++ user/jchandra/8-stable-mips/sys/modules/Makefile Thu Nov 18 11:19:23 2010 (r215452) @@ -35,15 +35,15 @@ SUBDIR= ${_3dfx} \ ata \ ath \ ${_auxio} \ - bce \ + ${_bce} \ bfe \ bge \ ${_bios} \ ${_bktr} \ ${_bm} \ bridgestp \ - bwi \ - bwn \ + ${_bwi} \ + ${_bwn} \ cam \ ${_canbepm} \ ${_canbus} \ @@ -67,7 +67,7 @@ SUBDIR= ${_3dfx} \ ${_cryptodev} \ ${_cs} \ ${_ctau} \ - cxgb \ + ${_cxgb} \ ${_cyclic} \ dc \ dcons \ @@ -178,13 +178,13 @@ SUBDIR= ${_3dfx} \ mcd \ md \ mem \ - mfi \ + ${_mfi} \ mii \ mlx \ ${_mly} \ mmc \ mmcsd \ - mpt \ + ${_mpt} \ mqueue \ msdosfs \ msdosfs_iconv \ @@ -257,7 +257,7 @@ SUBDIR= ${_3dfx} \ sem \ sf \ sge \ - siba_bwn \ + ${_siba_bwn} \ siftr \ siis \ sis \ @@ -275,7 +275,7 @@ SUBDIR= ${_3dfx} \ stge \ ${_streams} \ ${_svr4} \ - sym \ + ${_sym} \ ${_syscons} \ sysvipc \ ti \ @@ -287,7 +287,7 @@ SUBDIR= ${_3dfx} \ twe \ tx \ txp \ - uart \ + ${_uart} \ ubsec \ udf \ udf_iconv \ @@ -320,11 +320,26 @@ SUBDIR= ${_3dfx} \ ${_zfs} \ zlib \ -.if ${MACHINE_ARCH} != "powerpc" +.if ${MACHINE_ARCH} != "powerpc" && ${MACHINE_ARCH} != "arm" && \ + ${MACHINE_ARCH} != "mips" _syscons= syscons _vpo= vpo .endif +.if ${MACHINE_ARCH} != "arm" && ${MACHINE_ARCH} != "mips" +# no BUS_SPACE_UNSPECIFIED +_bce= bce +_bwi= bwi +_bwn= bwn +_mfi= mfi +_mpt= mpt +_siba_bwn= siba_bwn +# No barrier instruction support (specific to this driver) +_sym= sym +# no uart_cpu_$MACHINE_ARCH +_uart= uart +.endif + .if ${MK_CRYPT} != "no" || defined(ALL_MODULES) .if exists(${.CURDIR}/../opencrypto) _crypto= crypto