From owner-svn-src-all@FreeBSD.ORG Sun Jul 11 05:13:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 769FB106566C; Sun, 11 Jul 2010 05:13:38 +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 654438FC16; Sun, 11 Jul 2010 05:13:38 +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 o6B5Dcqm079814; Sun, 11 Jul 2010 05:13:38 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6B5DcqP079812; Sun, 11 Jul 2010 05:13:38 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201007110513.o6B5DcqP079812@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 11 Jul 2010 05:13:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209893 - in head/lib/libthr/arch/powerpc64: include powerpc powerpc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 05:13:38 -0000 Author: nwhitehorn Date: Sun Jul 11 05:13:38 2010 New Revision: 209893 URL: http://svn.freebsd.org/changeset/base/209893 Log: Fix SVN mismerge. We somehow ended up with the 32-bit powerpc version in arch/powerpc64 instead of the 64-bit one. Added: head/lib/libthr/arch/powerpc64/powerpc64/ - copied from r209890, head/lib/libthr/arch/powerpc64/powerpc/ Deleted: head/lib/libthr/arch/powerpc64/powerpc/ Modified: head/lib/libthr/arch/powerpc64/include/pthread_md.h Modified: head/lib/libthr/arch/powerpc64/include/pthread_md.h ============================================================================== --- head/lib/libthr/arch/powerpc64/include/pthread_md.h Sat Jul 10 22:37:23 2010 (r209892) +++ head/lib/libthr/arch/powerpc64/include/pthread_md.h Sun Jul 11 05:13:38 2010 (r209893) @@ -39,12 +39,12 @@ #define CPU_SPINWAIT #define DTV_OFFSET offsetof(struct tcb, tcb_dtv) -#define TP_OFFSET 0x7008 +#define TP_OFFSET 0x7010 /* * Variant I tcb. The structure layout is fixed, don't blindly * change it. - * %r2 points to end of the structure. + * %r13 points to end of the structure. */ struct tcb { void *tcb_dtv; @@ -57,7 +57,7 @@ void _tcb_dtor(struct tcb *); static __inline void _tcb_set(struct tcb *tcb) { - register uint8_t *_tp __asm__("%r2"); + register uint8_t *_tp __asm__("%r13"); __asm __volatile("mr %0,%1" : "=r"(_tp) : "r"((uint8_t *)tcb + TP_OFFSET)); @@ -66,7 +66,7 @@ _tcb_set(struct tcb *tcb) static __inline struct tcb * _tcb_get(void) { - register uint8_t *_tp __asm__("%r2"); + register uint8_t *_tp __asm__("%r13"); return ((struct tcb *)(_tp - TP_OFFSET)); } From owner-svn-src-all@FreeBSD.ORG Sun Jul 11 08:25:00 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E5A0D106564A; Sun, 11 Jul 2010 08:24:59 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 7C98F8FC13; Sun, 11 Jul 2010 08:24:59 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o6B8OsjF064645 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 11 Jul 2010 11:24:54 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id o6B8Os9j075958; Sun, 11 Jul 2010 11:24:54 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o6B8OseC075957; Sun, 11 Jul 2010 11:24:54 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 11 Jul 2010 11:24:54 +0300 From: Kostik Belousov To: Lawrence Stewart Message-ID: <20100711082454.GN2408@deviant.kiev.zoral.com.ua> References: <201006130239.o5D2du3m086332@svn.freebsd.org> <20100613101025.GD1320@garage.freebsd.pl> <4C158B71.205@freebsd.org> <20100614085205.GD13238@deviant.kiev.zoral.com.ua> <4C1605A7.2000202@freebsd.org> <20100614104349.GF13238@deviant.kiev.zoral.com.ua> <4C198A90.3060905@freebsd.org> <20100617071300.GX13238@deviant.kiev.zoral.com.ua> <4C1AD292.5070508@freebsd.org> <4C369172.4020700@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="dPW7zu3hTOhZvCDO" Content-Disposition: inline In-Reply-To: <4C369172.4020700@freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-2.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_50, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r209119 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 08:25:00 -0000 --dPW7zu3hTOhZvCDO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jul 09, 2010 at 01:03:14PM +1000, Lawrence Stewart wrote: > On 06/18/10 11:57, Lawrence Stewart wrote: > > On 06/17/10 17:13, Kostik Belousov wrote: > >> On Thu, Jun 17, 2010 at 12:38:08PM +1000, Lawrence Stewart wrote: > >>> On 06/14/10 20:43, Kostik Belousov wrote: > > [snip] > >>>> Or, you could ditch the sum at all, indeed using ({}) and returning = the > >>>> result. __typeof is your friend to select proper type of accumulator. > >>> > >>> So, something like this? > >>> > >>> #define DPCPU_SUM(n, var) __extension__ = \ > >>> ({ = \ > >>> u_int > >>> _i; \ > >>> __typeof((DPCPU_PTR(n))->var) > >>> sum; \ > >>> = =20 > >>> \ > >>> sum =3D > >>> 0; \ > >>> CPU_FOREACH(_i) > >>> { \ > >>> sum +=3D (DPCPU_ID_PTR(_i, > >>> n))->var; \ > >>> =20 > >>> } \ > >>> =20 > >>> sum; \ > >>> }) > >>> > >>> Which can be used like this: > >>> > >>> totalss.n_in =3D DPCPU_SUM(ss, n_in); >=20 > [snip] >=20 > > I'll commit the above version of the macro this evening (GMT+10) unless > > I hear any objections. Thanks to all of you for your input. >=20 > Any objections to the following patch going in as a follow up to the > above discussion? >=20 > http://people.freebsd.org/~lstewart/patches/tcp_ffcaia2008/dpcpu_zeromemb= er_9.x.r209745.patch >=20 > Turns out I need DPCPU_ZERO to fix a bug in SIFTR and it occurred to me > that providing variants of the macros which work on the DPCPU variable > itself or a member of a DPCPU struct makes good sense. The new patch > therefore renames my original DPCPU_SUM to DPCPU_MEMBERSUM and includes > DPCPU_MEMBERZERO(). >=20 > Also open to suggestions on a sensible shortening of MEMBER or other > appropriate and descriptive indicator to reduce the macro name lengths. > MBR implies some sort of memory barrier... any other ideas? I suggest changing MEMBER to VAR. Are the macros only believed to be useful, or you already use them ? For the usual reasons, it seems to be better to wrap DCPU_ZERO into do/while (0). --dPW7zu3hTOhZvCDO Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkw5f9YACgkQC3+MBN1Mb4h4/ACfagFoqk7I2yAkvp+gu3jGvP0Z HJEAoM+1XFk8J2pHN+29u/mQEtDBdD5p =ZeY9 -----END PGP SIGNATURE----- --dPW7zu3hTOhZvCDO-- From owner-svn-src-all@FreeBSD.ORG Sun Jul 11 08:41:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09B36106564A; Sun, 11 Jul 2010 08:41:31 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ECD588FC17; Sun, 11 Jul 2010 08:41:30 +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 o6B8fUjZ025435; Sun, 11 Jul 2010 08:41:30 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6B8fUqI025432; Sun, 11 Jul 2010 08:41:30 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201007110841.o6B8fUqI025432@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 11 Jul 2010 08:41:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209894 - stable/8/sys/compat/freebsd32 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 08:41:31 -0000 Author: kib Date: Sun Jul 11 08:41:30 2010 New Revision: 209894 URL: http://svn.freebsd.org/changeset/base/209894 Log: MFC r209687: Constify source argument for siginfo_to_siginfo32(). Modified: stable/8/sys/compat/freebsd32/freebsd32_misc.c stable/8/sys/compat/freebsd32/freebsd32_signal.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- stable/8/sys/compat/freebsd32/freebsd32_misc.c Sun Jul 11 05:13:38 2010 (r209893) +++ stable/8/sys/compat/freebsd32/freebsd32_misc.c Sun Jul 11 08:41:30 2010 (r209894) @@ -2208,7 +2208,7 @@ freebsd32_thr_suspend(struct thread *td, } void -siginfo_to_siginfo32(siginfo_t *src, struct siginfo32 *dst) +siginfo_to_siginfo32(const siginfo_t *src, struct siginfo32 *dst) { bzero(dst, sizeof(*dst)); dst->si_signo = src->si_signo; Modified: stable/8/sys/compat/freebsd32/freebsd32_signal.h ============================================================================== --- stable/8/sys/compat/freebsd32/freebsd32_signal.h Sun Jul 11 05:13:38 2010 (r209893) +++ stable/8/sys/compat/freebsd32/freebsd32_signal.h Sun Jul 11 08:41:30 2010 (r209894) @@ -96,6 +96,6 @@ struct sigevent32 { } _sigev_un; }; -void siginfo_to_siginfo32(siginfo_t *src, struct siginfo32 *dst); +void siginfo_to_siginfo32(const siginfo_t *src, struct siginfo32 *dst); #endif /* !_COMPAT_FREEBSD32_SIGNAL_H_ */ From owner-svn-src-all@FreeBSD.ORG Sun Jul 11 08:43:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7DF48106564A; Sun, 11 Jul 2010 08:43:31 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6D0EA8FC19; Sun, 11 Jul 2010 08:43:31 +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 o6B8hVqN025941; Sun, 11 Jul 2010 08:43:31 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6B8hV1L025939; Sun, 11 Jul 2010 08:43:31 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201007110843.o6B8hV1L025939@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 11 Jul 2010 08:43:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209895 - stable/8/sys/dev/agp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 08:43:31 -0000 Author: kib Date: Sun Jul 11 08:43:30 2010 New Revision: 209895 URL: http://svn.freebsd.org/changeset/base/209895 Log: MFC r209793: Do not mention VM_ALLOC_RETRY in comment, and normalize the terminology (blocking -> sleeping). Modified: stable/8/sys/dev/agp/agp.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/agp/agp.c ============================================================================== --- stable/8/sys/dev/agp/agp.c Sun Jul 11 08:41:30 2010 (r209894) +++ stable/8/sys/dev/agp/agp.c Sun Jul 11 08:43:30 2010 (r209895) @@ -537,8 +537,8 @@ agp_generic_bind_memory(device_t dev, st /* * Allocate the pages early, before acquiring the lock, - * because vm_page_grab() used with VM_ALLOC_RETRY may - * block and we can't hold a mutex while blocking. + * because vm_page_grab() may sleep and we can't hold a mutex + * while sleeping. */ VM_OBJECT_LOCK(mem->am_obj); for (i = 0; i < mem->am_size; i += PAGE_SIZE) { From owner-svn-src-all@FreeBSD.ORG Sun Jul 11 09:37:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F7041065670; Sun, 11 Jul 2010 09:37:35 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1E40E8FC13; Sun, 11 Jul 2010 09:37:35 +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 o6B9bZbF037721; Sun, 11 Jul 2010 09:37:35 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6B9bYAu037716; Sun, 11 Jul 2010 09:37:34 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201007110937.o6B9bYAu037716@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 11 Jul 2010 09:37:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209896 - stable/8/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 09:37:35 -0000 Author: kib Date: Sun Jul 11 09:37:34 2010 New Revision: 209896 URL: http://svn.freebsd.org/changeset/base/209896 Log: MFC r209685: Introduce a helper function vm_page_find_least(). Use it in several places, which inline the function. Modified: stable/8/sys/vm/vm_map.c stable/8/sys/vm/vm_object.c stable/8/sys/vm/vm_page.c stable/8/sys/vm/vm_page.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/vm/vm_map.c ============================================================================== --- stable/8/sys/vm/vm_map.c Sun Jul 11 08:43:30 2010 (r209895) +++ stable/8/sys/vm/vm_map.c Sun Jul 11 09:37:34 2010 (r209896) @@ -1740,13 +1740,7 @@ vm_map_pmap_enter(vm_map_t map, vm_offse start = 0; p_start = NULL; - if ((p = TAILQ_FIRST(&object->memq)) != NULL) { - if (p->pindex < pindex) { - p = vm_page_splay(pindex, object->root); - if ((object->root = p)->pindex < pindex) - p = TAILQ_NEXT(p, listq); - } - } + p = vm_page_find_least(object, pindex); /* * Assert: the variable p is either (1) the page with the * least pindex greater than or equal to the parameter pindex Modified: stable/8/sys/vm/vm_object.c ============================================================================== --- stable/8/sys/vm/vm_object.c Sun Jul 11 08:43:30 2010 (r209895) +++ stable/8/sys/vm/vm_object.c Sun Jul 11 09:37:34 2010 (r209896) @@ -1398,13 +1398,7 @@ vm_object_split(vm_map_entry_t entry) orig_object->charge -= ptoa(size); } retry: - if ((m = TAILQ_FIRST(&orig_object->memq)) != NULL) { - if (m->pindex < offidxstart) { - m = vm_page_splay(offidxstart, orig_object->root); - if ((orig_object->root = m)->pindex < offidxstart) - m = TAILQ_NEXT(m, listq); - } - } + m = vm_page_find_least(orig_object, offidxstart); vm_page_lock_queues(); for (; m != NULL && (idx = m->pindex - offidxstart) < size; m = m_next) { @@ -1909,13 +1903,7 @@ vm_object_page_remove(vm_object_t object vm_object_pip_add(object, 1); again: - if ((p = TAILQ_FIRST(&object->memq)) != NULL) { - if (p->pindex < start) { - p = vm_page_splay(start, object->root); - if ((object->root = p)->pindex < start) - p = TAILQ_NEXT(p, listq); - } - } + p = vm_page_find_least(object, start); vm_page_lock_queues(); /* * Assert: the variable p is either (1) the page with the Modified: stable/8/sys/vm/vm_page.c ============================================================================== --- stable/8/sys/vm/vm_page.c Sun Jul 11 08:43:30 2010 (r209895) +++ stable/8/sys/vm/vm_page.c Sun Jul 11 09:37:34 2010 (r209896) @@ -786,6 +786,31 @@ vm_page_lookup(vm_object_t object, vm_pi } /* + * vm_page_find_least: + * + * Returns the page associated with the object with least pindex + * greater than or equal to the parameter pindex, or NULL. + * + * The object must be locked. + * The routine may not block. + */ +vm_page_t +vm_page_find_least(vm_object_t object, vm_pindex_t pindex) +{ + vm_page_t m; + + VM_OBJECT_LOCK_ASSERT(object, MA_OWNED); + if ((m = TAILQ_FIRST(&object->memq)) != NULL) { + if (m->pindex < pindex) { + m = vm_page_splay(pindex, object->root); + if ((object->root = m)->pindex < pindex) + m = TAILQ_NEXT(m, listq); + } + } + return (m); +} + +/* * vm_page_rename: * * Move the given memory entry from its Modified: stable/8/sys/vm/vm_page.h ============================================================================== --- stable/8/sys/vm/vm_page.h Sun Jul 11 08:43:30 2010 (r209895) +++ stable/8/sys/vm/vm_page.h Sun Jul 11 09:37:34 2010 (r209896) @@ -312,6 +312,7 @@ int vm_page_try_to_cache (vm_page_t); int vm_page_try_to_free (vm_page_t); void vm_page_dontneed(vm_page_t); void vm_page_deactivate (vm_page_t); +vm_page_t vm_page_find_least(vm_object_t, vm_pindex_t); void vm_page_insert (vm_page_t, vm_object_t, vm_pindex_t); vm_page_t vm_page_lookup (vm_object_t, vm_pindex_t); void vm_page_remove (vm_page_t); From owner-svn-src-all@FreeBSD.ORG Sun Jul 11 11:58:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1EBCF106566B; Sun, 11 Jul 2010 11:58:47 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0CED38FC16; Sun, 11 Jul 2010 11:58: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 o6BBwkhP069924; Sun, 11 Jul 2010 11:58:46 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6BBwkiK069922; Sun, 11 Jul 2010 11:58:46 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007111158.o6BBwkiK069922@svn.freebsd.org> From: Alexander Motin Date: Sun, 11 Jul 2010 11:58:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209897 - stable/8/sys/dev/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 11:58:47 -0000 Author: mav Date: Sun Jul 11 11:58:46 2010 New Revision: 209897 URL: http://svn.freebsd.org/changeset/base/209897 Log: MFC r209328,r209330: While we indeed can't precisely measure time spent in C1, we can consider measured interval as upper bound. It should be more precise then just assuming 1/(2*hz). For idle CPU it should be quite precise, for busy - not worse then before. Modified: stable/8/sys/dev/acpica/acpi_cpu.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/acpica/acpi_cpu.c ============================================================================== --- stable/8/sys/dev/acpica/acpi_cpu.c Sun Jul 11 09:37:34 2010 (r209896) +++ stable/8/sys/dev/acpica/acpi_cpu.c Sun Jul 11 11:58:46 2010 (r209897) @@ -930,12 +930,16 @@ acpi_cpu_idle() /* * Execute HLT (or equivalent) and wait for an interrupt. We can't - * calculate the time spent in C1 since the place we wake up is an - * ISR. Assume we slept half of quantum and return. + * precisely calculate the time spent in C1 since the place we wake up + * is an ISR. Assume we slept no more then half of quantum. */ if (cx_next->type == ACPI_STATE_C1) { - sc->cpu_prev_sleep = (sc->cpu_prev_sleep * 3 + 500000 / hz) / 4; + AcpiHwRead(&start_time, &AcpiGbl_FADT.XPmTimerBlock); acpi_cpu_c1(); + AcpiHwRead(&end_time, &AcpiGbl_FADT.XPmTimerBlock); + end_time = acpi_TimerDelta(end_time, start_time); + sc->cpu_prev_sleep = (sc->cpu_prev_sleep * 3 + + min(PM_USEC(end_time), 500000 / hz)) / 4; return; } From owner-svn-src-all@FreeBSD.ORG Sun Jul 11 12:06:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69E1A106564A; Sun, 11 Jul 2010 12:06:43 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 58CBD8FC1A; Sun, 11 Jul 2010 12:06:43 +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 o6BC6hZc071782; Sun, 11 Jul 2010 12:06:43 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6BC6h7i071780; Sun, 11 Jul 2010 12:06:43 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007111206.o6BC6h7i071780@svn.freebsd.org> From: Alexander Motin Date: Sun, 11 Jul 2010 12:06:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209898 - stable/8/usr.sbin/moused X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 12:06:43 -0000 Author: mav Date: Sun Jul 11 12:06:42 2010 New Revision: 209898 URL: http://svn.freebsd.org/changeset/base/209898 Log: MFC r209214: When Emulate3Button is active, do not set select() timeout in states when it is not needed. No need to kick CPU every 20ms without a purpose. Modified: stable/8/usr.sbin/moused/moused.c Directory Properties: stable/8/usr.sbin/moused/ (props changed) Modified: stable/8/usr.sbin/moused/moused.c ============================================================================== --- stable/8/usr.sbin/moused/moused.c Sun Jul 11 11:58:46 2010 (r209897) +++ stable/8/usr.sbin/moused/moused.c Sun Jul 11 12:06:42 2010 (r209898) @@ -1090,7 +1090,8 @@ moused(void) FD_SET(rodent.mremcfd, &fds); c = select(FD_SETSIZE, &fds, NULL, NULL, - (rodent.flags & Emulate3Button) ? &timeout : NULL); + ((rodent.flags & Emulate3Button) && + S_DELAYED(mouse_button_state)) ? &timeout : NULL); if (c < 0) { /* error */ logwarn("failed to read from mouse"); continue; From owner-svn-src-all@FreeBSD.ORG Sun Jul 11 13:04:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A451F106566C; Sun, 11 Jul 2010 13:04:23 +0000 (UTC) (envelope-from lstewart@freebsd.org) Received: from lauren.room52.net (lauren.room52.net [210.50.193.198]) by mx1.freebsd.org (Postfix) with ESMTP id 31D548FC0C; Sun, 11 Jul 2010 13:04:23 +0000 (UTC) Received: from lawrence1.loshell.room52.net (ppp59-167-184-191.static.internode.on.net [59.167.184.191]) by lauren.room52.net (Postfix) with ESMTPSA id 278DE7E84A; Sun, 11 Jul 2010 23:04:21 +1000 (EST) Message-ID: <4C39C154.7090706@freebsd.org> Date: Sun, 11 Jul 2010 23:04:20 +1000 From: Lawrence Stewart User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-AU; rv:1.9.1.10) Gecko/20100704 Thunderbird/3.0.5 MIME-Version: 1.0 To: Kostik Belousov References: <201006130239.o5D2du3m086332@svn.freebsd.org> <20100613101025.GD1320@garage.freebsd.pl> <4C158B71.205@freebsd.org> <20100614085205.GD13238@deviant.kiev.zoral.com.ua> <4C1605A7.2000202@freebsd.org> <20100614104349.GF13238@deviant.kiev.zoral.com.ua> <4C198A90.3060905@freebsd.org> <20100617071300.GX13238@deviant.kiev.zoral.com.ua> <4C1AD292.5070508@freebsd.org> <4C369172.4020700@freebsd.org> <20100711082454.GN2408@deviant.kiev.zoral.com.ua> In-Reply-To: <20100711082454.GN2408@deviant.kiev.zoral.com.ua> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r209119 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 13:04:23 -0000 On 07/11/10 18:24, Kostik Belousov wrote: > On Fri, Jul 09, 2010 at 01:03:14PM +1000, Lawrence Stewart wrote: >> On 06/18/10 11:57, Lawrence Stewart wrote: >>> On 06/17/10 17:13, Kostik Belousov wrote: >>>> On Thu, Jun 17, 2010 at 12:38:08PM +1000, Lawrence Stewart wrote: >>>>> On 06/14/10 20:43, Kostik Belousov wrote: >>> [snip] >>>>>> Or, you could ditch the sum at all, indeed using ({}) and returning the >>>>>> result. __typeof is your friend to select proper type of accumulator. >>>>> >>>>> So, something like this? >>>>> >>>>> #define DPCPU_SUM(n, var) __extension__ \ >>>>> ({ \ >>>>> u_int >>>>> _i; \ >>>>> __typeof((DPCPU_PTR(n))->var) >>>>> sum; \ >>>>> >>>>> \ >>>>> sum = >>>>> 0; \ >>>>> CPU_FOREACH(_i) >>>>> { \ >>>>> sum += (DPCPU_ID_PTR(_i, >>>>> n))->var; \ >>>>> >>>>> } \ >>>>> >>>>> sum; \ >>>>> }) >>>>> >>>>> Which can be used like this: >>>>> >>>>> totalss.n_in = DPCPU_SUM(ss, n_in); >> >> [snip] >> >>> I'll commit the above version of the macro this evening (GMT+10) unless >>> I hear any objections. Thanks to all of you for your input. >> >> Any objections to the following patch going in as a follow up to the >> above discussion? >> >> http://people.freebsd.org/~lstewart/patches/tcp_ffcaia2008/dpcpu_zeromember_9.x.r209745.patch >> >> Turns out I need DPCPU_ZERO to fix a bug in SIFTR and it occurred to me >> that providing variants of the macros which work on the DPCPU variable >> itself or a member of a DPCPU struct makes good sense. The new patch >> therefore renames my original DPCPU_SUM to DPCPU_MEMBERSUM and includes >> DPCPU_MEMBERZERO(). >> >> Also open to suggestions on a sensible shortening of MEMBER or other >> appropriate and descriptive indicator to reduce the macro name lengths. >> MBR implies some sort of memory barrier... any other ideas? > > I suggest changing MEMBER to VAR. I'd be happy with that. If I don't get a better suggestion or an objection I'll go with DPCPU_VARZERO and DPCPU_VARSUM. Thanks for the input. > Are the macros only believed to be useful, or you already use them ? DPCPU_ZERO and DPCPU_MEMBERSUM I have an immediate use for in the SIFTR code. I don't have an immediate use for DPCPU_MEMBERZERO and DPCPU_SUM, but I can imagine they will both find use once people start converting stats counters and various other kernel data to DPCPU. > For the usual reasons, it seems to be better to wrap DCPU_ZERO > into do/while (0). Oops, good point. Will do. Cheers, Lawrence From owner-svn-src-all@FreeBSD.ORG Sun Jul 11 15:32:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 06717106564A; Sun, 11 Jul 2010 15:32:21 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E87828FC0A; Sun, 11 Jul 2010 15:32:20 +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 o6BFWKGx016920; Sun, 11 Jul 2010 15:32:20 GMT (envelope-from jamie@svn.freebsd.org) Received: (from jamie@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6BFWKQC016918; Sun, 11 Jul 2010 15:32:20 GMT (envelope-from jamie@svn.freebsd.org) Message-Id: <201007111532.o6BFWKQC016918@svn.freebsd.org> From: Jamie Gritton Date: Sun, 11 Jul 2010 15:32:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209899 - stable/8/usr.sbin/jls X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 15:32:21 -0000 Author: jamie Date: Sun Jul 11 15:32:20 2010 New Revision: 209899 URL: http://svn.freebsd.org/changeset/base/209899 Log: MFC r209820: Properly recognize a number followed by non-digits as a jail name. Call "0" a name because zero is used to indicate no specified jid. Modified: stable/8/usr.sbin/jls/jls.c Directory Properties: stable/8/usr.sbin/jls/ (props changed) Modified: stable/8/usr.sbin/jls/jls.c ============================================================================== --- stable/8/usr.sbin/jls/jls.c Sun Jul 11 12:06:42 2010 (r209898) +++ stable/8/usr.sbin/jls/jls.c Sun Jul 11 15:32:20 2010 (r209899) @@ -84,8 +84,10 @@ main(int argc, char **argv) break; case 'j': jid = strtoul(optarg, &ep, 10); - if (!*optarg || *ep) + if (!jid || *ep) { + jid = 0; jname = optarg; + } break; case 'h': pflags = (pflags & ~(PRINT_SKIP | PRINT_VERBOSE)) | From owner-svn-src-all@FreeBSD.ORG Sun Jul 11 16:47:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E5EA1065677; Sun, 11 Jul 2010 16:47:46 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 43E4D8FC0A; Sun, 11 Jul 2010 16:47: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 o6BGlkW9033553; Sun, 11 Jul 2010 16:47:46 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6BGlk0O033551; Sun, 11 Jul 2010 16:47:46 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007111647.o6BGlk0O033551@svn.freebsd.org> From: Alexander Motin Date: Sun, 11 Jul 2010 16:47:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209900 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 16:47:46 -0000 Author: mav Date: Sun Jul 11 16:47:45 2010 New Revision: 209900 URL: http://svn.freebsd.org/changeset/base/209900 Log: Remove interval validation from cpu_tick_calibrate(). As I found, check was needed at preliminary version of the patch, where number of CPU ticks was divided strictly on 16 seconds. Final code instead uses real interval duration, so precise interval should not be important. Same time aliasing issues around second boundary causes false positives, periodically logging useless "t_delta ... too long/short" messages when HZ set below 256. Modified: head/sys/kern/kern_tc.c Modified: head/sys/kern/kern_tc.c ============================================================================== --- head/sys/kern/kern_tc.c Sun Jul 11 15:32:20 2010 (r209899) +++ head/sys/kern/kern_tc.c Sun Jul 11 16:47:45 2010 (r209900) @@ -864,43 +864,21 @@ cpu_tick_calibrate(int reset) t_delta = t_this; bintime_sub(&t_delta, &t_last); /* - * Validate that 16 +/- 1/256 seconds passed. - * After division by 16 this gives us a precision of - * roughly 250PPM which is sufficient + * Headroom: + * 2^(64-20) / 16[s] = + * 2^(44) / 16[s] = + * 17.592.186.044.416 / 16 = + * 1.099.511.627.776 [Hz] */ - if (t_delta.sec > 16 || ( - t_delta.sec == 16 && t_delta.frac >= (0x01LL << 56))) { - /* too long */ - if (bootverbose) - printf("t_delta %ju.%016jx too long\n", - (uintmax_t)t_delta.sec, - (uintmax_t)t_delta.frac); - } else if (t_delta.sec < 15 || - (t_delta.sec == 15 && t_delta.frac <= (0xffLL << 56))) { - /* too short */ - if (bootverbose) - printf("t_delta %ju.%016jx too short\n", - (uintmax_t)t_delta.sec, - (uintmax_t)t_delta.frac); - } else { - /* just right */ - /* - * Headroom: - * 2^(64-20) / 16[s] = - * 2^(44) / 16[s] = - * 17.592.186.044.416 / 16 = - * 1.099.511.627.776 [Hz] - */ - divi = t_delta.sec << 20; - divi |= t_delta.frac >> (64 - 20); - c_delta <<= 20; - c_delta /= divi; - if (c_delta > cpu_tick_frequency) { - if (0 && bootverbose) - printf("cpu_tick increased to %ju Hz\n", - c_delta); - cpu_tick_frequency = c_delta; - } + divi = t_delta.sec << 20; + divi |= t_delta.frac >> (64 - 20); + c_delta <<= 20; + c_delta /= divi; + if (c_delta > cpu_tick_frequency) { + if (0 && bootverbose) + printf("cpu_tick increased to %ju Hz\n", + c_delta); + cpu_tick_frequency = c_delta; } } c_last = c_this; From owner-svn-src-all@FreeBSD.ORG Sun Jul 11 17:08:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BFBFA1065670; Sun, 11 Jul 2010 17:08:37 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AE5988FC08; Sun, 11 Jul 2010 17:08:37 +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 o6BH8bXc038164; Sun, 11 Jul 2010 17:08:37 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6BH8bRe038162; Sun, 11 Jul 2010 17:08:37 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007111708.o6BH8bRe038162@svn.freebsd.org> From: Alexander Motin Date: Sun, 11 Jul 2010 17:08:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209901 - head/sys/x86/x86 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 17:08:37 -0000 Author: mav Date: Sun Jul 11 17:08:37 2010 New Revision: 209901 URL: http://svn.freebsd.org/changeset/base/209901 Log: Make kernel panic with reasonable message if no usable event timer found. Modified: head/sys/x86/x86/timeevents.c Modified: head/sys/x86/x86/timeevents.c ============================================================================== --- head/sys/x86/x86/timeevents.c Sun Jul 11 16:47:45 2010 (r209900) +++ head/sys/x86/x86/timeevents.c Sun Jul 11 17:08:37 2010 (r209901) @@ -309,6 +309,8 @@ cpu_initclocks_bsp(void) timer[0] = et_find(timername[0], ET_FLAGS_PERIODIC, ET_FLAGS_PERIODIC); if (timer[0] == NULL) timer[0] = et_find(NULL, ET_FLAGS_PERIODIC, ET_FLAGS_PERIODIC); + if (timer[0] == NULL) + panic("No usable event timer found!"); et_init(timer[0], timer1cb, NULL, NULL); timer[1] = et_find(timername[1][0] ? timername[1] : NULL, ET_FLAGS_PERIODIC, ET_FLAGS_PERIODIC); From owner-svn-src-all@FreeBSD.ORG Sun Jul 11 20:11:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B5EC106564A; Sun, 11 Jul 2010 20:11:45 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2296D8FC1A; Sun, 11 Jul 2010 20:11:45 +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 o6BKBjID078420; Sun, 11 Jul 2010 20:11:45 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6BKBjdr078418; Sun, 11 Jul 2010 20:11:45 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201007112011.o6BKBjdr078418@svn.freebsd.org> From: Alan Cox Date: Sun, 11 Jul 2010 20:11:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209902 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 20:11:45 -0000 Author: alc Date: Sun Jul 11 20:11:44 2010 New Revision: 209902 URL: http://svn.freebsd.org/changeset/base/209902 Log: Change the implementation of vm_hold_free_pages() so that it performs at most one call to pmap_qremove(), and thus one TLB shootdown, instead of one call and TLB shootdown per page. Simplify the interface to vm_hold_free_pages(). MFC after: 3 weeks Modified: head/sys/kern/vfs_bio.c Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Sun Jul 11 17:08:37 2010 (r209901) +++ head/sys/kern/vfs_bio.c Sun Jul 11 20:11:44 2010 (r209902) @@ -95,8 +95,7 @@ struct buf *buf; /* buffer header pool static struct proc *bufdaemonproc; static int inmem(struct vnode *vp, daddr_t blkno); -static void vm_hold_free_pages(struct buf *bp, vm_offset_t from, - vm_offset_t to); +static void vm_hold_free_pages(struct buf *bp, int newbsize); static void vm_hold_load_pages(struct buf *bp, vm_offset_t from, vm_offset_t to); static void vfs_page_set_valid(struct buf *bp, vm_ooffset_t off, vm_page_t m); @@ -2888,10 +2887,7 @@ allocbuf(struct buf *bp, int size) } return 1; } - vm_hold_free_pages( - bp, - (vm_offset_t) bp->b_data + newbsize, - (vm_offset_t) bp->b_data + bp->b_bufsize); + vm_hold_free_pages(bp, newbsize); } else if (newbsize > bp->b_bufsize) { /* * We only use malloced memory on the first allocation. @@ -3766,31 +3762,25 @@ tryagain: /* Return pages associated with this buf to the vm system */ static void -vm_hold_free_pages(struct buf *bp, vm_offset_t from, vm_offset_t to) +vm_hold_free_pages(struct buf *bp, int newbsize) { - vm_offset_t pg; + vm_offset_t from; vm_page_t p; int index, newnpages; - from = round_page(from); - to = round_page(to); - newnpages = index = (from - trunc_page((vm_offset_t)bp->b_data)) >> PAGE_SHIFT; - - for (pg = from; pg < to; pg += PAGE_SIZE, index++) { + from = round_page((vm_offset_t)bp->b_data + newbsize); + newnpages = (from - trunc_page((vm_offset_t)bp->b_data)) >> PAGE_SHIFT; + if (bp->b_npages > newnpages) + pmap_qremove(from, bp->b_npages - newnpages); + for (index = newnpages; index < bp->b_npages; index++) { p = bp->b_pages[index]; - if (p && (index < bp->b_npages)) { - if (p->busy) { - printf( - "vm_hold_free_pages: blkno: %jd, lblkno: %jd\n", - (intmax_t)bp->b_blkno, - (intmax_t)bp->b_lblkno); - } - bp->b_pages[index] = NULL; - pmap_qremove(pg, 1); - p->wire_count--; - vm_page_free(p); - atomic_subtract_int(&cnt.v_wire_count, 1); - } + bp->b_pages[index] = NULL; + if (p->busy != 0) + printf("vm_hold_free_pages: blkno: %jd, lblkno: %jd\n", + (intmax_t)bp->b_blkno, (intmax_t)bp->b_lblkno); + p->wire_count--; + vm_page_free(p); + atomic_subtract_int(&cnt.v_wire_count, 1); } bp->b_npages = newnpages; } From owner-svn-src-all@FreeBSD.ORG Sun Jul 11 20:29:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A3D68106566C; Sun, 11 Jul 2010 20:29:34 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 947ED8FC17; Sun, 11 Jul 2010 20:29:34 +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 o6BKTYtF082287; Sun, 11 Jul 2010 20:29:34 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6BKTYxM082285; Sun, 11 Jul 2010 20:29:34 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <201007112029.o6BKTYxM082285@svn.freebsd.org> From: Rafal Jaworowski Date: Sun, 11 Jul 2010 20:29:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209903 - head/sys/boot/fdt/dts X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 20:29:34 -0000 Author: raj Date: Sun Jul 11 20:29:34 2010 New Revision: 209903 URL: http://svn.freebsd.org/changeset/base/209903 Log: Provide a missing interrupt-parent for the CPM / QUICC node in the DTS. Modified: head/sys/boot/fdt/dts/mpc8555cds.dts Modified: head/sys/boot/fdt/dts/mpc8555cds.dts ============================================================================== --- head/sys/boot/fdt/dts/mpc8555cds.dts Sun Jul 11 20:11:44 2010 (r209902) +++ head/sys/boot/fdt/dts/mpc8555cds.dts Sun Jul 11 20:29:34 2010 (r209903) @@ -343,6 +343,7 @@ compatible = "fsl,mpc8555-cpm", "fsl,cpm2"; reg = <0x80000 0x20000>; interrupts = <46 2>; + interrupt-parent = <&mpic>; }; }; From owner-svn-src-all@FreeBSD.ORG Sun Jul 11 20:31:00 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 19DCF106566C; Sun, 11 Jul 2010 20:31:00 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0AE588FC1C; Sun, 11 Jul 2010 20:31:00 +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 o6BKUxTB082652; Sun, 11 Jul 2010 20:30:59 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6BKUxFs082650; Sun, 11 Jul 2010 20:30:59 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <201007112030.o6BKUxFs082650@svn.freebsd.org> From: Rafal Jaworowski Date: Sun, 11 Jul 2010 20:30:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209904 - head/sys/dev/fdt X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 20:31:00 -0000 Author: raj Date: Sun Jul 11 20:30:59 2010 New Revision: 209904 URL: http://svn.freebsd.org/changeset/base/209904 Log: Let simplebus(4) diagnostics be a bit more descriptive. Modified: head/sys/dev/fdt/simplebus.c Modified: head/sys/dev/fdt/simplebus.c ============================================================================== --- head/sys/dev/fdt/simplebus.c Sun Jul 11 20:29:34 2010 (r209903) +++ head/sys/dev/fdt/simplebus.c Sun Jul 11 20:30:59 2010 (r209904) @@ -187,16 +187,16 @@ simplebus_attach(device_t dev) resource_list_init(&di->di_res); if (fdt_reg_to_rl(dt_child, &di->di_res, sc->sc_start_va)) { - device_printf(dev, "could not process 'reg' " - "property\n"); + device_printf(dev, "%s: could not process 'reg' " + "property\n", di->di_ofw.obd_name); ofw_bus_gen_destroy_devinfo(&di->di_ofw); free(di, M_SIMPLEBUS); continue; } if (fdt_intr_to_rl(dt_child, &di->di_res, di->di_intr_sl)) { - device_printf(dev, "could not process 'interrupts' " - "property\n"); + device_printf(dev, "%s: could not process " + "'interrupts' property\n", di->di_ofw.obd_name); resource_list_free(&di->di_res); ofw_bus_gen_destroy_devinfo(&di->di_ofw); free(di, M_SIMPLEBUS); @@ -213,6 +213,9 @@ simplebus_attach(device_t dev) free(di, M_SIMPLEBUS); continue; } +#ifdef DEBUG + device_printf(dev, "added child: %s\n\n", di->di_ofw.obd_name); +#endif device_set_ivars(dev_child, di); } From owner-svn-src-all@FreeBSD.ORG Sun Jul 11 20:33:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA4691065675; Sun, 11 Jul 2010 20:33:39 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BB0AC8FC12; Sun, 11 Jul 2010 20:33:39 +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 o6BKXdWu083256; Sun, 11 Jul 2010 20:33:39 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6BKXdej083254; Sun, 11 Jul 2010 20:33:39 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <201007112033.o6BKXdej083254@svn.freebsd.org> From: Rafal Jaworowski Date: Sun, 11 Jul 2010 20:33:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209905 - head/sys/dev/fdt X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 20:33:39 -0000 Author: raj Date: Sun Jul 11 20:33:39 2010 New Revision: 209905 URL: http://svn.freebsd.org/changeset/base/209905 Log: Save fdtbus trigger / polarity data at their correct index. Modified: head/sys/dev/fdt/fdt_common.c Modified: head/sys/dev/fdt/fdt_common.c ============================================================================== --- head/sys/dev/fdt/fdt_common.c Sun Jul 11 20:30:59 2010 (r209904) +++ head/sys/dev/fdt/fdt_common.c Sun Jul 11 20:33:39 2010 (r209905) @@ -529,8 +529,8 @@ fdt_intr_to_rl(phandle_t node, struct re debugf("decoded intr = %d, trig = %d, pol = %d\n", interrupt, trig, pol); - intr_sl[intr_num].trig = trig; - intr_sl[intr_num].pol = pol; + intr_sl[i].trig = trig; + intr_sl[i].pol = pol; resource_list_add(rl, SYS_RES_IRQ, i, interrupt, interrupt, 1); } From owner-svn-src-all@FreeBSD.ORG Sun Jul 11 20:49:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE78F1065673; Sun, 11 Jul 2010 20:49:36 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9413D8FC13; Sun, 11 Jul 2010 20:49: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 o6BKna8v086805; Sun, 11 Jul 2010 20:49:36 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6BKnaqL086803; Sun, 11 Jul 2010 20:49:36 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <201007112049.o6BKnaqL086803@svn.freebsd.org> From: Rafal Jaworowski Date: Sun, 11 Jul 2010 20:49:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209906 - head/sys/dev/fdt X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 20:49:36 -0000 Author: raj Date: Sun Jul 11 20:49:36 2010 New Revision: 209906 URL: http://svn.freebsd.org/changeset/base/209906 Log: Introduce PowerPC-specific helper routines for FDT. Reviewed by: imp Sponsored by: The FreeBSD Foundation Added: head/sys/dev/fdt/fdt_powerpc.c (contents, props changed) Added: head/sys/dev/fdt/fdt_powerpc.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/fdt/fdt_powerpc.c Sun Jul 11 20:49:36 2010 (r209906) @@ -0,0 +1,168 @@ +/*- + * Copyright (c) 2009-2010 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Semihalf under sponsorship from + * the FreeBSD Foundation. + * + * 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$"); + +#include +#include +#include +#include +#include + +#include + +#include +#include +#include + +#include "ofw_bus_if.h" +#include "fdt_common.h" + +static void +fdt_fixup_busfreq(phandle_t root) +{ + phandle_t sb, cpus, child; + pcell_t freq; + + /* + * Do a strict check so as to skip non-SOC nodes, which also claim + * simple-bus compatibility such as eLBC etc. + */ + if ((sb = fdt_find_compatible(root, "simple-bus", 1)) == 0) + return; + + /* + * This fixup uses /cpus/ bus-frequency prop value to set simple-bus + * bus-frequency property. + */ + if ((cpus = OF_finddevice("/cpus")) == 0) + return; + + if ((child = OF_child(cpus)) == 0) + return; + + if (OF_getprop(child, "bus-frequency", (void *)&freq, + sizeof(freq)) <= 0) + return; + + OF_setprop(sb, "bus-frequency", (void *)&freq, sizeof(freq)); +} + +struct fdt_fixup_entry fdt_fixup_table[] = { + { "fsl,MPC8572DS", &fdt_fixup_busfreq }, + { "MPC8555CDS", &fdt_fixup_busfreq }, + { NULL, NULL } +}; + +static int +fdt_pic_decode_iic(phandle_t node, pcell_t *intr, int *interrupt, int *trig, + int *pol) +{ + if (!fdt_is_compatible(node, "chrp,iic")) + return (ENXIO); + + *interrupt = intr[0]; + + switch (intr[1]) { + case 0: + /* Active L level */ + *trig = INTR_TRIGGER_LEVEL; + *pol = INTR_POLARITY_LOW; + break; + case 1: + /* Active H level */ + *trig = INTR_TRIGGER_LEVEL; + *pol = INTR_POLARITY_HIGH; + break; + case 2: + /* H to L edge */ + *trig = INTR_TRIGGER_EDGE; + *pol = INTR_POLARITY_LOW; + break; + case 3: + /* L to H edge */ + *trig = INTR_TRIGGER_EDGE; + *pol = INTR_POLARITY_HIGH; + break; + default: + *trig = INTR_TRIGGER_CONFORM; + *pol = INTR_POLARITY_CONFORM; + } + return (0); +} + +static int +fdt_pic_decode_openpic(phandle_t node, pcell_t *intr, int *interrupt, + int *trig, int *pol) +{ + + if (!fdt_is_compatible(node, "chrp,open-pic")) + return (ENXIO); + + /* + * XXX The interrupt number read out from the MPC85XX device tree is + * already offset by 16 to reflect the 'internal' IRQ range shift on + * the OpenPIC. + */ + *interrupt = intr[0]; + + switch (intr[1]) { + case 0: + /* L to H edge */ + *trig = INTR_TRIGGER_EDGE; + *pol = INTR_POLARITY_HIGH; + break; + case 1: + /* Active L level */ + *trig = INTR_TRIGGER_LEVEL; + *pol = INTR_POLARITY_LOW; + break; + case 2: + /* Active H level */ + *trig = INTR_TRIGGER_LEVEL; + *pol = INTR_POLARITY_HIGH; + break; + case 3: + /* H to L edge */ + *trig = INTR_TRIGGER_EDGE; + *pol = INTR_POLARITY_LOW; + break; + default: + *trig = INTR_TRIGGER_CONFORM; + *pol = INTR_POLARITY_CONFORM; + } + return (0); +} + +fdt_pic_decode_t fdt_pic_table[] = { + &fdt_pic_decode_iic, + &fdt_pic_decode_openpic, + NULL +}; From owner-svn-src-all@FreeBSD.ORG Sun Jul 11 20:55:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A78A01065672; Sun, 11 Jul 2010 20:55:39 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 982278FC23; Sun, 11 Jul 2010 20:55:39 +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 o6BKtdPf088161; Sun, 11 Jul 2010 20:55:39 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6BKtdG7088159; Sun, 11 Jul 2010 20:55:39 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <201007112055.o6BKtdG7088159@svn.freebsd.org> From: Rafal Jaworowski Date: Sun, 11 Jul 2010 20:55:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209907 - head/sys/dev/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 20:55:39 -0000 Author: raj Date: Sun Jul 11 20:55:39 2010 New Revision: 209907 URL: http://svn.freebsd.org/changeset/base/209907 Log: Provide more defines for PCI-Express device ctrl. Modified: head/sys/dev/pci/pcireg.h Modified: head/sys/dev/pci/pcireg.h ============================================================================== --- head/sys/dev/pci/pcireg.h Sun Jul 11 20:49:36 2010 (r209906) +++ head/sys/dev/pci/pcireg.h Sun Jul 11 20:55:39 2010 (r209907) @@ -605,6 +605,9 @@ #define PCIR_EXPRESS_DEVICE_CAP 0x4 #define PCIM_EXP_CAP_MAX_PAYLOAD 0x0007 #define PCIR_EXPRESS_DEVICE_CTL 0x8 +#define PCIM_EXP_CTL_NFER_ENABLE 0x0002 +#define PCIM_EXP_CTL_FER_ENABLE 0x0004 +#define PCIM_EXP_CTL_URR_ENABLE 0x0008 #define PCIM_EXP_CTL_RELAXED_ORD_ENABLE 0x0010 #define PCIM_EXP_CTL_MAX_PAYLOAD 0x00e0 #define PCIM_EXP_CTL_NOSNOOP_ENABLE 0x0800 From owner-svn-src-all@FreeBSD.ORG Sun Jul 11 21:08:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF69D106566B; Sun, 11 Jul 2010 21:08:29 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AB9DC8FC21; Sun, 11 Jul 2010 21:08: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 o6BL8Ttf091024; Sun, 11 Jul 2010 21:08:29 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6BL8TI9091010; Sun, 11 Jul 2010 21:08:29 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <201007112108.o6BL8TI9091010@svn.freebsd.org> From: Rafal Jaworowski Date: Sun, 11 Jul 2010 21:08:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209908 - in head/sys: conf dev/cfi dev/fdt dev/quicc dev/sec dev/tsec dev/uart powerpc/booke powerpc/conf powerpc/include powerpc/mpc85xx powerpc/powerpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 21:08:29 -0000 Author: raj Date: Sun Jul 11 21:08:29 2010 New Revision: 209908 URL: http://svn.freebsd.org/changeset/base/209908 Log: Convert Freescale PowerPC platforms to FDT convention. The following systems are affected: - MPC8555CDS - MPC8572DS This overhaul covers the following major changes: - All integrated peripherals drivers for Freescale MPC85XX SoC, which are currently in the FreeBSD source tree are reworked and adjusted so they derive config data out of the device tree blob (instead of hard coded / tabelarized values). - This includes: LBC, PCI / PCI-Express, I2C, DS1553, OpenPIC, TSEC, SEC, QUICC, UART, CFI. - Thanks to the common FDT infrastrucutre (fdtbus, simplebus) we retire ocpbus(4) driver, which was based on hard-coded config data. Note that world for these platforms has to be built WITH_FDT. Reviewed by: imp Sponsored by: The FreeBSD Foundation Added: head/sys/dev/cfi/cfi_bus_fdt.c (contents, props changed) head/sys/dev/quicc/quicc_bfe_fdt.c (contents, props changed) head/sys/dev/tsec/if_tsec_fdt.c (contents, props changed) head/sys/powerpc/include/fdt.h (contents, props changed) head/sys/powerpc/mpc85xx/ds1553_bus_fdt.c (contents, props changed) head/sys/powerpc/mpc85xx/openpic_fdt.c (contents, props changed) head/sys/powerpc/mpc85xx/pci_fdt.c (contents, props changed) Deleted: head/sys/dev/cfi/cfi_bus_lbc.c head/sys/dev/quicc/quicc_bfe_ocp.c head/sys/dev/tsec/if_tsec_ocp.c head/sys/dev/uart/uart_bus_ocp.c head/sys/powerpc/include/bootinfo.h head/sys/powerpc/include/ocpbus.h head/sys/powerpc/mpc85xx/ds1553_bus_lbc.c head/sys/powerpc/mpc85xx/ocpbus.c head/sys/powerpc/mpc85xx/ocpbus.h head/sys/powerpc/mpc85xx/opic.c head/sys/powerpc/mpc85xx/pci_ocp.c Modified: head/sys/conf/Makefile.powerpc head/sys/conf/files.powerpc head/sys/dev/fdt/fdt_pci.c head/sys/dev/sec/sec.c head/sys/dev/tsec/if_tsec.c head/sys/dev/tsec/if_tsec.h head/sys/dev/uart/uart_cpu_powerpc.c head/sys/powerpc/booke/locore.S head/sys/powerpc/booke/machdep.c head/sys/powerpc/booke/platform_bare.c head/sys/powerpc/booke/pmap.c head/sys/powerpc/conf/MPC85XX head/sys/powerpc/include/metadata.h head/sys/powerpc/mpc85xx/atpic.c head/sys/powerpc/mpc85xx/i2c.c head/sys/powerpc/mpc85xx/lbc.c head/sys/powerpc/mpc85xx/lbc.h head/sys/powerpc/mpc85xx/mpc85xx.c head/sys/powerpc/mpc85xx/mpc85xx.h head/sys/powerpc/mpc85xx/nexus.c head/sys/powerpc/powerpc/intr_machdep.c Modified: head/sys/conf/Makefile.powerpc ============================================================================== --- head/sys/conf/Makefile.powerpc Sun Jul 11 20:55:39 2010 (r209907) +++ head/sys/conf/Makefile.powerpc Sun Jul 11 21:08:29 2010 (r209908) @@ -30,6 +30,8 @@ S= ../../.. .endif .include "$S/conf/kern.pre.mk" +INCLUDES+= -I$S/contrib/libfdt + CFLAGS+= -msoft-float DDB_ENABLED!= grep DDB opt_ddb.h || true Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Sun Jul 11 20:55:39 2010 (r209907) +++ head/sys/conf/files.powerpc Sun Jul 11 21:08:29 2010 (r209908) @@ -14,7 +14,6 @@ font.h optional sc \ no-obj no-implicit-rule before-depend \ clean "font.h ${SC_DFLT_FONT}-8x14 ${SC_DFLT_FONT}-8x16 ${SC_DFLT_FONT}-8x8" # - crypto/blowfish/bf_enc.c optional crypto | ipsec crypto/des/des_enc.c optional crypto | ipsec | netsmb dev/bm/if_bm.c optional bm powermac @@ -23,21 +22,23 @@ dev/adb/adb_kbd.c optional adb dev/adb/adb_mouse.c optional adb dev/adb/adb_hb_if.m optional adb dev/adb/adb_if.m optional adb -dev/cfi/cfi_bus_lbc.c optional cfi +dev/cfi/cfi_bus_fdt.c optional cfi fdt dev/fb/fb.c optional sc +dev/fdt/fdt_powerpc.c optional fdt dev/hwpmc/hwpmc_powerpc.c optional hwpmc dev/kbd/kbd.c optional sc -dev/ofw/openfirm.c optional aim -dev/ofw/openfirmio.c optional aim -dev/ofw/ofw_bus_if.m optional aim -dev/ofw/ofw_if.m optional aim -dev/ofw/ofw_bus_subr.c optional aim +dev/ofw/openfirm.c optional aim | fdt +dev/ofw/openfirmio.c optional aim | fdt +dev/ofw/ofw_bus_if.m optional aim | fdt +dev/ofw/ofw_if.m optional aim | fdt +dev/ofw/ofw_bus_subr.c optional aim | fdt dev/ofw/ofw_console.c optional aim dev/ofw/ofw_disk.c optional ofwd aim +dev/ofw/ofw_fdt.c optional fdt dev/ofw/ofw_iicbus.c optional iicbus aim dev/ofw/ofw_standard.c optional aim dev/powermac_nvram/powermac_nvram.c optional powermac_nvram powermac -dev/quicc/quicc_bfe_ocp.c optional quicc mpc85xx +dev/quicc/quicc_bfe_fdt.c optional quicc mpc85xx dev/scc/scc_bfe_macio.c optional scc powermac dev/sec/sec.c optional sec mpc85xx dev/sound/macio/aoa.c optional snd_davbus | snd_ai2s powermac @@ -49,9 +50,8 @@ dev/syscons/scgfbrndr.c optional sc dev/syscons/scterm-teken.c optional sc dev/syscons/scvtb.c optional sc dev/tsec/if_tsec.c optional tsec -dev/tsec/if_tsec_ocp.c optional tsec mpc85xx -dev/uart/uart_bus_ocp.c optional uart mpc85xx -dev/uart/uart_cpu_powerpc.c optional uart +dev/tsec/if_tsec_fdt.c optional tsec fdt +dev/uart/uart_cpu_powerpc.c optional uart aim kern/syscalls.c optional ktr libkern/ashldi3.c standard libkern/ashrdi3.c standard @@ -63,6 +63,7 @@ libkern/ffsl.c standard libkern/fls.c standard libkern/flsl.c standard libkern/lshrdi3.c standard +libkern/memchr.c optional fdt libkern/memmove.c standard libkern/memset.c standard libkern/moddi3.c standard @@ -109,16 +110,15 @@ powerpc/fpu/fpu_mul.c optional fpu_emu powerpc/fpu/fpu_sqrt.c optional fpu_emu powerpc/fpu/fpu_subr.c optional fpu_emu powerpc/mpc85xx/atpic.c optional mpc85xx isa -powerpc/mpc85xx/ds1553_bus_lbc.c optional ds1553 +powerpc/mpc85xx/ds1553_bus_fdt.c optional ds1553 fdt powerpc/mpc85xx/ds1553_core.c optional ds1553 -powerpc/mpc85xx/i2c.c optional iicbus mpc85xx +powerpc/mpc85xx/i2c.c optional iicbus fdt powerpc/mpc85xx/isa.c optional mpc85xx isa powerpc/mpc85xx/lbc.c optional mpc85xx powerpc/mpc85xx/mpc85xx.c optional mpc85xx powerpc/mpc85xx/nexus.c optional mpc85xx -powerpc/mpc85xx/ocpbus.c optional mpc85xx -powerpc/mpc85xx/opic.c optional mpc85xx -powerpc/mpc85xx/pci_ocp.c optional pci mpc85xx +powerpc/mpc85xx/openpic_fdt.c optional fdt +powerpc/mpc85xx/pci_fdt.c optional pci mpc85xx powerpc/ofw/ofw_cpu.c optional aim powerpc/ofw/ofw_pcibus.c optional pci aim powerpc/ofw/ofw_pcib_pci.c optional pci aim Added: head/sys/dev/cfi/cfi_bus_fdt.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/cfi/cfi_bus_fdt.c Sun Jul 11 21:08:29 2010 (r209908) @@ -0,0 +1,73 @@ +/*- + * Copyright (c) 2007, Juniper Networks, Inc. + * 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. + * 3. Neither the name of the author nor the names of any co-contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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$"); + +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include + +static int cfi_fdt_probe(device_t); + +static device_method_t cfi_fdt_methods[] = { + /* device interface */ + DEVMETHOD(device_probe, cfi_fdt_probe), + DEVMETHOD(device_attach, cfi_attach), + DEVMETHOD(device_detach, cfi_detach), + + {0, 0} +}; + +static driver_t cfi_fdt_driver = { + cfi_driver_name, + cfi_fdt_methods, + sizeof(struct cfi_softc), +}; + +DRIVER_MODULE (cfi, lbc, cfi_fdt_driver, cfi_devclass, 0, 0); + +static int +cfi_fdt_probe(device_t dev) +{ + + if (!ofw_bus_is_compatible(dev, "cfi-flash")) + return (ENXIO); + + return (cfi_probe(dev)); +} Modified: head/sys/dev/fdt/fdt_pci.c ============================================================================== --- head/sys/dev/fdt/fdt_pci.c Sun Jul 11 20:55:39 2010 (r209907) +++ head/sys/dev/fdt/fdt_pci.c Sun Jul 11 21:08:29 2010 (r209908) @@ -325,8 +325,9 @@ fdt_pci_route_intr(int bus, int slot, in debugf("decoded intr = %d, trig = %d, pol = %d\n", *interrupt, trig, pol); - /* XXX we should probably call powerpc_config() here... */ - +#if defined(__powerpc__) + powerpc_config_intr(INTR_VEC(intr_par, *interrupt), trig, pol); +#endif return (0); next: Added: head/sys/dev/quicc/quicc_bfe_fdt.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/quicc/quicc_bfe_fdt.c Sun Jul 11 21:08:29 2010 (r209908) @@ -0,0 +1,90 @@ +/*- + * Copyright (c) 2006 Juniper Networks. + * 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +static int quicc_fdt_probe(device_t dev); + +static device_method_t quicc_fdt_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, quicc_fdt_probe), + DEVMETHOD(device_attach, quicc_bfe_attach), + DEVMETHOD(device_detach, quicc_bfe_detach), + + DEVMETHOD(bus_alloc_resource, quicc_bus_alloc_resource), + DEVMETHOD(bus_release_resource, quicc_bus_release_resource), + DEVMETHOD(bus_get_resource, quicc_bus_get_resource), + DEVMETHOD(bus_read_ivar, quicc_bus_read_ivar), + DEVMETHOD(bus_setup_intr, quicc_bus_setup_intr), + DEVMETHOD(bus_teardown_intr, quicc_bus_teardown_intr), + DEVMETHOD(bus_print_child, bus_generic_print_child), + DEVMETHOD(bus_driver_added, bus_generic_driver_added), + + { 0, 0 } +}; + +static driver_t quicc_fdt_driver = { + quicc_driver_name, + quicc_fdt_methods, + sizeof(struct quicc_softc), +}; + +static int +quicc_fdt_probe(device_t dev) +{ + phandle_t par; + pcell_t clock; + + if (!ofw_bus_is_compatible(dev, "fsl,cpm2")) + return (ENXIO); + + par = OF_parent(ofw_bus_get_node(dev)); + if (OF_getprop(par, "bus-frequency", &clock, sizeof(clock)) <= 0) + clock = 0; + + return (quicc_bfe_probe(dev, (uintptr_t)clock)); +} + +DRIVER_MODULE(quicc, simplebus, quicc_fdt_driver, quicc_devclass, 0, 0); Modified: head/sys/dev/sec/sec.c ============================================================================== --- head/sys/dev/sec/sec.c Sun Jul 11 20:55:39 2010 (r209907) +++ head/sys/dev/sec/sec.c Sun Jul 11 21:08:29 2010 (r209908) @@ -45,12 +45,12 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include "cryptodev_if.h" +#include #include static int sec_probe(device_t dev); @@ -153,7 +153,7 @@ static driver_t sec_driver = { }; static devclass_t sec_devclass; -DRIVER_MODULE(sec, ocpbus, sec_driver, sec_devclass, 0, 0); +DRIVER_MODULE(sec, simplebus, sec_driver, sec_devclass, 0, 0); MODULE_DEPEND(sec, crypto, 1, 1, 1); static struct sec_eu_methods sec_eus[] = { @@ -201,24 +201,16 @@ static int sec_probe(device_t dev) { struct sec_softc *sc; - device_t parent; - uintptr_t devtype; uint64_t id; - int error; - parent = device_get_parent(dev); - error = BUS_READ_IVAR(parent, dev, OCPBUS_IVAR_DEVTYPE, &devtype); - if (error) - return (error); - - if (devtype != OCPBUS_DEVTYPE_SEC) + if (!ofw_bus_is_compatible(dev, "fsl,sec2.0")) return (ENXIO); sc = device_get_softc(dev); sc->sc_rrid = 0; - sc->sc_rres = bus_alloc_resource(dev, SYS_RES_MEMORY, &sc->sc_rrid, - 0ul, ~0ul, SEC_IO_SIZE, RF_ACTIVE); + sc->sc_rres = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->sc_rrid, + RF_ACTIVE); if (sc->sc_rres == NULL) return (ENXIO); @@ -276,8 +268,8 @@ sec_attach(device_t dev) /* Allocate I/O memory for SEC registers */ sc->sc_rrid = 0; - sc->sc_rres = bus_alloc_resource(dev, SYS_RES_MEMORY, &sc->sc_rrid, - 0ul, ~0ul, SEC_IO_SIZE, RF_ACTIVE); + sc->sc_rres = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->sc_rrid, + RF_ACTIVE); if (sc->sc_rres == NULL) { device_printf(dev, "could not allocate I/O memory!\n"); @@ -295,12 +287,15 @@ sec_attach(device_t dev) if (error) goto fail2; - sc->sc_sec_irid = 1; - error = sec_setup_intr(sc, &sc->sc_sec_ires, &sc->sc_sec_ihand, - &sc->sc_sec_irid, sec_secondary_intr, "secondary"); - if (error) - goto fail3; + if (sc->sc_version == 3) { + sc->sc_sec_irid = 1; + error = sec_setup_intr(sc, &sc->sc_sec_ires, &sc->sc_sec_ihand, + &sc->sc_sec_irid, sec_secondary_intr, "secondary"); + + if (error) + goto fail3; + } /* Alloc DMA memory for descriptors and link tables */ error = sec_alloc_dma_mem(sc, &(sc->sc_desc_dmem), Modified: head/sys/dev/tsec/if_tsec.c ============================================================================== --- head/sys/dev/tsec/if_tsec.c Sun Jul 11 20:55:39 2010 (r209907) +++ head/sys/dev/tsec/if_tsec.c Sun Jul 11 21:08:29 2010 (r209908) @@ -1,6 +1,6 @@ /*- - * Copyright (C) 2007-2008 Semihalf, Rafal Jaworowski - * Copyright (C) 2006-2007 Semihalf, Piotr Kruszynski + * Copyright (C) 2007-2008 Semihalf, Rafal Jaworowski + * Copyright (C) 2006-2007 Semihalf, Piotr Kruszynski * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -1563,7 +1563,7 @@ tsec_miibus_readreg(device_t dev, int ph sc = device_get_softc(dev); - if (device_get_unit(dev) != phy) + if (sc->phyaddr != phy) return (0); sc = tsec0_sc; @@ -1591,9 +1591,8 @@ tsec_miibus_writereg(device_t dev, int p sc = device_get_softc(dev); - if (device_get_unit(dev) != phy) - device_printf(dev, "Trying to write to an alien PHY(%d)\n", - phy); + if (sc->phyaddr != phy) + return (0); sc = tsec0_sc; Modified: head/sys/dev/tsec/if_tsec.h ============================================================================== --- head/sys/dev/tsec/if_tsec.h Sun Jul 11 20:55:39 2010 (r209907) +++ head/sys/dev/tsec/if_tsec.h Sun Jul 11 21:08:29 2010 (r209908) @@ -1,5 +1,5 @@ /*- - * Copyright (C) 2006-2007 Semihalf, Piotr Kruszynski + * Copyright (C) 2006-2007 Semihalf, Piotr Kruszynski * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -28,6 +28,8 @@ #ifndef _IF_TSEC_H #define _IF_TSEC_H +#include + #define TSEC_RX_NUM_DESC 256 #define TSEC_TX_NUM_DESC 256 @@ -49,6 +51,7 @@ struct tsec_softc { struct mtx transmit_lock; /* transmitter lock */ struct mtx receive_lock; /* receiver lock */ + phandle_t node; device_t dev; device_t tsec_miibus; struct mii_data *tsec_mii; /* MII media control */ @@ -128,6 +131,8 @@ struct tsec_softc { /* currently received frame */ struct mbuf *frame; + + int phyaddr; }; /* interface to get/put generic objects */ Added: head/sys/dev/tsec/if_tsec_fdt.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/tsec/if_tsec_fdt.c Sun Jul 11 21:08:29 2010 (r209908) @@ -0,0 +1,352 @@ +/*- + * Copyright (C) 2007-2008 Semihalf, Rafal Jaworowski + * Copyright (C) 2006-2007 Semihalf, Piotr Kruszynski + * 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 ``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 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. + * + * From: FreeBSD: head/sys/dev/tsec/if_tsec_ocp.c 188712 2009-02-17 14:59:47Z raj + */ + +/* + * FDT 'simple-bus' attachment for Freescale TSEC controller. + */ +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "miibus_if.h" + +#define TSEC_RID_TXIRQ 0 +#define TSEC_RID_RXIRQ 1 +#define TSEC_RID_ERRIRQ 2 + +extern struct tsec_softc *tsec0_sc; + +static int tsec_fdt_probe(device_t dev); +static int tsec_fdt_attach(device_t dev); +static int tsec_fdt_detach(device_t dev); +static int tsec_setup_intr(struct tsec_softc *sc, struct resource **ires, + void **ihand, int *irid, driver_intr_t handler, const char *iname); +static void tsec_release_intr(struct tsec_softc *sc, struct resource *ires, + void *ihand, int irid, const char *iname); + +static device_method_t tsec_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, tsec_fdt_probe), + DEVMETHOD(device_attach, tsec_fdt_attach), + DEVMETHOD(device_detach, tsec_fdt_detach), + + DEVMETHOD(device_shutdown, tsec_shutdown), + DEVMETHOD(device_suspend, tsec_suspend), + DEVMETHOD(device_resume, tsec_resume), + + /* Bus interface */ + DEVMETHOD(bus_print_child, bus_generic_print_child), + DEVMETHOD(bus_driver_added, bus_generic_driver_added), + + /* MII interface */ + DEVMETHOD(miibus_readreg, tsec_miibus_readreg), + DEVMETHOD(miibus_writereg, tsec_miibus_writereg), + DEVMETHOD(miibus_statchg, tsec_miibus_statchg), + { 0, 0 } +}; + +static driver_t tsec_fdt_driver = { + "tsec", + tsec_methods, + sizeof(struct tsec_softc), +}; + +DRIVER_MODULE(tsec, simplebus, tsec_fdt_driver, tsec_devclass, 0, 0); +MODULE_DEPEND(tsec, simplebus, 1, 1, 1); +MODULE_DEPEND(tsec, ether, 1, 1, 1); + +static int +tsec_fdt_probe(device_t dev) +{ + struct tsec_softc *sc; + uint32_t id; + + if (!ofw_bus_is_compatible(dev, "gianfar")) + return (ENXIO); + + sc = device_get_softc(dev); + + sc->sc_rrid = 0; + sc->sc_rres = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->sc_rrid, + RF_ACTIVE); + if (sc->sc_rres == NULL) + return (ENXIO); + + sc->sc_bas.bsh = rman_get_bushandle(sc->sc_rres); + sc->sc_bas.bst = rman_get_bustag(sc->sc_rres); + + /* Check if we are eTSEC (enhanced TSEC) */ + id = TSEC_READ(sc, TSEC_REG_ID); + sc->is_etsec = ((id >> 16) == TSEC_ETSEC_ID) ? 1 : 0; + id |= TSEC_READ(sc, TSEC_REG_ID2); + + bus_release_resource(dev, SYS_RES_MEMORY, sc->sc_rrid, sc->sc_rres); + + if (id == 0) { + device_printf(dev, "could not identify TSEC type\n"); + return (ENXIO); + } + + if (sc->is_etsec) + device_set_desc(dev, "Enhanced Three-Speed Ethernet Controller"); + else + device_set_desc(dev, "Three-Speed Ethernet Controller"); + + return (BUS_PROBE_DEFAULT); +} + +static int +tsec_fdt_attach(device_t dev) +{ + struct tsec_softc *sc; + int error = 0; + + sc = device_get_softc(dev); + sc->dev = dev; + sc->node = ofw_bus_get_node(dev); + + /* XXX add comment on weird FSL's MII registers access design */ + if (device_get_unit(dev) == 0) + tsec0_sc = sc; + + /* Get phy address from fdt */ + if (fdt_get_phyaddr(sc->node, &sc->phyaddr) != 0) + return (ENXIO); + + /* Init timer */ + callout_init(&sc->tsec_callout, 1); + + /* Init locks */ + mtx_init(&sc->transmit_lock, device_get_nameunit(dev), "TSEC TX lock", + MTX_DEF); + mtx_init(&sc->receive_lock, device_get_nameunit(dev), "TSEC RX lock", + MTX_DEF); + mtx_init(&sc->ic_lock, device_get_nameunit(dev), "TSEC IC lock", + MTX_DEF); + + /* Allocate IO memory for TSEC registers */ + sc->sc_rrid = 0; + sc->sc_rres = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->sc_rrid, + RF_ACTIVE); + if (sc->sc_rres == NULL) { + device_printf(dev, "could not allocate IO memory range!\n"); + goto fail1; + } + sc->sc_bas.bsh = rman_get_bushandle(sc->sc_rres); + sc->sc_bas.bst = rman_get_bustag(sc->sc_rres); + + /* TSEC attach */ + if (tsec_attach(sc) != 0) { + device_printf(dev, "could not be configured\n"); + goto fail2; + } + + /* Set up interrupts (TX/RX/ERR) */ + sc->sc_transmit_irid = TSEC_RID_TXIRQ; + error = tsec_setup_intr(sc, &sc->sc_transmit_ires, + &sc->sc_transmit_ihand, &sc->sc_transmit_irid, + tsec_transmit_intr, "TX"); + if (error) + goto fail2; + + sc->sc_receive_irid = TSEC_RID_RXIRQ; + error = tsec_setup_intr(sc, &sc->sc_receive_ires, + &sc->sc_receive_ihand, &sc->sc_receive_irid, + tsec_receive_intr, "RX"); + if (error) + goto fail3; + + sc->sc_error_irid = TSEC_RID_ERRIRQ; + error = tsec_setup_intr(sc, &sc->sc_error_ires, + &sc->sc_error_ihand, &sc->sc_error_irid, + tsec_error_intr, "ERR"); + if (error) + goto fail4; + + return (0); + +fail4: + tsec_release_intr(sc, sc->sc_receive_ires, sc->sc_receive_ihand, + sc->sc_receive_irid, "RX"); +fail3: + tsec_release_intr(sc, sc->sc_transmit_ires, sc->sc_transmit_ihand, + sc->sc_transmit_irid, "TX"); +fail2: + bus_release_resource(dev, SYS_RES_MEMORY, sc->sc_rrid, sc->sc_rres); +fail1: + mtx_destroy(&sc->receive_lock); + mtx_destroy(&sc->transmit_lock); + return (ENXIO); +} + +static int +tsec_setup_intr(struct tsec_softc *sc, struct resource **ires, void **ihand, + int *irid, driver_intr_t handler, const char *iname) +{ + int error; + + *ires = bus_alloc_resource_any(sc->dev, SYS_RES_IRQ, irid, RF_ACTIVE); + if (*ires == NULL) { + device_printf(sc->dev, "could not allocate %s IRQ\n", iname); + return (ENXIO); + } + error = bus_setup_intr(sc->dev, *ires, INTR_TYPE_NET | INTR_MPSAFE, + NULL, handler, sc, ihand); + if (error) { + device_printf(sc->dev, "failed to set up %s IRQ\n", iname); + if (bus_release_resource(sc->dev, SYS_RES_IRQ, *irid, *ires)) + device_printf(sc->dev, "could not release %s IRQ\n", iname); + *ires = NULL; + return (error); + } + return (0); +} + +static void +tsec_release_intr(struct tsec_softc *sc, struct resource *ires, void *ihand, + int irid, const char *iname) +{ + int error; + + if (ires == NULL) + return; + + error = bus_teardown_intr(sc->dev, ires, ihand); + if (error) + device_printf(sc->dev, "bus_teardown_intr() failed for %s intr" + ", error %d\n", iname, error); + + error = bus_release_resource(sc->dev, SYS_RES_IRQ, irid, ires); + if (error) + device_printf(sc->dev, "bus_release_resource() failed for %s " + "intr, error %d\n", iname, error); +} + +static int +tsec_fdt_detach(device_t dev) +{ + struct tsec_softc *sc; + int error; + + sc = device_get_softc(dev); + + /* Wait for stopping watchdog */ + callout_drain(&sc->tsec_callout); + + /* Stop and release all interrupts */ + tsec_release_intr(sc, sc->sc_transmit_ires, sc->sc_transmit_ihand, + sc->sc_transmit_irid, "TX"); + tsec_release_intr(sc, sc->sc_receive_ires, sc->sc_receive_ihand, + sc->sc_receive_irid, "RX"); + tsec_release_intr(sc, sc->sc_error_ires, sc->sc_error_ihand, + sc->sc_error_irid, "ERR"); + + /* TSEC detach */ + tsec_detach(sc); + + /* Free IO memory handler */ + if (sc->sc_rres) { + error = bus_release_resource(dev, SYS_RES_MEMORY, sc->sc_rrid, + sc->sc_rres); + if (error) + device_printf(dev, "bus_release_resource() failed for" + " IO memory, error %d\n", error); + } + + /* Destroy locks */ + mtx_destroy(&sc->receive_lock); + mtx_destroy(&sc->transmit_lock); + mtx_destroy(&sc->ic_lock); + return (0); +} + +void +tsec_get_hwaddr(struct tsec_softc *sc, uint8_t *addr) +{ + union { + uint32_t reg[2]; + uint8_t addr[6]; + } curmac; + uint32_t a[6]; + uint8_t lma[6]; + int i; + + /* + * Retrieve hw address from the device tree. + */ + i = OF_getprop(sc->node, "local-mac-address", (void *)lma, 6); + if (i == 6) { + bcopy(lma, addr, 6); + return; + } + + /* + * Fall back -- use the currently programmed address in the hope that + * it was set be firmware... + */ + curmac.reg[0] = TSEC_READ(sc, TSEC_REG_MACSTNADDR1); + curmac.reg[1] = TSEC_READ(sc, TSEC_REG_MACSTNADDR2); + for (i = 0; i < 6; i++) + a[5-i] = curmac.addr[i]; + + addr[0] = a[0]; + addr[1] = a[1]; + addr[2] = a[2]; + addr[3] = a[3]; + addr[4] = a[4]; + addr[5] = a[5]; +} Modified: head/sys/dev/uart/uart_cpu_powerpc.c ============================================================================== --- head/sys/dev/uart/uart_cpu_powerpc.c Sun Jul 11 20:55:39 2010 (r209907) +++ head/sys/dev/uart/uart_cpu_powerpc.c Sun Jul 11 21:08:29 2010 (r209908) @@ -27,57 +27,28 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_platform.h" - #include #include #include #include #include - -#ifndef MPC85XX -#include #include -#endif +#include #include #include -#ifdef MPC85XX -bus_space_tag_t uart_bus_space_io = &bs_be_tag; -bus_space_tag_t uart_bus_space_mem = &bs_be_tag; -#else bus_space_tag_t uart_bus_space_io = &bs_le_tag; bus_space_tag_t uart_bus_space_mem = &bs_le_tag; -#endif int uart_cpu_eqres(struct uart_bas *b1, struct uart_bas *b2) { -#ifdef MPC85XX - return ((b1->bsh == b2->bsh) ? 1 : 0); -#else + return ((pmap_kextract(b1->bsh) == pmap_kextract(b2->bsh)) ? 1 : 0); -#endif } -#ifdef MPC85XX -int -uart_cpu_getdev(int devtype, struct uart_devinfo *di) -{ - struct uart_class *class; - - class = &uart_ns8250_class; - if (class == NULL) - class = &uart_quicc_class; - if (class == NULL) - return (ENXIO); - - /* Check the environment. */ - return (uart_getenv(devtype, di, class)); -} -#else static int ofw_get_uart_console(phandle_t opts, phandle_t *result, const char *inputdev, const char *outputdev) @@ -174,4 +145,3 @@ uart_cpu_getdev(int devtype, struct uart di->parity = UART_PARITY_NONE; return (0); } -#endif Modified: head/sys/powerpc/booke/locore.S ============================================================================== --- head/sys/powerpc/booke/locore.S Sun Jul 11 20:55:39 2010 (r209907) +++ head/sys/powerpc/booke/locore.S Sun Jul 11 21:08:29 2010 (r209908) @@ -39,7 +39,6 @@ #include #include #include -#include #define TMPSTACKSZ 16384 Modified: head/sys/powerpc/booke/machdep.c ============================================================================== --- head/sys/powerpc/booke/machdep.c Sun Jul 11 20:55:39 2010 (r209907) +++ head/sys/powerpc/booke/machdep.c Sun Jul 11 21:08:29 2010 (r209908) @@ -130,13 +130,14 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include -#include +#include +#include + #include #ifdef DDB @@ -169,8 +170,6 @@ int cold = 1; long realmem = 0; long Maxmem = 0; -struct bootinfo *bootinfo; - char machine[] = "powerpc"; SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD, machine, 0, ""); @@ -185,7 +184,6 @@ static void cpu_e500_startup(void *); SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, cpu_e500_startup, NULL); void print_kernel_section_addr(void); -void print_bootinfo(void); void print_kenv(void); u_int e500_init(u_int32_t, u_int32_t, void *); @@ -259,40 +257,6 @@ print_kenv(void) } void -print_bootinfo(void) -{ - struct bi_mem_region *mr; - struct bi_eth_addr *eth; - int i, j; - - debugf("bootinfo:\n"); - if (bootinfo == NULL) { - debugf(" no bootinfo, null ptr\n"); - return; - } - - debugf(" version = 0x%08x\n", bootinfo->bi_version); - debugf(" ccsrbar = 0x%08x\n", bootinfo->bi_bar_base); - debugf(" cpu_clk = 0x%08x\n", bootinfo->bi_cpu_clk); - debugf(" bus_clk = 0x%08x\n", bootinfo->bi_bus_clk); - - debugf(" mem regions:\n"); - mr = (struct bi_mem_region *)bootinfo->bi_data; - for (i = 0; i < bootinfo->bi_mem_reg_no; i++, mr++) - debugf(" #%d, base = 0x%08x, size = 0x%08x\n", i, - mr->mem_base, mr->mem_size); - - debugf(" eth addresses:\n"); - eth = (struct bi_eth_addr *)mr; - for (i = 0; i < bootinfo->bi_eth_addr_no; i++, eth++) { - debugf(" #%d, addr = ", i); - for (j = 0; j < 6; j++) - debugf("%02x ", eth->mac_addr[j]); - debugf("\n"); - } -} - -void print_kernel_section_addr(void) { @@ -306,54 +270,29 @@ print_kernel_section_addr(void) debugf(" _end = 0x%08x\n", (uint32_t)_end); } -struct bi_mem_region * -bootinfo_mr(void) -{ - - return ((struct bi_mem_region *)bootinfo->bi_data); -} - -struct bi_eth_addr * -bootinfo_eth(void) -{ - struct bi_mem_region *mr; - struct bi_eth_addr *eth; - int i; - - /* Advance to the eth section */ - mr = bootinfo_mr(); - for (i = 0; i < bootinfo->bi_mem_reg_no; i++, mr++) - ; - - eth = (struct bi_eth_addr *)mr; - return (eth); -} - u_int e500_init(u_int32_t startkernel, u_int32_t endkernel, void *mdp) { struct pcpu *pc; void *kmdp; - vm_offset_t end; + vm_offset_t dtbp, end; uint32_t csr; kmdp = NULL; end = endkernel; + dtbp = (vm_offset_t)NULL; /* - * Parse metadata and fetch parameters. This must be done as the first - * step as we need bootinfo data to at least init the console + * Parse metadata and fetch parameters. */ if (mdp != NULL) { preload_metadata = mdp; kmdp = preload_search_by_type("elf kernel"); if (kmdp != NULL) { - bootinfo = (struct bootinfo *)preload_search_info(kmdp, - MODINFO_METADATA | MODINFOMD_BOOTINFO); - boothowto = MD_FETCH(kmdp, MODINFOMD_HOWTO, int); kern_envp = MD_FETCH(kmdp, MODINFOMD_ENVP, char *); + dtbp = MD_FETCH(kmdp, MODINFOMD_DTBP, vm_offset_t); end = MD_FETCH(kmdp, MODINFOMD_KERNEND, vm_offset_t); #ifdef DDB ksym_start = MD_FETCH(kmdp, MODINFOMD_SSYM, uintptr_t); @@ -362,8 +301,7 @@ e500_init(u_int32_t startkernel, u_int32 } } else { /* *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Jul 11 21:11:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E8F191065689; Sun, 11 Jul 2010 21:11:23 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D88488FC22; Sun, 11 Jul 2010 21:11: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 o6BLBN2j091699; Sun, 11 Jul 2010 21:11:23 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6BLBNYe091696; Sun, 11 Jul 2010 21:11:23 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <201007112111.o6BLBNYe091696@svn.freebsd.org> From: Rafal Jaworowski Date: Sun, 11 Jul 2010 21:11:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209909 - in head/sys: arm/include boot/uboot/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 21:11:24 -0000 Author: raj Date: Sun Jul 11 21:11:23 2010 New Revision: 209909 URL: http://svn.freebsd.org/changeset/base/209909 Log: Get rid of bootinfo for good in loader (U-Boot-based) and ARM. For FDT-enabled platforms the device tree is a modern replacement for bootinfo config data. Deleted: head/sys/arm/include/bootinfo.h Modified: head/sys/arm/include/metadata.h head/sys/boot/uboot/common/metadata.c Modified: head/sys/arm/include/metadata.h ============================================================================== --- head/sys/arm/include/metadata.h Sun Jul 11 21:08:29 2010 (r209908) +++ head/sys/arm/include/metadata.h Sun Jul 11 21:11:23 2010 (r209909) @@ -31,10 +31,4 @@ #define MODINFOMD_DTBP 0x1001 -/* - * XXX this is for tinderbox compilation sake only and will go away once the - * FDT transition is complete. - */ -#define MODINFOMD_BOOTINFO 0x2000 - #endif /* !_MACHINE_METADATA_H_ */ Modified: head/sys/boot/uboot/common/metadata.c ============================================================================== --- head/sys/boot/uboot/common/metadata.c Sun Jul 11 21:08:29 2010 (r209908) +++ head/sys/boot/uboot/common/metadata.c Sun Jul 11 21:11:23 2010 (r209909) @@ -36,9 +36,6 @@ __FBSDID("$FreeBSD$"); #include #include -#if !defined(LOADER_FDT_SUPPORT) -#include -#endif #include "api_public.h" #include "bootstrap.h" @@ -259,114 +256,6 @@ md_copymodules(vm_offset_t addr) return(addr); } -#if !defined(LOADER_FDT_SUPPORT) -/* - * Prepare the bootinfo structure. Put a ptr to the allocated struct in addr, - * return size. - */ -static int -md_bootinfo(struct bootinfo **addr) -{ -#define TMP_MAX_ETH 8 -#define TMP_MAX_MR 8 - struct bootinfo *bi; - struct bi_mem_region tmp_mr[TMP_MAX_MR]; - struct bi_eth_addr tmp_eth[TMP_MAX_ETH]; - struct sys_info *si; - char *str, *end; - const char *env; - void *ptr; - u_int8_t tmp_addr[6]; - int i, n, mr_no, eth_no, size; - - if ((si = ub_get_sys_info()) == NULL) - panic("can't retrieve U-Boot sysinfo"); - - /* - * Handle mem regions (we only care about DRAM) - */ - for (i = 0, mr_no = 0; i < si->mr_no; i++) { - if (si->mr[i].flags == MR_ATTR_DRAM) { - if (mr_no >= TMP_MAX_MR) { - printf("too many memory regions: %d\n", mr_no); - break; - } - tmp_mr[mr_no].mem_base = si->mr[i].start; - tmp_mr[mr_no].mem_size = si->mr[i].size; - mr_no++; - continue; - } - } - if (mr_no == 0) - panic("can't retrieve RAM info"); - - size = (mr_no * sizeof(struct bi_mem_region) - sizeof(bi->bi_data)); - - /* - * Handle Ethernet addresses: parse u-boot env for eth%daddr - */ - env = NULL; - eth_no = 0; - while ((env = ub_env_enum(env)) != NULL) { - if (strncmp(env, "eth", 3) == 0 && - strncmp(env + (strlen(env) - 4), "addr", 4) == 0) { - - /* Extract interface number */ - i = strtol(env + 3, &end, 10); - if (end == (env + 3)) - /* 'ethaddr' means interface 0 address */ - n = 0; - else - n = i; - - if (n >= TMP_MAX_MR) { - printf("Ethernet interface number too high: %d. " - "Skipping...\n"); - continue; - } - - str = ub_env_get(env); - for (i = 0; i < 6; i++) { - tmp_addr[i] = str ? strtol(str, &end, 16) : 0; - if (str) - str = (*end) ? end + 1 : end; - - tmp_eth[n].mac_addr[i] = tmp_addr[i]; - } - - /* eth_no is 1-based number of all interfaces defined */ - if (n + 1 > eth_no) - eth_no = n + 1; - } - } - - size += (eth_no * sizeof(struct bi_eth_addr)) + sizeof(struct bootinfo); - - /* - * Once its whole size is calculated, allocate space for the bootinfo - * and copy over the contents from temp containers. - */ - if ((bi = malloc(size)) == NULL) - panic("can't allocate mem for bootinfo"); - - ptr = (struct bi_mem_region *)bi->bi_data; - bcopy(tmp_mr, ptr, mr_no * sizeof(struct bi_mem_region)); - ptr += mr_no * sizeof(struct bi_mem_region); - bcopy(tmp_eth, ptr, eth_no * sizeof(struct bi_eth_addr)); - - bi->bi_mem_reg_no = mr_no; - bi->bi_eth_addr_no = eth_no; - bi->bi_version = BI_VERSION; - bi->bi_bar_base = si->bar; - bi->bi_cpu_clk = si->clk_cpu; - bi->bi_bus_clk = si->clk_bus; - - *addr = bi; - - return (size); -} -#endif - /* * Load the information expected by a kernel. * @@ -390,7 +279,6 @@ md_load(char *args, vm_offset_t *modulep vm_offset_t dtbp; char *rootdevname; int howto; - int bisize; int i; /* @@ -434,11 +322,6 @@ md_load(char *args, vm_offset_t *modulep /* Pad to a page boundary */ addr = roundup(addr, PAGE_SIZE); -#if !defined(LOADER_FDT_SUPPORT) - /* prepare bootinfo */ - bisize = md_bootinfo(&bip); -#endif - kernend = 0; kfp = file_findfile(NULL, "elf32 kernel"); if (kfp == NULL) @@ -457,8 +340,6 @@ md_load(char *args, vm_offset_t *modulep dtbp = bfp == NULL ? 0 : bfp->f_addr; file_addmetadata(kfp, MODINFOMD_DTBP, sizeof dtbp, &dtbp); -#else - file_addmetadata(kfp, MODINFOMD_BOOTINFO, bisize, bip); #endif file_addmetadata(kfp, MODINFOMD_KERNEND, sizeof kernend, &kernend); From owner-svn-src-all@FreeBSD.ORG Sun Jul 11 21:12:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 419481065678; Sun, 11 Jul 2010 21:12:43 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 31F068FC27; Sun, 11 Jul 2010 21:12:43 +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 o6BLChPE092028; Sun, 11 Jul 2010 21:12:43 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6BLCh4m092026; Sun, 11 Jul 2010 21:12:43 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <201007112112.o6BLCh4m092026@svn.freebsd.org> From: Rafal Jaworowski Date: Sun, 11 Jul 2010 21:12:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209910 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 21:12:43 -0000 Author: raj Date: Sun Jul 11 21:12:42 2010 New Revision: 209910 URL: http://svn.freebsd.org/changeset/base/209910 Log: Sort platform options. Modified: head/sys/conf/options.powerpc Modified: head/sys/conf/options.powerpc ============================================================================== --- head/sys/conf/options.powerpc Sun Jul 11 21:11:23 2010 (r209909) +++ head/sys/conf/options.powerpc Sun Jul 11 21:12:42 2010 (r209910) @@ -10,8 +10,8 @@ GFB_DEBUG opt_gfb.h GFB_NO_FONT_LOADING opt_gfb.h GFB_NO_MODE_CHANGE opt_gfb.h -POWERMAC opt_platform.h MPC85XX opt_platform.h +POWERMAC opt_platform.h PSIM SC_OFWFB opt_ofwfb.h From owner-svn-src-all@FreeBSD.ORG Sun Jul 11 21:47:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3CFDD1065672; Sun, 11 Jul 2010 21:47:39 +0000 (UTC) (envelope-from brian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 22C2F8FC1A; Sun, 11 Jul 2010 21:47:39 +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 o6BLlcio099695; Sun, 11 Jul 2010 21:47:38 GMT (envelope-from brian@svn.freebsd.org) Received: (from brian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6BLlcPS099692; Sun, 11 Jul 2010 21:47:38 GMT (envelope-from brian@svn.freebsd.org) Message-Id: <201007112147.o6BLlcPS099692@svn.freebsd.org> From: Brian Somers Date: Sun, 11 Jul 2010 21:47:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209911 - stable/8/usr.bin/du X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 21:47:39 -0000 Author: brian Date: Sun Jul 11 21:47:38 2010 New Revision: 209911 URL: http://svn.freebsd.org/changeset/base/209911 Log: MFC r209362: Add a -t switch for masking output based on size. PR: 144192 Submitted by: gk Modified: stable/8/usr.bin/du/du.1 stable/8/usr.bin/du/du.c Directory Properties: stable/8/usr.bin/du/ (props changed) Modified: stable/8/usr.bin/du/du.1 ============================================================================== --- stable/8/usr.bin/du/du.1 Sun Jul 11 21:12:42 2010 (r209910) +++ stable/8/usr.bin/du/du.1 Sun Jul 11 21:47:38 2010 (r209911) @@ -42,7 +42,7 @@ .Nm .Op Fl A .Op Fl H | L | P -.Op Fl a | s | d Ar depth +.Op Fl a | s | d Ar depth | Fl t Ar threshold .Op Fl c .Op Fl l .Op Fl h | k | m | B Ar blocksize @@ -107,6 +107,14 @@ This option exists solely for conformanc Display an entry for each specified file. (Equivalent to .Fl d Li 0 ) +.It Fl t Ar threshold +Display only entries for which size exceeds +.Ar threshold . +If +.Ar threshold +is negative, display only entries for which size is less than the absolute +value of +.Ar threshold . .It Fl d Ar depth Display an entry for all files and directories .Ar depth Modified: stable/8/usr.bin/du/du.c ============================================================================== --- stable/8/usr.bin/du/du.c Sun Jul 11 21:12:42 2010 (r209910) +++ stable/8/usr.bin/du/du.c Sun Jul 11 21:47:38 2010 (r209911) @@ -90,6 +90,7 @@ main(int argc, char *argv[]) FTS *fts; FTSENT *p; off_t savednumber, curblocks; + off_t threshold, threshold_sign; int ftsoptions; int listall; int depth; @@ -106,12 +107,14 @@ main(int argc, char *argv[]) save = argv; ftsoptions = 0; savednumber = 0; + threshold = 0; + threshold_sign = 1; cblocksize = DEV_BSIZE; blocksize = 0; depth = INT_MAX; SLIST_INIT(&ignores); - while ((ch = getopt(argc, argv, "AB:HI:LPasd:chklmnrx")) != -1) + while ((ch = getopt(argc, argv, "AB:HI:LPasd:chklmnrt:x")) != -1) switch (ch) { case 'A': Aflag = 1; @@ -179,6 +182,14 @@ main(int argc, char *argv[]) break; case 'r': /* Compatibility. */ break; + case 't' : + if (expand_number(optarg, &threshold) != 0 || + threshold == 0) { + warnx("invalid threshold: %s", optarg); + usage(); + } else if (threshold < 0) + threshold_sign = -1; + break; case 'x': ftsoptions |= FTS_XDEV; break; @@ -248,6 +259,10 @@ main(int argc, char *argv[]) blocksize /= DEV_BSIZE; } + if (threshold != 0) + threshold = howmany(threshold / DEV_BSIZE * cblocksize, + blocksize); + rval = 0; (void)signal(SIGINFO, siginfo); @@ -271,7 +286,9 @@ main(int argc, char *argv[]) p->fts_parent->fts_bignum += p->fts_bignum += curblocks; - if (p->fts_level <= depth) { + if (p->fts_level <= depth && threshold <= + threshold_sign * howmany(p->fts_bignum * + cblocksize, blocksize)) { if (hflag) { prthumanval(p->fts_bignum); (void)printf("\t%s\n", p->fts_path); From owner-svn-src-all@FreeBSD.ORG Sun Jul 11 21:50:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E1EC1065673; Sun, 11 Jul 2010 21:50:06 +0000 (UTC) (envelope-from brian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2EC8A8FC13; Sun, 11 Jul 2010 21:50: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 o6BLo679000378; Sun, 11 Jul 2010 21:50:06 GMT (envelope-from brian@svn.freebsd.org) Received: (from brian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6BLo6sG000375; Sun, 11 Jul 2010 21:50:06 GMT (envelope-from brian@svn.freebsd.org) Message-Id: <201007112150.o6BLo6sG000375@svn.freebsd.org> From: Brian Somers Date: Sun, 11 Jul 2010 21:50:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209912 - stable/8/bin/pkill X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 21:50:06 -0000 Author: brian Date: Sun Jul 11 21:50:05 2010 New Revision: 209912 URL: http://svn.freebsd.org/changeset/base/209912 Log: MFC r209363: Recognise the -l switch in pkill. PR: 143558 Submitted by: eitanadlerlist at gmail dot com Modified: stable/8/bin/pkill/pkill.1 stable/8/bin/pkill/pkill.c Directory Properties: stable/8/bin/pkill/ (props changed) Modified: stable/8/bin/pkill/pkill.1 ============================================================================== --- stable/8/bin/pkill/pkill.1 Sun Jul 11 21:47:38 2010 (r209911) +++ stable/8/bin/pkill/pkill.1 Sun Jul 11 21:50:05 2010 (r209912) @@ -163,14 +163,16 @@ The value matches processes not in jail. .It Fl l Long output. -Print the process name in addition to the process ID for each matching +For +.Nm pgrep , +print the process name in addition to the process ID for each matching process. If used in conjunction with .Fl f , print the process ID and the full argument list for each matching process. -This option can only be used with the -.Nm pgrep -command. +For +.Nm pkill , +display the kill command used for each process killed. .It Fl n Select only the newest (most recently started) of the matching processes. .It Fl o Modified: stable/8/bin/pkill/pkill.c ============================================================================== --- stable/8/bin/pkill/pkill.c Sun Jul 11 21:47:38 2010 (r209911) +++ stable/8/bin/pkill/pkill.c Sun Jul 11 21:50:05 2010 (r209912) @@ -133,7 +133,7 @@ main(int argc, char **argv) { char buf[_POSIX2_LINE_MAX], *mstr, **pargv, *p, *q, *pidfile; const char *execf, *coref; - int ancestors, debug_opt; + int ancestors, debug_opt, did_action; int i, ch, bestidx, rv, criteria, pidfromfile, pidfilelock; size_t jsz; int (*action)(const struct kinfo_proc *); @@ -246,8 +246,6 @@ main(int argc, char **argv) criteria = 1; break; case 'l': - if (!pgrep) - usage(); longfmt = 1; break; case 'n': @@ -529,16 +527,24 @@ main(int argc, char **argv) /* * Take the appropriate action for each matched process, if any. */ + did_action = 0; for (i = 0, rv = 0, kp = plist; i < nproc; i++, kp++) { if (PSKIP(kp)) continue; if (selected[i]) { + if (longfmt && !pgrep) { + did_action = 1; + printf("kill -%d %d\n", signum, kp->ki_pid); + } if (inverse) continue; } else if (!inverse) continue; rv |= (*action)(kp); } + if (!did_action && !pgrep && longfmt) + fprintf(stderr, + "No matching processes belonging to you were found\n"); exit(rv ? STATUS_MATCH : STATUS_NOMATCH); } @@ -551,7 +557,7 @@ usage(void) if (pgrep) ustr = "[-LSfilnovx] [-d delim]"; else - ustr = "[-signal] [-ILfinovx]"; + ustr = "[-signal] [-ILfilnovx]"; fprintf(stderr, "usage: %s %s [-F pidfile] [-G gid] [-M core] [-N system]\n" From owner-svn-src-all@FreeBSD.ORG Sun Jul 11 22:00:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9DDC5106567B; Sun, 11 Jul 2010 22:00:40 +0000 (UTC) (envelope-from brian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8BDBF8FC08; Sun, 11 Jul 2010 22:00:40 +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 o6BM0evY002860; Sun, 11 Jul 2010 22:00:40 GMT (envelope-from brian@svn.freebsd.org) Received: (from brian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6BM0eOr002854; Sun, 11 Jul 2010 22:00:40 GMT (envelope-from brian@svn.freebsd.org) Message-Id: <201007112200.o6BM0eOr002854@svn.freebsd.org> From: Brian Somers Date: Sun, 11 Jul 2010 22:00:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209914 - stable/8/sbin/fsck_msdosfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 22:00:40 -0000 Author: brian Date: Sun Jul 11 22:00:40 2010 New Revision: 209914 URL: http://svn.freebsd.org/changeset/base/209914 Log: MFC r209364: Fix some (not all) style(9) and casting errors. PR: 209364 Submitted by: giffunip at tutopia dot com Obtained from: NetBSD Modified: stable/8/sbin/fsck_msdosfs/Makefile stable/8/sbin/fsck_msdosfs/boot.c stable/8/sbin/fsck_msdosfs/check.c stable/8/sbin/fsck_msdosfs/dir.c stable/8/sbin/fsck_msdosfs/fat.c Directory Properties: stable/8/sbin/fsck_msdosfs/ (props changed) Modified: stable/8/sbin/fsck_msdosfs/Makefile ============================================================================== --- stable/8/sbin/fsck_msdosfs/Makefile Sun Jul 11 21:57:18 2010 (r209913) +++ stable/8/sbin/fsck_msdosfs/Makefile Sun Jul 11 22:00:40 2010 (r209914) @@ -9,6 +9,6 @@ MAN= fsck_msdosfs.8 SRCS= main.c check.c boot.c fat.c dir.c fsutil.c CFLAGS+= -I${FSCK} -WARNS?= 0 +WARNS?= 2 .include Modified: stable/8/sbin/fsck_msdosfs/boot.c ============================================================================== --- stable/8/sbin/fsck_msdosfs/boot.c Sun Jul 11 21:57:18 2010 (r209913) +++ stable/8/sbin/fsck_msdosfs/boot.c Sun Jul 11 22:00:40 2010 (r209914) @@ -48,13 +48,14 @@ readboot(int dosfs, struct bootblock *bo int ret = FSOK; int i; - if ((size_t)read(dosfs, block, sizeof block) != sizeof block) { + if (read(dosfs, block, sizeof block) != sizeof block) { perror("could not read boot block"); return FSFATAL; } if (block[510] != 0x55 || block[511] != 0xaa) { - pfatal("Invalid signature in boot block: %02x%02x", block[511], block[510]); + pfatal("Invalid signature in boot block: %02x%02x", + block[511], block[510]); return FSFATAL; } @@ -72,8 +73,10 @@ readboot(int dosfs, struct bootblock *bo boot->bpbFATsmall = block[22] + (block[23] << 8); boot->SecPerTrack = block[24] + (block[25] << 8); boot->bpbHeads = block[26] + (block[27] << 8); - boot->bpbHiddenSecs = block[28] + (block[29] << 8) + (block[30] << 16) + (block[31] << 24); - boot->bpbHugeSectors = block[32] + (block[33] << 8) + (block[34] << 16) + (block[35] << 24); + boot->bpbHiddenSecs = block[28] + (block[29] << 8) + + (block[30] << 16) + (block[31] << 24); + boot->bpbHugeSectors = block[32] + (block[33] << 8) + + (block[34] << 16) + (block[35] << 24); boot->FATsecs = boot->bpbFATsmall; @@ -97,10 +100,9 @@ readboot(int dosfs, struct bootblock *bo boot->bpbFSInfo = block[48] + (block[49] << 8); boot->bpbBackup = block[50] + (block[51] << 8); - if (lseek(dosfs, boot->bpbFSInfo * boot->bpbBytesPerSec, SEEK_SET) - != boot->bpbFSInfo * boot->bpbBytesPerSec - || read(dosfs, fsinfo, sizeof fsinfo) - != sizeof fsinfo) { + if (lseek(dosfs, boot->bpbFSInfo * boot->bpbBytesPerSec, + SEEK_SET) != boot->bpbFSInfo * boot->bpbBytesPerSec + || read(dosfs, fsinfo, sizeof fsinfo) != sizeof fsinfo) { perror("could not read fsinfo block"); return FSFATAL; } @@ -124,7 +126,8 @@ readboot(int dosfs, struct bootblock *bo fsinfo[0x3fc] = fsinfo[0x3fd] = 0; fsinfo[0x3fe] = 0x55; fsinfo[0x3ff] = 0xaa; - if (lseek(dosfs, boot->bpbFSInfo * boot->bpbBytesPerSec, SEEK_SET) + if (lseek(dosfs, boot->bpbFSInfo * + boot->bpbBytesPerSec, SEEK_SET) != boot->bpbFSInfo * boot->bpbBytesPerSec || write(dosfs, fsinfo, sizeof fsinfo) != sizeof fsinfo) { @@ -144,7 +147,8 @@ readboot(int dosfs, struct bootblock *bo + (fsinfo[0x1ef] << 24); } - if (lseek(dosfs, boot->bpbBackup * boot->bpbBytesPerSec, SEEK_SET) + if (lseek(dosfs, boot->bpbBackup * boot->bpbBytesPerSec, + SEEK_SET) != boot->bpbBackup * boot->bpbBytesPerSec || read(dosfs, backup, sizeof backup) != sizeof backup) { perror("could not read backup bootblock"); @@ -172,11 +176,10 @@ readboot(int dosfs, struct bootblock *bo /* Check backup bpbFSInfo? XXX */ } - boot->ClusterOffset = (boot->bpbRootDirEnts * 32 + boot->bpbBytesPerSec - 1) - / boot->bpbBytesPerSec - + boot->bpbResSectors - + boot->bpbFATs * boot->FATsecs - - CLUST_FIRST * boot->bpbSecPerClust; + boot->ClusterOffset = (boot->bpbRootDirEnts * 32 + + boot->bpbBytesPerSec - 1) / boot->bpbBytesPerSec + + boot->bpbResSectors + boot->bpbFATs * boot->FATsecs - + CLUST_FIRST * boot->bpbSecPerClust; if (boot->bpbBytesPerSec % DOSBOOTBLOCKSIZE != 0) { pfatal("Invalid sector size: %u", boot->bpbBytesPerSec); @@ -191,7 +194,8 @@ readboot(int dosfs, struct bootblock *bo boot->NumSectors = boot->bpbSectors; } else boot->NumSectors = boot->bpbHugeSectors; - boot->NumClusters = (boot->NumSectors - boot->ClusterOffset) / boot->bpbSecPerClust; + boot->NumClusters = (boot->NumSectors - boot->ClusterOffset) / + boot->bpbSecPerClust; if (boot->flags&FAT32) boot->ClustMask = CLUST32_MASK; Modified: stable/8/sbin/fsck_msdosfs/check.c ============================================================================== --- stable/8/sbin/fsck_msdosfs/check.c Sun Jul 11 21:57:18 2010 (r209913) +++ stable/8/sbin/fsck_msdosfs/check.c Sun Jul 11 22:00:40 2010 (r209914) @@ -98,7 +98,7 @@ checkfilesys(const char *fname) } if (boot.ValidFat < 0) - for (i = 1; i < (int)boot.bpbFATs; i++) { + for (i = 1; i < boot.bpbFATs; i++) { struct fatEntry *currentFat; mod |= readfat(dosfs, &boot, i, ¤tFat); Modified: stable/8/sbin/fsck_msdosfs/dir.c ============================================================================== --- stable/8/sbin/fsck_msdosfs/dir.c Sun Jul 11 21:57:18 2010 (r209913) +++ stable/8/sbin/fsck_msdosfs/dir.c Sun Jul 11 22:00:40 2010 (r209914) @@ -242,7 +242,8 @@ resetDosDirSection(struct bootblock *boo memset(rootDir, 0, sizeof *rootDir); if (boot->flags & FAT32) { - if (boot->bpbRootClust < CLUST_FIRST || boot->bpbRootClust >= boot->NumClusters) { + if (boot->bpbRootClust < CLUST_FIRST || + boot->bpbRootClust >= boot->NumClusters) { pfatal("Root directory starts with cluster out of range(%u)", boot->bpbRootClust); return FSFATAL; @@ -356,7 +357,8 @@ removede(int f, struct bootblock *boot, pwarn("Invalid long filename entry for %s\n", path); break; case 1: - pwarn("Invalid long filename entry at end of directory %s\n", path); + pwarn("Invalid long filename entry at end of directory %s\n", + path); break; case 2: pwarn("Invalid long filename entry for volume label\n"); @@ -418,7 +420,8 @@ checksize(struct bootblock *boot, struct cl_t cl; u_int32_t sz = 0; - for (cl = dir->head; (sz += boot->ClusterSize) < dir->size;) + for (cl = dir->head; (sz += boot->ClusterSize) < + dir->size;) cl = fat[cl].next; clearchain(boot, fat, fat[cl].next); fat[cl].next = CLUST_EOF; @@ -462,7 +465,8 @@ readDosDirSection(int f, struct bootbloc do { if (!(boot->flags & FAT32) && !dir->parent) { last = boot->bpbRootDirEnts * 32; - off = boot->bpbResSectors + boot->bpbFATs * boot->FATsecs; + off = boot->bpbResSectors + boot->bpbFATs * + boot->FATsecs; } else { last = boot->bpbSecPerClust * boot->bpbBytesPerSec; off = cl * boot->bpbSecPerClust + boot->ClusterOffset; @@ -547,7 +551,8 @@ readDosDirSection(int f, struct bootbloc } lidx = *p & LRNOMASK; t = longName + --lidx * 13; - for (k = 1; k < 11 && t < longName + sizeof(longName); k += 2) { + for (k = 1; k < 11 && t < longName + + sizeof(longName); k += 2) { if (!p[k] && !p[k + 1]) break; *t++ = p[k]; Modified: stable/8/sbin/fsck_msdosfs/fat.c ============================================================================== --- stable/8/sbin/fsck_msdosfs/fat.c Sun Jul 11 21:57:18 2010 (r209913) +++ stable/8/sbin/fsck_msdosfs/fat.c Sun Jul 11 22:00:40 2010 (r209914) @@ -87,7 +87,8 @@ checkdirty(int fs, struct bootblock *boo goto err; } - if (read(fs, buffer, boot->bpbBytesPerSec) != boot->bpbBytesPerSec) { + if ((size_t)read(fs, buffer, boot->bpbBytesPerSec) != + boot->bpbBytesPerSec) { perror("Unable to read FAT"); goto err; } From owner-svn-src-all@FreeBSD.ORG Sun Jul 11 22:21:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC6ED1065673; Sun, 11 Jul 2010 22:21:57 +0000 (UTC) (envelope-from prvs=1801176ddd=brian@FreeBSD.org) Received: from idcmail-mo1so.shaw.ca (idcmail-mo1so.shaw.ca [24.71.223.10]) by mx1.freebsd.org (Postfix) with ESMTP id 5D4F58FC1D; Sun, 11 Jul 2010 22:21:57 +0000 (UTC) Received: from pd2ml2so-ssvc.prod.shaw.ca ([10.0.141.134]) by pd4mo1so-svcs.prod.shaw.ca with ESMTP; 11 Jul 2010 16:06:55 -0600 X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.0 c=1 a=mCksn8_hFU4A:10 a=GQCbJdZ--msA:10 a=VphdPIyG4kEA:10 a=MJPcHhXccCG8eBs0us8XwA==:17 a=6I5d2MoRAAAA:8 a=MMwg4So0AAAA:8 a=bd7IDAi0-ZDYeuW7M-UA:9 a=F9igkWxnUqcy4EHKhtmOcIYkDzcA:4 a=CjuIK1q_8ugA:10 a=SV7veod9ZcQA:10 a=WJ3hkfHDukgA:10 a=G6Xa6MHMmJWYdZj8RcwA:9 a=zpWoPG6VeUw2chfNiS9WS18IvPoA:4 Received: from unknown (HELO store.lan.Awfulhak.org) ([70.79.162.198]) by pd2ml2so-dmz.prod.shaw.ca with ESMTP; 11 Jul 2010 16:06:55 -0600 Received: from store.lan.Awfulhak.org (localhost.localdomain [127.0.0.1]) by localhost (Email Security Appliance) with SMTP id 199C7C433AB_C3A407FB; Sun, 11 Jul 2010 22:06:55 +0000 (GMT) Received: from gw.Awfulhak.org (gw.lan.Awfulhak.org [172.16.0.1]) by store.lan.Awfulhak.org (Sophos Email Appliance) with ESMTP id BCB6CC460F7_C3A4076F; Sun, 11 Jul 2010 22:06:46 +0000 (GMT) Received: from dev.lan.Awfulhak.org (brian@dev.lan.Awfulhak.org [172.16.0.5]) by gw.Awfulhak.org (8.14.4/8.14.4) with ESMTP id o6BM6kXK086266; Sun, 11 Jul 2010 15:06:46 -0700 (PDT) (envelope-from brian@FreeBSD.org) Date: Sun, 11 Jul 2010 15:06:39 -0700 From: Brian Somers To: Brian Somers Message-ID: <20100711150639.33332f50@dev.lan.Awfulhak.org> In-Reply-To: <201007112200.o6BM0eOr002854@svn.freebsd.org> References: <201007112200.o6BM0eOr002854@svn.freebsd.org> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.20.1; i386-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/7gYmYysv1mGm9zA3O8OSqS1"; protocol="application/pgp-signature" Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-8@FreeBSD.org Subject: Re: svn commit: r209914 - stable/8/sbin/fsck_msdosfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 22:21:57 -0000 --Sig_/7gYmYysv1mGm9zA3O8OSqS1 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Sun, 11 Jul 2010 22:00:40 +0000 (UTC) Brian Somers w= rote: > Author: brian > Date: Sun Jul 11 22:00:40 2010 > New Revision: 209914 > URL: http://svn.freebsd.org/changeset/base/209914 >=20 > Log: > MFC r209364: Fix some (not all) style(9) and casting errors. > =20 > PR: 209364 > Submitted by: giffunip at tutopia dot com > Obtained from: NetBSD Oops, that would be PR 142384 --=20 Brian Somers Don't _EVER_ lose your sense of humour ! --Sig_/7gYmYysv1mGm9zA3O8OSqS1 Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iQCVAwUBTDpAdQ7tvOdmanQhAQI4sQP8DuZyBJwdbbzZCHH2NlzAflL/ZGOF2tym CO/WcuoT8cm+P04g+RaSkaZrIPhpSMUh4Q6XIoHcOBNE1GdtanXbPnFfP2Qy++j8 RsVlk6kbwdpoJ56Pyn0sUMqJyW2eoKtAHbmCpyIO55ouVUOWcsjUefy3Qo3JH8MV m1rRaHjVmkY= =ACB4 -----END PGP SIGNATURE----- --Sig_/7gYmYysv1mGm9zA3O8OSqS1-- From owner-svn-src-all@FreeBSD.ORG Sun Jul 11 23:52:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6306E106564A; Sun, 11 Jul 2010 23:52:12 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 50F288FC15; Sun, 11 Jul 2010 23:52:12 +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 o6BNqCg4027428; Sun, 11 Jul 2010 23:52:12 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6BNqCDX027426; Sun, 11 Jul 2010 23:52:12 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201007112352.o6BNqCDX027426@svn.freebsd.org> From: Andrew Thompson Date: Sun, 11 Jul 2010 23:52:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209917 - head/sys/dev/usb/wlan X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 23:52:12 -0000 Author: thompsa Date: Sun Jul 11 23:52:12 2010 New Revision: 209917 URL: http://svn.freebsd.org/changeset/base/209917 Log: Update for style(9). Submitted by: Akinori Furukoshi (author) Modified: head/sys/dev/usb/wlan/if_run.c Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Sun Jul 11 22:48:55 2010 (r209916) +++ head/sys/dev/usb/wlan/if_run.c Sun Jul 11 23:52:12 2010 (r209917) @@ -569,7 +569,7 @@ run_attach(device_t self) /* wait for the chip to settle */ for (ntries = 0; ntries < 100; ntries++) { - if (run_read(sc, RT2860_ASIC_VER_ID, &ver) != 0){ + if (run_read(sc, RT2860_ASIC_VER_ID, &ver) != 0) { RUN_UNLOCK(sc); goto detach; } @@ -698,11 +698,11 @@ run_attach(device_t self) if (bootverbose) ieee80211_announce(ic); - return 0; + return (0); detach: run_detach(self); - return(ENXIO); + return (ENXIO); } static int @@ -753,9 +753,9 @@ run_vap_create(struct ieee80211com *ic, struct ieee80211vap *vap; int i; - if(sc->rvp_cnt >= RUN_VAP_MAX){ + if (sc->rvp_cnt >= RUN_VAP_MAX) { if_printf(ifp, "number of VAPs maxed out\n"); - return NULL; + return (NULL); } switch (opmode) { @@ -769,7 +769,7 @@ run_vap_create(struct ieee80211com *ic, case IEEE80211_M_MBSS: /* other than WDS vaps, only one at a time */ if (!TAILQ_EMPTY(&ic->ic_vaps)) - return NULL; + return (NULL); break; case IEEE80211_M_WDS: TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next){ @@ -779,20 +779,20 @@ run_vap_create(struct ieee80211com *ic, flags &= ~IEEE80211_CLONE_BSSID; break; } - if(vap == NULL){ + if (vap == NULL) { if_printf(ifp, "wds only supported in ap mode\n"); - return NULL; + return (NULL); } break; default: if_printf(ifp, "unknown opmode %d\n", opmode); - return NULL; + return (NULL); } rvp = (struct run_vap *) malloc(sizeof(struct run_vap), M_80211_VAP, M_NOWAIT | M_ZERO); if (rvp == NULL) - return NULL; + return (NULL); vap = &rvp->vap; ieee80211_vap_setup(ic, vap, name, unit, opmode, flags, bssid, mac); @@ -820,23 +820,23 @@ run_vap_create(struct ieee80211com *ic, ieee80211_vap_attach(vap, run_media_change, ieee80211_media_status); /* make sure id is always unique */ - for(i = 0; i < RUN_VAP_MAX; i++){ + for (i = 0; i < RUN_VAP_MAX; i++) { if((sc->rvp_bmap & 1 << i) == 0){ sc->rvp_bmap |= 1 << i; rvp->rvp_id = i; break; } } - if(sc->rvp_cnt++ == 0) + if (sc->rvp_cnt++ == 0) ic->ic_opmode = opmode; - if(opmode == IEEE80211_M_HOSTAP) + if (opmode == IEEE80211_M_HOSTAP) sc->cmdq_run = RUN_CMDQ_GO; DPRINTF("rvp_id=%d bmap=%x rvp_cnt=%d\n", rvp->rvp_id, sc->rvp_bmap, sc->rvp_cnt); - return vap; + return (vap); } static void @@ -848,7 +848,7 @@ run_vap_delete(struct ieee80211vap *vap) struct run_softc *sc; uint8_t rvp_id; - if(vap == NULL) + if (vap == NULL) return; ic = vap->iv_ic; @@ -891,15 +891,15 @@ run_cmdq_cb(void *arg, int pending) /* call cmdq[].func locked */ RUN_LOCK(sc); - for(i = sc->cmdq_exec; sc->cmdq[i].func && pending; - i = sc->cmdq_exec, pending--){ + for (i = sc->cmdq_exec; sc->cmdq[i].func && pending; + i = sc->cmdq_exec, pending--) { DPRINTFN(6, "cmdq_exec=%d pending=%d\n", i, pending); - if(sc->cmdq_run == RUN_CMDQ_GO){ + if (sc->cmdq_run == RUN_CMDQ_GO) { /* * If arg0 is NULL, callback func needs more * than one arg. So, pass ptr to cmdq struct. */ - if(sc->cmdq[i].arg0) + if (sc->cmdq[i].arg0) sc->cmdq[i].func(sc->cmdq[i].arg0); else sc->cmdq[i].func(&sc->cmdq[i]); @@ -942,7 +942,7 @@ run_unsetup_tx_list(struct run_softc *sc /* free up all node references and mbufs */ for (data = &pq->tx_data[0]; - data < &pq->tx_data[RUN_TX_RING_COUNT]; data++){ + data < &pq->tx_data[RUN_TX_RING_COUNT]; data++) { if (data->m != NULL) { m_freem(data->m); data->m = NULL; @@ -968,7 +968,7 @@ run_load_microcode(struct run_softc *sc) RUN_UNLOCK(sc); fw = firmware_get("runfw"); RUN_LOCK(sc); - if(fw == NULL){ + if (fw == NULL) { device_printf(sc->sc_dev, "failed loadfirmware of file %s\n", "runfw"); return ENOENT; @@ -990,14 +990,14 @@ run_load_microcode(struct run_softc *sc) base = fw->data; if ((sc->mac_ver) != 0x2860 && (sc->mac_ver) != 0x2872 && - (sc->mac_ver) != 0x3070){ + (sc->mac_ver) != 0x3070) { base += 4096; } /* cheap sanity check */ temp = fw->data; bytes = *temp; - if(bytes != be64toh(0xffffff0210280210)) { + if (bytes != be64toh(0xffffff0210280210)) { device_printf(sc->sc_dev, "firmware checksum failed\n"); error = EINVAL; goto fail; @@ -1058,7 +1058,7 @@ run_reset(struct run_softc *sc) USETW(req.wValue, 1); USETW(req.wIndex, 0); USETW(req.wLength, 0); - return usbd_do_request(sc->sc_udev, &sc->sc_mtx, &req, NULL); + return (usbd_do_request(sc->sc_udev, &sc->sc_mtx, &req, NULL)); } static usb_error_t @@ -1093,7 +1093,7 @@ run_read(struct run_softc *sc, uint16_t *val = le32toh(tmp); else *val = 0xffffffff; - return error; + return (error); } static int @@ -1107,7 +1107,7 @@ run_read_region_1(struct run_softc *sc, USETW(req.wIndex, reg); USETW(req.wLength, len); - return run_do_request(sc, &req, buf); + return (run_do_request(sc, &req, buf)); } static int @@ -1121,7 +1121,7 @@ run_write_2(struct run_softc *sc, uint16 USETW(req.wIndex, reg); USETW(req.wLength, 0); - return run_do_request(sc, &req, NULL); + return (run_do_request(sc, &req, NULL)); } static int @@ -1131,7 +1131,7 @@ run_write(struct run_softc *sc, uint16_t if ((error = run_write_2(sc, reg, val & 0xffff)) == 0) error = run_write_2(sc, reg + 2, val >> 16); - return error; + return (error); } static int @@ -1147,7 +1147,7 @@ run_write_region_1(struct run_softc *sc, KASSERT((len & 1) == 0, ("run_write_region_1: Data too long.\n")); for (i = 0; i < len && error == 0; i += 2) error = run_write_2(sc, reg + i, buf[i] | buf[i + 1] << 8); - return error; + return (error); #else usb_device_request_t req; @@ -1156,7 +1156,7 @@ run_write_region_1(struct run_softc *sc, USETW(req.wValue, 0); USETW(req.wIndex, reg); USETW(req.wLength, len); - return run_do_request(sc, &req, buf); + return (run_do_request(sc, &req, buf)); #endif } @@ -1168,7 +1168,7 @@ run_set_region_4(struct run_softc *sc, u KASSERT((len & 3) == 0, ("run_set_region_4: Invalid data length.\n")); for (i = 0; i < len && error == 0; i += 4) error = run_write(sc, reg + i, val); - return error; + return (error); } /* Read 16-bit from eFUSE ROM (RT3070 only.) */ @@ -1180,7 +1180,7 @@ run_efuse_read_2(struct run_softc *sc, u int error, ntries; if ((error = run_read(sc, RT3070_EFUSE_CTRL, &tmp)) != 0) - return error; + return (error); addr *= 2; /*- @@ -1195,25 +1195,25 @@ run_efuse_read_2(struct run_softc *sc, u run_write(sc, RT3070_EFUSE_CTRL, tmp); for (ntries = 0; ntries < 100; ntries++) { if ((error = run_read(sc, RT3070_EFUSE_CTRL, &tmp)) != 0) - return error; + return (error); if (!(tmp & RT3070_EFSROM_KICK)) break; run_delay(sc, 2); } if (ntries == 100) - return ETIMEDOUT; + return (ETIMEDOUT); if ((tmp & RT3070_EFUSE_AOUT_MASK) == RT3070_EFUSE_AOUT_MASK) { *val = 0xffff; /* address not found */ - return 0; + return (0); } /* determine to which 32-bit register our 16-bit word belongs */ reg = RT3070_EFUSE_DATA3 - (addr & 0xc); if ((error = run_read(sc, reg, &tmp)) != 0) - return error; + return (error); *val = (addr & 2) ? tmp >> 16 : tmp & 0xffff; - return 0; + return (0); } static int @@ -1235,7 +1235,7 @@ run_eeprom_read_2(struct run_softc *sc, *val = le16toh(tmp); else *val = 0xffff; - return error; + return (error); } static __inline int @@ -1253,17 +1253,17 @@ run_rt2870_rf_write(struct run_softc *sc for (ntries = 0; ntries < 10; ntries++) { if ((error = run_read(sc, RT2860_RF_CSR_CFG0, &tmp)) != 0) - return error; + return (error); if (!(tmp & RT2860_RF_REG_CTRL)) break; } if (ntries == 10) - return ETIMEDOUT; + return (ETIMEDOUT); /* RF registers are 24-bit on the RT2860 */ tmp = RT2860_RF_REG_CTRL | 24 << RT2860_RF_REG_WIDTH_SHIFT | (val & 0x3fffff) << 2 | (reg & 3); - return run_write(sc, RT2860_RF_CSR_CFG0, tmp); + return (run_write(sc, RT2860_RF_CSR_CFG0, tmp)); } static int @@ -1274,28 +1274,28 @@ run_rt3070_rf_read(struct run_softc *sc, for (ntries = 0; ntries < 100; ntries++) { if ((error = run_read(sc, RT3070_RF_CSR_CFG, &tmp)) != 0) - return error; + return (error); if (!(tmp & RT3070_RF_KICK)) break; } if (ntries == 100) - return ETIMEDOUT; + return (ETIMEDOUT); tmp = RT3070_RF_KICK | reg << 8; if ((error = run_write(sc, RT3070_RF_CSR_CFG, tmp)) != 0) - return error; + return (error); for (ntries = 0; ntries < 100; ntries++) { if ((error = run_read(sc, RT3070_RF_CSR_CFG, &tmp)) != 0) - return error; + return (error); if (!(tmp & RT3070_RF_KICK)) break; } if (ntries == 100) - return ETIMEDOUT; + return (ETIMEDOUT); *val = tmp & 0xff; - return 0; + return (0); } static int @@ -1306,15 +1306,15 @@ run_rt3070_rf_write(struct run_softc *sc for (ntries = 0; ntries < 10; ntries++) { if ((error = run_read(sc, RT3070_RF_CSR_CFG, &tmp)) != 0) - return error; + return (error); if (!(tmp & RT3070_RF_KICK)) break; } if (ntries == 10) - return ETIMEDOUT; + return (ETIMEDOUT); tmp = RT3070_RF_WRITE | RT3070_RF_KICK | reg << 8 | val; - return run_write(sc, RT3070_RF_CSR_CFG, tmp); + return (run_write(sc, RT3070_RF_CSR_CFG, tmp)); } static int @@ -1325,28 +1325,28 @@ run_bbp_read(struct run_softc *sc, uint8 for (ntries = 0; ntries < 10; ntries++) { if ((error = run_read(sc, RT2860_BBP_CSR_CFG, &tmp)) != 0) - return error; + return (error); if (!(tmp & RT2860_BBP_CSR_KICK)) break; } if (ntries == 10) - return ETIMEDOUT; + return (ETIMEDOUT); tmp = RT2860_BBP_CSR_READ | RT2860_BBP_CSR_KICK | reg << 8; if ((error = run_write(sc, RT2860_BBP_CSR_CFG, tmp)) != 0) - return error; + return (error); for (ntries = 0; ntries < 10; ntries++) { if ((error = run_read(sc, RT2860_BBP_CSR_CFG, &tmp)) != 0) - return error; + return (error); if (!(tmp & RT2860_BBP_CSR_KICK)) break; } if (ntries == 10) - return ETIMEDOUT; + return (ETIMEDOUT); *val = tmp & 0xff; - return 0; + return (0); } static int @@ -1357,15 +1357,15 @@ run_bbp_write(struct run_softc *sc, uint for (ntries = 0; ntries < 10; ntries++) { if ((error = run_read(sc, RT2860_BBP_CSR_CFG, &tmp)) != 0) - return error; + return (error); if (!(tmp & RT2860_BBP_CSR_KICK)) break; } if (ntries == 10) - return ETIMEDOUT; + return (ETIMEDOUT); tmp = RT2860_BBP_CSR_KICK | reg << 8 | val; - return run_write(sc, RT2860_BBP_CSR_CFG, tmp); + return (run_write(sc, RT2860_BBP_CSR_CFG, tmp)); } /* @@ -1389,7 +1389,7 @@ run_mcu_cmd(struct run_softc *sc, uint8_ tmp = RT2860_H2M_BUSY | RT2860_TOKEN_NO_INTR << 16 | arg; if ((error = run_write(sc, RT2860_H2M_MAILBOX, tmp)) == 0) error = run_write(sc, RT2860_HOST_CMD, cmd); - return error; + return (error); } /* @@ -1410,7 +1410,7 @@ b4inc(uint32_t b32, int8_t delta) b4 = 0xf; b32 = b32 >> 4 | b4 << 28; } - return b32; + return (b32); } static const char * @@ -1427,7 +1427,7 @@ run_get_rf(int rev) case RT3070_RF_3022: return "RT3022"; case RT3070_RF_3052: return "RT3052"; } - return "unknown"; + return ("unknown"); } int @@ -1678,7 +1678,7 @@ run_read_eeprom(struct run_softc *sc) sc->rssi_5ghz[ant] = 0; } } - return 0; + return (0); } struct ieee80211_node * @@ -1701,9 +1701,9 @@ run_media_change(struct ifnet *ifp) RUN_LOCK(sc); error = ieee80211_media_change(ifp); - if (error != ENETRESET){ + if (error != ENETRESET) { RUN_UNLOCK(sc); - return error; + return (error); } tp = &vap->iv_txparms[ieee80211_chan2mode(ic->ic_curchan)]; @@ -1726,7 +1726,7 @@ run_media_change(struct ifnet *ifp) RUN_UNLOCK(sc); - return 0; + return (0); } static int @@ -1772,7 +1772,7 @@ run_newstate(struct ieee80211vap *vap, e sc->runbmap &= ~bid; /* abort TSF synchronization if there is no vap running */ - if(--sc->running == 0){ + if (--sc->running == 0) { run_read(sc, RT2860_BCN_TIME_CFG, &tmp); run_write(sc, RT2860_BCN_TIME_CFG, tmp & ~(RT2860_BCN_TX_EN | RT2860_TSF_TIMER_EN | @@ -1783,13 +1783,13 @@ run_newstate(struct ieee80211vap *vap, e case IEEE80211_S_RUN: ni = vap->iv_bss; - if(!(sc->runbmap & bid)){ + if (!(sc->runbmap & bid)) { if(sc->running++) restart_ratectl = 1; sc->runbmap |= bid; } - switch(vap->iv_opmode){ + switch (vap->iv_opmode) { case IEEE80211_M_HOSTAP: case IEEE80211_M_MBSS: sc->ap_running |= bid; @@ -1798,13 +1798,13 @@ run_newstate(struct ieee80211vap *vap, e break; case IEEE80211_M_IBSS: sc->adhoc_running |= bid; - if(!sc->ap_running) + if (!sc->ap_running) ic->ic_opmode = vap->iv_opmode; run_update_beacon_cb(vap); break; case IEEE80211_M_STA: sc->sta_running |= bid; - if(!sc->ap_running && !sc->adhoc_running) + if (!sc->ap_running && !sc->adhoc_running) ic->ic_opmode = vap->iv_opmode; /* read statistic counters (clear on read) */ @@ -1844,7 +1844,7 @@ run_newstate(struct ieee80211vap *vap, e } /* restart amrr for running VAPs */ - if((sc->ratectl_run = ratectl) && restart_ratectl) + if ((sc->ratectl_run = ratectl) && restart_ratectl) usb_callout_reset(&sc->ratectl_ch, hz, run_ratectl_to, sc); RUN_UNLOCK(sc); @@ -1871,7 +1871,7 @@ run_wme_update_cb(void *arg) wmesp->wme_params[aci].wmep_logcwmin << 12 | wmesp->wme_params[aci].wmep_aifsn << 8 | wmesp->wme_params[aci].wmep_txopLimit); - if(error) goto err; + if (error) goto err; } /* update SCH/DMA registers too */ @@ -1880,29 +1880,29 @@ run_wme_update_cb(void *arg) wmesp->wme_params[WME_AC_VI].wmep_aifsn << 8 | wmesp->wme_params[WME_AC_BK].wmep_aifsn << 4 | wmesp->wme_params[WME_AC_BE].wmep_aifsn); - if(error) goto err; + if (error) goto err; error = run_write(sc, RT2860_WMM_CWMIN_CFG, wmesp->wme_params[WME_AC_VO].wmep_logcwmin << 12 | wmesp->wme_params[WME_AC_VI].wmep_logcwmin << 8 | wmesp->wme_params[WME_AC_BK].wmep_logcwmin << 4 | wmesp->wme_params[WME_AC_BE].wmep_logcwmin); - if(error) goto err; + if (error) goto err; error = run_write(sc, RT2860_WMM_CWMAX_CFG, wmesp->wme_params[WME_AC_VO].wmep_logcwmax << 12 | wmesp->wme_params[WME_AC_VI].wmep_logcwmax << 8 | wmesp->wme_params[WME_AC_BK].wmep_logcwmax << 4 | wmesp->wme_params[WME_AC_BE].wmep_logcwmax); - if(error) goto err; + if (error) goto err; error = run_write(sc, RT2860_WMM_TXOP0_CFG, wmesp->wme_params[WME_AC_BK].wmep_txopLimit << 16 | wmesp->wme_params[WME_AC_BE].wmep_txopLimit); - if(error) goto err; + if (error) goto err; error = run_write(sc, RT2860_WMM_TXOP1_CFG, wmesp->wme_params[WME_AC_VO].wmep_txopLimit << 16 | wmesp->wme_params[WME_AC_VI].wmep_txopLimit); err: - if(error) + if (error) DPRINTF("WME update failed\n"); return; @@ -1914,13 +1914,13 @@ run_wme_update(struct ieee80211com *ic) struct run_softc *sc = ic->ic_ifp->if_softc; /* sometime called wothout lock */ - if(mtx_owned(&ic->ic_comlock.mtx)){ + if (mtx_owned(&ic->ic_comlock.mtx)) { uint32_t i = RUN_CMDQ_GET(&sc->cmdq_store); DPRINTF("cmdq_store=%d\n", i); sc->cmdq[i].func = run_wme_update_cb; sc->cmdq[i].arg0 = ic; ieee80211_runtask(ic, &sc->cmdq_task); - return (0); + return 0; } RUN_LOCK(sc); @@ -1962,7 +1962,7 @@ run_key_set_cb(void *arg) RUN_LOCK_ASSERT(sc, MA_OWNED); - if(vap->iv_opmode == IEEE80211_M_HOSTAP) + if (vap->iv_opmode == IEEE80211_M_HOSTAP) ni = ieee80211_find_vap_node(&ic->ic_sta, vap, cmdq->mac); else ni = vap->iv_bss; @@ -2017,7 +2017,7 @@ run_key_set_cb(void *arg) if (!(k->wk_flags & IEEE80211_KEY_GROUP) || (k->wk_flags & (IEEE80211_KEY_XMIT | IEEE80211_KEY_RECV))) { /* set initial packet number in IV+EIV */ - if (k->wk_cipher == IEEE80211_CIPHER_WEP){ + if (k->wk_cipher == IEEE80211_CIPHER_WEP) { memset(iv, 0, sizeof iv); iv[3] = vap->iv_def_txkey << 6; } else { @@ -2036,24 +2036,24 @@ run_key_set_cb(void *arg) iv[6] = k->wk_keytsc >> 32; iv[7] = k->wk_keytsc >> 40; } - if(run_write_region_1(sc, RT2860_IVEIV(wcid), iv, 8)) + if (run_write_region_1(sc, RT2860_IVEIV(wcid), iv, 8)) return; } if (k->wk_flags & IEEE80211_KEY_GROUP) { /* install group key */ - if(run_read(sc, RT2860_SKEY_MODE_0_7, &attr)) + if (run_read(sc, RT2860_SKEY_MODE_0_7, &attr)) return; attr &= ~(0xf << (k->wk_keyix * 4)); attr |= mode << (k->wk_keyix * 4); - if(run_write(sc, RT2860_SKEY_MODE_0_7, attr)) + if (run_write(sc, RT2860_SKEY_MODE_0_7, attr)) return; } else { /* install pairwise key */ - if(run_read(sc, RT2860_WCID_ATTR(wcid), &attr)) + if (run_read(sc, RT2860_WCID_ATTR(wcid), &attr)) return; attr = (attr & ~0xf) | (mode << 1) | RT2860_RX_PKEY_EN; - if(run_write(sc, RT2860_WCID_ATTR(wcid), attr)) + if (run_write(sc, RT2860_WCID_ATTR(wcid), attr)) return; } @@ -2091,13 +2091,13 @@ run_key_set(struct ieee80211vap *vap, st * To make sure key will be set when hostapd * calls iv_key_set() before if_init(). */ - if(vap->iv_opmode == IEEE80211_M_HOSTAP){ + if (vap->iv_opmode == IEEE80211_M_HOSTAP) { RUN_LOCK(sc); sc->cmdq_key_set = RUN_CMDQ_GO; RUN_UNLOCK(sc); } - return(1); + return (1); } /* @@ -2186,10 +2186,10 @@ run_ratectl_cb(void *arg, int pending) struct ieee80211com *ic = sc->sc_ifp->if_l2com; struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); - if(vap == NULL) + if (vap == NULL) return; - if(sc->rvp_cnt <= 1 && vap->iv_opmode == IEEE80211_M_STA) + if (sc->rvp_cnt <= 1 && vap->iv_opmode == IEEE80211_M_STA) run_iter_func(sc, vap->iv_bss); else { /* @@ -2227,7 +2227,7 @@ run_drain_fifo(void *arg) /* drain Tx status FIFO (maxsize = 16) */ run_read(sc, RT2860_TX_STAT_FIFO, &stat); DPRINTFN(4, "tx stat 0x%08x\n", stat); - if(!(stat & RT2860_TXQ_VLD)) + if (!(stat & RT2860_TXQ_VLD)) break; wcid = (stat >> RT2860_TXQ_WCID_SHIFT) & 0xff; @@ -2238,7 +2238,7 @@ run_drain_fifo(void *arg) continue; ni = sc->sc_ni[wcid]; - if(ni->ni_rctls == NULL) + if (ni->ni_rctls == NULL) continue; /* update per-STA AMRR stats */ @@ -2281,8 +2281,8 @@ run_iter_func(void *arg, struct ieee8021 int txcnt = 0, success = 0, retrycnt = 0; int error; - if(sc->rvp_cnt <= 1 && (vap->iv_opmode == IEEE80211_M_IBSS || - vap->iv_opmode == IEEE80211_M_STA)){ + if (sc->rvp_cnt <= 1 && (vap->iv_opmode == IEEE80211_M_IBSS || + vap->iv_opmode == IEEE80211_M_STA)) { RUN_LOCK(sc); /* read statistic counters (clear on read) and update AMRR state */ @@ -2347,13 +2347,13 @@ run_newassoc(struct ieee80211_node *ni, uint8_t wcid = RUN_AID2WCID(ni->ni_associd); int i, j; - if(wcid > RT2870_WCID_MAX){ + if (wcid > RT2870_WCID_MAX) { device_printf(sc->sc_dev, "wcid=%d out of range\n", wcid); return; } /* only interested in true associations */ - if (isnew && ni->ni_associd != 0){ + if (isnew && ni->ni_associd != 0) { /* * This function could is called though timeout function. @@ -2422,7 +2422,7 @@ run_maxrssi_chain(struct run_softc *sc, if (rxwi->rssi[2] > rxwi->rssi[rxchain]) rxchain = 2; } - return rxchain; + return (rxchain); } static void @@ -2463,12 +2463,12 @@ run_rx_frame(struct run_softc *sc, struc wh = mtod(m, struct ieee80211_frame *); - if (wh->i_fc[1] & IEEE80211_FC1_WEP){ + if (wh->i_fc[1] & IEEE80211_FC1_WEP) { wh->i_fc[1] &= ~IEEE80211_FC1_WEP; m->m_flags |= M_WEP; } - if (flags & RT2860_RX_L2PAD){ + if (flags & RT2860_RX_L2PAD) { DPRINTFN(8, "received RT2860_RX_L2PAD frame\n"); len += 2; } @@ -2478,7 +2478,7 @@ run_rx_frame(struct run_softc *sc, struc if (__predict_false(flags & RT2860_RX_MICERR)) { /* report MIC failures to net80211 for TKIP */ - if(ni != NULL) + if (ni != NULL) ieee80211_notify_michael_failure(ni->ni_vap, wh, rxwi->keyidx); m_freem(m); ifp->if_ierrors++; @@ -2500,7 +2500,7 @@ run_rx_frame(struct run_softc *sc, struc (void)ieee80211_input_all(ic, m, rssi, nf); } - if(__predict_false(ieee80211_radiotap_active(ic))){ + if (__predict_false(ieee80211_radiotap_active(ic))) { struct run_rx_radiotap_header *tap = &sc->sc_rxtap; tap->wr_flags = 0; @@ -2601,7 +2601,7 @@ tr_setup: goto tr_setup; } - if(sc->rx_m != NULL){ + if (sc->rx_m != NULL) { m_freem(sc->rx_m); sc->rx_m = NULL; } @@ -2632,7 +2632,7 @@ tr_setup: } /* If it is the last one or a single frame, we won't copy. */ - if((xferlen -= dmalen + 8) <= 8){ + if ((xferlen -= dmalen + 8) <= 8) { /* trim 32-bit DMA-len header */ m->m_data += 4; m->m_pkthdr.len = m->m_len -= 4; @@ -2672,7 +2672,7 @@ run_tx_free(struct run_endpoint_queue *p m_freem(data->m); data->m = NULL; - if(data->ni == NULL) { + if (data->ni == NULL) { DPRINTF("no node\n"); } else { ieee80211_free_node(data->ni); @@ -2702,7 +2702,7 @@ run_bulk_tx_callbackN(struct usb_xfer *x usbd_xfer_status(xfer, &actlen, &sumlen, NULL, NULL); - switch (USB_GET_STATE(xfer)){ + switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: DPRINTFN(11, "transfer complete: %d " "bytes @ index %d\n", actlen, index); @@ -2720,7 +2720,7 @@ run_bulk_tx_callbackN(struct usb_xfer *x case USB_ST_SETUP: tr_setup: data = STAILQ_FIRST(&pq->tx_qh); - if(data == NULL) + if (data == NULL) break; STAILQ_REMOVE_HEAD(&pq->tx_qh, next); @@ -2790,7 +2790,7 @@ tr_setup: run_tx_free(pq, data, error); usbd_xfer_set_priv(xfer, NULL); } - if(vap == NULL) + if (vap == NULL) vap = TAILQ_FIRST(&ic->ic_vaps); if (error != USB_ERR_CANCELLED) { @@ -2908,7 +2908,7 @@ run_set_tx_desc(struct run_softc *sc, st else txwi->txop |= RT2860_TX_TXOP_BACKOFF; - if(vap->iv_opmode != IEEE80211_M_STA && !IEEE80211_QOS_HAS_SEQ(wh)) + if (vap->iv_opmode != IEEE80211_M_STA && !IEEE80211_QOS_HAS_SEQ(wh)) txwi->xflags |= RT2860_TX_NSEQ; } @@ -3036,8 +3036,8 @@ run_tx(struct run_softc *sc, struct mbuf * * FIFO stats doesn't count Tx with WCID 0xff, so we do this in run_tx(). */ - if(sc->rvp_cnt > 1 || vap->iv_opmode == IEEE80211_M_HOSTAP || - vap->iv_opmode == IEEE80211_M_MBSS){ + if (sc->rvp_cnt > 1 || vap->iv_opmode == IEEE80211_M_HOSTAP || + vap->iv_opmode == IEEE80211_M_MBSS) { uint16_t pid = (rt2860_rates[ridx].mcs + 1) & 0xf; txwi->len |= htole16(pid << RT2860_TX_PID_SHIFT); @@ -3053,7 +3053,7 @@ run_tx(struct run_softc *sc, struct mbuf * run_ratectl_cb() via callout. * Call it early. Otherwise overflow. */ - if(sc->fifo_cnt++ == 10){ + if (sc->fifo_cnt++ == 10) { /* * With multiple vaps or if_bridge, if_start() is called * with a non-sleepable lock, tcpinp. So, need to defer. @@ -3274,7 +3274,7 @@ run_tx_param(struct run_softc *sc, struc rate); if (error) { /* let caller free mbuf */ - return (error); + return error; } opflags |= /*XXX RT2573_TX_LONG_RETRY |*/ RT2860_TX_TXOP_SIFS; } @@ -3313,7 +3313,7 @@ run_tx_param(struct run_softc *sc, struc usbd_transfer_start(sc->sc_xfer[0]); - return (0); + return (0); } static int @@ -3334,14 +3334,14 @@ run_raw_xmit(struct ieee80211_node *ni, if (params == NULL) { /* tx mgt packet */ - if ((error = run_tx_mgt(sc, m, ni)) != 0){ + if ((error = run_tx_mgt(sc, m, ni)) != 0) { ifp->if_oerrors++; DPRINTF("mgt tx failed\n"); goto done; } } else { /* tx raw packet with param */ - if ((error = run_tx_param(sc, m, ni, params)) != 0){ + if ((error = run_tx_param(sc, m, ni, params)) != 0) { ifp->if_oerrors++; DPRINTF("tx with param failed\n"); goto done; @@ -3353,7 +3353,7 @@ run_raw_xmit(struct ieee80211_node *ni, done: RUN_UNLOCK(sc); - if(error != 0){ + if (error != 0) { if(m != NULL) m_freem(m); ieee80211_free_node(ni); @@ -3412,13 +3412,13 @@ run_ioctl(struct ifnet *ifp, u_long cmd, } else run_update_promisc_locked(ifp); } else { - if(ifp->if_drv_flags & IFF_DRV_RUNNING && - (ic->ic_nrunning == 0 || sc->rvp_cnt <= 1)){ + if (ifp->if_drv_flags & IFF_DRV_RUNNING && + (ic->ic_nrunning == 0 || sc->rvp_cnt <= 1)) { run_stop(sc); } } RUN_UNLOCK(sc); - if(startall) + if (startall) ieee80211_start_all(ic); break; case SIOCGIFMEDIA: @@ -3813,7 +3813,7 @@ run_set_chan(struct run_softc *sc, struc chan = ieee80211_chan2ieee(ic, c); if (chan == 0 || chan == IEEE80211_CHAN_ANY) - return EINVAL; + return (EINVAL); if (sc->mac_ver == 0x3572) run_rt3572_set_chan(sc, chan); @@ -3837,7 +3837,7 @@ run_set_chan(struct run_softc *sc, struc run_delay(sc, 10); - return 0; + return (0); } static void @@ -3918,7 +3918,7 @@ run_update_beacon_cb(void *arg) struct mbuf *m; uint8_t ridx; - if(vap->iv_bss->ni_chan == IEEE80211_CHAN_ANYC) + if (vap->iv_bss->ni_chan == IEEE80211_CHAN_ANYC) return; if ((m = ieee80211_beacon_alloc(vap->iv_bss, &RUN_VAP(vap)->bo)) == NULL) @@ -3981,7 +3981,7 @@ run_usb_timeout_cb(void *arg) if(vap->iv_state == IEEE80211_S_RUN && vap->iv_opmode != IEEE80211_M_STA) run_reset_livelock(sc); - else if(vap->iv_state == IEEE80211_S_SCAN){ + else if (vap->iv_state == IEEE80211_S_SCAN) { DPRINTF("timeout caused by scan\n"); /* cancel bgscan */ ieee80211_cancel_scan(vap); @@ -4003,7 +4003,7 @@ run_reset_livelock(struct run_softc *sc) */ run_read(sc, RT2860_DEBUG, &tmp); DPRINTFN(3, "debug reg %08x\n", tmp); - if((tmp & (1 << 29)) && (tmp & (1 << 7 | 1 << 5))){ + if ((tmp & (1 << 29)) && (tmp & (1 << 7 | 1 << 5))) { DPRINTF("CTS-to-self livelock detected\n"); run_write(sc, RT2860_MAC_SYS_CTRL, RT2860_MAC_SRST); run_delay(sc, 1); @@ -4202,7 +4202,7 @@ run_rssi2dbm(struct run_softc *sc, uint8 } else delta = sc->rssi_2ghz[rxchain] - sc->lna[0]; - return -12 - delta - rssi; + return (-12 - delta - rssi); } static int @@ -4219,7 +4219,7 @@ run_bbp_init(struct run_softc *sc) break; } if (ntries == 20) - return ETIMEDOUT; + return (ETIMEDOUT); /* initialize BBP registers to default values */ for (i = 0; i < nitems(rt2860_def_bbp); i++) { @@ -4239,7 +4239,7 @@ run_bbp_init(struct run_softc *sc) run_bbp_write(sc, 69, 0x16); run_bbp_write(sc, 73, 0x12); } - return 0; + return (0); } static int @@ -4291,7 +4291,7 @@ run_rt3070_rf_init(struct run_softc *sc) run_read(sc, RT3070_GPIO_SWITCH, &tmp); run_write(sc, RT3070_GPIO_SWITCH, tmp & ~0x20); - } else if(sc->mac_ver == 0x3572){ + } else if (sc->mac_ver == 0x3572) { run_rt3070_rf_read(sc, 6, &rf); run_rt3070_rf_write(sc, 6, rf | 0x40); @@ -4300,7 +4300,7 @@ run_rt3070_rf_init(struct run_softc *sc) tmp = (tmp & ~0x1f000000) | 0x0d000000; run_write(sc, RT3070_LDO_CFG0, tmp); - if (sc->mac_rev < 0x0211 || !sc->patch_dac){ + if (sc->mac_rev < 0x0211 || !sc->patch_dac) { run_delay(sc, 1); /* wait for 1msec */ /* decrease voltage back to 1.2V */ tmp = (tmp & ~0x1f000000) | 0x01000000; @@ -4378,7 +4378,7 @@ run_rt3070_rf_init(struct run_softc *sc) rf |= 0x03; run_rt3070_rf_write(sc, 27, rf); } - return 0; + return (0); } static int @@ -4443,7 +4443,7 @@ run_rt3070_filter_calib(struct run_softc run_rt3070_rf_read(sc, 22, &rf22); run_rt3070_rf_write(sc, 22, rf22 & ~0x01); - return 0; + return (0); } static void @@ -4569,7 +4569,7 @@ run_txrx_enable(struct run_softc *sc) run_write(sc, RT2860_MAC_SYS_CTRL, RT2860_MAC_RX_EN | RT2860_MAC_TX_EN); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Jul 11 23:54:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B9208106566B; Sun, 11 Jul 2010 23:54:44 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A7E928FC17; Sun, 11 Jul 2010 23:54:44 +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 o6BNsi5x027982; Sun, 11 Jul 2010 23:54:44 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6BNsivl027980; Sun, 11 Jul 2010 23:54:44 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201007112354.o6BNsivl027980@svn.freebsd.org> From: Andrew Thompson Date: Sun, 11 Jul 2010 23:54:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209918 - head/sys/dev/usb/wlan X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 23:54:44 -0000 Author: thompsa Date: Sun Jul 11 23:54:44 2010 New Revision: 209918 URL: http://svn.freebsd.org/changeset/base/209918 Log: Use more compact deviceid table. Submitted by: Akinori Furukoshi Modified: head/sys/dev/usb/wlan/if_run.c Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Sun Jul 11 23:52:12 2010 (r209917) +++ head/sys/dev/usb/wlan/if_run.c Sun Jul 11 23:54:44 2010 (r209918) @@ -97,199 +97,201 @@ SYSCTL_INT(_hw_usb_run, OID_AUTO, debug, #define RUN_CMDQ_GET(c) (atomic_fetchadd_32((c), 1) & RUN_CMDQ_MASQ) static const struct usb_device_id run_devs[] = { - { USB_VP(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_RT2770) }, - { USB_VP(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_RT2870) }, - { USB_VP(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_RT3070) }, - { USB_VP(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_RT3071) }, - { USB_VP(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_RT3072) }, - { USB_VP(USB_VENDOR_ABOCOM2, USB_PRODUCT_ABOCOM2_RT2870_1) }, - { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT2770) }, - { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT2870_1) }, - { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT2870_2) }, - { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT2870_3) }, - { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT2870_4) }, - { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT2870_5) }, - { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT3070) }, - { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT3070_1) }, - { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT3070_2) }, - { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT3070_3) }, - { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT3070_4) }, - { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT3070_5) }, - { USB_VP(USB_VENDOR_AIRTIES, USB_PRODUCT_AIRTIES_RT3070) }, - { USB_VP(USB_VENDOR_ALLWIN, USB_PRODUCT_ALLWIN_RT2070) }, - { USB_VP(USB_VENDOR_ALLWIN, USB_PRODUCT_ALLWIN_RT2770) }, - { USB_VP(USB_VENDOR_ALLWIN, USB_PRODUCT_ALLWIN_RT2870) }, - { USB_VP(USB_VENDOR_ALLWIN, USB_PRODUCT_ALLWIN_RT3070) }, - { USB_VP(USB_VENDOR_ALLWIN, USB_PRODUCT_ALLWIN_RT3071) }, - { USB_VP(USB_VENDOR_ALLWIN, USB_PRODUCT_ALLWIN_RT3072) }, - { USB_VP(USB_VENDOR_ALLWIN, USB_PRODUCT_ALLWIN_RT3572) }, - { USB_VP(USB_VENDOR_AMIGO, USB_PRODUCT_AMIGO_RT2870_1) }, - { USB_VP(USB_VENDOR_AMIGO, USB_PRODUCT_AMIGO_RT2870_2) }, - { USB_VP(USB_VENDOR_AMIT, USB_PRODUCT_AMIT_CGWLUSB2GNR) }, - { USB_VP(USB_VENDOR_AMIT, USB_PRODUCT_AMIT_RT2870_1) }, - { USB_VP(USB_VENDOR_AMIT2, USB_PRODUCT_AMIT2_RT2870) }, - { USB_VP(USB_VENDOR_ASUS, USB_PRODUCT_ASUS_RT2870_1) }, - { USB_VP(USB_VENDOR_ASUS, USB_PRODUCT_ASUS_RT2870_2) }, - { USB_VP(USB_VENDOR_ASUS, USB_PRODUCT_ASUS_RT2870_3) }, - { USB_VP(USB_VENDOR_ASUS, USB_PRODUCT_ASUS_RT2870_4) }, - { USB_VP(USB_VENDOR_ASUS, USB_PRODUCT_ASUS_RT2870_5) }, - { USB_VP(USB_VENDOR_ASUS, USB_PRODUCT_ASUS_USBN13) }, - { USB_VP(USB_VENDOR_ASUS, USB_PRODUCT_ASUS_RT3070_1) }, - { USB_VP(USB_VENDOR_ASUS2, USB_PRODUCT_ASUS2_USBN11) }, - { USB_VP(USB_VENDOR_AZUREWAVE, USB_PRODUCT_AZUREWAVE_RT2870_1) }, - { USB_VP(USB_VENDOR_AZUREWAVE, USB_PRODUCT_AZUREWAVE_RT2870_2) }, - { USB_VP(USB_VENDOR_AZUREWAVE, USB_PRODUCT_AZUREWAVE_RT3070_1) }, - { USB_VP(USB_VENDOR_AZUREWAVE, USB_PRODUCT_AZUREWAVE_RT3070_2) }, - { USB_VP(USB_VENDOR_AZUREWAVE, USB_PRODUCT_AZUREWAVE_RT3070_3) }, - { USB_VP(USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_F5D8053V3) }, - { USB_VP(USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_F5D8055) }, - { USB_VP(USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_F6D4050V1) }, - { USB_VP(USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_RT2870_1) }, - { USB_VP(USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_RT2870_2) }, - { USB_VP(USB_VENDOR_CISCOLINKSYS2, USB_PRODUCT_CISCOLINKSYS2_RT3070) }, - { USB_VP(USB_VENDOR_CISCOLINKSYS3, USB_PRODUCT_CISCOLINKSYS2_RT3070) }, - { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT2870_1) }, - { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT2870_2) }, - { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT2870_3) }, - { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT2870_4) }, - { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT2870_5) }, - { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT2870_6) }, - { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT2870_7) }, - { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT2870_8) }, - { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT3070_1) }, - { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT3070_2) }, - { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_VIGORN61) }, - { USB_VP(USB_VENDOR_COREGA, USB_PRODUCT_COREGA_CGWLUSB300GNM) }, - { USB_VP(USB_VENDOR_COREGA, USB_PRODUCT_COREGA_RT2870_1) }, - { USB_VP(USB_VENDOR_COREGA, USB_PRODUCT_COREGA_RT2870_2) }, - { USB_VP(USB_VENDOR_COREGA, USB_PRODUCT_COREGA_RT2870_3) }, - { USB_VP(USB_VENDOR_COREGA, USB_PRODUCT_COREGA_RT3070) }, - { USB_VP(USB_VENDOR_CYBERTAN, USB_PRODUCT_CYBERTAN_RT2870) }, - { USB_VP(USB_VENDOR_DLINK, USB_PRODUCT_DLINK_RT2870) }, - { USB_VP(USB_VENDOR_DLINK, USB_PRODUCT_DLINK_RT3072) }, - { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_DWA130) }, - { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_RT2870_1) }, - { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_RT2870_2) }, - { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_RT3070_1) }, - { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_RT3070_2) }, - { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_RT3070_3) }, - { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_RT3070_4) }, - { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_RT3070_5) }, - { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_RT3072) }, - { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_RT3072_1) }, - { USB_VP(USB_VENDOR_EDIMAX, USB_PRODUCT_EDIMAX_EW7717) }, - { USB_VP(USB_VENDOR_EDIMAX, USB_PRODUCT_EDIMAX_EW7718) }, - { USB_VP(USB_VENDOR_EDIMAX, USB_PRODUCT_EDIMAX_RT2870_1) }, - { USB_VP(USB_VENDOR_ENCORE, USB_PRODUCT_ENCORE_RT3070_1) }, - { USB_VP(USB_VENDOR_ENCORE, USB_PRODUCT_ENCORE_RT3070_2) }, - { USB_VP(USB_VENDOR_ENCORE, USB_PRODUCT_ENCORE_RT3070_3) }, - { USB_VP(USB_VENDOR_GIGABYTE, USB_PRODUCT_GIGABYTE_GNWB31N) }, - { USB_VP(USB_VENDOR_GIGABYTE, USB_PRODUCT_GIGABYTE_GNWB32L) }, - { USB_VP(USB_VENDOR_GIGABYTE, USB_PRODUCT_GIGABYTE_RT2870_1) }, - { USB_VP(USB_VENDOR_GIGASET, USB_PRODUCT_GIGASET_RT3070_1) }, - { USB_VP(USB_VENDOR_GIGASET, USB_PRODUCT_GIGASET_RT3070_2) }, - { USB_VP(USB_VENDOR_GUILLEMOT, USB_PRODUCT_GUILLEMOT_HWNU300) }, - { USB_VP(USB_VENDOR_HAWKING, USB_PRODUCT_HAWKING_HWUN2) }, - { USB_VP(USB_VENDOR_HAWKING, USB_PRODUCT_HAWKING_RT2870_1) }, - { USB_VP(USB_VENDOR_HAWKING, USB_PRODUCT_HAWKING_RT2870_2) }, - { USB_VP(USB_VENDOR_HAWKING, USB_PRODUCT_HAWKING_RT3070) }, - { USB_VP(USB_VENDOR_IODATA, USB_PRODUCT_IODATA_RT3072_1) }, - { USB_VP(USB_VENDOR_IODATA, USB_PRODUCT_IODATA_RT3072_2) }, - { USB_VP(USB_VENDOR_IODATA, USB_PRODUCT_IODATA_RT3072_3) }, - { USB_VP(USB_VENDOR_IODATA, USB_PRODUCT_IODATA_RT3072_4) }, - { USB_VP(USB_VENDOR_LINKSYS4, USB_PRODUCT_LINKSYS4_RT3070) }, - { USB_VP(USB_VENDOR_LINKSYS4, USB_PRODUCT_LINKSYS4_WUSB100) }, - { USB_VP(USB_VENDOR_LINKSYS4, USB_PRODUCT_LINKSYS4_WUSB54GCV3) }, - { USB_VP(USB_VENDOR_LINKSYS4, USB_PRODUCT_LINKSYS4_WUSB600N) }, - { USB_VP(USB_VENDOR_LINKSYS4, USB_PRODUCT_LINKSYS4_WUSB600NV2) }, - { USB_VP(USB_VENDOR_LOGITEC, USB_PRODUCT_LOGITEC_RT2870_1) }, - { USB_VP(USB_VENDOR_LOGITEC, USB_PRODUCT_LOGITEC_RT2870_2) }, - { USB_VP(USB_VENDOR_LOGITEC, USB_PRODUCT_LOGITEC_RT2870_3) }, - { USB_VP(USB_VENDOR_MELCO, USB_PRODUCT_MELCO_RT2870_1) }, - { USB_VP(USB_VENDOR_MELCO, USB_PRODUCT_MELCO_RT2870_2) }, - { USB_VP(USB_VENDOR_MELCO, USB_PRODUCT_MELCO_WLIUCAG300N) }, - { USB_VP(USB_VENDOR_MELCO, USB_PRODUCT_MELCO_WLIUCG300N) }, - { USB_VP(USB_VENDOR_MELCO, USB_PRODUCT_MELCO_WLIUCGN) }, - { USB_VP(USB_VENDOR_MOTOROLA4, USB_PRODUCT_MOTOROLA4_RT2770) }, - { USB_VP(USB_VENDOR_MOTOROLA4, USB_PRODUCT_MOTOROLA4_RT3070) }, - { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_1) }, - { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_2) }, - { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_3) }, - { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_4) }, - { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_5) }, - { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_6) }, - { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_7) }, - { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_8) }, - { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_9) }, - { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_10) }, - { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_11) }, - { USB_VP(USB_VENDOR_OVISLINK, USB_PRODUCT_OVISLINK_RT3072) }, - { USB_VP(USB_VENDOR_PARA, USB_PRODUCT_PARA_RT3070) }, - { USB_VP(USB_VENDOR_PEGATRON, USB_PRODUCT_PEGATRON_RT2870) }, - { USB_VP(USB_VENDOR_PEGATRON, USB_PRODUCT_PEGATRON_RT3070) }, - { USB_VP(USB_VENDOR_PEGATRON, USB_PRODUCT_PEGATRON_RT3070_2) }, - { USB_VP(USB_VENDOR_PEGATRON, USB_PRODUCT_PEGATRON_RT3070_3) }, - { USB_VP(USB_VENDOR_PHILIPS, USB_PRODUCT_PHILIPS_RT2870) }, - { USB_VP(USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_GWUS300MINIS) }, - { USB_VP(USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_GWUSMICRON) }, - { USB_VP(USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_RT2870) }, - { USB_VP(USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_RT3070) }, - { USB_VP(USB_VENDOR_QCOM, USB_PRODUCT_QCOM_RT2870) }, - { USB_VP(USB_VENDOR_QUANTA, USB_PRODUCT_QUANTA_RT3070) }, - { USB_VP(USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT2070) }, - { USB_VP(USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT2770) }, - { USB_VP(USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT2870) }, - { USB_VP(USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT3070) }, - { USB_VP(USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT3071) }, - { USB_VP(USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT3072) }, - { USB_VP(USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT3370) }, - { USB_VP(USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT3572) }, - { USB_VP(USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT8070) }, - { USB_VP(USB_VENDOR_SAMSUNG2, USB_PRODUCT_SAMSUNG2_RT2870_1) }, - { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT2870_1) }, - { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT2870_2) }, - { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT2870_3) }, - { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT2870_4) }, - { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT3070) }, - { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT3071) }, - { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT3072_1) }, - { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT3072_2) }, - { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT3072_3) }, - { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT3072_4) }, - { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT3072_5) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT2770) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT2870_1) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT2870_2) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT2870_3) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT2870_4) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3070) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3070_2) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3070_3) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3070_4) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3071) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3072_1) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3072_2) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3072_3) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3072_4) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3072_5) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3072_6) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_WL608) }, - { USB_VP(USB_VENDOR_SPARKLAN, USB_PRODUCT_SPARKLAN_RT2870_1) }, - { USB_VP(USB_VENDOR_SPARKLAN, USB_PRODUCT_SPARKLAN_RT3070) }, - { USB_VP(USB_VENDOR_SWEEX2, USB_PRODUCT_SWEEX2_LW153) }, - { USB_VP(USB_VENDOR_SWEEX2, USB_PRODUCT_SWEEX2_LW303) }, - { USB_VP(USB_VENDOR_SWEEX2, USB_PRODUCT_SWEEX2_LW313) }, - { USB_VP(USB_VENDOR_TOSHIBA, USB_PRODUCT_TOSHIBA_RT3070) }, - { USB_VP(USB_VENDOR_UMEDIA, USB_PRODUCT_UMEDIA_RT2870_1) }, - { USB_VP(USB_VENDOR_ZCOM, USB_PRODUCT_ZCOM_RT2870_1) }, - { USB_VP(USB_VENDOR_ZCOM, USB_PRODUCT_ZCOM_RT2870_2) }, - { USB_VP(USB_VENDOR_ZINWELL, USB_PRODUCT_ZINWELL_RT2870_1) }, - { USB_VP(USB_VENDOR_ZINWELL, USB_PRODUCT_ZINWELL_RT2870_2) }, - { USB_VP(USB_VENDOR_ZINWELL, USB_PRODUCT_ZINWELL_RT3070) }, - { USB_VP(USB_VENDOR_ZINWELL, USB_PRODUCT_ZINWELL_RT3072_1) }, - { USB_VP(USB_VENDOR_ZINWELL, USB_PRODUCT_ZINWELL_RT3072_2) }, - { USB_VP(USB_VENDOR_ZYXEL, USB_PRODUCT_ZYXEL_RT2870_1) }, - { USB_VP(USB_VENDOR_ZYXEL, USB_PRODUCT_ZYXEL_RT2870_2) }, +#define RUN_DEV(v,p) { USB_VP(USB_VENDOR_##v, USB_PRODUCT_##v##_##p) } + RUN_DEV(ABOCOM, RT2770), + RUN_DEV(ABOCOM, RT2870), + RUN_DEV(ABOCOM, RT3070), + RUN_DEV(ABOCOM, RT3071), + RUN_DEV(ABOCOM, RT3072), + RUN_DEV(ABOCOM2, RT2870_1), + RUN_DEV(ACCTON, RT2770), + RUN_DEV(ACCTON, RT2870_1), + RUN_DEV(ACCTON, RT2870_2), + RUN_DEV(ACCTON, RT2870_3), + RUN_DEV(ACCTON, RT2870_4), + RUN_DEV(ACCTON, RT2870_5), + RUN_DEV(ACCTON, RT3070), + RUN_DEV(ACCTON, RT3070_1), + RUN_DEV(ACCTON, RT3070_2), + RUN_DEV(ACCTON, RT3070_3), + RUN_DEV(ACCTON, RT3070_4), + RUN_DEV(ACCTON, RT3070_5), + RUN_DEV(AIRTIES, RT3070), + RUN_DEV(ALLWIN, RT2070), + RUN_DEV(ALLWIN, RT2770), + RUN_DEV(ALLWIN, RT2870), + RUN_DEV(ALLWIN, RT3070), + RUN_DEV(ALLWIN, RT3071), + RUN_DEV(ALLWIN, RT3072), + RUN_DEV(ALLWIN, RT3572), + RUN_DEV(AMIGO, RT2870_1), + RUN_DEV(AMIGO, RT2870_2), + RUN_DEV(AMIT, CGWLUSB2GNR), + RUN_DEV(AMIT, RT2870_1), + RUN_DEV(AMIT2, RT2870), + RUN_DEV(ASUS, RT2870_1), + RUN_DEV(ASUS, RT2870_2), + RUN_DEV(ASUS, RT2870_3), + RUN_DEV(ASUS, RT2870_4), + RUN_DEV(ASUS, RT2870_5), + RUN_DEV(ASUS, USBN13), + RUN_DEV(ASUS, RT3070_1), + RUN_DEV(ASUS2, USBN11), + RUN_DEV(AZUREWAVE, RT2870_1), + RUN_DEV(AZUREWAVE, RT2870_2), + RUN_DEV(AZUREWAVE, RT3070_1), + RUN_DEV(AZUREWAVE, RT3070_2), + RUN_DEV(AZUREWAVE, RT3070_3), + RUN_DEV(BELKIN, F5D8053V3), + RUN_DEV(BELKIN, F5D8055), + RUN_DEV(BELKIN, F6D4050V1), + RUN_DEV(BELKIN, RT2870_1), + RUN_DEV(BELKIN, RT2870_2), + RUN_DEV(CISCOLINKSYS2, RT3070), + RUN_DEV(CISCOLINKSYS3, RT3070), + RUN_DEV(CONCEPTRONIC2, RT2870_1), + RUN_DEV(CONCEPTRONIC2, RT2870_2), + RUN_DEV(CONCEPTRONIC2, RT2870_3), + RUN_DEV(CONCEPTRONIC2, RT2870_4), + RUN_DEV(CONCEPTRONIC2, RT2870_5), + RUN_DEV(CONCEPTRONIC2, RT2870_6), + RUN_DEV(CONCEPTRONIC2, RT2870_7), + RUN_DEV(CONCEPTRONIC2, RT2870_8), + RUN_DEV(CONCEPTRONIC2, RT3070_1), + RUN_DEV(CONCEPTRONIC2, RT3070_2), + RUN_DEV(CONCEPTRONIC2, VIGORN61), + RUN_DEV(COREGA, CGWLUSB300GNM), + RUN_DEV(COREGA, RT2870_1), + RUN_DEV(COREGA, RT2870_2), + RUN_DEV(COREGA, RT2870_3), + RUN_DEV(COREGA, RT3070), + RUN_DEV(CYBERTAN, RT2870), + RUN_DEV(DLINK, RT2870), + RUN_DEV(DLINK, RT3072), + RUN_DEV(DLINK2, DWA130), + RUN_DEV(DLINK2, RT2870_1), + RUN_DEV(DLINK2, RT2870_2), + RUN_DEV(DLINK2, RT3070_1), + RUN_DEV(DLINK2, RT3070_2), + RUN_DEV(DLINK2, RT3070_3), + RUN_DEV(DLINK2, RT3070_4), + RUN_DEV(DLINK2, RT3070_5), + RUN_DEV(DLINK2, RT3072), + RUN_DEV(DLINK2, RT3072_1), + RUN_DEV(EDIMAX, EW7717), + RUN_DEV(EDIMAX, EW7718), + RUN_DEV(EDIMAX, RT2870_1), + RUN_DEV(ENCORE, RT3070_1), + RUN_DEV(ENCORE, RT3070_2), + RUN_DEV(ENCORE, RT3070_3), + RUN_DEV(GIGABYTE, GNWB31N), + RUN_DEV(GIGABYTE, GNWB32L), + RUN_DEV(GIGABYTE, RT2870_1), + RUN_DEV(GIGASET, RT3070_1), + RUN_DEV(GIGASET, RT3070_2), + RUN_DEV(GUILLEMOT, HWNU300), + RUN_DEV(HAWKING, HWUN2), + RUN_DEV(HAWKING, RT2870_1), + RUN_DEV(HAWKING, RT2870_2), + RUN_DEV(HAWKING, RT3070), + RUN_DEV(IODATA, RT3072_1), + RUN_DEV(IODATA, RT3072_2), + RUN_DEV(IODATA, RT3072_3), + RUN_DEV(IODATA, RT3072_4), + RUN_DEV(LINKSYS4, RT3070), + RUN_DEV(LINKSYS4, WUSB100), + RUN_DEV(LINKSYS4, WUSB54GCV3), + RUN_DEV(LINKSYS4, WUSB600N), + RUN_DEV(LINKSYS4, WUSB600NV2), + RUN_DEV(LOGITEC, RT2870_1), + RUN_DEV(LOGITEC, RT2870_2), + RUN_DEV(LOGITEC, RT2870_3), + RUN_DEV(MELCO, RT2870_1), + RUN_DEV(MELCO, RT2870_2), + RUN_DEV(MELCO, WLIUCAG300N), + RUN_DEV(MELCO, WLIUCG300N), + RUN_DEV(MELCO, WLIUCGN), + RUN_DEV(MOTOROLA4, RT2770), + RUN_DEV(MOTOROLA4, RT3070), + RUN_DEV(MSI, RT3070_1), + RUN_DEV(MSI, RT3070_2), + RUN_DEV(MSI, RT3070_3), + RUN_DEV(MSI, RT3070_4), + RUN_DEV(MSI, RT3070_5), + RUN_DEV(MSI, RT3070_6), + RUN_DEV(MSI, RT3070_7), + RUN_DEV(MSI, RT3070_8), + RUN_DEV(MSI, RT3070_9), + RUN_DEV(MSI, RT3070_10), + RUN_DEV(MSI, RT3070_11), + RUN_DEV(OVISLINK, RT3072), + RUN_DEV(PARA, RT3070), + RUN_DEV(PEGATRON, RT2870), + RUN_DEV(PEGATRON, RT3070), + RUN_DEV(PEGATRON, RT3070_2), + RUN_DEV(PEGATRON, RT3070_3), + RUN_DEV(PHILIPS, RT2870), + RUN_DEV(PLANEX2, GWUS300MINIS), + RUN_DEV(PLANEX2, GWUSMICRON), + RUN_DEV(PLANEX2, RT2870), + RUN_DEV(PLANEX2, RT3070), + RUN_DEV(QCOM, RT2870), + RUN_DEV(QUANTA, RT3070), + RUN_DEV(RALINK, RT2070), + RUN_DEV(RALINK, RT2770), + RUN_DEV(RALINK, RT2870), + RUN_DEV(RALINK, RT3070), + RUN_DEV(RALINK, RT3071), + RUN_DEV(RALINK, RT3072), + RUN_DEV(RALINK, RT3370), + RUN_DEV(RALINK, RT3572), + RUN_DEV(RALINK, RT8070), + RUN_DEV(SAMSUNG2, RT2870_1), + RUN_DEV(SENAO, RT2870_1), + RUN_DEV(SENAO, RT2870_2), + RUN_DEV(SENAO, RT2870_3), + RUN_DEV(SENAO, RT2870_4), + RUN_DEV(SENAO, RT3070), + RUN_DEV(SENAO, RT3071), + RUN_DEV(SENAO, RT3072_1), + RUN_DEV(SENAO, RT3072_2), + RUN_DEV(SENAO, RT3072_3), + RUN_DEV(SENAO, RT3072_4), + RUN_DEV(SENAO, RT3072_5), + RUN_DEV(SITECOMEU, RT2770), + RUN_DEV(SITECOMEU, RT2870_1), + RUN_DEV(SITECOMEU, RT2870_2), + RUN_DEV(SITECOMEU, RT2870_3), + RUN_DEV(SITECOMEU, RT2870_4), + RUN_DEV(SITECOMEU, RT3070), + RUN_DEV(SITECOMEU, RT3070_2), + RUN_DEV(SITECOMEU, RT3070_3), + RUN_DEV(SITECOMEU, RT3070_4), + RUN_DEV(SITECOMEU, RT3071), + RUN_DEV(SITECOMEU, RT3072_1), + RUN_DEV(SITECOMEU, RT3072_2), + RUN_DEV(SITECOMEU, RT3072_3), + RUN_DEV(SITECOMEU, RT3072_4), + RUN_DEV(SITECOMEU, RT3072_5), + RUN_DEV(SITECOMEU, RT3072_6), + RUN_DEV(SITECOMEU, WL608), + RUN_DEV(SPARKLAN, RT2870_1), + RUN_DEV(SPARKLAN, RT3070), + RUN_DEV(SWEEX2, LW153), + RUN_DEV(SWEEX2, LW303), + RUN_DEV(SWEEX2, LW313), + RUN_DEV(TOSHIBA, RT3070), + RUN_DEV(UMEDIA, RT2870_1), + RUN_DEV(ZCOM, RT2870_1), + RUN_DEV(ZCOM, RT2870_2), + RUN_DEV(ZINWELL, RT2870_1), + RUN_DEV(ZINWELL, RT2870_2), + RUN_DEV(ZINWELL, RT3070), + RUN_DEV(ZINWELL, RT3072_1), + RUN_DEV(ZINWELL, RT3072_2), + RUN_DEV(ZYXEL, RT2870_1), + RUN_DEV(ZYXEL, RT2870_2), +#undef RUN_DEV }; MODULE_DEPEND(run, wlan, 1, 1, 1); @@ -1920,7 +1922,7 @@ run_wme_update(struct ieee80211com *ic) sc->cmdq[i].func = run_wme_update_cb; sc->cmdq[i].arg0 = ic; ieee80211_runtask(ic, &sc->cmdq_task); - return 0; + return (0); } RUN_LOCK(sc); From owner-svn-src-all@FreeBSD.ORG Mon Jul 12 00:49:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 74847106566C; Mon, 12 Jul 2010 00:49:24 +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 60A8F8FC08; Mon, 12 Jul 2010 00:49:24 +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 o6C0nNlE040074; Mon, 12 Jul 2010 00:49:23 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6C0nM06040056; Mon, 12 Jul 2010 00:49:22 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201007120049.o6C0nM06040056@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 12 Jul 2010 00:49:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209920 - in head/sys/boot: . common fdt ficl ofw ofw/libofw powerpc powerpc/boot1.chrp powerpc/ofw powerpc/uboot uboot X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 00:49:24 -0000 Author: nwhitehorn Date: Mon Jul 12 00:49:22 2010 New Revision: 209920 URL: http://svn.freebsd.org/changeset/base/209920 Log: Provide support in loader for booting 64-bit PowerPC kernels. Like amd64, 64-bit PowerPC kernels are loaded by a 32-bit loader, since nearly all powerpc64 firmwares execute in 32-bit mode. Added: head/sys/boot/ofw/libofw/ppc64_elf_freebsd.c (contents, props changed) Modified: head/sys/boot/Makefile head/sys/boot/common/Makefile.inc head/sys/boot/fdt/Makefile head/sys/boot/ficl/Makefile head/sys/boot/ofw/Makefile.inc head/sys/boot/ofw/libofw/Makefile head/sys/boot/ofw/libofw/libofw.h head/sys/boot/powerpc/Makefile.inc head/sys/boot/powerpc/boot1.chrp/Makefile head/sys/boot/powerpc/ofw/Makefile head/sys/boot/powerpc/ofw/conf.c head/sys/boot/powerpc/ofw/ldscript.powerpc head/sys/boot/powerpc/ofw/metadata.c head/sys/boot/powerpc/uboot/Makefile head/sys/boot/powerpc/uboot/ldscript.powerpc head/sys/boot/uboot/Makefile.inc Modified: head/sys/boot/Makefile ============================================================================== --- head/sys/boot/Makefile Mon Jul 12 00:17:29 2010 (r209919) +++ head/sys/boot/Makefile Mon Jul 12 00:49:22 2010 (r209920) @@ -13,12 +13,12 @@ SUBDIR+= efi .endif # Build Open Firmware library. -.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "sparc64" +.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64" || ${MACHINE_ARCH} == "sparc64" SUBDIR+= ofw .endif # Build U-Boot library. -.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "arm" +.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64" || ${MACHINE_ARCH} == "arm" SUBDIR+= uboot .endif @@ -31,7 +31,7 @@ SUBDIR+= fdt .endif # Pick the machine-dependent subdir based on the target architecture. -ADIR= ${MACHINE:S/amd64/i386/:S/sun4v/sparc64/} +ADIR= ${MACHINE:S/amd64/i386/:S/sun4v/sparc64/:S/powerpc64/powerpc/} .if exists(${.CURDIR}/${ADIR}/.) SUBDIR+= ${ADIR} .endif Modified: head/sys/boot/common/Makefile.inc ============================================================================== --- head/sys/boot/common/Makefile.inc Mon Jul 12 00:17:29 2010 (r209919) +++ head/sys/boot/common/Makefile.inc Mon Jul 12 00:49:22 2010 (r209920) @@ -9,8 +9,11 @@ SRCS+= load_elf32.c load_elf32_obj.c rel SRCS+= load_elf64.c load_elf64_obj.c reloc_elf64.c .elif ${MACHINE} == "pc98" SRCS+= load_elf32.c load_elf32_obj.c reloc_elf32.c -.elif ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "arm" +.elif ${MACHINE_ARCH} == "arm" SRCS+= load_elf32.c reloc_elf32.c +.elif ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64" +SRCS+= load_elf32.c reloc_elf32.c +SRCS+= load_elf64.c reloc_elf64.c .elif ${MACHINE_ARCH} == "sparc64" || ${MACHINE_ARCH} == "ia64" SRCS+= load_elf64.c reloc_elf64.c .endif Modified: head/sys/boot/fdt/Makefile ============================================================================== --- head/sys/boot/fdt/Makefile Mon Jul 12 00:17:29 2010 (r209919) +++ head/sys/boot/fdt/Makefile Mon Jul 12 00:49:22 2010 (r209920) @@ -16,10 +16,14 @@ CFLAGS+= -I${.CURDIR}/../../contrib/libf CFLAGS+= -ffreestanding -.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "arm" +.if ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_CPUARCH} == "arm" CFLAGS+= -msoft-float .endif +.if ${MACHINE_ARCH} == "powerpc64" +CFLAGS+= -m32 +.endif + CFLAGS+= -Wformat -Wall .include Modified: head/sys/boot/ficl/Makefile ============================================================================== --- head/sys/boot/ficl/Makefile Mon Jul 12 00:17:29 2010 (r209919) +++ head/sys/boot/ficl/Makefile Mon Jul 12 00:49:22 2010 (r209920) @@ -1,6 +1,6 @@ # $FreeBSD$ # -.PATH: ${.CURDIR}/${MACHINE_ARCH:S/amd64/i386/} +.PATH: ${.CURDIR}/${MACHINE_ARCH:S/amd64/i386/:S/powerpc64/powerpc/} BASE_SRCS= dict.c ficl.c fileaccess.c float.c loader.c math64.c \ prefix.c search.c stack.c tools.c vm.c words.c @@ -14,7 +14,7 @@ CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -m .if ${MACHINE_ARCH} == "i386" CFLAGS+= -mno-sse3 .endif -.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "arm" +.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64" || ${MACHINE_ARCH} == "arm" CFLAGS+= -msoft-float .endif .if ${MACHINE} == "pc98" @@ -45,7 +45,11 @@ SOFTWORDS= softcore.fr jhlocal.fr marker CFLAGS+= -m32 -march=i386 -I. .endif -CFLAGS+= -I${.CURDIR} -I${.CURDIR}/${MACHINE_ARCH:S/amd64/i386/} \ +.if ${MACHINE_ARCH} == "powerpc64" +CFLAGS+= -m32 -mcpu=powerpc -I. +.endif + +CFLAGS+= -I${.CURDIR} -I${.CURDIR}/${MACHINE_ARCH:S/amd64/i386/:S/powerpc64/powerpc/} \ -I${.CURDIR}/../common softcore.c: ${SOFTWORDS} softcore.awk Modified: head/sys/boot/ofw/Makefile.inc ============================================================================== --- head/sys/boot/ofw/Makefile.inc Mon Jul 12 00:17:29 2010 (r209919) +++ head/sys/boot/ofw/Makefile.inc Mon Jul 12 00:49:22 2010 (r209920) @@ -1,3 +1,8 @@ # $FreeBSD$ +.if ${MACHINE_ARCH} == "powerpc64" +CFLAGS+= -m32 -mcpu=powerpc +LDFLAGS+= -m elf32ppc +.endif + .include "../Makefile.inc" Modified: head/sys/boot/ofw/libofw/Makefile ============================================================================== --- head/sys/boot/ofw/libofw/Makefile Mon Jul 12 00:17:29 2010 (r209919) +++ head/sys/boot/ofw/libofw/Makefile Mon Jul 12 00:49:22 2010 (r209920) @@ -13,8 +13,9 @@ CFLAGS+= -I${.CURDIR}/../../../../lib/li CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../.. -I. CFLAGS+= -ffreestanding -.if ${MACHINE_ARCH} == "powerpc" +.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64" CFLAGS+= -msoft-float +SRCS+= ppc64_elf_freebsd.c .endif .ifdef(BOOT_DISK_DEBUG) Modified: head/sys/boot/ofw/libofw/libofw.h ============================================================================== --- head/sys/boot/ofw/libofw/libofw.h Mon Jul 12 00:17:29 2010 (r209919) +++ head/sys/boot/ofw/libofw/libofw.h Mon Jul 12 00:49:22 2010 (r209920) @@ -62,6 +62,9 @@ int ofw_elf_loadfile(char *, vm_offset_t int ofw_elf_exec(struct preloaded_file *); extern struct file_format ofw_elf; +#ifdef __powerpc__ +extern struct file_format ofw_elf64; +#endif extern void reboot(void); Added: head/sys/boot/ofw/libofw/ppc64_elf_freebsd.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/ofw/libofw/ppc64_elf_freebsd.c Mon Jul 12 00:49:22 2010 (r209920) @@ -0,0 +1,101 @@ +/*- + * Copyright (c) 2001 Benno Rice + * 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$"); + +#define __ELF_WORD_SIZE 64 + +#include +#include + +#include +#include + +#include + +#include "bootstrap.h" +#include "libofw.h" +#include "openfirm.h" + +extern char end[]; +extern vm_offset_t reloc; /* From /conf.c */ + +int +ppc64_ofw_elf_loadfile(char *filename, u_int64_t dest, + struct preloaded_file **result) +{ + int r; + + r = __elfN(loadfile)(filename, dest, result); + if (r != 0) + return (r); + + /* + * No need to sync the icache for modules: this will + * be done by the kernel after relocation. + */ + if (!strcmp((*result)->f_type, "elf kernel")) + __syncicache((void *) (*result)->f_addr, (*result)->f_size); + return (0); +} + +int +ppc64_ofw_elf_exec(struct preloaded_file *fp) +{ + struct file_metadata *fmp; + vm_offset_t mdp; + Elf_Ehdr *e; + int error; + intptr_t entry; + + if ((fmp = file_findmetadata(fp, MODINFOMD_ELFHDR)) == NULL) { + return(EFTYPE); + } + e = (Elf_Ehdr *)&fmp->md_data; + + /* Handle function descriptor */ + entry = *(uint64_t *)e->e_entry; + + if ((error = md_load64(fp->f_args, &mdp)) != 0) + return (error); + + printf("Kernel entry at 0x%lx ...\n", entry); + + dev_cleanup(); + ofw_release_heap(); + + OF_chain((void *)reloc, end - (char *)reloc, (void *)entry, + (void *)mdp, sizeof(mdp)); + + panic("exec returned"); +} + +struct file_format ofw_elf64 = +{ + ppc64_ofw_elf_loadfile, + ppc64_ofw_elf_exec +}; Modified: head/sys/boot/powerpc/Makefile.inc ============================================================================== --- head/sys/boot/powerpc/Makefile.inc Mon Jul 12 00:17:29 2010 (r209919) +++ head/sys/boot/powerpc/Makefile.inc Mon Jul 12 00:49:22 2010 (r209920) @@ -1,3 +1,8 @@ # $FreeBSD$ +.if ${MACHINE_ARCH} == "powerpc64" +CFLAGS+= -m32 -mcpu=powerpc +LDFLAGS+= -m elf32ppc +.endif + .include "../Makefile.inc" Modified: head/sys/boot/powerpc/boot1.chrp/Makefile ============================================================================== --- head/sys/boot/powerpc/boot1.chrp/Makefile Mon Jul 12 00:17:29 2010 (r209919) +++ head/sys/boot/powerpc/boot1.chrp/Makefile Mon Jul 12 00:49:22 2010 (r209920) @@ -13,7 +13,7 @@ SRCS= boot1.c ashldi3.c INTERNALPROG= NO_MAN= -CFLAGS= -ffreestanding -msoft-float -Os -D_KERNEL \ +CFLAGS= -ffreestanding -msoft-float -Os \ -I${.CURDIR}/../../common -I${.CURDIR}/../../../ LDFLAGS=-nostdlib -static -N Modified: head/sys/boot/powerpc/ofw/Makefile ============================================================================== --- head/sys/boot/powerpc/ofw/Makefile Mon Jul 12 00:17:29 2010 (r209919) +++ head/sys/boot/powerpc/ofw/Makefile Mon Jul 12 00:49:22 2010 (r209920) @@ -10,6 +10,7 @@ INSTALLFLAGS= -b # Architecture-specific loader code SRCS= conf.c metadata.c vers.c start.c +SRCS+= ucmpdi2.c LOADER_DISK_SUPPORT?= yes LOADER_UFS_SUPPORT?= yes @@ -62,9 +63,9 @@ LIBFICL= ${.OBJDIR}/../../ficl/libficl.a CFLAGS+= -DNETIF_OPEN_CLOSE_ONCE # Always add MI sources -.PATH: ${.CURDIR}/../../common +.PATH: ${.CURDIR}/../../common ${.CURDIR}/../../../libkern .include "${.CURDIR}/../../common/Makefile.inc" -CFLAGS+= -I${.CURDIR}/../../common +CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../.. CFLAGS+= -I. CLEANFILES+= vers.c loader.help Modified: head/sys/boot/powerpc/ofw/conf.c ============================================================================== --- head/sys/boot/powerpc/ofw/conf.c Mon Jul 12 00:17:29 2010 (r209919) +++ head/sys/boot/powerpc/ofw/conf.c Mon Jul 12 00:49:22 2010 (r209920) @@ -96,6 +96,7 @@ struct netif_driver *netif_drivers[] = { struct file_format *file_formats[] = { &ofw_elf, + &ofw_elf64, NULL }; Modified: head/sys/boot/powerpc/ofw/ldscript.powerpc ============================================================================== --- head/sys/boot/powerpc/ofw/ldscript.powerpc Mon Jul 12 00:17:29 2010 (r209919) +++ head/sys/boot/powerpc/ofw/ldscript.powerpc Mon Jul 12 00:49:22 2010 (r209920) @@ -1,7 +1,7 @@ /* $FreeBSD$ */ OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", "elf32-powerpc") -OUTPUT_ARCH(powerpc) +OUTPUT_ARCH(powerpc:common) ENTRY(_start) SEARCH_DIR(/usr/lib); /* Do we need any of these for elf? Modified: head/sys/boot/powerpc/ofw/metadata.c ============================================================================== --- head/sys/boot/powerpc/ofw/metadata.c Mon Jul 12 00:17:29 2010 (r209919) +++ head/sys/boot/powerpc/ofw/metadata.c Mon Jul 12 00:49:22 2010 (r209920) @@ -175,6 +175,9 @@ md_copyenv(vm_offset_t addr) * MOD_SIZE sizeof(size_t) module size * MOD_METADATA (variable) type-specific metadata */ + +static int align; + #define COPY32(v, a, c) { \ u_int32_t x = (v); \ if (c) \ @@ -187,7 +190,7 @@ md_copyenv(vm_offset_t addr) COPY32(strlen(s) + 1, a, c) \ if (c) \ archsw.arch_copyin(s, a, strlen(s) + 1);\ - a += roundup(strlen(s) + 1, sizeof(u_long));\ + a += roundup(strlen(s) + 1, align); \ } #define MOD_NAME(a, s, c) MOD_STR(MODINFO_NAME, a, s, c) @@ -199,7 +202,7 @@ md_copyenv(vm_offset_t addr) COPY32(sizeof(s), a, c); \ if (c) \ archsw.arch_copyin(&s, a, sizeof(s)); \ - a += roundup(sizeof(s), sizeof(u_long)); \ + a += roundup(sizeof(s), align); \ } #define MOD_ADDR(a, s, c) MOD_VAR(MODINFO_ADDR, a, s, c) @@ -210,7 +213,7 @@ md_copyenv(vm_offset_t addr) COPY32(mm->md_size, a, c); \ if (c) \ archsw.arch_copyin(mm->md_data, a, mm->md_size);\ - a += roundup(mm->md_size, sizeof(u_long)); \ + a += roundup(mm->md_size, align); \ } #define MOD_END(a, c) { \ @@ -219,10 +222,11 @@ md_copyenv(vm_offset_t addr) } vm_offset_t -md_copymodules(vm_offset_t addr) +md_copymodules(vm_offset_t addr, int kern64) { struct preloaded_file *fp; struct file_metadata *md; + uint64_t scratch64; int c; c = addr != 0; @@ -233,8 +237,15 @@ md_copymodules(vm_offset_t addr) MOD_TYPE(addr, fp->f_type, c); if (fp->f_args) MOD_ARGS(addr, fp->f_args, c); - MOD_ADDR(addr, fp->f_addr, c); - MOD_SIZE(addr, fp->f_size, c); + if (kern64) { + scratch64 = fp->f_addr; + MOD_ADDR(addr, scratch64, c); + scratch64 = fp->f_size; + MOD_SIZE(addr, scratch64, c); + } else { + MOD_ADDR(addr, fp->f_addr, c); + MOD_SIZE(addr, fp->f_size, c); + } for (md = fp->f_metadata; md != NULL; md = md->md_next) { if (!(md->md_type & MODINFOMD_NOCOPY)) { MOD_METADATA(addr, md, c); @@ -254,7 +265,7 @@ md_copymodules(vm_offset_t addr) * - Module metadata are formatted and placed in kernel space. */ int -md_load(char *args, vm_offset_t *modulep) +md_load_dual(char *args, vm_offset_t *modulep, int kern64) { struct preloaded_file *kfp; struct preloaded_file *xp; @@ -263,11 +274,11 @@ md_load(char *args, vm_offset_t *modulep vm_offset_t addr; vm_offset_t envp; vm_offset_t size; + uint64_t scratch64; char *rootdevname; int howto; - int dtlb_slots; - int itlb_slots; + align = kern64 ? 8 : 4; howto = md_getboothowto(args); /* @@ -298,23 +309,48 @@ md_load(char *args, vm_offset_t *modulep addr = roundup(addr, PAGE_SIZE); kernend = 0; - kfp = file_findfile(NULL, "elf32 kernel"); + kfp = file_findfile(NULL, kern64 ? "elf64 kernel" : "elf32 kernel"); if (kfp == NULL) kfp = file_findfile(NULL, "elf kernel"); if (kfp == NULL) panic("can't find kernel file"); file_addmetadata(kfp, MODINFOMD_HOWTO, sizeof howto, &howto); - file_addmetadata(kfp, MODINFOMD_ENVP, sizeof envp, &envp); - file_addmetadata(kfp, MODINFOMD_KERNEND, sizeof kernend, &kernend); + if (kern64) { + scratch64 = envp; + file_addmetadata(kfp, MODINFOMD_ENVP, sizeof scratch64, &scratch64); + scratch64 = kernend; + file_addmetadata(kfp, MODINFOMD_KERNEND, sizeof scratch64, &scratch64); + } else { + file_addmetadata(kfp, MODINFOMD_ENVP, sizeof envp, &envp); + file_addmetadata(kfp, MODINFOMD_KERNEND, sizeof kernend, &kernend); + } *modulep = addr; - size = md_copymodules(0); + size = md_copymodules(0, kern64); kernend = roundup(addr + size, PAGE_SIZE); md = file_findmetadata(kfp, MODINFOMD_KERNEND); - bcopy(&kernend, md->md_data, sizeof kernend); - - (void)md_copymodules(addr); + if (kern64) { + scratch64 = kernend; + bcopy(&scratch64, md->md_data, sizeof scratch64); + } else { + bcopy(&kernend, md->md_data, sizeof kernend); + } + + (void)md_copymodules(addr, kern64); return(0); } + +int +md_load(char *args, vm_offset_t *modulep) +{ + return (md_load_dual(args, modulep, 0)); +} + +int +md_load64(char *args, vm_offset_t *modulep) +{ + return (md_load_dual(args, modulep, 1)); +} + Modified: head/sys/boot/powerpc/uboot/Makefile ============================================================================== --- head/sys/boot/powerpc/uboot/Makefile Mon Jul 12 00:17:29 2010 (r209919) +++ head/sys/boot/powerpc/uboot/Makefile Mon Jul 12 00:49:22 2010 (r209920) @@ -10,6 +10,7 @@ NO_MAN= # Architecture-specific loader code SRCS= start.S conf.c vers.c +SRCS+= ucmpdi2.c LOADER_DISK_SUPPORT?= yes LOADER_UFS_SUPPORT?= yes @@ -68,9 +69,9 @@ LIBFICL= ${.OBJDIR}/../../ficl/libficl.a .endif # Always add MI sources -.PATH: ${.CURDIR}/../../common +.PATH: ${.CURDIR}/../../common ${.CURDIR}/../../../libkern .include "${.CURDIR}/../../common/Makefile.inc" -CFLAGS+= -I${.CURDIR}/../../common +CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../.. CFLAGS+= -I. CLEANFILES+= vers.c ${PROG}.help Modified: head/sys/boot/powerpc/uboot/ldscript.powerpc ============================================================================== --- head/sys/boot/powerpc/uboot/ldscript.powerpc Mon Jul 12 00:17:29 2010 (r209919) +++ head/sys/boot/powerpc/uboot/ldscript.powerpc Mon Jul 12 00:49:22 2010 (r209920) @@ -1,7 +1,7 @@ /* $FreeBSD$ */ OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", "elf32-powerpc") -OUTPUT_ARCH(powerpc) +OUTPUT_ARCH(powerpc:common) ENTRY(_start) SEARCH_DIR(/usr/lib); PROVIDE (__stack = 0); Modified: head/sys/boot/uboot/Makefile.inc ============================================================================== --- head/sys/boot/uboot/Makefile.inc Mon Jul 12 00:17:29 2010 (r209919) +++ head/sys/boot/uboot/Makefile.inc Mon Jul 12 00:49:22 2010 (r209920) @@ -1,3 +1,8 @@ # $FreeBSD$ +.if ${MACHINE_ARCH} == "powerpc64" +CFLAGS+= -m32 -mcpu=powerpc +LDFLAGS+= -m elf32ppc +.endif + .include "../Makefile.inc" From owner-svn-src-all@FreeBSD.ORG Mon Jul 12 00:52:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7BB04106566C; Mon, 12 Jul 2010 00:52:33 +0000 (UTC) (envelope-from jhellenthal@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 0B80B8FC14; Mon, 12 Jul 2010 00:52:32 +0000 (UTC) Received: by iwn35 with SMTP id 35so5109078iwn.13 for ; Sun, 11 Jul 2010 17:52:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:openpgp:content-type:content-transfer-encoding; bh=kxRV5reksyCK7BnPcWGmzDpfYGB+hsak6yEIMSY1FrY=; b=MOhaXphWdPcklHY/62XkYuzhQV3Vm1sjAMroMcgwgUUf+Nvru0ra5am2uwzvCxg746 Yp/ivQDFOWeZSdqFlACwC9BoTsjeAcOwNlP8gBuNdkz2fnAy35GTF3yhnKMcsla7EZ34 rDRHLTtOxk0jj1P8moCS79/5+sUV4jTgScwH4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:openpgp:content-type :content-transfer-encoding; b=ikViI/ZBsGsh8337gn9APGMpuaU7ylUdJ3eCZBuBmuc7z2g7ppfd75aohXxyzqkg+3 W5TscgIVBvcNYLcpfjtfnzJpkVZB3eDY0BvhPEDDLSqsB7o7RZ+DgXfoCZozVtrxVgGm NGEIbmiPXKW1wE9/iMTCCojlffTtVgOFTOaaM= Received: by 10.231.176.74 with SMTP id bd10mr14343653ibb.38.1278895952530; Sun, 11 Jul 2010 17:52:32 -0700 (PDT) Received: from centel.dataix.local (adsl-99-181-132-254.dsl.klmzmi.sbcglobal.net [99.181.132.254]) by mx.google.com with ESMTPS id h8sm16859750ibk.15.2010.07.11.17.52.31 (version=SSLv3 cipher=RC4-MD5); Sun, 11 Jul 2010 17:52:31 -0700 (PDT) Sender: "J. Hellenthal" Message-ID: <4C3A6751.10706@dataix.net> Date: Sun, 11 Jul 2010 20:52:33 -0400 From: jhell User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.10) Gecko/20100626 Thunderbird MIME-Version: 1.0 To: Brian Somers References: <201007112150.o6BLo6sG000375@svn.freebsd.org> In-Reply-To: <201007112150.o6BLo6sG000375@svn.freebsd.org> X-Enigmail-Version: 1.0.1 OpenPGP: id=89D8547E Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r209912 - stable/8/bin/pkill X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 00:52:33 -0000 On 07/11/2010 17:50, Brian Somers wrote: > Author: brian > Date: Sun Jul 11 21:50:05 2010 > New Revision: 209912 > URL: http://svn.freebsd.org/changeset/base/209912 > > Log: > MFC r209363: Recognise the -l switch in pkill. > > PR: 143558 > Submitted by: eitanadlerlist at gmail dot com > > Modified: > stable/8/bin/pkill/pkill.1 > stable/8/bin/pkill/pkill.c > Directory Properties: > stable/8/bin/pkill/ (props changed) > pkill.1 seems to be missing this: Index: bin/pkill/pkill.1 =================================================================== --- bin/pkill/pkill.1 (revision 209914) +++ bin/pkill/pkill.1 (working copy) @@ -60,7 +60,7 @@ .Ar pattern ... .Nm pkill .Op Fl Ar signal -.Op Fl ILafinovx +.Op Fl ILafilnovx .Op Fl F Ar pidfile .Op Fl G Ar gid .Op Fl M Ar core Regards, -- +-+-+-+-+-+ |j|h|e|l|l| +-+-+-+-+-+ From owner-svn-src-all@FreeBSD.ORG Mon Jul 12 00:54:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 948D7106564A; Mon, 12 Jul 2010 00:54:41 +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 82D828FC21; Mon, 12 Jul 2010 00:54:41 +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 o6C0sfiR041249; Mon, 12 Jul 2010 00:54:41 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6C0sfs2041246; Mon, 12 Jul 2010 00:54:41 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201007120054.o6C0sfs2041246@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 12 Jul 2010 00:54:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209921 - in head/usr.bin: truss xlint/arch/powerpc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 00:54:41 -0000 Author: nwhitehorn Date: Mon Jul 12 00:54:41 2010 New Revision: 209921 URL: http://svn.freebsd.org/changeset/base/209921 Log: Teach truss and xlint how to operate on 64-bit PowerPC systems. Added: head/usr.bin/truss/powerpc64-fbsd.c - copied, changed from r209845, head/usr.bin/truss/powerpc-fbsd.c head/usr.bin/xlint/arch/powerpc64/ - copied from r209845, head/usr.bin/xlint/arch/powerpc/ Modified: head/usr.bin/xlint/arch/powerpc64/targparam.h Copied and modified: head/usr.bin/truss/powerpc64-fbsd.c (from r209845, head/usr.bin/truss/powerpc-fbsd.c) ============================================================================== --- head/usr.bin/truss/powerpc-fbsd.c Fri Jul 9 11:27:33 2010 (r209845, copy source) +++ head/usr.bin/truss/powerpc64-fbsd.c Mon Jul 12 00:54:41 2010 (r209921) @@ -118,9 +118,6 @@ powerpc_syscall_entry(struct trussinfo * unsigned int regargs; struct syscall *sc; - /* Account for a 64-bit argument with corresponding alignment. */ - nargs += 2; - cpid = trussinfo->curthread->tid; clear_fsc(); @@ -137,14 +134,10 @@ powerpc_syscall_entry(struct trussinfo * regargs = NARGREG; syscall_num = regs.fixreg[0]; args = ®s.fixreg[3]; - if (syscall_num == SYS_syscall) { + if (syscall_num == SYS_syscall || syscall_num == SYS___syscall) { args = ®s.fixreg[4]; regargs -= 1; syscall_num = regs.fixreg[3]; - } else if (syscall_num == SYS___syscall) { - args = ®s.fixreg[5]; - regargs -= 2; - syscall_num = regs.fixreg[4]; } fsc.number = syscall_num; @@ -172,7 +165,7 @@ powerpc_syscall_entry(struct trussinfo * memmove(&fsc.args[0], args, regargs * sizeof(fsc.args[0])); iorequest.piod_op = PIOD_READ_D; - iorequest.piod_offs = (void *)(regs.fixreg[1] + 8); + iorequest.piod_offs = (void *)(regs.fixreg[1] + 48); iorequest.piod_addr = &fsc.args[regargs]; iorequest.piod_len = (nargs - regargs) * sizeof(fsc.args[0]); ptrace(PT_IO, cpid, (caddr_t)&iorequest, 0); @@ -292,14 +285,6 @@ powerpc_syscall_exit(struct trussinfo *t asprintf(&fsc.s_args[i], "0x%lx", fsc.args[i]); } else { /* - * On 32-bit big-endian, the low word of a 64-bit return is - * in the greater address. Switch to this. XXX note that - * print_syscall_ret can't handle 64-bit return values (llseek) - */ - if (sc->ret_type == 2) - retval = regs.fixreg[4]; - - /* * Here, we only look for arguments that have OUT masked in -- * otherwise, they were handled in the syscall_entry function. */ Modified: head/usr.bin/xlint/arch/powerpc64/targparam.h ============================================================================== --- head/usr.bin/xlint/arch/powerpc/targparam.h Fri Jul 9 11:27:33 2010 (r209845) +++ head/usr.bin/xlint/arch/powerpc64/targparam.h Mon Jul 12 00:54:41 2010 (r209921) @@ -29,13 +29,15 @@ * 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. + * + * $FreeBSD$ */ /* * Machine-dependent target parameters for lint1. */ -#include "ilp32.h" +#include "lp64.h" /* * Should be set to 1 if the difference of two pointers is of type long @@ -43,8 +45,8 @@ * kept in sync with the compiler! */ -#define PTRDIFF_IS_LONG 0 -#define SIZEOF_IS_ULONG 0 +#define PTRDIFF_IS_LONG 1 +#define SIZEOF_IS_ULONG 1 #define FLOAT_SIZE (4 * CHAR_BIT) #define DOUBLE_SIZE (8 * CHAR_BIT) From owner-svn-src-all@FreeBSD.ORG Mon Jul 12 00:56:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5FAD5106564A; Mon, 12 Jul 2010 00:56:36 +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 35C818FC08; Mon, 12 Jul 2010 00:56: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 o6C0uafA041726; Mon, 12 Jul 2010 00:56:36 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6C0uaUe041724; Mon, 12 Jul 2010 00:56:36 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201007120056.o6C0uaUe041724@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 12 Jul 2010 00:56:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209922 - head/lib X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 00:56:36 -0000 Author: nwhitehorn Date: Mon Jul 12 00:56:35 2010 New Revision: 209922 URL: http://svn.freebsd.org/changeset/base/209922 Log: Build libsmb should be on powerpc64 as well. Modified: head/lib/Makefile Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Mon Jul 12 00:54:41 2010 (r209921) +++ head/lib/Makefile Mon Jul 12 00:56:35 2010 (r209922) @@ -188,7 +188,7 @@ _libsmb= libsmb _libvgl= libvgl .endif -.if ${MACHINE_ARCH} == "powerpc" +.if ${MACHINE_CPUARCH} == "powerpc" _libsmb= libsmb .endif From owner-svn-src-all@FreeBSD.ORG Mon Jul 12 01:58:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 064621065674; Mon, 12 Jul 2010 01:58:47 +0000 (UTC) (envelope-from brian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D0BB78FC12; Mon, 12 Jul 2010 01:58: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 o6C1wkFs055424; Mon, 12 Jul 2010 01:58:46 GMT (envelope-from brian@svn.freebsd.org) Received: (from brian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6C1wkga055422; Mon, 12 Jul 2010 01:58:46 GMT (envelope-from brian@svn.freebsd.org) Message-Id: <201007120158.o6C1wkga055422@svn.freebsd.org> From: Brian Somers Date: Mon, 12 Jul 2010 01:58:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209924 - head/bin/pkill X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 01:58:47 -0000 Author: brian Date: Mon Jul 12 01:58:46 2010 New Revision: 209924 URL: http://svn.freebsd.org/changeset/base/209924 Log: Add -l to the synopsis Submitted by: jhell at dataix dot net MFC after: 3 days Modified: head/bin/pkill/pkill.1 Modified: head/bin/pkill/pkill.1 ============================================================================== --- head/bin/pkill/pkill.1 Mon Jul 12 01:08:59 2010 (r209923) +++ head/bin/pkill/pkill.1 Mon Jul 12 01:58:46 2010 (r209924) @@ -53,7 +53,7 @@ .Ar pattern ... .Nm pkill .Op Fl Ar signal -.Op Fl ILafinovx +.Op Fl ILafilnovx .Op Fl F Ar pidfile .Op Fl G Ar gid .Op Fl M Ar core From owner-svn-src-all@FreeBSD.ORG Mon Jul 12 02:14:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 697861065672; Mon, 12 Jul 2010 02:14:58 +0000 (UTC) (envelope-from prvs=1802c963e0=brian@FreeBSD.org) Received: from idcmail-mo1so.shaw.ca (idcmail-mo1so.shaw.ca [24.71.223.10]) by mx1.freebsd.org (Postfix) with ESMTP id 0633D8FC12; Mon, 12 Jul 2010 02:14:57 +0000 (UTC) Received: from pd3ml2so-ssvc.prod.shaw.ca ([10.0.141.138]) by pd4mo1so-svcs.prod.shaw.ca with ESMTP; 11 Jul 2010 19:59:55 -0600 X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.0 c=1 a=C6e8xTDxqcAA:10 a=ood2b7iyd8MA:10 a=VphdPIyG4kEA:10 a=MJPcHhXccCG8eBs0us8XwA==:17 a=M0VwM5ZyAAAA:8 a=6I5d2MoRAAAA:8 a=MMwg4So0AAAA:8 a=Gci9jjv9tJG093HpwtEA:9 a=SZwgGkJAXgEfl1eD0sIA:7 a=siBKn-I81DD3d6GDyzl5tM_mYuMA:4 a=CjuIK1q_8ugA:10 a=Xclt7nbD0wcA:10 a=WJ3hkfHDukgA:10 a=SV7veod9ZcQA:10 a=VY_0lvSfBLkAIJH0FLAA:9 a=I-pMi3SnrkagR67ZpxZ7sAeC5WEA:4 Received: from unknown (HELO store.lan.Awfulhak.org) ([70.79.162.198]) by pd3ml2so-dmz.prod.shaw.ca with ESMTP; 11 Jul 2010 19:59:55 -0600 Received: from store.lan.Awfulhak.org (localhost.localdomain [127.0.0.1]) by localhost (Email Security Appliance) with SMTP id 250D4C433AB_C3A771BB; Mon, 12 Jul 2010 01:59:55 +0000 (GMT) Received: from gw.Awfulhak.org (gw.lan.Awfulhak.org [172.16.0.1]) by store.lan.Awfulhak.org (Sophos Email Appliance) with ESMTP id C5203C460FA_C3A7712F; Mon, 12 Jul 2010 01:59:46 +0000 (GMT) Received: from dev.lan.Awfulhak.org (brian@dev.lan.Awfulhak.org [172.16.0.5]) by gw.Awfulhak.org (8.14.4/8.14.4) with ESMTP id o6C1xkaJ095691; Sun, 11 Jul 2010 18:59:46 -0700 (PDT) (envelope-from brian@FreeBSD.org) Date: Sun, 11 Jul 2010 18:59:39 -0700 From: Brian Somers To: jhell Message-ID: <20100711185939.07ed26f8@dev.lan.Awfulhak.org> In-Reply-To: <4C3A6751.10706@dataix.net> References: <201007112150.o6BLo6sG000375@svn.freebsd.org> <4C3A6751.10706@dataix.net> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.20.1; i386-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/uXOrbyiUdVxNZpTWQO5X9MB"; protocol="application/pgp-signature" Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-8@FreeBSD.org Subject: Re: svn commit: r209912 - stable/8/bin/pkill X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 02:14:58 -0000 --Sig_/uXOrbyiUdVxNZpTWQO5X9MB Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Oops, thanks for the heads up. I've updated head and will merge the change back into 8 in three days. Chers. On Sun, 11 Jul 2010 20:52:33 -0400 jhell wrote: > On 07/11/2010 17:50, Brian Somers wrote: > > Author: brian > > Date: Sun Jul 11 21:50:05 2010 > > New Revision: 209912 > > URL: http://svn.freebsd.org/changeset/base/209912 > >=20 > > Log: > > MFC r209363: Recognise the -l switch in pkill. > > =20 > > PR: 143558 > > Submitted by: eitanadlerlist at gmail dot com > >=20 > > Modified: > > stable/8/bin/pkill/pkill.1 > > stable/8/bin/pkill/pkill.c > > Directory Properties: > > stable/8/bin/pkill/ (props changed) > >=20 >=20 > pkill.1 seems to be missing this: >=20 > Index: bin/pkill/pkill.1 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- bin/pkill/pkill.1 (revision 209914) > +++ bin/pkill/pkill.1 (working copy) > @@ -60,7 +60,7 @@ > .Ar pattern ... > .Nm pkill > .Op Fl Ar signal > -.Op Fl ILafinovx > +.Op Fl ILafilnovx > .Op Fl F Ar pidfile > .Op Fl G Ar gid > .Op Fl M Ar core >=20 >=20 > Regards, >=20 > --=20 >=20 > +-+-+-+-+-+ > |j|h|e|l|l| > +-+-+-+-+-+ >=20 --=20 Brian Somers Don't _EVER_ lose your sense of humour ! --Sig_/uXOrbyiUdVxNZpTWQO5X9MB Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iQCVAwUBTDp3EQ7tvOdmanQhAQLuPQQAnYKCdMeHr9RL+XSpjDI2ft3OWes7g+ru cjX5ciSxChd7o55Wt1wspP7Mqq2QLgdRHwAQbLphp8fhWb1rJ1dBQJnPQZ/nNz8j QALM14C+LPzJqY8tQb+IAXfAnr2sMAtU4UDYzQl10FdJlcJ3571uP+P2UVzHfM6a pryJb8zJKZ4= =+mS2 -----END PGP SIGNATURE----- --Sig_/uXOrbyiUdVxNZpTWQO5X9MB-- From owner-svn-src-all@FreeBSD.ORG Mon Jul 12 04:21:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2CE911065672; Mon, 12 Jul 2010 04:21:51 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1D6A68FC08; Mon, 12 Jul 2010 04:21: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 o6C4Lpmg086994; Mon, 12 Jul 2010 04:21:51 GMT (envelope-from maxim@svn.freebsd.org) Received: (from maxim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6C4LoHD086992; Mon, 12 Jul 2010 04:21:50 GMT (envelope-from maxim@svn.freebsd.org) Message-Id: <201007120421.o6C4LoHD086992@svn.freebsd.org> From: Maxim Konovalov Date: Mon, 12 Jul 2010 04:21:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209926 - head/usr.sbin/mountd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 04:21:51 -0000 Author: maxim Date: Mon Jul 12 04:21:50 2010 New Revision: 209926 URL: http://svn.freebsd.org/changeset/base/209926 Log: o Fix typo: sepcify -> specify. PR: docs/148499 Submitted by: Warren Block MFC after: 1 week Modified: head/usr.sbin/mountd/exports.5 Modified: head/usr.sbin/mountd/exports.5 ============================================================================== --- head/usr.sbin/mountd/exports.5 Mon Jul 12 03:00:29 2010 (r209925) +++ head/usr.sbin/mountd/exports.5 Mon Jul 12 04:21:50 2010 (r209926) @@ -82,7 +82,7 @@ including regular files if the option is used on .Xr mountd 8 . The third form has the string ``V4:'' followed by a single absolute path -name, to sepcify the NFSv4 tree root. +name, to specify the NFSv4 tree root. The pathnames must not have any symbolic links in them and should not have any .Dq Pa \&. From owner-svn-src-all@FreeBSD.ORG Mon Jul 12 06:46:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 330361065678; Mon, 12 Jul 2010 06:46:18 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0AE3A8FC0C; Mon, 12 Jul 2010 06:46:18 +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 o6C6kHOd018661; Mon, 12 Jul 2010 06:46:17 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6C6kH2h018658; Mon, 12 Jul 2010 06:46:17 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007120646.o6C6kH2h018658@svn.freebsd.org> From: Alexander Motin Date: Mon, 12 Jul 2010 06:46:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209927 - head/sys/x86/isa X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 06:46:18 -0000 Author: mav Date: Mon Jul 12 06:46:17 2010 New Revision: 209927 URL: http://svn.freebsd.org/changeset/base/209927 Log: Instead of deleting existing IRQ resource, which is not really working for ACPI bus, find wanted IRQ rid or spare one. This should fix panic during boot on systems reporting fancy IRQ numbers for attimer and atrtc. Modified: head/sys/x86/isa/atrtc.c head/sys/x86/isa/clock.c Modified: head/sys/x86/isa/atrtc.c ============================================================================== --- head/sys/x86/isa/atrtc.c Mon Jul 12 04:21:50 2010 (r209926) +++ head/sys/x86/isa/atrtc.c Mon Jul 12 06:46:17 2010 (r209927) @@ -244,6 +244,7 @@ static int atrtc_attach(device_t dev) { struct atrtc_softc *sc; + u_long s; int i, diag; sc = device_get_softc(dev); @@ -260,7 +261,9 @@ atrtc_attach(device_t dev) (resource_int_value(device_get_name(dev), device_get_unit(dev), "clock", &i) != 0 || i != 0)) { sc->intr_rid = 0; - bus_delete_resource(dev, SYS_RES_IRQ, sc->intr_rid); + while (bus_get_resource(dev, SYS_RES_IRQ, sc->intr_rid, + &s, NULL) == 0 && s != 8) + sc->intr_rid++; if (!(sc->intr_res = bus_alloc_resource(dev, SYS_RES_IRQ, &sc->intr_rid, 8, 8, 1, RF_ACTIVE))) { device_printf(dev,"Can't map interrupt.\n"); Modified: head/sys/x86/isa/clock.c ============================================================================== --- head/sys/x86/isa/clock.c Mon Jul 12 04:21:50 2010 (r209926) +++ head/sys/x86/isa/clock.c Mon Jul 12 06:46:17 2010 (r209927) @@ -94,7 +94,8 @@ static int i8254_ticked; struct attimer_softc { int intr_en; - int intr_rid; + int port_rid, intr_rid; + struct resource *port_res; struct resource *intr_res; void *intr_handler; struct timecounter tc; @@ -523,10 +524,14 @@ static int attimer_attach(device_t dev) { struct attimer_softc *sc; + u_long s; int i; attimer_sc = sc = device_get_softc(dev); bzero(sc, sizeof(struct attimer_softc)); + if (!(sc->port_res = bus_alloc_resource(dev, SYS_RES_IOPORT, + &sc->port_rid, IO_TIMER1, IO_TIMER1 + 3, 4, RF_ACTIVE))) + device_printf(dev,"Warning: Couldn't map I/O.\n"); i8254_intsrc = intr_lookup_source(0); if (i8254_intsrc != NULL) i8254_pending = i8254_intsrc->is_pic->pic_source_pending; @@ -541,7 +546,9 @@ attimer_attach(device_t dev) if (resource_int_value(device_get_name(dev), device_get_unit(dev), "clock", &i) != 0 || i != 0) { sc->intr_rid = 0; - bus_delete_resource(dev, SYS_RES_IRQ, sc->intr_rid); + while (bus_get_resource(dev, SYS_RES_IRQ, sc->intr_rid, + &s, NULL) == 0 && s != 0) + sc->intr_rid++; if (!(sc->intr_res = bus_alloc_resource(dev, SYS_RES_IRQ, &sc->intr_rid, 0, 0, 1, RF_ACTIVE))) { device_printf(dev,"Can't map interrupt.\n"); From owner-svn-src-all@FreeBSD.ORG Mon Jul 12 07:24:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA9DD1065674; Mon, 12 Jul 2010 07:24:40 +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 DB3ED8FC0C; Mon, 12 Jul 2010 07:24:40 +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 o6C7Oekl027117; Mon, 12 Jul 2010 07:24:40 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6C7OeuT027114; Mon, 12 Jul 2010 07:24:40 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201007120724.o6C7OeuT027114@svn.freebsd.org> From: "Jayachandran C." Date: Mon, 12 Jul 2010 07:24:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209928 - head/sys/mips/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 07:24:41 -0000 Author: jchandra Date: Mon Jul 12 07:24:40 2010 New Revision: 209928 URL: http://svn.freebsd.org/changeset/base/209928 Log: Move KSEG address definitions from cpu.h to cpuregs.h with the other definitions, add some XKPHYS related definitions for n64. Reviewed by: imp Modified: head/sys/mips/include/cpu.h head/sys/mips/include/cpuregs.h Modified: head/sys/mips/include/cpu.h ============================================================================== --- head/sys/mips/include/cpu.h Mon Jul 12 06:46:17 2010 (r209927) +++ head/sys/mips/include/cpu.h Mon Jul 12 07:24:40 2010 (r209928) @@ -49,23 +49,6 @@ #include -#define MIPS_KSEG0_LARGEST_PHYS (0x20000000) -#define MIPS_PHYS_MASK (0x1fffffff) - -#define MIPS_PHYS_TO_KSEG0(x) ((uintptr_t)(x) | MIPS_KSEG0_START) -#define MIPS_PHYS_TO_KSEG1(x) ((uintptr_t)(x) | MIPS_KSEG1_START) -#define MIPS_KSEG0_TO_PHYS(x) ((uintptr_t)(x) & MIPS_PHYS_MASK) -#define MIPS_KSEG1_TO_PHYS(x) ((uintptr_t)(x) & MIPS_PHYS_MASK) - -#define MIPS_IS_KSEG0_ADDR(x) \ - (((vm_offset_t)(x) >= MIPS_KSEG0_START) && \ - ((vm_offset_t)(x) <= MIPS_KSEG0_END)) -#define MIPS_IS_KSEG1_ADDR(x) \ - (((vm_offset_t)(x) >= MIPS_KSEG1_START) && \ - ((vm_offset_t)(x) <= MIPS_KSEG1_END)) -#define MIPS_IS_VALID_PTR(x) (MIPS_IS_KSEG0_ADDR(x) || \ - MIPS_IS_KSEG1_ADDR(x)) - /* * Status register. */ Modified: head/sys/mips/include/cpuregs.h ============================================================================== --- head/sys/mips/include/cpuregs.h Mon Jul 12 06:46:17 2010 (r209927) +++ head/sys/mips/include/cpuregs.h Mon Jul 12 07:24:40 2010 (r209928) @@ -78,6 +78,9 @@ * Caching of mapped addresses is controlled by bits in the TLB entry. */ +#define MIPS_KSEG0_LARGEST_PHYS (0x20000000) +#define MIPS_PHYS_MASK (0x1fffffff) + #if !defined(_LOCORE) #define MIPS_KUSEG_START 0x00000000 #define MIPS_KSEG0_START ((intptr_t)(int32_t)0x80000000) @@ -91,7 +94,20 @@ #define MIPS_KSEG2_START MIPS_KSSEG_START #define MIPS_KSEG2_END MIPS_KSSEG_END -#endif + +#define MIPS_PHYS_TO_KSEG0(x) ((uintptr_t)(x) | MIPS_KSEG0_START) +#define MIPS_PHYS_TO_KSEG1(x) ((uintptr_t)(x) | MIPS_KSEG1_START) +#define MIPS_KSEG0_TO_PHYS(x) ((uintptr_t)(x) & MIPS_PHYS_MASK) +#define MIPS_KSEG1_TO_PHYS(x) ((uintptr_t)(x) & MIPS_PHYS_MASK) + +#define MIPS_IS_KSEG0_ADDR(x) \ + (((vm_offset_t)(x) >= MIPS_KSEG0_START) && \ + ((vm_offset_t)(x) <= MIPS_KSEG0_END)) +#define MIPS_IS_KSEG1_ADDR(x) \ + (((vm_offset_t)(x) >= MIPS_KSEG1_START) && \ + ((vm_offset_t)(x) <= MIPS_KSEG1_END)) +#define MIPS_IS_VALID_PTR(x) (MIPS_IS_KSEG0_ADDR(x) || \ + MIPS_IS_KSEG1_ADDR(x)) #define MIPS_XKPHYS_START 0x8000000000000000 #define MIPS_XKPHYS_END 0xbfffffffffffffff @@ -101,7 +117,12 @@ #define MIPS_PHYS_TO_XKPHYS(cca,x) \ ((0x2ULL << 62) | ((unsigned long long)(cca) << 59) | (x)) -#define MIPS_XKPHYS_TO_PHYS(x) ((x) & 0x07ffffffffffffffULL) +#define MIPS_PHYS_TO_XKPHYS_CACHED(x) \ + ((0x2ULL << 62) | ((unsigned long long)(MIPS_XKPHYS_CCA_CNC) << 59) | (x)) +#define MIPS_PHYS_TO_XKPHYS_UNCACHED(x) \ + ((0x2ULL << 62) | ((unsigned long long)(MIPS_XKPHYS_CCA_UC) << 59) | (x)) + +#define MIPS_XKPHYS_TO_PHYS(x) ((x) & 0x07ffffffffffffffULL) #define MIPS_XUSEG_START 0x0000000000000000 #define MIPS_XUSEG_END 0x0000010000000000 @@ -109,6 +130,8 @@ #define MIPS_XKSEG_START 0xc000000000000000 #define MIPS_XKSEG_END 0xc00000ff80000000 +#endif + /* CPU dependent mtc0 hazard hook */ #ifdef TARGET_OCTEON #define COP0_SYNC nop; nop; nop; nop; nop; From owner-svn-src-all@FreeBSD.ORG Mon Jul 12 07:42:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44840106566B; Mon, 12 Jul 2010 07:42:43 +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 3457C8FC20; Mon, 12 Jul 2010 07:42:43 +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 o6C7ghKp031050; Mon, 12 Jul 2010 07:42:43 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6C7ghOS031048; Mon, 12 Jul 2010 07:42:43 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201007120742.o6C7ghOS031048@svn.freebsd.org> From: "Jayachandran C." Date: Mon, 12 Jul 2010 07:42:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209929 - head/sys/mips/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 07:42:43 -0000 Author: jchandra Date: Mon Jul 12 07:42:42 2010 New Revision: 209929 URL: http://svn.freebsd.org/changeset/base/209929 Log: Merge jmallett@'s n64 work into HEAD 64 bit TLB definitions in pte.h Reviewed by: imp Obtained from: jmallett (http://svn.freebsd.org/base/user/jmallett/octeon) Modified: head/sys/mips/include/pte.h Modified: head/sys/mips/include/pte.h ============================================================================== --- head/sys/mips/include/pte.h Mon Jul 12 07:24:40 2010 (r209928) +++ head/sys/mips/include/pte.h Mon Jul 12 07:42:42 2010 (r209929) @@ -82,8 +82,24 @@ typedef pt_entry_t *pd_entry_t; * Note that in FreeBSD, we map 2 TLB pages is equal to 1 VM page. */ #define TLBHI_ASID_MASK (0xff) +#if defined(__mips_n64) +#define TLBHI_R_SHIFT 62 +#define TLBHI_R_USER (0x00UL << TLBHI_R_SHIFT) +#define TLBHI_R_SUPERVISOR (0x01UL << TLBHI_R_SHIFT) +#define TLBHI_R_KERNEL (0x03UL << TLBHI_R_SHIFT) +#define TLBHI_R_MASK (0x03UL << TLBHI_R_SHIFT) +#define TLBHI_VA_R(va) ((va) & TLBHI_R_MASK) +#define TLBHI_FILL_SHIFT 40 +#define TLBHI_VPN2_SHIFT (TLB_PAGE_SHIFT + 1) +#define TLBHI_VPN2_MASK (((~((1UL << TLBHI_VPN2_SHIFT) - 1)) << (63 - TLBHI_FILL_SHIFT)) >> (63 - TLBHI_FILL_SHIFT)) +#define TLBHI_VA_TO_VPN2(va) ((va) & TLBHI_VPN2_MASK) +#define TLBHI_ENTRY(va, asid) ((TLBHI_VA_R((va))) /* Region. */ | \ + (TLBHI_VA_TO_VPN2((va))) /* VPN2. */ | \ + ((asid) & TLBHI_ASID_MASK)) +#else #define TLBHI_PAGE_MASK (2 * PAGE_SIZE - 1) #define TLBHI_ENTRY(va, asid) (((va) & ~TLBHI_PAGE_MASK) | ((asid) & TLBHI_ASID_MASK)) +#endif /* * TLB flags managed in hardware: From owner-svn-src-all@FreeBSD.ORG Mon Jul 12 09:38:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 41A4D1065740; Mon, 12 Jul 2010 09:38:45 +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 2FE128FC19; Mon, 12 Jul 2010 09:38:45 +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 o6C9cjwH056587; Mon, 12 Jul 2010 09:38:45 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6C9cjWD056585; Mon, 12 Jul 2010 09:38:45 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201007120938.o6C9cjWD056585@svn.freebsd.org> From: "Jayachandran C." Date: Mon, 12 Jul 2010 09:38:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209930 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 09:38:45 -0000 Author: jchandra Date: Mon Jul 12 09:38:44 2010 New Revision: 209930 URL: http://svn.freebsd.org/changeset/base/209930 Log: Merge jmallett@'s n64 work into HEAD. Merge changes for initial n64 support in pmap.c. Use direct mapped (XKPHYS) access for a lot of operations that earlier needed temporary mapping. Add support for using XKSEG for kernel mappings. Reviewed by: imp Obtained from: jmallett (http://svn.freebsd.org/base/user/jmallett/octeon) Modified: head/sys/mips/mips/pmap.c Modified: head/sys/mips/mips/pmap.c ============================================================================== --- head/sys/mips/mips/pmap.c Mon Jul 12 07:42:42 2010 (r209929) +++ head/sys/mips/mips/pmap.c Mon Jul 12 09:38:44 2010 (r209930) @@ -128,7 +128,11 @@ __FBSDID("$FreeBSD$"); #define pmap_segshift(v) (((v) >> SEGSHIFT) & (NPDEPG - 1)) #define segtab_pde(m, v) ((m)[pmap_segshift((v))]) +#if defined(__mips_n64) +#define NUSERPGTBLS (NPDEPG) +#else #define NUSERPGTBLS (pmap_segshift(VM_MAXUSER_ADDRESS)) +#endif #define mips_segtrunc(va) ((va) & ~SEGOFSET) #define is_kernel_pmap(x) ((x) == kernel_pmap) @@ -196,6 +200,7 @@ static void pmap_ptpgzone_dtor(void *mem static void *pmap_ptpgzone_allocf(uma_zone_t, int, u_int8_t *, int); static uma_zone_t ptpgzone; +#if !defined(__mips_n64) struct local_sysmaps { vm_offset_t base; uint16_t valid1, valid2; @@ -256,6 +261,7 @@ static struct local_sysmaps sysmap_lmem[ tlb_invalidate_address(kernel_pmap, sysm->base + PAGE_SIZE); \ sysm->valid2 = 0; \ intr_restore(intr) +#endif static inline pt_entry_t * pmap_segmap(pmap_t pmap, vm_offset_t va) @@ -321,7 +327,7 @@ pmap_steal_memory(vm_size_t size) } /* - * Bootstrap the system enough to run with virtual memory. This + * Bootstrap the system enough to run with virtual memory. This * assumes that the phys_avail array has been initialized. */ void @@ -330,7 +336,9 @@ pmap_bootstrap(void) pt_entry_t *pgtab; pt_entry_t *pte; int i, j; +#if !defined(__mips_n64) int memory_larger_than_512meg = 0; +#endif /* Sort. */ again: @@ -341,14 +349,11 @@ again: phys_avail[i] = round_page(phys_avail[i]); phys_avail[i + 1] = trunc_page(phys_avail[i + 1]); - if (phys_avail[i + 1] >= MIPS_KSEG0_LARGEST_PHYS) - memory_larger_than_512meg++; if (i < 2) continue; if (phys_avail[i - 2] > phys_avail[i]) { vm_paddr_t ptemp[2]; - ptemp[0] = phys_avail[i + 0]; ptemp[1] = phys_avail[i + 1]; @@ -361,6 +366,11 @@ again: } } +#if !defined(__mips_n64) + if (phys_avail[i - 1] >= MIPS_KSEG0_LARGEST_PHYS) + memory_larger_than_512meg = 1; +#endif + /* * Copy the phys_avail[] array before we start stealing memory from it. */ @@ -395,7 +405,6 @@ again: */ kstack0 = pmap_steal_memory(KSTACK_PAGES << PAGE_SHIFT); - virtual_avail = VM_MIN_KERNEL_ADDRESS; virtual_end = VM_MAX_KERNEL_ADDRESS; @@ -419,6 +428,7 @@ again: printf("pcpu is available at virtual address %p.\n", pcpup); #endif +#if !defined(__mips_n64) /* * Steal some virtual space that will not be in kernel_segmap. This * va memory space will be used to map in kernel pages that are @@ -433,6 +443,7 @@ again: sysmap_lmem[i].valid1 = sysmap_lmem[i].valid2 = 0; } } +#endif /* * Allocate segment table for the kernel @@ -443,6 +454,7 @@ again: * Allocate second level page tables for the kernel */ nkpt = NKPT; +#if !defined(__mips_n64) if (memory_larger_than_512meg) { /* * If we have a large memory system we CANNOT afford to hit @@ -459,6 +471,7 @@ again: */ nkpt = (PAGE_SIZE / sizeof(pd_entry_t)) - (virtual_avail >> SEGSHIFT); } +#endif pgtab = (pt_entry_t *)pmap_steal_memory(PAGE_SIZE * nkpt); /* @@ -768,12 +781,24 @@ pmap_kremove(vm_offset_t va) * architectures should map the pages starting at '*virt' and * update '*virt' with the first usable address after the mapped * region. + * + * Use XKPHYS for 64 bit, and KSEG0 where possible for 32 bit. */ +#if defined(__mips_n64) +vm_offset_t +pmap_map(vm_offset_t *virt, vm_offset_t start, vm_offset_t end, int prot) +{ + return (MIPS_PHYS_TO_XKPHYS_CACHED(start)); +} +#else vm_offset_t pmap_map(vm_offset_t *virt, vm_offset_t start, vm_offset_t end, int prot) { vm_offset_t va, sva; + if (end <= MIPS_KSEG0_LARGEST_PHYS) + return (MIPS_PHYS_TO_KSEG0(start)); + va = sva = *virt; while (start < end) { pmap_kenter(va, start); @@ -783,6 +808,7 @@ pmap_map(vm_offset_t *virt, vm_offset_t *virt = va; return (sva); } +#endif /* * Add a list of wired pages to the kva @@ -2037,7 +2063,20 @@ pmap_enter_quick_locked(pmap_t pmap, vm_ /* * Make a temporary mapping for a physical address. This is only intended * to be used for panic dumps. + * + * Use XKPHYS for 64 bit, and KSEG0 where possible for 32 bit. */ +#if defined(__mips_n64) +void * +pmap_kenter_temporary(vm_paddr_t pa, int i) +{ + return ((void *)MIPS_PHYS_TO_XKPHYS_CACHED(pa)); +} +void +pmap_kenter_temporary_free(vm_paddr_t pa) +{ +} +#else void * pmap_kenter_temporary(vm_paddr_t pa, int i) { @@ -2098,6 +2137,7 @@ pmap_kenter_temporary_free(vm_paddr_t pa sysm->valid1 = 0; } } +#endif /* * Moved the code to Machine Independent @@ -2203,7 +2243,21 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm /* * pmap_zero_page zeros the specified hardware page by mapping * the page into KVM and using bzero to clear its contents. + * + * Use XKPHYS for 64 bit, and KSEG0 where possible for 32 bit. */ +#if defined (__mips_n64) +void +pmap_zero_page(vm_page_t m) +{ + vm_offset_t va; + vm_paddr_t phys = VM_PAGE_TO_PHYS(m); + + va = MIPS_PHYS_TO_XKPHYS_CACHED(phys); + bzero((caddr_t)va, PAGE_SIZE); + mips_dcache_wbinv_range(va, PAGE_SIZE); +} +#else void pmap_zero_page(vm_page_t m) { @@ -2225,13 +2279,25 @@ pmap_zero_page(vm_page_t m) PMAP_LMEM_UNMAP(); } } - +#endif /* * pmap_zero_page_area zeros the specified hardware page by mapping * the page into KVM and using bzero to clear its contents. * * off and size may not cover an area beyond a single hardware page. */ +#if defined (__mips_n64) +void +pmap_zero_page_area(vm_page_t m, int off, int size) +{ + vm_offset_t va; + vm_paddr_t phys = VM_PAGE_TO_PHYS(m); + + va = MIPS_PHYS_TO_XKPHYS_CACHED(phys); + bzero((char *)(caddr_t)va + off, size); + mips_dcache_wbinv_range(va + off, size); +} +#else void pmap_zero_page_area(vm_page_t m, int off, int size) { @@ -2252,7 +2318,20 @@ pmap_zero_page_area(vm_page_t m, int off PMAP_LMEM_UNMAP(); } } +#endif + +#if defined (__mips_n64) +void +pmap_zero_page_idle(vm_page_t m) +{ + vm_offset_t va; + vm_paddr_t phys = VM_PAGE_TO_PHYS(m); + va = MIPS_PHYS_TO_XKPHYS_CACHED(phys); + bzero((caddr_t)va, PAGE_SIZE); + mips_dcache_wbinv_range(va, PAGE_SIZE); +} +#else void pmap_zero_page_idle(vm_page_t m) { @@ -2273,13 +2352,32 @@ pmap_zero_page_idle(vm_page_t m) PMAP_LMEM_UNMAP(); } } +#endif /* * pmap_copy_page copies the specified (machine independent) * page by mapping the page into virtual memory and using * bcopy to copy the page, one machine dependent page at a * time. + * + * Use XKPHYS for 64 bit, and KSEG0 where possible for 32 bit. */ +#if defined (__mips_n64) +void +pmap_copy_page(vm_page_t src, vm_page_t dst) +{ + vm_offset_t va_src, va_dst; + vm_paddr_t phy_src = VM_PAGE_TO_PHYS(src); + vm_paddr_t phy_dst = VM_PAGE_TO_PHYS(dst); + + pmap_flush_pvcache(src); + mips_dcache_wbinv_range_index(MIPS_PHYS_TO_XKPHYS_CACHED(phy_dst), PAGE_SIZE); + va_src = MIPS_PHYS_TO_XKPHYS_CACHED(phy_src); + va_dst = MIPS_PHYS_TO_XKPHYS_CACHED(phy_dst); + bcopy((caddr_t)va_src, (caddr_t)va_dst, PAGE_SIZE); + mips_dcache_wbinv_range(va_dst, PAGE_SIZE); +} +#else void pmap_copy_page(vm_page_t src, vm_page_t dst) { @@ -2310,6 +2408,7 @@ pmap_copy_page(vm_page_t src, vm_page_t PMAP_LMEM_UNMAP(); } } +#endif /* * Returns true if the pmap's pv is one of the first @@ -2715,7 +2814,21 @@ pmap_clear_reference(vm_page_t m) * address space. Return a pointer to where it is mapped. This * routine is intended to be used for mapping device memory, * NOT real memory. + * + * Use XKPHYS uncached for 64 bit, and KSEG1 where possible for 32 bit. */ +#if defined(__mips_n64) +void * +pmap_mapdev(vm_offset_t pa, vm_size_t size) +{ + return ((void *)MIPS_PHYS_TO_XKPHYS_UNCACHED(pa)); +} + +void +pmap_unmapdev(vm_offset_t va, vm_size_t size) +{ +} +#else void * pmap_mapdev(vm_offset_t pa, vm_size_t size) { @@ -2762,6 +2875,7 @@ pmap_unmapdev(vm_offset_t va, vm_size_t pmap_kremove(tmpva); kmem_free(kernel_map, base, size); } +#endif /* * perform the pmap work for mincore @@ -3078,6 +3192,7 @@ pmap_set_modified(vm_offset_t pa) PHYS_TO_VM_PAGE(pa)->md.pv_flags |= (PV_TABLE_REF | PV_TABLE_MOD); } + /* * Routine: pmap_kextract * Function: @@ -3087,41 +3202,68 @@ pmap_set_modified(vm_offset_t pa) /* PMAP_INLINE */ vm_offset_t pmap_kextract(vm_offset_t va) { - vm_offset_t pa = 0; + int mapped; + + /* + * First, the direct-mapped regions. + */ +#if defined(__mips_n64) + if (va >= MIPS_XKPHYS_START && va < MIPS_XKPHYS_END) + return (MIPS_XKPHYS_TO_PHYS(va)); +#endif + + if (va >= MIPS_KSEG0_START && va < MIPS_KSEG0_END) + return (MIPS_KSEG0_TO_PHYS(va)); - if (va < MIPS_KSEG0_START) { - /* user virtual address */ + if (va >= MIPS_KSEG1_START && va < MIPS_KSEG1_END) + return (MIPS_KSEG1_TO_PHYS(va)); + + /* + * User virtual addresses. + */ + if (va < VM_MAXUSER_ADDRESS) { pt_entry_t *ptep; if (curproc && curproc->p_vmspace) { ptep = pmap_pte(&curproc->p_vmspace->vm_pmap, va); - if (ptep) - pa = TLBLO_PTE_TO_PA(*ptep) | - (va & PAGE_MASK); - } - } else if (va >= MIPS_KSEG0_START && - va < MIPS_KSEG1_START) - pa = MIPS_KSEG0_TO_PHYS(va); - else if (va >= MIPS_KSEG1_START && - va < MIPS_KSEG2_START) - pa = MIPS_KSEG1_TO_PHYS(va); - else if (va >= MIPS_KSEG2_START && va < VM_MAX_KERNEL_ADDRESS) { + if (ptep) { + return (TLBLO_PTE_TO_PA(*ptep) | + (va & PAGE_MASK)); + } + return (0); + } + } + + /* + * Should be kernel virtual here, otherwise fail + */ + mapped = (va >= MIPS_KSEG2_START || va < MIPS_KSEG2_END); +#if defined(__mips_n64) + mapped = mapped || (va >= MIPS_XKSEG_START || va < MIPS_XKSEG_END); +#endif + /* + * Kernel virtual. + */ + + if (mapped) { pt_entry_t *ptep; /* Is the kernel pmap initialized? */ if (kernel_pmap->pm_active) { - /* Its inside the virtual address range */ + /* It's inside the virtual address range */ ptep = pmap_pte(kernel_pmap, va); if (ptep) { return (TLBLO_PTE_TO_PA(*ptep) | (va & PAGE_MASK)); } - return (0); } + return (0); } - return pa; + + panic("%s for unknown address space %p.", __func__, (void *)va); } + void pmap_flush_pvcache(vm_page_t m) { From owner-svn-src-all@FreeBSD.ORG Mon Jul 12 09:42:05 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F37B106568C; Mon, 12 Jul 2010 09:42:05 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail08.syd.optusnet.com.au (mail08.syd.optusnet.com.au [211.29.132.189]) by mx1.freebsd.org (Postfix) with ESMTP id 012D38FC0A; Mon, 12 Jul 2010 09:42:04 +0000 (UTC) Received: from c122-106-145-25.carlnfd1.nsw.optusnet.com.au (c122-106-145-25.carlnfd1.nsw.optusnet.com.au [122.106.145.25]) by mail08.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o6C9g1ra007453 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 12 Jul 2010 19:42:02 +1000 Date: Mon, 12 Jul 2010 19:42:01 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: "Jayachandran C." In-Reply-To: <201007120724.o6C7OeuT027114@svn.freebsd.org> Message-ID: <20100712185429.B61886@delplex.bde.org> References: <201007120724.o6C7OeuT027114@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r209928 - head/sys/mips/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 09:42:05 -0000 On Mon, 12 Jul 2010, Jayachandran C. wrote: > Log: > Move KSEG address definitions from cpu.h to cpuregs.h with the other > definitions, add some XKPHYS related definitions for n64. This is a good start to cleaning up mips cpu.h. but far from complete. cpu.h is for MD implementations of a few (about 10) MI interfaces. Most cpu.h's are about 2K long but the mips one is about 17K. The arm one is the smallest, partly because it is missing a copyright, but it still consists about half of things that shouldn't be in it. The amd64 one is the most correct. The only bugs in it are: - lots of namespace pollution via nested includes. Unfortunately a couple of things in the nested includes are needed to implement the macros in this file. - COPY_SIGCODE is defined, but seems to have never been used in FreeBSD. 4.4BSD had it in all cpu.h's and may even have used it in its execve(), but FreeBSD only has it in a few cpu.h's and has no references to it in any other source file at any time. - cpu_halt() and cpu_reset() have a MI interface and don't need to be implemented as a macro, so they should be declared in an MI place. Perhaps similarly for some other cpu_*() functions. cpu_excec() and cpu_swapin() are now empty macros for amd64, but they could be empty functions. - fork_trampoline() is are declared, but is not used by MI code (but is referred to in comments in MI code). - swi_vm(): like cpu*_() but more MI. Only missing busdma support for some archines makes it MD. It is a callback function and cannot be a macro since its address is taken so that it can be called back to. amd64 cpu.h ends up with definitions or declarations for: - 3 things that need to be there - 7 things that don't need to be there, but can reasonably be there - 2 things that shouldn't be there - 2 things that really shouldn't be there - 1 thing that shouldn't be anywhere - uncounted namespace pollution from the nested includes. Bruce From owner-svn-src-all@FreeBSD.ORG Mon Jul 12 10:11:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ABDA3106566B; Mon, 12 Jul 2010 10:11:10 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 815F88FC1C; Mon, 12 Jul 2010 10:11:10 +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 o6CABA1w065236; Mon, 12 Jul 2010 10:11:10 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6CABAng065234; Mon, 12 Jul 2010 10:11:10 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201007121011.o6CABAng065234@svn.freebsd.org> From: Attilio Rao Date: Mon, 12 Jul 2010 10:11:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209931 - stable/8/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 10:11:10 -0000 Author: attilio Date: Mon Jul 12 10:11:10 2010 New Revision: 209931 URL: http://svn.freebsd.org/changeset/base/209931 Log: MFC r209577, r209761: - Fix a lock leak in case the ticks wrapped up - Simplify the logic for handling ticks wrap-ups - Fix a bug where a thread may be in sleepign state but not on a sleepqueue chain still. Sponsored by: Sandvine Incorporated Modified: stable/8/sys/kern/kern_clock.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/kern/kern_clock.c ============================================================================== --- stable/8/sys/kern/kern_clock.c Mon Jul 12 09:38:44 2010 (r209930) +++ stable/8/sys/kern/kern_clock.c Mon Jul 12 10:11:10 2010 (r209931) @@ -202,8 +202,14 @@ deadlkres(void) FOREACH_PROC_IN_SYSTEM(p) { PROC_LOCK(p); FOREACH_THREAD_IN_PROC(p, td) { + + /* + * Once a thread is found in "interesting" + * state a possible ticks wrap-up needs to be + * checked. + */ thread_lock(td); - if (TD_ON_LOCK(td)) { + if (TD_ON_LOCK(td) && ticks < td->td_blktick) { /* * The thread should be blocked on a @@ -212,9 +218,6 @@ deadlkres(void) */ MPASS(td->td_blocked != NULL); - /* Handle ticks wrap-up. */ - if (ticks < td->td_blktick) - continue; tticks = ticks - td->td_blktick; thread_unlock(td); if (tticks > blkticks) { @@ -230,11 +233,9 @@ deadlkres(void) panic("%s: possible deadlock detected for %p, blocked for %d ticks\n", __func__, td, tticks); } - } else if (TD_IS_SLEEPING(td)) { - - /* Handle ticks wrap-up. */ - if (ticks < td->td_blktick) - continue; + } else if (TD_IS_SLEEPING(td) && + TD_ON_SLEEPQ(td) && + ticks < td->td_blktick) { /* * Check if the thread is sleeping on a From owner-svn-src-all@FreeBSD.ORG Mon Jul 12 10:14:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37F13106564A; Mon, 12 Jul 2010 10:14:25 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2772A8FC16; Mon, 12 Jul 2010 10:14:25 +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 o6CAEPDK065970; Mon, 12 Jul 2010 10:14:25 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6CAEP49065968; Mon, 12 Jul 2010 10:14:25 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201007121014.o6CAEP49065968@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 12 Jul 2010 10:14:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209932 - head/lib/libc/compat-43 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 10:14:25 -0000 Author: kib Date: Mon Jul 12 10:14:24 2010 New Revision: 209932 URL: http://svn.freebsd.org/changeset/base/209932 Log: For xsi_sigpause(3), remove the supplied signal from the process mask during sigpause(2) call. It was backward. Check that the signal number is valid. Reported by: Garrett Cooper MFC after: 1 week Modified: head/lib/libc/compat-43/sigcompat.c Modified: head/lib/libc/compat-43/sigcompat.c ============================================================================== --- head/lib/libc/compat-43/sigcompat.c Mon Jul 12 10:11:10 2010 (r209931) +++ head/lib/libc/compat-43/sigcompat.c Mon Jul 12 10:14:24 2010 (r209932) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include "namespace.h" #include +#include #include #include #include "un-namespace.h" @@ -111,9 +112,16 @@ int xsi_sigpause(int sig) { sigset_t set; + int error; - sigemptyset(&set); - sigaddset(&set, sig); + if (!_SIG_VALID(sig)) { + errno = EINVAL; + return (-1); + } + error = _sigprocmask(SIG_BLOCK, NULL, &set); + if (error != 0) + return (error); + sigdelset(&set, sig); return (_sigsuspend(&set)); } From owner-svn-src-all@FreeBSD.ORG Mon Jul 12 10:15:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 53C69106564A; Mon, 12 Jul 2010 10:15:34 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4394D8FC15; Mon, 12 Jul 2010 10:15:34 +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 o6CAFYNm066275; Mon, 12 Jul 2010 10:15:34 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6CAFYBo066273; Mon, 12 Jul 2010 10:15:34 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201007121015.o6CAFYBo066273@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 12 Jul 2010 10:15:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209933 - head/lib/libthr/thread X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 10:15:34 -0000 Author: kib Date: Mon Jul 12 10:15:33 2010 New Revision: 209933 URL: http://svn.freebsd.org/changeset/base/209933 Log: Use _SIG_VALID instead of expanded form of the macro. Submitted by: Garrett Cooper MFC after: 1 week Modified: head/lib/libthr/thread/thr_sig.c Modified: head/lib/libthr/thread/thr_sig.c ============================================================================== --- head/lib/libthr/thread/thr_sig.c Mon Jul 12 10:14:24 2010 (r209932) +++ head/lib/libthr/thread/thr_sig.c Mon Jul 12 10:15:33 2010 (r209933) @@ -194,7 +194,7 @@ int _sigaction(int sig, const struct sigaction * act, struct sigaction * oact) { /* Check if the signal number is out of range: */ - if (sig < 1 || sig > _SIG_MAXSIG || sig == SIGCANCEL) { + if (!_SIG_VALID(sig) || sig == SIGCANCEL) { /* Return an invalid argument: */ errno = EINVAL; return (-1); From owner-svn-src-all@FreeBSD.ORG Mon Jul 12 10:18:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2DD0106566C; Mon, 12 Jul 2010 10:18:10 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C2D408FC17; Mon, 12 Jul 2010 10:18:10 +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 o6CAIAum066865; Mon, 12 Jul 2010 10:18:10 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6CAIAwQ066863; Mon, 12 Jul 2010 10:18:10 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201007121018.o6CAIAwQ066863@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 12 Jul 2010 10:18:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209934 - head/sys/ddb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 10:18:11 -0000 Author: kib Date: Mon Jul 12 10:18:10 2010 New Revision: 209934 URL: http://svn.freebsd.org/changeset/base/209934 Log: One more use for _SIG_VALID. Submitted by: Garrett Cooper MFC after: 1 week Modified: head/sys/ddb/db_command.c Modified: head/sys/ddb/db_command.c ============================================================================== --- head/sys/ddb/db_command.c Mon Jul 12 10:15:33 2010 (r209933) +++ head/sys/ddb/db_command.c Mon Jul 12 10:18:10 2010 (r209934) @@ -633,7 +633,7 @@ db_kill(dummy1, dummy2, dummy3, dummy4) if (!db_expression(&pid)) DB_ERROR(("Missing process ID\n")); db_skip_to_eol(); - if (sig < 1 || sig > _SIG_MAXSIG) + if (!_SIG_VALID(sig)) DB_ERROR(("Signal number out of range\n")); /* From owner-svn-src-all@FreeBSD.ORG Mon Jul 12 10:22:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 469691065673; Mon, 12 Jul 2010 10:22:59 +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 1C8078FC15; Mon, 12 Jul 2010 10:22:59 +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 o6CAMxd1067970; Mon, 12 Jul 2010 10:22:59 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6CAMwXx067967; Mon, 12 Jul 2010 10:22:58 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201007121022.o6CAMwXx067967@svn.freebsd.org> From: "Jayachandran C." Date: Mon, 12 Jul 2010 10:22:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209935 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 10:22:59 -0000 Author: jchandra Date: Mon Jul 12 10:22:58 2010 New Revision: 209935 URL: http://svn.freebsd.org/changeset/base/209935 Log: Merge jmallett@'s n64 work into HEAD Initial set of ddb changes to support n64 Reviewed by: imp Obtained from: jmallett (http://svn.freebsd.org/base/user/jmallett/octeon) Modified: head/sys/mips/mips/db_interface.c head/sys/mips/mips/db_trace.c Modified: head/sys/mips/mips/db_interface.c ============================================================================== --- head/sys/mips/mips/db_interface.c Mon Jul 12 10:18:10 2010 (r209934) +++ head/sys/mips/mips/db_interface.c Mon Jul 12 10:22:58 2010 (r209935) @@ -115,12 +115,12 @@ int (*do_db_log_stack_trace_cmd)(char *) static int db_frame(struct db_variable *vp, db_expr_t *valuep, int op) { - int *reg; + register_t *reg; if (kdb_frame == NULL) return (0); - reg = (int *)((uintptr_t)kdb_frame + (db_expr_t)vp->valuep); + reg = (register_t *)((uintptr_t)kdb_frame + (size_t)(intptr_t)vp->valuep); if (op == DB_VAR_GET) *valuep = *reg; else Modified: head/sys/mips/mips/db_trace.c ============================================================================== --- head/sys/mips/mips/db_trace.c Mon Jul 12 10:18:10 2010 (r209934) +++ head/sys/mips/mips/db_trace.c Mon Jul 12 10:22:58 2010 (r209935) @@ -140,7 +140,7 @@ loop: } /* check for bad SP: could foul up next frame */ /*XXX MIPS64 bad: this hard-coded SP is lame */ - if (sp & 3 || sp < 0x80000000) { + if (sp & 3 || (uintptr_t)sp < 0x80000000u) { (*printfn) ("SP 0x%x: not in kernel\n", sp); ra = 0; subr = 0; @@ -377,7 +377,7 @@ db_md_set_watchpoint(db_expr_t addr, db_ int -db_md_clr_watchpoint( db_expr_t addr, db_expr_t size) +db_md_clr_watchpoint(db_expr_t addr, db_expr_t size) { return(0); @@ -403,8 +403,8 @@ db_trace_thread(struct thread *thr, int struct pcb *ctx; if (thr == curthread) { - sp = (register_t)__builtin_frame_address(0); - ra = (register_t)__builtin_return_address(0); + sp = (register_t)(intptr_t)__builtin_frame_address(0); + ra = (register_t)(intptr_t)__builtin_return_address(0); __asm __volatile( "jal 99f\n" From owner-svn-src-all@FreeBSD.ORG Mon Jul 12 12:16:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC24F106566C; Mon, 12 Jul 2010 12:16:11 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BBE578FC18; Mon, 12 Jul 2010 12:16:11 +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 o6CCGBeu093325; Mon, 12 Jul 2010 12:16:11 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6CCGBb6093324; Mon, 12 Jul 2010 12:16:11 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007121216.o6CCGBb6093324@svn.freebsd.org> From: Alexander Motin Date: Mon, 12 Jul 2010 12:16:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209944 - head/sys/dev/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 12:16:12 -0000 Author: mav Date: Mon Jul 12 12:16:11 2010 New Revision: 209944 URL: http://svn.freebsd.org/changeset/base/209944 Log: Revert and remake r209883: Do not grab lock while setting up interrupt, as it causes LOR with allocation code. Instead make interrupt handler check that CAM bus initialization completed before touching it. While there, slightly improve attach errors handling. Reported by: kib Modified: head/sys/dev/ata/ata-all.c Modified: head/sys/dev/ata/ata-all.c ============================================================================== --- head/sys/dev/ata/ata-all.c Mon Jul 12 11:31:13 2010 (r209943) +++ head/sys/dev/ata/ata-all.c Mon Jul 12 12:16:11 2010 (r209944) @@ -185,29 +185,28 @@ ata_attach(device_t dev) if (ch->dma.alloc) ch->dma.alloc(dev); - mtx_lock(&ch->state_mtx); /* setup interrupt delivery */ rid = ATA_IRQ_RID; ch->r_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_SHAREABLE | RF_ACTIVE); if (!ch->r_irq) { device_printf(dev, "unable to allocate interrupt\n"); - mtx_unlock(&ch->state_mtx); return ENXIO; } if ((error = bus_setup_intr(dev, ch->r_irq, ATA_INTR_FLAGS, NULL, ata_interrupt, ch, &ch->ih))) { + bus_release_resource(dev, SYS_RES_IRQ, rid, ch->r_irq); device_printf(dev, "unable to setup interrupt\n"); - goto err1; + return error; } #ifndef ATA_CAM - mtx_unlock(&ch->state_mtx); /* probe and attach devices on this channel unless we are in early boot */ if (!ata_delayed_attach) ata_identify(dev); return (0); #else + mtx_lock(&ch->state_mtx); /* Create the device queue for our SIM. */ devq = cam_simq_alloc(1); if (devq == NULL) { @@ -220,8 +219,9 @@ ata_attach(device_t dev) device_get_unit(dev), &ch->state_mtx, 1, 0, devq); if (ch->sim == NULL) { device_printf(dev, "unable to allocate sim\n"); + cam_simq_free(devq); error = ENOMEM; - goto err2; + goto err1; } if (xpt_bus_register(ch->sim, dev, 0) != CAM_SUCCESS) { device_printf(dev, "unable to register xpt bus\n"); @@ -241,11 +241,12 @@ err3: xpt_bus_deregister(cam_sim_path(ch->sim)); err2: cam_sim_free(ch->sim, /*free_devq*/TRUE); -#endif + ch->sim = NULL; err1: - bus_release_resource(dev, SYS_RES_IRQ, ATA_IRQ_RID, ch->r_irq); + bus_release_resource(dev, SYS_RES_IRQ, rid, ch->r_irq); mtx_unlock(&ch->state_mtx); return (error); +#endif } int @@ -283,6 +284,7 @@ ata_detach(device_t dev) xpt_free_path(ch->path); xpt_bus_deregister(cam_sim_path(ch->sim)); cam_sim_free(ch->sim, /*free_devq*/TRUE); + ch->sim = NULL; mtx_unlock(&ch->state_mtx); #endif @@ -309,9 +311,12 @@ ata_conn_event(void *context, int dummy) union ccb *ccb; mtx_lock(&ch->state_mtx); + if (ch->sim == NULL) { + mtx_unlock(&ch->state_mtx); + return; + } ata_reinit(dev); - mtx_unlock(&ch->state_mtx); - if ((ccb = xpt_alloc_ccb()) == NULL) + if ((ccb = xpt_alloc_ccb_nowait()) == NULL) return; if (xpt_create_path(&ccb->ccb_h.path, NULL, cam_sim_path(ch->sim), @@ -320,6 +325,7 @@ ata_conn_event(void *context, int dummy) return; } xpt_rescan(ccb); + mtx_unlock(&ch->state_mtx); #else ata_reinit(dev); #endif From owner-svn-src-all@FreeBSD.ORG Mon Jul 12 12:21:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 769601065670; Mon, 12 Jul 2010 12:21:40 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 48E2F8FC1C; Mon, 12 Jul 2010 12:21:40 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id CA29946B8A; Mon, 12 Jul 2010 08:21:39 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id CCC2C8A03C; Mon, 12 Jul 2010 08:21:38 -0400 (EDT) From: John Baldwin To: Alexander Motin Date: Mon, 12 Jul 2010 08:13:19 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20100217; KDE/4.4.5; amd64; ; ) References: <201007111647.o6BGlk0O033551@svn.freebsd.org> In-Reply-To: <201007111647.o6BGlk0O033551@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201007120813.19223.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 12 Jul 2010 08:21:38 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r209900 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 12:21:40 -0000 On Sunday, July 11, 2010 12:47:46 pm Alexander Motin wrote: > Author: mav > Date: Sun Jul 11 16:47:45 2010 > New Revision: 209900 > URL: http://svn.freebsd.org/changeset/base/209900 > > Log: > Remove interval validation from cpu_tick_calibrate(). As I found, check > was needed at preliminary version of the patch, where number of CPU ticks > was divided strictly on 16 seconds. Final code instead uses real interval > duration, so precise interval should not be important. Same time aliasing > issues around second boundary causes false positives, periodically logging > useless "t_delta ... too long/short" messages when HZ set below 256. Hmm, did you ask phk@ about this? I notice that the printfs only trigger if you have bootverbose enabled, so they were not affecting normal users as most people do not run their systems with bootverbose enabled. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Jul 12 12:50:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 286291065678; Mon, 12 Jul 2010 12:50:37 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 1978D8FC1E; Mon, 12 Jul 2010 12:50:35 +0000 (UTC) Received: by bwz12 with SMTP id 12so2824779bwz.13 for ; Mon, 12 Jul 2010 05:50:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=XvmvLg82hu/t9tSb96NZqo4pfyMRT+uC3WN90NAO75E=; b=TuXGMbxkcLyzOY4mRjWtkwjH6yJVGEZFP/UGZQ+YXA0j96a93TPmqnZfekrorjiG1Q bUjlQnxfyuNjAAt7E6MmAB7pxAC9rUqPQgRpfV0mIyvtwdvKHghQQjcA0gKL0FGiaaJc sOKRoU/EFds3RbVxGoC6Z6vQrJkYxY1+SlI0g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=uUSjVeEosZtBCTfbi4hgiEgOV2Gmf0At0lAYqtd8LhxvaThdvBq+OIUVed5rfjk93S zPPamg58g6BrlqpewmCFFpKb1I7xsHqFn+aVnHUXbMvUO/ggWJq1KOCKL01StcEyJ6ZK dNjBEBKTM+2mKOAc1PaqPUXr2qTc4WLhUYxEI= Received: by 10.204.84.17 with SMTP id h17mr2146460bkl.101.1278939034504; Mon, 12 Jul 2010 05:50:34 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id g11sm18388636bkw.10.2010.07.12.05.50.33 (version=SSLv3 cipher=RC4-MD5); Mon, 12 Jul 2010 05:50:33 -0700 (PDT) Sender: Alexander Motin Message-ID: <4C3B0F63.6000905@FreeBSD.org> Date: Mon, 12 Jul 2010 15:49:39 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: John Baldwin References: <201007111647.o6BGlk0O033551@svn.freebsd.org> <201007120813.19223.jhb@freebsd.org> In-Reply-To: <201007120813.19223.jhb@freebsd.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r209900 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 12:50:37 -0000 John Baldwin wrote: > On Sunday, July 11, 2010 12:47:46 pm Alexander Motin wrote: >> Author: mav >> Date: Sun Jul 11 16:47:45 2010 >> New Revision: 209900 >> URL: http://svn.freebsd.org/changeset/base/209900 >> >> Log: >> Remove interval validation from cpu_tick_calibrate(). As I found, check >> was needed at preliminary version of the patch, where number of CPU ticks >> was divided strictly on 16 seconds. Final code instead uses real interval >> duration, so precise interval should not be important. Same time aliasing >> issues around second boundary causes false positives, periodically logging >> useless "t_delta ... too long/short" messages when HZ set below 256. > > Hmm, did you ask phk@ about this? Yes. He agreed that code should be reconsidered. > I notice that the printfs only trigger if > you have bootverbose enabled, so they were not affecting normal users as most > people do not run their systems with bootverbose enabled. Yes, but they produce major part of kernel messages on my own systems. I've got tired seeing them for years. It would be fine if they were usable, but, as I have told here and on current@, with preset implementation they were absolutely meaningless. -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Mon Jul 12 13:38:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8BD2A1065672; Mon, 12 Jul 2010 13:38:26 +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 61E398FC08; Mon, 12 Jul 2010 13:38:26 +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 o6CDcQFg011531; Mon, 12 Jul 2010 13:38:26 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6CDcQZE011529; Mon, 12 Jul 2010 13:38:26 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201007121338.o6CDcQZE011529@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 12 Jul 2010 13:38:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209945 - head/sys/powerpc/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 13:38:26 -0000 Author: nwhitehorn Date: Mon Jul 12 13:38:26 2010 New Revision: 209945 URL: http://svn.freebsd.org/changeset/base/209945 Log: MFppc64: Provide ELF definitions for 64-bit PowerPC. This unbreaks the powerpc loader build. Modified: head/sys/powerpc/include/elf.h Modified: head/sys/powerpc/include/elf.h ============================================================================== --- head/sys/powerpc/include/elf.h Mon Jul 12 12:16:11 2010 (r209944) +++ head/sys/powerpc/include/elf.h Mon Jul 12 13:38:26 2010 (r209945) @@ -36,14 +36,26 @@ * [ppc-eabi-1995-01.pdf] for details. */ -#include /* Definitions common to all 32 bit architectures. */ - +#ifndef __ELF_WORD_SIZE +#ifdef __powerpc64__ +#define __ELF_WORD_SIZE 64 /* Used by */ +#else #define __ELF_WORD_SIZE 32 /* Used by */ +#endif +#endif + +#include /* Definitions common to all 32 bit architectures. */ +#include /* Definitions common to all 64 bit architectures. */ #include +#if __ELF_WORD_SIZE == 64 +#define ELF_ARCH EM_PPC64 +#define ELF_MACHINE_OK(x) ((x) == EM_PPC64) +#else #define ELF_ARCH EM_PPC - +#define ELF_ARCH32 EM_PPC #define ELF_MACHINE_OK(x) ((x) == EM_PPC) +#endif /* * Auxiliary vector entries for passing information to the interpreter. @@ -61,6 +73,15 @@ typedef struct { /* Auxiliary vector ent } a_un; } Elf32_Auxinfo; +typedef struct { /* Auxiliary vector entry on initial stack */ + long a_type; /* Entry type. */ + union { + long a_val; /* Integer value. */ + void *a_ptr; /* Address. */ + void (*a_fcn)(void); /* Function pointer (not used). */ + } a_un; +} Elf64_Auxinfo; + __ElfType(Auxinfo); /* Values for a_type. */ @@ -91,10 +112,17 @@ __ElfType(Auxinfo); #define R_PPC_EMB_COUNT (R_PPC_EMB_RELSDA - R_PPC_EMB_NADDR32 + 1) /* Define "machine" characteristics */ +#if __ELF_WORD_SIZE == 64 +#define ELF_TARG_CLASS ELFCLASS64 +#define ELF_TARG_DATA ELFDATA2MSB +#define ELF_TARG_MACH EM_PPC64 +#define ELF_TARG_VER 1 +#else #define ELF_TARG_CLASS ELFCLASS32 #define ELF_TARG_DATA ELFDATA2MSB #define ELF_TARG_MACH EM_PPC #define ELF_TARG_VER 1 +#endif #define ET_DYN_LOAD_ADDR 0x01010000 From owner-svn-src-all@FreeBSD.ORG Mon Jul 12 14:19:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4DC74106564A; Mon, 12 Jul 2010 14:19:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3DCF48FC28; Mon, 12 Jul 2010 14:19:24 +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 o6CEJNQR020600; Mon, 12 Jul 2010 14:19:23 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6CEJNr5020598; Mon, 12 Jul 2010 14:19:23 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201007121419.o6CEJNr5020598@svn.freebsd.org> From: John Baldwin Date: Mon, 12 Jul 2010 14:19:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209946 - head/sys/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 14:19:24 -0000 Author: jhb Date: Mon Jul 12 14:19:23 2010 New Revision: 209946 URL: http://svn.freebsd.org/changeset/base/209946 Log: - Add missing locking around flushing of an NFS node's attribute cache in the NMODIFIED case of nfs_open(). - Cosmetic tweak to simplify an expression in nfs_lookup(). Reviewed by: rmacklem, bde MFC after: 1 week Modified: head/sys/nfsclient/nfs_vnops.c Modified: head/sys/nfsclient/nfs_vnops.c ============================================================================== --- head/sys/nfsclient/nfs_vnops.c Mon Jul 12 13:38:26 2010 (r209945) +++ head/sys/nfsclient/nfs_vnops.c Mon Jul 12 14:19:23 2010 (r209946) @@ -525,10 +525,12 @@ nfs_open(struct vop_open_args *ap) error = nfs_vinvalbuf(vp, V_SAVE, ap->a_td, 1); if (error == EINTR || error == EIO) return (error); + mtx_lock(&np->n_mtx); np->n_attrstamp = 0; KDTRACE_NFS_ATTRCACHE_FLUSH_DONE(vp); if (vp->v_type == VDIR) np->n_direofoffset = 0; + mtx_unlock(&np->n_mtx); error = VOP_GETATTR(vp, &vattr, ap->a_cred); if (error) return (error); @@ -970,8 +972,8 @@ nfs_lookup(struct vop_lookup_args *ap) */ newvp = *vpp; newnp = VTONFS(newvp); - if ((cnp->cn_flags & (ISLASTCN | ISOPEN)) == - (ISLASTCN | ISOPEN) && !(newnp->n_flag & NMODIFIED)) { + if ((flags & (ISLASTCN | ISOPEN)) == (ISLASTCN | ISOPEN) && + !(newnp->n_flag & NMODIFIED)) { mtx_lock(&newnp->n_mtx); newnp->n_attrstamp = 0; KDTRACE_NFS_ATTRCACHE_FLUSH_DONE(newvp); From owner-svn-src-all@FreeBSD.ORG Mon Jul 12 14:24:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F38E1065672; Mon, 12 Jul 2010 14:24:21 +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 1DE758FC15; Mon, 12 Jul 2010 14:24:21 +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 o6CEOKhm021753; Mon, 12 Jul 2010 14:24:20 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6CEOKY7021751; Mon, 12 Jul 2010 14:24:20 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201007121424.o6CEOKY7021751@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 12 Jul 2010 14:24:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209947 - stable/8/sys/powerpc/aim X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 14:24:21 -0000 Author: nwhitehorn Date: Mon Jul 12 14:24:20 2010 New Revision: 209947 URL: http://svn.freebsd.org/changeset/base/209947 Log: MFC r209853: The number after 2 is 3, not 4. Modified: stable/8/sys/powerpc/aim/platform_chrp.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/powerpc/aim/platform_chrp.c ============================================================================== --- stable/8/sys/powerpc/aim/platform_chrp.c Mon Jul 12 14:19:23 2010 (r209946) +++ stable/8/sys/powerpc/aim/platform_chrp.c Mon Jul 12 14:24:20 2010 (r209947) @@ -241,7 +241,7 @@ chrp_smp_start_cpu(platform_t plat, stru case 2: reset += 0x0f; break; - case 4: + case 3: reset += 0x10; break; default: From owner-svn-src-all@FreeBSD.ORG Mon Jul 12 14:27:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D1441065674; Mon, 12 Jul 2010 14:27:51 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F0E288FC1C; Mon, 12 Jul 2010 14:27: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 o6CERn2u022552; Mon, 12 Jul 2010 14:27:49 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6CERnOJ022550; Mon, 12 Jul 2010 14:27:49 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201007121427.o6CERnOJ022550@svn.freebsd.org> From: John Baldwin Date: Mon, 12 Jul 2010 14:27:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209948 - head/sys/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 14:27:51 -0000 Author: jhb Date: Mon Jul 12 14:27:49 2010 New Revision: 209948 URL: http://svn.freebsd.org/changeset/base/209948 Log: A previous change moved the GETATTR RPC for open() calls that hit in the name cache up into nfs_lookup() instead of nfs_open(). Continue this trend by flushing the attribute cache for leaf nodes in nfs_lookup() during an open() if we do a LOOKUP RPC. For NFSv3 this should generally be a NOP as the attributes are flushed before fetching the post-op attributes from the LOOKUP RPC which most (all?) NFSv3 servers provide, so the post-op attributes should populate the cache. Now all NFS open() calls will always clear the cached attributes during the nfs_lookup() prior to nfs_open() in the !NMODIFIED case to provide CTOC. As a result, we can remove the conditional flushing of the attribute cache from nfs_open(). Reviewed by: rmacklem, bde MFC after: 2 weeks Modified: head/sys/nfsclient/nfs_vnops.c Modified: head/sys/nfsclient/nfs_vnops.c ============================================================================== --- head/sys/nfsclient/nfs_vnops.c Mon Jul 12 14:24:20 2010 (r209947) +++ head/sys/nfsclient/nfs_vnops.c Mon Jul 12 14:27:49 2010 (r209948) @@ -538,15 +538,6 @@ nfs_open(struct vop_open_args *ap) np->n_mtime = vattr.va_mtime; mtx_unlock(&np->n_mtx); } else { - struct thread *td = curthread; - - if (np->n_ac_ts_syscalls != td->td_syscalls || - np->n_ac_ts_tid != td->td_tid || - td->td_proc == NULL || - np->n_ac_ts_pid != td->td_proc->p_pid) { - np->n_attrstamp = 0; - KDTRACE_NFS_ATTRCACHE_FLUSH_DONE(vp); - } mtx_unlock(&np->n_mtx); error = VOP_GETATTR(vp, &vattr, ap->a_cred); if (error) @@ -1123,6 +1114,20 @@ nfs_lookup(struct vop_lookup_args *ap) return (error); } newvp = NFSTOV(np); + + /* + * Flush the attribute cache when opening a leaf node + * to ensure that fresh attributes are fetched in + * nfs_open() if we are unable to fetch attributes + * from the LOOKUP reply. + */ + if ((flags & (ISLASTCN | ISOPEN)) == (ISLASTCN | ISOPEN) && + !(np->n_flag & NMODIFIED)) { + mtx_lock(&np->n_mtx); + np->n_attrstamp = 0; + KDTRACE_NFS_ATTRCACHE_FLUSH_DONE(newvp); + mtx_unlock(&np->n_mtx); + } } if (v3) { nfsm_postop_attr(newvp, attrflag); From owner-svn-src-all@FreeBSD.ORG Mon Jul 12 15:08:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B74671065672; Mon, 12 Jul 2010 15:08:28 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 883A48FC0A; Mon, 12 Jul 2010 15:08:28 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 264F746B89; Mon, 12 Jul 2010 11:08:28 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 53DB88A03C; Mon, 12 Jul 2010 11:08:27 -0400 (EDT) From: John Baldwin To: Alexander Motin Date: Mon, 12 Jul 2010 10:03:09 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20100217; KDE/4.4.5; amd64; ; ) References: <201007111647.o6BGlk0O033551@svn.freebsd.org> <201007120813.19223.jhb@freebsd.org> <4C3B0F63.6000905@FreeBSD.org> In-Reply-To: <4C3B0F63.6000905@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201007121003.09749.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 12 Jul 2010 11:08:27 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r209900 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 15:08:28 -0000 On Monday, July 12, 2010 8:49:39 am Alexander Motin wrote: > John Baldwin wrote: > > On Sunday, July 11, 2010 12:47:46 pm Alexander Motin wrote: > >> Author: mav > >> Date: Sun Jul 11 16:47:45 2010 > >> New Revision: 209900 > >> URL: http://svn.freebsd.org/changeset/base/209900 > >> > >> Log: > >> Remove interval validation from cpu_tick_calibrate(). As I found, check > >> was needed at preliminary version of the patch, where number of CPU ticks > >> was divided strictly on 16 seconds. Final code instead uses real interval > >> duration, so precise interval should not be important. Same time aliasing > >> issues around second boundary causes false positives, periodically logging > >> useless "t_delta ... too long/short" messages when HZ set below 256. > > > > Hmm, did you ask phk@ about this? > > Yes. He agreed that code should be reconsidered. Ah, ok. I didn't recall any replies on the list. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Jul 12 15:08:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9ECCF106597A; Mon, 12 Jul 2010 15:08:46 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id DD3848FC18; Mon, 12 Jul 2010 15:08:42 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 902FB46B8A; Mon, 12 Jul 2010 11:08:42 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id D4D708A050; Mon, 12 Jul 2010 11:08:41 -0400 (EDT) From: John Baldwin To: src-committers@freebsd.org Date: Mon, 12 Jul 2010 11:08:12 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20100217; KDE/4.4.5; amd64; ; ) References: <201007121427.o6CERnOJ022550@svn.freebsd.org> In-Reply-To: <201007121427.o6CERnOJ022550@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201007121108.12564.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 12 Jul 2010 11:08:41 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r209948 - head/sys/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 15:08:46 -0000 On Monday, July 12, 2010 10:27:49 am John Baldwin wrote: > Author: jhb > Date: Mon Jul 12 14:27:49 2010 > New Revision: 209948 > URL: http://svn.freebsd.org/changeset/base/209948 > > Log: > A previous change moved the GETATTR RPC for open() calls that hit in the > name cache up into nfs_lookup() instead of nfs_open(). Continue this > trend by flushing the attribute cache for leaf nodes in nfs_lookup() during > an open() if we do a LOOKUP RPC. For NFSv3 this should generally be a NOP > as the attributes are flushed before fetching the post-op attributes from > the LOOKUP RPC which most (all?) NFSv3 servers provide, so the post-op > attributes should populate the cache. > > Now all NFS open() calls will always clear the cached attributes during the > nfs_lookup() prior to nfs_open() in the !NMODIFIED case to provide CTOC. > As a result, we can remove the conditional flushing of the attribute > cache from nfs_open(). One benefit is that we can now remove td_syscalls which added extra overhead to each system call. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Jul 12 15:32:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 867D7106566B; Mon, 12 Jul 2010 15:32:46 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0A9E28FC0A; Mon, 12 Jul 2010 15:32: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 o6CFWjAs037096; Mon, 12 Jul 2010 15:32:45 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6CFWjPS037093; Mon, 12 Jul 2010 15:32:45 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007121532.o6CFWjPS037093@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 12 Jul 2010 15:32:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209949 - in head: lib/libstand sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 15:32:46 -0000 Author: jkim Date: Mon Jul 12 15:32:45 2010 New Revision: 209949 URL: http://svn.freebsd.org/changeset/base/209949 Log: Use type-specific inline function imax() instead of deprecated macro MAX(). Prodded by: bde Modified: head/lib/libstand/printf.c head/sys/kern/subr_prf.c Modified: head/lib/libstand/printf.c ============================================================================== --- head/lib/libstand/printf.c Mon Jul 12 14:27:49 2010 (r209948) +++ head/lib/libstand/printf.c Mon Jul 12 15:32:45 2010 (r209949) @@ -151,7 +151,6 @@ ksprintn(char *nbuf, uintmax_t num, int static int kvprintf(char const *fmt, void (*func)(int), void *arg, int radix, va_list ap) { -#define MAX(a, b) (((a) > (b)) ? (a) : (b)) #define PCHAR(c) {int cc=(c); if (func) (*func)(cc); else *d++ = cc; retval++; } char nbuf[MAXNBUF]; char *d; @@ -422,7 +421,7 @@ number: if (!ladjust && padc == '0') dwidth = width - tmp; - width -= tmp + MAX(dwidth, n); + width -= tmp + imax(dwidth, n); dwidth -= n; if (!ladjust) while (width-- > 0) Modified: head/sys/kern/subr_prf.c ============================================================================== --- head/sys/kern/subr_prf.c Mon Jul 12 14:27:49 2010 (r209948) +++ head/sys/kern/subr_prf.c Mon Jul 12 15:32:45 2010 (r209949) @@ -813,7 +813,7 @@ number: if (!ladjust && padc == '0') dwidth = width - tmp; - width -= tmp + MAX(dwidth, n); + width -= tmp + imax(dwidth, n); dwidth -= n; if (!ladjust) while (width-- > 0) From owner-svn-src-all@FreeBSD.ORG Mon Jul 12 16:08:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 920CD1065678; Mon, 12 Jul 2010 16:08:07 +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 7EB838FC18; Mon, 12 Jul 2010 16:08:07 +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 o6CG87Ao044975; Mon, 12 Jul 2010 16:08:07 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6CG8767044968; Mon, 12 Jul 2010 16:08:07 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201007121608.o6CG8767044968@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 12 Jul 2010 16:08:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209950 - in head/sys: conf powerpc/aim powerpc/booke powerpc/include powerpc/powerpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 16:08:07 -0000 Author: nwhitehorn Date: Mon Jul 12 16:08:07 2010 New Revision: 209950 URL: http://svn.freebsd.org/changeset/base/209950 Log: Unify ABI-related bits of the Book-E and AIM machdep routines (exec_setregs, etc.) in order to simplify the addition of 64-bit support, and possible future extension of the Book-E code to handle hard floating point and Altivec. MFC after: 1 month Added: head/sys/powerpc/powerpc/exec_machdep.c (contents, props changed) Modified: head/sys/conf/files.powerpc head/sys/powerpc/aim/machdep.c head/sys/powerpc/aim/vm_machdep.c head/sys/powerpc/booke/machdep.c head/sys/powerpc/booke/vm_machdep.c head/sys/powerpc/include/psl.h Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Mon Jul 12 15:32:45 2010 (r209949) +++ head/sys/conf/files.powerpc Mon Jul 12 16:08:07 2010 (r209950) @@ -157,6 +157,7 @@ powerpc/powerpc/db_interface.c optional powerpc/powerpc/db_trace.c optional ddb powerpc/powerpc/dump_machdep.c standard powerpc/powerpc/elf_machdep.c standard +powerpc/powerpc/exec_machdep.c standard powerpc/powerpc/fpu.c optional aim powerpc/powerpc/fuswintr.c standard powerpc/powerpc/gdb_machdep.c optional gdb Modified: head/sys/powerpc/aim/machdep.c ============================================================================== --- head/sys/powerpc/aim/machdep.c Mon Jul 12 15:32:45 2010 (r209949) +++ head/sys/powerpc/aim/machdep.c Mon Jul 12 16:08:07 2010 (r209950) @@ -155,8 +155,6 @@ void install_extint(void (*)(void)); int setfault(faultbuf); /* defined in locore.S */ -static int grab_mcontext(struct thread *, mcontext_t *, int); - void asm_panic(char *); long Maxmem = 0; @@ -580,295 +578,6 @@ bzero(void *buf, size_t len) } void -sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask) -{ - struct trapframe *tf; - struct sigframe *sfp; - struct sigacts *psp; - struct sigframe sf; - struct thread *td; - struct proc *p; - int oonstack, rndfsize; - int sig; - int code; - - td = curthread; - p = td->td_proc; - PROC_LOCK_ASSERT(p, MA_OWNED); - sig = ksi->ksi_signo; - code = ksi->ksi_code; - psp = p->p_sigacts; - mtx_assert(&psp->ps_mtx, MA_OWNED); - tf = td->td_frame; - oonstack = sigonstack(tf->fixreg[1]); - - rndfsize = ((sizeof(sf) + 15) / 16) * 16; - - CTR4(KTR_SIG, "sendsig: td=%p (%s) catcher=%p sig=%d", td, p->p_comm, - catcher, sig); - - /* - * Save user context - */ - memset(&sf, 0, sizeof(sf)); - grab_mcontext(td, &sf.sf_uc.uc_mcontext, 0); - sf.sf_uc.uc_sigmask = *mask; - sf.sf_uc.uc_stack = td->td_sigstk; - sf.sf_uc.uc_stack.ss_flags = (td->td_pflags & TDP_ALTSTACK) - ? ((oonstack) ? SS_ONSTACK : 0) : SS_DISABLE; - - sf.sf_uc.uc_mcontext.mc_onstack = (oonstack) ? 1 : 0; - - /* - * Allocate and validate space for the signal handler context. - */ - if ((td->td_pflags & TDP_ALTSTACK) != 0 && !oonstack && - SIGISMEMBER(psp->ps_sigonstack, sig)) { - sfp = (struct sigframe *)(td->td_sigstk.ss_sp + - td->td_sigstk.ss_size - rndfsize); - } else { - sfp = (struct sigframe *)(tf->fixreg[1] - rndfsize); - } - - /* - * Translate the signal if appropriate (Linux emu ?) - */ - if (p->p_sysent->sv_sigtbl && sig <= p->p_sysent->sv_sigsize) - sig = p->p_sysent->sv_sigtbl[_SIG_IDX(sig)]; - - /* - * Save the floating-point state, if necessary, then copy it. - */ - /* XXX */ - - /* - * Set up the registers to return to sigcode. - * - * r1/sp - sigframe ptr - * lr - sig function, dispatched to by blrl in trampoline - * r3 - sig number - * r4 - SIGINFO ? &siginfo : exception code - * r5 - user context - * srr0 - trampoline function addr - */ - tf->lr = (register_t)catcher; - tf->fixreg[1] = (register_t)sfp; - tf->fixreg[FIRSTARG] = sig; - tf->fixreg[FIRSTARG+2] = (register_t)&sfp->sf_uc; - if (SIGISMEMBER(psp->ps_siginfo, sig)) { - /* - * Signal handler installed with SA_SIGINFO. - */ - tf->fixreg[FIRSTARG+1] = (register_t)&sfp->sf_si; - - /* - * Fill siginfo structure. - */ - sf.sf_si = ksi->ksi_info; - sf.sf_si.si_signo = sig; - sf.sf_si.si_addr = (void *)((tf->exc == EXC_DSI) ? - tf->cpu.aim.dar : tf->srr0); - } else { - /* Old FreeBSD-style arguments. */ - tf->fixreg[FIRSTARG+1] = code; - tf->fixreg[FIRSTARG+3] = (tf->exc == EXC_DSI) ? - tf->cpu.aim.dar : tf->srr0; - } - mtx_unlock(&psp->ps_mtx); - PROC_UNLOCK(p); - - tf->srr0 = (register_t)(PS_STRINGS - *(p->p_sysent->sv_szsigcode)); - - /* - * copy the frame out to userland. - */ - if (copyout(&sf, sfp, sizeof(*sfp)) != 0) { - /* - * Process has trashed its stack. Kill it. - */ - CTR2(KTR_SIG, "sendsig: sigexit td=%p sfp=%p", td, sfp); - PROC_LOCK(p); - sigexit(td, SIGILL); - } - - CTR3(KTR_SIG, "sendsig: return td=%p pc=%#x sp=%#x", td, - tf->srr0, tf->fixreg[1]); - - PROC_LOCK(p); - mtx_lock(&psp->ps_mtx); -} - -int -sigreturn(struct thread *td, struct sigreturn_args *uap) -{ - ucontext_t uc; - int error; - - CTR2(KTR_SIG, "sigreturn: td=%p ucp=%p", td, uap->sigcntxp); - - if (copyin(uap->sigcntxp, &uc, sizeof(uc)) != 0) { - CTR1(KTR_SIG, "sigreturn: efault td=%p", td); - return (EFAULT); - } - - error = set_mcontext(td, &uc.uc_mcontext); - if (error != 0) - return (error); - - kern_sigprocmask(td, SIG_SETMASK, &uc.uc_sigmask, NULL, 0); - - CTR3(KTR_SIG, "sigreturn: return td=%p pc=%#x sp=%#x", - td, uc.uc_mcontext.mc_srr0, uc.uc_mcontext.mc_gpr[1]); - - return (EJUSTRETURN); -} - -#ifdef COMPAT_FREEBSD4 -int -freebsd4_sigreturn(struct thread *td, struct freebsd4_sigreturn_args *uap) -{ - - return sigreturn(td, (struct sigreturn_args *)uap); -} -#endif - -/* - * Construct a PCB from a trapframe. This is called from kdb_trap() where - * we want to start a backtrace from the function that caused us to enter - * the debugger. We have the context in the trapframe, but base the trace - * on the PCB. The PCB doesn't have to be perfect, as long as it contains - * enough for a backtrace. - */ -void -makectx(struct trapframe *tf, struct pcb *pcb) -{ - - pcb->pcb_lr = tf->srr0; - pcb->pcb_sp = tf->fixreg[1]; -} - -/* - * get_mcontext/sendsig helper routine that doesn't touch the - * proc lock - */ -static int -grab_mcontext(struct thread *td, mcontext_t *mcp, int flags) -{ - struct pcb *pcb; - - pcb = td->td_pcb; - - memset(mcp, 0, sizeof(mcontext_t)); - - mcp->mc_vers = _MC_VERSION; - mcp->mc_flags = 0; - memcpy(&mcp->mc_frame, td->td_frame, sizeof(struct trapframe)); - if (flags & GET_MC_CLEAR_RET) { - mcp->mc_gpr[3] = 0; - mcp->mc_gpr[4] = 0; - } - - /* - * This assumes that floating-point context is *not* lazy, - * so if the thread has used FP there would have been a - * FP-unavailable exception that would have set things up - * correctly. - */ - if (pcb->pcb_flags & PCB_FPU) { - KASSERT(td == curthread, - ("get_mcontext: fp save not curthread")); - critical_enter(); - save_fpu(td); - critical_exit(); - mcp->mc_flags |= _MC_FP_VALID; - memcpy(&mcp->mc_fpscr, &pcb->pcb_fpu.fpscr, sizeof(double)); - memcpy(mcp->mc_fpreg, pcb->pcb_fpu.fpr, 32*sizeof(double)); - } - - /* - * Repeat for Altivec context - */ - - if (pcb->pcb_flags & PCB_VEC) { - KASSERT(td == curthread, - ("get_mcontext: fp save not curthread")); - critical_enter(); - save_vec(td); - critical_exit(); - mcp->mc_flags |= _MC_AV_VALID; - mcp->mc_vscr = pcb->pcb_vec.vscr; - mcp->mc_vrsave = pcb->pcb_vec.vrsave; - memcpy(mcp->mc_avec, pcb->pcb_vec.vr, sizeof(mcp->mc_avec)); - } - - mcp->mc_len = sizeof(*mcp); - - return (0); -} - -int -get_mcontext(struct thread *td, mcontext_t *mcp, int flags) -{ - int error; - - error = grab_mcontext(td, mcp, flags); - if (error == 0) { - PROC_LOCK(curthread->td_proc); - mcp->mc_onstack = sigonstack(td->td_frame->fixreg[1]); - PROC_UNLOCK(curthread->td_proc); - } - - return (error); -} - -int -set_mcontext(struct thread *td, const mcontext_t *mcp) -{ - struct pcb *pcb; - struct trapframe *tf; - - pcb = td->td_pcb; - tf = td->td_frame; - - if (mcp->mc_vers != _MC_VERSION || - mcp->mc_len != sizeof(*mcp)) - return (EINVAL); - - /* - * Don't let the user set privileged MSR bits - */ - if ((mcp->mc_srr1 & PSL_USERSTATIC) != (tf->srr1 & PSL_USERSTATIC)) { - return (EINVAL); - } - - memcpy(tf, mcp->mc_frame, sizeof(mcp->mc_frame)); - - if (mcp->mc_flags & _MC_FP_VALID) { - if ((pcb->pcb_flags & PCB_FPU) != PCB_FPU) { - critical_enter(); - enable_fpu(td); - critical_exit(); - } - memcpy(&pcb->pcb_fpu.fpscr, &mcp->mc_fpscr, sizeof(double)); - memcpy(pcb->pcb_fpu.fpr, mcp->mc_fpreg, 32*sizeof(double)); - } - - if (mcp->mc_flags & _MC_AV_VALID) { - if ((pcb->pcb_flags & PCB_VEC) != PCB_VEC) { - critical_enter(); - enable_vec(td); - critical_exit(); - } - pcb->pcb_vec.vscr = mcp->mc_vscr; - pcb->pcb_vec.vrsave = mcp->mc_vrsave; - memcpy(pcb->pcb_vec.vr, mcp->mc_avec, sizeof(mcp->mc_avec)); - } - - - return (0); -} - -void cpu_boot(int howto) { } @@ -948,123 +657,6 @@ cpu_idle_wakeup(int cpu) return (0); } -/* - * Set set up registers on exec. - */ -void -exec_setregs(struct thread *td, struct image_params *imgp, u_long stack) -{ - struct trapframe *tf; - struct ps_strings arginfo; - - tf = trapframe(td); - bzero(tf, sizeof *tf); - tf->fixreg[1] = -roundup(-stack + 8, 16); - - /* - * XXX Machine-independent code has already copied arguments and - * XXX environment to userland. Get them back here. - */ - (void)copyin((char *)PS_STRINGS, &arginfo, sizeof(arginfo)); - - /* - * Set up arguments for _start(): - * _start(argc, argv, envp, obj, cleanup, ps_strings); - * - * Notes: - * - obj and cleanup are the auxilliary and termination - * vectors. They are fixed up by ld.elf_so. - * - ps_strings is a NetBSD extention, and will be - * ignored by executables which are strictly - * compliant with the SVR4 ABI. - * - * XXX We have to set both regs and retval here due to different - * XXX calling convention in trap.c and init_main.c. - */ - /* - * XXX PG: these get overwritten in the syscall return code. - * execve() should return EJUSTRETURN, like it does on NetBSD. - * Emulate by setting the syscall return value cells. The - * registers still have to be set for init's fork trampoline. - */ - td->td_retval[0] = arginfo.ps_nargvstr; - td->td_retval[1] = (register_t)arginfo.ps_argvstr; - tf->fixreg[3] = arginfo.ps_nargvstr; - tf->fixreg[4] = (register_t)arginfo.ps_argvstr; - tf->fixreg[5] = (register_t)arginfo.ps_envstr; - tf->fixreg[6] = 0; /* auxillary vector */ - tf->fixreg[7] = 0; /* termination vector */ - tf->fixreg[8] = (register_t)PS_STRINGS; /* NetBSD extension */ - - tf->srr0 = imgp->entry_addr; - tf->srr1 = PSL_MBO | PSL_USERSET | PSL_FE_DFLT; - td->td_pcb->pcb_flags = 0; -} - -int -fill_regs(struct thread *td, struct reg *regs) -{ - struct trapframe *tf; - - tf = td->td_frame; - memcpy(regs, tf, sizeof(struct reg)); - - return (0); -} - -int -fill_dbregs(struct thread *td, struct dbreg *dbregs) -{ - /* No debug registers on PowerPC */ - return (ENOSYS); -} - -int -fill_fpregs(struct thread *td, struct fpreg *fpregs) -{ - struct pcb *pcb; - - pcb = td->td_pcb; - - if ((pcb->pcb_flags & PCB_FPU) == 0) - memset(fpregs, 0, sizeof(struct fpreg)); - else - memcpy(fpregs, &pcb->pcb_fpu, sizeof(struct fpreg)); - - return (0); -} - -int -set_regs(struct thread *td, struct reg *regs) -{ - struct trapframe *tf; - - tf = td->td_frame; - memcpy(tf, regs, sizeof(struct reg)); - - return (0); -} - -int -set_dbregs(struct thread *td, struct dbreg *dbregs) -{ - /* No debug registers on PowerPC */ - return (ENOSYS); -} - -int -set_fpregs(struct thread *td, struct fpreg *fpregs) -{ - struct pcb *pcb; - - pcb = td->td_pcb; - if ((pcb->pcb_flags & PCB_FPU) == 0) - enable_fpu(td); - memcpy(&pcb->pcb_fpu, fpregs, sizeof(struct fpreg)); - - return (0); -} - int ptrace_set_pc(struct thread *td, unsigned long addr) { Modified: head/sys/powerpc/aim/vm_machdep.c ============================================================================== --- head/sys/powerpc/aim/vm_machdep.c Mon Jul 12 15:32:45 2010 (r209949) +++ head/sys/powerpc/aim/vm_machdep.c Mon Jul 12 16:08:07 2010 (r209950) @@ -358,6 +358,7 @@ sf_buf_free(struct sf_buf *sf) void swi_vm(void *dummy) { + if (busdma_swi_pending != 0) busdma_swi(); } @@ -385,31 +386,6 @@ is_physical_memory(addr) /* * Threading functions */ -void -cpu_thread_exit(struct thread *td) -{ -} - -void -cpu_thread_clean(struct thread *td) -{ -} - -void -cpu_thread_alloc(struct thread *td) -{ - struct pcb *pcb; - - pcb = (struct pcb *)((td->td_kstack + td->td_kstack_pages * PAGE_SIZE - - sizeof(struct pcb)) & ~0x2fU); - td->td_pcb = pcb; - td->td_frame = (struct trapframe *)pcb - 1; -} - -void -cpu_thread_free(struct thread *td) -{ -} void cpu_thread_swapin(struct thread *td) @@ -421,121 +397,3 @@ cpu_thread_swapout(struct thread *td) { } -void -cpu_set_syscall_retval(struct thread *td, int error) -{ - struct proc *p; - struct trapframe *tf; - int fixup; - - if (error == EJUSTRETURN) - return; - - p = td->td_proc; - tf = td->td_frame; - - if (tf->fixreg[0] == SYS___syscall) { - int code = tf->fixreg[FIRSTARG + 1]; - if (p->p_sysent->sv_mask) - code &= p->p_sysent->sv_mask; - fixup = (code != SYS_freebsd6_lseek && code != SYS_lseek) ? - 1 : 0; - } else - fixup = 0; - - switch (error) { - case 0: - if (fixup) { - /* - * 64-bit return, 32-bit syscall. Fixup byte order - */ - tf->fixreg[FIRSTARG] = 0; - tf->fixreg[FIRSTARG + 1] = td->td_retval[0]; - } else { - tf->fixreg[FIRSTARG] = td->td_retval[0]; - tf->fixreg[FIRSTARG + 1] = td->td_retval[1]; - } - tf->cr &= ~0x10000000; /* XXX: Magic number */ - break; - case ERESTART: - /* - * Set user's pc back to redo the system call. - */ - tf->srr0 -= 4; - break; - default: - if (p->p_sysent->sv_errsize) { - error = (error < p->p_sysent->sv_errsize) ? - p->p_sysent->sv_errtbl[error] : -1; - } - tf->fixreg[FIRSTARG] = error; - tf->cr |= 0x10000000; /* XXX: Magic number */ - break; - } -} - -void -cpu_set_upcall(struct thread *td, struct thread *td0) -{ - struct pcb *pcb2; - struct trapframe *tf; - struct callframe *cf; - - pcb2 = td->td_pcb; - - /* Copy the upcall pcb */ - bcopy(td0->td_pcb, pcb2, sizeof(*pcb2)); - - /* Create a stack for the new thread */ - tf = td->td_frame; - bcopy(td0->td_frame, tf, sizeof(struct trapframe)); - tf->fixreg[FIRSTARG] = 0; - tf->fixreg[FIRSTARG + 1] = 0; - tf->cr &= ~0x10000000; - - /* Set registers for trampoline to user mode. */ - cf = (struct callframe *)tf - 1; - memset(cf, 0, sizeof(struct callframe)); - cf->cf_func = (register_t)fork_return; - cf->cf_arg0 = (register_t)td; - cf->cf_arg1 = (register_t)tf; - - pcb2->pcb_sp = (register_t)cf; - pcb2->pcb_lr = (register_t)fork_trampoline; - pcb2->pcb_cpu.aim.usr = kernel_pmap->pm_sr[USER_SR]; - - /* Setup to release spin count in fork_exit(). */ - td->td_md.md_spinlock_count = 1; - td->td_md.md_saved_msr = PSL_KERNSET; -} - -void -cpu_set_upcall_kse(struct thread *td, void (*entry)(void *), void *arg, - stack_t *stack) -{ - struct trapframe *tf; - uint32_t sp; - - tf = td->td_frame; - /* align stack and alloc space for frame ptr and saved LR */ - sp = ((uint32_t)stack->ss_sp + stack->ss_size - sizeof(uint64_t)) & - ~0x1f; - bzero(tf, sizeof(struct trapframe)); - - tf->fixreg[1] = (register_t)sp; - tf->fixreg[3] = (register_t)arg; - tf->srr0 = (register_t)entry; - tf->srr1 = PSL_MBO | PSL_USERSET | PSL_FE_DFLT; - td->td_pcb->pcb_flags = 0; - - td->td_retval[0] = (register_t)entry; - td->td_retval[1] = 0; -} - -int -cpu_set_user_tls(struct thread *td, void *tls_base) -{ - - td->td_frame->fixreg[2] = (register_t)tls_base + 0x7008; - return (0); -} Modified: head/sys/powerpc/booke/machdep.c ============================================================================== --- head/sys/powerpc/booke/machdep.c Mon Jul 12 15:32:45 2010 (r209949) +++ head/sys/powerpc/booke/machdep.c Mon Jul 12 16:08:07 2010 (r209950) @@ -458,75 +458,6 @@ cpu_pcpu_init(struct pcpu *pcpu, int cpu #endif } -/* Set set up registers on exec. */ -void -exec_setregs(struct thread *td, struct image_params *imgp, u_long stack) -{ - struct trapframe *tf; - struct ps_strings arginfo; - - tf = trapframe(td); - bzero(tf, sizeof *tf); - tf->fixreg[1] = -roundup(-stack + 8, 16); - - /* - * XXX Machine-independent code has already copied arguments and - * XXX environment to userland. Get them back here. - */ - (void)copyin((char *)PS_STRINGS, &arginfo, sizeof(arginfo)); - - /* - * Set up arguments for _start(): - * _start(argc, argv, envp, obj, cleanup, ps_strings); - * - * Notes: - * - obj and cleanup are the auxilliary and termination - * vectors. They are fixed up by ld.elf_so. - * - ps_strings is a NetBSD extention, and will be - * ignored by executables which are strictly - * compliant with the SVR4 ABI. - * - * XXX We have to set both regs and retval here due to different - * XXX calling convention in trap.c and init_main.c. - */ - /* - * XXX PG: these get overwritten in the syscall return code. - * execve() should return EJUSTRETURN, like it does on NetBSD. - * Emulate by setting the syscall return value cells. The - * registers still have to be set for init's fork trampoline. - */ - td->td_retval[0] = arginfo.ps_nargvstr; - td->td_retval[1] = (register_t)arginfo.ps_argvstr; - tf->fixreg[3] = arginfo.ps_nargvstr; - tf->fixreg[4] = (register_t)arginfo.ps_argvstr; - tf->fixreg[5] = (register_t)arginfo.ps_envstr; - tf->fixreg[6] = 0; /* auxillary vector */ - tf->fixreg[7] = 0; /* termination vector */ - tf->fixreg[8] = (register_t)PS_STRINGS; /* NetBSD extension */ - - tf->srr0 = imgp->entry_addr; - tf->srr1 = PSL_USERSET; - td->td_pcb->pcb_flags = 0; -} - -int -fill_regs(struct thread *td, struct reg *regs) -{ - struct trapframe *tf; - - tf = td->td_frame; - memcpy(regs, tf, sizeof(struct reg)); - - return (0); -} - -int -fill_fpregs(struct thread *td, struct fpreg *fpregs) -{ - - return (0); -} - /* * Flush the D-cache for non-DMA I/O so that the I-cache can * be made coherent later. @@ -538,115 +469,6 @@ cpu_flush_dcache(void *ptr, size_t len) } /* - * Construct a PCB from a trapframe. This is called from kdb_trap() where - * we want to start a backtrace from the function that caused us to enter - * the debugger. We have the context in the trapframe, but base the trace - * on the PCB. The PCB doesn't have to be perfect, as long as it contains - * enough for a backtrace. - */ -void -makectx(struct trapframe *tf, struct pcb *pcb) -{ - - pcb->pcb_lr = tf->srr0; - pcb->pcb_sp = tf->fixreg[1]; -} - -/* - * get_mcontext/sendsig helper routine that doesn't touch the - * proc lock. - */ -static int -grab_mcontext(struct thread *td, mcontext_t *mcp, int flags) -{ - struct pcb *pcb; - - pcb = td->td_pcb; - memset(mcp, 0, sizeof(mcontext_t)); - - mcp->mc_vers = _MC_VERSION; - mcp->mc_flags = 0; - memcpy(&mcp->mc_frame, td->td_frame, sizeof(struct trapframe)); - if (flags & GET_MC_CLEAR_RET) { - mcp->mc_gpr[3] = 0; - mcp->mc_gpr[4] = 0; - } - - /* XXX Altivec context ? */ - - mcp->mc_len = sizeof(*mcp); - return (0); -} - -int -get_mcontext(struct thread *td, mcontext_t *mcp, int flags) -{ - int error; - - error = grab_mcontext(td, mcp, flags); - if (error == 0) { - PROC_LOCK(curthread->td_proc); - mcp->mc_onstack = sigonstack(td->td_frame->fixreg[1]); - PROC_UNLOCK(curthread->td_proc); - } - - return (error); -} - -int -set_mcontext(struct thread *td, const mcontext_t *mcp) -{ - struct pcb *pcb; - struct trapframe *tf; - - pcb = td->td_pcb; - tf = td->td_frame; - - if (mcp->mc_vers != _MC_VERSION || mcp->mc_len != sizeof(*mcp)) - return (EINVAL); - - memcpy(tf, mcp->mc_frame, sizeof(mcp->mc_frame)); - - /* XXX Altivec context? */ - - return (0); -} - -int -sigreturn(struct thread *td, struct sigreturn_args *uap) -{ - ucontext_t uc; - int error; - - CTR2(KTR_SIG, "sigreturn: td=%p ucp=%p", td, uap->sigcntxp); - - if (copyin(uap->sigcntxp, &uc, sizeof(uc)) != 0) { - CTR1(KTR_SIG, "sigreturn: efault td=%p", td); - return (EFAULT); - } - - error = set_mcontext(td, &uc.uc_mcontext); - if (error != 0) - return (error); - - kern_sigprocmask(td, SIG_SETMASK, &uc.uc_sigmask, NULL, 0); - - CTR3(KTR_SIG, "sigreturn: return td=%p pc=%#x sp=%#x", - td, uc.uc_mcontext.mc_srr0, uc.uc_mcontext.mc_gpr[1]); - - return (EJUSTRETURN); -} - -#ifdef COMPAT_FREEBSD4 -int -freebsd4_sigreturn(struct thread *td, struct freebsd4_sigreturn_args *uap) -{ - - return sigreturn(td, (struct sigreturn_args *)uap); -} -#endif - -/* * cpu_idle * * Set Wait state enable. @@ -712,39 +534,6 @@ cpu_halt(void) } int -set_regs(struct thread *td, struct reg *regs) -{ - struct trapframe *tf; - - tf = td->td_frame; - memcpy(tf, regs, sizeof(struct reg)); - return (0); -} - -int -fill_dbregs(struct thread *td, struct dbreg *dbregs) -{ - - /* No debug registers on PowerPC */ - return (ENOSYS); -} - -int -set_dbregs(struct thread *td, struct dbreg *dbregs) -{ - - /* No debug registers on PowerPC */ - return (ENOSYS); -} - -int -set_fpregs(struct thread *td, struct fpreg *fpregs) -{ - - return (0); -} - -int ptrace_set_pc(struct thread *td, unsigned long addr) { struct trapframe *tf; @@ -798,124 +587,6 @@ kdb_cpu_set_singlestep(void) } void -sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask) -{ - struct trapframe *tf; - struct sigframe *sfp; - struct sigacts *psp; - struct sigframe sf; - struct thread *td; - struct proc *p; - int oonstack, rndfsize; - int sig, code; - - td = curthread; - p = td->td_proc; - PROC_LOCK_ASSERT(p, MA_OWNED); - sig = ksi->ksi_signo; - code = ksi->ksi_code; - psp = p->p_sigacts; - mtx_assert(&psp->ps_mtx, MA_OWNED); - tf = td->td_frame; - oonstack = sigonstack(tf->fixreg[1]); - - rndfsize = ((sizeof(sf) + 15) / 16) * 16; - - CTR4(KTR_SIG, "sendsig: td=%p (%s) catcher=%p sig=%d", td, p->p_comm, - catcher, sig); - - /* - * Save user context - */ - memset(&sf, 0, sizeof(sf)); - grab_mcontext(td, &sf.sf_uc.uc_mcontext, 0); - sf.sf_uc.uc_sigmask = *mask; - sf.sf_uc.uc_stack = td->td_sigstk; - sf.sf_uc.uc_stack.ss_flags = (td->td_pflags & TDP_ALTSTACK) - ? ((oonstack) ? SS_ONSTACK : 0) : SS_DISABLE; - - sf.sf_uc.uc_mcontext.mc_onstack = (oonstack) ? 1 : 0; - - /* - * Allocate and validate space for the signal handler context. - */ - if ((td->td_pflags & TDP_ALTSTACK) != 0 && !oonstack && - SIGISMEMBER(psp->ps_sigonstack, sig)) { - sfp = (struct sigframe *)((caddr_t)td->td_sigstk.ss_sp + - td->td_sigstk.ss_size - rndfsize); - } else { - sfp = (struct sigframe *)(tf->fixreg[1] - rndfsize); - } - - /* - * Translate the signal if appropriate (Linux emu ?) - */ - if (p->p_sysent->sv_sigtbl && sig <= p->p_sysent->sv_sigsize) - sig = p->p_sysent->sv_sigtbl[_SIG_IDX(sig)]; - - /* - * Save the floating-point state, if necessary, then copy it. - */ - /* XXX */ - - /* - * Set up the registers to return to sigcode. - * - * r1/sp - sigframe ptr - * lr - sig function, dispatched to by blrl in trampoline - * r3 - sig number - * r4 - SIGINFO ? &siginfo : exception code - * r5 - user context - * srr0 - trampoline function addr - */ - tf->lr = (register_t)catcher; - tf->fixreg[1] = (register_t)sfp; - tf->fixreg[FIRSTARG] = sig; - tf->fixreg[FIRSTARG+2] = (register_t)&sfp->sf_uc; - if (SIGISMEMBER(psp->ps_siginfo, sig)) { - /* - * Signal handler installed with SA_SIGINFO. - */ - tf->fixreg[FIRSTARG+1] = (register_t)&sfp->sf_si; - - /* - * Fill siginfo structure. - */ - sf.sf_si = ksi->ksi_info; - sf.sf_si.si_signo = sig; - sf.sf_si.si_addr = (void *) ((tf->exc == EXC_DSI) ? - tf->cpu.booke.dear : tf->srr0); - } else { - /* Old FreeBSD-style arguments. */ - tf->fixreg[FIRSTARG+1] = code; - tf->fixreg[FIRSTARG+3] = (tf->exc == EXC_DSI) ? - tf->cpu.booke.dear : tf->srr0; - } - mtx_unlock(&psp->ps_mtx); - PROC_UNLOCK(p); - - tf->srr0 = (register_t)(PS_STRINGS - *(p->p_sysent->sv_szsigcode)); - - /* - * copy the frame out to userland. - */ - if (copyout((caddr_t)&sf, (caddr_t)sfp, sizeof(sf)) != 0) { - /* - * Process has trashed its stack. Kill it. - */ - CTR2(KTR_SIG, "sendsig: sigexit td=%p sfp=%p", td, sfp); - PROC_LOCK(p); - sigexit(td, SIGILL); - } - - CTR3(KTR_SIG, "sendsig: return td=%p pc=%#x sp=%#x", td, - tf->srr0, tf->fixreg[1]); - - PROC_LOCK(p); - mtx_lock(&psp->ps_mtx); -} - -void bzero(void *buf, size_t len) { caddr_t p; Modified: head/sys/powerpc/booke/vm_machdep.c ============================================================================== --- head/sys/powerpc/booke/vm_machdep.c Mon Jul 12 15:32:45 2010 (r209949) +++ head/sys/powerpc/booke/vm_machdep.c Mon Jul 12 16:08:07 2010 (r209950) @@ -357,6 +357,7 @@ sf_buf_free(struct sf_buf *sf) void swi_vm(void *dummy) { + if (busdma_swi_pending != 0) busdma_swi(); } @@ -381,34 +382,6 @@ is_physical_memory(vm_offset_t addr) /* * Thread functions */ -void -cpu_thread_exit(struct thread *td) -{ - -} - -void -cpu_thread_clean(struct thread *td) -{ - -} - -void -cpu_thread_alloc(struct thread *td) -{ - struct pcb *pcb; - - pcb = (struct pcb *)((td->td_kstack + td->td_kstack_pages * PAGE_SIZE - - sizeof(struct pcb)) & ~0x3fU); - td->td_pcb = pcb; - td->td_frame = (struct trapframe *)pcb - 1; -} *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Jul 12 17:18:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 749571065673; Mon, 12 Jul 2010 17:18:58 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4ADF88FC18; Mon, 12 Jul 2010 17:18:58 +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 o6CHIwSo061113; Mon, 12 Jul 2010 17:18:58 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6CHIwbO061111; Mon, 12 Jul 2010 17:18:58 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201007121718.o6CHIwbO061111@svn.freebsd.org> From: Ed Maste Date: Mon, 12 Jul 2010 17:18:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209951 - head/usr.bin/make X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 17:18:58 -0000 Author: emaste Date: Mon Jul 12 17:18:58 2010 New Revision: 209951 URL: http://svn.freebsd.org/changeset/base/209951 Log: Remove extraneous ; Modified: head/usr.bin/make/str.c Modified: head/usr.bin/make/str.c ============================================================================== --- head/usr.bin/make/str.c Mon Jul 12 16:08:07 2010 (r209950) +++ head/usr.bin/make/str.c Mon Jul 12 17:18:58 2010 (r209951) @@ -150,7 +150,7 @@ brk_string(ArgArray *aa, const char str[ ArgArray_Init(aa); - aa->buffer = estrdup(str);; + aa->buffer = estrdup(str); arg = aa->buffer; start = arg; From owner-svn-src-all@FreeBSD.ORG Mon Jul 12 17:46:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7339C106564A; Mon, 12 Jul 2010 17:46:20 +0000 (UTC) (envelope-from remko@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 48C178FC0C; Mon, 12 Jul 2010 17:46:20 +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 o6CHkKQm067211; Mon, 12 Jul 2010 17:46:20 GMT (envelope-from remko@svn.freebsd.org) Received: (from remko@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6CHkKuI067210; Mon, 12 Jul 2010 17:46:20 GMT (envelope-from remko@svn.freebsd.org) Message-Id: <201007121746.o6CHkKuI067210@svn.freebsd.org> From: Remko Lodder Date: Mon, 12 Jul 2010 17:46:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209952 - stable/8/sys/dev/ichwd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 17:46:20 -0000 Author: remko Date: Mon Jul 12 17:46:19 2010 New Revision: 209952 URL: http://svn.freebsd.org/changeset/base/209952 Log: MFC r202917 Add support for the NM10 chipset. PR: kern/143118 Submitted by: Koshin sumitani Approved by: imp (mentor, implicit) MFC after: 3 days Modified: stable/8/sys/dev/ichwd/ichwd.c stable/8/sys/dev/ichwd/ichwd.h Directory Properties: stable/8/etc/ (props changed) stable/8/libexec/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ichwd/ichwd.c ============================================================================== --- stable/8/sys/dev/ichwd/ichwd.c Mon Jul 12 17:18:58 2010 (r209951) +++ stable/8/sys/dev/ichwd/ichwd.c Mon Jul 12 17:46:19 2010 (r209952) @@ -93,6 +93,7 @@ static struct ichwd_device ichwd_devices { DEVICEID_ICH7DH, "Intel ICH7DH watchdog timer", 7 }, { DEVICEID_ICH7M, "Intel ICH7M watchdog timer", 7 }, { DEVICEID_ICH7MDH, "Intel ICH7MDH watchdog timer", 7 }, + { DEVICEID_NM10, "Intel NM10 watchdog timer", 7 }, { DEVICEID_ICH8, "Intel ICH8 watchdog timer", 8 }, { DEVICEID_ICH8DH, "Intel ICH8DH watchdog timer", 8 }, { DEVICEID_ICH8DO, "Intel ICH8DO watchdog timer", 8 }, Modified: stable/8/sys/dev/ichwd/ichwd.h ============================================================================== --- stable/8/sys/dev/ichwd/ichwd.h Mon Jul 12 17:18:58 2010 (r209951) +++ stable/8/sys/dev/ichwd/ichwd.h Mon Jul 12 17:46:19 2010 (r209952) @@ -83,6 +83,7 @@ struct ichwd_softc { #define DEVICEID_ICH7 0x27b8 #define DEVICEID_ICH7DH 0x27b0 #define DEVICEID_ICH7M 0x27b9 +#define DEVICEID_NM10 0x27bc #define DEVICEID_ICH7MDH 0x27bd #define DEVICEID_ICH8 0x2810 #define DEVICEID_ICH8DH 0x2812 From owner-svn-src-all@FreeBSD.ORG Mon Jul 12 17:50:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 58B711065670; Mon, 12 Jul 2010 17:50:39 +0000 (UTC) (envelope-from remko@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 47B678FC1C; Mon, 12 Jul 2010 17:50:39 +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 o6CHodUF068249; Mon, 12 Jul 2010 17:50:39 GMT (envelope-from remko@svn.freebsd.org) Received: (from remko@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6CHodiT068246; Mon, 12 Jul 2010 17:50:39 GMT (envelope-from remko@svn.freebsd.org) Message-Id: <201007121750.o6CHodiT068246@svn.freebsd.org> From: Remko Lodder Date: Mon, 12 Jul 2010 17:50:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209953 - stable/7/sys/dev/ichwd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 17:50:39 -0000 Author: remko Date: Mon Jul 12 17:50:38 2010 New Revision: 209953 URL: http://svn.freebsd.org/changeset/base/209953 Log: MFC r202917 Add support for the NM10 chipset. PR: kern/143118 Submitted by: Koshin sumitani Approved by: imp (mentor, implicit) MFC after: 3 days Modified: stable/7/sys/dev/ichwd/ichwd.c stable/7/sys/dev/ichwd/ichwd.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/ichwd/ichwd.c ============================================================================== --- stable/7/sys/dev/ichwd/ichwd.c Mon Jul 12 17:46:19 2010 (r209952) +++ stable/7/sys/dev/ichwd/ichwd.c Mon Jul 12 17:50:38 2010 (r209953) @@ -93,6 +93,7 @@ static struct ichwd_device ichwd_devices { DEVICEID_ICH7DH, "Intel ICH7DH watchdog timer", 7 }, { DEVICEID_ICH7M, "Intel ICH7M watchdog timer", 7 }, { DEVICEID_ICH7MDH, "Intel ICH7MDH watchdog timer", 7 }, + { DEVICEID_NM10, "Intel NM10 watchdog timer", 7 }, { DEVICEID_ICH8, "Intel ICH8 watchdog timer", 8 }, { DEVICEID_ICH8DH, "Intel ICH8DH watchdog timer", 8 }, { DEVICEID_ICH8DO, "Intel ICH8DO watchdog timer", 8 }, Modified: stable/7/sys/dev/ichwd/ichwd.h ============================================================================== --- stable/7/sys/dev/ichwd/ichwd.h Mon Jul 12 17:46:19 2010 (r209952) +++ stable/7/sys/dev/ichwd/ichwd.h Mon Jul 12 17:50:38 2010 (r209953) @@ -83,6 +83,7 @@ struct ichwd_softc { #define DEVICEID_ICH7 0x27b8 #define DEVICEID_ICH7DH 0x27b0 #define DEVICEID_ICH7M 0x27b9 +#define DEVICEID_NM10 0x27bc #define DEVICEID_ICH7MDH 0x27bd #define DEVICEID_ICH8 0x2810 #define DEVICEID_ICH8DH 0x2812 From owner-svn-src-all@FreeBSD.ORG Mon Jul 12 19:09:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A2828106567E; Mon, 12 Jul 2010 19:09:18 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 92FB78FC0C; Mon, 12 Jul 2010 19:09:18 +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 o6CJ9IVx088062; Mon, 12 Jul 2010 19:09:18 GMT (envelope-from bcr@svn.freebsd.org) Received: (from bcr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6CJ9IpP088061; Mon, 12 Jul 2010 19:09:18 GMT (envelope-from bcr@svn.freebsd.org) Message-Id: <201007121909.o6CJ9IpP088061@svn.freebsd.org> From: Benedict Reuschling Date: Mon, 12 Jul 2010 19:09:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209954 - head/etc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 19:09:18 -0000 Author: bcr (doc committer) Date: Mon Jul 12 19:09:18 2010 New Revision: 209954 URL: http://svn.freebsd.org/changeset/base/209954 Log: Fix spelling of "weirdo" in /etc/gettytab comment. PR: docs/148500 Submitted by: Warren Block (wblock at wonkity dot com) Approved by: ed@ MFC after: 1 week Modified: head/etc/gettytab Modified: head/etc/gettytab ============================================================================== --- head/etc/gettytab Mon Jul 12 17:50:38 2010 (r209953) +++ head/etc/gettytab Mon Jul 12 19:09:18 2010 (r209954) @@ -165,7 +165,7 @@ P|Pc|Pc console:\ :ht:np:sp#9600: # -# Wierdo special case for fast crt's with hardcopy devices +# Weirdo special case for fast crt's with hardcopy devices # 8|T9600|CRT with hardcopy:\ :nx=T300:tc=9600-baud: From owner-svn-src-all@FreeBSD.ORG Mon Jul 12 19:59:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B7AD110657A8; Mon, 12 Jul 2010 19:59:15 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A7D008FC29; Mon, 12 Jul 2010 19:59:15 +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 o6CJxFua002413; Mon, 12 Jul 2010 19:59:15 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6CJxFuN002411; Mon, 12 Jul 2010 19:59:15 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201007121959.o6CJxFuN002411@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 12 Jul 2010 19:59:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209955 - head/sys/amd64/amd64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 19:59:15 -0000 Author: kib Date: Mon Jul 12 19:59:15 2010 New Revision: 209955 URL: http://svn.freebsd.org/changeset/base/209955 Log: When switching the thread from the processor, store %dr7 content into the pcb before disabling watchpoints. Otherwise, when the thread is restored on a processor, watchpoints are still disabled. Submitted by: Tijl Coosemans (I would be much happier if Tijl commited this himself) MFC after: 1 week Modified: head/sys/amd64/amd64/cpu_switch.S Modified: head/sys/amd64/amd64/cpu_switch.S ============================================================================== --- head/sys/amd64/amd64/cpu_switch.S Mon Jul 12 19:09:18 2010 (r209954) +++ head/sys/amd64/amd64/cpu_switch.S Mon Jul 12 19:59:15 2010 (r209955) @@ -243,13 +243,13 @@ store_dr: movq %dr2,%r13 movq %dr3,%r12 movq %dr6,%r11 - andq $0x0000fc00, %rax /* disable all watchpoints */ movq %r15,PCB_DR0(%r8) movq %r14,PCB_DR1(%r8) movq %r13,PCB_DR2(%r8) movq %r12,PCB_DR3(%r8) movq %r11,PCB_DR6(%r8) movq %rax,PCB_DR7(%r8) + andq $0x0000fc00, %rax /* disable all watchpoints */ movq %rax,%dr7 jmp done_store_dr From owner-svn-src-all@FreeBSD.ORG Mon Jul 12 20:45:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 02FC3106564A; Mon, 12 Jul 2010 20:45:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E75518FC12; Mon, 12 Jul 2010 20:45:37 +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 o6CKjb4n012737; Mon, 12 Jul 2010 20:45:37 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6CKjbZn012735; Mon, 12 Jul 2010 20:45:37 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201007122045.o6CKjbZn012735@svn.freebsd.org> From: John Baldwin Date: Mon, 12 Jul 2010 20:45:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209956 - head/sys/amd64/amd64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 20:45:38 -0000 Author: jhb Date: Mon Jul 12 20:45:37 2010 New Revision: 209956 URL: http://svn.freebsd.org/changeset/base/209956 Log: Remove a dead test. We already exclude NMI traps from this code in an earlier condition. MFC after: 1 week Modified: head/sys/amd64/amd64/trap.c Modified: head/sys/amd64/amd64/trap.c ============================================================================== --- head/sys/amd64/amd64/trap.c Mon Jul 12 19:59:15 2010 (r209955) +++ head/sys/amd64/amd64/trap.c Mon Jul 12 20:45:37 2010 (r209956) @@ -268,9 +268,9 @@ trap(struct trapframe *frame) /* * We shouldn't enable interrupts while holding a - * spin lock or servicing an NMI. + * spin lock. */ - if (type != T_NMI && td->td_md.md_spinlock_count == 0) + if (td->td_md.md_spinlock_count == 0) enable_intr(); } } From owner-svn-src-all@FreeBSD.ORG Mon Jul 12 21:08:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2BD20106566C; Mon, 12 Jul 2010 21:08:36 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1ABFA8FC12; Mon, 12 Jul 2010 21:08: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 o6CL8Zud017789; Mon, 12 Jul 2010 21:08:35 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6CL8Z3l017785; Mon, 12 Jul 2010 21:08:35 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007122108.o6CL8Z3l017785@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 12 Jul 2010 21:08:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209957 - in head/sys: amd64/acpica conf modules/acpi/acpi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 21:08:36 -0000 Author: jkim Date: Mon Jul 12 21:08:35 2010 New Revision: 209957 URL: http://svn.freebsd.org/changeset/base/209957 Log: Move i386-inherited logic of building ACPI headers for acpi_wakeup.c into better places and remove intermediate makefile and shell scripts. This makes parallel kernel build little bit safer for amd64. Deleted: head/sys/amd64/acpica/Makefile head/sys/amd64/acpica/genwakecode.sh head/sys/amd64/acpica/genwakedata.sh Modified: head/sys/amd64/acpica/acpi_wakecode.S head/sys/conf/files.amd64 head/sys/modules/acpi/acpi/Makefile Modified: head/sys/amd64/acpica/acpi_wakecode.S ============================================================================== --- head/sys/amd64/acpica/acpi_wakecode.S Mon Jul 12 20:45:37 2010 (r209956) +++ head/sys/amd64/acpica/acpi_wakecode.S Mon Jul 12 21:08:35 2010 (r209957) @@ -29,8 +29,6 @@ * $FreeBSD$ */ -#define LOCORE - #include #include Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Mon Jul 12 20:45:37 2010 (r209956) +++ head/sys/conf/files.amd64 Mon Jul 12 21:08:35 2010 (r209957) @@ -70,17 +70,26 @@ hptrr_lib.o optional hptrr \ amd64/acpica/OsdEnvironment.c optional acpi amd64/acpica/acpi_machdep.c optional acpi amd64/acpica/acpi_switch.S optional acpi -acpi_wakecode.h optional acpi \ - dependency "$S/amd64/acpica/acpi_wakecode.S assym.s" \ - compile-with "${MAKE} -f $S/amd64/acpica/Makefile ${.TARGET} MAKESRCPATH=$S/amd64/acpica" \ +acpi_wakecode.o optional acpi \ + dependency "$S/amd64/acpica/acpi_wakecode.S assym.s" \ + compile-with "${NORMAL_S}" \ no-obj no-implicit-rule before-depend \ - clean "acpi_wakecode.h acpi_wakecode.o acpi_wakecode.bin" -# -acpi_wakedata.h optional acpi \ - dependency "$S/amd64/acpica/acpi_wakecode.S assym.s" \ - compile-with "${MAKE} -f $S/amd64/acpica/Makefile ${.TARGET} MAKESRCPATH=$S/amd64/acpica" \ - no-obj no-implicit-rule before-depend \ - clean "acpi_wakedata.h acpi_wakecode.o acpi_wakecode.bin" + clean "acpi_wakecode.o" +acpi_wakecode.bin optional acpi \ + dependency "acpi_wakecode.o" \ + compile-with "objcopy -S -O binary acpi_wakecode.o ${.TARGET}" \ + no-obj no-implicit-rule before-depend \ + clean "acpi_wakecode.bin" +acpi_wakecode.h optional acpi \ + dependency "acpi_wakecode.bin" \ + compile-with "file2c -sx 'static char wakecode[] = {' '};' < acpi_wakecode.bin > ${.TARGET}" \ + no-obj no-implicit-rule before-depend \ + clean "acpi_wakecode.h" +acpi_wakedata.h optional acpi \ + dependency "acpi_wakecode.o" \ + compile-with 'nm -n --defined-only acpi_wakecode.o | while read offset dummy what; do echo "#define $${what} 0x$${offset}"; done > ${.TARGET}' \ + no-obj no-implicit-rule before-depend \ + clean "acpi_wakedata.h" # amd64/acpica/acpi_wakeup.c optional acpi amd64/acpica/madt.c optional acpi Modified: head/sys/modules/acpi/acpi/Makefile ============================================================================== --- head/sys/modules/acpi/acpi/Makefile Mon Jul 12 20:45:37 2010 (r209956) +++ head/sys/modules/acpi/acpi/Makefile Mon Jul 12 21:08:35 2010 (r209957) @@ -99,15 +99,25 @@ SRCS+= assym.s madt.c CLEANFILES+= acpi_wakecode.bin acpi_wakecode.h acpi_wakecode.o .if ${MACHINE_ARCH} == "amd64" -SRCS+= acpi_switch.S opt_global.h +SRCS+= acpi_switch.S acpi_wakedata.h opt_global.h CLEANFILES+= acpi_wakedata.h ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${CFLAGS} acpi_switch.o: acpi_switch.S ${CC} -c ${ASM_CFLAGS} ${WERROR} ${.IMPSRC} -.endif - +acpi_wakecode.o: acpi_wakecode.S assym.s + ${CC} -c ${ASM_CFLAGS} ${WERROR} ${.IMPSRC} +acpi_wakecode.bin: acpi_wakecode.o + objcopy -S -O binary acpi_wakecode.o ${.TARGET} +acpi_wakecode.h: acpi_wakecode.bin + file2c -sx 'static char wakecode[] = {' '};' < acpi_wakecode.bin > \ + ${.TARGET} +acpi_wakedata.h: acpi_wakecode.o + nm -n --defined-only ${.ALLSRC} | while read offset dummy what; do \ + echo "#define $${what} 0x$${offset}"; done > ${.TARGET} +.else acpi_wakecode.h: acpi_wakecode.S assym.s ${MAKE} -f ${.CURDIR}/../../../${MACHINE_ARCH}/acpica/Makefile \ MAKESRCPATH=${.CURDIR}/../../../${MACHINE_ARCH}/acpica +.endif .include From owner-svn-src-all@FreeBSD.ORG Mon Jul 12 21:09:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A9E3C106566C; Mon, 12 Jul 2010 21:09:55 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 99F558FC08; Mon, 12 Jul 2010 21:09:55 +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 o6CL9thN018128; Mon, 12 Jul 2010 21:09:55 GMT (envelope-from grehan@svn.freebsd.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6CL9tEC018126; Mon, 12 Jul 2010 21:09:55 GMT (envelope-from grehan@svn.freebsd.org) Message-Id: <201007122109.o6CL9tEC018126@svn.freebsd.org> From: Peter Grehan Date: Mon, 12 Jul 2010 21:09:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209958 - head/sys/powerpc/powermac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 21:09:55 -0000 Author: grehan Date: Mon Jul 12 21:09:55 2010 New Revision: 209958 URL: http://svn.freebsd.org/changeset/base/209958 Log: Fix printf specifier to allow 32/64 bit builds. Obtained from: projects/ppc64 Modified: head/sys/powerpc/powermac/grackle.c Modified: head/sys/powerpc/powermac/grackle.c ============================================================================== --- head/sys/powerpc/powermac/grackle.c Mon Jul 12 21:08:35 2010 (r209957) +++ head/sys/powerpc/powermac/grackle.c Mon Jul 12 21:09:55 2010 (r209958) @@ -472,7 +472,7 @@ grackle_activate_resource(device_t bus, start += sc->sc_iostart; if (bootverbose) - printf("grackle mapdev: start %x, len %ld\n", start, + printf("grackle mapdev: start %zx, len %ld\n", start, rman_get_size(res)); p = pmap_mapdev(start, (vm_size_t)rman_get_size(res)); From owner-svn-src-all@FreeBSD.ORG Mon Jul 12 21:47:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D3D01106564A; Mon, 12 Jul 2010 21:47:30 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C35FB8FC15; Mon, 12 Jul 2010 21:47:30 +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 o6CLlUBX026409; Mon, 12 Jul 2010 21:47:30 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6CLlUeR026405; Mon, 12 Jul 2010 21:47:30 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201007122147.o6CLlUeR026405@svn.freebsd.org> From: Jack F Vogel Date: Mon, 12 Jul 2010 21:47:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209959 - head/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 21:47:31 -0000 Author: jfv Date: Mon Jul 12 21:47:30 2010 New Revision: 209959 URL: http://svn.freebsd.org/changeset/base/209959 Log: Fix for a panic when TX checksum offload is done and a packet has only a header in the first mbuf, the checksum code will dereference a pointer into the non-existing IP header. Do a check for the size and pullup if needed. Thanks to Michael Tuexen for this fix. MFC: asap - should be in 8.1 IMHO Modified: head/sys/dev/e1000/if_em.c head/sys/dev/e1000/if_lem.c Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Mon Jul 12 21:09:55 2010 (r209958) +++ head/sys/dev/e1000/if_em.c Mon Jul 12 21:47:30 2010 (r209959) @@ -1738,6 +1738,19 @@ em_xmit(struct tx_ring *txr, struct mbuf do_tso = ((m_head->m_pkthdr.csum_flags & CSUM_TSO) != 0); /* + ** When doing checksum offload, it is critical to + ** make sure the first mbuf has more than header, + ** because that routine expects data to be present. + */ + if ((m_head->m_pkthdr.csum_flags & CSUM_OFFLOAD) && + (m_head->m_len < ETHER_HDR_LEN + sizeof(struct ip))) { + m_head = m_pullup(m_head, ETHER_HDR_LEN + sizeof(struct ip)); + *m_headp = m_head; + if (m_head == NULL) + return (ENOBUFS); + } + + /* * TSO workaround: * If an mbuf is only header we need * to pull 4 bytes of data into it. @@ -3262,6 +3275,7 @@ em_transmit_checksum_setup(struct tx_rin cmd = hdr_len = ipproto = 0; + *txd_upper = *txd_lower = 0; cur = txr->next_avail_desc; /* @@ -3305,29 +3319,21 @@ em_transmit_checksum_setup(struct tx_rin *txd_upper |= E1000_TXD_POPTS_IXSM << 8; } - if (mp->m_len < ehdrlen + ip_hlen) - return; /* failure */ - hdr_len = ehdrlen + ip_hlen; ipproto = ip->ip_p; - break; + case ETHERTYPE_IPV6: ip6 = (struct ip6_hdr *)(mp->m_data + ehdrlen); ip_hlen = sizeof(struct ip6_hdr); /* XXX: No header stacking. */ - if (mp->m_len < ehdrlen + ip_hlen) - return; /* failure */ - /* IPv6 doesn't have a header checksum. */ hdr_len = ehdrlen + ip_hlen; ipproto = ip6->ip6_nxt; - break; + default: - *txd_upper = 0; - *txd_lower = 0; return; } @@ -3381,6 +3387,8 @@ em_transmit_checksum_setup(struct tx_rin break; } + if (TXD == NULL) + return; TXD->tcp_seg_setup.data = htole32(0); TXD->cmd_and_length = htole32(adapter->txd_cmd | E1000_TXD_CMD_DEXT | cmd); Modified: head/sys/dev/e1000/if_lem.c ============================================================================== --- head/sys/dev/e1000/if_lem.c Mon Jul 12 21:09:55 2010 (r209958) +++ head/sys/dev/e1000/if_lem.c Mon Jul 12 21:47:30 2010 (r209959) @@ -1566,6 +1566,19 @@ lem_xmit(struct adapter *adapter, struct } /* + ** When doing checksum offload, it is critical to + ** make sure the first mbuf has more than header, + ** because that routine expects data to be present. + */ + if ((m_head->m_pkthdr.csum_flags & CSUM_OFFLOAD) && + (m_head->m_len < ETHER_HDR_LEN + sizeof(struct ip))) { + m_head = m_pullup(m_head, ETHER_HDR_LEN + sizeof(struct ip)); + *m_headp = m_head; + if (m_head == NULL) + return (ENOBUFS); + } + + /* * Map the packet for DMA * * Capture the first descriptor index, @@ -2851,6 +2864,7 @@ lem_transmit_checksum_setup(struct adapt cmd = hdr_len = ipproto = 0; + *txd_upper = *txd_lower = 0; curr_txd = adapter->next_avail_tx_desc; /* @@ -2894,9 +2908,6 @@ lem_transmit_checksum_setup(struct adapt *txd_upper |= E1000_TXD_POPTS_IXSM << 8; } - if (mp->m_len < ehdrlen + ip_hlen) - return; /* failure */ - hdr_len = ehdrlen + ip_hlen; ipproto = ip->ip_p; @@ -2905,18 +2916,13 @@ lem_transmit_checksum_setup(struct adapt ip6 = (struct ip6_hdr *)(mp->m_data + ehdrlen); ip_hlen = sizeof(struct ip6_hdr); /* XXX: No header stacking. */ - if (mp->m_len < ehdrlen + ip_hlen) - return; /* failure */ - /* IPv6 doesn't have a header checksum. */ hdr_len = ehdrlen + ip_hlen; ipproto = ip6->ip6_nxt; - break; + default: - *txd_upper = 0; - *txd_lower = 0; return; } @@ -2970,6 +2976,8 @@ lem_transmit_checksum_setup(struct adapt break; } + if (TXD == NULL) + return; TXD->tcp_seg_setup.data = htole32(0); TXD->cmd_and_length = htole32(adapter->txd_cmd | E1000_TXD_CMD_DEXT | cmd); From owner-svn-src-all@FreeBSD.ORG Mon Jul 12 22:57:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 442131065670; Mon, 12 Jul 2010 22:57:58 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1A0F38FC08; Mon, 12 Jul 2010 22:57:58 +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 o6CMvvem041896; Mon, 12 Jul 2010 22:57:57 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6CMvvC5041893; Mon, 12 Jul 2010 22:57:57 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201007122257.o6CMvvC5041893@svn.freebsd.org> From: Marius Strobl Date: Mon, 12 Jul 2010 22:57:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209960 - head/sys/dev/mpt X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 22:57:58 -0000 Author: marius Date: Mon Jul 12 22:57:57 2010 New Revision: 209960 URL: http://svn.freebsd.org/changeset/base/209960 Log: - Make the maxsize parameter of the data buffer DMA tag match maxio, which was missed in r209599. Reported and tested by: Michael Moll - Declare mpt_dma_buf_alloc() static just like mpt_dma_buf_free(), both are used in mpt.c only. Reviewed by: ken MFC after: r209599 Modified: head/sys/dev/mpt/mpt.c head/sys/dev/mpt/mpt.h Modified: head/sys/dev/mpt/mpt.c ============================================================================== --- head/sys/dev/mpt/mpt.c Mon Jul 12 21:47:30 2010 (r209959) +++ head/sys/dev/mpt/mpt.c Mon Jul 12 22:57:57 2010 (r209960) @@ -128,6 +128,7 @@ static void mpt_send_event_ack(struct mp static int mpt_send_event_request(struct mpt_softc *mpt, int onoff); static int mpt_soft_reset(struct mpt_softc *mpt); static void mpt_hard_reset(struct mpt_softc *mpt); +static int mpt_dma_buf_alloc(struct mpt_softc *mpt); static void mpt_dma_buf_free(struct mpt_softc *mpt); static int mpt_configure_ioc(struct mpt_softc *mpt, int, int); static int mpt_enable_ioc(struct mpt_softc *mpt, int); @@ -2475,7 +2476,7 @@ mpt_download_fw(struct mpt_softc *mpt) return (0); } -int +static int mpt_dma_buf_alloc(struct mpt_softc *mpt) { struct mpt_map_info mi; @@ -2486,8 +2487,9 @@ mpt_dma_buf_alloc(struct mpt_softc *mpt) /* Create a child tag for data buffers */ if (mpt_dma_tag_create(mpt, mpt->parent_dmat, 1, 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, - NULL, NULL, MAXBSIZE, mpt->max_cam_seg_cnt, - BUS_SPACE_MAXSIZE_32BIT, 0, &mpt->buffer_dmat) != 0) { + NULL, NULL, (mpt->max_cam_seg_cnt - 1) * PAGE_SIZE, + mpt->max_cam_seg_cnt, BUS_SPACE_MAXSIZE_32BIT, 0, + &mpt->buffer_dmat) != 0) { mpt_prt(mpt, "cannot create a dma tag for data buffers\n"); return (1); } Modified: head/sys/dev/mpt/mpt.h ============================================================================== --- head/sys/dev/mpt/mpt.h Mon Jul 12 21:47:30 2010 (r209959) +++ head/sys/dev/mpt/mpt.h Mon Jul 12 22:57:57 2010 (r209960) @@ -1279,7 +1279,6 @@ void mpt_check_doorbell(struct mpt_soft void mpt_dump_reply_frame(struct mpt_softc *mpt, MSG_DEFAULT_REPLY *reply_frame); -int mpt_dma_buf_alloc(struct mpt_softc *mpt); void mpt_set_config_regs(struct mpt_softc *); int mpt_issue_cfg_req(struct mpt_softc */*mpt*/, request_t */*req*/, cfgparms_t *params, From owner-svn-src-all@FreeBSD.ORG Mon Jul 12 23:01:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6CB6F1065673; Mon, 12 Jul 2010 23:01:21 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5C5EB8FC0C; Mon, 12 Jul 2010 23:01:21 +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 o6CN1LYF042672; Mon, 12 Jul 2010 23:01:21 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6CN1Lto042670; Mon, 12 Jul 2010 23:01:21 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201007122301.o6CN1Lto042670@svn.freebsd.org> From: Marius Strobl Date: Mon, 12 Jul 2010 23:01:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209961 - head/sys/dev/mpt X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 23:01:21 -0000 Author: marius Date: Mon Jul 12 23:01:21 2010 New Revision: 209961 URL: http://svn.freebsd.org/changeset/base/209961 Log: Correct inverted parent DMA tag parameters. Reviewed by: ken MFC after: 3 days Modified: head/sys/dev/mpt/mpt_pci.c Modified: head/sys/dev/mpt/mpt_pci.c ============================================================================== --- head/sys/dev/mpt/mpt_pci.c Mon Jul 12 22:57:57 2010 (r209960) +++ head/sys/dev/mpt/mpt_pci.c Mon Jul 12 23:01:21 2010 (r209961) @@ -754,8 +754,8 @@ mpt_dma_mem_alloc(struct mpt_softc *mpt) /*alignment*/1, /*boundary*/0, /*lowaddr*/BUS_SPACE_MAXADDR, /*highaddr*/BUS_SPACE_MAXADDR, /*filter*/NULL, /*filterarg*/NULL, /*maxsize*/BUS_SPACE_MAXSIZE_32BIT, - /*nsegments*/BUS_SPACE_MAXSIZE_32BIT, - /*maxsegsz*/BUS_SPACE_UNRESTRICTED, /*flags*/0, + /*nsegments*/BUS_SPACE_UNRESTRICTED, + /*maxsegsz*/BUS_SPACE_MAXSIZE_32BIT, /*flags*/0, &mpt->parent_dmat) != 0) { mpt_prt(mpt, "cannot create parent dma tag\n"); return (1); From owner-svn-src-all@FreeBSD.ORG Mon Jul 12 23:49:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6CB781065670; Mon, 12 Jul 2010 23:49:05 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 58BE28FC16; Mon, 12 Jul 2010 23:49:05 +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 o6CNn5DV053105; Mon, 12 Jul 2010 23:49:05 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6CNn5td053095; Mon, 12 Jul 2010 23:49:05 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201007122349.o6CNn5td053095@svn.freebsd.org> From: Martin Matuska Date: Mon, 12 Jul 2010 23:49:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209962 - in head: . cddl/compat/opensolaris/include cddl/compat/opensolaris/misc cddl/contrib/opensolaris/cmd/pyzfs cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/cmd/zfs cd... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 23:49:05 -0000 Author: mm Date: Mon Jul 12 23:49:04 2010 New Revision: 209962 URL: http://svn.freebsd.org/changeset/base/209962 Log: Merge ZFS version 15 and almost all OpenSolaris bugfixes referenced in Solaris 10 updates 141445-09 and 142901-14. Detailed information: (OpenSolaris revisions and Bug IDs, Solaris 10 patch numbers) 7844:effed23820ae 6755435 zfs_open() and zfs_close() needs to use ZFS_ENTER/ZFS_VERIFY_ZP (141445-01) 7897:e520d8258820 6748436 inconsistent zpool.cache in boot_archive could panic a zfs root filesystem upon boot-up (141445-01) 7965:b795da521357 6740164 zpool attach can create an illegal root pool (141909-02) 8084:b811cc60d650 6769612 zpool_import() will continue to write to cachefile even if altroot is set (N/A) 8121:7fd09d4ebd9c 6757430 want an option for zdb to disable space map loading and leak tracking (141445-01) 8129:e4f45a0bfbb0 6542860 ASSERT: reason != VDEV_LABEL_REMOVE||vdev_inuse(vd, crtxg, reason, 0) (141445-01) 8188:fd00c0a81e80 6761100 want zdb option to select older uberblocks (141445-01) 8190:6eeea43ced42 6774886 zfs_setattr() won't allow ndmp to restore SUNWattr_rw (141445-01) 8225:59a9961c2aeb 6737463 panic while trying to write out config file if root pool import fails (141445-01) 8227:f7d7be9b1f56 6765294 Refactor replay (141445-01) 8228:51e9ca9ee3a5 6572357 libzfs should do more to avoid mnttab lookups (141909-01) 6572376 zfs_iter_filesystems and zfs_iter_snapshots get objset stats twice (141909-01) 8241:5a60f16123ba 6328632 zpool offline is a bit too conservative (141445-01) 6739487 ASSERT: txg <= spa_final_txg due to scrub/export race (141445-01) 6767129 ASSERT: cvd->vdev_isspare, in spa_vdev_detach() (141445-01) 6747698 checksum failures after offline -t / export / import / scrub (141445-01) 6745863 ZFS writes to disk after it has been offlined (141445-01) 6722540 50% slowdown on scrub/resilver with certain vdev configurations (141445-01) 6759999 resilver logic rewrites ditto blocks on both source and destination (141445-01) 6758107 I/O should never suspend during spa_load() (141445-01) 6776548 codereview(1) runs off the page when faced with multi-line comments (N/A) 6761406 AMD errata 91 workaround doesn't work on 64-bit systems (141445-01) 8242:e46e4b2f0a03 6770866 GRUB/ZFS should require physical path or devid, but not both (141445-01) 8269:03a7e9050cfd 6674216 "zfs share" doesn't work, but "zfs set sharenfs=on" does (141445-01) 6621164 $SRC/cmd/zfs/zfs_main.c seems to have a syntax error in the translation note (141445-01) 6635482 i18n problems in libzfs_dataset.c and zfs_main.c (141445-01) 6595194 "zfs get" VALUE column is as wide as NAME (141445-01) 6722991 vdev_disk.c: error checking for ddi_pathname_to_dev_t() must test for NODEV (141445-01) 6396518 ASSERT strings shouldn't be pre-processed (141445-01) 8274:846b39508aff 6713916 scrub/resilver needlessly decompress data (141445-01) 8343:655db2375fed 6739553 libzfs_status msgid table is out of sync (141445-01) 6784104 libzfs unfairly rejects numerical values greater than 2^63 (141445-01) 6784108 zfs_realloc() should not free original memory on failure (141445-01) 8525:e0e0e525d0f8 6788830 set large value to reservation cause core dump (141445-01) 6791064 want sysevents for ZFS scrub (141445-01) 6791066 need to be able to set cachefile on faulted pools (141445-01) 6791071 zpool_do_import() should not enable datasets on faulted pools (141445-01) 6792134 getting multiple properties on a faulted pool leads to confusion (141445-01) 8547:bcc7b46e5ff7 6792884 Vista clients cannot access .zfs (141445-01) 8632:36ef517870a3 6798384 It can take a village to raise a zio (141445-01) 8636:7e4ce9158df3 6551866 deadlock between zfs_write(), zfs_freesp(), and zfs_putapage() (141909-01) 6504953 zfs_getpage() misunderstands VOP_GETPAGE() interface (141909-01) 6702206 ZFS read/writer lock contention throttles sendfile() benchmark (141445-01) 6780491 Zone on a ZFS filesystem has poor fork/exec performance (141445-01) 6747596 assertion failed: DVA_EQUAL(BP_IDENTITY(&zio->io_bp_orig), BP_IDENTITY(zio->io_bp))); (141445-01) 8692:692d4668b40d 6801507 ZFS read aggregation should not mind the gap (141445-01) 8697:e62d2612c14d 6633095 creating a filesystem with many properties set is slow (141445-01) 8768:dfecfdbb27ed 6775697 oracle crashes when overwriting after hitting quota on zfs (141909-01) 8811:f8deccf701cf 6790687 libzfs mnttab caching ignores external changes (141445-01) 6791101 memory leak from libzfs_mnttab_init (141445-01) 8845:91af0d9c0790 6800942 smb_session_create() incorrectly stores IP addresses (N/A) 6582163 Access Control List (ACL) for shares (141445-01) 6804954 smb_search - shortname field should be space padded following the NULL terminator (N/A) 6800184 Panic at smb_oplock_conflict+0x35() (N/A) 8876:59d2e67b4b65 6803822 Reboot after replacement of system disk in a ZFS mirror drops to grub> prompt (141445-01) 8924:5af812f84759 6789318 coredump when issue zdb -uuuu poolname/ (141445-01) 6790345 zdb -dddd -e poolname coredump (141445-01) 6797109 zdb: 'zdb -dddddd pool_name/fs_name inode' coredump if the file with inode was deleted (141445-01) 6797118 zdb: 'zdb -dddddd poolname inum' coredump if I miss the fs name (141445-01) 6803343 shareiscsi=on failed, iscsitgtd failed request to share (141445-01) 9030:243fd360d81f 6815893 hang mounting a dataset after booting into a new boot environment (141445-01) 9056:826e1858a846 6809691 'zpool create -f' no longer overwrites ufs infomation (141445-01) 9179:d8fbd96b79b3 6790064 zfs needs to determine uid and gid earlier in create process (141445-01) 9214:8d350e5d04aa 6604992 forced unmount + being in .zfs/snapshot/ = not happy (141909-01) 6810367 assertion failed: dvp->v_flag & VROOT, file: ../../common/fs/gfs.c, line: 426 (141909-01) 9229:e3f8b41e5db4 6807765 ztest_dsl_dataset_promote_busy needs to clean up after ENOSPC (141445-01) 9230:e4561e3eb1ef 6821169 offlining a device results in checksum errors (141445-01) 6821170 ZFS should not increment error stats for unavailable devices (141445-01) 6824006 need to increase issue and interrupt taskqs threads in zfs (141445-01) 9234:bffdc4fc05c4 6792139 recovering from a suspended pool needs some work (141445-01) 6794830 reboot command hangs on a failed zfs pool (141445-01) 9246:67c03c93c071 6824062 System panicked in zfs_mount due to NULL pointer dereference when running btts and svvs tests (141909-01) 9276:a8a7fc849933 6816124 System crash running zpool destroy on broken zpool (141445-03) 9355:09928982c591 6818183 zfs snapshot -r is slow due to set_snap_props() doing txg_wait_synced() for each new snapshot (141445-03) 9391:413d0661ef33 6710376 log device can show incorrect status when other parts of pool are degraded (141445-03) 9396:f41cf682d0d3 (part already merged) 6501037 want user/group quotas on ZFS (141445-03) 6827260 assertion failed in arc_read(): hdr == pbuf->b_hdr (141445-03) 6815592 panic: No such hold X on refcount Y from zfs_znode_move (141445-03) 6759986 zfs list shows temporary %clone when doing online zfs recv (141445-03) 9404:319573cd93f8 6774713 zfs ignores canmount=noauto when sharenfs property != off (141445-03) 9412:4aefd8704ce0 6717022 ZFS DMU needs zero-copy support (141445-03) 9425:e7ffacaec3a8 6799895 spa_add_spares() needs to be protected by config lock (141445-03) 6826466 want to post sysevents on hot spare activation (141445-03) 6826468 spa 'allowfaulted' needs some work (141445-03) 6826469 kernel support for storing vdev FRU information (141445-03) 6826470 skip posting checksum errors from DTL regions of leaf vdevs (141445-03) 6826471 I/O errors after device remove probe can confuse FMA (141445-03) 6826472 spares should enjoy some of the benefits of cache devices (141445-03) 9443:2a96d8478e95 6833711 gang leaders shouldn't have to be logical (141445-03) 9463:d0bd231c7518 6764124 want zdb to be able to checksum metadata blocks only (141445-03) 9465:8372081b8019 6830237 zfs panic in zfs_groupmember() (141445-03) 9466:1fdfd1fed9c4 6833162 phantom log device in zpool status (141445-03) 9469:4f68f041ddcd 6824968 add ZFS userquota support to rquotad (141445-03) 9470:6d827468d7b5 6834217 godfather I/O should reexecute (141445-03) 9480:fcff33da767f 6596237 Stop looking and start ganging (141909-02) 9493:9933d599bc93 6623978 lwb->lwb_buf != NULL, file ../../../uts/common/fs/zfs/zil.c, line 787, function zil_lwb_commit (141445-06) 9512:64cafcbcc337 6801810 Commit of aligned streaming rewrites to ZIL device causes unwanted disk reads (N/A) 9515:d3b739d9d043 6586537 async zio taskqs can block out userland commands (142901-09) 9554:787363635b6a 6836768 zfs_userspace() callback has no way to indicate failure (N/A) 9574:1eb6a6ab2c57 6838062 zfs panics when an error is encountered in space_map_load() (141909-02) 9583:b0696cd037cc 6794136 Panic BAD TRAP: type=e when importing degraded zraid pool. (141909-03) 9630:e25a03f552e0 6776104 "zfs import" deadlock between spa_unload() and spa_async_thread() (141445-06) 9653:a70048a304d1 6664765 Unable to remove files when using fat-zap and quota exceeded on ZFS filesystem (141445-06) 9688:127be1845343 6841321 zfs userspace / zfs get userused@ doesn't work on mounted snapshot (N/A) 6843069 zfs get userused@S-1-... doesn't work (N/A) 9873:8ddc892eca6e 6847229 assertion failed: refcount_count(&tx->tx_space_written) + delta <= tx->tx_space_towrite in dmu_tx.c (141445-06) 9904:d260bd3fd47c 6838344 kernel heap corruption detected on zil while stress testing (141445-06) 9951:a4895b3dd543 6844900 zfs_ioc_userspace_upgrade leaks (N/A) 10040:38b25aeeaf7a 6857012 zfs panics on zpool import (141445-06) 10000:241a51d8720c 6848242 zdb -e no longer works as expected (N/A) 10100:4a6965f6bef8 6856634 snv_117 not booting: zfs_parse_bootfs: error2 (141445-07) 10160:a45b03783d44 6861983 zfs should use new name <-> SID interfaces (N/A) 6862984 userquota commands can hang (141445-06) 10299:80845694147f 6696858 zfs receive of incremental replication stream can dereference NULL pointer and crash (N/A) 10302:a9e3d1987706 6696858 zfs receive of incremental replication stream can dereference NULL pointer and crash (fix lint) (N/A) 10575:2a8816c5173b (partial merge) 6882227 spa_async_remove() shouldn't do a full clear (142901-14) 10800:469478b180d9 6880764 fsync on zfs is broken if writes are greater than 32kb on a hard crash and no log attached (142901-09) 6793430 zdb -ivvvv assertion failure: bp->blk_cksum.zc_word[2] == dmu_objset_id(zilog->zl_os) (N/A) 10801:e0bf032e8673 (partial merge) 6822816 assertion failed: zap_remove_int(ds_next_clones_obj) returns ENOENT (142901-09) 10810:b6b161a6ae4a 6892298 buf->b_hdr->b_state != arc_anon, file: ../../common/fs/zfs/arc.c, line: 2849 (142901-09) 10890:499786962772 6807339 spurious checksum errors when replacing a vdev (142901-13) 11249:6c30f7dfc97b 6906110 bad trap panic in zil_replay_log_record (142901-13) 6906946 zfs replay isn't handling uid/gid correctly (142901-13) 11454:6e69bacc1a5a 6898245 suspended zpool should not cause rest of the zfs/zpool commands to hang (142901-10) 11546:42ea6be8961b (partial merge) 6833999 3-way deadlock in dsl_dataset_hold_ref() and dsl_sync_task_group_sync() (142901-09) Discussed with: pjd Approved by: delphij (mentor) Obtained from: OpenSolaris (multiple Bug IDs) MFC after: 2 months Added: head/cddl/contrib/opensolaris/cmd/pyzfs/ head/cddl/contrib/opensolaris/cmd/pyzfs/pyzfs.py (contents, props changed) head/cddl/contrib/opensolaris/lib/pyzfs/ head/cddl/contrib/opensolaris/lib/pyzfs/common/ head/cddl/contrib/opensolaris/lib/pyzfs/common/__init__.py (contents, props changed) head/cddl/contrib/opensolaris/lib/pyzfs/common/allow.py (contents, props changed) head/cddl/contrib/opensolaris/lib/pyzfs/common/dataset.py (contents, props changed) head/cddl/contrib/opensolaris/lib/pyzfs/common/groupspace.py (contents, props changed) head/cddl/contrib/opensolaris/lib/pyzfs/common/ioctl.c (contents, props changed) head/cddl/contrib/opensolaris/lib/pyzfs/common/unallow.py (contents, props changed) head/cddl/contrib/opensolaris/lib/pyzfs/common/userspace.py (contents, props changed) head/cddl/contrib/opensolaris/lib/pyzfs/common/util.py (contents, props changed) head/sys/cddl/compat/opensolaris/kern/opensolaris_uio.c (contents, props changed) Modified: head/UPDATING head/cddl/compat/opensolaris/include/mnttab.h head/cddl/compat/opensolaris/misc/mnttab.c head/cddl/contrib/opensolaris/cmd/zdb/zdb.8 head/cddl/contrib/opensolaris/cmd/zdb/zdb.c head/cddl/contrib/opensolaris/cmd/zdb/zdb_il.c head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c head/cddl/contrib/opensolaris/cmd/ztest/ztest.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_changelist.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_graph.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c head/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h head/cddl/contrib/opensolaris/lib/libzpool/common/taskq.c head/sys/cddl/boot/zfs/zfsimpl.h head/sys/cddl/compat/opensolaris/kern/opensolaris_policy.c head/sys/cddl/compat/opensolaris/sys/misc.h head/sys/cddl/compat/opensolaris/sys/policy.h head/sys/cddl/compat/opensolaris/sys/sid.h head/sys/cddl/compat/opensolaris/sys/uio.h head/sys/cddl/compat/opensolaris/sys/vnode.h head/sys/cddl/contrib/opensolaris/common/zfs/zfs_deleg.c head/sys/cddl/contrib/opensolaris/common/zfs/zfs_deleg.h head/sys/cddl/contrib/opensolaris/common/zfs/zfs_namecheck.c head/sys/cddl/contrib/opensolaris/common/zfs/zfs_namecheck.h head/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c head/sys/cddl/contrib/opensolaris/common/zfs/zprop_common.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scrub.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_errlog.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_history.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dbuf.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_deleg.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dir.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_prop.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/space_map.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/uberblock_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_acl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_context.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ctldir.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_dir.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_fuid.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_vfsops.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_cache.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_fm.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_fuid.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_log.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_rlock.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c head/sys/cddl/contrib/opensolaris/uts/common/sys/acl.h head/sys/cddl/contrib/opensolaris/uts/common/sys/debug.h head/sys/cddl/contrib/opensolaris/uts/common/sys/fm/fs/zfs.h head/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h head/sys/cddl/contrib/opensolaris/uts/common/sys/sysevent/eventdefs.h head/sys/cddl/contrib/opensolaris/uts/common/sys/vnode.h head/sys/modules/zfs/Makefile Modified: head/UPDATING ============================================================================== --- head/UPDATING Mon Jul 12 23:01:21 2010 (r209961) +++ head/UPDATING Mon Jul 12 23:49:04 2010 (r209962) @@ -23,6 +23,13 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. ln -s aj /etc/malloc.conf.) +20100713: + A new version of ZFS (version 15) has been merged to -HEAD. + This version uses a python library for the following subcommands: + zfs allow, zfs unallow, zfs groupspace, zfs userspace. + For full functionality of these commands the following port must + be installed: sysutils/py-zfs + 20100429: 'vm_page's are now hashed by physical address to an array of mutexes. Currently this is only used to serialize access to hold_count. Over @@ -964,6 +971,22 @@ COMMON ITEMS: path, and has the highest probability of being successful. Please try this approach before reporting problems with a major version upgrade. + ZFS notes + --------- + When upgrading the boot ZFS pool to a new version, always follow + these two steps: + + 1.) recompile and reinstall the ZFS boot loader and boot block + (this is part of "make buildworld" and "make installworld") + + 2.) update the ZFS boot block on your boot drive + + The following example updates the ZFS boot block on the first + partition (freebsd-boot) of a GPT partitioned drive ad0: + "gpart bootcode -p /boot/gptzfsboot -i 1 ad0" + + Non-boot pools do not need these updates. + To build a kernel ----------------- If you are updating from a prior version of FreeBSD (even one just Modified: head/cddl/compat/opensolaris/include/mnttab.h ============================================================================== --- head/cddl/compat/opensolaris/include/mnttab.h Mon Jul 12 23:01:21 2010 (r209961) +++ head/cddl/compat/opensolaris/include/mnttab.h Mon Jul 12 23:49:04 2010 (r209962) @@ -3,10 +3,13 @@ #ifndef _OPENSOLARIS_MNTTAB_H_ #define _OPENSOLARIS_MNTTAB_H_ +#include +#include + #include #include -#define MNTTAB _PATH_DEVNULL +#define MNTTAB _PATH_DEVZERO #define MNT_LINE_MAX 1024 #define umount2(p, f) unmount(p, f) @@ -17,7 +20,12 @@ struct mnttab { char *mnt_fstype; char *mnt_mntopts; }; +#define extmnttab mnttab int getmntany(FILE *fd, struct mnttab *mgetp, struct mnttab *mrefp); +int getmntent(FILE *fp, struct mnttab *mp); +char *hasmntopt(struct mnttab *mnt, char *opt); + +void statfs2mnttab(struct statfs *sfs, struct mnttab *mp); #endif /* !_OPENSOLARIS_MNTTAB_H_ */ Modified: head/cddl/compat/opensolaris/misc/mnttab.c ============================================================================== --- head/cddl/compat/opensolaris/misc/mnttab.c Mon Jul 12 23:01:21 2010 (r209961) +++ head/cddl/compat/opensolaris/misc/mnttab.c Mon Jul 12 23:49:04 2010 (r209962) @@ -36,6 +36,9 @@ __FBSDID("$FreeBSD$"); #include #include #include + +#include +#include #include #include #include @@ -88,75 +91,126 @@ optadd(char *mntopts, size_t size, const strlcat(mntopts, opt, size); } -int -getmntany(FILE *fd __unused, struct mnttab *mgetp, struct mnttab *mrefp) +void +statfs2mnttab(struct statfs *sfs, struct mnttab *mp) { - static struct statfs *sfs = NULL; static char mntopts[MNTMAXSTR]; - struct opt *o; - long i, n, flags; + long flags; - if (sfs != NULL) { - free(sfs); - sfs = NULL; - } mntopts[0] = '\0'; - n = getfsstat(NULL, 0, MNT_NOWAIT); - if (n == -1) - return (-1); - n = sizeof(*sfs) * (n + 8); - sfs = malloc(n); - if (sfs == NULL) - return (-1); - n = getfsstat(sfs, n, MNT_WAIT); - if (n == -1) { - free(sfs); - sfs = NULL; - return (-1); + flags = sfs->f_flags; +#define OPTADD(opt) optadd(mntopts, sizeof(mntopts), (opt)) + if (flags & MNT_RDONLY) + OPTADD(MNTOPT_RO); + else + OPTADD(MNTOPT_RW); + if (flags & MNT_NOSUID) + OPTADD(MNTOPT_NOSUID); + else + OPTADD(MNTOPT_SETUID); + if (flags & MNT_UPDATE) + OPTADD(MNTOPT_REMOUNT); + if (flags & MNT_NOATIME) + OPTADD(MNTOPT_NOATIME); + else + OPTADD(MNTOPT_ATIME); + OPTADD(MNTOPT_NOXATTR); + if (flags & MNT_NOEXEC) + OPTADD(MNTOPT_NOEXEC); + else + OPTADD(MNTOPT_EXEC); +#undef OPTADD + mp->mnt_special = sfs->f_mntfromname; + mp->mnt_mountp = sfs->f_mntonname; + mp->mnt_fstype = sfs->f_fstypename; + mp->mnt_mntopts = mntopts; +} + +static struct statfs *gsfs = NULL; +static int allfs = 0; + +static int +statfs_init(void) +{ + struct statfs *sfs; + int error; + + if (gsfs != NULL) { + free(gsfs); + gsfs = NULL; } - for (i = 0; i < n; i++) { + allfs = getfsstat(NULL, 0, MNT_WAIT); + if (allfs == -1) + goto fail; + gsfs = malloc(sizeof(gsfs[0]) * allfs * 2); + if (gsfs == NULL) + goto fail; + allfs = getfsstat(gsfs, (long)(sizeof(gsfs[0]) * allfs * 2), + MNT_WAIT); + if (allfs == -1) + goto fail; + sfs = realloc(gsfs, allfs * sizeof(gsfs[0])); + if (sfs != NULL) + gsfs = sfs; + return (0); +fail: + error = errno; + if (gsfs != NULL) + free(gsfs); + gsfs = NULL; + allfs = 0; + return (error); +} + +int +getmntany(FILE *fd __unused, struct mnttab *mgetp, struct mnttab *mrefp) +{ + struct statfs *sfs; + int i, error; + + error = statfs_init(); + if (error != 0) + return (error); + + for (i = 0; i < allfs; i++) { if (mrefp->mnt_special != NULL && - strcmp(mrefp->mnt_special, sfs[i].f_mntfromname) != 0) { + strcmp(mrefp->mnt_special, gsfs[i].f_mntfromname) != 0) { continue; } if (mrefp->mnt_mountp != NULL && - strcmp(mrefp->mnt_mountp, sfs[i].f_mntonname) != 0) { + strcmp(mrefp->mnt_mountp, gsfs[i].f_mntonname) != 0) { continue; } if (mrefp->mnt_fstype != NULL && - strcmp(mrefp->mnt_fstype, sfs[i].f_fstypename) != 0) { + strcmp(mrefp->mnt_fstype, gsfs[i].f_fstypename) != 0) { continue; } - flags = sfs[i].f_flags; -#define OPTADD(opt) optadd(mntopts, sizeof(mntopts), (opt)) - if (flags & MNT_RDONLY) - OPTADD(MNTOPT_RO); - else - OPTADD(MNTOPT_RW); - if (flags & MNT_NOSUID) - OPTADD(MNTOPT_NOSUID); - else - OPTADD(MNTOPT_SETUID); - if (flags & MNT_UPDATE) - OPTADD(MNTOPT_REMOUNT); - if (flags & MNT_NOATIME) - OPTADD(MNTOPT_NOATIME); - else - OPTADD(MNTOPT_ATIME); - OPTADD(MNTOPT_NOXATTR); - if (flags & MNT_NOEXEC) - OPTADD(MNTOPT_NOEXEC); - else - OPTADD(MNTOPT_EXEC); -#undef OPTADD - mgetp->mnt_special = sfs[i].f_mntfromname; - mgetp->mnt_mountp = sfs[i].f_mntonname; - mgetp->mnt_fstype = sfs[i].f_fstypename; - mgetp->mnt_mntopts = mntopts; + statfs2mnttab(&gsfs[i], mgetp); return (0); } - free(sfs); - sfs = NULL; return (-1); } + +int +getmntent(FILE *fp, struct mnttab *mp) +{ + struct statfs *sfs; + int error, nfs; + + nfs = (int)lseek(fileno(fp), 0, SEEK_CUR); + if (nfs == -1) + return (errno); + /* If nfs is 0, we want to refresh out cache. */ + if (nfs == 0 || gsfs == NULL) { + error = statfs_init(); + if (error != 0) + return (error); + } + if (nfs >= allfs) + return (-1); + statfs2mnttab(&gsfs[nfs], mp); + if (lseek(fileno(fp), 1, SEEK_CUR) == -1) + return (errno); + return (0); +} Added: head/cddl/contrib/opensolaris/cmd/pyzfs/pyzfs.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/pyzfs/pyzfs.py Mon Jul 12 23:49:04 2010 (r209962) @@ -0,0 +1,79 @@ +#! /usr/bin/python2.4 -S +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# Copyright 2009 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +# Note, we want SIGINT (control-c) to exit the process quietly, to mimic +# the standard behavior of C programs. The best we can do with pure +# Python is to run with -S (to disable "import site"), and start our +# program with a "try" statement. Hopefully nobody hits ^C before our +# try statement is executed. + +try: + import site + import gettext + import zfs.util + import zfs.ioctl + import sys + import errno + + """This is the main script for doing zfs subcommands. It doesn't know + what subcommands there are, it just looks for a module zfs. + that implements that subcommand.""" + + _ = gettext.translation("SUNW_OST_OSCMD", "/usr/lib/locale", + fallback=True).gettext + + if len(sys.argv) < 2: + sys.exit(_("missing subcommand argument")) + + zfs.ioctl.set_cmdstr(" ".join(["zfs"] + sys.argv[1:])) + + try: + # import zfs. + # subfunc = zfs..do_ + + subcmd = sys.argv[1] + __import__("zfs." + subcmd) + submod = getattr(zfs, subcmd) + subfunc = getattr(submod, "do_" + subcmd) + except (ImportError, AttributeError): + sys.exit(_("invalid subcommand")) + + try: + subfunc() + except zfs.util.ZFSError, e: + print(e) + sys.exit(1) + +except IOError, e: + import errno + import sys + + if e.errno == errno.EPIPE: + sys.exit(1) + raise +except KeyboardInterrupt: + import sys + + sys.exit(1) Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.8 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zdb/zdb.8 Mon Jul 12 23:01:21 2010 (r209961) +++ head/cddl/contrib/opensolaris/cmd/zdb/zdb.8 Mon Jul 12 23:49:04 2010 (r209962) @@ -1,23 +1,8 @@ '\" te -.\" CDDL HEADER START -.\" -.\" The contents of this file are subject to the terms of the -.\" Common Development and Distribution License (the "License"). -.\" You may not use this file except in compliance with the License. -.\" -.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -.\" or http://www.opensolaris.org/os/licensing. -.\" See the License for the specific language governing permissions -.\" and limitations under the License. -.\" -.\" When distributing Covered Code, include this CDDL HEADER in each -.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE. -.\" If applicable, add the following below this CDDL HEADER, with the -.\" fields enclosed by brackets "[]" replaced with your own identifying -.\" information: Portions Copyright [yyyy] [name of copyright owner] -.\" -.\" CDDL HEADER END .\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] .TH zdb 1M "31 Oct 2005" "SunOS 5.11" "System Administration Commands" .SH NAME zdb \- ZFS debugger Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Mon Jul 12 23:01:21 2010 (r209961) +++ head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Mon Jul 12 23:49:04 2010 (r209962) @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -87,8 +87,8 @@ static void usage(void) { (void) fprintf(stderr, - "Usage: %s [-udibcsv] [-U cachefile_path] " - "[-S user:cksumalg] " + "Usage: %s [-udibcsvL] [-U cachefile_path] [-t txg]\n" + "\t [-S user:cksumalg] " "dataset [object...]\n" " %s -C [pool]\n" " %s -l dev\n" @@ -102,12 +102,16 @@ usage(void) (void) fprintf(stderr, " -C cached pool configuration\n"); (void) fprintf(stderr, " -i intent logs\n"); (void) fprintf(stderr, " -b block statistics\n"); - (void) fprintf(stderr, " -c checksum all data blocks\n"); + (void) fprintf(stderr, " -m metaslabs\n"); + (void) fprintf(stderr, " -c checksum all metadata (twice for " + "all data) blocks\n"); (void) fprintf(stderr, " -s report stats on zdb's I/O\n"); (void) fprintf(stderr, " -S : -- " "dump blkptr signatures\n"); (void) fprintf(stderr, " -v verbose (applies to all others)\n"); (void) fprintf(stderr, " -l dump label contents\n"); + (void) fprintf(stderr, " -L disable leak tracking (do not " + "load spacemaps)\n"); (void) fprintf(stderr, " -U cachefile_path -- use alternate " "cachefile\n"); (void) fprintf(stderr, " -R read and display block from a " @@ -115,12 +119,19 @@ usage(void) (void) fprintf(stderr, " -e Pool is exported/destroyed/" "has altroot\n"); (void) fprintf(stderr, " -p (use with -e)\n"); + (void) fprintf(stderr, " -t highest txg to use when " + "searching for uberblocks\n"); (void) fprintf(stderr, "Specify an option more than once (e.g. -bb) " "to make only that option verbose\n"); (void) fprintf(stderr, "Default is to dump everything non-verbosely\n"); exit(1); } +/* + * Called for usage errors that are discovered after a call to spa_open(), + * dmu_bonus_hold(), or pool_match(). abort() is called for other errors. + */ + static void fatal(const char *fmt, ...) { @@ -132,7 +143,7 @@ fatal(const char *fmt, ...) va_end(ap); (void) fprintf(stderr, "\n"); - abort(); + exit(1); } static void @@ -205,7 +216,7 @@ dump_packed_nvlist(objset_t *os, uint64_ size_t nvsize = *(uint64_t *)data; char *packed = umem_alloc(nvsize, UMEM_NOFAIL); - VERIFY(0 == dmu_read(os, object, 0, nvsize, packed)); + VERIFY(0 == dmu_read(os, object, 0, nvsize, packed, DMU_READ_PREFETCH)); VERIFY(nvlist_unpack(packed, nvsize, &nv, 0) == 0); @@ -431,7 +442,7 @@ dump_spacemap(objset_t *os, space_map_ob alloc = 0; for (offset = 0; offset < smo->smo_objsize; offset += sizeof (entry)) { VERIFY(0 == dmu_read(os, smo->smo_object, offset, - sizeof (entry), &entry)); + sizeof (entry), &entry, DMU_READ_PREFETCH)); if (SM_DEBUG_DECODE(entry)) { (void) printf("\t\t[%4llu] %s: txg %llu, pass %llu\n", (u_longlong_t)(offset / sizeof (entry)), @@ -463,6 +474,21 @@ dump_spacemap(objset_t *os, space_map_ob } static void +dump_metaslab_stats(metaslab_t *msp) +{ + char maxbuf[5]; + space_map_t *sm = &msp->ms_map; + avl_tree_t *t = sm->sm_pp_root; + int free_pct = sm->sm_space * 100 / sm->sm_size; + + nicenum(space_map_maxsize(sm), maxbuf); + + (void) printf("\t %20s %10lu %7s %6s %4s %4d%%\n", + "segments", avl_numnodes(t), "maxsize", maxbuf, + "freepct", free_pct); +} + +static void dump_metaslab(metaslab_t *msp) { char freebuf[5]; @@ -472,22 +498,28 @@ dump_metaslab(metaslab_t *msp) nicenum(msp->ms_map.sm_size - smo->smo_alloc, freebuf); - if (dump_opt['d'] <= 5) { - (void) printf("\t%10llx %10llu %5s\n", - (u_longlong_t)msp->ms_map.sm_start, - (u_longlong_t)smo->smo_object, - freebuf); - return; - } - (void) printf( - "\tvdev %llu offset %08llx spacemap %4llu free %5s\n", + "\tvdev %5llu offset %12llx spacemap %6llu free %5s\n", (u_longlong_t)vd->vdev_id, (u_longlong_t)msp->ms_map.sm_start, (u_longlong_t)smo->smo_object, freebuf); - ASSERT(msp->ms_map.sm_size == (1ULL << vd->vdev_ms_shift)); + if (dump_opt['m'] > 1) { + mutex_enter(&msp->ms_lock); + VERIFY(space_map_load(&msp->ms_map, zfs_metaslab_ops, + SM_FREE, &msp->ms_smo, spa->spa_meta_objset) == 0); + dump_metaslab_stats(msp); + space_map_unload(&msp->ms_map); + mutex_exit(&msp->ms_lock); + } + + if (dump_opt['d'] > 5 || dump_opt['m'] > 2) { + ASSERT(msp->ms_map.sm_size == (1ULL << vd->vdev_ms_shift)); + + mutex_enter(&msp->ms_lock); + dump_spacemap(spa->spa_meta_objset, smo, &msp->ms_map); + mutex_exit(&msp->ms_lock); + } - dump_spacemap(spa->spa_meta_objset, smo, &msp->ms_map); } static void @@ -502,14 +534,12 @@ dump_metaslabs(spa_t *spa) for (c = 0; c < rvd->vdev_children; c++) { vd = rvd->vdev_child[c]; - (void) printf("\n vdev %llu\n\n", (u_longlong_t)vd->vdev_id); + (void) printf("\t%-10s %-19s %-15s %-10s\n", + "vdev", "offset", "spacemap", "free"); + (void) printf("\t%10s %19s %15s %10s\n", + "----------", "-------------------", + "---------------", "-------------"); - if (dump_opt['d'] <= 5) { - (void) printf("\t%10s %10s %5s\n", - "offset", "spacemap", "free"); - (void) printf("\t%10s %10s %5s\n", - "------", "--------", "----"); - } for (m = 0; m < vd->vdev_ms_count; m++) dump_metaslab(vd->vdev_ms[m]); (void) printf("\n"); @@ -517,44 +547,52 @@ dump_metaslabs(spa_t *spa) } static void +dump_dtl_seg(space_map_t *sm, uint64_t start, uint64_t size) +{ + char *prefix = (void *)sm; + + (void) printf("%s [%llu,%llu) length %llu\n", + prefix, + (u_longlong_t)start, + (u_longlong_t)(start + size), + (u_longlong_t)(size)); +} + +static void dump_dtl(vdev_t *vd, int indent) { - avl_tree_t *t = &vd->vdev_dtl_map.sm_root; - space_seg_t *ss; - vdev_t *pvd; - int c; + spa_t *spa = vd->vdev_spa; + boolean_t required; + char *name[DTL_TYPES] = { "missing", "partial", "scrub", "outage" }; + char prefix[256]; + + spa_vdev_state_enter(spa); + required = vdev_dtl_required(vd); + (void) spa_vdev_state_exit(spa, NULL, 0); if (indent == 0) (void) printf("\nDirty time logs:\n\n"); - (void) printf("\t%*s%s\n", indent, "", + (void) printf("\t%*s%s [%s]\n", indent, "", vd->vdev_path ? vd->vdev_path : - vd->vdev_parent ? vd->vdev_ops->vdev_op_type : - spa_name(vd->vdev_spa)); - - for (ss = avl_first(t); ss; ss = AVL_NEXT(t, ss)) { - /* - * Everything in this DTL must appear in all parent DTL unions. - */ - for (pvd = vd; pvd; pvd = pvd->vdev_parent) - ASSERT(vdev_dtl_contains(&pvd->vdev_dtl_map, - ss->ss_start, ss->ss_end - ss->ss_start)); - (void) printf("\t%*soutage [%llu,%llu] length %llu\n", - indent, "", - (u_longlong_t)ss->ss_start, - (u_longlong_t)ss->ss_end - 1, - (u_longlong_t)(ss->ss_end - ss->ss_start)); - } - - (void) printf("\n"); + vd->vdev_parent ? vd->vdev_ops->vdev_op_type : spa_name(spa), + required ? "DTL-required" : "DTL-expendable"); - if (dump_opt['d'] > 5 && vd->vdev_children == 0) { - dump_spacemap(vd->vdev_spa->spa_meta_objset, &vd->vdev_dtl, - &vd->vdev_dtl_map); - (void) printf("\n"); + for (int t = 0; t < DTL_TYPES; t++) { + space_map_t *sm = &vd->vdev_dtl[t]; + if (sm->sm_space == 0) + continue; + (void) snprintf(prefix, sizeof (prefix), "\t%*s%s", + indent + 2, "", name[t]); + mutex_enter(sm->sm_lock); + space_map_walk(sm, dump_dtl_seg, (void *)prefix); + mutex_exit(sm->sm_lock); + if (dump_opt['d'] > 5 && vd->vdev_children == 0) + dump_spacemap(spa->spa_meta_objset, + &vd->vdev_dtl_smo, sm); } - for (c = 0; c < vd->vdev_children; c++) + for (int c = 0; c < vd->vdev_children; c++) dump_dtl(vd->vdev_child[c], indent + 4); } @@ -668,7 +706,8 @@ visit_indirect(spa_t *spa, const dnode_p break; fill += cbp->blk_fill; } - ASSERT3U(fill, ==, bp->blk_fill); + if (!err) + ASSERT3U(fill, ==, bp->blk_fill); (void) arc_buf_remove_ref(buf, &buf); } @@ -904,6 +943,7 @@ dump_uidgid(objset_t *os, znode_phys_t * /* first find the fuid object. It lives in the master node */ VERIFY(zap_lookup(os, MASTER_NODE_OBJ, ZFS_FUID_TABLES, 8, 1, &fuid_obj) == 0); + zfs_fuid_avl_tree_create(&idx_tree, &domain_tree); (void) zfs_fuid_table_load(os, fuid_obj, &idx_tree, &domain_tree); fuid_table_loaded = B_TRUE; @@ -1007,6 +1047,8 @@ static object_viewer_t *object_viewer[DM dump_packed_nvlist, /* FUID nvlist size */ dump_zap, /* DSL dataset next clones */ dump_zap, /* DSL scrub queue */ + dump_zap, /* ZFS user/group used */ + dump_zap, /* ZFS user/group quota */ }; static void @@ -1070,6 +1112,14 @@ dump_object(objset_t *os, uint64_t objec } if (verbosity >= 4) { + (void) printf("\tdnode flags: %s%s\n", + (dn->dn_phys->dn_flags & DNODE_FLAG_USED_BYTES) ? + "USED_BYTES " : "", + (dn->dn_phys->dn_flags & DNODE_FLAG_USERUSED_ACCOUNTED) ? + "USERUSED_ACCOUNTED " : ""); + (void) printf("\tdnode maxblkid: %llu\n", + (longlong_t)dn->dn_phys->dn_maxblkid); + object_viewer[doi.doi_bonus_type](os, object, bonus, bsize); object_viewer[doi.doi_type](os, object, NULL, 0); *print_header = 1; @@ -1124,7 +1174,7 @@ dump_dir(objset_t *os) uint64_t object, object_count; uint64_t refdbytes, usedobjs, scratch; char numbuf[8]; - char blkbuf[BP_SPRINTF_LEN]; + char blkbuf[BP_SPRINTF_LEN + 20]; char osname[MAXNAMELEN]; char *type = "UNKNOWN"; int verbosity = dump_opt['d']; @@ -1150,8 +1200,8 @@ dump_dir(objset_t *os) nicenum(refdbytes, numbuf); if (verbosity >= 4) { - (void) strcpy(blkbuf, ", rootbp "); - sprintf_blkptr(blkbuf + strlen(blkbuf), + (void) sprintf(blkbuf + strlen(blkbuf), ", rootbp "); + (void) sprintf_blkptr(blkbuf + strlen(blkbuf), BP_SPRINTF_LEN - strlen(blkbuf), os->os->os_rootbp); } else { blkbuf[0] = '\0'; @@ -1186,7 +1236,12 @@ dump_dir(objset_t *os) } dump_object(os, 0, verbosity, &print_header); - object_count = 1; + object_count = 0; + if (os->os->os_userused_dnode && + os->os->os_userused_dnode->dn_type != 0) { + dump_object(os, DMU_USERUSED_OBJECT, verbosity, &print_header); + dump_object(os, DMU_GROUPUSED_OBJECT, verbosity, &print_header); + } object = 0; while ((error = dmu_object_next(os, &object, B_FALSE, 0)) == 0) { @@ -1198,8 +1253,10 @@ dump_dir(objset_t *os) (void) printf("\n"); - if (error != ESRCH) - fatal("dmu_object_next() = %d", error); + if (error != ESRCH) { + (void) fprintf(stderr, "dmu_object_next() = %d\n", error); + abort(); + } } static void @@ -1390,7 +1447,8 @@ static space_map_ops_t zdb_space_map_ops zdb_space_map_unload, NULL, /* alloc */ zdb_space_map_claim, - NULL /* free */ + NULL, /* free */ + NULL /* maxsize */ }; static void @@ -1489,8 +1547,9 @@ zdb_count_block(spa_t *spa, zdb_cb_t *zc } } - VERIFY(zio_wait(zio_claim(NULL, spa, spa_first_txg(spa), bp, - NULL, NULL, ZIO_FLAG_MUSTSUCCEED)) == 0); + if (!dump_opt['L']) + VERIFY(zio_wait(zio_claim(NULL, spa, spa_first_txg(spa), bp, + NULL, NULL, ZIO_FLAG_MUSTSUCCEED)) == 0); } static int @@ -1499,13 +1558,25 @@ zdb_blkptr_cb(spa_t *spa, blkptr_t *bp, { zdb_cb_t *zcb = arg; char blkbuf[BP_SPRINTF_LEN]; + dmu_object_type_t type; + boolean_t is_l0_metadata; if (bp == NULL) return (0); - zdb_count_block(spa, zcb, bp, BP_GET_TYPE(bp)); + type = BP_GET_TYPE(bp); + + zdb_count_block(spa, zcb, bp, type); - if (dump_opt['c'] || dump_opt['S']) { + /* + * if we do metadata-only checksumming there's no need to checksum + * indirect blocks here because it is done during traverse + */ + is_l0_metadata = (BP_GET_LEVEL(bp) == 0 && type < DMU_OT_NUMTYPES && + dmu_ot[type].ot_metadata); + + if (dump_opt['c'] > 1 || dump_opt['S'] || + (dump_opt['c'] && is_l0_metadata)) { int ioerr, size; void *data; @@ -1517,7 +1588,7 @@ zdb_blkptr_cb(spa_t *spa, blkptr_t *bp, free(data); /* We expect io errors on intent log */ - if (ioerr && BP_GET_TYPE(bp) != DMU_OT_INTENT_LOG) { + if (ioerr && type != DMU_OT_INTENT_LOG) { zcb->zcb_haderrors = 1; zcb->zcb_errors[ioerr]++; @@ -1565,9 +1636,12 @@ dump_block_stats(spa_t *spa) int c, e; if (!dump_opt['S']) { - (void) printf("\nTraversing all blocks to %sverify" - " nothing leaked ...\n", - dump_opt['c'] ? "verify checksums and " : ""); + (void) printf("\nTraversing all blocks %s%s%s%s%s...\n", + (dump_opt['c'] || !dump_opt['L']) ? "to verify " : "", + (dump_opt['c'] == 1) ? "metadata " : "", + dump_opt['c'] ? "checksums " : "", + (dump_opt['c'] && !dump_opt['L']) ? "and verify " : "", + !dump_opt['L'] ? "nothing leaked " : ""); } /* @@ -1578,7 +1652,8 @@ dump_block_stats(spa_t *spa) * it's not part of any space map) is a double allocation, * reference to a freed block, or an unclaimed log block. */ - zdb_leak_init(spa); + if (!dump_opt['L']) + zdb_leak_init(spa); /* * If there's a deferred-free bplist, process that first. @@ -1620,7 +1695,8 @@ dump_block_stats(spa_t *spa) /* * Report any leaked segments. */ - zdb_leak_fini(spa); + if (!dump_opt['L']) + zdb_leak_fini(spa); /* * If we're interested in printing out the blkptr signatures, @@ -1646,14 +1722,16 @@ dump_block_stats(spa_t *spa) tzb = &zcb.zcb_type[ZB_TOTAL][DMU_OT_TOTAL]; if (tzb->zb_asize == alloc + logalloc) { - (void) printf("\n\tNo leaks (block sum matches space" - " maps exactly)\n"); + if (!dump_opt['L']) + (void) printf("\n\tNo leaks (block sum matches space" + " maps exactly)\n"); } else { (void) printf("block traversal size %llu != alloc %llu " - "(leaked %lld)\n", + "(%s %lld)\n", (u_longlong_t)tzb->zb_asize, (u_longlong_t)alloc + logalloc, - (u_longlong_t)(alloc + logalloc - tzb->zb_asize)); + (dump_opt['L']) ? "unreachable" : "leaked", + (longlong_t)(alloc + logalloc - tzb->zb_asize)); leaks = 1; } @@ -1760,14 +1838,17 @@ dump_zpool(spa_t *spa) if (dump_opt['u']) dump_uberblock(&spa->spa_uberblock); - if (dump_opt['d'] || dump_opt['i']) { + if (dump_opt['d'] || dump_opt['i'] || dump_opt['m']) { dump_dir(dp->dp_meta_objset); if (dump_opt['d'] >= 3) { dump_bplist(dp->dp_meta_objset, spa->spa_sync_bplist_obj, "Deferred frees"); dump_dtl(spa->spa_root_vdev, 0); - dump_metaslabs(spa); } + + if (dump_opt['d'] >= 3 || dump_opt['m']) + dump_metaslabs(spa); + (void) dmu_objset_find(spa_name(spa), dump_one_dir, NULL, DS_FIND_SNAPSHOTS | DS_FIND_CHILDREN); } @@ -2243,13 +2324,14 @@ main(int argc, char **argv) dprintf_setup(&argc, argv); - while ((c = getopt(argc, argv, "udibcsvCS:U:lRep:")) != -1) { + while ((c = getopt(argc, argv, "udibcmsvCLS:U:lRep:t:")) != -1) { switch (c) { case 'u': case 'd': case 'i': case 'b': case 'c': + case 'm': case 's': case 'C': case 'l': @@ -2257,6 +2339,9 @@ main(int argc, char **argv) dump_opt[c]++; dump_all = 0; break; + case 'L': + dump_opt[c]++; + break; case 'v': verbose++; break; @@ -2287,6 +2372,14 @@ main(int argc, char **argv) else usage(); break; + case 't': + ub_max_txg = strtoull(optarg, NULL, 0); + if (ub_max_txg < TXG_INITIAL) { + (void) fprintf(stderr, "incorrect txg " + "specified: %s\n", optarg); + usage(); + } + break; default: usage(); break; @@ -2374,7 +2467,7 @@ main(int argc, char **argv) } if (error == 0) - error = spa_import_faulted(argv[0], + error = spa_import_verbatim(argv[0], exported_conf, nvl); nvlist_free(nvl); Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb_il.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zdb/zdb_il.c Mon Jul 12 23:01:21 2010 (r209961) +++ head/cddl/contrib/opensolaris/cmd/zdb/zdb_il.c Mon Jul 12 23:49:04 2010 (r209962) @@ -115,7 +115,7 @@ zil_prt_rec_write(zilog_t *zilog, int tx (u_longlong_t)lr->lr_foid, (longlong_t)lr->lr_offset, (u_longlong_t)lr->lr_length, (u_longlong_t)lr->lr_blkoff); - if (verbose < 5) + if (txtype == TX_WRITE2 || verbose < 5) return; if (lr->lr_common.lrc_reclen == sizeof (lr_write_t)) { @@ -123,18 +123,19 @@ zil_prt_rec_write(zilog_t *zilog, int tx bp->blk_birth >= spa_first_txg(zilog->zl_spa) ? "will claim" : "won't claim"); print_log_bp(bp, "\t\t\t"); + if (BP_IS_HOLE(bp)) { + (void) printf("\t\t\tLSIZE 0x%llx\n", + (u_longlong_t)BP_GET_LSIZE(bp)); + } if (bp->blk_birth == 0) { bzero(buf, sizeof (buf)); } else { zbookmark_t zb; - ASSERT3U(bp->blk_cksum.zc_word[ZIL_ZC_OBJSET], ==, - dmu_objset_id(zilog->zl_os)); - - zb.zb_objset = bp->blk_cksum.zc_word[ZIL_ZC_OBJSET]; - zb.zb_object = 0; - zb.zb_level = -1; - zb.zb_blkid = bp->blk_cksum.zc_word[ZIL_ZC_SEQ]; + zb.zb_objset = dmu_objset_id(zilog->zl_os); + zb.zb_object = lr->lr_foid; + zb.zb_level = 0; + zb.zb_blkid = -1; /* unknown */ error = zio_wait(zio_read(NULL, zilog->zl_spa, bp, buf, BP_GET_LSIZE(bp), NULL, NULL, @@ -251,6 +252,7 @@ static zil_rec_info_t zil_rec_info[TX_MA { zil_prt_rec_create, "TX_MKDIR_ACL " }, { zil_prt_rec_create, "TX_MKDIR_ATTR " }, { zil_prt_rec_create, "TX_MKDIR_ACL_ATTR " }, + { zil_prt_rec_write, "TX_WRITE2 " }, }; /* ARGSUSED */ Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Mon Jul 12 23:01:21 2010 (r209961) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Mon Jul 12 23:49:04 2010 (r209962) @@ -1,9 +1,12 @@ '\" te .\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved. -.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. -.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. -.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH zfs 1M "14 Feb 2009" "SunOS 5.11" "System Administration Commands" +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. +.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with +.\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. +.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with +.\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH zfs 1M "5 May 2009" "SunOS 5.11" "System Administration Commands" .SH NAME zfs \- configures ZFS file systems .SH SYNOPSIS @@ -66,7 +69,7 @@ zfs \- configures ZFS file systems .LP .nf -\fBzfs\fR \fBlist\fR [\fB-rH\fR] [\fB-o\fR \fIproperty\fR[,...]] [\fB-t\fR \fItype\fR[,...]] +\fBzfs\fR \fBlist\fR [\fB-r\fR|\fB-d\fR \fIdepth\fR][\fB-H\fR][\fB-o\fR \fIproperty\fR[,...]] [\fB-t\fR \fItype\fR[,...]] [\fB-s\fR \fIproperty\fR] ... [\fB-S\fR \fIproperty\fR] ... [\fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR] ... .fi @@ -77,8 +80,8 @@ zfs \- configures ZFS file systems .LP .nf -\fBzfs\fR \fBget\fR [\fB-rHp\fR] [\fB-o\fR \fIfield\fR[,...]] [\fB-s\fR \fIsource\fR[,...]] "\fIall\fR" | \fIproperty\fR[,...] - \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR ... +\fBzfs\fR \fBget\fR [\fB-r\fR|\fB-d\fR \fIdepth\fR][\fB-Hp\fR][\fB-o\fR \fIfield\fR[,...]] [\fB-s\fR \fIsource\fR[,...]] + "\fIall\fR" | \fIproperty\fR[,...] \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR ... .fi .LP @@ -98,6 +101,18 @@ zfs \- configures ZFS file systems .LP .nf +\fBzfs\fR \fBuserspace\fR [\fB-niHp\fR] [\fB-o\fR \fIfield\fR[,...]] [\fB-sS\fR \fIfield\fR] ... + [\fB-t\fR \fItype\fR [,...]] \fIfilesystem\fR|\fIsnapshot\fR +.fi + +.LP +.nf +\fBzfs\fR \fBgroupspace\fR [\fB-niHp\fR] [\fB-o\fR \fIfield\fR[,...]] [\fB-sS\fR \fIfield\fR] ... + [\fB-t\fR \fItype\fR [,...]] \fIfilesystem\fR|\fIsnapshot\fR +.fi + +.LP +.nf \fBzfs\fR \fBmount\fR .fi *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 01:24:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0FBA71065674; Tue, 13 Jul 2010 01:24:03 +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 F2F848FC1B; Tue, 13 Jul 2010 01:24: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 o6D1O2s9073960; Tue, 13 Jul 2010 01:24:02 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6D1O2KX073958; Tue, 13 Jul 2010 01:24:02 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201007130124.o6D1O2KX073958@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 13 Jul 2010 01:24:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209963 - head/sys/sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 01:24:03 -0000 Author: nwhitehorn Date: Tue Jul 13 01:24:02 2010 New Revision: 209963 URL: http://svn.freebsd.org/changeset/base/209963 Log: Add a missing architecture declaration to the machine specification for sun4v. Modified: head/sys/sun4v/conf/DEFAULTS Modified: head/sys/sun4v/conf/DEFAULTS ============================================================================== --- head/sys/sun4v/conf/DEFAULTS Mon Jul 12 23:49:04 2010 (r209962) +++ head/sys/sun4v/conf/DEFAULTS Tue Jul 13 01:24:02 2010 (r209963) @@ -3,7 +3,7 @@ # # $FreeBSD$ -machine sun4v +machine sun4v sparc64 # Pseudo devices. device mem # Memory and kernel memory devices From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 01:55:04 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E95F1106566B; Tue, 13 Jul 2010 01:55:03 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [IPv6:2001:470:a803::1]) by mx1.freebsd.org (Postfix) with ESMTP id 8F1178FC16; Tue, 13 Jul 2010 01:55:03 +0000 (UTC) Received: from mail.geekcn.org (tarsier.geekcn.org [211.166.10.233]) by tarsier.geekcn.org (Postfix) with ESMTP id 98357A5C894; Tue, 13 Jul 2010 09:55:02 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([211.166.10.233]) by mail.geekcn.org (mail.geekcn.org [211.166.10.233]) (amavisd-new, port 10024) with LMTP id pumrU-lgYZYK; Tue, 13 Jul 2010 09:54:56 +0800 (CST) Received: from delta.delphij.net (drawbridge.ixsystems.com [206.40.55.65]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTPSA id A35F3A5C544; Tue, 13 Jul 2010 09:54:54 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:reply-to:organization:user-agent: mime-version:to:cc:subject:references:in-reply-to: x-enigmail-version:openpgp:content-type:content-transfer-encoding; b=bcDwslpTWFOqnTqmDAWuo3I30sj7DIbmups9V3FiH03baJIRC4GuhYpOF+ulU5yUe q/d48XOvnuysvRDKgfnPA== Message-ID: <4C3BC76B.3090108@delphij.net> Date: Mon, 12 Jul 2010 18:54:51 -0700 From: Xin LI Organization: The Geek China Organization User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.10) Gecko/20100629 Thunderbird/3.0.5 ThunderBrowse/3.3 MIME-Version: 1.0 To: Jung-uk Kim References: <201007122108.o6CL8Z3l017785@svn.freebsd.org> In-Reply-To: <201007122108.o6CL8Z3l017785@svn.freebsd.org> X-Enigmail-Version: 1.0.1 OpenPGP: id=3FCA37C1; url=http://www.delphij.net/delphij.asc Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG Subject: Re: svn commit: r209957 - in head/sys: amd64/acpica conf modules/acpi/acpi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 01:55:04 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 2010/07/12 14:08, Jung-uk Kim wrote: > Author: jkim > Date: Mon Jul 12 21:08:35 2010 > New Revision: 209957 > URL: http://svn.freebsd.org/changeset/base/209957 > > Log: > Move i386-inherited logic of building ACPI headers for acpi_wakeup.c into > better places and remove intermediate makefile and shell scripts. This > makes parallel kernel build little bit safer for amd64. Oh nice, this have fixed my parallel build issue, thanks! Cheers, - -- Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (FreeBSD) iQEcBAEBCAAGBQJMO8drAAoJEATO+BI/yjfBlTYIAL86ZEIFaJ5v44fQ8nLxYvM2 H6uxQgwXTILxZhTnfli/Iv9qWE5l+XcW0oElP/FpsftYnrYKJJ4NeOeHMuNdxMd8 LGK5SOlypOAmvCYHF1OswLjCmBBeTCc1jfrgiv98XtMQ/+eJXXW+gclmeAQgqhSn +BDSgd4t81rMJRV6avtC4Hz/ZASeBZjUU5dpgmOuzdMsv9c9xWI/fUCnmQv7z22M 8OEH0PJ2Z4Rpa+iEaNRY4rYR2V+qKyVooDvVFRcvorHhxx53tuaze1SLTVDgp8db vvPCy7cyJ2r7Ko/Ovyi/gSazS9FwD3IQM10mFFHeVGyjbVVsz4HfQPCSnbEZdW0= =+06z -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 02:45:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A6066106566B; Tue, 13 Jul 2010 02:45:19 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 914DA8FC1A; Tue, 13 Jul 2010 02:45: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 o6D2jJhu091943; Tue, 13 Jul 2010 02:45:19 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6D2jJQK091941; Tue, 13 Jul 2010 02:45:19 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201007130245.o6D2jJQK091941@svn.freebsd.org> From: Colin Percival Date: Tue, 13 Jul 2010 02:45:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209964 - head/sys/kern releng/7.1 releng/7.1/sys/conf releng/7.1/sys/kern releng/7.3 releng/7.3/sys/conf releng/7.3/sys/kern releng/8.0 releng/8.0/sys/conf releng/8.0/sys/kern releng/8... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 02:45:19 -0000 Author: cperciva Date: Tue Jul 13 02:45:17 2010 New Revision: 209964 URL: http://svn.freebsd.org/changeset/base/209964 Log: Correctly copy the M_RDONLY flag when duplicating a reference to an mbuf external buffer. Approved by: so (cperciva) Approved by: re (kensmith) Security: FreeBSD-SA-10:07.mbuf Modified: stable/7/sys/kern/uipc_mbuf.c Changes in other areas also in this revision: Modified: head/sys/kern/uipc_mbuf.c releng/7.1/UPDATING releng/7.1/sys/conf/newvers.sh releng/7.1/sys/kern/uipc_mbuf.c releng/7.3/UPDATING releng/7.3/sys/conf/newvers.sh releng/7.3/sys/kern/uipc_mbuf.c releng/8.0/UPDATING releng/8.0/sys/conf/newvers.sh releng/8.0/sys/kern/uipc_mbuf.c releng/8.1/UPDATING releng/8.1/sys/kern/uipc_mbuf.c stable/8/sys/kern/uipc_mbuf.c Modified: stable/7/sys/kern/uipc_mbuf.c ============================================================================== --- stable/7/sys/kern/uipc_mbuf.c Tue Jul 13 01:24:02 2010 (r209963) +++ stable/7/sys/kern/uipc_mbuf.c Tue Jul 13 02:45:17 2010 (r209964) @@ -301,6 +301,7 @@ mb_dupcl(struct mbuf *n, struct mbuf *m) n->m_ext.ref_cnt = m->m_ext.ref_cnt; n->m_ext.ext_type = m->m_ext.ext_type; n->m_flags |= M_EXT; + n->m_flags |= m->m_flags & M_RDONLY; } /* From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 02:45:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B91AE106566C; Tue, 13 Jul 2010 02:45:19 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A590D8FC1B; Tue, 13 Jul 2010 02:45: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 o6D2jJuB091949; Tue, 13 Jul 2010 02:45:19 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6D2jJ8g091947; Tue, 13 Jul 2010 02:45:19 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201007130245.o6D2jJ8g091947@svn.freebsd.org> From: Colin Percival Date: Tue, 13 Jul 2010 02:45:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209964 - head/sys/kern releng/7.1 releng/7.1/sys/conf releng/7.1/sys/kern releng/7.3 releng/7.3/sys/conf releng/7.3/sys/kern releng/8.0 releng/8.0/sys/conf releng/8.0/sys/kern releng/8... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 02:45:19 -0000 Author: cperciva Date: Tue Jul 13 02:45:17 2010 New Revision: 209964 URL: http://svn.freebsd.org/changeset/base/209964 Log: Correctly copy the M_RDONLY flag when duplicating a reference to an mbuf external buffer. Approved by: so (cperciva) Approved by: re (kensmith) Security: FreeBSD-SA-10:07.mbuf Modified: head/sys/kern/uipc_mbuf.c Changes in other areas also in this revision: Modified: releng/7.1/UPDATING releng/7.1/sys/conf/newvers.sh releng/7.1/sys/kern/uipc_mbuf.c releng/7.3/UPDATING releng/7.3/sys/conf/newvers.sh releng/7.3/sys/kern/uipc_mbuf.c releng/8.0/UPDATING releng/8.0/sys/conf/newvers.sh releng/8.0/sys/kern/uipc_mbuf.c releng/8.1/UPDATING releng/8.1/sys/kern/uipc_mbuf.c stable/7/sys/kern/uipc_mbuf.c stable/8/sys/kern/uipc_mbuf.c Modified: head/sys/kern/uipc_mbuf.c ============================================================================== --- head/sys/kern/uipc_mbuf.c Tue Jul 13 01:24:02 2010 (r209963) +++ head/sys/kern/uipc_mbuf.c Tue Jul 13 02:45:17 2010 (r209964) @@ -302,6 +302,7 @@ mb_dupcl(struct mbuf *n, struct mbuf *m) n->m_ext.ref_cnt = m->m_ext.ref_cnt; n->m_ext.ext_type = m->m_ext.ext_type; n->m_flags |= M_EXT; + n->m_flags |= m->m_flags & M_RDONLY; } /* From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 02:45:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D563A1065675; Tue, 13 Jul 2010 02:45:19 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B7D4C8FC1C; Tue, 13 Jul 2010 02:45: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 o6D2jJJ2091965; Tue, 13 Jul 2010 02:45:19 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6D2jJUf091953; Tue, 13 Jul 2010 02:45:19 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201007130245.o6D2jJUf091953@svn.freebsd.org> From: Colin Percival Date: Tue, 13 Jul 2010 02:45:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209964 - head/sys/kern releng/7.1 releng/7.1/sys/conf releng/7.1/sys/kern releng/7.3 releng/7.3/sys/conf releng/7.3/sys/kern releng/8.0 releng/8.0/sys/conf releng/8.0/sys/kern releng/8... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 02:45:20 -0000 Author: cperciva Date: Tue Jul 13 02:45:17 2010 New Revision: 209964 URL: http://svn.freebsd.org/changeset/base/209964 Log: Correctly copy the M_RDONLY flag when duplicating a reference to an mbuf external buffer. Approved by: so (cperciva) Approved by: re (kensmith) Security: FreeBSD-SA-10:07.mbuf Modified: releng/7.1/UPDATING releng/7.1/sys/conf/newvers.sh releng/7.1/sys/kern/uipc_mbuf.c releng/7.3/UPDATING releng/7.3/sys/conf/newvers.sh releng/7.3/sys/kern/uipc_mbuf.c releng/8.0/UPDATING releng/8.0/sys/conf/newvers.sh releng/8.0/sys/kern/uipc_mbuf.c releng/8.1/UPDATING releng/8.1/sys/kern/uipc_mbuf.c Changes in other areas also in this revision: Modified: head/sys/kern/uipc_mbuf.c stable/7/sys/kern/uipc_mbuf.c stable/8/sys/kern/uipc_mbuf.c Modified: releng/7.1/UPDATING ============================================================================== --- releng/7.1/UPDATING Tue Jul 13 01:24:02 2010 (r209963) +++ releng/7.1/UPDATING Tue Jul 13 02:45:17 2010 (r209964) @@ -8,6 +8,10 @@ Items affecting the ports and packages s /usr/ports/UPDATING. Please read that file before running portupgrade. +20100713: p13 FreeBSD-SA-10:07.mbuf + Correctly copy the M_RDONLY flag when duplicating a reference + to an mbuf external buffer. + 20100526: p12 FreeBSD-SA-10:05.opie Fix a one-NUL-byte buffer overflow in libopie. [10:05] Modified: releng/7.1/sys/conf/newvers.sh ============================================================================== --- releng/7.1/sys/conf/newvers.sh Tue Jul 13 01:24:02 2010 (r209963) +++ releng/7.1/sys/conf/newvers.sh Tue Jul 13 02:45:17 2010 (r209964) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="7.1" -BRANCH="RELEASE-p12" +BRANCH="RELEASE-p13" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/7.1/sys/kern/uipc_mbuf.c ============================================================================== --- releng/7.1/sys/kern/uipc_mbuf.c Tue Jul 13 01:24:02 2010 (r209963) +++ releng/7.1/sys/kern/uipc_mbuf.c Tue Jul 13 02:45:17 2010 (r209964) @@ -301,6 +301,7 @@ mb_dupcl(struct mbuf *n, struct mbuf *m) n->m_ext.ref_cnt = m->m_ext.ref_cnt; n->m_ext.ext_type = m->m_ext.ext_type; n->m_flags |= M_EXT; + n->m_flags |= m->m_flags & M_RDONLY; } /* Modified: releng/7.3/UPDATING ============================================================================== --- releng/7.3/UPDATING Tue Jul 13 01:24:02 2010 (r209963) +++ releng/7.3/UPDATING Tue Jul 13 02:45:17 2010 (r209964) @@ -8,6 +8,10 @@ Items affecting the ports and packages s /usr/ports/UPDATING. Please read that file before running portupgrade. +20100713: p2 FreeBSD-SA-10:07.mbuf + Correctly copy the M_RDONLY flag when duplicating a reference + to an mbuf external buffer. + 20100526: p1 FreeBSD-SA-10:05.opie, FreeBSD-SA-10:06.nfsclient Fix a one-NUL-byte buffer overflow in libopie. [10:05] Modified: releng/7.3/sys/conf/newvers.sh ============================================================================== --- releng/7.3/sys/conf/newvers.sh Tue Jul 13 01:24:02 2010 (r209963) +++ releng/7.3/sys/conf/newvers.sh Tue Jul 13 02:45:17 2010 (r209964) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="7.3" -BRANCH="RELEASE-p1" +BRANCH="RELEASE-p2" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/7.3/sys/kern/uipc_mbuf.c ============================================================================== --- releng/7.3/sys/kern/uipc_mbuf.c Tue Jul 13 01:24:02 2010 (r209963) +++ releng/7.3/sys/kern/uipc_mbuf.c Tue Jul 13 02:45:17 2010 (r209964) @@ -301,6 +301,7 @@ mb_dupcl(struct mbuf *n, struct mbuf *m) n->m_ext.ref_cnt = m->m_ext.ref_cnt; n->m_ext.ext_type = m->m_ext.ext_type; n->m_flags |= M_EXT; + n->m_flags |= m->m_flags & M_RDONLY; } /* Modified: releng/8.0/UPDATING ============================================================================== --- releng/8.0/UPDATING Tue Jul 13 01:24:02 2010 (r209963) +++ releng/8.0/UPDATING Tue Jul 13 02:45:17 2010 (r209964) @@ -15,6 +15,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. debugging tools present in HEAD were left in place because sun4v support still needs work to become production ready. +20100713: p4 FreeBSD-SA-10:07.mbuf + Correctly copy the M_RDONLY flag when duplicating a reference + to an mbuf external buffer. + 20100526: p3 FreeBSD-SA-10:04.jail, FreeBSD-SA-10:05.opie, FreeBSD-SA-10:06.nfsclient Change the current working directory to be inside the jail created by Modified: releng/8.0/sys/conf/newvers.sh ============================================================================== --- releng/8.0/sys/conf/newvers.sh Tue Jul 13 01:24:02 2010 (r209963) +++ releng/8.0/sys/conf/newvers.sh Tue Jul 13 02:45:17 2010 (r209964) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="8.0" -BRANCH="RELEASE-p3" +BRANCH="RELEASE-p4" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/8.0/sys/kern/uipc_mbuf.c ============================================================================== --- releng/8.0/sys/kern/uipc_mbuf.c Tue Jul 13 01:24:02 2010 (r209963) +++ releng/8.0/sys/kern/uipc_mbuf.c Tue Jul 13 02:45:17 2010 (r209964) @@ -302,6 +302,7 @@ mb_dupcl(struct mbuf *n, struct mbuf *m) n->m_ext.ref_cnt = m->m_ext.ref_cnt; n->m_ext.ext_type = m->m_ext.ext_type; n->m_flags |= M_EXT; + n->m_flags |= m->m_flags & M_RDONLY; } /* Modified: releng/8.1/UPDATING ============================================================================== --- releng/8.1/UPDATING Tue Jul 13 01:24:02 2010 (r209963) +++ releng/8.1/UPDATING Tue Jul 13 02:45:17 2010 (r209964) @@ -15,6 +15,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. debugging tools present in HEAD were left in place because sun4v support still needs work to become production ready. +20100713: FreeBSD-SA-10:07.mbuf + Correctly copy the M_RDONLY flag when duplicating a reference + to an mbuf external buffer. + 20100502: The config(8) command has been updated to maintain compatibility with config files from 8.0-RELEASE. You will need a new version Modified: releng/8.1/sys/kern/uipc_mbuf.c ============================================================================== --- releng/8.1/sys/kern/uipc_mbuf.c Tue Jul 13 01:24:02 2010 (r209963) +++ releng/8.1/sys/kern/uipc_mbuf.c Tue Jul 13 02:45:17 2010 (r209964) @@ -302,6 +302,7 @@ mb_dupcl(struct mbuf *n, struct mbuf *m) n->m_ext.ref_cnt = m->m_ext.ref_cnt; n->m_ext.ext_type = m->m_ext.ext_type; n->m_flags |= M_EXT; + n->m_flags |= m->m_flags & M_RDONLY; } /* From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 02:45:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA4FB1065676; Tue, 13 Jul 2010 02:45:19 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D63778FC1D; Tue, 13 Jul 2010 02:45: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 o6D2jJ3P091971; Tue, 13 Jul 2010 02:45:19 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6D2jJsq091969; Tue, 13 Jul 2010 02:45:19 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201007130245.o6D2jJsq091969@svn.freebsd.org> From: Colin Percival Date: Tue, 13 Jul 2010 02:45:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209964 - head/sys/kern releng/7.1 releng/7.1/sys/conf releng/7.1/sys/kern releng/7.3 releng/7.3/sys/conf releng/7.3/sys/kern releng/8.0 releng/8.0/sys/conf releng/8.0/sys/kern releng/8... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 02:45:20 -0000 Author: cperciva Date: Tue Jul 13 02:45:17 2010 New Revision: 209964 URL: http://svn.freebsd.org/changeset/base/209964 Log: Correctly copy the M_RDONLY flag when duplicating a reference to an mbuf external buffer. Approved by: so (cperciva) Approved by: re (kensmith) Security: FreeBSD-SA-10:07.mbuf Modified: stable/8/sys/kern/uipc_mbuf.c Changes in other areas also in this revision: Modified: head/sys/kern/uipc_mbuf.c releng/7.1/UPDATING releng/7.1/sys/conf/newvers.sh releng/7.1/sys/kern/uipc_mbuf.c releng/7.3/UPDATING releng/7.3/sys/conf/newvers.sh releng/7.3/sys/kern/uipc_mbuf.c releng/8.0/UPDATING releng/8.0/sys/conf/newvers.sh releng/8.0/sys/kern/uipc_mbuf.c releng/8.1/UPDATING releng/8.1/sys/kern/uipc_mbuf.c stable/7/sys/kern/uipc_mbuf.c Modified: stable/8/sys/kern/uipc_mbuf.c ============================================================================== --- stable/8/sys/kern/uipc_mbuf.c Tue Jul 13 01:24:02 2010 (r209963) +++ stable/8/sys/kern/uipc_mbuf.c Tue Jul 13 02:45:17 2010 (r209964) @@ -302,6 +302,7 @@ mb_dupcl(struct mbuf *n, struct mbuf *m) n->m_ext.ref_cnt = m->m_ext.ref_cnt; n->m_ext.ext_type = m->m_ext.ext_type; n->m_flags |= M_EXT; + n->m_flags |= m->m_flags & M_RDONLY; } /* From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 02:45:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E93D1065674; Tue, 13 Jul 2010 02:45:45 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0E0778FC1B; Tue, 13 Jul 2010 02:45:45 +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 o6D2jitj092103; Tue, 13 Jul 2010 02:45:44 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6D2ji8Q092101; Tue, 13 Jul 2010 02:45:44 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007130245.o6D2ji8Q092101@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 13 Jul 2010 02:45:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209965 - head/sys/dev/acpica/Osd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 02:45:45 -0000 Author: jkim Date: Tue Jul 13 02:45:44 2010 New Revision: 209965 URL: http://svn.freebsd.org/changeset/base/209965 Log: According to ACPICA User Guide and Programmer Reference, the read data must be zero extended to fill the 32-bit return value even if the bit width of the port is less than 32. Modified: head/sys/dev/acpica/Osd/OsdHardware.c Modified: head/sys/dev/acpica/Osd/OsdHardware.c ============================================================================== --- head/sys/dev/acpica/Osd/OsdHardware.c Tue Jul 13 02:45:17 2010 (r209964) +++ head/sys/dev/acpica/Osd/OsdHardware.c Tue Jul 13 02:45:44 2010 (r209965) @@ -71,16 +71,13 @@ AcpiOsReadPort(ACPI_IO_ADDRESS InPort, U switch (Width) { case 8: - *(u_int8_t *)Value = bus_space_read_1(ACPI_BUS_SPACE_IO, - ACPI_BUS_HANDLE, InPort); + *Value = bus_space_read_1(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, InPort); break; case 16: - *(u_int16_t *)Value = bus_space_read_2(ACPI_BUS_SPACE_IO, - ACPI_BUS_HANDLE, InPort); + *Value = bus_space_read_2(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, InPort); break; case 32: - *(u_int32_t *)Value = bus_space_read_4(ACPI_BUS_SPACE_IO, - ACPI_BUS_HANDLE, InPort); + *Value = bus_space_read_4(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, InPort); break; default: /* debug trap goes here */ From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 02:48:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7EE12106566B; Tue, 13 Jul 2010 02:48:42 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5516B8FC17; Tue, 13 Jul 2010 02:48: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 o6D2mg9A092757; Tue, 13 Jul 2010 02:48:42 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6D2mgK7092755; Tue, 13 Jul 2010 02:48:42 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007130248.o6D2mgK7092755@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 13 Jul 2010 02:48:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209966 - head/sys/dev/acpica/Osd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 02:48:42 -0000 Author: jkim Date: Tue Jul 13 02:48:42 2010 New Revision: 209966 URL: http://svn.freebsd.org/changeset/base/209966 Log: Fix white spaces. Modified: head/sys/dev/acpica/Osd/OsdHardware.c Modified: head/sys/dev/acpica/Osd/OsdHardware.c ============================================================================== --- head/sys/dev/acpica/Osd/OsdHardware.c Tue Jul 13 02:45:44 2010 (r209965) +++ head/sys/dev/acpica/Osd/OsdHardware.c Tue Jul 13 02:48:42 2010 (r209966) @@ -53,16 +53,16 @@ __FBSDID("$FreeBSD$"); */ #ifdef __i386__ -#define ACPI_BUS_SPACE_IO I386_BUS_SPACE_IO -#define ACPI_BUS_HANDLE 0 +#define ACPI_BUS_SPACE_IO I386_BUS_SPACE_IO +#define ACPI_BUS_HANDLE 0 #endif #ifdef __ia64__ -#define ACPI_BUS_SPACE_IO IA64_BUS_SPACE_IO -#define ACPI_BUS_HANDLE 0 +#define ACPI_BUS_SPACE_IO IA64_BUS_SPACE_IO +#define ACPI_BUS_HANDLE 0 #endif #ifdef __amd64__ -#define ACPI_BUS_SPACE_IO AMD64_BUS_SPACE_IO -#define ACPI_BUS_HANDLE 0 +#define ACPI_BUS_SPACE_IO AMD64_BUS_SPACE_IO +#define ACPI_BUS_HANDLE 0 #endif ACPI_STATUS @@ -72,15 +72,15 @@ AcpiOsReadPort(ACPI_IO_ADDRESS InPort, U switch (Width) { case 8: *Value = bus_space_read_1(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, InPort); - break; + break; case 16: *Value = bus_space_read_2(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, InPort); - break; + break; case 32: *Value = bus_space_read_4(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, InPort); - break; + break; default: - /* debug trap goes here */ + /* debug trap goes here */ break; } @@ -93,16 +93,16 @@ AcpiOsWritePort(ACPI_IO_ADDRESS OutPort, switch (Width) { case 8: - bus_space_write_1(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, OutPort, Value); - break; + bus_space_write_1(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, OutPort, Value); + break; case 16: - bus_space_write_2(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, OutPort, Value); - break; + bus_space_write_2(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, OutPort, Value); + break; case 32: - bus_space_write_4(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, OutPort, Value); - break; + bus_space_write_4(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, OutPort, Value); + break; default: - /* debug trap goes here */ + /* debug trap goes here */ break; } @@ -117,7 +117,7 @@ AcpiOsReadPciConfiguration(ACPI_PCI_ID * u_int32_t val; if (!pci_cfgregopen()) - return (AE_NOT_EXIST); + return (AE_NOT_EXIST); val = pci_cfgregread(PciId->Bus, PciId->Device, PciId->Function, Register, byte_width); From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 03:49:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2AF5F1065675; Tue, 13 Jul 2010 03:49:31 +0000 (UTC) (envelope-from takawata@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1A0C08FC18; Tue, 13 Jul 2010 03:49:31 +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 o6D3nVnQ006508; Tue, 13 Jul 2010 03:49:31 GMT (envelope-from takawata@svn.freebsd.org) Received: (from takawata@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6D3nU6J006505; Tue, 13 Jul 2010 03:49:30 GMT (envelope-from takawata@svn.freebsd.org) Message-Id: <201007130349.o6D3nU6J006505@svn.freebsd.org> From: Takanori Watanabe Date: Tue, 13 Jul 2010 03:49:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209967 - in head/sys/dev/usb: . serial X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 03:49:31 -0000 Author: takawata Date: Tue Jul 13 03:49:30 2010 New Revision: 209967 URL: http://svn.freebsd.org/changeset/base/209967 Log: One more Prolific serial device ID. Submitted by: Kouichi Hirabayashi on FreeBSD-users-jp MFC after: 1 week. Modified: head/sys/dev/usb/serial/uplcom.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/serial/uplcom.c ============================================================================== --- head/sys/dev/usb/serial/uplcom.c Tue Jul 13 02:48:42 2010 (r209966) +++ head/sys/dev/usb/serial/uplcom.c Tue Jul 13 03:49:30 2010 (r209967) @@ -256,6 +256,8 @@ static const struct usb_device_id uplcom UPLCOM_DEV(PROLIFIC, RSAQ2, 0, 0xFFFF, PL2303), /* I/O DATA USB-RSAQ3 */ UPLCOM_DEV(PROLIFIC, RSAQ3, 0, 0xFFFF, PL2303X), + /* I/O DATA USB-RSAQ3 */ + UPLCOM_DEV(IODATA, USBRSAQ5, 0, 0xFFFF, PL2303X), /* PLANEX USB-RS232 URS-03 */ UPLCOM_DEV(ATEN, UC232A, 0, 0xFFFF, PL2303), /* TrendNet TU-S9 */ Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Tue Jul 13 02:48:42 2010 (r209966) +++ head/sys/dev/usb/usbdevs Tue Jul 13 03:49:30 2010 (r209967) @@ -1807,6 +1807,7 @@ product IODATA RT3072_2 0x0945 RT3072 product IODATA RT3072_3 0x0947 RT3072 product IODATA RT3072_4 0x0948 RT3072 product IODATA USBRSAQ 0x0a03 Serial USB-RSAQ1 +product IODATA USBRSAQ5 0x0a0e Serial USB-RSAQ5 product IODATA2 USB2SC 0x0a09 USB2.0-SCSI Bridge USB2-SC /* Iomega products */ From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 03:56:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 006C1106566B; Tue, 13 Jul 2010 03:56:30 +0000 (UTC) (envelope-from takawata@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E3FC78FC1F; Tue, 13 Jul 2010 03:56: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 o6D3uTRF008121; Tue, 13 Jul 2010 03:56:29 GMT (envelope-from takawata@svn.freebsd.org) Received: (from takawata@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6D3uTSY008119; Tue, 13 Jul 2010 03:56:29 GMT (envelope-from takawata@svn.freebsd.org) Message-Id: <201007130356.o6D3uTSY008119@svn.freebsd.org> From: Takanori Watanabe Date: Tue, 13 Jul 2010 03:56:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209968 - head/sys/dev/usb/serial X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 03:56:30 -0000 Author: takawata Date: Tue Jul 13 03:56:29 2010 New Revision: 209968 URL: http://svn.freebsd.org/changeset/base/209968 Log: Fix comment. Pointed out by: hrs Modified: head/sys/dev/usb/serial/uplcom.c Modified: head/sys/dev/usb/serial/uplcom.c ============================================================================== --- head/sys/dev/usb/serial/uplcom.c Tue Jul 13 03:49:30 2010 (r209967) +++ head/sys/dev/usb/serial/uplcom.c Tue Jul 13 03:56:29 2010 (r209968) @@ -256,7 +256,7 @@ static const struct usb_device_id uplcom UPLCOM_DEV(PROLIFIC, RSAQ2, 0, 0xFFFF, PL2303), /* I/O DATA USB-RSAQ3 */ UPLCOM_DEV(PROLIFIC, RSAQ3, 0, 0xFFFF, PL2303X), - /* I/O DATA USB-RSAQ3 */ + /* I/O DATA USB-RSAQ5 */ UPLCOM_DEV(IODATA, USBRSAQ5, 0, 0xFFFF, PL2303X), /* PLANEX USB-RS232 URS-03 */ UPLCOM_DEV(ATEN, UC232A, 0, 0xFFFF, PL2303), From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 04:08:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6FFB01065676; Tue, 13 Jul 2010 04:08:08 +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 5EDBF8FC16; Tue, 13 Jul 2010 04:08:08 +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 o6D488Mt010736; Tue, 13 Jul 2010 04:08:08 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6D488rD010731; Tue, 13 Jul 2010 04:08:08 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201007130408.o6D488rD010731@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 13 Jul 2010 04:08:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209969 - head/usr.sbin/config X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 04:08:08 -0000 Author: nwhitehorn Date: Tue Jul 13 04:08:08 2010 New Revision: 209969 URL: http://svn.freebsd.org/changeset/base/209969 Log: Enhance config to handle MACHINEs with multiple architectures: - Passing -m to config will now print the MACHINE and MACHINE_ARCH given in the passed kernel configuration file and then exit. - If an option is defined in options.MACHINE with the same name as the architecture of the kernel being configured, that option will be considered set. This allows conditional compilation based on CPU architecture. Config version is now 600010. Reviewed by: imp Modified: head/usr.sbin/config/config.8 head/usr.sbin/config/configvers.h head/usr.sbin/config/main.c head/usr.sbin/config/mkoptions.c Modified: head/usr.sbin/config/config.8 ============================================================================== --- head/usr.sbin/config/config.8 Tue Jul 13 03:56:29 2010 (r209968) +++ head/usr.sbin/config/config.8 Tue Jul 13 04:08:08 2010 (r209969) @@ -78,6 +78,9 @@ Note that does not append .Ar SYSTEM_NAME to the directory given. +.It Fl m +Print the MACHINE and MACHINE_ARCH values for this +kernel and exit. .It Fl g Configure a system for debugging. .It Fl x Ar kernel Modified: head/usr.sbin/config/configvers.h ============================================================================== --- head/usr.sbin/config/configvers.h Tue Jul 13 03:56:29 2010 (r209968) +++ head/usr.sbin/config/configvers.h Tue Jul 13 04:08:08 2010 (r209969) @@ -49,5 +49,5 @@ * * $FreeBSD$ */ -#define CONFIGVERS 600009 +#define CONFIGVERS 600010 #define MAJOR_VERS(x) ((x) / 100000) Modified: head/usr.sbin/config/main.c ============================================================================== --- head/usr.sbin/config/main.c Tue Jul 13 03:56:29 2010 (r209968) +++ head/usr.sbin/config/main.c Tue Jul 13 04:08:08 2010 (r209969) @@ -110,13 +110,18 @@ main(int argc, char **argv) char *p; char xxx[MAXPATHLEN]; char *kernfile; + int printmachine; + printmachine = 0; kernfile = NULL; - while ((ch = getopt(argc, argv, "Cd:gpVx:")) != -1) + while ((ch = getopt(argc, argv, "Cd:gmpVx:")) != -1) switch (ch) { case 'C': filebased = 1; break; + case 'm': + printmachine = 1; + break; case 'd': if (*destdir == '\0') strlcpy(destdir, optarg, sizeof(destdir)); @@ -171,13 +176,6 @@ main(int argc, char **argv) strlcat(destdir, PREFIX, sizeof(destdir)); } - p = path((char *)NULL); - if (stat(p, &buf)) { - if (mkdir(p, 0777)) - err(2, "%s", p); - } else if (!S_ISDIR(buf.st_mode)) - errx(EXIT_FAILURE, "%s isn't a directory", p); - SLIST_INIT(&cputype); SLIST_INIT(&mkopt); SLIST_INIT(&opt); @@ -207,6 +205,19 @@ main(int argc, char **argv) } checkversion(); + if (printmachine) { + printf("%s\t%s\n",machinename,machinearch); + exit(0); + } + + /* Make compile directory */ + p = path((char *)NULL); + if (stat(p, &buf)) { + if (mkdir(p, 0777)) + err(2, "%s", p); + } else if (!S_ISDIR(buf.st_mode)) + errx(EXIT_FAILURE, "%s isn't a directory", p); + /* * make symbolic links in compilation directory * for "sys" (to make genassym.c work along with #include ) @@ -280,7 +291,7 @@ static void usage(void) { - fprintf(stderr, "usage: config [-CgpV] [-d destdir] sysname\n"); + fprintf(stderr, "usage: config [-CgmpV] [-d destdir] sysname\n"); fprintf(stderr, " config -x kernel\n"); exit(EX_USAGE); } Modified: head/usr.sbin/config/mkoptions.c ============================================================================== --- head/usr.sbin/config/mkoptions.c Tue Jul 13 03:56:29 2010 (r209968) +++ head/usr.sbin/config/mkoptions.c Tue Jul 13 04:08:08 2010 (r209969) @@ -94,6 +94,20 @@ options(void) SLIST_INSERT_HEAD(&opt, op, op_next); read_options(); + + /* Fake the value of MACHINE_ARCH as an option if necessary */ + SLIST_FOREACH(ol, &otab, o_next) { + if (strcasecmp(ol->o_name, machinearch) != 0) + continue; + + op = (struct opt *)calloc(1, sizeof(*op)); + if (op == NULL) + err(EXIT_FAILURE, "calloc"); + op->op_name = ns(ol->o_name); + SLIST_INSERT_HEAD(&opt, op, op_next); + break; + } + SLIST_FOREACH(op, &opt, op_next) { SLIST_FOREACH(ol, &otab, o_next) { if (eq(op->op_name, ol->o_name) && From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 04:11:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 636C3106564A; Tue, 13 Jul 2010 04:11:26 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1C8BB8FC15; Tue, 13 Jul 2010 04:11:26 +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 o6D4BPUM011519; Tue, 13 Jul 2010 04:11:25 GMT (envelope-from maxim@svn.freebsd.org) Received: (from maxim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6D4BPuE011517; Tue, 13 Jul 2010 04:11:25 GMT (envelope-from maxim@svn.freebsd.org) Message-Id: <201007130411.o6D4BPuE011517@svn.freebsd.org> From: Maxim Konovalov Date: Tue, 13 Jul 2010 04:11:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209970 - head/sbin/kldload X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 04:11:26 -0000 Author: maxim Date: Tue Jul 13 04:11:25 2010 New Revision: 209970 URL: http://svn.freebsd.org/changeset/base/209970 Log: o Add -q flag to the synopsis. PR: docs/148535 Submitted by: Warren Block MFC after: 1 week Modified: head/sbin/kldload/kldload.8 Modified: head/sbin/kldload/kldload.8 ============================================================================== --- head/sbin/kldload/kldload.8 Tue Jul 13 04:08:08 2010 (r209969) +++ head/sbin/kldload/kldload.8 Tue Jul 13 04:11:25 2010 (r209970) @@ -34,6 +34,7 @@ .Sh SYNOPSIS .Nm .Op Fl v +.Op Fl q .Ar .Sh DESCRIPTION The @@ -60,7 +61,7 @@ The utility will warn if a module is requested as a bare filename and is present in the current directory. .Pp -The following option is available: +The following options are available: .Bl -tag -width indent .It Fl v Be more verbose. From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 04:13:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6822C1065674; Tue, 13 Jul 2010 04:13:31 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5671C8FC17; Tue, 13 Jul 2010 04:13:31 +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 o6D4DVgv012013; Tue, 13 Jul 2010 04:13:31 GMT (envelope-from maxim@svn.freebsd.org) Received: (from maxim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6D4DVHm012011; Tue, 13 Jul 2010 04:13:31 GMT (envelope-from maxim@svn.freebsd.org) Message-Id: <201007130413.o6D4DVHm012011@svn.freebsd.org> From: Maxim Konovalov Date: Tue, 13 Jul 2010 04:13:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209971 - head/sbin/kldload X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 04:13:31 -0000 Author: maxim Date: Tue Jul 13 04:13:31 2010 New Revision: 209971 URL: http://svn.freebsd.org/changeset/base/209971 Log: o Add -q flag to usage(). MFC after: 1 week Modified: head/sbin/kldload/kldload.c Modified: head/sbin/kldload/kldload.c ============================================================================== --- head/sbin/kldload/kldload.c Tue Jul 13 04:11:25 2010 (r209970) +++ head/sbin/kldload/kldload.c Tue Jul 13 04:13:31 2010 (r209971) @@ -129,7 +129,7 @@ path_check(const char *kldname, int quie static void usage(void) { - fprintf(stderr, "usage: kldload [-v] file ...\n"); + fprintf(stderr, "usage: kldload [-v] [-q] file ...\n"); exit(1); } From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 04:30:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A3481065678; Tue, 13 Jul 2010 04:30:51 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 19EE18FC12; Tue, 13 Jul 2010 04:30: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 o6D4UpnM015894; Tue, 13 Jul 2010 04:30:51 GMT (envelope-from maxim@svn.freebsd.org) Received: (from maxim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6D4UoGv015892; Tue, 13 Jul 2010 04:30:51 GMT (envelope-from maxim@svn.freebsd.org) Message-Id: <201007130430.o6D4UoGv015892@svn.freebsd.org> From: Maxim Konovalov Date: Tue, 13 Jul 2010 04:30:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209972 - head/sbin/iscontrol X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 04:30:51 -0000 Author: maxim Date: Tue Jul 13 04:30:50 2010 New Revision: 209972 URL: http://svn.freebsd.org/changeset/base/209972 Log: o Restore missed flag in the synopsis. PR: docs/148534 Submitted by: Warren Block MFC after: 1 week Modified: head/sbin/iscontrol/iscontrol.8 Modified: head/sbin/iscontrol/iscontrol.8 ============================================================================== --- head/sbin/iscontrol/iscontrol.8 Tue Jul 13 04:13:31 2010 (r209971) +++ head/sbin/iscontrol/iscontrol.8 Tue Jul 13 04:30:50 2010 (r209972) @@ -34,7 +34,7 @@ .Nm .Op Fl vd .Oo -.Op Fl Ar file +.Op Fl c Ar file .Op Fl n Ar nickname .Oc .Op Fl t Ar target From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 04:31:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B3E01065676; Tue, 13 Jul 2010 04:31:20 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2B2A08FC16; Tue, 13 Jul 2010 04:31:20 +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 o6D4VK02016034; Tue, 13 Jul 2010 04:31:20 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6D4VKG8016032; Tue, 13 Jul 2010 04:31:20 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007130431.o6D4VKG8016032@svn.freebsd.org> From: Warner Losh Date: Tue, 13 Jul 2010 04:31:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209973 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 04:31:20 -0000 Author: imp Date: Tue Jul 13 04:31:19 2010 New Revision: 209973 URL: http://svn.freebsd.org/changeset/base/209973 Log: Remove detect-vmware.sh, recently removed. Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Tue Jul 13 04:30:50 2010 (r209972) +++ head/ObsoleteFiles.inc Tue Jul 13 04:31:19 2010 (r209973) @@ -14,6 +14,8 @@ # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last. # +# 20100706: removed pc-sysinstall's detect-vmware.sh +OLD_FILES+=usr/share/pc-sysinstall/backend-query/detect-vmware.sh # 20100701: [powerpc] removed .if ${TARGET_ARCH} == "powerpc" OLD_FILES+=usr/include/machine/intr.h From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 05:12:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 24305106564A; Tue, 13 Jul 2010 05:12:15 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1302C8FC1A; Tue, 13 Jul 2010 05:12:15 +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 o6D5CEVk025155; Tue, 13 Jul 2010 05:12:14 GMT (envelope-from maxim@svn.freebsd.org) Received: (from maxim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6D5CE69025154; Tue, 13 Jul 2010 05:12:14 GMT (envelope-from maxim@svn.freebsd.org) Message-Id: <201007130512.o6D5CE69025154@svn.freebsd.org> From: Maxim Konovalov Date: Tue, 13 Jul 2010 05:12:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209974 - stable/8/include/arpa X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 05:12:15 -0000 Author: maxim Date: Tue Jul 13 05:12:14 2010 New Revision: 209974 URL: http://svn.freebsd.org/changeset/base/209974 Log: MFC r209715: addr2ascii(3) was removed ages ago. Fix the comment. Modified: stable/8/include/arpa/inet.h Directory Properties: stable/8/include/ (props changed) Modified: stable/8/include/arpa/inet.h ============================================================================== --- stable/8/include/arpa/inet.h Tue Jul 13 04:31:19 2010 (r209973) +++ stable/8/include/arpa/inet.h Tue Jul 13 05:12:14 2010 (r209974) @@ -62,7 +62,7 @@ #ifndef _ARPA_INET_H_ #define _ARPA_INET_H_ -/* External definitions for functions in inet(3), addr2ascii(3) */ +/* External definitions for functions in inet(3). */ #include #include From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 05:32:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 196CC1065670; Tue, 13 Jul 2010 05:32:20 +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 04D648FC17; Tue, 13 Jul 2010 05:32:20 +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 o6D5WJk8029603; Tue, 13 Jul 2010 05:32:19 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6D5WJ8P029593; Tue, 13 Jul 2010 05:32:19 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201007130532.o6D5WJ8P029593@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 13 Jul 2010 05:32:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209975 - in head: . sys/conf sys/powerpc/aim sys/powerpc/booke sys/powerpc/conf sys/powerpc/cpufreq sys/powerpc/include sys/powerpc/powerpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 05:32:20 -0000 Author: nwhitehorn Date: Tue Jul 13 05:32:19 2010 New Revision: 209975 URL: http://svn.freebsd.org/changeset/base/209975 Log: MFppc64: Kernel sources for 64-bit PowerPC, along with build-system changes to keep 32-bit kernels compiling (build system changes for 64-bit kernels are coming later). Existing 32-bit PowerPC kernel configurations must be updated after this change to specify their architecture. Added: head/sys/powerpc/aim/locore32.S - copied, changed from r209910, head/sys/powerpc/aim/locore.S head/sys/powerpc/aim/locore64.S - copied, changed from r209910, head/sys/powerpc/aim/locore.S head/sys/powerpc/aim/slb.c (contents, props changed) head/sys/powerpc/aim/swtch32.S - copied, changed from r209910, head/sys/powerpc/aim/swtch.S head/sys/powerpc/aim/swtch64.S - copied, changed from r209910, head/sys/powerpc/aim/swtch.S head/sys/powerpc/aim/trap_subr32.S - copied, changed from r209910, head/sys/powerpc/aim/trap_subr.S head/sys/powerpc/aim/trap_subr64.S - copied, changed from r209910, head/sys/powerpc/aim/trap_subr.S head/sys/powerpc/include/slb.h (contents, props changed) head/sys/powerpc/powerpc/elf32_machdep.c - copied, changed from r209910, head/sys/powerpc/powerpc/elf_machdep.c head/sys/powerpc/powerpc/elf64_machdep.c - copied, changed from r209910, head/sys/powerpc/powerpc/elf_machdep.c head/sys/powerpc/powerpc/sigcode32.S - copied, changed from r209910, head/sys/powerpc/powerpc/sigcode.S head/sys/powerpc/powerpc/sigcode64.S - copied, changed from r209910, head/sys/powerpc/powerpc/sigcode.S Deleted: head/sys/powerpc/aim/swtch.S head/sys/powerpc/powerpc/elf_machdep.c head/sys/powerpc/powerpc/sigcode.S Modified: head/UPDATING head/sys/conf/Makefile.powerpc head/sys/conf/files.powerpc head/sys/conf/options.powerpc head/sys/powerpc/aim/copyinout.c head/sys/powerpc/aim/locore.S head/sys/powerpc/aim/machdep.c head/sys/powerpc/aim/mmu_oea.c head/sys/powerpc/aim/mmu_oea64.c head/sys/powerpc/aim/mp_cpudep.c head/sys/powerpc/aim/ofw_machdep.c head/sys/powerpc/aim/trap.c head/sys/powerpc/aim/vm_machdep.c head/sys/powerpc/booke/locore.S head/sys/powerpc/booke/machdep.c head/sys/powerpc/booke/swtch.S head/sys/powerpc/booke/vm_machdep.c head/sys/powerpc/conf/DEFAULTS head/sys/powerpc/conf/GENERIC head/sys/powerpc/conf/MPC85XX head/sys/powerpc/conf/NOTES head/sys/powerpc/cpufreq/pcr.c head/sys/powerpc/include/_align.h head/sys/powerpc/include/_bus.h head/sys/powerpc/include/_inttypes.h head/sys/powerpc/include/_limits.h head/sys/powerpc/include/_stdint.h head/sys/powerpc/include/_types.h head/sys/powerpc/include/asm.h head/sys/powerpc/include/atomic.h head/sys/powerpc/include/bus.h head/sys/powerpc/include/cpufunc.h head/sys/powerpc/include/db_machdep.h head/sys/powerpc/include/frame.h head/sys/powerpc/include/hid.h head/sys/powerpc/include/md_var.h head/sys/powerpc/include/param.h head/sys/powerpc/include/pcb.h head/sys/powerpc/include/pcpu.h head/sys/powerpc/include/pmap.h head/sys/powerpc/include/proc.h head/sys/powerpc/include/profile.h head/sys/powerpc/include/psl.h head/sys/powerpc/include/pte.h head/sys/powerpc/include/reg.h head/sys/powerpc/include/runq.h head/sys/powerpc/include/smp.h head/sys/powerpc/include/spr.h head/sys/powerpc/include/sr.h head/sys/powerpc/include/trap_aim.h head/sys/powerpc/include/ucontext.h head/sys/powerpc/include/vmparam.h head/sys/powerpc/powerpc/cpu.c head/sys/powerpc/powerpc/db_interface.c head/sys/powerpc/powerpc/db_trace.c head/sys/powerpc/powerpc/exec_machdep.c head/sys/powerpc/powerpc/genassym.c head/sys/powerpc/powerpc/in_cksum.c head/sys/powerpc/powerpc/mp_machdep.c head/sys/powerpc/powerpc/setjmp.S head/sys/powerpc/powerpc/stack_machdep.c head/sys/powerpc/powerpc/syncicache.c head/sys/powerpc/powerpc/sys_machdep.c Modified: head/UPDATING ============================================================================== --- head/UPDATING Tue Jul 13 05:12:14 2010 (r209974) +++ head/UPDATING Tue Jul 13 05:32:19 2010 (r209975) @@ -24,6 +24,14 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. 20100713: + Due to the import of powerpc64 support, all existing powerpc kernel + configuration files must be updated with a machine directive like this: + machine powerpc powerpc + + In addition, an updated config(8) is required to build powerpc kernels + after this change. + +20100713: A new version of ZFS (version 15) has been merged to -HEAD. This version uses a python library for the following subcommands: zfs allow, zfs unallow, zfs groupspace, zfs userspace. Modified: head/sys/conf/Makefile.powerpc ============================================================================== --- head/sys/conf/Makefile.powerpc Tue Jul 13 05:12:14 2010 (r209974) +++ head/sys/conf/Makefile.powerpc Tue Jul 13 05:32:19 2010 (r209975) @@ -17,7 +17,7 @@ # # Which version of config(8) is required. -%VERSREQ= 600004 +%VERSREQ= 600010 STD8X16FONT?= iso @@ -28,6 +28,9 @@ S= ./@ S= ../../.. .endif .endif + +LDSCRIPT_NAME?= ldscript.${MACHINE_ARCH} + .include "$S/conf/kern.pre.mk" INCLUDES+= -I$S/contrib/libfdt Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Tue Jul 13 05:12:14 2010 (r209974) +++ head/sys/conf/files.powerpc Tue Jul 13 05:32:19 2010 (r209975) @@ -36,7 +36,7 @@ dev/ofw/ofw_console.c optional aim dev/ofw/ofw_disk.c optional ofwd aim dev/ofw/ofw_fdt.c optional fdt dev/ofw/ofw_iicbus.c optional iicbus aim -dev/ofw/ofw_standard.c optional aim +dev/ofw/ofw_standard.c optional aim powerpc dev/powermac_nvram/powermac_nvram.c optional powermac_nvram powermac dev/quicc/quicc_bfe_fdt.c optional quicc mpc85xx dev/scc/scc_bfe_macio.c optional scc powermac @@ -53,37 +53,39 @@ dev/tsec/if_tsec.c optional tsec dev/tsec/if_tsec_fdt.c optional tsec fdt dev/uart/uart_cpu_powerpc.c optional uart aim kern/syscalls.c optional ktr -libkern/ashldi3.c standard -libkern/ashrdi3.c standard +libkern/ashldi3.c optional powerpc +libkern/ashrdi3.c optional powerpc libkern/bcmp.c standard -libkern/cmpdi2.c standard -libkern/divdi3.c standard +libkern/cmpdi2.c optional powerpc +libkern/divdi3.c optional powerpc libkern/ffs.c standard libkern/ffsl.c standard libkern/fls.c standard libkern/flsl.c standard -libkern/lshrdi3.c standard +libkern/lshrdi3.c optional powerpc libkern/memchr.c optional fdt libkern/memmove.c standard libkern/memset.c standard -libkern/moddi3.c standard -libkern/qdivrem.c standard -libkern/ucmpdi2.c standard -libkern/udivdi3.c standard -libkern/umoddi3.c standard +libkern/moddi3.c optional powerpc +libkern/qdivrem.c optional powerpc +libkern/ucmpdi2.c optional powerpc +libkern/udivdi3.c optional powerpc +libkern/umoddi3.c optional powerpc powerpc/aim/clock.c optional aim powerpc/aim/copyinout.c optional aim powerpc/aim/interrupt.c optional aim powerpc/aim/locore.S optional aim no-obj powerpc/aim/machdep.c optional aim -powerpc/aim/mmu_oea.c optional aim +powerpc/aim/mmu_oea.c optional aim powerpc powerpc/aim/mmu_oea64.c optional aim powerpc/aim/mp_cpudep.c optional aim smp powerpc/aim/nexus.c optional aim powerpc/aim/ofw_machdep.c optional aim powerpc/aim/ofwmagic.S optional aim powerpc/aim/platform_chrp.c optional aim -powerpc/aim/swtch.S optional aim +powerpc/aim/slb.c optional aim powerpc64 +powerpc/aim/swtch32.S optional aim powerpc +powerpc/aim/swtch64.S optional aim powerpc64 powerpc/aim/trap.c optional aim powerpc/aim/uma_machdep.c optional aim powerpc/aim/vm_machdep.c optional aim @@ -156,7 +158,8 @@ powerpc/powerpc/db_hwwatch.c optional dd powerpc/powerpc/db_interface.c optional ddb powerpc/powerpc/db_trace.c optional ddb powerpc/powerpc/dump_machdep.c standard -powerpc/powerpc/elf_machdep.c standard +powerpc/powerpc/elf32_machdep.c optional powerpc | compat_freebsd32 +powerpc/powerpc/elf64_machdep.c optional powerpc64 powerpc/powerpc/exec_machdep.c standard powerpc/powerpc/fpu.c optional aim powerpc/powerpc/fuswintr.c standard @@ -173,7 +176,8 @@ powerpc/powerpc/platform.c standard powerpc/powerpc/platform_if.m standard powerpc/powerpc/sc_machdep.c optional sc powerpc/powerpc/setjmp.S standard -powerpc/powerpc/sigcode.S standard +powerpc/powerpc/sigcode32.S optional powerpc | compat_freebsd32 +powerpc/powerpc/sigcode64.S optional powerpc64 powerpc/powerpc/stack_machdep.c optional ddb | stack powerpc/powerpc/suswintr.c standard powerpc/powerpc/syncicache.c standard @@ -183,3 +187,10 @@ powerpc/psim/iobus.c optional psim powerpc/psim/ata_iobus.c optional ata psim powerpc/psim/openpic_iobus.c optional psim powerpc/psim/uart_iobus.c optional uart psim + +compat/freebsd32/freebsd32_ioctl.c optional compat_freebsd32 +compat/freebsd32/freebsd32_misc.c optional compat_freebsd32 +compat/freebsd32/freebsd32_syscalls.c optional compat_freebsd32 +compat/freebsd32/freebsd32_sysent.c optional compat_freebsd32 +kern/imgact_elf32.c optional compat_freebsd32 + Modified: head/sys/conf/options.powerpc ============================================================================== --- head/sys/conf/options.powerpc Tue Jul 13 05:12:14 2010 (r209974) +++ head/sys/conf/options.powerpc Tue Jul 13 05:32:19 2010 (r209975) @@ -4,8 +4,13 @@ AIM opt_global.h E500 opt_global.h +POWERPC +POWERPC64 + FPU_EMU +COMPAT_FREEBSD32 opt_compat.h + GFB_DEBUG opt_gfb.h GFB_NO_FONT_LOADING opt_gfb.h GFB_NO_MODE_CHANGE opt_gfb.h Modified: head/sys/powerpc/aim/copyinout.c ============================================================================== --- head/sys/powerpc/aim/copyinout.c Tue Jul 13 05:12:14 2010 (r209974) +++ head/sys/powerpc/aim/copyinout.c Tue Jul 13 05:32:19 2010 (r209975) @@ -57,6 +57,8 @@ __FBSDID("$FreeBSD$"); #include +#include +#include #include #include @@ -66,20 +68,45 @@ __FBSDID("$FreeBSD$"); #include #include +#include int setfault(faultbuf); /* defined in locore.S */ /* * Makes sure that the right segment of userspace is mapped in. */ + +#ifdef __powerpc64__ +static __inline void +set_user_sr(pmap_t pm, const void *addr) +{ + register_t esid, vsid, slb1, slb2; + + esid = USER_ADDR >> ADDR_SR_SHFT; + PMAP_LOCK(pm); + vsid = va_to_vsid(pm, (vm_offset_t)addr); + PMAP_UNLOCK(pm); + + slb1 = vsid << SLBV_VSID_SHIFT; + slb2 = (esid << SLBE_ESID_SHIFT) | SLBE_VALID | USER_SR; + + __asm __volatile ("slbie %0; slbmte %1, %2" :: "r"(esid << 28), + "r"(slb1), "r"(slb2)); + isync(); +} +#else static __inline void -set_user_sr(register_t vsid) +set_user_sr(pmap_t pm, const void *addr) { + register_t vsid; + + vsid = va_to_vsid(pm, (vm_offset_t)addr); isync(); __asm __volatile ("mtsr %0,%1" :: "n"(USER_SR), "r"(vsid)); isync(); } +#endif int copyout(const void *kaddr, void *udaddr, size_t len) @@ -103,13 +130,13 @@ copyout(const void *kaddr, void *udaddr, up = udaddr; while (len > 0) { - p = (char *)USER_ADDR + ((u_int)up & ~SEGMENT_MASK); + p = (char *)USER_ADDR + ((uintptr_t)up & ~SEGMENT_MASK); l = ((char *)USER_ADDR + SEGMENT_LENGTH) - p; if (l > len) l = len; - set_user_sr(pm->pm_sr[(u_int)up >> ADDR_SR_SHFT]); + set_user_sr(pm,up); bcopy(kp, p, l); @@ -144,13 +171,13 @@ copyin(const void *udaddr, void *kaddr, up = udaddr; while (len > 0) { - p = (char *)USER_ADDR + ((u_int)up & ~SEGMENT_MASK); + p = (char *)USER_ADDR + ((uintptr_t)up & ~SEGMENT_MASK); l = ((char *)USER_ADDR + SEGMENT_LENGTH) - p; if (l > len) l = len; - set_user_sr(pm->pm_sr[(u_int)up >> ADDR_SR_SHFT]); + set_user_sr(pm,up); bcopy(p, kp, l); @@ -218,14 +245,14 @@ subyte(void *addr, int byte) td = PCPU_GET(curthread); pm = &td->td_proc->p_vmspace->vm_pmap; - p = (char *)((u_int)USER_ADDR + ((u_int)addr & ~SEGMENT_MASK)); + p = (char *)(USER_ADDR + ((uintptr_t)addr & ~SEGMENT_MASK)); if (setfault(env)) { td->td_pcb->pcb_onfault = NULL; return (-1); } - set_user_sr(pm->pm_sr[(u_int)addr >> ADDR_SR_SHFT]); + set_user_sr(pm,addr); *p = (char)byte; @@ -233,6 +260,33 @@ subyte(void *addr, int byte) return (0); } +#ifdef __powerpc64__ +int +suword32(void *addr, int word) +{ + struct thread *td; + pmap_t pm; + faultbuf env; + int *p; + + td = PCPU_GET(curthread); + pm = &td->td_proc->p_vmspace->vm_pmap; + p = (int *)(USER_ADDR + ((uintptr_t)addr & ~SEGMENT_MASK)); + + if (setfault(env)) { + td->td_pcb->pcb_onfault = NULL; + return (-1); + } + + set_user_sr(pm,addr); + + *p = word; + + td->td_pcb->pcb_onfault = NULL; + return (0); +} +#endif + int suword(void *addr, long word) { @@ -243,14 +297,14 @@ suword(void *addr, long word) td = PCPU_GET(curthread); pm = &td->td_proc->p_vmspace->vm_pmap; - p = (long *)((u_int)USER_ADDR + ((u_int)addr & ~SEGMENT_MASK)); + p = (long *)(USER_ADDR + ((uintptr_t)addr & ~SEGMENT_MASK)); if (setfault(env)) { td->td_pcb->pcb_onfault = NULL; return (-1); } - set_user_sr(pm->pm_sr[(u_int)addr >> ADDR_SR_SHFT]); + set_user_sr(pm,addr); *p = word; @@ -258,12 +312,19 @@ suword(void *addr, long word) return (0); } +#ifdef __powerpc64__ +int +suword64(void *addr, int64_t word) +{ + return (suword(addr, (long)word)); +} +#else int suword32(void *addr, int32_t word) { return (suword(addr, (long)word)); } - +#endif int fubyte(const void *addr) @@ -276,20 +337,47 @@ fubyte(const void *addr) td = PCPU_GET(curthread); pm = &td->td_proc->p_vmspace->vm_pmap; - p = (u_char *)((u_int)USER_ADDR + ((u_int)addr & ~SEGMENT_MASK)); + p = (u_char *)(USER_ADDR + ((uintptr_t)addr & ~SEGMENT_MASK)); + + if (setfault(env)) { + td->td_pcb->pcb_onfault = NULL; + return (-1); + } + + set_user_sr(pm,addr); + + val = *p; + + td->td_pcb->pcb_onfault = NULL; + return (val); +} + +#ifdef __powerpc64__ +int32_t +fuword32(const void *addr) +{ + struct thread *td; + pmap_t pm; + faultbuf env; + int32_t *p, val; + + td = PCPU_GET(curthread); + pm = &td->td_proc->p_vmspace->vm_pmap; + p = (int32_t *)(USER_ADDR + ((uintptr_t)addr & ~SEGMENT_MASK)); if (setfault(env)) { td->td_pcb->pcb_onfault = NULL; return (-1); } - set_user_sr(pm->pm_sr[(u_int)addr >> ADDR_SR_SHFT]); + set_user_sr(pm,addr); val = *p; td->td_pcb->pcb_onfault = NULL; return (val); } +#endif long fuword(const void *addr) @@ -301,14 +389,14 @@ fuword(const void *addr) td = PCPU_GET(curthread); pm = &td->td_proc->p_vmspace->vm_pmap; - p = (long *)((u_int)USER_ADDR + ((u_int)addr & ~SEGMENT_MASK)); + p = (long *)(USER_ADDR + ((uintptr_t)addr & ~SEGMENT_MASK)); if (setfault(env)) { td->td_pcb->pcb_onfault = NULL; return (-1); } - set_user_sr(pm->pm_sr[(u_int)addr >> ADDR_SR_SHFT]); + set_user_sr(pm,addr); val = *p; @@ -316,18 +404,59 @@ fuword(const void *addr) return (val); } +#ifndef __powerpc64__ int32_t fuword32(const void *addr) { return ((int32_t)fuword(addr)); } +#endif uint32_t -casuword32(volatile uint32_t *base, uint32_t oldval, uint32_t newval) +casuword32(volatile uint32_t *addr, uint32_t old, uint32_t new) { - return (casuword((volatile u_long *)base, oldval, newval)); + struct thread *td; + pmap_t pm; + faultbuf env; + uint32_t *p, val; + + td = PCPU_GET(curthread); + pm = &td->td_proc->p_vmspace->vm_pmap; + p = (uint32_t *)(USER_ADDR + ((uintptr_t)addr & ~SEGMENT_MASK)); + + set_user_sr(pm,(const void *)(vm_offset_t)addr); + + if (setfault(env)) { + td->td_pcb->pcb_onfault = NULL; + return (-1); + } + + __asm __volatile ( + "1:\tlwarx %0, 0, %2\n\t" /* load old value */ + "cmplw %3, %0\n\t" /* compare */ + "bne 2f\n\t" /* exit if not equal */ + "stwcx. %4, 0, %2\n\t" /* attempt to store */ + "bne- 1b\n\t" /* spin if failed */ + "b 3f\n\t" /* we've succeeded */ + "2:\n\t" + "stwcx. %0, 0, %2\n\t" /* clear reservation (74xx) */ + "3:\n\t" + : "=&r" (val), "=m" (*p) + : "r" (p), "r" (old), "r" (new), "m" (*p) + : "cc", "memory"); + + td->td_pcb->pcb_onfault = NULL; + + return (val); } +#ifndef __powerpc64__ +u_long +casuword(volatile u_long *addr, u_long old, u_long new) +{ + return (casuword32((volatile uint32_t *)addr, old, new)); +} +#else u_long casuword(volatile u_long *addr, u_long old, u_long new) { @@ -338,9 +467,9 @@ casuword(volatile u_long *addr, u_long o td = PCPU_GET(curthread); pm = &td->td_proc->p_vmspace->vm_pmap; - p = (u_long *)((u_int)USER_ADDR + ((u_int)addr & ~SEGMENT_MASK)); + p = (u_long *)(USER_ADDR + ((uintptr_t)addr & ~SEGMENT_MASK)); - set_user_sr(pm->pm_sr[(u_int)addr >> ADDR_SR_SHFT]); + set_user_sr(pm,(const void *)(vm_offset_t)addr); if (setfault(env)) { td->td_pcb->pcb_onfault = NULL; @@ -348,14 +477,14 @@ casuword(volatile u_long *addr, u_long o } __asm __volatile ( - "1:\tlwarx %0, 0, %2\n\t" /* load old value */ - "cmplw %3, %0\n\t" /* compare */ + "1:\tldarx %0, 0, %2\n\t" /* load old value */ + "cmpld %3, %0\n\t" /* compare */ "bne 2f\n\t" /* exit if not equal */ - "stwcx. %4, 0, %2\n\t" /* attempt to store */ + "stdcx. %4, 0, %2\n\t" /* attempt to store */ "bne- 1b\n\t" /* spin if failed */ "b 3f\n\t" /* we've succeeded */ "2:\n\t" - "stwcx. %0, 0, %2\n\t" /* clear reservation (74xx) */ + "stdcx. %0, 0, %2\n\t" /* clear reservation (74xx) */ "3:\n\t" : "=&r" (val), "=m" (*p) : "r" (p), "r" (old), "r" (new), "m" (*p) @@ -365,3 +494,5 @@ casuword(volatile u_long *addr, u_long o return (val); } +#endif + Modified: head/sys/powerpc/aim/locore.S ============================================================================== --- head/sys/powerpc/aim/locore.S Tue Jul 13 05:12:14 2010 (r209974) +++ head/sys/powerpc/aim/locore.S Tue Jul 13 05:32:19 2010 (r209975) @@ -1,209 +1,8 @@ /* $FreeBSD$ */ -/* $NetBSD: locore.S,v 1.24 2000/05/31 05:09:17 thorpej Exp $ */ -/*- - * Copyright (C) 2001 Benno Rice - * 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 Benno Rice ``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 TOOLS GMBH 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. - */ -/*- - * Copyright (C) 1995, 1996 Wolfgang Solfrank. - * Copyright (C) 1995, 1996 TooLs GmbH. - * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by TooLs GmbH. - * 4. The name of TooLs GmbH may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``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 TOOLS GMBH 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. - */ +#ifdef __powerpc64__ +#include +#else +#include +#endif -#include "assym.s" - -#include - -#include -#include -#include -#include -#include -#include - -/* Locate the per-CPU data structure */ -#define GET_CPUINFO(r) \ - mfsprg0 r - -/* - * Compiled KERNBASE location and the kernel load address - */ - .globl kernbase - .set kernbase, KERNBASE - -#define TMPSTKSZ 8192 /* 8K temporary stack */ - -/* - * Globals - */ - .data - .align 4 -GLOBAL(tmpstk) - .space TMPSTKSZ -GLOBAL(esym) - .long 0 /* end of symbol table */ - -GLOBAL(ofmsr) - .long 0, 0, 0, 0, 0 /* msr/sprg0-3 used in Open Firmware */ - -#define INTRCNT_COUNT 256 /* max(HROWPIC_IRQMAX,OPENPIC_IRQMAX) */ -GLOBAL(intrnames) - .space INTRCNT_COUNT * (MAXCOMLEN + 1) * 2 -GLOBAL(eintrnames) - .align 4 -GLOBAL(intrcnt) - .space INTRCNT_COUNT * 4 * 2 -GLOBAL(eintrcnt) - -/* - * File-scope for locore.S - */ -idle_u: - .long 0 /* fake uarea during idle after exit */ -openfirmware_entry: - .long 0 /* Open Firmware entry point */ -srsave: - .long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - - .text - .globl btext -btext: - -/* - * This symbol is here for the benefit of kvm_mkdb, and is supposed to - * mark the start of kernel text. - */ - .globl kernel_text -kernel_text: - -/* - * Startup entry. Note, this must be the first thing in the text - * segment! - */ - .text - .globl __start -__start: - li 8,0 - li 9,0x100 - mtctr 9 -1: - dcbf 0,8 - icbi 0,8 - addi 8,8,0x20 - bdnz 1b - sync - isync - - /* Save the argument pointer and length */ - mr 20,6 - mr 21,7 - - lis 8,openfirmware_entry@ha - stw 5,openfirmware_entry@l(8) /* save client interface handler */ - - lis 1,(tmpstk+TMPSTKSZ-16)@ha - addi 1,1,(tmpstk+TMPSTKSZ-16)@l - - mfmsr 0 - lis 9,ofmsr@ha - stwu 0,ofmsr@l(9) - - mfsprg0 0 /* save SPRG0-3 */ - stw 0,4(9) /* ofmsr[1] = sprg0 */ - mfsprg1 0 - stw 0,8(9) /* ofmsr[2] = sprg1 */ - mfsprg2 0 - stw 0,12(9) /* ofmsr[3] = sprg2 */ - mfsprg3 0 - stw 0,16(9) /* ofmsr[4] = sprg3 */ - - bl OF_initial_setup - - lis 4,end@ha - addi 4,4,end@l - mr 5,4 - - lis 3,kernel_text@ha - addi 3,3,kernel_text@l - - /* Restore the argument pointer and length */ - mr 6,20 - mr 7,21 - - bl powerpc_init - mr %r1, %r3 - li %r3, 0 - stw %r3, 0(%r1) - bl mi_startup - b OF_exit - -/* - * int setfault() - * - * Similar to setjmp to setup for handling faults on accesses to user memory. - * Any routine using this may only call bcopy, either the form below, - * or the (currently used) C code optimized, so it doesn't use any non-volatile - * registers. - */ - .globl setfault -setfault: - mflr 0 - mfcr 12 - mfsprg 4,0 - lwz 4,PC_CURTHREAD(4) - lwz 4,TD_PCB(4) - stw 3,PCB_ONFAULT(4) - stw 0,0(3) - stw 1,4(3) - stw 2,8(3) - stmw 12,12(3) - xor 3,3,3 - blr - -#include Copied and modified: head/sys/powerpc/aim/locore32.S (from r209910, head/sys/powerpc/aim/locore.S) ============================================================================== --- head/sys/powerpc/aim/locore.S Sun Jul 11 21:12:42 2010 (r209910, copy source) +++ head/sys/powerpc/aim/locore32.S Tue Jul 13 05:32:19 2010 (r209975) @@ -62,9 +62,7 @@ #include #include -#include #include -#include #include /* Locate the per-CPU data structure */ @@ -206,4 +204,4 @@ setfault: xor 3,3,3 blr -#include +#include Copied and modified: head/sys/powerpc/aim/locore64.S (from r209910, head/sys/powerpc/aim/locore.S) ============================================================================== --- head/sys/powerpc/aim/locore.S Sun Jul 11 21:12:42 2010 (r209910, copy source) +++ head/sys/powerpc/aim/locore64.S Tue Jul 13 05:32:19 2010 (r209975) @@ -62,9 +62,7 @@ #include #include -#include #include -#include #include /* Locate the per-CPU data structure */ @@ -78,6 +76,7 @@ .set kernbase, KERNBASE #define TMPSTKSZ 8192 /* 8K temporary stack */ +#define OFWSTKSZ 4096 /* 4K Open Firmware stack */ /* * Globals @@ -86,11 +85,13 @@ .align 4 GLOBAL(tmpstk) .space TMPSTKSZ +GLOBAL(ofwstk) + .space OFWSTKSZ GLOBAL(esym) - .long 0 /* end of symbol table */ + .llong 0 /* end of symbol table */ GLOBAL(ofmsr) - .long 0, 0, 0, 0, 0 /* msr/sprg0-3 used in Open Firmware */ + .llong 0, 0, 0, 0, 0 /* msr/sprg0-3 used in Open Firmware */ #define INTRCNT_COUNT 256 /* max(HROWPIC_IRQMAX,OPENPIC_IRQMAX) */ GLOBAL(intrnames) @@ -105,11 +106,11 @@ GLOBAL(eintrcnt) * File-scope for locore.S */ idle_u: - .long 0 /* fake uarea during idle after exit */ + .llong 0 /* fake uarea during idle after exit */ openfirmware_entry: - .long 0 /* Open Firmware entry point */ + .llong 0 /* Open Firmware entry point */ srsave: - .long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + .llong 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 .text .globl btext @@ -127,8 +128,7 @@ kernel_text: * segment! */ .text - .globl __start -__start: +ASENTRY(__start) li 8,0 li 9,0x100 mtctr 9 @@ -145,43 +145,183 @@ __start: mr 21,7 lis 8,openfirmware_entry@ha - stw 5,openfirmware_entry@l(8) /* save client interface handler */ + std 5,openfirmware_entry@l(8) /* save client interface handler */ - lis 1,(tmpstk+TMPSTKSZ-16)@ha - addi 1,1,(tmpstk+TMPSTKSZ-16)@l + /* Set up the stack pointer */ + lis 1,(tmpstk+TMPSTKSZ-48)@ha + addi 1,1,(tmpstk+TMPSTKSZ-48)@l + + /* Set up the TOC pointer */ + lis 2,tocbase@ha + ld 2,tocbase@l(2) mfmsr 0 lis 9,ofmsr@ha - stwu 0,ofmsr@l(9) + stdu 0,ofmsr@l(9) mfsprg0 0 /* save SPRG0-3 */ - stw 0,4(9) /* ofmsr[1] = sprg0 */ + std 0,8(9) /* ofmsr[1] = sprg0 */ mfsprg1 0 - stw 0,8(9) /* ofmsr[2] = sprg1 */ + std 0,16(9) /* ofmsr[2] = sprg1 */ mfsprg2 0 - stw 0,12(9) /* ofmsr[3] = sprg2 */ + std 0,24(9) /* ofmsr[3] = sprg2 */ mfsprg3 0 - stw 0,16(9) /* ofmsr[4] = sprg3 */ + std 0,32(9) /* ofmsr[4] = sprg3 */ + + /* Switch to 64-bit mode */ + mfmsr 9 + li 8,1 + insrdi 9,8,1,0 + mtmsrd 9 - bl OF_initial_setup + bl .OF_initial_setup + nop lis 4,end@ha addi 4,4,end@l mr 5,4 - lis 3,kernel_text@ha - addi 3,3,kernel_text@l + lis 3,kernbase@ha + addi 3,3,kernbase@l /* Restore the argument pointer and length */ mr 6,20 mr 7,21 - bl powerpc_init + bl .powerpc_init + nop mr %r1, %r3 li %r3, 0 - stw %r3, 0(%r1) - bl mi_startup - b OF_exit + std %r3, 0(%r1) + bl .mi_startup + nop + b .OF_exit + nop + +/* + * PPC64 ABI TOC base + */ + + .align 3 + .globl tocbase +tocbase: + .llong .TOC.@tocbase + +/* + * Open Firmware Real-mode Entry Point. This is a huge pain. + */ + +ASENTRY(ofw_32bit_mode_entry) + mflr %r0 + std %r0,16(%r1) + stdu %r1,-208(%r1) + + /* + * We need to save the following, because OF's register save/ + * restore code assumes that the contents of registers are + * at most 32 bits wide: lr, cr, r2, r13-r31, the old MSR. These + * get placed in that order in the stack. + */ + + mfcr %r4 + std %r4,48(%r1) + std %r13,56(%r1) + std %r14,64(%r1) + std %r15,72(%r1) + std %r16,80(%r1) + std %r17,88(%r1) + std %r18,96(%r1) + std %r19,104(%r1) + std %r20,112(%r1) + std %r21,120(%r1) + std %r22,128(%r1) + std %r23,136(%r1) + std %r24,144(%r1) + std %r25,152(%r1) + std %r26,160(%r1) + std %r27,168(%r1) + std %r28,176(%r1) + std %r29,184(%r1) + std %r30,192(%r1) + std %r31,200(%r1) + + /* Record the old MSR */ + mfmsr %r6 + + /* read client interface handler */ + lis %r4,openfirmware_entry@ha + ld %r4,openfirmware_entry@l(%r4) + + /* + * Set the MSR to the OF value. This has the side effect of disabling + * exceptions, which is important for the next few steps. + */ + + lis %r5,ofmsr@ha + ld %r5,ofmsr@l(%r5) + mtmsrd %r5 + isync + + /* + * Set up OF stack. This needs to be accessible in real mode and + * use the 32-bit ABI stack frame format. The pointer to the current + * kernel stack is placed at the very top of the stack along with + * the old MSR so we can get them back later. + */ + mr %r5,%r1 + lis %r1,(ofwstk+OFWSTKSZ-32)@ha + addi %r1,%r1,(ofwstk+OFWSTKSZ-32)@l + std %r5,8(%r1) /* Save real stack pointer */ + std %r2,16(%r1) /* Save old TOC */ + std %r6,24(%r1) /* Save old MSR */ + li %r5,0 + stw %r5,4(%r1) + stw %r5,0(%r1) + + /* Finally, branch to OF */ + mtctr %r4 + bctrl + + /* Reload stack pointer and MSR from the OFW stack */ + ld %r6,24(%r1) + ld %r2,16(%r1) + ld %r1,8(%r1) + + /* Now set the real MSR */ + mtmsrd %r6 + isync + + /* Sign-extend the return value from OF */ + extsw %r3,%r3 + + /* Restore all the non-volatile registers */ + ld %r5,48(%r1) + mtcr %r5 + ld %r13,56(%r1) + ld %r14,64(%r1) + ld %r15,72(%r1) + ld %r16,80(%r1) + ld %r17,88(%r1) + ld %r18,96(%r1) + ld %r19,104(%r1) + ld %r20,112(%r1) + ld %r21,120(%r1) + ld %r22,128(%r1) + ld %r23,136(%r1) + ld %r24,144(%r1) + ld %r25,152(%r1) + ld %r26,160(%r1) + ld %r27,168(%r1) + ld %r28,176(%r1) + ld %r29,184(%r1) + ld %r30,192(%r1) + ld %r31,200(%r1) + + /* Restore the stack and link register */ + ld %r1,0(%r1) + ld %r0,16(%r1) + mtlr %r0 + blr /* * int setfault() @@ -191,19 +331,39 @@ __start: * or the (currently used) C code optimized, so it doesn't use any non-volatile * registers. */ - .globl setfault -setfault: +ASENTRY(setfault) mflr 0 mfcr 12 mfsprg 4,0 - lwz 4,PC_CURTHREAD(4) - lwz 4,TD_PCB(4) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 05:43:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C0B23106564A; Tue, 13 Jul 2010 05:43: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 AFE978FC08; Tue, 13 Jul 2010 05:43:43 +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 o6D5hhAq032127; Tue, 13 Jul 2010 05:43:43 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6D5hhqb032125; Tue, 13 Jul 2010 05:43:43 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201007130543.o6D5hhqb032125@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 13 Jul 2010 05:43:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209976 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 05:43:43 -0000 Author: nwhitehorn Date: Tue Jul 13 05:43:43 2010 New Revision: 209976 URL: http://svn.freebsd.org/changeset/base/209976 Log: Add powerpc64 kernel ldscript. Added: head/sys/conf/ldscript.powerpc64 - copied, changed from r209910, head/sys/conf/ldscript.powerpc Copied and modified: head/sys/conf/ldscript.powerpc64 (from r209910, head/sys/conf/ldscript.powerpc) ============================================================================== --- head/sys/conf/ldscript.powerpc Sun Jul 11 21:12:42 2010 (r209910, copy source) +++ head/sys/conf/ldscript.powerpc64 Tue Jul 13 05:43:43 2010 (r209976) @@ -1,6 +1,6 @@ /* $FreeBSD$ */ -OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", "elf32-powerpc") +OUTPUT_FORMAT("elf64-powerpc", "elf64-powerpc", "elf64-powerpc") OUTPUT_ARCH(powerpc) ENTRY(__start) SEARCH_DIR(/usr/lib); From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 06:24:00 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 184BF106564A; Tue, 13 Jul 2010 06:24:00 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail03.syd.optusnet.com.au (mail03.syd.optusnet.com.au [211.29.132.184]) by mx1.freebsd.org (Postfix) with ESMTP id 8790C8FC12; Tue, 13 Jul 2010 06:23:59 +0000 (UTC) Received: from c122-106-145-25.carlnfd1.nsw.optusnet.com.au (c122-106-145-25.carlnfd1.nsw.optusnet.com.au [122.106.145.25]) by mail03.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o6D6NrFd027102 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 13 Jul 2010 16:23:55 +1000 Date: Tue, 13 Jul 2010 16:23:53 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Jung-uk Kim In-Reply-To: <201007121532.o6CFWjPS037093@svn.freebsd.org> Message-ID: <20100713162342.M62787@delplex.bde.org> References: <201007121532.o6CFWjPS037093@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r209949 - in head: lib/libstand sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 06:24:00 -0000 On Mon, 12 Jul 2010, Jung-uk Kim wrote: > Log: > Use type-specific inline function imax() instead of deprecated macro MAX(). > > Prodded by: bde Thanks. Bruce From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 06:42:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7AABF1065670; Tue, 13 Jul 2010 06:42:47 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6A0E08FC16; Tue, 13 Jul 2010 06: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 o6D6gl0a045178; Tue, 13 Jul 2010 06:42:47 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6D6gltn045176; Tue, 13 Jul 2010 06:42:47 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007130642.o6D6gltn045176@svn.freebsd.org> From: Alexander Motin Date: Tue, 13 Jul 2010 06:42:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209977 - head/sys/dev/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 06:42:47 -0000 Author: mav Date: Tue Jul 13 06:42:47 2010 New Revision: 209977 URL: http://svn.freebsd.org/changeset/base/209977 Log: Disable multi-sector PIO transfers if ATA_SET_MULTI command failed. Submitted by: Mikolaj Golub on fs@ Modified: head/sys/dev/ata/ata-disk.c Modified: head/sys/dev/ata/ata-disk.c ============================================================================== --- head/sys/dev/ata/ata-disk.c Tue Jul 13 05:43:43 2010 (r209976) +++ head/sys/dev/ata/ata-disk.c Tue Jul 13 06:42:47 2010 (r209977) @@ -406,6 +406,8 @@ ad_init(device_t dev) if (!ata_controlcmd(dev, ATA_SET_MULTI, 0, 0, secsperint)) atadev->max_iosize = secsperint * DEV_BSIZE; + else + atadev->max_iosize = DEV_BSIZE; } else atadev->max_iosize = DEV_BSIZE; From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 06:49:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B72111065676; Tue, 13 Jul 2010 06:49:35 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A68068FC1C; Tue, 13 Jul 2010 06:49:35 +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 o6D6nZwn046717; Tue, 13 Jul 2010 06:49:35 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6D6nZ5a046715; Tue, 13 Jul 2010 06:49:35 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201007130649.o6D6nZ5a046715@svn.freebsd.org> From: Lawrence Stewart Date: Tue, 13 Jul 2010 06:49:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209978 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 06:49:35 -0000 Author: lstewart Date: Tue Jul 13 06:49:34 2010 New Revision: 209978 URL: http://svn.freebsd.org/changeset/base/209978 Log: - Rename DPCPU_SUM to DPCPU_VARSUM to better reflect the fact it operates on member variables of a DPCPU struct. - Add DPCPU_SUM which sums a DPCPU variable. Sponsored by: FreeBSD Foundation MFC after: 3 days Modified: head/sys/sys/pcpu.h Modified: head/sys/sys/pcpu.h ============================================================================== --- head/sys/sys/pcpu.h Tue Jul 13 06:42:47 2010 (r209977) +++ head/sys/sys/pcpu.h Tue Jul 13 06:49:34 2010 (r209978) @@ -109,7 +109,19 @@ extern uintptr_t dpcpu_off[]; /* * Utility macros. */ -#define DPCPU_SUM(n, var) __extension__ \ +#define DPCPU_SUM(n) __extension__ \ +({ \ + u_int _i; \ + __typeof(DPCPU_PTR(n)) sum; \ + \ + sum = 0; \ + CPU_FOREACH(_i) { \ + sum += DPCPU_ID_PTR(_i, n); \ + } \ + sum; \ +}) + +#define DPCPU_VARSUM(n, var) __extension__ \ ({ \ u_int _i; \ __typeof((DPCPU_PTR(n))->var) sum; \ From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 06:57:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C0F0A106566B; Tue, 13 Jul 2010 06:57:27 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AE0038FC13; Tue, 13 Jul 2010 06:57:27 +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 o6D6vRf7048548; Tue, 13 Jul 2010 06:57:27 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6D6vR2e048544; Tue, 13 Jul 2010 06:57:27 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007130657.o6D6vR2e048544@svn.freebsd.org> From: Alexander Motin Date: Tue, 13 Jul 2010 06:57:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209979 - in head/sys: conf pc98/cbus pc98/conf x86/isa X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 06:57:27 -0000 Author: mav Date: Tue Jul 13 06:57:27 2010 New Revision: 209979 URL: http://svn.freebsd.org/changeset/base/209979 Log: Unify pc98 event timer code with the rest of x86. Reviewed by: nyan@ Deleted: head/sys/pc98/cbus/clock.c Modified: head/sys/conf/files.pc98 head/sys/pc98/conf/GENERIC.hints head/sys/x86/isa/clock.c Modified: head/sys/conf/files.pc98 ============================================================================== --- head/sys/conf/files.pc98 Tue Jul 13 06:49:34 2010 (r209978) +++ head/sys/conf/files.pc98 Tue Jul 13 06:57:27 2010 (r209979) @@ -227,7 +227,6 @@ libkern/udivdi3.c standard libkern/umoddi3.c standard pc98/apm/apm_bioscall.S optional apm pc98/cbus/cbus_dma.c optional isa -pc98/cbus/clock.c standard pc98/cbus/fdc.c optional fdc pc98/cbus/fdc_cbus.c optional fdc isa pc98/cbus/gdc.c optional gdc @@ -253,8 +252,10 @@ pc98/pc98/pc98_machdep.c standard # x86 shared code between IA32, AMD64 and PC98 architectures # x86/isa/atpic.c optional atpic +x86/isa/clock.c standard x86/isa/isa.c optional isa x86/x86/io_apic.c optional apic x86/x86/local_apic.c optional apic x86/x86/mca.c standard x86/x86/msi.c optional apic pci +x86/x86/timeevents.c standard Modified: head/sys/pc98/conf/GENERIC.hints ============================================================================== --- head/sys/pc98/conf/GENERIC.hints Tue Jul 13 06:49:34 2010 (r209978) +++ head/sys/pc98/conf/GENERIC.hints Tue Jul 13 06:57:27 2010 (r209979) @@ -42,6 +42,10 @@ hint.ct.0.at="isa" #hint.ct.0.at="isa" #hint.ct.0.flags="0x50000" +hint.attimer.0.at="isa" +hint.attimer.0.port="0x71" +hint.attimer.0.irq="0" + hint.pcrtc.0.at="isa" hint.pckbd.0.at="isa" Modified: head/sys/x86/isa/clock.c ============================================================================== --- head/sys/x86/isa/clock.c Tue Jul 13 06:49:34 2010 (r209978) +++ head/sys/x86/isa/clock.c Tue Jul 13 06:57:27 2010 (r209979) @@ -66,9 +66,17 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef PC98 +#include +#else #include +#endif #ifdef DEV_ISA +#ifdef PC98 +#include +#else #include +#endif #include #endif @@ -78,8 +86,12 @@ __FBSDID("$FreeBSD$"); int clkintr_pending; #ifndef TIMER_FREQ +#ifdef PC98 +#define TIMER_FREQ 2457600 +#else #define TIMER_FREQ 1193182 #endif +#endif u_int i8254_freq = TIMER_FREQ; TUNABLE_INT("hw.i8254.freq", &i8254_freq); int i8254_max_count; @@ -97,6 +109,10 @@ struct attimer_softc { int port_rid, intr_rid; struct resource *port_res; struct resource *intr_res; +#ifdef PC98 + int port_rid2; + struct resource *port_res2; +#endif void *intr_handler; struct timecounter tc; struct eventtimer et; @@ -150,7 +166,11 @@ timer_spkr_acquire(void) { int mode; +#ifdef PC98 + mode = TIMER_SEL1 | TIMER_SQWAVE | TIMER_16BIT; +#else mode = TIMER_SEL2 | TIMER_SQWAVE | TIMER_16BIT; +#endif if (timer2_state != RELEASED) return (-1); @@ -163,7 +183,11 @@ timer_spkr_acquire(void) * and this is probably good enough for timer2, so we aren't as * careful with it as with timer0. */ +#ifdef PC98 + outb(TIMER_MODE, TIMER_SEL1 | (mode & 0x3f)); +#else outb(TIMER_MODE, TIMER_SEL2 | (mode & 0x3f)); +#endif ppi_spkr_on(); /* enable counter2 output to speaker */ return (0); } @@ -175,7 +199,11 @@ timer_spkr_release(void) if (timer2_state != ACQUIRED) return (-1); timer2_state = RELEASED; +#ifdef PC98 + outb(TIMER_MODE, TIMER_SEL1 | TIMER_SQWAVE | TIMER_16BIT); +#else outb(TIMER_MODE, TIMER_SEL2 | TIMER_SQWAVE | TIMER_16BIT); +#endif ppi_spkr_off(); /* disable counter2 output to speaker */ return (0); } @@ -186,8 +214,13 @@ timer_spkr_setfreq(int freq) freq = i8254_freq / freq; mtx_lock_spin(&clock_lock); +#ifdef PC98 + outb(TIMER_CNTR1, freq & 0xff); + outb(TIMER_CNTR1, freq >> 8); +#else outb(TIMER_CNTR2, freq & 0xff); outb(TIMER_CNTR2, freq >> 8); +#endif mtx_unlock_spin(&clock_lock); } @@ -293,7 +326,11 @@ DELAY(int n) while (ticks_left > 0) { #ifdef KDB if (kdb_active) { +#ifdef PC98 + outb(0x5f, 0); +#else inb(0x84); +#endif tick = prev_tick - 1; if (tick <= 0) tick = i8254_max_count; @@ -377,7 +414,9 @@ timer_restore(void) { i8254_restore(); /* restore i8254_freq and hz */ +#ifndef PC98 atrtc_restore(); /* reenable RTC interrupts */ +#endif } #endif @@ -387,6 +426,10 @@ i8254_init(void) { mtx_init(&clock_lock, "clk", NULL, MTX_SPIN | MTX_NOPROFILE); +#ifdef PC98 + if (pc98_machine_type & M_8M) + i8254_freq = 1996800L; /* 1.9968 MHz */ +#endif set_i8254_freq(i8254_freq, 0); } @@ -506,6 +549,51 @@ static struct isa_pnp_id attimer_ids[] = { 0 } }; +#ifdef PC98 +static void +pc98_alloc_resource(device_t dev) +{ + static bus_addr_t iat1[] = {0, 2, 4, 6}; + static bus_addr_t iat2[] = {0, 4}; + struct attimer_softc *sc; + + sc = device_get_softc(dev); + + sc->port_rid = 0; + bus_set_resource(dev, SYS_RES_IOPORT, sc->port_rid, IO_TIMER1, 1); + sc->port_res = isa_alloc_resourcev(dev, SYS_RES_IOPORT, + &sc->port_rid, iat1, 4, RF_ACTIVE); + if (sc->port_res == NULL) + device_printf(dev, "Warning: Couldn't map I/O.\n"); + else + isa_load_resourcev(sc->port_res, iat1, 4); + + sc->port_rid2 = 4; + bus_set_resource(dev, SYS_RES_IOPORT, sc->port_rid2, TIMER_CNTR1, 1); + sc->port_res2 = isa_alloc_resourcev(dev, SYS_RES_IOPORT, + &sc->port_rid2, iat2, 2, RF_ACTIVE); + if (sc->port_res2 == NULL) + device_printf(dev, "Warning: Couldn't map I/O.\n"); + else + isa_load_resourcev(sc->port_res2, iat2, 2); +} + +static void +pc98_release_resource(device_t dev) +{ + struct attimer_softc *sc; + + sc = device_get_softc(dev); + + if (sc->port_res) + bus_release_resource(dev, SYS_RES_IOPORT, sc->port_rid, + sc->port_res); + if (sc->port_res2) + bus_release_resource(dev, SYS_RES_IOPORT, sc->port_rid2, + sc->port_res2); +} +#endif + static int attimer_probe(device_t dev) { @@ -515,6 +603,11 @@ attimer_probe(device_t dev) /* ENOENT means no PnP-ID, device is hinted. */ if (result == ENOENT) { device_set_desc(dev, "AT timer"); +#ifdef PC98 + /* To print resources correctly. */ + pc98_alloc_resource(dev); + pc98_release_resource(dev); +#endif return (BUS_PROBE_LOW_PRIORITY); } return (result); @@ -529,9 +622,13 @@ attimer_attach(device_t dev) attimer_sc = sc = device_get_softc(dev); bzero(sc, sizeof(struct attimer_softc)); +#ifdef PC98 + pc98_alloc_resource(dev); +#else if (!(sc->port_res = bus_alloc_resource(dev, SYS_RES_IOPORT, &sc->port_rid, IO_TIMER1, IO_TIMER1 + 3, 4, RF_ACTIVE))) device_printf(dev,"Warning: Couldn't map I/O.\n"); +#endif i8254_intsrc = intr_lookup_source(0); if (i8254_intsrc != NULL) i8254_pending = i8254_intsrc->is_pic->pic_source_pending; From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 07:00:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 742AC106566C; Tue, 13 Jul 2010 07:00:57 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 62CA68FC18; Tue, 13 Jul 2010 07:00: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 o6D70vIS049352; Tue, 13 Jul 2010 07:00:57 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6D70v87049350; Tue, 13 Jul 2010 07:00:57 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201007130700.o6D70v87049350@svn.freebsd.org> From: Lawrence Stewart Date: Tue, 13 Jul 2010 07:00:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209980 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 07:00:57 -0000 Author: lstewart Date: Tue Jul 13 07:00:57 2010 New Revision: 209980 URL: http://svn.freebsd.org/changeset/base/209980 Log: Catch up with the rename of DPCPU_SUM to DPCPU_VARSUM in r209978. Sponsored by: FreeBSD Foundation Modified: head/sys/netinet/siftr.c Modified: head/sys/netinet/siftr.c ============================================================================== --- head/sys/netinet/siftr.c Tue Jul 13 06:57:27 2010 (r209979) +++ head/sys/netinet/siftr.c Tue Jul 13 07:00:57 2010 (r209980) @@ -1282,16 +1282,16 @@ siftr_manage_ops(uint8_t action) siftr_pkt_manager_thr = NULL; mtx_unlock(&siftr_pkt_mgr_mtx); - totalss.n_in = DPCPU_SUM(ss, n_in); - totalss.n_out = DPCPU_SUM(ss, n_out); - totalss.nskip_in_malloc = DPCPU_SUM(ss, nskip_in_malloc); - totalss.nskip_out_malloc = DPCPU_SUM(ss, nskip_out_malloc); - totalss.nskip_in_mtx = DPCPU_SUM(ss, nskip_in_mtx); - totalss.nskip_out_mtx = DPCPU_SUM(ss, nskip_out_mtx); - totalss.nskip_in_tcpcb = DPCPU_SUM(ss, nskip_in_tcpcb); - totalss.nskip_out_tcpcb = DPCPU_SUM(ss, nskip_out_tcpcb); - totalss.nskip_in_inpcb = DPCPU_SUM(ss, nskip_in_inpcb); - totalss.nskip_out_inpcb = DPCPU_SUM(ss, nskip_out_inpcb); + totalss.n_in = DPCPU_VARSUM(ss, n_in); + totalss.n_out = DPCPU_VARSUM(ss, n_out); + totalss.nskip_in_malloc = DPCPU_VARSUM(ss, nskip_in_malloc); + totalss.nskip_out_malloc = DPCPU_VARSUM(ss, nskip_out_malloc); + totalss.nskip_in_mtx = DPCPU_VARSUM(ss, nskip_in_mtx); + totalss.nskip_out_mtx = DPCPU_VARSUM(ss, nskip_out_mtx); + totalss.nskip_in_tcpcb = DPCPU_VARSUM(ss, nskip_in_tcpcb); + totalss.nskip_out_tcpcb = DPCPU_VARSUM(ss, nskip_out_tcpcb); + totalss.nskip_in_inpcb = DPCPU_VARSUM(ss, nskip_in_inpcb); + totalss.nskip_out_inpcb = DPCPU_VARSUM(ss, nskip_out_inpcb); total_skipped_pkts = totalss.nskip_in_malloc + totalss.nskip_out_malloc + totalss.nskip_in_mtx + From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 07:10:11 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4785A1065673; Tue, 13 Jul 2010 07:10:11 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail02.syd.optusnet.com.au (mail02.syd.optusnet.com.au [211.29.132.183]) by mx1.freebsd.org (Postfix) with ESMTP id CF6198FC1D; Tue, 13 Jul 2010 07:10:10 +0000 (UTC) Received: from c122-106-145-25.carlnfd1.nsw.optusnet.com.au (c122-106-145-25.carlnfd1.nsw.optusnet.com.au [122.106.145.25]) by mail02.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o6D7A6iA015867 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 13 Jul 2010 17:10:07 +1000 Date: Tue, 13 Jul 2010 17:10:06 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Alexander Motin In-Reply-To: <4C3B0F63.6000905@FreeBSD.org> Message-ID: <20100713162403.T62787@delplex.bde.org> References: <201007111647.o6BGlk0O033551@svn.freebsd.org> <201007120813.19223.jhb@freebsd.org> <4C3B0F63.6000905@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, John Baldwin Subject: Re: svn commit: r209900 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 07:10:11 -0000 On Mon, 12 Jul 2010, Alexander Motin wrote: > John Baldwin wrote: >> On Sunday, July 11, 2010 12:47:46 pm Alexander Motin wrote: >>> ... >>> Log: >>> Remove interval validation from cpu_tick_calibrate(). As I found, check >>> was needed at preliminary version of the patch, where number of CPU ticks >>> was divided strictly on 16 seconds. Final code instead uses real interval >>> duration, so precise interval should not be important. Same time aliasing >>> issues around second boundary causes false positives, periodically logging >>> useless "t_delta ... too long/short" messages when HZ set below 256. >> >> Hmm, did you ask phk@ about this? > > Yes. He agreed that code should be reconsidered. > >> I notice that the printfs only trigger if >> you have bootverbose enabled, so they were not affecting normal users as most >> people do not run their systems with bootverbose enabled. > > Yes, but they produce major part of kernel messages on my own systems. > I've got tired seeing them for years. It would be fine if they were > usable, but, as I have told here and on current@, with preset > implementation they were absolutely meaningless. Perhaps they are needed for some time warps, e.g., ones from the clock being stopped while in ddb: while in ddb, time_uptime isn't updated, so considerably more than 16 seconds have usually elapsed between calls to cpu_tick_calibrate(). However, the timecounter is hardware so it is updated while in ddb, so the delta-time can easily be a few seconds different from 16 (I think it is always more if the timecounter works right, and it can be less if the timecounter wraps or otherwise overflows (overflow in scaling)). However: - entering ddb breaks timecounting (except in my version, which restores the time about 3 seconds after exiting ddb, and loses only about $(cat /var/db/ntp.drift) microseconds of accuracy per second spent in ddb; my timecounter frequencies are calibrated so that $(cat /var/db/ntp.drift) is 0+-5, so the loss is small -- ntp can't tell the difference between this loss and the loss from a large temperature change) - entering ddb breaks cputick calibration even more than timecounting, except in my version. The timecounter should just lose a few seconds while in ddb. Taking deltas of it can result in a loss of almost 100% in accuracy of the calibrated frequency, especially in the overflowing cases which always happen after staying in ddb long enough for the timecounter to wrap (~2 seconds with a TSC timecounter on amd64 and i386) - the validation seemed to be of no use for detecting time warps caused by ddb. I didn't investigate this. Fix for cputick calibration: % diff -c2 ./kern/kern_tc.c~ ./kern/kern_tc.c % *** ./kern/kern_tc.c~ Thu Mar 20 01:05:27 2008 % --- ./kern/kern_tc.c Thu Mar 20 01:05:29 2008 % *************** % *** 884,888 **** % return; % % ! getbinuptime(&t_this); % c_this = cpu_ticks(); % if (t_last.sec != 0) { % --- 884,888 ---- % return; % % ! binuptime(&t_this); % c_this = cpu_ticks(); % if (t_last.sec != 0) { Minor fix for accuracy. % *************** % *** 922,931 **** % c_delta <<= 20; % c_delta /= divi; % ! if (c_delta > cpu_tick_frequency) { % ! if (0 && bootverbose) % ! printf("cpu_tick increased to %ju Hz\n", % ! c_delta); % ! cpu_tick_frequency = c_delta; % ! } % } % } % --- 922,930 ---- % c_delta <<= 20; % c_delta /= divi; % ! if (0 && bootverbose) % ! printf( % ! "cpu_tick_frequency changed from %ju to %ju Hz\n", % ! cpu_tick_frequency, c_delta); % ! cpu_tick_frequency = c_delta; % } % } Variable frequencies have the interesting capability of varying in both positive and negative directions. This fixes the case of negative-going changes. Without this, the overflowing timecounter cases caused cpu_tick_frequency to become huge (100's of times the correct value), and it was clamped to the hugest value ever seen. The way this mostly fixes the problem is that cpu_tick_frequency can be off by a factor of 100, but only for 16 seconds or so until the next calibration fixes it. I don't use this in the same kernels that have the fix for the timecounters. An integrated fix would prevent recalibration until 16 seconds after the timecounter has been restored. Setting cpu_tick_variable to 0 is an even simpler fix if the cputicker is not very variable. Without this, normal frequency drift due to temperature changes caused cpu_tick frequency to become larger than the correct value by a few ppm. Again it was clamped to the largest value ever seen, but errors of a few ppm are hard to see. There seem to be similar problems after suspend/resume, but only transient ones -- there seems to be nothing to prevent the recalibration running in the middle of a resume and seeing garbage, but then resume hopefully fixes things up by restoring the frequency, and hopefully recalibration run after that never sees garbage. If not, then the above recovers from lost races after about 16 seconds in the same way as for ddb. The fix also fixes the terminology in the diagnostic message. There is no `cpu_tick' here, and if there were then it should be a period (like kern.clockrate tick). There is only a frequency here. Bruce From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 07:52:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5BEAF106567C; Tue, 13 Jul 2010 07:52:51 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id E57068FC17; Tue, 13 Jul 2010 07:52:47 +0000 (UTC) Received: by bwz12 with SMTP id 12so3545560bwz.13 for ; Tue, 13 Jul 2010 00:52:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=2hUu+KzZBQKkXmZ6HryA0O1g3PR3gA7DzF3L/DgatMc=; b=P5r3jpj07/U8bYBIIkXBpIcNMewiKvL53p50SFFKleBFbOKlxlYLLs+hXAxMr1eqfN yfbx6r6n4+GUelmx+zXz7f32AcQ+jD3Yrsim8jzxnV9dcMiUQTqyWrku4WQu+Tv0LJvw xDAtBA0rlypetjvjgGq/wz+eAeEomjosZxBJI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=HkbWcRatGHkURnnKxJRFTrJYHzKuN89ugumUgv/0QpyzkqfZmRwJp50pA00ToBUV2v SuejX62q8MkdBLqQcc0RG0mFJXgb5v5aKF5qRYtNLDI9ksvCUKXM88vEc45s0gKcGwoA rbTTbIjgmPFXdymoyO8JCUs0s++W3tjCEpsMA= Received: by 10.223.107.211 with SMTP id c19mr1556928fap.40.1279007566653; Tue, 13 Jul 2010 00:52:46 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id 11sm690435fas.2.2010.07.13.00.52.45 (version=SSLv3 cipher=RC4-MD5); Tue, 13 Jul 2010 00:52:46 -0700 (PDT) Sender: Alexander Motin Message-ID: <4C3C1B4A.5070501@FreeBSD.org> Date: Tue, 13 Jul 2010 10:52:42 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.24 (X11/20100402) MIME-Version: 1.0 To: Bruce Evans References: <201007111647.o6BGlk0O033551@svn.freebsd.org> <201007120813.19223.jhb@freebsd.org> <4C3B0F63.6000905@FreeBSD.org> <20100713162403.T62787@delplex.bde.org> In-Reply-To: <20100713162403.T62787@delplex.bde.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r209900 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 07:52:51 -0000 Bruce Evans wrote: > Fix for cputick calibration: > > % diff -c2 ./kern/kern_tc.c~ ./kern/kern_tc.c > % *** ./kern/kern_tc.c~ Thu Mar 20 01:05:27 2008 > % --- ./kern/kern_tc.c Thu Mar 20 01:05:29 2008 > % *************** > % *** 884,888 **** > % return; > % % ! getbinuptime(&t_this); > % c_this = cpu_ticks(); > % if (t_last.sec != 0) { > % --- 884,888 ---- > % return; > % % ! binuptime(&t_this); > % c_this = cpu_ticks(); > % if (t_last.sec != 0) { > > Minor fix for accuracy. > > % *************** > % *** 922,931 **** > % c_delta <<= 20; > % c_delta /= divi; > % ! if (c_delta > cpu_tick_frequency) { > % ! if (0 && bootverbose) > % ! printf("cpu_tick increased to %ju Hz\n", > % ! c_delta); > % ! cpu_tick_frequency = c_delta; > % ! } > % } > % } > % --- 922,930 ---- > % c_delta <<= 20; > % c_delta /= divi; > % ! if (0 && bootverbose) > % ! printf( > % ! "cpu_tick_frequency changed from %ju to %ju Hz\n", > % ! cpu_tick_frequency, c_delta); > % ! cpu_tick_frequency = c_delta; > % } > % } > > Variable frequencies have the interesting capability of varying in > both positive and negative directions. This fixes the case of > negative-going changes. Without this, the overflowing timecounter > cases caused cpu_tick_frequency to become huge (100's of times the > correct value), and it was clamped to the hugest value ever seen. The > way this mostly fixes the problem is that cpu_tick_frequency can be > off by a factor of 100, but only for 16 seconds or so until the next > calibration fixes it. I have no hardware to check, but I have feeling that calibration didn't work well also for older CPUs with variable TSC frequency, when frequency is decreasing. I see TSC timecounter frequency changed at tsc_freq_changed(), but set_cputicker() is not called there to adopt it, neither calibration can reduce it by itself. > I don't use this in the same kernels that have the fix for the > timecounters. An integrated fix would prevent recalibration until 16 > seconds after the timecounter has been restored. > > Setting cpu_tick_variable to 0 is an even simpler fix if the cputicker > is not very variable. Yes. In fact cputicker is invariable for the most of modern x86 CPUs. But it's frequency is not always precisely known. > Without this, normal frequency drift due to temperature changes caused > cpu_tick frequency to become larger than the correct value by a few > ppm. Again it was clamped to the largest value ever seen, but errors > of a few ppm are hard to see. -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 08:05:48 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 862F81065674; Tue, 13 Jul 2010 08:05:48 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7259B8FC1B; Tue, 13 Jul 2010 08:05:48 +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 o6D85mtP063767; Tue, 13 Jul 2010 08:05:48 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6D85mDN063765; Tue, 13 Jul 2010 08:05:48 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201007130805.o6D85mDN063765@svn.freebsd.org> From: Lawrence Stewart Date: Tue, 13 Jul 2010 08:05:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209981 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 08:05:48 -0000 Author: lstewart Date: Tue Jul 13 08:05:48 2010 New Revision: 209981 URL: http://svn.freebsd.org/changeset/base/209981 Log: Macro to simplify zeroing DPCPU variables. Sponsored by: FreeBSD Foundation MFC after: 3 days Modified: head/sys/sys/pcpu.h Modified: head/sys/sys/pcpu.h ============================================================================== --- head/sys/sys/pcpu.h Tue Jul 13 07:00:57 2010 (r209980) +++ head/sys/sys/pcpu.h Tue Jul 13 08:05:48 2010 (r209981) @@ -133,6 +133,15 @@ extern uintptr_t dpcpu_off[]; sum; \ }) +#define DPCPU_ZERO(n) do { \ + u_int _i; \ + \ + CPU_FOREACH(_i) { \ + bzero(DPCPU_ID_PTR(_i, n), \ + sizeof(__typeof(DPCPU_PTR(n)))); \ + } \ +} while(0) + /* * XXXUPS remove as soon as we have per cpu variable * linker sets and can define rm_queue in _rm_lock.h From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 08:23:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CBE111065672; Tue, 13 Jul 2010 08:23:46 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BA58E8FC28; Tue, 13 Jul 2010 08:23: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 o6D8NkVn067901; Tue, 13 Jul 2010 08:23:46 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6D8Nkun067899; Tue, 13 Jul 2010 08:23:46 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201007130823.o6D8Nkun067899@svn.freebsd.org> From: Lawrence Stewart Date: Tue, 13 Jul 2010 08:23:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209982 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 08:23:46 -0000 Author: lstewart Date: Tue Jul 13 08:23:46 2010 New Revision: 209982 URL: http://svn.freebsd.org/changeset/base/209982 Log: The SIFTR DPCPU statistics struct was not being zeroed between enable/disable cycles so the values would accumulate rather than reset for each cycle. Sponsored by: FreeBSD Foundation Modified: head/sys/netinet/siftr.c Modified: head/sys/netinet/siftr.c ============================================================================== --- head/sys/netinet/siftr.c Tue Jul 13 08:05:48 2010 (r209981) +++ head/sys/netinet/siftr.c Tue Jul 13 08:23:46 2010 (r209982) @@ -1233,6 +1233,8 @@ siftr_manage_ops(uint8_t action) STAILQ_INIT(&pkt_queue); + DPCPU_ZERO(ss); + siftr_exit_pkt_manager_thread = 0; ret = kthread_add(&siftr_pkt_manager_thread, NULL, NULL, From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 08:43:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 292B21065670; Tue, 13 Jul 2010 08:43:29 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 18EEB8FC22; Tue, 13 Jul 2010 08:43: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 o6D8hS0x072253; Tue, 13 Jul 2010 08:43:28 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6D8hSrB072251; Tue, 13 Jul 2010 08:43:28 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201007130843.o6D8hSrB072251@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 13 Jul 2010 08:43:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209983 - stable/8/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 08:43:29 -0000 Author: kib Date: Tue Jul 13 08:43:28 2010 New Revision: 209983 URL: http://svn.freebsd.org/changeset/base/209983 Log: MFC r209742: In revoke(), verify that VCHR vnode indeed belongs to devfs. Modified: stable/8/sys/kern/vfs_syscalls.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/kern/vfs_syscalls.c ============================================================================== --- stable/8/sys/kern/vfs_syscalls.c Tue Jul 13 08:23:46 2010 (r209982) +++ stable/8/sys/kern/vfs_syscalls.c Tue Jul 13 08:43:28 2010 (r209983) @@ -4209,7 +4209,7 @@ revoke(td, uap) vfslocked = NDHASGIANT(&nd); vp = nd.ni_vp; NDFREE(&nd, NDF_ONLY_PNBUF); - if (vp->v_type != VCHR) { + if (vp->v_type != VCHR || vp->v_rdev == NULL) { error = EINVAL; goto out; } From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 08:45:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F17B31065672; Tue, 13 Jul 2010 08:45:50 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E14148FC1F; Tue, 13 Jul 2010 08:45: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 o6D8joOe072821; Tue, 13 Jul 2010 08:45:50 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6D8jo9f072819; Tue, 13 Jul 2010 08:45:50 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201007130845.o6D8jo9f072819@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 13 Jul 2010 08:45:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209984 - stable/8/sys/dev/md X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 08:45:51 -0000 Author: kib Date: Tue Jul 13 08:45:50 2010 New Revision: 209984 URL: http://svn.freebsd.org/changeset/base/209984 Log: MFC r209743: Calculate nshift only once. Modified: stable/8/sys/dev/md/md.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/md/md.c ============================================================================== --- stable/8/sys/dev/md/md.c Tue Jul 13 08:43:28 2010 (r209983) +++ stable/8/sys/dev/md/md.c Tue Jul 13 08:45:50 2010 (r209984) @@ -255,7 +255,7 @@ dimension(off_t size) { off_t rcnt; struct indir *ip; - int i, layer; + int layer; rcnt = size; layer = 0; @@ -263,9 +263,6 @@ dimension(off_t size) rcnt /= NINDIR; layer++; } - /* figure out log2(NINDIR) */ - for (i = NINDIR, nshift = -1; i; nshift++) - i >>= 1; /* * XXX: the top layer is probably not fully populated, so we allocate @@ -1220,6 +1217,11 @@ g_md_init(struct g_class *mp __unused) caddr_t c; u_char *ptr, *name, *type; unsigned len; + int i; + + /* figure out log2(NINDIR) */ + for (i = NINDIR, nshift = -1; i; nshift++) + i >>= 1; mod = NULL; sx_init(&md_sx, "MD config lock"); From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 08:53:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6850B106566B; Tue, 13 Jul 2010 08:53:41 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 586FD8FC08; Tue, 13 Jul 2010 08:53:41 +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 o6D8rfhM074648; Tue, 13 Jul 2010 08:53:41 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6D8rfGg074646; Tue, 13 Jul 2010 08:53:41 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201007130853.o6D8rfGg074646@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 13 Jul 2010 08:53:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209985 - stable/7/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 08:53:41 -0000 Author: kib Date: Tue Jul 13 08:53:41 2010 New Revision: 209985 URL: http://svn.freebsd.org/changeset/base/209985 Log: MFC r209742: In revoke(), verify that VCHR vnode indeed belongs to devfs. Modified: stable/7/sys/kern/vfs_syscalls.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/kern/vfs_syscalls.c ============================================================================== --- stable/7/sys/kern/vfs_syscalls.c Tue Jul 13 08:45:50 2010 (r209984) +++ stable/7/sys/kern/vfs_syscalls.c Tue Jul 13 08:53:41 2010 (r209985) @@ -3963,7 +3963,7 @@ revoke(td, uap) vfslocked = NDHASGIANT(&nd); vp = nd.ni_vp; NDFREE(&nd, NDF_ONLY_PNBUF); - if (vp->v_type != VCHR) { + if (vp->v_type != VCHR || vp->v_rdev == NULL) { error = EINVAL; goto out; } From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 08:55:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EBA601065673; Tue, 13 Jul 2010 08:55:52 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DBC158FC1F; Tue, 13 Jul 2010 08:55:52 +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 o6D8tqfl075183; Tue, 13 Jul 2010 08:55:52 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6D8tqgE075181; Tue, 13 Jul 2010 08:55:52 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201007130855.o6D8tqgE075181@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 13 Jul 2010 08:55:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209986 - stable/7/sys/dev/md X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 08:55:53 -0000 Author: kib Date: Tue Jul 13 08:55:52 2010 New Revision: 209986 URL: http://svn.freebsd.org/changeset/base/209986 Log: MFC r209743: Calculate nshift only once. Modified: stable/7/sys/dev/md/md.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/md/md.c ============================================================================== --- stable/7/sys/dev/md/md.c Tue Jul 13 08:53:41 2010 (r209985) +++ stable/7/sys/dev/md/md.c Tue Jul 13 08:55:52 2010 (r209986) @@ -252,7 +252,7 @@ dimension(off_t size) { off_t rcnt; struct indir *ip; - int i, layer; + int layer; rcnt = size; layer = 0; @@ -260,9 +260,6 @@ dimension(off_t size) rcnt /= NINDIR; layer++; } - /* figure out log2(NINDIR) */ - for (i = NINDIR, nshift = -1; i; nshift++) - i >>= 1; /* * XXX: the top layer is probably not fully populated, so we allocate @@ -1203,6 +1200,11 @@ g_md_init(struct g_class *mp __unused) caddr_t c; u_char *ptr, *name, *type; unsigned len; + int i; + + /* figure out log2(NINDIR) */ + for (i = NINDIR, nshift = -1; i; nshift++) + i >>= 1; mod = NULL; sx_init(&md_sx, "MD config lock"); From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 09:17:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE36F106567F; Tue, 13 Jul 2010 09:17:30 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D04388FC1E; Tue, 13 Jul 2010 09:17:30 +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 o6D9HUil079997; Tue, 13 Jul 2010 09:17:30 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6D9HUb3079995; Tue, 13 Jul 2010 09:17:30 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201007130917.o6D9HUb3079995@svn.freebsd.org> From: Lawrence Stewart Date: Tue, 13 Jul 2010 09:17:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209987 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 09:17:31 -0000 Author: lstewart Date: Tue Jul 13 09:17:30 2010 New Revision: 209987 URL: http://svn.freebsd.org/changeset/base/209987 Log: - The sum variable used in DPCPU_SUM needs to be of the same type as the DPCPU variable, rather than a pointer to the type. - Zero # bytes equivalent to sizeof(object), not sizeof(ptr_to_object). - Remove an unnecessary __typeof. Sponsored by: FreeBSD Foundation Submitted by: jmallet MFC after: 3 days Modified: head/sys/sys/pcpu.h Modified: head/sys/sys/pcpu.h ============================================================================== --- head/sys/sys/pcpu.h Tue Jul 13 08:55:52 2010 (r209986) +++ head/sys/sys/pcpu.h Tue Jul 13 09:17:30 2010 (r209987) @@ -112,7 +112,7 @@ extern uintptr_t dpcpu_off[]; #define DPCPU_SUM(n) __extension__ \ ({ \ u_int _i; \ - __typeof(DPCPU_PTR(n)) sum; \ + __typeof(*DPCPU_PTR(n)) sum; \ \ sum = 0; \ CPU_FOREACH(_i) { \ @@ -137,8 +137,7 @@ extern uintptr_t dpcpu_off[]; u_int _i; \ \ CPU_FOREACH(_i) { \ - bzero(DPCPU_ID_PTR(_i, n), \ - sizeof(__typeof(DPCPU_PTR(n)))); \ + bzero(DPCPU_ID_PTR(_i, n), sizeof(*DPCPU_PTR(n))); \ } \ } while(0) From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 10:32:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0DD29106564A; Tue, 13 Jul 2010 10:32:44 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DE53B8FC1C; Tue, 13 Jul 2010 10:32:43 +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 o6DAWhgj096793; Tue, 13 Jul 2010 10:32:43 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DAWhPn096791; Tue, 13 Jul 2010 10:32:43 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201007131032.o6DAWhPn096791@svn.freebsd.org> From: Ed Schouten Date: Tue, 13 Jul 2010 10:32:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209988 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 10:32:44 -0000 Author: ed Date: Tue Jul 13 10:32:43 2010 New Revision: 209988 URL: http://svn.freebsd.org/changeset/base/209988 Log: UT_NAMESIZE is no more. Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Tue Jul 13 09:17:30 2010 (r209987) +++ head/sys/sys/param.h Tue Jul 13 10:32:43 2010 (r209988) @@ -69,7 +69,6 @@ * Redefined constants are from POSIX 1003.1 limits file. * * MAXCOMLEN should be >= sizeof(ac_comm) (see ) - * MAXLOGNAME should be == UT_NAMESIZE+1 (see ) */ #include From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 11:04:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 75A3D1065673; Tue, 13 Jul 2010 11:04:46 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6B43D8FC13; Tue, 13 Jul 2010 11:04: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 o6DB4kSh005424; Tue, 13 Jul 2010 11:04:46 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DB4kF8005422; Tue, 13 Jul 2010 11:04:46 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201007131104.o6DB4kF8005422@svn.freebsd.org> From: Ed Schouten Date: Tue, 13 Jul 2010 11:04:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209989 - stable/8/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 11:04:46 -0000 Author: ed Date: Tue Jul 13 11:04:46 2010 New Revision: 209989 URL: http://svn.freebsd.org/changeset/base/209989 Log: MFC r209718: Fix a race condition, where a TTY could be destroyed twice. There are special cases where tty_rel_free() can be called twice in a row, namely when closing and revoking the TTY at the same moment. Only call destroy_dev_sched_cb() once. Reported by: Jeremie Le Hen Modified: stable/8/sys/kern/tty.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/kern/tty.c ============================================================================== --- stable/8/sys/kern/tty.c Tue Jul 13 10:32:43 2010 (r209988) +++ stable/8/sys/kern/tty.c Tue Jul 13 11:04:46 2010 (r209989) @@ -1020,7 +1020,8 @@ tty_rel_free(struct tty *tp) tp->t_dev = NULL; tty_unlock(tp); - destroy_dev_sched_cb(dev, tty_dealloc, tp); + if (dev != NULL) + destroy_dev_sched_cb(dev, tty_dealloc, tp); } void From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 12:39:15 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 980641065674; Tue, 13 Jul 2010 12:39:15 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 21A3C8FC1B; Tue, 13 Jul 2010 12:39:14 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.4/8.14.4) with ESMTP id o6DCdD8k031776; Tue, 13 Jul 2010 16:39:13 +0400 (MSD) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.4/8.14.4/Submit) id o6DCdDeN031775; Tue, 13 Jul 2010 16:39:13 +0400 (MSD) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 13 Jul 2010 16:39:13 +0400 From: Gleb Smirnoff To: Jack F Vogel Message-ID: <20100713123912.GF63689@FreeBSD.org> References: <201007091711.o69HBUDP096886@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <201007091711.o69HBUDP096886@svn.freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r209859 - head/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 12:39:15 -0000 On Fri, Jul 09, 2010 at 05:11:30PM +0000, Jack F Vogel wrote: J> Author: jfv J> Date: Fri Jul 9 17:11:29 2010 J> New Revision: 209859 J> URL: http://svn.freebsd.org/changeset/base/209859 J> J> Log: J> Fix of a VLAN problem by jhb, the checksum capability J> got lost along the way. J> J> MFC: asap J> J> Modified: J> head/sys/dev/e1000/if_igb.c J> J> Modified: head/sys/dev/e1000/if_igb.c J> ============================================================================== J> --- head/sys/dev/e1000/if_igb.c Fri Jul 9 16:19:51 2010 (r209858) J> +++ head/sys/dev/e1000/if_igb.c Fri Jul 9 17:11:29 2010 (r209859) J> @@ -2679,7 +2679,7 @@ igb_setup_interface(device_t dev, struct J> J> ifp->if_capabilities = ifp->if_capenable = 0; J> J> - ifp->if_capabilities = IFCAP_HWCSUM | IFCAP_VLAN_MTU; J> + ifp->if_capabilities = IFCAP_HWCSUM | IFCAP_VLAN_HWCSUM; J> ifp->if_capabilities |= IFCAP_TSO4; J> ifp->if_capabilities |= IFCAP_JUMBO_MTU; J> if (igb_header_split) And now the IFCAP_VLAN_MTU got lost along the way, didn't it? -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 12:46:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 923191065673; Tue, 13 Jul 2010 12:46:06 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7E9788FC21; Tue, 13 Jul 2010 12:46: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 o6DCk6cv027774; Tue, 13 Jul 2010 12:46:06 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DCk6Yq027768; Tue, 13 Jul 2010 12:46:06 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007131246.o6DCk6Yq027768@svn.freebsd.org> From: Alexander Motin Date: Tue, 13 Jul 2010 12:46:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209990 - in head/sys: dev/acpica x86/isa x86/x86 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 12:46:06 -0000 Author: mav Date: Tue Jul 13 12:46:06 2010 New Revision: 209990 URL: http://svn.freebsd.org/changeset/base/209990 Log: Rise knowledge about curthread->td_intr_frame by one step. Make timer callback argument really opaque. Not repeat interrupt handler's problem in case somebody will ever need to have both argument and frame. Modified: head/sys/dev/acpica/acpi_hpet.c head/sys/x86/isa/atrtc.c head/sys/x86/isa/clock.c head/sys/x86/x86/local_apic.c head/sys/x86/x86/timeevents.c Modified: head/sys/dev/acpica/acpi_hpet.c ============================================================================== --- head/sys/dev/acpica/acpi_hpet.c Tue Jul 13 11:04:46 2010 (r209989) +++ head/sys/dev/acpica/acpi_hpet.c Tue Jul 13 12:46:06 2010 (r209990) @@ -216,10 +216,8 @@ hpet_intr_single(void *arg) } else if (t->mode == 2) t->mode = 0; mt = (t->pcpu_master < 0) ? t : &sc->t[t->pcpu_master]; - if (mt->et.et_active) { - mt->et.et_event_cb(&mt->et, - mt->et.et_arg ? mt->et.et_arg : curthread->td_intr_frame); - } + if (mt->et.et_active) + mt->et.et_event_cb(&mt->et, mt->et.et_arg); return (FILTER_HANDLED); } Modified: head/sys/x86/isa/atrtc.c ============================================================================== --- head/sys/x86/isa/atrtc.c Tue Jul 13 11:04:46 2010 (r209989) +++ head/sys/x86/isa/atrtc.c Tue Jul 13 12:46:06 2010 (r209990) @@ -209,11 +209,8 @@ rtc_intr(void *arg) while (rtcin(RTC_INTR) & RTCIR_PERIOD) { flag = 1; - if (sc->et.et_active) { - sc->et.et_event_cb(&sc->et, - sc->et.et_arg ? sc->et.et_arg : - curthread->td_intr_frame); - } + if (sc->et.et_active) + sc->et.et_event_cb(&sc->et, sc->et.et_arg); } return(flag ? FILTER_HANDLED : FILTER_STRAY); } Modified: head/sys/x86/isa/clock.c ============================================================================== --- head/sys/x86/isa/clock.c Tue Jul 13 11:04:46 2010 (r209989) +++ head/sys/x86/isa/clock.c Tue Jul 13 12:46:06 2010 (r209990) @@ -148,10 +148,8 @@ clkintr(void *arg) mtx_unlock_spin(&clock_lock); } - if (sc && sc->et.et_active) { - sc->et.et_event_cb(&sc->et, - sc->et.et_arg ? sc->et.et_arg : curthread->td_intr_frame); - } + if (sc && sc->et.et_active) + sc->et.et_event_cb(&sc->et, sc->et.et_arg); #ifdef DEV_MCA /* Reset clock interrupt by asserting bit 7 of port 0x61 */ Modified: head/sys/x86/x86/local_apic.c ============================================================================== --- head/sys/x86/x86/local_apic.c Tue Jul 13 11:04:46 2010 (r209989) +++ head/sys/x86/x86/local_apic.c Tue Jul 13 12:46:06 2010 (r209990) @@ -802,8 +802,7 @@ lapic_handle_timer(struct trapframe *fra td = curthread; oldframe = td->td_intr_frame; td->td_intr_frame = frame; - lapic_et.et_event_cb(&lapic_et, - lapic_et.et_arg ? lapic_et.et_arg : frame); + lapic_et.et_event_cb(&lapic_et, lapic_et.et_arg); td->td_intr_frame = oldframe; } critical_exit(); Modified: head/sys/x86/x86/timeevents.c ============================================================================== --- head/sys/x86/x86/timeevents.c Tue Jul 13 11:04:46 2010 (r209989) +++ head/sys/x86/x86/timeevents.c Tue Jul 13 12:46:06 2010 (r209990) @@ -165,7 +165,7 @@ timer1cb(struct eventtimer *et, void *ar } } } - hardclockhandler((struct trapframe *)arg); + hardclockhandler(curthread->td_intr_frame); } /* timer2 callback. */ @@ -188,7 +188,7 @@ timer2cb(struct eventtimer *et, void *ar } } } - statclockhandler((struct trapframe *)arg); + statclockhandler(curthread->td_intr_frame); } /* From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 12:46:57 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0BA881065672; Tue, 13 Jul 2010 12:46:57 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 89C588FC1B; Tue, 13 Jul 2010 12:46:56 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.4/8.14.4) with ESMTP id o6DCktpU031883; Tue, 13 Jul 2010 16:46:55 +0400 (MSD) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.4/8.14.4/Submit) id o6DCktvh031882; Tue, 13 Jul 2010 16:46:55 +0400 (MSD) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 13 Jul 2010 16:46:55 +0400 From: Gleb Smirnoff To: Jack F Vogel Message-ID: <20100713124655.GG63689@FreeBSD.org> References: <201007091711.o69HBUDP096886@svn.freebsd.org> <20100713123912.GF63689@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <20100713123912.GF63689@FreeBSD.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r209859 - head/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 12:46:57 -0000 On Tue, Jul 13, 2010 at 04:39:13PM +0400, Gleb Smirnoff wrote: T> On Fri, Jul 09, 2010 at 05:11:30PM +0000, Jack F Vogel wrote: T> J> Author: jfv T> J> Date: Fri Jul 9 17:11:29 2010 T> J> New Revision: 209859 T> J> URL: http://svn.freebsd.org/changeset/base/209859 T> J> T> J> Log: T> J> Fix of a VLAN problem by jhb, the checksum capability T> J> got lost along the way. T> J> T> J> MFC: asap T> J> T> J> Modified: T> J> head/sys/dev/e1000/if_igb.c T> J> T> J> Modified: head/sys/dev/e1000/if_igb.c T> J> ============================================================================== T> J> --- head/sys/dev/e1000/if_igb.c Fri Jul 9 16:19:51 2010 (r209858) T> J> +++ head/sys/dev/e1000/if_igb.c Fri Jul 9 17:11:29 2010 (r209859) T> J> @@ -2679,7 +2679,7 @@ igb_setup_interface(device_t dev, struct T> J> T> J> ifp->if_capabilities = ifp->if_capenable = 0; T> J> T> J> - ifp->if_capabilities = IFCAP_HWCSUM | IFCAP_VLAN_MTU; T> J> + ifp->if_capabilities = IFCAP_HWCSUM | IFCAP_VLAN_HWCSUM; T> J> ifp->if_capabilities |= IFCAP_TSO4; T> J> ifp->if_capabilities |= IFCAP_JUMBO_MTU; T> J> if (igb_header_split) T> T> And now the IFCAP_VLAN_MTU got lost along the way, didn't it? Oops, sorry. Now I read the entire file. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 12:47:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A8C7106566C; Tue, 13 Jul 2010 12:47:32 +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 348CD8FC13; Tue, 13 Jul 2010 12:47:32 +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 o6DClWep028129; Tue, 13 Jul 2010 12:47:32 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DClWcp028124; Tue, 13 Jul 2010 12:47:32 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201007131247.o6DClWcp028124@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 13 Jul 2010 12:47:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209991 - in head/sys/modules: . cas hwpmc sound/driver X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 12:47:32 -0000 Author: nwhitehorn Date: Tue Jul 13 12:47:31 2010 New Revision: 209991 URL: http://svn.freebsd.org/changeset/base/209991 Log: Make kernel modules build correctly on 64-bit PowerPC. Modified: head/sys/modules/Makefile head/sys/modules/cas/Makefile head/sys/modules/hwpmc/Makefile head/sys/modules/sound/driver/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Tue Jul 13 12:46:06 2010 (r209990) +++ head/sys/modules/Makefile Tue Jul 13 12:47:31 2010 (r209991) @@ -318,7 +318,7 @@ SUBDIR= ${_3dfx} \ ${_zfs} \ zlib \ -.if ${MACHINE_ARCH} != "powerpc" && ${MACHINE_ARCH} != "arm" && \ +.if ${MACHINE_CPUARCH} != "powerpc" && ${MACHINE_ARCH} != "arm" && \ ${MACHINE_ARCH} != "mips" _syscons= syscons _vpo= vpo @@ -615,7 +615,7 @@ _wi= wi _xe= xe .endif -.if ${MACHINE_ARCH} == "powerpc" +.if ${MACHINE_CPUARCH} == "powerpc" _an= an _bm= bm _cpufreq= cpufreq Modified: head/sys/modules/cas/Makefile ============================================================================== --- head/sys/modules/cas/Makefile Tue Jul 13 12:46:06 2010 (r209990) +++ head/sys/modules/cas/Makefile Tue Jul 13 12:47:31 2010 (r209991) @@ -5,7 +5,7 @@ KMOD= if_cas SRCS= bus_if.h device_if.h if_cas.c miibus_if.h pci_if.h ${ofw_bus_if} -.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "sparc64" +.if ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_ARCH} == "sparc64" ofw_bus_if= ofw_bus_if.h .endif Modified: head/sys/modules/hwpmc/Makefile ============================================================================== --- head/sys/modules/hwpmc/Makefile Tue Jul 13 12:46:06 2010 (r209990) +++ head/sys/modules/hwpmc/Makefile Tue Jul 13 12:47:31 2010 (r209991) @@ -28,7 +28,7 @@ SRCS+= device_if.h bus_if.h SRCS+= hwpmc_ia64.c .endif -.if ${MACHINE_ARCH} == "powerpc" +.if ${MACHINE_CPUARCH} == "powerpc" SRCS+= hwpmc_powerpc.c .endif Modified: head/sys/modules/sound/driver/Makefile ============================================================================== --- head/sys/modules/sound/driver/Makefile Tue Jul 13 12:46:06 2010 (r209990) +++ head/sys/modules/sound/driver/Makefile Tue Jul 13 12:47:31 2010 (r209991) @@ -15,7 +15,7 @@ SUBDIR+= audiocs .endif .endif -.if ${MACHINE_ARCH} == "powerpc" +.if ${MACHINE_CPUARCH} == "powerpc" SUBDIR+= ai2s davbus .endif From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 12:47:47 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA783106566C; Tue, 13 Jul 2010 12:47:47 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail08.syd.optusnet.com.au (mail08.syd.optusnet.com.au [211.29.132.189]) by mx1.freebsd.org (Postfix) with ESMTP id 5FBBE8FC1D; Tue, 13 Jul 2010 12:47:46 +0000 (UTC) Received: from c122-106-145-25.carlnfd1.nsw.optusnet.com.au (c122-106-145-25.carlnfd1.nsw.optusnet.com.au [122.106.145.25]) by mail08.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o6DClhwI017697 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 13 Jul 2010 22:47:44 +1000 Date: Tue, 13 Jul 2010 22:47:43 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Alexander Motin In-Reply-To: <4C3C1B4A.5070501@FreeBSD.org> Message-ID: <20100713222551.K62994@delplex.bde.org> References: <201007111647.o6BGlk0O033551@svn.freebsd.org> <201007120813.19223.jhb@freebsd.org> <4C3B0F63.6000905@FreeBSD.org> <20100713162403.T62787@delplex.bde.org> <4C3C1B4A.5070501@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Bruce Evans Subject: Re: svn commit: r209900 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 12:47:47 -0000 On Tue, 13 Jul 2010, Alexander Motin wrote: > Bruce Evans wrote: >> Fix for cputick calibration: >> ... >> Variable frequencies have the interesting capability of varying in >> both positive and negative directions. This fixes the case of >> negative-going changes. ... > > I have no hardware to check, but I have feeling that calibration didn't > work well also for older CPUs with variable TSC frequency, when > frequency is decreasing. I see TSC timecounter frequency changed at > tsc_freq_changed(), but set_cputicker() is not called there to adopt it, > neither calibration can reduce it by itself. It is only called from init_TSC() and tsc_levels_changed(). I don't really understand tsc_xxx_change*(). It's interesting that the call in tsc_levels_changed() passes `max_freq' as the frequency. Is the calibrator expected to reduce from a maximum frequency to a much smaller throttled frequency? But it can only go the other way without my change. >> I don't use this in the same kernels that have the fix for the >> timecounters. An integrated fix would prevent recalibration until 16 >> seconds after the timecounter has been restored. >> >> Setting cpu_tick_variable to 0 is an even simpler fix if the cputicker >> is not very variable. > > Yes. In fact cputicker is invariable for the most of modern x86 CPUs. > But it's frequency is not always precisely known. When it is invariable, it is easy to determine precisely (just wait long enough to find the average to the desired accuracy (this is only seconds for 1 ppm even with a slow timecounter like ACPI-fast as a reference). Try ~bde/tsccalib/tsccalib.c on a FreeBSD cluster machine. This requires all the CPUs to be in sync since it doesn't know how to pin the thread to a CPU. Bruce From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 12:51:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91FE31065676; Tue, 13 Jul 2010 12:51:03 +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 876A18FC14; Tue, 13 Jul 2010 12:51:03 +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 o6DCp3I1029073; Tue, 13 Jul 2010 12:51:03 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DCp3R1029069; Tue, 13 Jul 2010 12:51:03 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201007131251.o6DCp3R1029069@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 13 Jul 2010 12:51:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209992 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 12:51:03 -0000 Author: nwhitehorn Date: Tue Jul 13 12:51:02 2010 New Revision: 209992 URL: http://svn.freebsd.org/changeset/base/209992 Log: Install arch-specific manpages by MACHINE_CPUARCH, not MACHINE_ARCH. Modified: head/share/man/man4/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Tue Jul 13 12:47:31 2010 (r209991) +++ head/share/man/man4/Makefile Tue Jul 13 12:51:02 2010 (r209992) @@ -678,8 +678,8 @@ MLINKS+=lindev.4 full.4 _atp.4= atp.4 .endif -.if exists(${.CURDIR}/man4.${MACHINE_ARCH}) -SUBDIR= man4.${MACHINE_ARCH} +.if exists(${.CURDIR}/man4.${MACHINE_CPUARCH}) +SUBDIR= man4.${MACHINE_CPUARCH} .endif .include From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 13:11:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C9801065674; Tue, 13 Jul 2010 13:11:19 +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 0156C8FC1E; Tue, 13 Jul 2010 13:11: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 o6DDBIYg033819; Tue, 13 Jul 2010 13:11:18 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DDBIIg033814; Tue, 13 Jul 2010 13:11:18 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201007131311.o6DDBIIg033814@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 13 Jul 2010 13:11:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209993 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 13:11:19 -0000 Author: nwhitehorn Date: Tue Jul 13 13:11:18 2010 New Revision: 209993 URL: http://svn.freebsd.org/changeset/base/209993 Log: Convert several instances of MACHINE_ARCH to MACHINE_CPUARCH and use the correct compiler flags on 64-bit PowerPC. Modified: head/sys/conf/kern.mk head/sys/conf/kern.post.mk head/sys/conf/kern.pre.mk head/sys/conf/kmod.mk Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Tue Jul 13 12:51:02 2010 (r209992) +++ head/sys/conf/kern.mk Tue Jul 13 13:11:18 2010 (r209993) @@ -74,7 +74,7 @@ INLINE_LIMIT?= 8000 # floating point registers for integer operations which it has a tendency to do. # Also explicitly disable Altivec instructions inside the kernel. # -.if ${MACHINE_ARCH} == "powerpc" +.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64" CFLAGS+= -msoft-float -mno-altivec INLINE_LIMIT?= 15000 .endif Modified: head/sys/conf/kern.post.mk ============================================================================== --- head/sys/conf/kern.post.mk Tue Jul 13 12:51:02 2010 (r209992) +++ head/sys/conf/kern.post.mk Tue Jul 13 13:11:18 2010 (r209993) @@ -166,8 +166,8 @@ SRCS= assym.s vnode_if.h ${BEFORE_DEPEND mv .newdep .depend _ILINKS= machine -.if ${MACHINE} != ${MACHINE_ARCH} -_ILINKS+= ${MACHINE_ARCH} +.if ${MACHINE} != ${MACHINE_CPUARCH} +_ILINKS+= ${MACHINE_CPUARCH} .endif # Ensure that the link exists without depending on it when it exists. @@ -181,8 +181,8 @@ ${_ILINKS}: @case ${.TARGET} in \ machine) \ path=${S}/${MACHINE}/include ;; \ - ${MACHINE_ARCH}) \ - path=${S}/${MACHINE_ARCH}/include ;; \ + ${MACHINE_CPUARCH}) \ + path=${S}/${MACHINE_CPUARCH}/include ;; \ esac ; \ ${ECHO} ${.TARGET} "->" $$path ; \ ln -s $$path ${.TARGET} Modified: head/sys/conf/kern.pre.mk ============================================================================== --- head/sys/conf/kern.pre.mk Tue Jul 13 12:51:02 2010 (r209992) +++ head/sys/conf/kern.pre.mk Tue Jul 13 13:11:18 2010 (r209993) @@ -12,7 +12,7 @@ KODIR?= /boot/${KERNEL} LDSCRIPT_NAME?= ldscript.$M LDSCRIPT?= $S/conf/${LDSCRIPT_NAME} -M= ${MACHINE_ARCH} +M= ${MACHINE_CPUARCH} AWK?= awk LINT?= lint Modified: head/sys/conf/kmod.mk ============================================================================== --- head/sys/conf/kmod.mk Tue Jul 13 12:51:02 2010 (r209992) +++ head/sys/conf/kmod.mk Tue Jul 13 13:11:18 2010 (r209993) @@ -129,7 +129,7 @@ CFLAGS+= ${DEBUG_FLAGS} CFLAGS+= -fno-omit-frame-pointer .endif -.if ${MACHINE_ARCH} == "powerpc" +.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64" CFLAGS+= -mlongcall -fno-omit-frame-pointer .endif @@ -226,8 +226,8 @@ ${FULLPROG}: ${OBJS} .endif _ILINKS=@ machine -.if ${MACHINE} != ${MACHINE_ARCH} -_ILINKS+=${MACHINE_ARCH} +.if ${MACHINE} != ${MACHINE_CPUARCH} +_ILINKS+=${MACHINE_CPUARCH} .endif all: objwarn ${PROG} @@ -254,8 +254,8 @@ SYSDIR= ${_dir} ${_ILINKS}: @case ${.TARGET} in \ - ${MACHINE_ARCH}) \ - path=${SYSDIR}/${MACHINE_ARCH}/include ;; \ + ${MACHINE_CPUARCH}) \ + path=${SYSDIR}/${MACHINE_CPUARCH}/include ;; \ machine) \ path=${SYSDIR}/${MACHINE}/include ;; \ @) \ @@ -451,11 +451,11 @@ assym.s: @/kern/genassym.sh .endif sh @/kern/genassym.sh genassym.o > ${.TARGET} .if exists(@) -genassym.o: @/${MACHINE_ARCH}/${MACHINE_ARCH}/genassym.c +genassym.o: @/${MACHINE_CPUARCH}/${MACHINE_CPUARCH}/genassym.c .endif genassym.o: @ machine ${SRCS:Mopt_*.h} ${CC} -c ${CFLAGS:N-fno-common} \ - @/${MACHINE_ARCH}/${MACHINE_ARCH}/genassym.c + @/${MACHINE_CPUARCH}/${MACHINE_CPUARCH}/genassym.c .endif lint: ${SRCS} From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 15:01:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9955C106564A; Tue, 13 Jul 2010 15:01:36 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8A6F78FC17; Tue, 13 Jul 2010 15:01: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 o6DF1ao1071496; Tue, 13 Jul 2010 15:01:36 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DF1ag5071495; Tue, 13 Jul 2010 15:01:36 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007131501.o6DF1ag5071495@svn.freebsd.org> From: Warner Losh Date: Tue, 13 Jul 2010 15:01:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209994 - head/sys/mips/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 15:01:36 -0000 Author: imp Date: Tue Jul 13 15:01:36 2010 New Revision: 209994 URL: http://svn.freebsd.org/changeset/base/209994 Log: Remove obsolete define "COPY_SIGCODE". This is unused in FreeBSD. Submitted by: bde@ Modified: head/sys/mips/include/cpu.h Modified: head/sys/mips/include/cpu.h ============================================================================== --- head/sys/mips/include/cpu.h Tue Jul 13 13:11:18 2010 (r209993) +++ head/sys/mips/include/cpu.h Tue Jul 13 15:01:36 2010 (r209994) @@ -278,12 +278,6 @@ * Exported definitions unique to mips cpu support. */ -/* - * definitions of cpu-dependent requirements - * referenced in generic code - */ -#define COPY_SIGCODE /* copy sigcode above user stack in exec */ - #define cpu_swapout(p) panic("cpu_swapout: can't get here"); #ifndef _LOCORE From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 15:06:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D6691065676; Tue, 13 Jul 2010 15:06:14 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8AF078FC1B; Tue, 13 Jul 2010 15:06: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 o6DF6DvU072561; Tue, 13 Jul 2010 15:06:13 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DF6Des072558; Tue, 13 Jul 2010 15:06:13 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007131506.o6DF6Des072558@svn.freebsd.org> From: Warner Losh Date: Tue, 13 Jul 2010 15:06:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209995 - in head/sys: amd64/include i386/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 15:06:14 -0000 Author: imp Date: Tue Jul 13 15:06:13 2010 New Revision: 209995 URL: http://svn.freebsd.org/changeset/base/209995 Log: Remove obsolete undef of COPY_SIGCODE. It appears to have not been used in FreeBSD in quite some time (maybe since before 4.4-lite :) Submitted by: bde Modified: head/sys/amd64/include/cpu.h head/sys/i386/include/cpu.h Modified: head/sys/amd64/include/cpu.h ============================================================================== --- head/sys/amd64/include/cpu.h Tue Jul 13 15:01:36 2010 (r209994) +++ head/sys/amd64/include/cpu.h Tue Jul 13 15:06:13 2010 (r209995) @@ -43,12 +43,6 @@ #include #include -/* - * definitions of cpu-dependent requirements - * referenced in generic code - */ -#undef COPY_SIGCODE /* don't copy sigcode above user stack in exec */ - #define cpu_exec(p) /* nothing */ #define cpu_swapin(p) /* nothing */ #define cpu_getstack(td) ((td)->td_frame->tf_rsp) Modified: head/sys/i386/include/cpu.h ============================================================================== --- head/sys/i386/include/cpu.h Tue Jul 13 15:01:36 2010 (r209994) +++ head/sys/i386/include/cpu.h Tue Jul 13 15:06:13 2010 (r209995) @@ -43,12 +43,6 @@ #include #include -/* - * definitions of cpu-dependent requirements - * referenced in generic code - */ -#undef COPY_SIGCODE /* don't copy sigcode above user stack in exec */ - #define cpu_exec(p) /* nothing */ #define cpu_swapin(p) /* nothing */ #define cpu_getstack(td) ((td)->td_frame->tf_esp) From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 15:29:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E49A5106566B; Tue, 13 Jul 2010 15:29:37 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D3C8B8FC16; Tue, 13 Jul 2010 15:29:37 +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 o6DFTb8s077753; Tue, 13 Jul 2010 15:29:37 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DFTbrn077748; Tue, 13 Jul 2010 15:29:37 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007131529.o6DFTbrn077748@svn.freebsd.org> From: Warner Losh Date: Tue, 13 Jul 2010 15:29:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209996 - in head/sys/mips: include mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 15:29:38 -0000 Author: imp Date: Tue Jul 13 15:29:37 2010 New Revision: 209996 URL: http://svn.freebsd.org/changeset/base/209996 Log: cpu_id and fpu_id are unused, except to be set early in the boot code. The problem with setting it there is that the last CPU to come up wins, it seems. This also removes one more ifdef in locore.S, a noble goal too. Since they are unused, and pollute cpu.h, remove them. Submitted by: bde.h (cpu.h pollution) Approved in theory by: jmallet@ Modified: head/sys/mips/include/cpu.h head/sys/mips/include/md_var.h head/sys/mips/mips/cpu.c head/sys/mips/mips/locore.S Modified: head/sys/mips/include/cpu.h ============================================================================== --- head/sys/mips/include/cpu.h Tue Jul 13 15:06:13 2010 (r209995) +++ head/sys/mips/include/cpu.h Tue Jul 13 15:29:37 2010 (r209996) @@ -393,16 +393,7 @@ union cpuprid { #define MIPS_RM52XX 0x28 /* QED RM52X0 based FPU ISA IV */ #define MIPS_VR5400 0x54 /* NEC Vr5400 FPU ISA IV+ */ -#ifndef _LOCORE -extern union cpuprid cpu_id; - -#define mips_proc_type() ((cpu_id.cpu.cp_vendor << 8) | cpu_id.cpu.cp_imp) -#define mips_set_proc_type(type) (cpu_id.cpu.cp_vendor = (type) >> 8, \ - cpu_id.cpu.cp_imp = ((type) & 0x00ff)) -#endif /* !_LOCORE */ - #if defined(_KERNEL) && !defined(_LOCORE) -extern union cpuprid fpu_id; struct user; Modified: head/sys/mips/include/md_var.h ============================================================================== --- head/sys/mips/include/md_var.h Tue Jul 13 15:06:13 2010 (r209995) +++ head/sys/mips/include/md_var.h Tue Jul 13 15:29:37 2010 (r209996) @@ -66,7 +66,6 @@ void mips_generic_reset(void); #endif void mips_vector_init(void); -void cpu_identify(void); void mips_cpu_init(void); void mips_pcpu0_init(void); void mips_proc0_init(void); Modified: head/sys/mips/mips/cpu.c ============================================================================== --- head/sys/mips/mips/cpu.c Tue Jul 13 15:06:13 2010 (r209995) +++ head/sys/mips/mips/cpu.c Tue Jul 13 15:29:37 2010 (r209996) @@ -52,15 +52,14 @@ __FBSDID("$FreeBSD$"); #include #include -struct mips_cpuinfo cpuinfo; +static void cpu_identify(void); -union cpuprid cpu_id; -union cpuprid fpu_id; +struct mips_cpuinfo cpuinfo; /* * Attempt to identify the MIPS CPU as much as possible. * - * XXX: Assumes the CPU is MIPS32 compliant. + * XXX: Assumes the CPU is MIPS{32,64}{,r2} compliant. * XXX: For now, skip config register selections 2 and 3 * as we don't currently use L2/L3 cache or additional * MIPS32 processor features. @@ -148,7 +147,7 @@ mips_cpu_init(void) cpu_identify(); } -void +static void cpu_identify(void) { uint32_t cfg0, cfg1, cfg2, cfg3; Modified: head/sys/mips/mips/locore.S ============================================================================== --- head/sys/mips/mips/locore.S Tue Jul 13 15:06:13 2010 (r209995) +++ head/sys/mips/mips/locore.S Tue Jul 13 15:29:37 2010 (r209996) @@ -134,25 +134,6 @@ VECTOR(_locore, unknown) mtc0 t0, MIPS_COP_0_CONFIG COP0_SYNC - /* Read and store the PrID FPU ID for CPU identification, if any. */ - mfc0 t2, COP_0_STATUS_REG - mfc0 t0, MIPS_COP_0_PRID -#ifdef CPU_HAVEFPU - and t2, MIPS_SR_COP_1_BIT - beqz t2, 1f - move t1, zero - cfc1 t1, MIPS_FPU_ID -1: -#else - /* - * This platform has no FPU, and attempting to detect one - * using the official method causes an exception. - */ - move t1, zero -#endif - sw t0, _C_LABEL(cpu_id) - sw t1, _C_LABEL(fpu_id) - /*xxximp * now that we pass a0...a3 to the platform_init routine, do we need * to stash this stuff here? From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 16:16:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 904DB106568E; Tue, 13 Jul 2010 16:16:41 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7E4548FC13; Tue, 13 Jul 2010 16:16:41 +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 o6DGGftf088281; Tue, 13 Jul 2010 16:16:41 GMT (envelope-from maxim@svn.freebsd.org) Received: (from maxim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DGGfF8088279; Tue, 13 Jul 2010 16:16:41 GMT (envelope-from maxim@svn.freebsd.org) Message-Id: <201007131616.o6DGGfF8088279@svn.freebsd.org> From: Maxim Konovalov Date: Tue, 13 Jul 2010 16:16:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210000 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 16:16:41 -0000 Author: maxim Date: Tue Jul 13 16:16:41 2010 New Revision: 210000 URL: http://svn.freebsd.org/changeset/base/210000 Log: o Correct path to include file. PR: docs/148545 Submitted by: Anton Shterenlikht MFC after: 1 week Modified: head/share/man/man4/ath.4 Modified: head/share/man/man4/ath.4 ============================================================================== --- head/share/man/man4/ath.4 Tue Jul 13 16:15:03 2010 (r209999) +++ head/share/man/man4/ath.4 Tue Jul 13 16:16:41 2010 (r210000) @@ -198,7 +198,7 @@ ifconfig wlan0 create wlandev ath0 wlanm The Atheros Hardware Access Layer was unable to configure the hardware as requested. The status code is explained in the HAL include file -.Pa sys/contrib/dev/ath/ah.h . +.Pa sys/dev/ath/ath_hal/ah.h . .It "ath%d: failed to allocate descriptors: %d" The driver was unable to allocate contiguous memory for the transmit and receive descriptors. @@ -227,7 +227,7 @@ The driver will reset the hardware and c The Atheros Hardware Access Layer was unable to reset the hardware as requested. The status code is explained in the HAL include file -.Pa sys/contrib/dev/ath/ah.h . +.Pa sys/dev/ath/ath_hal/ah.h . This should not happen. .It "ath%d: unable to start recv logic" The driver was unable to restart frame reception. From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 16:24:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 655731065679; Tue, 13 Jul 2010 16:24:04 +0000 (UTC) (envelope-from simon@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 52EA48FC0A; Tue, 13 Jul 2010 16:24:04 +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 o6DGO4qu090030; Tue, 13 Jul 2010 16:24:04 GMT (envelope-from simon@svn.freebsd.org) Received: (from simon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DGO4T3090028; Tue, 13 Jul 2010 16:24:04 GMT (envelope-from simon@svn.freebsd.org) Message-Id: <201007131624.o6DGO4T3090028@svn.freebsd.org> From: "Simon L. Nielsen" Date: Tue, 13 Jul 2010 16:24:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210002 - head/share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 16:24:04 -0000 Author: simon Date: Tue Jul 13 16:24:04 2010 New Revision: 210002 URL: http://svn.freebsd.org/changeset/base/210002 Log: In the example for how to create a VLAN, also include an example of setting the IP address. While it is documented earlier in rc.conf(5) that the '.' in the VLAN name becomes a '_' in rc.conf, this may not be easy to find when just using rc.conf(5) as reference documentation. MFC after: 1 week Modified: head/share/man/man5/rc.conf.5 Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Tue Jul 13 16:21:35 2010 (r210001) +++ head/share/man/man5/rc.conf.5 Tue Jul 13 16:24:04 2010 (r210002) @@ -1151,9 +1151,10 @@ To create a vlan device named .Li em0.101 on .Li em0 -with the vlan tag 101: +with the vlan tag 101 and the optional the IPv4 address 192.0.2.1/24: .Bd -literal vlans_em0="101" +ifconfig_em0_101="inet 192.0.2.1/24" .Ed .Pp To create a vlan device named From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 16:35:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 62780106564A; Tue, 13 Jul 2010 16:35:42 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 502538FC17; Tue, 13 Jul 2010 16:35: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 o6DGZgti092663; Tue, 13 Jul 2010 16:35:42 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DGZgUq092661; Tue, 13 Jul 2010 16:35:42 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007131635.o6DGZgUq092661@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 13 Jul 2010 16:35:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210003 - head/sys/dev/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 16:35:42 -0000 Author: jkim Date: Tue Jul 13 16:35:41 2010 New Revision: 210003 URL: http://svn.freebsd.org/changeset/base/210003 Log: Make SMP code path conditional at run-time. Modified: head/sys/dev/acpica/acpi.c Modified: head/sys/dev/acpica/acpi.c ============================================================================== --- head/sys/dev/acpica/acpi.c Tue Jul 13 16:24:04 2010 (r210002) +++ head/sys/dev/acpica/acpi.c Tue Jul 13 16:35:41 2010 (r210003) @@ -46,9 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#ifdef SMP #include -#endif #include #include @@ -2523,11 +2521,11 @@ acpi_EnterSleepState(struct acpi_softc * return_ACPI_STATUS (AE_OK); } -#ifdef SMP - thread_lock(curthread); - sched_bind(curthread, 0); - thread_unlock(curthread); -#endif + if (smp_started) { + thread_lock(curthread); + sched_bind(curthread, 0); + thread_unlock(curthread); + } /* * Be sure to hold Giant across DEVICE_SUSPEND/RESUME since non-MPSAFE @@ -2608,11 +2606,11 @@ backout: mtx_unlock(&Giant); -#ifdef SMP - thread_lock(curthread); - sched_unbind(curthread); - thread_unlock(curthread); -#endif + if (smp_started) { + thread_lock(curthread); + sched_unbind(curthread); + thread_unlock(curthread); + } /* Allow another sleep request after a while. */ timeout(acpi_sleep_enable, sc, hz * ACPI_MINIMUM_AWAKETIME); From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 16:44:00 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 634C91065672; Tue, 13 Jul 2010 16:44:00 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 6824F8FC19; Tue, 13 Jul 2010 16:43:59 +0000 (UTC) Received: by wyf22 with SMTP id 22so706694wyf.13 for ; Tue, 13 Jul 2010 09:43:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=d1NyCsaCyN7m7a05ffOZw2yGh+/teu8zXpiyIdwfW5s=; b=Fq/WP6oIkL6fC//nSh+pMbuAGG7VThwN8I7xlt5AgEEgqRlCKjX5V0g9eg+b5sGYIJ 4BeQ969aMsLXGuquxwkLM2XFvKfB5cP/tr60KQY6Mr64xOdmHtNlNRdlvVQ5o9M2hcvd hGqAtAfo2DVGHhIj/w+JUqpDhrz/EW9siyqAc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=d/IifOnimFcZ+dgBAzPdNti4I7xDVJrsKGlL2vuxTRnqcVvtggu2nQQZ9A7DhYRfm0 620TQW0DQ5Oc0r5rzjxz6Tk9mB989i93xMHIWxi0+90os/ndBOr0VZ6oT4c/RHWab3G+ +4M6dLr2TD/8pxPbLUIN7D1/RIavrLrN+6lLo= MIME-Version: 1.0 Received: by 10.227.94.138 with SMTP id z10mr4059886wbm.166.1279039435421; Tue, 13 Jul 2010 09:43:55 -0700 (PDT) Received: by 10.216.27.13 with HTTP; Tue, 13 Jul 2010 09:43:55 -0700 (PDT) In-Reply-To: <201007131506.o6DF6Des072558@svn.freebsd.org> References: <201007131506.o6DF6Des072558@svn.freebsd.org> Date: Tue, 13 Jul 2010 20:43:55 +0400 Message-ID: From: pluknet To: Warner Losh Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r209995 - in head/sys: amd64/include i386/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 16:44:00 -0000 On 13 July 2010 19:06, Warner Losh wrote: > Author: imp > Date: Tue Jul 13 15:06:13 2010 > New Revision: 209995 > URL: http://svn.freebsd.org/changeset/base/209995 > > Log: > =A0Remove obsolete undef of COPY_SIGCODE. =A0It appears to have not been > =A0used in FreeBSD in quite some time (maybe since before 4.4-lite :) > > =A0Submitted by: bde > Yeah, I didn't quite get at all why it was ever undefed in those arches whi= ch didn't use it in "excessively bogus" proprietary parts... --=20 wbr, pluknet From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 16:47:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 72DEC1065673; Tue, 13 Jul 2010 16:47:30 +0000 (UTC) (envelope-from simon@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 47EA08FC29; Tue, 13 Jul 2010 16:47:30 +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 o6DGlUBC095302; Tue, 13 Jul 2010 16:47:30 GMT (envelope-from simon@svn.freebsd.org) Received: (from simon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DGlUSw095300; Tue, 13 Jul 2010 16:47:30 GMT (envelope-from simon@svn.freebsd.org) Message-Id: <201007131647.o6DGlUSw095300@svn.freebsd.org> From: "Simon L. Nielsen" Date: Tue, 13 Jul 2010 16:47:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210004 - head/share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 16:47:30 -0000 Author: simon Date: Tue Jul 13 16:47:29 2010 New Revision: 210004 URL: http://svn.freebsd.org/changeset/base/210004 Log: Bump document for content change in r210002. Modified: head/share/man/man5/rc.conf.5 Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Tue Jul 13 16:35:41 2010 (r210003) +++ head/share/man/man5/rc.conf.5 Tue Jul 13 16:47:29 2010 (r210004) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 27, 2010 +.Dd July 13, 2010 .Dt RC.CONF 5 .Os .Sh NAME From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 16:57:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1C94106566B; Tue, 13 Jul 2010 16:57:52 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BF4948FC15; Tue, 13 Jul 2010 16:57:52 +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 o6DGvqd4097596; Tue, 13 Jul 2010 16:57:52 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DGvq9L097594; Tue, 13 Jul 2010 16:57:52 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007131657.o6DGvq9L097594@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 13 Jul 2010 16:57:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210005 - head/sys/modules/acpi/acpi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 16:57:52 -0000 Author: jkim Date: Tue Jul 13 16:57:52 2010 New Revision: 210005 URL: http://svn.freebsd.org/changeset/base/210005 Log: Define SMP unconditionally for amd64 and remove opt_global.h from SRCS. Note it is done just for correctness sake because we do not build, ship, or support acpi.ko on amd64. Prodded by: bde Modified: head/sys/modules/acpi/acpi/Makefile Modified: head/sys/modules/acpi/acpi/Makefile ============================================================================== --- head/sys/modules/acpi/acpi/Makefile Tue Jul 13 16:47:29 2010 (r210004) +++ head/sys/modules/acpi/acpi/Makefile Tue Jul 13 16:57:52 2010 (r210005) @@ -99,7 +99,10 @@ SRCS+= assym.s madt.c CLEANFILES+= acpi_wakecode.bin acpi_wakecode.h acpi_wakecode.o .if ${MACHINE_ARCH} == "amd64" -SRCS+= acpi_switch.S acpi_wakedata.h opt_global.h +.if !defined(KERNBUILDDIR) +CFLAGS+=-DSMP +.endif +SRCS+= acpi_switch.S acpi_wakedata.h CLEANFILES+= acpi_wakedata.h ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${CFLAGS} acpi_switch.o: acpi_switch.S From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 17:19:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26B461065675; Tue, 13 Jul 2010 17:19:59 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0F6008FC1C; Tue, 13 Jul 2010 17:19:59 +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 o6DHJx6a002634; Tue, 13 Jul 2010 17:19:59 GMT (envelope-from rdivacky@svn.freebsd.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DHJw7M002617; Tue, 13 Jul 2010 17:19:58 GMT (envelope-from rdivacky@svn.freebsd.org) Message-Id: <201007131719.o6DHJw7M002617@svn.freebsd.org> From: Roman Divacky Date: Tue, 13 Jul 2010 17:19:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210006 - in vendor/llvm/dist: . autoconf autoconf/m4 bindings/ada/llvm cmake cmake/modules docs docs/tutorial examples/ExceptionDemo examples/Kaleidoscope/Chapter3 examples/Kaleidoscop... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 17:19:59 -0000 Author: rdivacky Date: Tue Jul 13 17:19:57 2010 New Revision: 210006 URL: http://svn.freebsd.org/changeset/base/210006 Log: Update LLVM to r108243. Added: vendor/llvm/dist/include/llvm/ADT/DAGDeltaAlgorithm.h vendor/llvm/dist/include/llvm/Analysis/CodeMetrics.h vendor/llvm/dist/include/llvm/Analysis/Loads.h vendor/llvm/dist/include/llvm/CodeGen/FunctionLoweringInfo.h vendor/llvm/dist/include/llvm/CodeGen/PostRAHazardRecognizer.h vendor/llvm/dist/include/llvm/MC/MCObjectStreamer.h vendor/llvm/dist/include/llvm/MC/MCParser/MCAsmParserExtension.h vendor/llvm/dist/include/llvm/Support/COFF.h vendor/llvm/dist/include/llvm/Target/TargetCallingConv.h vendor/llvm/dist/lib/Analysis/Loads.cpp vendor/llvm/dist/lib/CodeGen/CallingConvLower.cpp vendor/llvm/dist/lib/CodeGen/InlineSpiller.cpp vendor/llvm/dist/lib/CodeGen/PostRAHazardRecognizer.cpp vendor/llvm/dist/lib/MC/MCObjectStreamer.cpp vendor/llvm/dist/lib/MC/MCParser/DarwinAsmParser.cpp vendor/llvm/dist/lib/MC/MCParser/ELFAsmParser.cpp vendor/llvm/dist/lib/MC/MCParser/MCAsmParserExtension.cpp vendor/llvm/dist/lib/MC/WinCOFFObjectWriter.cpp vendor/llvm/dist/lib/MC/WinCOFFStreamer.cpp vendor/llvm/dist/lib/Support/DAGDeltaAlgorithm.cpp vendor/llvm/dist/lib/Target/ARM/Thumb2HazardRecognizer.cpp vendor/llvm/dist/lib/Target/ARM/Thumb2HazardRecognizer.h vendor/llvm/dist/lib/Transforms/Hello/Hello.exports vendor/llvm/dist/test/Analysis/BasicAA/args-rets-allocas-loads.ll vendor/llvm/dist/test/Analysis/BasicAA/unreachable-block.ll vendor/llvm/dist/test/CodeGen/ARM/2010-06-11-vmovdrr-bitcast.ll vendor/llvm/dist/test/CodeGen/ARM/2010-06-21-LdStMultipleBug.ll vendor/llvm/dist/test/CodeGen/ARM/2010-06-21-nondarwin-tc.ll (contents, props changed) vendor/llvm/dist/test/CodeGen/ARM/2010-06-25-Thumb2ITInvalidIterator.ll vendor/llvm/dist/test/CodeGen/ARM/2010-06-28-DAGCombineUndef.ll vendor/llvm/dist/test/CodeGen/ARM/2010-06-29-PartialRedefFastAlloc.ll vendor/llvm/dist/test/CodeGen/ARM/2010-06-29-SubregImpDefs.ll vendor/llvm/dist/test/CodeGen/ARM/call-tc.ll vendor/llvm/dist/test/CodeGen/ARM/crash-O0.ll vendor/llvm/dist/test/CodeGen/ARM/flag-crash.ll vendor/llvm/dist/test/CodeGen/ARM/fpcmp-opt.ll vendor/llvm/dist/test/CodeGen/ARM/machine-cse-cmp.ll vendor/llvm/dist/test/CodeGen/ARM/va_arg.ll vendor/llvm/dist/test/CodeGen/CellSPU/shuffles.ll vendor/llvm/dist/test/CodeGen/Generic/add-with-overflow-128.ll vendor/llvm/dist/test/CodeGen/PowerPC/stack-protector.ll vendor/llvm/dist/test/CodeGen/Thumb/2010-06-18-SibCallCrash.ll vendor/llvm/dist/test/CodeGen/Thumb/2010-07-01-FuncAlign.ll vendor/llvm/dist/test/CodeGen/Thumb2/2010-06-14-NEONCoalescer.ll vendor/llvm/dist/test/CodeGen/Thumb2/2010-06-19-ITBlockCrash.ll vendor/llvm/dist/test/CodeGen/Thumb2/2010-06-21-TailMergeBug.ll vendor/llvm/dist/test/CodeGen/Thumb2/crash.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-call-tc.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-ifcvt1-tc.ll vendor/llvm/dist/test/CodeGen/X86/2010-06-09-FastAllocRegisters.ll vendor/llvm/dist/test/CodeGen/X86/2010-06-14-fast-isel-fs-load.ll vendor/llvm/dist/test/CodeGen/X86/2010-06-15-FastAllocEarlyCLobber.ll vendor/llvm/dist/test/CodeGen/X86/2010-06-24-g-constraint-crash.ll vendor/llvm/dist/test/CodeGen/X86/2010-06-25-CoalescerSubRegDefDead.ll vendor/llvm/dist/test/CodeGen/X86/2010-06-25-asm-RA-crash.ll vendor/llvm/dist/test/CodeGen/X86/2010-06-28-FastAllocTiedOperand.ll vendor/llvm/dist/test/CodeGen/X86/2010-06-28-matched-g-constraint.ll vendor/llvm/dist/test/CodeGen/X86/2010-07-02-UnfoldBug.ll vendor/llvm/dist/test/CodeGen/X86/2010-07-02-asm-alignstack.ll vendor/llvm/dist/test/CodeGen/X86/2010-07-06-DbgCrash.ll vendor/llvm/dist/test/CodeGen/X86/2010-07-06-asm-RIP.ll vendor/llvm/dist/test/CodeGen/X86/alloca-align-rounding-32.ll vendor/llvm/dist/test/CodeGen/X86/crash-O0.ll vendor/llvm/dist/test/CodeGen/X86/fast-isel-loads.ll vendor/llvm/dist/test/CodeGen/X86/fast-isel-x86.ll vendor/llvm/dist/test/CodeGen/X86/hidden-vis-pic.ll vendor/llvm/dist/test/CodeGen/X86/leaf-fp-elim.ll vendor/llvm/dist/test/CodeGen/X86/licm-nested.ll vendor/llvm/dist/test/CodeGen/X86/lsr-nonaffine.ll vendor/llvm/dist/test/CodeGen/X86/promote-assert-zext.ll vendor/llvm/dist/test/CodeGen/X86/sibcall-3.ll vendor/llvm/dist/test/CodeGen/X86/sse-commute.ll vendor/llvm/dist/test/CodeGen/X86/stack-protector-linux.ll vendor/llvm/dist/test/CodeGen/X86/switch-bt.ll vendor/llvm/dist/test/CodeGen/X86/v-binop-widen.ll vendor/llvm/dist/test/CodeGen/X86/v-binop-widen2.ll vendor/llvm/dist/test/CodeGen/X86/v2f32.ll vendor/llvm/dist/test/CodeGen/X86/x86-64-tls-1.ll vendor/llvm/dist/test/CodeGen/X86/zext-sext.ll vendor/llvm/dist/test/DebugInfo/2010-05-28-Crash.ll vendor/llvm/dist/test/DebugInfo/2010-06-01-DeadArg-DbgInfo.ll vendor/llvm/dist/test/DebugInfo/2010-06-29-InlinedFnLocalVar.ll vendor/llvm/dist/test/Feature/linker_private_linkages.ll vendor/llvm/dist/test/FrontendC++/2010-06-21-LocalVarDbg.cpp vendor/llvm/dist/test/FrontendC++/2010-06-22-BitfieldInit.cpp vendor/llvm/dist/test/FrontendC++/2010-06-22-ZeroBitfield.cpp vendor/llvm/dist/test/FrontendC++/thunk-linkonce-odr.cpp vendor/llvm/dist/test/FrontendC/2010-05-31-palignr.c vendor/llvm/dist/test/FrontendC/2010-06-11-SaveExpr.c vendor/llvm/dist/test/FrontendC/2010-06-17-asmcrash.c vendor/llvm/dist/test/FrontendC/2010-06-28-DbgEntryPC.c vendor/llvm/dist/test/FrontendC/2010-06-28-DbgLocalVar.c vendor/llvm/dist/test/FrontendC/2010-06-28-nowarn.c vendor/llvm/dist/test/FrontendC/2010-07-08-DeclDebugLineNo.c vendor/llvm/dist/test/FrontendObjC/2010-06-04-UnnamedCFString-dbg.m vendor/llvm/dist/test/LLVMC/C++/filelist.cpp vendor/llvm/dist/test/MC/MachO/jcc.s vendor/llvm/dist/test/Scripts/macho-dump.bat vendor/llvm/dist/test/TableGen/DefmInsideMultiClass.td vendor/llvm/dist/test/TableGen/LetInsideMultiClasses.td vendor/llvm/dist/test/TableGen/defmclass.td vendor/llvm/dist/test/TableGen/eqbit.td vendor/llvm/dist/test/TableGen/ifbit.td vendor/llvm/dist/test/TableGen/usevalname.td vendor/llvm/dist/test/Transforms/Inline/2010-05-31-ByvalTailcall.ll vendor/llvm/dist/test/Transforms/Mem2Reg/ConvertDebugInfo2.ll vendor/llvm/dist/test/Transforms/PartialSpecialize/ vendor/llvm/dist/test/Transforms/PartialSpecialize/dg.exp vendor/llvm/dist/test/Transforms/PartialSpecialize/two-specializations.ll vendor/llvm/dist/test/Transforms/ScalarRepl/address-space.ll vendor/llvm/dist/test/Transforms/SimplifyLibCalls/2010-05-30-memcpy-Struct.ll vendor/llvm/dist/test/Transforms/SimplifyLibCalls/PR7357.ll vendor/llvm/dist/test/Transforms/StripSymbols/2010-06-30-StripDebug.ll vendor/llvm/dist/test/Transforms/StripSymbols/2010-07-01-DeadDbgInfo.ll vendor/llvm/dist/test/Transforms/TailCallElim/2010-06-26-MultipleReturnValues.ll vendor/llvm/dist/unittests/ADT/DAGDeltaAlgorithmTest.cpp vendor/llvm/dist/utils/TableGen/ClangAttrEmitter.cpp vendor/llvm/dist/utils/TableGen/ClangAttrEmitter.h vendor/llvm/dist/utils/TableGen/NeonEmitter.cpp vendor/llvm/dist/utils/TableGen/NeonEmitter.h vendor/llvm/dist/utils/unittest/googletest/include/gtest/internal/gtest-tuple.h Replaced: vendor/llvm/dist/lib/ExecutionEngine/JIT/JITDebugRegisterer.cpp vendor/llvm/dist/lib/ExecutionEngine/JIT/JITDebugRegisterer.h Deleted: vendor/llvm/dist/lib/CodeGen/ExactHazardRecognizer.cpp vendor/llvm/dist/lib/CodeGen/ExactHazardRecognizer.h vendor/llvm/dist/lib/CodeGen/RegAllocLocal.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/CallingConvLower.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.h vendor/llvm/dist/lib/CodeGen/SimpleHazardRecognizer.h vendor/llvm/dist/test/CodeGen/Generic/stack-protector.ll vendor/llvm/dist/test/CodeGen/PowerPC/2008-03-06-KillInfo.ll vendor/llvm/dist/test/CodeGen/PowerPC/2010-02-26-FoldFloats.ll vendor/llvm/dist/test/CodeGen/Thumb2/sign_extend_inreg.ll vendor/llvm/dist/test/CodeGen/X86/2007-11-14-Coalescer-Bug.ll vendor/llvm/dist/test/CodeGen/X86/2008-10-16-SpillerBug.ll vendor/llvm/dist/test/CodeGen/X86/2009-01-12-CoalescerBug.ll vendor/llvm/dist/test/CodeGen/X86/2009-09-07-CoalescerBug.ll vendor/llvm/dist/test/CodeGen/X86/2009-09-19-SchedCustomLoweringBug.ll vendor/llvm/dist/test/CodeGen/X86/2009-12-12-CoalescerBug.ll vendor/llvm/dist/test/CodeGen/X86/hidden-vis-5.ll vendor/llvm/dist/test/CodeGen/X86/imp-def-copies.ll vendor/llvm/dist/test/CodeGen/X86/local-liveness.ll vendor/llvm/dist/test/CodeGen/X86/widen_shuffle-2.ll vendor/llvm/dist/test/FrontendC++/thunk-weak-odr.cpp vendor/llvm/dist/test/Transforms/InstCombine/load2.ll Modified: vendor/llvm/dist/CMakeLists.txt vendor/llvm/dist/Makefile vendor/llvm/dist/Makefile.config.in vendor/llvm/dist/Makefile.rules vendor/llvm/dist/autoconf/configure.ac vendor/llvm/dist/autoconf/m4/link_options.m4 vendor/llvm/dist/bindings/ada/llvm/llvm.ads vendor/llvm/dist/cmake/config-ix.cmake vendor/llvm/dist/cmake/modules/TableGen.cmake vendor/llvm/dist/configure vendor/llvm/dist/docs/AliasAnalysis.html vendor/llvm/dist/docs/CodeGenerator.html vendor/llvm/dist/docs/DebuggingJITedCode.html vendor/llvm/dist/docs/ExceptionHandling.html vendor/llvm/dist/docs/FAQ.html vendor/llvm/dist/docs/GetElementPtr.html vendor/llvm/dist/docs/GettingStarted.html vendor/llvm/dist/docs/HowToReleaseLLVM.html vendor/llvm/dist/docs/LangRef.html vendor/llvm/dist/docs/MakefileGuide.html vendor/llvm/dist/docs/Passes.html vendor/llvm/dist/docs/SourceLevelDebugging.html vendor/llvm/dist/docs/TableGenFundamentals.html vendor/llvm/dist/docs/WritingAnLLVMBackend.html vendor/llvm/dist/docs/WritingAnLLVMPass.html vendor/llvm/dist/docs/tutorial/LangImpl3.html vendor/llvm/dist/docs/tutorial/LangImpl4.html vendor/llvm/dist/docs/tutorial/LangImpl5.html vendor/llvm/dist/docs/tutorial/LangImpl6.html vendor/llvm/dist/docs/tutorial/LangImpl7.html vendor/llvm/dist/docs/tutorial/OCamlLangImpl3.html vendor/llvm/dist/docs/tutorial/OCamlLangImpl4.html vendor/llvm/dist/docs/tutorial/OCamlLangImpl5.html vendor/llvm/dist/docs/tutorial/OCamlLangImpl6.html vendor/llvm/dist/docs/tutorial/OCamlLangImpl7.html vendor/llvm/dist/examples/ExceptionDemo/ExceptionDemo.cpp vendor/llvm/dist/examples/Kaleidoscope/Chapter3/toy.cpp vendor/llvm/dist/examples/Kaleidoscope/Chapter4/toy.cpp vendor/llvm/dist/examples/Kaleidoscope/Chapter5/toy.cpp vendor/llvm/dist/examples/Kaleidoscope/Chapter6/toy.cpp vendor/llvm/dist/examples/Kaleidoscope/Chapter7/toy.cpp vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter4/codegen.ml vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter5/codegen.ml vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter6/codegen.ml vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter7/codegen.ml vendor/llvm/dist/include/llvm-c/Core.h vendor/llvm/dist/include/llvm-c/Target.h vendor/llvm/dist/include/llvm-c/lto.h vendor/llvm/dist/include/llvm/ADT/DenseMap.h vendor/llvm/dist/include/llvm/ADT/EquivalenceClasses.h vendor/llvm/dist/include/llvm/ADT/FoldingSet.h vendor/llvm/dist/include/llvm/ADT/ImmutableIntervalMap.h vendor/llvm/dist/include/llvm/ADT/PostOrderIterator.h vendor/llvm/dist/include/llvm/ADT/SetVector.h vendor/llvm/dist/include/llvm/ADT/SmallPtrSet.h vendor/llvm/dist/include/llvm/ADT/SmallVector.h vendor/llvm/dist/include/llvm/ADT/Statistic.h vendor/llvm/dist/include/llvm/ADT/Triple.h vendor/llvm/dist/include/llvm/ADT/ValueMap.h vendor/llvm/dist/include/llvm/ADT/ilist.h vendor/llvm/dist/include/llvm/AbstractTypeUser.h vendor/llvm/dist/include/llvm/Analysis/AliasAnalysis.h vendor/llvm/dist/include/llvm/Analysis/CFGPrinter.h vendor/llvm/dist/include/llvm/Analysis/CaptureTracking.h vendor/llvm/dist/include/llvm/Analysis/DebugInfo.h vendor/llvm/dist/include/llvm/Analysis/DominatorInternals.h vendor/llvm/dist/include/llvm/Analysis/Dominators.h vendor/llvm/dist/include/llvm/Analysis/InlineCost.h vendor/llvm/dist/include/llvm/Analysis/IntervalIterator.h vendor/llvm/dist/include/llvm/Analysis/LoopInfo.h vendor/llvm/dist/include/llvm/Analysis/MemoryBuiltins.h vendor/llvm/dist/include/llvm/Analysis/ScalarEvolution.h vendor/llvm/dist/include/llvm/Analysis/ScalarEvolutionExpander.h vendor/llvm/dist/include/llvm/Analysis/ValueTracking.h vendor/llvm/dist/include/llvm/Bitcode/ReaderWriter.h vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h vendor/llvm/dist/include/llvm/CodeGen/CallingConvLower.h vendor/llvm/dist/include/llvm/CodeGen/FastISel.h vendor/llvm/dist/include/llvm/CodeGen/GCMetadata.h vendor/llvm/dist/include/llvm/CodeGen/GCMetadataPrinter.h vendor/llvm/dist/include/llvm/CodeGen/ISDOpcodes.h vendor/llvm/dist/include/llvm/CodeGen/LinkAllCodegenComponents.h vendor/llvm/dist/include/llvm/CodeGen/LiveInterval.h vendor/llvm/dist/include/llvm/CodeGen/LiveIntervalAnalysis.h vendor/llvm/dist/include/llvm/CodeGen/MachineBasicBlock.h vendor/llvm/dist/include/llvm/CodeGen/MachineFrameInfo.h vendor/llvm/dist/include/llvm/CodeGen/MachineFunctionPass.h vendor/llvm/dist/include/llvm/CodeGen/MachineInstr.h vendor/llvm/dist/include/llvm/CodeGen/MachineJumpTableInfo.h vendor/llvm/dist/include/llvm/CodeGen/MachineLoopInfo.h vendor/llvm/dist/include/llvm/CodeGen/MachineOperand.h vendor/llvm/dist/include/llvm/CodeGen/MachineRegisterInfo.h vendor/llvm/dist/include/llvm/CodeGen/Passes.h vendor/llvm/dist/include/llvm/CodeGen/RegisterCoalescer.h vendor/llvm/dist/include/llvm/CodeGen/RegisterScavenging.h vendor/llvm/dist/include/llvm/CodeGen/RuntimeLibcalls.h vendor/llvm/dist/include/llvm/CodeGen/SelectionDAG.h vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGISel.h vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGNodes.h vendor/llvm/dist/include/llvm/CodeGen/SlotIndexes.h vendor/llvm/dist/include/llvm/Config/config.h.in vendor/llvm/dist/include/llvm/ExecutionEngine/ExecutionEngine.h vendor/llvm/dist/include/llvm/GlobalValue.h vendor/llvm/dist/include/llvm/InlineAsm.h vendor/llvm/dist/include/llvm/InstrTypes.h vendor/llvm/dist/include/llvm/Instructions.h vendor/llvm/dist/include/llvm/IntrinsicInst.h vendor/llvm/dist/include/llvm/Intrinsics.td vendor/llvm/dist/include/llvm/LinkAllPasses.h vendor/llvm/dist/include/llvm/MC/MCAssembler.h vendor/llvm/dist/include/llvm/MC/MCContext.h vendor/llvm/dist/include/llvm/MC/MCDirectives.h vendor/llvm/dist/include/llvm/MC/MCObjectWriter.h vendor/llvm/dist/include/llvm/MC/MCParser/AsmLexer.h vendor/llvm/dist/include/llvm/MC/MCParser/AsmParser.h vendor/llvm/dist/include/llvm/MC/MCParser/MCAsmLexer.h vendor/llvm/dist/include/llvm/MC/MCParser/MCAsmParser.h vendor/llvm/dist/include/llvm/MC/MCSection.h vendor/llvm/dist/include/llvm/MC/MCSectionCOFF.h vendor/llvm/dist/include/llvm/MC/MCStreamer.h vendor/llvm/dist/include/llvm/MC/SectionKind.h vendor/llvm/dist/include/llvm/Module.h vendor/llvm/dist/include/llvm/Pass.h vendor/llvm/dist/include/llvm/PassAnalysisSupport.h vendor/llvm/dist/include/llvm/PassManagers.h vendor/llvm/dist/include/llvm/PassSupport.h vendor/llvm/dist/include/llvm/Support/CFG.h vendor/llvm/dist/include/llvm/Support/CallSite.h vendor/llvm/dist/include/llvm/Support/Dwarf.h vendor/llvm/dist/include/llvm/Support/ELF.h vendor/llvm/dist/include/llvm/Support/IRBuilder.h vendor/llvm/dist/include/llvm/Support/IRReader.h vendor/llvm/dist/include/llvm/Support/MemoryBuffer.h vendor/llvm/dist/include/llvm/Support/Timer.h vendor/llvm/dist/include/llvm/Support/raw_ostream.h vendor/llvm/dist/include/llvm/SymbolTableListTraits.h vendor/llvm/dist/include/llvm/System/DataTypes.h.cmake vendor/llvm/dist/include/llvm/System/Path.h vendor/llvm/dist/include/llvm/Target/Target.td vendor/llvm/dist/include/llvm/Target/TargetAsmParser.h vendor/llvm/dist/include/llvm/Target/TargetInstrDesc.h vendor/llvm/dist/include/llvm/Target/TargetInstrInfo.h vendor/llvm/dist/include/llvm/Target/TargetInstrItineraries.h vendor/llvm/dist/include/llvm/Target/TargetLowering.h vendor/llvm/dist/include/llvm/Target/TargetOpcodes.h vendor/llvm/dist/include/llvm/Target/TargetRegisterInfo.h vendor/llvm/dist/include/llvm/Transforms/IPO.h vendor/llvm/dist/include/llvm/Transforms/Utils/BasicBlockUtils.h vendor/llvm/dist/include/llvm/Transforms/Utils/BuildLibCalls.h vendor/llvm/dist/include/llvm/Transforms/Utils/Cloning.h vendor/llvm/dist/include/llvm/Transforms/Utils/Local.h vendor/llvm/dist/include/llvm/Type.h vendor/llvm/dist/include/llvm/Use.h vendor/llvm/dist/include/llvm/Value.h vendor/llvm/dist/lib/Analysis/AliasAnalysis.cpp vendor/llvm/dist/lib/Analysis/AliasAnalysisEvaluator.cpp vendor/llvm/dist/lib/Analysis/AliasDebugger.cpp vendor/llvm/dist/lib/Analysis/BasicAliasAnalysis.cpp vendor/llvm/dist/lib/Analysis/CMakeLists.txt vendor/llvm/dist/lib/Analysis/ConstantFolding.cpp vendor/llvm/dist/lib/Analysis/DebugInfo.cpp vendor/llvm/dist/lib/Analysis/DomPrinter.cpp vendor/llvm/dist/lib/Analysis/IPA/CallGraph.cpp vendor/llvm/dist/lib/Analysis/IPA/GlobalsModRef.cpp vendor/llvm/dist/lib/Analysis/InlineCost.cpp vendor/llvm/dist/lib/Analysis/Lint.cpp vendor/llvm/dist/lib/Analysis/LoopInfo.cpp vendor/llvm/dist/lib/Analysis/MemoryBuiltins.cpp vendor/llvm/dist/lib/Analysis/MemoryDependenceAnalysis.cpp vendor/llvm/dist/lib/Analysis/PostDominators.cpp vendor/llvm/dist/lib/Analysis/ProfileInfo.cpp vendor/llvm/dist/lib/Analysis/ScalarEvolution.cpp vendor/llvm/dist/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp vendor/llvm/dist/lib/Analysis/ScalarEvolutionExpander.cpp vendor/llvm/dist/lib/Analysis/ScalarEvolutionNormalization.cpp vendor/llvm/dist/lib/Analysis/ValueTracking.cpp vendor/llvm/dist/lib/Archive/ArchiveWriter.cpp vendor/llvm/dist/lib/AsmParser/LLLexer.cpp vendor/llvm/dist/lib/AsmParser/LLParser.cpp vendor/llvm/dist/lib/AsmParser/LLToken.h vendor/llvm/dist/lib/Bitcode/Reader/BitcodeReader.cpp vendor/llvm/dist/lib/Bitcode/Writer/BitcodeWriter.cpp vendor/llvm/dist/lib/Bitcode/Writer/ValueEnumerator.cpp vendor/llvm/dist/lib/Bitcode/Writer/ValueEnumerator.h vendor/llvm/dist/lib/CodeGen/AggressiveAntiDepBreaker.cpp vendor/llvm/dist/lib/CodeGen/AggressiveAntiDepBreaker.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinter.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DIE.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp vendor/llvm/dist/lib/CodeGen/BranchFolding.cpp vendor/llvm/dist/lib/CodeGen/BranchFolding.h vendor/llvm/dist/lib/CodeGen/CMakeLists.txt vendor/llvm/dist/lib/CodeGen/CalcSpillWeights.cpp vendor/llvm/dist/lib/CodeGen/CodePlacementOpt.cpp vendor/llvm/dist/lib/CodeGen/CriticalAntiDepBreaker.cpp vendor/llvm/dist/lib/CodeGen/CriticalAntiDepBreaker.h vendor/llvm/dist/lib/CodeGen/DwarfEHPrepare.cpp vendor/llvm/dist/lib/CodeGen/ELFCodeEmitter.cpp vendor/llvm/dist/lib/CodeGen/GCStrategy.cpp vendor/llvm/dist/lib/CodeGen/IfConversion.cpp vendor/llvm/dist/lib/CodeGen/IntrinsicLowering.cpp vendor/llvm/dist/lib/CodeGen/LLVMTargetMachine.cpp vendor/llvm/dist/lib/CodeGen/LatencyPriorityQueue.cpp vendor/llvm/dist/lib/CodeGen/LiveInterval.cpp vendor/llvm/dist/lib/CodeGen/LiveIntervalAnalysis.cpp vendor/llvm/dist/lib/CodeGen/LiveStackAnalysis.cpp vendor/llvm/dist/lib/CodeGen/LiveVariables.cpp vendor/llvm/dist/lib/CodeGen/LowerSubregs.cpp vendor/llvm/dist/lib/CodeGen/MachineBasicBlock.cpp vendor/llvm/dist/lib/CodeGen/MachineCSE.cpp vendor/llvm/dist/lib/CodeGen/MachineDominators.cpp vendor/llvm/dist/lib/CodeGen/MachineFunction.cpp vendor/llvm/dist/lib/CodeGen/MachineInstr.cpp vendor/llvm/dist/lib/CodeGen/MachineLICM.cpp vendor/llvm/dist/lib/CodeGen/MachineRegisterInfo.cpp vendor/llvm/dist/lib/CodeGen/MachineSink.cpp vendor/llvm/dist/lib/CodeGen/MachineVerifier.cpp vendor/llvm/dist/lib/CodeGen/OptimizeExts.cpp vendor/llvm/dist/lib/CodeGen/OptimizePHIs.cpp vendor/llvm/dist/lib/CodeGen/PBQP/HeuristicSolver.h vendor/llvm/dist/lib/CodeGen/PBQP/Heuristics/Briggs.h vendor/llvm/dist/lib/CodeGen/PHIElimination.cpp vendor/llvm/dist/lib/CodeGen/Passes.cpp vendor/llvm/dist/lib/CodeGen/PostRASchedulerList.cpp vendor/llvm/dist/lib/CodeGen/PreAllocSplitting.cpp vendor/llvm/dist/lib/CodeGen/ProcessImplicitDefs.cpp vendor/llvm/dist/lib/CodeGen/PrologEpilogInserter.cpp vendor/llvm/dist/lib/CodeGen/RegAllocFast.cpp vendor/llvm/dist/lib/CodeGen/RegAllocLinearScan.cpp vendor/llvm/dist/lib/CodeGen/RegAllocPBQP.cpp vendor/llvm/dist/lib/CodeGen/RegisterCoalescer.cpp vendor/llvm/dist/lib/CodeGen/RegisterScavenging.cpp vendor/llvm/dist/lib/CodeGen/ScheduleDAG.cpp vendor/llvm/dist/lib/CodeGen/ScheduleDAGEmit.cpp vendor/llvm/dist/lib/CodeGen/ScheduleDAGInstrs.h vendor/llvm/dist/lib/CodeGen/SelectionDAG/CMakeLists.txt vendor/llvm/dist/lib/CodeGen/SelectionDAG/DAGCombiner.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/FastISel.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/InstrEmitter.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeTypes.h vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.h vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAG.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/TargetLowering.cpp vendor/llvm/dist/lib/CodeGen/ShadowStackGC.cpp vendor/llvm/dist/lib/CodeGen/SimpleRegisterCoalescing.cpp vendor/llvm/dist/lib/CodeGen/SimpleRegisterCoalescing.h vendor/llvm/dist/lib/CodeGen/SjLjEHPrepare.cpp vendor/llvm/dist/lib/CodeGen/SlotIndexes.cpp vendor/llvm/dist/lib/CodeGen/Spiller.cpp vendor/llvm/dist/lib/CodeGen/Spiller.h vendor/llvm/dist/lib/CodeGen/StackProtector.cpp vendor/llvm/dist/lib/CodeGen/StackSlotColoring.cpp vendor/llvm/dist/lib/CodeGen/StrongPHIElimination.cpp vendor/llvm/dist/lib/CodeGen/TailDuplication.cpp vendor/llvm/dist/lib/CodeGen/TargetInstrInfoImpl.cpp vendor/llvm/dist/lib/CodeGen/TargetLoweringObjectFileImpl.cpp vendor/llvm/dist/lib/CodeGen/TwoAddressInstructionPass.cpp vendor/llvm/dist/lib/CodeGen/VirtRegRewriter.cpp vendor/llvm/dist/lib/CompilerDriver/Tool.cpp vendor/llvm/dist/lib/ExecutionEngine/Interpreter/Execution.cpp vendor/llvm/dist/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp vendor/llvm/dist/lib/ExecutionEngine/JIT/JIT.cpp vendor/llvm/dist/lib/ExecutionEngine/JIT/JIT.h vendor/llvm/dist/lib/ExecutionEngine/JIT/JITEmitter.cpp vendor/llvm/dist/lib/Linker/LinkItems.cpp vendor/llvm/dist/lib/MC/CMakeLists.txt vendor/llvm/dist/lib/MC/MCAsmStreamer.cpp vendor/llvm/dist/lib/MC/MCAssembler.cpp vendor/llvm/dist/lib/MC/MCContext.cpp vendor/llvm/dist/lib/MC/MCExpr.cpp vendor/llvm/dist/lib/MC/MCMachOStreamer.cpp vendor/llvm/dist/lib/MC/MCParser/AsmLexer.cpp vendor/llvm/dist/lib/MC/MCParser/AsmParser.cpp vendor/llvm/dist/lib/MC/MCParser/CMakeLists.txt vendor/llvm/dist/lib/MC/MCParser/MCAsmLexer.cpp vendor/llvm/dist/lib/MC/MCParser/MCAsmParser.cpp vendor/llvm/dist/lib/MC/MCSectionCOFF.cpp vendor/llvm/dist/lib/MC/MachObjectWriter.cpp vendor/llvm/dist/lib/Support/CMakeLists.txt vendor/llvm/dist/lib/Support/DeltaAlgorithm.cpp vendor/llvm/dist/lib/Support/Dwarf.cpp vendor/llvm/dist/lib/Support/FileUtilities.cpp vendor/llvm/dist/lib/Support/FoldingSet.cpp vendor/llvm/dist/lib/Support/MemoryBuffer.cpp vendor/llvm/dist/lib/Support/PrettyStackTrace.cpp vendor/llvm/dist/lib/Support/SmallPtrSet.cpp vendor/llvm/dist/lib/Support/SmallVector.cpp vendor/llvm/dist/lib/Support/Timer.cpp vendor/llvm/dist/lib/Support/Triple.cpp vendor/llvm/dist/lib/Support/raw_ostream.cpp vendor/llvm/dist/lib/System/Disassembler.cpp vendor/llvm/dist/lib/System/Path.cpp vendor/llvm/dist/lib/System/Unix/Path.inc vendor/llvm/dist/lib/System/Unix/Program.inc vendor/llvm/dist/lib/System/Unix/Signals.inc vendor/llvm/dist/lib/System/Win32/Path.inc vendor/llvm/dist/lib/System/Win32/Signals.inc vendor/llvm/dist/lib/Target/ARM/ARM.h vendor/llvm/dist/lib/Target/ARM/ARMAddressingModes.h vendor/llvm/dist/lib/Target/ARM/ARMBaseInstrInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMBaseInstrInfo.h vendor/llvm/dist/lib/Target/ARM/ARMBaseRegisterInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMBaseRegisterInfo.h vendor/llvm/dist/lib/Target/ARM/ARMCodeEmitter.cpp vendor/llvm/dist/lib/Target/ARM/ARMConstantIslandPass.cpp vendor/llvm/dist/lib/Target/ARM/ARMConstantPoolValue.h vendor/llvm/dist/lib/Target/ARM/ARMExpandPseudoInsts.cpp vendor/llvm/dist/lib/Target/ARM/ARMISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.cpp vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.h vendor/llvm/dist/lib/Target/ARM/ARMInstrFormats.td vendor/llvm/dist/lib/Target/ARM/ARMInstrInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMInstrInfo.h vendor/llvm/dist/lib/Target/ARM/ARMInstrInfo.td vendor/llvm/dist/lib/Target/ARM/ARMInstrNEON.td vendor/llvm/dist/lib/Target/ARM/ARMInstrThumb.td vendor/llvm/dist/lib/Target/ARM/ARMInstrThumb2.td vendor/llvm/dist/lib/Target/ARM/ARMInstrVFP.td vendor/llvm/dist/lib/Target/ARM/ARMJITInfo.h vendor/llvm/dist/lib/Target/ARM/ARMLoadStoreOptimizer.cpp vendor/llvm/dist/lib/Target/ARM/ARMMachineFunctionInfo.h vendor/llvm/dist/lib/Target/ARM/ARMRegisterInfo.td vendor/llvm/dist/lib/Target/ARM/ARMScheduleA8.td vendor/llvm/dist/lib/Target/ARM/ARMScheduleA9.td vendor/llvm/dist/lib/Target/ARM/ARMScheduleV6.td vendor/llvm/dist/lib/Target/ARM/ARMTargetMachine.cpp vendor/llvm/dist/lib/Target/ARM/AsmParser/ARMAsmParser.cpp vendor/llvm/dist/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp vendor/llvm/dist/lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp vendor/llvm/dist/lib/Target/ARM/AsmPrinter/ARMInstPrinter.h vendor/llvm/dist/lib/Target/ARM/CMakeLists.txt vendor/llvm/dist/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp vendor/llvm/dist/lib/Target/ARM/Disassembler/ARMDisassemblerCore.h vendor/llvm/dist/lib/Target/ARM/Disassembler/ThumbDisassemblerCore.h vendor/llvm/dist/lib/Target/ARM/NEONMoveFix.cpp vendor/llvm/dist/lib/Target/ARM/NEONPreAllocPass.cpp vendor/llvm/dist/lib/Target/ARM/Thumb1InstrInfo.cpp vendor/llvm/dist/lib/Target/ARM/Thumb1InstrInfo.h vendor/llvm/dist/lib/Target/ARM/Thumb1RegisterInfo.cpp vendor/llvm/dist/lib/Target/ARM/Thumb1RegisterInfo.h vendor/llvm/dist/lib/Target/ARM/Thumb2ITBlockPass.cpp vendor/llvm/dist/lib/Target/ARM/Thumb2InstrInfo.cpp vendor/llvm/dist/lib/Target/ARM/Thumb2InstrInfo.h vendor/llvm/dist/lib/Target/ARM/Thumb2SizeReduction.cpp vendor/llvm/dist/lib/Target/Alpha/AlphaISelLowering.cpp vendor/llvm/dist/lib/Target/Alpha/AlphaISelLowering.h vendor/llvm/dist/lib/Target/Alpha/AlphaInstrFormats.td vendor/llvm/dist/lib/Target/Alpha/AlphaInstrInfo.cpp vendor/llvm/dist/lib/Target/Alpha/AlphaInstrInfo.h vendor/llvm/dist/lib/Target/Alpha/AlphaInstrInfo.td vendor/llvm/dist/lib/Target/Alpha/AlphaRegisterInfo.cpp vendor/llvm/dist/lib/Target/Alpha/AlphaRegisterInfo.h vendor/llvm/dist/lib/Target/Blackfin/BlackfinISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/Blackfin/BlackfinISelLowering.cpp vendor/llvm/dist/lib/Target/Blackfin/BlackfinISelLowering.h vendor/llvm/dist/lib/Target/Blackfin/BlackfinInstrInfo.cpp vendor/llvm/dist/lib/Target/Blackfin/BlackfinInstrInfo.h vendor/llvm/dist/lib/Target/Blackfin/BlackfinInstrInfo.td vendor/llvm/dist/lib/Target/Blackfin/BlackfinRegisterInfo.cpp vendor/llvm/dist/lib/Target/Blackfin/BlackfinRegisterInfo.h vendor/llvm/dist/lib/Target/CBackend/CBackend.cpp vendor/llvm/dist/lib/Target/CellSPU/SPUCallingConv.td vendor/llvm/dist/lib/Target/CellSPU/SPUFrameInfo.h vendor/llvm/dist/lib/Target/CellSPU/SPUISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/CellSPU/SPUISelLowering.cpp vendor/llvm/dist/lib/Target/CellSPU/SPUISelLowering.h vendor/llvm/dist/lib/Target/CellSPU/SPUInstrInfo.cpp vendor/llvm/dist/lib/Target/CellSPU/SPUInstrInfo.h vendor/llvm/dist/lib/Target/CellSPU/SPUNodes.td vendor/llvm/dist/lib/Target/CellSPU/SPURegisterInfo.cpp vendor/llvm/dist/lib/Target/CellSPU/SPURegisterInfo.h vendor/llvm/dist/lib/Target/CppBackend/CPPBackend.cpp vendor/llvm/dist/lib/Target/MBlaze/AsmPrinter/MBlazeAsmPrinter.cpp vendor/llvm/dist/lib/Target/MBlaze/MBlazeISelLowering.cpp vendor/llvm/dist/lib/Target/MBlaze/MBlazeISelLowering.h vendor/llvm/dist/lib/Target/MBlaze/MBlazeInstrInfo.cpp vendor/llvm/dist/lib/Target/MBlaze/MBlazeInstrInfo.h vendor/llvm/dist/lib/Target/MBlaze/MBlazeRegisterInfo.cpp vendor/llvm/dist/lib/Target/MBlaze/MBlazeRegisterInfo.h vendor/llvm/dist/lib/Target/MSIL/MSILWriter.cpp vendor/llvm/dist/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/MSP430/MSP430ISelLowering.cpp vendor/llvm/dist/lib/Target/MSP430/MSP430ISelLowering.h vendor/llvm/dist/lib/Target/MSP430/MSP430InstrInfo.cpp vendor/llvm/dist/lib/Target/MSP430/MSP430InstrInfo.h vendor/llvm/dist/lib/Target/MSP430/MSP430InstrInfo.td vendor/llvm/dist/lib/Target/MSP430/MSP430RegisterInfo.cpp vendor/llvm/dist/lib/Target/MSP430/MSP430RegisterInfo.h vendor/llvm/dist/lib/Target/Mangler.cpp vendor/llvm/dist/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp vendor/llvm/dist/lib/Target/Mips/MipsISelLowering.cpp vendor/llvm/dist/lib/Target/Mips/MipsISelLowering.h vendor/llvm/dist/lib/Target/Mips/MipsInstrInfo.cpp vendor/llvm/dist/lib/Target/Mips/MipsInstrInfo.h vendor/llvm/dist/lib/Target/Mips/MipsInstrInfo.td vendor/llvm/dist/lib/Target/Mips/MipsRegisterInfo.cpp vendor/llvm/dist/lib/Target/Mips/MipsRegisterInfo.h vendor/llvm/dist/lib/Target/PIC16/PIC16ISelLowering.cpp vendor/llvm/dist/lib/Target/PIC16/PIC16ISelLowering.h vendor/llvm/dist/lib/Target/PIC16/PIC16InstrInfo.cpp vendor/llvm/dist/lib/Target/PIC16/PIC16InstrInfo.h vendor/llvm/dist/lib/Target/PIC16/PIC16InstrInfo.td vendor/llvm/dist/lib/Target/PIC16/PIC16MemSelOpt.cpp vendor/llvm/dist/lib/Target/PIC16/PIC16Passes/PIC16Cloner.cpp vendor/llvm/dist/lib/Target/PIC16/PIC16Passes/PIC16Cloner.h vendor/llvm/dist/lib/Target/PIC16/PIC16RegisterInfo.cpp vendor/llvm/dist/lib/Target/PIC16/PIC16RegisterInfo.h vendor/llvm/dist/lib/Target/PowerPC/PPCHazardRecognizers.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.h vendor/llvm/dist/lib/Target/PowerPC/PPCInstrInfo.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCInstrInfo.h vendor/llvm/dist/lib/Target/PowerPC/PPCRegisterInfo.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCRegisterInfo.h vendor/llvm/dist/lib/Target/README.txt vendor/llvm/dist/lib/Target/Sparc/SparcISelLowering.cpp vendor/llvm/dist/lib/Target/Sparc/SparcISelLowering.h vendor/llvm/dist/lib/Target/Sparc/SparcInstrInfo.cpp vendor/llvm/dist/lib/Target/Sparc/SparcInstrInfo.h vendor/llvm/dist/lib/Target/Sparc/SparcInstrInfo.td vendor/llvm/dist/lib/Target/Sparc/SparcRegisterInfo.cpp vendor/llvm/dist/lib/Target/Sparc/SparcRegisterInfo.h vendor/llvm/dist/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZISelLowering.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZISelLowering.h vendor/llvm/dist/lib/Target/SystemZ/SystemZInstrFP.td vendor/llvm/dist/lib/Target/SystemZ/SystemZInstrInfo.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZInstrInfo.h vendor/llvm/dist/lib/Target/SystemZ/SystemZInstrInfo.td vendor/llvm/dist/lib/Target/SystemZ/SystemZRegisterInfo.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZRegisterInfo.h vendor/llvm/dist/lib/Target/SystemZ/SystemZRegisterInfo.td vendor/llvm/dist/lib/Target/TargetInstrInfo.cpp vendor/llvm/dist/lib/Target/TargetLoweringObjectFile.cpp vendor/llvm/dist/lib/Target/TargetRegisterInfo.cpp vendor/llvm/dist/lib/Target/X86/AsmParser/X86AsmLexer.cpp vendor/llvm/dist/lib/Target/X86/AsmParser/X86AsmParser.cpp vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86ATTInstPrinter.cpp vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86ATTInstPrinter.h vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86IntelInstPrinter.cpp vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86IntelInstPrinter.h vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp vendor/llvm/dist/lib/Target/X86/Disassembler/CMakeLists.txt vendor/llvm/dist/lib/Target/X86/Disassembler/X86Disassembler.cpp vendor/llvm/dist/lib/Target/X86/README-SSE.txt vendor/llvm/dist/lib/Target/X86/README-X86-64.txt vendor/llvm/dist/lib/Target/X86/README.txt vendor/llvm/dist/lib/Target/X86/X86.h vendor/llvm/dist/lib/Target/X86/X86AsmBackend.cpp vendor/llvm/dist/lib/Target/X86/X86CallingConv.td vendor/llvm/dist/lib/Target/X86/X86CodeEmitter.cpp vendor/llvm/dist/lib/Target/X86/X86FastISel.cpp vendor/llvm/dist/lib/Target/X86/X86FixupKinds.h vendor/llvm/dist/lib/Target/X86/X86FloatingPoint.cpp vendor/llvm/dist/lib/Target/X86/X86FloatingPointRegKill.cpp vendor/llvm/dist/lib/Target/X86/X86ISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/X86/X86ISelLowering.cpp vendor/llvm/dist/lib/Target/X86/X86ISelLowering.h vendor/llvm/dist/lib/Target/X86/X86Instr64bit.td vendor/llvm/dist/lib/Target/X86/X86InstrBuilder.h vendor/llvm/dist/lib/Target/X86/X86InstrFPStack.td vendor/llvm/dist/lib/Target/X86/X86InstrFormats.td vendor/llvm/dist/lib/Target/X86/X86InstrFragmentsSIMD.td vendor/llvm/dist/lib/Target/X86/X86InstrInfo.cpp vendor/llvm/dist/lib/Target/X86/X86InstrInfo.h vendor/llvm/dist/lib/Target/X86/X86InstrInfo.td vendor/llvm/dist/lib/Target/X86/X86InstrMMX.td vendor/llvm/dist/lib/Target/X86/X86InstrSSE.td vendor/llvm/dist/lib/Target/X86/X86MCCodeEmitter.cpp vendor/llvm/dist/lib/Target/X86/X86RegisterInfo.cpp vendor/llvm/dist/lib/Target/X86/X86RegisterInfo.h vendor/llvm/dist/lib/Target/X86/X86RegisterInfo.td vendor/llvm/dist/lib/Target/X86/X86Subtarget.cpp vendor/llvm/dist/lib/Target/X86/X86Subtarget.h vendor/llvm/dist/lib/Target/X86/X86TargetMachine.cpp vendor/llvm/dist/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp vendor/llvm/dist/lib/Target/XCore/XCoreISelLowering.cpp vendor/llvm/dist/lib/Target/XCore/XCoreISelLowering.h vendor/llvm/dist/lib/Target/XCore/XCoreInstrInfo.cpp vendor/llvm/dist/lib/Target/XCore/XCoreInstrInfo.h vendor/llvm/dist/lib/Target/XCore/XCoreInstrInfo.td vendor/llvm/dist/lib/Target/XCore/XCoreRegisterInfo.cpp vendor/llvm/dist/lib/Target/XCore/XCoreRegisterInfo.h vendor/llvm/dist/lib/Transforms/Hello/Hello.cpp vendor/llvm/dist/lib/Transforms/Hello/Makefile vendor/llvm/dist/lib/Transforms/IPO/ArgumentPromotion.cpp vendor/llvm/dist/lib/Transforms/IPO/DeadArgumentElimination.cpp vendor/llvm/dist/lib/Transforms/IPO/GlobalOpt.cpp vendor/llvm/dist/lib/Transforms/IPO/IPConstantPropagation.cpp vendor/llvm/dist/lib/Transforms/IPO/Inliner.cpp vendor/llvm/dist/lib/Transforms/IPO/LowerSetJmp.cpp vendor/llvm/dist/lib/Transforms/IPO/MergeFunctions.cpp vendor/llvm/dist/lib/Transforms/IPO/PartialInlining.cpp vendor/llvm/dist/lib/Transforms/IPO/PartialSpecialization.cpp vendor/llvm/dist/lib/Transforms/IPO/StripSymbols.cpp vendor/llvm/dist/lib/Transforms/IPO/StructRetPromotion.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombine.h vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCalls.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCasts.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCompares.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombinePHI.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineSelect.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineShifts.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstructionCombining.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/OptimalEdgeProfiling.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/ProfilingUtils.cpp vendor/llvm/dist/lib/Transforms/Scalar/ABCD.cpp vendor/llvm/dist/lib/Transforms/Scalar/ADCE.cpp vendor/llvm/dist/lib/Transforms/Scalar/CodeGenPrepare.cpp vendor/llvm/dist/lib/Transforms/Scalar/DeadStoreElimination.cpp vendor/llvm/dist/lib/Transforms/Scalar/GVN.cpp vendor/llvm/dist/lib/Transforms/Scalar/IndVarSimplify.cpp vendor/llvm/dist/lib/Transforms/Scalar/JumpThreading.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopDeletion.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopIndexSplit.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopRotation.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopStrengthReduce.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopUnswitch.cpp vendor/llvm/dist/lib/Transforms/Scalar/MemCpyOptimizer.cpp vendor/llvm/dist/lib/Transforms/Scalar/Reassociate.cpp vendor/llvm/dist/lib/Transforms/Scalar/ScalarReplAggregates.cpp vendor/llvm/dist/lib/Transforms/Scalar/SimplifyCFGPass.cpp vendor/llvm/dist/lib/Transforms/Scalar/SimplifyLibCalls.cpp vendor/llvm/dist/lib/Transforms/Scalar/TailDuplication.cpp vendor/llvm/dist/lib/Transforms/Scalar/TailRecursionElimination.cpp vendor/llvm/dist/lib/Transforms/Utils/AddrModeMatcher.cpp vendor/llvm/dist/lib/Transforms/Utils/BasicBlockUtils.cpp vendor/llvm/dist/lib/Transforms/Utils/BreakCriticalEdges.cpp vendor/llvm/dist/lib/Transforms/Utils/BuildLibCalls.cpp vendor/llvm/dist/lib/Transforms/Utils/CloneFunction.cpp vendor/llvm/dist/lib/Transforms/Utils/CloneLoop.cpp vendor/llvm/dist/lib/Transforms/Utils/CloneModule.cpp vendor/llvm/dist/lib/Transforms/Utils/DemoteRegToStack.cpp vendor/llvm/dist/lib/Transforms/Utils/InlineFunction.cpp vendor/llvm/dist/lib/Transforms/Utils/LCSSA.cpp vendor/llvm/dist/lib/Transforms/Utils/Local.cpp vendor/llvm/dist/lib/Transforms/Utils/LoopSimplify.cpp vendor/llvm/dist/lib/Transforms/Utils/LoopUnroll.cpp vendor/llvm/dist/lib/Transforms/Utils/LowerInvoke.cpp vendor/llvm/dist/lib/Transforms/Utils/PromoteMemoryToRegister.cpp vendor/llvm/dist/lib/Transforms/Utils/SimplifyCFG.cpp vendor/llvm/dist/lib/Transforms/Utils/ValueMapper.cpp vendor/llvm/dist/lib/Transforms/Utils/ValueMapper.h vendor/llvm/dist/lib/VMCore/AsmWriter.cpp vendor/llvm/dist/lib/VMCore/AutoUpgrade.cpp vendor/llvm/dist/lib/VMCore/ConstantFold.cpp vendor/llvm/dist/lib/VMCore/Core.cpp vendor/llvm/dist/lib/VMCore/Instruction.cpp vendor/llvm/dist/lib/VMCore/Instructions.cpp vendor/llvm/dist/lib/VMCore/IntrinsicInst.cpp vendor/llvm/dist/lib/VMCore/Metadata.cpp vendor/llvm/dist/lib/VMCore/Module.cpp vendor/llvm/dist/lib/VMCore/Pass.cpp vendor/llvm/dist/lib/VMCore/PassManager.cpp vendor/llvm/dist/lib/VMCore/Value.cpp vendor/llvm/dist/lib/VMCore/Verifier.cpp vendor/llvm/dist/test/Analysis/ScalarEvolution/2008-07-29-SMinExpr.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/scev-aa.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/trip-count10.ll vendor/llvm/dist/test/BugPoint/remove_arguments_test.ll vendor/llvm/dist/test/CMakeLists.txt vendor/llvm/dist/test/CodeGen/ARM/2008-02-04-LocalRegAllocBug.ll vendor/llvm/dist/test/CodeGen/ARM/2008-02-29-RegAllocLocal.ll vendor/llvm/dist/test/CodeGen/ARM/2009-05-07-RegAllocLocal.ll vendor/llvm/dist/test/CodeGen/ARM/2009-06-22-CoalescerBug.ll vendor/llvm/dist/test/CodeGen/ARM/2009-06-30-RegScavengerAssert.ll vendor/llvm/dist/test/CodeGen/ARM/2009-06-30-RegScavengerAssert2.ll vendor/llvm/dist/test/CodeGen/ARM/2009-06-30-RegScavengerAssert3.ll vendor/llvm/dist/test/CodeGen/ARM/2009-06-30-RegScavengerAssert4.ll vendor/llvm/dist/test/CodeGen/ARM/2009-06-30-RegScavengerAssert5.ll vendor/llvm/dist/test/CodeGen/ARM/2009-07-01-CommuteBug.ll vendor/llvm/dist/test/CodeGen/ARM/2009-07-18-RewriterBug.ll vendor/llvm/dist/test/CodeGen/ARM/2009-07-22-ScavengerAssert.ll vendor/llvm/dist/test/CodeGen/ARM/2009-07-22-SchedulerAssert.ll vendor/llvm/dist/test/CodeGen/ARM/2009-07-29-VFP3Registers.ll vendor/llvm/dist/test/CodeGen/ARM/2009-08-02-RegScavengerAssert-Neon.ll vendor/llvm/dist/test/CodeGen/ARM/2009-08-04-RegScavengerAssert-2.ll vendor/llvm/dist/test/CodeGen/ARM/2009-08-04-RegScavengerAssert.ll vendor/llvm/dist/test/CodeGen/ARM/2009-08-15-RegScavenger-EarlyClobber.ll vendor/llvm/dist/test/CodeGen/ARM/2009-08-15-RegScavengerAssert.ll vendor/llvm/dist/test/CodeGen/ARM/2009-08-21-PostRAKill.ll vendor/llvm/dist/test/CodeGen/ARM/2009-08-21-PostRAKill2.ll vendor/llvm/dist/test/CodeGen/ARM/2009-08-21-PostRAKill3.ll vendor/llvm/dist/test/CodeGen/ARM/2009-08-21-PostRAKill4.ll vendor/llvm/dist/test/CodeGen/ARM/2009-08-23-linkerprivate.ll vendor/llvm/dist/test/CodeGen/ARM/2009-08-26-ScalarToVector.ll vendor/llvm/dist/test/CodeGen/ARM/2009-08-27-ScalarToVector.ll vendor/llvm/dist/test/CodeGen/ARM/2009-08-29-ExtractEltf32.ll vendor/llvm/dist/test/CodeGen/ARM/2009-08-29-TooLongSplat.ll vendor/llvm/dist/test/CodeGen/ARM/2009-08-31-LSDA-Name.ll vendor/llvm/dist/test/CodeGen/ARM/2009-09-01-PostRAProlog.ll vendor/llvm/dist/test/CodeGen/ARM/2009-09-09-AllOnes.ll vendor/llvm/dist/test/CodeGen/ARM/2009-09-24-spill-align.ll vendor/llvm/dist/test/CodeGen/ARM/2009-09-28-LdStOptiBug.ll vendor/llvm/dist/test/CodeGen/ARM/2009-10-27-double-align.ll vendor/llvm/dist/test/CodeGen/ARM/2009-11-01-NeonMoves.ll vendor/llvm/dist/test/CodeGen/ARM/2009-12-02-vtrn-undef.ll vendor/llvm/dist/test/CodeGen/ARM/2010-04-09-NeonSelect.ll vendor/llvm/dist/test/CodeGen/ARM/2010-04-13-v2f64SplitArg.ll vendor/llvm/dist/test/CodeGen/ARM/2010-04-14-SplitVector.ll vendor/llvm/dist/test/CodeGen/ARM/2010-04-15-ScavengerDebugValue.ll vendor/llvm/dist/test/CodeGen/ARM/2010-05-18-LocalAllocCrash.ll vendor/llvm/dist/test/CodeGen/ARM/2010-05-18-PostIndexBug.ll vendor/llvm/dist/test/CodeGen/ARM/2010-05-20-NEONSpillCrash.ll vendor/llvm/dist/test/CodeGen/ARM/2010-05-21-BuildVector.ll vendor/llvm/dist/test/CodeGen/ARM/alloca.ll vendor/llvm/dist/test/CodeGen/ARM/arm-frameaddr.ll vendor/llvm/dist/test/CodeGen/ARM/arm-returnaddr.ll vendor/llvm/dist/test/CodeGen/ARM/armv4.ll vendor/llvm/dist/test/CodeGen/ARM/call.ll vendor/llvm/dist/test/CodeGen/ARM/fpconsts.ll vendor/llvm/dist/test/CodeGen/ARM/ifcvt2.ll vendor/llvm/dist/test/CodeGen/ARM/ifcvt6.ll vendor/llvm/dist/test/CodeGen/ARM/indirectbr.ll vendor/llvm/dist/test/CodeGen/ARM/inlineasm.ll vendor/llvm/dist/test/CodeGen/ARM/inlineasm3.ll vendor/llvm/dist/test/CodeGen/ARM/insn-sched1.ll vendor/llvm/dist/test/CodeGen/ARM/ldm.ll vendor/llvm/dist/test/CodeGen/ARM/long_shift.ll vendor/llvm/dist/test/CodeGen/ARM/lsr-code-insertion.ll vendor/llvm/dist/test/CodeGen/ARM/lsr-on-unrolled-loops.ll vendor/llvm/dist/test/CodeGen/ARM/reg_sequence.ll vendor/llvm/dist/test/CodeGen/ARM/remat.ll vendor/llvm/dist/test/CodeGen/ARM/select-imm.ll vendor/llvm/dist/test/CodeGen/ARM/spill-q.ll vendor/llvm/dist/test/CodeGen/ARM/trap.ll vendor/llvm/dist/test/CodeGen/ARM/unaligned_load_store.ll vendor/llvm/dist/test/CodeGen/ARM/vdup.ll vendor/llvm/dist/test/CodeGen/ARM/vext.ll vendor/llvm/dist/test/CodeGen/ARM/vget_lane.ll vendor/llvm/dist/test/CodeGen/ARM/vmov.ll vendor/llvm/dist/test/CodeGen/ARM/vrev.ll vendor/llvm/dist/test/CodeGen/Blackfin/cmp64.ll vendor/llvm/dist/test/CodeGen/CellSPU/call.ll vendor/llvm/dist/test/CodeGen/CellSPU/call_indirect.ll vendor/llvm/dist/test/CodeGen/CellSPU/jumptable.ll vendor/llvm/dist/test/CodeGen/CellSPU/loads.ll vendor/llvm/dist/test/CodeGen/CellSPU/vecinsert.ll vendor/llvm/dist/test/CodeGen/Generic/2006-09-02-LocalAllocCrash.ll vendor/llvm/dist/test/CodeGen/Generic/2010-ZeroSizedArg.ll vendor/llvm/dist/test/CodeGen/PowerPC/2007-04-30-InlineAsmEarlyClobber.ll vendor/llvm/dist/test/CodeGen/PowerPC/2007-10-21-LocalRegAllocAssert.ll vendor/llvm/dist/test/CodeGen/PowerPC/2007-10-21-LocalRegAllocAssert2.ll vendor/llvm/dist/test/CodeGen/PowerPC/2008-02-09-LocalRegAllocAssert.ll vendor/llvm/dist/test/CodeGen/PowerPC/2009-08-17-inline-asm-addr-mode-breakage.ll vendor/llvm/dist/test/CodeGen/PowerPC/2009-08-23-linkerprivate.ll vendor/llvm/dist/test/CodeGen/PowerPC/cr_spilling.ll vendor/llvm/dist/test/CodeGen/Thumb/2009-07-19-SPDecBug.ll vendor/llvm/dist/test/CodeGen/Thumb/2009-07-20-TwoAddrBug.ll vendor/llvm/dist/test/CodeGen/Thumb/2009-07-27-PEIAssert.ll vendor/llvm/dist/test/CodeGen/Thumb/2009-08-12-ConstIslandAssert.ll vendor/llvm/dist/test/CodeGen/Thumb/2009-08-12-RegInfoAssert.ll vendor/llvm/dist/test/CodeGen/Thumb/2009-08-20-ISelBug.ll vendor/llvm/dist/test/CodeGen/Thumb/2009-12-17-pre-regalloc-taildup.ll vendor/llvm/dist/test/CodeGen/Thumb/2010-01-15-local-alloc-spill-physical.ll vendor/llvm/dist/test/CodeGen/Thumb/asmprinter-bug.ll vendor/llvm/dist/test/CodeGen/Thumb/machine-licm.ll vendor/llvm/dist/test/CodeGen/Thumb/pop.ll vendor/llvm/dist/test/CodeGen/Thumb/push.ll vendor/llvm/dist/test/CodeGen/Thumb/trap.ll vendor/llvm/dist/test/CodeGen/Thumb2/2009-07-17-CrossRegClassCopy.ll vendor/llvm/dist/test/CodeGen/Thumb2/2009-07-21-ISelBug.ll vendor/llvm/dist/test/CodeGen/Thumb2/2009-07-23-CPIslandBug.ll vendor/llvm/dist/test/CodeGen/Thumb2/2009-07-30-PEICrash.ll vendor/llvm/dist/test/CodeGen/Thumb2/2009-08-01-WrongLDRBOpc.ll vendor/llvm/dist/test/CodeGen/Thumb2/2009-08-02-CoalescerBug.ll vendor/llvm/dist/test/CodeGen/Thumb2/2009-08-04-CoalescerAssert.ll vendor/llvm/dist/test/CodeGen/Thumb2/2009-08-04-CoalescerBug.ll vendor/llvm/dist/test/CodeGen/Thumb2/2009-08-04-ScavengerAssert.ll vendor/llvm/dist/test/CodeGen/Thumb2/2009-08-04-SubregLoweringBug.ll vendor/llvm/dist/test/CodeGen/Thumb2/2009-08-04-SubregLoweringBug2.ll vendor/llvm/dist/test/CodeGen/Thumb2/2009-08-04-SubregLoweringBug3.ll vendor/llvm/dist/test/CodeGen/Thumb2/2009-08-06-SpDecBug.ll vendor/llvm/dist/test/CodeGen/Thumb2/2009-08-07-NeonFPBug.ll vendor/llvm/dist/test/CodeGen/Thumb2/2009-08-08-ScavengerAssert.ll vendor/llvm/dist/test/CodeGen/Thumb2/2009-08-10-ISelBug.ll vendor/llvm/dist/test/CodeGen/Thumb2/2009-09-28-ITBlockBug.ll vendor/llvm/dist/test/CodeGen/Thumb2/2009-11-01-CopyReg2RegBug.ll vendor/llvm/dist/test/CodeGen/Thumb2/2009-11-11-ScavengerAssert.ll vendor/llvm/dist/test/CodeGen/Thumb2/2009-11-13-STRDBug.ll vendor/llvm/dist/test/CodeGen/Thumb2/2009-12-01-LoopIVUsers.ll vendor/llvm/dist/test/CodeGen/Thumb2/2010-01-06-TailDuplicateLabels.ll vendor/llvm/dist/test/CodeGen/Thumb2/2010-01-19-RemovePredicates.ll vendor/llvm/dist/test/CodeGen/Thumb2/2010-02-11-phi-cycle.ll vendor/llvm/dist/test/CodeGen/Thumb2/2010-02-24-BigStack.ll vendor/llvm/dist/test/CodeGen/Thumb2/2010-03-08-addi12-ccout.ll vendor/llvm/dist/test/CodeGen/Thumb2/2010-03-15-AsmCCClobber.ll vendor/llvm/dist/test/CodeGen/Thumb2/2010-04-15-DynAllocBug.ll vendor/llvm/dist/test/CodeGen/Thumb2/2010-04-26-CopyRegCrash.ll vendor/llvm/dist/test/CodeGen/Thumb2/2010-05-24-rsbs.ll vendor/llvm/dist/test/CodeGen/Thumb2/cross-rc-coalescing-1.ll vendor/llvm/dist/test/CodeGen/Thumb2/cross-rc-coalescing-2.ll vendor/llvm/dist/test/CodeGen/Thumb2/frameless.ll vendor/llvm/dist/test/CodeGen/Thumb2/frameless2.ll vendor/llvm/dist/test/CodeGen/Thumb2/ifcvt-neon.ll vendor/llvm/dist/test/CodeGen/Thumb2/ldr-str-imm12.ll vendor/llvm/dist/test/CodeGen/Thumb2/lsr-deficiency.ll vendor/llvm/dist/test/CodeGen/Thumb2/machine-licm.ll vendor/llvm/dist/test/CodeGen/Thumb2/pic-load.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-call.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-cbnz.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-eor.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-ifcvt1.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-ifcvt2.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-ifcvt3.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-ldm.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-select_xform.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-spill-q.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-tbh.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-uxtb.ll vendor/llvm/dist/test/CodeGen/X86/2006-11-17-IllegalMove.ll vendor/llvm/dist/test/CodeGen/X86/2007-01-08-InstrSched.ll vendor/llvm/dist/test/CodeGen/X86/2007-10-12-CoalesceExtSubReg.ll vendor/llvm/dist/test/CodeGen/X86/2007-11-04-rip-immediate-constant.ll vendor/llvm/dist/test/CodeGen/X86/2008-01-16-FPStackifierAssert.ll vendor/llvm/dist/test/CodeGen/X86/2008-02-22-LocalRegAllocBug.ll vendor/llvm/dist/test/CodeGen/X86/2008-03-10-RegAllocInfLoop.ll vendor/llvm/dist/test/CodeGen/X86/2008-03-18-CoalescerBug.ll vendor/llvm/dist/test/CodeGen/X86/2008-04-09-BranchFolding.ll vendor/llvm/dist/test/CodeGen/X86/2008-04-15-LiveVariableBug.ll vendor/llvm/dist/test/CodeGen/X86/2008-05-21-CoalescerBug.ll vendor/llvm/dist/test/CodeGen/X86/2008-05-28-LocalRegAllocBug.ll vendor/llvm/dist/test/CodeGen/X86/2008-08-23-X86-64AsmBug.ll vendor/llvm/dist/test/CodeGen/X86/2008-09-17-inline-asm-1.ll vendor/llvm/dist/test/CodeGen/X86/2008-09-18-inline-asm-2.ll vendor/llvm/dist/test/CodeGen/X86/2009-01-29-LocalRegAllocBug.ll vendor/llvm/dist/test/CodeGen/X86/2009-04-14-IllegalRegs.ll vendor/llvm/dist/test/CodeGen/X86/2009-04-20-LinearScanOpt.ll vendor/llvm/dist/test/CodeGen/X86/2009-04-24.ll vendor/llvm/dist/test/CodeGen/X86/2009-08-23-linkerprivate.ll vendor/llvm/dist/test/CodeGen/X86/2010-02-19-TailCallRetAddrBug.ll vendor/llvm/dist/test/CodeGen/X86/2010-03-17-ISelBug.ll vendor/llvm/dist/test/CodeGen/X86/2010-04-30-LocalAlloc-LandingPad.ll vendor/llvm/dist/test/CodeGen/X86/2010-05-05-LocalAllocEarlyClobber.ll vendor/llvm/dist/test/CodeGen/X86/2010-05-06-LocalInlineAsmClobber.ll vendor/llvm/dist/test/CodeGen/X86/alloca-align-rounding.ll vendor/llvm/dist/test/CodeGen/X86/break-sse-dep.ll vendor/llvm/dist/test/CodeGen/X86/crash.ll vendor/llvm/dist/test/CodeGen/X86/fast-isel-bc.ll vendor/llvm/dist/test/CodeGen/X86/fast-isel-gep.ll vendor/llvm/dist/test/CodeGen/X86/fast-isel-shift-imm.ll vendor/llvm/dist/test/CodeGen/X86/fast-isel.ll vendor/llvm/dist/test/CodeGen/X86/fp-stack-O0-crash.ll vendor/llvm/dist/test/CodeGen/X86/inline-asm-fpstack.ll vendor/llvm/dist/test/CodeGen/X86/inline-asm-fpstack2.ll vendor/llvm/dist/test/CodeGen/X86/inline-asm-fpstack3.ll vendor/llvm/dist/test/CodeGen/X86/inline-asm-fpstack4.ll vendor/llvm/dist/test/CodeGen/X86/inline-asm-tied.ll vendor/llvm/dist/test/CodeGen/X86/ins_subreg_coalesce-3.ll vendor/llvm/dist/test/CodeGen/X86/iv-users-in-other-loops.ll vendor/llvm/dist/test/CodeGen/X86/liveness-local-regalloc.ll vendor/llvm/dist/test/CodeGen/X86/loop-strength-reduce6.ll vendor/llvm/dist/test/CodeGen/X86/lsr-delayed-fold.ll vendor/llvm/dist/test/CodeGen/X86/lsr-loop-exit-cond.ll vendor/llvm/dist/test/CodeGen/X86/lsr-reuse.ll vendor/llvm/dist/test/CodeGen/X86/memcpy.ll vendor/llvm/dist/test/CodeGen/X86/object-size.ll vendor/llvm/dist/test/CodeGen/X86/optimize-max-3.ll vendor/llvm/dist/test/CodeGen/X86/phys-reg-local-regalloc.ll vendor/llvm/dist/test/CodeGen/X86/pic.ll vendor/llvm/dist/test/CodeGen/X86/pr2659.ll vendor/llvm/dist/test/CodeGen/X86/shift-folding.ll vendor/llvm/dist/test/CodeGen/X86/sink-hoist.ll vendor/llvm/dist/test/CodeGen/X86/sse-minmax.ll vendor/llvm/dist/test/CodeGen/X86/sse3.ll vendor/llvm/dist/test/CodeGen/X86/stack-align.ll vendor/llvm/dist/test/CodeGen/X86/store-narrow.ll vendor/llvm/dist/test/CodeGen/X86/tailcallstack64.ll vendor/llvm/dist/test/CodeGen/X86/tls-1.ll vendor/llvm/dist/test/CodeGen/X86/vec-trunc-store.ll vendor/llvm/dist/test/CodeGen/X86/vec_shuffle-6.ll vendor/llvm/dist/test/CodeGen/X86/vector-intrinsics.ll vendor/llvm/dist/test/CodeGen/X86/volatile.ll vendor/llvm/dist/test/CodeGen/X86/widen_shuffle-1.ll vendor/llvm/dist/test/DebugInfo/2010-05-25-DotDebugLoc.ll vendor/llvm/dist/test/FrontendC++/2010-02-17-DbgArtificialArg.cpp vendor/llvm/dist/test/FrontendC++/2010-04-30-OptimizedMethod-Dbg.cpp vendor/llvm/dist/test/FrontendC/pr5406.c vendor/llvm/dist/test/MC/AsmParser/X86/x86_32-encoding.s vendor/llvm/dist/test/MC/AsmParser/X86/x86_32-new-encoder.s vendor/llvm/dist/test/MC/AsmParser/X86/x86_64-encoding.s vendor/llvm/dist/test/MC/AsmParser/X86/x86_64-new-encoder.s vendor/llvm/dist/test/MC/AsmParser/X86/x86_64-operands.s vendor/llvm/dist/test/MC/AsmParser/directive_desc.s vendor/llvm/dist/test/MC/AsmParser/directive_subsections_via_symbols.s vendor/llvm/dist/test/MC/AsmParser/directive_zerofill.s vendor/llvm/dist/test/MC/AsmParser/exprs.s vendor/llvm/dist/test/MC/AsmParser/hello.s vendor/llvm/dist/test/MC/Disassembler/simple-tests.txt vendor/llvm/dist/test/Makefile vendor/llvm/dist/test/Other/2010-05-06-Printer.ll vendor/llvm/dist/test/Other/lint.ll vendor/llvm/dist/test/TableGen/TargetInstrInfo.td vendor/llvm/dist/test/Transforms/GVN/load-pre-align.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/indirectbr.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/single-element-range.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/tripcount_compute.ll vendor/llvm/dist/test/Transforms/InstCombine/alloca.ll vendor/llvm/dist/test/Transforms/InstCombine/badmalloc.ll vendor/llvm/dist/test/Transforms/InstCombine/call.ll vendor/llvm/dist/test/Transforms/InstCombine/cast.ll vendor/llvm/dist/test/Transforms/InstCombine/crash.ll vendor/llvm/dist/test/Transforms/InstCombine/getelementptr.ll vendor/llvm/dist/test/Transforms/InstCombine/icmp.ll vendor/llvm/dist/test/Transforms/InstCombine/load.ll vendor/llvm/dist/test/Transforms/InstCombine/load3.ll vendor/llvm/dist/test/Transforms/InstCombine/malloc-free-delete.ll vendor/llvm/dist/test/Transforms/InstCombine/select.ll vendor/llvm/dist/test/Transforms/JumpThreading/crash.ll vendor/llvm/dist/test/Transforms/LoopRotate/phi-duplicate.ll vendor/llvm/dist/test/Transforms/LoopUnswitch/preserve-analyses.ll vendor/llvm/dist/test/Transforms/Mem2Reg/ConvertDebugInfo.ll vendor/llvm/dist/test/Transforms/ScalarRepl/2009-12-11-NeonTypes.ll vendor/llvm/dist/test/Transforms/ScalarRepl/2010-01-18-SelfCopy.ll vendor/llvm/dist/test/Transforms/ScalarRepl/memcpy-align.ll vendor/llvm/dist/test/Transforms/SimplifyCFG/trapping-load-unreachable.ll vendor/llvm/dist/test/Transforms/SimplifyLibCalls/StrNCmp.ll vendor/llvm/dist/test/Transforms/SimplifyLibCalls/StrStr.ll vendor/llvm/dist/test/lit.cfg vendor/llvm/dist/test/lit.site.cfg.in vendor/llvm/dist/tools/bugpoint/BugDriver.h vendor/llvm/dist/tools/bugpoint/CrashDebugger.cpp vendor/llvm/dist/tools/bugpoint/ExtractFunction.cpp vendor/llvm/dist/tools/bugpoint/ListReducer.h vendor/llvm/dist/tools/bugpoint/Miscompilation.cpp vendor/llvm/dist/tools/bugpoint/ToolRunner.h vendor/llvm/dist/tools/edis/EDDisassembler.cpp vendor/llvm/dist/tools/gold/gold-plugin.cpp vendor/llvm/dist/tools/llc/llc.cpp vendor/llvm/dist/tools/llvm-extract/llvm-extract.cpp vendor/llvm/dist/tools/llvm-link/llvm-link.cpp vendor/llvm/dist/tools/llvm-mc/Makefile vendor/llvm/dist/tools/llvm-mc/llvm-mc.cpp vendor/llvm/dist/tools/llvm-nm/llvm-nm.cpp vendor/llvm/dist/tools/llvmc/plugins/Base/Base.td.in vendor/llvm/dist/tools/lto/LTOCodeGenerator.cpp vendor/llvm/dist/tools/opt/GraphPrinters.cpp vendor/llvm/dist/tools/opt/PrintSCC.cpp vendor/llvm/dist/tools/opt/opt.cpp vendor/llvm/dist/unittests/ADT/ValueMapTest.cpp vendor/llvm/dist/unittests/Makefile.unittest vendor/llvm/dist/utils/FileUpdate/FileUpdate.cpp vendor/llvm/dist/utils/NewNightlyTest.pl vendor/llvm/dist/utils/TableGen/ARMDecoderEmitter.cpp vendor/llvm/dist/utils/TableGen/ARMDecoderEmitter.h vendor/llvm/dist/utils/TableGen/AsmMatcherEmitter.cpp vendor/llvm/dist/utils/TableGen/CMakeLists.txt vendor/llvm/dist/utils/TableGen/ClangASTNodesEmitter.cpp vendor/llvm/dist/utils/TableGen/ClangASTNodesEmitter.h vendor/llvm/dist/utils/TableGen/CodeEmitterGen.cpp vendor/llvm/dist/utils/TableGen/CodeGenInstruction.cpp vendor/llvm/dist/utils/TableGen/CodeGenTarget.cpp vendor/llvm/dist/utils/TableGen/DAGISelMatcherEmitter.cpp vendor/llvm/dist/utils/TableGen/EDEmitter.cpp vendor/llvm/dist/utils/TableGen/FastISelEmitter.cpp vendor/llvm/dist/utils/TableGen/InstrInfoEmitter.cpp vendor/llvm/dist/utils/TableGen/Record.cpp vendor/llvm/dist/utils/TableGen/RegisterInfoEmitter.cpp vendor/llvm/dist/utils/TableGen/TGParser.cpp vendor/llvm/dist/utils/TableGen/TGParser.h vendor/llvm/dist/utils/TableGen/TableGen.cpp vendor/llvm/dist/utils/TableGen/X86RecognizableInstr.cpp vendor/llvm/dist/utils/TableGen/X86RecognizableInstr.h vendor/llvm/dist/utils/buildit/build_llvm vendor/llvm/dist/utils/count/count.c vendor/llvm/dist/utils/lit/lit/TestRunner.py vendor/llvm/dist/utils/unittest/UnitTestMain/Makefile vendor/llvm/dist/utils/unittest/googletest/Makefile vendor/llvm/dist/utils/unittest/googletest/README.LLVM vendor/llvm/dist/utils/unittest/googletest/gtest-death-test.cc vendor/llvm/dist/utils/unittest/googletest/gtest-filepath.cc vendor/llvm/dist/utils/unittest/googletest/gtest-port.cc vendor/llvm/dist/utils/unittest/googletest/gtest-test-part.cc vendor/llvm/dist/utils/unittest/googletest/gtest-typed-test.cc vendor/llvm/dist/utils/unittest/googletest/gtest.cc vendor/llvm/dist/utils/unittest/googletest/include/gtest/gtest-death-test.h vendor/llvm/dist/utils/unittest/googletest/include/gtest/gtest-message.h vendor/llvm/dist/utils/unittest/googletest/include/gtest/gtest-param-test.h vendor/llvm/dist/utils/unittest/googletest/include/gtest/gtest-spi.h vendor/llvm/dist/utils/unittest/googletest/include/gtest/gtest-test-part.h vendor/llvm/dist/utils/unittest/googletest/include/gtest/gtest-typed-test.h vendor/llvm/dist/utils/unittest/googletest/include/gtest/gtest.h vendor/llvm/dist/utils/unittest/googletest/include/gtest/internal/gtest-death-test-internal.h vendor/llvm/dist/utils/unittest/googletest/include/gtest/internal/gtest-filepath.h vendor/llvm/dist/utils/unittest/googletest/include/gtest/internal/gtest-internal-inl.h vendor/llvm/dist/utils/unittest/googletest/include/gtest/internal/gtest-internal.h vendor/llvm/dist/utils/unittest/googletest/include/gtest/internal/gtest-linked_ptr.h vendor/llvm/dist/utils/unittest/googletest/include/gtest/internal/gtest-param-util-generated.h vendor/llvm/dist/utils/unittest/googletest/include/gtest/internal/gtest-param-util.h vendor/llvm/dist/utils/unittest/googletest/include/gtest/internal/gtest-port.h vendor/llvm/dist/utils/unittest/googletest/include/gtest/internal/gtest-string.h vendor/llvm/dist/utils/unittest/googletest/include/gtest/internal/gtest-type-util.h Modified: vendor/llvm/dist/CMakeLists.txt ============================================================================== --- vendor/llvm/dist/CMakeLists.txt Tue Jul 13 16:57:52 2010 (r210005) +++ vendor/llvm/dist/CMakeLists.txt Tue Jul 13 17:19:57 2010 (r210006) @@ -4,7 +4,7 @@ project(LLVM) cmake_minimum_required(VERSION 2.6.1) set(PACKAGE_NAME llvm) -set(PACKAGE_VERSION 2.7svn) +set(PACKAGE_VERSION 2.8svn) set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") set(PACKAGE_BUGREPORT "llvmbugs@cs.uiuc.edu") Modified: vendor/llvm/dist/Makefile ============================================================================== --- vendor/llvm/dist/Makefile Tue Jul 13 16:57:52 2010 (r210005) +++ vendor/llvm/dist/Makefile Tue Jul 13 17:19:57 2010 (r210006) @@ -64,7 +64,7 @@ endif ifeq ($(MAKECMDGOALS),install-clang) DIRS := tools/clang/tools/driver tools/clang/lib/Headers \ - tools/clang/lib/Runtime tools/clang/docs + tools/clang/runtime tools/clang/docs OPTIONAL_DIRS := NO_INSTALL = 1 endif @@ -180,8 +180,8 @@ $(FilesToConfigPATH) : $(LLVM_OBJ_ROOT)/ # that it gets executed last. ifneq ($(BUILD_DIRS_ONLY),1) all:: - $(Echo) '*****' Completed $(BuildMode)$(AssertMode) Build -ifeq ($(BuildMode),Debug) + $(Echo) '*****' Completed $(BuildMode) Build +ifneq ($(ENABLE_OPTIMIZED),1) $(Echo) '*****' Note: Debug build can be 10 times slower than an $(Echo) '*****' optimized build. Use 'make ENABLE_OPTIMIZED=1' to $(Echo) '*****' make an optimized build. Alternatively you can Modified: vendor/llvm/dist/Makefile.config.in ============================================================================== --- vendor/llvm/dist/Makefile.config.in Tue Jul 13 16:57:52 2010 (r210005) +++ vendor/llvm/dist/Makefile.config.in Tue Jul 13 17:19:57 2010 (r210006) @@ -222,8 +222,8 @@ RDYNAMIC := @RDYNAMIC@ # When ENABLE_PROFILING is enabled, profile instrumentation is done # and output is put into the "+Profile" directories, where -# is either Debug or Release depending on how other builkd -# flags are set.. Otherwise, output is put in the +# is either Debug or Release depending on how other build +# flags are set. Otherwise, output is put in the # directories. #ENABLE_PROFILING = 1 @ENABLE_PROFILING@ @@ -320,12 +320,6 @@ endif # Location of the plugin header file for gold. BINUTILS_INCDIR := @BINUTILS_INCDIR@ -C_INCLUDE_DIRS := @C_INCLUDE_DIRS@ -CXX_INCLUDE_ROOT := @CXX_INCLUDE_ROOT@ -CXX_INCLUDE_ARCH := @CXX_INCLUDE_ARCH@ -CXX_INCLUDE_32BIT_DIR = @CXX_INCLUDE_32BIT_DIR@ -CXX_INCLUDE_64BIT_DIR = @CXX_INCLUDE_64BIT_DIR@ - # When ENABLE_LLVMC_DYNAMIC is enabled, LLVMC will link libCompilerDriver # dynamically. This is needed to make dynamic plugins work on some targets # (Windows). @@ -344,5 +338,5 @@ NO_MISSING_FIELD_INITIALIZERS = @NO_MISS NO_VARIADIC_MACROS = @NO_VARIADIC_MACROS@ # Flags supported by the linker. -# bfd ld / gold -retain-symbols-file file -HAVE_LINK_RETAIN_SYMBOLS_FILE = @HAVE_LINK_RETAIN_SYMBOLS_FILE@ +# bfd ld / gold --version-script=file +HAVE_LINK_VERSION_SCRIPT = @HAVE_LINK_VERSION_SCRIPT@ Modified: vendor/llvm/dist/Makefile.rules ============================================================================== --- vendor/llvm/dist/Makefile.rules Tue Jul 13 16:57:52 2010 (r210005) +++ vendor/llvm/dist/Makefile.rules Tue Jul 13 17:19:57 2010 (r210006) @@ -398,12 +398,11 @@ endif # If DISABLE_ASSERTIONS=1 is specified (make command line or configured), # then disable assertions by defining the appropriate preprocessor symbols. -ifdef DISABLE_ASSERTIONS - # Indicate that assertions are turned off using a minus sign - BuildMode := $(BuildMode)-Asserts - CPP.Defines += -DNDEBUG -else +ifndef DISABLE_ASSERTIONS + BuildMode := $(BuildMode)+Asserts CPP.Defines += -D_DEBUG +else + CPP.Defines += -DNDEBUG endif # If ENABLE_EXPENSIVE_CHECKS=1 is specified (make command line or @@ -807,7 +806,8 @@ SubDirs += $(DIRS) ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT)) $(RecursiveTargets):: $(Verb) for dir in $(DIRS); do \ - if [ ! -f $$dir/Makefile ]; then \ + if ([ ! -f $$dir/Makefile ] || \ + command test $$dir/Makefile -ot $(PROJ_SRC_DIR)/$$dir/Makefile ); then \ $(MKDIR) $$dir; \ $(CP) $(PROJ_SRC_DIR)/$$dir/Makefile $$dir/Makefile; \ fi; \ @@ -829,7 +829,8 @@ endif ifdef EXPERIMENTAL_DIRS $(RecursiveTargets):: $(Verb) for dir in $(EXPERIMENTAL_DIRS); do \ - if [ ! -f $$dir/Makefile ]; then \ + if ([ ! -f $$dir/Makefile ] || \ + command test $$dir/Makefile -ot $(PROJ_SRC_DIR)/$$dir/Makefile ); then \ $(MKDIR) $$dir; \ $(CP) $(PROJ_SRC_DIR)/$$dir/Makefile $$dir/Makefile; \ fi; \ @@ -863,7 +864,9 @@ unitcheck:: $(addsuffix /.makeunitcheck, ParallelTargets := $(foreach T,$(RecursiveTargets),%/.make$(T)) $(ParallelTargets) : - $(Verb) if [ ! -f $(@D)/Makefile ]; then \ + $(Verb) if ([ ! -f $(@D)/Makefile ] || \ + command test $(@D)/Makefile -ot \ + $(PROJ_SRC_DIR)/$(@D)/Makefile ); then \ $(MKDIR) $(@D); \ $(CP) $(PROJ_SRC_DIR)/$(@D)/Makefile $(@D)/Makefile; \ fi; \ @@ -882,7 +885,8 @@ ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT) $(RecursiveTargets):: $(Verb) for dir in $(OPTIONAL_DIRS); do \ if [ -d $(PROJ_SRC_DIR)/$$dir ]; then\ - if [ ! -f $$dir/Makefile ]; then \ + if ([ ! -f $$dir/Makefile ] || \ + command test $$dir/Makefile -ot $(PROJ_SRC_DIR)/$$dir/Makefile ); then \ $(MKDIR) $$dir; \ $(CP) $(PROJ_SRC_DIR)/$$dir/Makefile $$dir/Makefile; \ fi; \ @@ -930,7 +934,7 @@ endif endif ############################################################################### -# Set up variables for building libararies +# Set up variables for building libraries ############################################################################### #--------------------------------------------------------- @@ -986,12 +990,25 @@ ifeq ($(HOST_OS),Darwin) # Darwin convention prefixes symbols with underscores. NativeExportsFile := $(ObjDir)/$(notdir $(EXPORTED_SYMBOL_FILE)).sed $(NativeExportsFile): $(EXPORTED_SYMBOL_FILE) $(ObjDir)/.dir - $(Verb) sed -e 's/[[:<:]]/_/' < $< > $@ + $(Verb) sed -e 's/^/_/' < $< > $@ +clean-local:: + -$(Verb) $(RM) -f $(NativeExportsFile) +else +ifeq ($(HAVE_LINK_VERSION_SCRIPT),1) +# Gold and BFD ld require a version script rather than a plain list. +NativeExportsFile := $(ObjDir)/$(notdir $(EXPORTED_SYMBOL_FILE)).map +$(NativeExportsFile): $(EXPORTED_SYMBOL_FILE) $(ObjDir)/.dir + $(Verb) echo "{" > $@ + $(Verb) grep -q "\<" $< && echo " global:" >> $@ || : + $(Verb) sed -e 's/$$/;/' -e 's/^/ /' < $< >> $@ + $(Verb) echo " local: *;" >> $@ + $(Verb) echo "};" >> $@ clean-local:: -$(Verb) $(RM) -f $(NativeExportsFile) else NativeExportsFile := $(EXPORTED_SYMBOL_FILE) endif +endif # Now add the linker command-line options to use the native export file. @@ -1000,8 +1017,8 @@ LLVMLibsOptions += -Wl,-exported_symbols endif # gold, bfd ld, etc. -ifeq ($(HAVE_LINK_RETAIN_SYMBOLS_FILE),1) -LLVMLibsOptions += -Wl,-retain-symbols-file,$(NativeExportsFile) +ifeq ($(HAVE_LINK_VERSION_SCRIPT),1) +LLVMLibsOptions += -Wl,--version-script,$(NativeExportsFile) endif endif @@ -1113,7 +1130,7 @@ $(LibName.SO): $(ObjectsO) $(ProjLibsPat $(ProjLibsOptions) $(LLVMLibsOptions) $(LIBS) else $(LibName.SO): $(ObjectsO) $(LibDir)/.dir - $(Echo) Linking $(BuildMode) Shared Library $(LIBRARYNAME)$(SHLIBEXT) + $(Echo) Linking $(BuildMode) Shared Library $(basename $@) $(Verb) $(Link) $(SharedLinkOptions) -o $@ $(ObjectsO) endif Modified: vendor/llvm/dist/autoconf/configure.ac ============================================================================== --- vendor/llvm/dist/autoconf/configure.ac Tue Jul 13 16:57:52 2010 (r210005) +++ vendor/llvm/dist/autoconf/configure.ac Tue Jul 13 17:19:57 2010 (r210006) @@ -1039,8 +1039,8 @@ AC_LINK_USE_R dnl Determine whether the linker supports the -export-dynamic option. AC_LINK_EXPORT_DYNAMIC -dnl Determine whether the linker supports the -retain-symbols-file option. -AC_LINK_RETAIN_SYMBOLS_FILE +dnl Determine whether the linker supports the --version-script option. +AC_LINK_VERSION_SCRIPT dnl Check for libtool and the library that has dlopen function (which must come dnl before the AC_PROG_LIBTOOL check in order to enable dlopening libraries with @@ -1284,6 +1284,9 @@ if test "$llvm_cv_enable_libffi" = "yes" AC_CHECK_HEADERS([ffi.h ffi/ffi.h]) fi +dnl Try to find Darwin specific crash reporting library. +AC_CHECK_HEADERS([CrashReporterClient.h]) + dnl===-----------------------------------------------------------------------=== dnl=== dnl=== SECTION 7: Check for types and structures Modified: vendor/llvm/dist/autoconf/m4/link_options.m4 ============================================================================== --- vendor/llvm/dist/autoconf/m4/link_options.m4 Tue Jul 13 16:57:52 2010 (r210005) +++ vendor/llvm/dist/autoconf/m4/link_options.m4 Tue Jul 13 17:19:57 2010 (r210006) @@ -40,14 +40,14 @@ if test "$llvm_cv_link_use_export_dynami ]) # -# Determine if the system can handle the -retain-symbols-file option being +# Determine if the system can handle the --version-script option being # passed to the linker. # # This macro is specific to LLVM. # -AC_DEFUN([AC_LINK_RETAIN_SYMBOLS_FILE], -[AC_CACHE_CHECK([for compiler -Wl,-retain-symbols-file option], - [llvm_cv_link_use_retain_symbols_file], +AC_DEFUN([AC_LINK_VERSION_SCRIPT], +[AC_CACHE_CHECK([for compiler -Wl,--version-script option], + [llvm_cv_link_use_version_script], [ AC_LANG_PUSH([C]) oldcflags="$CFLAGS" @@ -67,18 +67,21 @@ AC_DEFUN([AC_LINK_RETAIN_SYMBOLS_FILE], (umask 077 && mkdir "$tmp") } || exit $? - echo "main" > "$tmp/exports" + echo "{" > "$tmp/export.map" + echo " global: main;" >> "$tmp/export.map" + echo " local: *;" >> "$tmp/export.map" + echo "};" >> "$tmp/export.map" - CFLAGS="$CFLAGS -Wl,-retain-symbols-file=$tmp/exports" + CFLAGS="$CFLAGS -Wl,--version-script=$tmp/export.map" AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])], - [llvm_cv_link_use_retain_symbols_file=yes],[llvm_cv_link_use_retain_symbols_file=no]) - rm "$tmp/exports" + [llvm_cv_link_use_version_script=yes],[llvm_cv_link_use_version_script=no]) + rm "$tmp/export.map" rmdir "$tmp" CFLAGS="$oldcflags" AC_LANG_POP([C]) ]) -if test "$llvm_cv_link_use_retain_symbols_file" = yes ; then - AC_SUBST(HAVE_LINK_RETAIN_SYMBOLS_FILE,1) +if test "$llvm_cv_link_use_version_script" = yes ; then + AC_SUBST(HAVE_LINK_VERSION_SCRIPT,1) fi ]) Modified: vendor/llvm/dist/bindings/ada/llvm/llvm.ads ============================================================================== --- vendor/llvm/dist/bindings/ada/llvm/llvm.ads Tue Jul 13 16:57:52 2010 (r210005) +++ vendor/llvm/dist/bindings/ada/llvm/llvm.ads Tue Jul 13 17:19:57 2010 (r210006) @@ -316,7 +316,8 @@ package llvm is LLVMExternalWeakLinkage, LLVMGhostLinkage, LLVMCommonLinkage, - LLVMLinkerPrivateLinkage); + LLVMLinkerPrivateLinkage, + LLVMLinkerPrivateWeakLinkage); for LLVMLinkage use (LLVMExternalLinkage => 0, @@ -333,7 +334,8 @@ package llvm is LLVMExternalWeakLinkage => 11, LLVMGhostLinkage => 12, LLVMCommonLinkage => 13, - LLVMLinkerPrivateLinkage => 14); + LLVMLinkerPrivateLinkage => 14, + LLVMLinkerPrivateWeakLinkage => 15); pragma Convention (C, LLVMLinkage); Modified: vendor/llvm/dist/cmake/config-ix.cmake ============================================================================== --- vendor/llvm/dist/cmake/config-ix.cmake Tue Jul 13 16:57:52 2010 (r210005) +++ vendor/llvm/dist/cmake/config-ix.cmake Tue Jul 13 17:19:57 2010 (r210006) @@ -4,7 +4,7 @@ include(CheckSymbolExists) include(CheckFunctionExists) include(CheckCXXSourceCompiles) -if( UNIX ) +if( UNIX AND NOT BEOS ) # Used by check_symbol_exists: set(CMAKE_REQUIRED_LIBRARIES m) endif() Modified: vendor/llvm/dist/cmake/modules/TableGen.cmake ============================================================================== --- vendor/llvm/dist/cmake/modules/TableGen.cmake Tue Jul 13 16:57:52 2010 (r210005) +++ vendor/llvm/dist/cmake/modules/TableGen.cmake Tue Jul 13 17:19:57 2010 (r210006) @@ -6,10 +6,16 @@ macro(tablegen ofn) file(GLOB local_tds "*.td") file(GLOB_RECURSE global_tds "${LLVM_MAIN_SRC_DIR}/include/llvm/*.td") + if (IS_ABSOLUTE ${LLVM_TARGET_DEFINITIONS}) + set(LLVM_TARGET_DEFINITIONS_ABSOLUTE ${LLVM_TARGET_DEFINITIONS}) + else() + set(LLVM_TARGET_DEFINITIONS_ABSOLUTE + ${CMAKE_CURRENT_SOURCE_DIR}/${LLVM_TARGET_DEFINITIONS}) + endif() add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${ofn} COMMAND ${LLVM_TABLEGEN_EXE} ${ARGN} -I ${CMAKE_CURRENT_SOURCE_DIR} -I ${LLVM_MAIN_SRC_DIR}/lib/Target -I ${LLVM_MAIN_INCLUDE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/${LLVM_TARGET_DEFINITIONS} + ${LLVM_TARGET_DEFINITIONS_ABSOLUTE} -o ${CMAKE_CURRENT_BINARY_DIR}/${ofn} DEPENDS tblgen ${local_tds} ${global_tds} COMMENT "Building ${ofn}..." Modified: vendor/llvm/dist/configure ============================================================================== --- vendor/llvm/dist/configure Tue Jul 13 16:57:52 2010 (r210005) +++ vendor/llvm/dist/configure Tue Jul 13 17:19:57 2010 (r210006) @@ -752,7 +752,7 @@ OCAMLOPT OCAMLDEP OCAMLDOC GAS -HAVE_LINK_RETAIN_SYMBOLS_FILE +HAVE_LINK_VERSION_SCRIPT INSTALL_LTDL_TRUE INSTALL_LTDL_FALSE CONVENIENCE_LTDL_TRUE @@ -8905,9 +8905,9 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for compiler -Wl,-retain-symbols-file option" >&5 -echo $ECHO_N "checking for compiler -Wl,-retain-symbols-file option... $ECHO_C" >&6; } -if test "${llvm_cv_link_use_retain_symbols_file+set}" = set; then +{ echo "$as_me:$LINENO: checking for compiler -Wl,--version-script option" >&5 +echo $ECHO_N "checking for compiler -Wl,--version-script option... $ECHO_C" >&6; } +if test "${llvm_cv_link_use_version_script+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_ext=c @@ -8934,9 +8934,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu (umask 077 && mkdir "$tmp") } || exit $? - echo "main" > "$tmp/exports" + echo "{" > "$tmp/export.map" + echo " global: main;" >> "$tmp/export.map" + echo " local: *;" >> "$tmp/export.map" + echo "};" >> "$tmp/export.map" - CFLAGS="$CFLAGS -Wl,-retain-symbols-file=$tmp/exports" + CFLAGS="$CFLAGS -Wl,--version-script=$tmp/export.map" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8986,17 +8989,17 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - llvm_cv_link_use_retain_symbols_file=yes + llvm_cv_link_use_version_script=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - llvm_cv_link_use_retain_symbols_file=no + llvm_cv_link_use_version_script=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - rm "$tmp/exports" + rm "$tmp/export.map" rmdir "$tmp" CFLAGS="$oldcflags" ac_ext=c @@ -9007,10 +9010,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -{ echo "$as_me:$LINENO: result: $llvm_cv_link_use_retain_symbols_file" >&5 -echo "${ECHO_T}$llvm_cv_link_use_retain_symbols_file" >&6; } -if test "$llvm_cv_link_use_retain_symbols_file" = yes ; then - HAVE_LINK_RETAIN_SYMBOLS_FILE=1 +{ echo "$as_me:$LINENO: result: $llvm_cv_link_use_version_script" >&5 +echo "${ECHO_T}$llvm_cv_link_use_version_script" >&6; } +if test "$llvm_cv_link_use_version_script" = yes ; then + HAVE_LINK_VERSION_SCRIPT=1 fi @@ -11384,7 +11387,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ----------------------------------- ## +## Report this to llvmbugs@cs.uiuc.edu ## +## ----------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + { echo "$as_me:$LINENO: checking for HUGE_VAL sanity" >&5 @@ -21297,7 +21470,7 @@ OCAMLOPT!$OCAMLOPT$ac_delim OCAMLDEP!$OCAMLDEP$ac_delim OCAMLDOC!$OCAMLDOC$ac_delim GAS!$GAS$ac_delim -HAVE_LINK_RETAIN_SYMBOLS_FILE!$HAVE_LINK_RETAIN_SYMBOLS_FILE$ac_delim +HAVE_LINK_VERSION_SCRIPT!$HAVE_LINK_VERSION_SCRIPT$ac_delim INSTALL_LTDL_TRUE!$INSTALL_LTDL_TRUE$ac_delim INSTALL_LTDL_FALSE!$INSTALL_LTDL_FALSE$ac_delim CONVENIENCE_LTDL_TRUE!$CONVENIENCE_LTDL_TRUE$ac_delim Modified: vendor/llvm/dist/docs/AliasAnalysis.html ============================================================================== --- vendor/llvm/dist/docs/AliasAnalysis.html Tue Jul 13 16:57:52 2010 (r210005) +++ vendor/llvm/dist/docs/AliasAnalysis.html Tue Jul 13 17:19:57 2010 (r210006) @@ -31,6 +31,7 @@
  • AliasAnalysis chaining behavior
  • Updating analysis results for transformations
  • Efficiency Issues
  • +
  • Pass Manager Issues
  • @@ -116,6 +117,11 @@ as the actual call or invok call. The AliasAnalysis interface also exposes some helper methods which allow you to get mod/ref information for arbitrary instructions.

    +

    All AliasAnalysis interfaces require that in queries involving +multiple values, values which are not +constants are all defined within the +same function.

    + @@ -180,9 +186,13 @@ that the accesses alias.

    -The alias method is the primary interface used to determine whether or -not two memory objects alias each other. It takes two memory objects as input -and returns MustAlias, MayAlias, or NoAlias as appropriate. +

    The alias method is the primary interface used to determine whether +or not two memory objects alias each other. It takes two memory objects as +input and returns MustAlias, MayAlias, or NoAlias as appropriate.

    + +

    Like all AliasAnalysis interfaces, the alias method requires +that either the two pointer values be defined within the same function, or at +least one of the values is a constant.

    @@ -191,12 +201,18 @@ and returns MustAlias, MayAlias, or NoAl
    -

    The NoAlias response is used when the two pointers refer to distinct objects, -regardless of whether the pointers compare equal. For example, freed pointers -don't alias any pointers that were allocated afterwards. As a degenerate case, -pointers returned by malloc(0) have no bytes for an object, and are considered -NoAlias even when malloc returns the same pointer. The same rule applies to -NULL pointers.

    +

    The NoAlias response may be used when there is never an immediate dependence +between any memory reference based on one pointer and any memory +reference based the other. The most obvious example is when the two +pointers point to non-overlapping memory ranges. Another is when the two +pointers are only ever used for reading memory. Another is when the memory is +freed and reallocated between accesses through one pointer and accesses through +the other -- in this case, there is a dependence, but it's mediated by the free +and reallocation.

    + +

    As an exception to this is with the +noalias keyword; the "irrelevant" +dependencies are ignored.

    The MayAlias response is used whenever the two pointers might refer to the same object. If the two memory objects overlap, but do not start at the same @@ -502,6 +518,45 @@ method as possible (within reason).

    + + + +
    + +

    PassManager support for alternative AliasAnalysis implementation +has some issues.

    + +

    There is no way to override the default alias analysis. It would +be very useful to be able to do something like "opt -my-aa -O2" and +have it use -my-aa for all passes which need AliasAnalysis, but there +is currently no support for that, short of changing the source code +and recompiling. Similarly, there is also no way of setting a chain +of analyses as the default.

    + +

    There is no way for transform passes to declare that they preserve +AliasAnalysis implementations. The AliasAnalysis +interface includes deleteValue and copyValue methods +which are intended to allow a pass to keep an AliasAnalysis consistent, +however there's no way for a pass to declare in its +getAnalysisUsage that it does so. Some passes attempt to use +AU.addPreserved<AliasAnalysis>, however this doesn't +actually have any effect. + +

    AliasAnalysisCounter (-count-aa) and AliasDebugger +(-debug-aa) are implemented as ModulePass classes, so if your +alias analysis uses FunctionPass, it won't be able to use +these utilities. If you try to use them, the pass manager will +silently route alias analysis queries directly to +BasicAliasAnalysis instead.

    + +

    Similarly, the opt -p option introduces ModulePass +passes between each pass, which prevents the use of FunctionPass +alias analysis passes.

    + +
    +
    Using alias analysis results @@ -749,6 +804,19 @@ module, it is not part of the LLVM core.
    + + + +
    + +

    The -scev-aa pass implements AliasAnalysis queries by +translating them into ScalarEvolution queries. This gives it a +more complete understanding of getelementptr instructions +and loop induction variables than other alias analyses have.

    + +
    @@ -930,7 +998,7 @@ analysis directly.

    Chris Lattner
    LLVM Compiler Infrastructure
    - Last modified: $Date: 2010-05-07 02:28:04 +0200 (Fri, 07 May 2010) $ + Last modified: $Date: 2010-07-07 16:27:09 +0200 (Wed, 07 Jul 2010) $ Modified: vendor/llvm/dist/docs/CodeGenerator.html ============================================================================== --- vendor/llvm/dist/docs/CodeGenerator.html Tue Jul 13 16:57:52 2010 (r210005) +++ vendor/llvm/dist/docs/CodeGenerator.html Tue Jul 13 17:19:57 2010 (r210006) @@ -1594,22 +1594,22 @@ bool RegMapping_Fer::compatible_class(Ma different register allocators:

      -
    • Simple — This is a very simple implementation that does not - keep values in registers across instructions. This register allocator - immediately spills every value right after it is computed, and reloads all - used operands from memory to temporary registers before each - instruction.
    • - -
    • Local — This register allocator is an improvement on the - Simple implementation. It allocates registers on a basic block - level, attempting to keep values in registers and reusing registers as - appropriate.
    • -
    • Linear ScanThe default allocator. This is the well-know linear scan register allocator. Whereas the Simple and Local algorithms use a direct mapping implementation technique, the Linear Scan implementation uses a spiller in order to place load and stores.
    • + +
    • Fast — This register allocator is the default for debug + builds. It allocates registers on a basic block level, attempting to keep + values in registers and reusing registers as appropriate.
    • + +
    • PBQP — A Partitioned Boolean Quadratic Programming (PBQP) + based register allocator. This allocator works by constructing a PBQP + problem representing the register allocation problem under consideration, + solving this using a PBQP solver, and mapping the solution back to a + register assignment.
    • +

    The type of register allocator used in llc can be chosen with the @@ -1617,9 +1617,9 @@ bool RegMapping_Fer::compatible_class(Ma

    -$ llc -regalloc=simple file.bc -o sp.s;
    -$ llc -regalloc=local file.bc -o lc.s;
     $ llc -regalloc=linearscan file.bc -o ln.s;
    +$ llc -regalloc=fast file.bc -o fa.s;
    +$ llc -regalloc=pbqp file.bc -o pbqp.s;
     
    @@ -2162,7 +2162,7 @@ MOVSX32rm16 -> movsx, 32-bit register Chris Lattner
    The LLVM Compiler Infrastructure
    - Last modified: $Date: 2010-05-07 02:28:04 +0200 (Fri, 07 May 2010) $ + Last modified: $Date: 2010-06-15 23:58:33 +0200 (Tue, 15 Jun 2010) $ Modified: vendor/llvm/dist/docs/DebuggingJITedCode.html ============================================================================== --- vendor/llvm/dist/docs/DebuggingJITedCode.html Tue Jul 13 16:57:52 2010 (r210005) +++ vendor/llvm/dist/docs/DebuggingJITedCode.html Tue Jul 13 17:19:57 2010 (r210006) @@ -9,87 +9,24 @@
    Debugging JITed Code With GDB
      -
    1. Introduction
    2. -
    3. Quickstart
    4. -
    5. Example with clang and lli
    6. +
    7. Example usage
    8. +
    9. Background
    Written by Reid Kleckner
    - +
    -

    Without special runtime support, debugging dynamically generated code with -GDB (as well as most debuggers) can be quite painful. Debuggers generally read -debug information from the object file of the code, but for JITed code, there is -no such file to look for. -

    - -

    Depending on the architecture, this can impact the debugging experience in -different ways. For example, on most 32-bit x86 architectures, you can simply -compile with -fno-omit-framepointer for GCC and -fdisable-fp-elim for LLVM. -When GDB creates a backtrace, it can properly unwind the stack, but the stack -frames owned by JITed code have ??'s instead of the appropriate symbol name. -However, on Linux x86_64 in particular, GDB relies on the DWARF CFA debug -information to unwind the stack, so even if you compile your program to leave -the frame pointer untouched, GDB will usually be unable to unwind the stack past -any JITed code stack frames. -

    - -

    In order to communicate the necessary debug info to GDB, an interface for -registering JITed code with debuggers has been designed and implemented for -GDB and LLVM. At a high level, whenever LLVM generates new machine code, it -also generates an object file in memory containing the debug information. LLVM -then adds the object file to the global list of object files and calls a special -function (__jit_debug_register_code) marked noinline that GDB knows about. When -GDB attaches to a process, it puts a breakpoint in this function and loads all -of the object files in the global list. When LLVM calls the registration -function, GDB catches the breakpoint signal, loads the new object file from -LLVM's memory, and resumes the execution. In this way, GDB can get the -necessary debug information. +

    In order to debug code JITed by LLVM, you need GDB 7.0 or newer, which is +available on most modern distributions of Linux. The version of GDB that Apple +ships with XCode has been frozen at 6.3 for a while. LLDB may be a better +option for debugging JITed code on Mac OS X.

    -

    At the time of this writing, LLVM only supports architectures that use ELF -object files and it only generates symbols and DWARF CFA information. However, -it would be easy to add more information to the object file, so we don't need to -coordinate with GDB to get better debug information. -

    -
    - - - - -
    - -

    In order to debug code JITed by LLVM, you need to install a recent version -of GDB. The interface was added on 2009-08-19, so you need a snapshot of GDB -more recent than that. Either download a snapshot of GDB or checkout CVS as -instructed here. Here -are the commands for doing a checkout and building the code: -

    - -
    -$ cvs -z 3 -d :pserver:anoncvs@sourceware.org:/cvs/src co gdb
    -$ mv src gdb   # You probably don't want this checkout called "src".
    -$ cd gdb
    -$ ./configure --prefix="$GDB_INSTALL"
    -$ make
    -$ make install
    -
    - -

    You can then use -jit-emit-debug in the LLVM command line arguments to enable -the interface. -

    -
    - - - - -
    - -

    For example, consider debugging running lli on the following C code in -foo.c: +

    Consider debugging the following code compiled with clang and run through +lli:

    @@ -119,7 +56,9 @@ trace at the crash:
     
     # Compile foo.c to bitcode.  You can use either clang or llvm-gcc with this
     # command line.  Both require -fexceptions, or the calls are all marked
    -# 'nounwind' which disables DWARF CFA info.
    +# 'nounwind' which disables DWARF exception handling info.  Custom frontends
    +# should avoid adding this attribute to JITed code, since it interferes with
    +# DWARF CFA generation at the moment.
     $ clang foo.c -fexceptions -emit-llvm -c -o foo.bc
     
     # Run foo.bc under lli with -jit-emit-debug.  If you built lli in debug mode,
    @@ -143,18 +82,60 @@ Program received signal SIGSEGV, Segment
     #3  0x00007ffff7f5502a in main ()
     #4  0x00000000007c0225 in llvm::JIT::runFunction(llvm::Function*,
         std::vector<llvm::GenericValue,
    -    std::allocator<llvm::GenericValue> > const&) ()
    +    std::allocator<llvm::GenericValue> > const&) ()
     #5  0x00000000007d6d98 in
         llvm::ExecutionEngine::runFunctionAsMain(llvm::Function*,
         std::vector<std::string,
    -    std::allocator<std::string> > const&, char const* const*) ()
    +    std::allocator<std::string> > const&, char const* const*) ()
     #6  0x00000000004dab76 in main ()
     
    -

    As you can see, GDB can correctly unwind the stack and has the appropriate function names.

    +
    + + + + +
    + +

    Without special runtime support, debugging dynamically generated code with +GDB (as well as most debuggers) can be quite painful. Debuggers generally read +debug information from the object file of the code, but for JITed code, there is +no such file to look for. +

    + +

    Depending on the architecture, this can impact the debugging experience in +different ways. For example, on most 32-bit x86 architectures, you can simply +compile with -fno-omit-frame-pointer for GCC and -disable-fp-elim for LLVM. +When GDB creates a backtrace, it can properly unwind the stack, but the stack +frames owned by JITed code have ??'s instead of the appropriate symbol name. +However, on Linux x86_64 in particular, GDB relies on the DWARF call frame +address (CFA) debug information to unwind the stack, so even if you compile +your program to leave the frame pointer untouched, GDB will usually be unable +to unwind the stack past any JITed code stack frames. +

    + +

    In order to communicate the necessary debug info to GDB, an interface for +registering JITed code with debuggers has been designed and implemented for +GDB and LLVM. At a high level, whenever LLVM generates new machine code, it +also generates an object file in memory containing the debug information. LLVM +then adds the object file to the global list of object files and calls a special +function (__jit_debug_register_code) marked noinline that GDB knows about. When +GDB attaches to a process, it puts a breakpoint in this function and loads all +of the object files in the global list. When LLVM calls the registration +function, GDB catches the breakpoint signal, loads the new object file from +LLVM's memory, and resumes the execution. In this way, GDB can get the +necessary debug information. +

    + +

    At the time of this writing, LLVM only supports architectures that use ELF +object files and it only generates symbols and DWARF CFA information. However, +it would be easy to add more information to the object file, so we don't need to +coordinate with GDB to get better debug information. +

    +

    @@ -165,7 +146,7 @@ function names. src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01"> Reid Kleckner
    The LLVM Compiler Infrastructure
    - Last modified: $Date: 2009-01-01 23:10:51 -0800 (Thu, 01 Jan 2009) $ + Last modified: $Date: 2010-07-07 22:16:45 +0200 (Wed, 07 Jul 2010) $ Modified: vendor/llvm/dist/docs/ExceptionHandling.html ============================================================================== --- vendor/llvm/dist/docs/ExceptionHandling.html Tue Jul 13 16:57:52 2010 (r210005) +++ vendor/llvm/dist/docs/ExceptionHandling.html Tue Jul 13 17:19:57 2010 (r210006) @@ -404,7 +404,7 @@
    -  i8* %llvm.eh.exception( )
    +  i8* %llvm.eh.exception()
     

    This intrinsic returns a pointer to the exception structure.

    @@ -518,7 +518,7 @@
    -  i8* %llvm.eh.sjlj.lsda( )
    +  i8* %llvm.eh.sjlj.lsda()
     

    Used for SJLJ based exception handling, the @@ -619,7 +619,7 @@ Chris Lattner
    LLVM Compiler Infrastructure
    - Last modified: $Date: 2010-05-26 18:21:41 +0200 (Wed, 26 May 2010) $ + Last modified: $Date: 2010-05-28 19:07:41 +0200 (Fri, 28 May 2010) $ Modified: vendor/llvm/dist/docs/FAQ.html ============================================================================== --- vendor/llvm/dist/docs/FAQ.html Tue Jul 13 16:57:52 2010 (r210005) +++ vendor/llvm/dist/docs/FAQ.html Tue Jul 13 17:19:57 2010 (r210006) @@ -803,7 +803,7 @@ define fastcc void @foo() { ret void } define void @bar() { - call void @foo( ) + call void @foo() ret void } @@ -931,7 +931,7 @@ F.i: src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01"> *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 17:21:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 404201065673; Tue, 13 Jul 2010 17:21:16 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2E5718FC20; Tue, 13 Jul 2010 17:21:16 +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 o6DHLGvf002948; Tue, 13 Jul 2010 17:21:16 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DHLGSp002946; Tue, 13 Jul 2010 17:21:16 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007131721.o6DHLGSp002946@svn.freebsd.org> From: Warner Losh Date: Tue, 13 Jul 2010 17:21:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210007 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 17:21:16 -0000 Author: imp Date: Tue Jul 13 17:21:15 2010 New Revision: 210007 URL: http://svn.freebsd.org/changeset/base/210007 Log: Use the cpuregs.h spellings for these registers rather than the cpu.h spelling. Modified: head/sys/mips/mips/locore.S Modified: head/sys/mips/mips/locore.S ============================================================================== --- head/sys/mips/mips/locore.S Tue Jul 13 17:19:57 2010 (r210006) +++ head/sys/mips/mips/locore.S Tue Jul 13 17:21:15 2010 (r210007) @@ -85,8 +85,8 @@ GLOBAL(fenvp) GLOBAL(btext) ASM_ENTRY(_start) VECTOR(_locore, unknown) - /* UNSAFE TO USE a0..a3, since some bootloaders pass that to us */ - mtc0 zero, COP_0_CAUSE_REG # Clear soft interrupts + /* UNSAFE TO USE a0..a3, need to preserve the args from boot loader */ + mtc0 zero, MIPS_COP_0_CAUSE # Clear soft interrupts #if defined(TARGET_OCTEON) /* @@ -123,14 +123,14 @@ VECTOR(_locore, unknown) * preserved (namely, clearing interrupt bits), and set * bits we want to explicitly set. */ - mfc0 t2, COP_0_STATUS_REG + mfc0 t2, MIPS_COP_0_STATUS and t2, t0 or t2, t1 - mtc0 t2, COP_0_STATUS_REG + mtc0 t2, MIPS_COP_0_STATUS COP0_SYNC /* Make sure KSEG0 is cached */ - li t0, CFG_K0_CACHED + li t0, MIPS_CCA_CNC mtc0 t0, MIPS_COP_0_CONFIG COP0_SYNC From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 17:21:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B461106564A; Tue, 13 Jul 2010 17:21:43 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6467D8FC1A; Tue, 13 Jul 2010 17:21:43 +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 o6DHLhbr003077; Tue, 13 Jul 2010 17:21:43 GMT (envelope-from rdivacky@svn.freebsd.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DHLh07003057; Tue, 13 Jul 2010 17:21:43 GMT (envelope-from rdivacky@svn.freebsd.org) Message-Id: <201007131721.o6DHLh07003057@svn.freebsd.org> From: Roman Divacky Date: Tue, 13 Jul 2010 17:21:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210008 - in vendor/clang/dist: . clang.xcodeproj docs docs/tools examples examples/PrintFunctionNames examples/clang-interpreter examples/wpa include include/clang include/clang-c incl... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 17:21:43 -0000 Author: rdivacky Date: Tue Jul 13 17:21:42 2010 New Revision: 210008 URL: http://svn.freebsd.org/changeset/base/210008 Log: Update clang to r108243. Added: vendor/clang/dist/include/clang/Basic/Attr.td vendor/clang/dist/include/clang/Basic/AttrKinds.h vendor/clang/dist/include/clang/Basic/DeclNodes.td vendor/clang/dist/include/clang/Basic/StmtNodes.td vendor/clang/dist/include/clang/Basic/Version.inc.in vendor/clang/dist/include/clang/Basic/arm_neon.td vendor/clang/dist/include/clang/Checker/AnalysisConsumer.h vendor/clang/dist/include/clang/Checker/FrontendActions.h vendor/clang/dist/include/clang/Checker/PathDiagnosticClients.h vendor/clang/dist/include/clang/CodeGen/BackendUtil.h vendor/clang/dist/include/clang/CodeGen/CodeGenAction.h vendor/clang/dist/include/clang/Frontend/AnalyzerOptions.h vendor/clang/dist/include/clang/Frontend/CodeGenOptions.h vendor/clang/dist/include/clang/Rewrite/ASTConsumers.h vendor/clang/dist/include/clang/Rewrite/FixItRewriter.h vendor/clang/dist/include/clang/Rewrite/FrontendActions.h vendor/clang/dist/include/clang/Rewrite/Rewriters.h vendor/clang/dist/lib/AST/ExprClassification.cpp vendor/clang/dist/lib/Checker/AnalysisConsumer.cpp vendor/clang/dist/lib/Checker/CStringChecker.cpp vendor/clang/dist/lib/Checker/FrontendActions.cpp vendor/clang/dist/lib/Checker/HTMLDiagnostics.cpp vendor/clang/dist/lib/Checker/IdempotentOperationChecker.cpp vendor/clang/dist/lib/Checker/PlistDiagnostics.cpp vendor/clang/dist/lib/Checker/StackAddrLeakChecker.cpp vendor/clang/dist/lib/Checker/StreamChecker.cpp vendor/clang/dist/lib/CodeGen/BackendUtil.cpp vendor/clang/dist/lib/CodeGen/CGException.h vendor/clang/dist/lib/CodeGen/CodeGenAction.cpp vendor/clang/dist/lib/CodeGen/MicrosoftCXXABI.cpp vendor/clang/dist/lib/Headers/arm_neon.td vendor/clang/dist/lib/Rewrite/FixItRewriter.cpp vendor/clang/dist/lib/Rewrite/FrontendActions.cpp vendor/clang/dist/lib/Rewrite/HTMLPrint.cpp vendor/clang/dist/lib/Rewrite/RewriteMacros.cpp vendor/clang/dist/lib/Rewrite/RewriteObjC.cpp vendor/clang/dist/lib/Rewrite/RewriteTest.cpp vendor/clang/dist/test/ASTMerge/Inputs/class1.cpp vendor/clang/dist/test/ASTMerge/Inputs/class2.cpp vendor/clang/dist/test/ASTMerge/class.cpp vendor/clang/dist/test/Analysis/PR7218.c vendor/clang/dist/test/Analysis/additive-folding-range-constraints.c vendor/clang/dist/test/Analysis/additive-folding.c vendor/clang/dist/test/Analysis/analyze_display_progress.c vendor/clang/dist/test/Analysis/bstring.c vendor/clang/dist/test/Analysis/constant-folding.c vendor/clang/dist/test/Analysis/free.c vendor/clang/dist/test/Analysis/idempotent-operations.c vendor/clang/dist/test/Analysis/stackaddrleak.c vendor/clang/dist/test/Analysis/stream.c vendor/clang/dist/test/Analysis/undef-buffers.c vendor/clang/dist/test/CXX/basic/basic.lookup/basic.lookup.classref/p1.cpp vendor/clang/dist/test/CXX/basic/basic.scope/basic.scope.pdecl/p9.cpp vendor/clang/dist/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p1.cpp vendor/clang/dist/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-cxx0x-no-extra-copy.cpp vendor/clang/dist/test/CXX/except/except.spec/p14-ir.cpp vendor/clang/dist/test/CXX/except/except.spec/p14.cpp vendor/clang/dist/test/CXX/special/class.copy/p20.cpp vendor/clang/dist/test/CXX/special/class.copy/p9.cpp vendor/clang/dist/test/CXX/temp/temp.decls/temp.variadic/parameter-matching.cpp vendor/clang/dist/test/CXX/temp/temp.spec/temp.explicit/p11.cpp vendor/clang/dist/test/CodeGen/altivec.c vendor/clang/dist/test/CodeGen/arm-cc.c vendor/clang/dist/test/CodeGen/assign.c vendor/clang/dist/test/CodeGen/available-externally-suppress.c vendor/clang/dist/test/CodeGen/frame-pointer-elim.c vendor/clang/dist/test/CodeGen/func-in-block.c vendor/clang/dist/test/CodeGen/instrument-functions.c vendor/clang/dist/test/CodeGen/integer-overflow.c vendor/clang/dist/test/CodeGen/pascal-wchar-string.c vendor/clang/dist/test/CodeGenCXX/DynArrayInit.cpp vendor/clang/dist/test/CodeGenCXX/arm-cc.cpp vendor/clang/dist/test/CodeGenCXX/block-in-ctor-dtor.cpp vendor/clang/dist/test/CodeGenCXX/copy-in-cplus-object.cpp vendor/clang/dist/test/CodeGenCXX/global-init-darwin.cpp vendor/clang/dist/test/CodeGenCXX/incomplete-member-function-pointer.cpp vendor/clang/dist/test/CodeGenCXX/instantiate-blocks.cpp vendor/clang/dist/test/CodeGenCXX/mangle-address-space.cpp vendor/clang/dist/test/CodeGenCXX/mangle-ms.cpp vendor/clang/dist/test/CodeGenCXX/member-init-assignment.cpp vendor/clang/dist/test/CodeGenCXX/reference-in-block-args.cpp vendor/clang/dist/test/CodeGenCXX/sel-address.mm vendor/clang/dist/test/CodeGenCXX/template-static-var-defer.cpp vendor/clang/dist/test/CodeGenCXX/throw-expression-dtor.cpp vendor/clang/dist/test/CodeGenCXX/visibility-hidden-extern-templates.cpp vendor/clang/dist/test/CodeGenCXX/visibility-inlines-hidden.cpp vendor/clang/dist/test/CodeGenObjC/assign.m vendor/clang/dist/test/CodeGenObjC/bitfield_encoding.m vendor/clang/dist/test/CodeGenObjC/blocks-5.m vendor/clang/dist/test/CodeGenObjC/category-class.m vendor/clang/dist/test/CodeGenObjC/dot-syntax-2.m vendor/clang/dist/test/CodeGenObjC/property-category-impl.m vendor/clang/dist/test/CodeGenObjCXX/copyable-property-object.mm vendor/clang/dist/test/CodeGenObjCXX/foreach-statement.mm vendor/clang/dist/test/CodeGenObjCXX/implicit-copy-assign-operator.mm vendor/clang/dist/test/CodeGenObjCXX/implicit-copy-constructor.mm vendor/clang/dist/test/CodeGenObjCXX/method-local-extern-mangle.mm vendor/clang/dist/test/CodeGenObjCXX/property-derived-to-base-conv.mm vendor/clang/dist/test/CodeGenObjCXX/references.mm vendor/clang/dist/test/CodeGenObjCXX/selector-expr-lvalue.mm vendor/clang/dist/test/Driver/Wp-args.c vendor/clang/dist/test/Driver/Xlinker-args.c vendor/clang/dist/test/Driver/arch.c vendor/clang/dist/test/Driver/darwin-dsymutil.c vendor/clang/dist/test/Driver/option-aliases.c vendor/clang/dist/test/FixIt/no-typo.c vendor/clang/dist/test/Frontend/ir-support-codegen.ll vendor/clang/dist/test/Frontend/ir-support-errors.ll vendor/clang/dist/test/Frontend/lit.local.cfg vendor/clang/dist/test/Frontend/preprocessed-output-macro-first-token.c vendor/clang/dist/test/Frontend/unknown-pragmas.c vendor/clang/dist/test/Headers/int64-type.c vendor/clang/dist/test/Index/blocks.c vendor/clang/dist/test/Index/complete-type-factors.m vendor/clang/dist/test/Index/print-typekind.m vendor/clang/dist/test/PCH/cxx-friends.cpp vendor/clang/dist/test/PCH/cxx-friends.h vendor/clang/dist/test/PCH/cxx-namespaces.cpp vendor/clang/dist/test/PCH/cxx-namespaces.h vendor/clang/dist/test/PCH/cxx-templates.cpp vendor/clang/dist/test/PCH/cxx-templates.h vendor/clang/dist/test/PCH/cxx-using.cpp vendor/clang/dist/test/PCH/cxx-using.h vendor/clang/dist/test/Parser/backtrack-crash.cpp vendor/clang/dist/test/Parser/bracket-crash.cpp vendor/clang/dist/test/Rewriter/rewrite-elaborated-type.mm vendor/clang/dist/test/Sema/align-x86-64.c vendor/clang/dist/test/Sema/attr-unknown.c vendor/clang/dist/test/Sema/enum-packed.c vendor/clang/dist/test/Sema/ext_vector_comparisons.c vendor/clang/dist/test/Sema/extern-redecl.c vendor/clang/dist/test/Sema/format-strings-fixit.c vendor/clang/dist/test/Sema/opencl-init.c vendor/clang/dist/test/Sema/pragma-align-packed.c vendor/clang/dist/test/SemaCXX/attr-regparm.cpp vendor/clang/dist/test/SemaCXX/conversion.cpp vendor/clang/dist/test/SemaCXX/crash-8124080.cpp vendor/clang/dist/test/SemaCXX/exception-spec-no-exceptions.cpp vendor/clang/dist/test/SemaCXX/init-priority-attr.cpp vendor/clang/dist/test/SemaCXX/instantiate-blocks.cpp vendor/clang/dist/test/SemaCXX/new-array-size-conv.cpp vendor/clang/dist/test/SemaCXX/warn-self-comparisons.cpp vendor/clang/dist/test/SemaCXX/warn_false_to_pointer.cpp vendor/clang/dist/test/SemaObjCXX/instantiate-method-return.mm vendor/clang/dist/test/SemaTemplate/array-to-pointer-decay.cpp vendor/clang/dist/test/SemaTemplate/self-comparison.cpp vendor/clang/dist/utils/FuzzTest (contents, props changed) vendor/clang/dist/www/compatibility.html Deleted: vendor/clang/dist/include/clang/AST/StmtNodes.td vendor/clang/dist/include/clang/CodeGen/CodeGenOptions.h vendor/clang/dist/include/clang/Frontend/AnalysisConsumer.h vendor/clang/dist/include/clang/Frontend/CodeGenAction.h vendor/clang/dist/include/clang/Frontend/FixItRewriter.h vendor/clang/dist/include/clang/Frontend/PathDiagnosticClients.h vendor/clang/dist/lib/Checker/ReturnStackAddressChecker.cpp vendor/clang/dist/lib/Frontend/AnalysisConsumer.cpp vendor/clang/dist/lib/Frontend/CodeGenAction.cpp vendor/clang/dist/lib/Frontend/FixItRewriter.cpp vendor/clang/dist/lib/Frontend/HTMLDiagnostics.cpp vendor/clang/dist/lib/Frontend/HTMLPrint.cpp vendor/clang/dist/lib/Frontend/PlistDiagnostics.cpp vendor/clang/dist/lib/Frontend/RewriteMacros.cpp vendor/clang/dist/lib/Frontend/RewriteObjC.cpp vendor/clang/dist/lib/Frontend/RewriteTest.cpp vendor/clang/dist/lib/Runtime/Makefile vendor/clang/dist/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p16-cxx0x-no-extra-copy.cpp vendor/clang/dist/test/CodeGen/2008-12-02-logical-or-fold.c Modified: vendor/clang/dist/CMakeLists.txt vendor/clang/dist/Makefile vendor/clang/dist/NOTES.txt vendor/clang/dist/README.txt vendor/clang/dist/clang.xcodeproj/project.pbxproj vendor/clang/dist/docs/InternalsManual.html vendor/clang/dist/docs/Makefile vendor/clang/dist/docs/PCHInternals.html vendor/clang/dist/docs/UsersManual.html vendor/clang/dist/docs/tools/Makefile vendor/clang/dist/examples/Makefile vendor/clang/dist/examples/PrintFunctionNames/CMakeLists.txt vendor/clang/dist/examples/PrintFunctionNames/Makefile vendor/clang/dist/examples/PrintFunctionNames/PrintFunctionNames.cpp vendor/clang/dist/examples/clang-interpreter/CMakeLists.txt vendor/clang/dist/examples/clang-interpreter/Makefile vendor/clang/dist/examples/clang-interpreter/main.cpp vendor/clang/dist/examples/wpa/CMakeLists.txt vendor/clang/dist/examples/wpa/Makefile vendor/clang/dist/examples/wpa/clang-wpa.cpp vendor/clang/dist/include/Makefile vendor/clang/dist/include/clang-c/Index.h vendor/clang/dist/include/clang-c/Makefile vendor/clang/dist/include/clang/AST/ASTContext.h vendor/clang/dist/include/clang/AST/Attr.h vendor/clang/dist/include/clang/AST/CMakeLists.txt vendor/clang/dist/include/clang/AST/CanonicalType.h vendor/clang/dist/include/clang/AST/Decl.h vendor/clang/dist/include/clang/AST/DeclBase.h vendor/clang/dist/include/clang/AST/DeclCXX.h vendor/clang/dist/include/clang/AST/DeclFriend.h vendor/clang/dist/include/clang/AST/DeclObjC.h vendor/clang/dist/include/clang/AST/DeclTemplate.h vendor/clang/dist/include/clang/AST/DeclVisitor.h vendor/clang/dist/include/clang/AST/Expr.h vendor/clang/dist/include/clang/AST/ExprCXX.h vendor/clang/dist/include/clang/AST/ExternalASTSource.h vendor/clang/dist/include/clang/AST/Makefile vendor/clang/dist/include/clang/AST/RecursiveASTVisitor.h vendor/clang/dist/include/clang/AST/Redeclarable.h vendor/clang/dist/include/clang/AST/Stmt.h vendor/clang/dist/include/clang/AST/StmtIterator.h vendor/clang/dist/include/clang/AST/TemplateBase.h vendor/clang/dist/include/clang/AST/TemplateName.h vendor/clang/dist/include/clang/AST/Type.h vendor/clang/dist/include/clang/AST/TypeLoc.h vendor/clang/dist/include/clang/AST/TypeLocBuilder.h vendor/clang/dist/include/clang/AST/TypeNodes.def vendor/clang/dist/include/clang/AST/UsuallyTinyPtrVector.h vendor/clang/dist/include/clang/Analysis/Analyses/PrintfFormatString.h vendor/clang/dist/include/clang/Analysis/Support/BumpVector.h vendor/clang/dist/include/clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h vendor/clang/dist/include/clang/Basic/Builtins.def vendor/clang/dist/include/clang/Basic/BuiltinsARM.def vendor/clang/dist/include/clang/Basic/BuiltinsPPC.def vendor/clang/dist/include/clang/Basic/CMakeLists.txt vendor/clang/dist/include/clang/Basic/Diagnostic.h vendor/clang/dist/include/clang/Basic/DiagnosticCommonKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticFrontendKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td vendor/clang/dist/include/clang/Basic/DiagnosticLexKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticParseKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td vendor/clang/dist/include/clang/Basic/IdentifierTable.h vendor/clang/dist/include/clang/Basic/LangOptions.h vendor/clang/dist/include/clang/Basic/Makefile vendor/clang/dist/include/clang/Basic/PartialDiagnostic.h vendor/clang/dist/include/clang/Basic/SourceLocation.h vendor/clang/dist/include/clang/Basic/TargetInfo.h vendor/clang/dist/include/clang/Basic/TargetOptions.h vendor/clang/dist/include/clang/Basic/Version.h vendor/clang/dist/include/clang/Checker/BugReporter/BugReporter.h vendor/clang/dist/include/clang/Checker/PathSensitive/Checker.h vendor/clang/dist/include/clang/Checker/PathSensitive/CheckerVisitor.h vendor/clang/dist/include/clang/Checker/PathSensitive/Environment.h vendor/clang/dist/include/clang/Checker/PathSensitive/ExplodedGraph.h vendor/clang/dist/include/clang/Checker/PathSensitive/GRCoreEngine.h vendor/clang/dist/include/clang/Checker/PathSensitive/GRExprEngine.h vendor/clang/dist/include/clang/Checker/PathSensitive/GRState.h vendor/clang/dist/include/clang/Checker/PathSensitive/GRSubEngine.h vendor/clang/dist/include/clang/Checker/PathSensitive/GRTransferFuncs.h vendor/clang/dist/include/clang/Checker/PathSensitive/MemRegion.h vendor/clang/dist/include/clang/Checker/PathSensitive/SVals.h vendor/clang/dist/include/clang/Checker/PathSensitive/SValuator.h vendor/clang/dist/include/clang/Checker/PathSensitive/Store.h vendor/clang/dist/include/clang/Checker/PathSensitive/SymbolManager.h vendor/clang/dist/include/clang/CodeGen/ModuleBuilder.h vendor/clang/dist/include/clang/Driver/Action.h vendor/clang/dist/include/clang/Driver/Arg.h vendor/clang/dist/include/clang/Driver/ArgList.h vendor/clang/dist/include/clang/Driver/CC1Options.td vendor/clang/dist/include/clang/Driver/Compilation.h vendor/clang/dist/include/clang/Driver/Driver.h vendor/clang/dist/include/clang/Driver/HostInfo.h vendor/clang/dist/include/clang/Driver/Makefile vendor/clang/dist/include/clang/Driver/OptTable.h vendor/clang/dist/include/clang/Driver/Option.h vendor/clang/dist/include/clang/Driver/Options.td vendor/clang/dist/include/clang/Driver/ToolChain.h vendor/clang/dist/include/clang/Driver/Types.def vendor/clang/dist/include/clang/Driver/Types.h vendor/clang/dist/include/clang/Frontend/ASTConsumers.h vendor/clang/dist/include/clang/Frontend/CompilerInstance.h vendor/clang/dist/include/clang/Frontend/CompilerInvocation.h vendor/clang/dist/include/clang/Frontend/DiagnosticOptions.h vendor/clang/dist/include/clang/Frontend/FrontendAction.h vendor/clang/dist/include/clang/Frontend/FrontendActions.h vendor/clang/dist/include/clang/Frontend/FrontendOptions.h vendor/clang/dist/include/clang/Frontend/FrontendPluginRegistry.h vendor/clang/dist/include/clang/Frontend/PCHBitCodes.h vendor/clang/dist/include/clang/Frontend/PCHReader.h vendor/clang/dist/include/clang/Frontend/PCHWriter.h vendor/clang/dist/include/clang/Frontend/TextDiagnosticPrinter.h vendor/clang/dist/include/clang/Frontend/TypeXML.def vendor/clang/dist/include/clang/Frontend/Utils.h vendor/clang/dist/include/clang/Index/CallGraph.h vendor/clang/dist/include/clang/Index/Entity.h vendor/clang/dist/include/clang/Index/Indexer.h vendor/clang/dist/include/clang/Index/TranslationUnit.h vendor/clang/dist/include/clang/Lex/PPCallbacks.h vendor/clang/dist/include/clang/Lex/Pragma.h vendor/clang/dist/include/clang/Lex/Preprocessor.h vendor/clang/dist/include/clang/Lex/Token.h vendor/clang/dist/include/clang/Makefile vendor/clang/dist/include/clang/Parse/Action.h vendor/clang/dist/include/clang/Parse/AttributeList.h vendor/clang/dist/include/clang/Parse/DeclSpec.h vendor/clang/dist/include/clang/Parse/Parser.h vendor/clang/dist/include/clang/Parse/Template.h vendor/clang/dist/include/clang/Rewrite/RewriteRope.h vendor/clang/dist/include/clang/Rewrite/Rewriter.h vendor/clang/dist/include/clang/Sema/CodeCompleteConsumer.h vendor/clang/dist/include/clang/Sema/ExternalSemaSource.h vendor/clang/dist/lib/AST/ASTContext.cpp vendor/clang/dist/lib/AST/ASTImporter.cpp vendor/clang/dist/lib/AST/AttrImpl.cpp vendor/clang/dist/lib/AST/CMakeLists.txt vendor/clang/dist/lib/AST/CXXInheritance.cpp vendor/clang/dist/lib/AST/Decl.cpp vendor/clang/dist/lib/AST/DeclBase.cpp vendor/clang/dist/lib/AST/DeclCXX.cpp vendor/clang/dist/lib/AST/DeclFriend.cpp vendor/clang/dist/lib/AST/DeclObjC.cpp vendor/clang/dist/lib/AST/DeclPrinter.cpp vendor/clang/dist/lib/AST/DeclTemplate.cpp vendor/clang/dist/lib/AST/Expr.cpp vendor/clang/dist/lib/AST/ExprCXX.cpp vendor/clang/dist/lib/AST/ExprConstant.cpp vendor/clang/dist/lib/AST/Makefile vendor/clang/dist/lib/AST/RecordLayoutBuilder.cpp vendor/clang/dist/lib/AST/Stmt.cpp vendor/clang/dist/lib/AST/StmtPrinter.cpp vendor/clang/dist/lib/AST/StmtProfile.cpp vendor/clang/dist/lib/AST/TemplateBase.cpp vendor/clang/dist/lib/AST/TemplateName.cpp vendor/clang/dist/lib/AST/Type.cpp vendor/clang/dist/lib/AST/TypePrinter.cpp vendor/clang/dist/lib/Analysis/CFG.cpp vendor/clang/dist/lib/Analysis/CMakeLists.txt vendor/clang/dist/lib/Analysis/LiveVariables.cpp vendor/clang/dist/lib/Analysis/Makefile vendor/clang/dist/lib/Analysis/PrintfFormatString.cpp vendor/clang/dist/lib/Basic/CMakeLists.txt vendor/clang/dist/lib/Basic/Diagnostic.cpp vendor/clang/dist/lib/Basic/Makefile vendor/clang/dist/lib/Basic/TargetInfo.cpp vendor/clang/dist/lib/Basic/Targets.cpp vendor/clang/dist/lib/Checker/AttrNonNullChecker.cpp vendor/clang/dist/lib/Checker/BasicConstraintManager.cpp vendor/clang/dist/lib/Checker/BasicObjCFoundationChecks.cpp vendor/clang/dist/lib/Checker/BasicObjCFoundationChecks.h vendor/clang/dist/lib/Checker/BasicStore.cpp vendor/clang/dist/lib/Checker/BugReporter.cpp vendor/clang/dist/lib/Checker/BuiltinFunctionChecker.cpp vendor/clang/dist/lib/Checker/CFRefCount.cpp vendor/clang/dist/lib/Checker/CMakeLists.txt vendor/clang/dist/lib/Checker/CallInliner.cpp vendor/clang/dist/lib/Checker/CastSizeChecker.cpp vendor/clang/dist/lib/Checker/CheckSecuritySyntaxOnly.cpp vendor/clang/dist/lib/Checker/Environment.cpp vendor/clang/dist/lib/Checker/FlatStore.cpp vendor/clang/dist/lib/Checker/GRCoreEngine.cpp vendor/clang/dist/lib/Checker/GRExprEngine.cpp vendor/clang/dist/lib/Checker/GRExprEngineExperimentalChecks.cpp vendor/clang/dist/lib/Checker/GRExprEngineExperimentalChecks.h vendor/clang/dist/lib/Checker/GRExprEngineInternalChecks.h vendor/clang/dist/lib/Checker/GRState.cpp vendor/clang/dist/lib/Checker/LLVMConventionsChecker.cpp vendor/clang/dist/lib/Checker/Makefile vendor/clang/dist/lib/Checker/MallocChecker.cpp vendor/clang/dist/lib/Checker/MemRegion.cpp vendor/clang/dist/lib/Checker/OSAtomicChecker.cpp vendor/clang/dist/lib/Checker/PathDiagnostic.cpp vendor/clang/dist/lib/Checker/RangeConstraintManager.cpp vendor/clang/dist/lib/Checker/RegionStore.cpp vendor/clang/dist/lib/Checker/SVals.cpp vendor/clang/dist/lib/Checker/SValuator.cpp vendor/clang/dist/lib/Checker/SimpleConstraintManager.cpp vendor/clang/dist/lib/Checker/SimpleConstraintManager.h vendor/clang/dist/lib/Checker/SimpleSValuator.cpp vendor/clang/dist/lib/Checker/Store.cpp vendor/clang/dist/lib/Checker/SymbolManager.cpp vendor/clang/dist/lib/Checker/VLASizeChecker.cpp vendor/clang/dist/lib/CodeGen/ABIInfo.h vendor/clang/dist/lib/CodeGen/CGBlocks.cpp vendor/clang/dist/lib/CodeGen/CGBlocks.h vendor/clang/dist/lib/CodeGen/CGBuilder.h vendor/clang/dist/lib/CodeGen/CGBuiltin.cpp vendor/clang/dist/lib/CodeGen/CGCXX.cpp vendor/clang/dist/lib/CodeGen/CGCXXABI.h vendor/clang/dist/lib/CodeGen/CGCall.cpp vendor/clang/dist/lib/CodeGen/CGCall.h vendor/clang/dist/lib/CodeGen/CGClass.cpp vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp vendor/clang/dist/lib/CodeGen/CGDecl.cpp vendor/clang/dist/lib/CodeGen/CGDeclCXX.cpp vendor/clang/dist/lib/CodeGen/CGException.cpp vendor/clang/dist/lib/CodeGen/CGExpr.cpp vendor/clang/dist/lib/CodeGen/CGExprAgg.cpp vendor/clang/dist/lib/CodeGen/CGExprCXX.cpp vendor/clang/dist/lib/CodeGen/CGExprComplex.cpp vendor/clang/dist/lib/CodeGen/CGExprConstant.cpp vendor/clang/dist/lib/CodeGen/CGExprScalar.cpp vendor/clang/dist/lib/CodeGen/CGObjC.cpp vendor/clang/dist/lib/CodeGen/CGObjCGNU.cpp vendor/clang/dist/lib/CodeGen/CGObjCMac.cpp vendor/clang/dist/lib/CodeGen/CGObjCRuntime.h vendor/clang/dist/lib/CodeGen/CGRTTI.cpp vendor/clang/dist/lib/CodeGen/CGStmt.cpp vendor/clang/dist/lib/CodeGen/CGTemporaries.cpp vendor/clang/dist/lib/CodeGen/CGVTables.cpp vendor/clang/dist/lib/CodeGen/CGVTables.h vendor/clang/dist/lib/CodeGen/CMakeLists.txt vendor/clang/dist/lib/CodeGen/CodeGenFunction.cpp vendor/clang/dist/lib/CodeGen/CodeGenFunction.h vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp vendor/clang/dist/lib/CodeGen/CodeGenModule.h vendor/clang/dist/lib/CodeGen/CodeGenTypes.cpp vendor/clang/dist/lib/CodeGen/CodeGenTypes.h vendor/clang/dist/lib/CodeGen/GlobalDecl.h vendor/clang/dist/lib/CodeGen/Makefile vendor/clang/dist/lib/CodeGen/Mangle.cpp vendor/clang/dist/lib/CodeGen/Mangle.h vendor/clang/dist/lib/CodeGen/ModuleBuilder.cpp vendor/clang/dist/lib/CodeGen/TargetInfo.cpp vendor/clang/dist/lib/Driver/Action.cpp vendor/clang/dist/lib/Driver/Arg.cpp vendor/clang/dist/lib/Driver/ArgList.cpp vendor/clang/dist/lib/Driver/CMakeLists.txt vendor/clang/dist/lib/Driver/Compilation.cpp vendor/clang/dist/lib/Driver/Driver.cpp vendor/clang/dist/lib/Driver/HostInfo.cpp vendor/clang/dist/lib/Driver/Makefile vendor/clang/dist/lib/Driver/OptTable.cpp vendor/clang/dist/lib/Driver/Option.cpp vendor/clang/dist/lib/Driver/ToolChains.cpp vendor/clang/dist/lib/Driver/ToolChains.h vendor/clang/dist/lib/Driver/Tools.cpp vendor/clang/dist/lib/Driver/Tools.h vendor/clang/dist/lib/Driver/Types.cpp vendor/clang/dist/lib/Frontend/ASTConsumers.cpp vendor/clang/dist/lib/Frontend/ASTMerge.cpp vendor/clang/dist/lib/Frontend/ASTUnit.cpp vendor/clang/dist/lib/Frontend/BoostConAction.cpp vendor/clang/dist/lib/Frontend/CMakeLists.txt vendor/clang/dist/lib/Frontend/CompilerInstance.cpp vendor/clang/dist/lib/Frontend/CompilerInvocation.cpp vendor/clang/dist/lib/Frontend/FrontendAction.cpp vendor/clang/dist/lib/Frontend/FrontendActions.cpp vendor/clang/dist/lib/Frontend/FrontendOptions.cpp vendor/clang/dist/lib/Frontend/GeneratePCH.cpp vendor/clang/dist/lib/Frontend/InitHeaderSearch.cpp vendor/clang/dist/lib/Frontend/InitPreprocessor.cpp vendor/clang/dist/lib/Frontend/Makefile vendor/clang/dist/lib/Frontend/PCHReader.cpp vendor/clang/dist/lib/Frontend/PCHReaderDecl.cpp vendor/clang/dist/lib/Frontend/PCHReaderStmt.cpp vendor/clang/dist/lib/Frontend/PCHWriter.cpp vendor/clang/dist/lib/Frontend/PCHWriterDecl.cpp vendor/clang/dist/lib/Frontend/PCHWriterStmt.cpp vendor/clang/dist/lib/Frontend/PrintParserCallbacks.cpp vendor/clang/dist/lib/Frontend/PrintPreprocessedOutput.cpp vendor/clang/dist/lib/Frontend/TextDiagnosticPrinter.cpp vendor/clang/dist/lib/Frontend/Warnings.cpp vendor/clang/dist/lib/Headers/CMakeLists.txt vendor/clang/dist/lib/Headers/Makefile vendor/clang/dist/lib/Headers/altivec.h vendor/clang/dist/lib/Headers/emmintrin.h vendor/clang/dist/lib/Headers/smmintrin.h vendor/clang/dist/lib/Headers/stddef.h vendor/clang/dist/lib/Headers/stdint.h vendor/clang/dist/lib/Headers/xmmintrin.h vendor/clang/dist/lib/Index/CallGraph.cpp vendor/clang/dist/lib/Index/Entity.cpp vendor/clang/dist/lib/Index/EntityImpl.h vendor/clang/dist/lib/Index/Indexer.cpp vendor/clang/dist/lib/Index/Makefile vendor/clang/dist/lib/Lex/Lexer.cpp vendor/clang/dist/lib/Lex/LiteralSupport.cpp vendor/clang/dist/lib/Lex/Makefile vendor/clang/dist/lib/Lex/PPCaching.cpp vendor/clang/dist/lib/Lex/PPMacroExpansion.cpp vendor/clang/dist/lib/Lex/Pragma.cpp vendor/clang/dist/lib/Lex/Preprocessor.cpp vendor/clang/dist/lib/Makefile vendor/clang/dist/lib/Parse/AttributeList.cpp vendor/clang/dist/lib/Parse/CMakeLists.txt vendor/clang/dist/lib/Parse/DeclSpec.cpp vendor/clang/dist/lib/Parse/Makefile vendor/clang/dist/lib/Parse/ParseCXXInlineMethods.cpp vendor/clang/dist/lib/Parse/ParseDecl.cpp vendor/clang/dist/lib/Parse/ParseDeclCXX.cpp vendor/clang/dist/lib/Parse/ParseExpr.cpp vendor/clang/dist/lib/Parse/ParseExprCXX.cpp vendor/clang/dist/lib/Parse/ParseInit.cpp vendor/clang/dist/lib/Parse/ParseObjc.cpp vendor/clang/dist/lib/Parse/ParsePragma.cpp vendor/clang/dist/lib/Parse/ParsePragma.h vendor/clang/dist/lib/Parse/ParseStmt.cpp vendor/clang/dist/lib/Parse/ParseTemplate.cpp vendor/clang/dist/lib/Parse/Parser.cpp vendor/clang/dist/lib/Parse/RAIIObjectsForParser.h vendor/clang/dist/lib/Rewrite/CMakeLists.txt vendor/clang/dist/lib/Rewrite/Makefile vendor/clang/dist/lib/Rewrite/RewriteRope.cpp vendor/clang/dist/lib/Rewrite/Rewriter.cpp vendor/clang/dist/lib/Sema/CMakeLists.txt vendor/clang/dist/lib/Sema/JumpDiagnostics.cpp vendor/clang/dist/lib/Sema/Lookup.h vendor/clang/dist/lib/Sema/Makefile vendor/clang/dist/lib/Sema/Sema.cpp vendor/clang/dist/lib/Sema/Sema.h vendor/clang/dist/lib/Sema/SemaAccess.cpp vendor/clang/dist/lib/Sema/SemaAttr.cpp vendor/clang/dist/lib/Sema/SemaCXXCast.cpp vendor/clang/dist/lib/Sema/SemaCXXScopeSpec.cpp vendor/clang/dist/lib/Sema/SemaChecking.cpp vendor/clang/dist/lib/Sema/SemaCodeComplete.cpp vendor/clang/dist/lib/Sema/SemaDecl.cpp vendor/clang/dist/lib/Sema/SemaDeclAttr.cpp vendor/clang/dist/lib/Sema/SemaDeclCXX.cpp vendor/clang/dist/lib/Sema/SemaDeclObjC.cpp vendor/clang/dist/lib/Sema/SemaExceptionSpec.cpp vendor/clang/dist/lib/Sema/SemaExpr.cpp vendor/clang/dist/lib/Sema/SemaExprCXX.cpp vendor/clang/dist/lib/Sema/SemaExprObjC.cpp vendor/clang/dist/lib/Sema/SemaInit.cpp vendor/clang/dist/lib/Sema/SemaInit.h vendor/clang/dist/lib/Sema/SemaLookup.cpp vendor/clang/dist/lib/Sema/SemaObjCProperty.cpp vendor/clang/dist/lib/Sema/SemaOverload.cpp vendor/clang/dist/lib/Sema/SemaStmt.cpp vendor/clang/dist/lib/Sema/SemaTemplate.cpp vendor/clang/dist/lib/Sema/SemaTemplate.h vendor/clang/dist/lib/Sema/SemaTemplateDeduction.cpp vendor/clang/dist/lib/Sema/SemaTemplateInstantiate.cpp vendor/clang/dist/lib/Sema/SemaTemplateInstantiateDecl.cpp vendor/clang/dist/lib/Sema/SemaType.cpp vendor/clang/dist/lib/Sema/TreeTransform.h vendor/clang/dist/test/Analysis/dead-stores.c vendor/clang/dist/test/Analysis/dead-stores.cpp vendor/clang/dist/test/Analysis/malloc.c vendor/clang/dist/test/Analysis/misc-ps-region-store.m vendor/clang/dist/test/Analysis/misc-ps.m vendor/clang/dist/test/Analysis/no-outofbounds.c vendor/clang/dist/test/Analysis/null-deref-ps.c vendor/clang/dist/test/Analysis/outofbound.c vendor/clang/dist/test/Analysis/ptr-arith.c vendor/clang/dist/test/Analysis/rdar-6442306-1.m vendor/clang/dist/test/Analysis/rdar-7168531.m vendor/clang/dist/test/Analysis/reference.cpp vendor/clang/dist/test/Analysis/retain-release.m vendor/clang/dist/test/Analysis/stack-addr-ps.c vendor/clang/dist/test/CXX/basic/basic.lookup/basic.lookup.argdep/p2.cpp vendor/clang/dist/test/CXX/basic/basic.lookup/basic.lookup.qual/p6-0x.cpp vendor/clang/dist/test/CXX/basic/basic.lookup/basic.lookup.qual/p6.cpp vendor/clang/dist/test/CXX/class.access/class.access.base/p1.cpp vendor/clang/dist/test/CXX/class.access/class.access.base/p5.cpp vendor/clang/dist/test/CXX/class.access/class.access.dcl/p1.cpp vendor/clang/dist/test/CXX/class.access/class.friend/p1.cpp vendor/clang/dist/test/CXX/class.access/class.protected/p1.cpp vendor/clang/dist/test/CXX/class.access/p4.cpp vendor/clang/dist/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p10.cpp vendor/clang/dist/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p12.cpp vendor/clang/dist/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p13.cpp vendor/clang/dist/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-cxx03-extra-copy.cpp vendor/clang/dist/test/CXX/temp/temp.param/p2.cpp vendor/clang/dist/test/CXX/temp/temp.spec/temp.explicit/p2.cpp vendor/clang/dist/test/CXX/temp/temp.spec/temp.explicit/p9-linkage.cpp vendor/clang/dist/test/CodeCompletion/call.cpp vendor/clang/dist/test/CodeCompletion/ordinary-name.cpp vendor/clang/dist/test/CodeGen/2008-07-29-override-alias-decl.c vendor/clang/dist/test/CodeGen/address-space-field2.c vendor/clang/dist/test/CodeGen/address-space-field3.c vendor/clang/dist/test/CodeGen/address-space-field4.c vendor/clang/dist/test/CodeGen/address-space.c vendor/clang/dist/test/CodeGen/arm-arguments.c vendor/clang/dist/test/CodeGen/blocks-aligned-byref-variable.c vendor/clang/dist/test/CodeGen/blocks.c vendor/clang/dist/test/CodeGen/builtin-attributes.c vendor/clang/dist/test/CodeGen/builtins-arm.c vendor/clang/dist/test/CodeGen/builtins-ppc-altivec.c vendor/clang/dist/test/CodeGen/builtins.c vendor/clang/dist/test/CodeGen/const-arithmetic.c vendor/clang/dist/test/CodeGen/const-unordered-compare.c vendor/clang/dist/test/CodeGen/decl.c vendor/clang/dist/test/CodeGen/exprs.c vendor/clang/dist/test/CodeGen/extern-inline.c vendor/clang/dist/test/CodeGen/init.c vendor/clang/dist/test/CodeGen/inline.c vendor/clang/dist/test/CodeGen/inline2.c vendor/clang/dist/test/CodeGen/object-size.c vendor/clang/dist/test/CodeGen/pragma-pack-1.c vendor/clang/dist/test/CodeGen/regparm.c vendor/clang/dist/test/CodeGen/statements.c vendor/clang/dist/test/CodeGen/struct-init.c vendor/clang/dist/test/CodeGen/typedef-func.c vendor/clang/dist/test/CodeGen/volatile.c vendor/clang/dist/test/CodeGen/x86_64-arguments.c vendor/clang/dist/test/CodeGenCXX/alloca-align.cpp vendor/clang/dist/test/CodeGenCXX/arm.cpp vendor/clang/dist/test/CodeGenCXX/condition.cpp vendor/clang/dist/test/CodeGenCXX/constructor-convert.cpp vendor/clang/dist/test/CodeGenCXX/cxx-apple-kext.cpp vendor/clang/dist/test/CodeGenCXX/default-arg-temps.cpp vendor/clang/dist/test/CodeGenCXX/destructors.cpp vendor/clang/dist/test/CodeGenCXX/eh.cpp vendor/clang/dist/test/CodeGenCXX/global-dtor-no-atexit.cpp vendor/clang/dist/test/CodeGenCXX/global-init.cpp vendor/clang/dist/test/CodeGenCXX/internal-linkage.cpp vendor/clang/dist/test/CodeGenCXX/mangle-exprs.cpp vendor/clang/dist/test/CodeGenCXX/mangle-subst-std.cpp vendor/clang/dist/test/CodeGenCXX/mangle-subst.cpp vendor/clang/dist/test/CodeGenCXX/mangle-unnamed.cpp vendor/clang/dist/test/CodeGenCXX/mangle.cpp vendor/clang/dist/test/CodeGenCXX/member-functions.cpp vendor/clang/dist/test/CodeGenCXX/nrvo.cpp vendor/clang/dist/test/CodeGenCXX/pointers-to-data-members.cpp vendor/clang/dist/test/CodeGenCXX/references.cpp vendor/clang/dist/test/CodeGenCXX/rtti-layout.cpp vendor/clang/dist/test/CodeGenCXX/rtti-linkage.cpp vendor/clang/dist/test/CodeGenCXX/static-init.cpp vendor/clang/dist/test/CodeGenCXX/template-instantiation.cpp vendor/clang/dist/test/CodeGenCXX/temporaries.cpp vendor/clang/dist/test/CodeGenCXX/threadsafe-statics-exceptions.cpp vendor/clang/dist/test/CodeGenCXX/thunks.cpp vendor/clang/dist/test/CodeGenCXX/virtual-base-destructor-call.cpp vendor/clang/dist/test/CodeGenCXX/virtual-functions-incomplete-types.cpp vendor/clang/dist/test/CodeGenCXX/visibility.cpp vendor/clang/dist/test/CodeGenCXX/x86_64-arguments.cpp vendor/clang/dist/test/CodeGenObjC/exceptions.m vendor/clang/dist/test/CodeGenObjC/metadata_symbols.m vendor/clang/dist/test/Driver/cxx-pth.cpp vendor/clang/dist/test/Driver/darwin-cc.c vendor/clang/dist/test/Driver/darwin-debug-flags.c vendor/clang/dist/test/Driver/darwin-ld.c vendor/clang/dist/test/Driver/lto.c vendor/clang/dist/test/FixIt/typo.cpp vendor/clang/dist/test/FixIt/typo.m vendor/clang/dist/test/Headers/x86-intrinsics-headers.c vendor/clang/dist/test/Index/code-complete-errors.c vendor/clang/dist/test/Index/code-completion.cpp vendor/clang/dist/test/Index/complete-at-directives.m vendor/clang/dist/test/Index/complete-exprs.c vendor/clang/dist/test/Index/complete-macros.c vendor/clang/dist/test/Index/complete-method-decls.m vendor/clang/dist/test/Index/complete-objc-message.m vendor/clang/dist/test/Index/complete-recovery.m vendor/clang/dist/test/Index/print-typekind.c vendor/clang/dist/test/Index/usrs.m vendor/clang/dist/test/Lexer/block_cmt_end.c vendor/clang/dist/test/Lexer/constants.c vendor/clang/dist/test/Lexer/has_feature_cxx0x.cpp vendor/clang/dist/test/Lexer/has_feature_exceptions.cpp vendor/clang/dist/test/Lexer/has_feature_rtti.cpp vendor/clang/dist/test/Lexer/hexfloat.cpp vendor/clang/dist/test/Makefile vendor/clang/dist/test/Misc/macro-backtrace-limit.c vendor/clang/dist/test/PCH/attrs.h vendor/clang/dist/test/PCH/cxx_exprs.cpp vendor/clang/dist/test/PCH/cxx_exprs.h vendor/clang/dist/test/PCH/exprs.c vendor/clang/dist/test/PCH/exprs.h vendor/clang/dist/test/PCH/types.c vendor/clang/dist/test/PCH/types.h vendor/clang/dist/test/Parser/altivec.c vendor/clang/dist/test/Parser/cxx-altivec.cpp vendor/clang/dist/test/Parser/cxx-class.cpp vendor/clang/dist/test/Parser/cxx-decl.cpp vendor/clang/dist/test/Parser/cxx-undeclared-identifier.cpp vendor/clang/dist/test/Parser/declarators.c vendor/clang/dist/test/Parser/objc-try-catch-1.m vendor/clang/dist/test/Parser/pragma-options.c vendor/clang/dist/test/Preprocessor/init.c vendor/clang/dist/test/Preprocessor/print_line_track.c vendor/clang/dist/test/Preprocessor/stdint.c vendor/clang/dist/test/Rewriter/dllimport-typedef.c vendor/clang/dist/test/Rewriter/missing-dllimport.c vendor/clang/dist/test/Sema/address_spaces.c vendor/clang/dist/test/Sema/attr-deprecated.c vendor/clang/dist/test/Sema/attr-regparm.c vendor/clang/dist/test/Sema/bitfield-layout.c vendor/clang/dist/test/Sema/block-call.c vendor/clang/dist/test/Sema/block-return.c vendor/clang/dist/test/Sema/builtins.c vendor/clang/dist/test/Sema/compare.c vendor/clang/dist/test/Sema/const-eval.c vendor/clang/dist/test/Sema/conversion-64-32.c vendor/clang/dist/test/Sema/conversion.c vendor/clang/dist/test/Sema/enum.c vendor/clang/dist/test/Sema/expr-comma-c89.c vendor/clang/dist/test/Sema/expr-comma.c vendor/clang/dist/test/Sema/exprs.c vendor/clang/dist/test/Sema/ext_vector_casts.c vendor/clang/dist/test/Sema/format-strings.c vendor/clang/dist/test/Sema/function-redecl.c vendor/clang/dist/test/Sema/function.c vendor/clang/dist/test/Sema/i-c-e.c vendor/clang/dist/test/Sema/implicit-decl.c vendor/clang/dist/test/Sema/init.c vendor/clang/dist/test/Sema/missing-field-initializers.c vendor/clang/dist/test/Sema/pragma-align-mac68k-unsupported.c vendor/clang/dist/test/Sema/pragma-align-mac68k.c vendor/clang/dist/test/Sema/pragma-pack-and-options-align.c vendor/clang/dist/test/Sema/return.c vendor/clang/dist/test/Sema/self-comparison.c vendor/clang/dist/test/Sema/struct-cast.c vendor/clang/dist/test/Sema/struct-decl.c vendor/clang/dist/test/Sema/switch.c vendor/clang/dist/test/Sema/transparent-union.c vendor/clang/dist/test/Sema/types.c vendor/clang/dist/test/Sema/var-redecl.c vendor/clang/dist/test/Sema/warn-unused-value.c vendor/clang/dist/test/SemaCXX/abstract.cpp vendor/clang/dist/test/SemaCXX/access-base-class.cpp vendor/clang/dist/test/SemaCXX/ambig-user-defined-conversions.cpp vendor/clang/dist/test/SemaCXX/blocks-1.cpp vendor/clang/dist/test/SemaCXX/class-layout.cpp vendor/clang/dist/test/SemaCXX/class.cpp vendor/clang/dist/test/SemaCXX/compare.cpp vendor/clang/dist/test/SemaCXX/conditional-expr.cpp vendor/clang/dist/test/SemaCXX/constructor-initializer.cpp vendor/clang/dist/test/SemaCXX/destructor.cpp vendor/clang/dist/test/SemaCXX/empty-class-layout.cpp vendor/clang/dist/test/SemaCXX/enum.cpp vendor/clang/dist/test/SemaCXX/friend.cpp vendor/clang/dist/test/SemaCXX/function-type-qual.cpp vendor/clang/dist/test/SemaCXX/implicit-member-functions.cpp vendor/clang/dist/test/SemaCXX/member-expr.cpp vendor/clang/dist/test/SemaCXX/new-delete.cpp vendor/clang/dist/test/SemaCXX/overload-call.cpp vendor/clang/dist/test/SemaCXX/overloaded-builtin-operators.cpp vendor/clang/dist/test/SemaCXX/overloaded-operator.cpp vendor/clang/dist/test/SemaCXX/pseudo-destructors.cpp vendor/clang/dist/test/SemaCXX/reinterpret-cast.cpp vendor/clang/dist/test/SemaCXX/rval-references.cpp vendor/clang/dist/test/SemaCXX/typedef-redecl.cpp vendor/clang/dist/test/SemaCXX/using-directive.cpp vendor/clang/dist/test/SemaCXX/vector.cpp vendor/clang/dist/test/SemaCXX/warn-unreachable.cpp vendor/clang/dist/test/SemaCXX/warn-unused-variables.cpp vendor/clang/dist/test/SemaCXX/wchar_t.cpp vendor/clang/dist/test/SemaObjC/duplicate-property-class-extension.m vendor/clang/dist/test/SemaObjC/format-strings-objc.m vendor/clang/dist/test/SemaObjC/return.m vendor/clang/dist/test/SemaObjC/super-class-protocol-conformance.m vendor/clang/dist/test/SemaObjCXX/instantiate-message.mm vendor/clang/dist/test/SemaObjCXX/message.mm vendor/clang/dist/test/SemaObjCXX/objc-pointer-conv.mm vendor/clang/dist/test/SemaObjCXX/overload.mm vendor/clang/dist/test/SemaTemplate/attributes.cpp vendor/clang/dist/test/SemaTemplate/class-template-ctor-initializer.cpp vendor/clang/dist/test/SemaTemplate/deduction.cpp vendor/clang/dist/test/SemaTemplate/dependent-type-identity.cpp vendor/clang/dist/test/SemaTemplate/destructor-template.cpp vendor/clang/dist/test/SemaTemplate/example-dynarray.cpp vendor/clang/dist/test/SemaTemplate/explicit-instantiation.cpp vendor/clang/dist/test/SemaTemplate/ext-vector-type.cpp vendor/clang/dist/test/SemaTemplate/instantiate-field.cpp vendor/clang/dist/test/SemaTemplate/instantiate-function-1.cpp vendor/clang/dist/test/SemaTemplate/instantiate-function-2.cpp vendor/clang/dist/test/SemaTemplate/instantiate-member-template.cpp vendor/clang/dist/test/SemaTemplate/instantiate-objc-1.mm vendor/clang/dist/test/SemaTemplate/member-function-template.cpp vendor/clang/dist/test/SemaTemplate/nested-name-spec-template.cpp vendor/clang/dist/test/SemaTemplate/typename-specifier-4.cpp vendor/clang/dist/test/SemaTemplate/typename-specifier.cpp vendor/clang/dist/test/lit.cfg vendor/clang/dist/tools/Makefile vendor/clang/dist/tools/c-index-test/Makefile vendor/clang/dist/tools/c-index-test/c-index-test.c vendor/clang/dist/tools/driver/CMakeLists.txt vendor/clang/dist/tools/driver/Makefile vendor/clang/dist/tools/driver/cc1_main.cpp vendor/clang/dist/tools/driver/cc1as_main.cpp vendor/clang/dist/tools/libclang/CIndex.cpp vendor/clang/dist/tools/libclang/CIndexCodeCompletion.cpp vendor/clang/dist/tools/libclang/CIndexer.cpp vendor/clang/dist/tools/libclang/CMakeLists.txt vendor/clang/dist/tools/libclang/CXCursor.cpp vendor/clang/dist/tools/libclang/CXSourceLocation.h vendor/clang/dist/tools/libclang/CXTypes.cpp vendor/clang/dist/tools/libclang/Makefile vendor/clang/dist/tools/libclang/libclang.darwin.exports vendor/clang/dist/tools/libclang/libclang.exports vendor/clang/dist/tools/scan-build/ccc-analyzer vendor/clang/dist/www/analyzer/installation.html vendor/clang/dist/www/analyzer/latest_checker.html.incl vendor/clang/dist/www/content.css vendor/clang/dist/www/cxx_compatibility.html vendor/clang/dist/www/hacking.html vendor/clang/dist/www/index.html vendor/clang/dist/www/menu.html.incl Modified: vendor/clang/dist/CMakeLists.txt ============================================================================== --- vendor/clang/dist/CMakeLists.txt Tue Jul 13 17:21:15 2010 (r210007) +++ vendor/clang/dist/CMakeLists.txt Tue Jul 13 17:21:42 2010 (r210008) @@ -1,10 +1,5 @@ # Clang version information -# Make sure that CMake reconfigures when the version changes. -configure_file( - ${CMAKE_CURRENT_SOURCE_DIR}/VER - ${CMAKE_CURRENT_BINARY_DIR}/VER) - set(CLANG_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) set(CLANG_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}) @@ -28,12 +23,28 @@ if( NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_ endif() endif() -# Compute the Clang version from the contents of VER -file(READ ${CMAKE_CURRENT_SOURCE_DIR}/VER CLANG_VERSION_DATA) +# Compute the Clang version from the LLVM version. string(REGEX MATCH "[0-9]+\\.[0-9]+(\\.[0-9]+)?" CLANG_VERSION - ${CLANG_VERSION_DATA}) + ${PACKAGE_VERSION}) message(STATUS "Clang version: ${CLANG_VERSION}") +string(REGEX REPLACE "([0-9]+)\\.[0-9]+(\\.[0-9]+)?" "\\1" CLANG_VERSION_MAJOR + ${CLANG_VERSION}) +string(REGEX REPLACE "[0-9]+\\.([0-9]+)(\\.[0-9]+)?" "\\1" CLANG_VERSION_MINOR + ${CLANG_VERSION}) +if (${CLANG_VERSION} MATCHES "[0-9]+\\.[0-9]+\\.[0-9]+") + set(CLANG_HAS_VERSION_PATCHLEVEL 1) + string(REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" CLANG_VERSION_PATCHLEVEL + ${CLANG_VERSION}) +else() + set(CLANG_HAS_VERSION_PATCHLEVEL 0) +endif() + +# Configure the Version.inc file. +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/include/clang/Basic/Version.inc.in + ${CMAKE_CURRENT_BINARY_DIR}/include/clang/Basic/Version.inc) + # Add appropriate flags for GCC if (CMAKE_COMPILER_IS_GNUCXX) # FIXME: Turn off exceptions, RTTI: @@ -41,6 +52,10 @@ if (CMAKE_COMPILER_IS_GNUCXX) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-common -Woverloaded-virtual -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings") endif () +if (APPLE) + set(CMAKE_MODULE_LINKER_FLAGS "-Wl,-flat_namespace -Wl,-undefined -Wl,suppress") +endif () + macro(add_clang_library name) set(srcs ${ARGN}) if(MSVC_IDE OR XCODE) @@ -54,7 +69,9 @@ macro(add_clang_library name) ../../include/clang${dir}/*.def) set(srcs ${srcs} ${headers}) endif(MSVC_IDE OR XCODE) - if (SHARED_LIBRARY) + if (MODULE) + set(libkind MODULE) + elseif (SHARED_LIBRARY) set(libkind SHARED) else() set(libkind) Modified: vendor/clang/dist/Makefile ============================================================================== --- vendor/clang/dist/Makefile Tue Jul 13 17:21:15 2010 (r210007) +++ vendor/clang/dist/Makefile Tue Jul 13 17:21:42 2010 (r210008) @@ -1,14 +1,63 @@ -LEVEL = ../.. -DIRS := include lib tools docs +##===- Makefile --------------------------------------------*- Makefile -*-===## +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +##===----------------------------------------------------------------------===## + +# If CLANG_LEVEL is not set, then we are the top-level Makefile. Otherwise, we +# are being included from a subdirectory makefile. + +ifndef CLANG_LEVEL + +IS_TOP_LEVEL := 1 +CLANG_LEVEL := . +DIRS := include lib tools runtime docs PARALLEL_DIRS := ifeq ($(BUILD_EXAMPLES),1) PARALLEL_DIRS += examples endif +endif + +ifeq ($(MAKECMDGOALS),libs-only) + DIRS := $(filter-out tools docs, $(DIRS)) + OPTIONAL_DIRS := +endif + +### +# Common Makefile code, shared by all Clang Makefiles. +# Set LLVM source root level. +LEVEL := $(CLANG_LEVEL)/../.. + +# Include LLVM common makefile. include $(LEVEL)/Makefile.common +# Set common Clang build flags. +CPP.Flags += -I$(PROJ_SRC_DIR)/$(CLANG_LEVEL)/include -I$(PROJ_OBJ_DIR)/$(CLANG_LEVEL)/include +ifdef CLANG_VENDOR +CPP.Flags += -DCLANG_VENDOR='"$(CLANG_VENDOR) "' +endif + +# Disable -fstrict-aliasing. Darwin disables it by default (and LLVM doesn't +# work with it enabled with GCC), Clang/llvm-gc don't support it yet, and newer +# GCC's have false positive warnings with it on Linux (which prove a pain to +# fix). For example: +# http://gcc.gnu.org/PR41874 +# http://gcc.gnu.org/PR41838 +# +# We can revisit this when LLVM/Clang support it. +CXX.Flags += -fno-strict-aliasing + +### +# Clang Top Level specific stuff. + +ifeq ($(IS_TOP_LEVEL),1) + ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT)) $(RecursiveTargets):: $(Verb) if [ ! -f test/Makefile ]; then \ @@ -26,6 +75,8 @@ report:: clean:: @ $(MAKE) -C test clean +libs-only: all + tags:: $(Verb) etags `find . -type f -name '*.h' -or -name '*.cpp' | \ grep -v /lib/Headers | grep -v /test/` @@ -37,3 +88,5 @@ cscope.files: -or -name '*.h' > cscope.files .PHONY: test report clean cscope.files + +endif Modified: vendor/clang/dist/NOTES.txt ============================================================================== --- vendor/clang/dist/NOTES.txt Tue Jul 13 17:21:15 2010 (r210007) +++ vendor/clang/dist/NOTES.txt Tue Jul 13 17:21:42 2010 (r210008) @@ -13,8 +13,7 @@ This is similar to -Eonly. //===---------------------------------------------------------------------===// -Creating and using a PTH file for performance measurement (use a release-asserts -build). +Creating and using a PTH file for performance measurement (use a release build). $ clang -ccc-pch-is-pth -x objective-c-header INPUTS/Cocoa_h.m -o /tmp/tokencache $ clang -cc1 -token-cache /tmp/tokencache INPUTS/Cocoa_h.m Modified: vendor/clang/dist/README.txt ============================================================================== --- vendor/clang/dist/README.txt Tue Jul 13 17:21:15 2010 (r210007) +++ vendor/clang/dist/README.txt Tue Jul 13 17:21:42 2010 (r210008) @@ -4,7 +4,7 @@ Welcome to Clang. This is a compiler front-end for the C family of languages (C, C++, Objective-C, and Objective-C++) which is built as part of the LLVM -compiler intrastructure project. +compiler infrastructure project. Unlike many other compiler frontends, Clang is useful for a number of things beyond just compiling code: we intend for Clang to be host to a number of Modified: vendor/clang/dist/clang.xcodeproj/project.pbxproj ============================================================================== --- vendor/clang/dist/clang.xcodeproj/project.pbxproj Tue Jul 13 17:21:15 2010 (r210007) +++ vendor/clang/dist/clang.xcodeproj/project.pbxproj Tue Jul 13 17:21:42 2010 (r210008) @@ -19,9 +19,6 @@ 1A2A54BD0FD1DD1C00F4CE45 /* HTMLPrint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54AC0FD1DD1C00F4CE45 /* HTMLPrint.cpp */; }; 1A2A54BE0FD1DD1C00F4CE45 /* PrintParserCallbacks.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54AD0FD1DD1C00F4CE45 /* PrintParserCallbacks.cpp */; }; 1A2A54BF0FD1DD1C00F4CE45 /* PrintPreprocessedOutput.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54AE0FD1DD1C00F4CE45 /* PrintPreprocessedOutput.cpp */; }; - 1A2A54C10FD1DD1C00F4CE45 /* RewriteMacros.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54B00FD1DD1C00F4CE45 /* RewriteMacros.cpp */; }; - 1A2A54C20FD1DD1C00F4CE45 /* RewriteObjC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54B10FD1DD1C00F4CE45 /* RewriteObjC.cpp */; }; - 1A2A54C30FD1DD1C00F4CE45 /* RewriteTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54B20FD1DD1C00F4CE45 /* RewriteTest.cpp */; }; 1A2A54C40FD1DD1C00F4CE45 /* StmtXML.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54B30FD1DD1C00F4CE45 /* StmtXML.cpp */; }; 1A2A54C50FD1DD1C00F4CE45 /* Warnings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54B40FD1DD1C00F4CE45 /* Warnings.cpp */; }; 1A30A9E90B93A4C800201A91 /* ExprCXX.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 1A30A9E80B93A4C800201A91 /* ExprCXX.h */; }; @@ -171,6 +168,50 @@ BF89C3F911595A01001C2D68 /* SemaType.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF89C3F811595A01001C2D68 /* SemaType.cpp */; }; BF89C3FB11595A37001C2D68 /* SemaCodeComplete.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF89C3FA11595A37001C2D68 /* SemaCodeComplete.cpp */; }; BF89C3FD11595A5D001C2D68 /* SemaExceptionSpec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF89C3FC11595A5D001C2D68 /* SemaExceptionSpec.cpp */; }; + BFE2F6AB11DA955A0007EDC0 /* DeltaTree.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F67D11DA95590007EDC0 /* DeltaTree.d */; }; + BFE2F6AC11DA955A0007EDC0 /* DeltaTree.o in Frameworks */ = {isa = PBXBuildFile; fileRef = BFE2F67E11DA955A0007EDC0 /* DeltaTree.o */; }; + BFE2F6AD11DA955A0007EDC0 /* FixItRewriter.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F67F11DA955A0007EDC0 /* FixItRewriter.d */; }; + BFE2F6AE11DA955A0007EDC0 /* FixItRewriter.o in Frameworks */ = {isa = PBXBuildFile; fileRef = BFE2F68011DA955A0007EDC0 /* FixItRewriter.o */; }; + BFE2F6AF11DA955A0007EDC0 /* FrontendActions.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F68111DA955A0007EDC0 /* FrontendActions.d */; }; + BFE2F6B011DA955A0007EDC0 /* FrontendActions.o in Frameworks */ = {isa = PBXBuildFile; fileRef = BFE2F68211DA955A0007EDC0 /* FrontendActions.o */; }; + BFE2F6B111DA955A0007EDC0 /* HTMLPrint.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F68311DA955A0007EDC0 /* HTMLPrint.d */; }; + BFE2F6B211DA955A0007EDC0 /* HTMLPrint.o in Frameworks */ = {isa = PBXBuildFile; fileRef = BFE2F68411DA955A0007EDC0 /* HTMLPrint.o */; }; + BFE2F6B311DA955A0007EDC0 /* HTMLRewrite.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F68511DA955A0007EDC0 /* HTMLRewrite.d */; }; + BFE2F6B411DA955A0007EDC0 /* HTMLRewrite.o in Frameworks */ = {isa = PBXBuildFile; fileRef = BFE2F68611DA955A0007EDC0 /* HTMLRewrite.o */; }; + BFE2F6B511DA955A0007EDC0 /* RewriteMacros.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F68711DA955A0007EDC0 /* RewriteMacros.d */; }; + BFE2F6B611DA955A0007EDC0 /* RewriteMacros.o in Frameworks */ = {isa = PBXBuildFile; fileRef = BFE2F68811DA955A0007EDC0 /* RewriteMacros.o */; }; + BFE2F6B711DA955A0007EDC0 /* RewriteObjC.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F68911DA955A0007EDC0 /* RewriteObjC.d */; }; + BFE2F6B811DA955A0007EDC0 /* RewriteObjC.o in Frameworks */ = {isa = PBXBuildFile; fileRef = BFE2F68A11DA955A0007EDC0 /* RewriteObjC.o */; }; + BFE2F6B911DA955A0007EDC0 /* Rewriter.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F68B11DA955A0007EDC0 /* Rewriter.d */; }; + BFE2F6BA11DA955A0007EDC0 /* Rewriter.o in Frameworks */ = {isa = PBXBuildFile; fileRef = BFE2F68C11DA955A0007EDC0 /* Rewriter.o */; }; + BFE2F6BB11DA955A0007EDC0 /* RewriteRope.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F68D11DA955A0007EDC0 /* RewriteRope.d */; }; + BFE2F6BC11DA955A0007EDC0 /* RewriteRope.o in Frameworks */ = {isa = PBXBuildFile; fileRef = BFE2F68E11DA955A0007EDC0 /* RewriteRope.o */; }; + BFE2F6BD11DA955A0007EDC0 /* RewriteTest.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F68F11DA955A0007EDC0 /* RewriteTest.d */; }; + BFE2F6BE11DA955A0007EDC0 /* RewriteTest.o in Frameworks */ = {isa = PBXBuildFile; fileRef = BFE2F69011DA955A0007EDC0 /* RewriteTest.o */; }; + BFE2F6BF11DA955A0007EDC0 /* TokenRewriter.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F69111DA955A0007EDC0 /* TokenRewriter.d */; }; + BFE2F6C011DA955A0007EDC0 /* TokenRewriter.o in Frameworks */ = {isa = PBXBuildFile; fileRef = BFE2F69211DA955A0007EDC0 /* TokenRewriter.o */; }; + BFE2F6C111DA955A0007EDC0 /* DeltaTree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F69311DA955A0007EDC0 /* DeltaTree.cpp */; }; + BFE2F6C211DA955A0007EDC0 /* FixItRewriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F69411DA955A0007EDC0 /* FixItRewriter.cpp */; }; + BFE2F6C311DA955A0007EDC0 /* FrontendActions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F69511DA955A0007EDC0 /* FrontendActions.cpp */; }; + BFE2F6C411DA955A0007EDC0 /* HTMLPrint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F69611DA955A0007EDC0 /* HTMLPrint.cpp */; }; + BFE2F6C511DA955A0007EDC0 /* HTMLRewrite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F69711DA955A0007EDC0 /* HTMLRewrite.cpp */; }; + BFE2F6C611DA955A0007EDC0 /* Makefile in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F69811DA955A0007EDC0 /* Makefile */; }; + BFE2F6C711DA955A0007EDC0 /* DeltaTree.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F69B11DA955A0007EDC0 /* DeltaTree.d */; }; + BFE2F6C811DA955A0007EDC0 /* DeltaTree.o in Frameworks */ = {isa = PBXBuildFile; fileRef = BFE2F69C11DA955A0007EDC0 /* DeltaTree.o */; }; + BFE2F6C911DA955A0007EDC0 /* HTMLRewrite.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F69D11DA955A0007EDC0 /* HTMLRewrite.d */; }; + BFE2F6CA11DA955A0007EDC0 /* HTMLRewrite.o in Frameworks */ = {isa = PBXBuildFile; fileRef = BFE2F69E11DA955A0007EDC0 /* HTMLRewrite.o */; }; + BFE2F6CB11DA955A0007EDC0 /* Rewriter.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F69F11DA955A0007EDC0 /* Rewriter.d */; }; + BFE2F6CC11DA955A0007EDC0 /* Rewriter.o in Frameworks */ = {isa = PBXBuildFile; fileRef = BFE2F6A011DA955A0007EDC0 /* Rewriter.o */; }; + BFE2F6CD11DA955A0007EDC0 /* RewriteRope.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F6A111DA955A0007EDC0 /* RewriteRope.d */; }; + BFE2F6CE11DA955A0007EDC0 /* RewriteRope.o in Frameworks */ = {isa = PBXBuildFile; fileRef = BFE2F6A211DA955A0007EDC0 /* RewriteRope.o */; }; + BFE2F6CF11DA955A0007EDC0 /* TokenRewriter.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F6A311DA955A0007EDC0 /* TokenRewriter.d */; }; + BFE2F6D011DA955A0007EDC0 /* TokenRewriter.o in Frameworks */ = {isa = PBXBuildFile; fileRef = BFE2F6A411DA955A0007EDC0 /* TokenRewriter.o */; }; + BFE2F6D111DA955A0007EDC0 /* RewriteMacros.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F6A511DA955A0007EDC0 /* RewriteMacros.cpp */; }; + BFE2F6D211DA955A0007EDC0 /* RewriteObjC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F6A611DA955A0007EDC0 /* RewriteObjC.cpp */; }; + BFE2F6D311DA955A0007EDC0 /* Rewriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F6A711DA955A0007EDC0 /* Rewriter.cpp */; }; + BFE2F6D411DA955A0007EDC0 /* RewriteRope.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F6A811DA955A0007EDC0 /* RewriteRope.cpp */; }; + BFE2F6D511DA955A0007EDC0 /* RewriteTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F6A911DA955A0007EDC0 /* RewriteTest.cpp */; }; + BFE2F6D611DA955A0007EDC0 /* TokenRewriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F6AA11DA955A0007EDC0 /* TokenRewriter.cpp */; }; DE01DA490B12ADA300AC22CE /* PPCallbacks.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE01DA480B12ADA300AC22CE /* PPCallbacks.h */; }; DE06756C0C051CFE00EBBFD8 /* ParseExprCXX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE06756B0C051CFE00EBBFD8 /* ParseExprCXX.cpp */; }; DE06B73E0A8307640050E87E /* LangOptions.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE06B73D0A8307640050E87E /* LangOptions.h */; }; @@ -391,9 +432,6 @@ 1A2A54AC0FD1DD1C00F4CE45 /* HTMLPrint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HTMLPrint.cpp; path = lib/Frontend/HTMLPrint.cpp; sourceTree = ""; }; 1A2A54AD0FD1DD1C00F4CE45 /* PrintParserCallbacks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PrintParserCallbacks.cpp; path = lib/Frontend/PrintParserCallbacks.cpp; sourceTree = ""; }; 1A2A54AE0FD1DD1C00F4CE45 /* PrintPreprocessedOutput.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PrintPreprocessedOutput.cpp; path = lib/Frontend/PrintPreprocessedOutput.cpp; sourceTree = ""; }; - 1A2A54B00FD1DD1C00F4CE45 /* RewriteMacros.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RewriteMacros.cpp; path = lib/Frontend/RewriteMacros.cpp; sourceTree = ""; }; - 1A2A54B10FD1DD1C00F4CE45 /* RewriteObjC.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = RewriteObjC.cpp; path = lib/Frontend/RewriteObjC.cpp; sourceTree = ""; tabWidth = 2; }; - 1A2A54B20FD1DD1C00F4CE45 /* RewriteTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RewriteTest.cpp; path = lib/Frontend/RewriteTest.cpp; sourceTree = ""; }; 1A2A54B30FD1DD1C00F4CE45 /* StmtXML.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StmtXML.cpp; path = lib/Frontend/StmtXML.cpp; sourceTree = ""; }; 1A2A54B40FD1DD1C00F4CE45 /* Warnings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Warnings.cpp; path = lib/Frontend/Warnings.cpp; sourceTree = ""; }; 1A30A9E80B93A4C800201A91 /* ExprCXX.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = ExprCXX.h; path = clang/AST/ExprCXX.h; sourceTree = ""; tabWidth = 2; }; @@ -438,6 +476,10 @@ 1A869AA70BA21ABA008DA07A /* LiteralSupport.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LiteralSupport.cpp; sourceTree = ""; }; 1A97825A1108BA18002B98FC /* CGVTT.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGVTT.cpp; path = lib/CodeGen/CGVTT.cpp; sourceTree = ""; tabWidth = 2; }; 1A986AB610D0746D00A8EA9E /* CGDeclCXX.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGDeclCXX.cpp; path = lib/CodeGen/CGDeclCXX.cpp; sourceTree = ""; tabWidth = 2; }; + 1AA1D35611BECFF70089CC3F /* CC1AsOptions.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = CC1AsOptions.td; path = clang/Driver/CC1AsOptions.td; sourceTree = ""; }; + 1AA1D35711BECFF70089CC3F /* CC1Options.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = CC1Options.td; path = clang/Driver/CC1Options.td; sourceTree = ""; }; + 1AA1D35811BECFF70089CC3F /* Options.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = Options.td; path = clang/Driver/Options.td; sourceTree = ""; }; + 1AA1D35911BECFF70089CC3F /* OptParser.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = OptParser.td; path = clang/Driver/OptParser.td; sourceTree = ""; }; 1AA963AB10D8576800786C86 /* FullExpr.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = FullExpr.h; path = clang/AST/FullExpr.h; sourceTree = ""; tabWidth = 2; }; 1AB290021045858B00FE33D8 /* PartialDiagnostic.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; path = PartialDiagnostic.h; sourceTree = ""; tabWidth = 2; }; 1ABC36930C7A4BDC006DB0AB /* CGBuiltin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGBuiltin.cpp; path = lib/CodeGen/CGBuiltin.cpp; sourceTree = ""; tabWidth = 2; }; @@ -661,6 +703,53 @@ BF89C3F811595A01001C2D68 /* SemaType.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SemaType.cpp; path = lib/Sema/SemaType.cpp; sourceTree = ""; }; BF89C3FA11595A37001C2D68 /* SemaCodeComplete.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SemaCodeComplete.cpp; path = lib/Sema/SemaCodeComplete.cpp; sourceTree = ""; }; BF89C3FC11595A5D001C2D68 /* SemaExceptionSpec.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SemaExceptionSpec.cpp; path = lib/Sema/SemaExceptionSpec.cpp; sourceTree = ""; }; + BFE2F67A11DA95590007EDC0 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = ""; }; + BFE2F67C11DA95590007EDC0 /* .dir */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = .dir; sourceTree = ""; }; + BFE2F67D11DA95590007EDC0 /* DeltaTree.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = DeltaTree.d; sourceTree = ""; }; + BFE2F67E11DA955A0007EDC0 /* DeltaTree.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = DeltaTree.o; sourceTree = ""; }; + BFE2F67F11DA955A0007EDC0 /* FixItRewriter.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = FixItRewriter.d; sourceTree = ""; }; + BFE2F68011DA955A0007EDC0 /* FixItRewriter.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = FixItRewriter.o; sourceTree = ""; }; + BFE2F68111DA955A0007EDC0 /* FrontendActions.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = FrontendActions.d; sourceTree = ""; }; + BFE2F68211DA955A0007EDC0 /* FrontendActions.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = FrontendActions.o; sourceTree = ""; }; + BFE2F68311DA955A0007EDC0 /* HTMLPrint.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = HTMLPrint.d; sourceTree = ""; }; + BFE2F68411DA955A0007EDC0 /* HTMLPrint.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = HTMLPrint.o; sourceTree = ""; }; + BFE2F68511DA955A0007EDC0 /* HTMLRewrite.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = HTMLRewrite.d; sourceTree = ""; }; + BFE2F68611DA955A0007EDC0 /* HTMLRewrite.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = HTMLRewrite.o; sourceTree = ""; }; + BFE2F68711DA955A0007EDC0 /* RewriteMacros.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = RewriteMacros.d; sourceTree = ""; }; + BFE2F68811DA955A0007EDC0 /* RewriteMacros.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = RewriteMacros.o; sourceTree = ""; }; + BFE2F68911DA955A0007EDC0 /* RewriteObjC.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = RewriteObjC.d; sourceTree = ""; }; + BFE2F68A11DA955A0007EDC0 /* RewriteObjC.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = RewriteObjC.o; sourceTree = ""; }; + BFE2F68B11DA955A0007EDC0 /* Rewriter.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = Rewriter.d; sourceTree = ""; }; + BFE2F68C11DA955A0007EDC0 /* Rewriter.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = Rewriter.o; sourceTree = ""; }; + BFE2F68D11DA955A0007EDC0 /* RewriteRope.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = RewriteRope.d; sourceTree = ""; }; + BFE2F68E11DA955A0007EDC0 /* RewriteRope.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = RewriteRope.o; sourceTree = ""; }; + BFE2F68F11DA955A0007EDC0 /* RewriteTest.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = RewriteTest.d; sourceTree = ""; }; + BFE2F69011DA955A0007EDC0 /* RewriteTest.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = RewriteTest.o; sourceTree = ""; }; + BFE2F69111DA955A0007EDC0 /* TokenRewriter.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = TokenRewriter.d; sourceTree = ""; }; + BFE2F69211DA955A0007EDC0 /* TokenRewriter.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = TokenRewriter.o; sourceTree = ""; }; + BFE2F69311DA955A0007EDC0 /* DeltaTree.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DeltaTree.cpp; sourceTree = ""; }; + BFE2F69411DA955A0007EDC0 /* FixItRewriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FixItRewriter.cpp; sourceTree = ""; }; + BFE2F69511DA955A0007EDC0 /* FrontendActions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FrontendActions.cpp; sourceTree = ""; }; + BFE2F69611DA955A0007EDC0 /* HTMLPrint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLPrint.cpp; sourceTree = ""; }; + BFE2F69711DA955A0007EDC0 /* HTMLRewrite.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLRewrite.cpp; sourceTree = ""; }; + BFE2F69811DA955A0007EDC0 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = ""; }; + BFE2F69A11DA955A0007EDC0 /* .dir */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = .dir; sourceTree = ""; }; + BFE2F69B11DA955A0007EDC0 /* DeltaTree.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = DeltaTree.d; sourceTree = ""; }; + BFE2F69C11DA955A0007EDC0 /* DeltaTree.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = DeltaTree.o; sourceTree = ""; }; + BFE2F69D11DA955A0007EDC0 /* HTMLRewrite.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = HTMLRewrite.d; sourceTree = ""; }; + BFE2F69E11DA955A0007EDC0 /* HTMLRewrite.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = HTMLRewrite.o; sourceTree = ""; }; + BFE2F69F11DA955A0007EDC0 /* Rewriter.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = Rewriter.d; sourceTree = ""; }; + BFE2F6A011DA955A0007EDC0 /* Rewriter.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = Rewriter.o; sourceTree = ""; }; + BFE2F6A111DA955A0007EDC0 /* RewriteRope.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = RewriteRope.d; sourceTree = ""; }; + BFE2F6A211DA955A0007EDC0 /* RewriteRope.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = RewriteRope.o; sourceTree = ""; }; + BFE2F6A311DA955A0007EDC0 /* TokenRewriter.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = TokenRewriter.d; sourceTree = ""; }; + BFE2F6A411DA955A0007EDC0 /* TokenRewriter.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = TokenRewriter.o; sourceTree = ""; }; + BFE2F6A511DA955A0007EDC0 /* RewriteMacros.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RewriteMacros.cpp; sourceTree = ""; }; + BFE2F6A611DA955A0007EDC0 /* RewriteObjC.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RewriteObjC.cpp; sourceTree = ""; }; + BFE2F6A711DA955A0007EDC0 /* Rewriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Rewriter.cpp; sourceTree = ""; }; + BFE2F6A811DA955A0007EDC0 /* RewriteRope.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RewriteRope.cpp; sourceTree = ""; }; + BFE2F6A911DA955A0007EDC0 /* RewriteTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RewriteTest.cpp; sourceTree = ""; }; + BFE2F6AA11DA955A0007EDC0 /* TokenRewriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TokenRewriter.cpp; sourceTree = ""; }; DE01DA480B12ADA300AC22CE /* PPCallbacks.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PPCallbacks.h; sourceTree = ""; }; DE06756B0C051CFE00EBBFD8 /* ParseExprCXX.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = ParseExprCXX.cpp; path = lib/Parse/ParseExprCXX.cpp; sourceTree = ""; tabWidth = 2; }; DE06B73D0A8307640050E87E /* LangOptions.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; path = LangOptions.h; sourceTree = ""; tabWidth = 2; }; @@ -807,24 +896,24 @@ DEDFE5270F63A9230035BD10 /* DeclNodes.def */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = text; name = DeclNodes.def; path = clang/AST/DeclNodes.def; sourceTree = ""; tabWidth = 2; }; DEDFE5CB0F7206CC0035BD10 /* NestedNameSpecifier.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = NestedNameSpecifier.h; path = clang/AST/NestedNameSpecifier.h; sourceTree = ""; tabWidth = 2; }; DEDFE6450F7B3B4E0035BD10 /* driver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = driver.cpp; path = tools/driver/driver.cpp; sourceTree = ""; }; - DEDFE6480F7B3B830035BD10 /* Types.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Types.cpp; path = lib/Driver/Types.cpp; sourceTree = ""; }; - DEDFE6490F7B3B830035BD10 /* Tools.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Tools.h; path = lib/Driver/Tools.h; sourceTree = ""; }; - DEDFE64A0F7B3B830035BD10 /* Tools.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Tools.cpp; path = lib/Driver/Tools.cpp; sourceTree = ""; }; - DEDFE64B0F7B3B830035BD10 /* ToolChains.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ToolChains.h; path = lib/Driver/ToolChains.h; sourceTree = ""; }; - DEDFE64C0F7B3B830035BD10 /* Compilation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Compilation.cpp; path = lib/Driver/Compilation.cpp; sourceTree = ""; }; - DEDFE64D0F7B3B830035BD10 /* ArgList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ArgList.cpp; path = lib/Driver/ArgList.cpp; sourceTree = ""; }; - DEDFE64E0F7B3B830035BD10 /* Arg.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Arg.cpp; path = lib/Driver/Arg.cpp; sourceTree = ""; }; - DEDFE64F0F7B3B830035BD10 /* Action.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Action.cpp; path = lib/Driver/Action.cpp; sourceTree = ""; }; - DEDFE6500F7B3B830035BD10 /* Phases.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Phases.cpp; path = lib/Driver/Phases.cpp; sourceTree = ""; }; - DEDFE6510F7B3B830035BD10 /* OptTable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptTable.cpp; path = lib/Driver/OptTable.cpp; sourceTree = ""; }; - DEDFE6520F7B3B830035BD10 /* Option.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Option.cpp; path = lib/Driver/Option.cpp; sourceTree = ""; }; - DEDFE6530F7B3B830035BD10 /* Job.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Job.cpp; path = lib/Driver/Job.cpp; sourceTree = ""; }; - DEDFE6540F7B3B830035BD10 /* InputInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = InputInfo.h; path = lib/Driver/InputInfo.h; sourceTree = ""; }; - DEDFE6550F7B3B830035BD10 /* ToolChains.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ToolChains.cpp; path = lib/Driver/ToolChains.cpp; sourceTree = ""; }; - DEDFE6560F7B3B830035BD10 /* ToolChain.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ToolChain.cpp; path = lib/Driver/ToolChain.cpp; sourceTree = ""; }; - DEDFE6570F7B3B830035BD10 /* Tool.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Tool.cpp; path = lib/Driver/Tool.cpp; sourceTree = ""; }; - DEDFE6580F7B3B830035BD10 /* HostInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HostInfo.cpp; path = lib/Driver/HostInfo.cpp; sourceTree = ""; }; - DEDFE6590F7B3B830035BD10 /* Driver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Driver.cpp; path = lib/Driver/Driver.cpp; sourceTree = ""; }; + DEDFE6480F7B3B830035BD10 /* Types.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = Types.cpp; path = lib/Driver/Types.cpp; sourceTree = ""; tabWidth = 2; }; + DEDFE6490F7B3B830035BD10 /* Tools.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = Tools.h; path = lib/Driver/Tools.h; sourceTree = ""; tabWidth = 2; }; + DEDFE64A0F7B3B830035BD10 /* Tools.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = Tools.cpp; path = lib/Driver/Tools.cpp; sourceTree = ""; tabWidth = 2; }; + DEDFE64B0F7B3B830035BD10 /* ToolChains.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = ToolChains.h; path = lib/Driver/ToolChains.h; sourceTree = ""; tabWidth = 2; }; + DEDFE64C0F7B3B830035BD10 /* Compilation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = Compilation.cpp; path = lib/Driver/Compilation.cpp; sourceTree = ""; tabWidth = 2; }; + DEDFE64D0F7B3B830035BD10 /* ArgList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = ArgList.cpp; path = lib/Driver/ArgList.cpp; sourceTree = ""; tabWidth = 2; }; + DEDFE64E0F7B3B830035BD10 /* Arg.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = Arg.cpp; path = lib/Driver/Arg.cpp; sourceTree = ""; tabWidth = 2; }; + DEDFE64F0F7B3B830035BD10 /* Action.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = Action.cpp; path = lib/Driver/Action.cpp; sourceTree = ""; tabWidth = 2; }; + DEDFE6500F7B3B830035BD10 /* Phases.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = Phases.cpp; path = lib/Driver/Phases.cpp; sourceTree = ""; tabWidth = 2; }; + DEDFE6510F7B3B830035BD10 /* OptTable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = OptTable.cpp; path = lib/Driver/OptTable.cpp; sourceTree = ""; tabWidth = 2; }; + DEDFE6520F7B3B830035BD10 /* Option.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = Option.cpp; path = lib/Driver/Option.cpp; sourceTree = ""; tabWidth = 2; }; + DEDFE6530F7B3B830035BD10 /* Job.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = Job.cpp; path = lib/Driver/Job.cpp; sourceTree = ""; tabWidth = 2; }; + DEDFE6540F7B3B830035BD10 /* InputInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = InputInfo.h; path = lib/Driver/InputInfo.h; sourceTree = ""; tabWidth = 2; }; + DEDFE6550F7B3B830035BD10 /* ToolChains.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = ToolChains.cpp; path = lib/Driver/ToolChains.cpp; sourceTree = ""; tabWidth = 2; }; + DEDFE6560F7B3B830035BD10 /* ToolChain.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = ToolChain.cpp; path = lib/Driver/ToolChain.cpp; sourceTree = ""; tabWidth = 2; }; + DEDFE6570F7B3B830035BD10 /* Tool.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = Tool.cpp; path = lib/Driver/Tool.cpp; sourceTree = ""; tabWidth = 2; }; + DEDFE6580F7B3B830035BD10 /* HostInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = HostInfo.cpp; path = lib/Driver/HostInfo.cpp; sourceTree = ""; tabWidth = 2; }; + DEDFE6590F7B3B830035BD10 /* Driver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = Driver.cpp; path = lib/Driver/Driver.cpp; sourceTree = ""; tabWidth = 2; }; DEDFF87F0F848CE30035BD10 /* TemplateName.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = TemplateName.h; path = clang/AST/TemplateName.h; sourceTree = ""; tabWidth = 2; }; DEDFFF070F959EE60035BD10 /* Diagnostic.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Diagnostic.td; sourceTree = ""; }; DEDFFF530F9704580035BD10 /* DiagnosticGroups.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DiagnosticGroups.td; sourceTree = ""; }; @@ -841,7 +930,6 @@ DEF165150F8D46980098507F /* Types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Types.h; path = clang/Driver/Types.h; sourceTree = ""; }; DEF165160F8D46980098507F /* Action.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Action.h; path = clang/Driver/Action.h; sourceTree = ""; }; DEF165170F8D46980098507F /* Compilation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Compilation.h; path = clang/Driver/Compilation.h; sourceTree = ""; }; - DEF165180F8D46980098507F /* Options.def */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = Options.def; path = clang/Driver/Options.def; sourceTree = ""; }; DEF165190F8D46980098507F /* Option.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Option.h; path = clang/Driver/Option.h; sourceTree = ""; }; DEF1651A0F8D46980098507F /* Types.def */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = Types.def; path = clang/Driver/Types.def; sourceTree = ""; }; DEF1651B0F8D46980098507F /* ToolChain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ToolChain.h; path = clang/Driver/ToolChain.h; sourceTree = ""; }; @@ -880,6 +968,22 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + BFE2F6AC11DA955A0007EDC0 /* DeltaTree.o in Frameworks */, + BFE2F6AE11DA955A0007EDC0 /* FixItRewriter.o in Frameworks */, + BFE2F6B011DA955A0007EDC0 /* FrontendActions.o in Frameworks */, + BFE2F6B211DA955A0007EDC0 /* HTMLPrint.o in Frameworks */, + BFE2F6B411DA955A0007EDC0 /* HTMLRewrite.o in Frameworks */, + BFE2F6B611DA955A0007EDC0 /* RewriteMacros.o in Frameworks */, + BFE2F6B811DA955A0007EDC0 /* RewriteObjC.o in Frameworks */, + BFE2F6BA11DA955A0007EDC0 /* Rewriter.o in Frameworks */, + BFE2F6BC11DA955A0007EDC0 /* RewriteRope.o in Frameworks */, + BFE2F6BE11DA955A0007EDC0 /* RewriteTest.o in Frameworks */, + BFE2F6C011DA955A0007EDC0 /* TokenRewriter.o in Frameworks */, + BFE2F6C811DA955A0007EDC0 /* DeltaTree.o in Frameworks */, + BFE2F6CA11DA955A0007EDC0 /* HTMLRewrite.o in Frameworks */, + BFE2F6CC11DA955A0007EDC0 /* Rewriter.o in Frameworks */, + BFE2F6CE11DA955A0007EDC0 /* RewriteRope.o in Frameworks */, + BFE2F6D011DA955A0007EDC0 /* TokenRewriter.o in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -901,6 +1005,7 @@ 08FB7795FE84155DC02AAC07 /* Libraries */ = { isa = PBXGroup; children = ( + BFE2F67911DA95590007EDC0 /* Rewrite */, 90FD6D6C103C3D2D005F5B73 /* Index */, DED7D7500A5242C7003AD0FB /* Basic */, DED7D78C0A5242E6003AD0FB /* Lex */, @@ -1012,9 +1117,6 @@ 352246E50F5C6BE000D0D279 /* TextDiagnosticBuffer.cpp */, 352246E60F5C6BE000D0D279 /* TextDiagnosticPrinter.cpp */, 1ACB57E21105820D0047B991 /* TypeXML.cpp */, - 1A2A54B00FD1DD1C00F4CE45 /* RewriteMacros.cpp */, - 1A2A54B10FD1DD1C00F4CE45 /* RewriteObjC.cpp */, - 1A2A54B20FD1DD1C00F4CE45 /* RewriteTest.cpp */, 1A2A54B30FD1DD1C00F4CE45 /* StmtXML.cpp */, 1ACB57E31105820D0047B991 /* VerifyDiagnosticsClient.cpp */, 1A2A54B40FD1DD1C00F4CE45 /* Warnings.cpp */, @@ -1209,6 +1311,77 @@ name = "index-test"; sourceTree = ""; }; + BFE2F67911DA95590007EDC0 /* Rewrite */ = { + isa = PBXGroup; + children = ( + BFE2F67A11DA95590007EDC0 /* CMakeLists.txt */, + BFE2F67B11DA95590007EDC0 /* Debug */, + BFE2F69311DA955A0007EDC0 /* DeltaTree.cpp */, + BFE2F69411DA955A0007EDC0 /* FixItRewriter.cpp */, + BFE2F69511DA955A0007EDC0 /* FrontendActions.cpp */, + BFE2F69611DA955A0007EDC0 /* HTMLPrint.cpp */, + BFE2F69711DA955A0007EDC0 /* HTMLRewrite.cpp */, + BFE2F69811DA955A0007EDC0 /* Makefile */, + BFE2F69911DA955A0007EDC0 /* Release-Asserts */, + BFE2F6A511DA955A0007EDC0 /* RewriteMacros.cpp */, + BFE2F6A611DA955A0007EDC0 /* RewriteObjC.cpp */, + BFE2F6A711DA955A0007EDC0 /* Rewriter.cpp */, + BFE2F6A811DA955A0007EDC0 /* RewriteRope.cpp */, + BFE2F6A911DA955A0007EDC0 /* RewriteTest.cpp */, + BFE2F6AA11DA955A0007EDC0 /* TokenRewriter.cpp */, + ); + name = Rewrite; + path = lib/Rewrite; + sourceTree = ""; + }; + BFE2F67B11DA95590007EDC0 /* Debug */ = { + isa = PBXGroup; + children = ( + BFE2F67C11DA95590007EDC0 /* .dir */, + BFE2F67D11DA95590007EDC0 /* DeltaTree.d */, + BFE2F67E11DA955A0007EDC0 /* DeltaTree.o */, + BFE2F67F11DA955A0007EDC0 /* FixItRewriter.d */, + BFE2F68011DA955A0007EDC0 /* FixItRewriter.o */, + BFE2F68111DA955A0007EDC0 /* FrontendActions.d */, + BFE2F68211DA955A0007EDC0 /* FrontendActions.o */, + BFE2F68311DA955A0007EDC0 /* HTMLPrint.d */, + BFE2F68411DA955A0007EDC0 /* HTMLPrint.o */, + BFE2F68511DA955A0007EDC0 /* HTMLRewrite.d */, + BFE2F68611DA955A0007EDC0 /* HTMLRewrite.o */, + BFE2F68711DA955A0007EDC0 /* RewriteMacros.d */, + BFE2F68811DA955A0007EDC0 /* RewriteMacros.o */, + BFE2F68911DA955A0007EDC0 /* RewriteObjC.d */, + BFE2F68A11DA955A0007EDC0 /* RewriteObjC.o */, + BFE2F68B11DA955A0007EDC0 /* Rewriter.d */, + BFE2F68C11DA955A0007EDC0 /* Rewriter.o */, + BFE2F68D11DA955A0007EDC0 /* RewriteRope.d */, + BFE2F68E11DA955A0007EDC0 /* RewriteRope.o */, + BFE2F68F11DA955A0007EDC0 /* RewriteTest.d */, + BFE2F69011DA955A0007EDC0 /* RewriteTest.o */, + BFE2F69111DA955A0007EDC0 /* TokenRewriter.d */, + BFE2F69211DA955A0007EDC0 /* TokenRewriter.o */, + ); + path = Debug; + sourceTree = ""; + }; + BFE2F69911DA955A0007EDC0 /* Release-Asserts */ = { + isa = PBXGroup; + children = ( + BFE2F69A11DA955A0007EDC0 /* .dir */, + BFE2F69B11DA955A0007EDC0 /* DeltaTree.d */, + BFE2F69C11DA955A0007EDC0 /* DeltaTree.o */, + BFE2F69D11DA955A0007EDC0 /* HTMLRewrite.d */, + BFE2F69E11DA955A0007EDC0 /* HTMLRewrite.o */, + BFE2F69F11DA955A0007EDC0 /* Rewriter.d */, + BFE2F6A011DA955A0007EDC0 /* Rewriter.o */, + BFE2F6A111DA955A0007EDC0 /* RewriteRope.d */, + BFE2F6A211DA955A0007EDC0 /* RewriteRope.o */, + BFE2F6A311DA955A0007EDC0 /* TokenRewriter.d */, + BFE2F6A411DA955A0007EDC0 /* TokenRewriter.o */, + ); + path = "Release-Asserts"; + sourceTree = ""; + }; C6859E8C029090F304C91782 /* Documentation */ = { isa = PBXGroup; children = ( @@ -1722,14 +1895,17 @@ DEF165160F8D46980098507F /* Action.h */, DEF1651D0F8D46980098507F /* ArgList.h */, DEF1651E0F8D46980098507F /* Arg.h */, + 1AA1D35611BECFF70089CC3F /* CC1AsOptions.td */, + 1AA1D35711BECFF70089CC3F /* CC1Options.td */, DEF165170F8D46980098507F /* Compilation.h */, DEF165240F8D46980098507F /* DriverDiagnostic.h */, DEF165200F8D46980098507F /* Driver.h */, DEF1651F0F8D46980098507F /* HostInfo.h */, DEF165210F8D46980098507F /* Job.h */, - DEF165180F8D46980098507F /* Options.def */, DEF165190F8D46980098507F /* Option.h */, + 1AA1D35811BECFF70089CC3F /* Options.td */, DEF1651C0F8D46980098507F /* Options.h */, + 1AA1D35911BECFF70089CC3F /* OptParser.td */, DEF165230F8D46980098507F /* Phases.h */, DEF165140F8D46980098507F /* Tool.h */, DEF165150F8D46980098507F /* Types.h */, @@ -1966,9 +2142,6 @@ 1A2A54BD0FD1DD1C00F4CE45 /* HTMLPrint.cpp in Sources */, 1A2A54BE0FD1DD1C00F4CE45 /* PrintParserCallbacks.cpp in Sources */, 1A2A54BF0FD1DD1C00F4CE45 /* PrintPreprocessedOutput.cpp in Sources */, - 1A2A54C10FD1DD1C00F4CE45 /* RewriteMacros.cpp in Sources */, - 1A2A54C20FD1DD1C00F4CE45 /* RewriteObjC.cpp in Sources */, - 1A2A54C30FD1DD1C00F4CE45 /* RewriteTest.cpp in Sources */, 1A2A54C40FD1DD1C00F4CE45 /* StmtXML.cpp in Sources */, 1A2A54C50FD1DD1C00F4CE45 /* Warnings.cpp in Sources */, 1A6FE7090FD6F85800E00CA9 /* CGTemporaries.cpp in Sources */, @@ -2058,6 +2231,34 @@ 1ABD23F71182449800A48E65 /* Type.cpp in Sources */, 1ABD23F81182449800A48E65 /* TypeLoc.cpp in Sources */, 1ABD23F91182449800A48E65 /* TypePrinter.cpp in Sources */, + BFE2F6AB11DA955A0007EDC0 /* DeltaTree.d in Sources */, + BFE2F6AD11DA955A0007EDC0 /* FixItRewriter.d in Sources */, + BFE2F6AF11DA955A0007EDC0 /* FrontendActions.d in Sources */, + BFE2F6B111DA955A0007EDC0 /* HTMLPrint.d in Sources */, + BFE2F6B311DA955A0007EDC0 /* HTMLRewrite.d in Sources */, + BFE2F6B511DA955A0007EDC0 /* RewriteMacros.d in Sources */, + BFE2F6B711DA955A0007EDC0 /* RewriteObjC.d in Sources */, + BFE2F6B911DA955A0007EDC0 /* Rewriter.d in Sources */, + BFE2F6BB11DA955A0007EDC0 /* RewriteRope.d in Sources */, + BFE2F6BD11DA955A0007EDC0 /* RewriteTest.d in Sources */, + BFE2F6BF11DA955A0007EDC0 /* TokenRewriter.d in Sources */, + BFE2F6C111DA955A0007EDC0 /* DeltaTree.cpp in Sources */, + BFE2F6C211DA955A0007EDC0 /* FixItRewriter.cpp in Sources */, + BFE2F6C311DA955A0007EDC0 /* FrontendActions.cpp in Sources */, + BFE2F6C411DA955A0007EDC0 /* HTMLPrint.cpp in Sources */, + BFE2F6C511DA955A0007EDC0 /* HTMLRewrite.cpp in Sources */, + BFE2F6C611DA955A0007EDC0 /* Makefile in Sources */, + BFE2F6C711DA955A0007EDC0 /* DeltaTree.d in Sources */, + BFE2F6C911DA955A0007EDC0 /* HTMLRewrite.d in Sources */, + BFE2F6CB11DA955A0007EDC0 /* Rewriter.d in Sources */, + BFE2F6CD11DA955A0007EDC0 /* RewriteRope.d in Sources */, + BFE2F6CF11DA955A0007EDC0 /* TokenRewriter.d in Sources */, + BFE2F6D111DA955A0007EDC0 /* RewriteMacros.cpp in Sources */, + BFE2F6D211DA955A0007EDC0 /* RewriteObjC.cpp in Sources */, + BFE2F6D311DA955A0007EDC0 /* Rewriter.cpp in Sources */, + BFE2F6D411DA955A0007EDC0 /* RewriteRope.cpp in Sources */, + BFE2F6D511DA955A0007EDC0 /* RewriteTest.cpp in Sources */, + BFE2F6D611DA955A0007EDC0 /* TokenRewriter.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; Modified: vendor/clang/dist/docs/InternalsManual.html ============================================================================== --- vendor/clang/dist/docs/InternalsManual.html Tue Jul 13 17:21:15 2010 (r210007) +++ vendor/clang/dist/docs/InternalsManual.html Tue Jul 13 17:21:42 2010 (r210008) @@ -118,8 +118,8 @@ classes somewhere else, or introduce som

    The Clang Diagnostics subsystem is an important part of how the compiler communicates with the human. Diagnostics are the warnings and errors produced when the code is incorrect or dubious. In Clang, each diagnostic produced has -(at the minimum) a unique ID, a SourceLocation to -"put the caret", an English translation associated with it, and a severity (e.g. +(at the minimum) a unique ID, an English translation associated with it, a SourceLocation to "put the caret", and a severity (e.g. WARNING or ERROR). They can also optionally include a number of arguments to the dianostic (which fill in "%0"'s in the string) as well as a number of source ranges that related to the diagnostic.

    @@ -127,7 +127,7 @@ number of source ranges that related to

    In this section, we'll be giving examples produced by the Clang command line driver, but diagnostics can be rendered in many different ways depending on how the DiagnosticClient interface is -implemented. A representative example of a diagonstic is:

    +implemented. A representative example of a diagnostic is:

     t.c:38:15: error: invalid operands to binary expression ('int *' and '_Complex float')
    @@ -709,7 +709,7 @@ be the location of the "c" identifier.void* "AnnotationValue" - This contains an opaque object that the
     parser gets from Sema through an Actions module, it is passed around and Sema
    -intepretes it, based on the type of annotation token.
    +interprets it, based on the type of annotation token.
     
     
  • TokenKind "Kind" - This indicates the kind of Annotation token this is. See below for the different valid kinds.
  • Modified: vendor/clang/dist/docs/Makefile ============================================================================== --- vendor/clang/dist/docs/Makefile Tue Jul 13 17:21:15 2010 (r210007) +++ vendor/clang/dist/docs/Makefile Tue Jul 13 17:21:42 2010 (r210008) @@ -7,7 +7,7 @@ # ##===----------------------------------------------------------------------===## -LEVEL := ../../.. +CLANG_LEVEL := .. DIRS := tools ifdef BUILD_FOR_WEBSITE @@ -22,7 +22,7 @@ $(PROJ_OBJ_DIR)/doxygen.cfg: doxygen.cfg -e 's/@abs_top_builddir@/../g' > $@ endif -include $(LEVEL)/Makefile.common +include $(CLANG_LEVEL)/Makefile HTML := $(wildcard $(PROJ_SRC_DIR)/*.html) \ $(wildcard $(PROJ_SRC_DIR)/*.css) Modified: vendor/clang/dist/docs/PCHInternals.html ============================================================================== --- vendor/clang/dist/docs/PCHInternals.html Tue Jul 13 17:21:15 2010 (r210007) +++ vendor/clang/dist/docs/PCHInternals.html Tue Jul 13 17:21:42 2010 (r210008) @@ -144,6 +144,15 @@ deserialized from the precompiled header useful to determine whether the precompiled header implementation can be improved by making more of the implementation lazy.

    +

    Precompiled headers can be chained. When you create a PCH while +including an existing PCH, Clang can create the new PCH by referencing +the original file and only writing the new data to the new file. For +example, you could create a PCH out of all the headers that are very +commonly used throughout your project, and then create a PCH for every +single source file in the project that includes the code that is +specific to that file, so that recompiling the file itself is very fast, +without duplicating the data from the common headers for every file.

    +

    Precompiled Header Contents

    Precompiled header layout @@ -209,6 +218,27 @@ contents are verified along with the res +

    A chained PCH file (that is, one that references another PCH) has +a slightly different metadata block, which contains the following +information:

    + +
    +
    Referenced file
    +
    The name of the referenced PCH file. It is looked up like a file +specified using -include-pch.
    + +
    PCH version
    +
    This is the same as in normal PCH files.
    + +
    Original file name
    +
    The full path of the header that was used to generate this +precompiled header.
    + +
    + +

    The language options, target architecture and predefines buffer data +is taken from the end of the chain, since they have to match anyway.

    +

    Source Manager Block

    The source manager block contains the serialized representation of Modified: vendor/clang/dist/docs/UsersManual.html ============================================================================== --- vendor/clang/dist/docs/UsersManual.html Tue Jul 13 17:21:15 2010 (r210007) +++ vendor/clang/dist/docs/UsersManual.html Tue Jul 13 17:21:42 2010 (r210008) @@ -36,7 +36,7 @@ td {

    @@ -53,16 +53,6 @@ td {
  • Microsoft extensions
  • -
  • Objective-C Language Features - -
  • -
  • C++ Language Features -
  • -
  • Objective C++ Language Features -
  • Target-Specific Features and Limitations
    • CPU Architectures Features and Limitations @@ -261,12 +251,29 @@ when this is enabled, Clang will print s

      When this is disabled, Clang will just print:

      -  test.c:28:8: warning: extra tokens at end of #endif directive [-Wextra-tokens]
      +  test.c:28:8: warning: extra tokens at end of #endif directive [-Wextra-tokens]
      +  #endif bad
      +         ^
      +         //
       
      +
      -f[no-]color-diagnostics:
      +
      This option, which defaults to on when a color-capable terminal is + detected, controls whether or not Clang prints diagnostics in color. + When this option is enabled, Clang will use colors to highlight + specific parts of the diagnostic, e.g., + +
      +
      +
      ' +
      -f[no-]diagnostics-show-option: Enable [-Woption] information in diagnostic line.
      This option, which defaults to on, @@ -386,6 +393,66 @@ by commenting them out.

      and -Wbaz.

      + +
      -Wambiguous-member-template: +Warn about unqualified uses of a member template whose name resolves +to another template at the location of the use.
      +
      This option, which defaults to on, enables a warning in the +following code:

      + +
      +template<typename T> struct set{};
      +template<typename T> struct trait { typedef const T& type; };
      +struct Value {
      +  template<typename T> void set(typename trait<T>::type value) {}
      +};
      +void foo() {
      +  Value v;
      +  v.set<double>(3.2);
      +}
      +
      + +

      C++ [basic.lookup.classref] requires this to be an error, but, +because it's hard to work around, Clang downgrades it to a warning as +an extension.

      +
      + + +
      -Wbind-to-temporary-copy: Warn about +an unusable copy constructor when binding a reference to a temporary.
      +
      This option, which defaults to on, enables warnings about binding a +reference to a temporary when the temporary doesn't have a usable copy +constructor. For example:

      + +
      +  struct NonCopyable {
      +    NonCopyable();
      +  private:
      +    NonCopyable(const NonCopyable&);
      +  };
      +  void foo(const NonCopyable&);
      +  void bar() {
      +    foo(NonCopyable());  // Disallowed in C++98; allowed in C++0x.
      +  }
      +
      +
      +  struct NonCopyable2 {
      +    NonCopyable2();
      +    NonCopyable2(NonCopyable2&);
      +  };
      +  void foo(const NonCopyable2&);
      +  void bar() {
      +    foo(NonCopyable2());  // Disallowed in C++98; allowed in C++0x.
      +  }
      +
      + +

      Note that if NonCopyable2::NonCopyable2() has a default +argument whose instantiation produces a compile error, that error will +still be a hard error in C++98 mode even if this warning is turned +off.

      + +
      + @@ -717,11 +784,6 @@ extensions are not implemented yet:

      a relatively small feature, so it is likely to be implemented relatively soon.
    • -
    • clang does not support attributes on function pointers -(bug 2461). This is -a relatively important feature, so it is likely to be implemented relatively -soon.
    • -
    • clang does not support #pragma weak (bug 3679). Due to the uses described in the bug, this is likely to be implemented at some @@ -825,45 +887,6 @@ however where MSVC and GCC are incompati definition.
    • -

      Objective-C Language Features

      - - - - -

      Intentional Incompatibilities with GCC

      - - -

      No cast of super, no lvalue casts.

      - - - - -

      C++ Language Features

      - - -

      At this point, Clang C++ is not production-quality and is not recommended for use beyond experimentation. However, Clang C++ support -is under active development and is progressing rapidly. Please see the C++ Status page for details or -ask on the mailing list about how you can help.

      - -

      Note that released Clang compilers will refuse to even try to use clang to compile C++ code unless you pass the -ccc-clang-cxx option to the driver. To turn on Clang's C++ support, please pass that flag. Clang compilers built from the Subversion trunk enable C++ support by default, and do not require the -ccc-clang-cxx flag.

      - -

      Clang strives to strictly conform to the C++ standard. That means -it will reject invalid C++ code that another compiler may accept. If -Clang reports errors in your code, please check -the C++ -Compatibility page to see whether they are C++-conformance bugs -and how you can fix them.

      - - -

      Objective C++ Language Features

      - - -

      At this point, Clang C++ support is not generally useful (and therefore, -neither is Objective-C++). Please see the C++ section for -more information.

      - -

      Target-Specific Features and Limitations

      Modified: vendor/clang/dist/docs/tools/Makefile ============================================================================== --- vendor/clang/dist/docs/tools/Makefile Tue Jul 13 17:21:15 2010 (r210007) +++ vendor/clang/dist/docs/tools/Makefile Tue Jul 13 17:21:42 2010 (r210008) @@ -37,10 +37,11 @@ clean: else # Otherwise, if not in BUILD_FOR_WEBSITE mode, use the project info. -LEVEL := ../../../.. -include $(LEVEL)/Makefile.common +CLANG_LEVEL := ../.. +include $(CLANG_LEVEL)/Makefile -CLANG_VERSION := $(shell cat $(PROJ_SRC_DIR)/../../VER) +CLANG_VERSION := $(word 3,$(shell grep "CLANG_VERSION " \ + $(PROJ_OBJ_DIR)/$(CLANG_LEVEL)/include/clang/Basic/Version.inc)) SRC_DOC_DIR=$(PROJ_SRC_DIR)/ DST_HTML_DIR=$(PROJ_OBJ_DIR)/ Modified: vendor/clang/dist/examples/Makefile ============================================================================== --- vendor/clang/dist/examples/Makefile Tue Jul 13 17:21:15 2010 (r210007) +++ vendor/clang/dist/examples/Makefile Tue Jul 13 17:21:42 2010 (r210008) @@ -7,8 +7,8 @@ # ##===----------------------------------------------------------------------===## -LEVEL = ../../.. +CLANG_LEVEL := .. PARALLEL_DIRS := clang-interpreter PrintFunctionNames wpa -include $(LEVEL)/Makefile.common +include $(CLANG_LEVEL)/Makefile Modified: vendor/clang/dist/examples/PrintFunctionNames/CMakeLists.txt ============================================================================== --- vendor/clang/dist/examples/PrintFunctionNames/CMakeLists.txt Tue Jul 13 17:21:15 2010 (r210007) +++ vendor/clang/dist/examples/PrintFunctionNames/CMakeLists.txt Tue Jul 13 17:21:42 2010 (r210008) @@ -1,26 +1,10 @@ -set(SHARED_LIBRARY TRUE) +set(MODULE TRUE) set(LLVM_NO_RTTI 1) -set(LLVM_USED_LIBS - clangIndex - clangFrontend - clangDriver - clangSema - clangAnalysis - clangAST - clangParse - clangLex - clangBasic) - -set( LLVM_LINK_COMPONENTS - bitreader - mc - core - ) - add_clang_library(PrintFunctionNames PrintFunctionNames.cpp) set_target_properties(PrintFunctionNames PROPERTIES - LINKER_LANGUAGE CXX) + LINKER_LANGUAGE CXX + PREFIX "") Modified: vendor/clang/dist/examples/PrintFunctionNames/Makefile ============================================================================== --- vendor/clang/dist/examples/PrintFunctionNames/Makefile Tue Jul 13 17:21:15 2010 (r210007) +++ vendor/clang/dist/examples/PrintFunctionNames/Makefile Tue Jul 13 17:21:42 2010 (r210008) @@ -7,21 +7,13 @@ # ##===----------------------------------------------------------------------===## -LEVEL = ../../../.. +CLANG_LEVEL := ../.. LIBRARYNAME = PrintFunctionNames -CPPFLAGS += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include - -# Include this here so we can get the configuration of the targets that have -# been configured for construction. We have to do this early so we can set up -# LINK_COMPONENTS before including Makefile.rules -include $(LEVEL)/Makefile.config - LINK_LIBS_IN_SHARED = 1 SHARED_LIBRARY = 1 -LINK_COMPONENTS := bitreader mc core USEDLIBS = clangIndex.a clangFrontend.a clangDriver.a clangSema.a \ clangAnalysis.a clangAST.a clangParse.a clangLex.a clangBasic.a -include $(LEVEL)/Makefile.common +include $(CLANG_LEVEL)/Makefile Modified: vendor/clang/dist/examples/PrintFunctionNames/PrintFunctionNames.cpp ============================================================================== --- vendor/clang/dist/examples/PrintFunctionNames/PrintFunctionNames.cpp Tue Jul 13 17:21:15 2010 (r210007) +++ vendor/clang/dist/examples/PrintFunctionNames/PrintFunctionNames.cpp Tue Jul 13 17:21:42 2010 (r210008) @@ -31,11 +31,24 @@ public: } }; -class PrintFunctionNamesAction : public ASTFrontendAction { +class PrintFunctionNamesAction : public PluginASTAction { protected: ASTConsumer *CreateASTConsumer(CompilerInstance &CI, llvm::StringRef) { return new PrintFunctionsConsumer(); } + + bool ParseArgs(const std::vector& args) { + for (unsigned i=0; i Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 341DD106564A; Tue, 13 Jul 2010 17:24:31 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 227BA8FC0A; Tue, 13 Jul 2010 17:24:31 +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 o6DHOUXa003730; Tue, 13 Jul 2010 17:24:31 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DHOUac003728; Tue, 13 Jul 2010 17:24:30 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007131724.o6DHOUac003728@svn.freebsd.org> From: Warner Losh Date: Tue, 13 Jul 2010 17:24:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210009 - head/sys/mips/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 17:24:31 -0000 Author: imp Date: Tue Jul 13 17:24:30 2010 New Revision: 210009 URL: http://svn.freebsd.org/changeset/base/210009 Log: Define break value for ddb. Use int32/intptr casts for exception vector names. Define MIPS_SR_INT_MASK again Change MIPS_XKPHYS_CCA_* to MIPS_CCA_* since we can use them in many contexts Minor gratuitous whitespace churn Modified: head/sys/mips/include/cpuregs.h Modified: head/sys/mips/include/cpuregs.h ============================================================================== --- head/sys/mips/include/cpuregs.h Tue Jul 13 17:21:42 2010 (r210008) +++ head/sys/mips/include/cpuregs.h Tue Jul 13 17:24:30 2010 (r210009) @@ -81,7 +81,7 @@ #define MIPS_KSEG0_LARGEST_PHYS (0x20000000) #define MIPS_PHYS_MASK (0x1fffffff) -#if !defined(_LOCORE) +#ifndef LOCORE #define MIPS_KUSEG_START 0x00000000 #define MIPS_KSEG0_START ((intptr_t)(int32_t)0x80000000) #define MIPS_KSEG0_END ((intptr_t)(int32_t)0x9fffffff) @@ -91,9 +91,9 @@ #define MIPS_KSSEG_END ((intptr_t)(int32_t)0xdfffffff) #define MIPS_KSEG3_START ((intptr_t)(int32_t)0xe0000000) #define MIPS_KSEG3_END ((intptr_t)(int32_t)0xffffffff) - #define MIPS_KSEG2_START MIPS_KSSEG_START #define MIPS_KSEG2_END MIPS_KSSEG_END +#endif #define MIPS_PHYS_TO_KSEG0(x) ((uintptr_t)(x) | MIPS_KSEG0_START) #define MIPS_PHYS_TO_KSEG1(x) ((uintptr_t)(x) | MIPS_KSEG1_START) @@ -112,15 +112,15 @@ #define MIPS_XKPHYS_START 0x8000000000000000 #define MIPS_XKPHYS_END 0xbfffffffffffffff -#define MIPS_XKPHYS_CCA_UC 0x02 /* Uncached. */ -#define MIPS_XKPHYS_CCA_CNC 0x03 /* Cacheable non-coherent. */ +#define MIPS_CCA_UC 0x02 /* Uncached. */ +#define MIPS_CCA_CNC 0x03 /* Cacheable non-coherent. */ #define MIPS_PHYS_TO_XKPHYS(cca,x) \ ((0x2ULL << 62) | ((unsigned long long)(cca) << 59) | (x)) #define MIPS_PHYS_TO_XKPHYS_CACHED(x) \ - ((0x2ULL << 62) | ((unsigned long long)(MIPS_XKPHYS_CCA_CNC) << 59) | (x)) + ((0x2ULL << 62) | ((unsigned long long)(MIPS_CCA_CNC) << 59) | (x)) #define MIPS_PHYS_TO_XKPHYS_UNCACHED(x) \ - ((0x2ULL << 62) | ((unsigned long long)(MIPS_XKPHYS_CCA_UC) << 59) | (x)) + ((0x2ULL << 62) | ((unsigned long long)(MIPS_CCA_UC) << 59) | (x)) #define MIPS_XKPHYS_TO_PHYS(x) ((x) & 0x07ffffffffffffffULL) @@ -130,8 +130,6 @@ #define MIPS_XKSEG_START 0xc000000000000000 #define MIPS_XKSEG_END 0xc00000ff80000000 -#endif - /* CPU dependent mtc0 hazard hook */ #ifdef TARGET_OCTEON #define COP0_SYNC nop; nop; nop; nop; nop; @@ -197,7 +195,7 @@ #define MIPS_SR_INT_IE 0x00000001 /*#define MIPS_SR_MBZ 0x0f8000c0*/ /* Never used, true for r3k */ -/*#define MIPS_SR_INT_MASK 0x0000ff00*/ +#define MIPS_SR_INT_MASK 0x0000ff00 /* * The R2000/R3000-specific status register bit definitions. @@ -476,20 +474,20 @@ * * Common vectors: reset and UTLB miss. */ -#define MIPS_RESET_EXC_VEC 0xBFC00000 -#define MIPS_UTLB_MISS_EXC_VEC 0x80000000 +#define MIPS_RESET_EXC_VEC ((intptr_t)(int32_t)0xBFC00000) +#define MIPS_UTLB_MISS_EXC_VEC ((intptr_t)(int32_t)0x80000000) /* * MIPS-1 general exception vector (everything else) */ -#define MIPS1_GEN_EXC_VEC 0x80000080 +#define MIPS1_GEN_EXC_VEC ((intptr_t)(int32_t)0x80000080) /* * MIPS-III exception vectors */ -#define MIPS3_XTLB_MISS_EXC_VEC 0x80000080 -#define MIPS3_CACHE_ERR_EXC_VEC 0x80000100 -#define MIPS3_GEN_EXC_VEC 0x80000180 +#define MIPS3_XTLB_MISS_EXC_VEC ((intptr_t)(int32_t)0x80000080) +#define MIPS3_CACHE_ERR_EXC_VEC ((intptr_t)(int32_t)0x80000100) +#define MIPS3_GEN_EXC_VEC ((intptr_t)(int32_t)0x80000180) /* * TX79 (R5900) exception vectors @@ -643,6 +641,7 @@ #define MIPS_BREAK_SSTEP_VAL 513 #define MIPS_BREAK_BRKPT_VAL 514 #define MIPS_BREAK_SOVER_VAL 515 +#define MIPS_BREAK_DDB_VAL 516 #define MIPS_BREAK_KDB (MIPS_BREAK_INSTR | \ (MIPS_BREAK_KDB_VAL << MIPS_BREAK_VAL_SHIFT)) #define MIPS_BREAK_SSTEP (MIPS_BREAK_INSTR | \ @@ -651,6 +650,8 @@ (MIPS_BREAK_BRKPT_VAL << MIPS_BREAK_VAL_SHIFT)) #define MIPS_BREAK_SOVER (MIPS_BREAK_INSTR | \ (MIPS_BREAK_SOVER_VAL << MIPS_BREAK_VAL_SHIFT)) +#define MIPS_BREAK_DDB (MIPS_BREAK_INSTR | \ + (MIPS_BREAK_DDB_VAL << MIPS_BREAK_VAL_SHIFT)) /* * Mininum and maximum cache sizes. From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 19:27:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56923106566B; Tue, 13 Jul 2010 19:27:21 +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 45A7C8FC26; Tue, 13 Jul 2010 19:27:21 +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 o6DJRLG9032744; Tue, 13 Jul 2010 19:27:21 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DJRLBG032742; Tue, 13 Jul 2010 19:27:21 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201007131927.o6DJRLBG032742@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 13 Jul 2010 19:27:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210010 - head/sys/dev/bktr X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 19:27:21 -0000 Author: nwhitehorn Date: Tue Jul 13 19:27:20 2010 New Revision: 210010 URL: http://svn.freebsd.org/changeset/base/210010 Log: Fix build on architectures where PAGE_SIZE is a long (sparc64, powerpc). Modified: head/sys/dev/bktr/bktr_core.c Modified: head/sys/dev/bktr/bktr_core.c ============================================================================== --- head/sys/dev/bktr/bktr_core.c Tue Jul 13 17:24:30 2010 (r210009) +++ head/sys/dev/bktr/bktr_core.c Tue Jul 13 19:27:20 2010 (r210010) @@ -538,7 +538,7 @@ bktr_store_address(unit, BKTR_MEM_BUF, if ( bootverbose ) { printf("%s: buffer size %d, addr %p\n", - bktr_name(bktr), BROOKTREE_ALLOC, + bktr_name(bktr), (int)BROOKTREE_ALLOC, (void *)(uintptr_t)vtophys(buf)); } @@ -1808,9 +1808,8 @@ video_ioctl( bktr_ptr_t bktr, int unit, bktr->bigbuf = buf; bktr->alloc_pages = temp; if (bootverbose) - printf( - "%s: ioctl: Allocating %d bytes\n", - bktr_name(bktr), temp*PAGE_SIZE); + printf("%s: ioctl: Allocating %d bytes\n", + bktr_name(bktr), (int)(temp*PAGE_SIZE)); } else error = ENOMEM; From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 19:33:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F5AB1065673; Tue, 13 Jul 2010 19:33:47 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3E52B8FC1A; Tue, 13 Jul 2010 19:33: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 o6DJXlJA034209; Tue, 13 Jul 2010 19:33:47 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DJXle1034207; Tue, 13 Jul 2010 19:33:47 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201007131933.o6DJXle1034207@svn.freebsd.org> From: Pyun YongHyeon Date: Tue, 13 Jul 2010 19:33:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210011 - head/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 19:33:47 -0000 Author: yongari Date: Tue Jul 13 19:33:46 2010 New Revision: 210011 URL: http://svn.freebsd.org/changeset/base/210011 Log: Make bge_stop_fw() static. While I'm here use ANSI function definitions. Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Tue Jul 13 19:27:20 2010 (r210010) +++ head/sys/dev/bge/if_bge.c Tue Jul 13 19:33:46 2010 (r210011) @@ -436,6 +436,7 @@ static int bge_poll(struct ifnet *ifp, e static void bge_sig_post_reset(struct bge_softc *, int); static void bge_sig_legacy(struct bge_softc *, int); static void bge_sig_pre_reset(struct bge_softc *, int); +static void bge_stop_fw(struct bge_softc *); static int bge_reset(struct bge_softc *); static void bge_link_upd(struct bge_softc *); @@ -1237,10 +1238,9 @@ bge_setvlan(struct bge_softc *sc) } static void -bge_sig_pre_reset(sc, type) - struct bge_softc *sc; - int type; +bge_sig_pre_reset(struct bge_softc *sc, int type) { + /* * Some chips don't like this so only do this if ASF is enabled */ @@ -1260,10 +1260,9 @@ bge_sig_pre_reset(sc, type) } static void -bge_sig_post_reset(sc, type) - struct bge_softc *sc; - int type; +bge_sig_post_reset(struct bge_softc *sc, int type) { + if (sc->bge_asf_mode & ASF_NEW_HANDSHAKE) { switch (type) { case BGE_RESET_START: @@ -1278,10 +1277,9 @@ bge_sig_post_reset(sc, type) } static void -bge_sig_legacy(sc, type) - struct bge_softc *sc; - int type; +bge_sig_legacy(struct bge_softc *sc, int type) { + if (sc->bge_asf_mode) { switch (type) { case BGE_RESET_START: @@ -1294,10 +1292,8 @@ bge_sig_legacy(sc, type) } } -void bge_stop_fw(struct bge_softc *); -void -bge_stop_fw(sc) - struct bge_softc *sc; +static void +bge_stop_fw(struct bge_softc *sc) { int i; From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 19:37:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF1AD1065676; Tue, 13 Jul 2010 19:37:45 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BD8D18FC16; Tue, 13 Jul 2010 19:37:45 +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 o6DJbj5P035093; Tue, 13 Jul 2010 19:37:45 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DJbjxk035090; Tue, 13 Jul 2010 19:37:45 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201007131937.o6DJbjxk035090@svn.freebsd.org> From: "George V. Neville-Neil" Date: Tue, 13 Jul 2010 19:37:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210012 - head/sys/dev/hwpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 19:37:45 -0000 Author: gnn Date: Tue Jul 13 19:37:45 2010 New Revision: 210012 URL: http://svn.freebsd.org/changeset/base/210012 Log: Fix a panic brought about by writing an MSR without a proper mask. All of the necessary wrmsr calls are now preceded by a rdmsr and we leave the reserved bits alone. Document the bits in the relevant registers for future reference. Tested by: mdf MFC after: 1 week Modified: head/sys/dev/hwpmc/hwpmc_core.c head/sys/dev/hwpmc/hwpmc_core.h Modified: head/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_core.c Tue Jul 13 19:33:46 2010 (r210011) +++ head/sys/dev/hwpmc/hwpmc_core.c Tue Jul 13 19:37:45 2010 (r210012) @@ -147,6 +147,7 @@ core_pcpu_fini(struct pmc_mdep *md, int int core_ri, n, npmc; struct pmc_cpu *pc; struct core_cpu *cc; + uint64_t msr = 0; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[core,%d] insane cpu number (%d)", __LINE__, cpu)); @@ -166,11 +167,14 @@ core_pcpu_fini(struct pmc_mdep *md, int npmc = md->pmd_classdep[PMC_MDEP_CLASS_INDEX_IAP].pcd_num; core_ri = md->pmd_classdep[PMC_MDEP_CLASS_INDEX_IAP].pcd_ri; - for (n = 0; n < npmc; n++) - wrmsr(IAP_EVSEL0 + n, 0); + for (n = 0; n < npmc; n++) { + msr = rdmsr(IAP_EVSEL0 + n); + wrmsr(IAP_EVSEL0 + n, msr & ~IAP_EVSEL_MASK); + } if (core_cputype != PMC_CPU_INTEL_CORE) { - wrmsr(IAF_CTRL, 0); + msr = rdmsr(IAF_CTRL); + wrmsr(IAF_CTRL, msr & ~IAF_CTRL_MASK); npmc += md->pmd_classdep[PMC_MDEP_CLASS_INDEX_IAF].pcd_num; } @@ -374,6 +378,7 @@ iaf_start_pmc(int cpu, int ri) { struct pmc *pm; struct core_cpu *iafc; + uint64_t msr = 0; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[core,%d] illegal CPU value %d", __LINE__, cpu)); @@ -387,12 +392,15 @@ iaf_start_pmc(int cpu, int ri) iafc->pc_iafctrl |= pm->pm_md.pm_iaf.pm_iaf_ctrl; - wrmsr(IAF_CTRL, iafc->pc_iafctrl); + msr = rdmsr(IAF_CTRL); + wrmsr(IAF_CTRL, msr | (iafc->pc_iafctrl & IAF_CTRL_MASK)); do { iafc->pc_resync = 0; iafc->pc_globalctrl |= (1ULL << (ri + IAF_OFFSET)); - wrmsr(IA_GLOBAL_CTRL, iafc->pc_globalctrl); + msr = rdmsr(IA_GLOBAL_CTRL); + wrmsr(IA_GLOBAL_CTRL, msr | (iafc->pc_globalctrl & + IAF_GLOBAL_CTRL_MASK)); } while (iafc->pc_resync != 0); PMCDBG(MDP,STA,1,"iafctrl=%x(%x) globalctrl=%jx(%jx)", @@ -407,6 +415,7 @@ iaf_stop_pmc(int cpu, int ri) { uint32_t fc; struct core_cpu *iafc; + uint64_t msr = 0; PMCDBG(MDP,STO,1,"iaf-stop cpu=%d ri=%d", cpu, ri); @@ -425,12 +434,15 @@ iaf_stop_pmc(int cpu, int ri) iafc->pc_iafctrl &= ~fc; PMCDBG(MDP,STO,1,"iaf-stop iafctrl=%x", iafc->pc_iafctrl); - wrmsr(IAF_CTRL, iafc->pc_iafctrl); + msr = rdmsr(IAF_CTRL); + wrmsr(IAF_CTRL, msr | (iafc->pc_iafctrl & IAF_CTRL_MASK)); do { iafc->pc_resync = 0; iafc->pc_globalctrl &= ~(1ULL << (ri + IAF_OFFSET)); - wrmsr(IA_GLOBAL_CTRL, iafc->pc_globalctrl); + msr = rdmsr(IA_GLOBAL_CTRL); + wrmsr(IA_GLOBAL_CTRL, msr | (iafc->pc_globalctrl & + IAF_GLOBAL_CTRL_MASK)); } while (iafc->pc_resync != 0); PMCDBG(MDP,STO,1,"iafctrl=%x(%x) globalctrl=%jx(%jx)", @@ -445,6 +457,7 @@ iaf_write_pmc(int cpu, int ri, pmc_value { struct core_cpu *cc; struct pmc *pm; + uint64_t msr; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[core,%d] illegal cpu value %d", __LINE__, cpu)); @@ -460,9 +473,11 @@ iaf_write_pmc(int cpu, int ri, pmc_value if (PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) v = iaf_reload_count_to_perfctr_value(v); - wrmsr(IAF_CTRL, 0); /* Turn off fixed counters */ - wrmsr(IAF_CTR0 + ri, v); - wrmsr(IAF_CTRL, cc->pc_iafctrl); + msr = rdmsr(IAF_CTRL); + wrmsr(IAF_CTRL, msr & ~IAF_CTRL_MASK); + wrmsr(IAF_CTR0 + ri, v & ((1ULL << core_iaf_width) - 1)); + msr = rdmsr(IAF_CTRL); + wrmsr(IAF_CTRL, msr | (cc->pc_iafctrl & IAF_CTRL_MASK)); PMCDBG(MDP,WRI,1, "iaf-write cpu=%d ri=%d msr=0x%x v=%jx iafctrl=%jx " "pmc=%jx", cpu, ri, IAF_RI_TO_MSR(ri), v, @@ -1879,6 +1894,7 @@ iap_stop_pmc(int cpu, int ri) { struct pmc *pm; struct core_cpu *cc; + uint64_t msr; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[core,%d] illegal cpu value %d", __LINE__, cpu)); @@ -1894,7 +1910,8 @@ iap_stop_pmc(int cpu, int ri) PMCDBG(MDP,STO,1, "iap-stop cpu=%d ri=%d", cpu, ri); - wrmsr(IAP_EVSEL0 + ri, 0); /* stop hw */ + msr = rdmsr(IAP_EVSEL0 + ri); + wrmsr(IAP_EVSEL0 + ri, msr & IAP_EVSEL_MASK); /* stop hw */ if (core_cputype == PMC_CPU_INTEL_CORE) return (0); @@ -1937,7 +1954,7 @@ iap_write_pmc(int cpu, int ri, pmc_value * a stopped state when the pcd_write() entry point is called. */ - wrmsr(IAP_PMC0 + ri, v); + wrmsr(IAP_PMC0 + ri, v & ((1ULL << core_iap_width) - 1)); return (0); } @@ -1987,6 +2004,7 @@ core_intr(int cpu, struct trapframe *tf) struct pmc *pm; struct core_cpu *cc; int error, found_interrupt, ri; + uint64_t msr = 0; PMCDBG(MDP,INT, 1, "cpu=%d tf=0x%p um=%d", cpu, (void *) tf, TRAPF_USERMODE(tf)); @@ -2018,7 +2036,8 @@ core_intr(int cpu, struct trapframe *tf) * Stop the counter, reload it but only restart it if * the PMC is not stalled. */ - wrmsr(IAP_EVSEL0 + ri, 0); + msr = rdmsr(IAP_EVSEL0 + ri); + wrmsr(IAP_EVSEL0 + ri, msr & ~IAP_EVSEL_MASK); wrmsr(IAP_PMC0 + ri, v); if (error) Modified: head/sys/dev/hwpmc/hwpmc_core.h ============================================================================== --- head/sys/dev/hwpmc/hwpmc_core.h Tue Jul 13 19:33:46 2010 (r210011) +++ head/sys/dev/hwpmc/hwpmc_core.h Tue Jul 13 19:37:45 2010 (r210012) @@ -67,20 +67,59 @@ struct pmc_md_iap_op_pmcallocate { /* * Fixed-function counters. */ + #define IAF_MASK 0xF +#define IAF_COUNTER_MASK 0x0000ffffffffffff #define IAF_CTR0 0x309 #define IAF_CTR1 0x30A #define IAF_CTR2 0x30B +/* + * The IAF_CTRL MSR is laid out in the following way. + * + * Bit Position Use + * 63 - 12 Reserved (do not touch) + * 11 Ctr 2 PMI + * 10 Reserved (do not touch) + * 9-8 Ctr 2 Enable + * 7 Ctr 1 PMI + * 6 Reserved (do not touch) + * 5-4 Ctr 1 Enable + * 3 Ctr 0 PMI + * 2 Reserved (do not touch) + * 1-0 Ctr 0 Enable (3: All Levels, 2: User, 1: OS, 0: Disable) + */ + #define IAF_OFFSET 32 #define IAF_CTRL 0x38D +#define IAF_CTRL_MASK 0x0000000000000bbb /* * Programmable counters. */ #define IAP_PMC0 0x0C1 + +/* + * IAP_EVSEL(n) is laid out in the following way. + * + * Bit Position Use + * 63-31 Reserved (do not touch) + * 31-24 Counter Mask + * 23 Invert + * 22 Enable + * 21 Reserved (do not touch) + * 20 APIC Interrupt Enable + * 19 Pin Control + * 18 Edge Detect + * 17 OS + * 16 User + * 15-8 Unit Mask + * 7-0 Event Select + */ + +#define IAP_EVSEL_MASK 0x00000000ffdfffff #define IAP_EVSEL0 0x186 /* @@ -90,6 +129,21 @@ struct pmc_md_iap_op_pmcallocate { #define IA_GLOBAL_STATUS 0x38E #define IA_GLOBAL_CTRL 0x38F + +/* + * IA_GLOBAL_CTRL is layed out in the following way. + * + * Bit Position Use + * 63-35 Reserved (do not touch) + * 34 IAF Counter 2 Enable + * 33 IAF Counter 1 Enable + * 32 IAF Counter 0 Enable + * 31-0 Depends on programmable counters + */ + +/* The mask is only for the fixed porttion of the register. */ +#define IAF_GLOBAL_CTRL_MASK 0x0000000700000000 + #define IA_GLOBAL_OVF_CTRL 0x390 #define IA_GLOBAL_STATUS_FLAG_CONDCHG (1ULL << 63) From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 19:39:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 38DED106566B; Tue, 13 Jul 2010 19:39:52 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0EA128FC0C; Tue, 13 Jul 2010 19:39:52 +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 o6DJdpH8035580; Tue, 13 Jul 2010 19:39:51 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DJdpjF035578; Tue, 13 Jul 2010 19:39:51 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201007131939.o6DJdpjF035578@svn.freebsd.org> From: Pyun YongHyeon Date: Tue, 13 Jul 2010 19:39:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210013 - head/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 19:39:52 -0000 Author: yongari Date: Tue Jul 13 19:39:51 2010 New Revision: 210013 URL: http://svn.freebsd.org/changeset/base/210013 Log: style. Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Tue Jul 13 19:37:45 2010 (r210012) +++ head/sys/dev/bge/if_bge.c Tue Jul 13 19:39:51 2010 (r210013) @@ -833,7 +833,7 @@ bge_miibus_writereg(device_t dev, int ph if (sc->bge_asicrev == BGE_ASICREV_BCM5906 && (reg == BRGPHY_MII_1000CTL || reg == BRGPHY_MII_AUXCTL)) - return(0); + return (0); /* Reading with autopolling on may trigger PCI errors */ autopoll = CSR_READ_4(sc, BGE_MI_MODE); @@ -3088,7 +3088,7 @@ bge_reset(struct bge_softc *sc) if (sc->bge_asicrev == BGE_ASICREV_BCM5752 || BGE_IS_5755_PLUS(sc)) { if (bootverbose) - device_printf(sc->bge_dev, "Disabling fastboot\n"); + device_printf(dev, "Disabling fastboot\n"); CSR_WRITE_4(sc, BGE_FASTBOOT_PC, 0x0); } @@ -3209,7 +3209,7 @@ bge_reset(struct bge_softc *sc) DELAY(100); } if (i == BGE_TIMEOUT) { - device_printf(sc->bge_dev, "reset timed out\n"); + device_printf(dev, "reset timed out\n"); return (1); } } else { @@ -3227,8 +3227,9 @@ bge_reset(struct bge_softc *sc) } if ((sc->bge_flags & BGE_FLAG_EADDR) && i == BGE_TIMEOUT) - device_printf(sc->bge_dev, "firmware handshake timed out, " - "found 0x%08x\n", val); + device_printf(dev, + "firmware handshake timed out, found 0x%08x\n", + val); } /* @@ -3280,7 +3281,7 @@ bge_reset(struct bge_softc *sc) } DELAY(10000); - return(0); + return (0); } static __inline void @@ -4268,7 +4269,8 @@ bge_init_locked(struct bge_softc *sc) if (ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN + ETHER_VLAN_ENCAP_LEN > (MCLBYTES - ETHER_ALIGN)) { if (bge_init_rx_ring_jumbo(sc) != 0) { - device_printf(sc->bge_dev, "no memory for std Rx buffers.\n"); + device_printf(sc->bge_dev, + "no memory for std Rx buffers.\n"); bge_stop(sc); return; } From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 19:42:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7AD64106566B; Tue, 13 Jul 2010 19:42:55 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6A3E78FC0A; Tue, 13 Jul 2010 19:42:55 +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 o6DJgtTg036401; Tue, 13 Jul 2010 19:42:55 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DJgt6l036399; Tue, 13 Jul 2010 19:42:55 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201007131942.o6DJgt6l036399@svn.freebsd.org> From: Pyun YongHyeon Date: Tue, 13 Jul 2010 19:42:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210014 - head/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 19:42:55 -0000 Author: yongari Date: Tue Jul 13 19:42:55 2010 New Revision: 210014 URL: http://svn.freebsd.org/changeset/base/210014 Log: Fix error message for jumbo buffer allocation failure. Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Tue Jul 13 19:39:51 2010 (r210013) +++ head/sys/dev/bge/if_bge.c Tue Jul 13 19:42:55 2010 (r210014) @@ -4270,7 +4270,7 @@ bge_init_locked(struct bge_softc *sc) (MCLBYTES - ETHER_ALIGN)) { if (bge_init_rx_ring_jumbo(sc) != 0) { device_printf(sc->bge_dev, - "no memory for std Rx buffers.\n"); + "no memory for jumbo Rx buffers.\n"); bge_stop(sc); return; } From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 19:45:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E46631065673; Tue, 13 Jul 2010 19:45:40 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D3B0B8FC1D; Tue, 13 Jul 2010 19:45:40 +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 o6DJjeYd037291; Tue, 13 Jul 2010 19:45:40 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DJjetO037289; Tue, 13 Jul 2010 19:45:40 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201007131945.o6DJjetO037289@svn.freebsd.org> From: Pyun YongHyeon Date: Tue, 13 Jul 2010 19:45:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210015 - head/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 19:45:41 -0000 Author: yongari Date: Tue Jul 13 19:45:40 2010 New Revision: 210015 URL: http://svn.freebsd.org/changeset/base/210015 Log: Prefer PCIR_BAR macro over BGE_PCI_BAR0. Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Tue Jul 13 19:42:55 2010 (r210014) +++ head/sys/dev/bge/if_bge.c Tue Jul 13 19:45:40 2010 (r210015) @@ -2533,7 +2533,7 @@ bge_attach(device_t dev) */ pci_enable_busmaster(dev); - rid = BGE_PCI_BAR0; + rid = PCIR_BAR(0); sc->bge_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); @@ -3044,7 +3044,7 @@ bge_release_resources(struct bge_softc * if (sc->bge_res != NULL) bus_release_resource(dev, SYS_RES_MEMORY, - BGE_PCI_BAR0, sc->bge_res); + PCIR_BAR(0), sc->bge_res); if (sc->bge_ifp != NULL) if_free(sc->bge_ifp); From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 19:48:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B76DA106564A; Tue, 13 Jul 2010 19:48:20 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A5E148FC0C; Tue, 13 Jul 2010 19:48:20 +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 o6DJmKil038157; Tue, 13 Jul 2010 19:48:20 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DJmKnY038155; Tue, 13 Jul 2010 19:48:20 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007131948.o6DJmKnY038155@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 13 Jul 2010 19:48:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210016 - head/sys/dev/fb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 19:48:20 -0000 Author: jkim Date: Tue Jul 13 19:48:20 2010 New Revision: 210016 URL: http://svn.freebsd.org/changeset/base/210016 Log: Preallocate buffers for palette and state. Do not save DAC registers as we reset DAC mode and restore palette data while we are resuming always. Modified: head/sys/dev/fb/vesa.c Modified: head/sys/dev/fb/vesa.c ============================================================================== --- head/sys/dev/fb/vesa.c Tue Jul 13 19:45:40 2010 (r210015) +++ head/sys/dev/fb/vesa.c Tue Jul 13 19:48:20 2010 (r210016) @@ -73,9 +73,16 @@ struct adp_state { }; typedef struct adp_state adp_state_t; +static void *vesa_state_buf = NULL; +static uint32_t vesa_state_buf_offs = 0; +static ssize_t vesa_state_buf_size = 0; + +static u_char *vesa_palette = NULL; +static uint32_t vesa_palette_offs = 0; +#define VESA_PALETTE_SIZE (256 * 4) + /* VESA video adapter */ static video_adapter_t *vesa_adp = NULL; -static ssize_t vesa_state_buf_size = -1; /* VESA functions */ #if 0 @@ -188,7 +195,7 @@ static int vesa_bios_load_palette2(int s #define STATE_MOST (STATE_HW | STATE_DATA | STATE_REG) #define STATE_ALL (STATE_HW | STATE_DATA | STATE_DAC | STATE_REG) static ssize_t vesa_bios_state_buf_size(void); -static int vesa_bios_save_restore(int code, void *p, size_t size); +static int vesa_bios_save_restore(int code, void *p); #ifdef MODE_TABLE_BROKEN static int vesa_bios_get_line_length(void); #endif @@ -363,37 +370,28 @@ static int vesa_bios_save_palette(int start, int colors, u_char *palette, int bits) { x86regs_t regs; - uint32_t offs; - u_char *p; int i; - p = (u_char *)x86bios_alloc(&offs, colors * 4, M_NOWAIT); - if (p == NULL) - return (1); - x86bios_init_regs(®s); regs.R_AX = 0x4f09; regs.R_BL = 1; regs.R_CX = colors; regs.R_DX = start; - regs.R_ES = X86BIOS_PHYSTOSEG(offs); - regs.R_DI = X86BIOS_PHYSTOOFF(offs); + regs.R_ES = X86BIOS_PHYSTOSEG(vesa_palette_offs); + regs.R_DI = X86BIOS_PHYSTOOFF(vesa_palette_offs); x86bios_intr(®s, 0x10); - if (regs.R_AX != 0x004f) { - x86bios_free(p, colors * 4); + if (regs.R_AX != 0x004f) return (1); - } bits = 8 - bits; for (i = 0; i < colors; ++i) { - palette[i * 3] = p[i * 4 + 2] << bits; - palette[i * 3 + 1] = p[i * 4 + 1] << bits; - palette[i * 3 + 2] = p[i * 4] << bits; + palette[i * 3] = vesa_palette[i * 4 + 2] << bits; + palette[i * 3 + 1] = vesa_palette[i * 4 + 1] << bits; + palette[i * 3 + 2] = vesa_palette[i * 4] << bits; } - x86bios_free(p, colors * 4); return (0); } @@ -403,37 +401,28 @@ vesa_bios_save_palette2(int start, int c int bits) { x86regs_t regs; - uint32_t offs; - u_char *p; int i; - p = (u_char *)x86bios_alloc(&offs, colors * 4, M_NOWAIT); - if (p == NULL) - return (1); - x86bios_init_regs(®s); regs.R_AX = 0x4f09; regs.R_BL = 1; regs.R_CX = colors; regs.R_DX = start; - regs.R_ES = X86BIOS_PHYSTOSEG(offs); - regs.R_DI = X86BIOS_PHYSTOOFF(offs); + regs.R_ES = X86BIOS_PHYSTOSEG(vesa_palette_offs); + regs.R_DI = X86BIOS_PHYSTOOFF(vesa_palette_offs); x86bios_intr(®s, 0x10); - if (regs.R_AX != 0x004f) { - x86bios_free(p, colors * 4); + if (regs.R_AX != 0x004f) return (1); - } bits = 8 - bits; for (i = 0; i < colors; ++i) { - r[i] = p[i * 4 + 2] << bits; - g[i] = p[i * 4 + 1] << bits; - b[i] = p[i * 4] << bits; + r[i] = vesa_palette[i * 4 + 2] << bits; + g[i] = vesa_palette[i * 4 + 1] << bits; + b[i] = vesa_palette[i * 4] << bits; } - x86bios_free(p, colors * 4); return (0); } @@ -442,32 +431,25 @@ static int vesa_bios_load_palette(int start, int colors, u_char *palette, int bits) { x86regs_t regs; - uint32_t offs; - u_char *p; int i; - p = (u_char *)x86bios_alloc(&offs, colors * 4, M_NOWAIT); - if (p == NULL) - return (1); - x86bios_init_regs(®s); regs.R_AX = 0x4f09; /* regs.R_BL = 0; */ regs.R_CX = colors; regs.R_DX = start; - regs.R_ES = X86BIOS_PHYSTOSEG(offs); - regs.R_DI = X86BIOS_PHYSTOOFF(offs); + regs.R_ES = X86BIOS_PHYSTOSEG(vesa_palette_offs); + regs.R_DI = X86BIOS_PHYSTOOFF(vesa_palette_offs); bits = 8 - bits; for (i = 0; i < colors; ++i) { - p[i * 4] = palette[i * 3 + 2] >> bits; - p[i * 4 + 1] = palette[i * 3 + 1] >> bits; - p[i * 4 + 2] = palette[i * 3] >> bits; - p[i * 4 + 3] = 0; + vesa_palette[i * 4] = palette[i * 3 + 2] >> bits; + vesa_palette[i * 4 + 1] = palette[i * 3 + 1] >> bits; + vesa_palette[i * 4 + 2] = palette[i * 3] >> bits; + vesa_palette[i * 4 + 3] = 0; } x86bios_intr(®s, 0x10); - x86bios_free(p, colors * 4); return (regs.R_AX != 0x004f); } @@ -477,32 +459,25 @@ vesa_bios_load_palette2(int start, int c int bits) { x86regs_t regs; - uint32_t offs; - u_char *p; int i; - p = (u_char *)x86bios_alloc(&offs, colors * 4, M_NOWAIT); - if (p == NULL) - return (1); - x86bios_init_regs(®s); regs.R_AX = 0x4f09; /* regs.R_BL = 0; */ regs.R_CX = colors; regs.R_DX = start; - regs.R_ES = X86BIOS_PHYSTOSEG(offs); - regs.R_DI = X86BIOS_PHYSTOOFF(offs); + regs.R_ES = X86BIOS_PHYSTOSEG(vesa_palette_offs); + regs.R_DI = X86BIOS_PHYSTOOFF(vesa_palette_offs); bits = 8 - bits; for (i = 0; i < colors; ++i) { - p[i * 4] = b[i] >> bits; - p[i * 4 + 1] = g[i] >> bits; - p[i * 4 + 2] = r[i] >> bits; - p[i * 4 + 3] = 0; + vesa_palette[i * 4] = b[i] >> bits; + vesa_palette[i * 4 + 1] = g[i] >> bits; + vesa_palette[i * 4 + 2] = r[i] >> bits; + vesa_palette[i * 4 + 3] = 0; } x86bios_intr(®s, 0x10); - x86bios_free(p, colors * 4); return (regs.R_AX != 0x004f); } @@ -515,7 +490,7 @@ vesa_bios_state_buf_size(void) x86bios_init_regs(®s); regs.R_AX = 0x4f04; /* regs.R_DL = STATE_SIZE; */ - regs.R_CX = STATE_ALL; + regs.R_CX = STATE_MOST; x86bios_intr(®s, 0x10); @@ -526,38 +501,31 @@ vesa_bios_state_buf_size(void) } static int -vesa_bios_save_restore(int code, void *p, size_t size) +vesa_bios_save_restore(int code, void *p) { x86regs_t regs; - uint32_t offs; - void *buf; if (code != STATE_SAVE && code != STATE_LOAD) return (1); - buf = x86bios_alloc(&offs, size, M_NOWAIT); - if (buf == NULL) - return (1); - x86bios_init_regs(®s); regs.R_AX = 0x4f04; regs.R_DL = code; - regs.R_CX = STATE_ALL; + regs.R_CX = STATE_MOST; - regs.R_ES = X86BIOS_PHYSTOSEG(offs); - regs.R_BX = X86BIOS_PHYSTOOFF(offs); + regs.R_ES = X86BIOS_PHYSTOSEG(vesa_state_buf_offs); + regs.R_BX = X86BIOS_PHYSTOOFF(vesa_state_buf_offs); switch (code) { case STATE_SAVE: x86bios_intr(®s, 0x10); - bcopy(buf, p, size); + bcopy(vesa_state_buf, p, vesa_state_buf_size); break; case STATE_LOAD: - bcopy(p, buf, size); + bcopy(p, vesa_state_buf, vesa_state_buf_size); x86bios_intr(®s, 0x10); break; } - x86bios_free(buf, size); return (regs.R_AX != 0x004f); } @@ -1017,6 +985,15 @@ vesa_bios_init(void) goto fail; x86bios_free(vmbuf, sizeof(*buf)); + + vesa_palette = x86bios_alloc(&vesa_palette_offs, + VESA_PALETTE_SIZE + vesa_state_buf_size, M_WAITOK); + vesa_state_buf_size = vesa_bios_state_buf_size(); + if (vesa_state_buf_size > 0) { + vesa_state_buf = vesa_palette + VESA_PALETTE_SIZE; + vesa_state_buf_offs = vesa_palette_offs + VESA_PALETTE_SIZE; + } + return (0); fail: @@ -1414,20 +1391,16 @@ vesa_save_state(video_adapter_t *adp, vo if (adp != vesa_adp) return ((*prevvidsw->save_state)(adp, p, size)); - if (vesa_state_buf_size == -1) { - vesa_state_buf_size = vesa_bios_state_buf_size(); - if (vesa_state_buf_size == 0) - return (1); - } + if (vesa_state_buf_size == 0) + return (1); if (size == 0) return (offsetof(adp_state_t, regs) + vesa_state_buf_size); - else if (size < (offsetof(adp_state_t, regs) + vesa_state_buf_size)) + if (size < (offsetof(adp_state_t, regs) + vesa_state_buf_size)) return (1); ((adp_state_t *)p)->sig = V_STATE_SIG; bzero(((adp_state_t *)p)->regs, vesa_state_buf_size); - return (vesa_bios_save_restore(STATE_SAVE, ((adp_state_t *)p)->regs, - vesa_state_buf_size)); + return (vesa_bios_save_restore(STATE_SAVE, ((adp_state_t *)p)->regs)); } static int @@ -1437,7 +1410,7 @@ vesa_load_state(video_adapter_t *adp, vo if ((adp != vesa_adp) || (((adp_state_t *)p)->sig != V_STATE_SIG)) return ((*prevvidsw->load_state)(adp, p)); - if (vesa_state_buf_size <= 0) + if (vesa_state_buf_size == 0) return (1); /* Try BIOS POST to restore a sane state. */ @@ -1445,8 +1418,7 @@ vesa_load_state(video_adapter_t *adp, vo (void)int10_set_mode(adp->va_initial_bios_mode); (void)vesa_set_mode(adp, adp->va_mode); - return (vesa_bios_save_restore(STATE_LOAD, ((adp_state_t *)p)->regs, - vesa_state_buf_size)); + return (vesa_bios_save_restore(STATE_LOAD, ((adp_state_t *)p)->regs)); } #if 0 @@ -1892,6 +1864,9 @@ vesa_unload(void) free(vesa_revstr, M_DEVBUF); if (vesa_vmode != &vesa_vmode_empty) free(vesa_vmode, M_DEVBUF); + if (vesa_palette != NULL) + x86bios_free(vesa_palette, + VESA_PALETTE_SIZE + vesa_state_buf_size); return (error); } From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 19:58:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 637BA106566C; Tue, 13 Jul 2010 19:58:08 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5304C8FC2D; Tue, 13 Jul 2010 19:58:08 +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 o6DJw6EU040671; Tue, 13 Jul 2010 19:58:06 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DJw6g1040669; Tue, 13 Jul 2010 19:58:06 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007131958.o6DJw6g1040669@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 13 Jul 2010 19:58:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210017 - head/sys/dev/fb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 19:58:08 -0000 Author: jkim Date: Tue Jul 13 19:58:06 2010 New Revision: 210017 URL: http://svn.freebsd.org/changeset/base/210017 Log: Initialize a variable before its use. Modified: head/sys/dev/fb/vesa.c Modified: head/sys/dev/fb/vesa.c ============================================================================== --- head/sys/dev/fb/vesa.c Tue Jul 13 19:48:20 2010 (r210016) +++ head/sys/dev/fb/vesa.c Tue Jul 13 19:58:06 2010 (r210017) @@ -986,9 +986,9 @@ vesa_bios_init(void) x86bios_free(vmbuf, sizeof(*buf)); + vesa_state_buf_size = vesa_bios_state_buf_size(); vesa_palette = x86bios_alloc(&vesa_palette_offs, VESA_PALETTE_SIZE + vesa_state_buf_size, M_WAITOK); - vesa_state_buf_size = vesa_bios_state_buf_size(); if (vesa_state_buf_size > 0) { vesa_state_buf = vesa_palette + VESA_PALETTE_SIZE; vesa_state_buf_offs = vesa_palette_offs + VESA_PALETTE_SIZE; From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 20:09:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F30971065675; Tue, 13 Jul 2010 20:09:14 +0000 (UTC) (envelope-from remko@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E25498FC12; Tue, 13 Jul 2010 20:09:14 +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 o6DK9EHO043193; Tue, 13 Jul 2010 20:09:14 GMT (envelope-from remko@svn.freebsd.org) Received: (from remko@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DK9Ea9043191; Tue, 13 Jul 2010 20:09:14 GMT (envelope-from remko@svn.freebsd.org) Message-Id: <201007132009.o6DK9Ea9043191@svn.freebsd.org> From: Remko Lodder Date: Tue, 13 Jul 2010 20:09:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210018 - head/sys/dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 20:09:15 -0000 Author: remko Date: Tue Jul 13 20:09:14 2010 New Revision: 210018 URL: http://svn.freebsd.org/changeset/base/210018 Log: Add a 4 and 7 port USB hub from NEC. PR: 148189 MFC after: 1 week Modified: head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Tue Jul 13 19:58:06 2010 (r210017) +++ head/sys/dev/usb/usbdevs Tue Jul 13 20:09:14 2010 (r210018) @@ -2160,6 +2160,8 @@ product NATIONAL BEARPAW1200 0x1000 Bear product NATIONAL BEARPAW2400 0x1001 BearPaw 2400 /* NEC products */ +product NEC HUB_0050 0x0050 USB 2.0 7-Port Hub +product NEC HUB_005A 0x005a USB 2.0 4-Port Hub product NEC HUB 0x55aa hub product NEC HUB_B 0x55ab hub From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 20:13:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A9419106566C; Tue, 13 Jul 2010 20:13:38 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 94FD28FC16; Tue, 13 Jul 2010 20:13:38 +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 o6DKDcqS044204; Tue, 13 Jul 2010 20:13:38 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DKDcvS044195; Tue, 13 Jul 2010 20:13:38 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201007132013.o6DKDcvS044195@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Tue, 13 Jul 2010 20:13:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210019 - in stable/7: share/man/man4 sys/conf sys/modules/netgraph sys/modules/netgraph/patch sys/netgraph X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 20:13:38 -0000 Author: ae Date: Tue Jul 13 20:13:38 2010 New Revision: 210019 URL: http://svn.freebsd.org/changeset/base/210019 Log: MFC r208946: New netgraph node ng_patch(4). It performs data modification of packets passing through. Modifications are restricted to a subset of C language operations on unsigned integers of 8, 16, 32 or 64 bit size. These are: set to new value (=), addition (+=), subtraction (-=), multiplication (*=), division (/=), negation (= -), bitwise AND (&=), bitwise OR (|=), bitwise eXclusive OR (^=), shift left (<<=), shift right (>>=). Several operations are all applied to a packet sequentially in order they were specified by user. Submitted by: Maxim Ignatenko Vadim Goncharov Discussed with: net@ MFC r208947: Fix typo. MFC r208989: Style(9) fixes: * Sort includes * Replace #define to #define * Split declarations and initializations * Split long lines Requested by: kib MFC r209194: * Include sys/systm.h for KASSERT() * Remove unneeded includes and comment * Replace home made OFFSETOF() macro with standard offsetof() Pointed out by: bde Tested by: Vadim Goncharov Approved by: mav (mentor) Added: stable/7/share/man/man4/ng_patch.4 - copied unchanged from r208946, head/share/man/man4/ng_patch.4 stable/7/sys/modules/netgraph/patch/ - copied from r208946, head/sys/modules/netgraph/patch/ stable/7/sys/netgraph/ng_patch.c - copied, changed from r208946, head/sys/netgraph/ng_patch.c stable/7/sys/netgraph/ng_patch.h - copied, changed from r208946, head/sys/netgraph/ng_patch.h Modified: stable/7/share/man/man4/Makefile stable/7/sys/conf/NOTES stable/7/sys/conf/files stable/7/sys/conf/options stable/7/sys/modules/netgraph/Makefile Directory Properties: stable/7/share/man/man4/ (props changed) stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/share/man/man4/Makefile ============================================================================== --- stable/7/share/man/man4/Makefile Tue Jul 13 20:09:14 2010 (r210018) +++ stable/7/share/man/man4/Makefile Tue Jul 13 20:13:38 2010 (r210019) @@ -239,6 +239,7 @@ MAN= aac.4 \ ng_nat.4 \ ng_netflow.4 \ ng_one2many.4 \ + ng_patch.4 \ ng_ppp.4 \ ng_pppoe.4 \ ng_pptpgre.4 \ Copied: stable/7/share/man/man4/ng_patch.4 (from r208946, head/share/man/man4/ng_patch.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/share/man/man4/ng_patch.4 Tue Jul 13 20:13:38 2010 (r210019, copy of r208946, head/share/man/man4/ng_patch.4) @@ -0,0 +1,235 @@ +.\" Copyright (c) 2010 Maxim Ignatenko +.\" Copyright (c) 2010 Vadim Goncharov +.\" 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. +.\" +.\" $FreeBSD$ +.\" +.Dd June 9, 2010 +.Dt NG_PATCH 4 +.Os +.Sh NAME +.Nm ng_patch +.Nd "trivial mbuf data modifying netgraph node type" +.Sh SYNOPSIS +.In netgraph/ng_patch.h +.Sh DESCRIPTION +The +.Nm patch +node performs data modification of packets passing through it. +Modifications are restricted to a subset of C language operations +on unsigned integers of 8, 16, 32 or 64 bit size. +These are: set to new value (=), addition (+=), subtraction (-=), +multiplication (*=), division (/=), negation (= -), +bitwise AND (&=), bitwise OR (|=), bitwise eXclusive OR (^=), +shift left (<<=), shift right (>>=). +A negation operation is the one exception: integer is treated as signed +and second operand (the +.Va value ) +is not used. +There may be several modification operations, they are all applied +to a packet sequentially in order they were specified by user. +Data payload of packet is viewed as array of bytes, with zero offset +corresponding to the very first byte of packet headers, and +.Va length +bytes beginning from +.Va offset +are taken as a single integer in network byte order. +.Sh HOOKS +This node type has two hooks: +.Bl -tag -width indent +.It Va in +Packets received on this hook are modified according to rules specified +in config and then forwarded to +.Ar out +hook, if it exists and connected. +Otherwise they are reflected back to the +.Ar in +hook. +.It Va out +Packets received on this hook are forwarded to +.Ar in +hook without any changes. +.El +.Sh CONTROL MESSAGES +This node type supports the generic control messages, plus the following: +.Bl -tag -width indent +.It Dv NGM_PATCH_SETCONFIG Pq Li setconfig +This command sets the sequence of modify operations +that will be applied to incoming data on a hook. +The following +.Vt "struct ng_patch_config" +must be supplied as an argument: +.Bd -literal -offset 4n +struct ng_patch_op { + uint64_t value; + uint32_t offset; + uint16_t length; /* 1,2,4 or 8 bytes */ + uint16_t mode; +}; +/* Patching modes */ +#define NG_PATCH_MODE_SET 1 +#define NG_PATCH_MODE_ADD 2 +#define NG_PATCH_MODE_SUB 3 +#define NG_PATCH_MODE_MUL 4 +#define NG_PATCH_MODE_DIV 5 +#define NG_PATCH_MODE_NEG 6 +#define NG_PATCH_MODE_AND 7 +#define NG_PATCH_MODE_OR 8 +#define NG_PATCH_MODE_XOR 9 +#define NG_PATCH_MODE_SHL 10 +#define NG_PATCH_MODE_SHR 11 + +struct ng_patch_config { + uint32_t count; + uint32_t csum_flags; + struct ng_patch_op ops[]; +}; +.Ed +.Pp +The +.Va csum_flags +can be set to any combination of CSUM_IP, CSUM_TCP, CSUM_SCTP and CSUM_UDP +(other values are ignored) for instructing the IP stack to recalculate the +corresponding checksum before transmitting packet on output interface. +The +.Nm +node does not do any checksum correction by itself. +.It Dv NGM_PATCH_GETCONFIG Pq Li getconfig +This control message obtains current set of modify operations, +returned as +.Vt "struct ng_patch_config" . +.It Dv NGM_PATCH_GET_STATS Pq Li getstats +Returns node statistics as a +.Vt "struct ng_patch_stats" . +.It Dv NGM_PATCH_CLR_STATS Pq Li clrstats +Clear node statistics. +.It Dv NGM_PATCH_GETCLR_STATS Pq Li getclrstats +This command is identical to +.Dv NGM_PATCH_GET_STATS , +except that the statistics are also atomically cleared. +.El +.Sh SHUTDOWN +This node shuts down upon receipt of a +.Dv NGM_SHUTDOWN +control message, or when all hooks have been disconnected. +.Sh EXAMPLES +The +.Nm +node allows to modify TTL and TOS/DSCP fields in IP packets. +Suppose you have two adjacent simplex links to remote network +(e.g.\& satellite), so that the packets expiring in between +will generate unwanted ICMP-replies which have to go forth, not back. +Thus you need to raise TTL of every packet entering link link by 2 +to ensure the TTL will not reach zero there. +So you setup +.Xr ipfw 8 +rule with +.Cm netgraph +action to inject packets going to other end of simplex link by the +following +.Xr ngctl 8 +script: +.Bd -literal -offset 4n +/usr/sbin/ngctl -f- <<-SEQ + mkpeer ipfw: patch 200 in + name ipfw:200 ttl_add + msg ttl_add: setconfig { count=1 csum_flags=1 ops=[ \e + { mode=2 value=3 length=1 offset=8 } ] } +SEQ +/sbin/ipfw add 150 netgraph 200 ip from any to simplex.remote.net +.Ed +.Pp +Here +.Dq Li ttl_add +node of type +.Nm +configured to add (mode +.Dv NG_PATCH_MODE_ADD ) +a +.Va value +of 3 to a one-byte TTL field, which is 9th byte of IP packet header. +.Pp +Another example would be two consecutive modifications of packet TOS +field: say, you need to clear the +.Dv IPTOS_THROUGHPUT +bit and set the +.Dv IPTOS_MINCOST +bit. +So you do: +.Bd -literal -offset 4n +/usr/sbin/ngctl -f- <<-SEQ + mkpeer ipfw: patch 300 in + name ipfw:300 tos_chg + msg tos_chg: setconfig { count=2 csum_flags=1 ops=[ \e + { mode=7 value=0xf7 length=1 offset=1 } \e + { mode=8 value=0x02 length=1 offset=1 } ] } +SEQ +/sbin/ipfw add 160 netgraph 600 ip from any to any not dst-port 80 +.Ed +.Pp +This first does +.Dv NG_PATCH_MODE_AND +clearing the fourth bit and then +.Dv NG_PATCH_MODE_OR +setting the third bit. +.Pp +In both examples the +.Va csum_flags +field indicates that IP checksum (but not TCP or UDP checksum) should be +recalculated before transmit. +.Pp +Note: one should ensure that packets are returned to ipfw after processing +inside +.Xr netgraph 4 , +by setting appropriate +.Xr sysctl 8 +variable: +.Bd -literal -offset 4n +sysctl net.inet.ip.fw.one_pass=0 +.Ed +.Sh SEE ALSO +.Xr netgraph 4 , +.Xr ng_ipfw 4 , +.Xr ngctl 8 +.Sh HISTORY +The +.Nm +node type was implemented in +.Fx 8.1 . +.Sh AUTHORS +.An "Maxim Ignatenko" Aq gelraen.ua@gmail.com . +This manual page was written by +.An "Vadim Goncharov" Aq vadimnuclight@tpu.ru . +.Sh BUGS +Node blindly tries to apply every patching operation to each packet +(except those which offset if greater than length of the packet), +so be sure that you supply only the right packets to it (e.g. changing +bytes in the ARP packets meant to be in IP header could corrupt +them and make your machine unreachable from the network). +.Pp +.Em !!! WARNING !!! +.Pp +Output path of the IP stack assumes correct fields and lengths in the +packets - changing them by mistake to incorrect values can cause +unpredictable results including kernel panics. Modified: stable/7/sys/conf/NOTES ============================================================================== --- stable/7/sys/conf/NOTES Tue Jul 13 20:09:14 2010 (r210018) +++ stable/7/sys/conf/NOTES Tue Jul 13 20:13:38 2010 (r210019) @@ -678,6 +678,7 @@ options NETGRAPH_MPPC_ENCRYPTION options NETGRAPH_NETFLOW options NETGRAPH_NAT options NETGRAPH_ONE2MANY +options NETGRAPH_PATCH options NETGRAPH_PPP options NETGRAPH_PPPOE options NETGRAPH_PPTPGRE Modified: stable/7/sys/conf/files ============================================================================== --- stable/7/sys/conf/files Tue Jul 13 20:09:14 2010 (r210018) +++ stable/7/sys/conf/files Tue Jul 13 20:13:38 2010 (r210019) @@ -1934,6 +1934,7 @@ netgraph/ng_mppc.c optional netgraph_mp netgraph/ng_nat.c optional netgraph_nat netgraph/ng_one2many.c optional netgraph_one2many netgraph/ng_parse.c optional netgraph +netgraph/ng_patch.c optional netgraph_patch netgraph/ng_ppp.c optional netgraph_ppp netgraph/ng_pppoe.c optional netgraph_pppoe netgraph/ng_pptpgre.c optional netgraph_pptpgre Modified: stable/7/sys/conf/options ============================================================================== --- stable/7/sys/conf/options Tue Jul 13 20:09:14 2010 (r210018) +++ stable/7/sys/conf/options Tue Jul 13 20:13:38 2010 (r210019) @@ -464,6 +464,7 @@ NETGRAPH_MPPC_ENCRYPTION opt_netgraph.h NETGRAPH_NAT opt_netgraph.h NETGRAPH_NETFLOW opt_netgraph.h NETGRAPH_ONE2MANY opt_netgraph.h +NETGRAPH_PATCH opt_netgraph.h NETGRAPH_PPP opt_netgraph.h NETGRAPH_PPPOE opt_netgraph.h NETGRAPH_PPTPGRE opt_netgraph.h Modified: stable/7/sys/modules/netgraph/Makefile ============================================================================== --- stable/7/sys/modules/netgraph/Makefile Tue Jul 13 20:09:14 2010 (r210018) +++ stable/7/sys/modules/netgraph/Makefile Tue Jul 13 20:13:38 2010 (r210019) @@ -34,6 +34,7 @@ SUBDIR= async \ netflow \ netgraph \ one2many \ + patch \ ppp \ pppoe \ pptpgre \ Copied and modified: stable/7/sys/netgraph/ng_patch.c (from r208946, head/sys/netgraph/ng_patch.c) ============================================================================== --- head/sys/netgraph/ng_patch.c Wed Jun 9 12:25:57 2010 (r208946, copy source) +++ stable/7/sys/netgraph/ng_patch.c Tue Jul 13 20:13:38 2010 (r210019) @@ -29,12 +29,11 @@ __FBSDID("$FreeBSD$"); #include +#include #include -#include +#include #include -#include -#include -#include /* be64toh(), htobe64() */ +#include #include #include #include @@ -47,16 +46,14 @@ static ng_newhook_t ng_patch_newhook; static ng_rcvdata_t ng_patch_rcvdata; static ng_disconnect_t ng_patch_disconnect; -#define OFFSETOF(s, e) ((char *)&((s *)0)->e - (char *)((s *)0)) - static int -ng_patch_config_getlen(const struct ng_parse_type *type, const u_char *start, - const u_char *buf) +ng_patch_config_getlen(const struct ng_parse_type *type, + const u_char *start, const u_char *buf) { const struct ng_patch_config *p; p = (const struct ng_patch_config *)(buf - - OFFSETOF(struct ng_patch_config, ops)); + offsetof(struct ng_patch_config, ops)); return (p->count); } @@ -158,7 +155,7 @@ struct ng_patch_priv { }; typedef struct ng_patch_priv *priv_p; -#define NG_PATCH_CONF_SIZE(count) (sizeof(struct ng_patch_config) + \ +#define NG_PATCH_CONF_SIZE(count) (sizeof(struct ng_patch_config) + \ (count) * sizeof(struct ng_patch_op)) static void do_patch(priv_p conf, struct mbuf *m); @@ -195,12 +192,14 @@ static int ng_patch_rcvmsg(node_p node, item_p item, hook_p lasthook) { const priv_p privp = NG_NODE_PRIVATE(node); - struct ng_patch_config *conf; + struct ng_patch_config *conf, *newconf; + union patch_val *newval; struct ng_mesg *msg; - struct ng_mesg *resp = NULL; - int i, clear = 0; - int error = 0; + struct ng_mesg *resp; + int i, clear, error; + clear = error = 0; + resp = NULL; NGI_GET_MSG(item, msg); switch (msg->header.typecookie) { case NGM_PATCH_COOKIE: @@ -215,16 +214,15 @@ ng_patch_rcvmsg(node_p node, item_p item break; case NGM_PATCH_SETCONFIG: { - struct ng_patch_config *newconf; - union patch_val *newval; - - if (msg->header.arglen < sizeof(struct ng_patch_config)) { + if (msg->header.arglen < + sizeof(struct ng_patch_config)) { error = EINVAL; break; } conf = (struct ng_patch_config *)msg->data; - if (msg->header.arglen < NG_PATCH_CONF_SIZE(conf->count)) { + if (msg->header.arglen < + NG_PATCH_CONF_SIZE(conf->count)) { error = EINVAL; break; } @@ -248,27 +246,34 @@ ng_patch_rcvmsg(node_p node, item_p item CSUM_SCTP; if (error == 0) { - newconf = malloc(NG_PATCH_CONF_SIZE(conf->count), - M_NETGRAPH, M_WAIT); - newval = malloc(conf->count * sizeof(union patch_val), + newconf = malloc( + NG_PATCH_CONF_SIZE(conf->count), M_NETGRAPH, M_WAIT); + newval = malloc(conf->count * + sizeof(union patch_val), M_NETGRAPH, + M_WAIT); for(i = 0; i < conf->count; i++) { switch (conf->ops[i].length) { case 1: - newval[i].v1 = conf->ops[i].value; + newval[i].v1 = + conf->ops[i].value; break; case 2: - newval[i].v2 = conf->ops[i].value; + newval[i].v2 = + conf->ops[i].value; break; case 4: - newval[i].v4 = conf->ops[i].value; + newval[i].v4 = + conf->ops[i].value; break; case 8: - newval[i].v8 = conf->ops[i].value; + newval[i].v8 = + conf->ops[i].value; break; } } - bcopy(conf, newconf, NG_PATCH_CONF_SIZE(conf->count)); + bcopy(conf, newconf, + NG_PATCH_CONF_SIZE(conf->count)); if (privp->val != NULL) free(privp->val, M_NETGRAPH); privp->val = newval; @@ -310,12 +315,15 @@ ng_patch_rcvmsg(node_p node, item_p item static void do_patch(priv_p privp, struct mbuf *m) { - struct ng_patch_config *conf = privp->config; + struct ng_patch_config *conf; uint64_t buf; - int i, patched = 0; + int i, patched; + conf = privp->config; + patched = 0; for(i = 0; i < conf->count; i++) { - if (conf->ops[i].offset + conf->ops[i].length > m->m_pkthdr.len) + if (conf->ops[i].offset + conf->ops[i].length > + m->m_pkthdr.len) continue; /* for "=" operation we don't need to copy data from mbuf */ @@ -323,7 +331,7 @@ do_patch(priv_p privp, struct mbuf *m) m_copydata(m, conf->ops[i].offset, conf->ops[i].length, (caddr_t)&buf); } - + switch (conf->ops[i].length) { case 1: switch (conf->ops[i].mode) { @@ -550,16 +558,17 @@ ng_patch_shutdown(node_p node) static int ng_patch_disconnect(hook_p hook) { - priv_p priv = NG_NODE_PRIVATE(NG_HOOK_NODE(hook)); + priv_p priv; + priv = NG_NODE_PRIVATE(NG_HOOK_NODE(hook)); if (hook == priv->in) { priv->in = NULL; } if (hook == priv->out) { priv->out = NULL; } - if ((NG_NODE_NUMHOOKS(NG_HOOK_NODE(hook)) == 0) - && (NG_NODE_IS_VALID(NG_HOOK_NODE(hook)))) /* already shutting down? */ + if (NG_NODE_NUMHOOKS(NG_HOOK_NODE(hook)) == 0 && + NG_NODE_IS_VALID(NG_HOOK_NODE(hook))) /* already shutting down? */ ng_rmnode_self(NG_HOOK_NODE(hook)); return (0); } Copied and modified: stable/7/sys/netgraph/ng_patch.h (from r208946, head/sys/netgraph/ng_patch.h) ============================================================================== --- head/sys/netgraph/ng_patch.h Wed Jun 9 12:25:57 2010 (r208946, copy source) +++ stable/7/sys/netgraph/ng_patch.h Tue Jul 13 20:13:38 2010 (r210019) @@ -30,14 +30,14 @@ #define _NETGRAPH_NG_PATCH_H_ /* Node type name. */ -#define NG_PATCH_NODE_TYPE "patch" +#define NG_PATCH_NODE_TYPE "patch" /* Node type cookie. */ -#define NGM_PATCH_COOKIE 1262445509 +#define NGM_PATCH_COOKIE 1262445509 /* Hook names */ -#define NG_PATCH_HOOK_IN "in" -#define NG_PATCH_HOOK_OUT "out" +#define NG_PATCH_HOOK_IN "in" +#define NG_PATCH_HOOK_OUT "out" /* Netgraph commands understood by this node type */ enum { @@ -70,7 +70,7 @@ struct ng_patch_op { uint16_t mode; }; -#define NG_PATCH_OP_TYPE_INFO { \ +#define NG_PATCH_OP_TYPE_INFO { \ { "value", &ng_parse_uint64_type }, \ { "offset", &ng_parse_uint32_type }, \ { "length", &ng_parse_uint16_type }, \ @@ -84,7 +84,7 @@ struct ng_patch_config { struct ng_patch_op ops[]; }; -#define NG_PATCH_CONFIG_TYPE_INFO { \ +#define NG_PATCH_CONFIG_TYPE_INFO { \ { "count", &ng_parse_uint32_type }, \ { "csum_flags", &ng_parse_uint32_type }, \ { "ops", &ng_patch_confarr_type }, \ @@ -97,7 +97,7 @@ struct ng_patch_stats { uint64_t dropped; }; -#define NG_PATCH_STATS_TYPE_INFO { \ +#define NG_PATCH_STATS_TYPE_INFO { \ { "received", &ng_parse_uint64_type }, \ { "patched", &ng_parse_uint64_type }, \ { "dropped", &ng_parse_uint64_type }, \ From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 21:19:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F089106566B; Tue, 13 Jul 2010 21:19:59 +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 88FA78FC12; Tue, 13 Jul 2010 21:19:59 +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 o6DLJxGt058957; Tue, 13 Jul 2010 21:19:59 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DLJxUP058953; Tue, 13 Jul 2010 21:19:59 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201007132119.o6DLJxUP058953@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 13 Jul 2010 21:19:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210024 - in head: . include release X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 21:19:59 -0000 Author: nwhitehorn Date: Tue Jul 13 21:19:59 2010 New Revision: 210024 URL: http://svn.freebsd.org/changeset/base/210024 Log: Connect powerpc64 to the build. It is not presently part of make universe, which will be added soon. Reviewed by: imp Modified: head/Makefile.inc1 head/include/Makefile head/release/Makefile Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue Jul 13 21:15:18 2010 (r210023) +++ head/Makefile.inc1 Tue Jul 13 21:19:59 2010 (r210024) @@ -128,7 +128,7 @@ TARGET= ${TARGET_ARCH} TARGET?= ${MACHINE} TARGET_ARCH?= ${MACHINE_ARCH} -KNOWN_ARCHES?= amd64 arm i386 i386/pc98 ia64 mips powerpc sparc64 sparc64/sun4v +KNOWN_ARCHES?= amd64 arm i386 i386/pc98 ia64 mips powerpc powerpc64/powerpc sparc64 sparc64/sun4v .if ${TARGET} == ${TARGET_ARCH} _t= ${TARGET} .else @@ -262,34 +262,47 @@ WMAKEENV+= NO_CTF=1 .endif WMAKE= ${WMAKEENV} ${MAKE} -f Makefile.inc1 DESTDIR=${WORLDTMP} -.if ${TARGET_ARCH} == "amd64" +.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64" # 32 bit world LIB32TMP= ${OBJTREE}${.CURDIR}/lib32 +.if ${TARGET_ARCH} == "amd64" .if empty(TARGET_CPUTYPE) LIB32CPUFLAGS= -march=i686 -mmmx -msse -msse2 .else LIB32CPUFLAGS= -march=${TARGET_CPUTYPE} .endif -LIB32FLAGS= -m32 ${LIB32CPUFLAGS} -mfancy-math-387 -DCOMPAT_32BIT \ +LIB32CPUFLAGS+= -mfancy-math-387 +LIB32WMAKEENV= MACHINE=i386 MACHINE_ARCH=i386 \ + MACHINE_CPU="i686 mmx sse sse2" \ + LD="${LD} -m elf_i386_fbsd -Y P,${LIB32TMP}/usr/lib32" \ + AS="${AS} --32" + +.elif ${TARGET_ARCH} == "powerpc64" +.if empty(TARGET_CPUTYPE) +LIB32CPUFLAGS= -mcpu=powerpc +.else +LIB32CPUFLAGS= -mcpu=${TARGET_CPUTYPE} +.endif +LIB32WMAKEENV= MACHINE=powerpc MACHINE_ARCH=powerpc \ + LD="${LD} -m elf32ppc" +.endif + + +LIB32FLAGS= -m32 ${LIB32CPUFLAGS} -DCOMPAT_32BIT \ -isystem ${LIB32TMP}/usr/include/ \ -L${LIB32TMP}/usr/lib32 \ -B${LIB32TMP}/usr/lib32 # Yes, the flags are redundant. -LIB32WMAKEENV= MAKEOBJDIRPREFIX=${OBJTREE}/lib32 \ +LIB32WMAKEENV+= MAKEOBJDIRPREFIX=${OBJTREE}/lib32 \ _SHLIBDIRPREFIX=${LIB32TMP} \ VERSION="${VERSION}" \ - MACHINE=i386 \ - MACHINE_ARCH=i386 \ - MACHINE_CPU="i686 mmx sse sse2" \ INSTALL="sh ${.CURDIR}/tools/install.sh" \ PATH=${TMPPATH} \ CC="${CC} ${LIB32FLAGS}" \ CXX="${CXX} ${LIB32FLAGS}" \ OBJC="${OBJC} ${LIB32FLAGS}" \ - LD="${LD} -m elf_i386_fbsd -Y P,${LIB32TMP}/usr/lib32" \ - AS="${AS} --32" \ LIBDIR=/usr/lib32 \ SHLIBDIR=/usr/lib32 @@ -336,7 +349,7 @@ _worldtmp: @echo "--------------------------------------------------------------" .if !defined(NO_CLEAN) rm -rf ${WORLDTMP} -.if ${TARGET_ARCH} == "amd64" +.if defined(LIB32TMP) rm -rf ${LIB32TMP} .endif .else @@ -380,7 +393,7 @@ _cleanobj: @echo ">>> stage 2.1: cleaning up the object tree" @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; ${WMAKE} ${CLEANDIR:S/^/par-/} -.if ${TARGET_ARCH} == "amd64" +.if defined(LIB32TMP) ${_+_}cd ${.CURDIR}; ${LIB32WMAKE} -f Makefile.inc1 ${CLEANDIR:S/^/par-/} .endif .endif @@ -428,7 +441,7 @@ everything: @echo ">>> stage 4.4: building everything" @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; ${WMAKE} par-all -.if ${TARGET_ARCH} == "amd64" +.if defined(LIB32TMP) build32: @echo @echo "--------------------------------------------------------------" @@ -510,7 +523,7 @@ WMAKE_TGTS+= _cleanobj _obj _build-tools WMAKE_TGTS+= _cross-tools .endif WMAKE_TGTS+= _includes _libraries _depend everything -.if ${TARGET_ARCH} == "amd64" && ${MK_LIB32} != "no" +.if defined(LIB32TMP) && ${MK_LIB32} != "no" WMAKE_TGTS+= build32 .endif @@ -660,7 +673,7 @@ reinstall: @echo ">>> Installing everything" @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install -.if ${TARGET_ARCH} == "amd64" && ${MK_LIB32} != "no" +.if defined(LIB32TMP) && ${MK_LIB32} != "no" ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install32 .endif @@ -669,7 +682,7 @@ redistribute: @echo ">>> Distributing everything" @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 distribute -.if ${TARGET_ARCH} == "amd64" && ${MK_LIB32} != "no" +.if defined(LIB32TMP) && ${MK_LIB32} != "no" ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 distribute32 \ DISTRIBUTION=lib32 .endif @@ -705,8 +718,12 @@ KERNCONF=${KERNFAST} KERNCONF= ${KERNEL} KERNWARN= .else +.if ${TARGET_ARCH} == "powerpc64" +KERNCONF?= GENERIC64 +.else KERNCONF?= GENERIC .endif +.endif INSTKERNNAME?= kernel KERNSRCDIR?= ${.CURDIR}/sys @@ -1108,8 +1125,12 @@ _prereq_libs= gnu/lib/libssp/libssp_nons # all shared libraries for ELF. # _startup_libs= gnu/lib/csu -.if exists(${.CURDIR}/lib/csu/${MACHINE_CPUARCH}-elf) +.if exists(${.CURDIR}/lib/csu/${MACHINE_ARCH}-elf) +_startup_libs+= lib/csu/${MACHINE_ARCH}-elf +.elif exists(${.CURDIR}/lib/csu/${MACHINE_CPUARCH}-elf) _startup_libs+= lib/csu/${MACHINE_CPUARCH}-elf +.elif exists(${.CURDIR}/lib/csu/${MACHINE_ARCH}) +_startup_libs+= lib/csu/${MACHINE_ARCH} .else _startup_libs+= lib/csu/${MACHINE_CPUARCH} .endif Modified: head/include/Makefile ============================================================================== --- head/include/Makefile Tue Jul 13 21:15:18 2010 (r210023) +++ head/include/Makefile Tue Jul 13 21:19:59 2010 (r210024) @@ -56,7 +56,7 @@ LSUBDIRS= cam/ata cam/scsi \ LSUBSUBDIRS= dev/mpt/mpilib -.if ${MACHINE_ARCH} == "powerpc" +.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64" _dev_powermac_nvram= dev/powermac_nvram .endif @@ -189,7 +189,7 @@ copies: ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ ${DESTDIR}${INCLUDEDIR}/machine/pc .endif -.if defined(_MARCH) +.if defined(_MARCH) && exists(${.CURDIR}/../sys/${_MARCH}/include) ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \ ${DESTDIR}${INCLUDEDIR}/${_MARCH}; \ cd ${.CURDIR}/../sys/${_MARCH}/include; \ @@ -276,7 +276,7 @@ symlinks: ${DESTDIR}${INCLUDEDIR}/machine/pc; \ done .endif -.if defined(_MARCH) +.if defined(_MARCH) && exists(${.CURDIR}/../sys/${_MARCH}/include) ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \ ${DESTDIR}${INCLUDEDIR}/${_MARCH}; \ cd ${.CURDIR}/../sys/${_MARCH}/include; \ Modified: head/release/Makefile ============================================================================== --- head/release/Makefile Tue Jul 13 21:15:18 2010 (r210023) +++ head/release/Makefile Tue Jul 13 21:19:59 2010 (r210024) @@ -203,10 +203,16 @@ DISTRIBUTIONS?= ${BASE_DISTS} ${OTHER_DI # Build and package both GENERIC and SMP kernels if the target # has both configuration files. Otherwise only GENERIC is done. # +.if ${TARGET_ARCH} == "powerpc64" +KERN_GENERIC?= GENERIC64 +.else +KERN_GENERIC?= GENERIC +.endif + .if exists(${.CURDIR}/../sys/${TARGET}/conf/SMP) -KERNELS_BASE?= GENERIC SMP +KERNELS_BASE?= ${KERN_GENERIC} SMP .else -KERNELS_BASE?= GENERIC +KERNELS_BASE?= ${KERN_GENERIC} .endif # mountpoint for filesystems. @@ -851,7 +857,7 @@ SMALLMFSROOTFLOPPYSET= ${RD}/floppyset/m # Build boot and install floppies. floppies.1: - @${ZIPPER} -c ${RD}/kernels/GENERIC/kernel > ${RD}/kernels/kernel.gz + @${ZIPPER} -c ${RD}/kernels/${KERN_GENERIC}/kernel > ${RD}/kernels/kernel.gz @echo "Making the kernel boot floppies..." @cd ${.CURDIR} && ${MAKE} makeFloppySet FLOPPYBASE=kern \ FLOPPYDESC="Kernel" SPLITFILE=${RD}/kernels/kernel.gz @@ -985,7 +991,7 @@ cdrom.1: done .endif @echo "Copy GENERIC kernel to boot area" - @cp -Rp ${RD}/kernels/GENERIC/ ${CD_LIVEFS}/boot/kernel + @cp -Rp ${RD}/kernels/${KERN_GENERIC}/ ${CD_LIVEFS}/boot/kernel @rm -f ${CD_LIVEFS}/boot/kernel/*.symbols @rm -f ${CD_LIVEFS}/.profile @cp ${.CURDIR}/fixit.profile ${CD_LIVEFS}/.profile @@ -1003,7 +1009,7 @@ cdrom.1: .endif @echo "CD_VERSION = ${BUILDNAME}" > ${CD_LIVEFS}/cdrom.inf .if defined(MAKE_DVD) - @cp -Rp ${RD}/kernels/GENERIC/ ${CD_DVD1}/boot/kernel + @cp -Rp ${RD}/kernels/${KERN_GENERIC}/ ${CD_DVD1}/boot/kernel @rm -f ${CD_DVD1}/boot/kernel/*.symbols @rm -f ${CD_DVD1}/.profile @cp ${.CURDIR}/fixit.profile ${CD_DVD1}/.profile @@ -1321,7 +1327,7 @@ makeFloppySet: IMAGEDIR= ${RD}/image.${FSIMAGE} BOOTDIR= ${RD}/trees/base/boot HINTSFILE= ${BOOTDIR}/device.hints -ACPI_KO= ${RD}/kernels/GENERIC/acpi.ko +ACPI_KO= ${RD}/kernels/${KERN_GENERIC}/acpi.ko IMAGEFILE= ${RD}/floppies/${FSIMAGE}.flp .if defined(FDSIZE) && ${FDSIZE} == "SMALL" FLPSIZE= ${SMALLFLOPPYSIZE} From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 21:24:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BC4F51065672; Tue, 13 Jul 2010 21:24:08 +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 91FCF8FC1B; Tue, 13 Jul 2010 21:24:08 +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 o6DLO89C059928; Tue, 13 Jul 2010 21:24:08 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DLO81D059926; Tue, 13 Jul 2010 21:24:08 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201007132124.o6DLO81D059926@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 13 Jul 2010 21:24:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210025 - head/sys/powerpc/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 21:24:08 -0000 Author: nwhitehorn Date: Tue Jul 13 21:24:08 2010 New Revision: 210025 URL: http://svn.freebsd.org/changeset/base/210025 Log: Add GENERIC kernel config for powerpc64. Added: head/sys/powerpc/conf/GENERIC64 - copied, changed from r209910, head/sys/powerpc/conf/GENERIC Copied and modified: head/sys/powerpc/conf/GENERIC64 (from r209910, head/sys/powerpc/conf/GENERIC) ============================================================================== --- head/sys/powerpc/conf/GENERIC Sun Jul 11 21:12:42 2010 (r209910, copy source) +++ head/sys/powerpc/conf/GENERIC64 Tue Jul 13 21:24:08 2010 (r210025) @@ -21,11 +21,12 @@ cpu AIM ident GENERIC +machine powerpc powerpc64 + makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols # Platform support options POWERMAC #NewWorld Apple PowerMacs -options PSIM #GDB PSIM ppc simulator options SCHED_ULE #ULE scheduler options INET #InterNETworking @@ -47,7 +48,7 @@ options PROCFS #Process filesystem (r options PSEUDOFS #Pseudo-filesystem framework options GEOM_PART_GPT #GUID Partition Tables. options GEOM_LABEL #Provides labelization -options COMPAT_FREEBSD4 #Keep this for a while +options COMPAT_FREEBSD32 #Compatible with FreeBSD/powerpc binaries options COMPAT_FREEBSD5 #Compatible with FreeBSD5 options COMPAT_FREEBSD6 #Compatible with FreeBSD6 options COMPAT_FREEBSD7 #Compatible with FreeBSD7 @@ -120,7 +121,6 @@ device uart # PCI Ethernet NICs that use the common MII bus controller code. device miibus # MII bus support device bge # Broadcom BCM570xx Gigabit Ethernet -device bm # Apple BMAC Ethernet device gem # Sun GEM/Sun ERI/Apple GMAC device dc # DEC/Intel 21143 and various workalikes device fxp # Intel EtherExpress PRO/100B (82557, 82558) @@ -155,7 +155,6 @@ options KBD_INSTALL_CDEV # install a CD device ulpt # Printer device umass # Disks/Mass storage - Requires scbus and da0 device ums # Mouse -device atp # Apple USB touchpad device urio # Diamond Rio 500 MP3 player # USB Ethernet device aue # ADMtek USB Ethernet @@ -175,7 +174,6 @@ device smu # Apple System Management U # ADB support device adb -device cuda device pmu # Powermac I2C support From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 22:27:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 687BD1065672; Tue, 13 Jul 2010 22:27:19 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5816F8FC13; Tue, 13 Jul 2010 22:27: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 o6DMRJGK073793; Tue, 13 Jul 2010 22:27:19 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DMRJLf073791; Tue, 13 Jul 2010 22:27:19 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007132227.o6DMRJLf073791@svn.freebsd.org> From: Warner Losh Date: Tue, 13 Jul 2010 22:27:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210026 - head/sys/mips/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 22:27:19 -0000 Author: imp Date: Tue Jul 13 22:27:19 2010 New Revision: 210026 URL: http://svn.freebsd.org/changeset/base/210026 Log: Temp hack to N32 kernel: turn off debugger since n32 is too weird for ddb Modified: head/sys/mips/conf/XLRN32 Modified: head/sys/mips/conf/XLRN32 ============================================================================== --- head/sys/mips/conf/XLRN32 Tue Jul 13 21:24:08 2010 (r210025) +++ head/sys/mips/conf/XLRN32 Tue Jul 13 22:27:19 2010 (r210026) @@ -64,10 +64,10 @@ options NO_SWAPPING #Debugging options options KTRACE # ktrace(1) support -options DDB -options KDB -options GDB -options ALT_BREAK_TO_DEBUGGER +#options DDB +#options KDB +#options GDB +#options ALT_BREAK_TO_DEBUGGER #options DEADLKRES #Enable the deadlock resolver options INVARIANTS #Enable calls of extra sanity checking options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 22:30:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 53FAE106567A; Tue, 13 Jul 2010 22:30:27 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 436FE8FC1D; Tue, 13 Jul 2010 22:30:27 +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 o6DMURPn074519; Tue, 13 Jul 2010 22:30:27 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DMURb6074517; Tue, 13 Jul 2010 22:30:27 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007132230.o6DMURb6074517@svn.freebsd.org> From: Warner Losh Date: Tue, 13 Jul 2010 22:30:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210027 - head/sys/mips/sibyte X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 22:30:27 -0000 Author: imp Date: Tue Jul 13 22:30:27 2010 New Revision: 210027 URL: http://svn.freebsd.org/changeset/base/210027 Log: Remove redunant machine/cpuregs.h include. Also, spell things like in machine/cpuregs.h instead of machine/cpu.h. Modified: head/sys/mips/sibyte/sb_machdep.c Modified: head/sys/mips/sibyte/sb_machdep.c ============================================================================== --- head/sys/mips/sibyte/sb_machdep.c Tue Jul 13 22:27:19 2010 (r210026) +++ head/sys/mips/sibyte/sb_machdep.c Tue Jul 13 22:30:27 2010 (r210027) @@ -28,7 +28,6 @@ __FBSDID("$FreeBSD$"); #include -#include #include "opt_ddb.h" #include "opt_kdb.h" @@ -253,7 +252,7 @@ mips_init(void) * code to the XTLB exception vector. */ { - bcopy(MipsTLBMiss, (void *)XTLB_MISS_EXC_VEC, + bcopy(MipsTLBMiss, (void *)MIPS3_XTLB_MISS_EXC_VEC, MipsTLBMissEnd - MipsTLBMiss); mips_icache_sync_all(); @@ -314,7 +313,7 @@ kseg0_map_coherent(void) const int CFG_K0_COHERENT = 5; config = mips_rd_config(); - config &= ~CFG_K0_MASK; + config &= ~MIPS3_CONFIG_K0_MASK; config |= CFG_K0_COHERENT; mips_wr_config(config); } @@ -371,7 +370,7 @@ platform_init_ap(int cpuid) */ clock_int_mask = hard_int_mask(5); ipi_int_mask = hard_int_mask(platform_ipi_intrnum()); - set_intr_mask(ALL_INT_MASK & ~(ipi_int_mask | clock_int_mask)); + set_intr_mask(MIPS_SR_INT_MASK & ~(ipi_int_mask | clock_int_mask)); } int From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 22:35:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3F262106566C; Tue, 13 Jul 2010 22:35:10 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2E7768FC1F; Tue, 13 Jul 2010 22:35:10 +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 o6DMZ9md075583; Tue, 13 Jul 2010 22:35:09 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DMZ9O0075581; Tue, 13 Jul 2010 22:35:09 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007132235.o6DMZ9O0075581@svn.freebsd.org> From: Warner Losh Date: Tue, 13 Jul 2010 22:35:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210028 - head/sys/mips/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 22:35:10 -0000 Author: imp Date: Tue Jul 13 22:35:09 2010 New Revision: 210028 URL: http://svn.freebsd.org/changeset/base/210028 Log: Add INFO config register from mips32/64 land Modified: head/sys/mips/include/cpuregs.h Modified: head/sys/mips/include/cpuregs.h ============================================================================== --- head/sys/mips/include/cpuregs.h Tue Jul 13 22:30:27 2010 (r210027) +++ head/sys/mips/include/cpuregs.h Tue Jul 13 22:35:09 2010 (r210028) @@ -512,6 +512,7 @@ * 4 MIPS_COP_0_TLB_CONTEXT 3636 TLB Context. * 5 MIPS_COP_0_TLB_PG_MASK .333 TLB Page Mask register. * 6 MIPS_COP_0_TLB_WIRED .333 Wired TLB number. + * 7 MIPS_COP_0_INFO ..33 Info registers * 8 MIPS_COP_0_BAD_VADDR 3636 Bad virtual address. * 9 MIPS_COP_0_COUNT .333 Count register. * 10 MIPS_COP_0_TLB_HI 3636 TLB entry high. @@ -588,6 +589,7 @@ #define MIPS_COP_0_ERROR_PC _(30) /* MIPS32/64 */ +#define MIPS_COP_0_INFO _(7) #define MIPS_COP_0_DEBUG _(23) #define MIPS_COP_0_DEPC _(24) #define MIPS_COP_0_PERFCNT _(25) From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 22:36:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CBF161065672; Tue, 13 Jul 2010 22:36:45 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BBC278FC1C; Tue, 13 Jul 2010 22:36:45 +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 o6DMajQv075976; Tue, 13 Jul 2010 22:36:45 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DMaj1H075974; Tue, 13 Jul 2010 22:36:45 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007132236.o6DMaj1H075974@svn.freebsd.org> From: Warner Losh Date: Tue, 13 Jul 2010 22:36:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210029 - head/sys/mips/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 22:36:45 -0000 Author: imp Date: Tue Jul 13 22:36:45 2010 New Revision: 210029 URL: http://svn.freebsd.org/changeset/base/210029 Log: union cpuprid is also unused now Modified: head/sys/mips/include/cpu.h Modified: head/sys/mips/include/cpu.h ============================================================================== --- head/sys/mips/include/cpu.h Tue Jul 13 22:35:09 2010 (r210028) +++ head/sys/mips/include/cpu.h Tue Jul 13 22:36:45 2010 (r210029) @@ -303,28 +303,6 @@ */ #define get_cyclecount() mips_rd_count() -/* - * CPU identification, from PRID register. - */ -union cpuprid { - int cpuprid; - struct { -#if BYTE_ORDER == BIG_ENDIAN - u_int pad1:8; /* reserved */ - u_int cp_vendor:8; /* company identifier */ - u_int cp_imp:8; /* implementation identifier */ - u_int cp_majrev:4; /* major revision identifier */ - u_int cp_minrev:4; /* minor revision identifier */ -#else - u_int cp_minrev:4; /* minor revision identifier */ - u_int cp_majrev:4; /* major revision identifier */ - u_int cp_imp:8; /* implementation identifier */ - u_int cp_vendor:8; /* company identifier */ - u_int pad1:8; /* reserved */ -#endif - } cpu; -}; - #endif /* !_LOCORE */ /* From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 22:44:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 093641065673; Tue, 13 Jul 2010 22:44:15 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EC7CA8FC14; Tue, 13 Jul 2010 22:44:14 +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 o6DMiETN077650; Tue, 13 Jul 2010 22:44:14 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DMiExW077648; Tue, 13 Jul 2010 22:44:14 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201007132244.o6DMiExW077648@svn.freebsd.org> From: Rick Macklem Date: Tue, 13 Jul 2010 22:44:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210030 - head/sys/fs/nfsserver X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 22:44:15 -0000 Author: rmacklem Date: Tue Jul 13 22:44:14 2010 New Revision: 210030 URL: http://svn.freebsd.org/changeset/base/210030 Log: Fix a bogus comment that mentions lru lists that don't exist. Reported by: zack.kirsch at isilon.com MFC after: 2 weeks Modified: head/sys/fs/nfsserver/nfs_nfsdstate.c Modified: head/sys/fs/nfsserver/nfs_nfsdstate.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdstate.c Tue Jul 13 22:36:45 2010 (r210029) +++ head/sys/fs/nfsserver/nfs_nfsdstate.c Tue Jul 13 22:44:14 2010 (r210030) @@ -45,7 +45,7 @@ NFSV4ROOTLOCKMUTEX; NFSSTATESPINLOCK; /* - * Hash and lru lists for nfs V4. + * Hash lists for nfs V4. * (Some would put them in the .h file, but I don't like declaring storage * in a .h) */ From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 23:07:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B7FCF1065672; Tue, 13 Jul 2010 23:07:32 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A794B8FC19; Tue, 13 Jul 2010 23:07:32 +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 o6DN7W6O082788; Tue, 13 Jul 2010 23:07:32 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DN7W8v082786; Tue, 13 Jul 2010 23:07:32 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201007132307.o6DN7W8v082786@svn.freebsd.org> From: Rick Macklem Date: Tue, 13 Jul 2010 23:07:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210032 - head/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 23:07:32 -0000 Author: rmacklem Date: Tue Jul 13 23:07:32 2010 New Revision: 210032 URL: http://svn.freebsd.org/changeset/base/210032 Log: For the experimental NFSv4 client, do not use cached attributes that were invalidated, even when a delegation for the file is held. MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clsubs.c Modified: head/sys/fs/nfsclient/nfs_clsubs.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clsubs.c Tue Jul 13 22:55:12 2010 (r210031) +++ head/sys/fs/nfsclient/nfs_clsubs.c Tue Jul 13 23:07:32 2010 (r210032) @@ -230,7 +230,7 @@ ncl_getattrcache(struct vnode *vp, struc #endif if ((time_second - np->n_attrstamp) >= timeo && - mustflush != 0) { + (mustflush != 0 || np->n_attrstamp == 0)) { newnfsstats.attrcache_misses++; mtx_unlock(&np->n_mtx); #ifdef NFS_ACDEBUG From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 23:10:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD11B106564A; Tue, 13 Jul 2010 23:10:55 +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 BC9848FC1A; Tue, 13 Jul 2010 23:10:55 +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 o6DNAtMJ083579; Tue, 13 Jul 2010 23:10:55 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DNAtQH083577; Tue, 13 Jul 2010 23:10:55 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201007132310.o6DNAtQH083577@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 13 Jul 2010 23:10:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210033 - head/sys/powerpc/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 23:10:55 -0000 Author: nwhitehorn Date: Tue Jul 13 23:10:55 2010 New Revision: 210033 URL: http://svn.freebsd.org/changeset/base/210033 Log: Remove obsolete code that sets SHMMAXPGS to a tiny value by default on PowerPC. Modified: head/sys/powerpc/include/vmparam.h Modified: head/sys/powerpc/include/vmparam.h ============================================================================== --- head/sys/powerpc/include/vmparam.h Tue Jul 13 23:07:32 2010 (r210032) +++ head/sys/powerpc/include/vmparam.h Tue Jul 13 23:10:55 2010 (r210033) @@ -58,13 +58,6 @@ #endif /* - * Size of shared memory map - */ -#ifndef SHMMAXPGS -#define SHMMAXPGS 1024 -#endif - -/* * The time for a process to be blocked before being very swappable. * This is a number of seconds which the system takes as being a non-trivial * amount of real time. You probably shouldn't change this; From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 23:14:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE522106566B; Tue, 13 Jul 2010 23:14:39 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ADA848FC08; Tue, 13 Jul 2010 23:14:39 +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 o6DNEdBm084434; Tue, 13 Jul 2010 23:14:39 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DNEdov084432; Tue, 13 Jul 2010 23:14:39 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201007132314.o6DNEdov084432@svn.freebsd.org> From: Rick Macklem Date: Tue, 13 Jul 2010 23:14:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210034 - head/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 23:14:39 -0000 Author: rmacklem Date: Tue Jul 13 23:14:39 2010 New Revision: 210034 URL: http://svn.freebsd.org/changeset/base/210034 Log: For the experimental NFSv4 client, make sure that attributes that predate the issue of a delegation are not cached once the delegation is held. This is necessary, since cached attributes remain valid while the delegation is held. MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clrpcops.c Modified: head/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clrpcops.c Tue Jul 13 23:10:55 2010 (r210033) +++ head/sys/fs/nfsclient/nfs_clrpcops.c Tue Jul 13 23:14:39 2010 (r210034) @@ -268,6 +268,14 @@ else printf(" fhl=0\n"); #else NFSLOCKNODE(np); np->n_flag &= ~NDELEGMOD; + /* + * Invalidate the attribute cache, so that + * attributes that pre-date the issue of a + * delegation are not cached, since the + * cached attributes will remain valid while + * the delegation is held. + */ + NFSINVALATTRCACHE(np); NFSUNLOCKNODE(np); #endif (void) nfscl_deleg(nmp->nm_mountp, @@ -1724,6 +1732,12 @@ nfsrpc_create(vnode_t dvp, char *name, i error = nfsrpc_createv4(dvp, name, namelen, vap, cverf, fmode, owp, &dp, cred, p, dnap, nnap, nfhpp, attrflagp, dattrflagp, dstuff, &unlocked); + /* + * There is no need to invalidate cached attributes here, + * since new post-delegation issue attributes are always + * returned by nfsrpc_createv4() and these will update the + * attribute cache. + */ if (dp != NULL) (void) nfscl_deleg(nmp->nm_mountp, owp->nfsow_clp, (*nfhpp)->nfh_fh, (*nfhpp)->nfh_len, cred, p, &dp); From owner-svn-src-all@FreeBSD.ORG Tue Jul 13 23:47:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B4A581065673; Tue, 13 Jul 2010 23:47:12 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A204B8FC2D; Tue, 13 Jul 2010 23:47:12 +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 o6DNlClF091633; Tue, 13 Jul 2010 23:47:12 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DNlCg5091622; Tue, 13 Jul 2010 23:47:12 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007132347.o6DNlCg5091622@svn.freebsd.org> From: Warner Losh Date: Tue, 13 Jul 2010 23:47:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210036 - in head/usr.sbin/pc-sysinstall: backend backend-query doc pc-sysinstall X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 23:47:12 -0000 Author: imp Date: Tue Jul 13 23:47:12 2010 New Revision: 210036 URL: http://svn.freebsd.org/changeset/base/210036 Log: Add support for packages. PR: 148584 Submitted by: John Hixon Added: head/usr.sbin/pc-sysinstall/backend-query/get-packages.sh (contents, props changed) head/usr.sbin/pc-sysinstall/backend-query/list-packages.sh (contents, props changed) head/usr.sbin/pc-sysinstall/backend/functions-packages.sh (contents, props changed) Modified: head/usr.sbin/pc-sysinstall/backend-query/Makefile head/usr.sbin/pc-sysinstall/backend-query/list-config.sh head/usr.sbin/pc-sysinstall/backend-query/list-mirrors.sh head/usr.sbin/pc-sysinstall/backend/Makefile head/usr.sbin/pc-sysinstall/backend/functions-ftp.sh head/usr.sbin/pc-sysinstall/doc/help-index head/usr.sbin/pc-sysinstall/pc-sysinstall/pc-sysinstall.sh Modified: head/usr.sbin/pc-sysinstall/backend-query/Makefile ============================================================================== --- head/usr.sbin/pc-sysinstall/backend-query/Makefile Tue Jul 13 23:34:43 2010 (r210035) +++ head/usr.sbin/pc-sysinstall/backend-query/Makefile Tue Jul 13 23:47:12 2010 (r210036) @@ -1,11 +1,11 @@ # $FreeBSD$ FILES= detect-laptop.sh detect-nics.sh detect-emulation.sh disk-info.sh \ - disk-list.sh disk-part.sh enable-net.sh list-config.sh list-components.sh \ - list-mirrors.sh list-rsync-backups.sh list-tzones.sh query-langs.sh \ - send-logs.sh setup-ssh-keys.sh sys-mem.sh test-live.sh test-netup.sh \ - update-part-list.sh xkeyboard-layouts.sh xkeyboard-models.sh \ - xkeyboard-variants.sh + disk-list.sh disk-part.sh enable-net.sh get-packages.sh list-config.sh \ + list-components.sh list-mirrors.sh list-packages.sh list-rsync-backups.sh \ + list-tzones.sh query-langs.sh send-logs.sh setup-ssh-keys.sh sys-mem.sh \ + test-live.sh test-netup.sh update-part-list.sh xkeyboard-layouts.sh \ + xkeyboard-models.sh xkeyboard-variants.sh FILESMODE= ${BINMODE} FILESDIR=${SHAREDIR}/pc-sysinstall/backend-query NO_OBJ= Added: head/usr.sbin/pc-sysinstall/backend-query/get-packages.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/pc-sysinstall/backend-query/get-packages.sh Tue Jul 13 23:47:12 2010 (r210036) @@ -0,0 +1,60 @@ +#!/bin/sh +#- +# Copyright (c) 2010 iXsystems, Inc. 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. +# +# $FreeBSD$ + +# Script which lists the available packages for this release +########################################################################### + +. ${PROGDIR}/backend/functions.sh +. ${PROGDIR}/backend/functions-packages.sh + +DEFAULT_FTP_SERVER="ftp.freebsd.org" +FTP_SERVER="${1}" +ID=`id -u` + +if [ "${ID}" -ne "0" ] +then + echo "Error: must be root!" + exit 1 +fi + +if [ -z "${FTP_SERVER}" ] +then + FTP_SERVER="${DEFAULT_FTP_SERVER}" +fi + +if [ ! -f "${PKGDIR}/INDEX" ] +then + get_package_index "${FTP_SERVER}" +fi + +if [ -f "${PKGDIR}/INDEX" ] +then + echo "${PKGDIR}/INDEX" + exit 0 +fi + +exit 1 Modified: head/usr.sbin/pc-sysinstall/backend-query/list-config.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend-query/list-config.sh Tue Jul 13 23:34:43 2010 (r210035) +++ head/usr.sbin/pc-sysinstall/backend-query/list-config.sh Tue Jul 13 23:47:12 2010 (r210036) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2010 iX Systems, Inc. All rights reserved. +# Copyright (c) 2010 iXsystems, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/pc-sysinstall/backend-query/list-mirrors.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend-query/list-mirrors.sh Tue Jul 13 23:34:43 2010 (r210035) +++ head/usr.sbin/pc-sysinstall/backend-query/list-mirrors.sh Tue Jul 13 23:47:12 2010 (r210036) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2010 iX Systems, Inc. All rights reserved. +# Copyright (c) 2010 iXsystems, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Added: head/usr.sbin/pc-sysinstall/backend-query/list-packages.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/pc-sysinstall/backend-query/list-packages.sh Tue Jul 13 23:47:12 2010 (r210036) @@ -0,0 +1,74 @@ +#!/bin/sh +#- +# Copyright (c) 2010 iXsystems, Inc. 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. +# +# $FreeBSD$ + +# Script which lists the available packages for this release +########################################################################### + +. ${PROGDIR}/backend/functions.sh +. ${PROGDIR}/backend/functions-packages.sh + +PACKAGE_CATEGORY="${1}" +PACKAGE_NAME="${2}" +NARGS=0 + +if [ ! -f "${PKGDIR}/INDEX" ] +then + echo "Error: please fetch package index with get-packages!" + exit 1 +fi + +if [ ! -f "${PKGDIR}/INDEX.parsed" ] +then + parse_package_index +fi + +if [ -n "${PACKAGE_CATEGORY}" ] +then + NARGS=$((NARGS+1)) +fi + +if [ -n "${PACKAGE_NAME}" ] +then + NARGS=$((NARGS+1)) +fi + +echo "Available Packages:" +if [ "${NARGS}" -eq "0" ] +then + show_packages + +elif [ "${NARGS}" -eq "1" ] +then + show_packages_by_category "${PACKAGE_CATEGORY}" + +elif [ "${NARGS}" -eq "2" ] +then + show_package_by_name "${PACKAGE_CATEGORY}" "${PACKAGE_NAME}" + +else + show_packages +fi Modified: head/usr.sbin/pc-sysinstall/backend/Makefile ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/Makefile Tue Jul 13 23:34:43 2010 (r210035) +++ head/usr.sbin/pc-sysinstall/backend/Makefile Tue Jul 13 23:47:12 2010 (r210036) @@ -4,8 +4,9 @@ FILES= functions-bsdlabel.sh functions-c functions-extractimage.sh functions-ftp.sh functions-installcomponents.sh \ functions-localize.sh functions-mountdisk.sh \ functions-mountoptical.sh functions-networking.sh \ - functions-newfs.sh functions-parse.sh functions-runcommands.sh \ - functions-unmount.sh functions-upgrade.sh functions-users.sh \ + functions-newfs.sh functions-packages.sh functions-parse.sh \ + functions-runcommands.sh functions-unmount.sh \ + functions-upgrade.sh functions-users.sh \ functions.sh parseconfig.sh startautoinstall.sh FILESMODE= ${BINMODE} FILESDIR=${SHAREDIR}/pc-sysinstall/backend Modified: head/usr.sbin/pc-sysinstall/backend/functions-ftp.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions-ftp.sh Tue Jul 13 23:34:43 2010 (r210035) +++ head/usr.sbin/pc-sysinstall/backend/functions-ftp.sh Tue Jul 13 23:47:12 2010 (r210036) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2010 iX Systems, Inc. All rights reserved. +# Copyright (c) 2010 iXsystems, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Added: head/usr.sbin/pc-sysinstall/backend/functions-packages.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/pc-sysinstall/backend/functions-packages.sh Tue Jul 13 23:47:12 2010 (r210036) @@ -0,0 +1,148 @@ +#!/bin/sh +#- +# Copyright (c) 2010 iXsystems, Inc. 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. +# +# $FreeBSD$ + +# Functions which runs commands on the system + +. ${BACKEND}/functions.sh +. ${BACKEND}/functions-parse.sh +. ${BACKEND}/functions-ftp.sh + + +get_package_index() +{ + FTP_SERVER="${1}" + FTP_DIR="ftp://${FTP_SERVER}/pub/FreeBSD/releases/${FBSD_ARCH}/${FBSD_BRANCH}/packages" + INDEX_FILE="INDEX" + USE_BZIP2=0 + + if [ -f "/usr/bin/bzip2" ] + then + INDEX_FILE="${INDEX_FILE}.bz2" + USE_BZIP2=1 + fi + + ftp "${FTP_DIR}/${INDEX_FILE}" + if [ -f "${INDEX_FILE}" ] + then + if [ "${USE_BZIP2}" -eq "1" ] + then + bzip2 -d "${INDEX_FILE}" + INDEX_FILE="${INDEX_FILE%.bz2}" + fi + + mv "${INDEX_FILE}" "${PKGDIR}" + fi +} + +parse_package_index() +{ + INDEX_FILE="${PKGDIR}/INDEX" + + exec 3<&0 + exec 0<"${INDEX_FILE}" + + while read -r line + do + CATEGORY="" + PACKAGE="" + DESC="" + i=0 + + SAVE_IFS="${IFS}" + IFS="|" + + for part in ${line} + do + if [ "${i}" -eq "1" ] + then + PACKAGE=`basename "${part}"` + + elif [ "${i}" -eq "3" ] + then + DESC="${part}" + + elif [ "${i}" -eq "6" ] + then + CATEGORY=`echo "${part}" | cut -f1 -d' '` + fi + + i=$((i+1)) + done + + echo "${CATEGORY}|${PACKAGE}|${DESC}" >> "${INDEX_FILE}.parsed" + IFS="${SAVE_IFS}" + done + + exec 0<&3 +} + +show_package_file() +{ + PKGFILE="${1}" + + exec 3<&0 + exec 0<"${PKGFILE}" + + while read -r line + do + CATEGORY=`echo "${line}" | cut -f1 -d'|'` + PACKAGE=`echo "${line}" | cut -f2 -d'|'` + DESC=`echo "${line}" | cut -f3 -d'|'` + + echo "${CATEGORY}/${PACKAGE}:${DESC}" + done + + exec 0<&3 +} + +show_packages_by_category() +{ + CATEGORY="${1}" + INDEX_FILE="${PKGDIR}/INDEX.parsed" + TMPFILE="/tmp/.pkg.cat" + + grep "^${CATEGORY}|" "${INDEX_FILE}" > "${TMPFILE}" + show_package_file "${TMPFILE}" + rm "${TMPFILE}" +} + +show_package_by_name() +{ + CATEGORY="${1}" + PACKAGE="${2}" + INDEX_FILE="${PKGDIR}/INDEX.parsed" + TMPFILE="/tmp/.pkg.cat.pak" + + grep "^${CATEGORY}|${PACKAGE}" "${INDEX_FILE}" > "${TMPFILE}" + show_package_file "${TMPFILE}" + rm "${TMPFILE}" +} + +show_packages() +{ + show_package_file "${PKGDIR}/INDEX.parsed" +} Modified: head/usr.sbin/pc-sysinstall/doc/help-index ============================================================================== --- head/usr.sbin/pc-sysinstall/doc/help-index Tue Jul 13 23:34:43 2010 (r210035) +++ head/usr.sbin/pc-sysinstall/doc/help-index Tue Jul 13 23:47:12 2010 (r210036) @@ -11,49 +11,55 @@ Help Commands System Query Commands disk-list - Provides a listing of the disk drives detected on this system + Provides a listing of the disk drives detected on this system disk-part - Queries the specified disk and returns information about its partitions + Queries the specified disk and returns information about its partitions disk-info - Returns information about the disks size, cyls, heads, and sectors + Returns information about the disks size, cyls, heads, and sectors detect-laptop - Tests to see if this system is a laptop or desktop + Tests to see if this system is a laptop or desktop detect-emulation - Tests to see if this system is actually running in an emulator such as VirtualBox + Tests to see if this system is actually running in an emulator such as VirtualBox detect-nics - Returns a listing of the detected network cards on this system + Returns a listing of the detected network cards on this system list-config Returns a listing of the pc-sysinstall configuration list-components - Returns a listing of the available components which can be installed + Returns a listing of the available components which can be installed list-mirrors - Returns a listing of the available FTP mirrors + Returns a listing of the available FTP mirrors + + list-packages + Returns a listing of the available packages list-rsync-backups - Returns a listing of available rsync-backups on the target server in the life-preserver/ dir + Returns a listing of available rsync-backups on the target server in the life-preserver/ dir list-tzones - Returns a listing of available timezones + Returns a listing of available timezones query-langs Return a list of languages that the installer supports + get-packages + Retrieves the list of packages from an FTP mirror + sys-mem - Return the size of installed system RAM in MegaBytes + Return the size of installed system RAM in MegaBytes test-netup - Test if an internet connection is available + Test if an internet connection is available update-part-list - Return a list of PC-BSD & FreeBSD installs on this system for updates + Return a list of PC-BSD & FreeBSD installs on this system for updates xkeyboard-layouts Return a list of keyboard layouts that xorg supports Modified: head/usr.sbin/pc-sysinstall/pc-sysinstall/pc-sysinstall.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/pc-sysinstall/pc-sysinstall.sh Tue Jul 13 23:34:43 2010 (r210035) +++ head/usr.sbin/pc-sysinstall/pc-sysinstall/pc-sysinstall.sh Tue Jul 13 23:47:12 2010 (r210036) @@ -43,6 +43,10 @@ export PROGDIR COMPDIR="${PROGDIR}/components" export COMPDIR +# Set this to the packages location +PKGDIR="${PROGDIR}/conf" +export PKGDIR + # End of user-editable configuration ##################################################################### @@ -156,6 +160,10 @@ case $1 in list-mirrors) ${QUERYDIR}/list-mirrors.sh "${2}" ;; + # Function which lists available packages + list-packages) ${QUERYDIR}/list-packages.sh "${2}" "${3}" + ;; + # Function which lists available backups on a rsync/ssh server list-rsync-backups) ${QUERYDIR}/list-rsync-backups.sh "${2}" "${3}" "${4}" ;; @@ -172,6 +180,10 @@ case $1 in send-logs) ${QUERYDIR}/send-logs.sh ${2} ;; + # Function to get package index + get-packages) ${QUERYDIR}/get-packages.sh "${2}" + ;; + # Function which allows setting up of SSH keys setup-ssh-keys) ${QUERYDIR}/setup-ssh-keys.sh "${2}" "${3}" "${4}" ;; @@ -209,4 +221,4 @@ case $1 in esac # Exit with success if we made it to the end -exit 0 +exit $? From owner-svn-src-all@FreeBSD.ORG Wed Jul 14 00:41:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8AADA1065673; Wed, 14 Jul 2010 00:41:23 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 782B68FC14; Wed, 14 Jul 2010 00:41: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 o6E0fN19003860; Wed, 14 Jul 2010 00:41:23 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6E0fNwY003856; Wed, 14 Jul 2010 00:41:23 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007140041.o6E0fNwY003856@svn.freebsd.org> From: Warner Losh Date: Wed, 14 Jul 2010 00:41:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210038 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2010 00:41:23 -0000 Author: imp Date: Wed Jul 14 00:41:22 2010 New Revision: 210038 URL: http://svn.freebsd.org/changeset/base/210038 Log: Prefer the cpuregs.h spellings of register and bit names over cpu.h. Modified: head/sys/mips/mips/exception.S head/sys/mips/mips/fp.S head/sys/mips/mips/machdep.c head/sys/mips/mips/mpboot.S head/sys/mips/mips/pm_machdep.c head/sys/mips/mips/psraccess.S head/sys/mips/mips/support.S head/sys/mips/mips/swtch.S head/sys/mips/mips/trap.c head/sys/mips/mips/vm_machdep.c Modified: head/sys/mips/mips/exception.S ============================================================================== --- head/sys/mips/mips/exception.S Tue Jul 13 23:58:10 2010 (r210037) +++ head/sys/mips/mips/exception.S Wed Jul 14 00:41:22 2010 (r210038) @@ -115,7 +115,7 @@ VECTOR(MipsTLBMiss, unknown) .set push .set noat j MipsDoTLBMiss - MFC0 k0, COP_0_BAD_VADDR # get the fault address + MFC0 k0, MIPS_COP_0_BAD_VADDR # get the fault address .set pop VECTOR_END(MipsTLBMiss) @@ -144,7 +144,7 @@ MipsDoTLBMiss: PTR_ADDU k1, k0, k1 #07: k1=seg entry address PTR_L k1, 0(k1) #08: k1=seg entry - MFC0 k0, COP_0_BAD_VADDR #09: k0=bad address (again) + MFC0 k0, MIPS_COP_0_BAD_VADDR #09: k0=bad address (again) beq k1, zero, 2f #0a: ==0 -- no page table srl k0, PAGE_SHIFT - 2 #0b: k0=VPN (aka va>>10) andi k0, k0, 0xff8 #0c: k0=page tab offset @@ -152,10 +152,10 @@ MipsDoTLBMiss: lw k0, 0(k1) #0e: k0=lo0 pte lw k1, 4(k1) #0f: k1=lo0 pte CLEAR_PTE_SWBITS(k0) - MTC0 k0, COP_0_TLB_LO0 #12: lo0 is loaded + MTC0 k0, MIPS_COP_0_TLB_LO0 #12: lo0 is loaded COP0_SYNC CLEAR_PTE_SWBITS(k1) - MTC0 k1, COP_0_TLB_LO1 #15: lo1 is loaded + MTC0 k1, MIPS_COP_0_TLB_LO1 #15: lo1 is loaded COP0_SYNC tlbwr #1a: write to tlb HAZARD_DELAY @@ -176,13 +176,13 @@ VECTOR(MipsException, unknown) * Find out what mode we came from and jump to the proper handler. */ .set noat - mfc0 k0, COP_0_STATUS_REG # Get the status register - mfc0 k1, COP_0_CAUSE_REG # Get the cause register value. + mfc0 k0, MIPS_COP_0_STATUS # Get the status register + mfc0 k1, MIPS_COP_0_CAUSE # Get the cause register value. and k0, k0, SR_KSU_USER # test for user mode # sneaky but the bits are # with us........ sll k0, k0, 3 # shift user bit for cause index - and k1, k1, CR_EXC_CODE # Mask out the cause bits. + and k1, k1, MIPS3_CR_EXC_CODE # Mask out the cause bits. or k1, k1, k0 # change index to user table #if defined(__mips_n64) PTR_SLL k1, k1, 1 # shift to get 8-byte offset @@ -207,7 +207,7 @@ VECTOR_END(MipsException) */ SlowFault: .set noat - mfc0 k0, COP_0_STATUS_REG + mfc0 k0, MIPS_COP_0_STATUS nop and k0, k0, SR_KSU_USER bne k0, zero, _C_LABEL(MipsUserGenException) @@ -237,28 +237,28 @@ SlowFault: #if defined(TARGET_OCTEON) #define CLEAR_STATUS \ - mfc0 a0, COP_0_STATUS_REG ;\ + mfc0 a0, MIPS_COP_0_STATUS ;\ li a2, (MIPS_SR_KX | MIPS_SR_SX | MIPS_SR_UX) ; \ or a0, a0, a2 ; \ li a2, ~(MIPS_SR_INT_IE | MIPS_SR_EXL | SR_KSU_USER) ; \ and a0, a0, a2 ; \ - mtc0 a0, COP_0_STATUS_REG ; \ + mtc0 a0, MIPS_COP_0_STATUS ; \ ITLBNOPFIX #elif defined(TARGET_XLR_XLS) #define CLEAR_STATUS \ - mfc0 a0, COP_0_STATUS_REG ;\ + mfc0 a0, MIPS_COP_0_STATUS ;\ li a2, (MIPS_SR_KX | MIPS_SR_COP_2_BIT) ; \ or a0, a0, a2 ; \ li a2, ~(MIPS_SR_INT_IE | MIPS_SR_EXL | SR_KSU_USER) ; \ and a0, a0, a2 ; \ - mtc0 a0, COP_0_STATUS_REG ; \ + mtc0 a0, MIPS_COP_0_STATUS ; \ ITLBNOPFIX #else #define CLEAR_STATUS \ - mfc0 a0, COP_0_STATUS_REG ;\ + mfc0 a0, MIPS_COP_0_STATUS ;\ li a2, ~(MIPS_SR_INT_IE | MIPS_SR_EXL | SR_KSU_USER) ; \ and a0, a0, a2 ; \ - mtc0 a0, COP_0_STATUS_REG ; \ + mtc0 a0, MIPS_COP_0_STATUS ; \ ITLBNOPFIX #endif @@ -302,10 +302,10 @@ SlowFault: SAVE_REG(s8, S8, sp) ;\ mflo v0 ;\ mfhi v1 ;\ - mfc0 a0, COP_0_STATUS_REG ;\ - mfc0 a1, COP_0_CAUSE_REG ;\ - MFC0 a2, COP_0_BAD_VADDR ;\ - MFC0 a3, COP_0_EXC_PC ;\ + mfc0 a0, MIPS_COP_0_STATUS ;\ + mfc0 a1, MIPS_COP_0_CAUSE ;\ + MFC0 a2, MIPS_COP_0_BAD_VADDR;\ + MFC0 a3, MIPS_COP_0_EXC_PC ;\ SAVE_REG(v0, MULLO, sp) ;\ SAVE_REG(v1, MULHI, sp) ;\ SAVE_REG(a0, SR, sp) ;\ @@ -332,7 +332,7 @@ SlowFault: RESTORE_REG(t1, MULHI, sp) ;\ mtlo t0 ;\ mthi t1 ;\ - MTC0 v0, COP_0_EXC_PC ;\ + MTC0 v0, MIPS_COP_0_EXC_PC ;\ .set noat ;\ RESTORE_REG(AT, AST, sp) ;\ RESTORE_REG(v0, V0, sp) ;\ @@ -363,7 +363,7 @@ SlowFault: RESTORE_REG(gp, GP, sp) ;\ RESTORE_REG(ra, RA, sp) ;\ PTR_ADDU sp, sp, KERN_EXC_FRAME_SIZE;\ - mtc0 k0, COP_0_STATUS_REG + mtc0 k0, MIPS_COP_0_STATUS /* @@ -396,10 +396,10 @@ NNON_LEAF(MipsKernGenException, KERN_EXC * intr filters if interrupts are enabled later * in trap handler */ - mfc0 a0, COP_0_STATUS_REG - and a0, a0, SR_INT_MASK + mfc0 a0, MIPS_COP_0_STATUS + and a0, a0, MIPS_SR_INT_MASK RESTORE_REG(a1, SR, sp) - and a1, a1, ~SR_INT_MASK + and a1, a1, ~MIPS_SR_INT_MASK or a1, a1, a0 SAVE_REG(a1, SR, sp) RESTORE_CPU # v0 contains the return address. @@ -452,22 +452,22 @@ NNON_LEAF(MipsUserGenException, CALLFRAM SAVE_U_PCB_REG(t2, T2, k1) SAVE_U_PCB_REG(t3, T3, k1) SAVE_U_PCB_REG(ta0, TA0, k1) - mfc0 a0, COP_0_STATUS_REG # First arg is the status reg. + mfc0 a0, MIPS_COP_0_STATUS # First arg is the status reg. SAVE_U_PCB_REG(ta1, TA1, k1) SAVE_U_PCB_REG(ta2, TA2, k1) SAVE_U_PCB_REG(ta3, TA3, k1) SAVE_U_PCB_REG(s0, S0, k1) - mfc0 a1, COP_0_CAUSE_REG # Second arg is the cause reg. + mfc0 a1, MIPS_COP_0_CAUSE # Second arg is the cause reg. SAVE_U_PCB_REG(s1, S1, k1) SAVE_U_PCB_REG(s2, S2, k1) SAVE_U_PCB_REG(s3, S3, k1) SAVE_U_PCB_REG(s4, S4, k1) - MFC0 a2, COP_0_BAD_VADDR # Third arg is the fault addr + MFC0 a2, MIPS_COP_0_BAD_VADDR # Third arg is the fault addr SAVE_U_PCB_REG(s5, S5, k1) SAVE_U_PCB_REG(s6, S6, k1) SAVE_U_PCB_REG(s7, S7, k1) SAVE_U_PCB_REG(t8, T8, k1) - MFC0 a3, COP_0_EXC_PC # Fourth arg is the pc. + MFC0 a3, MIPS_COP_0_EXC_PC # Fourth arg is the pc. SAVE_U_PCB_REG(t9, T9, k1) SAVE_U_PCB_REG(gp, GP, k1) SAVE_U_PCB_REG(sp, SP, k1) @@ -483,13 +483,13 @@ NNON_LEAF(MipsUserGenException, CALLFRAM REG_S a3, CALLFRAME_RA(sp) # for debugging PTR_LA gp, _C_LABEL(_gp) # switch to kernel GP # Turn off fpu and enter kernel mode - and t0, a0, ~(SR_COP_1_BIT | SR_EXL | SR_KSU_MASK | SR_INT_ENAB) + and t0, a0, ~(MIPS_SR_COP_1_BIT | MIPS_SR_EXL | MIPS3_SR_KSU_MASK | MIPS_SR_INT_IE) #if defined(TARGET_OCTEON) - or t0, t0, (MIPS_SR_KX | MIPS_SR_SX | MIPS_SR_UX | MIPS32_SR_PX) + or t0, t0, (MIPS_SR_KX | MIPS_SR_SX | MIPS_SR_UX | MIPS_SR_PX) #elif defined(TARGET_XLR_XLS) or t0, t0, (MIPS_SR_KX | MIPS_SR_COP_2_BIT) #endif - mtc0 t0, COP_0_STATUS_REG + mtc0 t0, MIPS_COP_0_STATUS PTR_ADDU a0, k1, U_PCB_REGS ITLBNOPFIX @@ -521,10 +521,10 @@ NNON_LEAF(MipsUserGenException, CALLFRAM * Some of interrupts could be enabled by ithread * scheduled by ast() */ - mfc0 a0, COP_0_STATUS_REG - and a0, a0, SR_INT_MASK + mfc0 a0, MIPS_COP_0_STATUS + and a0, a0, MIPS_SR_INT_MASK RESTORE_U_PCB_REG(a1, SR, k1) - and a1, a1, ~SR_INT_MASK + and a1, a1, ~MIPS_SR_INT_MASK or a1, a1, a0 SAVE_U_PCB_REG(a1, SR, k1) @@ -534,7 +534,7 @@ NNON_LEAF(MipsUserGenException, CALLFRAM mthi t1 RESTORE_U_PCB_REG(a0, PC, k1) RESTORE_U_PCB_REG(v0, V0, k1) - MTC0 a0, COP_0_EXC_PC # set return address + MTC0 a0, MIPS_COP_0_EXC_PC # set return address RESTORE_U_PCB_REG(v1, V1, k1) RESTORE_U_PCB_REG(a0, A0, k1) RESTORE_U_PCB_REG(a1, A1, k1) @@ -566,7 +566,7 @@ NNON_LEAF(MipsUserGenException, CALLFRAM .set noat RESTORE_U_PCB_REG(AT, AST, k1) - mtc0 k0, COP_0_STATUS_REG # still exception level + mtc0 k0, MIPS_COP_0_STATUS # still exception level ITLBNOPFIX sync eret @@ -612,10 +612,10 @@ NNON_LEAF(MipsKernIntr, KERN_EXC_FRAME_S * intr filters if interrupts are enabled later * in trap handler */ - mfc0 a0, COP_0_STATUS_REG - and a0, a0, SR_INT_MASK + mfc0 a0, MIPS_COP_0_STATUS + and a0, a0, MIPS_SR_INT_MASK RESTORE_REG(a1, SR, sp) - and a1, a1, ~SR_INT_MASK + and a1, a1, ~MIPS_SR_INT_MASK or a1, a1, a0 SAVE_REG(a1, SR, sp) REG_L v0, CALLFRAME_RA + KERN_REG_SIZE(sp) @@ -689,9 +689,9 @@ NNON_LEAF(MipsUserIntr, CALLFRAME_SIZ, r mflo v0 # get lo/hi late to avoid stall mfhi v1 - mfc0 a0, COP_0_STATUS_REG - mfc0 a1, COP_0_CAUSE_REG - MFC0 a3, COP_0_EXC_PC + mfc0 a0, MIPS_COP_0_STATUS + mfc0 a1, MIPS_COP_0_CAUSE + MFC0 a3, MIPS_COP_0_EXC_PC SAVE_U_PCB_REG(v0, MULLO, k1) SAVE_U_PCB_REG(v1, MULHI, k1) SAVE_U_PCB_REG(a0, SR, k1) @@ -701,13 +701,13 @@ NNON_LEAF(MipsUserIntr, CALLFRAME_SIZ, r PTR_LA gp, _C_LABEL(_gp) # switch to kernel GP # Turn off fpu, disable interrupts, set kernel mode kernel mode, clear exception level. - and t0, a0, ~(SR_COP_1_BIT | SR_EXL | SR_INT_ENAB | SR_KSU_MASK) + and t0, a0, ~(MIPS_SR_COP_1_BIT | MIPS_SR_EXL | MIPS_SR_INT_IE | MIPS3_SR_KSU_MASK) #ifdef TARGET_OCTEON - or t0, t0, (MIPS_SR_KX | MIPS_SR_SX | MIPS_SR_UX | MIPS32_SR_PX) + or t0, t0, (MIPS_SR_KX | MIPS_SR_SX | MIPS_SR_UX | MIPS_SR_PX) #elif defined(TARGET_XLR_XLS) or t0, t0, (MIPS_SR_KX | MIPS_SR_COP_2_BIT) #endif - mtc0 t0, COP_0_STATUS_REG + mtc0 t0, MIPS_COP_0_STATUS ITLBNOPFIX PTR_ADDU a0, k1, U_PCB_REGS /* @@ -724,9 +724,9 @@ NNON_LEAF(MipsUserIntr, CALLFRAME_SIZ, r * If that processor is also doing AST processing with interrupts disabled * then we may deadlock. */ - mfc0 a0, COP_0_STATUS_REG - or a0, a0, SR_INT_ENAB - mtc0 a0, COP_0_STATUS_REG + mfc0 a0, MIPS_COP_0_STATUS + or a0, a0, MIPS_SR_INT_IE + mtc0 a0, MIPS_COP_0_STATUS ITLBNOPFIX /* @@ -747,10 +747,10 @@ NNON_LEAF(MipsUserIntr, CALLFRAME_SIZ, r * Some of interrupts could be disabled by * intr filters */ - mfc0 a0, COP_0_STATUS_REG - and a0, a0, SR_INT_MASK + mfc0 a0, MIPS_COP_0_STATUS + and a0, a0, MIPS_SR_INT_MASK RESTORE_U_PCB_REG(a1, SR, k1) - and a1, a1, ~SR_INT_MASK + and a1, a1, ~MIPS_SR_INT_MASK or a1, a1, a0 SAVE_U_PCB_REG(a1, SR, k1) @@ -768,7 +768,7 @@ NNON_LEAF(MipsUserIntr, CALLFRAME_SIZ, r RESTORE_U_PCB_REG(t2, PC, k1) mtlo t0 mthi t1 - MTC0 t2, COP_0_EXC_PC # set return address + MTC0 t2, MIPS_COP_0_EXC_PC # set return address RESTORE_U_PCB_REG(v0, V0, k1) RESTORE_U_PCB_REG(v1, V1, k1) RESTORE_U_PCB_REG(a0, A0, k1) @@ -792,7 +792,7 @@ NNON_LEAF(MipsUserIntr, CALLFRAME_SIZ, r .set noat RESTORE_U_PCB_REG(AT, AST, k1) - mtc0 k0, COP_0_STATUS_REG # SR with EXL set. + mtc0 k0, MIPS_COP_0_STATUS # SR with EXL set. ITLBNOPFIX sync eret @@ -804,7 +804,7 @@ NLEAF(MipsTLBInvalidException) .set noat .set noreorder - MFC0 k0, COP_0_BAD_VADDR + MFC0 k0, MIPS_COP_0_BAD_VADDR PTR_LI k1, VM_MAXUSER_ADDRESS sltu k1, k0, k1 bnez k1, 1f @@ -833,7 +833,7 @@ NLEAF(MipsTLBInvalidException) beqz k1, 3f nop - MFC0 k0, COP_0_BAD_VADDR # k0=bad address (again) + MFC0 k0, MIPS_COP_0_BAD_VADDR # k0=bad address (again) PTR_SRL k0, PAGE_SHIFT - 2 # k0=VPN andi k0, k0, 0xffc # k0=page tab offset PTR_ADDU k1, k1, k0 # k1=pte address @@ -852,10 +852,10 @@ NLEAF(MipsTLBInvalidException) lw k0, 0(k1) lw k1, 4(k1) CLEAR_PTE_SWBITS(k0) - MTC0 k0, COP_0_TLB_LO0 + MTC0 k0, MIPS_COP_0_TLB_LO0 COP0_SYNC CLEAR_PTE_SWBITS(k1) - MTC0 k1, COP_0_TLB_LO1 + MTC0 k1, MIPS_COP_0_TLB_LO1 COP0_SYNC b tlb_insert_entry @@ -865,16 +865,16 @@ odd_page: lw k0, -4(k1) lw k1, 0(k1) CLEAR_PTE_SWBITS(k0) - MTC0 k0, COP_0_TLB_LO0 + MTC0 k0, MIPS_COP_0_TLB_LO0 COP0_SYNC CLEAR_PTE_SWBITS(k1) - MTC0 k1, COP_0_TLB_LO1 + MTC0 k1, MIPS_COP_0_TLB_LO1 COP0_SYNC tlb_insert_entry: tlbp HAZARD_DELAY - mfc0 k0, COP_0_TLB_INDEX + mfc0 k0, MIPS_COP_0_TLB_INDEX bltz k0, tlb_insert_random nop tlbwi @@ -890,7 +890,7 @@ tlb_insert_random: /* * Branch to the comprehensive exception processing. */ - mfc0 k1, COP_0_STATUS_REG + mfc0 k1, MIPS_COP_0_STATUS andi k1, k1, SR_KSU_USER bnez k1, _C_LABEL(MipsUserGenException) nop @@ -980,7 +980,7 @@ END(MipsTLBInvalidException) */ NLEAF(MipsTLBMissException) .set noat - MFC0 k0, COP_0_BAD_VADDR # k0=bad address + MFC0 k0, MIPS_COP_0_BAD_VADDR # k0=bad address PTR_LI k1, VM_MAX_KERNEL_ADDRESS # check fault address against sltu k1, k1, k0 # upper bound of kernel_segmap bnez k1, MipsKernGenException # out of bound @@ -991,7 +991,7 @@ NLEAF(MipsTLBMissException) andi k0, k0, PTRMASK # k0=seg offset PTR_ADDU k1, k0, k1 # k1=seg entry address PTR_L k1, 0(k1) # k1=seg entry - MFC0 k0, COP_0_BAD_VADDR # k0=bad address (again) + MFC0 k0, MIPS_COP_0_BAD_VADDR # k0=bad address (again) beq k1, zero, MipsKernGenException # ==0 -- no page table PTR_SRL k0, PAGE_SHIFT - 2 # k0=VPN andi k0, k0, 0xff8 # k0=page tab offset @@ -999,10 +999,10 @@ NLEAF(MipsTLBMissException) lw k0, 0(k1) # k0=lo0 pte lw k1, 4(k1) # k1=lo1 pte CLEAR_PTE_SWBITS(k0) - MTC0 k0, COP_0_TLB_LO0 # lo0 is loaded + MTC0 k0, MIPS_COP_0_TLB_LO0 # lo0 is loaded COP0_SYNC CLEAR_PTE_SWBITS(k1) - MTC0 k1, COP_0_TLB_LO1 # lo1 is loaded + MTC0 k1, MIPS_COP_0_TLB_LO1 # lo1 is loaded COP0_SYNC tlbwr # write to tlb HAZARD_DELAY @@ -1031,15 +1031,15 @@ END(MipsTLBMissException) */ NON_LEAF(MipsFPTrap, CALLFRAME_SIZ, ra) PTR_SUBU sp, sp, CALLFRAME_SIZ - mfc0 t0, COP_0_STATUS_REG + mfc0 t0, MIPS_COP_0_STATUS REG_S ra, CALLFRAME_RA(sp) .mask 0x80000000, (CALLFRAME_RA - CALLFRAME_SIZ) - or t1, t0, SR_COP_1_BIT - mtc0 t1, COP_0_STATUS_REG + or t1, t0, MIPS_SR_COP_1_BIT + mtc0 t1, MIPS_COP_0_STATUS ITLBNOPFIX - cfc1 t1, FPC_CSR # stall til FP done - cfc1 t1, FPC_CSR # now get status + cfc1 t1, MIPS_FPU_CSR # stall til FP done + cfc1 t1, MIPS_FPU_CSR # now get status nop sll t2, t1, (31 - 17) # unimplemented operation? bgez t2, 3f # no, normal trap @@ -1087,8 +1087,8 @@ NON_LEAF(MipsFPTrap, CALLFRAME_SIZ, ra) * Check to see if the instruction to be emulated is a floating-point * instruction. */ - srl a3, a0, OPCODE_SHIFT - beq a3, OPCODE_C1, 4f # this should never fail + srl a3, a0, MIPS_OPCODE_SHIFT + beq a3, MIPS_OPCODE_C1, 4f # this should never fail nop /* * Send a floating point exception signal to the current process. @@ -1096,8 +1096,8 @@ NON_LEAF(MipsFPTrap, CALLFRAME_SIZ, ra) 3: GET_CPU_PCPU(a0) PTR_L a0, PC_CURTHREAD(a0) # get current thread - cfc1 a2, FPC_CSR # code = FP execptions - ctc1 zero, FPC_CSR # Clear exceptions + cfc1 a2, MIPS_FPU_CSR # code = FP execptions + ctc1 zero, MIPS_FPU_CSR # Clear exceptions PTR_LA t3, _C_LABEL(trapsignal) jalr t3 li a1, SIGFPE @@ -1116,10 +1116,10 @@ NON_LEAF(MipsFPTrap, CALLFRAME_SIZ, ra) * Turn off the floating point coprocessor and return. */ FPReturn: - mfc0 t0, COP_0_STATUS_REG + mfc0 t0, MIPS_COP_0_STATUS PTR_L ra, CALLFRAME_RA(sp) - and t0, t0, ~SR_COP_1_BIT - mtc0 t0, COP_0_STATUS_REG + and t0, t0, ~MIPS_SR_COP_1_BIT + mtc0 t0, MIPS_COP_0_STATUS ITLBNOPFIX j ra PTR_ADDU sp, sp, CALLFRAME_SIZ @@ -1168,15 +1168,15 @@ NESTED_NOPROFILE(MipsCacheException, KER .mask 0x80000000, -4 PTR_LA k0, _C_LABEL(panic) # return to panic PTR_LA a0, 9f # panicstr - MFC0 a1, COP_0_ERROR_PC - mfc0 a2, COP_0_CACHE_ERR # 3rd arg cache error + MFC0 a1, MIPS_COP_0_ERROR_PC + mfc0 a2, MIPS_COP_0_CACHE_ERR # 3rd arg cache error - MTC0 k0, COP_0_ERROR_PC # set return address + MTC0 k0, MIPS_COP_0_ERROR_PC # set return address - mfc0 k0, COP_0_STATUS_REG # restore status - li k1, SR_DIAG_DE # ignore further errors + mfc0 k0, MIPS_COP_0_STATUS # restore status + li k1, MIPS_SR_DIAG_PE # ignore further errors or k0, k1 - mtc0 k0, COP_0_STATUS_REG # restore status + mtc0 k0, MIPS_COP_0_STATUS # restore status COP0_SYNC eret Modified: head/sys/mips/mips/fp.S ============================================================================== --- head/sys/mips/mips/fp.S Tue Jul 13 23:58:10 2010 (r210037) +++ head/sys/mips/mips/fp.S Wed Jul 14 00:41:22 2010 (r210038) @@ -41,7 +41,7 @@ #include #include -#include +#include #include "assym.s" @@ -107,10 +107,10 @@ NON_LEAF(MipsEmulateFP, CALLFRAME_SIZ, r bgt v0, 4 << 2, ill # illegal format or v1, v1, v0 - cfc1 a1, FPC_CSR # get exception register + cfc1 a1, MIPS_FPU_CSR # get exception register lw a3, func_fmt_tbl(v1) # switch on FUNC & FMT - and a1, a1, ~FPC_EXCEPTION_UNIMPL # clear exception - ctc1 a1, FPC_CSR + and a1, a1, ~MIPS_FPU_EXCEPTION_UNIMPL # clear exception + ctc1 a1, MIPS_FPU_CSR j a3 .rdata @@ -665,8 +665,8 @@ add_sub_s: 3: bne ta1, zero, result_ft_s # if FT != 0, result=FT bne ta2, zero, result_ft_s - and v0, a1, FPC_ROUNDING_BITS # get rounding mode - bne v0, FPC_ROUND_RM, 1f # round to -infinity? + and v0, a1, MIPS_FPU_ROUNDING_BITS # get rounding mode + bne v0, MIPS_FPU_ROUND_RM, 1f # round to -infinity? or t0, t0, ta0 # compute result sign b result_fs_s 1: @@ -724,8 +724,8 @@ add_sub_s: bne t2, ta2, 2f # if same, result=0 move t1, zero # result=0 move t2, zero - and v0, a1, FPC_ROUNDING_BITS # get rounding mode - bne v0, FPC_ROUND_RM, 1f # round to -infinity? + and v0, a1, MIPS_FPU_ROUNDING_BITS # get rounding mode + bne v0, MIPS_FPU_ROUND_RM, 1f # round to -infinity? or t0, t0, ta0 # compute result sign b result_fs_s 1: @@ -788,8 +788,8 @@ add_sub_d: bne ta1, zero, result_ft_d # if FT != 0, result=FT bne ta2, zero, result_ft_d bne ta3, zero, result_ft_d - and v0, a1, FPC_ROUNDING_BITS # get rounding mode - bne v0, FPC_ROUND_RM, 1f # round to -infinity? + and v0, a1, MIPS_FPU_ROUNDING_BITS # get rounding mode + bne v0, MIPS_FPU_ROUND_RM, 1f # round to -infinity? or t0, t0, ta0 # compute result sign b result_fs_d 1: @@ -882,8 +882,8 @@ add_sub_d: move t1, zero # result=0 move t2, zero move t3, zero - and v0, a1, FPC_ROUNDING_BITS # get rounding mode - bne v0, FPC_ROUND_RM, 1f # round to -infinity? + and v0, a1, MIPS_FPU_ROUNDING_BITS # get rounding mode + bne v0, MIPS_FPU_ROUND_RM, 1f # round to -infinity? or t0, t0, ta0 # compute result sign b result_fs_d 1: @@ -1078,10 +1078,10 @@ div_s: 3: bne ta1, zero, 2f # is FT zero? bne ta2, zero, 1f - or a1, a1, FPC_EXCEPTION_DIV0 | FPC_STICKY_DIV0 - and v0, a1, FPC_ENABLE_DIV0 # trap enabled? + or a1, a1, MIPS_FPU_EXCEPTION_DIV0 | MIPS_FPU_STICKY_DIV0 + and v0, a1, MIPS_FPU_ENABLE_DIV0 # trap enabled? bne v0, zero, fpe_trap - ctc1 a1, FPC_CSR # save exceptions + ctc1 a1, MIPS_FPU_CSR # save exceptions li t1, SEXP_INF # result is infinity move t2, zero b result_fs_s @@ -1152,10 +1152,10 @@ div_d: bne ta1, zero, 2f # is FT zero? bne ta2, zero, 1f bne ta3, zero, 1f - or a1, a1, FPC_EXCEPTION_DIV0 | FPC_STICKY_DIV0 - and v0, a1, FPC_ENABLE_DIV0 # trap enabled? + or a1, a1, MIPS_FPU_EXCEPTION_DIV0 | MIPS_FPU_STICKY_DIV0 + and v0, a1, MIPS_FPU_ENABLE_DIV0 # trap enabled? bne v0, zero, fpe_trap - ctc1 a1, FPC_CSR # Save exceptions + ctc1 a1, MIPS_FPU_CSR # Save exceptions li t1, DEXP_INF # result is infinity move t2, zero move t3, zero @@ -1504,10 +1504,10 @@ cvt_w: * round result (t0 is sign, t2 is integer part, t3 is fractional part). */ 2: - and v0, a1, FPC_ROUNDING_BITS # get rounding mode - beq v0, FPC_ROUND_RN, 3f # round to nearest - beq v0, FPC_ROUND_RZ, 5f # round to zero (truncate) - beq v0, FPC_ROUND_RP, 1f # round to +infinity + and v0, a1, MIPS_FPU_ROUNDING_BITS # get rounding mode + beq v0, MIPS_FPU_ROUND_RN, 3f # round to nearest + beq v0, MIPS_FPU_ROUND_RZ, 5f # round to zero (truncate) + beq v0, MIPS_FPU_ROUND_RP, 1f # round to +infinity beq t0, zero, 5f # if sign is positive, truncate b 2f 1: @@ -1536,10 +1536,10 @@ cvt_w: * Handle inexact exception. */ inexact_w: - or a1, a1, FPC_EXCEPTION_INEXACT | FPC_STICKY_INEXACT - and v0, a1, FPC_ENABLE_INEXACT + or a1, a1, MIPS_FPU_EXCEPTION_INEXACT | MIPS_FPU_STICKY_INEXACT + and v0, a1, MIPS_FPU_ENABLE_INEXACT bne v0, zero, fpe_trap - ctc1 a1, FPC_CSR # save exceptions + ctc1 a1, MIPS_FPU_CSR # save exceptions b result_fs_w /* @@ -1548,10 +1548,10 @@ inexact_w: * or generate an invalid exception. */ overflow_w: - or a1, a1, FPC_EXCEPTION_OVERFLOW | FPC_STICKY_OVERFLOW - and v0, a1, FPC_ENABLE_OVERFLOW + or a1, a1, MIPS_FPU_EXCEPTION_OVERFLOW | MIPS_FPU_STICKY_OVERFLOW + and v0, a1, MIPS_FPU_ENABLE_OVERFLOW bne v0, zero, fpe_trap - and v0, a1, FPC_ENABLE_INEXACT + and v0, a1, MIPS_FPU_ENABLE_INEXACT bne v0, zero, inexact_w # inexact traps enabled? b invalid_w @@ -1561,10 +1561,10 @@ overflow_w: * or generate an invalid exception. */ underflow_w: - or a1, a1, FPC_EXCEPTION_UNDERFLOW | FPC_STICKY_UNDERFLOW - and v0, a1, FPC_ENABLE_UNDERFLOW + or a1, a1, MIPS_FPU_EXCEPTION_UNDERFLOW | MIPS_FPU_STICKY_UNDERFLOW + and v0, a1, MIPS_FPU_ENABLE_UNDERFLOW bne v0, zero, fpe_trap - and v0, a1, FPC_ENABLE_INEXACT + and v0, a1, MIPS_FPU_ENABLE_INEXACT bne v0, zero, inexact_w # inexact traps enabled? b invalid_w @@ -1640,29 +1640,29 @@ test_cond: and v0, v0, a0 # condition match instruction? set_cond: bne v0, zero, 1f - and a1, a1, ~FPC_COND_BIT # clear condition bit + and a1, a1, ~MIPS_FPU_COND_BIT # clear condition bit b 2f 1: - or a1, a1, FPC_COND_BIT # set condition bit + or a1, a1, MIPS_FPU_COND_BIT # set condition bit 2: - ctc1 a1, FPC_CSR # save condition bit + ctc1 a1, MIPS_FPU_CSR # save condition bit b done unordered: and v0, a0, COND_UNORDERED # this cmp match unordered? bne v0, zero, 1f - and a1, a1, ~FPC_COND_BIT # clear condition bit + and a1, a1, ~MIPS_FPU_COND_BIT # clear condition bit b 2f 1: - or a1, a1, FPC_COND_BIT # set condition bit + or a1, a1, MIPS_FPU_COND_BIT # set condition bit 2: and v0, a0, COND_SIGNAL beq v0, zero, 1f # is this a signaling cmp? - or a1, a1, FPC_EXCEPTION_INVALID | FPC_STICKY_INVALID - and v0, a1, FPC_ENABLE_INVALID + or a1, a1, MIPS_FPU_EXCEPTION_INVALID | MIPS_FPU_STICKY_INVALID + and v0, a1, MIPS_FPU_ENABLE_INVALID bne v0, zero, fpe_trap 1: - ctc1 a1, FPC_CSR # save condition bit + ctc1 a1, MIPS_FPU_CSR # save condition bit b done /* @@ -1727,10 +1727,10 @@ norm_s: norm_noshift_s: move ta1, t1 # save unrounded exponent move ta2, t2 # save unrounded fraction - and v0, a1, FPC_ROUNDING_BITS # get rounding mode - beq v0, FPC_ROUND_RN, 3f # round to nearest - beq v0, FPC_ROUND_RZ, 5f # round to zero (truncate) - beq v0, FPC_ROUND_RP, 1f # round to +infinity + and v0, a1, MIPS_FPU_ROUNDING_BITS # get rounding mode + beq v0, MIPS_FPU_ROUND_RN, 3f # round to nearest + beq v0, MIPS_FPU_ROUND_RZ, 5f # round to zero (truncate) + beq v0, MIPS_FPU_ROUND_RP, 1f # round to +infinity beq t0, zero, 5f # if sign is positive, truncate b 2f 1: @@ -1770,10 +1770,10 @@ inexact_s: and t2, t2, ~SIMPL_ONE # clear implied one bit inexact_nobias_s: jal set_fd_s # save result - or a1, a1, FPC_EXCEPTION_INEXACT | FPC_STICKY_INEXACT - and v0, a1, FPC_ENABLE_INEXACT + or a1, a1, MIPS_FPU_EXCEPTION_INEXACT | MIPS_FPU_STICKY_INEXACT + and v0, a1, MIPS_FPU_ENABLE_INEXACT bne v0, zero, fpe_trap - ctc1 a1, FPC_CSR # save exceptions + ctc1 a1, MIPS_FPU_CSR # save exceptions b done /* @@ -1782,18 +1782,18 @@ inexact_nobias_s: * or generate an infinity. */ overflow_s: - or a1, a1, FPC_EXCEPTION_OVERFLOW | FPC_STICKY_OVERFLOW - and v0, a1, FPC_ENABLE_OVERFLOW + or a1, a1, MIPS_FPU_EXCEPTION_OVERFLOW | MIPS_FPU_STICKY_OVERFLOW + and v0, a1, MIPS_FPU_ENABLE_OVERFLOW beq v0, zero, 1f subu t1, t1, 192 # bias exponent and t2, t2, ~SIMPL_ONE # clear implied one bit jal set_fd_s # save result b fpe_trap 1: - and v0, a1, FPC_ROUNDING_BITS # get rounding mode - beq v0, FPC_ROUND_RN, 3f # round to nearest - beq v0, FPC_ROUND_RZ, 1f # round to zero (truncate) - beq v0, FPC_ROUND_RP, 2f # round to +infinity + and v0, a1, MIPS_FPU_ROUNDING_BITS # get rounding mode + beq v0, MIPS_FPU_ROUND_RN, 3f # round to nearest + beq v0, MIPS_FPU_ROUND_RZ, 1f # round to zero (truncate) + beq v0, MIPS_FPU_ROUND_RP, 2f # round to +infinity bne t0, zero, 3f 1: li t1, SEXP_MAX # result is max finite @@ -1811,7 +1811,7 @@ overflow_s: * "loss of accuracy" is detected as "an inexact result". */ underflow_s: - and v0, a1, FPC_ENABLE_UNDERFLOW + and v0, a1, MIPS_FPU_ENABLE_UNDERFLOW beq v0, zero, 1f /* * Underflow is enabled so compute the result and trap. @@ -1819,7 +1819,7 @@ underflow_s: addu t1, t1, 192 # bias exponent and t2, t2, ~SIMPL_ONE # clear implied one bit jal set_fd_s # save result - or a1, a1, FPC_EXCEPTION_UNDERFLOW | FPC_STICKY_UNDERFLOW + or a1, a1, MIPS_FPU_EXCEPTION_UNDERFLOW | MIPS_FPU_STICKY_UNDERFLOW b fpe_trap /* * Underflow is not enabled so compute the result, @@ -1833,15 +1833,15 @@ underflow_s: blt t9, SFRAC_BITS+2, 3f # shift all the bits out? move t1, zero # result is inexact zero move t2, zero - or a1, a1, FPC_EXCEPTION_UNDERFLOW | FPC_STICKY_UNDERFLOW + or a1, a1, MIPS_FPU_EXCEPTION_UNDERFLOW | MIPS_FPU_STICKY_UNDERFLOW /* * Now round the zero result. * Only need to worry about rounding to +- infinity when the sign matches. */ - and v0, a1, FPC_ROUNDING_BITS # get rounding mode - beq v0, FPC_ROUND_RN, inexact_nobias_s # round to nearest - beq v0, FPC_ROUND_RZ, inexact_nobias_s # round to zero - beq v0, FPC_ROUND_RP, 1f # round to +infinity + and v0, a1, MIPS_FPU_ROUNDING_BITS # get rounding mode + beq v0, MIPS_FPU_ROUND_RN, inexact_nobias_s # round to nearest + beq v0, MIPS_FPU_ROUND_RZ, inexact_nobias_s # round to zero + beq v0, MIPS_FPU_ROUND_RP, 1f # round to +infinity beq t0, zero, inexact_nobias_s # if sign is positive, truncate b 2f 1: @@ -1859,10 +1859,10 @@ underflow_s: /* * Now round the denormalized result. */ - and v0, a1, FPC_ROUNDING_BITS # get rounding mode - beq v0, FPC_ROUND_RN, 3f # round to nearest - beq v0, FPC_ROUND_RZ, 5f # round to zero (truncate) - beq v0, FPC_ROUND_RP, 1f # round to +infinity + and v0, a1, MIPS_FPU_ROUNDING_BITS # get rounding mode + beq v0, MIPS_FPU_ROUND_RN, 3f # round to nearest + beq v0, MIPS_FPU_ROUND_RZ, 5f # round to zero (truncate) + beq v0, MIPS_FPU_ROUND_RP, 1f # round to +infinity beq t0, zero, 5f # if sign is positive, truncate b 2f 1: @@ -1884,11 +1884,11 @@ underflow_s: move t1, zero # denorm or zero exponent jal set_fd_s # save result beq t8, zero, done # check for exact result - or a1, a1, FPC_EXCEPTION_UNDERFLOW | FPC_STICKY_UNDERFLOW - or a1, a1, FPC_EXCEPTION_INEXACT | FPC_STICKY_INEXACT - and v0, a1, FPC_ENABLE_INEXACT + or a1, a1, MIPS_FPU_EXCEPTION_UNDERFLOW | MIPS_FPU_STICKY_UNDERFLOW + or a1, a1, MIPS_FPU_EXCEPTION_INEXACT | MIPS_FPU_STICKY_INEXACT + and v0, a1, MIPS_FPU_ENABLE_INEXACT bne v0, zero, fpe_trap - ctc1 a1, FPC_CSR # save exceptions + ctc1 a1, MIPS_FPU_CSR # save exceptions b done /* @@ -1973,10 +1973,10 @@ norm_noshift_d: move ta1, t1 # save unrounded exponent move ta2, t2 # save unrounded fraction (MS) move ta3, t3 # save unrounded fraction (LS) - and v0, a1, FPC_ROUNDING_BITS # get rounding mode - beq v0, FPC_ROUND_RN, 3f # round to nearest - beq v0, FPC_ROUND_RZ, 5f # round to zero (truncate) - beq v0, FPC_ROUND_RP, 1f # round to +infinity + and v0, a1, MIPS_FPU_ROUNDING_BITS # get rounding mode + beq v0, MIPS_FPU_ROUND_RN, 3f # round to nearest + beq v0, MIPS_FPU_ROUND_RZ, 5f # round to zero (truncate) + beq v0, MIPS_FPU_ROUND_RP, 1f # round to +infinity beq t0, zero, 5f # if sign is positive, truncate b 2f 1: @@ -2020,10 +2020,10 @@ inexact_d: and t2, t2, ~DIMPL_ONE # clear implied one bit inexact_nobias_d: jal set_fd_d # save result - or a1, a1, FPC_EXCEPTION_INEXACT | FPC_STICKY_INEXACT - and v0, a1, FPC_ENABLE_INEXACT + or a1, a1, MIPS_FPU_EXCEPTION_INEXACT | MIPS_FPU_STICKY_INEXACT + and v0, a1, MIPS_FPU_ENABLE_INEXACT bne v0, zero, fpe_trap - ctc1 a1, FPC_CSR # save exceptions + ctc1 a1, MIPS_FPU_CSR # save exceptions b done /* @@ -2032,18 +2032,18 @@ inexact_nobias_d: * or generate an infinity. */ overflow_d: - or a1, a1, FPC_EXCEPTION_OVERFLOW | FPC_STICKY_OVERFLOW - and v0, a1, FPC_ENABLE_OVERFLOW + or a1, a1, MIPS_FPU_EXCEPTION_OVERFLOW | MIPS_FPU_STICKY_OVERFLOW + and v0, a1, MIPS_FPU_ENABLE_OVERFLOW beq v0, zero, 1f subu t1, t1, 1536 # bias exponent and t2, t2, ~DIMPL_ONE # clear implied one bit jal set_fd_d # save result b fpe_trap 1: - and v0, a1, FPC_ROUNDING_BITS # get rounding mode - beq v0, FPC_ROUND_RN, 3f # round to nearest - beq v0, FPC_ROUND_RZ, 1f # round to zero (truncate) - beq v0, FPC_ROUND_RP, 2f # round to +infinity + and v0, a1, MIPS_FPU_ROUNDING_BITS # get rounding mode + beq v0, MIPS_FPU_ROUND_RN, 3f # round to nearest + beq v0, MIPS_FPU_ROUND_RZ, 1f # round to zero (truncate) + beq v0, MIPS_FPU_ROUND_RP, 2f # round to +infinity bne t0, zero, 3f 1: li t1, DEXP_MAX # result is max finite @@ -2063,7 +2063,7 @@ overflow_d: * "loss of accuracy" is detected as "an inexact result". */ underflow_d: - and v0, a1, FPC_ENABLE_UNDERFLOW + and v0, a1, MIPS_FPU_ENABLE_UNDERFLOW beq v0, zero, 1f /* * Underflow is enabled so compute the result and trap. @@ -2071,7 +2071,7 @@ underflow_d: addu t1, t1, 1536 # bias exponent and t2, t2, ~DIMPL_ONE # clear implied one bit jal set_fd_d # save result - or a1, a1, FPC_EXCEPTION_UNDERFLOW | FPC_STICKY_UNDERFLOW + or a1, a1, MIPS_FPU_EXCEPTION_UNDERFLOW | MIPS_FPU_STICKY_UNDERFLOW b fpe_trap /* * Underflow is not enabled so compute the result, @@ -2087,15 +2087,15 @@ underflow_d: move t1, zero # result is inexact zero move t2, zero move t3, zero - or a1, a1, FPC_EXCEPTION_UNDERFLOW | FPC_STICKY_UNDERFLOW + or a1, a1, MIPS_FPU_EXCEPTION_UNDERFLOW | MIPS_FPU_STICKY_UNDERFLOW /* * Now round the zero result. * Only need to worry about rounding to +- infinity when the sign matches. */ - and v0, a1, FPC_ROUNDING_BITS # get rounding mode - beq v0, FPC_ROUND_RN, inexact_nobias_d # round to nearest - beq v0, FPC_ROUND_RZ, inexact_nobias_d # round to zero - beq v0, FPC_ROUND_RP, 1f # round to +infinity + and v0, a1, MIPS_FPU_ROUNDING_BITS # get rounding mode + beq v0, MIPS_FPU_ROUND_RN, inexact_nobias_d # round to nearest + beq v0, MIPS_FPU_ROUND_RZ, inexact_nobias_d # round to zero + beq v0, MIPS_FPU_ROUND_RP, 1f # round to +infinity beq t0, zero, inexact_nobias_d # if sign is positive, truncate b 2f 1: @@ -2127,10 +2127,10 @@ underflow_d: * Now round the denormalized result. */ 2: - and v0, a1, FPC_ROUNDING_BITS # get rounding mode - beq v0, FPC_ROUND_RN, 3f # round to nearest - beq v0, FPC_ROUND_RZ, 5f # round to zero (truncate) - beq v0, FPC_ROUND_RP, 1f # round to +infinity + and v0, a1, MIPS_FPU_ROUNDING_BITS # get rounding mode + beq v0, MIPS_FPU_ROUND_RN, 3f # round to nearest + beq v0, MIPS_FPU_ROUND_RZ, 5f # round to zero (truncate) + beq v0, MIPS_FPU_ROUND_RP, 1f # round to +infinity beq t0, zero, 5f # if sign is positive, truncate b 2f 1: @@ -2156,11 +2156,11 @@ underflow_d: move t1, zero # denorm or zero exponent jal set_fd_d # save result beq t8, zero, done # check for exact result - or a1, a1, FPC_EXCEPTION_UNDERFLOW | FPC_STICKY_UNDERFLOW - or a1, a1, FPC_EXCEPTION_INEXACT | FPC_STICKY_INEXACT - and v0, a1, FPC_ENABLE_INEXACT + or a1, a1, MIPS_FPU_EXCEPTION_UNDERFLOW | MIPS_FPU_STICKY_UNDERFLOW + or a1, a1, MIPS_FPU_EXCEPTION_INEXACT | MIPS_FPU_STICKY_INEXACT + and v0, a1, MIPS_FPU_ENABLE_INEXACT bne v0, zero, fpe_trap - ctc1 a1, FPC_CSR # save exceptions + ctc1 a1, MIPS_FPU_CSR # save exceptions b done /* @@ -2168,10 +2168,10 @@ underflow_d: * the result is a quiet NAN. */ invalid_s: # trap invalid operation - or a1, a1, FPC_EXCEPTION_INVALID | FPC_STICKY_INVALID - and v0, a1, FPC_ENABLE_INVALID + or a1, a1, MIPS_FPU_EXCEPTION_INVALID | MIPS_FPU_STICKY_INVALID + and v0, a1, MIPS_FPU_ENABLE_INVALID bne v0, zero, fpe_trap - ctc1 a1, FPC_CSR # save exceptions + ctc1 a1, MIPS_FPU_CSR # save exceptions move t0, zero # result is a quiet NAN li t1, SEXP_INF li t2, SQUIET_NAN @@ -2183,10 +2183,10 @@ invalid_s: # trap invalid operation * the result is a quiet NAN. */ invalid_d: # trap invalid operation - or a1, a1, FPC_EXCEPTION_INVALID | FPC_STICKY_INVALID - and v0, a1, FPC_ENABLE_INVALID + or a1, a1, MIPS_FPU_EXCEPTION_INVALID | MIPS_FPU_STICKY_INVALID + and v0, a1, MIPS_FPU_ENABLE_INVALID bne v0, zero, fpe_trap - ctc1 a1, FPC_CSR # save exceptions + ctc1 a1, MIPS_FPU_CSR # save exceptions move t0, zero # result is a quiet NAN li t1, DEXP_INF li t2, DQUIET_NAN0 @@ -2199,10 +2199,10 @@ invalid_d: # trap invalid operation * the result is INT_MAX or INT_MIN. */ invalid_w: # trap invalid operation - or a1, a1, FPC_EXCEPTION_INVALID | FPC_STICKY_INVALID - and v0, a1, FPC_ENABLE_INVALID + or a1, a1, MIPS_FPU_EXCEPTION_INVALID | MIPS_FPU_STICKY_INVALID + and v0, a1, MIPS_FPU_ENABLE_INVALID bne v0, zero, fpe_trap - ctc1 a1, FPC_CSR # save exceptions + ctc1 a1, MIPS_FPU_CSR # save exceptions bne t0, zero, 1f li t2, INT_MAX # result is INT_MAX b result_fs_w @@ -2215,14 +2215,14 @@ invalid_w: # trap invalid operation */ fpe_trap: move a2, a1 # code = FP CSR - ctc1 a1, FPC_CSR # save exceptions + ctc1 a1, MIPS_FPU_CSR # save exceptions break 0 /* * Send an illegal instruction signal to the current process. */ ill: - ctc1 a1, FPC_CSR # save exceptions + ctc1 a1, MIPS_FPU_CSR # save exceptions move a2, a0 # code = FP instruction break 0 Modified: head/sys/mips/mips/machdep.c ============================================================================== --- head/sys/mips/mips/machdep.c Tue Jul 13 23:58:10 2010 (r210037) +++ head/sys/mips/mips/machdep.c Wed Jul 14 00:41:22 2010 (r210038) @@ -344,19 +344,19 @@ mips_vector_init(void) if (MipsCacheEnd - MipsCache > 0x80) panic("startup: Cache error code too large"); - bcopy(MipsTLBMiss, (void *)TLB_MISS_EXC_VEC, + bcopy(MipsTLBMiss, (void *)MIPS_UTLB_MISS_EXC_VEC, MipsTLBMissEnd - MipsTLBMiss); #if defined(TARGET_OCTEON) || defined(TARGET_XLR_XLS) /* Fake, but sufficient, for the 32-bit with 64-bit hardware addresses */ - bcopy(MipsTLBMiss, (void *)XTLB_MISS_EXC_VEC, + bcopy(MipsTLBMiss, (void *)MIPS3_XTLB_MISS_EXC_VEC, MipsTLBMissEnd - MipsTLBMiss); #endif - bcopy(MipsException, (void *)GEN_EXC_VEC, + bcopy(MipsException, (void *)MIPS3_GEN_EXC_VEC, MipsExceptionEnd - MipsException); - bcopy(MipsCache, (void *)CACHE_ERR_EXC_VEC, + bcopy(MipsCache, (void *)MIPS3_CACHE_ERR_EXC_VEC, MipsCacheEnd - MipsCache); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Jul 14 00:47:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7CB9E1065674; Wed, 14 Jul 2010 00:47:37 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6C4558FC08; Wed, 14 Jul 2010 00:47:37 +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 o6E0lbB1005261; Wed, 14 Jul 2010 00:47:37 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6E0lbb2005259; Wed, 14 Jul 2010 00:47:37 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007140047.o6E0lbb2005259@svn.freebsd.org> From: Warner Losh Date: Wed, 14 Jul 2010 00:47:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210039 - head/sys/mips/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2010 00:47:37 -0000 Author: imp Date: Wed Jul 14 00:47:37 2010 New Revision: 210039 URL: http://svn.freebsd.org/changeset/base/210039 Log: Remove the unused part of cpu.h now that the rest of the tree has been transitioned to use cpuregs.h spellings. Now we're only 4x too big, according to the bde-ometer. Modified: head/sys/mips/include/cpu.h Modified: head/sys/mips/include/cpu.h ============================================================================== --- head/sys/mips/include/cpu.h Wed Jul 14 00:41:22 2010 (r210038) +++ head/sys/mips/include/cpu.h Wed Jul 14 00:47:37 2010 (r210039) @@ -49,212 +49,17 @@ #include -/* - * Status register. - */ -#define SR_COP_USABILITY 0xf0000000 -#define SR_COP_0_BIT 0x10000000 -#define SR_COP_1_BIT 0x20000000 -#define SR_COP_2_BIT 0x40000000 -#define SR_RP 0x08000000 -#define SR_FR_32 0x04000000 -#define SR_RE 0x02000000 -#define SR_PX 0x00800000 -#define SR_BOOT_EXC_VEC 0x00400000 -#define SR_TLB_SHUTDOWN 0x00200000 -#define SR_SOFT_RESET 0x00100000 -#define SR_DIAG_CH 0x00040000 -#define SR_DIAG_CE 0x00020000 -#define SR_DIAG_DE 0x00010000 -#define SR_KX 0x00000080 -#define SR_SX 0x00000040 -#define SR_UX 0x00000020 +/* BEGIN: these are going away */ + #define SR_KSU_MASK 0x00000018 #define SR_KSU_USER 0x00000010 #define SR_KSU_SUPER 0x00000008 #define SR_KSU_KERNEL 0x00000000 -#define SR_ERL 0x00000004 -#define SR_EXL 0x00000002 -#define SR_INT_ENAB 0x00000001 - -#define SR_INT_MASK 0x0000ff00 -#define SOFT_INT_MASK_0 0x00000100 -#define SOFT_INT_MASK_1 0x00000200 -#define SR_INT_MASK_0 0x00000400 -#define SR_INT_MASK_1 0x00000800 -#define SR_INT_MASK_2 0x00001000 -#define SR_INT_MASK_3 0x00002000 -#define SR_INT_MASK_4 0x00004000 -#define SR_INT_MASK_5 0x00008000 -#define ALL_INT_MASK SR_INT_MASK -#define SOFT_INT_MASK (SOFT_INT_MASK_0 | SOFT_INT_MASK_1) -#define HW_INT_MASK (ALL_INT_MASK & ~SOFT_INT_MASK) #define soft_int_mask(softintr) (1 << ((softintr) + 8)) #define hard_int_mask(hardintr) (1 << ((hardintr) + 10)) -/* - * The bits in the cause register. - * - * CR_BR_DELAY Exception happened in branch delay slot. - * CR_COP_ERR Coprocessor error. - * CR_IP Interrupt pending bits defined below. - * CR_EXC_CODE The exception type (see exception codes below). - */ -#define CR_BR_DELAY 0x80000000 -#define CR_COP_ERR 0x30000000 -#define CR_EXC_CODE 0x0000007c -#define CR_EXC_CODE_SHIFT 2 -#define CR_IPEND 0x0000ff00 - -/* - * Cause Register Format: - * - * 31 30 29 28 27 26 25 24 23 8 7 6 2 1 0 - * ---------------------------------------------------------------------- - * | BD | 0| CE | 0| W2| W1| IV| IP15 - IP0 | 0| Exc Code | 0| - * |______________________________________________________________________ - */ - -#define CR_INT_SOFT0 0x00000100 -#define CR_INT_SOFT1 0x00000200 -#define CR_INT_0 0x00000400 -#define CR_INT_1 0x00000800 -#define CR_INT_2 0x00001000 -#define CR_INT_3 0x00002000 -#define CR_INT_4 0x00004000 -#define CR_INT_5 0x00008000 - -#define CR_INT_UART CR_INT_1 -#define CR_INT_IPI CR_INT_2 -#define CR_INT_CLOCK CR_INT_5 - -/* - * The bits in the CONFIG register - */ -#define CFG_K0_UNCACHED 2 -#define CFG_K0_CACHED 3 -#define CFG_K0_MASK 0x7 - -/* - * The bits in the context register. - */ -#define CNTXT_PTE_BASE 0xff800000 -#define CNTXT_BAD_VPN2 0x007ffff0 - -/* - * Location of exception vectors. - */ -#define RESET_EXC_VEC ((intptr_t)(int32_t)0xbfc00000) -#define TLB_MISS_EXC_VEC ((intptr_t)(int32_t)0x80000000) -#define XTLB_MISS_EXC_VEC ((intptr_t)(int32_t)0x80000080) -#define CACHE_ERR_EXC_VEC ((intptr_t)(int32_t)0x80000100) -#define GEN_EXC_VEC ((intptr_t)(int32_t)0x80000180) - -/* - * Coprocessor 0 registers: - */ -#define COP_0_TLB_INDEX $0 -#define COP_0_TLB_RANDOM $1 -#define COP_0_TLB_LO0 $2 -#define COP_0_TLB_LO1 $3 -#define COP_0_TLB_CONTEXT $4 -#define COP_0_TLB_PG_MASK $5 -#define COP_0_TLB_WIRED $6 -#define COP_0_INFO $7 -#define COP_0_BAD_VADDR $8 -#define COP_0_COUNT $9 -#define COP_0_TLB_HI $10 -#define COP_0_COMPARE $11 -#define COP_0_STATUS_REG $12 -#define COP_0_CAUSE_REG $13 -#define COP_0_EXC_PC $14 -#define COP_0_PRID $15 -#define COP_0_CONFIG $16 -#define COP_0_LLADDR $17 -#define COP_0_WATCH_LO $18 -#define COP_0_WATCH_HI $19 -#define COP_0_TLB_XCONTEXT $20 -#define COP_0_ECC $26 -#define COP_0_CACHE_ERR $27 -#define COP_0_TAG_LO $28 -#define COP_0_TAG_HI $29 -#define COP_0_ERROR_PC $30 - -/* - * Coprocessor 0 Set 1 - */ -#define C0P_1_IPLLO $18 -#define C0P_1_IPLHI $19 -#define C0P_1_INTCTL $20 -#define C0P_1_DERRADDR0 $26 -#define C0P_1_DERRADDR1 $27 - -/* - * Values for the code field in a break instruction. - */ -#define BREAK_INSTR 0x0000000d -#define BREAK_VAL_MASK 0x03ffffc0 -#define BREAK_VAL_SHIFT 16 -#define BREAK_KDB_VAL 512 -#define BREAK_SSTEP_VAL 513 -#define BREAK_BRKPT_VAL 514 -#define BREAK_SOVER_VAL 515 -#define BREAK_DDB_VAL 516 -#define BREAK_KDB (BREAK_INSTR | (BREAK_KDB_VAL << BREAK_VAL_SHIFT)) -#define BREAK_SSTEP (BREAK_INSTR | (BREAK_SSTEP_VAL << BREAK_VAL_SHIFT)) -#define BREAK_BRKPT (BREAK_INSTR | (BREAK_BRKPT_VAL << BREAK_VAL_SHIFT)) -#define BREAK_SOVER (BREAK_INSTR | (BREAK_SOVER_VAL << BREAK_VAL_SHIFT)) -#define BREAK_DDB (BREAK_INSTR | (BREAK_DDB_VAL << BREAK_VAL_SHIFT)) - -/* - * Mininum and maximum cache sizes. - */ -#define MIN_CACHE_SIZE (16 * 1024) -#define MAX_CACHE_SIZE (256 * 1024) - -/* - * The floating point version and status registers. - */ -#define FPC_ID $0 -#define FPC_CSR $31 - -/* - * The floating point coprocessor status register bits. - */ -#define FPC_ROUNDING_BITS 0x00000003 -#define FPC_ROUND_RN 0x00000000 -#define FPC_ROUND_RZ 0x00000001 -#define FPC_ROUND_RP 0x00000002 -#define FPC_ROUND_RM 0x00000003 -#define FPC_STICKY_BITS 0x0000007c -#define FPC_STICKY_INEXACT 0x00000004 -#define FPC_STICKY_UNDERFLOW 0x00000008 -#define FPC_STICKY_OVERFLOW 0x00000010 -#define FPC_STICKY_DIV0 0x00000020 -#define FPC_STICKY_INVALID 0x00000040 -#define FPC_ENABLE_BITS 0x00000f80 -#define FPC_ENABLE_INEXACT 0x00000080 -#define FPC_ENABLE_UNDERFLOW 0x00000100 -#define FPC_ENABLE_OVERFLOW 0x00000200 -#define FPC_ENABLE_DIV0 0x00000400 -#define FPC_ENABLE_INVALID 0x00000800 -#define FPC_EXCEPTION_BITS 0x0003f000 -#define FPC_EXCEPTION_INEXACT 0x00001000 -#define FPC_EXCEPTION_UNDERFLOW 0x00002000 -#define FPC_EXCEPTION_OVERFLOW 0x00004000 -#define FPC_EXCEPTION_DIV0 0x00008000 -#define FPC_EXCEPTION_INVALID 0x00010000 -#define FPC_EXCEPTION_UNIMPL 0x00020000 -#define FPC_COND_BIT 0x00800000 -#define FPC_FLUSH_BIT 0x01000000 -#define FPC_MBZ_BITS 0xfe7c0000 - -/* - * Constants to determine if have a floating point instruction. - */ -#define OPCODE_SHIFT 26 -#define OPCODE_C1 0x11 +/* END: These are going away */ /* * The first TLB entry that write random hits. @@ -302,7 +107,6 @@ * A machine-independent interface to the CPU's counter. */ #define get_cyclecount() mips_rd_count() - #endif /* !_LOCORE */ /* @@ -372,7 +176,6 @@ #define MIPS_VR5400 0x54 /* NEC Vr5400 FPU ISA IV+ */ #if defined(_KERNEL) && !defined(_LOCORE) - struct user; int Mips_ConfigCache(void); From owner-svn-src-all@FreeBSD.ORG Wed Jul 14 00:48:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB3D61065674; Wed, 14 Jul 2010 00:48:53 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D9BD58FC08; Wed, 14 Jul 2010 00:48:53 +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 o6E0mrNj005594; Wed, 14 Jul 2010 00:48:53 GMT (envelope-from cognet@svn.freebsd.org) Received: (from cognet@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6E0mrgS005585; Wed, 14 Jul 2010 00:48:53 GMT (envelope-from cognet@svn.freebsd.org) Message-Id: <201007140048.o6E0mrgS005585@svn.freebsd.org> From: Olivier Houchard Date: Wed, 14 Jul 2010 00:48:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210040 - in head/sys/arm: at91 conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2010 00:48:54 -0000 Author: cognet Date: Wed Jul 14 00:48:53 2010 New Revision: 210040 URL: http://svn.freebsd.org/changeset/base/210040 Log: Import preliminary support for Atmel AT91SAM9G20 cpu, and the Hot-e HL201. This fine work was done by Yohanes Nugroho Many thanks to John Nicholls and Thinlinx for providing sample hardware. Added: head/sys/arm/at91/at91_aicreg.h (contents, props changed) head/sys/arm/at91/at91_pio_sam9.h (contents, props changed) head/sys/arm/at91/at91_pit.c (contents, props changed) head/sys/arm/at91/at91_pitreg.h (contents, props changed) head/sys/arm/at91/at91sam9.c (contents, props changed) head/sys/arm/at91/at91sam9_machdep.c (contents, props changed) head/sys/arm/at91/at91sam9g20reg.h (contents, props changed) head/sys/arm/at91/board_hl201.c (contents, props changed) head/sys/arm/at91/files.at91sam9 (contents, props changed) head/sys/arm/at91/if_macb.c (contents, props changed) head/sys/arm/at91/if_macbreg.h (contents, props changed) head/sys/arm/at91/if_macbvar.h (contents, props changed) head/sys/arm/at91/std.at91sam9 (contents, props changed) head/sys/arm/at91/std.hl201 (contents, props changed) head/sys/arm/conf/HL201 (contents, props changed) head/sys/arm/conf/HL201.hints (contents, props changed) Modified: head/sys/arm/at91/at91_pmc.c head/sys/arm/at91/at91_pmcreg.h Added: head/sys/arm/at91/at91_aicreg.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/at91/at91_aicreg.h Wed Jul 14 00:48:53 2010 (r210040) @@ -0,0 +1,51 @@ +/*- + * Copyright (c) 2009 Sylvestre Gallon. 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. + */ + +/* $FreeBSD$ */ + +#ifndef ARM_AT91_AT91_AICREG_H +#define ARM_AT91_AT91_AICREG_H + +/* Interrupt Controller */ +#define IC_SMR (0) /* Source mode register */ +#define IC_SVR (128) /* Source vector register */ +#define IC_IVR (256) /* IRQ vector register */ +#define IC_FVR (260) /* FIQ vector register */ +#define IC_ISR (264) /* Interrupt status register */ +#define IC_IPR (268) /* Interrupt pending register */ +#define IC_IMR (272) /* Interrupt status register */ +#define IC_CISR (276) /* Core interrupt status register */ +#define IC_IECR (288) /* Interrupt enable command register */ +#define IC_IDCR (292) /* Interrupt disable command register */ +#define IC_ICCR (296) /* Interrupt clear command register */ +#define IC_ISCR (300) /* Interrupt set command register */ +#define IC_EOICR (304) /* End of interrupt command register */ +#define IC_SPU (308) /* Spurious vector register */ +#define IC_DCR (312) /* Debug control register */ +#define IC_FFER (320) /* Fast forcing enable register */ +#define IC_FFDR (324) /* Fast forcing disable register */ +#define IC_FFSR (328) /* Fast forcing status register */ + +#endif /*ARM_AT91_AT91_AICREG_H*/ Added: head/sys/arm/at91/at91_pio_sam9.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/at91/at91_pio_sam9.h Wed Jul 14 00:48:53 2010 (r210040) @@ -0,0 +1,291 @@ +/* + * Theses defines come from an atmel file that says specifically that it + * has no copyright. + */ + +/* $FreeBSD$ */ + +// ***************************************************************************** +// PIO DEFINITIONS FOR AT91SAM9261 +// ***************************************************************************** +#define AT91C_PIO_PA0 ((unsigned int) 1 << 0) // Pin Controlled by PA0 +#define AT91C_PA0_MISO0 ((unsigned int) AT91C_PIO_PA0) // SPI0 Master In Slave +#define AT91C_PA0_MCDA0 ((unsigned int) AT91C_PIO_PA0) // Multimedia Card A Data 0 +#define AT91C_PIO_PA1 ((unsigned int) 1 << 1) // Pin Controlled by PA1 +#define AT91C_PA1_MOSI0 ((unsigned int) AT91C_PIO_PA1) // SPI0 Master Out Slave +#define AT91C_PA1_MCCDA ((unsigned int) AT91C_PIO_PA1) // Multimedia Card A Command +#define AT91C_PIO_PA10 ((unsigned int) 1 << 10) // Pin Controlled by PA10 +#define AT91C_PA10_DTXD ((unsigned int) AT91C_PIO_PA10) // DBGU Debug Transmit Data +#define AT91C_PA10_PCK3 ((unsigned int) AT91C_PIO_PA10) // PMC Programmable clock Output 3 +#define AT91C_PIO_PA11 ((unsigned int) 1 << 11) // Pin Controlled by PA11 +#define AT91C_PA11_TSYNC ((unsigned int) AT91C_PIO_PA11) // Trace Synchronization Signal +#define AT91C_PA11_SCK1 ((unsigned int) AT91C_PIO_PA11) // USART1 Serial Clock +#define AT91C_PIO_PA12 ((unsigned int) 1 << 12) // Pin Controlled by PA12 +#define AT91C_PA12_TCLK ((unsigned int) AT91C_PIO_PA12) // Trace Clock +#define AT91C_PA12_RTS1 ((unsigned int) AT91C_PIO_PA12) // USART1 Ready To Send +#define AT91C_PIO_PA13 ((unsigned int) 1 << 13) // Pin Controlled by PA13 +#define AT91C_PA13_TPS0 ((unsigned int) AT91C_PIO_PA13) // Trace ARM Pipeline Status 0 +#define AT91C_PA13_CTS1 ((unsigned int) AT91C_PIO_PA13) // USART1 Clear To Send +#define AT91C_PIO_PA14 ((unsigned int) 1 << 14) // Pin Controlled by PA14 +#define AT91C_PA14_TPS1 ((unsigned int) AT91C_PIO_PA14) // Trace ARM Pipeline Status 1 +#define AT91C_PA14_SCK2 ((unsigned int) AT91C_PIO_PA14) // USART2 Serial Clock +#define AT91C_PIO_PA15 ((unsigned int) 1 << 15) // Pin Controlled by PA15 +#define AT91C_PA15_TPS2 ((unsigned int) AT91C_PIO_PA15) // Trace ARM Pipeline Status 2 +#define AT91C_PA15_RTS2 ((unsigned int) AT91C_PIO_PA15) // USART2 Ready To Send +#define AT91C_PIO_PA16 ((unsigned int) 1 << 16) // Pin Controlled by PA16 +#define AT91C_PA16_TPK0 ((unsigned int) AT91C_PIO_PA16) // Trace Packet Port 0 +#define AT91C_PA16_CTS2 ((unsigned int) AT91C_PIO_PA16) // USART2 Clear To Send +#define AT91C_PIO_PA17 ((unsigned int) 1 << 17) // Pin Controlled by PA17 +#define AT91C_PA17_TPK1 ((unsigned int) AT91C_PIO_PA17) // Trace Packet Port 1 +#define AT91C_PA17_TF1 ((unsigned int) AT91C_PIO_PA17) // SSC1 Transmit Frame Sync +#define AT91C_PIO_PA18 ((unsigned int) 1 << 18) // Pin Controlled by PA18 +#define AT91C_PA18_TPK2 ((unsigned int) AT91C_PIO_PA18) // Trace Packet Port 2 +#define AT91C_PA18_TK1 ((unsigned int) AT91C_PIO_PA18) // SSC1 Transmit Clock +#define AT91C_PIO_PA19 ((unsigned int) 1 << 19) // Pin Controlled by PA19 +#define AT91C_PA19_TPK3 ((unsigned int) AT91C_PIO_PA19) // Trace Packet Port 3 +#define AT91C_PA19_TD1 ((unsigned int) AT91C_PIO_PA19) // SSC1 Transmit Data +#define AT91C_PIO_PA2 ((unsigned int) 1 << 2) // Pin Controlled by PA2 +#define AT91C_PA2_SPCK0 ((unsigned int) AT91C_PIO_PA2) // SPI0 Serial Clock +#define AT91C_PA2_MCCK ((unsigned int) AT91C_PIO_PA2) // Multimedia Card Clock +#define AT91C_PIO_PA20 ((unsigned int) 1 << 20) // Pin Controlled by PA20 +#define AT91C_PA20_TPK4 ((unsigned int) AT91C_PIO_PA20) // Trace Packet Port 4 +#define AT91C_PA20_RD1 ((unsigned int) AT91C_PIO_PA20) // SSC1 Receive Data +#define AT91C_PIO_PA21 ((unsigned int) 1 << 21) // Pin Controlled by PA21 +#define AT91C_PA21_TPK5 ((unsigned int) AT91C_PIO_PA21) // Trace Packet Port 5 +#define AT91C_PA21_RK1 ((unsigned int) AT91C_PIO_PA21) // SSC1 Receive Clock +#define AT91C_PIO_PA22 ((unsigned int) 1 << 22) // Pin Controlled by PA22 +#define AT91C_PA22_TPK6 ((unsigned int) AT91C_PIO_PA22) // Trace Packet Port 6 +#define AT91C_PA22_RF1 ((unsigned int) AT91C_PIO_PA22) // SSC1 Receive Frame Sync +#define AT91C_PIO_PA23 ((unsigned int) 1 << 23) // Pin Controlled by PA23 +#define AT91C_PA23_TPK7 ((unsigned int) AT91C_PIO_PA23) // Trace Packet Port 7 +#define AT91C_PA23_RTS0 ((unsigned int) AT91C_PIO_PA23) // USART0 Ready To Send +#define AT91C_PIO_PA24 ((unsigned int) 1 << 24) // Pin Controlled by PA24 +#define AT91C_PA24_TPK8 ((unsigned int) AT91C_PIO_PA24) // Trace Packet Port 8 +#define AT91C_PA24_NPCS11 ((unsigned int) AT91C_PIO_PA24) // SPI1 Peripheral Chip Select 1 +#define AT91C_PIO_PA25 ((unsigned int) 1 << 25) // Pin Controlled by PA25 +#define AT91C_PA25_TPK9 ((unsigned int) AT91C_PIO_PA25) // Trace Packet Port 9 +#define AT91C_PA25_NPCS12 ((unsigned int) AT91C_PIO_PA25) // SPI1 Peripheral Chip Select 2 +#define AT91C_PIO_PA26 ((unsigned int) 1 << 26) // Pin Controlled by PA26 +#define AT91C_PA26_TPK10 ((unsigned int) AT91C_PIO_PA26) // Trace Packet Port 10 +#define AT91C_PA26_NPCS13 ((unsigned int) AT91C_PIO_PA26) // SPI1 Peripheral Chip Select 3 +#define AT91C_PIO_PA27 ((unsigned int) 1 << 27) // Pin Controlled by PA27 +#define AT91C_PA27_TPK11 ((unsigned int) AT91C_PIO_PA27) // Trace Packet Port 11 +#define AT91C_PA27_NPCS01 ((unsigned int) AT91C_PIO_PA27) // SPI0 Peripheral Chip Select 1 +#define AT91C_PIO_PA28 ((unsigned int) 1 << 28) // Pin Controlled by PA28 +#define AT91C_PA28_TPK12 ((unsigned int) AT91C_PIO_PA28) // Trace Packet Port 12 +#define AT91C_PA28_NPCS02 ((unsigned int) AT91C_PIO_PA28) // SPI0 Peripheral Chip Select 2 +#define AT91C_PIO_PA29 ((unsigned int) 1 << 29) // Pin Controlled by PA29 +#define AT91C_PA29_TPK13 ((unsigned int) AT91C_PIO_PA29) // Trace Packet Port 13 +#define AT91C_PA29_NPCS03 ((unsigned int) AT91C_PIO_PA29) // SPI0 Peripheral Chip Select 3 +#define AT91C_PIO_PA3 ((unsigned int) 1 << 3) // Pin Controlled by PA3 +#define AT91C_PA3_NPCS00 ((unsigned int) AT91C_PIO_PA3) // SPI0 Peripheral Chip Select 0 +#define AT91C_PIO_PA30 ((unsigned int) 1 << 30) // Pin Controlled by PA30 +#define AT91C_PA30_TPK14 ((unsigned int) AT91C_PIO_PA30) // Trace Packet Port 14 +#define AT91C_PA30_A23 ((unsigned int) AT91C_PIO_PA30) // Address Bus bit 23 +#define AT91C_PIO_PA31 ((unsigned int) 1 << 31) // Pin Controlled by PA31 +#define AT91C_PA31_TPK15 ((unsigned int) AT91C_PIO_PA31) // Trace Packet Port 15 +#define AT91C_PA31_A24 ((unsigned int) AT91C_PIO_PA31) // Address Bus bit 24 +#define AT91C_PIO_PA4 ((unsigned int) 1 << 4) // Pin Controlled by PA4 +#define AT91C_PA4_NPCS01 ((unsigned int) AT91C_PIO_PA4) // SPI0 Peripheral Chip Select 1 +#define AT91C_PA4_MCDA1 ((unsigned int) AT91C_PIO_PA4) // Multimedia Card A Data 1 +#define AT91C_PIO_PA5 ((unsigned int) 1 << 5) // Pin Controlled by PA5 +#define AT91C_PA5_NPCS02 ((unsigned int) AT91C_PIO_PA5) // SPI0 Peripheral Chip Select 2 +#define AT91C_PA5_MCDA2 ((unsigned int) AT91C_PIO_PA5) // Multimedia Card A Data 2 +#define AT91C_PIO_PA6 ((unsigned int) 1 << 6) // Pin Controlled by PA6 +#define AT91C_PA6_NPCS03 ((unsigned int) AT91C_PIO_PA6) // SPI0 Peripheral Chip Select 3 +#define AT91C_PA6_MCDA3 ((unsigned int) AT91C_PIO_PA6) // Multimedia Card A Data 3 +#define AT91C_PIO_PA7 ((unsigned int) 1 << 7) // Pin Controlled by PA7 +#define AT91C_PA7_TWD ((unsigned int) AT91C_PIO_PA7) // TWI Two-wire Serial Data +#define AT91C_PA7_PCK0 ((unsigned int) AT91C_PIO_PA7) // PMC Programmable clock Output 0 +#define AT91C_PIO_PA8 ((unsigned int) 1 << 8) // Pin Controlled by PA8 +#define AT91C_PA8_TWCK ((unsigned int) AT91C_PIO_PA8) // TWI Two-wire Serial Clock +#define AT91C_PA8_PCK1 ((unsigned int) AT91C_PIO_PA8) // PMC Programmable clock Output 1 +#define AT91C_PIO_PA9 ((unsigned int) 1 << 9) // Pin Controlled by PA9 +#define AT91C_PA9_DRXD ((unsigned int) AT91C_PIO_PA9) // DBGU Debug Receive Data +#define AT91C_PA9_PCK2 ((unsigned int) AT91C_PIO_PA9) // PMC Programmable clock Output 2 +#define AT91C_PIO_PB0 ((unsigned int) 1 << 0) // Pin Controlled by PB0 +#define AT91C_PB0_LCDVSYNC ((unsigned int) AT91C_PIO_PB0) // LCD Vertical Synchronization +#define AT91C_PIO_PB1 ((unsigned int) 1 << 1) // Pin Controlled by PB1 +#define AT91C_PB1_LCDHSYNC ((unsigned int) AT91C_PIO_PB1) // LCD Horizontal Synchronization +#define AT91C_PIO_PB10 ((unsigned int) 1 << 10) // Pin Controlled by PB10 +#define AT91C_PB10_LCDD5 ((unsigned int) AT91C_PIO_PB10) // LCD Data Bus Bit 5 +#define AT91C_PB10_LCDD10 ((unsigned int) AT91C_PIO_PB10) // LCD Data Bus Bit 10 +#define AT91C_PIO_PB11 ((unsigned int) 1 << 11) // Pin Controlled by PB11 +#define AT91C_PB11_LCDD6 ((unsigned int) AT91C_PIO_PB11) // LCD Data Bus Bit 6 +#define AT91C_PB11_LCDD11 ((unsigned int) AT91C_PIO_PB11) // LCD Data Bus Bit 11 +#define AT91C_PIO_PB12 ((unsigned int) 1 << 12) // Pin Controlled by PB12 +#define AT91C_PB12_LCDD7 ((unsigned int) AT91C_PIO_PB12) // LCD Data Bus Bit 7 +#define AT91C_PB12_LCDD12 ((unsigned int) AT91C_PIO_PB12) // LCD Data Bus Bit 12 +#define AT91C_PIO_PB13 ((unsigned int) 1 << 13) // Pin Controlled by PB13 +#define AT91C_PB13_LCDD8 ((unsigned int) AT91C_PIO_PB13) // LCD Data Bus Bit 8 +#define AT91C_PB13_LCDD13 ((unsigned int) AT91C_PIO_PB13) // LCD Data Bus Bit 13 +#define AT91C_PIO_PB14 ((unsigned int) 1 << 14) // Pin Controlled by PB14 +#define AT91C_PB14_LCDD9 ((unsigned int) AT91C_PIO_PB14) // LCD Data Bus Bit 9 +#define AT91C_PB14_LCDD14 ((unsigned int) AT91C_PIO_PB14) // LCD Data Bus Bit 14 +#define AT91C_PIO_PB15 ((unsigned int) 1 << 15) // Pin Controlled by PB15 +#define AT91C_PB15_LCDD10 ((unsigned int) AT91C_PIO_PB15) // LCD Data Bus Bit 10 +#define AT91C_PB15_LCDD15 ((unsigned int) AT91C_PIO_PB15) // LCD Data Bus Bit 15 +#define AT91C_PIO_PB16 ((unsigned int) 1 << 16) // Pin Controlled by PB16 +#define AT91C_PB16_LCDD11 ((unsigned int) AT91C_PIO_PB16) // LCD Data Bus Bit 11 +#define AT91C_PB16_LCDD19 ((unsigned int) AT91C_PIO_PB16) // LCD Data Bus Bit 19 +#define AT91C_PIO_PB17 ((unsigned int) 1 << 17) // Pin Controlled by PB17 +#define AT91C_PB17_LCDD12 ((unsigned int) AT91C_PIO_PB17) // LCD Data Bus Bit 12 +#define AT91C_PB17_LCDD20 ((unsigned int) AT91C_PIO_PB17) // LCD Data Bus Bit 20 +#define AT91C_PIO_PB18 ((unsigned int) 1 << 18) // Pin Controlled by PB18 +#define AT91C_PB18_LCDD13 ((unsigned int) AT91C_PIO_PB18) // LCD Data Bus Bit 13 +#define AT91C_PB18_LCDD21 ((unsigned int) AT91C_PIO_PB18) // LCD Data Bus Bit 21 +#define AT91C_PIO_PB19 ((unsigned int) 1 << 19) // Pin Controlled by PB19 +#define AT91C_PB19_LCDD14 ((unsigned int) AT91C_PIO_PB19) // LCD Data Bus Bit 14 +#define AT91C_PB19_LCDD22 ((unsigned int) AT91C_PIO_PB19) // LCD Data Bus Bit 22 +#define AT91C_PIO_PB2 ((unsigned int) 1 << 2) // Pin Controlled by PB2 +#define AT91C_PB2_LCDDOTCK ((unsigned int) AT91C_PIO_PB2) // LCD Dot Clock +#define AT91C_PB2_PCK0 ((unsigned int) AT91C_PIO_PB2) // PMC Programmable clock Output 0 +#define AT91C_PIO_PB20 ((unsigned int) 1 << 20) // Pin Controlled by PB20 +#define AT91C_PB20_LCDD15 ((unsigned int) AT91C_PIO_PB20) // LCD Data Bus Bit 15 +#define AT91C_PB20_LCDD23 ((unsigned int) AT91C_PIO_PB20) // LCD Data Bus Bit 23 +#define AT91C_PIO_PB21 ((unsigned int) 1 << 21) // Pin Controlled by PB21 +#define AT91C_PB21_TF0 ((unsigned int) AT91C_PIO_PB21) // SSC0 Transmit Frame Sync +#define AT91C_PB21_LCDD16 ((unsigned int) AT91C_PIO_PB21) // LCD Data Bus Bit 16 +#define AT91C_PIO_PB22 ((unsigned int) 1 << 22) // Pin Controlled by PB22 +#define AT91C_PB22_TK0 ((unsigned int) AT91C_PIO_PB22) // SSC0 Transmit Clock +#define AT91C_PB22_LCDD17 ((unsigned int) AT91C_PIO_PB22) // LCD Data Bus Bit 17 +#define AT91C_PIO_PB23 ((unsigned int) 1 << 23) // Pin Controlled by PB23 +#define AT91C_PB23_TD0 ((unsigned int) AT91C_PIO_PB23) // SSC0 Transmit Data +#define AT91C_PB23_LCDD18 ((unsigned int) AT91C_PIO_PB23) // LCD Data Bus Bit 18 +#define AT91C_PIO_PB24 ((unsigned int) 1 << 24) // Pin Controlled by PB24 +#define AT91C_PB24_RD0 ((unsigned int) AT91C_PIO_PB24) // SSC0 Receive Data +#define AT91C_PB24_LCDD19 ((unsigned int) AT91C_PIO_PB24) // LCD Data Bus Bit 19 +#define AT91C_PIO_PB25 ((unsigned int) 1 << 25) // Pin Controlled by PB25 +#define AT91C_PB25_RK0 ((unsigned int) AT91C_PIO_PB25) // SSC0 Receive Clock +#define AT91C_PB25_LCDD20 ((unsigned int) AT91C_PIO_PB25) // LCD Data Bus Bit 20 +#define AT91C_PIO_PB26 ((unsigned int) 1 << 26) // Pin Controlled by PB26 +#define AT91C_PB26_RF0 ((unsigned int) AT91C_PIO_PB26) // SSC0 Receive Frame Sync +#define AT91C_PB26_LCDD21 ((unsigned int) AT91C_PIO_PB26) // LCD Data Bus Bit 21 +#define AT91C_PIO_PB27 ((unsigned int) 1 << 27) // Pin Controlled by PB27 +#define AT91C_PB27_NPCS11 ((unsigned int) AT91C_PIO_PB27) // SPI1 Peripheral Chip Select 1 +#define AT91C_PB27_LCDD22 ((unsigned int) AT91C_PIO_PB27) // LCD Data Bus Bit 22 +#define AT91C_PIO_PB28 ((unsigned int) 1 << 28) // Pin Controlled by PB28 +#define AT91C_PB28_NPCS10 ((unsigned int) AT91C_PIO_PB28) // SPI1 Peripheral Chip Select 0 +#define AT91C_PB28_LCDD23 ((unsigned int) AT91C_PIO_PB28) // LCD Data Bus Bit 23 +#define AT91C_PIO_PB29 ((unsigned int) 1 << 29) // Pin Controlled by PB29 +#define AT91C_PB29_SPCK1 ((unsigned int) AT91C_PIO_PB29) // SPI1 Serial Clock +#define AT91C_PB29_IRQ2 ((unsigned int) AT91C_PIO_PB29) // Interrupt input 2 +#define AT91C_PIO_PB3 ((unsigned int) 1 << 3) // Pin Controlled by PB3 +#define AT91C_PB3_LCDDEN ((unsigned int) AT91C_PIO_PB3) // LCD Data Enable +#define AT91C_PIO_PB30 ((unsigned int) 1 << 30) // Pin Controlled by PB30 +#define AT91C_PB30_MISO1 ((unsigned int) AT91C_PIO_PB30) // SPI1 Master In Slave +#define AT91C_PB30_IRQ1 ((unsigned int) AT91C_PIO_PB30) // Interrupt input 1 +#define AT91C_PIO_PB31 ((unsigned int) 1 << 31) // Pin Controlled by PB31 +#define AT91C_PB31_MOSI1 ((unsigned int) AT91C_PIO_PB31) // SPI1 Master Out Slave +#define AT91C_PB31_PCK2 ((unsigned int) AT91C_PIO_PB31) // PMC Programmable clock Output 2 +#define AT91C_PIO_PB4 ((unsigned int) 1 << 4) // Pin Controlled by PB4 +#define AT91C_PB4_LCDCC ((unsigned int) AT91C_PIO_PB4) // LCD Contrast Control +#define AT91C_PB4_LCDD2 ((unsigned int) AT91C_PIO_PB4) // LCD Data Bus Bit 2 +#define AT91C_PIO_PB5 ((unsigned int) 1 << 5) // Pin Controlled by PB5 +#define AT91C_PB5_LCDD0 ((unsigned int) AT91C_PIO_PB5) // LCD Data Bus Bit 0 +#define AT91C_PB5_LCDD3 ((unsigned int) AT91C_PIO_PB5) // LCD Data Bus Bit 3 +#define AT91C_PIO_PB6 ((unsigned int) 1 << 6) // Pin Controlled by PB6 +#define AT91C_PB6_LCDD1 ((unsigned int) AT91C_PIO_PB6) // LCD Data Bus Bit 1 +#define AT91C_PB6_LCDD4 ((unsigned int) AT91C_PIO_PB6) // LCD Data Bus Bit 4 +#define AT91C_PIO_PB7 ((unsigned int) 1 << 7) // Pin Controlled by PB7 +#define AT91C_PB7_LCDD2 ((unsigned int) AT91C_PIO_PB7) // LCD Data Bus Bit 2 +#define AT91C_PB7_LCDD5 ((unsigned int) AT91C_PIO_PB7) // LCD Data Bus Bit 5 +#define AT91C_PIO_PB8 ((unsigned int) 1 << 8) // Pin Controlled by PB8 +#define AT91C_PB8_LCDD3 ((unsigned int) AT91C_PIO_PB8) // LCD Data Bus Bit 3 +#define AT91C_PB8_LCDD6 ((unsigned int) AT91C_PIO_PB8) // LCD Data Bus Bit 6 +#define AT91C_PIO_PB9 ((unsigned int) 1 << 9) // Pin Controlled by PB9 +#define AT91C_PB9_LCDD4 ((unsigned int) AT91C_PIO_PB9) // LCD Data Bus Bit 4 +#define AT91C_PB9_LCDD7 ((unsigned int) AT91C_PIO_PB9) // LCD Data Bus Bit 7 +#define AT91C_PIO_PC0 ((unsigned int) 1 << 0) // Pin Controlled by PC0 +#define AT91C_PC0_SMOE ((unsigned int) AT91C_PIO_PC0) // SmartMedia Output Enable +#define AT91C_PC0_NCS6 ((unsigned int) AT91C_PIO_PC0) // Chip Select 6 +#define AT91C_PIO_PC1 ((unsigned int) 1 << 1) // Pin Controlled by PC1 +#define AT91C_PC1_SMWE ((unsigned int) AT91C_PIO_PC1) // SmartMedia Write Enable +#define AT91C_PC1_NCS7 ((unsigned int) AT91C_PIO_PC1) // Chip Select 7 +#define AT91C_PIO_PC10 ((unsigned int) 1 << 10) // Pin Controlled by PC10 +#define AT91C_PC10_RTS0 ((unsigned int) AT91C_PIO_PC10) // USART0 Ready To Send +#define AT91C_PC10_SCK0 ((unsigned int) AT91C_PIO_PC10) // USART0 Serial Clock +#define AT91C_PIO_PC11 ((unsigned int) 1 << 11) // Pin Controlled by PC11 +#define AT91C_PC11_CTS0 ((unsigned int) AT91C_PIO_PC11) // USART0 Clear To Send +#define AT91C_PC11_FIQ ((unsigned int) AT91C_PIO_PC11) // AIC Fast Interrupt Input +#define AT91C_PIO_PC12 ((unsigned int) 1 << 12) // Pin Controlled by PC12 +#define AT91C_PC12_TXD1 ((unsigned int) AT91C_PIO_PC12) // USART1 Transmit Data +#define AT91C_PC12_NCS6 ((unsigned int) AT91C_PIO_PC12) // Chip Select 6 +#define AT91C_PIO_PC13 ((unsigned int) 1 << 13) // Pin Controlled by PC13 +#define AT91C_PC13_RXD1 ((unsigned int) AT91C_PIO_PC13) // USART1 Receive Data +#define AT91C_PC13_NCS7 ((unsigned int) AT91C_PIO_PC13) // Chip Select 7 +#define AT91C_PIO_PC14 ((unsigned int) 1 << 14) // Pin Controlled by PC14 +#define AT91C_PC14_TXD2 ((unsigned int) AT91C_PIO_PC14) // USART2 Transmit Data +#define AT91C_PC14_NPCS12 ((unsigned int) AT91C_PIO_PC14) // SPI1 Peripheral Chip Select 2 +#define AT91C_PIO_PC15 ((unsigned int) 1 << 15) // Pin Controlled by PC15 +#define AT91C_PC15_RXD2 ((unsigned int) AT91C_PIO_PC15) // USART2 Receive Data +#define AT91C_PC15_NPCS13 ((unsigned int) AT91C_PIO_PC15) // SPI1 Peripheral Chip Select 3 +#define AT91C_PIO_PC16 ((unsigned int) 1 << 16) // Pin Controlled by PC16 +#define AT91C_PC16_D16 ((unsigned int) AT91C_PIO_PC16) // Data Bus [16] +#define AT91C_PC16_TCLK0 ((unsigned int) AT91C_PIO_PC16) // Timer Counter 0 external clock input +#define AT91C_PIO_PC17 ((unsigned int) 1 << 17) // Pin Controlled by PC17 +#define AT91C_PC17_D17 ((unsigned int) AT91C_PIO_PC17) // Data Bus [17] +#define AT91C_PC17_TCLK1 ((unsigned int) AT91C_PIO_PC17) // Timer Counter 1 external clock input +#define AT91C_PIO_PC18 ((unsigned int) 1 << 18) // Pin Controlled by PC18 +#define AT91C_PC18_D18 ((unsigned int) AT91C_PIO_PC18) // Data Bus [18] +#define AT91C_PC18_TCLK2 ((unsigned int) AT91C_PIO_PC18) // Timer Counter 2 external clock input +#define AT91C_PIO_PC19 ((unsigned int) 1 << 19) // Pin Controlled by PC19 +#define AT91C_PC19_D19 ((unsigned int) AT91C_PIO_PC19) // Data Bus [19] +#define AT91C_PC19_TIOA0 ((unsigned int) AT91C_PIO_PC19) // Timer Counter 0 Multipurpose Timer I/O Pin A +#define AT91C_PIO_PC2 ((unsigned int) 1 << 2) // Pin Controlled by PC2 +#define AT91C_PC2_NWAIT ((unsigned int) AT91C_PIO_PC2) // NWAIT +#define AT91C_PC2_IRQ0 ((unsigned int) AT91C_PIO_PC2) // Interrupt input 0 +#define AT91C_PIO_PC20 ((unsigned int) 1 << 20) // Pin Controlled by PC20 +#define AT91C_PC20_D20 ((unsigned int) AT91C_PIO_PC20) // Data Bus [20] +#define AT91C_PC20_TIOB0 ((unsigned int) AT91C_PIO_PC20) // Timer Counter 0 Multipurpose Timer I/O Pin B +#define AT91C_PIO_PC21 ((unsigned int) 1 << 21) // Pin Controlled by PC21 +#define AT91C_PC21_D21 ((unsigned int) AT91C_PIO_PC21) // Data Bus [21] +#define AT91C_PC21_TIOA1 ((unsigned int) AT91C_PIO_PC21) // Timer Counter 1 Multipurpose Timer I/O Pin A +#define AT91C_PIO_PC22 ((unsigned int) 1 << 22) // Pin Controlled by PC22 +#define AT91C_PC22_D22 ((unsigned int) AT91C_PIO_PC22) // Data Bus [22] +#define AT91C_PC22_TIOB1 ((unsigned int) AT91C_PIO_PC22) // Timer Counter 1 Multipurpose Timer I/O Pin B +#define AT91C_PIO_PC23 ((unsigned int) 1 << 23) // Pin Controlled by PC23 +#define AT91C_PC23_D23 ((unsigned int) AT91C_PIO_PC23) // Data Bus [23] +#define AT91C_PC23_TIOA2 ((unsigned int) AT91C_PIO_PC23) // Timer Counter 2 Multipurpose Timer I/O Pin A +#define AT91C_PIO_PC24 ((unsigned int) 1 << 24) // Pin Controlled by PC24 +#define AT91C_PC24_D24 ((unsigned int) AT91C_PIO_PC24) // Data Bus [24] +#define AT91C_PC24_TIOB2 ((unsigned int) AT91C_PIO_PC24) // Timer Counter 2 Multipurpose Timer I/O Pin B +#define AT91C_PIO_PC25 ((unsigned int) 1 << 25) // Pin Controlled by PC25 +#define AT91C_PC25_D25 ((unsigned int) AT91C_PIO_PC25) // Data Bus [25] +#define AT91C_PC25_TF2 ((unsigned int) AT91C_PIO_PC25) // SSC2 Transmit Frame Sync +#define AT91C_PIO_PC26 ((unsigned int) 1 << 26) // Pin Controlled by PC26 +#define AT91C_PC26_D26 ((unsigned int) AT91C_PIO_PC26) // Data Bus [26] +#define AT91C_PC26_TK2 ((unsigned int) AT91C_PIO_PC26) // SSC2 Transmit Clock +#define AT91C_PIO_PC27 ((unsigned int) 1 << 27) // Pin Controlled by PC27 +#define AT91C_PC27_D27 ((unsigned int) AT91C_PIO_PC27) // Data Bus [27] +#define AT91C_PC27_TD2 ((unsigned int) AT91C_PIO_PC27) // SSC2 Transmit Data +#define AT91C_PIO_PC28 ((unsigned int) 1 << 28) // Pin Controlled by PC28 +#define AT91C_PC28_D28 ((unsigned int) AT91C_PIO_PC28) // Data Bus [28] +#define AT91C_PC28_RD2 ((unsigned int) AT91C_PIO_PC28) // SSC2 Receive Data +#define AT91C_PIO_PC29 ((unsigned int) 1 << 29) // Pin Controlled by PC29 +#define AT91C_PC29_D29 ((unsigned int) AT91C_PIO_PC29) // Data Bus [29] +#define AT91C_PC29_RK2 ((unsigned int) AT91C_PIO_PC29) // SSC2 Receive Clock +#define AT91C_PIO_PC3 ((unsigned int) 1 << 3) // Pin Controlled by PC3 +#define AT91C_PC3_A25_CFRNW ((unsigned int) AT91C_PIO_PC3) // Address Bus[25] / Compact Flash Read Not Write +#define AT91C_PIO_PC30 ((unsigned int) 1 << 30) // Pin Controlled by PC30 +#define AT91C_PC30_D30 ((unsigned int) AT91C_PIO_PC30) // Data Bus [30] +#define AT91C_PC30_RF2 ((unsigned int) AT91C_PIO_PC30) // SSC2 Receive Frame Sync +#define AT91C_PIO_PC31 ((unsigned int) 1 << 31) // Pin Controlled by PC31 +#define AT91C_PC31_D31 ((unsigned int) AT91C_PIO_PC31) // Data Bus [31] +#define AT91C_PC31_PCK1 ((unsigned int) AT91C_PIO_PC31) // PMC Programmable clock Output 1 +#define AT91C_PIO_PC4 ((unsigned int) 1 << 4) // Pin Controlled by PC4 +#define AT91C_PC4_NCS4_CFCS0 ((unsigned int) AT91C_PIO_PC4) // Chip Select 4 / CompactFlash Chip Select 0 +#define AT91C_PIO_PC5 ((unsigned int) 1 << 5) // Pin Controlled by PC5 +#define AT91C_PC5_NCS5_CFCS1 ((unsigned int) AT91C_PIO_PC5) // Chip Select 5 / CompactFlash Chip Select 1 +#define AT91C_PIO_PC6 ((unsigned int) 1 << 6) // Pin Controlled by PC6 +#define AT91C_PC6_CFCE1 ((unsigned int) AT91C_PIO_PC6) // CompactFlash Chip Enable 1 +#define AT91C_PIO_PC7 ((unsigned int) 1 << 7) // Pin Controlled by PC7 +#define AT91C_PC7_CFCE2 ((unsigned int) AT91C_PIO_PC7) // CompactFlash Chip Enable 2 +#define AT91C_PIO_PC8 ((unsigned int) 1 << 8) // Pin Controlled by PC8 +#define AT91C_PC8_TXD0 ((unsigned int) AT91C_PIO_PC8) // USART0 Transmit Data +#define AT91C_PC8_PCK2 ((unsigned int) AT91C_PIO_PC8) // PMC Programmable clock Output 2 +#define AT91C_PIO_PC9 ((unsigned int) 1 << 9) // Pin Controlled by PC9 +#define AT91C_PC9_RXD0 ((unsigned int) AT91C_PIO_PC9) // USART0 Receive Data +#define AT91C_PC9_PCK3 ((unsigned int) AT91C_PIO_PC9) // PMC Programmable clock Output 3 + + Added: head/sys/arm/at91/at91_pit.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/at91/at91_pit.c Wed Jul 14 00:48:53 2010 (r210040) @@ -0,0 +1,233 @@ +/*- + * Copyright (c) 2010 Yohanes Nugroho. 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 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 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 +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +__FBSDID("$FreeBSD$"); + +static struct at91pit_softc { + bus_space_tag_t sc_st; + bus_space_handle_t sc_sh; + device_t sc_dev; +} *pit_softc; + +#define RD4(off) \ + bus_space_read_4(pit_softc->sc_st, pit_softc->sc_sh, (off)) +#define WR4(off, val) \ + bus_space_write_4(pit_softc->sc_st, pit_softc->sc_sh, (off), (val)) + +static unsigned at91pit_get_timecount(struct timecounter *tc); +static int clock_intr(void *arg); + +static struct timecounter at91pit_timecounter = { + at91pit_get_timecount, /* get_timecount */ + NULL, /* no poll_pps */ + 0xffffffffu, /* counter mask */ + 0, /* frequency */ + "AT91SAM9261 timer", /* name */ + 1000 /* quality */ +}; + + +uint32_t +at91_pit_base(void); + +uint32_t +at91_pit_size(void); + +static int +at91pit_probe(device_t dev) +{ + device_set_desc(dev, "PIT"); + return (0); +} + +uint32_t +at91_pit_base(void) +{ + return (AT91SAM9G20_PIT_BASE); +} + +uint32_t +at91_pit_size(void) +{ + return (AT91SAM9G20_PIT_SIZE); +} + +static int pit_rate; +static int pit_cycle; +static int pit_counter; + +static int +at91pit_attach(device_t dev) +{ + struct at91_softc *sc = device_get_softc(device_get_parent(dev)); + struct resource *irq; + int rid = 0; + void *ih; + + pit_softc = device_get_softc(dev); + pit_softc->sc_st = sc->sc_st; + pit_softc->sc_dev = dev; + if (bus_space_subregion(sc->sc_st, sc->sc_sh, at91_pit_base(), + at91_pit_size(), &pit_softc->sc_sh) != 0) + panic("couldn't subregion pit registers"); + + irq = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, 1, 1, 1, + RF_ACTIVE | RF_SHAREABLE); + if (!irq) + panic("Unable to allocate IRQ for the system timer"); + else + bus_setup_intr(dev, irq, INTR_TYPE_CLK, + clock_intr, NULL, NULL, &ih); + + + device_printf(dev, "AT91SAM9x pit registered\n"); + return (0); +} + +static device_method_t at91pit_methods[] = { + DEVMETHOD(device_probe, at91pit_probe), + DEVMETHOD(device_attach, at91pit_attach), + {0,0}, +}; + +static driver_t at91pit_driver = { + "at91_pit", + at91pit_methods, + sizeof(struct at91pit_softc), +}; + +static devclass_t at91pit_devclass; + +DRIVER_MODULE(at91_pit, atmelarm, at91pit_driver, at91pit_devclass, 0, 0); + +static int +clock_intr(void *arg) +{ + + struct trapframe *fp = arg; + + if (RD4(PIT_SR) & PIT_PITS_DONE) { + uint32_t pivr = RD4(PIT_PIVR); + if (PIT_CNT(pivr)>1) { + printf("cnt = %d\n", PIT_CNT(pivr)); + } + pit_counter += pit_cycle; + hardclock(TRAPF_USERMODE(fp), TRAPF_PC(fp)); + return (FILTER_HANDLED); + } + return (FILTER_STRAY); +} + +static unsigned +at91pit_get_timecount(struct timecounter *tc) +{ + return pit_counter; +} + +/*todo: review this*/ +void +DELAY(int n) +{ + u_int32_t start, end, cur; + + start = RD4(PIT_PIIR); + n = (n * 1000) / (at91_master_clock / 12); + if (n <= 0) + n = 1; + end = (start + n); + cur = start; + if (start > end) { + while (cur >= start || cur < end) + cur = RD4(PIT_PIIR); + } else { + while (cur < end) + cur = RD4(PIT_PIIR); + } +} + +/* + * The 3 next functions must be implement with the futur PLL code. + */ +void +cpu_startprofclock(void) +{ +} + +void +cpu_stopprofclock(void) +{ +} + +#define HZ 100 + +void +cpu_initclocks(void) +{ + struct at91_pmc_clock *master; + + master = at91_pmc_clock_ref("mck"); + pit_rate = master->hz / 16; + pit_cycle = (pit_rate + HZ/2) / HZ; + at91pit_timecounter.tc_frequency = pit_rate; + WR4(PIT_MR, 0); + + while (PIT_PIV(RD4(PIT_PIVR)) != 0); + + WR4(PIT_MR, (pit_cycle - 1) | PIT_IEN | PIT_EN); + tc_init(&at91pit_timecounter); +} + +void +cpu_reset(void) +{ + *(volatile int *)(AT91SAM9G20_BASE + AT91SAM9G20_RSTC_BASE + + RSTC_CR) = RSTC_PROCRST | RSTC_PERRST | RSTC_KEY; + while (1) + continue; +} Added: head/sys/arm/at91/at91_pitreg.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/at91/at91_pitreg.h Wed Jul 14 00:48:53 2010 (r210040) @@ -0,0 +1,45 @@ +/*- + * Copyright (c) 2009 Sylvestre Gallon. 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 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 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. + */ + +/* $FreeBSD$ */ + +#ifndef ARM_AT91_AT91PITREG_H +#define ARM_AT91_AT91PITREG_H + +#define PIT_MR 0x0 +#define PIT_SR 0x4 +#define PIT_PIVR 0x8 +#define PIT_PIIR 0xc + +/* PIT_MR */ +#define PIT_PIV(x) (x & 0xfffff) /* periodic interval value */ +#define PIT_CNT(x) ((x >>20) & 0xfff) /* periodic interval counter */ +#define PIT_EN (1 << 24) /* pit enable */ +#define PIT_IEN (1 << 25) /* pit interrupt enable */ + +/* PIT_SR */ +#define PIT_PITS_DONE 1 /* interrupt done */ + +#endif /* ARM_AT91_AT91PITREG_H */ Modified: head/sys/arm/at91/at91_pmc.c ============================================================================== --- head/sys/arm/at91/at91_pmc.c Wed Jul 14 00:47:37 2010 (r210039) +++ head/sys/arm/at91/at91_pmc.c Wed Jul 14 00:48:53 2010 (r210040) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -119,20 +120,54 @@ static struct at91_pmc_clock mck = { .refcnt = 0, }; +#ifdef AT91SAM9G20 +#define IRQ_UDP AT91SAM9G20_IRQ_UDP +#define IRQ_UHP AT91SAM9G20_IRQ_UHP +#else +#define IRQ_UDP AT91RM92_IRQ_UDP +#define IRQ_UHP AT91RM92_IRQ_UHP +#endif /* AT91SAM9G20 */ + static struct at91_pmc_clock udc_clk = { .name = "udc_clk", .parent = &mck, - .pmc_mask = 1 << AT91RM92_IRQ_UDP, + .pmc_mask = 1 << IRQ_UDP, .set_mode = &at91_pmc_set_periph_mode }; static struct at91_pmc_clock ohci_clk = { .name = "ohci_clk", .parent = &mck, - .pmc_mask = 1 << AT91RM92_IRQ_UHP, + .pmc_mask = 1 << IRQ_UHP, + .set_mode = &at91_pmc_set_periph_mode +}; + +#ifdef AT91SAM9G20 +static struct at91_pmc_clock macb_clk = { + .name = "macb_clk", + .parent = &mck, + + .pmc_mask = 1 << 21, + .set_mode = &at91_pmc_set_periph_mode +}; + +static struct at91_pmc_clock spi0_clk = { + .name = "spi0_clk", + .parent = &mck, + + .pmc_mask = 1 << 12, + .set_mode = &at91_pmc_set_periph_mode +}; + +static struct at91_pmc_clock spi1_clk = { + .name = "spi1_clk", + .parent = &mck, + .pmc_mask = 1 << 13, .set_mode = &at91_pmc_set_periph_mode }; +#endif /* AT91SAM9G20 */ + static struct at91_pmc_clock *const clock_list[] = { &slck, &main_ck, @@ -142,6 +177,11 @@ static struct at91_pmc_clock *const cloc &uhpck, &mck, &udc_clk, +#ifdef AT91SAM9G20 + &macb_clk, + &spi0_clk, + &spi1_clk, +#endif /* AT91SAM9G20 */ &ohci_clk }; @@ -257,15 +297,24 @@ at91_pmc_pll_rate(int freq, uint32_t reg uint32_t mul, div; div = reg & 0xff; +#ifdef AT91SAM9G20 + if (is_pllb) + mul = (reg >> 16) & 0x3f; + else + mul = (reg >> 16) & 0xff; +#else mul = (reg >> 16) & 0x7ff; +#endif if (div != 0 && mul != 0) { freq /= div; freq *= mul + 1; } else { freq = 0; } +#ifndef AT91SAM9G20 if (is_pllb && (reg & (1 << 28))) freq >>= 1; +#endif return (freq); } @@ -328,10 +377,12 @@ at91_pmc_init_clock(struct at91_pmc_soft */ sc->pllb_init = at91_pmc_pll_calc(main_clock, 48000000 * 2) |0x10000000; pllb.hz = at91_pmc_pll_rate(main_clock, sc->pllb_init, 1); - WR4(sc, PMC_PCDR, (1 << AT91RM92_IRQ_UHP) | (1 << AT91RM92_IRQ_UDP)); + WR4(sc, PMC_PCDR, (1 << IRQ_UHP) | (1 << IRQ_UDP)); WR4(sc, PMC_SCDR, PMC_SCER_UHP | PMC_SCER_UDP); WR4(sc, CKGR_PLLBR, 0); +#ifndef AT91SAM9G20 WR4(sc, PMC_SCER, PMC_SCER_MCKUDP); +#endif /* * MCK and PCU derive from one of the primary clocks. Initialize Modified: head/sys/arm/at91/at91_pmcreg.h ============================================================================== --- head/sys/arm/at91/at91_pmcreg.h Wed Jul 14 00:47:37 2010 (r210039) +++ head/sys/arm/at91/at91_pmcreg.h Wed Jul 14 00:48:53 2010 (r210040) @@ -58,6 +58,21 @@ #define PMC_SR 0x68 /* Status Register */ #define PMC_IMR 0x6c /* Interrupt Mask Register */ +#ifdef AT91SAM9G20 +/* PMC Specific AT91SAM9G20 */ + +/* PMC System Clock Enable Register */ +/* PMC System Clock Disable Register */ +/* PMC System Clock StatusRegister */ +#define PMC_SCER_UHP (1UL << 6) /* UHP: USB Host Port Clock Enable */ +#define PMC_SCER_UDP (1UL << 7) /* UDP: USB Device Port Clock Enable */ +#define PMC_SCER_PCK0 (1UL << 8) /* PCK0: Programmable Clock out en */ +#define PMC_SCER_PCK1 (1UL << 9) /* PCK1: Programmable Clock out en */ +#define PMC_SCER_PCK2 (1UL << 10) /* PCK2: Programmable Clock out en */ +#define PMC_SCER_PCK3 (1UL << 11) /* PCK3: Programmable Clock out en */ + +#else + /* PMC System Clock Enable Register */ /* PMC System Clock Disable Register */ /* PMC System Clock StatusRegister */ @@ -70,6 +85,7 @@ #define PMC_SCER_PCK2 (1UL << 11) /* PCK2: Programmable Clock out en */ #define PMC_SCER_PCK3 (1UL << 12) /* PCK3: Programmable Clock out en */ +#endif /* AT91SAM9G20 */ /* PMC Peripheral Clock Enable Register */ /* PMC Peripheral Clock Disable Register */ /* PMC Peripheral Clock Status Register */ Added: head/sys/arm/at91/at91sam9.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/at91/at91sam9.c Wed Jul 14 00:48:53 2010 (r210040) @@ -0,0 +1,717 @@ +/*- + * Copyright (c) 2005 Olivier Houchard. 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 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 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$"); + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#define _ARM32_BUS_DMA_PRIVATE +#include +#include +#include +#include +#include + +static struct at91_softc *at91_softc; + +static void at91_eoi(void *); + +uint32_t at91_master_clock = AT91C_MASTER_CLOCK; + +static int +at91_bs_map(void *t, bus_addr_t bpa, bus_size_t size, int flags, + bus_space_handle_t *bshp) +{ + vm_paddr_t pa, endpa; + + pa = trunc_page(bpa); + if (pa >= 0xfff00000) { + *bshp = pa - 0xf0000000 + 0xd0000000; + return (0); + } + if (pa >= 0xdff00000) + return (0); + endpa = round_page(bpa + size); + + *bshp = (vm_offset_t)pmap_mapdev(pa, endpa - pa); + + return (0); +} + +static void +at91_bs_unmap(void *t, bus_space_handle_t h, bus_size_t size) +{ + vm_offset_t va, endva; + + va = trunc_page((vm_offset_t)t); + endva = va + round_page(size); + + /* Free the kernel virtual mapping. */ + kmem_free(kernel_map, va, endva - va); +} + +static int +at91_bs_subregion(void *t, bus_space_handle_t bsh, bus_size_t offset, + bus_size_t size, bus_space_handle_t *nbshp) +{ + + *nbshp = bsh + offset; + return (0); +} + +static void +at91_barrier(void *t, bus_space_handle_t bsh, bus_size_t size, bus_size_t b, + int a) +{ +} + +bs_protos(generic); +bs_protos(generic_armv4); + +struct bus_space at91_bs_tag = { + /* cookie */ + (void *) 0, + + /* mapping/unmapping */ + at91_bs_map, + at91_bs_unmap, + at91_bs_subregion, + + /* allocation/deallocation */ + NULL, + NULL, + + /* barrier */ + at91_barrier, + + /* read (single) */ + generic_bs_r_1, + generic_armv4_bs_r_2, + generic_bs_r_4, + NULL, + + /* read multiple */ + generic_bs_rm_1, + generic_armv4_bs_rm_2, + generic_bs_rm_4, + NULL, + + /* read region */ + generic_bs_rr_1, + generic_armv4_bs_rr_2, + generic_bs_rr_4, + NULL, + + /* write (single) */ + generic_bs_w_1, + generic_armv4_bs_w_2, + generic_bs_w_4, + NULL, + + /* write multiple */ + generic_bs_wm_1, + generic_armv4_bs_wm_2, + generic_bs_wm_4, + NULL, + + /* write region */ + NULL, + generic_armv4_bs_wr_2, + generic_bs_wr_4, + NULL, + + /* set multiple */ + NULL, + NULL, + NULL, + NULL, + + /* set region */ + NULL, + generic_armv4_bs_sr_2, + generic_bs_sr_4, + NULL, + + /* copy */ + NULL, + generic_armv4_bs_c_2, + NULL, + NULL, + + /* read (single) stream */ + generic_bs_r_1, + generic_armv4_bs_r_2, + generic_bs_r_4, + NULL, + + /* read multiple stream */ + generic_bs_rm_1, + generic_armv4_bs_rm_2, + generic_bs_rm_4, + NULL, + + /* read region stream */ + generic_bs_rr_1, + generic_armv4_bs_rr_2, + generic_bs_rr_4, + NULL, + + /* write (single) stream */ + generic_bs_w_1, + generic_armv4_bs_w_2, + generic_bs_w_4, + NULL, + + /* write multiple stream */ + generic_bs_wm_1, + generic_armv4_bs_wm_2, + generic_bs_wm_4, + NULL, + + /* write region stream */ + NULL, + generic_armv4_bs_wr_2, + generic_bs_wr_4, + NULL, +}; + +static int +at91_probe(device_t dev) +{ + device_set_desc(dev, "AT91 device bus"); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Jul 14 00:52:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A2D51065673; Wed, 14 Jul 2010 00:52:30 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0A0A38FC16; Wed, 14 Jul 2010 00:52:30 +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 o6E0qT3A006417; Wed, 14 Jul 2010 00:52:29 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6E0qTPS006415; Wed, 14 Jul 2010 00:52:29 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007140052.o6E0qTPS006415@svn.freebsd.org> From: Warner Losh Date: Wed, 14 Jul 2010 00:52:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210041 - head/sys/mips/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2010 00:52:30 -0000 Author: imp Date: Wed Jul 14 00:52:29 2010 New Revision: 210041 URL: http://svn.freebsd.org/changeset/base/210041 Log: Use cpuregs.h spellings over the cpu.h spellings. Modified: head/sys/mips/include/db_machdep.h Modified: head/sys/mips/include/db_machdep.h ============================================================================== --- head/sys/mips/include/db_machdep.h Wed Jul 14 00:48:53 2010 (r210040) +++ head/sys/mips/include/db_machdep.h Wed Jul 14 00:52:29 2010 (r210041) @@ -55,7 +55,7 @@ typedef register_t db_expr_t; /* express #define SOFTWARE_SSTEP_EMUL /* next_instr_address() emulates 100% */ db_addr_t next_instr_address(db_addr_t, boolean_t); #define BKPT_SIZE (4) -#define BKPT_SET(ins) (BREAK_DDB) +#define BKPT_SET(ins) (MIPS_BREAK_DDB) #define DB_VALID_BREAKPOINT(addr) (((addr) & 3) == 0) #define IS_BREAKPOINT_TRAP(type, code) ((type) == T_BREAK) @@ -65,7 +65,7 @@ db_addr_t next_instr_address(db_addr_t, #define BKPT_SKIP \ do { \ if((db_get_value(kdb_frame->pc, sizeof(int), FALSE) & \ - ~BREAK_VAL_MASK) == BREAK_INSTR) { \ + ~MIPS_BREAK_VAL_MASK) == MIPS_BREAK_INSTR) { \ kdb_frame->pc += BKPT_SIZE; \ kdb_thrctx->pcb_regs.pc += BKPT_SIZE; \ } \ From owner-svn-src-all@FreeBSD.ORG Wed Jul 14 06:37:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C8A91065679; Wed, 14 Jul 2010 06:37:43 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4C3078FC1C; Wed, 14 Jul 2010 06:37:43 +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 o6E6bhnf082431; Wed, 14 Jul 2010 06:37:43 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6E6bht4082430; Wed, 14 Jul 2010 06:37:43 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201007140637.o6E6bht4082430@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Wed, 14 Jul 2010 06:37:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210044 - head/cddl/contrib/opensolaris/lib/libzpool/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2010 06:37:43 -0000 Author: pjd Date: Wed Jul 14 06:37:43 2010 New Revision: 210044 URL: http://svn.freebsd.org/changeset/base/210044 Log: MFp4 180933: Initialize rw_count properly so that zdb(8) doesn't trigger assertion in rw_enter(): ASSERT(rwlp->rw_count == 0); While here, assert that rw_count is 0 when destroying the lock. MFC after: 1 week Modified: head/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Modified: head/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Wed Jul 14 01:55:24 2010 (r210043) +++ head/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Wed Jul 14 06:37:43 2010 (r210044) @@ -174,11 +174,13 @@ rw_init(krwlock_t *rwlp, char *name, int rwlock_init(&rwlp->rw_lock, USYNC_THREAD, NULL); rwlp->rw_owner = NULL; rwlp->initialized = B_TRUE; + rwlp->rw_count = 0; } void rw_destroy(krwlock_t *rwlp) { + ASSERT(rwlp->rw_count == 0); rwlock_destroy(&rwlp->rw_lock); rwlp->rw_owner = (void *)-1UL; rwlp->initialized = B_FALSE; From owner-svn-src-all@FreeBSD.ORG Wed Jul 14 08:22:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 009701065674; Wed, 14 Jul 2010 08:22:00 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E456B8FC1A; Wed, 14 Jul 2010 08:22:00 +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 o6E8M00G005493; Wed, 14 Jul 2010 08:22:00 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6E8M0rA005491; Wed, 14 Jul 2010 08:22:00 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201007140822.o6E8M0rA005491@svn.freebsd.org> From: Ruslan Ermilov Date: Wed, 14 Jul 2010 08:22:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210046 - head/sys/geom/cache X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2010 08:22:01 -0000 Author: ru Date: Wed Jul 14 08:22:00 2010 New Revision: 210046 URL: http://svn.freebsd.org/changeset/base/210046 Log: Fixed cache size decoding read from a label. PR: kern/144732 Submitted by: Eugene Grosbein MFC after: 3 days Modified: head/sys/geom/cache/g_cache.h Modified: head/sys/geom/cache/g_cache.h ============================================================================== --- head/sys/geom/cache/g_cache.h Wed Jul 14 08:08:43 2010 (r210045) +++ head/sys/geom/cache/g_cache.h Wed Jul 14 08:22:00 2010 (r210046) @@ -139,7 +139,7 @@ cache_metadata_decode(const u_char *data md->md_version = le32dec(data + 16); bcopy(data + 20, md->md_name, sizeof(md->md_name)); md->md_bsize = le32dec(data + 36); - md->md_size = le16dec(data + 40); + md->md_size = le32dec(data + 40); md->md_provsize = le64dec(data + 44); } From owner-svn-src-all@FreeBSD.ORG Wed Jul 14 10:49:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE352106567A; Wed, 14 Jul 2010 10:49:14 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DDC218FC21; Wed, 14 Jul 2010 10:49:14 +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 o6EAnE6E043061; Wed, 14 Jul 2010 10:49:14 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6EAnErE043059; Wed, 14 Jul 2010 10:49:14 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007141049.o6EAnErE043059@svn.freebsd.org> From: Alexander Motin Date: Wed, 14 Jul 2010 10:49:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210052 - head/sys/x86/x86 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2010 10:49:15 -0000 Author: mav Date: Wed Jul 14 10:49:14 2010 New Revision: 210052 URL: http://svn.freebsd.org/changeset/base/210052 Log: Remove some unneeded includes. Code now can be built on ARM. Modified: head/sys/x86/x86/timeevents.c Modified: head/sys/x86/x86/timeevents.c ============================================================================== --- head/sys/x86/x86/timeevents.c Wed Jul 14 08:58:50 2010 (r210051) +++ head/sys/x86/x86/timeevents.c Wed Jul 14 10:49:14 2010 (r210052) @@ -34,7 +34,6 @@ __FBSDID("$FreeBSD$"); /* XEN has own timer routines now. */ #ifndef XEN -#include "opt_clock.h" #include "opt_kdtrace.h" #include @@ -53,8 +52,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include #include #ifdef KDTRACE_HOOKS From owner-svn-src-all@FreeBSD.ORG Wed Jul 14 13:03:00 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A77091065670; Wed, 14 Jul 2010 13:03:00 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 955468FC14; Wed, 14 Jul 2010 13:03:00 +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 o6ED30Bn072421; Wed, 14 Jul 2010 13:03:00 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6ED30ur072416; Wed, 14 Jul 2010 13:03:00 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <201007141303.o6ED30ur072416@svn.freebsd.org> From: Rafal Jaworowski Date: Wed, 14 Jul 2010 13:03:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210053 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2010 13:03:00 -0000 Author: raj Date: Wed Jul 14 13:03:00 2010 New Revision: 210053 URL: http://svn.freebsd.org/changeset/base/210053 Log: Provide initial man pages for Flattened Device Tree support and the common drivers. Sponsored by: The FreeBSD Foundation Added: head/share/man/man4/fdt.4 (contents, props changed) head/share/man/man4/fdtbus.4 (contents, props changed) head/share/man/man4/simplebus.4 (contents, props changed) Modified: head/share/man/man4/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Wed Jul 14 10:49:14 2010 (r210052) +++ head/share/man/man4/Makefile Wed Jul 14 13:03:00 2010 (r210053) @@ -110,6 +110,8 @@ MAN= aac.4 \ fatm.4 \ fd.4 \ fdc.4 \ + fdt.4 \ + fdtbus.4 \ firewire.4 \ fpa.4 \ fwe.4 \ @@ -358,6 +360,7 @@ MAN= aac.4 \ siba.4 \ siftr.4 \ siis.4 \ + simplebus.4 \ sio.4 \ sis.4 \ sk.4 \ @@ -527,6 +530,7 @@ MLINKS+=fatm.4 if_fatm.4 MLINKS+=fd.4 stderr.4 \ fd.4 stdin.4 \ fd.4 stdout.4 +MLINKS+=fdt.4 FDT.4 MLINKS+=firewire.4 ieee1394.4 MLINKS+=fpa.4 fea.4 MLINKS+=fwe.4 if_fwe.4 Added: head/share/man/man4/fdt.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/fdt.4 Wed Jul 14 13:03:00 2010 (r210053) @@ -0,0 +1,184 @@ +.\" +.\" Copyright (c) 2010 The FreeBSD Foundation +.\" All rights reserved. +.\" +.\" This software was developed by Semihalf under sponsorship from +.\" the FreeBSD Foundation. +.\" +.\" 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. +.\" +.\" $FreeBSD$ +.\" +.Dd July 12, 2010 +.Dt FDT 4 +.Os +.Sh NAME +.Nm fdt +.Nd Flattened Device Tree support +.Sh SYNOPSIS +.Cd "options FDT" +.Cd "makeoptions FDT_DTS_FILE=.dts" +.Cd "options FDT_DTB_STATIC" +.Sh DESCRIPTION +.Em Flattened Device Tree +is a mechanism for describing computer hardware resources, which cannot be +probed or self enumerated, in a uniform and portable way. The primary +consumers of this technology are +.Em embedded systems, +where a lot of designs are based on similar chips, but have different +assignment of pins, memory layout, addresses bindings, interrupts routing and +other resources. +.Pp +Configuration data, which cannot be self discovered in run-time, has to be +supplied from external source. The concept of a flattened device tree is a +platform and architecture independent approach for resolving such problems. +The idea is inherited from Open Firmware IEEE 1275 device-tree notion, and has +been successfully adopted by the embedded industry. The scheme works in the +following way: +.Bl -bullet +.It +Hardware platform resources are +.Em manually +described in a human readable text source format, where all non +self-enumerating information is gathered. +.It +This source description is converted +.Em (compiled) +into a binary object i.e. a flattened device tree +.Em blob +which is passed to the kernel at boot time. +.It +The kernel (driver) learns about hardware resources details and dependencies +from this [externally supplied] blob, which eliminates the need for embedding +any information about the underlying platform hardware resources in the kernel. +.It +The flattened device tree mechanism in principle does not depend on any +particular first-stage bootloader or firmware features. The only overall +requirement for the environment is to provide a complete device tree +description to the kernel. +.El +.Pp +The +.Nm +layer allows any platform code in the kernel to retrieve information about +hardware resources from a unified origin, which brings advantages to the +embedded applications (eliminates hard-coded configuration approach, enforces +code to be data driven and extensible) leading to easier porting and +maintenance. +.Sh DEFINITIONS +.Bl -tag -width Ar +.It Va Device tree source (DTS) +The device tree source is a text file which describes hardware resources of a +computer system in a human-readable form, with certain hierarchical structure +(a tree). The default location for DTS files +in the +.Fx +source repository is +.Pa sys/boot/fdt/dts +directory. +.It Va Device tree blob (DTB) +The textual device tree description (DTS file) is first converted (compiled) +into a binary object (the device tree blob) i.e. the DTB, which is handed over +to the final consumer (typically kernel) for parsing and processing of its +contents. +.It Va Device tree compiler (DTC) +A utility program executed on the host, which transforms (compiles) a textual +description of a device tree (DTS) into a binary object (DTB). +.It Va Device tree bindings +While the device tree textual description and the binary object are media to +convey the hardware configuration information, an actual meaning and +interpretation of the contents are defined by the device tree +.Pa bindings . +They are certain conventions describing definitions (encoding) of particular +nodes in a device tree and their properties, allowed values, ranges and so on. +Such reference conventions were provided by the legacy Open Firmware bindings, +further supplemented by the ePAPR specification. +.El +.Sh "BUILDING THE WORLD" +In order for the system to support +.Nm +it is required that +.Fx +world be built with the +.Pa WITH_FDT +build knob supplied either via +.Xr src.conf 5 +or command line defined with -D. +.Pp +This creates the user space +.Pa dtc +compiler and enables +.Nm +support in +.Xr loader 8 . +.Sh "BUILDING KERNEL" +There is a couple of options for managing +.Nm +support at the +.Fx +kernel level. +.Bl -tag -width Ar +.It Va options FDT +The primary option for enabling +.Nm +support in the kernel. It covers all low-level and infrastructure parts of +.Nm +kernel support, which primarily are the +.Xr fdtbus 4 and +.Xr simplebus 4 drivers, as well as helper routines and libraries. +.It Va makeoptions FDT_DTS_FILE=.dts +Specifies a preferred (default) device tree source (DTS) file for a given +kernel. The indicated DTS file will be converted (compiled) into a binary form +along with building the kernel itself. The DTS file name is relative +to the default location of DTS sources i.e. +.Pa sys/boot/fdt/dts . +This makeoption is not mandatory unless FDT_DTB_STATIC is also defined (see +below). +.It Va options FDT_DTB_STATIC +Typically, the device tree blob (DTB) is a stand-alone file, physically +separate from the kernel, but this option lets statically embed a +DTB file into a kernel image. Note that when this is specified the +FDT_DTS_FILE makeoption becomes mandatory (as there needs to be a DTS file +specified in order to embed it into the kernel image). +.El +.Sh SEE ALSO +.Xr fdtbus 4 , +.Xr openfirm 4 , +.Xr simplebus 4 , +.Sh STANDARDS +IEEE Std 1275: IEEE Standard for Boot (Initialization Configuration) Firmware: +Core Requirements and Practices +.Pq Vt Open Firmware . +.Pp +Power.org Standard for Embedded Power Architecture Platform Requirements +.Pq Vt ePAPR . +.Sh HISTORY +The +.Nm +support first appeared in +.Fx 9.0 . +.Sh AUTHORS +The +.Nm +support was developed by Semihalf under sponsorship from the FreeBSD +Foundation. This manual page was written by +.An Rafal Jaworowski . Added: head/share/man/man4/fdtbus.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/fdtbus.4 Wed Jul 14 13:03:00 2010 (r210053) @@ -0,0 +1,87 @@ +.\" +.\" Copyright (c) 2010 The FreeBSD Foundation +.\" All rights reserved. +.\" +.\" This software was developed by Semihalf under sponsorship from +.\" the FreeBSD Foundation. +.\" +.\" 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. +.\" +.\" $FreeBSD$ +.\" +.Dd July 12, 2010 +.Dt FDTBUS 4 +.Os +.Sh NAME +.Nm fdtbus +.Nd Flattened Device Tree bus driver +.Sh SYNOPSIS +.Cd "options FDT" +.Sh DESCRIPTION +The +.Nm +abstract bus driver is the primary connection and translation layer between +.Xr fdt 4 +hardware resources description and +.Fx +native newbus device drivers framework. For an embedded system +.Nm +represents peripherals typically found on a highly integrated chip +(system-on-chip). +.Pp +The +.Nm +driver provides generic, common infrastructure for all +.Xr fdt 4 oriented device drivers, and its main responsibilities are the +following: +.Bl -bullet +.It +Creating newbus children that reflect +.Xr fdt 4 +nodes in the flattened device tree. +.It +Managing SYS_RES_IRQ resources. +.It +Managing SYS_RES_MEMORY, SYS_RES_IOPORT resources. +.El +.Sh SEE ALSO +.Xr fdt 4 , +.Xr openfirm 4 , +.Xr simplebus 4 , +.Sh STANDARDS +IEEE Std 1275: IEEE Standard for Boot (Initialization Configuration) Firmware: +Core Requirements and Practices +.Pq Vt Open Firmware . +.Pp +Power.org Standard for Embedded Power Architecture Platform Requirements +.Pq Vt ePAPR . +.Sh HISTORY +The +.Nm +support first appeared in +.Fx 9.0 . +.Sh AUTHORS +The +.Nm +support was developed by Semihalf under sponsorship from the FreeBSD +Foundation. This manual page was written by +.An Rafal Jaworowski . Added: head/share/man/man4/simplebus.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/simplebus.4 Wed Jul 14 13:03:00 2010 (r210053) @@ -0,0 +1,81 @@ +.\" +.\" Copyright (c) 2010 The FreeBSD Foundation +.\" All rights reserved. +.\" +.\" This software was developed by Semihalf under sponsorship from +.\" the FreeBSD Foundation. +.\" +.\" 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. +.\" +.\" $FreeBSD$ +.\" +.Dd July 12, 2010 +.Dt SIMPLEBUS 4 +.Os +.Sh NAME +.Nm simplebus +.Nd ePAPR simple-bus driver +.Sh SYNOPSIS +.Cd "options FDT" +.Sh DESCRIPTION +This bus driver is dedicated for the +.Pa simple-bus +node of a flattened device tree compliant with the +.Pa ePAPR +specification. +.Pp +The +.Nm +entity does not represent any physical element by itself, it is rather an +umbrella node grouping integrated on-chip peripherals like interrupt +controller, connectivity controllers, accelerating engines and so on. +.Pp +The driver is generic and common for all flattened device tree nodes claiming +.Pa simple-bus +compatibility. It iterates over direct descendants of the +.Pa simple-bus +node, instantiates newbus children and assigns resources to them, based on the +configuration data retrieved from the nodes properties in +.Xr fdt 4 . +.Pp +Note the +.Nm +does not manage device resources and passes through any requests to the +.Xr fdtbus 4 layer. +.Sh SEE ALSO +.Xr fdt 4 , +.Xr fdtbus 4 , +.Xr openfirm 4 , +.Sh STANDARDS +Power.org Standard for Embedded Power Architecture Platform Requirements +.Pq Vt ePAPR . +.Sh HISTORY +The +.Nm +support first appeared in +.Fx 9.0 . +.Sh AUTHORS +The +.Nm +support was developed by Semihalf under sponsorship from the FreeBSD +Foundation. This manual page was written by +.An Rafal Jaworowski . From owner-svn-src-all@FreeBSD.ORG Wed Jul 14 13:31:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 534481065672; Wed, 14 Jul 2010 13:31:28 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 404BD8FC1D; Wed, 14 Jul 2010 13:31:28 +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 o6EDVSoO078649; Wed, 14 Jul 2010 13:31:28 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6EDVRp2078644; Wed, 14 Jul 2010 13:31:27 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007141331.o6EDVRp2078644@svn.freebsd.org> From: Alexander Motin Date: Wed, 14 Jul 2010 13:31:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210054 - in head/sys: conf kern x86/x86 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2010 13:31:28 -0000 Author: mav Date: Wed Jul 14 13:31:27 2010 New Revision: 210054 URL: http://svn.freebsd.org/changeset/base/210054 Log: Move timeevents.c to MI code, as it is not x86-specific. I already have it working on Marvell ARM SoCs, and it would be nice to unify timer code between more platforms. Added: head/sys/kern/timeevents.c - copied unchanged from r210053, head/sys/x86/x86/timeevents.c Deleted: head/sys/x86/x86/timeevents.c Modified: head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/conf/files.pc98 Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Wed Jul 14 13:03:00 2010 (r210053) +++ head/sys/conf/files.amd64 Wed Jul 14 13:31:27 2010 (r210054) @@ -230,6 +230,7 @@ dev/wpi/if_wpi.c optional wpi isa/syscons_isa.c optional sc isa/vga_isa.c optional vga kern/link_elf_obj.c standard +kern/timeevents.c standard # # IA32 binary support # @@ -315,4 +316,4 @@ x86/x86/io_apic.c standard x86/x86/local_apic.c standard x86/x86/mca.c standard x86/x86/msi.c optional pci -x86/x86/timeevents.c standard + Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Wed Jul 14 13:03:00 2010 (r210053) +++ head/sys/conf/files.i386 Wed Jul 14 13:31:27 2010 (r210054) @@ -349,6 +349,7 @@ isa/syscons_isa.c optional sc isa/vga_isa.c optional vga kern/imgact_aout.c optional compat_aout kern/imgact_gzip.c optional gzip +kern/timeevents.c standard libkern/divdi3.c standard libkern/ffsl.c standard libkern/flsl.c standard @@ -390,4 +391,3 @@ x86/x86/io_apic.c optional apic x86/x86/local_apic.c optional apic x86/x86/mca.c standard x86/x86/msi.c optional apic pci -x86/x86/timeevents.c standard Modified: head/sys/conf/files.pc98 ============================================================================== --- head/sys/conf/files.pc98 Wed Jul 14 13:03:00 2010 (r210053) +++ head/sys/conf/files.pc98 Wed Jul 14 13:31:27 2010 (r210054) @@ -215,6 +215,7 @@ i386/svr4/svr4_machdep.c optional compat # kern/imgact_aout.c optional compat_aout kern/imgact_gzip.c optional gzip +kern/timeevents.c standard libkern/divdi3.c standard libkern/ffsl.c standard libkern/flsl.c standard @@ -258,4 +259,3 @@ x86/x86/io_apic.c optional apic x86/x86/local_apic.c optional apic x86/x86/mca.c standard x86/x86/msi.c optional apic pci -x86/x86/timeevents.c standard Copied: head/sys/kern/timeevents.c (from r210053, head/sys/x86/x86/timeevents.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/kern/timeevents.c Wed Jul 14 13:31:27 2010 (r210054, copy of r210053, head/sys/x86/x86/timeevents.c) @@ -0,0 +1,508 @@ +/*- + * Copyright (c) 2010 Alexander Motin + * 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, + * without modification, immediately at the beginning of the file. + * 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 ``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 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$"); + +/* + * Common routines to manage event timers hardware. + */ + +/* XEN has own timer routines now. */ +#ifndef XEN + +#include "opt_kdtrace.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#ifdef KDTRACE_HOOKS +#include +cyclic_clock_func_t cyclic_clock_func[MAXCPU]; +#endif + +static void cpu_restartclocks(void); +static void timercheck(void); +inline static int doconfigtimer(int i); +static void configtimer(int i); + +static struct eventtimer *timer[2] = { NULL, NULL }; +static int timertest = 0; +static int timerticks[2] = { 0, 0 }; +static int profiling_on = 0; +static struct bintime timerperiod[2]; + +static char timername[2][32]; +TUNABLE_STR("kern.eventtimer.timer1", timername[0], sizeof(*timername)); +TUNABLE_STR("kern.eventtimer.timer2", timername[1], sizeof(*timername)); + +static u_int singlemul = 0; +TUNABLE_INT("kern.eventtimer.singlemul", &singlemul); +SYSCTL_INT(_kern_eventtimer, OID_AUTO, singlemul, CTLFLAG_RW, &singlemul, + 0, "Multiplier, used in single timer mode"); + +typedef u_int tc[2]; +static DPCPU_DEFINE(tc, configtimer); + +#define FREQ2BT(freq, bt) \ +{ \ + (bt)->sec = 0; \ + (bt)->frac = ((uint64_t)0x8000000000000000 / (freq)) << 1; \ +} +#define BT2FREQ(bt, freq) \ +{ \ + *(freq) = ((uint64_t)0x8000000000000000 + ((bt)->frac >> 2)) / \ + ((bt)->frac >> 1); \ +} + +/* Per-CPU timer1 handler. */ +static int +hardclockhandler(struct trapframe *frame) +{ + +#ifdef KDTRACE_HOOKS + /* + * If the DTrace hooks are configured and a callback function + * has been registered, then call it to process the high speed + * timers. + */ + int cpu = curcpu; + if (cyclic_clock_func[cpu] != NULL) + (*cyclic_clock_func[cpu])(frame); +#endif + + timer1clock(TRAPF_USERMODE(frame), TRAPF_PC(frame)); + return (FILTER_HANDLED); +} + +/* Per-CPU timer2 handler. */ +static int +statclockhandler(struct trapframe *frame) +{ + + timer2clock(TRAPF_USERMODE(frame), TRAPF_PC(frame)); + return (FILTER_HANDLED); +} + +/* timer1 broadcast IPI handler. */ +int +hardclockintr(struct trapframe *frame) +{ + + if (doconfigtimer(0)) + return (FILTER_HANDLED); + return (hardclockhandler(frame)); +} + +/* timer2 broadcast IPI handler. */ +int +statclockintr(struct trapframe *frame) +{ + + if (doconfigtimer(1)) + return (FILTER_HANDLED); + return (statclockhandler(frame)); +} + +/* timer1 callback. */ +static void +timer1cb(struct eventtimer *et, void *arg) +{ + +#ifdef SMP + /* Broadcast interrupt to other CPUs for non-per-CPU timers */ + if (smp_started && (et->et_flags & ET_FLAGS_PERCPU) == 0) + ipi_all_but_self(IPI_HARDCLOCK); +#endif + if (timertest) { + if ((et->et_flags & ET_FLAGS_PERCPU) == 0 || curcpu == 0) { + timerticks[0]++; + if (timerticks[0] >= timer1hz) { + ET_LOCK(); + timercheck(); + ET_UNLOCK(); + } + } + } + hardclockhandler(curthread->td_intr_frame); +} + +/* timer2 callback. */ +static void +timer2cb(struct eventtimer *et, void *arg) +{ + +#ifdef SMP + /* Broadcast interrupt to other CPUs for non-per-CPU timers */ + if (smp_started && (et->et_flags & ET_FLAGS_PERCPU) == 0) + ipi_all_but_self(IPI_STATCLOCK); +#endif + if (timertest) { + if ((et->et_flags & ET_FLAGS_PERCPU) == 0 || curcpu == 0) { + timerticks[1]++; + if (timerticks[1] >= timer2hz * 2) { + ET_LOCK(); + timercheck(); + ET_UNLOCK(); + } + } + } + statclockhandler(curthread->td_intr_frame); +} + +/* + * Check that both timers are running with at least 1/4 of configured rate. + * If not - replace the broken one. + */ +static void +timercheck(void) +{ + + if (!timertest) + return; + timertest = 0; + if (timerticks[0] * 4 < timer1hz) { + printf("Event timer \"%s\" is dead.\n", timer[0]->et_name); + timer1hz = 0; + configtimer(0); + et_ban(timer[0]); + et_free(timer[0]); + timer[0] = et_find(NULL, ET_FLAGS_PERIODIC, ET_FLAGS_PERIODIC); + if (timer[0] == NULL) { + timer2hz = 0; + configtimer(1); + et_free(timer[1]); + timer[1] = NULL; + timer[0] = timer[1]; + } + et_init(timer[0], timer1cb, NULL, NULL); + cpu_restartclocks(); + return; + } + if (timerticks[1] * 4 < timer2hz) { + printf("Event timer \"%s\" is dead.\n", timer[1]->et_name); + timer2hz = 0; + configtimer(1); + et_ban(timer[1]); + et_free(timer[1]); + timer[1] = et_find(NULL, ET_FLAGS_PERIODIC, ET_FLAGS_PERIODIC); + if (timer[1] != NULL) + et_init(timer[1], timer2cb, NULL, NULL); + cpu_restartclocks(); + return; + } +} + +/* + * Reconfigure specified per-CPU timer on other CPU. Called from IPI handler. + */ +inline static int +doconfigtimer(int i) +{ + tc *conf; + + conf = DPCPU_PTR(configtimer); + if (atomic_load_acq_int(*conf + i)) { + if (i == 0 ? timer1hz : timer2hz) + et_start(timer[i], NULL, &timerperiod[i]); + else + et_stop(timer[i]); + atomic_store_rel_int(*conf + i, 0); + return (1); + } + return (0); +} + +/* + * Reconfigure specified timer. + * For per-CPU timers use IPI to make other CPUs to reconfigure. + */ +static void +configtimer(int i) +{ +#ifdef SMP + tc *conf; + int cpu; + + critical_enter(); +#endif + /* Start/stop global timer or per-CPU timer of this CPU. */ + if (i == 0 ? timer1hz : timer2hz) + et_start(timer[i], NULL, &timerperiod[i]); + else + et_stop(timer[i]); +#ifdef SMP + if ((timer[i]->et_flags & ET_FLAGS_PERCPU) == 0 || !smp_started) { + critical_exit(); + return; + } + /* Set reconfigure flags for other CPUs. */ + CPU_FOREACH(cpu) { + conf = DPCPU_ID_PTR(cpu, configtimer); + atomic_store_rel_int(*conf + i, (cpu == curcpu) ? 0 : 1); + } + /* Send reconfigure IPI. */ + ipi_all_but_self(i == 0 ? IPI_HARDCLOCK : IPI_STATCLOCK); + /* Wait for reconfiguration completed. */ +restart: + cpu_spinwait(); + CPU_FOREACH(cpu) { + if (cpu == curcpu) + continue; + conf = DPCPU_ID_PTR(cpu, configtimer); + if (atomic_load_acq_int(*conf + i)) + goto restart; + } + critical_exit(); +#endif +} + +/* + * Configure and start event timers. + */ +void +cpu_initclocks_bsp(void) +{ + int base, div; + + timer[0] = et_find(timername[0], ET_FLAGS_PERIODIC, ET_FLAGS_PERIODIC); + if (timer[0] == NULL) + timer[0] = et_find(NULL, ET_FLAGS_PERIODIC, ET_FLAGS_PERIODIC); + if (timer[0] == NULL) + panic("No usable event timer found!"); + et_init(timer[0], timer1cb, NULL, NULL); + timer[1] = et_find(timername[1][0] ? timername[1] : NULL, + ET_FLAGS_PERIODIC, ET_FLAGS_PERIODIC); + if (timer[1]) + et_init(timer[1], timer2cb, NULL, NULL); + /* + * We honor the requested 'hz' value. + * We want to run stathz in the neighborhood of 128hz. + * We would like profhz to run as often as possible. + */ + if (singlemul == 0) { + if (hz >= 1500 || (hz % 128) == 0) + singlemul = 1; + else if (hz >= 750) + singlemul = 2; + else + singlemul = 4; + } + if (timer[1] == NULL) { + base = hz * singlemul; + if (base < 128) + stathz = base; + else { + div = base / 128; + if (div % 2 == 0) + div++; + stathz = base / div; + } + profhz = stathz; + while ((profhz + stathz) <= 8192) + profhz += stathz; + } else { + stathz = 128; + profhz = stathz * 64; + } + ET_LOCK(); + cpu_restartclocks(); + ET_UNLOCK(); +} + +/* Start per-CPU event timers on APs. */ +void +cpu_initclocks_ap(void) +{ + + ET_LOCK(); + if (timer[0]->et_flags & ET_FLAGS_PERCPU) + et_start(timer[0], NULL, &timerperiod[0]); + if (timer[1] && timer[1]->et_flags & ET_FLAGS_PERCPU) + et_start(timer[1], NULL, &timerperiod[1]); + ET_UNLOCK(); +} + +/* Reconfigure and restart event timers after configuration changes. */ +static void +cpu_restartclocks(void) +{ + + /* Stop all event timers. */ + timertest = 0; + if (timer1hz) { + timer1hz = 0; + configtimer(0); + } + if (timer[1] && timer2hz) { + timer2hz = 0; + configtimer(1); + } + /* Calculate new event timers parameters. */ + if (timer[1] == NULL) { + timer1hz = hz * singlemul; + while (timer1hz < (profiling_on ? profhz : stathz)) + timer1hz += hz; + timer2hz = 0; + } else { + timer1hz = hz; + timer2hz = profiling_on ? profhz : stathz; + } + printf("Starting kernel event timers: %s @ %dHz, %s @ %dHz\n", + timer[0]->et_name, timer1hz, + timer[1] ? timer[1]->et_name : "NONE", timer2hz); + /* Restart event timers. */ + FREQ2BT(timer1hz, &timerperiod[0]); + configtimer(0); + if (timer[1]) { + timerticks[0] = 0; + timerticks[1] = 0; + FREQ2BT(timer2hz, &timerperiod[1]); + configtimer(1); + timertest = 1; + } +} + +/* Switch to profiling clock rates. */ +void +cpu_startprofclock(void) +{ + + ET_LOCK(); + profiling_on = 1; + cpu_restartclocks(); + ET_UNLOCK(); +} + +/* Switch to regular clock rates. */ +void +cpu_stopprofclock(void) +{ + + ET_LOCK(); + profiling_on = 0; + cpu_restartclocks(); + ET_UNLOCK(); +} + +/* Report or change the active event timers hardware. */ +static int +sysctl_kern_eventtimer_timer1(SYSCTL_HANDLER_ARGS) +{ + char buf[32]; + struct eventtimer *et; + int error; + + ET_LOCK(); + et = timer[0]; + snprintf(buf, sizeof(buf), "%s", et->et_name); + ET_UNLOCK(); + error = sysctl_handle_string(oidp, buf, sizeof(buf), req); + ET_LOCK(); + et = timer[0]; + if (error != 0 || req->newptr == NULL || + strcmp(buf, et->et_name) == 0) { + ET_UNLOCK(); + return (error); + } + et = et_find(buf, ET_FLAGS_PERIODIC, ET_FLAGS_PERIODIC); + if (et == NULL) { + ET_UNLOCK(); + return (ENOENT); + } + timer1hz = 0; + configtimer(0); + et_free(timer[0]); + timer[0] = et; + et_init(timer[0], timer1cb, NULL, NULL); + cpu_restartclocks(); + ET_UNLOCK(); + return (error); +} +SYSCTL_PROC(_kern_eventtimer, OID_AUTO, timer1, + CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_MPSAFE, + 0, 0, sysctl_kern_eventtimer_timer1, "A", "Primary event timer"); + +static int +sysctl_kern_eventtimer_timer2(SYSCTL_HANDLER_ARGS) +{ + char buf[32]; + struct eventtimer *et; + int error; + + ET_LOCK(); + et = timer[1]; + if (et == NULL) + snprintf(buf, sizeof(buf), "NONE"); + else + snprintf(buf, sizeof(buf), "%s", et->et_name); + ET_UNLOCK(); + error = sysctl_handle_string(oidp, buf, sizeof(buf), req); + ET_LOCK(); + et = timer[1]; + if (error != 0 || req->newptr == NULL || + strcmp(buf, et ? et->et_name : "NONE") == 0) { + ET_UNLOCK(); + return (error); + } + et = et_find(buf, ET_FLAGS_PERIODIC, ET_FLAGS_PERIODIC); + if (et == NULL && strcasecmp(buf, "NONE") != 0) { + ET_UNLOCK(); + return (ENOENT); + } + if (timer[1] != NULL) { + timer2hz = 0; + configtimer(1); + et_free(timer[1]); + } + timer[1] = et; + if (timer[1] != NULL) + et_init(timer[1], timer2cb, NULL, NULL); + cpu_restartclocks(); + ET_UNLOCK(); + return (error); +} +SYSCTL_PROC(_kern_eventtimer, OID_AUTO, timer2, + CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_MPSAFE, + 0, 0, sysctl_kern_eventtimer_timer2, "A", "Secondary event timer"); + +#endif + From owner-svn-src-all@FreeBSD.ORG Wed Jul 14 14:31:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 064B91065676; Wed, 14 Jul 2010 14:31:19 +0000 (UTC) (envelope-from gibbs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DEDC58FC17; Wed, 14 Jul 2010 14:31:18 +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 o6EEVIW4091777; Wed, 14 Jul 2010 14:31:18 GMT (envelope-from gibbs@svn.freebsd.org) Received: (from gibbs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6EEVIsj091773; Wed, 14 Jul 2010 14:31:18 GMT (envelope-from gibbs@svn.freebsd.org) Message-Id: <201007141431.o6EEVIsj091773@svn.freebsd.org> From: "Justin T. Gibbs" Date: Wed, 14 Jul 2010 14:31:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210055 - in head/sys/dev/aic7xxx: . aicasm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2010 14:31:19 -0000 Author: gibbs Date: Wed Jul 14 14:31:18 2010 New Revision: 210055 URL: http://svn.freebsd.org/changeset/base/210055 Log: Correct logic bug in aicasm's undefined register bit access detection code. The code in question verifies that all register write operations only change bits that are defined (in the register definition file) for that effected register. The bug effectively disabled this checking. o Fix the check by testing the opcode against all supported read ("and" based) operands. o Add missing bit definitions to the aic7xxx and aic79xx register definition files so that the warning (treated as a fatal error) does not spuriously fire. Reported by: Pawel Worach MFC after: 1 week Modified: head/sys/dev/aic7xxx/aic79xx.reg head/sys/dev/aic7xxx/aic7xxx.reg head/sys/dev/aic7xxx/aicasm/aicasm_gram.y Modified: head/sys/dev/aic7xxx/aic79xx.reg ============================================================================== --- head/sys/dev/aic7xxx/aic79xx.reg Wed Jul 14 13:31:27 2010 (r210054) +++ head/sys/dev/aic7xxx/aic79xx.reg Wed Jul 14 14:31:18 2010 (r210055) @@ -3813,6 +3813,7 @@ scb { SCB_RESIDUAL_SGPTR { size 4 field SG_ADDR_MASK 0xf8 /* In the last byte */ + field SG_ADDR_BIT 0x04 field SG_OVERRUN_RESID 0x02 /* In the first byte */ field SG_LIST_NULL 0x01 /* In the first byte */ } Modified: head/sys/dev/aic7xxx/aic7xxx.reg ============================================================================== --- head/sys/dev/aic7xxx/aic7xxx.reg Wed Jul 14 13:31:27 2010 (r210054) +++ head/sys/dev/aic7xxx/aic7xxx.reg Wed Jul 14 14:31:18 2010 (r210055) @@ -1448,6 +1448,7 @@ scratch_ram { mask EXIT_MSG_LOOP 0x08 mask CONT_MSG_LOOP 0x04 mask CONT_TARG_SESSION 0x02 + mask SPARE 0x01 alias RETURN_1 } ARG_2 { Modified: head/sys/dev/aic7xxx/aicasm/aicasm_gram.y ============================================================================== --- head/sys/dev/aic7xxx/aicasm/aicasm_gram.y Wed Jul 14 13:31:27 2010 (r210054) +++ head/sys/dev/aic7xxx/aicasm/aicasm_gram.y Wed Jul 14 14:31:18 2010 (r210055) @@ -1821,9 +1821,15 @@ type_check(symbol_t *symbol, expression_ { symbol_node_t *node; int and_op; + uint8_t invalid_bits; and_op = FALSE; - if (opcode == AIC_OP_AND || opcode == AIC_OP_JNZ || AIC_OP_JZ) + if (opcode == AIC_OP_AND + || opcode == AIC_OP_BMOV + || opcode == AIC_OP_JE + || opcode == AIC_OP_JNE + || opcode == AIC_OP_JNZ + || opcode == AIC_OP_JZ) and_op = TRUE; /* @@ -1831,12 +1837,11 @@ type_check(symbol_t *symbol, expression_ * that hasn't been defined. If this is an and operation, * this is a mask, so "undefined" bits are okay. */ - if (and_op == FALSE - && (expression->value & ~symbol->info.rinfo->valid_bitmask) != 0) { + invalid_bits = expression->value & ~symbol->info.rinfo->valid_bitmask; + if (and_op == FALSE && invalid_bits != 0) { snprintf(errbuf, sizeof(errbuf), "Invalid bit(s) 0x%x in immediate written to %s", - expression->value & ~symbol->info.rinfo->valid_bitmask, - symbol->name); + invalid_bits, symbol->name); stop(errbuf, EX_DATAERR); /* NOTREACHED */ } From owner-svn-src-all@FreeBSD.ORG Wed Jul 14 15:11:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31B591065670; Wed, 14 Jul 2010 15:11:30 +0000 (UTC) (envelope-from mp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2031C8FC1E; Wed, 14 Jul 2010 15:11:30 +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 o6EFBUHM000936; Wed, 14 Jul 2010 15:11:30 GMT (envelope-from mp@svn.freebsd.org) Received: (from mp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6EFBTK6000933; Wed, 14 Jul 2010 15:11:30 GMT (envelope-from mp@svn.freebsd.org) Message-Id: <201007141511.o6EFBTK6000933@svn.freebsd.org> From: Mark Peek Date: Wed, 14 Jul 2010 15:11:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210057 - stable/7/contrib/tcsh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2010 15:11:30 -0000 Author: mp Date: Wed Jul 14 15:11:29 2010 New Revision: 210057 URL: http://svn.freebsd.org/changeset/base/210057 Log: MFC r184072: Actually fix pty detection for autologout setting. Modified: stable/7/contrib/tcsh/sh.c stable/7/contrib/tcsh/tc.const.c Directory Properties: stable/7/contrib/tcsh/ (props changed) Modified: stable/7/contrib/tcsh/sh.c ============================================================================== --- stable/7/contrib/tcsh/sh.c Wed Jul 14 14:52:35 2010 (r210056) +++ stable/7/contrib/tcsh/sh.c Wed Jul 14 15:11:29 2010 (r210057) @@ -462,7 +462,7 @@ main(int argc, char **argv) else cp2 = cp; if (!(((Strncmp(cp2, STRtty, 3) == 0) && Isalpha(cp2[3])) || - Strstr(cp, STRslptssl) != NULL)) { + Strstr(cp, STRptssl) != NULL)) { if (getenv("DISPLAY") == NULL) { /* NOT on X window shells */ setcopy(STRautologout, STRdefautologout, VAR_READWRITE); Modified: stable/7/contrib/tcsh/tc.const.c ============================================================================== --- stable/7/contrib/tcsh/tc.const.c Wed Jul 14 14:52:35 2010 (r210056) +++ stable/7/contrib/tcsh/tc.const.c Wed Jul 14 15:11:29 2010 (r210057) @@ -46,7 +46,7 @@ Char STRautomatic[] = { 'a', 'u', 't', ' Char STRhangup[] = { 'h', 'a', 'n', 'g', 'u', 'p', '\0' }; Char STRaout[] = { 'a', '.', 'o', 'u', 't', '\0' }; Char STRtty[] = { 't', 't', 'y', '\0' }; -Char STRslptssl[] = { '/', 'p', 't', 's', '/', '\0' }; +Char STRptssl[] = { 'p', 't', 's', '/', '\0' }; Char STRany[] = { 'a', 'n', 'y', '\0' }; Char STRstatus[] = { 's', 't', 'a', 't', 'u', 's', '\0' }; Char STR0[] = { '0', '\0' }; From owner-svn-src-all@FreeBSD.ORG Wed Jul 14 15:14:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0AC8010656A5; Wed, 14 Jul 2010 15:14:01 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EE0258FC18; Wed, 14 Jul 2010 15:14:00 +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 o6EFE01R001562; Wed, 14 Jul 2010 15:14:00 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6EFE0SO001560; Wed, 14 Jul 2010 15:14:00 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007141514.o6EFE0SO001560@svn.freebsd.org> From: Alexander Motin Date: Wed, 14 Jul 2010 15:14:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210058 - head/sbin/geom/class/virstor X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2010 15:14:01 -0000 Author: mav Date: Wed Jul 14 15:14:00 2010 New Revision: 210058 URL: http://svn.freebsd.org/changeset/base/210058 Log: Do not bzero() NULL pointer on malloc() error. Submitted by: Dmitry Luhtionov Modified: head/sbin/geom/class/virstor/geom_virstor.c Modified: head/sbin/geom/class/virstor/geom_virstor.c ============================================================================== --- head/sbin/geom/class/virstor/geom_virstor.c Wed Jul 14 15:11:29 2010 (r210057) +++ head/sbin/geom/class/virstor/geom_virstor.c Wed Jul 14 15:14:00 2010 (r210058) @@ -459,9 +459,9 @@ virstor_label(struct gctl_req *req) strlcpy(md.provider, name, sizeof(md.provider)); } sect = malloc(ssize); - bzero(sect, ssize); if (sect == NULL) err(1, "Cannot allocate sector of %zu bytes", ssize); + bzero(sect, ssize); virstor_metadata_encode(&md, sect); error = my_g_metadata_store(name, sect, ssize); free(sect); From owner-svn-src-all@FreeBSD.ORG Wed Jul 14 15:14:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 706591065674; Wed, 14 Jul 2010 15:14:52 +0000 (UTC) (envelope-from mp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5DA0E8FC29; Wed, 14 Jul 2010 15:14:52 +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 o6EFEqGW001771; Wed, 14 Jul 2010 15:14:52 GMT (envelope-from mp@svn.freebsd.org) Received: (from mp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6EFEqWQ001763; Wed, 14 Jul 2010 15:14:52 GMT (envelope-from mp@svn.freebsd.org) Message-Id: <201007141514.o6EFEqWQ001763@svn.freebsd.org> From: Mark Peek Date: Wed, 14 Jul 2010 15:14:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210059 - stable/7/contrib/tcsh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2010 15:14:52 -0000 Author: mp Date: Wed Jul 14 15:14:52 2010 New Revision: 210059 URL: http://svn.freebsd.org/changeset/base/210059 Log: MFC: Update to tcsh 6.17.00. Requested by: gnn Added: stable/7/contrib/tcsh/config.rpath - copied unchanged from r195609, head/contrib/tcsh/config.rpath Deleted: stable/7/contrib/tcsh/Makefile.ADMIN stable/7/contrib/tcsh/RELEASE-PROCEDURE Modified: stable/7/contrib/tcsh/Fixes stable/7/contrib/tcsh/Imakefile stable/7/contrib/tcsh/Makefile.in stable/7/contrib/tcsh/README stable/7/contrib/tcsh/complete.tcsh stable/7/contrib/tcsh/config.guess stable/7/contrib/tcsh/config.h.in stable/7/contrib/tcsh/config.sub stable/7/contrib/tcsh/config_f.h stable/7/contrib/tcsh/configure stable/7/contrib/tcsh/configure.in stable/7/contrib/tcsh/ed.chared.c stable/7/contrib/tcsh/ed.decls.h stable/7/contrib/tcsh/ed.h stable/7/contrib/tcsh/ed.inputl.c stable/7/contrib/tcsh/ed.screen.c stable/7/contrib/tcsh/ed.term.h stable/7/contrib/tcsh/ed.xmap.c stable/7/contrib/tcsh/glob.c stable/7/contrib/tcsh/host.defs stable/7/contrib/tcsh/ma.setp.c stable/7/contrib/tcsh/patchlevel.h stable/7/contrib/tcsh/sh.c stable/7/contrib/tcsh/sh.char.c stable/7/contrib/tcsh/sh.char.h stable/7/contrib/tcsh/sh.decls.h stable/7/contrib/tcsh/sh.dir.c stable/7/contrib/tcsh/sh.dol.c stable/7/contrib/tcsh/sh.err.c stable/7/contrib/tcsh/sh.exec.c stable/7/contrib/tcsh/sh.exp.c stable/7/contrib/tcsh/sh.file.c stable/7/contrib/tcsh/sh.func.c stable/7/contrib/tcsh/sh.glob.c stable/7/contrib/tcsh/sh.h stable/7/contrib/tcsh/sh.lex.c stable/7/contrib/tcsh/sh.proc.c stable/7/contrib/tcsh/sh.proc.h stable/7/contrib/tcsh/sh.sem.c stable/7/contrib/tcsh/sh.set.c stable/7/contrib/tcsh/snames.h stable/7/contrib/tcsh/tc.bind.c stable/7/contrib/tcsh/tc.const.c stable/7/contrib/tcsh/tc.decls.h stable/7/contrib/tcsh/tc.func.c stable/7/contrib/tcsh/tc.os.h stable/7/contrib/tcsh/tc.sig.h stable/7/contrib/tcsh/tc.str.c stable/7/contrib/tcsh/tcsh.man stable/7/contrib/tcsh/tw.color.c stable/7/contrib/tcsh/tw.comp.c stable/7/contrib/tcsh/tw.parse.c Directory Properties: stable/7/contrib/tcsh/ (props changed) Modified: stable/7/contrib/tcsh/Fixes ============================================================================== --- stable/7/contrib/tcsh/Fixes Wed Jul 14 15:14:00 2010 (r210058) +++ stable/7/contrib/tcsh/Fixes Wed Jul 14 15:14:52 2010 (r210059) @@ -1,3 +1,74 @@ + 21. V6.17.00 - 20090710 + 20. Fix dataroot autoconf issue. + 19. Fix directory stuff for unit tests. + 18. Fix small bug in history in loops. + 17. Provide newer config.{guess,sub} + 16. Fix gcc 4 warnings. + 15. Fix memory trashing bug introduced in 10. + 14. V6.16.01 - 20090624 + 13. add missing sigemptyset in goodbye() + 12. add rlimit swapsize from FreeBSD. + 11. restore behavior where a[n-] never prints an error. + 10. always save the whole command, not just the first 80 chars of it. + 9. fix short2str/short2qstr length adjustment in wide chars + (Vitezslav Crhonek) + 8. set histfile=/tmp/history.temp; set savehist=(100 merge); + alias precmd history -S. After that justpr is not restored and commands + don't execute. (Andriy Gapon) + 7. Fix "as" $ modifier from corrupting memory. + set t=demfonsftraftionf; echo $t:as/f// + 6. Make $% work with environment variable (Ron Johnston) + 5. Dragonfly script support (Matthias Schmidt, m65) + 4. Add autoexpand=onlyhistory (Don Estabrook, m66) + 3. Add history in loops (Laurence Darby, m48) + 2. Add missing colorls "rs" variable (Shlomi Fish, m70) + 1. Fix pts detection issue (Ruslan Ermilov) + + 33. V6.16.00 - 20080930 + 32. longjmp clobbered variable fixes. + 31. __GNX__ addition + 30. Windows fork fixes + 28. V6.15.02 - 20080830 + 27. Fix an eval free'ing botch (Per Hedeland) + 26. /bin/echo "`" coredumped because stderror() calls longjmp corrupting + the stack (Mark Davies). We should vet the code for all stderror() + calls that cleanup local stack variables. + 25. foo > ${undef} caused coredumps because of vfork() child corrupting + the state of the parent stack. + 24. $x[A-B] did not complain for A out of range. (Cai Xianchao) + 23. rename setp -> tcsh_setp to avoid conflict with mach (Javier Vasquez) + 22. Fix degree handling by defining __XPG4_CHAR_CLASS__ for solaris + (Mike Sullivan) + 21. Change 'od' to 'od -c' in tests so that they work on big endian machines. + (Martin Kraemer) + 20. Add environment variable COMMAND_LINE to be available in completions + (Marcin Konarski) + 19. V6.15.01 - 20070928 + 18. Evaluate expressions in the proper order (Li Zefan), controlled by + compat_expr. + 17. Don't need to flush() if we are silent. Prevents recursive error issue. + (joshua stein) + 16. Don't execute the jobcmd if the output is not a tty (Charles Ross) + 15. Quote the history in the examples (Johann 'Myrkraverk' Oskarsson) + 14. Mismatch clarification patch (Per Hedeland) + 13. Fix 'repeat n cmd &' abort() (Mike Sullivan) + 12. Fix octal parsing (Li Zefan) + 11. Fix pty detection for autologout setting (Kris Kennaway, Giorgos Keramidas) + 10. kill `foo` got stuck because sigchld was disabled too soon (Mark Peek) + 9. Avoid null pointer dereference in proc cwd (Kurt Miller) + 8. eval "foreach a b c" exits (Anthony Menasse) + 7. Quoting was broken in substitutions (Joe Wells) + 6. QNX patches via pkgsrc + 5. cd - twice from a directory that contained a glob pattern, + expands the glob twice (Mark Santcroos) + 4. MidnightBsd support (Lucas Holt) + 3. Fix history substitution core-dump with no history entries + 2. Merge two character tables that are the same (Martin Kraemer) + 1. On ancient 7 bit locales, punctuation characters are used to + denote special characters such as umlaut, adiaresis, etc. + These characters return true for isalpha/isalnum. Ignore them + because they break parsing (Martin Kraemer) + 74. V6.15.00 - 20070303 73. fix extension eating windows code (christos) 72. fix loop in %R history expansion (christos) Modified: stable/7/contrib/tcsh/Imakefile ============================================================================== --- stable/7/contrib/tcsh/Imakefile Wed Jul 14 15:14:00 2010 (r210058) +++ stable/7/contrib/tcsh/Imakefile Wed Jul 14 15:14:52 2010 (r210059) @@ -1,5 +1,5 @@ XCOMM -XCOMM $tcsh: Imakefile,v 1.85 2006/03/02 18:46:44 christos Exp $ +XCOMM $tcsh: Imakefile,v 1.86 2007/03/19 23:25:02 christos Exp $ XCOMM XCOMM Imakefile for tcsh 6.12 XCOMM Marc Horowitz, MIT SIPB @@ -211,6 +211,10 @@ EXTF=mi.termios.c mi.wait.h mi.varargs.h # define ConfigH bsd4.4 # endif /* FreeBsdArchitecture */ +# ifdef MidnightBSDArchitecture +# define ConfigH bsd4.4 +# endif /* MidnightBsdArchitecture */ + # ifdef i386SVR4Architecture # define ConfigH sysv4 # ifdef DELL Modified: stable/7/contrib/tcsh/Makefile.in ============================================================================== --- stable/7/contrib/tcsh/Makefile.in Wed Jul 14 15:14:00 2010 (r210058) +++ stable/7/contrib/tcsh/Makefile.in Wed Jul 14 15:14:52 2010 (r210059) @@ -1,4 +1,4 @@ -# $tcsh: Makefile.in,v 3.36 2006/08/24 20:56:31 christos Exp $ +# $tcsh: Makefile.in,v 3.40 2009/06/24 22:09:05 christos Exp $ # Makefile.in 4.3 6/11/83 # # C Shell with process control; VM/UNIX VAX Makefile @@ -248,7 +248,7 @@ CPP = @CPP@ # This is set by autoconf. # The -B tells gcc to use /bin/ld. This is to avoid using the gnu ld, which # on the suns does not know how to make dynamically linked binaries. CC = @CC@ # This is set by autoconf. -#CC= gcc -Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Werror -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wsign-compare -Wcast-qual -Wreturn-type -Wswitch -Wshadow -Wwrite-strings +#CC= gcc -Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Werror -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wsign-compare -Wcast-qual -Wreturn-type -Wswitch -Wshadow -Wwrite-strings -Wextra #CC= gcc -Wall -pipe -B/bin/ # -ansi -pedantic #CC= gcc -m486 -pipe -Wall # Generate code for Intel 486 (linux) #CC= shlicc # BSDI2.1 w/ shared libraries @@ -278,7 +278,7 @@ P= prefix=@prefix@ exec_prefix=@exec_prefix@ bindir=@bindir@ -mandir=@mandir@ +mandir=@datarootdir@/man MANSECT=1 DESTBIN=${DESTDIR}${bindir} DESTMAN=${DESTDIR}${mandir}/man${MANSECT} @@ -463,7 +463,7 @@ $(srcdir)/tests/package.m4: $(srcdir)/co echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \ } >$(srcdir)/tests/package.m4 -$(srcdir)/tests/testsuite: tests/package.m4 tests/testsuite.at $(TESTFILES) +$(srcdir)/tests/testsuite: $(srcdir)/tests/package.m4 $(srcdir}/tests/testsuite.at $(TESTFILES) autom4te --language=autotest -I $(srcdir)/tests \ $(srcdir)/tests/testsuite.at -o $@.tmp mv $@.tmp $@ @@ -531,11 +531,16 @@ install.cygwin: install install.man cp ${srcdir}/WishList ${srcdir}/Y2K ${DESTDIR}${prefix}/share/doc/tcsh perl ${srcdir}/tcsh.man2html ${srcdir}/tcsh.man cp -rp tcsh.html ${DESTDIR}${prefix}/share/doc/tcsh + -mkdir -p ${DESTDIR}/etc/defaults/etc/profile.d -mkdir -p ${DESTDIR}/etc/profile.d -mkdir -p ${DESTDIR}/etc/postinstall - cp -p ${srcdir}/cygwin/etc/csh.* ${DESTDIR}/etc - cp -p ${srcdir}/cygwin/etc/profile.d/*.tcsh ${DESTDIR}/etc/profile.d - cp -p ${srcdir}/cygwin/etc/postinstall/tcsh.sh ${DESTDIR}/etc/postinstall + -mkdir -p ${DESTDIR}/etc/preremove + cp -p ${srcdir}/cygwin/csh.cshrc ${DESTDIR}/etc/defaults/etc + cp -p ${srcdir}/cygwin/csh.login ${DESTDIR}/etc/defaults/etc + cp -p ${srcdir}/cygwin/bindkey.tcsh ${DESTDIR}/etc/defaults/etc/profile.d + cp -p ${srcdir}/complete.tcsh ${DESTDIR}/etc/defaults/etc/profile.d + cp -p ${srcdir}/cygwin/postinstall.sh ${DESTDIR}/etc/postinstall/tcsh.sh + cp -p ${srcdir}/cygwin/preremove.sh ${DESTDIR}/etc/preremove/tcsh.sh # Amiga Unix #install.man: tcsh.man Modified: stable/7/contrib/tcsh/README ============================================================================== --- stable/7/contrib/tcsh/README Wed Jul 14 15:14:00 2010 (r210058) +++ stable/7/contrib/tcsh/README Wed Jul 14 15:14:52 2010 (r210059) @@ -1,4 +1,4 @@ -This is tcsh version 6.15. Tcsh is a version of the Berkeley +This is tcsh version 6.17.00. Tcsh is a version of the Berkeley C-Shell, with the addition of: a command line editor, command and file name completion, listing, etc. and a bunch of small additions to the shell itself. Modified: stable/7/contrib/tcsh/complete.tcsh ============================================================================== --- stable/7/contrib/tcsh/complete.tcsh Wed Jul 14 15:14:00 2010 (r210058) +++ stable/7/contrib/tcsh/complete.tcsh Wed Jul 14 15:14:52 2010 (r210059) @@ -1,5 +1,5 @@ # -# $tcsh: complete.tcsh,v 1.47 2006/03/02 18:46:44 christos Exp $ +# $tcsh: complete.tcsh,v 1.51 2007/10/01 21:51:59 christos Exp $ # example file using the new completion code # # Debian GNU/Linux @@ -38,18 +38,18 @@ endif if ($?_complete) then set noglob if ( ! $?hosts ) set hosts - foreach f ($HOME/.hosts /usr/local/etc/csh.hosts $HOME/.rhosts /etc/hosts.equiv) - if ( -r $f ) then - set hosts = ($hosts `grep -v "+" $f | grep -E -v "^#" | tr -s " " " " | cut -f 1`) + foreach f ("$HOME/.hosts" /usr/local/etc/csh.hosts "$HOME/.rhosts" /etc/hosts.equiv) + if ( -r "$f" ) then + set hosts = ($hosts `grep -v "+" "$f" | grep -E -v "^#" | tr -s " " " " | cut -f 1`) endif end - if ( -r $HOME/.netrc ) then - set f=`awk '/machine/ { print $2 }' < $HOME/.netrc` >& /dev/null + if ( -r "$HOME/.netrc" ) then + set f=`awk '/machine/ { print $2 }' < "$HOME/.netrc"` >& /dev/null set hosts=($hosts $f) endif - if ( -r $HOME/.ssh/known_hosts ) then - set f=`cat $HOME/.ssh/known_hosts | cut -f 1 -d \ ` >& /dev/null - set f=`cat $HOME/.ssh/known_hosts | cut -f 1 -d \ | sed -e 's/,/ /g'` >& /dev/null + if ( -r "$HOME/.ssh/known_hosts" ) then + set f=`cat "$HOME/.ssh/known_hosts" | cut -f 1 -d \ ` >& /dev/null + set f=`cat "$HOME/.ssh/known_hosts" | cut -f 1 -d \ | sed -e 's/,/ /g'` >& /dev/null set hosts=($hosts $f) endif unset f @@ -224,7 +224,7 @@ if ($?_complete) then # these should be merged with the MH completion hacks below - jgotts complete {refile,sprev,snext,scan,pick,rmm,inc,folder,show} \ - c@+@F:$HOME/Mail/@ + "c@+@F:$HOME/Mail/@" # these and interrupt handling from Jaap Vermeulen complete {rexec,rxexec,rxterm,rmterm} \ @@ -286,7 +286,7 @@ if ($?_complete) then complete setenv 'p/1/e/' 'c/*:/f/' # these and method of setting hosts from Kimmo Suominen - if ( -f $HOME/.mh_profile && -x "`which folders`" ) then + if ( -f "$HOME/.mh_profile" && -x "`which folders`" ) then if ( ! $?FOLDERS ) setenv FOLDERS "`folders -fast -recurse`" if ( ! $?MHA ) setenv MHA "`ali | sed -e '/^ /d' -e 's/:.*//'`" @@ -505,6 +505,19 @@ if ($?_complete) then logout rdiff release remove rtag status tag unedit \ update watch watchers)/' 'n/-a/(edit unedit commit \ all none)/' 'n/watch/(on off add remove)/' + complete svn 'C@file:///@`'"${HOME}/etc/tcsh/complete.d/svn"'`@@' \ + 'n@ls@(file:/// svn+ssh:// svn://)@@' \ + 'n@help@(add blame cat checkout \ + cleanup commit copy delete export help \ + import info list ls lock log merge mkdir \ + move propdel propedit propget proplist \ + propset resolved revert status switch unlock \ + update)@' 'p@1@(add blame cat checkout \ + cleanup commit copy delete export help \ + import info list ls lock log merge mkdir \ + move propdel propedit propget proplist \ + propset resolved revert status switch unlock \ + update)@' complete cxx 'p/*/f:*.{c++,cxx,c,cc,C,cpp}/' complete detex 'p/*/f:*.tex/' complete edquota 'n/*/u/' @@ -591,14 +604,14 @@ if ($?_complete) then flush-logs flush-status flush-tables flush-privileges \ kill password ping processlist reload refresh \ shutdown status variables version)/' - complete mutt c@-f=@F:${HOME}/Mail/@ \ + complete mutt "c@-f=@F:${HOME}/Mail/@" \ n/-a/f/ \ n/-F/f/ n/-H/f/ \ n/-s/x:''/ \ n/-e/x:''/ \ - n@-b@'`cat ${HOME}/.muttrc-alias | awk '"'"'{print $2 }'"'"\`@ \ - n@-c@'`cat ${HOME}/.muttrc-alias | awk '"'"'{print $2 }'"'"\`@ \ - n@*@'`cat ${HOME}/.muttrc-alias | awk '"'"'{print $2 }'"'"\`@ + n@-b@'`cat "${HOME}/.muttrc-alias" | awk '"'"'{print $2 }'"'"\`@ \ + n@-c@'`cat "${HOME}/.muttrc-alias" | awk '"'"'{print $2 }'"'"\`@ \ + n@*@'`cat "${HOME}/.muttrc-alias" | awk '"'"'{print $2 }'"'"\`@ complete ndc 'n/*/(status dumpdb reload stats trace notrace \ querylog start stop restart )/' if ($?traditional_complete) then @@ -711,14 +724,15 @@ if ($?_complete) then complete unsetenv n/*/e/ set _maildir = /var/mail - if (-r $HOME/.mailrc) then + if (-r "$HOME/.mailrc") then complete mail c/-/"(e i f n s u v)"/ c/*@/\$hosts/ \ - c@+@F:$HOME/Mail@ C@[./\$~]@f@ n/-s/x:''/ \ + "c@+@F:$HOME/Mail@" C@[./\$~]@f@ n/-s/x:''/ \ n@-u@T:$_maildir@ n/-f/f/ \ - n@*@'`sed -n s/alias//p $HOME/.mailrc | tr -s " " " " | cut -f 2`'@ + n@*@'`sed -n s/alias//p "$HOME/.mailrc" | \ + tr -s " " " " | cut -f 2`'@ else complete mail c/-/"(e i f n s u v)"/ c/*@/\$hosts/ \ - c@+@F:$HOME/Mail@ C@[./\$~]@f@ n/-s/x:''/ \ + "c@+@F:$HOME/Mail@" C@[./\$~]@f@ n/-s/x:''/ \ n@-u@T:$_maildir@ n/-f/f/ n/*/u/ endif unset _maildir @@ -1029,23 +1043,41 @@ n@public@'`[ -r /usr/man/manp ]&& \ls -1 N/{-C,--directory}/'`\ls $:-1`'/ \ n/-[0-7]/"(l m h)"/ - # Linux filesystems - complete mount c/-/"(a f F h l n o r s t U v V w)"/ n/-[hV]/n/ \ - n/-o/x:''/ n/-t/x:''/ \ - n/-L/x:'
  • @@ -477,19 +477,17 @@ on std:string, but does not req an std::string, or explicitly with a character pointer and length. For example, the StringRef find function is declared as:

    -
    - iterator find(const StringRef &Key); -
    +
    +  iterator find(StringRef Key);
    +

    and clients can call it using any one of:

    -
    -
    +
       Map.find("foo");                 // Lookup "foo"
       Map.find(std::string("bar"));    // Lookup "bar"
       Map.find(StringRef("\0baz", 4)); // Lookup "\0baz"
     
    -

    Similarly, APIs which need to return a string may return a StringRef instance, which can be used directly or converted to an std::string @@ -499,7 +497,8 @@ for more information.

    You should rarely use the StringRef class directly, because it contains pointers to external memory it is not generally safe to store an instance of the -class (unless you know that the external storage will not be freed).

    +class (unless you know that the external storage will not be freed). StringRef is +small and pervasive enough in LLVM that it should always be passed by value.

    @@ -3943,7 +3942,7 @@ arguments. An argument has a pointer to Dinakar Dhurjati and Chris Lattner
    The LLVM Compiler Infrastructure
    - Last modified: $Date: 2010-05-07 02:28:04 +0200 (Fri, 07 May 2010) $ + Last modified: $Date: 2010-07-15 00:38:02 +0200 (Thu, 15 Jul 2010) $ Modified: vendor/llvm/dist/docs/SourceLevelDebugging.html ============================================================================== --- vendor/llvm/dist/docs/SourceLevelDebugging.html Thu Jul 15 16:39:17 2010 (r210126) +++ vendor/llvm/dist/docs/SourceLevelDebugging.html Thu Jul 15 17:06:11 2010 (r210127) @@ -1058,7 +1058,7 @@ int main(int argc, char *argv[]) { i32 524329, ;; Tag metadata !"MySource.cpp", metadata !"/Users/mine/sources", - metadata !3 ;; Compile unit + metadata !2 ;; Compile unit } ;; @@ -1068,7 +1068,7 @@ int main(int argc, char *argv[]) { i32 524329, ;; Tag metadata !"Myheader.h" metadata !"/Users/mine/sources", - metadata !3 ;; Compile unit + metadata !2 ;; Compile unit } ... @@ -1780,7 +1780,7 @@ enum Trees { Chris Lattner
    LLVM Compiler Infrastructure
    - Last modified: $Date: 2010-06-05 00:49:55 +0200 (Sat, 05 Jun 2010) $ + Last modified: $Date: 2010-07-13 18:53:20 +0200 (Tue, 13 Jul 2010) $ Modified: vendor/llvm/dist/include/llvm/ADT/APFloat.h ============================================================================== --- vendor/llvm/dist/include/llvm/ADT/APFloat.h Thu Jul 15 16:39:17 2010 (r210126) +++ vendor/llvm/dist/include/llvm/ADT/APFloat.h Thu Jul 15 17:06:11 2010 (r210127) @@ -179,7 +179,7 @@ namespace llvm { // Constructors. APFloat(const fltSemantics &); // Default construct to 0.0 - APFloat(const fltSemantics &, const StringRef &); + APFloat(const fltSemantics &, StringRef); APFloat(const fltSemantics &, integerPart); APFloat(const fltSemantics &, fltCategory, bool negative); APFloat(const fltSemantics &, uninitializedTag); @@ -282,7 +282,7 @@ namespace llvm { bool, roundingMode); opStatus convertFromZeroExtendedInteger(const integerPart *, unsigned int, bool, roundingMode); - opStatus convertFromString(const StringRef&, roundingMode); + opStatus convertFromString(StringRef, roundingMode); APInt bitcastToAPInt() const; double convertToDouble() const; float convertToFloat() const; @@ -386,8 +386,8 @@ namespace llvm { roundingMode, bool *) const; opStatus convertFromUnsignedParts(const integerPart *, unsigned int, roundingMode); - opStatus convertFromHexadecimalString(const StringRef&, roundingMode); - opStatus convertFromDecimalString (const StringRef&, roundingMode); + opStatus convertFromHexadecimalString(StringRef, roundingMode); + opStatus convertFromDecimalString(StringRef, roundingMode); char *convertNormalToHexString(char *, unsigned int, bool, roundingMode) const; opStatus roundSignificandWithExponent(const integerPart *, unsigned int, Modified: vendor/llvm/dist/include/llvm/ADT/APInt.h ============================================================================== --- vendor/llvm/dist/include/llvm/ADT/APInt.h Thu Jul 15 16:39:17 2010 (r210126) +++ vendor/llvm/dist/include/llvm/ADT/APInt.h Thu Jul 15 17:06:11 2010 (r210127) @@ -162,7 +162,7 @@ class APInt { /// /// @param radix 2, 8, 10, or 16 /// @brief Convert a char array into an APInt - void fromString(unsigned numBits, const StringRef &str, uint8_t radix); + void fromString(unsigned numBits, StringRef str, uint8_t radix); /// This is used by the toString method to divide by the radix. It simply /// provides a more convenient form of divide for internal use since KnuthDiv @@ -248,7 +248,7 @@ public: /// @param str the string to be interpreted /// @param radix the radix to use for the conversion /// @brief Construct an APInt from a string representation. - APInt(unsigned numBits, const StringRef &str, uint8_t radix); + APInt(unsigned numBits, StringRef str, uint8_t radix); /// Simply makes *this a copy of that. /// @brief Copy Constructor. @@ -1153,7 +1153,7 @@ public: /// This method determines how many bits are required to hold the APInt /// equivalent of the string given by \arg str. /// @brief Get bits required for string value. - static unsigned getBitsNeeded(const StringRef& str, uint8_t radix); + static unsigned getBitsNeeded(StringRef str, uint8_t radix); /// countLeadingZeros - This function is an APInt version of the /// countLeadingZeros_{32,64} functions in MathExtras.h. It counts the number Modified: vendor/llvm/dist/include/llvm/CodeGen/FastISel.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/FastISel.h Thu Jul 15 16:39:17 2010 (r210126) +++ vendor/llvm/dist/include/llvm/CodeGen/FastISel.h Thu Jul 15 17:06:11 2010 (r210127) @@ -106,12 +106,17 @@ public: /// into the current block. void recomputeInsertPt(); + struct SavePoint { + MachineBasicBlock::iterator InsertPt; + DebugLoc DL; + }; + /// enterLocalValueArea - Prepare InsertPt to begin inserting instructions /// into the local value area and return the old insert position. - MachineBasicBlock::iterator enterLocalValueArea(); + SavePoint enterLocalValueArea(); - /// leaveLocalValueArea - Reset InsertPt to the given old insert position - void leaveLocalValueArea(MachineBasicBlock::iterator OldInsertPt); + /// leaveLocalValueArea - Reset InsertPt to the given old insert position. + void leaveLocalValueArea(SavePoint Old); virtual ~FastISel(); @@ -302,8 +307,6 @@ protected: } private: - bool SelectLoad(const User *I); - bool SelectBinaryOp(const User *I, unsigned ISDOpcode); bool SelectFNeg(const User *I); Modified: vendor/llvm/dist/include/llvm/CodeGen/LiveIntervalAnalysis.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/LiveIntervalAnalysis.h Thu Jul 15 16:39:17 2010 (r210126) +++ vendor/llvm/dist/include/llvm/CodeGen/LiveIntervalAnalysis.h Thu Jul 15 17:06:11 2010 (r210127) @@ -272,10 +272,6 @@ namespace llvm { unsigned getNumConflictsWithPhysReg(const LiveInterval &li, unsigned PhysReg) const; - /// processImplicitDefs - Process IMPLICIT_DEF instructions. Add isUndef - /// marker to implicit_def defs and their uses. - void processImplicitDefs(); - /// intervalIsInOneMBB - Returns true if the specified interval is entirely /// within a single basic block. bool intervalIsInOneMBB(const LiveInterval &li) const; Modified: vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfo.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfo.h Thu Jul 15 16:39:17 2010 (r210126) +++ vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfo.h Thu Jul 15 17:06:11 2010 (r210127) @@ -344,7 +344,7 @@ public: VariableDbgInfo.push_back(std::make_pair(N, std::make_pair(Slot, Loc))); } - VariableDbgInfoMapTy &getVariableDbgInfo() { return VariableDbgInfo; } + VariableDbgInfoMapTy &getVariableDbgInfo(); }; // End class MachineModuleInfo Modified: vendor/llvm/dist/include/llvm/CodeGen/ProcessImplicitDefs.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/ProcessImplicitDefs.h Thu Jul 15 16:39:17 2010 (r210126) +++ vendor/llvm/dist/include/llvm/CodeGen/ProcessImplicitDefs.h Thu Jul 15 17:06:11 2010 (r210127) @@ -12,6 +12,7 @@ #define LLVM_CODEGEN_PROCESSIMPLICITDEFS_H #include "llvm/CodeGen/MachineFunctionPass.h" +#include "llvm/ADT/SmallSet.h" namespace llvm { @@ -24,7 +25,8 @@ namespace llvm { private: bool CanTurnIntoImplicitDef(MachineInstr *MI, unsigned Reg, - unsigned OpIdx, const TargetInstrInfo *tii_); + unsigned OpIdx, const TargetInstrInfo *tii_, + SmallSet &ImpDefRegs); public: static char ID; Modified: vendor/llvm/dist/include/llvm/MC/MCParser/AsmParser.h ============================================================================== --- vendor/llvm/dist/include/llvm/MC/MCParser/AsmParser.h Thu Jul 15 16:39:17 2010 (r210126) +++ vendor/llvm/dist/include/llvm/MC/MCParser/AsmParser.h Thu Jul 15 17:06:11 2010 (r210127) @@ -107,7 +107,7 @@ private: void EatToEndOfStatement(); - bool ParseAssignment(const StringRef &Name); + bool ParseAssignment(StringRef Name); bool ParsePrimaryExpr(const MCExpr *&Res, SMLoc &EndLoc); bool ParseBinOpRHS(unsigned Precedence, const MCExpr *&Res, SMLoc &EndLoc); Modified: vendor/llvm/dist/include/llvm/Support/COFF.h ============================================================================== --- vendor/llvm/dist/include/llvm/Support/COFF.h Thu Jul 15 16:39:17 2010 (r210126) +++ vendor/llvm/dist/include/llvm/Support/COFF.h Thu Jul 15 17:06:11 2010 (r210127) @@ -10,12 +10,12 @@ // This file contains an definitions used in Windows COFF Files. // // Structures and enums defined within this file where created using -// information from Microsofts publicly available PE/COFF format document: +// information from Microsoft's publicly available PE/COFF format document: // // Microsoft Portable Executable and Common Object File Format Specification // Revision 8.1 - February 15, 2008 // -// As of 5/2/2010, hosted by microsoft at: +// As of 5/2/2010, hosted by Microsoft at: // http://www.microsoft.com/whdc/system/platform/firmware/pecoff.mspx // //===----------------------------------------------------------------------===// @@ -57,7 +57,7 @@ namespace COFF { uint8_t NumberOfAuxSymbols; }; - enum symbol_flags { + enum SymbolFlags { SF_TypeMask = 0x0000FFFF, SF_TypeShift = 0, @@ -67,36 +67,70 @@ namespace COFF { SF_WeakReference = 0x01000000 }; - enum symbol_storage_class { - IMAGE_SYM_CLASS_END_OF_FUNCTION = -1, - IMAGE_SYM_CLASS_NULL = 0, - IMAGE_SYM_CLASS_AUTOMATIC = 1, - IMAGE_SYM_CLASS_EXTERNAL = 2, - IMAGE_SYM_CLASS_STATIC = 3, - IMAGE_SYM_CLASS_REGISTER = 4, - IMAGE_SYM_CLASS_EXTERNAL_DEF = 5, - IMAGE_SYM_CLASS_LABEL = 6, - IMAGE_SYM_CLASS_UNDEFINED_LABEL = 7, - IMAGE_SYM_CLASS_MEMBER_OF_STRUCT = 8, - IMAGE_SYM_CLASS_ARGUMENT = 9, - IMAGE_SYM_CLASS_STRUCT_TAG = 10, - IMAGE_SYM_CLASS_MEMBER_OF_UNION = 11, - IMAGE_SYM_CLASS_UNION_TAG = 12, - IMAGE_SYM_CLASS_TYPE_DEFINITION = 13, - IMAGE_SYM_CLASS_UNDEFINED_STATIC = 14, - IMAGE_SYM_CLASS_ENUM_TAG = 15, - IMAGE_SYM_CLASS_MEMBER_OF_ENUM = 16, - IMAGE_SYM_CLASS_REGISTER_PARAM = 17, - IMAGE_SYM_CLASS_BIT_FIELD = 18, + /// Storage class tells where and what the symbol represents + enum SymbolStorageClass { + IMAGE_SYM_CLASS_END_OF_FUNCTION = -1, ///< Physical end of function + IMAGE_SYM_CLASS_NULL = 0, ///< No symbol + IMAGE_SYM_CLASS_AUTOMATIC = 1, ///< Stack variable + IMAGE_SYM_CLASS_EXTERNAL = 2, ///< External symbol + IMAGE_SYM_CLASS_STATIC = 3, ///< Static + IMAGE_SYM_CLASS_REGISTER = 4, ///< Register variable + IMAGE_SYM_CLASS_EXTERNAL_DEF = 5, ///< External definition + IMAGE_SYM_CLASS_LABEL = 6, ///< Label + IMAGE_SYM_CLASS_UNDEFINED_LABEL = 7, ///< Undefined label + IMAGE_SYM_CLASS_MEMBER_OF_STRUCT = 8, ///< Member of structure + IMAGE_SYM_CLASS_ARGUMENT = 9, ///< Function argument + IMAGE_SYM_CLASS_STRUCT_TAG = 10, ///< Structure tag + IMAGE_SYM_CLASS_MEMBER_OF_UNION = 11, ///< Member of union + IMAGE_SYM_CLASS_UNION_TAG = 12, ///< Union tag + IMAGE_SYM_CLASS_TYPE_DEFINITION = 13, ///< Type definition + IMAGE_SYM_CLASS_UNDEFINED_STATIC = 14, ///< Undefined static + IMAGE_SYM_CLASS_ENUM_TAG = 15, ///< Enumeration tag + IMAGE_SYM_CLASS_MEMBER_OF_ENUM = 16, ///< Member of enumeration + IMAGE_SYM_CLASS_REGISTER_PARAM = 17, ///< Register parameter + IMAGE_SYM_CLASS_BIT_FIELD = 18, ///< Bit field + /// ".bb" or ".eb" - beginning or end of block IMAGE_SYM_CLASS_BLOCK = 100, + /// ".bf" or ".ef" - beginning or end of function IMAGE_SYM_CLASS_FUNCTION = 101, - IMAGE_SYM_CLASS_END_OF_STRUCT = 102, - IMAGE_SYM_CLASS_FILE = 103, + IMAGE_SYM_CLASS_END_OF_STRUCT = 102, ///< End of structure + IMAGE_SYM_CLASS_FILE = 103, ///< File name + /// Line number, reformatted as symbol IMAGE_SYM_CLASS_SECTION = 104, - IMAGE_SYM_CLASS_WEAK_EXTERNAL = 105, + IMAGE_SYM_CLASS_WEAK_EXTERNAL = 105, ///< Duplicate tag + /// External symbol in dmert public lib IMAGE_SYM_CLASS_CLR_TOKEN = 107 }; + enum SymbolBaseType { + IMAGE_SYM_TYPE_NULL = 0, ///< No type information or unknown base type. + IMAGE_SYM_TYPE_VOID = 1, ///< Used with void pointers and functions. + IMAGE_SYM_TYPE_CHAR = 2, ///< A character (signed byte). + IMAGE_SYM_TYPE_SHORT = 3, ///< A 2-byte signed integer. + IMAGE_SYM_TYPE_INT = 4, ///< A natural integer type on the target. + IMAGE_SYM_TYPE_LONG = 5, ///< A 4-byte signed integer. + IMAGE_SYM_TYPE_FLOAT = 6, ///< A 4-byte floating-point number. + IMAGE_SYM_TYPE_DOUBLE = 7, ///< An 8-byte floating-point number. + IMAGE_SYM_TYPE_STRUCT = 8, ///< A structure. + IMAGE_SYM_TYPE_UNION = 9, ///< An union. + IMAGE_SYM_TYPE_ENUM = 10, ///< An enumerated type. + IMAGE_SYM_TYPE_MOE = 11, ///< A member of enumeration (a specific value). + IMAGE_SYM_TYPE_BYTE = 12, ///< A byte; unsigned 1-byte integer. + IMAGE_SYM_TYPE_WORD = 13, ///< A word; unsigned 2-byte integer. + IMAGE_SYM_TYPE_UINT = 14, ///< An unsigned integer of natural size. + IMAGE_SYM_TYPE_DWORD = 15 ///< An unsigned 4-byte integer. + }; + + enum SymbolComplexType { + IMAGE_SYM_DTYPE_NULL = 0, ///< No complex type; simple scalar variable. + IMAGE_SYM_DTYPE_POINTER = 1, ///< A pointer to base type. + IMAGE_SYM_DTYPE_FUNCTION = 2, ///< A function that returns a base type. + IMAGE_SYM_DTYPE_ARRAY = 3, ///< An array of base type. + + /// Type is formed as (base + (derived << SCT_COMPLEX_TYPE_SHIFT)) + SCT_COMPLEX_TYPE_SHIFT = 4 + }; + struct section { char Name[NameSize]; uint32_t VirtualSize; @@ -110,7 +144,7 @@ namespace COFF { uint32_t Characteristics; }; - enum section_characteristics { + enum SectionCharacteristics { IMAGE_SCN_TYPE_NO_PAD = 0x00000008, IMAGE_SCN_CNT_CODE = 0x00000020, IMAGE_SCN_CNT_INITIALIZED_DATA = 0x00000040, @@ -154,7 +188,7 @@ namespace COFF { uint16_t Type; }; - enum relocation_type_x86 { + enum RelocationTypeX86 { IMAGE_REL_I386_ABSOLUTE = 0x0000, IMAGE_REL_I386_DIR16 = 0x0001, IMAGE_REL_I386_REL16 = 0x0002, Modified: vendor/llvm/dist/include/llvm/Support/Regex.h ============================================================================== --- vendor/llvm/dist/include/llvm/Support/Regex.h Thu Jul 15 16:39:17 2010 (r210126) +++ vendor/llvm/dist/include/llvm/Support/Regex.h Thu Jul 15 17:06:11 2010 (r210127) @@ -36,7 +36,7 @@ namespace llvm { /// Compiles the given POSIX Extended Regular Expression \arg Regex. /// This implementation supports regexes and matching strings with embedded /// NUL characters. - Regex(const StringRef &Regex, unsigned Flags = NoFlags); + Regex(StringRef Regex, unsigned Flags = NoFlags); ~Regex(); /// isValid - returns the error encountered during regex compilation, or @@ -55,7 +55,7 @@ namespace llvm { /// the first group is always the entire pattern. /// /// This returns true on a successful match. - bool match(const StringRef &String, SmallVectorImpl *Matches=0); + bool match(StringRef String, SmallVectorImpl *Matches = 0); /// sub - Return the result of replacing the first match of the regex in /// \arg String with the \arg Repl string. Backreferences like "\0" in the Modified: vendor/llvm/dist/include/llvm/Support/StringPool.h ============================================================================== --- vendor/llvm/dist/include/llvm/Support/StringPool.h Thu Jul 15 16:39:17 2010 (r210126) +++ vendor/llvm/dist/include/llvm/Support/StringPool.h Thu Jul 15 17:06:11 2010 (r210127) @@ -64,7 +64,7 @@ namespace llvm { /// intern - Adds a string to the pool and returns a reference-counted /// pointer to it. No additional memory is allocated if the string already /// exists in the pool. - PooledStringPtr intern(const StringRef &Str); + PooledStringPtr intern(StringRef Str); /// empty - Checks whether the pool is empty. Returns true if so. /// Modified: vendor/llvm/dist/include/llvm/Target/TargetAsmParser.h ============================================================================== --- vendor/llvm/dist/include/llvm/Target/TargetAsmParser.h Thu Jul 15 16:39:17 2010 (r210126) +++ vendor/llvm/dist/include/llvm/Target/TargetAsmParser.h Thu Jul 15 17:06:11 2010 (r210127) @@ -49,7 +49,7 @@ public: /// \param Operands [out] - The list of parsed operands, this returns /// ownership of them to the caller. /// \return True on failure. - virtual bool ParseInstruction(const StringRef &Name, SMLoc NameLoc, + virtual bool ParseInstruction(StringRef Name, SMLoc NameLoc, SmallVectorImpl &Operands) = 0; /// ParseDirective - Parse a target specific assembler directive Modified: vendor/llvm/dist/include/llvm/Target/TargetInstrInfo.h ============================================================================== --- vendor/llvm/dist/include/llvm/Target/TargetInstrInfo.h Thu Jul 15 16:39:17 2010 (r210126) +++ vendor/llvm/dist/include/llvm/Target/TargetInstrInfo.h Thu Jul 15 17:06:11 2010 (r210127) @@ -371,7 +371,7 @@ public: unsigned SrcReg, bool isKill, int FrameIndex, const TargetRegisterClass *RC, const TargetRegisterInfo *TRI) const { - assert(0 && "Target didn't implement TargetInstrInfo::storeRegToStackSlot!"); + assert(0 && "Target didn't implement TargetInstrInfo::storeRegToStackSlot!"); } /// loadRegFromStackSlot - Load the specified register of the given register @@ -383,7 +383,7 @@ public: unsigned DestReg, int FrameIndex, const TargetRegisterClass *RC, const TargetRegisterInfo *TRI) const { - assert(0 && "Target didn't implement TargetInstrInfo::loadRegFromStackSlot!"); + assert(0 && "Target didn't implement TargetInstrInfo::loadRegFromStackSlot!"); } /// spillCalleeSavedRegisters - Issues instruction(s) to spill all callee @@ -392,7 +392,7 @@ public: /// storeRegToStackSlot(). Returns false otherwise. virtual bool spillCalleeSavedRegisters(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, - const std::vector &CSI, + const std::vector &CSI, const TargetRegisterInfo *TRI) const { return false; } @@ -457,7 +457,7 @@ protected: /// take care of adding a MachineMemOperand to the newly created instruction. virtual MachineInstr* foldMemoryOperandImpl(MachineFunction &MF, MachineInstr* MI, - const SmallVectorImpl &Ops, + const SmallVectorImpl &Ops, MachineInstr* LoadMI) const { return 0; } @@ -501,7 +501,7 @@ public: /// only differences between the two addresses are the offset. It also returns /// the offsets by reference. virtual bool areLoadsFromSameBasePtr(SDNode *Load1, SDNode *Load2, - int64_t &Offset1, int64_t &Offset2) const { + int64_t &Offset1, int64_t &Offset2) const { return false; } Modified: vendor/llvm/dist/include/llvm/Target/TargetOptions.h ============================================================================== --- vendor/llvm/dist/include/llvm/Target/TargetOptions.h Thu Jul 15 16:39:17 2010 (r210126) +++ vendor/llvm/dist/include/llvm/Target/TargetOptions.h Thu Jul 15 17:06:11 2010 (r210127) @@ -68,7 +68,7 @@ namespace llvm { /// this flag is off (the default), the code generator is not allowed to /// produce results that are "less precise" than IEEE allows. This includes /// use of X86 instructions like FSIN and FCOS instead of libcalls. - /// UnsafeFPMath implies FiniteOnlyFPMath and LessPreciseFPMAD. + /// UnsafeFPMath implies LessPreciseFPMAD. extern bool UnsafeFPMath; /// FiniteOnlyFPMath - This returns true when the -enable-finite-only-fp-math Modified: vendor/llvm/dist/include/llvm/Value.h ============================================================================== --- vendor/llvm/dist/include/llvm/Value.h Thu Jul 15 16:39:17 2010 (r210126) +++ vendor/llvm/dist/include/llvm/Value.h Thu Jul 15 17:06:11 2010 (r210127) @@ -266,6 +266,10 @@ public: SubclassOptionalData &= V->SubclassOptionalData; } + /// hasValueHandle - Return true if there is a value handle associated with + /// this value. + bool hasValueHandle() const { return HasValueHandle; } + // Methods for support type inquiry through isa, cast, and dyn_cast: static inline bool classof(const Value *) { return true; // Values are always values. Modified: vendor/llvm/dist/lib/Analysis/InstructionSimplify.cpp ============================================================================== --- vendor/llvm/dist/lib/Analysis/InstructionSimplify.cpp Thu Jul 15 16:39:17 2010 (r210126) +++ vendor/llvm/dist/lib/Analysis/InstructionSimplify.cpp Thu Jul 15 17:06:11 2010 (r210127) @@ -440,27 +440,47 @@ void llvm::ReplaceAndSimplifyAllUses(Ins const TargetData *TD) { assert(From != To && "ReplaceAndSimplifyAllUses(X,X) is not valid!"); - // FromHandle - This keeps a weakvh on the from value so that we can know if - // it gets deleted out from under us in a recursive simplification. + // FromHandle/ToHandle - This keeps a WeakVH on the from/to values so that + // we can know if it gets deleted out from under us or replaced in a + // recursive simplification. WeakVH FromHandle(From); + WeakVH ToHandle(To); while (!From->use_empty()) { // Update the instruction to use the new value. - Use &U = From->use_begin().getUse(); - Instruction *User = cast(U.getUser()); - U = To; + Use &TheUse = From->use_begin().getUse(); + Instruction *User = cast(TheUse.getUser()); + TheUse = To; + + // Check to see if the instruction can be folded due to the operand + // replacement. For example changing (or X, Y) into (or X, -1) can replace + // the 'or' with -1. + Value *SimplifiedVal; + { + // Sanity check to make sure 'User' doesn't dangle across + // SimplifyInstruction. + AssertingVH<> UserHandle(User); - // See if we can simplify it. - if (Value *V = SimplifyInstruction(User, TD)) { - // Recursively simplify this. - ReplaceAndSimplifyAllUses(User, V, TD); - - // If the recursive simplification ended up revisiting and deleting 'From' - // then we're done. - if (FromHandle == 0) - return; + SimplifiedVal = SimplifyInstruction(User, TD); + if (SimplifiedVal == 0) continue; } + + // Recursively simplify this user to the new value. + ReplaceAndSimplifyAllUses(User, SimplifiedVal, TD); + From = dyn_cast_or_null((Value*)FromHandle); + To = ToHandle; + + assert(ToHandle && "To value deleted by recursive simplification?"); + + // If the recursive simplification ended up revisiting and deleting + // 'From' then we're done. + if (From == 0) + return; } + + // If 'From' has value handles referring to it, do a real RAUW to update them. + From->replaceAllUsesWith(To); + From->eraseFromParent(); } Modified: vendor/llvm/dist/lib/Analysis/ProfileInfo.cpp ============================================================================== --- vendor/llvm/dist/lib/Analysis/ProfileInfo.cpp Thu Jul 15 16:39:17 2010 (r210126) +++ vendor/llvm/dist/lib/Analysis/ProfileInfo.cpp Thu Jul 15 17:06:11 2010 (r210127) @@ -71,22 +71,24 @@ ProfileInfoT::getEx // Are there zero predecessors of this block? if (PI == PE) { - Edge e = getEdge(0,BB); + Edge e = getEdge(0, BB); Count = getEdgeWeight(e); } else { // Otherwise, if there are predecessors, the execution count of this block is // the sum of the edge frequencies from the incoming edges. std::set ProcessedPreds; Count = 0; - for (; PI != PE; ++PI) - if (ProcessedPreds.insert(*PI).second) { - double w = getEdgeWeight(getEdge(*PI, BB)); + for (; PI != PE; ++PI) { + const BasicBlock *P = *PI; + if (ProcessedPreds.insert(P).second) { + double w = getEdgeWeight(getEdge(P, BB)); if (w == MissingValue) { Count = MissingValue; break; } Count += w; } + } } // If the predecessors did not suffice to get block weight, try successors. Modified: vendor/llvm/dist/lib/AsmParser/LLParser.cpp ============================================================================== --- vendor/llvm/dist/lib/AsmParser/LLParser.cpp Thu Jul 15 16:39:17 2010 (r210126) +++ vendor/llvm/dist/lib/AsmParser/LLParser.cpp Thu Jul 15 17:06:11 2010 (r210127) @@ -544,20 +544,21 @@ bool LLParser::ParseNamedMetadata() { return true; SmallVector Elts; - do { - // Null is a special case since it is typeless. - if (EatIfPresent(lltok::kw_null)) { - Elts.push_back(0); - continue; - } + if (Lex.getKind() != lltok::rbrace) + do { + // Null is a special case since it is typeless. + if (EatIfPresent(lltok::kw_null)) { + Elts.push_back(0); + continue; + } - if (ParseToken(lltok::exclaim, "Expected '!' here")) - return true; + if (ParseToken(lltok::exclaim, "Expected '!' here")) + return true; - MDNode *N = 0; - if (ParseMDNodeID(N)) return true; - Elts.push_back(N); - } while (EatIfPresent(lltok::comma)); + MDNode *N = 0; + if (ParseMDNodeID(N)) return true; + Elts.push_back(N); + } while (EatIfPresent(lltok::comma)); if (ParseToken(lltok::rbrace, "expected end of metadata node")) return true; @@ -2021,33 +2022,8 @@ bool LLParser::ParseValID(ValID &ID, Per ID.StrVal = Lex.getStrVal(); ID.Kind = ValID::t_LocalName; break; - case lltok::exclaim: // !{...} MDNode, !"foo" MDString - Lex.Lex(); - - if (EatIfPresent(lltok::lbrace)) { - SmallVector Elts; - if (ParseMDNodeVector(Elts, PFS) || - ParseToken(lltok::rbrace, "expected end of metadata node")) - return true; - - ID.MDNodeVal = MDNode::get(Context, Elts.data(), Elts.size()); - ID.Kind = ValID::t_MDNode; - return false; - } - - // Standalone metadata reference - // !{ ..., !42, ... } - if (Lex.getKind() == lltok::APSInt) { - if (ParseMDNodeID(ID.MDNodeVal)) return true; - ID.Kind = ValID::t_MDNode; - return false; - } - - // MDString: - // ::= '!' STRINGCONSTANT - if (ParseMDString(ID.MDStringVal)) return true; - ID.Kind = ValID::t_MDString; - return false; + case lltok::exclaim: // !42, !{...}, or !"foo" + return ParseMetadataValue(ID, PFS); case lltok::APSInt: ID.APSIntVal = Lex.getAPSIntVal(); ID.Kind = ValID::t_APSInt; @@ -2528,6 +2504,42 @@ bool LLParser::ParseGlobalValueVector(Sm return false; } +/// ParseMetadataValue +/// ::= !42 +/// ::= !{...} +/// ::= !"string" +bool LLParser::ParseMetadataValue(ValID &ID, PerFunctionState *PFS) { + assert(Lex.getKind() == lltok::exclaim); + Lex.Lex(); + + // MDNode: + // !{ ... } + if (EatIfPresent(lltok::lbrace)) { + SmallVector Elts; + if (ParseMDNodeVector(Elts, PFS) || + ParseToken(lltok::rbrace, "expected end of metadata node")) + return true; + + ID.MDNodeVal = MDNode::get(Context, Elts.data(), Elts.size()); + ID.Kind = ValID::t_MDNode; + return false; + } + + // Standalone metadata reference + // !42 + if (Lex.getKind() == lltok::APSInt) { + if (ParseMDNodeID(ID.MDNodeVal)) return true; + ID.Kind = ValID::t_MDNode; + return false; + } + + // MDString: + // ::= '!' STRINGCONSTANT + if (ParseMDString(ID.MDStringVal)) return true; + ID.Kind = ValID::t_MDString; + return false; +} + //===----------------------------------------------------------------------===// // Function Parsing. @@ -3983,6 +3995,10 @@ int LLParser::ParseInsertValue(Instructi /// ::= 'null' | TypeAndValue bool LLParser::ParseMDNodeVector(SmallVectorImpl &Elts, PerFunctionState *PFS) { + // Check for an empty list. + if (Lex.getKind() == lltok::rbrace) + return false; + do { // Null is a special case since it is typeless. if (EatIfPresent(lltok::kw_null)) { Modified: vendor/llvm/dist/lib/AsmParser/LLParser.h ============================================================================== --- vendor/llvm/dist/lib/AsmParser/LLParser.h Thu Jul 15 16:39:17 2010 (r210126) +++ vendor/llvm/dist/lib/AsmParser/LLParser.h Thu Jul 15 17:06:11 2010 (r210127) @@ -308,6 +308,7 @@ namespace llvm { bool ParseGlobalValue(const Type *Ty, Constant *&V); bool ParseGlobalTypeAndValue(Constant *&V); bool ParseGlobalValueVector(SmallVectorImpl &Elts); + bool ParseMetadataValue(ValID &ID, PerFunctionState *PFS); bool ParseMDNodeVector(SmallVectorImpl &, PerFunctionState *PFS); // Function Parsing. Modified: vendor/llvm/dist/lib/Bitcode/Reader/BitcodeReader.cpp ============================================================================== --- vendor/llvm/dist/lib/Bitcode/Reader/BitcodeReader.cpp Thu Jul 15 16:39:17 2010 (r210126) +++ vendor/llvm/dist/lib/Bitcode/Reader/BitcodeReader.cpp Thu Jul 15 17:06:11 2010 (r210127) @@ -820,7 +820,7 @@ bool BitcodeReader::ParseMetadata() { IsFunctionLocal = true; // fall-through case bitc::METADATA_NODE: { - if (Record.empty() || Record.size() % 2 == 1) + if (Record.size() % 2 == 1) return Error("Invalid METADATA_NODE record"); unsigned Size = Record.size(); @@ -834,7 +834,8 @@ bool BitcodeReader::ParseMetadata() { else Elts.push_back(NULL); } - Value *V = MDNode::getWhenValsUnresolved(Context, &Elts[0], Elts.size(), + Value *V = MDNode::getWhenValsUnresolved(Context, + Elts.data(), Elts.size(), IsFunctionLocal); IsFunctionLocal = false; MDValueList.AssignValue(V, NextMDValueNo++); Modified: vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinter.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Thu Jul 15 16:39:17 2010 (r210126) +++ vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Thu Jul 15 17:06:11 2010 (r210127) @@ -178,7 +178,7 @@ bool AsmPrinter::doInitialization(Module if (!M.getModuleInlineAsm().empty()) { OutStreamer.AddComment("Start of file scope inline assembly"); OutStreamer.AddBlankLine(); - EmitInlineAsm(M.getModuleInlineAsm(), 0/*no loc cookie*/); + EmitInlineAsm(M.getModuleInlineAsm()+"\n", 0/*no loc cookie*/); OutStreamer.AddComment("End of file scope inline assembly"); OutStreamer.AddBlankLine(); } Modified: vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp Thu Jul 15 16:39:17 2010 (r210126) +++ vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp Thu Jul 15 17:06:11 2010 (r210127) @@ -53,17 +53,6 @@ void AsmPrinter::EmitInlineAsm(StringRef } SourceMgr SrcMgr; - - // Ensure the buffer is newline terminated. - char *TmpString = 0; - if (Str.back() != '\n') { - TmpString = new char[Str.size() + 2]; - memcpy(TmpString, Str.data(), Str.size()); - TmpString[Str.size()] = '\n'; - TmpString[Str.size() + 1] = 0; - isNullTerminated = true; - Str = TmpString; - } // If the current LLVMContext has an inline asm handler, set it in SourceMgr. LLVMContext &LLVMCtx = MMI->getModule()->getContext(); @@ -95,9 +84,6 @@ void AsmPrinter::EmitInlineAsm(StringRef /*NoFinalize*/ true); if (Res && !HasDiagHandler) report_fatal_error("Error parsing inline asm\n"); - - if (TmpString) - delete[] TmpString; } Modified: vendor/llvm/dist/lib/CodeGen/LiveInterval.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/LiveInterval.cpp Thu Jul 15 16:39:17 2010 (r210126) +++ vendor/llvm/dist/lib/CodeGen/LiveInterval.cpp Thu Jul 15 17:06:11 2010 (r210127) @@ -119,6 +119,7 @@ bool LiveInterval::killedInRange(SlotInd // bool LiveInterval::overlapsFrom(const LiveInterval& other, const_iterator StartPos) const { + assert(!empty() && "empty interval"); const_iterator i = begin(); const_iterator ie = end(); const_iterator j = StartPos; @@ -161,16 +162,8 @@ bool LiveInterval::overlapsFrom(const Li /// by [Start, End). bool LiveInterval::overlaps(SlotIndex Start, SlotIndex End) const { assert(Start < End && "Invalid range"); - const_iterator I = begin(); - const_iterator E = end(); - const_iterator si = std::upper_bound(I, E, Start); - const_iterator ei = std::upper_bound(I, E, End); - if (si != ei) - return true; - if (si == I) - return false; - --si; - return si->contains(Start); + const_iterator I = std::lower_bound(begin(), end(), End); + return I != begin() && (--I)->end > Start; } /// extendIntervalEndTo - This method is used when we want to extend the range @@ -868,6 +861,10 @@ void LiveInterval::print(raw_ostream &OS OS << "?"; else OS << vni->def; + if (vni->hasPHIKill()) + OS << "-phikill"; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Jul 15 17:07:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 20CD2106567A; Thu, 15 Jul 2010 17:07:13 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0CCD88FC19; Thu, 15 Jul 2010 17:07: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 o6FH7Cxx047854; Thu, 15 Jul 2010 17:07:12 GMT (envelope-from rdivacky@svn.freebsd.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6FH7CBW047818; Thu, 15 Jul 2010 17:07:12 GMT (envelope-from rdivacky@svn.freebsd.org) Message-Id: <201007151707.o6FH7CBW047818@svn.freebsd.org> From: Roman Divacky Date: Thu, 15 Jul 2010 17:07:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210128 - in vendor/clang/dist: include/clang/AST include/clang/Basic include/clang/Driver include/clang/Frontend include/clang/Rewrite lib/AST lib/Basic lib/Checker lib/CodeGen lib/Dri... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 17:07:13 -0000 Author: rdivacky Date: Thu Jul 15 17:07:12 2010 New Revision: 210128 URL: http://svn.freebsd.org/changeset/base/210128 Log: Update clang to r108428. Added: vendor/clang/dist/include/clang/Frontend/PCHDeserializationListener.h vendor/clang/dist/runtime/ vendor/clang/dist/runtime/Makefile vendor/clang/dist/test/CodeCompletion/Inputs/reserved.h vendor/clang/dist/test/CodeGenCXX/lvalue-bitcasts.cpp vendor/clang/dist/test/CodeGenCXX/member-qual-debug-info.cpp vendor/clang/dist/test/PCH/pchpch.c vendor/clang/dist/test/PCH/pchpch1.h vendor/clang/dist/test/PCH/pchpch2.h vendor/clang/dist/test/SemaCXX/cv-unqual-rvalues.cpp vendor/clang/dist/test/SemaTemplate/deduction-crash.cpp Modified: vendor/clang/dist/include/clang/AST/DeclBase.h vendor/clang/dist/include/clang/AST/DeclObjC.h vendor/clang/dist/include/clang/AST/Expr.h vendor/clang/dist/include/clang/AST/Type.h vendor/clang/dist/include/clang/Basic/Builtins.def vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td vendor/clang/dist/include/clang/Basic/FileManager.h vendor/clang/dist/include/clang/Basic/TargetInfo.h vendor/clang/dist/include/clang/Driver/ArgList.h vendor/clang/dist/include/clang/Driver/Driver.h vendor/clang/dist/include/clang/Driver/Options.td vendor/clang/dist/include/clang/Driver/ToolChain.h vendor/clang/dist/include/clang/Driver/Types.def vendor/clang/dist/include/clang/Frontend/ASTConsumers.h vendor/clang/dist/include/clang/Frontend/PCHReader.h vendor/clang/dist/include/clang/Frontend/PCHWriter.h vendor/clang/dist/include/clang/Rewrite/Rewriter.h vendor/clang/dist/lib/AST/DeclTemplate.cpp vendor/clang/dist/lib/AST/Expr.cpp vendor/clang/dist/lib/AST/ExprConstant.cpp vendor/clang/dist/lib/AST/Type.cpp vendor/clang/dist/lib/Basic/FileManager.cpp vendor/clang/dist/lib/Basic/TargetInfo.cpp vendor/clang/dist/lib/Basic/Targets.cpp vendor/clang/dist/lib/Checker/GRExprEngine.cpp vendor/clang/dist/lib/Checker/LLVMConventionsChecker.cpp vendor/clang/dist/lib/CodeGen/CGBlocks.cpp vendor/clang/dist/lib/CodeGen/CGCall.cpp vendor/clang/dist/lib/CodeGen/CGClass.cpp vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp vendor/clang/dist/lib/CodeGen/CGDecl.cpp vendor/clang/dist/lib/CodeGen/CGException.cpp vendor/clang/dist/lib/CodeGen/CGException.h vendor/clang/dist/lib/CodeGen/CGExpr.cpp vendor/clang/dist/lib/CodeGen/CGExprAgg.cpp vendor/clang/dist/lib/CodeGen/CGExprComplex.cpp vendor/clang/dist/lib/CodeGen/CGExprScalar.cpp vendor/clang/dist/lib/CodeGen/CGObjCGNU.cpp vendor/clang/dist/lib/CodeGen/CGObjCMac.cpp vendor/clang/dist/lib/CodeGen/CodeGenFunction.cpp vendor/clang/dist/lib/CodeGen/CodeGenFunction.h vendor/clang/dist/lib/CodeGen/CodeGenModule.h vendor/clang/dist/lib/CodeGen/Mangle.cpp vendor/clang/dist/lib/CodeGen/TargetInfo.cpp vendor/clang/dist/lib/Driver/ArgList.cpp vendor/clang/dist/lib/Driver/Driver.cpp vendor/clang/dist/lib/Driver/ToolChain.cpp vendor/clang/dist/lib/Driver/ToolChains.cpp vendor/clang/dist/lib/Driver/Tools.cpp vendor/clang/dist/lib/Frontend/ASTUnit.cpp vendor/clang/dist/lib/Frontend/FrontendActions.cpp vendor/clang/dist/lib/Frontend/GeneratePCH.cpp vendor/clang/dist/lib/Frontend/PCHReader.cpp vendor/clang/dist/lib/Frontend/PCHWriter.cpp vendor/clang/dist/lib/Rewrite/Rewriter.cpp vendor/clang/dist/lib/Sema/Sema.h vendor/clang/dist/lib/Sema/SemaCXXCast.cpp vendor/clang/dist/lib/Sema/SemaCodeComplete.cpp vendor/clang/dist/lib/Sema/SemaDecl.cpp vendor/clang/dist/lib/Sema/SemaExpr.cpp vendor/clang/dist/lib/Sema/SemaExprCXX.cpp vendor/clang/dist/lib/Sema/SemaInit.cpp vendor/clang/dist/lib/Sema/SemaObjCProperty.cpp vendor/clang/dist/lib/Sema/SemaOverload.cpp vendor/clang/dist/lib/Sema/SemaTemplate.cpp vendor/clang/dist/lib/Sema/SemaTemplateInstantiate.cpp vendor/clang/dist/lib/Sema/TreeTransform.h vendor/clang/dist/test/CXX/temp/temp.fct.spec/temp.arg.explicit/p3.cpp vendor/clang/dist/test/CodeCompletion/ordinary-name.c vendor/clang/dist/test/CodeGenCXX/condition.cpp vendor/clang/dist/test/CodeGenCXX/eh.cpp vendor/clang/dist/test/CodeGenCXX/instantiate-blocks.cpp vendor/clang/dist/test/CodeGenCXX/mangle.cpp vendor/clang/dist/test/CodeGenCXX/nrvo.cpp vendor/clang/dist/test/CodeGenCXX/static-init-2.cpp vendor/clang/dist/test/CodeGenObjC/metadata_symbols.m vendor/clang/dist/test/CodeGenObjC/unwind-fn.m vendor/clang/dist/test/Driver/darwin-iphone-defaults.m vendor/clang/dist/test/Driver/darwin-ld.c vendor/clang/dist/test/Frontend/darwin-version.c vendor/clang/dist/test/Index/c-index-api-loadTU-test.m vendor/clang/dist/test/Makefile vendor/clang/dist/test/Sema/block-call.c vendor/clang/dist/test/Sema/block-return.c vendor/clang/dist/test/Sema/exprs.c vendor/clang/dist/test/Sema/i-c-e.c vendor/clang/dist/test/Sema/return.c vendor/clang/dist/test/Sema/struct-cast.c vendor/clang/dist/test/Sema/switch.c vendor/clang/dist/test/SemaCXX/ambig-user-defined-conversions.cpp vendor/clang/dist/test/SemaCXX/bool.cpp vendor/clang/dist/test/SemaCXX/conditional-expr.cpp vendor/clang/dist/test/SemaCXX/friend.cpp vendor/clang/dist/test/SemaCXX/return.cpp vendor/clang/dist/test/SemaCXX/switch.cpp vendor/clang/dist/test/SemaObjC/default-synthesize.m vendor/clang/dist/test/SemaObjC/method-sentinel-attr.m vendor/clang/dist/test/SemaObjC/property-10.m vendor/clang/dist/test/SemaTemplate/deduction.cpp vendor/clang/dist/utils/TestUtils/pch-test.pl Modified: vendor/clang/dist/include/clang/AST/DeclBase.h ============================================================================== --- vendor/clang/dist/include/clang/AST/DeclBase.h Thu Jul 15 17:06:11 2010 (r210127) +++ vendor/clang/dist/include/clang/AST/DeclBase.h Thu Jul 15 17:07:12 2010 (r210128) @@ -92,7 +92,7 @@ public: /// These are meant as bitmasks, so that searches in /// C++ can look into the "tag" namespace during ordinary lookup. /// - /// Decl currently provides 16 bits of IDNS bits. + /// Decl currently provides 15 bits of IDNS bits. enum IdentifierNamespace { /// Labels, declared with 'x:' and referenced with 'goto x'. IDNS_Label = 0x0001, @@ -225,10 +225,10 @@ protected: // PCHLevel - the "level" of precompiled header/AST file from which this // declaration was built. - unsigned PCHLevel : 2; + unsigned PCHLevel : 3; /// IdentifierNamespace - This specifies what IDNS_* namespace this lives in. - unsigned IdentifierNamespace : 16; + unsigned IdentifierNamespace : 15; private: #ifndef NDEBUG @@ -358,14 +358,14 @@ public: unsigned getPCHLevel() const { return PCHLevel; } /// \brief The maximum PCH level that any declaration may have. - static const unsigned MaxPCHLevel = 3; - + static const unsigned MaxPCHLevel = 7; + /// \brief Set the PCH level of this declaration. void setPCHLevel(unsigned Level) { - assert(Level < MaxPCHLevel && "PCH level exceeds the maximum"); + assert(Level <= MaxPCHLevel && "PCH level exceeds the maximum"); PCHLevel = Level; } - + unsigned getIdentifierNamespace() const { return IdentifierNamespace; } Modified: vendor/clang/dist/include/clang/AST/DeclObjC.h ============================================================================== --- vendor/clang/dist/include/clang/AST/DeclObjC.h Thu Jul 15 17:06:11 2010 (r210127) +++ vendor/clang/dist/include/clang/AST/DeclObjC.h Thu Jul 15 17:07:12 2010 (r210128) @@ -242,7 +242,7 @@ public: /// \brief Determine the type of an expression that sends a message to this /// function. QualType getSendResultType() const { - return getResultType().getCallResultType(getASTContext()); + return getResultType().getNonLValueExprType(getASTContext()); } TypeSourceInfo *getResultTypeSourceInfo() const { return ResultTInfo; } Modified: vendor/clang/dist/include/clang/AST/Expr.h ============================================================================== --- vendor/clang/dist/include/clang/AST/Expr.h Thu Jul 15 17:06:11 2010 (r210127) +++ vendor/clang/dist/include/clang/AST/Expr.h Thu Jul 15 17:07:12 2010 (r210128) @@ -1854,6 +1854,10 @@ public: /// CK_BitCast - Used for reinterpret_cast. CK_BitCast, + /// CK_LValueBitCast - Used for reinterpret_cast of expressions to + /// a reference type. + CK_LValueBitCast, + /// CK_NoOp - Used for const_cast. CK_NoOp, @@ -1957,6 +1961,7 @@ private: // These should not have an inheritance path. case CK_Unknown: case CK_BitCast: + case CK_LValueBitCast: case CK_NoOp: case CK_Dynamic: case CK_ToUnion: Modified: vendor/clang/dist/include/clang/AST/Type.h ============================================================================== --- vendor/clang/dist/include/clang/AST/Type.h Thu Jul 15 17:06:11 2010 (r210127) +++ vendor/clang/dist/include/clang/AST/Type.h Thu Jul 15 17:07:12 2010 (r210128) @@ -629,13 +629,15 @@ public: bool isAtLeastAsQualifiedAs(QualType Other) const; QualType getNonReferenceType() const; - /// \brief Determine the type of an expression that calls a function of - /// with the given result type. + /// \brief Determine the type of a (typically non-lvalue) expression with the + /// specified result type. /// - /// This routine removes a top-level reference (since there are no + /// This routine should be used for expressions for which the return type is + /// explicitly specified (e.g., in a cast or call) and isn't necessarily + /// an lvalue. It removes a top-level reference (since there are no /// expressions of reference type) and deletes top-level cvr-qualifiers /// from non-class types (in C++) or all types (in C). - QualType getCallResultType(ASTContext &Context) const; + QualType getNonLValueExprType(ASTContext &Context) const; /// getDesugaredType - Return the specified type with any "sugar" removed from /// the type. This takes off typedefs, typeof's etc. If the outer level of @@ -784,19 +786,27 @@ private: /// \brief Linkage of this type. mutable unsigned CachedLinkage : 2; - + + /// \brief FromPCH - Whether this type comes from a PCH file. + mutable bool FromPCH : 1; + + /// \brief Set whether this type comes from a PCH file. + void setFromPCH(bool V = true) const { + FromPCH = V; + } + protected: /// \brief Compute the linkage of this type. virtual Linkage getLinkageImpl() const; - enum { BitsRemainingInType = 20 }; + enum { BitsRemainingInType = 19 }; // silence VC++ warning C4355: 'this' : used in base member initializer list Type *this_() { return this; } Type(TypeClass tc, QualType Canonical, bool dependent) : CanonicalType(Canonical.isNull() ? QualType(this_(), 0) : Canonical), TC(tc), Dependent(dependent), LinkageKnown(false), - CachedLinkage(NoLinkage) {} + CachedLinkage(NoLinkage), FromPCH(false) {} virtual ~Type() {} virtual void Destroy(ASTContext& C); friend class ASTContext; @@ -804,6 +814,9 @@ protected: public: TypeClass getTypeClass() const { return static_cast(TC); } + /// \brief Whether this type comes from a PCH file. + bool isFromPCH() const { return FromPCH; } + bool isCanonicalUnqualified() const { return CanonicalType.getTypePtr() == this; } @@ -1907,7 +1920,7 @@ public: /// \brief Determine the type of an expression that calls a function of /// this type. QualType getCallResultType(ASTContext &Context) const { - return getResultType().getCallResultType(Context); + return getResultType().getNonLValueExprType(Context); } static llvm::StringRef getNameForCallConv(CallingConv CC); Modified: vendor/clang/dist/include/clang/Basic/Builtins.def ============================================================================== --- vendor/clang/dist/include/clang/Basic/Builtins.def Thu Jul 15 17:06:11 2010 (r210127) +++ vendor/clang/dist/include/clang/Basic/Builtins.def Thu Jul 15 17:07:12 2010 (r210128) @@ -314,6 +314,7 @@ BUILTIN(__builtin_setjmp, "iv**", "") BUILTIN(__builtin_longjmp, "vv**i", "r") BUILTIN(__builtin_unwind_init, "v", "") BUILTIN(__builtin_eh_return_data_regno, "ii", "nc") +BUILTIN(__builtin_snprintf, "ic*zcC*.", "nFp:2:") BUILTIN(__builtin_vsprintf, "ic*cC*a", "nFP:1:") BUILTIN(__builtin_vsnprintf, "ic*zcC*a", "nFP:2:") Modified: vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td Thu Jul 15 17:06:11 2010 (r210127) +++ vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td Thu Jul 15 17:07:12 2010 (r210128) @@ -48,6 +48,7 @@ def CXXHexFloats : DiagGroup<"c++-hex-fl def : DiagGroup<"c++0x-compat", [CXXHexFloats]>; def FourByteMultiChar : DiagGroup<"four-char-constants">; def : DiagGroup<"idiomatic-parentheses">; +def IgnoredQualifiers : DiagGroup<"ignored-qualifiers">; def : DiagGroup<"import">; def : DiagGroup<"init-self">; def : DiagGroup<"inline">; @@ -167,6 +168,7 @@ def Format2 : DiagGroup<"format=2", def Extra : DiagGroup<"extra", [ MissingFieldInitializers, + IgnoredQualifiers, InitializerOverrides, SemiBeforeMethodBody, SignCompare, Modified: vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td Thu Jul 15 17:06:11 2010 (r210127) +++ vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td Thu Jul 15 17:07:12 2010 (r210128) @@ -121,7 +121,8 @@ def warn_use_out_of_scope_declaration : def err_inline_non_function : Error< "'inline' can only appear on functions">; def warn_qual_return_type : Warning< - "'%0' type qualifier%s1 on return type %plural{1:has|:have}1 no effect">; + "'%0' type qualifier%s1 on return type %plural{1:has|:have}1 no effect">, + InGroup, DefaultIgnore; def warn_decl_shadow : Warning<"declaration shadows a %select{" @@ -1986,6 +1987,10 @@ def note_precedence_bitwise_first : Note "place parentheses around the %0 expression to evaluate it first">; def note_precedence_bitwise_silence : Note< "place parentheses around the %0 expression to silence this warning">; + +def warn_logical_instead_of_bitwise : Warning< + "use of logical %0 with constant operand; switch to bitwise %1 or " + "remove constant">, InGroup>; def err_sizeof_nonfragile_interface : Error< "invalid application of '%select{alignof|sizeof}1' to interface %0 in " Modified: vendor/clang/dist/include/clang/Basic/FileManager.h ============================================================================== --- vendor/clang/dist/include/clang/Basic/FileManager.h Thu Jul 15 17:06:11 2010 (r210127) +++ vendor/clang/dist/include/clang/Basic/FileManager.h Thu Jul 15 17:07:12 2010 (r210128) @@ -189,7 +189,7 @@ public: /// getDirectory - Lookup, cache, and verify the specified directory. This /// returns null if the directory doesn't exist. /// - const DirectoryEntry *getDirectory(const llvm::StringRef &Filename) { + const DirectoryEntry *getDirectory(llvm::StringRef Filename) { return getDirectory(Filename.begin(), Filename.end()); } const DirectoryEntry *getDirectory(const char *FileStart,const char *FileEnd); @@ -197,7 +197,7 @@ public: /// getFile - Lookup, cache, and verify the specified file. This returns null /// if the file doesn't exist. /// - const FileEntry *getFile(const llvm::StringRef &Filename) { + const FileEntry *getFile(llvm::StringRef Filename) { return getFile(Filename.begin(), Filename.end()); } const FileEntry *getFile(const char *FilenameStart, @@ -206,8 +206,8 @@ public: /// \brief Retrieve a file entry for a "virtual" file that acts as /// if there were a file with the given name on disk. The file /// itself is not accessed. - const FileEntry *getVirtualFile(const llvm::StringRef &Filename, - off_t Size, time_t ModificationTime); + const FileEntry *getVirtualFile(llvm::StringRef Filename, off_t Size, + time_t ModificationTime); void PrintStats() const; }; Modified: vendor/clang/dist/include/clang/Basic/TargetInfo.h ============================================================================== --- vendor/clang/dist/include/clang/Basic/TargetInfo.h Thu Jul 15 17:06:11 2010 (r210127) +++ vendor/clang/dist/include/clang/Basic/TargetInfo.h Thu Jul 15 17:07:12 2010 (r210128) @@ -61,6 +61,7 @@ protected: std::string CXXABI; unsigned HasAlignMac68kSupport : 1; + unsigned RealTypeUsesObjCFPRet : 3; // TargetInfo Constructor. Default initializes all fields. TargetInfo(const std::string &T); @@ -87,6 +88,13 @@ public: SignedLongLong, UnsignedLongLong }; + + enum RealType { + Float = 0, + Double, + LongDouble + }; + protected: IntType SizeType, IntMaxType, UIntMaxType, PtrDiffType, IntPtrType, WCharType, WIntType, Char16Type, Char32Type, Int64Type, SigAtomicType; @@ -233,6 +241,12 @@ public: /// integer type enum. For example, SignedLong -> "L". static const char *getTypeConstantSuffix(IntType T); + /// \brief Check whether the given real type should use the "fpret" flavor of + /// Obj-C message passing on this target. + bool useObjCFPRetForRealType(RealType T) const { + return RealTypeUsesObjCFPRet & (1 << T); + } + ///===---- Other target property query methods --------------------------===// /// getTargetDefines - Appends the target-specific #define values for this Modified: vendor/clang/dist/include/clang/Driver/ArgList.h ============================================================================== --- vendor/clang/dist/include/clang/Driver/ArgList.h Thu Jul 15 17:06:11 2010 (r210127) +++ vendor/clang/dist/include/clang/Driver/ArgList.h Thu Jul 15 17:07:12 2010 (r210128) @@ -179,6 +179,8 @@ namespace driver { Arg *getLastArg(OptSpecifier Id) const; Arg *getLastArg(OptSpecifier Id0, OptSpecifier Id1) const; Arg *getLastArg(OptSpecifier Id0, OptSpecifier Id1, OptSpecifier Id2) const; + Arg *getLastArg(OptSpecifier Id0, OptSpecifier Id1, OptSpecifier Id2, + OptSpecifier Id3) const; /// getArgString - Return the input argument string at \arg Index. virtual const char *getArgString(unsigned Index) const = 0; Modified: vendor/clang/dist/include/clang/Driver/Driver.h ============================================================================== --- vendor/clang/dist/include/clang/Driver/Driver.h Thu Jul 15 17:06:11 2010 (r210127) +++ vendor/clang/dist/include/clang/Driver/Driver.h Thu Jul 15 17:07:12 2010 (r210128) @@ -62,6 +62,9 @@ public: /// command line. std::string Dir; + /// The original path to the clang executable. + std::string ClangExecutable; + /// The path to the compiler resource directory. std::string ResourceDir; @@ -163,6 +166,11 @@ public: const std::string &getTitle() { return DriverTitle; } void setTitle(std::string Value) { DriverTitle = Value; } + /// \brief Get the path to the main clang executable. + std::string getClangProgramPath() const { + return ClangExecutable; + } + /// @} /// @name Primary Functionality /// @{ Modified: vendor/clang/dist/include/clang/Driver/Options.td ============================================================================== --- vendor/clang/dist/include/clang/Driver/Options.td Thu Jul 15 17:06:11 2010 (r210127) +++ vendor/clang/dist/include/clang/Driver/Options.td Thu Jul 15 17:07:12 2010 (r210128) @@ -230,6 +230,7 @@ def exported__symbols__list : Separate<" def e : JoinedOrSeparate<"-e">; def fPIC : Flag<"-fPIC">, Group; def fPIE : Flag<"-fPIE">, Group; +def fno_PIE : Flag<"-fno-PIE">, Group; def faccess_control : Flag<"-faccess-control">, Group; def fapple_kext : Flag<"-fapple-kext">, Group; def fasm : Flag<"-fasm">, Group; @@ -356,6 +357,7 @@ def fpascal_strings : Flag<"-fpascal-str def fpch_preprocess : Flag<"-fpch-preprocess">, Group; def fpic : Flag<"-fpic">, Group; def fpie : Flag<"-fpie">, Group; +def fno_pie : Flag<"-fno-pie">, Group; def fprofile_arcs : Flag<"-fprofile-arcs">, Group; def fprofile_generate : Flag<"-fprofile-generate">, Group; def framework : Separate<"-framework">, Flags<[LinkerInput]>; @@ -436,11 +438,11 @@ def mfix_and_continue : Flag<"-mfix-and- def mfloat_abi_EQ : Joined<"-mfloat-abi=">, Group; def mfpu_EQ : Joined<"-mfpu=">, Group; def mhard_float : Flag<"-mhard-float">, Group; -def miphoneos_version_min_EQ : Joined<"-miphoneos-version-min=">, Group, Flags<[DriverOption]>; +def miphoneos_version_min_EQ : Joined<"-miphoneos-version-min=">, Group; def mios_version_min_EQ : Joined<"-mios-version-min=">, Alias; def mkernel : Flag<"-mkernel">, Group; def mllvm : Separate<"-mllvm">; -def mmacosx_version_min_EQ : Joined<"-mmacosx-version-min=">, Group, Flags<[DriverOption]>; +def mmacosx_version_min_EQ : Joined<"-mmacosx-version-min=">, Group; def mmmx : Flag<"-mmmx">, Group; def mno_3dnowa : Flag<"-mno-3dnowa">, Group; def mno_3dnow : Flag<"-mno-3dnow">, Group; Modified: vendor/clang/dist/include/clang/Driver/ToolChain.h ============================================================================== --- vendor/clang/dist/include/clang/Driver/ToolChain.h Thu Jul 15 17:06:11 2010 (r210127) +++ vendor/clang/dist/include/clang/Driver/ToolChain.h Thu Jul 15 17:07:12 2010 (r210128) @@ -84,9 +84,8 @@ public: // Helper methods - std::string GetFilePath(const Compilation &C, const char *Name) const; - std::string GetProgramPath(const Compilation &C, const char *Name, - bool WantFile = false) const; + std::string GetFilePath(const char *Name) const; + std::string GetProgramPath(const char *Name, bool WantFile = false) const; // Platform defaults information Modified: vendor/clang/dist/include/clang/Driver/Types.def ============================================================================== --- vendor/clang/dist/include/clang/Driver/Types.def Thu Jul 15 17:06:11 2010 (r210127) +++ vendor/clang/dist/include/clang/Driver/Types.def Thu Jul 15 17:07:12 2010 (r210128) @@ -69,8 +69,8 @@ TYPE("java", Java, // LLVM IR/LTO types. We define separate types for IR and LTO because LTO // outputs should use the standard suffixes. -TYPE("ir", LLVM_IR, INVALID, "ll", "") -TYPE("ir", LLVM_BC, INVALID, "bc", "") +TYPE("ir", LLVM_IR, INVALID, "ll", "u") +TYPE("ir", LLVM_BC, INVALID, "bc", "u") TYPE("lto-ir", LTO_IR, INVALID, "s", "") TYPE("lto-bc", LTO_BC, INVALID, "o", "") Modified: vendor/clang/dist/include/clang/Frontend/ASTConsumers.h ============================================================================== --- vendor/clang/dist/include/clang/Frontend/ASTConsumers.h Thu Jul 15 17:06:11 2010 (r210127) +++ vendor/clang/dist/include/clang/Frontend/ASTConsumers.h Thu Jul 15 17:07:12 2010 (r210128) @@ -63,7 +63,7 @@ ASTConsumer *CreateDeclContextPrinter(); // times. ASTConsumer *CreatePCHGenerator(const Preprocessor &PP, llvm::raw_ostream *OS, - const PCHReader *Chain, + PCHReader *Chain, const char *isysroot = 0); // Inheritance viewer: for C++ code, creates a graph of the inheritance Added: vendor/clang/dist/include/clang/Frontend/PCHDeserializationListener.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/clang/dist/include/clang/Frontend/PCHDeserializationListener.h Thu Jul 15 17:07:12 2010 (r210128) @@ -0,0 +1,36 @@ +//===- PCHDeserializationListener.h - Decl/Type PCH Read Events -*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file defines the PCHDeserializationListener class, which is notified +// by the PCHReader whenever a type or declaration is deserialized. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_CLANG_FRONTEND_PCH_DESERIALIZATION_LISTENER_H +#define LLVM_CLANG_FRONTEND_PCH_DESERIALIZATION_LISTENER_H + +#include "clang/Frontend/PCHBitCodes.h" + +namespace clang { + +class Decl; +class QualType; + +class PCHDeserializationListener { +protected: + ~PCHDeserializationListener() {} + +public: + virtual void TypeRead(pch::TypeID ID, QualType T) = 0; + virtual void DeclRead(pch::DeclID ID, const Decl *D) = 0; +}; + +} + +#endif Modified: vendor/clang/dist/include/clang/Frontend/PCHReader.h ============================================================================== --- vendor/clang/dist/include/clang/Frontend/PCHReader.h Thu Jul 15 17:06:11 2010 (r210127) +++ vendor/clang/dist/include/clang/Frontend/PCHReader.h Thu Jul 15 17:07:12 2010 (r210128) @@ -59,12 +59,22 @@ class GotoStmt; class LabelStmt; class MacroDefinition; class NamedDecl; +class PCHDeserializationListener; class Preprocessor; class Sema; class SwitchCase; class PCHReader; struct HeaderFileInfo; +struct PCHPredefinesBlock { + /// \brief The file ID for this predefines buffer in a PCH file. + FileID BufferID; + + /// \brief This predefines buffer in a PCH file. + llvm::StringRef Data; +}; +typedef llvm::SmallVector PCHPredefinesBlocks; + /// \brief Abstract interface for callback invocations by the PCHReader. /// /// While reading a PCH file, the PCHReader will call the methods of the @@ -91,10 +101,7 @@ public: /// \brief Receives the contents of the predefines buffer. /// - /// \param PCHPredef The start of the predefines buffer in the PCH - /// file. - /// - /// \param PCHBufferID The FileID for the PCH predefines buffer. + /// \param Buffers Information about the predefines buffers. /// /// \param OriginalFileName The original file name for the PCH, which will /// appear as an entry in the predefines buffer. @@ -103,8 +110,7 @@ public: /// here. /// /// \returns true to indicate the predefines are invalid or false otherwise. - virtual bool ReadPredefinesBuffer(llvm::StringRef PCHPredef, - FileID PCHBufferID, + virtual bool ReadPredefinesBuffer(const PCHPredefinesBlocks &Buffers, llvm::StringRef OriginalFileName, std::string &SuggestedPredefines) { return false; @@ -131,8 +137,7 @@ public: virtual bool ReadLanguageOptions(const LangOptions &LangOpts); virtual bool ReadTargetTriple(llvm::StringRef Triple); - virtual bool ReadPredefinesBuffer(llvm::StringRef PCHPredef, - FileID PCHBufferID, + virtual bool ReadPredefinesBuffer(const PCHPredefinesBlocks &Buffers, llvm::StringRef OriginalFileName, std::string &SuggestedPredefines); virtual void ReadHeaderFileInfo(const HeaderFileInfo &HFI, unsigned ID); @@ -165,9 +170,12 @@ public: enum PCHReadResult { Success, Failure, IgnorePCH }; friend class PCHValidator; private: - /// \ brief The receiver of some callbacks invoked by PCHReader. + /// \brief The receiver of some callbacks invoked by PCHReader. llvm::OwningPtr Listener; + /// \brief The receiver of deserialization events. + PCHDeserializationListener *DeserializationListener; + SourceManager &SourceMgr; FileManager &FileMgr; Diagnostic &Diags; @@ -483,15 +491,9 @@ private: ~ReadingKindTracker() { Reader.ReadingKind = PrevKind; } }; - /// \brief The file ID for the predefines buffer in the PCH file. - FileID PCHPredefinesBufferID; - - /// \brief Pointer to the beginning of the predefines buffer in the - /// PCH file. - const char *PCHPredefines; - - /// \brief Length of the predefines buffer in the PCH file. - unsigned PCHPredefinesLen; + /// \brief All predefines buffers in all PCH files, to be treated as if + /// concatenated. + PCHPredefinesBlocks PCHPredefinesBuffers; /// \brief Suggested contents of the predefines buffer, after this /// PCH file has been processed. @@ -509,7 +511,7 @@ private: void MaybeAddSystemRootToFilename(std::string &Filename); PCHReadResult ReadPCHBlock(); - bool CheckPredefinesBuffer(llvm::StringRef PCHPredef, FileID PCHBufferID); + bool CheckPredefinesBuffers(); bool ParseLineTable(llvm::SmallVectorImpl &Record); PCHReadResult ReadSourceManagerBlock(); PCHReadResult ReadSLocEntryRecord(unsigned ID); @@ -576,6 +578,10 @@ public: Listener.reset(listener); } + void setDeserializationListener(PCHDeserializationListener *Listener) { + DeserializationListener = Listener; + } + /// \brief Set the Preprocessor to use. void setPreprocessor(Preprocessor &pp); @@ -602,6 +608,16 @@ public: /// \brief Read preprocessed entities into the virtual void ReadPreprocessedEntities(); + /// \brief Returns the number of types found in this file. + unsigned getTotalNumTypes() const { + return static_cast(TypesLoaded.size()); + } + + /// \brief Returns the number of declarations found in this file. + unsigned getTotalNumDecls() const { + return static_cast(DeclsLoaded.size()); + } + /// \brief Reads a TemplateArgumentLocInfo appropriate for the /// given TemplateArgument kind. TemplateArgumentLocInfo Modified: vendor/clang/dist/include/clang/Frontend/PCHWriter.h ============================================================================== --- vendor/clang/dist/include/clang/Frontend/PCHWriter.h Thu Jul 15 17:06:11 2010 (r210127) +++ vendor/clang/dist/include/clang/Frontend/PCHWriter.h Thu Jul 15 17:07:12 2010 (r210128) @@ -19,6 +19,7 @@ #include "clang/AST/DeclarationName.h" #include "clang/AST/TemplateBase.h" #include "clang/Frontend/PCHBitCodes.h" +#include "clang/Frontend/PCHDeserializationListener.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/SmallVector.h" #include @@ -71,7 +72,7 @@ struct UnsafeQualTypeDenseMapInfo { /// representation of a given abstract syntax tree and its supporting /// data structures. This bitstream can be de-serialized via an /// instance of the PCHReader class. -class PCHWriter { +class PCHWriter : public PCHDeserializationListener { public: typedef llvm::SmallVector RecordData; @@ -79,6 +80,9 @@ private: /// \brief The bitstream writer used to emit this precompiled header. llvm::BitstreamWriter &Stream; + /// \brief The reader of existing PCH files, if we're chaining. + PCHReader *Chain; + /// \brief Stores a declaration or a type to be written to the PCH file. class DeclOrType { public: @@ -220,7 +224,7 @@ private: void WriteSubStmt(Stmt *S); void WriteBlockInfoBlock(); - void WriteMetadata(ASTContext &Context, const PCHReader *Chain, const char *isysroot); + void WriteMetadata(ASTContext &Context, const char *isysroot); void WriteLanguageOptions(const LangOptions &LangOpts); void WriteStatCache(MemorizeStatCalls &StatCalls); void WriteSourceManagerBlock(SourceManager &SourceMgr, @@ -242,12 +246,12 @@ private: void WritePCHCore(Sema &SemaRef, MemorizeStatCalls *StatCalls, const char* isysroot); void WritePCHChain(Sema &SemaRef, MemorizeStatCalls *StatCalls, - const PCHReader *Chain, const char* isysroot); + const char* isysroot); public: /// \brief Create a new precompiled header writer that outputs to /// the given bitstream. - PCHWriter(llvm::BitstreamWriter &Stream); + PCHWriter(llvm::BitstreamWriter &Stream, PCHReader *Chain); /// \brief Write a precompiled header for the given semantic analysis. /// @@ -263,7 +267,7 @@ public: /// \param PPRec Record of the preprocessing actions that occurred while /// preprocessing this file, e.g., macro instantiations void WritePCH(Sema &SemaRef, MemorizeStatCalls *StatCalls, - const PCHReader *Chain, const char* isysroot); + const char* isysroot); /// \brief Emit a source location. void AddSourceLocation(SourceLocation Loc, RecordData &Record); @@ -393,6 +397,10 @@ public: unsigned GetLabelID(LabelStmt *S); unsigned getParmVarDeclAbbrev() const { return ParmVarDeclAbbrev; } + + // PCHDeserializationListener implementation + void TypeRead(pch::TypeID ID, QualType T); + void DeclRead(pch::DeclID ID, const Decl *D); }; } // end namespace clang Modified: vendor/clang/dist/include/clang/Rewrite/Rewriter.h ============================================================================== --- vendor/clang/dist/include/clang/Rewrite/Rewriter.h Thu Jul 15 17:06:11 2010 (r210127) +++ vendor/clang/dist/include/clang/Rewrite/Rewriter.h Thu Jul 15 17:07:12 2010 (r210128) @@ -64,7 +64,7 @@ public: /// the buffer is specified relative to the original SourceBuffer. The /// text is inserted after the specified location. /// - void InsertText(unsigned OrigOffset, const llvm::StringRef &Str, + void InsertText(unsigned OrigOffset, llvm::StringRef Str, bool InsertAfter = true); @@ -72,14 +72,14 @@ public: /// offset in the buffer is specified relative to the original /// SourceBuffer. The text is inserted before the specified location. This is /// method is the same as InsertText with "InsertAfter == false". - void InsertTextBefore(unsigned OrigOffset, const llvm::StringRef &Str) { + void InsertTextBefore(unsigned OrigOffset, llvm::StringRef Str) { InsertText(OrigOffset, Str, false); } /// InsertTextAfter - Insert some text at the specified point, where the /// offset in the buffer is specified relative to the original SourceBuffer. /// The text is inserted after the specified location. - void InsertTextAfter(unsigned OrigOffset, const llvm::StringRef &Str) { + void InsertTextAfter(unsigned OrigOffset, llvm::StringRef Str) { InsertText(OrigOffset, Str); } @@ -87,7 +87,7 @@ public: /// buffer with a new string. This is effectively a combined "remove/insert" /// operation. void ReplaceText(unsigned OrigOffset, unsigned OrigLength, - const llvm::StringRef &NewStr); + llvm::StringRef NewStr); private: // Methods only usable by Rewriter. @@ -164,7 +164,7 @@ public: /// InsertText - Insert the specified string at the specified location in the /// original buffer. This method returns true (and does nothing) if the input /// location was not rewritable, false otherwise. - bool InsertText(SourceLocation Loc, const llvm::StringRef &Str, + bool InsertText(SourceLocation Loc, llvm::StringRef Str, bool InsertAfter = true); /// InsertTextAfter - Insert the specified string at the specified location in @@ -172,7 +172,7 @@ public: /// the input location was not rewritable, false otherwise. Text is /// inserted after any other text that has been previously inserted /// at the some point (the default behavior for InsertText). - bool InsertTextAfter(SourceLocation Loc, const llvm::StringRef &Str) { + bool InsertTextAfter(SourceLocation Loc, llvm::StringRef Str) { return InsertText(Loc, Str); } @@ -181,7 +181,7 @@ public: /// location was not rewritable, false otherwise. Text is /// inserted before any other text that has been previously inserted /// at the some point. - bool InsertTextBefore(SourceLocation Loc, const llvm::StringRef &Str) { + bool InsertTextBefore(SourceLocation Loc, llvm::StringRef Str) { return InsertText(Loc, Str, false); } @@ -192,7 +192,7 @@ public: /// buffer with a new string. This is effectively a combined "remove/insert" /// operation. bool ReplaceText(SourceLocation Start, unsigned OrigLength, - const llvm::StringRef &NewStr); + llvm::StringRef NewStr); /// ReplaceStmt - This replaces a Stmt/Expr with another, using the pretty /// printer to generate the replacement code. This returns true if the input Modified: vendor/clang/dist/lib/AST/DeclTemplate.cpp ============================================================================== --- vendor/clang/dist/lib/AST/DeclTemplate.cpp Thu Jul 15 17:06:11 2010 (r210127) +++ vendor/clang/dist/lib/AST/DeclTemplate.cpp Thu Jul 15 17:07:12 2010 (r210128) @@ -223,7 +223,7 @@ ClassTemplateDecl::getInjectedClassNameS } else if (NonTypeTemplateParmDecl *NTTP = dyn_cast(*Param)) { Expr *E = new (Context) DeclRefExpr(NTTP, - NTTP->getType().getNonReferenceType(), + NTTP->getType().getNonLValueExprType(Context), NTTP->getLocation()); TemplateArgs.push_back(TemplateArgument(E)); } else { Modified: vendor/clang/dist/lib/AST/Expr.cpp ============================================================================== --- vendor/clang/dist/lib/AST/Expr.cpp Thu Jul 15 17:06:11 2010 (r210127) +++ vendor/clang/dist/lib/AST/Expr.cpp Thu Jul 15 17:07:12 2010 (r210128) @@ -684,6 +684,8 @@ const char *CastExpr::getCastKindName() return "Unknown"; case CastExpr::CK_BitCast: return "BitCast"; + case CastExpr::CK_LValueBitCast: + return "LValueBitCast"; case CastExpr::CK_NoOp: return "NoOp"; case CastExpr::CK_BaseToDerived: Modified: vendor/clang/dist/lib/AST/ExprConstant.cpp ============================================================================== --- vendor/clang/dist/lib/AST/ExprConstant.cpp Thu Jul 15 17:06:11 2010 (r210127) +++ vendor/clang/dist/lib/AST/ExprConstant.cpp Thu Jul 15 17:07:12 2010 (r210128) @@ -563,6 +563,7 @@ bool PointerExprEvaluator::VisitCastExpr case CastExpr::CK_NoOp: case CastExpr::CK_BitCast: + case CastExpr::CK_LValueBitCast: case CastExpr::CK_AnyPointerToObjCPointerCast: case CastExpr::CK_AnyPointerToBlockPointerCast: return Visit(SubExpr); Modified: vendor/clang/dist/lib/AST/Type.cpp ============================================================================== --- vendor/clang/dist/lib/AST/Type.cpp Thu Jul 15 17:06:11 2010 (r210127) +++ vendor/clang/dist/lib/AST/Type.cpp Thu Jul 15 17:07:12 2010 (r210128) @@ -992,7 +992,7 @@ const char *BuiltinType::getName(const L void FunctionType::ANCHOR() {} // Key function for FunctionType. -QualType QualType::getCallResultType(ASTContext &Context) const { +QualType QualType::getNonLValueExprType(ASTContext &Context) const { if (const ReferenceType *RefType = getTypePtr()->getAs()) return RefType->getPointeeType(); @@ -1002,7 +1002,7 @@ QualType QualType::getCallResultType(AST // // See also C99 6.3.2.1p2. if (!Context.getLangOptions().CPlusPlus || - !getTypePtr()->isDependentType() && !getTypePtr()->isRecordType()) + (!getTypePtr()->isDependentType() && !getTypePtr()->isRecordType())) return getUnqualifiedType(); return *this; Modified: vendor/clang/dist/lib/Basic/FileManager.cpp ============================================================================== --- vendor/clang/dist/lib/Basic/FileManager.cpp Thu Jul 15 17:06:11 2010 (r210127) +++ vendor/clang/dist/lib/Basic/FileManager.cpp Thu Jul 15 17:07:12 2010 (r210128) @@ -331,8 +331,8 @@ const FileEntry *FileManager::getFile(co } const FileEntry * -FileManager::getVirtualFile(const llvm::StringRef &Filename, - off_t Size, time_t ModificationTime) { +FileManager::getVirtualFile(llvm::StringRef Filename, off_t Size, + time_t ModificationTime) { const char *NameStart = Filename.begin(), *NameEnd = Filename.end(); ++NumFileLookups; Modified: vendor/clang/dist/lib/Basic/TargetInfo.cpp ============================================================================== --- vendor/clang/dist/lib/Basic/TargetInfo.cpp Thu Jul 15 17:06:11 2010 (r210127) +++ vendor/clang/dist/lib/Basic/TargetInfo.cpp Thu Jul 15 17:07:12 2010 (r210128) @@ -55,6 +55,9 @@ TargetInfo::TargetInfo(const std::string "i64:64:64-f32:32:32-f64:64:64-n32"; UserLabelPrefix = "_"; HasAlignMac68kSupport = false; + + // Default to no types using fpret. + RealTypeUsesObjCFPRet = 0; } // Out of line virtual dtor for TargetInfo. Modified: vendor/clang/dist/lib/Basic/Targets.cpp ============================================================================== --- vendor/clang/dist/lib/Basic/Targets.cpp Thu Jul 15 17:06:11 2010 (r210127) +++ vendor/clang/dist/lib/Basic/Targets.cpp Thu Jul 15 17:07:12 2010 (r210128) @@ -1245,6 +1245,11 @@ public: PtrDiffType = SignedInt; IntPtrType = SignedInt; RegParmMax = 3; + + // Use fpret for all types. + RealTypeUsesObjCFPRet = ((1 << TargetInfo::Float) | + (1 << TargetInfo::Double) | + (1 << TargetInfo::LongDouble)); } virtual const char *getVAListDeclaration() const { return "typedef char* __builtin_va_list;"; @@ -1411,6 +1416,9 @@ public: DescriptionString = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-" "i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-" "a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"; + + // Use fpret only for long double. + RealTypeUsesObjCFPRet = (1 << TargetInfo::LongDouble); } virtual const char *getVAListDeclaration() const { return "typedef struct __va_list_tag {" Modified: vendor/clang/dist/lib/Checker/GRExprEngine.cpp ============================================================================== --- vendor/clang/dist/lib/Checker/GRExprEngine.cpp Thu Jul 15 17:06:11 2010 (r210127) +++ vendor/clang/dist/lib/Checker/GRExprEngine.cpp Thu Jul 15 17:07:12 2010 (r210128) @@ -2438,6 +2438,7 @@ void GRExprEngine::VisitCast(CastExpr *C case CastExpr::CK_Unknown: case CastExpr::CK_ArrayToPointerDecay: case CastExpr::CK_BitCast: + case CastExpr::CK_LValueBitCast: case CastExpr::CK_IntegralCast: case CastExpr::CK_IntegralToPointer: case CastExpr::CK_PointerToIntegral: Modified: vendor/clang/dist/lib/Checker/LLVMConventionsChecker.cpp ============================================================================== --- vendor/clang/dist/lib/Checker/LLVMConventionsChecker.cpp Thu Jul 15 17:06:11 2010 (r210127) +++ vendor/clang/dist/lib/Checker/LLVMConventionsChecker.cpp Thu Jul 15 17:07:12 2010 (r210128) @@ -36,7 +36,7 @@ static bool IsLLVMStringRef(QualType T) /// Check whether the declaration is semantically inside the top-level /// namespace named by ns. -static bool InNamespace(const Decl *D, const llvm::StringRef &NS) { +static bool InNamespace(const Decl *D, llvm::StringRef NS) { const DeclContext *DC = D->getDeclContext(); const NamespaceDecl *ND = dyn_cast(D->getDeclContext()); if (!ND) Modified: vendor/clang/dist/lib/CodeGen/CGBlocks.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGBlocks.cpp Thu Jul 15 17:06:11 2010 (r210127) +++ vendor/clang/dist/lib/CodeGen/CGBlocks.cpp Thu Jul 15 17:07:12 2010 (r210128) @@ -253,7 +253,7 @@ llvm::Value *CodeGenFunction::BuildBlock CodeGenTypes &Types = CGM.getTypes(); const CGFunctionInfo &FnInfo = Types.getFunctionInfo(ResultType, Args, FunctionType::ExtInfo()); - if (CGM.ReturnTypeUsesSret(FnInfo)) + if (CGM.ReturnTypeUsesSRet(FnInfo)) flags |= BLOCK_USE_STRET; } const llvm::IntegerType *IntTy = cast( Modified: vendor/clang/dist/lib/CodeGen/CGCall.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGCall.cpp Thu Jul 15 17:06:11 2010 (r210127) +++ vendor/clang/dist/lib/CodeGen/CGCall.cpp Thu Jul 15 17:07:12 2010 (r210128) @@ -564,10 +564,28 @@ static void CreateCoercedStore(llvm::Val /***/ -bool CodeGenModule::ReturnTypeUsesSret(const CGFunctionInfo &FI) { +bool CodeGenModule::ReturnTypeUsesSRet(const CGFunctionInfo &FI) { return FI.getReturnInfo().isIndirect(); } +bool CodeGenModule::ReturnTypeUsesFPRet(QualType ResultType) { + if (const BuiltinType *BT = ResultType->getAs()) { + switch (BT->getKind()) { + default: + return false; + case BuiltinType::Float: + return getContext().Target.useObjCFPRetForRealType(TargetInfo::Float); + case BuiltinType::Double: + return getContext().Target.useObjCFPRetForRealType(TargetInfo::Double); + case BuiltinType::LongDouble: + return getContext().Target.useObjCFPRetForRealType( + TargetInfo::LongDouble); + } + } + + return false; +} + const llvm::FunctionType *CodeGenTypes::GetFunctionType(GlobalDecl GD) { const CGFunctionInfo &FI = getFunctionInfo(GD); @@ -841,7 +859,7 @@ void CodeGenFunction::EmitFunctionProlog llvm::Function::arg_iterator AI = Fn->arg_begin(); // Name the struct return argument. - if (CGM.ReturnTypeUsesSret(FI)) { + if (CGM.ReturnTypeUsesSRet(FI)) { AI->setName("agg.result"); ++AI; } @@ -1116,7 +1134,7 @@ RValue CodeGenFunction::EmitCall(const C // If the call returns a temporary with struct return, create a temporary // alloca to hold the result, unless one is given to us. - if (CGM.ReturnTypeUsesSret(CallInfo)) { + if (CGM.ReturnTypeUsesSRet(CallInfo)) { llvm::Value *Value = ReturnValue.getValue(); if (!Value) Value = CreateMemTemp(RetTy); Modified: vendor/clang/dist/lib/CodeGen/CGClass.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGClass.cpp Thu Jul 15 17:06:11 2010 (r210127) +++ vendor/clang/dist/lib/CodeGen/CGClass.cpp Thu Jul 15 17:07:12 2010 (r210128) @@ -340,7 +340,7 @@ static void EmitBaseInitializer(CodeGenF if (CGF.Exceptions && !BaseClassDecl->hasTrivialDestructor()) { // FIXME: Is this OK for C++0x delegating constructors? - CodeGenFunction::CleanupBlock Cleanup(CGF, CodeGenFunction::EHCleanup); + CodeGenFunction::CleanupBlock Cleanup(CGF, EHCleanup); CXXDestructorDecl *DD = BaseClassDecl->getDestructor(); CGF.EmitCXXDestructorCall(DD, Dtor_Base, isBaseVirtual, V); @@ -534,7 +534,7 @@ static void EmitMemberInitializer(CodeGe CXXRecordDecl *RD = cast(RT->getDecl()); if (!RD->hasTrivialDestructor()) { // FIXME: Is this OK for C++0x delegating constructors? - CodeGenFunction::CleanupBlock Cleanup(CGF, CodeGenFunction::EHCleanup); + CodeGenFunction::CleanupBlock Cleanup(CGF, EHCleanup); llvm::Value *ThisPtr = CGF.LoadCXXThis(); LValue LHS = CGF.EmitLValueForField(ThisPtr, Field, 0); Modified: vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp Thu Jul 15 17:06:11 2010 (r210127) +++ vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp Thu Jul 15 17:07:12 2010 (r210128) @@ -537,11 +537,17 @@ CGDebugInfo::getOrCreateMethodType(const llvm::DIType ThisPtrType = DebugFactory.CreateArtificialType(getOrCreateType(ThisPtr, Unit)); - if (Method->getTypeQualifiers() && Qualifiers::Const) + unsigned Quals = Method->getTypeQualifiers(); + if (Quals & Qualifiers::Const) ThisPtrType = DebugFactory.CreateDerivedType(llvm::dwarf::DW_TAG_const_type, Unit, "", Unit, 0, 0, 0, 0, 0, ThisPtrType); + if (Quals & Qualifiers::Volatile) + ThisPtrType = + DebugFactory.CreateDerivedType(llvm::dwarf::DW_TAG_volatile_type, + Unit, "", Unit, + 0, 0, 0, 0, 0, ThisPtrType); TypeCache[ThisPtr.getAsOpaquePtr()] = ThisPtrType; Elts.push_back(ThisPtrType); Modified: vendor/clang/dist/lib/CodeGen/CGDecl.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGDecl.cpp Thu Jul 15 17:06:11 2010 (r210127) +++ vendor/clang/dist/lib/CodeGen/CGDecl.cpp Thu Jul 15 17:07:12 2010 (r210128) @@ -388,6 +388,58 @@ const llvm::Type *CodeGenFunction::Build return Info.first; } +namespace { + struct CallArrayDtor : EHScopeStack::LazyCleanup { + CallArrayDtor(const CXXDestructorDecl *Dtor, + const ConstantArrayType *Type, + llvm::Value *Loc) + : Dtor(Dtor), Type(Type), Loc(Loc) {} + + const CXXDestructorDecl *Dtor; + const ConstantArrayType *Type; + llvm::Value *Loc; + + void Emit(CodeGenFunction &CGF, bool IsForEH) { + QualType BaseElementTy = CGF.getContext().getBaseElementType(Type); + const llvm::Type *BasePtr = CGF.ConvertType(BaseElementTy); + BasePtr = llvm::PointerType::getUnqual(BasePtr); + llvm::Value *BaseAddrPtr = CGF.Builder.CreateBitCast(Loc, BasePtr); + CGF.EmitCXXAggrDestructorCall(Dtor, Type, BaseAddrPtr); + } + }; + + struct CallVarDtor : EHScopeStack::LazyCleanup { + CallVarDtor(const CXXDestructorDecl *Dtor, + llvm::Value *NRVOFlag, + llvm::Value *Loc) + : Dtor(Dtor), NRVOFlag(NRVOFlag), Loc(Loc) {} + + const CXXDestructorDecl *Dtor; + llvm::Value *NRVOFlag; + llvm::Value *Loc; + + void Emit(CodeGenFunction &CGF, bool IsForEH) { + // Along the exceptions path we always execute the dtor. + bool NRVO = !IsForEH && NRVOFlag; + + llvm::BasicBlock *SkipDtorBB = 0; + if (NRVO) { + // If we exited via NRVO, we skip the destructor call. + llvm::BasicBlock *RunDtorBB = CGF.createBasicBlock("nrvo.unused"); + SkipDtorBB = CGF.createBasicBlock("nrvo.skipdtor"); + llvm::Value *DidNRVO = CGF.Builder.CreateLoad(NRVOFlag, "nrvo.val"); + CGF.Builder.CreateCondBr(DidNRVO, SkipDtorBB, RunDtorBB); + CGF.EmitBlock(RunDtorBB); + } + + CGF.EmitCXXDestructorCall(Dtor, Dtor_Complete, + /*ForVirtualBase=*/false, Loc); + + if (NRVO) CGF.EmitBlock(SkipDtorBB); + } + }; +} + /// EmitLocalBlockVarDecl - Emit code and set up an entry in LocalDeclMap for a /// variable declaration with auto, register, or no storage class specifier. /// These turn into simple stack objects, or GlobalValues depending on target. @@ -686,53 +738,11 @@ void CodeGenFunction::EmitLocalBlockVarD if (const ConstantArrayType *Array = getContext().getAsConstantArrayType(Ty)) { - CleanupBlock Scope(*this, NormalCleanup); - - QualType BaseElementTy = getContext().getBaseElementType(Array); - const llvm::Type *BasePtr = ConvertType(BaseElementTy); - BasePtr = llvm::PointerType::getUnqual(BasePtr); - llvm::Value *BaseAddrPtr = - Builder.CreateBitCast(Loc, BasePtr); - EmitCXXAggrDestructorCall(D, Array, BaseAddrPtr); - - if (Exceptions) { - Scope.beginEHCleanup(); - - QualType BaseElementTy = getContext().getBaseElementType(Array); - const llvm::Type *BasePtr = ConvertType(BaseElementTy); - BasePtr = llvm::PointerType::getUnqual(BasePtr); - llvm::Value *BaseAddrPtr = - Builder.CreateBitCast(Loc, BasePtr); - EmitCXXAggrDestructorCall(D, Array, BaseAddrPtr); - } + EHStack.pushLazyCleanup(NormalAndEHCleanup, + D, Array, Loc); } else { - // Normal destruction. - CleanupBlock Scope(*this, NormalCleanup); - - llvm::BasicBlock *SkipDtor = 0; - if (NRVO) { - // If we exited via NRVO, we skip the destructor call. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Jul 15 17:11:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 610601065678; Thu, 15 Jul 2010 17:11:50 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 377418FC1E; Thu, 15 Jul 2010 17:11: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 o6FHBoEK048916; Thu, 15 Jul 2010 17:11:50 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6FHBoJC048914; Thu, 15 Jul 2010 17:11:50 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007151711.o6FHBoJC048914@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 15 Jul 2010 17:11:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210129 - head/sys/dev/acpica/Osd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 17:11:50 -0000 Author: jkim Date: Thu Jul 15 17:11:49 2010 New Revision: 210129 URL: http://svn.freebsd.org/changeset/base/210129 Log: - AcpiOsReadMemory() needs similar fixes as r209965. [1] According to ACPICA User Guide and Programmer Reference, the read data must be zero extended to fill the 32-bit return value even if the bit width of the port is less than 32. - Remove 64-bit read/write from AcpiOsReadMemory() and AcpiOsWriteMemory(). These functions do not support 64-bit access (yet). Clean up style nits and unnecessary bit masking while I am here. Reported by: Liu, Jinsong (jinsong dot liu at intel dot com) via Lin Ming (ming dot m dot lin at intel dot com) [1] Modified: head/sys/dev/acpica/Osd/OsdMemory.c Modified: head/sys/dev/acpica/Osd/OsdMemory.c ============================================================================== --- head/sys/dev/acpica/Osd/OsdMemory.c Thu Jul 15 17:07:12 2010 (r210128) +++ head/sys/dev/acpica/Osd/OsdMemory.c Thu Jul 15 17:11:49 2010 (r210129) @@ -103,19 +103,13 @@ AcpiOsReadMemory(ACPI_PHYSICAL_ADDRESS A switch (Width) { case 8: - *(u_int8_t *)Value = (*(volatile u_int8_t *)LogicalAddress); + *Value = *(volatile uint8_t *)LogicalAddress; break; case 16: - *(u_int16_t *)Value = (*(volatile u_int16_t *)LogicalAddress); + *Value = *(volatile uint16_t *)LogicalAddress; break; case 32: - *(u_int32_t *)Value = (*(volatile u_int32_t *)LogicalAddress); - break; - case 64: - *(u_int64_t *)Value = (*(volatile u_int64_t *)LogicalAddress); - break; - default: - /* debug trap goes here */ + *Value = *(volatile uint32_t *)LogicalAddress; break; } @@ -135,19 +129,13 @@ AcpiOsWriteMemory(ACPI_PHYSICAL_ADDRESS switch (Width) { case 8: - (*(volatile u_int8_t *)LogicalAddress) = Value & 0xff; + *(volatile uint8_t *)LogicalAddress = Value; break; case 16: - (*(volatile u_int16_t *)LogicalAddress) = Value & 0xffff; + *(volatile uint16_t *)LogicalAddress = Value; break; case 32: - (*(volatile u_int32_t *)LogicalAddress) = Value & 0xffffffff; - break; - case 64: - (*(volatile u_int64_t *)LogicalAddress) = Value; - break; - default: - /* debug trap goes here */ + *(volatile uint32_t *)LogicalAddress = Value; break; } From owner-svn-src-all@FreeBSD.ORG Thu Jul 15 17:49:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 53D09106568C; Thu, 15 Jul 2010 17:49:36 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 299068FC2F; Thu, 15 Jul 2010 17:49: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 o6FHna3l057351; Thu, 15 Jul 2010 17:49:36 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6FHnaUI057347; Thu, 15 Jul 2010 17:49:36 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007151749.o6FHnaUI057347@svn.freebsd.org> From: Alexander Motin Date: Thu, 15 Jul 2010 17:49:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210131 - in head/sys: amd64/include i386/include sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 17:49:36 -0000 Author: mav Date: Thu Jul 15 17:49:35 2010 New Revision: 210131 URL: http://svn.freebsd.org/changeset/base/210131 Log: Move functions declaration to MI code, following implementation. Modified: head/sys/amd64/include/clock.h head/sys/i386/include/clock.h head/sys/sys/systm.h Modified: head/sys/amd64/include/clock.h ============================================================================== --- head/sys/amd64/include/clock.h Thu Jul 15 17:46:21 2010 (r210130) +++ head/sys/amd64/include/clock.h Thu Jul 15 17:49:35 2010 (r210131) @@ -23,11 +23,6 @@ extern int tsc_is_invariant; void i8254_init(void); -struct trapframe; - -int hardclockintr(struct trapframe *frame); -int statclockintr(struct trapframe *frame); - /* * Driver to clock driver interface. */ Modified: head/sys/i386/include/clock.h ============================================================================== --- head/sys/i386/include/clock.h Thu Jul 15 17:46:21 2010 (r210130) +++ head/sys/i386/include/clock.h Thu Jul 15 17:49:35 2010 (r210131) @@ -23,11 +23,6 @@ extern int tsc_is_invariant; void i8254_init(void); -struct trapframe; - -int hardclockintr(struct trapframe *frame); -int statclockintr(struct trapframe *frame); - /* * Driver to clock driver interface. */ Modified: head/sys/sys/systm.h ============================================================================== --- head/sys/sys/systm.h Thu Jul 15 17:46:21 2010 (r210130) +++ head/sys/sys/systm.h Thu Jul 15 17:49:35 2010 (r210131) @@ -140,6 +140,7 @@ struct tty; struct ucred; struct uio; struct _jmp_buf; +struct trapframe; int setjmp(struct _jmp_buf *); void longjmp(struct _jmp_buf *, int) __dead2; @@ -243,6 +244,9 @@ void profclock(int usermode, uintfptr_t void timer1clock(int usermode, uintfptr_t pc); void timer2clock(int usermode, uintfptr_t pc); +int hardclockintr(struct trapframe *frame); +int statclockintr(struct trapframe *frame); + void startprofclock(struct proc *); void stopprofclock(struct proc *); void cpu_startprofclock(void); From owner-svn-src-all@FreeBSD.ORG Thu Jul 15 18:44:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5AFDB1065673; Thu, 15 Jul 2010 18:44:59 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 49E348FC0C; Thu, 15 Jul 2010 18:44:59 +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 o6FIixEu069733; Thu, 15 Jul 2010 18:44:59 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6FIixDP069732; Thu, 15 Jul 2010 18:44:59 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201007151844.o6FIixDP069732@svn.freebsd.org> From: Edward Tomasz Napierala Date: Thu, 15 Jul 2010 18:44:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210132 - head/sys/compat/svr4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 18:44:59 -0000 Author: trasz Date: Thu Jul 15 18:44:58 2010 New Revision: 210132 URL: http://svn.freebsd.org/changeset/base/210132 Log: Make svr4(4) version of poll(2) use the same limit of file descriptors as the usual poll(2) does, instead of checking resource limits. Modified: head/sys/compat/svr4/svr4_filio.c Modified: head/sys/compat/svr4/svr4_filio.c ============================================================================== --- head/sys/compat/svr4/svr4_filio.c Thu Jul 15 17:49:35 2010 (r210131) +++ head/sys/compat/svr4/svr4_filio.c Thu Jul 15 18:44:58 2010 (r210132) @@ -40,8 +40,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include #include @@ -67,8 +65,7 @@ svr4_sys_poll(td, uap) u_long siz; PROC_LOCK(td->td_proc); - if (uap->nfds > lim_cur(td->td_proc, RLIMIT_NOFILE) && - uap->nfds > FD_SETSIZE) { + if (uap->nfds > maxfilesperproc && uap->nfds > FD_SETSIZE) { PROC_UNLOCK(td->td_proc); return (EINVAL); } From owner-svn-src-all@FreeBSD.ORG Thu Jul 15 19:21:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37ACF1065677; Thu, 15 Jul 2010 19:21:08 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 25B9D8FC14; Thu, 15 Jul 2010 19:21:08 +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 o6FJL8UN077844; Thu, 15 Jul 2010 19:21:08 GMT (envelope-from jamie@svn.freebsd.org) Received: (from jamie@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6FJL8AP077842; Thu, 15 Jul 2010 19:21:08 GMT (envelope-from jamie@svn.freebsd.org) Message-Id: <201007151921.o6FJL8AP077842@svn.freebsd.org> From: Jamie Gritton Date: Thu, 15 Jul 2010 19:21:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210133 - head/lib/libjail X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 19:21:08 -0000 Author: jamie Date: Thu Jul 15 19:21:07 2010 New Revision: 210133 URL: http://svn.freebsd.org/changeset/base/210133 Log: Don't import parameter values in jail_getv, except for the search key. Remove the internal jailparam_vlist, in favor of using variants of its logic separately in jail_setv and jail_getv. Free the temporary parameter list and exported values in jail_setv and jail_getv. Noted by: Stanislav Uzunchev MFC after: 3 days Modified: head/lib/libjail/jail.c Modified: head/lib/libjail/jail.c ============================================================================== --- head/lib/libjail/jail.c Thu Jul 15 18:44:58 2010 (r210132) +++ head/lib/libjail/jail.c Thu Jul 15 19:21:07 2010 (r210133) @@ -56,7 +56,6 @@ __FBSDID("$FreeBSD$"); static int jailparam_import_enum(const char **values, int nvalues, const char *valstr, size_t valsize, int *value); -static int jailparam_vlist(struct jailparam **jpp, va_list ap); static int jailparam_type(struct jailparam *jp); static char *noname(const char *name); static char *nononame(const char *name); @@ -74,16 +73,31 @@ static const char *jailsys_values[] = { int jail_setv(int flags, ...) { - va_list ap; + va_list ap, tap; struct jailparam *jp; - int njp; + const char *name, *value; + int njp, jid; + /* Create the parameter list and import the parameters. */ va_start(ap, flags); - njp = jailparam_vlist(&jp, ap); + va_copy(tap, ap); + for (njp = 0; va_arg(tap, char *) != NULL; njp++) + (void)va_arg(tap, char *); + va_end(tap); + jp = alloca(njp * sizeof(struct jailparam)); + for (njp = 0; (name = va_arg(ap, char *)) != NULL; njp++) { + value = va_arg(ap, char *); + if (jailparam_init(jp + njp, name) < 0 || + jailparam_import(jp + njp, value) < 0) { + jailparam_free(jp, njp); + va_end(ap); + return (-1); + } + } va_end(ap); - if (njp < 0) - return (njp); - return (jailparam_set(jp, njp, flags)); + jid = jailparam_set(jp, njp, flags); + jailparam_free(jp, njp); + return (jid); } /* @@ -94,48 +108,85 @@ int jail_getv(int flags, ...) { va_list ap, tap; - struct jailparam *jp; - char *valarg; - const char *value; - int njp, i, jid, namekey, zero; + struct jailparam *jp, *jp_lastjid, *jp_jid, *jp_name, *jp_key; + char *valarg, *value; + const char *name, *key_value, *lastjid_value, *jid_value, *name_value; + int njp, i, jid; + /* Create the parameter list and find the key. */ va_start(ap, flags); va_copy(tap, ap); - njp = jailparam_vlist(&jp, tap); + for (njp = 0; va_arg(tap, char *) != NULL; njp++) + (void)va_arg(tap, char *); va_end(tap); - if (njp < 0) - return (njp); - /* - * See if the name is the search key. If so, we don't want to write - * it back in case it's a read-only string. - */ - namekey = 1; - zero = 0; - for (i = 0; i < njp; i++) { - if (!strcmp(jp->jp_name, "lastjid") || - (!strcmp(jp->jp_name, "jid") && - memcmp(jp->jp_value, &zero, sizeof(zero)))) - namekey = 0; + + jp = alloca(njp * sizeof(struct jailparam)); + va_copy(tap, ap); + jp_lastjid = jp_jid = jp_name = NULL; + lastjid_value = jid_value = name_value = NULL; + for (njp = 0; (name = va_arg(tap, char *)) != NULL; njp++) { + value = va_arg(tap, char *); + if (jailparam_init(jp + njp, name) < 0) { + va_end(tap); + goto error; + } + if (!strcmp(jp[njp].jp_name, "lastjid")) { + jp_lastjid = jp + njp; + lastjid_value = value; + } else if (!strcmp(jp[njp].jp_name, "jid")) { + jp_jid = jp + njp; + jid_value = value; + } if (!strcmp(jp[njp].jp_name, "name")) { + jp_name = jp + njp; + name_value = value; + } } - jid = jailparam_get(jp, njp, flags); - if (jid < 0) { - va_end(ap); - return (-1); + va_end(tap); + /* Import the key parameter. */ + if (jp_lastjid != NULL) { + jp_key = jp_lastjid; + key_value = lastjid_value; + } else if (jp_jid != NULL && strtol(jid_value, NULL, 10) != 0) { + jp_key = jp_jid; + key_value = jid_value; + } else if (jp_name != NULL) { + jp_key = jp_name; + key_value = name_value; + } else { + strlcpy(jail_errmsg, "no jail specified", JAIL_ERRMSGLEN); + errno = ENOENT; + goto error; } + if (jailparam_import(jp_key, key_value) < 0) + goto error; + /* Get the jail and export the parameters. */ + jid = jailparam_get(jp, njp, flags); + if (jid < 0) + goto error; for (i = 0; i < njp; i++) { (void)va_arg(ap, char *); - value = jailparam_export(jp + i); - if (value == NULL) { - va_end(ap); - return (-1); - } valarg = va_arg(ap, char *); - if (!namekey || strcmp(jp[i].jp_name, "name")) + if (jp + i != jp_key) { /* It's up to the caller to ensure there's room. */ - strcpy(valarg, value); + if ((jp[i].jp_ctltype & CTLTYPE) == CTLTYPE_STRING) + strcpy(valarg, jp[i].jp_value); + else { + value = jailparam_export(jp + i); + if (value == NULL) + goto error; + strcpy(valarg, value); + free(value); + } + } } + jailparam_free(jp, njp); va_end(ap); return (jid); + + error: + jailparam_free(jp, njp); + va_end(ap); + return (-1); } /* @@ -794,41 +845,6 @@ jailparam_free(struct jailparam *jp, uns } /* - * Create and import an array of jail parameters, given a list of name and - * value strings, terminated by a null name. - */ -static int -jailparam_vlist(struct jailparam **jpp, va_list ap) -{ - va_list tap; - struct jailparam *jp; - char *name, *value; - int njp; - - va_copy(tap, ap); - for (njp = 0; va_arg(tap, char *) != NULL; njp++) - (void)va_arg(tap, char *); - va_end(tap); - jp = calloc(njp, sizeof(struct jailparam)); - if (jp == NULL) { - strerror_r(errno, jail_errmsg, JAIL_ERRMSGLEN); - return (-1); - } - - for (njp = 0; (name = va_arg(ap, char *)) != NULL; njp++) { - value = va_arg(ap, char *); - if (jailparam_init(jp + njp, name) < 0 || - jailparam_import(jp + njp, value) < 0) { - jailparam_free(jp, njp); - free(jp); - return (-1); - } - } - *jpp = jp; - return (njp); -} - -/* * Find a parameter's type and size from its MIB. */ static int From owner-svn-src-all@FreeBSD.ORG Thu Jul 15 19:21:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7CB4106566B; Thu, 15 Jul 2010 19:21:33 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D6F938FC16; Thu, 15 Jul 2010 19:21:33 +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 o6FJLXdk077976; Thu, 15 Jul 2010 19:21:33 GMT (envelope-from jamie@svn.freebsd.org) Received: (from jamie@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6FJLX3H077974; Thu, 15 Jul 2010 19:21:33 GMT (envelope-from jamie@svn.freebsd.org) Message-Id: <201007151921.o6FJLX3H077974@svn.freebsd.org> From: Jamie Gritton Date: Thu, 15 Jul 2010 19:21:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210134 - head/lib/libjail X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 19:21:34 -0000 Author: jamie Date: Thu Jul 15 19:21:33 2010 New Revision: 210134 URL: http://svn.freebsd.org/changeset/base/210134 Log: Don't copy and return a potentially unset buffer when jail_get fails. Modified: head/lib/libjail/jail_getid.c Modified: head/lib/libjail/jail_getid.c ============================================================================== --- head/lib/libjail/jail_getid.c Thu Jul 15 19:21:07 2010 (r210133) +++ head/lib/libjail/jail_getid.c Thu Jul 15 19:21:33 2010 (r210134) @@ -94,11 +94,15 @@ jail_getname(int jid) jiov[5].iov_len = JAIL_ERRMSGLEN; jail_errmsg[0] = 0; jid = jail_get(jiov, 6, 0); - if (jid < 0 && !jail_errmsg[0]) - snprintf(jail_errmsg, JAIL_ERRMSGLEN, "jail_get: %s", - strerror(errno)); - name = strdup(namebuf); - if (name == NULL) - strerror_r(errno, jail_errmsg, JAIL_ERRMSGLEN); + if (jid < 0) { + if (!jail_errmsg[0]) + snprintf(jail_errmsg, JAIL_ERRMSGLEN, "jail_get: %s", + strerror(errno)); + return NULL; + } else { + name = strdup(namebuf); + if (name == NULL) + strerror_r(errno, jail_errmsg, JAIL_ERRMSGLEN); + } return name; } From owner-svn-src-all@FreeBSD.ORG Thu Jul 15 19:21:48 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BFA041065680; Thu, 15 Jul 2010 19:21:48 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AE65E8FC0A; Thu, 15 Jul 2010 19:21:48 +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 o6FJLmBO078076; Thu, 15 Jul 2010 19:21:48 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6FJLmRR078074; Thu, 15 Jul 2010 19:21:48 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201007151921.o6FJLmRR078074@svn.freebsd.org> From: John Baldwin Date: Thu, 15 Jul 2010 19:21:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210135 - head/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 19:21:48 -0000 Author: jhb Date: Thu Jul 15 19:21:48 2010 New Revision: 210135 URL: http://svn.freebsd.org/changeset/base/210135 Log: Merge 208603, 209946, and 209948 to the new NFS client: Move attribute cache flushes from VOP_OPEN() to VOP_LOOKUP() to provide more graceful recovery for stale filehandles and eliminate the need for conditionally clearing the attribute cache in the !NMODIFIED case in VOP_OPEN(). Reviewed by: rmacklem MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clvnops.c Modified: head/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvnops.c Thu Jul 15 19:21:33 2010 (r210134) +++ head/sys/fs/nfsclient/nfs_clvnops.c Thu Jul 15 19:21:48 2010 (r210135) @@ -505,9 +505,11 @@ nfs_open(struct vop_open_args *ap) (void) nfsrpc_close(vp, 0, ap->a_td); return (error); } + mtx_lock(&np->n_mtx); np->n_attrstamp = 0; if (vp->v_type == VDIR) np->n_direofoffset = 0; + mtx_unlock(&np->n_mtx); error = VOP_GETATTR(vp, &vattr, ap->a_cred); if (error) { if (NFS_ISV4(vp)) @@ -520,14 +522,6 @@ nfs_open(struct vop_open_args *ap) np->n_change = vattr.va_filerev; mtx_unlock(&np->n_mtx); } else { - struct thread *td = curthread; - - if (np->n_ac_ts_syscalls != td->td_syscalls || - np->n_ac_ts_tid != td->td_tid || - td->td_proc == NULL || - np->n_ac_ts_pid != td->td_proc->p_pid) { - np->n_attrstamp = 0; - } mtx_unlock(&np->n_mtx); error = VOP_GETATTR(vp, &vattr, ap->a_cred); if (error) { @@ -987,7 +981,7 @@ nfs_lookup(struct vop_lookup_args *ap) int flags = cnp->cn_flags; struct vnode *newvp; struct nfsmount *nmp; - struct nfsnode *np; + struct nfsnode *np, *newnp; int error = 0, attrflag, dattrflag, ltype; struct thread *td = cnp->cn_thread; struct nfsfh *nfhp; @@ -1023,11 +1017,27 @@ nfs_lookup(struct vop_lookup_args *ap) * change time of the file matches our cached copy. * Otherwise, we discard the cache entry and fallback * to doing a lookup RPC. + * + * To better handle stale file handles and attributes, + * clear the attribute cache of this node if it is a + * leaf component, part of an open() call, and not + * locally modified before fetching the attributes. + * This should allow stale file handles to be detected + * here where we can fall back to a LOOKUP RPC to + * recover rather than having nfs_open() detect the + * stale file handle and failing open(2) with ESTALE. */ newvp = *vpp; + newnp = VTONFS(newvp); + if ((flags & (ISLASTCN | ISOPEN)) == (ISLASTCN | ISOPEN) && + !(newnp->n_flag & NMODIFIED)) { + mtx_lock(&newnp->n_mtx); + newnp->n_attrstamp = 0; + mtx_unlock(&newnp->n_mtx); + } if (nfscl_nodeleg(newvp, 0) == 0 || - (!VOP_GETATTR(newvp, &vattr, cnp->cn_cred) - && vattr.va_ctime.tv_sec == VTONFS(newvp)->n_ctime)) { + (VOP_GETATTR(newvp, &vattr, cnp->cn_cred) == 0 && + vattr.va_ctime.tv_sec == newnp->n_ctime)) { NFSINCRGLOBAL(newnfsstats.lookupcache_hits); if (cnp->cn_nameiop != LOOKUP && (flags & ISLASTCN)) @@ -1213,6 +1223,18 @@ nfs_lookup(struct vop_lookup_args *ap) if (attrflag) (void) nfscl_loadattrcache(&newvp, &nfsva, NULL, NULL, 0, 1); + else if ((flags & (ISLASTCN | ISOPEN)) == (ISLASTCN | ISOPEN) && + !(np->n_flag & NMODIFIED)) { + /* + * Flush the attribute cache when opening a + * leaf node to ensure that fresh attributes + * are fetched in nfs_open() since we did not + * fetch attributes from the LOOKUP reply. + */ + mtx_lock(&np->n_mtx); + np->n_attrstamp = 0; + mtx_unlock(&np->n_mtx); + } } if (cnp->cn_nameiop != LOOKUP && (flags & ISLASTCN)) cnp->cn_flags |= SAVENAME; From owner-svn-src-all@FreeBSD.ORG Thu Jul 15 19:40:48 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E61031065680; Thu, 15 Jul 2010 19:40:48 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D46478FC1A; Thu, 15 Jul 2010 19:40:48 +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 o6FJemnN082326; Thu, 15 Jul 2010 19:40:48 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6FJemFP082321; Thu, 15 Jul 2010 19:40:48 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201007151940.o6FJemFP082321@svn.freebsd.org> From: John Baldwin Date: Thu, 15 Jul 2010 19:40:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210136 - in head/sys: fs/nfsclient nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 19:40:49 -0000 Author: jhb Date: Thu Jul 15 19:40:48 2010 New Revision: 210136 URL: http://svn.freebsd.org/changeset/base/210136 Log: Retire the NFS access cache timestamp structure. It was used in VOP_OPEN() to avoid sending multiple ACCESS/GETATTR RPCs during a single open() between VOP_LOOKUP() and VOP_OPEN(). Now we always send the RPC in VOP_LOOKUP() and not VOP_OPEN() in the cases that multiple RPCs could be sent. MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clport.c head/sys/fs/nfsclient/nfsnode.h head/sys/nfsclient/nfs_subs.c head/sys/nfsclient/nfsnode.h Modified: head/sys/fs/nfsclient/nfs_clport.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clport.c Thu Jul 15 19:21:48 2010 (r210135) +++ head/sys/fs/nfsclient/nfs_clport.c Thu Jul 15 19:40:48 2010 (r210136) @@ -340,7 +340,6 @@ nfscl_loadattrcache(struct vnode **vpp, struct nfsnode *np; struct nfsmount *nmp; struct timespec mtime_save; - struct thread *td = curthread; /* * If v_type == VNON it is a new node, so fill in the v_type, @@ -386,14 +385,6 @@ nfscl_loadattrcache(struct vnode **vpp, else vap->va_fsid = vp->v_mount->mnt_stat.f_fsid.val[0]; np->n_attrstamp = time_second; - /* Timestamp the NFS otw getattr fetch */ - if (td->td_proc) { - np->n_ac_ts_tid = td->td_tid; - np->n_ac_ts_pid = td->td_proc->p_pid; - np->n_ac_ts_syscalls = td->td_syscalls; - } else - bzero(&np->n_ac_ts, sizeof(struct nfs_attrcache_timestamp)); - if (vap->va_size != np->n_size) { if (vap->va_type == VREG) { if (dontshrink && vap->va_size < np->n_size) { Modified: head/sys/fs/nfsclient/nfsnode.h ============================================================================== --- head/sys/fs/nfsclient/nfsnode.h Thu Jul 15 19:21:48 2010 (r210135) +++ head/sys/fs/nfsclient/nfsnode.h Thu Jul 15 19:40:48 2010 (r210136) @@ -68,16 +68,6 @@ struct nfsdmap { #define ndm_cookies ndm_un1.ndmu3_cookies #define ndm4_cookies ndm_un1.ndmu4_cookies -#define n_ac_ts_tid n_ac_ts.nfs_ac_ts_tid -#define n_ac_ts_pid n_ac_ts.nfs_ac_ts_pid -#define n_ac_ts_syscalls n_ac_ts.nfs_ac_ts_syscalls - -struct nfs_attrcache_timestamp { - lwpid_t nfs_ac_ts_tid; - pid_t nfs_ac_ts_pid; - unsigned long nfs_ac_ts_syscalls; -}; - struct nfs_accesscache { u_int32_t mode; /* ACCESS mode cache */ uid_t uid; /* credentials having mode */ @@ -132,7 +122,6 @@ struct nfsnode { u_int32_t n_flag; /* Flag for locking.. */ int n_directio_opens; int n_directio_asyncwr; - struct nfs_attrcache_timestamp n_ac_ts; u_int64_t n_change; /* old Change attribute */ struct nfsv4node *n_v4; /* extra V4 stuff */ }; Modified: head/sys/nfsclient/nfs_subs.c ============================================================================== --- head/sys/nfsclient/nfs_subs.c Thu Jul 15 19:21:48 2010 (r210135) +++ head/sys/nfsclient/nfs_subs.c Thu Jul 15 19:40:48 2010 (r210136) @@ -470,7 +470,6 @@ nfs_loadattrcache(struct vnode **vpp, st u_short vmode; struct timespec mtime, mtime_save; int v3 = NFS_ISV3(vp); - struct thread *td = curthread; int error = 0; md = *mdp; @@ -574,14 +573,6 @@ nfs_loadattrcache(struct vnode **vpp, st vap->va_filerev = 0; } np->n_attrstamp = time_second; - /* Timestamp the NFS otw getattr fetch */ - if (td->td_proc) { - np->n_ac_ts_tid = td->td_tid; - np->n_ac_ts_pid = td->td_proc->p_pid; - np->n_ac_ts_syscalls = td->td_syscalls; - } else - bzero(&np->n_ac_ts, sizeof(struct nfs_attrcache_timestamp)); - if (vap->va_size != np->n_size) { if (vap->va_type == VREG) { if (dontshrink && vap->va_size < np->n_size) { Modified: head/sys/nfsclient/nfsnode.h ============================================================================== --- head/sys/nfsclient/nfsnode.h Thu Jul 15 19:21:48 2010 (r210135) +++ head/sys/nfsclient/nfsnode.h Thu Jul 15 19:40:48 2010 (r210136) @@ -74,16 +74,6 @@ struct nfsdmap { #define ndm_cookies ndm_un1.ndmu3_cookies #define ndm4_cookies ndm_un1.ndmu4_cookies -#define n_ac_ts_tid n_ac_ts.nfs_ac_ts_tid -#define n_ac_ts_pid n_ac_ts.nfs_ac_ts_pid -#define n_ac_ts_syscalls n_ac_ts.nfs_ac_ts_syscalls - -struct nfs_attrcache_timestamp { - lwpid_t nfs_ac_ts_tid; - pid_t nfs_ac_ts_pid; - unsigned long nfs_ac_ts_syscalls; -}; - struct nfs_accesscache { u_int32_t mode; /* ACCESS mode cache */ uid_t uid; /* credentials having mode */ @@ -140,7 +130,6 @@ struct nfsnode { uint32_t n_namelen; int n_directio_opens; int n_directio_asyncwr; - struct nfs_attrcache_timestamp n_ac_ts; }; #define n_atim n_un1.nf_atim From owner-svn-src-all@FreeBSD.ORG Thu Jul 15 19:52:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 947B91065670; Thu, 15 Jul 2010 19:52:55 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 699BD8FC0A; Thu, 15 Jul 2010 19:52:55 +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 o6FJqtjU084992; Thu, 15 Jul 2010 19:52:55 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6FJqtgH084988; Thu, 15 Jul 2010 19:52:55 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007151952.o6FJqtgH084988@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 15 Jul 2010 19:52:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210137 - head/sys/dev/acpica/Osd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 19:52:55 -0000 Author: jkim Date: Thu Jul 15 19:52:54 2010 New Revision: 210137 URL: http://svn.freebsd.org/changeset/base/210137 Log: - AcpiOsReadPciConfiguration() needs similar fixes as r209965 and r210129. According to ACPICA User Guide and Programmer Reference, the read data must be zero extended to fill the 64-bit return value even if the bit width of the location is less than 64. - Return error when 64-bit access is requested as we do not support 64-bit PCI register access (yet). XXX We may have to split it up into two 32-bit accesses if it is really required. Modified: head/sys/dev/acpica/Osd/OsdHardware.c Modified: head/sys/dev/acpica/Osd/OsdHardware.c ============================================================================== --- head/sys/dev/acpica/Osd/OsdHardware.c Thu Jul 15 19:40:48 2010 (r210136) +++ head/sys/dev/acpica/Osd/OsdHardware.c Thu Jul 15 19:52:54 2010 (r210137) @@ -79,9 +79,6 @@ AcpiOsReadPort(ACPI_IO_ADDRESS InPort, U case 32: *Value = bus_space_read_4(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, InPort); break; - default: - /* debug trap goes here */ - break; } return (AE_OK); @@ -101,9 +98,6 @@ AcpiOsWritePort(ACPI_IO_ADDRESS OutPort, case 32: bus_space_write_4(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, OutPort, Value); break; - default: - /* debug trap goes here */ - break; } return (AE_OK); @@ -113,28 +107,15 @@ ACPI_STATUS AcpiOsReadPciConfiguration(ACPI_PCI_ID *PciId, UINT32 Register, void *Value, UINT32 Width) { - u_int32_t byte_width = Width / 8; - u_int32_t val; + + if (Width == 64) + return (AE_SUPPORT); if (!pci_cfgregopen()) return (AE_NOT_EXIST); - val = pci_cfgregread(PciId->Bus, PciId->Device, PciId->Function, Register, - byte_width); - switch (Width) { - case 8: - *(u_int8_t *)Value = val & 0xff; - break; - case 16: - *(u_int16_t *)Value = val & 0xffff; - break; - case 32: - *(u_int32_t *)Value = val; - break; - default: - /* debug trap goes here */ - break; - } + *(UINT64 *)Value = pci_cfgregread(PciId->Bus, PciId->Device, + PciId->Function, Register, Width / 8); return (AE_OK); } @@ -144,13 +125,15 @@ ACPI_STATUS AcpiOsWritePciConfiguration (ACPI_PCI_ID *PciId, UINT32 Register, UINT64 Value, UINT32 Width) { - u_int32_t byte_width = Width / 8; + + if (Width == 64) + return (AE_SUPPORT); if (!pci_cfgregopen()) return (AE_NOT_EXIST); pci_cfgregwrite(PciId->Bus, PciId->Device, PciId->Function, Register, - Value, byte_width); + Value, Width / 8); return (AE_OK); } From owner-svn-src-all@FreeBSD.ORG Thu Jul 15 20:24:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 06B751065678; Thu, 15 Jul 2010 20:24:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E95FE8FC12; Thu, 15 Jul 2010 20:24:37 +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 o6FKObIv092039; Thu, 15 Jul 2010 20:24:37 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6FKObhM092035; Thu, 15 Jul 2010 20:24:37 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201007152024.o6FKObhM092035@svn.freebsd.org> From: John Baldwin Date: Thu, 15 Jul 2010 20:24:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210138 - in head/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 20:24:38 -0000 Author: jhb Date: Thu Jul 15 20:24:37 2010 New Revision: 210138 URL: http://svn.freebsd.org/changeset/base/210138 Log: Retire td_syscalls now that it is no longer needed. Modified: head/sys/kern/kern_thread.c head/sys/kern/subr_trap.c head/sys/sys/proc.h Modified: head/sys/kern/kern_thread.c ============================================================================== --- head/sys/kern/kern_thread.c Thu Jul 15 19:52:54 2010 (r210137) +++ head/sys/kern/kern_thread.c Thu Jul 15 20:24:37 2010 (r210138) @@ -96,7 +96,6 @@ thread_ctor(void *mem, int size, void *a td->td_oncpu = NOCPU; td->td_tid = alloc_unr(tid_unrhdr); - td->td_syscalls = 0; /* * Note that td_critnest begins life as 1 because the thread is not Modified: head/sys/kern/subr_trap.c ============================================================================== --- head/sys/kern/subr_trap.c Thu Jul 15 19:52:54 2010 (r210137) +++ head/sys/kern/subr_trap.c Thu Jul 15 20:24:37 2010 (r210138) @@ -261,7 +261,6 @@ syscallenter(struct thread *td, struct s PCPU_INC(cnt.v_syscall); p = td->td_proc; - td->td_syscalls++; td->td_pticks = 0; if (td->td_ucred != p->p_ucred) Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Thu Jul 15 19:52:54 2010 (r210137) +++ head/sys/sys/proc.h Thu Jul 15 20:24:37 2010 (r210138) @@ -296,7 +296,6 @@ struct thread { struct mdthread td_md; /* (k) Any machine-dependent fields. */ struct td_sched *td_sched; /* (*) Scheduler-specific data. */ struct kaudit_record *td_ar; /* (k) Active audit record, if any. */ - int td_syscalls; /* per-thread syscall count (used by NFS :)) */ struct lpohead td_lprof[2]; /* (a) lock profiling objects. */ struct kdtrace_thread *td_dtrace; /* (*) DTrace-specific data. */ int td_errno; /* Error returned by last syscall. */ From owner-svn-src-all@FreeBSD.ORG Thu Jul 15 21:56:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED34C1065670; Thu, 15 Jul 2010 21:56:45 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DC52C8FC25; Thu, 15 Jul 2010 21:56:45 +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 o6FLuj4n012663; Thu, 15 Jul 2010 21:56:45 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6FLuj9K012661; Thu, 15 Jul 2010 21:56:45 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007152156.o6FLuj9K012661@svn.freebsd.org> From: Warner Losh Date: Thu, 15 Jul 2010 21:56:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210142 - head/sys/mips/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 21:56:46 -0000 Author: imp Date: Thu Jul 15 21:56:45 2010 New Revision: 210142 URL: http://svn.freebsd.org/changeset/base/210142 Log: Better description of this file Modified: head/sys/mips/include/asmacros.h Modified: head/sys/mips/include/asmacros.h ============================================================================== --- head/sys/mips/include/asmacros.h Thu Jul 15 21:49:28 2010 (r210141) +++ head/sys/mips/include/asmacros.h Thu Jul 15 21:56:45 2010 (r210142) @@ -34,8 +34,11 @@ #include +/* + * This appears to be a verbatim copy of an old version of amd64's + * asmacros.h and has no prayer of acatually working on mips. + */ #if 0 -/* XXX too much duplication in various asm*.h's. */ /* * CNAME and HIDENAME manage the relationship between symbol names in C From owner-svn-src-all@FreeBSD.ORG Thu Jul 15 22:28:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 18BE11065675; Thu, 15 Jul 2010 22:28:20 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 067788FC0A; Thu, 15 Jul 2010 22:28:20 +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 o6FMSJBf019702; Thu, 15 Jul 2010 22:28:19 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6FMSJi3019698; Thu, 15 Jul 2010 22:28:19 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007152228.o6FMSJi3019698@svn.freebsd.org> From: Warner Losh Date: Thu, 15 Jul 2010 22:28:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210144 - head/usr.sbin/config X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 22:28:20 -0000 Author: imp Date: Thu Jul 15 22:28:19 2010 New Revision: 210144 URL: http://svn.freebsd.org/changeset/base/210144 Log: Put warnings out to stderr rather than stdout. MFC after: 3 days Modified: head/usr.sbin/config/config.y head/usr.sbin/config/mkmakefile.c head/usr.sbin/config/mkoptions.c Modified: head/usr.sbin/config/config.y ============================================================================== --- head/usr.sbin/config/config.y Thu Jul 15 22:15:44 2010 (r210143) +++ head/usr.sbin/config/config.y Thu Jul 15 22:28:19 2010 (r210144) @@ -365,7 +365,8 @@ newdev(char *name) struct device *np; if (finddev(&dtab, name)) { - printf("WARNING: duplicate device `%s' encountered.\n", name); + fprintf(stderr, + "WARNING: duplicate device `%s' encountered.\n", name); return; } @@ -425,7 +426,8 @@ newopt(struct opt_head *list, char *name op2 = findopt(list, name); if (op2 != NULL && !append) { - printf("WARNING: duplicate option `%s' encountered.\n", name); + fprintf(stderr, + "WARNING: duplicate option `%s' encountered.\n", name); return; } Modified: head/usr.sbin/config/mkmakefile.c ============================================================================== --- head/usr.sbin/config/mkmakefile.c Thu Jul 15 22:15:44 2010 (r210143) +++ head/usr.sbin/config/mkmakefile.c Thu Jul 15 22:28:19 2010 (r210144) @@ -341,7 +341,8 @@ next: if (eq(wd, "include")) { next_quoted_word(fp, wd); if (wd == 0) { - printf("%s: missing include filename.\n", fname); + fprintf(stderr, "%s: missing include filename.\n", + fname); exit(1); } (void) snprintf(ifname, sizeof(ifname), "../../%s", wd); @@ -353,8 +354,7 @@ next: this = ns(wd); next_word(fp, wd); if (wd == 0) { - printf("%s: No type for %s.\n", - fname, this); + fprintf(stderr, "%s: No type for %s.\n", fname, this); exit(1); } tp = fl_lookup(this); @@ -381,8 +381,9 @@ next: } else if (eq(wd, "mandatory")) { mandatory = 1; } else if (!eq(wd, "optional")) { - printf("%s: %s must be optional, mandatory or standard\n", - fname, this); + fprintf(stderr, + "%s: %s must be optional, mandatory or standard\n", + fname, this); exit(1); } nextparam: @@ -395,7 +396,7 @@ nextparam: } if (eq(wd, "|")) { if (nreqs == 0) { - printf("%s: syntax error describing %s\n", + fprintf(stderr, "%s: syntax error describing %s\n", fname, this); exit(1); } @@ -410,9 +411,9 @@ nextparam: } if (eq(wd, "no-implicit-rule")) { if (compilewith == 0) { - printf("%s: alternate rule required when " - "\"no-implicit-rule\" is specified.\n", - fname); + fprintf(stderr, "%s: alternate rule required when " + "\"no-implicit-rule\" is specified.\n", + fname); } imp_rule++; goto nextparam; @@ -424,8 +425,9 @@ nextparam: if (eq(wd, "dependency")) { next_quoted_word(fp, wd); if (wd == 0) { - printf("%s: %s missing compile command string.\n", - fname, this); + fprintf(stderr, + "%s: %s missing compile command string.\n", + fname, this); exit(1); } depends = ns(wd); @@ -434,8 +436,8 @@ nextparam: if (eq(wd, "clean")) { next_quoted_word(fp, wd); if (wd == 0) { - printf("%s: %s missing clean file list.\n", - fname, this); + fprintf(stderr, "%s: %s missing clean file list.\n", + fname, this); exit(1); } clean = ns(wd); @@ -444,8 +446,9 @@ nextparam: if (eq(wd, "compile-with")) { next_quoted_word(fp, wd); if (wd == 0) { - printf("%s: %s missing compile command string.\n", - fname, this); + fprintf(stderr, + "%s: %s missing compile command string.\n", + fname, this); exit(1); } compilewith = ns(wd); @@ -454,8 +457,9 @@ nextparam: if (eq(wd, "warning")) { next_quoted_word(fp, wd); if (wd == 0) { - printf("%s: %s missing warning text string.\n", - fname, this); + fprintf(stderr, + "%s: %s missing warning text string.\n", + fname, this); exit(1); } warning = ns(wd); @@ -484,13 +488,14 @@ nextparam: goto nextparam; } if (mandatory) { - printf("%s: mandatory device \"%s\" not found\n", + fprintf(stderr, "%s: mandatory device \"%s\" not found\n", fname, wd); exit(1); } if (std) { - printf("standard entry %s has a device keyword - %s!\n", - this, wd); + fprintf(stderr, + "standard entry %s has a device keyword - %s!\n", + this, wd); exit(1); } SLIST_FOREACH(op, &opt, op_next) @@ -501,13 +506,13 @@ nextparam: doneparam: if (std == 0 && nreqs == 0) { - printf("%s: what is %s optional on?\n", + fprintf(stderr, "%s: what is %s optional on?\n", fname, this); exit(1); } if (wd) { - printf("%s: syntax error describing %s\n", + fprintf(stderr, "%s: syntax error describing %s\n", fname, this); exit(1); } @@ -687,7 +692,7 @@ do_rules(FILE *f) STAILQ_FOREACH(ftp, &ftab, f_next) { if (ftp->f_warn) - printf("WARNING: %s\n", ftp->f_warn); + fprintf(stderr, "WARNING: %s\n", ftp->f_warn); cp = (np = ftp->f_fn) + strlen(ftp->f_fn) - 1; och = *cp; if (ftp->f_flags & NO_IMPLCT_RULE) { @@ -732,7 +737,8 @@ do_rules(FILE *f) ftype = "PROFILE"; break; default: - printf("config: don't know rules for %s\n", np); + fprintf(stderr, + "config: don't know rules for %s\n", np); break; } snprintf(cmd, sizeof(cmd), Modified: head/usr.sbin/config/mkoptions.c ============================================================================== --- head/usr.sbin/config/mkoptions.c Thu Jul 15 22:15:44 2010 (r210143) +++ head/usr.sbin/config/mkoptions.c Thu Jul 15 22:28:19 2010 (r210144) @@ -77,12 +77,14 @@ options(void) } if (maxusers == 0) { - /* printf("maxusers not specified; will auto-size\n"); */ + /* fprintf(stderr, "maxusers not specified; will auto-size\n"); */ } else if (maxusers < users.u_min) { - printf("minimum of %d maxusers assumed\n", users.u_min); + fprintf(stderr, "minimum of %d maxusers assumed\n", + users.u_min); maxusers = users.u_min; } else if (maxusers > users.u_max) - printf("warning: maxusers > %d (%d)\n", users.u_max, maxusers); + fprintf(stderr, "warning: maxusers > %d (%d)\n", + users.u_max, maxusers); /* Fake MAXUSERS as an option. */ op = (struct opt *)calloc(1, sizeof(*op)); @@ -112,7 +114,7 @@ options(void) SLIST_FOREACH(ol, &otab, o_next) { if (eq(op->op_name, ol->o_name) && (ol->o_flags & OL_ALIAS)) { - printf("Mapping option %s to %s.\n", + fprintf(stderr, "Mapping option %s to %s.\n", op->op_name, ol->o_file); op->op_name = ol->o_file; break; @@ -123,7 +125,7 @@ options(void) do_option(ol->o_name); SLIST_FOREACH(op, &opt, op_next) { if (!op->op_ownfile && strncmp(op->op_name, "DEV_", 4)) { - printf("%s: unknown option \"%s\"\n", + fprintf(stderr, "%s: unknown option \"%s\"\n", PREFIX, op->op_name); exit(1); } @@ -160,7 +162,7 @@ do_option(char *name) if (value == NULL) value = ns("1"); if (oldvalue != NULL && !eq(value, oldvalue)) - printf( + fprintf(stderr, "%s: option \"%s\" redefined from %s to %s\n", PREFIX, op->op_name, oldvalue, value); @@ -218,12 +220,14 @@ do_option(char *name) if (eq(inw, ol->o_name)) break; if (!eq(inw, name) && !ol) { - printf("WARNING: unknown option `%s' removed from %s\n", - inw, file); + fprintf(stderr, + "WARNING: unknown option `%s' removed from %s\n", + inw, file); tidy++; } else if (ol != NULL && !eq(basefile, ol->o_file)) { - printf("WARNING: option `%s' moved from %s to %s\n", - inw, basefile, ol->o_file); + fprintf(stderr, + "WARNING: option `%s' moved from %s to %s\n", + inw, basefile, ol->o_file); tidy++; } else { op = (struct opt *) calloc(1, sizeof *op); @@ -312,8 +316,8 @@ check_duplicate(const char *fname, const SLIST_FOREACH(po, &otab, o_next) { if (eq(po->o_name, this)) { - printf("%s: Duplicate option %s.\n", - fname, this); + fprintf(stderr, "%s: Duplicate option %s.\n", + fname, this); exit(1); } } @@ -347,7 +351,8 @@ update_option(const char *this, char *va return; } } - printf("Compat option %s not listed in options file.\n", this); + fprintf(stderr, "Compat option %s not listed in options file.\n", + this); exit(1); } @@ -375,8 +380,8 @@ read_option_file(const char *fname, int return (1); if (val == 0) { if (flags) { - printf("%s: compat file requires two words " - "per line at %s\n", fname, this); + fprintf(stderr, "%s: compat file requires two" + " words per line at %s\n", fname, this); exit(1); } char *s = ns(this); From owner-svn-src-all@FreeBSD.ORG Thu Jul 15 22:34:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8DB81065674; Thu, 15 Jul 2010 22:34:30 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9DA498FC17; Thu, 15 Jul 2010 22:34:30 +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 o6FMYUBH021109; Thu, 15 Jul 2010 22:34:30 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6FMYUwV021107; Thu, 15 Jul 2010 22:34:30 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007152234.o6FMYUwV021107@svn.freebsd.org> From: Warner Losh Date: Thu, 15 Jul 2010 22:34:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210145 - stable/8/usr.sbin/config X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 22:34:30 -0000 Author: imp Date: Thu Jul 15 22:34:30 2010 New Revision: 210145 URL: http://svn.freebsd.org/changeset/base/210145 Log: MFC: r209135 r209135 | imp | 2010-06-13 10:54:11 -0600 (Sun, 13 Jun 2010) | 9 lines style(9) fixes: o make cmd scoped to the whole do_rules function, since it really is scoped to the whole fucnion. Making it static was the wrong way to fix referencing it outside of the block in which it was declared (and conforms to the style of the rest of the file). o remove a couple of meaningless blank lines o properly wrap one line. Modified: stable/8/usr.sbin/config/mkmakefile.c Directory Properties: stable/8/usr.sbin/config/ (props changed) Modified: stable/8/usr.sbin/config/mkmakefile.c ============================================================================== --- stable/8/usr.sbin/config/mkmakefile.c Thu Jul 15 22:28:19 2010 (r210144) +++ stable/8/usr.sbin/config/mkmakefile.c Thu Jul 15 22:34:30 2010 (r210145) @@ -683,6 +683,7 @@ do_rules(FILE *f) char *cp, *np, och; struct file_list *ftp; char *compilewith; + char cmd[128]; STAILQ_FOREACH(ftp, &ftab, f_next) { if (ftp->f_warn) @@ -720,25 +721,24 @@ do_rules(FILE *f) compilewith = ftp->f_compilewith; if (compilewith == 0) { const char *ftype = NULL; - static char cmd[128]; switch (ftp->f_type) { - case NORMAL: ftype = "NORMAL"; break; - case PROFILING: if (!profiling) continue; ftype = "PROFILE"; break; - default: printf("config: don't know rules for %s\n", np); break; } - snprintf(cmd, sizeof(cmd), "${%s_%c%s}\n.if defined(NORMAL_CTFCONVERT) && !empty(NORMAL_CTFCONVERT)\n\t${NORMAL_CTFCONVERT}\n.endif", ftype, + snprintf(cmd, sizeof(cmd), + "${%s_%c%s}\n.if defined(NORMAL_CTFCONVERT) && " + "!empty(NORMAL_CTFCONVERT)\n" + "\t${NORMAL_CTFCONVERT}\n.endif", ftype, toupper(och), ftp->f_flags & NOWERROR ? "_NOWERROR" : ""); compilewith = cmd; From owner-svn-src-all@FreeBSD.ORG Thu Jul 15 22:35:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3CEAC1065672; Thu, 15 Jul 2010 22:35:51 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2AE578FC08; Thu, 15 Jul 2010 22:35: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 o6FMZpHL021460; Thu, 15 Jul 2010 22:35:51 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6FMZp6O021455; Thu, 15 Jul 2010 22:35:51 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007152235.o6FMZp6O021455@svn.freebsd.org> From: Warner Losh Date: Thu, 15 Jul 2010 22:35:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210146 - stable/8/usr.sbin/config X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 22:35:51 -0000 Author: imp Date: Thu Jul 15 22:35:50 2010 New Revision: 210146 URL: http://svn.freebsd.org/changeset/base/210146 Log: MFC: r209969 r209969 | nwhitehorn | 2010-07-12 22:08:08 -0600 (Mon, 12 Jul 2010) | 13 lines Enhance config to handle MACHINEs with multiple architectures: - Passing -m to config will now print the MACHINE and MACHINE_ARCH given in the passed kernel configuration file and then exit. - If an option is defined in options.MACHINE with the same name as the architecture of the kernel being configured, that option will be considered set. This allows conditional compilation based on CPU architecture. Config version is now 600010. Reviewed by: imp Modified: stable/8/usr.sbin/config/config.8 stable/8/usr.sbin/config/configvers.h stable/8/usr.sbin/config/main.c stable/8/usr.sbin/config/mkoptions.c Directory Properties: stable/8/usr.sbin/config/ (props changed) Modified: stable/8/usr.sbin/config/config.8 ============================================================================== --- stable/8/usr.sbin/config/config.8 Thu Jul 15 22:34:30 2010 (r210145) +++ stable/8/usr.sbin/config/config.8 Thu Jul 15 22:35:50 2010 (r210146) @@ -78,6 +78,9 @@ Note that does not append .Ar SYSTEM_NAME to the directory given. +.It Fl m +Print the MACHINE and MACHINE_ARCH values for this +kernel and exit. .It Fl g Configure a system for debugging. .It Fl x Ar kernel Modified: stable/8/usr.sbin/config/configvers.h ============================================================================== --- stable/8/usr.sbin/config/configvers.h Thu Jul 15 22:34:30 2010 (r210145) +++ stable/8/usr.sbin/config/configvers.h Thu Jul 15 22:35:50 2010 (r210146) @@ -49,5 +49,5 @@ * * $FreeBSD$ */ -#define CONFIGVERS 600009 +#define CONFIGVERS 600010 #define MAJOR_VERS(x) ((x) / 100000) Modified: stable/8/usr.sbin/config/main.c ============================================================================== --- stable/8/usr.sbin/config/main.c Thu Jul 15 22:34:30 2010 (r210145) +++ stable/8/usr.sbin/config/main.c Thu Jul 15 22:35:50 2010 (r210146) @@ -110,13 +110,18 @@ main(int argc, char **argv) char *p; char xxx[MAXPATHLEN]; char *kernfile; + int printmachine; + printmachine = 0; kernfile = NULL; - while ((ch = getopt(argc, argv, "Cd:gpVx:")) != -1) + while ((ch = getopt(argc, argv, "Cd:gmpVx:")) != -1) switch (ch) { case 'C': filebased = 1; break; + case 'm': + printmachine = 1; + break; case 'd': if (*destdir == '\0') strlcpy(destdir, optarg, sizeof(destdir)); @@ -171,13 +176,6 @@ main(int argc, char **argv) strlcat(destdir, PREFIX, sizeof(destdir)); } - p = path((char *)NULL); - if (stat(p, &buf)) { - if (mkdir(p, 0777)) - err(2, "%s", p); - } else if (!S_ISDIR(buf.st_mode)) - errx(EXIT_FAILURE, "%s isn't a directory", p); - SLIST_INIT(&cputype); SLIST_INIT(&mkopt); SLIST_INIT(&opt); @@ -207,6 +205,19 @@ main(int argc, char **argv) } checkversion(); + if (printmachine) { + printf("%s\t%s\n",machinename,machinearch); + exit(0); + } + + /* Make compile directory */ + p = path((char *)NULL); + if (stat(p, &buf)) { + if (mkdir(p, 0777)) + err(2, "%s", p); + } else if (!S_ISDIR(buf.st_mode)) + errx(EXIT_FAILURE, "%s isn't a directory", p); + /* * make symbolic links in compilation directory * for "sys" (to make genassym.c work along with #include ) @@ -280,7 +291,7 @@ static void usage(void) { - fprintf(stderr, "usage: config [-CgpV] [-d destdir] sysname\n"); + fprintf(stderr, "usage: config [-CgmpV] [-d destdir] sysname\n"); fprintf(stderr, " config -x kernel\n"); exit(EX_USAGE); } Modified: stable/8/usr.sbin/config/mkoptions.c ============================================================================== --- stable/8/usr.sbin/config/mkoptions.c Thu Jul 15 22:34:30 2010 (r210145) +++ stable/8/usr.sbin/config/mkoptions.c Thu Jul 15 22:35:50 2010 (r210146) @@ -94,6 +94,20 @@ options(void) SLIST_INSERT_HEAD(&opt, op, op_next); read_options(); + + /* Fake the value of MACHINE_ARCH as an option if necessary */ + SLIST_FOREACH(ol, &otab, o_next) { + if (strcasecmp(ol->o_name, machinearch) != 0) + continue; + + op = (struct opt *)calloc(1, sizeof(*op)); + if (op == NULL) + err(EXIT_FAILURE, "calloc"); + op->op_name = ns(ol->o_name); + SLIST_INSERT_HEAD(&opt, op, op_next); + break; + } + SLIST_FOREACH(op, &opt, op_next) { SLIST_FOREACH(ol, &otab, o_next) { if (eq(op->op_name, ol->o_name) && From owner-svn-src-all@FreeBSD.ORG Thu Jul 15 22:52:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A32A106566C; Thu, 15 Jul 2010 22:52:36 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5F2618FC1A; Thu, 15 Jul 2010 22:52: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 o6FMqaoU025296; Thu, 15 Jul 2010 22:52:36 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6FMqaCQ025295; Thu, 15 Jul 2010 22:52:36 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007152252.o6FMqaCQ025295@svn.freebsd.org> From: Warner Losh Date: Thu, 15 Jul 2010 22:52:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210147 - stable/8/usr.sbin/config X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 22:52:36 -0000 Author: imp Date: Thu Jul 15 22:52:36 2010 New Revision: 210147 URL: http://svn.freebsd.org/changeset/base/210147 Log: MFC r201227: record the fact Modified: Directory Properties: stable/8/usr.sbin/config/ (props changed) From owner-svn-src-all@FreeBSD.ORG Thu Jul 15 23:07:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E8923106566C; Thu, 15 Jul 2010 23:07:02 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D5B978FC0C; Thu, 15 Jul 2010 23:07: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 o6FN72wU028689; Thu, 15 Jul 2010 23:07:02 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6FN72fe028680; Thu, 15 Jul 2010 23:07:02 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007152307.o6FN72fe028680@svn.freebsd.org> From: Warner Losh Date: Thu, 15 Jul 2010 23:07:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210148 - stable/7/usr.sbin/config X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 23:07:03 -0000 Author: imp Date: Thu Jul 15 23:07:02 2010 New Revision: 210148 URL: http://svn.freebsd.org/changeset/base/210148 Log: MFC: r188277, r188280, r201227, r205880, r206664, r206915, r207260, r207263, r207265, r209135, r209969 (I'm not repeating all that here, see the logs for all the details): Config version is now 600010 option alias support makefile parsing fixes calloc failure coping WARNS=6 comment placement correction alpha vestige removal This should allow building of -current kernels and modules on 7-stable machines (although not officially supported, enough people do it to make some efforts to make it work a big win). imp, ed, wkoszek, ru, gcooper, and nwhitehorn authored the original revs Modified: stable/7/usr.sbin/config/config.8 stable/7/usr.sbin/config/config.h stable/7/usr.sbin/config/config.y stable/7/usr.sbin/config/configvers.h stable/7/usr.sbin/config/lang.l stable/7/usr.sbin/config/main.c stable/7/usr.sbin/config/mkmakefile.c stable/7/usr.sbin/config/mkoptions.c Directory Properties: stable/7/usr.sbin/config/ (props changed) Modified: stable/7/usr.sbin/config/config.8 ============================================================================== --- stable/7/usr.sbin/config/config.8 Thu Jul 15 22:52:36 2010 (r210147) +++ stable/7/usr.sbin/config/config.8 Thu Jul 15 23:07:02 2010 (r210148) @@ -92,6 +92,9 @@ Note that does not append .Ar SYSTEM_NAME to the directory given. +.It Fl m +Print the MACHINE and MACHINE_ARCH values for this +kernel and exit. .It Fl g Configure a system for debugging. .It Fl x Ar kernel Modified: stable/7/usr.sbin/config/config.h ============================================================================== --- stable/7/usr.sbin/config/config.h Thu Jul 15 22:52:36 2010 (r210147) +++ stable/7/usr.sbin/config/config.h Thu Jul 15 23:07:02 2010 (r210148) @@ -129,6 +129,8 @@ SLIST_HEAD(opt_head, opt) opt, mkopt, rm struct opt_list { char *o_name; char *o_file; + int o_flags; +#define OL_ALIAS 1 SLIST_ENTRY(opt_list) o_next; }; @@ -177,6 +179,7 @@ void makehints(void); void headers(void); void cfgfile_add(const char *); void cfgfile_removeall(void); +FILE *open_makefile_template(void); extern STAILQ_HEAD(device_head, device) dtab; Modified: stable/7/usr.sbin/config/config.y ============================================================================== --- stable/7/usr.sbin/config/config.y Thu Jul 15 22:52:36 2010 (r210147) +++ stable/7/usr.sbin/config/config.y Thu Jul 15 23:07:02 2010 (r210148) @@ -166,6 +166,8 @@ Config_spec: = { struct cputype *cp = (struct cputype *)calloc(1, sizeof (struct cputype)); + if (cp == NULL) + err(EXIT_FAILURE, "calloc"); cp->cpu_name = $2; SLIST_INSERT_HEAD(&cputype, cp, cpu_next); } | @@ -205,6 +207,8 @@ Config_spec: struct hint *hint; hint = (struct hint *)calloc(1, sizeof (struct hint)); + if (hint == NULL) + err(EXIT_FAILURE, "calloc"); hint->hint_name = $2; STAILQ_INSERT_TAIL(&hints, hint, hint_next); hintmode = 1; @@ -350,6 +354,8 @@ newfile(char *name) struct files_name *nl; nl = (struct files_name *) calloc(1, sizeof *nl); + if (nl == NULL) + err(EXIT_FAILURE, "calloc"); nl->f_name = name; STAILQ_INSERT_TAIL(&fntab, nl, f_next); } @@ -383,6 +389,8 @@ newdev(char *name) } np = (struct device *) calloc(1, sizeof *np); + if (np == NULL) + err(EXIT_FAILURE, "calloc"); np->d_name = name; STAILQ_INSERT_TAIL(&dtab, np, d_next); } @@ -441,6 +449,8 @@ newopt(struct opt_head *list, char *name } op = (struct opt *)calloc(1, sizeof (struct opt)); + if (op == NULL) + err(EXIT_FAILURE, "calloc"); op->op_name = name; op->op_ownfile = 0; op->op_value = value; Modified: stable/7/usr.sbin/config/configvers.h ============================================================================== --- stable/7/usr.sbin/config/configvers.h Thu Jul 15 22:52:36 2010 (r210147) +++ stable/7/usr.sbin/config/configvers.h Thu Jul 15 23:07:02 2010 (r210148) @@ -49,5 +49,5 @@ * * $FreeBSD$ */ -#define CONFIGVERS 600007 +#define CONFIGVERS 600010 #define MAJOR_VERS(x) ((x) / 100000) Modified: stable/7/usr.sbin/config/lang.l ============================================================================== --- stable/7/usr.sbin/config/lang.l Thu Jul 15 22:52:36 2010 (r210147) +++ stable/7/usr.sbin/config/lang.l Thu Jul 15 23:07:02 2010 (r210148) @@ -33,6 +33,7 @@ #include #include +#include #include #include "y.tab.h" #include "config.h" @@ -220,6 +221,8 @@ cfgfile_add(const char *fname) struct cfgfile *cf; cf = calloc(1, sizeof(*cf)); + if (cf == NULL) + err(EXIT_FAILURE, "calloc"); assert(cf != NULL); asprintf(&cf->cfg_path, "%s", fname); STAILQ_INSERT_TAIL(&cfgfiles, cf, cfg_next); @@ -285,7 +288,7 @@ include(const char *fname, int ateof) * Terminate the most recent inclusion. */ static int -endinclude() +endinclude(void) { struct incl *in; int ateof; Modified: stable/7/usr.sbin/config/main.c ============================================================================== --- stable/7/usr.sbin/config/main.c Thu Jul 15 22:52:36 2010 (r210147) +++ stable/7/usr.sbin/config/main.c Thu Jul 15 23:07:02 2010 (r210148) @@ -90,6 +90,7 @@ static void get_srcdir(void); static void usage(void); static void cleanheaders(char *); static void kernconfdump(const char *); +static void checkversion(void); struct hdr_list { char *h_name; @@ -109,18 +110,23 @@ main(int argc, char **argv) char *p; char xxx[MAXPATHLEN]; char *kernfile; + int printmachine; + printmachine = 0; kernfile = NULL; - while ((ch = getopt(argc, argv, "Cd:gpVx:")) != -1) + while ((ch = getopt(argc, argv, "Cd:gmpVx:")) != -1) switch (ch) { case 'C': filebased = 1; break; + case 'm': + printmachine = 1; + break; case 'd': if (*destdir == '\0') strlcpy(destdir, optarg, sizeof(destdir)); else - errx(2, "directory already set"); + errx(EXIT_FAILURE, "directory already set"); break; case 'g': debugging++; @@ -168,13 +174,6 @@ main(int argc, char **argv) strlcat(destdir, PREFIX, sizeof(destdir)); } - p = path((char *)NULL); - if (stat(p, &buf)) { - if (mkdir(p, 0777)) - err(2, "%s", p); - } else if (!S_ISDIR(buf.st_mode)) - errx(2, "%s isn't a directory", p); - SLIST_INIT(&cputype); SLIST_INIT(&mkopt); SLIST_INIT(&opt); @@ -202,6 +201,20 @@ main(int argc, char **argv) printf("cpu type must be specified\n"); exit(1); } + checkversion(); + + if (printmachine) { + printf("%s\t%s\n",machinename,machinearch); + exit(0); + } + + /* Make compile directory */ + p = path((char *)NULL); + if (stat(p, &buf)) { + if (mkdir(p, 0777)) + err(2, "%s", p); + } else if (!S_ISDIR(buf.st_mode)) + errx(EXIT_FAILURE, "%s isn't a directory", p); /* * make symbolic links in compilation directory @@ -254,7 +267,7 @@ get_srcdir(void) int i; if (realpath("../..", srcdir) == NULL) - errx(2, "Unable to find root of source tree"); + err(EXIT_FAILURE, "Unable to find root of source tree"); if ((pwd = getenv("PWD")) != NULL && *pwd == '/' && (pwd = strdup(pwd)) != NULL) { /* Remove the last two path components. */ @@ -276,7 +289,7 @@ static void usage(void) { - fprintf(stderr, "usage: config [-CgpV] [-d destdir] sysname\n"); + fprintf(stderr, "usage: config [-CgmpV] [-d destdir] sysname\n"); fprintf(stderr, " config -x kernel\n"); exit(EX_USAGE); } @@ -464,6 +477,11 @@ configfile_filebased(struct sbuf *sb) struct cfgfile *cf; int i; + /* + * Try to read all configuration files. Since those will be present as + * C string in the macro, we have to slash their ends then the line + * wraps. + */ STAILQ_FOREACH(cf, &cfgfiles, cfg_next) { cff = fopen(cf->cfg_path, "r"); if (cff == NULL) { @@ -498,11 +516,6 @@ configfile(void) sb = sbuf_new(NULL, NULL, 2048, SBUF_AUTOEXTEND); assert(sb != NULL); sbuf_clear(sb); - /* - * Try to read all configuration files. Since those will be present as - * C string in the macro, we have to slash their ends then the line - * wraps. - */ if (filebased) { /* Is needed, can be used for backward compatibility. */ configfile_filebased(sb); @@ -511,7 +524,7 @@ configfile(void) } sbuf_finish(sb); /* - * We print first part of the tamplate, replace our tag with + * We print first part of the template, replace our tag with * configuration files content and later continue writing our * template. */ @@ -563,9 +576,6 @@ moveifchanged(const char *from_name, con if (!changed) { p = mmap(NULL, tsize, PROT_READ, MAP_SHARED, from_fd, (off_t)0); -#ifndef MAP_FAILED -#define MAP_FAILED ((caddr_t) -1) -#endif if (p == MAP_FAILED) err(EX_OSERR, "mmap %s", from_name); q = mmap(NULL, tsize, PROT_READ, MAP_SHARED, to_fd, (off_t)0); @@ -651,6 +661,8 @@ remember(const char *file) } } hl = calloc(1, sizeof(*hl)); + if (hl == NULL) + err(EXIT_FAILURE, "calloc"); hl->h_name = s; hl->h_next = htab; htab = hl; @@ -672,19 +684,19 @@ kernconfdump(const char *file) r = open(file, O_RDONLY); if (r == -1) - errx(EXIT_FAILURE, "Couldn't open file '%s'", file); + err(EXIT_FAILURE, "Couldn't open file '%s'", file); error = fstat(r, &st); if (error == -1) - errx(EXIT_FAILURE, "fstat() failed"); + err(EXIT_FAILURE, "fstat() failed"); if (S_ISDIR(st.st_mode)) errx(EXIT_FAILURE, "'%s' is a directory", file); fp = fdopen(r, "r"); if (fp == NULL) - errx(EXIT_FAILURE, "fdopen() failed"); + err(EXIT_FAILURE, "fdopen() failed"); osz = 1024; o = calloc(1, osz); if (o == NULL) - errx(EXIT_FAILURE, "Couldn't allocate memory"); + err(EXIT_FAILURE, "Couldn't allocate memory"); /* ELF note section header. */ asprintf(&cmd, "/usr/bin/elfdump -c %s | grep -A 8 kern_conf" "| tail -5 | cut -d ' ' -f 2 | paste - - - - -", file); @@ -704,7 +716,7 @@ kernconfdump(const char *file) "INCLUDE_CONFIG_FILE", file); r = fseek(fp, off, SEEK_CUR); if (r != 0) - errx(EXIT_FAILURE, "fseek() failed"); + err(EXIT_FAILURE, "fseek() failed"); for (i = 0; i < size; i++) { r = fgetc(fp); if (r == EOF) @@ -724,3 +736,41 @@ kernconfdump(const char *file) } fclose(fp); } + +static void +badversion(int versreq) +{ + fprintf(stderr, "ERROR: version of config(8) does not match kernel!\n"); + fprintf(stderr, "config version = %d, ", CONFIGVERS); + fprintf(stderr, "version required = %d\n\n", versreq); + fprintf(stderr, "Make sure that /usr/src/usr.sbin/config is in sync\n"); + fprintf(stderr, "with your /usr/src/sys and install a new config binary\n"); + fprintf(stderr, "before trying this again.\n\n"); + fprintf(stderr, "If running the new config fails check your config\n"); + fprintf(stderr, "file against the GENERIC or LINT config files for\n"); + fprintf(stderr, "changes in config syntax, or option/device naming\n"); + fprintf(stderr, "conventions\n\n"); + exit(1); +} + +static void +checkversion(void) +{ + FILE *ifp; + char line[BUFSIZ]; + int versreq; + + ifp = open_makefile_template(); + while (fgets(line, BUFSIZ, ifp) != 0) { + if (*line != '%') + continue; + if (strncmp(line, "%VERSREQ=", 9) != 0) + continue; + versreq = atoi(line + 9); + if (MAJOR_VERS(versreq) == MAJOR_VERS(CONFIGVERS) && + versreq <= CONFIGVERS) + continue; + badversion(versreq); + } + fclose(ifp); +} Modified: stable/7/usr.sbin/config/mkmakefile.c ============================================================================== --- stable/7/usr.sbin/config/mkmakefile.c Thu Jul 15 22:52:36 2010 (r210147) +++ stable/7/usr.sbin/config/mkmakefile.c Thu Jul 15 23:07:02 2010 (r210148) @@ -98,22 +98,21 @@ new_fent(void) struct file_list *fp; fp = (struct file_list *) calloc(1, sizeof *fp); + if (fp == NULL) + err(EXIT_FAILURE, "calloc"); STAILQ_INSERT_TAIL(&ftab, fp, f_next); return (fp); } /* - * Build the makefile from the skeleton + * Open the correct Makefile and return it, or error out. */ -void -makefile(void) +FILE * +open_makefile_template(void) { - FILE *ifp, *ofp; + FILE *ifp; char line[BUFSIZ]; - struct opt *op, *t; - int versreq; - read_files(); snprintf(line, sizeof(line), "../../conf/Makefile.%s", machinename); ifp = fopen(line, "r"); if (ifp == 0) { @@ -122,7 +121,21 @@ makefile(void) } if (ifp == 0) err(1, "%s", line); + return (ifp); +} + +/* + * Build the makefile from the skeleton + */ +void +makefile(void) +{ + FILE *ifp, *ofp; + char line[BUFSIZ]; + struct opt *op, *t; + read_files(); + ifp = open_makefile_template(); ofp = fopen(path("Makefile.new"), "w"); if (ofp == 0) err(1, "%s", path("Makefile.new")); @@ -154,23 +167,9 @@ makefile(void) do_rules(ofp); else if (eq(line, "%CLEAN\n")) do_clean(ofp); - else if (strncmp(line, "%VERSREQ=", sizeof("%VERSREQ=") - 1) == 0) { - versreq = atoi(line + sizeof("%VERSREQ=") - 1); - if (MAJOR_VERS(versreq) != MAJOR_VERS(CONFIGVERS) || - versreq > CONFIGVERS) { - fprintf(stderr, "ERROR: version of config(8) does not match kernel!\n"); - fprintf(stderr, "config version = %d, ", CONFIGVERS); - fprintf(stderr, "version required = %d\n\n", versreq); - fprintf(stderr, "Make sure that /usr/src/usr.sbin/config is in sync\n"); - fprintf(stderr, "with your /usr/src/sys and install a new config binary\n"); - fprintf(stderr, "before trying this again.\n\n"); - fprintf(stderr, "If running the new config fails check your config\n"); - fprintf(stderr, "file against the GENERIC or LINT config files for\n"); - fprintf(stderr, "changes in config syntax, or option/device naming\n"); - fprintf(stderr, "conventions\n\n"); - exit(1); - } - } else + else if (strncmp(line, "%VERSREQ=", 9) == 0) + line[0] = '\0'; /* handled elsewhere */ + else fprintf(stderr, "Unknown %% construct in generic makefile: %s", line); @@ -684,6 +683,7 @@ do_rules(FILE *f) char *cp, *np, och; struct file_list *ftp; char *compilewith; + char cmd[128]; STAILQ_FOREACH(ftp, &ftab, f_next) { if (ftp->f_warn) @@ -721,26 +721,23 @@ do_rules(FILE *f) compilewith = ftp->f_compilewith; if (compilewith == 0) { const char *ftype = NULL; - static char cmd[128]; switch (ftp->f_type) { - case NORMAL: ftype = "NORMAL"; break; - case PROFILING: if (!profiling) continue; ftype = "PROFILE"; break; - default: printf("config: don't know rules for %s\n", np); break; } snprintf(cmd, sizeof(cmd), "${%s_%c%s}\n" - ".if defined(NORMAL_CTFCONVERT) && !empty(NORMAL_CTFCONVERT)\n" + ".if defined(NORMAL_CTFCONVERT) && " + "!empty(NORMAL_CTFCONVERT)\n" "\t${NORMAL_CTFCONVERT}\n.endif", ftype, toupper(och), ftp->f_flags & NOWERROR ? "_NOWERROR" : ""); Modified: stable/7/usr.sbin/config/mkoptions.c ============================================================================== --- stable/7/usr.sbin/config/mkoptions.c Thu Jul 15 22:52:36 2010 (r210147) +++ stable/7/usr.sbin/config/mkoptions.c Thu Jul 15 23:07:02 2010 (r210148) @@ -70,6 +70,8 @@ options(void) /* Fake the cpu types as options. */ SLIST_FOREACH(cp, &cputype, cpu_next) { op = (struct opt *)calloc(1, sizeof(*op)); + if (op == NULL) + err(EXIT_FAILURE, "calloc"); op->op_name = ns(cp->cpu_name); SLIST_INSERT_HEAD(&opt, op, op_next); } @@ -84,12 +86,39 @@ options(void) /* Fake MAXUSERS as an option. */ op = (struct opt *)calloc(1, sizeof(*op)); + if (op == NULL) + err(EXIT_FAILURE, "calloc"); op->op_name = ns("MAXUSERS"); snprintf(buf, sizeof(buf), "%d", maxusers); op->op_value = ns(buf); SLIST_INSERT_HEAD(&opt, op, op_next); read_options(); + + /* Fake the value of MACHINE_ARCH as an option if necessary */ + SLIST_FOREACH(ol, &otab, o_next) { + if (strcasecmp(ol->o_name, machinearch) != 0) + continue; + + op = (struct opt *)calloc(1, sizeof(*op)); + if (op == NULL) + err(EXIT_FAILURE, "calloc"); + op->op_name = ns(ol->o_name); + SLIST_INSERT_HEAD(&opt, op, op_next); + break; + } + + SLIST_FOREACH(op, &opt, op_next) { + SLIST_FOREACH(ol, &otab, o_next) { + if (eq(op->op_name, ol->o_name) && + (ol->o_flags & OL_ALIAS)) { + printf("Mapping option %s to %s.\n", + op->op_name, ol->o_file); + op->op_name = ol->o_file; + break; + } + } + } SLIST_FOREACH(ol, &otab, o_next) do_option(ol->o_name); SLIST_FOREACH(op, &opt, op_next) { @@ -120,7 +149,6 @@ do_option(char *name) int tidy; file = tooption(name); - /* * Check to see if the option was specified.. */ @@ -152,7 +180,7 @@ do_option(char *name) fprintf(outf, "#define %s %s\n", name, value); } /* else empty file */ - (void) fclose(outf); + (void)fclose(outf); return; } basefile = ""; @@ -199,6 +227,8 @@ do_option(char *name) tidy++; } else { op = (struct opt *) calloc(1, sizeof *op); + if (op == NULL) + err(EXIT_FAILURE, "calloc"); op->op_name = inw; op->op_value = invalue; SLIST_INSERT_HEAD(&op_head, op, op_next); @@ -209,7 +239,7 @@ do_option(char *name) if (cp == (char *)EOF) break; } - (void) fclose(inf); + (void)fclose(inf); if (!tidy && ((value == NULL && oldvalue == NULL) || (value && oldvalue && eq(value, oldvalue)))) { while (!SLIST_EMPTY(&op_head)) { @@ -225,6 +255,8 @@ do_option(char *name) if (value && !seen) { /* New option appears */ op = (struct opt *) calloc(1, sizeof *op); + if (op == NULL) + err(EXIT_FAILURE, "calloc"); op->op_name = ns(name); op->op_value = value ? ns(value) : NULL; SLIST_INSERT_HEAD(&op_head, op, op_next); @@ -245,7 +277,7 @@ do_option(char *name) free(op->op_value); free(op); } - (void) fclose(outf); + (void)fclose(outf); } /* @@ -259,7 +291,7 @@ tooption(char *name) struct opt_list *po; /* "cannot happen"? the otab list should be complete.. */ - (void) strlcpy(nbuf, "options.h", sizeof(nbuf)); + (void)strlcpy(nbuf, "options.h", sizeof(nbuf)); SLIST_FOREACH(po, &otab, o_next) { if (eq(po->o_name, name)) { @@ -268,64 +300,15 @@ tooption(char *name) } } - (void) strlcpy(hbuf, path(nbuf), sizeof(hbuf)); + (void)strlcpy(hbuf, path(nbuf), sizeof(hbuf)); return (hbuf); } -/* - * read the options and options. files - */ + static void -read_options(void) +check_duplicate(const char *fname, const char *this) { - FILE *fp; - char fname[MAXPATHLEN]; - char *wd, *this, *val; struct opt_list *po; - int first = 1; - char genopt[MAXPATHLEN]; - - SLIST_INIT(&otab); - (void) snprintf(fname, sizeof(fname), "../../conf/options"); -openit: - fp = fopen(fname, "r"); - if (fp == 0) { - return; - } -next: - wd = get_word(fp); - if (wd == (char *)EOF) { - (void) fclose(fp); - if (first == 1) { - first++; - (void) snprintf(fname, sizeof fname, "../../conf/options.%s", machinename); - fp = fopen(fname, "r"); - if (fp != 0) - goto next; - (void) snprintf(fname, sizeof fname, "options.%s", machinename); - goto openit; - } - return; - } - if (wd == 0) - goto next; - if (wd[0] == '#') - { - while (((wd = get_word(fp)) != (char *)EOF) && wd) - ; - goto next; - } - this = ns(wd); - val = get_word(fp); - if (val == (char *)EOF) - return; - if (val == 0) { - char *s = ns(this); - (void) snprintf(genopt, sizeof(genopt), "opt_%s.h", lower(s)); - val = genopt; - free(s); - } - val = ns(val); SLIST_FOREACH(po, &otab, o_next) { if (eq(po->o_name, this)) { @@ -334,13 +317,101 @@ next: exit(1); } } - +} + +static void +insert_option(const char *fname, char *this, char *val) +{ + struct opt_list *po; + + check_duplicate(fname, this); po = (struct opt_list *) calloc(1, sizeof *po); + if (po == NULL) + err(EXIT_FAILURE, "calloc"); po->o_name = this; po->o_file = val; + po->o_flags = 0; SLIST_INSERT_HEAD(&otab, po, o_next); +} + +static void +update_option(const char *this, char *val, int flags) +{ + struct opt_list *po; + + SLIST_FOREACH(po, &otab, o_next) { + if (eq(po->o_name, this)) { + free(po->o_file); + po->o_file = val; + po->o_flags = flags; + return; + } + } + printf("Compat option %s not listed in options file.\n", this); + exit(1); +} + +static int +read_option_file(const char *fname, int flags) +{ + FILE *fp; + char *wd, *this, *val; + char genopt[MAXPATHLEN]; - goto next; + fp = fopen(fname, "r"); + if (fp == 0) + return (0); + while ((wd = get_word(fp)) != (char *)EOF) { + if (wd == 0) + continue; + if (wd[0] == '#') { + while (((wd = get_word(fp)) != (char *)EOF) && wd) + continue; + continue; + } + this = ns(wd); + val = get_word(fp); + if (val == (char *)EOF) + return (1); + if (val == 0) { + if (flags) { + printf("%s: compat file requires two words " + "per line at %s\n", fname, this); + exit(1); + } + char *s = ns(this); + (void)snprintf(genopt, sizeof(genopt), "opt_%s.h", + lower(s)); + val = genopt; + free(s); + } + val = ns(val); + if (flags == 0) + insert_option(fname, this, val); + else + update_option(this, val, flags); + } + (void)fclose(fp); + return (1); +} + +/* + * read the options and options. files + */ +static void +read_options(void) +{ + char fname[MAXPATHLEN]; + + SLIST_INIT(&otab); + read_option_file("../../conf/options", 0); + (void)snprintf(fname, sizeof fname, "../../conf/options.%s", + machinename); + if (!read_option_file(fname, 0)) { + (void)snprintf(fname, sizeof fname, "options.%s", machinename); + read_option_file(fname, 0); + } + read_option_file("../../conf/options-compat", OL_ALIAS); } static char * From owner-svn-src-all@FreeBSD.ORG Thu Jul 15 23:11:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C1FC106566B; Thu, 15 Jul 2010 23:11:51 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6BEFE8FC12; Thu, 15 Jul 2010 23:11: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 o6FNBpIG029805; Thu, 15 Jul 2010 23:11:51 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6FNBplY029803; Thu, 15 Jul 2010 23:11:51 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007152311.o6FNBplY029803@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 15 Jul 2010 23:11:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210149 - head/sys/isa X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 23:11:51 -0000 Author: jkim Date: Thu Jul 15 23:11:51 2010 New Revision: 210149 URL: http://svn.freebsd.org/changeset/base/210149 Log: When we are not switching VTs, just mark all buffer to be updated. Modified: head/sys/isa/syscons_isa.c Modified: head/sys/isa/syscons_isa.c ============================================================================== --- head/sys/isa/syscons_isa.c Thu Jul 15 23:07:02 2010 (r210148) +++ head/sys/isa/syscons_isa.c Thu Jul 15 23:11:51 2010 (r210149) @@ -141,10 +141,16 @@ scresume(device_t dev) sc = &main_softc; + if (sc->cur_scp == NULL) + return (0); + sc->suspend_in_progress--; - if (sc->suspend_in_progress == 0) + if (sc->suspend_in_progress == 0) { if (!sc_no_suspend_vtswitch && sc_cur_scr != 0) sc_switch_scr(sc, sc_cur_scr); + else + mark_all(sc->cur_scp); + } return (0); } From owner-svn-src-all@FreeBSD.ORG Thu Jul 15 23:24:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5071B1065676; Thu, 15 Jul 2010 23:24:07 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 26A828FC13; Thu, 15 Jul 2010 23:24:07 +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 o6FNO73b032590; Thu, 15 Jul 2010 23:24:07 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6FNO7gd032588; Thu, 15 Jul 2010 23:24:07 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007152324.o6FNO7gd032588@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 15 Jul 2010 23:24:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210150 - head/sys/dev/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 23:24:07 -0000 Author: jkim Date: Thu Jul 15 23:24:06 2010 New Revision: 210150 URL: http://svn.freebsd.org/changeset/base/210150 Log: If there is any pending sleep request, disallow entering S5 state. Otherwise, bad things may happen. ;-) Modified: head/sys/dev/acpica/acpi.c Modified: head/sys/dev/acpica/acpi.c ============================================================================== --- head/sys/dev/acpica/acpi.c Thu Jul 15 23:11:51 2010 (r210149) +++ head/sys/dev/acpica/acpi.c Thu Jul 15 23:24:06 2010 (r210150) @@ -2317,27 +2317,28 @@ acpi_ReqSleepState(struct acpi_softc *sc { #if defined(__amd64__) || defined(__i386__) struct apm_clone_data *clone; + ACPI_STATUS status; if (state < ACPI_STATE_S1 || state > ACPI_S_STATES_MAX) return (EINVAL); if (!acpi_sleep_states[state]) return (EOPNOTSUPP); - /* S5 (soft-off) should be entered directly with no waiting. */ - if (state == ACPI_STATE_S5) { - if (ACPI_SUCCESS(acpi_EnterSleepState(sc, state))) - return (0); - else - return (ENXIO); - } + ACPI_LOCK(acpi); /* If a suspend request is already in progress, just return. */ - ACPI_LOCK(acpi); if (sc->acpi_next_sstate != 0) { ACPI_UNLOCK(acpi); return (0); } + /* S5 (soft-off) should be entered directly with no waiting. */ + if (state == ACPI_STATE_S5) { + ACPI_UNLOCK(acpi); + status = acpi_EnterSleepState(sc, state); + return (ACPI_SUCCESS(status) ? 0 : ENXIO); + } + /* Record the pending state and notify all apm devices. */ sc->acpi_next_sstate = state; STAILQ_FOREACH(clone, &sc->apm_cdevs, entries) { @@ -2351,11 +2352,8 @@ acpi_ReqSleepState(struct acpi_softc *sc /* If devd(8) is not running, immediately enter the sleep state. */ if (!devctl_process_running()) { ACPI_UNLOCK(acpi); - if (ACPI_SUCCESS(acpi_EnterSleepState(sc, sc->acpi_next_sstate))) { - return (0); - } else { - return (ENXIO); - } + status = acpi_EnterSleepState(sc, state); + return (ACPI_SUCCESS(status) ? 0 : ENXIO); } /* @@ -2592,7 +2590,6 @@ acpi_EnterSleepState(struct acpi_softc * * process. This handles both the error and success cases. */ backout: - sc->acpi_next_sstate = 0; if (slp_state >= ACPI_SS_GPE_SET) { acpi_wake_prep_walk(state); sc->acpi_sstate = ACPI_STATE_S0; @@ -2603,6 +2600,7 @@ backout: DEVICE_RESUME(root_bus); if (slp_state >= ACPI_SS_SLEPT) acpi_enable_fixed_events(sc); + sc->acpi_next_sstate = 0; mtx_unlock(&Giant); From owner-svn-src-all@FreeBSD.ORG Thu Jul 15 23:32:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB08C1065670; Thu, 15 Jul 2010 23:32:53 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DAF9C8FC14; Thu, 15 Jul 2010 23:32:53 +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 o6FNWrLu034550; Thu, 15 Jul 2010 23:32:53 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6FNWrbN034547; Thu, 15 Jul 2010 23:32:53 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007152332.o6FNWrbN034547@svn.freebsd.org> From: Warner Losh Date: Thu, 15 Jul 2010 23:32:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210151 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 23:32:54 -0000 Author: imp Date: Thu Jul 15 23:32:53 2010 New Revision: 210151 URL: http://svn.freebsd.org/changeset/base/210151 Log: Simple compatibility hacks for building on older systems where MACHINE_CPUARCH isn't defined. I believe that this will cover all options. I didn't define it in kern.mk because $M is set to MACHINE_CPUARCH and then is expanded for the genassym.o rule in kern.post.mk and kern.mk is included after this, so the expansion isn't quite right. I think this is a bug in make, but don't have the time to track it to ground (and even if I did, fixing it would require a MFC of the change to the very old systems we're targetting with this fix). Modified: head/sys/conf/kern.pre.mk head/sys/conf/kmod.mk Modified: head/sys/conf/kern.pre.mk ============================================================================== --- head/sys/conf/kern.pre.mk Thu Jul 15 23:24:06 2010 (r210150) +++ head/sys/conf/kern.pre.mk Thu Jul 15 23:32:53 2010 (r210151) @@ -5,6 +5,9 @@ .include +# backwards compat option for older systems. +MACHINE_CPUARCH?=${MACHINE_ARCH:C/mipse[lb]/mips/:C/armeb/arm/:C/powerpc64/powerpc/} + # Can be overridden by makeoptions or /etc/make.conf KERNEL_KO?= kernel KERNEL?= kernel @@ -151,6 +154,7 @@ SYSTEM_DEP+= ${LDSCRIPT} # them. MKMODULESENV= MAKEOBJDIRPREFIX=${.OBJDIR}/modules KMODDIR=${KODIR} +MKMODULESENV+= MACHINE_CPUARCH=${MACHINE_CPUARCH} .if (${KERN_IDENT} == LINT) MKMODULESENV+= ALL_MODULES=LINT .endif Modified: head/sys/conf/kmod.mk ============================================================================== --- head/sys/conf/kmod.mk Thu Jul 15 23:24:06 2010 (r210150) +++ head/sys/conf/kmod.mk Thu Jul 15 23:32:53 2010 (r210151) @@ -60,6 +60,9 @@ # Unload a module. # +# backwards compat option for older systems. +MACHINE_CPUARCH?=${MACHINE_ARCH:C/mipse[lb]/mips/:C/armeb/arm/:C/powerpc64/powerpc/} + AWK?= awk KMODLOAD?= /sbin/kldload KMODUNLOAD?= /sbin/kldunload From owner-svn-src-all@FreeBSD.ORG Thu Jul 15 23:34:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B4DCD1065670; Thu, 15 Jul 2010 23:34:58 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A49F58FC12; Thu, 15 Jul 2010 23:34:58 +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 o6FNYwc4035063; Thu, 15 Jul 2010 23:34:58 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6FNYwq6035060; Thu, 15 Jul 2010 23:34:58 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201007152334.o6FNYwq6035060@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 15 Jul 2010 23:34:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210152 - head/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 23:34:58 -0000 Author: yongari Date: Thu Jul 15 23:34:58 2010 New Revision: 210152 URL: http://svn.freebsd.org/changeset/base/210152 Log: Use Miscellaneous Configuration Register bit definition instead of magic number. Modified: head/sys/dev/bge/if_bge.c head/sys/dev/bge/if_bgereg.h Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Thu Jul 15 23:32:53 2010 (r210151) +++ head/sys/dev/bge/if_bge.c Thu Jul 15 23:34:58 2010 (r210152) @@ -3117,7 +3117,7 @@ bge_reset(struct bge_softc *sc) * powered up in D0 uninitialized. */ if (BGE_IS_5705_PLUS(sc)) - reset |= 0x04000000; + reset |= BGE_MISCCFG_GPHY_PD_OVERRIDE; /* Issue global reset */ write_op(sc, BGE_MISC_CFG, reset); Modified: head/sys/dev/bge/if_bgereg.h ============================================================================== --- head/sys/dev/bge/if_bgereg.h Thu Jul 15 23:32:53 2010 (r210151) +++ head/sys/dev/bge/if_bgereg.h Thu Jul 15 23:34:58 2010 (r210152) @@ -1823,6 +1823,7 @@ #define BGE_MISCCFG_BOARD_ID_5788 0x00010000 #define BGE_MISCCFG_BOARD_ID_5788M 0x00018000 #define BGE_MISCCFG_EPHY_IDDQ 0x00200000 +#define BGE_MISCCFG_GPHY_PD_OVERRIDE 0x04000000 #define BGE_32BITTIME_66MHZ (0x41 << 1) From owner-svn-src-all@FreeBSD.ORG Fri Jul 16 01:44:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D06AC106564A; Fri, 16 Jul 2010 01:44:49 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A74058FC0C; Fri, 16 Jul 2010 01:44:49 +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 o6G1in4M063588; Fri, 16 Jul 2010 01:44:49 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6G1intY063586; Fri, 16 Jul 2010 01:44:49 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201007160144.o6G1intY063586@svn.freebsd.org> From: Rick Macklem Date: Fri, 16 Jul 2010 01:44:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210154 - head/sys/fs/nfsserver X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 01:44:49 -0000 Author: rmacklem Date: Fri Jul 16 01:44:49 2010 New Revision: 210154 URL: http://svn.freebsd.org/changeset/base/210154 Log: Delete comments related to soft clock interrupts that don't apply to the FreeBSD port of the experimental NFSv4 server. Submitted by: zack.kirsch at isilon.com MFC after: 2 weeks Modified: head/sys/fs/nfsserver/nfs_nfsdstate.c Modified: head/sys/fs/nfsserver/nfs_nfsdstate.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdstate.c Fri Jul 16 00:56:17 2010 (r210153) +++ head/sys/fs/nfsserver/nfs_nfsdstate.c Fri Jul 16 01:44:49 2010 (r210154) @@ -1015,7 +1015,6 @@ nfsrv_freedeleg(struct nfsstate *stp) /* * This function frees an open owner and all associated opens. - * Must be called with soft clock interrupts disabled. */ static void nfsrv_freeopenowner(struct nfsstate *stp, int cansleep, NFSPROC_T *p) @@ -1161,7 +1160,6 @@ nfsrv_freeallnfslocks(struct nfsstate *s /* * Free an nfslock structure. - * Must be called with soft clock interrupts disabled. */ static void nfsrv_freenfslock(struct nfslock *lop) @@ -1178,7 +1176,6 @@ nfsrv_freenfslock(struct nfslock *lop) /* * This function frees an nfslockfile structure. - * Must be called with soft clock interrupts disabled. */ static void nfsrv_freenfslockfile(struct nfslockfile *lfp) @@ -1358,11 +1355,6 @@ tryagain: } } - /* - * Since the code is manipulating lists that are also - * manipulated by nfsrv_servertimer(), soft clock interrupts - * must be masked off. - */ if (specialid == 0) { if (new_stp->ls_flags & NFSLCK_TEST) { /* @@ -1971,9 +1963,6 @@ tryagain: NFSLOCKSTATE(); /* * Get the nfsclient structure. - * Since the code is manipulating lists that are also - * manipulated by nfsrv_servertimer(), soft clock interrupts - * must be masked off. */ error = nfsrv_getclient(clientid, CLOPS_RENEW, &clp, (nfsquad_t)((u_quad_t)0), NULL, p); @@ -3176,7 +3165,6 @@ nfsrv_getlockfile(u_short flags, struct * This function adds a nfslock lock structure to the list for the associated * nfsstate and nfslockfile structures. It will be inserted after the * entry pointed at by insert_lop. - * Must be called with soft clock interrupts disabled. */ static void nfsrv_insertlock(struct nfslock *new_lop, struct nfslock *insert_lop, @@ -3228,7 +3216,6 @@ nfsrv_insertlock(struct nfslock *new_lop * are NFSLCK_READ or NFSLCK_WRITE and non-overlapping (aka POSIX style). * It always adds new_lop to the list and sometimes uses the one pointed * at by other_lopp. - * Must be called with soft clock interrupts disabled. */ static void nfsrv_updatelock(struct nfsstate *stp, struct nfslock **new_lopp, From owner-svn-src-all@FreeBSD.ORG Fri Jul 16 03:59:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89E571065677; Fri, 16 Jul 2010 03:59:51 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 799168FC0C; Fri, 16 Jul 2010 03:59: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 o6G3xpRo093408; Fri, 16 Jul 2010 03:59:51 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6G3xpn7093407; Fri, 16 Jul 2010 03:59:51 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007160359.o6G3xpn7093407@svn.freebsd.org> From: Jung-uk Kim Date: Fri, 16 Jul 2010 03:59:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210155 - head/sys/dev/acpica/Osd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 03:59:51 -0000 Author: jkim Date: Fri Jul 16 03:59:50 2010 New Revision: 210155 URL: http://svn.freebsd.org/changeset/base/210155 Log: Use pmap_mapdev()/pmap_unmapdev() to map device memory instead of using AcpiOsMapMemory()/AcpiOsUnmapMemory() (-> pmap_mapbios()/pmap_unmapbios()) for AcpiOsReadMemory() and AcpiOsWriteMemory(). Although they do not sound too obvious, these functions are exclusively used to access memory mapped IO in ACPICA. Modified: head/sys/dev/acpica/Osd/OsdMemory.c Modified: head/sys/dev/acpica/Osd/OsdMemory.c ============================================================================== --- head/sys/dev/acpica/Osd/OsdMemory.c Fri Jul 16 01:44:49 2010 (r210154) +++ head/sys/dev/acpica/Osd/OsdMemory.c Fri Jul 16 03:59:50 2010 (r210155) @@ -97,7 +97,7 @@ AcpiOsReadMemory(ACPI_PHYSICAL_ADDRESS A { void *LogicalAddress; - LogicalAddress = AcpiOsMapMemory(Address, Width / 8); + LogicalAddress = pmap_mapdev(Address, Width / 8); if (LogicalAddress == NULL) return (AE_NOT_EXIST); @@ -113,7 +113,7 @@ AcpiOsReadMemory(ACPI_PHYSICAL_ADDRESS A break; } - AcpiOsUnmapMemory(LogicalAddress, Width / 8); + pmap_unmapdev((vm_offset_t)LogicalAddress, Width / 8); return (AE_OK); } @@ -123,7 +123,7 @@ AcpiOsWriteMemory(ACPI_PHYSICAL_ADDRESS { void *LogicalAddress; - LogicalAddress = AcpiOsMapMemory(Address, Width / 8); + LogicalAddress = pmap_mapdev(Address, Width / 8); if (LogicalAddress == NULL) return (AE_NOT_EXIST); @@ -139,7 +139,7 @@ AcpiOsWriteMemory(ACPI_PHYSICAL_ADDRESS break; } - AcpiOsUnmapMemory(LogicalAddress, Width / 8); + pmap_unmapdev((vm_offset_t)LogicalAddress, Width / 8); return (AE_OK); } From owner-svn-src-all@FreeBSD.ORG Fri Jul 16 04:26:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 829EE106564A; Fri, 16 Jul 2010 04:26:38 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 722228FC15; Fri, 16 Jul 2010 04:26:38 +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 o6G4QcNl099303; Fri, 16 Jul 2010 04:26:38 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6G4Qc4X099302; Fri, 16 Jul 2010 04:26:38 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201007160426.o6G4Qc4X099302@svn.freebsd.org> From: Adrian Chadd Date: Fri, 16 Jul 2010 04:26:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210156 - head/sys/dev/flash X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 04:26:38 -0000 Author: adrian Date: Fri Jul 16 04:26:37 2010 New Revision: 210156 URL: http://svn.freebsd.org/changeset/base/210156 Log: Fix KASSERT() messages to reflect reality. Modified: head/sys/dev/flash/mx25l.c (contents, props changed) Modified: head/sys/dev/flash/mx25l.c ============================================================================== --- head/sys/dev/flash/mx25l.c Fri Jul 16 03:59:50 2010 (r210155) +++ head/sys/dev/flash/mx25l.c Fri Jul 16 04:26:37 2010 (r210156) @@ -303,11 +303,11 @@ mx25l_read(device_t dev, off_t offset, c * Sanity checks */ KASSERT(count % sc->sc_sectorsize == 0, - ("count for BIO_WRITE is not sector size (%d bytes) aligned", + ("count for BIO_READ is not sector size (%d bytes) aligned", sc->sc_sectorsize)); KASSERT(offset % sc->sc_sectorsize == 0, - ("offset for BIO_WRITE is not sector size (%d bytes) aligned", + ("offset for BIO_READ is not sector size (%d bytes) aligned", sc->sc_sectorsize)); txBuf[0] = CMD_FAST_READ; From owner-svn-src-all@FreeBSD.ORG Fri Jul 16 04:27:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 062031065672; Fri, 16 Jul 2010 04:27:39 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D09B48FC13; Fri, 16 Jul 2010 04:27:38 +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 o6G4Rcx8099572; Fri, 16 Jul 2010 04:27:38 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6G4RccJ099570; Fri, 16 Jul 2010 04:27:38 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007160427.o6G4RccJ099570@svn.freebsd.org> From: Jung-uk Kim Date: Fri, 16 Jul 2010 04:27:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210157 - head/sys/dev/acpica/Osd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 04:27:39 -0000 Author: jkim Date: Fri Jul 16 04:27:38 2010 New Revision: 210157 URL: http://svn.freebsd.org/changeset/base/210157 Log: Simplify AcpiOsReadPort() and AcpiOsWritePort() with iodev_read_*() and iodev_write_*(). This removes unnecessary uses of temporary macros as well. There is no functional change after this (verified with md5(1) on amd64). Modified: head/sys/dev/acpica/Osd/OsdHardware.c Modified: head/sys/dev/acpica/Osd/OsdHardware.c ============================================================================== --- head/sys/dev/acpica/Osd/OsdHardware.c Fri Jul 16 04:26:37 2010 (r210156) +++ head/sys/dev/acpica/Osd/OsdHardware.c Fri Jul 16 04:27:38 2010 (r210157) @@ -36,7 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include #include #include #include @@ -48,36 +48,21 @@ __FBSDID("$FreeBSD$"); * * In order to deal with this, we ignore resource ownership entirely, and simply * use the native I/O space accessor functionality. This is Evil, but it works. - * - * XXX use an intermediate #define for the tag/handle */ -#ifdef __i386__ -#define ACPI_BUS_SPACE_IO I386_BUS_SPACE_IO -#define ACPI_BUS_HANDLE 0 -#endif -#ifdef __ia64__ -#define ACPI_BUS_SPACE_IO IA64_BUS_SPACE_IO -#define ACPI_BUS_HANDLE 0 -#endif -#ifdef __amd64__ -#define ACPI_BUS_SPACE_IO AMD64_BUS_SPACE_IO -#define ACPI_BUS_HANDLE 0 -#endif - ACPI_STATUS AcpiOsReadPort(ACPI_IO_ADDRESS InPort, UINT32 *Value, UINT32 Width) { switch (Width) { case 8: - *Value = bus_space_read_1(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, InPort); + *Value = iodev_read_1(InPort); break; case 16: - *Value = bus_space_read_2(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, InPort); + *Value = iodev_read_2(InPort); break; case 32: - *Value = bus_space_read_4(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, InPort); + *Value = iodev_read_4(InPort); break; } @@ -90,13 +75,13 @@ AcpiOsWritePort(ACPI_IO_ADDRESS OutPort, switch (Width) { case 8: - bus_space_write_1(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, OutPort, Value); + iodev_write_1(OutPort, Value); break; case 16: - bus_space_write_2(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, OutPort, Value); + iodev_write_2(OutPort, Value); break; case 32: - bus_space_write_4(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, OutPort, Value); + iodev_write_4(OutPort, Value); break; } From owner-svn-src-all@FreeBSD.ORG Fri Jul 16 06:09:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C47161065670; Fri, 16 Jul 2010 06:09:51 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B360B8FC13; Fri, 16 Jul 2010 06:09: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 o6G69pS2022059; Fri, 16 Jul 2010 06:09:51 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6G69p6v022058; Fri, 16 Jul 2010 06:09:51 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007160609.o6G69p6v022058@svn.freebsd.org> From: Warner Losh Date: Fri, 16 Jul 2010 06:09:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210158 - head/sys/mips/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 06:09:51 -0000 Author: imp Date: Fri Jul 16 06:09:51 2010 New Revision: 210158 URL: http://svn.freebsd.org/changeset/base/210158 Log: Use #define for get_cyclecount rather than inline function. mips_rd_count() isn't defined in userland, and cpu.h is included there in alias_scpt.h (maybe they don't need it in the first place). Modified: head/sys/mips/include/cpu.h Modified: head/sys/mips/include/cpu.h ============================================================================== --- head/sys/mips/include/cpu.h Fri Jul 16 04:27:38 2010 (r210157) +++ head/sys/mips/include/cpu.h Fri Jul 16 06:09:51 2010 (r210158) @@ -78,11 +78,7 @@ /* * A machine-independent interface to the CPU's counter. */ -static __inline uint64_t -get_cyclecount(void) -{ - return (mips_rd_count()); -} +#define get_cyclecount() mips_rd_count() #endif /* !_LOCORE */ #if defined(_KERNEL) && !defined(_LOCORE) From owner-svn-src-all@FreeBSD.ORG Fri Jul 16 06:31:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB1F7106566C; Fri, 16 Jul 2010 06:31:37 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9F3618FC14; Fri, 16 Jul 2010 06:31:37 +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 o6G6Vbkn026815; Fri, 16 Jul 2010 06:31:37 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6G6Vb5W026814; Fri, 16 Jul 2010 06:31:37 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007160631.o6G6Vb5W026814@svn.freebsd.org> From: Warner Losh Date: Fri, 16 Jul 2010 06:31:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210159 - head/sys/mips/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 06:31:37 -0000 Author: imp Date: Fri Jul 16 06:31:37 2010 New Revision: 210159 URL: http://svn.freebsd.org/changeset/base/210159 Log: This file appears not to be used. Deleted: head/sys/mips/include/asmacros.h From owner-svn-src-all@FreeBSD.ORG Fri Jul 16 06:32:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88D90106564A; Fri, 16 Jul 2010 06:32:38 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 77E2A8FC16; Fri, 16 Jul 2010 06:32:38 +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 o6G6Wc2t027089; Fri, 16 Jul 2010 06:32:38 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6G6WcL7027087; Fri, 16 Jul 2010 06:32:38 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007160632.o6G6WcL7027087@svn.freebsd.org> From: Warner Losh Date: Fri, 16 Jul 2010 06:32:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210160 - head/sys/netinet/libalias X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 06:32:38 -0000 Author: imp Date: Fri Jul 16 06:32:38 2010 New Revision: 210160 URL: http://svn.freebsd.org/changeset/base/210160 Log: machine/cpu.h isn't appropriate for this file,so remove it Modified: head/sys/netinet/libalias/alias_sctp.h Modified: head/sys/netinet/libalias/alias_sctp.h ============================================================================== --- head/sys/netinet/libalias/alias_sctp.h Fri Jul 16 06:31:37 2010 (r210159) +++ head/sys/netinet/libalias/alias_sctp.h Fri Jul 16 06:32:38 2010 (r210160) @@ -80,7 +80,6 @@ * */ #include -#include /* The packed define for 64 bit platforms */ #ifndef SCTP_PACKED #define SCTP_PACKED __attribute__((packed)) From owner-svn-src-all@FreeBSD.ORG Fri Jul 16 06:35:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A322106564A; Fri, 16 Jul 2010 06:35:17 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 77B128FC17; Fri, 16 Jul 2010 06:35:17 +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 o6G6ZHgw027739; Fri, 16 Jul 2010 06:35:17 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6G6ZHfl027733; Fri, 16 Jul 2010 06:35:17 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007160635.o6G6ZHfl027733@svn.freebsd.org> From: Warner Losh Date: Fri, 16 Jul 2010 06:35:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210161 - in head/sys/mips: include mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 06:35:17 -0000 Author: imp Date: Fri Jul 16 06:35:17 2010 New Revision: 210161 URL: http://svn.freebsd.org/changeset/base/210161 Log: Move common macros into asm.h. Replace MIPS_CPU_NOP_DELAY with HAZARD_DELAY. Move HAZARD_DELAY and ITLBNOPFIX into asm.h, for possible later optimization... Reviewed by: jmallet, jchandra Modified: head/sys/mips/include/asm.h head/sys/mips/mips/exception.S head/sys/mips/mips/support.S head/sys/mips/mips/swtch.S head/sys/mips/mips/tlb.S Modified: head/sys/mips/include/asm.h ============================================================================== --- head/sys/mips/include/asm.h Fri Jul 16 06:32:38 2010 (r210160) +++ head/sys/mips/include/asm.h Fri Jul 16 06:35:17 2010 (r210161) @@ -843,4 +843,18 @@ _C_LABEL(x): #define _JB_SIGMASK 13 +/* + * Various macros for dealing with TLB hazards + * (a) why so many? + * (b) when to use? + * (c) why not used everywhere? + */ +/* + * Assume that w alaways need nops to escape CP0 hazard + * TODO: Make hazard delays configurable. Stuck with 5 cycles on the moment + * For more info on CP0 hazards see Chapter 7 (p.99) of "MIPS32 Architecture + * For Programmers Volume III: The MIPS32 Privileged Resource Architecture" + */ +#define ITLBNOPFIX nop;nop;nop;nop;nop;nop;nop;nop;nop;nop; +#define HAZARD_DELAY nop;nop;nop;nop;nop; #endif /* !_MACHINE_ASM_H_ */ Modified: head/sys/mips/mips/exception.S ============================================================================== --- head/sys/mips/mips/exception.S Fri Jul 16 06:32:38 2010 (r210160) +++ head/sys/mips/mips/exception.S Fri Jul 16 06:35:17 2010 (r210161) @@ -80,15 +80,6 @@ */ #define INTRCNT_COUNT 128 -/* - * Assume that w alaways need nops to escape CP0 hazard - * TODO: Make hazard delays configurable. Stuck with 5 cycles on the moment - * For more info on CP0 hazards see Chapter 7 (p.99) of "MIPS32 Architecture - * For Programmers Volume III: The MIPS32 Privileged Resource Architecture" - */ -#define ITLBNOPFIX nop;nop;nop;nop;nop;nop;nop;nop;nop;nop; -#define HAZARD_DELAY nop;nop;nop;nop;nop; - /* Pointer size and mask for n64 */ #if defined(__mips_n64) #define PTRSHIFT 3 Modified: head/sys/mips/mips/support.S ============================================================================== --- head/sys/mips/mips/support.S Fri Jul 16 06:32:38 2010 (r210160) +++ head/sys/mips/mips/support.S Fri Jul 16 06:35:17 2010 (r210161) @@ -1353,8 +1353,6 @@ esym: .word 0 #endif /* DDB */ #endif /* DDB || DEBUG */ -#define ITLBNOPFIX nop;nop;nop;nop;nop;nop;nop;nop;nop;nop; - .text LEAF(breakpoint) break MIPS_BREAK_SOVER_VAL Modified: head/sys/mips/mips/swtch.S ============================================================================== --- head/sys/mips/mips/swtch.S Fri Jul 16 06:32:38 2010 (r210160) +++ head/sys/mips/mips/swtch.S Fri Jul 16 06:35:17 2010 (r210161) @@ -67,17 +67,6 @@ .set noreorder # Noreorder is default style! -/* - * FREEBSD_DEVELOPERS_FIXME - * Some MIPS CPU may need delays using nops between executing CP0 Instructions - */ - -#if 1 -#define HAZARD_DELAY nop ; nop ; nop ; nop -#else -#define HAZARD_DELAY -#endif - #define SAVE_U_PCB_REG(reg, offs, base) \ REG_S reg, U_PCB_REGS + (SZREG * offs) (base) @@ -102,8 +91,6 @@ #define RESTORE_U_PCB_CONTEXT(reg, offs, base) \ REG_L reg, U_PCB_CONTEXT + (SZREG * offs) (base) -#define ITLBNOPFIX nop;nop;nop;nop;nop;nop;nop;nop;nop;nop; - /* * Setup for and return to user. */ Modified: head/sys/mips/mips/tlb.S ============================================================================== --- head/sys/mips/mips/tlb.S Fri Jul 16 06:32:38 2010 (r210160) +++ head/sys/mips/mips/tlb.S Fri Jul 16 06:35:17 2010 (r210161) @@ -97,14 +97,6 @@ .set mips3 #endif -#define ITLBNOPFIX nop;nop;nop;nop;nop;nop;nop;nop;nop;nop; - -/* - * FREEBSD_DEVELOPERS_FIXME - * Some MIPS CPU may need delays using nops between executing CP0 Instructions - */ -#define MIPS_CPU_NOP_DELAY nop;nop;nop;nop; - /*-------------------------------------------------------------------------- * * Mips_TLBWriteIndexed(unsigned index, tlb *tlb); @@ -134,9 +126,9 @@ LEAF(Mips_TLBWriteIndexed) mtc0 a0, COP_0_TLB_INDEX # Set the index. _MTC0 a2, COP_0_TLB_PG_MASK # Set up entry mask. _MTC0 a3, COP_0_TLB_HI # Set up entry high. - MIPS_CPU_NOP_DELAY + HAZARD_DELAY tlbwi # Write the TLB - MIPS_CPU_NOP_DELAY + HAZARD_DELAY _MTC0 t0, COP_0_TLB_HI # Restore the PID. nop @@ -252,9 +244,9 @@ LEAF(Mips_TLBFlush) _MTC0 v0, COP_0_TLB_HI # Mark entry high as invalid addu t1, t1, 1 # Increment index. addu v0, v0, 8 * 1024 - MIPS_CPU_NOP_DELAY + HAZARD_DELAY tlbwi # Write the TLB entry. - MIPS_CPU_NOP_DELAY + HAZARD_DELAY bne t1, a0, 1b nop _MTC0 t0, COP_0_TLB_HI # Restore the PID @@ -288,9 +280,9 @@ LEAF(Mips_TLBFlushAddr) _MFC0 t0, COP_0_TLB_HI # Get current PID mfc0 t3, COP_0_TLB_PG_MASK # Save current pgMask _MTC0 a0, COP_0_TLB_HI # look for addr & PID - MIPS_CPU_NOP_DELAY + HAZARD_DELAY tlbp # Probe for the entry. - MIPS_CPU_NOP_DELAY + HAZARD_DELAY mfc0 v0, COP_0_TLB_INDEX # See what we got li t1, MIPS_KSEG0_START bltz v0, 1f # index < 0 => !found @@ -305,9 +297,9 @@ LEAF(Mips_TLBFlushAddr) _MTC0 zero, COP_0_TLB_LO0 # Zero out low entry. _MTC0 zero, COP_0_TLB_LO1 # Zero out low entry. - MIPS_CPU_NOP_DELAY + HAZARD_DELAY tlbwi - MIPS_CPU_NOP_DELAY + HAZARD_DELAY 1: _MTC0 t0, COP_0_TLB_HI # restore PID mtc0 t3, COP_0_TLB_PG_MASK # Restore pgMask @@ -341,7 +333,7 @@ LEAF(Mips_TLBUpdate) _MFC0 t0, COP_0_TLB_HI # Save current PID _MTC0 a0, COP_0_TLB_HI # Init high reg and a2, a1, PTE_G # Copy global bit - MIPS_CPU_NOP_DELAY + HAZARD_DELAY tlbp # Probe for the entry. _SLL a1, a1, WIRED_SHIFT _SRL a1, a1, WIRED_SHIFT @@ -351,12 +343,12 @@ LEAF(Mips_TLBUpdate) # EVEN nop bltz v0, 1f # index < 0 => !found - MIPS_CPU_NOP_DELAY + HAZARD_DELAY tlbr # update, read entry first - MIPS_CPU_NOP_DELAY + HAZARD_DELAY _MTC0 a1, COP_0_TLB_LO0 # init low reg0. - MIPS_CPU_NOP_DELAY + HAZARD_DELAY tlbwi # update slot found b 4f nop @@ -365,23 +357,23 @@ LEAF(Mips_TLBUpdate) _MTC0 a0, COP_0_TLB_HI # init high reg. _MTC0 a1, COP_0_TLB_LO0 # init low reg0. _MTC0 a2, COP_0_TLB_LO1 # init low reg1. - MIPS_CPU_NOP_DELAY + HAZARD_DELAY tlbwr # enter into a random slot - MIPS_CPU_NOP_DELAY + HAZARD_DELAY b 4f nop # ODD 2: nop bltz v0, 3f # index < 0 => !found - MIPS_CPU_NOP_DELAY + HAZARD_DELAY tlbr # read the entry first - MIPS_CPU_NOP_DELAY + HAZARD_DELAY _MTC0 a1, COP_0_TLB_LO1 # init low reg1. - MIPS_CPU_NOP_DELAY + HAZARD_DELAY tlbwi # update slot found - MIPS_CPU_NOP_DELAY + HAZARD_DELAY b 4f nop 3: @@ -389,11 +381,11 @@ LEAF(Mips_TLBUpdate) _MTC0 a0, COP_0_TLB_HI # init high reg. _MTC0 a2, COP_0_TLB_LO0 # init low reg0. _MTC0 a1, COP_0_TLB_LO1 # init low reg1. - MIPS_CPU_NOP_DELAY + HAZARD_DELAY tlbwr # enter into a random slot 4: # Make shure pipeline - MIPS_CPU_NOP_DELAY + HAZARD_DELAY _MTC0 t0, COP_0_TLB_HI # restore PID mtc0 v1, COP_0_STATUS_REG # Restore the status register ITLBNOPFIX @@ -422,15 +414,15 @@ LEAF(Mips_TLBRead) _MFC0 t0, COP_0_TLB_HI # Get current PID mtc0 a0, COP_0_TLB_INDEX # Set the index register - MIPS_CPU_NOP_DELAY + HAZARD_DELAY tlbr # Read from the TLB - MIPS_CPU_NOP_DELAY + HAZARD_DELAY mfc0 t2, COP_0_TLB_PG_MASK # fetch the hi entry _MFC0 t3, COP_0_TLB_HI # fetch the hi entry _MFC0 ta0, COP_0_TLB_LO0 # See what we got _MFC0 ta1, COP_0_TLB_LO1 # See what we got _MTC0 t0, COP_0_TLB_HI # restore PID - MIPS_CPU_NOP_DELAY + HAZARD_DELAY mtc0 v1, COP_0_STATUS_REG # Restore the status register ITLBNOPFIX sw t2, 0(a1) @@ -491,9 +483,9 @@ LEAF(mips_TBIAP) # do {} while (t1 < t2) 1: mtc0 t1, COP_0_TLB_INDEX # set index - MIPS_CPU_NOP_DELAY + HAZARD_DELAY tlbr # obtain an entry - MIPS_CPU_NOP_DELAY + HAZARD_DELAY _MFC0 a0, COP_0_TLB_LO1 and a0, a0, PTE_G # check to see it has G bit bnez a0, 2f @@ -503,7 +495,7 @@ LEAF(mips_TBIAP) _MTC0 zero, COP_0_TLB_LO0 # zero out entryLo0 _MTC0 zero, COP_0_TLB_LO1 # zero out entryLo1 mtc0 zero, COP_0_TLB_PG_MASK # zero out mask entry - MIPS_CPU_NOP_DELAY + HAZARD_DELAY tlbwi # invalidate the TLB entry 2: addu t1, t1, 1 @@ -513,7 +505,7 @@ LEAF(mips_TBIAP) _MTC0 ta0, COP_0_TLB_HI # restore PID mtc0 t3, COP_0_TLB_PG_MASK # restore pgMask - MIPS_CPU_NOP_DELAY + HAZARD_DELAY mtc0 v1, COP_0_STATUS_REG # restore status register j ra # new ASID will be set soon nop From owner-svn-src-all@FreeBSD.ORG Fri Jul 16 06:45:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C5590106566B; Fri, 16 Jul 2010 06:45:07 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [IPv6:2001:4068:10::3]) by mx1.freebsd.org (Postfix) with ESMTP id 55A408FC0A; Fri, 16 Jul 2010 06:45:07 +0000 (UTC) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 246A041C798; Fri, 16 Jul 2010 08:45:06 +0200 (CEST) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([192.168.74.103]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id kLFZFdJZmjBm; Fri, 16 Jul 2010 08:45:05 +0200 (CEST) Received: by mail.cksoft.de (Postfix, from userid 66) id 77A5B41C796; Fri, 16 Jul 2010 08:45:05 +0200 (CEST) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 3DB934448EC; Fri, 16 Jul 2010 06:44:40 +0000 (UTC) Date: Fri, 16 Jul 2010 06:44:39 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: John Baldwin In-Reply-To: <201007152024.o6FKObhM092035@svn.freebsd.org> Message-ID: <20100716064257.S14969@maildrop.int.zabbadoz.net> References: <201007152024.o6FKObhM092035@svn.freebsd.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r210138 - in head/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 06:45:07 -0000 On Thu, 15 Jul 2010, John Baldwin wrote: > Author: jhb > Date: Thu Jul 15 20:24:37 2010 > New Revision: 210138 > URL: http://svn.freebsd.org/changeset/base/210138 > > Log: > Retire td_syscalls now that it is no longer needed. > > Modified: > head/sys/kern/kern_thread.c > head/sys/kern/subr_trap.c > head/sys/sys/proc.h Did you want to leave the field as a placehgolder or add a note somewhere that people should do a full recompile because the layout changed? > Modified: head/sys/sys/proc.h > ============================================================================== > --- head/sys/sys/proc.h Thu Jul 15 19:52:54 2010 (r210137) > +++ head/sys/sys/proc.h Thu Jul 15 20:24:37 2010 (r210138) > @@ -296,7 +296,6 @@ struct thread { > struct mdthread td_md; /* (k) Any machine-dependent fields. */ > struct td_sched *td_sched; /* (*) Scheduler-specific data. */ > struct kaudit_record *td_ar; /* (k) Active audit record, if any. */ > - int td_syscalls; /* per-thread syscall count (used by NFS :)) */ > struct lpohead td_lprof[2]; /* (a) lock profiling objects. */ > struct kdtrace_thread *td_dtrace; /* (*) DTrace-specific data. */ > int td_errno; /* Error returned by last syscall. */ > -- Bjoern A. Zeeb From August on I will have a life. It's now up to you to do the maths and count to 64. -- Bondorf, Germany, 14th June 2010 From owner-svn-src-all@FreeBSD.ORG Fri Jul 16 07:17:01 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11DCC106566C; Fri, 16 Jul 2010 07:17:01 +0000 (UTC) (envelope-from peterjeremy@acm.org) Received: from mail11.syd.optusnet.com.au (mail11.syd.optusnet.com.au [211.29.132.192]) by mx1.freebsd.org (Postfix) with ESMTP id 74F7B8FC13; Fri, 16 Jul 2010 07:17:00 +0000 (UTC) Received: from server.vk2pj.dyndns.org (c211-30-160-13.belrs4.nsw.optusnet.com.au [211.30.160.13]) by mail11.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o6G7GvbM018808 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 16 Jul 2010 17:16:57 +1000 X-Bogosity: Ham, spamicity=0.000000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.4/8.14.4) with ESMTP id o6G7Gsfc026495; Fri, 16 Jul 2010 17:16:54 +1000 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.4/8.14.4/Submit) id o6G7GsYU026494; Fri, 16 Jul 2010 17:16:54 +1000 (EST) (envelope-from peter) Date: Fri, 16 Jul 2010 17:16:54 +1000 From: Peter Jeremy To: Alan Cox Message-ID: <20100716071654.GA26367@server.vk2pj.dyndns.org> References: <201007151625.o6FGPp0D038539@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="T4sUOijqQbZv57TR" Content-Disposition: inline In-Reply-To: <201007151625.o6FGPp0D038539@svn.freebsd.org> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r210124 - head/sys/amd64/amd64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 07:17:01 -0000 --T4sUOijqQbZv57TR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2010-Jul-15 16:25:51 +0000, Alan Cox wrote: >Log: > Optimize pmap_remove()'s handling of PG_G mappings. Specifically, =2E.. > calls pmap_invalidate_page(). Altogether, these changes eliminate 53% > of the TLB shootdowns for a "buildworld" on a ZFS file system. On > FFS, the reduction is 3%. I have no feeling for the cost of a TLB shootdown. What is the likely impact on buildworld on a ZFS filesystem? Barely noticable or several percent faster? --=20 Peter Jeremy --T4sUOijqQbZv57TR Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (FreeBSD) iEYEARECAAYFAkxAB2YACgkQ/opHv/APuIejKACfapzvWvOpsRTr3n0UyJnJXKg1 GxcAn31m+gXHB2nAtV0tpVa4sSt/bNl6 =3Q7E -----END PGP SIGNATURE----- --T4sUOijqQbZv57TR-- From owner-svn-src-all@FreeBSD.ORG Fri Jul 16 08:09:48 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA9CF1065670; Fri, 16 Jul 2010 08:09:48 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 5D0BA8FC13; Fri, 16 Jul 2010 08:09:47 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o6G89itv091667 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 16 Jul 2010 11:09:44 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id o6G89iap012105; Fri, 16 Jul 2010 11:09:44 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o6G89ixF012104; Fri, 16 Jul 2010 11:09:44 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 16 Jul 2010 11:09:44 +0300 From: Kostik Belousov To: "Bjoern A. Zeeb" Message-ID: <20100716080944.GA2381@deviant.kiev.zoral.com.ua> References: <201007152024.o6FKObhM092035@svn.freebsd.org> <20100716064257.S14969@maildrop.int.zabbadoz.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="RUvhGz2nhX7DIu1B" Content-Disposition: inline In-Reply-To: <20100716064257.S14969@maildrop.int.zabbadoz.net> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-2.2 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_50, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, John Baldwin Subject: Re: svn commit: r210138 - in head/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 08:09:49 -0000 --RUvhGz2nhX7DIu1B Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jul 16, 2010 at 06:44:39AM +0000, Bjoern A. Zeeb wrote: > On Thu, 15 Jul 2010, John Baldwin wrote: >=20 > >Author: jhb > >Date: Thu Jul 15 20:24:37 2010 > >New Revision: 210138 > >URL: http://svn.freebsd.org/changeset/base/210138 > > > >Log: > > Retire td_syscalls now that it is no longer needed. > > > >Modified: > > head/sys/kern/kern_thread.c > > head/sys/kern/subr_trap.c > > head/sys/sys/proc.h >=20 > Did you want to leave the field as a placehgolder or add a note > somewhere that people should do a full recompile because the layout > changed? Make depend should do the magic, right ? I was surprised to see that mips/arm did not touched td_syscalls, and I wonder how much other bugs are lurking in their implementation. >=20 >=20 > >Modified: head/sys/sys/proc.h > >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > >--- head/sys/sys/proc.h Thu Jul 15 19:52:54 2010 (r210137) > >+++ head/sys/sys/proc.h Thu Jul 15 20:24:37 2010 (r210138) > >@@ -296,7 +296,6 @@ struct thread { > > struct mdthread td_md; /* (k) Any machine-dependent fields.=20 > > */ > > struct td_sched *td_sched; /* (*) Scheduler-specific data. */ > > struct kaudit_record *td_ar; /* (k) Active audit record, if any.=20 > > */ > >- int td_syscalls; /* per-thread syscall count (used by=20 > >NFS :)) */ > > struct lpohead td_lprof[2]; /* (a) lock profiling objects. */ > > struct kdtrace_thread *td_dtrace; /* (*) DTrace-specific data. */ > > int td_errno; /* Error returned by last syscall. */ > > >=20 > --=20 > Bjoern A. Zeeb From August on I will have a life. It's now up to you > to do the maths and count to 64. -- Bondorf, Germany, 14th June 2010 --RUvhGz2nhX7DIu1B Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEUEARECAAYFAkxAE8cACgkQC3+MBN1Mb4gK1wCYuwUHib+490sYpf2+ZF1ywgCo fgCghg5r1cK8QctlFnT6CJysfO3xmyY= =mOqy -----END PGP SIGNATURE----- --RUvhGz2nhX7DIu1B-- From owner-svn-src-all@FreeBSD.ORG Fri Jul 16 09:08:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ACC16106566C; Fri, 16 Jul 2010 09:08:16 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9B6F18FC14; Fri, 16 Jul 2010 09:08:16 +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 o6G98GHC061750; Fri, 16 Jul 2010 09:08:16 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6G98GL9061748; Fri, 16 Jul 2010 09:08:16 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007160908.o6G98GL9061748@svn.freebsd.org> From: Alexander Motin Date: Fri, 16 Jul 2010 09:08:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210162 - stable/8/sys/dev/ata/chipsets X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 09:08:16 -0000 Author: mav Date: Fri Jul 16 09:08:16 2010 New Revision: 210162 URL: http://svn.freebsd.org/changeset/base/210162 Log: MFC r208820: Fix use after free on error. Modified: stable/8/sys/dev/ata/chipsets/ata-acerlabs.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ata/chipsets/ata-acerlabs.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-acerlabs.c Fri Jul 16 06:35:17 2010 (r210161) +++ stable/8/sys/dev/ata/chipsets/ata-acerlabs.c Fri Jul 16 09:08:16 2010 (r210162) @@ -133,6 +133,7 @@ ata_ali_chipinit(device_t dev) bus_release_resource(dev, SYS_RES_IOPORT, PCIR_BAR(i), res->bars[i]); free(res, M_TEMP); + return ENXIO; } } ctlr->chipset_data = res; From owner-svn-src-all@FreeBSD.ORG Fri Jul 16 09:10:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2109D1065678; Fri, 16 Jul 2010 09:10:12 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 103878FC1B; Fri, 16 Jul 2010 09:10:12 +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 o6G9ABgf062236; Fri, 16 Jul 2010 09:10:11 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6G9ABuB062234; Fri, 16 Jul 2010 09:10:11 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007160910.o6G9ABuB062234@svn.freebsd.org> From: Alexander Motin Date: Fri, 16 Jul 2010 09:10:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210163 - stable/8/sys/dev/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 09:10:12 -0000 Author: mav Date: Fri Jul 16 09:10:11 2010 New Revision: 210163 URL: http://svn.freebsd.org/changeset/base/210163 Log: MFC r208822: Fix possible use after free. Modified: stable/8/sys/dev/ata/atapi-cam.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ata/atapi-cam.c ============================================================================== --- stable/8/sys/dev/ata/atapi-cam.c Fri Jul 16 09:08:16 2010 (r210162) +++ stable/8/sys/dev/ata/atapi-cam.c Fri Jul 16 09:10:11 2010 (r210163) @@ -868,11 +868,11 @@ free_hcb(struct atapi_hcb *hcb) static void free_softc(struct atapi_xpt_softc *scp) { - struct atapi_hcb *hcb; + struct atapi_hcb *hcb, *thcb; if (scp != NULL) { mtx_lock(&scp->state_lock); - TAILQ_FOREACH(hcb, &scp->pending_hcbs, chain) { + TAILQ_FOREACH_SAFE(hcb, &scp->pending_hcbs, chain, thcb) { free_hcb_and_ccb_done(hcb, CAM_UNREC_HBA_ERROR); } if (scp->path != NULL) { From owner-svn-src-all@FreeBSD.ORG Fri Jul 16 09:12:48 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 083401065674; Fri, 16 Jul 2010 09:12:48 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EA5A08FC20; Fri, 16 Jul 2010 09:12: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 o6G9CleE062854; Fri, 16 Jul 2010 09:12:47 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6G9ClHr062851; Fri, 16 Jul 2010 09:12:47 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007160912.o6G9ClHr062851@svn.freebsd.org> From: Alexander Motin Date: Fri, 16 Jul 2010 09:12:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210164 - stable/8/sys/dev/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 09:12:48 -0000 Author: mav Date: Fri Jul 16 09:12:47 2010 New Revision: 210164 URL: http://svn.freebsd.org/changeset/base/210164 Log: MFC r209664: Add ata(4) ability to limit initial ATA mode for devices via device hints. After boot this mode can be changed with atacontrol/camcontrol as usual. It works for both legacy and ATA_CAM wrapper mode. PR: kern/123980 Modified: stable/8/sys/dev/ata/ata-all.c stable/8/sys/dev/ata/ata-all.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ata/ata-all.c ============================================================================== --- stable/8/sys/dev/ata/ata-all.c Fri Jul 16 09:10:11 2010 (r210163) +++ stable/8/sys/dev/ata/ata-all.c Fri Jul 16 09:12:47 2010 (r210164) @@ -133,7 +133,9 @@ ata_attach(device_t dev) int error, rid; #ifdef ATA_CAM struct cam_devq *devq; - int i; + const char *res; + char buf[64]; + int i, mode; #endif /* check that we have a virgin channel to attach */ @@ -152,6 +154,17 @@ ata_attach(device_t dev) #ifdef ATA_CAM for (i = 0; i < 16; i++) { ch->user[i].mode = 0; + snprintf(buf, sizeof(buf), "dev%d.mode", i); + if (resource_string_value(device_get_name(dev), + device_get_unit(dev), buf, &res) == 0) + mode = ata_str2mode(res); + else if (resource_string_value(device_get_name(dev), + device_get_unit(dev), "mode", &res) == 0) + mode = ata_str2mode(res); + else + mode = -1; + if (mode >= 0) + ch->user[i].mode = mode; if (ch->flags & ATA_SATA) ch->user[i].bytecount = 8192; else @@ -826,8 +839,10 @@ ata_getparam(struct ata_device *atadev, { struct ata_channel *ch = device_get_softc(device_get_parent(atadev->dev)); struct ata_request *request; + const char *res; + char buf[64]; u_int8_t command = 0; - int error = ENOMEM, retries = 2; + int error = ENOMEM, retries = 2, mode = -1; if (ch->devices & (ATA_ATA_MASTER << atadev->unit)) command = ATA_ATA_IDENTIFY; @@ -907,6 +922,15 @@ ata_getparam(struct ata_device *atadev, ata_wmode(&atadev->param) > 0)) atadev->mode = ATA_DMA_MAX; } + snprintf(buf, sizeof(buf), "dev%d.mode", atadev->unit); + if (resource_string_value(device_get_name(ch->dev), + device_get_unit(ch->dev), buf, &res) == 0) + mode = ata_str2mode(res); + else if (resource_string_value(device_get_name(ch->dev), + device_get_unit(ch->dev), "mode", &res) == 0) + mode = ata_str2mode(res); + if (mode >= 0) + atadev->mode = mode; } } else { @@ -1163,6 +1187,35 @@ ata_mode2str(int mode) } } +int +ata_str2mode(const char *str) +{ + + if (!strcasecmp(str, "PIO0")) return (ATA_PIO0); + if (!strcasecmp(str, "PIO1")) return (ATA_PIO1); + if (!strcasecmp(str, "PIO2")) return (ATA_PIO2); + if (!strcasecmp(str, "PIO3")) return (ATA_PIO3); + if (!strcasecmp(str, "PIO4")) return (ATA_PIO4); + if (!strcasecmp(str, "WDMA0")) return (ATA_WDMA0); + if (!strcasecmp(str, "WDMA1")) return (ATA_WDMA1); + if (!strcasecmp(str, "WDMA2")) return (ATA_WDMA2); + if (!strcasecmp(str, "UDMA0")) return (ATA_UDMA0); + if (!strcasecmp(str, "UDMA16")) return (ATA_UDMA0); + if (!strcasecmp(str, "UDMA1")) return (ATA_UDMA1); + if (!strcasecmp(str, "UDMA25")) return (ATA_UDMA1); + if (!strcasecmp(str, "UDMA2")) return (ATA_UDMA2); + if (!strcasecmp(str, "UDMA33")) return (ATA_UDMA2); + if (!strcasecmp(str, "UDMA3")) return (ATA_UDMA3); + if (!strcasecmp(str, "UDMA44")) return (ATA_UDMA3); + if (!strcasecmp(str, "UDMA4")) return (ATA_UDMA4); + if (!strcasecmp(str, "UDMA66")) return (ATA_UDMA4); + if (!strcasecmp(str, "UDMA5")) return (ATA_UDMA5); + if (!strcasecmp(str, "UDMA100")) return (ATA_UDMA5); + if (!strcasecmp(str, "UDMA6")) return (ATA_UDMA6); + if (!strcasecmp(str, "UDMA133")) return (ATA_UDMA6); + return (-1); +} + const char * ata_satarev2str(int rev) { Modified: stable/8/sys/dev/ata/ata-all.h ============================================================================== --- stable/8/sys/dev/ata/ata-all.h Fri Jul 16 09:10:11 2010 (r210163) +++ stable/8/sys/dev/ata/ata-all.h Fri Jul 16 09:12:47 2010 (r210164) @@ -625,6 +625,7 @@ void ata_modify_if_48bit(struct ata_requ void ata_udelay(int interval); char *ata_unit2str(struct ata_device *atadev); const char *ata_mode2str(int mode); +int ata_str2mode(const char *str); const char *ata_satarev2str(int rev); int ata_atapi(device_t dev, int target); int ata_pmode(struct ata_params *ap); From owner-svn-src-all@FreeBSD.ORG Fri Jul 16 10:03:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4DE9B106566C; Fri, 16 Jul 2010 10:03:25 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from mx0.hoeg.nl (unknown [IPv6:2a01:4f8:101:5343::aa]) by mx1.freebsd.org (Postfix) with ESMTP id D97248FC0C; Fri, 16 Jul 2010 10:03:24 +0000 (UTC) Received: by mx0.hoeg.nl (Postfix, from userid 1000) id 196A72A28CDE; Fri, 16 Jul 2010 12:03:24 +0200 (CEST) Date: Fri, 16 Jul 2010 12:03:24 +0200 From: Ed Schouten To: Roman Divacky Message-ID: <20100716100324.GM1742@hoeg.nl> References: <201007151706.o6FH6Chx047561@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="tR2cvQ13k2aMxNOa" Content-Disposition: inline In-Reply-To: <201007151706.o6FH6Chx047561@svn.freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-vendor@freebsd.org Subject: Re: svn commit: r210127 - in vendor/llvm/dist: . docs include/llvm include/llvm/ADT include/llvm/CodeGen include/llvm/MC/MCParser include/llvm/Support include/llvm/Target lib/Analysis lib/AsmParser lib... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 10:03:25 -0000 --tR2cvQ13k2aMxNOa Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Roman Divacky wrote: > Update LLVM to r108428. Either properly tag the import or revert it. I think I've mentioned this over a dozen times that imports MUST be tagged. --=20 Ed Schouten WWW: http://80386.nl/ --tR2cvQ13k2aMxNOa Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (FreeBSD) iEUEARECAAYFAkxALmwACgkQ52SDGA2eCwWQsACSAoDVZ0SPBVm7hRrOaIU32RaT 6wCbB0SVQYhlmGwTD5FZPPX0Ja9O188= =nLf3 -----END PGP SIGNATURE----- --tR2cvQ13k2aMxNOa-- From owner-svn-src-all@FreeBSD.ORG Fri Jul 16 10:05:00 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BCA13106566B; Fri, 16 Jul 2010 10:05:00 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AC4918FC15; Fri, 16 Jul 2010 10:05:00 +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 o6GA50qR074305; Fri, 16 Jul 2010 10:05:00 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6GA50vl074303; Fri, 16 Jul 2010 10:05:00 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007161005.o6GA50vl074303@svn.freebsd.org> From: Alexander Motin Date: Fri, 16 Jul 2010 10:05:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210165 - head/sys/dev/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 10:05:00 -0000 Author: mav Date: Fri Jul 16 10:05:00 2010 New Revision: 210165 URL: http://svn.freebsd.org/changeset/base/210165 Log: Improve interrupt setup errors handling. Modified: head/sys/dev/ata/ata-pci.c Modified: head/sys/dev/ata/ata-pci.c ============================================================================== --- head/sys/dev/ata/ata-pci.c Fri Jul 16 09:12:47 2010 (r210164) +++ head/sys/dev/ata/ata-pci.c Fri Jul 16 10:05:00 2010 (r210165) @@ -806,17 +806,23 @@ ata_setup_interrupt(device_t dev, void * if (msi && pci_msi_count(dev) > 0 && pci_alloc_msi(dev, &msi) == 0) { ctlr->r_irq_rid = 0x1; } else { + msi = 0; ctlr->r_irq_rid = ATA_IRQ_RID; } if (!(ctlr->r_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &ctlr->r_irq_rid, RF_SHAREABLE | RF_ACTIVE))) { device_printf(dev, "unable to map interrupt\n"); + if (msi) + pci_release_msi(dev); return ENXIO; } if ((bus_setup_intr(dev, ctlr->r_irq, ATA_INTR_FLAGS, NULL, intr_func, ctlr, &ctlr->handle))) { - /* SOS XXX release r_irq */ device_printf(dev, "unable to setup interrupt\n"); + bus_release_resource(dev, + SYS_RES_IRQ, ctlr->r_irq_rid, ctlr->r_irq); + if (msi) + pci_release_msi(dev); return ENXIO; } } From owner-svn-src-all@FreeBSD.ORG Fri Jul 16 12:35:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C63821065674; Fri, 16 Jul 2010 12:35:08 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [IPv6:2001:4068:10::3]) by mx1.freebsd.org (Postfix) with ESMTP id 54EB48FC18; Fri, 16 Jul 2010 12:35:08 +0000 (UTC) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 5107341C758; Fri, 16 Jul 2010 14:35:07 +0200 (CEST) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([192.168.74.103]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id IYg88a3xHmRz; Fri, 16 Jul 2010 14:35:06 +0200 (CEST) Received: by mail.cksoft.de (Postfix, from userid 66) id EA6AD41C74D; Fri, 16 Jul 2010 14:35:05 +0200 (CEST) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 357BA4448EC; Fri, 16 Jul 2010 12:30:50 +0000 (UTC) Date: Fri, 16 Jul 2010 12:30:50 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Kostik Belousov In-Reply-To: <20100716080944.GA2381@deviant.kiev.zoral.com.ua> Message-ID: <20100716122932.S14969@maildrop.int.zabbadoz.net> References: <201007152024.o6FKObhM092035@svn.freebsd.org> <20100716064257.S14969@maildrop.int.zabbadoz.net> <20100716080944.GA2381@deviant.kiev.zoral.com.ua> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, John Baldwin Subject: Re: svn commit: r210138 - in head/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 12:35:08 -0000 On Fri, 16 Jul 2010, Kostik Belousov wrote: > On Fri, Jul 16, 2010 at 06:44:39AM +0000, Bjoern A. Zeeb wrote: >> On Thu, 15 Jul 2010, John Baldwin wrote: >> >>> Author: jhb >>> Date: Thu Jul 15 20:24:37 2010 >>> New Revision: 210138 >>> URL: http://svn.freebsd.org/changeset/base/210138 >>> >>> Log: >>> Retire td_syscalls now that it is no longer needed. >>> >>> Modified: >>> head/sys/kern/kern_thread.c >>> head/sys/kern/subr_trap.c >>> head/sys/sys/proc.h >> >> Did you want to leave the field as a placehgolder or add a note >> somewhere that people should do a full recompile because the layout >> changed? > Make depend should do the magic, right ? right, I am more worried about (out of tree) modules. struct thread is basically everywhere with curthread and thread * passed around and modules will not refuse to load as freebsd_version hasn't changed. > I was surprised to see that mips/arm did not touched td_syscalls, and > I wonder how much other bugs are lurking in their implementation. >> >> >>> Modified: head/sys/sys/proc.h >>> ============================================================================== >>> --- head/sys/sys/proc.h Thu Jul 15 19:52:54 2010 (r210137) >>> +++ head/sys/sys/proc.h Thu Jul 15 20:24:37 2010 (r210138) >>> @@ -296,7 +296,6 @@ struct thread { >>> struct mdthread td_md; /* (k) Any machine-dependent fields. >>> */ >>> struct td_sched *td_sched; /* (*) Scheduler-specific data. */ >>> struct kaudit_record *td_ar; /* (k) Active audit record, if any. >>> */ >>> - int td_syscalls; /* per-thread syscall count (used by >>> NFS :)) */ >>> struct lpohead td_lprof[2]; /* (a) lock profiling objects. */ >>> struct kdtrace_thread *td_dtrace; /* (*) DTrace-specific data. */ >>> int td_errno; /* Error returned by last syscall. */ >>> >> >> -- >> Bjoern A. Zeeb From August on I will have a life. It's now up to you >> to do the maths and count to 64. -- Bondorf, Germany, 14th June 2010 > -- Bjoern A. Zeeb From August on I will have a life. It's now up to you to do the maths and count to 64. -- Bondorf, Germany, 14th June 2010 From owner-svn-src-all@FreeBSD.ORG Fri Jul 16 12:35:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3938E106564A; Fri, 16 Jul 2010 12:35:29 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 0B03A8FC0A; Fri, 16 Jul 2010 12:35:29 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 993C246B8B; Fri, 16 Jul 2010 08:35:28 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id CF9788A03C; Fri, 16 Jul 2010 08:35:27 -0400 (EDT) From: John Baldwin To: Warner Losh Date: Fri, 16 Jul 2010 07:51:22 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20100217; KDE/4.4.5; amd64; ; ) References: <201007152332.o6FNWrbN034547@svn.freebsd.org> In-Reply-To: <201007152332.o6FNWrbN034547@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201007160751.22355.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Fri, 16 Jul 2010 08:35:27 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r210151 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 12:35:29 -0000 On Thursday, July 15, 2010 7:32:53 pm Warner Losh wrote: > Author: imp > Date: Thu Jul 15 23:32:53 2010 > New Revision: 210151 > URL: http://svn.freebsd.org/changeset/base/210151 > > Log: > Simple compatibility hacks for building on older systems where > MACHINE_CPUARCH isn't defined. I believe that this will cover all > options. > > I didn't define it in kern.mk because $M is set to MACHINE_CPUARCH and > then is expanded for the genassym.o rule in kern.post.mk and kern.mk > is included after this, so the expansion isn't quite right. I think > this is a bug in make, but don't have the time to track it to ground > (and even if I did, fixing it would require a MFC of the change to the > very old systems we're targetting with this fix). Thanks! -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Fri Jul 16 12:56:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6AC511065673; Fri, 16 Jul 2010 12:56:35 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 3A1058FC24; Fri, 16 Jul 2010 12:56:35 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id DA93946B86; Fri, 16 Jul 2010 08:56:34 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 7AC028A03C; Fri, 16 Jul 2010 08:56:33 -0400 (EDT) From: John Baldwin To: "Bjoern A. Zeeb" Date: Fri, 16 Jul 2010 08:50:52 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20100217; KDE/4.4.5; amd64; ; ) References: <201007152024.o6FKObhM092035@svn.freebsd.org> <20100716080944.GA2381@deviant.kiev.zoral.com.ua> <20100716122932.S14969@maildrop.int.zabbadoz.net> In-Reply-To: <20100716122932.S14969@maildrop.int.zabbadoz.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201007160850.52601.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Fri, 16 Jul 2010 08:56:33 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Kostik Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r210138 - in head/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 12:56:35 -0000 On Friday, July 16, 2010 8:30:50 am Bjoern A. Zeeb wrote: > On Fri, 16 Jul 2010, Kostik Belousov wrote: > > > On Fri, Jul 16, 2010 at 06:44:39AM +0000, Bjoern A. Zeeb wrote: > >> On Thu, 15 Jul 2010, John Baldwin wrote: > >> > >>> Author: jhb > >>> Date: Thu Jul 15 20:24:37 2010 > >>> New Revision: 210138 > >>> URL: http://svn.freebsd.org/changeset/base/210138 > >>> > >>> Log: > >>> Retire td_syscalls now that it is no longer needed. > >>> > >>> Modified: > >>> head/sys/kern/kern_thread.c > >>> head/sys/kern/subr_trap.c > >>> head/sys/sys/proc.h > >> > >> Did you want to leave the field as a placehgolder or add a note > >> somewhere that people should do a full recompile because the layout > >> changed? > > Make depend should do the magic, right ? > > right, I am more worried about (out of tree) modules. struct thread > is basically everywhere with curthread and thread * passed around and > modules will not refuse to load as freebsd_version hasn't changed. I could bump the version perhaps as those are cheap, but we generally don't care about preserving KBI in HEAD. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Fri Jul 16 14:31:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA5471065672; Fri, 16 Jul 2010 14:31:24 +0000 (UTC) (envelope-from ivoras@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C93A18FC0C; Fri, 16 Jul 2010 14:31:24 +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 o6GEVOxC034779; Fri, 16 Jul 2010 14:31:24 GMT (envelope-from ivoras@svn.freebsd.org) Received: (from ivoras@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6GEVOM6034778; Fri, 16 Jul 2010 14:31:24 GMT (envelope-from ivoras@svn.freebsd.org) Message-Id: <201007161431.o6GEVOM6034778@svn.freebsd.org> From: Ivan Voras Date: Fri, 16 Jul 2010 14:31:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210166 - stable/8/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 14:31:25 -0000 Author: ivoras Date: Fri Jul 16 14:31:24 2010 New Revision: 210166 URL: http://svn.freebsd.org/changeset/base/210166 Log: MFC r208982,r208983,r210117 : cosmetic changes to kern.sched.topology_spec XML Modified: stable/8/sys/kern/sched_ule.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/kern/sched_ule.c ============================================================================== --- stable/8/sys/kern/sched_ule.c Fri Jul 16 10:05:00 2010 (r210165) +++ stable/8/sys/kern/sched_ule.c Fri Jul 16 14:31:24 2010 (r210166) @@ -2658,14 +2658,16 @@ sysctl_kern_sched_topology_spec_internal } sbuf_printf(sb, "\n"); - sbuf_printf(sb, "%*s ", indent, ""); if (cg->cg_flags != 0) { + sbuf_printf(sb, "%*s ", indent, ""); if ((cg->cg_flags & CG_FLAG_HTT) != 0) - sbuf_printf(sb, "HTT group\n"); + sbuf_printf(sb, "HTT group"); + if ((cg->cg_flags & CG_FLAG_THREAD) != 0) + sbuf_printf(sb, "THREAD group"); if ((cg->cg_flags & CG_FLAG_SMT) != 0) - sbuf_printf(sb, "SMT group\n"); + sbuf_printf(sb, "SMT group"); + sbuf_printf(sb, "\n"); } - sbuf_printf(sb, "\n"); if (cg->cg_children > 0) { sbuf_printf(sb, "%*s \n", indent, ""); From owner-svn-src-all@FreeBSD.ORG Fri Jul 16 17:01:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 20929106566B; Fri, 16 Jul 2010 17:01:37 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0C9838FC0A; Fri, 16 Jul 2010 17:01:37 +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 o6GH1b1n067708; Fri, 16 Jul 2010 17:01:37 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6GH1bKh067704; Fri, 16 Jul 2010 17:01:37 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201007161701.o6GH1bKh067704@svn.freebsd.org> From: Ed Maste Date: Fri, 16 Jul 2010 17:01:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210167 - head/share/doc/psd/15.yacc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 17:01:37 -0000 Author: emaste Date: Fri Jul 16 17:01:36 2010 New Revision: 210167 URL: http://svn.freebsd.org/changeset/base/210167 Log: Rename documentation source files to avoid filesystem case and restricted filename issues when checking out the source on other operating systems. I've verified the generated paper.ascii is identical before and after the change. Added: head/share/doc/psd/15.yacc/ss10 - copied unchanged from r210153, head/share/doc/psd/15.yacc/ssA head/share/doc/psd/15.yacc/ss11 - copied unchanged from r210153, head/share/doc/psd/15.yacc/ssB head/share/doc/psd/15.yacc/ss_ - copied unchanged from r210153, head/share/doc/psd/15.yacc/ss.. Deleted: head/share/doc/psd/15.yacc/ss.. head/share/doc/psd/15.yacc/ssA head/share/doc/psd/15.yacc/ssB Modified: head/share/doc/psd/15.yacc/Makefile Modified: head/share/doc/psd/15.yacc/Makefile ============================================================================== --- head/share/doc/psd/15.yacc/Makefile Fri Jul 16 14:31:24 2010 (r210166) +++ head/share/doc/psd/15.yacc/Makefile Fri Jul 16 17:01:36 2010 (r210167) @@ -2,8 +2,8 @@ # $FreeBSD$ VOLUME= psd/15.yacc -SRCS= stubs ss.. ss0 ss1 ss2 ss3 ss4 ss5 ss6 ss7 ss8 ss9 \ - ssA ssB ssa ssb ssc ssd +SRCS= stubs ss_ ss0 ss1 ss2 ss3 ss4 ss5 ss6 ss7 ss8 ss9 \ + ss10 ss11 ssa ssb ssc ssd EXTRA= ref.bib MACROS= -ms USE_REFER= Copied: head/share/doc/psd/15.yacc/ss10 (from r210153, head/share/doc/psd/15.yacc/ssA) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/doc/psd/15.yacc/ss10 Fri Jul 16 17:01:36 2010 (r210167, copy of r210153, head/share/doc/psd/15.yacc/ssA) @@ -0,0 +1,221 @@ +.\" Copyright (C) Caldera International Inc. 2001-2002. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions are +.\" met: +.\" +.\" Redistributions of source code and documentation must retain the above +.\" copyright notice, this list of conditions and the following +.\" disclaimer. +.\" +.\" 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. +.\" +.\" All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" +.\" This product includes software developed or owned by Caldera +.\" International, Inc. Neither the name of Caldera International, Inc. +.\" nor the names of other contributors may be used to endorse or promote +.\" products derived from this software without specific prior written +.\" permission. +.\" +.\" USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA +.\" INTERNATIONAL, INC. 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 CALDERA INTERNATIONAL, INC. 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) RISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.\" @(#)ssA 8.1 (Berkeley) 6/8/93 +.\" +.\" $FreeBSD$ +.SH +10: Advanced Topics +.PP +This section discusses a number of advanced features +of Yacc. +.SH +Simulating Error and Accept in Actions +.PP +The parsing actions of error and accept can be simulated +in an action by use of macros YYACCEPT and YYERROR. +YYACCEPT causes +.I yyparse +to return the value 0; +YYERROR causes +the parser to behave as if the current input symbol +had been a syntax error; +.I yyerror +is called, and error recovery takes place. +These mechanisms can be used to simulate parsers +with multiple endmarkers or context-sensitive syntax checking. +.SH +Accessing Values in Enclosing Rules. +.PP +An action may refer to values +returned by actions to the left of the current rule. +The mechanism is simply the same as with ordinary actions, +a dollar sign followed by a digit, but in this case the +digit may be 0 or negative. +Consider +.DS +sent : adj noun verb adj noun + { \fIlook at the sentence\fR . . . } + ; + +adj : THE { $$ = THE; } + | YOUNG { $$ = YOUNG; } + . . . + ; + +noun : DOG + { $$ = DOG; } + | CRONE + { if( $0 == YOUNG ){ + printf( "what?\en" ); + } + $$ = CRONE; + } + ; + . . . +.DE +In the action following the word CRONE, a check is made that the +preceding token shifted was not YOUNG. +Obviously, this is only possible when a great deal is known about +what might precede the symbol +.I noun +in the input. +There is also a distinctly unstructured flavor about this. +Nevertheless, at times this mechanism will save a great +deal of trouble, especially when a few combinations are to +be excluded from an otherwise regular structure. +.SH +Support for Arbitrary Value Types +.PP +By default, the values returned by actions and the lexical analyzer are integers. +Yacc can also support +values of other types, including structures. +In addition, Yacc keeps track of the types, and inserts +appropriate union member names so that the resulting parser will +be strictly type checked. +The Yacc value stack (see Section 4) +is declared to be a +.I union +of the various types of values desired. +The user declares the union, and associates union member names +to each token and nonterminal symbol having a value. +When the value is referenced through a $$ or $n construction, +Yacc will automatically insert the appropriate union name, so that +no unwanted conversions will take place. +In addition, type checking commands such as +.I Lint\| +.[ +Johnson Lint Checker 1273 +.] +will be far more silent. +.PP +There are three mechanisms used to provide for this typing. +First, there is a way of defining the union; this must be +done by the user since other programs, notably the lexical analyzer, +must know about the union member names. +Second, there is a way of associating a union member name with tokens +and nonterminals. +Finally, there is a mechanism for describing the type of those +few values where Yacc can not easily determine the type. +.PP +To declare the union, the user includes in the declaration section: +.DS +%union { + body of union ... + } +.DE +This declares the Yacc value stack, +and the external variables +.I yylval +and +.I yyval , +to have type equal to this union. +If Yacc was invoked with the +.B \-d +option, the union declaration +is copied onto the +.I y.tab.h +file. +Alternatively, +the union may be declared in a header file, and a typedef +used to define the variable YYSTYPE to represent +this union. +Thus, the header file might also have said: +.DS +typedef union { + body of union ... + } YYSTYPE; +.DE +The header file must be included in the declarations +section, by use of %{ and %}. +.PP +Once YYSTYPE is defined, +the union member names must be associated +with the various terminal and nonterminal names. +The construction +.DS +< name > +.DE +is used to indicate a union member name. +If this follows +one of the +keywords %token, +%left, %right, and %nonassoc, +the union member name is associated with the tokens listed. +Thus, saying +.DS +%left \'+\' \'\-\' +.DE +will cause any reference to values returned by these two tokens to be +tagged with +the union member name +.I optype . +Another keyword, %type, is +used similarly to associate +union member names with nonterminals. +Thus, one might say +.DS +%type expr stat +.DE +.PP +There remain a couple of cases where these mechanisms are insufficient. +If there is an action within a rule, the value returned +by this action has no +.I "a priori" +type. +Similarly, reference to left context values (such as $0 \- see the +previous subsection ) leaves Yacc with no easy way of knowing the type. +In this case, a type can be imposed on the reference by inserting +a union member name, between < and >, immediately after +the first $. +An example of this usage is +.DS +rule : aaa { $$ = 3; } bbb + { fun( $2, $0 ); } + ; +.DE +This syntax has little to recommend it, but the situation arises rarely. +.PP +A sample specification is given in Appendix C. +The facilities in this subsection are not triggered until they are used: +in particular, the use of %type will turn on these mechanisms. +When they are used, there is a fairly strict level of checking. +For example, use of $n or $$ to refer to something with no defined type +is diagnosed. +If these facilities are not triggered, the Yacc value stack is used to +hold +.I int' s, +as was true historically. Copied: head/share/doc/psd/15.yacc/ss11 (from r210153, head/share/doc/psd/15.yacc/ssB) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/doc/psd/15.yacc/ss11 Fri Jul 16 17:01:36 2010 (r210167, copy of r210153, head/share/doc/psd/15.yacc/ssB) @@ -0,0 +1,63 @@ +.\" Copyright (C) Caldera International Inc. 2001-2002. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions are +.\" met: +.\" +.\" Redistributions of source code and documentation must retain the above +.\" copyright notice, this list of conditions and the following +.\" disclaimer. +.\" +.\" 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. +.\" +.\" All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" +.\" This product includes software developed or owned by Caldera +.\" International, Inc. Neither the name of Caldera International, Inc. +.\" nor the names of other contributors may be used to endorse or promote +.\" products derived from this software without specific prior written +.\" permission. +.\" +.\" USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA +.\" INTERNATIONAL, INC. 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 CALDERA INTERNATIONAL, INC. 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) RISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.\" @(#)ssB 8.1 (Berkeley) 6/8/93 +.\" +.\" $FreeBSD$ +.SH +11: Acknowledgements +.PP +Yacc owes much to a +most stimulating collection of users, who have goaded +me beyond my inclination, and frequently beyond my +ability, in their endless search for ``one more feature''. +Their irritating unwillingness to learn how to +do things my way has usually led to my doing things their way; +most of the time, they have been right. +B. W. Kernighan, P. J. Plauger, S. I. Feldman, C. Imagna, +M. E. Lesk, +and A. Snyder will recognize some of their ideas in the current version +of Yacc. +C. B. Haley contributed to the error recovery algorithm. +D. M. Ritchie, B. W. Kernighan, and M. O. Harris helped translate this document into English. +Al Aho also deserves special credit for bringing +the mountain to Mohammed, and other favors. +.\" .SG "MH-1273-SCJ-unix" +.bp +.[ +$LIST$ +.] +.bp Copied: head/share/doc/psd/15.yacc/ss_ (from r210153, head/share/doc/psd/15.yacc/ss..) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/doc/psd/15.yacc/ss_ Fri Jul 16 17:01:36 2010 (r210167, copy of r210153, head/share/doc/psd/15.yacc/ss..) @@ -0,0 +1,94 @@ +.\" Copyright (C) Caldera International Inc. 2001-2002. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions are +.\" met: +.\" +.\" Redistributions of source code and documentation must retain the above +.\" copyright notice, this list of conditions and the following +.\" disclaimer. +.\" +.\" 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. +.\" +.\" All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" +.\" This product includes software developed or owned by Caldera +.\" International, Inc. Neither the name of Caldera International, Inc. +.\" nor the names of other contributors may be used to endorse or promote +.\" products derived from this software without specific prior written +.\" permission. +.\" +.\" USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA +.\" INTERNATIONAL, INC. 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 CALDERA INTERNATIONAL, INC. 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) RISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.\" @(#)ss.. 8.1 (Berkeley) 6/8/93 +.\" +.\" $FreeBSD$ +.EH 'PSD:15-%''Yacc: Yet Another Compiler-Compiler' +.OH 'Yacc: Yet Another Compiler-Compiler''PSD:15-%' +.\".RP +.ND "July 31, 1978" +.TL +Yacc: +Yet Another Compiler-Compiler +.AU "MH 2C-559" 3968 +Stephen C. Johnson +AT&T Bell Laboratories +Murray Hill, New Jersey 07974 +.AI +.AB +.PP +Computer program input generally has some structure; +in fact, every computer program that does input can be thought of as defining +an ``input language'' which it accepts. +An input language may be as complex as a programming language, or as simple as +a sequence of numbers. +Unfortunately, usual input facilities +are limited, difficult to use, +and often are lax about checking their inputs for validity. +.PP +Yacc provides a general tool for describing +the input to a computer program. +The Yacc user specifies the structures +of his input, together with code to be invoked as +each such structure is recognized. +Yacc turns such a specification into a subroutine that +handles the input process; +frequently, it is convenient and appropriate to have most +of the flow of control in the user's application +handled by this subroutine. +.PP +The input subroutine produced by Yacc calls a user-supplied routine to +return the next basic input item. +Thus, the user can specify his input in terms of individual input characters, or +in terms of higher level constructs such as names and numbers. +The user-supplied routine may also handle idiomatic features such as +comment and continuation conventions, which typically defy easy grammatical specification. +.PP +Yacc is written in portable C. +The class of specifications accepted is a very general one: LALR(1) +grammars with disambiguating rules. +.PP +In addition to compilers for C, APL, Pascal, RATFOR, etc., Yacc +has also been used for less conventional languages, +including a phototypesetter language, several desk calculator languages, a document retrieval system, +and a Fortran debugging system. +.AE +.\" .OK +.\"Computer Languages +.\"Compilers +.\"Formal Language Theory +.\" .CS 23 11 34 0 0 8 From owner-svn-src-all@FreeBSD.ORG Fri Jul 16 17:27:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4EA6E106566B; Fri, 16 Jul 2010 17:27:44 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3CEF78FC17; Fri, 16 Jul 2010 17:27:44 +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 o6GHRh9N073477; Fri, 16 Jul 2010 17:27:43 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6GHRh33073475; Fri, 16 Jul 2010 17:27:43 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007161727.o6GHRh33073475@svn.freebsd.org> From: Alexander Motin Date: Fri, 16 Jul 2010 17:27:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210168 - head/sys/dev/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 17:27:44 -0000 Author: mav Date: Fri Jul 16 17:27:43 2010 New Revision: 210168 URL: http://svn.freebsd.org/changeset/base/210168 Log: Make legacy ATA emulation detection more strict. This should fix false positive legacy detection and attach failure/panic for Marvell 88SX6141 controller and potentially some others. PR: kern/145064 Modified: head/sys/dev/ata/ata-pci.c Modified: head/sys/dev/ata/ata-pci.c ============================================================================== --- head/sys/dev/ata/ata-pci.c Fri Jul 16 17:01:36 2010 (r210167) +++ head/sys/dev/ata/ata-pci.c Fri Jul 16 17:27:43 2010 (r210168) @@ -769,7 +769,8 @@ DRIVER_MODULE(ata, atapci, ata_pcichanne int ata_legacy(device_t dev) { - return (((pci_read_config(dev, PCIR_PROGIF, 1)&PCIP_STORAGE_IDE_MASTERDEV)&& + return (((pci_read_config(dev, PCIR_SUBCLASS, 1) == PCIS_STORAGE_IDE) && + (pci_read_config(dev, PCIR_PROGIF, 1)&PCIP_STORAGE_IDE_MASTERDEV)&& ((pci_read_config(dev, PCIR_PROGIF, 1) & (PCIP_STORAGE_IDE_MODEPRIM | PCIP_STORAGE_IDE_MODESEC)) != (PCIP_STORAGE_IDE_MODEPRIM | PCIP_STORAGE_IDE_MODESEC))) || From owner-svn-src-all@FreeBSD.ORG Fri Jul 16 18:06:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 18CD1106566C; Fri, 16 Jul 2010 18:06:20 +0000 (UTC) (envelope-from jsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E17638FC0C; Fri, 16 Jul 2010 18:06: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 o6GI6Jga081971; Fri, 16 Jul 2010 18:06:19 GMT (envelope-from jsa@svn.freebsd.org) Received: (from jsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6GI6JOS081968; Fri, 16 Jul 2010 18:06:19 GMT (envelope-from jsa@svn.freebsd.org) Message-Id: <201007161806.o6GI6JOS081968@svn.freebsd.org> From: "Joseph S. Atkinson" Date: Fri, 16 Jul 2010 18:06:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210169 - in head: share/misc usr.bin/calendar/calendars X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 18:06:20 -0000 Author: jsa (ports committer) Date: Fri Jul 16 18:06:19 2010 New Revision: 210169 URL: http://svn.freebsd.org/changeset/base/210169 Log: Nervously welcoming myself to the family. Add myself to all the appropriate places, upload my pgp key, and announce my arrival to the FreeBSD world. Approved by: wxs@ (mentor) Modified: head/share/misc/committers-ports.dot head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Fri Jul 16 17:27:43 2010 (r210168) +++ head/share/misc/committers-ports.dot Fri Jul 16 18:06:19 2010 (r210169) @@ -96,6 +96,7 @@ joerg [label="Joerg Wunsch\njoerg@FreeBS johans [label="Johan Selst\njohans@FreeBSD.org\n2006/04/01"] josef [label="Josef El-Rayes\njosef@FreeBSD.org\n2004/12/20"] jpaetzel [label="Josh Paetzel\njpaetzel@FreeBSD.org\n2008/09/05"] +jsa [label="Joseph S. Atkinson\njsa@FreeBSD.org\n2010/07/15"] jylefort [label="Jean-Yves Lefort\njylefort@FreeBSD.org\n2005/04/12"] kevlo [label="Kevin Lo\nkevlo@FreeBSD.org\n2003/02/21"] knu [label="Akinori Musha\nknu@FreeBSD.org\n2000/03/22"] @@ -270,6 +271,8 @@ krion -> sat krion -> sem krion -> sergei +kwm -> jsa + lawrance -> itetcu leeym -> clsung @@ -365,6 +368,7 @@ tmclaugh -> xride will -> lioux +wxs -> jsa wxs -> sahil wxs -> skreuzer Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Fri Jul 16 17:27:43 2010 (r210168) +++ head/usr.bin/calendar/calendars/calendar.freebsd Fri Jul 16 18:06:19 2010 (r210169) @@ -92,6 +92,7 @@ 03/20 MANTANI Nobutaka born in Hiroshima, Japan, 1978 03/20 Cameron Grant died in Hemel Hempstead, United Kingdom, 2005 03/20 Henrik Brix Andersen born in Aarhus, Denmark, 1978 +03/20 Joseph S. Atkinson born in Batesville, Arkansas, United States, 1977 03/22 Brad Davis born in Farmington, New Mexico, United States, 1983 03/23 Daniel C. Sobral born in Brasilia, Distrito Federal, Brazil, 1971 03/23 Benno Rice born in Adelaide, South Australia, Australia, 1977 From owner-svn-src-all@FreeBSD.ORG Fri Jul 16 18:57:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57AA71065672; Fri, 16 Jul 2010 18:57:47 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 476AA8FC13; Fri, 16 Jul 2010 18:57: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 o6GIvlqU093281; Fri, 16 Jul 2010 18:57:47 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6GIvlv0093278; Fri, 16 Jul 2010 18:57:47 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201007161857.o6GIvlv0093278@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 16 Jul 2010 18:57:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210170 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 18:57:47 -0000 Author: kib Date: Fri Jul 16 18:57:45 2010 New Revision: 210170 URL: http://svn.freebsd.org/changeset/base/210170 Log: Welcome Tijl Coosemans to src. Approved by: core Modified: svnadmin/conf/access svnadmin/conf/mentors Modified: svnadmin/conf/access ============================================================================== --- svnadmin/conf/access Fri Jul 16 18:06:19 2010 (r210169) +++ svnadmin/conf/access Fri Jul 16 18:57:45 2010 (r210170) @@ -222,6 +222,7 @@ takawata tanimura thompsa ticso +tijl trasz trhodes truckman Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Fri Jul 16 18:06:19 2010 (r210169) +++ svnadmin/conf/mentors Fri Jul 16 18:57:45 2010 (r210170) @@ -27,5 +27,6 @@ rstone emaste Co-mentor: jkoshy sbruno scottl snb dwmalone sson gnn +tijl kib versus dds will ken From owner-svn-src-all@FreeBSD.ORG Fri Jul 16 19:14:12 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 75E911065677; Fri, 16 Jul 2010 19:14:12 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: Bruce Evans Date: Fri, 16 Jul 2010 15:14:02 -0400 User-Agent: KMail/1.6.2 References: <201007131657.o6DGvq9L097594@svn.freebsd.org> <20100715220012.X1719@delplex.bde.org> In-Reply-To: <20100715220012.X1719@delplex.bde.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201007161514.04955.jkim@FreeBSD.org> Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r210005 - head/sys/modules/acpi/acpi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 19:14:12 -0000 On Thursday 15 July 2010 08:04 am, Bruce Evans wrote: > On Tue, 13 Jul 2010, Jung-uk Kim wrote: > > Log: > > Define SMP unconditionally for amd64 and remove opt_global.h > > from SRCS. Note it is done just for correctness sake because we > > do not build, ship, or support acpi.ko on amd64. > > > > Prodded by: bde > > Thanks. > > It was much more interesting than I noticed. Modules are supposed > to be independent of all configuration options, especially global > ones, especially especially SMP. Perhaps this is too much to ask > for acpi. Does it work now, after you removed an SMP ifdef from it? I removed "#ifdef SMP" from acpi.c because 'smp_started' is available for both UP and SMP kernels. On the other hand, I cannot remove these easily from sys/amd64/acpica/acpi_wakeup.c, i.e., it requires some symbols from sys/amd64/amd64/mp_machdep.c, which are only available in SMP case. FYI, we never had to worry about acpi.ko on i386 because we didn't implement suspend/resume for SMP case in the first place. X-) Jung-uk Kim From owner-svn-src-all@FreeBSD.ORG Fri Jul 16 19:20:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 244FD106566B; Fri, 16 Jul 2010 19:20:21 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 096108FC0C; Fri, 16 Jul 2010 19:20:21 +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 o6GJKKUS098281; Fri, 16 Jul 2010 19:20:20 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6GJKKji098276; Fri, 16 Jul 2010 19:20:20 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201007161920.o6GJKKji098276@svn.freebsd.org> From: John Baldwin Date: Fri, 16 Jul 2010 19:20:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210171 - in head/sys: cddl/contrib/opensolaris/uts/common/fs/zfs fs/cd9660 fs/udf ufs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 19:20:21 -0000 Author: jhb Date: Fri Jul 16 19:20:20 2010 New Revision: 210171 URL: http://svn.freebsd.org/changeset/base/210171 Log: When the MNTK_EXTENDED_SHARED mount option was added, some filesystems were changed to defer the setting of VN_LOCK_ASHARE() (which clears LK_NOSHARE in the vnode lock's flags) until after they had determined if the vnode was a FIFO. This occurs after the vnode has been inserted a VFS hash or some similar table, so it is possible for another thread to find this vnode via vget() on an i-node number and block on the vnode lock. If the lockmgr interlock (vnode interlock for vnode locks) is not held when clearing the LK_NOSHARE flag, then the lk_flags field can be clobbered. As a result the thread blocked on the vnode lock may never get woken up. Fix this by holding the vnode interlock while modifying the lock flags in this case. MFC after: 3 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c head/sys/fs/cd9660/cd9660_vfsops.c head/sys/fs/udf/udf_vfsops.c head/sys/ufs/ffs/ffs_vfsops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Fri Jul 16 18:57:45 2010 (r210170) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Fri Jul 16 19:20:20 2010 (r210171) @@ -566,8 +566,11 @@ zfs_znode_alloc(zfsvfs_t *zfsvfs, dmu_bu } break; } - if (vp->v_type != VFIFO) + if (vp->v_type != VFIFO) { + VI_LOCK(vp); VN_LOCK_ASHARE(vp); + VI_UNLOCK(vp); + } mutex_enter(&zfsvfs->z_znodes_lock); list_insert_tail(&zfsvfs->z_all_znodes, zp); Modified: head/sys/fs/cd9660/cd9660_vfsops.c ============================================================================== --- head/sys/fs/cd9660/cd9660_vfsops.c Fri Jul 16 18:57:45 2010 (r210170) +++ head/sys/fs/cd9660/cd9660_vfsops.c Fri Jul 16 19:20:20 2010 (r210171) @@ -814,7 +814,9 @@ cd9660_vget_internal(mp, ino, flags, vpp vp->v_op = &cd9660_fifoops; break; default: + VI_LOCK(vp); VN_LOCK_ASHARE(vp); + VI_UNLOCK(vp); break; } Modified: head/sys/fs/udf/udf_vfsops.c ============================================================================== --- head/sys/fs/udf/udf_vfsops.c Fri Jul 16 18:57:45 2010 (r210170) +++ head/sys/fs/udf/udf_vfsops.c Fri Jul 16 19:20:20 2010 (r210171) @@ -710,8 +710,11 @@ udf_vget(struct mount *mp, ino_t ino, in break; } - if (vp->v_type != VFIFO) + if (vp->v_type != VFIFO) { + VI_LOCK(vp); VN_LOCK_ASHARE(vp); + VI_UNLOCK(vp); + } if (ino == udf_getid(&udfmp->root_icb)) vp->v_vflag |= VV_ROOT; Modified: head/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vfsops.c Fri Jul 16 18:57:45 2010 (r210170) +++ head/sys/ufs/ffs/ffs_vfsops.c Fri Jul 16 19:20:20 2010 (r210171) @@ -1577,7 +1577,9 @@ ffs_vgetf(mp, ino, flags, vpp, ffs_flags */ if (vp->v_type != VFIFO) { /* FFS supports shared locking for all files except fifos. */ + VI_LOCK(vp); VN_LOCK_ASHARE(vp); + VI_UNLOCK(vp); } /* From owner-svn-src-all@FreeBSD.ORG Fri Jul 16 19:52:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ABCCE1065675; Fri, 16 Jul 2010 19:52:03 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9A98F8FC13; Fri, 16 Jul 2010 19:52:03 +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 o6GJq3sI005396; Fri, 16 Jul 2010 19:52:03 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6GJq3Id005391; Fri, 16 Jul 2010 19:52:03 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201007161952.o6GJq3Id005391@svn.freebsd.org> From: John Baldwin Date: Fri, 16 Jul 2010 19:52:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210172 - in head/sys: cddl/contrib/opensolaris/uts/common/fs/zfs fs/cd9660 fs/udf ufs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 19:52:03 -0000 Author: jhb Date: Fri Jul 16 19:52:03 2010 New Revision: 210172 URL: http://svn.freebsd.org/changeset/base/210172 Log: Revert the previous commit. The race is not applicable to the lockmgr implementation in 8.0 and later as its flags field does not hold dynamic state such as waiters flags, but is only modified in lockinit() aside from VN_LOCK_*(). Discussed with: attilio Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c head/sys/fs/cd9660/cd9660_vfsops.c head/sys/fs/udf/udf_vfsops.c head/sys/ufs/ffs/ffs_vfsops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Fri Jul 16 19:20:20 2010 (r210171) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Fri Jul 16 19:52:03 2010 (r210172) @@ -566,11 +566,8 @@ zfs_znode_alloc(zfsvfs_t *zfsvfs, dmu_bu } break; } - if (vp->v_type != VFIFO) { - VI_LOCK(vp); + if (vp->v_type != VFIFO) VN_LOCK_ASHARE(vp); - VI_UNLOCK(vp); - } mutex_enter(&zfsvfs->z_znodes_lock); list_insert_tail(&zfsvfs->z_all_znodes, zp); Modified: head/sys/fs/cd9660/cd9660_vfsops.c ============================================================================== --- head/sys/fs/cd9660/cd9660_vfsops.c Fri Jul 16 19:20:20 2010 (r210171) +++ head/sys/fs/cd9660/cd9660_vfsops.c Fri Jul 16 19:52:03 2010 (r210172) @@ -814,9 +814,7 @@ cd9660_vget_internal(mp, ino, flags, vpp vp->v_op = &cd9660_fifoops; break; default: - VI_LOCK(vp); VN_LOCK_ASHARE(vp); - VI_UNLOCK(vp); break; } Modified: head/sys/fs/udf/udf_vfsops.c ============================================================================== --- head/sys/fs/udf/udf_vfsops.c Fri Jul 16 19:20:20 2010 (r210171) +++ head/sys/fs/udf/udf_vfsops.c Fri Jul 16 19:52:03 2010 (r210172) @@ -710,11 +710,8 @@ udf_vget(struct mount *mp, ino_t ino, in break; } - if (vp->v_type != VFIFO) { - VI_LOCK(vp); + if (vp->v_type != VFIFO) VN_LOCK_ASHARE(vp); - VI_UNLOCK(vp); - } if (ino == udf_getid(&udfmp->root_icb)) vp->v_vflag |= VV_ROOT; Modified: head/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vfsops.c Fri Jul 16 19:20:20 2010 (r210171) +++ head/sys/ufs/ffs/ffs_vfsops.c Fri Jul 16 19:52:03 2010 (r210172) @@ -1577,9 +1577,7 @@ ffs_vgetf(mp, ino, flags, vpp, ffs_flags */ if (vp->v_type != VFIFO) { /* FFS supports shared locking for all files except fifos. */ - VI_LOCK(vp); VN_LOCK_ASHARE(vp); - VI_UNLOCK(vp); } /* From owner-svn-src-all@FreeBSD.ORG Fri Jul 16 20:23:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 53C8E1065673; Fri, 16 Jul 2010 20:23:25 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 41D998FC0C; Fri, 16 Jul 2010 20:23:25 +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 o6GKNP3l012509; Fri, 16 Jul 2010 20:23:25 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6GKNP18012503; Fri, 16 Jul 2010 20:23:25 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201007162023.o6GKNP18012503@svn.freebsd.org> From: John Baldwin Date: Fri, 16 Jul 2010 20:23:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210173 - in stable/7/sys: cddl/contrib/opensolaris/uts/common/fs/zfs fs/cd9660 fs/udf ufs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 20:23:25 -0000 Author: jhb Date: Fri Jul 16 20:23:24 2010 New Revision: 210173 URL: http://svn.freebsd.org/changeset/base/210173 Log: When the MNTK_EXTENDED_SHARED mount option was added, some filesystems were changed to defer the setting of VN_LOCK_ASHARE() (which clears LK_NOSHARE in the vnode lock's flags) until after they had determined if the vnode was a FIFO. This occurs after the vnode has been inserted into a VFS hash or some similar table, so it is possible for another thread to find this vnode via vget() on an i-node number and block on the vnode lock. If the lockmgr interlock (vnode interlock for vnode locks) is not held when clearing the LK_NOSHARE flag, then the lk_flags field can be clobbered. As a result the thread blocked on the vnode lock may never get woken up. Fix this by holding the vnode interlock while modifying the lock flags in this case. The softupdates code also toggles LK_NOSHARE in one function to close a race with snapshots. Fix this code to grab the interlock while fiddling with lk_flags. Modified: stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c stable/7/sys/fs/cd9660/cd9660_vfsops.c stable/7/sys/fs/udf/udf_vfsops.c stable/7/sys/ufs/ffs/ffs_softdep.c stable/7/sys/ufs/ffs/ffs_vfsops.c Modified: stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c ============================================================================== --- stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Fri Jul 16 19:52:03 2010 (r210172) +++ stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Fri Jul 16 20:23:24 2010 (r210173) @@ -618,8 +618,11 @@ zfs_znode_alloc(zfsvfs_t *zfsvfs, dmu_bu vp->v_op = &zfs_fifoops; break; } - if (vp->v_type != VFIFO) + if (vp->v_type != VFIFO) { + VI_LOCK(vp); VN_LOCK_ASHARE(vp); + VI_UNLOCK(vp); + } mutex_enter(&zfsvfs->z_znodes_lock); list_insert_tail(&zfsvfs->z_all_znodes, zp); Modified: stable/7/sys/fs/cd9660/cd9660_vfsops.c ============================================================================== --- stable/7/sys/fs/cd9660/cd9660_vfsops.c Fri Jul 16 19:52:03 2010 (r210172) +++ stable/7/sys/fs/cd9660/cd9660_vfsops.c Fri Jul 16 20:23:24 2010 (r210173) @@ -821,7 +821,9 @@ cd9660_vget_internal(mp, ino, flags, vpp vp->v_op = &cd9660_fifoops; break; default: - vp->v_vnlock->lk_flags &= ~LK_NOSHARE; + VI_LOCK(vp); + VN_LOCK_ASHARE(vp); + VI_UNLOCK(vp); break; } Modified: stable/7/sys/fs/udf/udf_vfsops.c ============================================================================== --- stable/7/sys/fs/udf/udf_vfsops.c Fri Jul 16 19:52:03 2010 (r210172) +++ stable/7/sys/fs/udf/udf_vfsops.c Fri Jul 16 20:23:24 2010 (r210173) @@ -709,8 +709,11 @@ udf_vget(struct mount *mp, ino_t ino, in break; } - if (vp->v_type != VFIFO) + if (vp->v_type != VFIFO) { + VI_LOCK(vp); VN_LOCK_ASHARE(vp); + VI_UNLOCK(vp); + } if (ino == udf_getid(&udfmp->root_icb)) vp->v_vflag |= VV_ROOT; Modified: stable/7/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- stable/7/sys/ufs/ffs/ffs_softdep.c Fri Jul 16 19:52:03 2010 (r210172) +++ stable/7/sys/ufs/ffs/ffs_softdep.c Fri Jul 16 20:23:24 2010 (r210173) @@ -5291,7 +5291,9 @@ top: return (0); loop: /* While syncing snapshots, we must allow recursive lookups */ + mtx_lock(bp->b_lock.lk_interlock); bp->b_lock.lk_flags |= LK_CANRECURSE; + mtx_unlock(bp->b_lock.lk_interlock); ACQUIRE_LOCK(&lk); /* * As we hold the buffer locked, none of its dependencies @@ -5433,7 +5435,9 @@ loop: /* We reach here only in error and unlocked */ if (error == 0) panic("softdep_sync_metadata: zero error"); + mtx_lock(bp->b_lock.lk_interlock); bp->b_lock.lk_flags &= ~LK_CANRECURSE; + mtx_unlock(bp->b_lock.lk_interlock); bawrite(bp); return (error); } @@ -5445,7 +5449,9 @@ loop: break; } VI_UNLOCK(vp); + mtx_lock(bp->b_lock.lk_interlock); bp->b_lock.lk_flags &= ~LK_CANRECURSE; + mtx_unlock(bp->b_lock.lk_interlock); bawrite(bp); if (nbp != NULL) { bp = nbp; Modified: stable/7/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- stable/7/sys/ufs/ffs/ffs_vfsops.c Fri Jul 16 19:52:03 2010 (r210172) +++ stable/7/sys/ufs/ffs/ffs_vfsops.c Fri Jul 16 20:23:24 2010 (r210173) @@ -1519,7 +1519,9 @@ ffs_vgetf(mp, ino, flags, vpp, ffs_flags */ if (vp->v_type != VFIFO) { /* FFS supports shared locking for all files except fifos. */ + VI_LOCK(vp); VN_LOCK_ASHARE(vp); + VI_UNLOCK(vp); } /* From owner-svn-src-all@FreeBSD.ORG Fri Jul 16 20:28:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1EB3B1065674; Fri, 16 Jul 2010 20:28:46 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0E2B18FC13; Fri, 16 Jul 2010 20:28: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 o6GKSjXf013713; Fri, 16 Jul 2010 20:28:45 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6GKSjn4013711; Fri, 16 Jul 2010 20:28:45 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201007162028.o6GKSjn4013711@svn.freebsd.org> From: John Baldwin Date: Fri, 16 Jul 2010 20:28:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210174 - stable/7/sys/dev/cxgb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 20:28:46 -0000 Author: jhb Date: Fri Jul 16 20:28:45 2010 New Revision: 210174 URL: http://svn.freebsd.org/changeset/base/210174 Log: MFC 185507: Don't manually track statistics. Modified: stable/7/sys/dev/cxgb/cxgb_sge.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/cxgb/cxgb_sge.c ============================================================================== --- stable/7/sys/dev/cxgb/cxgb_sge.c Fri Jul 16 20:23:24 2010 (r210173) +++ stable/7/sys/dev/cxgb/cxgb_sge.c Fri Jul 16 20:28:45 2010 (r210174) @@ -1889,11 +1889,6 @@ t3_free_tx_desc(struct sge_txq *q, int r m_freem_iovec(&txsd->mi); buf_ring_scan(&q->txq_mr, txsd->mi.mi_base, __FILE__, __LINE__); txsd->mi.mi_base = NULL; - /* - * XXX check for cache hit rate here - * - */ - q->port->ifp->if_opackets++; #if defined(DIAGNOSTIC) && 0 if (m_get_priority(txsd->m[0]) != cidx) printf("pri=%d cidx=%d\n", @@ -2515,7 +2510,6 @@ t3_rx_eth(struct adapter *adap, struct s m->m_pkthdr.rcvif = ifp; m->m_pkthdr.header = mtod(m, uint8_t *) + sizeof(*cpl) + ethpad; - ifp->if_ipackets++; #ifndef DISABLE_MBUF_IOVEC m_explode(m); #endif From owner-svn-src-all@FreeBSD.ORG Fri Jul 16 20:42:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 280891065675; Fri, 16 Jul 2010 20:42:21 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1667F8FC12; Fri, 16 Jul 2010 20:42:21 +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 o6GKgKUe016699; Fri, 16 Jul 2010 20:42:20 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6GKgKHJ016694; Fri, 16 Jul 2010 20:42:20 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201007162042.o6GKgKHJ016694@svn.freebsd.org> From: Bruce Cran Date: Fri, 16 Jul 2010 20:42:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210175 - head/usr.sbin/sysinstall X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 20:42:21 -0000 Author: brucec Date: Fri Jul 16 20:42:20 2010 New Revision: 210175 URL: http://svn.freebsd.org/changeset/base/210175 Log: FreeBSD 8 doesn't support kernel PPP or SLIP; remove code for configuring and installing via such devices from sysinstall. Reviewed by: randi Approved by: rrs (mentor) MFC after: 1 month Modified: head/usr.sbin/sysinstall/devices.c head/usr.sbin/sysinstall/install.c head/usr.sbin/sysinstall/menus.c head/usr.sbin/sysinstall/network.c Modified: head/usr.sbin/sysinstall/devices.c ============================================================================== --- head/usr.sbin/sysinstall/devices.c Fri Jul 16 20:28:45 2010 (r210174) +++ head/usr.sbin/sysinstall/devices.c Fri Jul 16 20:42:20 2010 (r210175) @@ -321,14 +321,6 @@ deviceGetAll(void) if (!strncmp(ifptr->ifr_name, "lo", 2)) goto loopend; - /* If we have a slip device, don't register it */ - if (!strncmp(ifptr->ifr_name, "sl", 2)) { - goto loopend; - } - /* And the same for ppp */ - if (!strncmp(ifptr->ifr_name, "tun", 3) || !strncmp(ifptr->ifr_name, "ppp", 3)) { - goto loopend; - } /* Try and find its description */ for (i = 0, descr = NULL; device_names[i].name; i++) { int len = strlen(device_names[i].name); @@ -416,29 +408,6 @@ skipif: } break; - case DEVICE_TYPE_NETWORK: - fd = deviceTry(device_names[i], try, j); - /* The only network devices that you can open this way are serial ones */ - if (fd >= 0) { - char *newdesc, *cp; - - close(fd); - cp = device_names[i].description; - /* Serial devices get a slip and ppp device each, if supported */ - newdesc = safe_malloc(strlen(cp) + 40); - sprintf(newdesc, cp, "SLIP interface", try, j + 1); - deviceRegister("sl0", newdesc, strdup(try), DEVICE_TYPE_NETWORK, TRUE, mediaInitNetwork, - NULL, mediaShutdownNetwork, NULL); - msgDebug("Add mapping for %s to sl0\n", try); - newdesc = safe_malloc(strlen(cp) + 50); - sprintf(newdesc, cp, "PPP interface", try, j + 1); - deviceRegister("ppp0", newdesc, strdup(try), DEVICE_TYPE_NETWORK, TRUE, mediaInitNetwork, - NULL, mediaShutdownNetwork, NULL); - if (isDebug()) - msgDebug("Add mapping for %s to ppp0\n", try); - } - break; - default: break; } Modified: head/usr.sbin/sysinstall/install.c ============================================================================== --- head/usr.sbin/sysinstall/install.c Fri Jul 16 20:28:45 2010 (r210174) +++ head/usr.sbin/sysinstall/install.c Fri Jul 16 20:42:20 2010 (r210175) @@ -692,7 +692,7 @@ nodisks: "may do so by typing: /usr/sbin/sysinstall."); } if (mediaDevice->type != DEVICE_TYPE_FTP && mediaDevice->type != DEVICE_TYPE_NFS) { - if (!msgYesNo("Would you like to configure any Ethernet or SLIP/PPP network devices?")) { + if (!msgYesNo("Would you like to configure any Ethernet network devices?")) { Device *tmp = tcpDeviceSelect(); if (tmp && !((DevInfo *)tmp->private)->use_dhcp && !msgYesNo("Would you like to bring the %s interface up right now?", tmp->name)) Modified: head/usr.sbin/sysinstall/menus.c ============================================================================== --- head/usr.sbin/sysinstall/menus.c Fri Jul 16 20:28:45 2010 (r210174) +++ head/usr.sbin/sysinstall/menus.c Fri Jul 16 20:42:20 2010 (r210175) @@ -882,13 +882,8 @@ DMenu MenuMediaFTP = { DMenu MenuNetworkDevice = { DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS, "Network interface information required", - "If you are using PPP over a serial device, as opposed to a direct\n" - "ethernet connection, then you may first need to dial your Internet\n" - "Service Provider using the ppp utility we provide for that purpose.\n" - "If you're using SLIP over a serial device then the expectation is\n" - "that you have a HARDWIRED connection.\n\n" - "You can also install over a parallel port using a special \"laplink\"\n" - "cable to another machine running FreeBSD.", + "Please select the ethernet device to configure.\n\n" + "", "Press F1 to read network configuration manual", "network_device", { { NULL } }, Modified: head/usr.sbin/sysinstall/network.c ============================================================================== --- head/usr.sbin/sysinstall/network.c Fri Jul 16 20:28:45 2010 (r210174) +++ head/usr.sbin/sysinstall/network.c Fri Jul 16 20:42:20 2010 (r210175) @@ -45,9 +45,6 @@ #include static Boolean networkInitialized; -static pid_t startPPP(Device *devp); - -static pid_t pppPID; Boolean mediaInitNetwork(Device *dev) @@ -73,56 +70,6 @@ mediaInitNetwork(Device *dev) w = savescr(); dialog_clear_norefresh(); - /* Old PPP process lying around? */ - if (pppPID) { - msgConfirm("Killing previous PPP process %d.", pppPID); - kill(pppPID, SIGTERM); - pppPID = 0; - } - if (!strncmp("ppp", dev->name, 3)) { /* PPP? */ - if (!(pppPID = startPPP(dev))) { - msgConfirm("Unable to start PPP! This installation method cannot be used."); - return FALSE; - } - networkInitialized = TRUE; - return TRUE; - } - else if (!strncmp("sl", dev->name, 2)) { /* SLIP? */ - char *val; - char attach[256]; - - /* Cheesy slip attach */ - snprintf(attach, 256, "slattach -a -h -l -s 9600 %s", dev->devname); - val = msgGetInput(attach, - "Warning: SLIP is rather poorly supported in this revision\n" - "of the installation due to the lack of a dialing utility.\n" - "If you can use PPP for this instead then you're much better\n" - "off doing so, otherwise SLIP works fairly well for *hardwired*\n" - "links. Please edit the following slattach command for\n" - "correctness (default here is: VJ compression, Hardware flow-\n" - "control, ignore carrier and 9600 baud data rate). When you're\n" - "ready, press [ENTER] to execute it."); - if (!val) { - msgConfirm("slattach command was empty. Try again!"); - restorescr(w); - return FALSE; - } - else - SAFE_STRCPY(attach, val); - /* - * Doing this with vsystem() is actually bogus since we should be storing the pid of slattach - * for later killing. It's just too convenient to call vsystem(), however, rather than - * constructing a proper argument for exec() so we punt on doing slip right for now. - */ - if (vsystem("%s", attach)) { - msgConfirm("slattach returned a bad status! Please verify that\n" - "the command is correct and try this operation again."); - restorescr(w); - return FALSE; - } - restorescr(w); - } - snprintf(ifconfig, 255, "%s%s", VAR_IFCONFIG, dev->name); cp = variable_get(ifconfig); if (cp) { @@ -181,9 +128,7 @@ mediaShutdownNetwork(Device *dev) if (!RunningAsInit || !networkInitialized) return; - msgDebug("Shutdown called for network device %s\n", dev->name); - /* Not a serial device? */ - if (strncmp("sl", dev->name, 2) && strncmp("ppp", dev->name, 3)) { + msgDebug("Shutdown called for network device %s\n", dev->name); int i; char ifconfig[255]; @@ -200,172 +145,5 @@ mediaShutdownNetwork(Device *dev) msgDebug("Deleting default route.\n"); vsystem("route -n delete default"); } - } - else if (pppPID) { - msgConfirm("Killing previous PPP process %d.", pppPID); - kill(pppPID, SIGTERM); - pppPID = 0; - } - networkInitialized = FALSE; } -/* Start PPP on the 3rd screen */ -static pid_t -startPPP(Device *devp) -{ - int fd2, pulse; - FILE *fp; - char *val; - pid_t pid = 0; - char myaddr[16], provider[16], speed[16], authname[32], authkey[16]; - char phone[16]; - WINDOW *w = savescr(); - - /* These are needed to make ppp work */ - Mkdir("/var/log"); - Mkdir("/var/run"); - Mkdir("/var/spool/lock"); - Mkdir("/etc/ppp"); - - dialog_clear_norefresh(); - if (!variable_get(VAR_SERIAL_SPEED)) - variable_set2(VAR_SERIAL_SPEED, "115200", 0); - /* Get any important user values */ - val = variable_get_value(VAR_SERIAL_SPEED, - "Enter the baud rate for your modem - this can be higher than the actual\n" - "maximum data rate since most modems can talk at one speed to the\n" - "computer and at another speed to the remote end.\n\n" - "If you're not sure what to put here, just select the default.", 0); - SAFE_STRCPY(speed, (val && *val) ? val : "115200"); - - val = variable_get(VAR_GATEWAY); - SAFE_STRCPY(provider, (val && *val) ? val : "0"); - - dialog_clear_norefresh(); - val = msgGetInput(provider, "Enter the IP address of your service provider or 0 if you\n" - "don't know it and would prefer to negotiate it dynamically."); - SAFE_STRCPY(provider, (val && *val) ? val : "0"); - - if (devp->private && ((DevInfo *)devp->private)->ipaddr[0]) - SAFE_STRCPY(myaddr, ((DevInfo *)devp->private)->ipaddr); - else - strcpy(myaddr, "0"); - - if (!Fake) - fp = fopen("/etc/ppp/ppp.linkup", "w"); - else - fp = fopen("/dev/stderr", "w"); - if (fp != NULL) { - fprintf(fp, "MYADDR:\n"); - fprintf(fp, " delete ALL\n"); - fprintf(fp, " add 0 0 HISADDR\n"); - fchmod(fileno(fp), 0755); - fclose(fp); - } - if (!Fake) - fd2 = open("/etc/ppp/ppp.secret", O_CREAT); - else - fd2 = -1; - if (fd2 != -1) { - fchmod(fd2, 0700); - close(fd2); - } - if (!Fake) - fp = fopen("/etc/ppp/ppp.conf", "a"); - else - fp = fopen("/dev/stderr", "w"); - if (!fp) { - msgConfirm("Couldn't open /etc/ppp/ppp.conf file! This isn't going to work"); - restorescr(w); - return 0; - } - authname[0] = '\0'; - pulse = 0; - dialog_clear_norefresh(); - if (!dialog_yesno("", "Does your ISP support PAP or CHAP ppp logins?", -1, -1)) { - val = msgGetInput(NULL, "Enter the name you use to login to your provider."); - SAFE_STRCPY(authname, val); - dialog_clear_norefresh(); - val = msgGetInput(NULL, "Enter the password you use to login to your provider."); - SAFE_STRCPY(authkey, val); - dialog_clear_norefresh(); - val = msgGetInput(NULL, "Enter the your provider's login phone number."); - SAFE_STRCPY(phone, val); - dialog_clear_norefresh(); - pulse = dialog_yesno("", "Does your telephone line support tone dialing?", -1, -1); - } - fprintf(fp, "\ninstall:\n"); - fprintf(fp, " set speed %s\n", speed); - fprintf(fp, " set device %s\n", devp->devname); - fprintf(fp, " set ifaddr %s %s 255.255.255.0 0.0.0.0\n", myaddr, provider); - fprintf(fp, " add! default HISADDR\n"); - fprintf(fp, " set timeout 0\n"); - fprintf(fp, " enable dns\n"); - fprintf(fp, " set log local phase\n"); - if(authname[0] != '\0'){ - fprintf(fp, " set dial \"ABORT BUSY ABORT NO\\\\sCARRIER TIMEOUT 5 \\\"\\\" AT OK-AT-OK ATE1Q0 OK \\\\dATD%c\\\\T TIMEOUT 40 CONNECT\"\n", pulse ? 'P' : 'T'); - fprintf(fp, " set login\n"); - fprintf(fp, " set authname %s\n", authname); - fprintf(fp, " set authkey %s\n", authkey); - fprintf(fp, " set phone %s\n", phone); - } - if (fchmod(fileno(fp), 0600) != 0) - msgConfirm("Warning: Failed to fix permissions on /etc/ppp/ppp.conf !"); - fclose(fp); - - /* Make the ppp config persistent */ - variable_set2(VAR_PPP_ENABLE, "YES", 0); - variable_set2(VAR_PPP_PROFILE, "install", 0); - - if (!Fake && !file_readable("/dev/tun0")) { - msgConfirm("Warning: No /dev/tun0 device. PPP will not work!"); - restorescr(w); - return 0; - } - - if (isDebug()) - msgDebug("About to start PPP on device %s @ %s baud. Provider = %s\n", devp->devname, speed, provider); - - if (!Fake && !(pid = fork())) { - int i, fd; - struct termios foo; - extern int login_tty(int); - - for (i = getdtablesize(); i >= 0; i--) - close(i); - - /* We're going over to VTY2 */ - fd = open("/dev/ttyv2", O_RDWR); - ioctl(0, TIOCSCTTY, &fd); - dup2(0, 1); - dup2(0, 2); - DebugFD = 2; - if (login_tty(fd) == -1) - msgDebug("ppp: Can't set the controlling terminal.\n"); - signal(SIGTTOU, SIG_IGN); - if (tcgetattr(fd, &foo) != -1) { - foo.c_cc[VERASE] = '\010'; - if (tcsetattr(fd, TCSANOW, &foo) == -1) - msgDebug("ppp: Unable to set the erase character.\n"); - } - else - msgDebug("ppp: Unable to get the terminal attributes!\n"); - execlp("ppp", "ppp", "install", (char *)NULL); - msgDebug("PPP process failed to exec!\n"); - exit(1); - } - else { - dialog_clear_norefresh(); - msgConfirm("NOTICE: The PPP command is now started on VTY3 (type ALT-F3 to\n" - "interact with it, ALT-F1 to switch back here). If you are using\n" - "a PAP or CHAP login simply enter \"dial\", otherwise you'll need\n" - "to use the \"term\" command which starts a terminal emulator\n" - "which you can use to talk to your modem and dial the service\n" - "provider. Once you're connected, come back to this screen and\n" - "press return.\n\n" - "DO NOT PRESS [ENTER] HERE UNTIL THE CONNECTION IS FULLY\n" - "ESTABLISHED!"); - } - restorescr(w); - return pid; -} From owner-svn-src-all@FreeBSD.ORG Fri Jul 16 21:41:55 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E1AD106566C; Fri, 16 Jul 2010 21:41:55 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 0AA038FC19; Fri, 16 Jul 2010 21:41:54 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o6GLfrAW003086; Fri, 16 Jul 2010 15:41:53 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Fri, 16 Jul 2010 15:42:16 -0600 (MDT) Message-Id: <20100716.154216.582095686063971712.imp@bsdimp.com> To: jkim@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <201007161514.04955.jkim@FreeBSD.org> References: <201007131657.o6DGvq9L097594@svn.freebsd.org> <20100715220012.X1719@delplex.bde.org> <201007161514.04955.jkim@FreeBSD.org> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, brde@optusnet.com.au Subject: Re: svn commit: r210005 - head/sys/modules/acpi/acpi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 21:41:55 -0000 In message: <201007161514.04955.jkim@FreeBSD.org> Jung-uk Kim writes: : On Thursday 15 July 2010 08:04 am, Bruce Evans wrote: : > On Tue, 13 Jul 2010, Jung-uk Kim wrote: : > > Log: : > > Define SMP unconditionally for amd64 and remove opt_global.h : > > from SRCS. Note it is done just for correctness sake because we : > > do not build, ship, or support acpi.ko on amd64. : > > : > > Prodded by: bde : > : > Thanks. : > : > It was much more interesting than I noticed. Modules are supposed : > to be independent of all configuration options, especially global : > ones, especially especially SMP. Perhaps this is too much to ask : > for acpi. Does it work now, after you removed an SMP ifdef from it? : : I removed "#ifdef SMP" from acpi.c because 'smp_started' is available : for both UP and SMP kernels. On the other hand, I cannot remove : these easily from sys/amd64/acpica/acpi_wakeup.c, i.e., it requires : some symbols from sys/amd64/amd64/mp_machdep.c, which are only : available in SMP case. : : FYI, we never had to worry about acpi.ko on i386 because we didn't : implement suspend/resume for SMP case in the first place. X-) Does this mean we do implement it on amd64 now? I may have to start trying to use it again... Warner From owner-svn-src-all@FreeBSD.ORG Fri Jul 16 22:09:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E3568106564A; Fri, 16 Jul 2010 22:09:29 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B84838FC0A; Fri, 16 Jul 2010 22:09: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 o6GM9T2H035766; Fri, 16 Jul 2010 22:09:29 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6GM9Tqi035760; Fri, 16 Jul 2010 22:09:29 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007162209.o6GM9Tqi035760@svn.freebsd.org> From: Alexander Motin Date: Fri, 16 Jul 2010 22:09:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210176 - in head/sys: sparc64/include sparc64/sparc64 sun4v/include sun4v/sun4v X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 22:09:30 -0000 Author: mav Date: Fri Jul 16 22:09:29 2010 New Revision: 210176 URL: http://svn.freebsd.org/changeset/base/210176 Log: Allocate proper ammount of memory for interrupt names on sparc64 and sun4v, same as done on other architectures. This removes garbage from `vmstat -ia` output. Reviewed by: marius@ Modified: head/sys/sparc64/include/intr_machdep.h head/sys/sparc64/sparc64/exception.S head/sys/sparc64/sparc64/genassym.c head/sys/sun4v/include/intr_machdep.h head/sys/sun4v/sun4v/exception.S Modified: head/sys/sparc64/include/intr_machdep.h ============================================================================== --- head/sys/sparc64/include/intr_machdep.h Fri Jul 16 20:42:20 2010 (r210175) +++ head/sys/sparc64/include/intr_machdep.h Fri Jul 16 22:09:29 2010 (r210176) @@ -33,7 +33,6 @@ #define PIL_MAX (1 << 4) #define IV_MAX (1 << 11) -#define IV_NAMLEN 1024 #define IR_FREE (PIL_MAX * 2) Modified: head/sys/sparc64/sparc64/exception.S ============================================================================== --- head/sys/sparc64/sparc64/exception.S Fri Jul 16 20:42:20 2010 (r210175) +++ head/sys/sparc64/sparc64/exception.S Fri Jul 16 22:09:29 2010 (r210176) @@ -365,7 +365,7 @@ ENTRY(rsf_fatal) sir END(rsf_fatal) - .comm intrnames, IV_NAMLEN + .comm intrnames, IV_MAX * (MAXCOMLEN + 1) .comm eintrnames, 0 .comm intrcnt, IV_MAX * 8 Modified: head/sys/sparc64/sparc64/genassym.c ============================================================================== --- head/sys/sparc64/sparc64/genassym.c Fri Jul 16 20:42:20 2010 (r210175) +++ head/sys/sparc64/sparc64/genassym.c Fri Jul 16 22:09:29 2010 (r210176) @@ -160,6 +160,7 @@ ASSYM(HASH_ENTRY_SHIFT, HASH_ENTRY_SHIFT ASSYM(V_INTR, offsetof(struct vmmeter, v_intr)); +ASSYM(MAXCOMLEN, MAXCOMLEN); ASSYM(PC_CURTHREAD, offsetof(struct pcpu, pc_curthread)); ASSYM(PC_CURPCB, offsetof(struct pcpu, pc_curpcb)); ASSYM(PC_CPUID, offsetof(struct pcpu, pc_cpuid)); Modified: head/sys/sun4v/include/intr_machdep.h ============================================================================== --- head/sys/sun4v/include/intr_machdep.h Fri Jul 16 20:42:20 2010 (r210175) +++ head/sys/sun4v/include/intr_machdep.h Fri Jul 16 22:09:29 2010 (r210176) @@ -33,7 +33,6 @@ #define PIL_MAX (1 << 4) #define IV_MAX (1 << 11) -#define IV_NAMLEN 1024 #define IR_FREE (PIL_MAX * 2) Modified: head/sys/sun4v/sun4v/exception.S ============================================================================== --- head/sys/sun4v/sun4v/exception.S Fri Jul 16 20:42:20 2010 (r210175) +++ head/sys/sun4v/sun4v/exception.S Fri Jul 16 22:09:29 2010 (r210176) @@ -1948,7 +1948,7 @@ END(fork_trampoline) - .comm intrnames, IV_NAMLEN + .comm intrnames, IV_MAX * (MAXCOMLEN + 1) .comm eintrnames, 0 .comm intrcnt, IV_MAX * 8 From owner-svn-src-all@FreeBSD.ORG Fri Jul 16 23:13:04 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 4BCEF106566B; Fri, 16 Jul 2010 23:13:01 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: "M. Warner Losh" Date: Fri, 16 Jul 2010 19:12:45 -0400 User-Agent: KMail/1.6.2 References: <201007131657.o6DGvq9L097594@svn.freebsd.org> <201007161514.04955.jkim@FreeBSD.org> <20100716.154216.582095686063971712.imp@bsdimp.com> In-Reply-To: <20100716.154216.582095686063971712.imp@bsdimp.com> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201007161912.53042.jkim@FreeBSD.org> Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, brde@optusnet.com.au Subject: Re: svn commit: r210005 - head/sys/modules/acpi/acpi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 23:13:04 -0000 On Friday 16 July 2010 05:42 pm, M. Warner Losh wrote: > In message: <201007161514.04955.jkim@FreeBSD.org> > > Jung-uk Kim writes: > : On Thursday 15 July 2010 08:04 am, Bruce Evans wrote: > : > On Tue, 13 Jul 2010, Jung-uk Kim wrote: > : > > Log: > : > > Define SMP unconditionally for amd64 and remove opt_global.h > : > > from SRCS. Note it is done just for correctness sake because > : > > we do not build, ship, or support acpi.ko on amd64. > : > > > : > > Prodded by: bde > : > > : > Thanks. > : > > : > It was much more interesting than I noticed. Modules are > : > supposed to be independent of all configuration options, > : > especially global ones, especially especially SMP. Perhaps > : > this is too much to ask for acpi. Does it work now, after you > : > removed an SMP ifdef from it? > : > : I removed "#ifdef SMP" from acpi.c because 'smp_started' is > : available for both UP and SMP kernels. On the other hand, I > : cannot remove these easily from sys/amd64/acpica/acpi_wakeup.c, > : i.e., it requires some symbols from sys/amd64/amd64/mp_machdep.c, > : which are only available in SMP case. > : > : FYI, we never had to worry about acpi.ko on i386 because we > : didn't implement suspend/resume for SMP case in the first place. > : X-) > > Does this mean we do implement it on amd64 now? I may have to > start trying to use it again... Yes, I did that for a while ago. 8-) Jung-uk Kim From owner-svn-src-all@FreeBSD.ORG Fri Jul 16 23:17:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89A3E1065672; Fri, 16 Jul 2010 23:17:05 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5EC278FC13; Fri, 16 Jul 2010 23:17:05 +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 o6GNH5KA050724; Fri, 16 Jul 2010 23:17:05 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6GNH5X2050722; Fri, 16 Jul 2010 23:17:05 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201007162317.o6GNH5X2050722@svn.freebsd.org> From: Rick Macklem Date: Fri, 16 Jul 2010 23:17:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210178 - head/sys/fs/nfsserver X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 23:17:05 -0000 Author: rmacklem Date: Fri Jul 16 23:17:05 2010 New Revision: 210178 URL: http://svn.freebsd.org/changeset/base/210178 Log: Patch the experimental NFSv4 server so that it acquires a reference count on nfsv4rootfs_lock when dumping state, since these functions are not called by nfsd threads. Without this reference count, it is possible for an nfsd thread to acquire an exclusive lock on nfsv4rootfs_lock while the dump is in progress and then change the lists, potentially causing a crash. Reported by: zack.kirsch at isilon.com MFC after: 2 weeks Modified: head/sys/fs/nfsserver/nfs_nfsdstate.c Modified: head/sys/fs/nfsserver/nfs_nfsdstate.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdstate.c Fri Jul 16 22:58:13 2010 (r210177) +++ head/sys/fs/nfsserver/nfs_nfsdstate.c Fri Jul 16 23:17:05 2010 (r210178) @@ -600,6 +600,13 @@ nfsrv_dumpclients(struct nfsd_dumpclient struct nfsclient *clp; int i = 0, cnt = 0; + /* + * First, get a reference on the nfsv4rootfs_lock so that an + * exclusive lock cannot be acquired while dumping the clients. + */ + NFSLOCKV4ROOTMUTEX(); + nfsv4_getref(&nfsv4rootfs_lock, NULL, NFSV4ROOTLOCKMUTEXPTR); + NFSUNLOCKV4ROOTMUTEX(); NFSLOCKSTATE(); /* * Rattle through the client lists until done. @@ -616,6 +623,9 @@ nfsrv_dumpclients(struct nfsd_dumpclient if (cnt < maxcnt) dumpp[cnt].ndcl_clid.nclid_idlen = 0; NFSUNLOCKSTATE(); + NFSLOCKV4ROOTMUTEX(); + nfsv4_relref(&nfsv4rootfs_lock); + NFSUNLOCKV4ROOTMUTEX(); } /* @@ -691,12 +701,22 @@ nfsrv_dumplocks(vnode_t vp, struct nfsd_ fhandle_t nfh; ret = nfsrv_getlockfh(vp, 0, NULL, &nfh, p); + /* + * First, get a reference on the nfsv4rootfs_lock so that an + * exclusive lock on it cannot be acquired while dumping the locks. + */ + NFSLOCKV4ROOTMUTEX(); + nfsv4_getref(&nfsv4rootfs_lock, NULL, NFSV4ROOTLOCKMUTEXPTR); + NFSUNLOCKV4ROOTMUTEX(); NFSLOCKSTATE(); if (!ret) ret = nfsrv_getlockfile(0, NULL, &lfp, &nfh, 0); if (ret) { ldumpp[0].ndlck_clid.nclid_idlen = 0; NFSUNLOCKSTATE(); + NFSLOCKV4ROOTMUTEX(); + nfsv4_relref(&nfsv4rootfs_lock); + NFSUNLOCKV4ROOTMUTEX(); return; } @@ -797,6 +817,9 @@ nfsrv_dumplocks(vnode_t vp, struct nfsd_ if (cnt < maxcnt) ldumpp[cnt].ndlck_clid.nclid_idlen = 0; NFSUNLOCKSTATE(); + NFSLOCKV4ROOTMUTEX(); + nfsv4_relref(&nfsv4rootfs_lock); + NFSUNLOCKV4ROOTMUTEX(); } /* From owner-svn-src-all@FreeBSD.ORG Fri Jul 16 23:21:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B423E1065672; Fri, 16 Jul 2010 23:21:46 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A2A278FC22; Fri, 16 Jul 2010 23:21: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 o6GNLkOE051765; Fri, 16 Jul 2010 23:21:46 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6GNLkFD051762; Fri, 16 Jul 2010 23:21:46 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007162321.o6GNLkFD051762@svn.freebsd.org> From: Alexander Motin Date: Fri, 16 Jul 2010 23:21:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210179 - in head/sys: amd64/conf i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 23:21:46 -0000 Author: mav Date: Fri Jul 16 23:21:46 2010 New Revision: 210179 URL: http://svn.freebsd.org/changeset/base/210179 Log: Add hints for i8254 timer on i386 and amd64. Some people report about systems with PnP/ACPI not reporting i8254 timer. In some cases it can be fatal, as i8254 can be the only available time counter hardware. From other side we are now heavily depend on i8254 timer and till the last time it's init/usage was completely hardcoded. So this change just restores previous behavior in more regular fashion. Modified: head/sys/amd64/conf/GENERIC.hints head/sys/i386/conf/GENERIC.hints Modified: head/sys/amd64/conf/GENERIC.hints ============================================================================== --- head/sys/amd64/conf/GENERIC.hints Fri Jul 16 23:17:05 2010 (r210178) +++ head/sys/amd64/conf/GENERIC.hints Fri Jul 16 23:21:46 2010 (r210179) @@ -27,3 +27,6 @@ hint.ppc.0.irq="7" hint.atrtc.0.at="isa" hint.atrtc.0.port="0x70" hint.atrtc.0.irq="8" +hint.attimer.0.at="isa" +hint.attimer.0.port="0x40" +hint.attimer.0.irq="0" Modified: head/sys/i386/conf/GENERIC.hints ============================================================================== --- head/sys/i386/conf/GENERIC.hints Fri Jul 16 23:17:05 2010 (r210178) +++ head/sys/i386/conf/GENERIC.hints Fri Jul 16 23:21:46 2010 (r210179) @@ -35,3 +35,6 @@ hint.ppc.0.irq="7" hint.atrtc.0.at="isa" hint.atrtc.0.port="0x70" hint.atrtc.0.irq="8" +hint.attimer.0.at="isa" +hint.attimer.0.port="0x40" +hint.attimer.0.irq="0" From owner-svn-src-all@FreeBSD.ORG Sat Jul 17 00:12:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9CA071065670; Sat, 17 Jul 2010 00:12:42 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 86D428FC14; Sat, 17 Jul 2010 00:12: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 o6H0CfFs062947; Sat, 17 Jul 2010 00:12:41 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6H0CfDY062941; Sat, 17 Jul 2010 00:12:41 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201007170012.o6H0CfDY062941@svn.freebsd.org> From: Hiroki Sato Date: Sat, 17 Jul 2010 00:12:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210180 - in releng/8.1/release/doc: en_US.ISO8859-1/errata en_US.ISO8859-1/hardware en_US.ISO8859-1/readme en_US.ISO8859-1/relnotes share/sgml X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jul 2010 00:12:42 -0000 Author: hrs Date: Sat Jul 17 00:12:41 2010 New Revision: 210180 URL: http://svn.freebsd.org/changeset/base/210180 Log: Clean-up old contents and bump version numbers for 8.1R. Approved by: re (implicitly) Modified: releng/8.1/release/doc/en_US.ISO8859-1/errata/article.sgml releng/8.1/release/doc/en_US.ISO8859-1/hardware/article.sgml releng/8.1/release/doc/en_US.ISO8859-1/readme/article.sgml releng/8.1/release/doc/en_US.ISO8859-1/relnotes/article.sgml releng/8.1/release/doc/share/sgml/release.dsl releng/8.1/release/doc/share/sgml/release.ent Modified: releng/8.1/release/doc/en_US.ISO8859-1/errata/article.sgml ============================================================================== --- releng/8.1/release/doc/en_US.ISO8859-1/errata/article.sgml Fri Jul 16 23:21:46 2010 (r210179) +++ releng/8.1/release/doc/en_US.ISO8859-1/errata/article.sgml Sat Jul 17 00:12:41 2010 (r210180) @@ -16,7 +16,7 @@ %release; - + ]>
    @@ -40,7 +40,7 @@ $FreeBSD$ - 2009 + 2010 The &os; Documentation Project @@ -129,6 +129,7 @@ For more information, consult the individual advisories available from . + Modified: releng/8.1/release/doc/en_US.ISO8859-1/hardware/article.sgml ============================================================================== --- releng/8.1/release/doc/en_US.ISO8859-1/hardware/article.sgml Fri Jul 16 23:21:46 2010 (r210179) +++ releng/8.1/release/doc/en_US.ISO8859-1/hardware/article.sgml Sat Jul 17 00:12:41 2010 (r210180) @@ -30,6 +30,7 @@ 2007 2008 2009 + 2010 The &os; Documentation Project Modified: releng/8.1/release/doc/en_US.ISO8859-1/readme/article.sgml ============================================================================== --- releng/8.1/release/doc/en_US.ISO8859-1/readme/article.sgml Fri Jul 16 23:21:46 2010 (r210179) +++ releng/8.1/release/doc/en_US.ISO8859-1/readme/article.sgml Sat Jul 17 00:12:41 2010 (r210180) @@ -24,6 +24,8 @@ 2006 2007 2008 + 2009 + 2010 The &os; Documentation Project Modified: releng/8.1/release/doc/en_US.ISO8859-1/relnotes/article.sgml ============================================================================== --- releng/8.1/release/doc/en_US.ISO8859-1/relnotes/article.sgml Fri Jul 16 23:21:46 2010 (r210179) +++ releng/8.1/release/doc/en_US.ISO8859-1/relnotes/article.sgml Sat Jul 17 00:12:41 2010 (r210180) @@ -15,16 +15,7 @@ $FreeBSD$ - 2000 - 2001 - 2002 - 2003 - 2004 - 2005 - 2006 - 2007 - 2008 - 2009 + 2010 The &os; Documentation Project @@ -105,2368 +96,8 @@ What's New - This section describes the most user-visible new or changed - features in &os; since &release.prev;, and changes shown in - Release Notes for the previous releases are marked as - [7.1R] and [7.2R]. - - Typical release note items document recent security - advisories issued after &release.prev;, new drivers or hardware - support, new commands or options, major bug fixes, or - contributed software upgrades. They may also list changes to - major ports/packages or release engineering practices. Clearly - the release notes cannot list every single change made to &os; - between releases; this document focuses primarily on security - advisories, user-visible changes, and major architectural - improvements. - - - Security Advisories - - Problems described in the following security advisories have - been fixed. For more information, consult the individual - advisories available from - . - - - - - - - - - Advisory - Date - Topic - - - - - - SA-08:05.openssh - 17 April 2008 - OpenSSH X11-forwarding privilege escalation - - - - SA-08:06.bind - 13 July 2008 - DNS cache poisoning - - - - SA-08:07.amd64 - 3 September 2008 - amd64 swapgs local privilege escalation - - - - SA-08:08.nmount - 3 September 2008 - &man.nmount.2; local arbitrary code execution - - - - SA-08:09.icmp6 - 3 September 2008 - Remote kernel panics on IPv6 connections - - - - SA-08:10.nd6 - 1 October 2008 - IPv6 Neighbor Discovery Protocol routing vulnerability - - - - SA-08:11.arc4random - 24 November 2008 - &man.arc4random.9; predictable sequence vulnerability - - - - SA-08:12.ftpd - 23 December 2008 - Cross-site request forgery in &man.ftpd.8; - - - - SA-08:13.protosw - 23 December 2008 - netgraph / bluetooth privilege escalation - - - - SA-09:01.lukemftpd - 07 January 2009 - Cross-site request forgery in - &man.lukemftpd.8; - - - - SA-09:02.openssl - 07 January 2009 - OpenSSL incorrectly checks for malformed - signatures - - - - SA-09:03.ntpd - 13 January 2009 - ntpd cryptographic signature - bypass - - - - SA-09:04.bind - 13 January 2009 - BIND DNSSEC incorrect checks for - malformed signatures - - - - SA-09:05.telnetd - 16 February 2009 - telnetd code execution - vulnerability - - - - SA-09:06.ktimer - 23 March 2009 - Local privilege escalation - - - - SA-09:07.libc - 04 April 2009 - Information leak in &man.db.3; - - - - SA-09:08.openssl - 22 April 2009 - Remotely exploitable crash in - OpenSSL - - - - SA-09:09.pipe - 10 June 2009 - Local information disclosure via direct pipe writes - - - - SA-09:10.ipv6 - 10 June 2009 - Missing permission check on SIOCSIFINFO_IN6 ioctl - - - - SA-09:11.ntpd - 10 June 2009 - ntpd stack-based buffer-overflow vulnerability - - - - SA-09:12.bind - 29 July 2009 - BIND &man.named.8; dynamic update message remote DoS - - - SA-09:14.devfs - 2 Oct 2009 - Devfs / VFS NULL pointer race condition - - - - - - - - Kernel Changes - - The &os; GENERIC kernel now - includes Trusted BSD MAC (Mandatory Access Control) support. - No MAC policy module is loaded by default. - - A loader - tunable hw.clflush_disable has been added - to avoid panic (trap 9) - at map_invalidate_cache_range() even if - Intel CPU is used. This tunable can be set - to -1 (default), 0 and - 1. The -1 is same as - the current behavior, which automatically - disables CLFLUSH on Intel CPUs without - CPUID_SS (this should occurr on Xen - only). You can specify 1 when this panic - happens on non-Intel CPUs (such as AMD's). Because disabling - CLFLUSH can reduce performance, you can try - with setting 0 on Intel CPUs - without SS to - use CLFLUSH feature. - - The &man.jail.8; subsystem has been updated. Changes include: - - - - A new virtualization container - named vimage has been implemented. This is - not enabled by default. To enable this, add the following - kernel options to your kernel configuration file and - rebuild the kernel: - - options VIMAGE - - Note that options SCTP in the - GENERIC kernel is not compatible with - options VIMAGE. This limitation will - be fixed in the next release. - - The vimage is a jail with a virtualized instance of - the &os; network stack. It can be created by using - &man.jail.8; command like this: - - &prompt.root; jail -c vnet name=vnet1 host.hostname=vnet1.example.net path=/ persist - - The vimage has own loopback interface and a separated - network stack including the L3 routing tables. Network - interfaces on the system can be moved by using - &man.ifconfig.8; option between the - different vimage jails and outside of them. - - Furthermore, the &man.epair.4; pseudo-interface driver - has been added to help communication between vimage jails. - It emulates a pair of back-to-back connected Ethernet - interfaces. For example, the following commands create an - interface pair of &man.epair.4;: - - &prompt.root; ifconfig epair0 create -epair0a -&prompt.root; ifconfig epair0a -epair0a: flags=8842<BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 - ether 02:c0:64:00:07:0a -&prompt.root; ifconfig epair0b -epair0b: flags=8842<BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 - ether 02:c0:64:00:08:0b - - The &man.epair.4; pseudo-interfaces and any physical - interfaces on the system can be moved between vimage jails - by using &man.ifconfig.8; option as - described above. Even after half of an &man.epair.4; pair - is moved, the back-to-back connection still valid and can - be used for inter-jail communication. - - Note that vimage is still considered as an - experimental feature. - - - - A jail can now have arbitrary named parameters similar - to environmental variables and the fixed jail parameters - in the previous releases have been replaced with them. - The jail name can now be used for identifying the jail in - &man.jexec.8; and &man.killall.1;. - - - - Multiple IPv4 and/or IPv6 addresses per jail are now - supported. It is even possible to have jails without - an IP address at all, which basically gives one a chrooted - environment with restricted process view and no - networking. - - - - SCTP (&man.sctp.4;) with IPv6 in jails has been - implemented. - - - - Specific CPU binding by using &man.cpuset.1; has been - implemented. Note that the current implementation allows - the superuser inside of the jail to change the CPU - bindings specified. - - - - A &man.jail.8; can start with a specific route - FIB now. - - - - The &man.ddb.8; kernel debugger now supports a - show jails subcommand. - - - - Compatibility support which permits 32-bit jail - binaries to be used on 64-bit systems to manage jails has - been added. - - - - Note that both version numbers of - jail and prison in - the &man.jail.8; have been updated for the new - features. - - - - The &man.ksyms.4;, kernel symbol table - interface driver has been added. It creates a character - device /dev/ksyms and provides - read-only access to a snapshot of the kernel symbol - table. - - The &os; Linux emulation - layer has been updated to version 2.6.16 and the default Linux - infrastructure port is - emulators/linux_base-f10 (Fedora - 10). - - The &os;/&arch.arm; now - supports mini dump. - - The &os;/&arch.powerpc; now - supports kernel core dump. - - The &os; virtual memory - subsystem now supports fully transparent use of - superpages for application memory; - application memory pages are dynamically promoted to or - demoted from superpages without any modification to - application code. This change offers the benefit of large - page sizes such as improved virtual memory efficiency and - reduced TLB (translation lookaside buffer) misses without - downsides like application changes and virtual memory - inflexibility. This can be enabled by setting a loader tunable - vm.pmap.pg_ps_enabled to - 1 and is enabled by default on - &arch.amd64;. - - The &man.ddb.8; kernel debugger now supports a - show mount subcommand. - - The &os; DTrace subsystem now supports a probe for - process execution. - - The &os; kernel virtual address - space has been increased to 6GB. This allows subsystems to use - larger virtual memory space than before. For example, the - &man.zfs.8; adaptive replacement cache (ARC) requires large - kernel memory space to cache file system data, so it benefits - from the increased address space. Note that the ceiling on - the kernel map size is now 60% of the size of physical memory - rather than an absolute quantity. - - The &man.kld.4; now supports installing 32-bit - system calls to the &os; syscall translation layer from kernel - modules. - - The &man.ktr.4; now supports a new KTR tracepoint in the - KTR_CALLOUT class to note when a callout - routine finishes executing. - - Types of variables used to track the amount of allocated - System V shared memory have been changed from - int to size_t. This - makes it possible to use more than 2 GB of memory for shared - memory segments on 64-bit architectures. Please note the new - BUGS section in &man.shmctl.2; and - /usr/src/UPDATING for limitations of this - temporary solution. - - The &man.sysctl.3; leaf nodes have a flag to tag - themselves as MPSAFE now. - - The &os; 32-bit system call translation layer now - supports installing 32-bit system calls for - VFS_AIO. - - The &man.clock.gettime.2; and the related system calls now - support a clock ID CLOCK_THREAD_CPUTIME_ID, - as defined in POSIX. - - The &man.cpuset.2; system call has been added. This is an - API for thread to CPU binding and CPU resource grouping and - assignment. - - The DTrace, a comprehensive dynamic tracing framework and - &man.dtrace.1; userland utility have been imported from - OpenSolaris. DTrace provides a powerful infrastructure to - permit administrators, developers, and service personnel to - concisely answer arbitrary questions about the behavior of the - operating system and user programs. - - The &man.ddb.4; kernel debugger now has an output capture - facility. Input and output from &man.ddb.4; can now be captured - to a memory buffer for later inspection using &man.sysctl.8; or - a textdump. The new capture command controls - this feature. - - The &man.ddb.4; debugger now supports a simple scripting - facility, which supports a set of named scripts consisting of a - set of &man.ddb.4; commands. These commands can be managed from - within &man.ddb.4; or with the use of the new &man.ddb.8; - utility. More details can be found in the &man.ddb.4; manual - page. - - The &man.ddb.4; ex command now supports - an mode which interprets and prints the - value at the requested address as a symbol. For example, - ex /S aio_swake - prints the name of the function currently registered in - via aio_swake hook. - - The &man.ddb.4; show conifhk command has - been added. This lists hooks currently waiting for completion - in run_interrupt_driven_config_hooks(). - - The &man.fcntl.2; system call now supports - F_DUP2FD command. This is equivalent to - &man.dup.2;, and compatible with the Sun Solaris and the IBM - AIX. - - The &os;'s &man.linux.4; ABI support now implements - sched_setaffinity() and - sched_getaffinity() using real CPU affinity - setting primitives. - - The &man.procstat.1; utility has been added. This is a - process inspection utility which provides some of the missing - functionality from &man.procfs.5; and new functionality for monitoring - and debugging specific processes. - - The client side functionality of &man.rpc.lockd.8; has been - implemented in the &os; kernel. This implementation provides the - correct semantics for &man.flock.2; style locks which are used - by the &man.lockf.1; command line tool and the &man.pidfile.3; - library. It also implements recovery from server restarts and - ensures that dirty cache blocks are written to the server before - obtaining locks (allowing multiple clients to use file locking - to safely share data). Also, a new kernel option - options NFSLOCKD has been added and enabled - by default. If the kernel support is enabled, &man.rpc.lockd.8; - automatically detects and uses the functionality. - - The &os; kernel now supports a new textdump format of kernel - dumps. A textdump provides higher-level information via - mechanically generated/extracted debugging output, rather than a - simple memory dump. This facility can be used to generate brief - kernel bug reports that are rich in debugging information, but - are not dependent on kernel symbol tables or precisely - synchronized source code. More information can be found in the - &man.textdump.4; manual page. - - The &man.wait4.2; system call now supports - flag to keep the process whose status - is returned in a waitable state and - which is equivalent to . - - The &os; kernel now has - initial support of binding interrupts to CPUs. - - The &man.sched.ule.4; scheduler is now the default - process scheduler in GENERIC - kernels. - - The sysctl - variables kern.features.compat_freebsd[456] - have been added. These are corresponding to the kernel options - COMPAT_FREEBSD[456]. - - - Boot Loader Changes - - The boot0 boot - loader now preserves volume ID at offset - 0x1b8 used in other operating systems - - The &man.boot0cfg.8; utility now supports a - new option to set the volume ID. - - The &man.loader.8; now - supports U-Boot support library. - - The &man.boot.8; now supports 4-byte volume ID that - certain versions of &windows; put into the MBR and invoking - PXE by pressing the F6 key on some supported BIOSes. - - The &man.boot.8; BTX loader has been - improved. This fixes several boot issues on recent machines - reported for 7.1-RELEASE and before. - - The &man.loader.8; is now able to obtain DHCP options - from network boot via &man.kenv.2; variables. - - A bug in the &man.loader.8; has been fixed. Now the - following line works as expected: - - loader_conf_files="foo bar ${variable}" - - The BTX kernel used by the boot - loader has been changed to invoke BIOS routines from real - mode. This change makes it possible to boot &os; from USB - devices. - - A new gptboot boot loader has - been added to support booting from a GPT labeled disk. A - new boot command has been added to - &man.gpt.8;, which makes a GPT disk bootable by writing the - required bits of the boot loader, creating a new boot - partition if required. - - - - Hardware Support - - The &os; now includes experimental support - for &arch.mips; platform. - - Support for RTC on Dallas Semiconductor chips - has been improved. The DS133x and DS1553 are now - supported. - - The &os;/&arch.arm; now supports - Feroceon and Sheeva embedded CPU, Marvell Orion (88F5281), - Kirkwood (88F6281), Discovery Innovation (MV-78100) - systems-on-chip CPU. - - The &os;/&arch.powerpc; now - supports SMP machines - - The &os;/&arch.powerpc; now - supports E500 (Book-E) embedded CPU and Freescale - PowerQUICCIII MPC85xx system-on-chip (including single and - dual-core). - - The &man.acpi.4; subsystem now supports the System - Resource Affinity Table (SRAT) used to describe affinity - relationships between CPUs and memory, ACPI 3.0 fields in - the MADT including X2APIC entries and UIDs for local SAPICs, and - ACPI 3.0 flags in the FADT. - - The &man.cpufreq.4; framework now - supports PowerPC G5, along with a skeleton SMU driver in order to slew - CPU voltage during frequency changes. - - The sec(4) driver has been added to provide - support for the integrated security engine found in - Freescale system-on-chip devices. - - The &os; TTY layer has been replaced with a - new one which has better support for SMP and robust resource - handling. A tty now has own mutex and it is expected to - improve scalability when compared to the old implementation - based on the Giant lock. - - The &man.uart.4; driver is now the - default driver for serial port devices in favor of the - &man.sio.4; driver. Note that the device nodes have been - renamed from - /dev/cuadN and - /dev/ttydN to - /dev/cuauN and - /dev/ttyuN. - - - Users who are upgrading will need to change their - kernel configurations and possibly also - /boot/loader.conf and - /boot/device.hints. - - - The &os; USB subsystem has been reimplemented - to support modern devices and better SMP scalability. The - new implementation includes Giant-lock-free device drivers, - a Linux compatibility layer, &man.usbconfig.8; utility, full - support for split transaction and isochronous transaction, - and more. Device node names for USB devices are now in a - the form - of /dev/usb/bus.dev.endpoint, - and /dev/usbctl is the master device - node. Note that the &man.ugen.4; driver has nodes for each device as /dev/ugenbus.dev for backward compatibility. - - &os; now supports Ultra SPARC III - (Cheetah) processor family. - - The &man.acpi.4; subsystem now supports a &man.sysctl.8; - variable debug.batt.batt_sleep_ms. On - some laptops with smart batteries, enabling battery - monitoring software causes keystrokes from &man.atkbd.4; to - be lost. This sysctl variable adds a delay in millisecond - to the status checking code as a workaround. - - The &man.acpi.asus.4; driver now supports Asus A8Sr - notebooks. - - Support for the AltiVec, a floating point - and integer SIMD instruction set has been added. - - The &man.cpuctl.4; driver, which provides a special - device /dev/cpuctl as an interface to - the system CPU has been added. The &man.cpuctl.4; - functionality includes the ability to retrieve CPUID - information, read/write machine specific registers (MSR), - and perform CPU firmware updates. - - The &man.cpufreq.4; driver now supports an - hw.est.msr_info loader tunable. When - this is set to 1, it attempts to build a - simple list containing just the high and low frequencies if - it cannot obtain a frequency list from either ACPI or the - static tables. This is disabled by default. - - CPU frequency change notifiers are now - disabled when the TSC is P-state invariant. Also, a new - loader tunable - kern.timecounter.invariant_tsc has been - added to force this behavior by setting it to - non-zero. - - The &man.atkbd.4; driver now disables the interrupt - handler which is called from the keyboard callback function - when polled mode is enabled. This fixes the problem of - duplicated/missing characters at the mountroot prompt on - multi CPU systems while &man.kbdmux.4; is enabled. - - In the &man.pci.4; subsystem INTx is now disabled when - MSI/MSIX is enabled. This change fixes interrupt storm - related issues. - - The schizo(4) driver for Schizo - Fireplane/Safari to PCI 2.1 and Tomatillo JBus to PCI 2.2 - bridges has been added. - - The &man.u3g.4; driver for USB based 3G cards and - dongles including Vodafone Mobile Connect Card 3G, Qualcomm - CDMA MSM, Huawei E220, Novatel U740, Sierra MC875U, and more - has been added. This provides support for the multiple - USB-to-serial interfaces exposed by many 3G USB/PC Card - modems, and the device is accessed through the &man.ucom.4; - driver which makes it behave like a &man.tty.4;. - - The &man.sched.ule.4; scheduler now supports - the loader tunable - machdep.hyperthreading_enabled just like - &man.sched.4bsd.4;. Note that it cannot be modified at - run-time. - - The &man.cmx.4; driver, a driver for Omnikey CardMan 4040 - PCMCIA smartcard readers, has been added. - - The &man.kbdmux.4; driver now - supports &arch.sparc64;. The &man.sunkbd.4; driver now - supports &man.atkbd.4; emulation like &man.ukbd.4;. - - The nvram(4) driver is now - MPSAFE. - - An option of the &man.puc.4; - driver, PUC_FASTINTR, is no longer - supported. - - The &man.psm.4; driver now attempts detection of Synaptics - touchpad before IntelliMouse. Some touchpads will pretend to - be IntelliMouse causing the IntelliMouse probe to work and the - Synaptics detection never to be done. - - The &man.uslcom.4; driver, a driver for Silicon - Laboratories CP2101/CP2102-based USB serial adapters, has been - imported from OpenBSD. - - - Multimedia Support - - The &os; audio subsystem has been improved. - The changes include volume per channel, high quality - fixed-point band-limited SINC sampling rate converter, - bit-perfect mode, transparent/adaptive virtual channel, - and exclusive stream. For more details, see the - &man.snd.4; manual page. - - The &man.agp.4; driver now supports Intel G4X series - graphics chipsets. - - The Direct Rendering Manager - (DRM), a kernel module that - gives direct hardware access to DRI clients, has been - updated. Support for AMD/ATI r500, r600, r700, and IGP - based chips, XGI V3XE/V5/V8, and Intel i915 chipsets has - been improved. - - A new loader tunable hw.drm.msi has - been added to control if DRM uses MSI or not. This is set - to 1 (enabled) by default. - - The snd_au88x0(4) driver for Aureal Vortex - 1/2/Advantage PCI has been removed because it has been - broken for a long time. - - The &man.snd.hda.4; driver has been updated. These - changes include support for multiple codecs per HDA bus, - multiple functional groups per codec, multiple audio - devices per functional group, digital (SPDIF/HDMI) audio - input/output, suspend/resume, and part of multichannel - audio. - - Note that due to added HDMI audio and - logical audio devices support, the updated driver often - provides several PCM devices. This means that in some - cases the system default audio device no longer - corresponds to the users's habitual audio connectors. In - such cases the default device can be specified in audio - applications' setup or defined globally via - hw.snd.default_unit sysctl variable, as - described in the &man.sound.4; manual page. - - The &man.agp.4; driver now supports the - Intel G33 and G45. - - The dpms(4) driver has - been added to use the VESA BIOS for DPMS during suspend and - resume. - - The DRM kernel driver now - supports i915 GME devices. - - - - Network Interface Support - - The &man.bwi.4; driver has been added to - provide support for Broadcom BCM43xx IEEE 802.11b/g wireless - network interfaces. - - The &man.cas.4; driver has - been added to provide support for Sun Cassini/Cassini+ and - National Semiconductor DP83065 Saturn Gigabit Ethernet - devices. - - The &man.cxgbtool.8; now supports an - interactive mode for scripting of repeatedly performed - tasks. - - The &man.fxp.4; driver has been improved. Changes include: - - - - The multicast filter re-programming - is now more robust. - - - - The checksum offload feature can be controlled by - &man.ifconfig.8; now. - - - - Rx checksum offload support for 82559 or later - controllers has been added. - - - - TSO (TCP Segmentation Offload) support for 82550 - and 82551 controllers has been added. - - - - WoL (Wake on LAN) support for 82550, 82551, 82558, - and 82559-based controllers has been added. Note that - ICH based controllers are treated as 82559, and 82557, - earlier revisions of 82558, and 82559ER have no WoL - capability. - - - - VLAN hardware tag insertion/stripping support and - Tx/Rx checksum offload for VLAN frames support has - been added. Note that the VLAN hardware assistance is - available only on 82550 or 82551-based - controllers. - - - - The mge(4) driver has - been added to provide support for Marvell Gigabit Ethernet - controllers found on ARM-based SOCs (Orion, Kirkwood, - Discovery), as well as on system controllers for PowerPC - processors (MV64430, MV6446x). - - The &man.miibus.4; driver now supports - the Marvell 88E3016. - - The &man.msk.4; driver now supports Yukon - FE+ A0 including 88E8040, 88E8040T, 88E8048 and - 88E8070. - - The &man.mwl.4; driver has been added to - provide support for Marvell 88W8363 IEEE 802.11n wireless - network devices. - - The &man.mxge.4; driver now supports some newer - revisions and 10GBASE-LRM and 10GBASE-Twinax media - types. The firmware version has been updated to 1.4.43. - - The &man.nge.4; driver has been improved and - now works on all platforms. - - The tsec(4) driver has been added to - provide support for Freescale integrated Three-Speed - Ethernet Controller (TSEC). This driver also works with - the enhanced version of the controller (eTSEC). - - The &man.uath.4; driver for USB wireless LAN - adapter based on Atheros AR5005UG and AR5005UX chipsets - has been added. The &man.uathload.8; utility, a firmware - loader for the Atheros USB wireless driver has also been - added. - - The &man.urtw.4; driver has been added to - provide support for Realtek RTL8187B/L USB IEEE 802.11b/g - wireless network devices. - - The &man.xl.4; driver now supports TX - checksum offload. - - The &man.ae.4; driver now supports WoL - (Wake on LAN). - - The &man.ale.4; driver is now - included in the GENERIC - kernel. - - The &man.ath.hal.4;, Atheros Hardware Access Layer, - has been updated to the open source version. - - The &man.axe.4; driver has been improved in - performance by eliminating extra context switches and now - supports the Apple USB Ethernet adapter. - - The &man.bce.4; driver's firmware has been updated to - the latest version (4.6.X). - - The ciphy(4) driver now supports Vitesse VSC8211 - PHY. - - The &man.cxgb.4; driver has been updated to firmware - revision 4.7 and now supports hardware MAC - statistics. - - A bug in the &man.igb.4; driver, which prevented the - loader tunable hw.igb.ave_latency from - working, has been fixed. - - The &man.ixgbe.4; driver has been updated to - version 1.7.4. - - The &man.jme.4; driver now supports newer JMicron - JMC250/JMC260 revisions. - - The &man.msk.4; driver has been improved. An issue - which made it hang up in a certain condition has been - fixed. Hardware MAC statistics support has been added - and users can get the information via sysctl variables - named - dev.msk.N.stats. - - The &man.nfe.4; driver now supports hardware MAC - statistics. - - The &man.re.4; driver has been improved. It now - detects the link status. A new loader tunable - hw.re.prefer_iomap has been added, to - disable memory register mapping. This tunable is - 0 for all controllers except RTL8169SC - family. - - The &man.rl.4; driver has been improved. It now *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Jul 17 00:29:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5CCAF106566C; Sat, 17 Jul 2010 00:29:38 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4B3BE8FC1C; Sat, 17 Jul 2010 00:29:38 +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 o6H0Tcft066741; Sat, 17 Jul 2010 00:29:38 GMT (envelope-from maxim@svn.freebsd.org) Received: (from maxim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6H0TcJV066739; Sat, 17 Jul 2010 00:29:38 GMT (envelope-from maxim@svn.freebsd.org) Message-Id: <201007170029.o6H0TcJV066739@svn.freebsd.org> From: Maxim Konovalov Date: Sat, 17 Jul 2010 00:29:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210181 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jul 2010 00:29:38 -0000 Author: maxim Date: Sat Jul 17 00:29:38 2010 New Revision: 210181 URL: http://svn.freebsd.org/changeset/base/210181 Log: o Fix typo: "is is" -> "is". PR: docs/148697 Submitted by: Warren Block MFC after: 1 week Modified: head/share/man/man4/u3g.4 Modified: head/share/man/man4/u3g.4 ============================================================================== --- head/share/man/man4/u3g.4 Sat Jul 17 00:12:41 2010 (r210180) +++ head/share/man/man4/u3g.4 Sat Jul 17 00:29:38 2010 (r210181) @@ -93,7 +93,7 @@ device will attach temporarily to a 3G d force it to switch to modem mode, The attach and detach of .Xr u3gstub -and any driver disk device present on the 3G device is is hidden, unless the +and any driver disk device present on the 3G device is hidden, unless the machine was booted in verbose mode (see .Xr boot 8 ) . To temporarily unhide the device, set From owner-svn-src-all@FreeBSD.ORG Sat Jul 17 03:39:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF87A1065674; Sat, 17 Jul 2010 03:39:50 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9ECEF8FC17; Sat, 17 Jul 2010 03:39: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 o6H3do0m008731; Sat, 17 Jul 2010 03:39:50 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6H3dor1008729; Sat, 17 Jul 2010 03:39:50 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201007170339.o6H3dor1008729@svn.freebsd.org> From: Lawrence Stewart Date: Sat, 17 Jul 2010 03:39:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210184 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jul 2010 03:39:50 -0000 Author: lstewart Date: Sat Jul 17 03:39:50 2010 New Revision: 210184 URL: http://svn.freebsd.org/changeset/base/210184 Log: Unbreak DPCPU_SUM() by dereferencing the pointer returned by DPCPU_ID_PTR(). MFC after: 3 days Modified: head/sys/sys/pcpu.h Modified: head/sys/sys/pcpu.h ============================================================================== --- head/sys/sys/pcpu.h Sat Jul 17 01:40:41 2010 (r210183) +++ head/sys/sys/pcpu.h Sat Jul 17 03:39:50 2010 (r210184) @@ -116,7 +116,7 @@ extern uintptr_t dpcpu_off[]; \ sum = 0; \ CPU_FOREACH(_i) { \ - sum += DPCPU_ID_PTR(_i, n); \ + sum += *DPCPU_ID_PTR(_i, n); \ } \ sum; \ }) From owner-svn-src-all@FreeBSD.ORG Sat Jul 17 04:35:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 27B70106566C; Sat, 17 Jul 2010 04:35:03 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 168338FC08; Sat, 17 Jul 2010 04:35:03 +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 o6H4Z2AL020879; Sat, 17 Jul 2010 04:35:02 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6H4Z2sm020877; Sat, 17 Jul 2010 04:35:02 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <201007170435.o6H4Z2sm020877@svn.freebsd.org> From: Ken Smith Date: Sat, 17 Jul 2010 04:35:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210185 - stable/8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jul 2010 04:35:03 -0000 Author: kensmith Date: Sat Jul 17 04:35:02 2010 New Revision: 210185 URL: http://svn.freebsd.org/changeset/base/210185 Log: Predict the date we'll be ready to announce 8.1-RELEASE. While here add the entry for 8.0-RELEASE which was added to releng/8.0/UPDATING during the 8.0-RELEASE cycle but not to stable/8/UPDATING at that time. Modified: stable/8/UPDATING Modified: stable/8/UPDATING ============================================================================== --- stable/8/UPDATING Sat Jul 17 03:39:50 2010 (r210184) +++ stable/8/UPDATING Sat Jul 17 04:35:02 2010 (r210185) @@ -15,6 +15,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. debugging tools present in HEAD were left in place because sun4v support still needs work to become production ready. +20100720: + 8.1-RELEASE. + 20100502: The config(8) command has been updated to maintain compatibility with config files from 8.0-RELEASE. You will need a new version @@ -56,6 +59,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. via the DEADLKRES option, see NOTES for more details) and the sleepq_type() function for sleepqueues. +20091125: + 8.0-RELEASE. + 20090929: 802.11s D3.03 support was committed. This is incompatible with the previous code, which was based on D3.0. From owner-svn-src-all@FreeBSD.ORG Sat Jul 17 04:35:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5BB7E1065678; Sat, 17 Jul 2010 04:35:51 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4B1988FC08; Sat, 17 Jul 2010 04:35: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 o6H4Zplb021075; Sat, 17 Jul 2010 04:35:51 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6H4Zpg0021073; Sat, 17 Jul 2010 04:35:51 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <201007170435.o6H4Zpg0021073@svn.freebsd.org> From: Ken Smith Date: Sat, 17 Jul 2010 04:35:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210186 - releng/8.1 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jul 2010 04:35:51 -0000 Author: kensmith Date: Sat Jul 17 04:35:51 2010 New Revision: 210186 URL: http://svn.freebsd.org/changeset/base/210186 Log: Predict the date we'll be ready to announce 8.1-RELEASE. While here add the entry for 8.0-RELEASE which was added to releng/8.0/UPDATING during the 8.0-RELEASE cycle but not to stable/8/UPDATING at that time. Approved by: re (implicit) Modified: releng/8.1/UPDATING Modified: releng/8.1/UPDATING ============================================================================== --- releng/8.1/UPDATING Sat Jul 17 04:35:02 2010 (r210185) +++ releng/8.1/UPDATING Sat Jul 17 04:35:51 2010 (r210186) @@ -15,6 +15,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. debugging tools present in HEAD were left in place because sun4v support still needs work to become production ready. +20100720: + 8.1-RELEASE. + 20100713: FreeBSD-SA-10:07.mbuf Correctly copy the M_RDONLY flag when duplicating a reference to an mbuf external buffer. @@ -60,6 +63,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. via the DEADLKRES option, see NOTES for more details) and the sleepq_type() function for sleepqueues. +20091125: + 8.0-RELEASE. + 20090929: 802.11s D3.03 support was committed. This is incompatible with the previous code, which was based on D3.0. From owner-svn-src-all@FreeBSD.ORG Sat Jul 17 04:36:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49B57106566B; Sat, 17 Jul 2010 04:36:41 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 390458FC1E; Sat, 17 Jul 2010 04:36:41 +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 o6H4afh7021308; Sat, 17 Jul 2010 04:36:41 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6H4afoj021306; Sat, 17 Jul 2010 04:36:41 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <201007170436.o6H4afoj021306@svn.freebsd.org> From: Ken Smith Date: Sat, 17 Jul 2010 04:36:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210187 - releng/8.1/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jul 2010 04:36:41 -0000 Author: kensmith Date: Sat Jul 17 04:36:40 2010 New Revision: 210187 URL: http://svn.freebsd.org/changeset/base/210187 Log: Ready for 8.1-RELEASE builds. Approved by: re (implicit) Modified: releng/8.1/sys/conf/newvers.sh Modified: releng/8.1/sys/conf/newvers.sh ============================================================================== --- releng/8.1/sys/conf/newvers.sh Sat Jul 17 04:35:51 2010 (r210186) +++ releng/8.1/sys/conf/newvers.sh Sat Jul 17 04:36:40 2010 (r210187) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="8.1" -BRANCH="RC2" +BRANCH="RELEASE" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-all@FreeBSD.ORG Sat Jul 17 05:41:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68DFD106564A; Sat, 17 Jul 2010 05:41:02 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3F0488FC08; Sat, 17 Jul 2010 05:41: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 o6H5f2dC035551; Sat, 17 Jul 2010 05:41:02 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6H5f2iS035550; Sat, 17 Jul 2010 05:41:02 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <201007170541.o6H5f2iS035550@svn.freebsd.org> From: Ken Smith Date: Sat, 17 Jul 2010 05:41:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-release@freebsd.org X-SVN-Group: release MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210188 - release/8.1.0 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jul 2010 05:41:02 -0000 Author: kensmith Date: Sat Jul 17 05:41:01 2010 New Revision: 210188 URL: http://svn.freebsd.org/changeset/base/210188 Log: Copy releng/8.1 to release/8.1.0 for 8.1-RELEASE. Approved by: re (implicit) Added: - copied from r210187, releng/8.1/ Directory Properties: release/8.1.0/ (props changed) From owner-svn-src-all@FreeBSD.ORG Sat Jul 17 07:56:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84CB9106564A; Sat, 17 Jul 2010 07:56:01 +0000 (UTC) (envelope-from keramida@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 734138FC1D; Sat, 17 Jul 2010 07:56:01 +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 o6H7u1og065134; Sat, 17 Jul 2010 07:56:01 GMT (envelope-from keramida@svn.freebsd.org) Received: (from keramida@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6H7u10U065132; Sat, 17 Jul 2010 07:56:01 GMT (envelope-from keramida@svn.freebsd.org) Message-Id: <201007170756.o6H7u10U065132@svn.freebsd.org> From: Giorgos Keramidas Date: Sat, 17 Jul 2010 07:56:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210189 - stable/8/usr.sbin/fifolog/lib X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jul 2010 07:56:01 -0000 Author: keramida (doc committer) Date: Sat Jul 17 07:56:01 2010 New Revision: 210189 URL: http://svn.freebsd.org/changeset/base/210189 Log: MFC r209871 from /head Fix reading of empty fifolog files. When we don't have anything to inflate, skip the rest of the fifolog reader code to avoid hitting the assert about Z_OK a bit further down. Modified: stable/8/usr.sbin/fifolog/lib/fifolog_reader.c Directory Properties: stable/8/usr.sbin/fifolog/ (props changed) Modified: stable/8/usr.sbin/fifolog/lib/fifolog_reader.c ============================================================================== --- stable/8/usr.sbin/fifolog/lib/fifolog_reader.c Sat Jul 17 05:41:01 2010 (r210188) +++ stable/8/usr.sbin/fifolog/lib/fifolog_reader.c Sat Jul 17 07:56:01 2010 (r210189) @@ -304,8 +304,10 @@ fifolog_reader_process(struct fifolog_re if (i == Z_STREAM_END) { i = inflateReset(zs); } - if (i != Z_OK) + if (i != Z_OK) { fprintf(stderr, "inflate = %d\n", i); + exit (250); + } assert(i == Z_OK); if (zs->avail_out != fr->olen) { q = fr->obuf + (fr->olen - zs->avail_out); From owner-svn-src-all@FreeBSD.ORG Sat Jul 17 07:59:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF56E106566B; Sat, 17 Jul 2010 07:59:53 +0000 (UTC) (envelope-from keramida@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DDD698FC16; Sat, 17 Jul 2010 07:59:53 +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 o6H7xrBe066039; Sat, 17 Jul 2010 07:59:53 GMT (envelope-from keramida@svn.freebsd.org) Received: (from keramida@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6H7xrG6066037; Sat, 17 Jul 2010 07:59:53 GMT (envelope-from keramida@svn.freebsd.org) Message-Id: <201007170759.o6H7xrG6066037@svn.freebsd.org> From: Giorgos Keramidas Date: Sat, 17 Jul 2010 07:59:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210190 - stable/7/usr.sbin/fifolog/lib X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jul 2010 07:59:54 -0000 Author: keramida (doc committer) Date: Sat Jul 17 07:59:53 2010 New Revision: 210190 URL: http://svn.freebsd.org/changeset/base/210190 Log: MFC r209871 from /head Fix reading of empty fifolog files. When we don't have anything to inflate, skip the rest of the fifolog reader code to avoid hitting the assert about Z_OK a bit further down. Modified: stable/7/usr.sbin/fifolog/lib/fifolog_reader.c Directory Properties: stable/7/usr.sbin/fifolog/ (props changed) Modified: stable/7/usr.sbin/fifolog/lib/fifolog_reader.c ============================================================================== --- stable/7/usr.sbin/fifolog/lib/fifolog_reader.c Sat Jul 17 07:56:01 2010 (r210189) +++ stable/7/usr.sbin/fifolog/lib/fifolog_reader.c Sat Jul 17 07:59:53 2010 (r210190) @@ -299,8 +299,10 @@ fifolog_reader_process(struct fifolog_re if (i == Z_STREAM_END) { i = inflateReset(zs); } - if (i != Z_OK) + if (i != Z_OK) { fprintf(stderr, "inflate = %d\n", i); + exit (250); + } assert(i == Z_OK); if (zs->avail_out != fr->olen) { q = fr->obuf + (fr->olen - zs->avail_out); From owner-svn-src-all@FreeBSD.ORG Sat Jul 17 12:53:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 94510106564A; Sat, 17 Jul 2010 12:53:57 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 841EA8FC15; Sat, 17 Jul 2010 12:53: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 o6HCrvh9032710; Sat, 17 Jul 2010 12:53:57 GMT (envelope-from bcr@svn.freebsd.org) Received: (from bcr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6HCrvbJ032709; Sat, 17 Jul 2010 12:53:57 GMT (envelope-from bcr@svn.freebsd.org) Message-Id: <201007171253.o6HCrvbJ032709@svn.freebsd.org> From: Benedict Reuschling Date: Sat, 17 Jul 2010 12:53:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210191 - head/lib/libarchive X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jul 2010 12:53:57 -0000 Author: bcr (doc committer) Date: Sat Jul 17 12:53:57 2010 New Revision: 210191 URL: http://svn.freebsd.org/changeset/base/210191 Log: s/an struct/a struct PR: docs/148660 Submitted by: Warren Block (wblock at wonkity dot com) Reviewed by: Tim Kientzle Mentored by: jkois MFC after: 7 days Modified: head/lib/libarchive/libarchive.3 Modified: head/lib/libarchive/libarchive.3 ============================================================================== --- head/lib/libarchive/libarchive.3 Sat Jul 17 07:59:53 2010 (r210190) +++ head/lib/libarchive/libarchive.3 Sat Jul 17 12:53:57 2010 (r210191) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 19, 2006 +.Dd July 17, 2010 .Dt LIBARCHIVE 3 .Os .Sh NAME @@ -158,7 +158,7 @@ Each archive entry consists of a header amount of data. You can obtain the next header with .Fn archive_read_next_header , -which returns a pointer to an +which returns a pointer to a .Tn struct archive_entry structure with information about the current archive element. If the entry is a regular file, then the header will be followed @@ -324,7 +324,7 @@ or the arbitrary key/value pairs that ca pax interchange format archives. .Pp Conversely, of course, not all of the information that can be -stored in an +stored in a .Tn struct archive_entry is supported by all formats. For example, cpio formats do not support nanosecond timestamps; From owner-svn-src-all@FreeBSD.ORG Sat Jul 17 13:16:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE564106566B; Sat, 17 Jul 2010 13:16:02 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from mx0.hoeg.nl (unknown [IPv6:2a01:4f8:101:5343::aa]) by mx1.freebsd.org (Postfix) with ESMTP id 784468FC16; Sat, 17 Jul 2010 13:16:02 +0000 (UTC) Received: by mx0.hoeg.nl (Postfix, from userid 1000) id C061A2A28CE6; Sat, 17 Jul 2010 15:16:01 +0200 (CEST) Date: Sat, 17 Jul 2010 15:16:01 +0200 From: Ed Schouten To: Benedict Reuschling Message-ID: <20100717131601.GX1742@hoeg.nl> References: <201007171253.o6HCrvbJ032709@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Zxhbmr+fMFEUWeNp" Content-Disposition: inline In-Reply-To: <201007171253.o6HCrvbJ032709@svn.freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r210191 - head/lib/libarchive X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jul 2010 13:16:03 -0000 --Zxhbmr+fMFEUWeNp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Benedict, * Benedict Reuschling wrote: > amount of data. > You can obtain the next header with > .Fn archive_read_next_header , > -which returns a pointer to an > +which returns a pointer to a > .Tn struct archive_entry > structure with information about the current archive element. > If the entry is a regular file, then the header will be followed > @@ -324,7 +324,7 @@ or the arbitrary key/value pairs that ca > pax interchange format archives. > .Pp > Conversely, of course, not all of the information that can be > -stored in an > +stored in a > .Tn struct archive_entry > is supported by all formats. > For example, cpio formats do not support nanosecond timestamps; Wouldn't it be better to change it the other way around, by removing the `struct' word? "... which returns a pointer to an archive_entry structure with ..." --=20 Ed Schouten WWW: http://80386.nl/ --Zxhbmr+fMFEUWeNp Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (FreeBSD) iEYEARECAAYFAkxBrREACgkQ52SDGA2eCwX2awCcCefnfPN1Ngus1QLVfXB0UZdj X78AnjkBrQu1ELBSyHyYwmhFYGp/byVW =LoE1 -----END PGP SIGNATURE----- --Zxhbmr+fMFEUWeNp-- From owner-svn-src-all@FreeBSD.ORG Sat Jul 17 13:21:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A3EE106566B; Sat, 17 Jul 2010 13:21:53 +0000 (UTC) (envelope-from rpaulo@freebsd.org) Received: from karen.lavabit.com (karen.lavabit.com [72.249.41.33]) by mx1.freebsd.org (Postfix) with ESMTP id 6E5878FC0C; Sat, 17 Jul 2010 13:21:53 +0000 (UTC) Received: from e.earth.lavabit.com (e.earth.lavabit.com [192.168.111.14]) by karen.lavabit.com (Postfix) with ESMTP id 60DBC15755D; Sat, 17 Jul 2010 08:21:52 -0500 (CDT) Received: from 10.0.10.3 (54.81.54.77.rev.vodafone.pt [77.54.81.54]) by lavabit.com with ESMTP id X7H3F9XV5HU0; Sat, 17 Jul 2010 08:21:52 -0500 Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: text/plain; charset=us-ascii From: Rui Paulo In-Reply-To: <201007151441.o6FEf6Lc015448@svn.freebsd.org> Date: Sat, 17 Jul 2010 14:21:48 +0100 Content-Transfer-Encoding: 7bit Message-Id: References: <201007151441.o6FEf6Lc015448@svn.freebsd.org> To: Luigi Rizzo X-Mailer: Apple Mail (2.1081) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r210121 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jul 2010 13:21:55 -0000 On 15 Jul 2010, at 15:41, Luigi Rizzo wrote: > Author: luigi > Date: Thu Jul 15 14:41:06 2010 > New Revision: 210121 > URL: http://svn.freebsd.org/changeset/base/210121 > > Log: > small portability fix to build on linux/windows Do we really want this, especially on sys? Regards, -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Sat Jul 17 13:31:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2ACA1065679; Sat, 17 Jul 2010 13:31:27 +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 C1C0B8FC08; Sat, 17 Jul 2010 13:31:27 +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 o6HDVRBZ041007; Sat, 17 Jul 2010 13:31:27 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6HDVRUT041005; Sat, 17 Jul 2010 13:31:27 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201007171331.o6HDVRUT041005@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 17 Jul 2010 13:31:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210192 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jul 2010 13:31:27 -0000 Author: nwhitehorn Date: Sat Jul 17 13:31:27 2010 New Revision: 210192 URL: http://svn.freebsd.org/changeset/base/210192 Log: Increase stack size for ZFS sync thread. This is required to make ZFS function on 64-bit PowerPC. Reviewed by: pjd Obtained from: OpenSolaris changeset 14653:7cf402a7f374 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c Sat Jul 17 12:53:57 2010 (r210191) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c Sat Jul 17 13:31:27 2010 (r210192) @@ -146,7 +146,7 @@ txg_sync_start(dsl_pool_t *dp) * 32-bit x86. This is due in part to nested pools and * scrub_visitbp() recursion. */ - tx->tx_sync_thread = thread_create(NULL, 12<<10, txg_sync_thread, + tx->tx_sync_thread = thread_create(NULL, 32<<10, txg_sync_thread, dp, 0, &p0, TS_RUN, minclsyspri); mutex_exit(&tx->tx_sync_lock); From owner-svn-src-all@FreeBSD.ORG Sat Jul 17 13:34:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A7A431065670; Sat, 17 Jul 2010 13:34:01 +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 95A678FC1C; Sat, 17 Jul 2010 13:34:01 +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 o6HDY14U041617; Sat, 17 Jul 2010 13:34:01 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6HDY1Kr041612; Sat, 17 Jul 2010 13:34:01 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201007171334.o6HDY1Kr041612@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 17 Jul 2010 13:34:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210193 - in head/sys: cddl/contrib/opensolaris/common/atomic/powerpc64 modules modules/opensolaris modules/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jul 2010 13:34:01 -0000 Author: nwhitehorn Date: Sat Jul 17 13:34:01 2010 New Revision: 210193 URL: http://svn.freebsd.org/changeset/base/210193 Log: Add OpenSolaris atomics for powerpc64 and connect ZFS to the build on this platform. Reviewed by: pjd Added: head/sys/cddl/contrib/opensolaris/common/atomic/powerpc64/ head/sys/cddl/contrib/opensolaris/common/atomic/powerpc64/opensolaris_atomic.S (contents, props changed) Modified: head/sys/modules/Makefile head/sys/modules/opensolaris/Makefile head/sys/modules/zfs/Makefile Added: head/sys/cddl/contrib/opensolaris/common/atomic/powerpc64/opensolaris_atomic.S ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/cddl/contrib/opensolaris/common/atomic/powerpc64/opensolaris_atomic.S Sat Jul 17 13:34:01 2010 (r210193) @@ -0,0 +1,75 @@ +/*- + * Copyright (C) 2010 Nathan Whitehorn + * 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 ``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 TOOLS GMBH 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. + * + * $FreeBSD$ + */ + +#include + +ENTRY(atomic_add_64_nv) + 1: ldarx %r5,0,%r3 + add %r5,%r4,%r5 + stdcx. %r5,0,%r3 + bne- 1b + + mr %r3,%r5 + blr + +ENTRY(atomic_cas_64) + 1: ldarx %r6,0,%r3 + cmpld %r6,%r4 + bne 2f + stdcx. %r5,0,%r3 + bne- 1b + b 3f + + 2: stdcx. %r6,0,%r3 /* clear reservation */ + + 3: mr %r3,%r6 + blr + +ENTRY(atomic_or_8_nv) + li %r6,3 + andc. %r6,%r3,%r6 /* r6 = r3 & ~4 */ + addi %r7,%r6,3 + sub %r7,%r7,%r3 /* offset in r7 */ + sldi %r7,%r7,3 /* bits to shift in r7 */ + + rlwinm %r4,%r4,0,24,31 /* mask and rotate the argument */ + slw %r4,%r4,%r7 + + 1: lwarx %r5,0,%r6 + or %r5,%r4,%r5 + stwcx. %r5,0,%r6 + bne- 1b + + srw %r3,%r5,%r7 + rlwinm %r3,%r3,0,24,31 /* mask return value */ + + blr + +ENTRY(membar_producer) + eieio + blr + Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Sat Jul 17 13:31:27 2010 (r210192) +++ head/sys/modules/Makefile Sat Jul 17 13:34:01 2010 (r210193) @@ -624,6 +624,15 @@ _smbfs= smbfs _sound= sound .endif +.if ${MACHINE_ARCH} == "powerpc64" +.if ${MK_CDDL} != "no" || defined(ALL_MODULES) +_opensolaris= opensolaris +.endif +.if ${MK_ZFS} != "no" || defined(ALL_MODULES) +_zfs= zfs +.endif +.endif + .if ${MACHINE_ARCH} == "sparc64" _auxio= auxio _em= em Modified: head/sys/modules/opensolaris/Makefile ============================================================================== --- head/sys/modules/opensolaris/Makefile Sat Jul 17 13:31:27 2010 (r210192) +++ head/sys/modules/opensolaris/Makefile Sat Jul 17 13:34:01 2010 (r210193) @@ -8,7 +8,7 @@ SRCS= opensolaris.c \ opensolaris_kmem.c \ opensolaris_misc.c -.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "ia64" || ${MACHINE_ARCH} == "sparc64" +.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "ia64" || ${MACHINE_ARCH} == "sparc64" || ${MACHINE_ARCH} == "powerpc64" .PATH: ${.CURDIR}/../../cddl/contrib/opensolaris/common/atomic/${MACHINE_ARCH} SRCS+= opensolaris_atomic.S .else Modified: head/sys/modules/zfs/Makefile ============================================================================== --- head/sys/modules/zfs/Makefile Sat Jul 17 13:31:27 2010 (r210192) +++ head/sys/modules/zfs/Makefile Sat Jul 17 13:34:01 2010 (r210193) @@ -27,7 +27,7 @@ SRCS+= opensolaris_uio.c SRCS+= opensolaris_vfs.c SRCS+= opensolaris_zone.c -.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "ia64" || ${MACHINE_ARCH} == "sparc64" +.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "ia64" || ${MACHINE_ARCH} == "sparc64" || ${MACHINE_ARCH} == "powerpc64" .PATH: ${SUNW}/common/atomic/${MACHINE_ARCH} SRCS+= opensolaris_atomic.S .else From owner-svn-src-all@FreeBSD.ORG Sat Jul 17 15:35:08 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15F771065673; Sat, 17 Jul 2010 15:35:08 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from mxout0.bln1.prohost.de (mxout0.bln1.prohost.de [213.160.84.46]) by mx1.freebsd.org (Postfix) with ESMTP id 970398FC17; Sat, 17 Jul 2010 15:35:07 +0000 (UTC) Received: from Macintosh.local (p4FC7523A.dip.t-dialin.net [79.199.82.58]) (authenticated bits=0) by mx1.bln1.prohost.de (8.14.1/8.14.1) with ESMTP id o6HFNepv023388 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 17 Jul 2010 17:23:41 +0200 Message-ID: <4C41CAFF.60208@FreeBSD.org> Date: Sat, 17 Jul 2010 17:23:43 +0200 From: Benedict Reuschling Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; de; rv:1.9.2.4) Gecko/20100608 Thunderbird/3.1 MIME-Version: 1.0 To: Ed Schouten References: <201007171253.o6HCrvbJ032709@svn.freebsd.org> <20100717131601.GX1742@hoeg.nl> In-Reply-To: <20100717131601.GX1742@hoeg.nl> X-Enigmail-Version: 1.1.1 OpenPGP: id=4A819348 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-Null-Tag: e76b737e49f26e068b3026fdd7ed1c34 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r210191 - head/lib/libarchive X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: bcr@FreeBSD.org List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jul 2010 15:35:08 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Ed, Am 17.07.10 15:16, schrieb Ed Schouten: > Hi Benedict, > > * Benedict Reuschling wrote: >> amount of data. >> You can obtain the next header with >> .Fn archive_read_next_header , >> -which returns a pointer to an >> +which returns a pointer to a >> .Tn struct archive_entry >> structure with information about the current archive element. >> If the entry is a regular file, then the header will be followed >> @@ -324,7 +324,7 @@ or the arbitrary key/value pairs that ca >> pax interchange format archives. >> .Pp >> Conversely, of course, not all of the information that can be >> -stored in an >> +stored in a >> .Tn struct archive_entry >> is supported by all formats. >> For example, cpio formats do not support nanosecond timestamps; > > Wouldn't it be better to change it the other way around, by removing the > `struct' word? > > "... which returns a pointer to an archive_entry structure with ..." > the way I see it, "struct something structure" has a redundant struct (or structure) when read with my "normal english sentence" glasses on. However, in this case it is important for the understanding that archive_entry IS a struct and therefore the "struct archive_entry" must be read as a source code example within the text (partly looking through my source code glasses). There are more places in this man page where the struct is placed similarly, so for the sake of consistency, I would prefer to leave it as it is now. If that man page was not primarily written for developers (which I think it is), I would agree with you on that. Your suggestion is right, nonetheless. Regards (or "Groetjes", as I've learned recently) ;-) Benedict Reuschling The FreeBSD Documentation Project FreeBSD German Documentation Project - https://doc.bsdgroup.de -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkxByvcACgkQTSZQLkqBk0i5wwCgpVzqlGPHSrMBluRBJFmktgFe gHEAnRpzUCz5JHirYYsIxeU/IM8b28fB =Lk3C -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Sat Jul 17 15:45:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76CFD106567B; Sat, 17 Jul 2010 15:45:20 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6647D8FC14; Sat, 17 Jul 2010 15:45:20 +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 o6HFjKiw070605; Sat, 17 Jul 2010 15:45:20 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6HFjKex070603; Sat, 17 Jul 2010 15:45:20 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201007171545.o6HFjKex070603@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sat, 17 Jul 2010 15:45:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210194 - head/sys/fs/unionfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jul 2010 15:45:20 -0000 Author: trasz Date: Sat Jul 17 15:45:20 2010 New Revision: 210194 URL: http://svn.freebsd.org/changeset/base/210194 Log: Remove updating process count by unionfs. It serves no purpose, unionfs just needs root credentials for a moment. Modified: head/sys/fs/unionfs/union_subr.c Modified: head/sys/fs/unionfs/union_subr.c ============================================================================== --- head/sys/fs/unionfs/union_subr.c Sat Jul 17 13:34:01 2010 (r210193) +++ head/sys/fs/unionfs/union_subr.c Sat Jul 17 15:45:20 2010 (r210194) @@ -50,7 +50,6 @@ #include #include #include -#include #include @@ -775,7 +774,6 @@ unionfs_mkshadowdir(struct unionfs_mount /* Authority change to root */ rootinfo = uifind((uid_t)0); cred = crdup(cnp->cn_cred); - chgproccnt(cred->cr_ruidinfo, 1, 0); change_euid(cred, rootinfo); change_ruid(cred, rootinfo); change_svuid(cred, (uid_t)0); @@ -825,7 +823,6 @@ unionfs_mkshadowdir_free_out: unionfs_mkshadowdir_abort: cnp->cn_cred = credbk; - chgproccnt(cred->cr_ruidinfo, -1, 0); crfree(cred); return (error); From owner-svn-src-all@FreeBSD.ORG Sat Jul 17 15:47:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F3FC1065673; Sat, 17 Jul 2010 15:47:24 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1E34B8FC17; Sat, 17 Jul 2010 15:47:24 +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 o6HFlO6o071066; Sat, 17 Jul 2010 15:47:24 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6HFlOcK071064; Sat, 17 Jul 2010 15:47:24 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201007171547.o6HFlOcK071064@svn.freebsd.org> From: Marius Strobl Date: Sat, 17 Jul 2010 15:47:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210195 - stable/8/sys/dev/mpt X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jul 2010 15:47:24 -0000 Author: marius Date: Sat Jul 17 15:47:23 2010 New Revision: 210195 URL: http://svn.freebsd.org/changeset/base/210195 Log: MFC: r209961 Correct inverted parent DMA tag parameters. Reviewed by: ken Modified: stable/8/sys/dev/mpt/mpt_pci.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/mpt/mpt_pci.c ============================================================================== --- stable/8/sys/dev/mpt/mpt_pci.c Sat Jul 17 15:45:20 2010 (r210194) +++ stable/8/sys/dev/mpt/mpt_pci.c Sat Jul 17 15:47:23 2010 (r210195) @@ -757,8 +757,8 @@ mpt_dma_mem_alloc(struct mpt_softc *mpt) /*alignment*/1, /*boundary*/0, /*lowaddr*/BUS_SPACE_MAXADDR, /*highaddr*/BUS_SPACE_MAXADDR, /*filter*/NULL, /*filterarg*/NULL, /*maxsize*/BUS_SPACE_MAXSIZE_32BIT, - /*nsegments*/BUS_SPACE_MAXSIZE_32BIT, - /*maxsegsz*/BUS_SPACE_UNRESTRICTED, /*flags*/0, + /*nsegments*/BUS_SPACE_UNRESTRICTED, + /*maxsegsz*/BUS_SPACE_MAXSIZE_32BIT, /*flags*/0, &mpt->parent_dmat) != 0) { mpt_prt(mpt, "cannot create parent dma tag\n"); return (1); From owner-svn-src-all@FreeBSD.ORG Sat Jul 17 15:47:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF9A81065674; Sat, 17 Jul 2010 15:47:28 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BE6328FC08; Sat, 17 Jul 2010 15:47:28 +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 o6HFlSl7071131; Sat, 17 Jul 2010 15:47:28 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6HFlST0071129; Sat, 17 Jul 2010 15:47:28 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201007171547.o6HFlST0071129@svn.freebsd.org> From: Marius Strobl Date: Sat, 17 Jul 2010 15:47:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210196 - stable/7/sys/dev/mpt X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jul 2010 15:47:28 -0000 Author: marius Date: Sat Jul 17 15:47:28 2010 New Revision: 210196 URL: http://svn.freebsd.org/changeset/base/210196 Log: MFC: r209961 Correct inverted parent DMA tag parameters. Reviewed by: ken Modified: stable/7/sys/dev/mpt/mpt_pci.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/mpt/mpt_pci.c ============================================================================== --- stable/7/sys/dev/mpt/mpt_pci.c Sat Jul 17 15:47:23 2010 (r210195) +++ stable/7/sys/dev/mpt/mpt_pci.c Sat Jul 17 15:47:28 2010 (r210196) @@ -757,8 +757,8 @@ mpt_dma_mem_alloc(struct mpt_softc *mpt) /*alignment*/1, /*boundary*/0, /*lowaddr*/BUS_SPACE_MAXADDR, /*highaddr*/BUS_SPACE_MAXADDR, /*filter*/NULL, /*filterarg*/NULL, /*maxsize*/BUS_SPACE_MAXSIZE_32BIT, - /*nsegments*/BUS_SPACE_MAXSIZE_32BIT, - /*maxsegsz*/BUS_SPACE_UNRESTRICTED, /*flags*/0, + /*nsegments*/BUS_SPACE_UNRESTRICTED, + /*maxsegsz*/BUS_SPACE_MAXSIZE_32BIT, /*flags*/0, &mpt->parent_dmat) != 0) { mpt_prt(mpt, "cannot create parent dma tag\n"); return (1); From owner-svn-src-all@FreeBSD.ORG Sat Jul 17 15:52:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 13C5A1065679; Sat, 17 Jul 2010 15:52:12 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 033DC8FC22; Sat, 17 Jul 2010 15:52:12 +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 o6HFqBNK072225; Sat, 17 Jul 2010 15:52:11 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6HFqBAl072223; Sat, 17 Jul 2010 15:52:11 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201007171552.o6HFqBAl072223@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sat, 17 Jul 2010 15:52:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210197 - head/sys/compat/svr4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jul 2010 15:52:12 -0000 Author: trasz Date: Sat Jul 17 15:52:11 2010 New Revision: 210197 URL: http://svn.freebsd.org/changeset/base/210197 Log: Remove proc locking, it's not needed after r210132. Modified: head/sys/compat/svr4/svr4_filio.c Modified: head/sys/compat/svr4/svr4_filio.c ============================================================================== --- head/sys/compat/svr4/svr4_filio.c Sat Jul 17 15:47:28 2010 (r210196) +++ head/sys/compat/svr4/svr4_filio.c Sat Jul 17 15:52:11 2010 (r210197) @@ -64,12 +64,8 @@ svr4_sys_poll(td, uap) int idx = 0, cerr; u_long siz; - PROC_LOCK(td->td_proc); - if (uap->nfds > maxfilesperproc && uap->nfds > FD_SETSIZE) { - PROC_UNLOCK(td->td_proc); + if (uap->nfds > maxfilesperproc && uap->nfds > FD_SETSIZE) return (EINVAL); - } - PROC_UNLOCK(td->td_proc); pa.fds = uap->fds; pa.nfds = uap->nfds; From owner-svn-src-all@FreeBSD.ORG Sat Jul 17 18:05:37 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 214A41065677; Sat, 17 Jul 2010 18:05:37 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id D1B548FC0A; Sat, 17 Jul 2010 18:05:35 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 2DA3E730A1; Sat, 17 Jul 2010 20:16:31 +0200 (CEST) Date: Sat, 17 Jul 2010 20:16:31 +0200 From: Luigi Rizzo To: Rui Paulo Message-ID: <20100717181631.GA89827@onelab2.iet.unipi.it> References: <201007151441.o6FEf6Lc015448@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@FreeBSD.org, Luigi Rizzo , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org Subject: Re: svn commit: r210121 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jul 2010 18:05:37 -0000 On Sat, Jul 17, 2010 at 02:21:48PM +0100, Rui Paulo wrote: > > On 15 Jul 2010, at 15:41, Luigi Rizzo wrote: > > > Author: luigi > > Date: Thu Jul 15 14:41:06 2010 > > New Revision: 210121 > > URL: http://svn.freebsd.org/changeset/base/210121 > > > > Log: > > small portability fix to build on linux/windows > > Do we really want this, especially on sys? the alternative would be to keep a separate tree with cross platform sources, and periodically import the code in FreeBSD. This seems largely overkill considering that 1. most of the development of ipfw/dummynet occurs within FreeBSD and there are several people besides myself contributing features and bugfixes; 2. as you can see, the number and size of OS-specific parts is very very small (this was one of my goals when porting it) so there is no loss of readability. Also, I am deliberately avoiding any change that would cause a loss of performance on FreeBSD: in case, i put the extra burden on other platforms. cheers luigi From owner-svn-src-all@FreeBSD.ORG Sat Jul 17 18:29:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 42997106566B; Sat, 17 Jul 2010 18:29:37 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EBE1F8FC1A; Sat, 17 Jul 2010 18:29: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 o6HITabI006724; Sat, 17 Jul 2010 18:29:36 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6HITaUs006718; Sat, 17 Jul 2010 18:29:36 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201007171829.o6HITaUs006718@svn.freebsd.org> From: Rui Paulo Date: Sat, 17 Jul 2010 18:29:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210198 - in vendor/opensolaris/dist/lib/libdtrace: i386 sparc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jul 2010 18:29:37 -0000 Author: rpaulo Date: Sat Jul 17 18:29:36 2010 New Revision: 210198 URL: http://svn.freebsd.org/changeset/base/210198 Log: libdtrace MD dependent files. These interact with the fasttrap provider and so they are needed for constructing pid and usdt probes. Added: vendor/opensolaris/dist/lib/libdtrace/i386/ vendor/opensolaris/dist/lib/libdtrace/i386/dt_isadep.c (contents, props changed) vendor/opensolaris/dist/lib/libdtrace/i386/regs.d.in (contents, props changed) vendor/opensolaris/dist/lib/libdtrace/i386/regs.sed.in (contents, props changed) vendor/opensolaris/dist/lib/libdtrace/sparc/ vendor/opensolaris/dist/lib/libdtrace/sparc/dt_isadep.c (contents, props changed) vendor/opensolaris/dist/lib/libdtrace/sparc/regs.d Added: vendor/opensolaris/dist/lib/libdtrace/i386/dt_isadep.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/opensolaris/dist/lib/libdtrace/i386/dt_isadep.c Sat Jul 17 18:29:36 2010 (r210198) @@ -0,0 +1,488 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#include +#include +#include +#include +#include + +#include +#include + +#include + +#define DT_POPL_EBP 0x5d +#define DT_RET 0xc3 +#define DT_RET16 0xc2 +#define DT_LEAVE 0xc9 +#define DT_JMP32 0xe9 +#define DT_JMP8 0xeb +#define DT_REP 0xf3 + +#define DT_MOVL_EBP_ESP 0xe58b + +#define DT_ISJ32(op16) (((op16) & 0xfff0) == 0x0f80) +#define DT_ISJ8(op8) (((op8) & 0xf0) == 0x70) + +#define DT_MODRM_REG(modrm) (((modrm) >> 3) & 0x7) + +static int dt_instr_size(uchar_t *, dtrace_hdl_t *, pid_t, uintptr_t, char); + +/*ARGSUSED*/ +int +dt_pid_create_entry_probe(struct ps_prochandle *P, dtrace_hdl_t *dtp, + fasttrap_probe_spec_t *ftp, const GElf_Sym *symp) +{ + ftp->ftps_type = DTFTP_ENTRY; + ftp->ftps_pc = (uintptr_t)symp->st_value; + ftp->ftps_size = (size_t)symp->st_size; + ftp->ftps_noffs = 1; + ftp->ftps_offs[0] = 0; + + if (ioctl(dtp->dt_ftfd, FASTTRAPIOC_MAKEPROBE, ftp) != 0) { + dt_dprintf("fasttrap probe creation ioctl failed: %s\n", + strerror(errno)); + return (dt_set_errno(dtp, errno)); + } + + return (1); +} + +static int +dt_pid_has_jump_table(struct ps_prochandle *P, dtrace_hdl_t *dtp, + uint8_t *text, fasttrap_probe_spec_t *ftp, const GElf_Sym *symp) +{ + ulong_t i; + int size; + pid_t pid = Pstatus(P)->pr_pid; + char dmodel = Pstatus(P)->pr_dmodel; + + /* + * Take a pass through the function looking for a register-dependant + * jmp instruction. This could be a jump table so we have to be + * ultra conservative. + */ + for (i = 0; i < ftp->ftps_size; i += size) { + size = dt_instr_size(&text[i], dtp, pid, symp->st_value + i, + dmodel); + + /* + * Assume the worst if we hit an illegal instruction. + */ + if (size <= 0) { + dt_dprintf("error at %#lx (assuming jump table)\n", i); + return (1); + } + + /* + * Register-dependant jmp instructions start with a 0xff byte + * and have the modrm.reg field set to 4. They can have an + * optional REX prefix on the 64-bit ISA. + */ + if ((text[i] == 0xff && DT_MODRM_REG(text[i + 1]) == 4) || + (dmodel == PR_MODEL_LP64 && (text[i] & 0xf0) == 0x40 && + text[i + 1] == 0xff && DT_MODRM_REG(text[i + 2]) == 4)) { + dt_dprintf("found a suspected jump table at %s:%lx\n", + ftp->ftps_func, i); + return (1); + } + } + + return (0); +} + +/*ARGSUSED*/ +int +dt_pid_create_return_probe(struct ps_prochandle *P, dtrace_hdl_t *dtp, + fasttrap_probe_spec_t *ftp, const GElf_Sym *symp, uint64_t *stret) +{ + uint8_t *text; + ulong_t i, end; + int size; + pid_t pid = Pstatus(P)->pr_pid; + char dmodel = Pstatus(P)->pr_dmodel; + + /* + * We allocate a few extra bytes at the end so we don't have to check + * for overrunning the buffer. + */ + if ((text = calloc(1, symp->st_size + 4)) == NULL) { + dt_dprintf("mr sparkle: malloc() failed\n"); + return (DT_PROC_ERR); + } + + if (Pread(P, text, symp->st_size, symp->st_value) != symp->st_size) { + dt_dprintf("mr sparkle: Pread() failed\n"); + free(text); + return (DT_PROC_ERR); + } + + ftp->ftps_type = DTFTP_RETURN; + ftp->ftps_pc = (uintptr_t)symp->st_value; + ftp->ftps_size = (size_t)symp->st_size; + ftp->ftps_noffs = 0; + + /* + * If there's a jump table in the function we're only willing to + * instrument these specific (and equivalent) instruction sequences: + * leave + * [rep] ret + * and + * movl %ebp,%esp + * popl %ebp + * [rep] ret + * + * We do this to avoid accidentally interpreting jump table + * offsets as actual instructions. + */ + if (dt_pid_has_jump_table(P, dtp, text, ftp, symp)) { + for (i = 0, end = ftp->ftps_size; i < end; i += size) { + size = dt_instr_size(&text[i], dtp, pid, + symp->st_value + i, dmodel); + + /* bail if we hit an invalid opcode */ + if (size <= 0) + break; + + if (text[i] == DT_LEAVE && text[i + 1] == DT_RET) { + dt_dprintf("leave/ret at %lx\n", i + 1); + ftp->ftps_offs[ftp->ftps_noffs++] = i + 1; + size = 2; + } else if (text[i] == DT_LEAVE && + text[i + 1] == DT_REP && text[i + 2] == DT_RET) { + dt_dprintf("leave/rep ret at %lx\n", i + 1); + ftp->ftps_offs[ftp->ftps_noffs++] = i + 1; + size = 3; + } else if (*(uint16_t *)&text[i] == DT_MOVL_EBP_ESP && + text[i + 2] == DT_POPL_EBP && + text[i + 3] == DT_RET) { + dt_dprintf("movl/popl/ret at %lx\n", i + 3); + ftp->ftps_offs[ftp->ftps_noffs++] = i + 3; + size = 4; + } else if (*(uint16_t *)&text[i] == DT_MOVL_EBP_ESP && + text[i + 2] == DT_POPL_EBP && + text[i + 3] == DT_REP && + text[i + 4] == DT_RET) { + dt_dprintf("movl/popl/rep ret at %lx\n", i + 3); + ftp->ftps_offs[ftp->ftps_noffs++] = i + 3; + size = 5; + } + } + } else { + for (i = 0, end = ftp->ftps_size; i < end; i += size) { + size = dt_instr_size(&text[i], dtp, pid, + symp->st_value + i, dmodel); + + /* bail if we hit an invalid opcode */ + if (size <= 0) + break; + + /* ordinary ret */ + if (size == 1 && text[i] == DT_RET) + goto is_ret; + + /* two-byte ret */ + if (size == 2 && text[i] == DT_REP && + text[i + 1] == DT_RET) + goto is_ret; + + /* ret */ + if (size == 3 && text[i] == DT_RET16) + goto is_ret; + + /* two-byte ret */ + if (size == 4 && text[i] == DT_REP && + text[i + 1] == DT_RET16) + goto is_ret; + + /* 32-bit displacement jmp outside of the function */ + if (size == 5 && text[i] == DT_JMP32 && symp->st_size <= + (uintptr_t)(i + size + *(int32_t *)&text[i + 1])) + goto is_ret; + + /* 8-bit displacement jmp outside of the function */ + if (size == 2 && text[i] == DT_JMP8 && symp->st_size <= + (uintptr_t)(i + size + *(int8_t *)&text[i + 1])) + goto is_ret; + + /* 32-bit disp. conditional jmp outside of the func. */ + if (size == 6 && DT_ISJ32(*(uint16_t *)&text[i]) && + symp->st_size <= + (uintptr_t)(i + size + *(int32_t *)&text[i + 2])) + goto is_ret; + + /* 8-bit disp. conditional jmp outside of the func. */ + if (size == 2 && DT_ISJ8(text[i]) && symp->st_size <= + (uintptr_t)(i + size + *(int8_t *)&text[i + 1])) + goto is_ret; + + continue; +is_ret: + dt_dprintf("return at offset %lx\n", i); + ftp->ftps_offs[ftp->ftps_noffs++] = i; + } + } + + free(text); + if (ftp->ftps_noffs > 0) { + if (ioctl(dtp->dt_ftfd, FASTTRAPIOC_MAKEPROBE, ftp) != 0) { + dt_dprintf("fasttrap probe creation ioctl failed: %s\n", + strerror(errno)); + return (dt_set_errno(dtp, errno)); + } + } + + return (ftp->ftps_noffs); +} + +/*ARGSUSED*/ +int +dt_pid_create_offset_probe(struct ps_prochandle *P, dtrace_hdl_t *dtp, + fasttrap_probe_spec_t *ftp, const GElf_Sym *symp, ulong_t off) +{ + ftp->ftps_type = DTFTP_OFFSETS; + ftp->ftps_pc = (uintptr_t)symp->st_value; + ftp->ftps_size = (size_t)symp->st_size; + ftp->ftps_noffs = 1; + + if (strcmp("-", ftp->ftps_func) == 0) { + ftp->ftps_offs[0] = off; + } else { + uint8_t *text; + ulong_t i; + int size; + pid_t pid = Pstatus(P)->pr_pid; + char dmodel = Pstatus(P)->pr_dmodel; + + if ((text = malloc(symp->st_size)) == NULL) { + dt_dprintf("mr sparkle: malloc() failed\n"); + return (DT_PROC_ERR); + } + + if (Pread(P, text, symp->st_size, symp->st_value) != + symp->st_size) { + dt_dprintf("mr sparkle: Pread() failed\n"); + free(text); + return (DT_PROC_ERR); + } + + /* + * We can't instrument offsets in functions with jump tables + * as we might interpret a jump table offset as an + * instruction. + */ + if (dt_pid_has_jump_table(P, dtp, text, ftp, symp)) { + free(text); + return (0); + } + + for (i = 0; i < symp->st_size; i += size) { + if (i == off) { + ftp->ftps_offs[0] = i; + break; + } + + /* + * If we've passed the desired offset without a + * match, then the given offset must not lie on a + * instruction boundary. + */ + if (i > off) { + free(text); + return (DT_PROC_ALIGN); + } + + size = dt_instr_size(&text[i], dtp, pid, + symp->st_value + i, dmodel); + + /* + * If we hit an invalid instruction, bail as if we + * couldn't find the offset. + */ + if (size <= 0) { + free(text); + return (DT_PROC_ALIGN); + } + } + + free(text); + } + + if (ioctl(dtp->dt_ftfd, FASTTRAPIOC_MAKEPROBE, ftp) != 0) { + dt_dprintf("fasttrap probe creation ioctl failed: %s\n", + strerror(errno)); + return (dt_set_errno(dtp, errno)); + } + + return (ftp->ftps_noffs); +} + +/*ARGSUSED*/ +int +dt_pid_create_glob_offset_probes(struct ps_prochandle *P, dtrace_hdl_t *dtp, + fasttrap_probe_spec_t *ftp, const GElf_Sym *symp, const char *pattern) +{ + uint8_t *text; + int size; + ulong_t i, end = symp->st_size; + pid_t pid = Pstatus(P)->pr_pid; + char dmodel = Pstatus(P)->pr_dmodel; + + ftp->ftps_type = DTFTP_OFFSETS; + ftp->ftps_pc = (uintptr_t)symp->st_value; + ftp->ftps_size = (size_t)symp->st_size; + ftp->ftps_noffs = 0; + + if ((text = malloc(symp->st_size)) == NULL) { + dt_dprintf("mr sparkle: malloc() failed\n"); + return (DT_PROC_ERR); + } + + if (Pread(P, text, symp->st_size, symp->st_value) != symp->st_size) { + dt_dprintf("mr sparkle: Pread() failed\n"); + free(text); + return (DT_PROC_ERR); + } + + /* + * We can't instrument offsets in functions with jump tables as + * we might interpret a jump table offset as an instruction. + */ + if (dt_pid_has_jump_table(P, dtp, text, ftp, symp)) { + free(text); + return (0); + } + + if (strcmp("*", pattern) == 0) { + for (i = 0; i < end; i += size) { + ftp->ftps_offs[ftp->ftps_noffs++] = i; + + size = dt_instr_size(&text[i], dtp, pid, + symp->st_value + i, dmodel); + + /* bail if we hit an invalid opcode */ + if (size <= 0) + break; + } + } else { + char name[sizeof (i) * 2 + 1]; + + for (i = 0; i < end; i += size) { + (void) snprintf(name, sizeof (name), "%x", i); + if (gmatch(name, pattern)) + ftp->ftps_offs[ftp->ftps_noffs++] = i; + + size = dt_instr_size(&text[i], dtp, pid, + symp->st_value + i, dmodel); + + /* bail if we hit an invalid opcode */ + if (size <= 0) + break; + } + } + + free(text); + if (ftp->ftps_noffs > 0) { + if (ioctl(dtp->dt_ftfd, FASTTRAPIOC_MAKEPROBE, ftp) != 0) { + dt_dprintf("fasttrap probe creation ioctl failed: %s\n", + strerror(errno)); + return (dt_set_errno(dtp, errno)); + } + } + + return (ftp->ftps_noffs); +} + +typedef struct dtrace_dis { + uchar_t *instr; + dtrace_hdl_t *dtp; + pid_t pid; + uintptr_t addr; +} dtrace_dis_t; + +static int +dt_getbyte(void *data) +{ + dtrace_dis_t *dis = data; + int ret = *dis->instr; + + if (ret == FASTTRAP_INSTR) { + fasttrap_instr_query_t instr; + + instr.ftiq_pid = dis->pid; + instr.ftiq_pc = dis->addr; + + /* + * If we hit a byte that looks like the fasttrap provider's + * trap instruction (which doubles as the breakpoint + * instruction for debuggers) we need to query the kernel + * for the real value. This may just be part of an immediate + * value so there's no need to return an error if the + * kernel doesn't know about this address. + */ + if (ioctl(dis->dtp->dt_ftfd, FASTTRAPIOC_GETINSTR, &instr) == 0) + ret = instr.ftiq_instr; + } + + dis->addr++; + dis->instr++; + + return (ret); +} + +static int +dt_instr_size(uchar_t *instr, dtrace_hdl_t *dtp, pid_t pid, uintptr_t addr, + char dmodel) +{ + dtrace_dis_t data; + dis86_t x86dis; + uint_t cpu_mode; + + data.instr = instr; + data.dtp = dtp; + data.pid = pid; + data.addr = addr; + + x86dis.d86_data = &data; + x86dis.d86_get_byte = dt_getbyte; + x86dis.d86_check_func = NULL; + + cpu_mode = (dmodel == PR_MODEL_ILP32) ? SIZE32 : SIZE64; + + if (dtrace_disx86(&x86dis, cpu_mode) != 0) + return (-1); + + /* + * If the instruction was a single-byte breakpoint, there may be + * another debugger attached to this process. The original instruction + * can't be recovered so this must fail. + */ + if (x86dis.d86_len == 1 && instr[0] == FASTTRAP_INSTR) + return (-1); + + return (x86dis.d86_len); +} Added: vendor/opensolaris/dist/lib/libdtrace/i386/regs.d.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/opensolaris/dist/lib/libdtrace/i386/regs.d.in Sat Jul 17 18:29:36 2010 (r210198) @@ -0,0 +1,117 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +inline int R_GS = @GS@; +#pragma D binding "1.0" R_GS +inline int R_FS = @FS@; +#pragma D binding "1.0" R_FS +inline int R_ES = @ES@; +#pragma D binding "1.0" R_ES +inline int R_DS = @DS@; +#pragma D binding "1.0" R_DS + +inline int R_EDI = @EDI@; +#pragma D binding "1.0" R_EDI +inline int R_ESI = @ESI@; +#pragma D binding "1.0" R_ESI +inline int R_EBP = @EBP@; +#pragma D binding "1.0" R_EBP +inline int R_ESP = @ESP@; +#pragma D binding "1.0" R_ESP +inline int R_EBX = @EBX@; +#pragma D binding "1.0" R_EBX +inline int R_EDX = @EDX@; +#pragma D binding "1.0" R_EDX +inline int R_ECX = @ECX@; +#pragma D binding "1.0" R_ECX +inline int R_EAX = @EAX@; +#pragma D binding "1.0" R_EAX + +inline int R_TRAPNO = @TRAPNO@; +#pragma D binding "1.0" R_TRAPNO +inline int R_ERR = @ERR@; +#pragma D binding "1.0" R_ERR +inline int R_EIP = @EIP@; +#pragma D binding "1.0" R_EIP +inline int R_CS = @CS@; +#pragma D binding "1.0" R_CS +inline int R_EFL = @EFL@; +#pragma D binding "1.0" R_EFL +inline int R_UESP = @UESP@; +#pragma D binding "1.0" R_UESP +inline int R_SS = @SS@; +#pragma D binding "1.0" R_SS + +inline int R_PC = R_EIP; +#pragma D binding "1.0" R_PC +inline int R_SP = R_UESP; +#pragma D binding "1.0" R_SP +inline int R_PS = R_EFL; +#pragma D binding "1.0" R_PS +inline int R_R0 = R_EAX; +#pragma D binding "1.0" R_R0 +inline int R_R1 = R_EBX; +#pragma D binding "1.0" R_R1 + +inline int R_RSP = @REG_RSP@; +#pragma D binding "1.0" R_RSP +inline int R_RFL = @REG_RFL@; +#pragma D binding "1.0" R_RFL +inline int R_RIP = @REG_RIP@; +#pragma D binding "1.0" R_RIP +inline int R_RAX = @REG_RAX@; +#pragma D binding "1.0" R_RAX +inline int R_RCX = @REG_RCX@; +#pragma D binding "1.0" R_RCX +inline int R_RDX = @REG_RDX@; +#pragma D binding "1.0" R_RDX +inline int R_RBX = @REG_RBX@; +#pragma D binding "1.0" R_RBX +inline int R_RBP = @REG_RBP@; +#pragma D binding "1.0" R_RBP +inline int R_RSI = @REG_RSI@; +#pragma D binding "1.0" R_RSI +inline int R_RDI = @REG_RDI@; +#pragma D binding "1.0" R_RDI +inline int R_R8 = @REG_R8@; +#pragma D binding "1.0" R_R8 +inline int R_R9 = @REG_R9@; +#pragma D binding "1.0" R_R9 +inline int R_R10 = @REG_R10@; +#pragma D binding "1.0" R_R10 +inline int R_R11 = @REG_R11@; +#pragma D binding "1.0" R_R11 +inline int R_R12 = @REG_R12@; +#pragma D binding "1.0" R_R12 +inline int R_R13 = @REG_R13@; +#pragma D binding "1.0" R_R13 +inline int R_R14 = @REG_R14@; +#pragma D binding "1.0" R_R14 +inline int R_R15 = @REG_R15@; +#pragma D binding "1.0" R_R15 + Added: vendor/opensolaris/dist/lib/libdtrace/i386/regs.sed.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/opensolaris/dist/lib/libdtrace/i386/regs.sed.in Sat Jul 17 18:29:36 2010 (r210198) @@ -0,0 +1,82 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2003 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * This file is a sed script which is first preprocessed by cpp or cc -E to + * define a set of sed directives which replace #define tokens with their + * values. After preprocessing, whitespace is eliminated, and any @ symbols + * are translated into single space. The resulting sed script is then run + * over regs.d.in to replace the #define tokens listed below to create the + * finished regs.d. Refer to the rules in libdtrace/i386/Makefile for more + * information. + */ + +#include + +#define SED_REPLACE(x) s/#x/x/g +#define SED_REPLACE64(x) s/#x/SS @+@1@+@ x/g + +SED_REPLACE(GS) +SED_REPLACE(FS) +SED_REPLACE(ES) +SED_REPLACE(DS) +SED_REPLACE(EDI) +SED_REPLACE(ESI) +SED_REPLACE(EBP) +SED_REPLACE(ESP) +SED_REPLACE(EBX) +SED_REPLACE(EDX) +SED_REPLACE(ECX) +SED_REPLACE(EAX) +SED_REPLACE(TRAPNO) +SED_REPLACE(ERR) +SED_REPLACE(EIP) +SED_REPLACE(CS) +SED_REPLACE(EFL) +SED_REPLACE(UESP) +SED_REPLACE(SS) + +SED_REPLACE64(REG_RSP) +SED_REPLACE64(REG_RFL) +SED_REPLACE64(REG_RIP) +SED_REPLACE64(REG_RAX) +SED_REPLACE64(REG_RCX) +SED_REPLACE64(REG_RDX) +SED_REPLACE64(REG_RBX) +SED_REPLACE64(REG_RBP) +SED_REPLACE64(REG_RSI) +SED_REPLACE64(REG_RDI) +SED_REPLACE64(REG_R8) +SED_REPLACE64(REG_R9) +SED_REPLACE64(REG_R10) +SED_REPLACE64(REG_R11) +SED_REPLACE64(REG_R12) +SED_REPLACE64(REG_R13) +SED_REPLACE64(REG_R14) +SED_REPLACE64(REG_R15) + Added: vendor/opensolaris/dist/lib/libdtrace/sparc/dt_isadep.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/opensolaris/dist/lib/libdtrace/sparc/dt_isadep.c Sat Jul 17 18:29:36 2010 (r210198) @@ -0,0 +1,338 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#include +#include +#include +#include +#include + +#include +#include + +#define OP(x) ((x) >> 30) +#define OP2(x) (((x) >> 22) & 0x07) +#define COND(x) (((x) >> 25) & 0x0f) +#define A(x) (((x) >> 29) & 0x01) + +#define OP_BRANCH 0 + +#define OP2_BPcc 0x1 +#define OP2_Bicc 0x2 +#define OP2_BPr 0x3 +#define OP2_FBPfcc 0x5 +#define OP2_FBfcc 0x6 + +/*ARGSUSED*/ +int +dt_pid_create_entry_probe(struct ps_prochandle *P, dtrace_hdl_t *dtp, + fasttrap_probe_spec_t *ftp, const GElf_Sym *symp) +{ + ftp->ftps_type = DTFTP_ENTRY; + ftp->ftps_pc = (uintptr_t)symp->st_value; + ftp->ftps_size = (size_t)symp->st_size; + ftp->ftps_noffs = 1; + ftp->ftps_offs[0] = 0; + + if (ioctl(dtp->dt_ftfd, FASTTRAPIOC_MAKEPROBE, ftp) != 0) { + dt_dprintf("fasttrap probe creation ioctl failed: %s\n", + strerror(errno)); + return (dt_set_errno(dtp, errno)); + } + + return (1); +} + +int +dt_pid_create_return_probe(struct ps_prochandle *P, dtrace_hdl_t *dtp, + fasttrap_probe_spec_t *ftp, const GElf_Sym *symp, uint64_t *stret) +{ + + uint32_t *text; + int i; + int srdepth = 0; + + if ((text = malloc(symp->st_size + 4)) == NULL) { + dt_dprintf("mr sparkle: malloc() failed\n"); + return (DT_PROC_ERR); + } + + if (Pread(P, text, symp->st_size, symp->st_value) != symp->st_size) { + dt_dprintf("mr sparkle: Pread() failed\n"); + free(text); + return (DT_PROC_ERR); + } + + /* + * Leave a dummy instruction in the last slot to simplify edge + * conditions. + */ + text[symp->st_size / 4] = 0; + + ftp->ftps_type = DTFTP_RETURN; + ftp->ftps_pc = symp->st_value; + ftp->ftps_size = symp->st_size; + ftp->ftps_noffs = 0; + + for (i = 0; i < symp->st_size / 4; i++) { + /* + * If we encounter an existing tracepoint, query the + * kernel to find out the instruction that was + * replaced at this spot. + */ + while (text[i] == FASTTRAP_INSTR) { + fasttrap_instr_query_t instr; + + instr.ftiq_pid = Pstatus(P)->pr_pid; + instr.ftiq_pc = symp->st_value + i * 4; + + if (ioctl(dtp->dt_ftfd, FASTTRAPIOC_GETINSTR, + &instr) != 0) { + + if (errno == ESRCH || errno == ENOENT) { + if (Pread(P, &text[i], 4, + instr.ftiq_pc) != 4) { + dt_dprintf("mr sparkle: " + "Pread() failed\n"); + free(text); + return (DT_PROC_ERR); + } + continue; + } + + free(text); + dt_dprintf("mr sparkle: getinstr query " + "failed: %s\n", strerror(errno)); + return (DT_PROC_ERR); + } + + text[i] = instr.ftiq_instr; + break; + } + + /* save */ + if ((text[i] & 0xc1f80000) == 0x81e00000) { + srdepth++; + continue; + } + + /* restore */ + if ((text[i] & 0xc1f80000) == 0x81e80000) { + srdepth--; + continue; + } + + if (srdepth > 0) { + /* ret */ + if (text[i] == 0x81c7e008) + goto is_ret; + + /* return */ + if (text[i] == 0x81cfe008) + goto is_ret; + + /* call or jmpl w/ restore in the slot */ + if (((text[i] & 0xc0000000) == 0x40000000 || + (text[i] & 0xc1f80000) == 0x81c00000) && + (text[i + 1] & 0xc1f80000) == 0x81e80000) + goto is_ret; + + /* call to one of the stret routines */ + if ((text[i] & 0xc0000000) == 0x40000000) { + int32_t disp = text[i] << 2; + uint64_t dest = ftp->ftps_pc + i * 4 + disp; + + dt_dprintf("dest = %llx\n", (u_longlong_t)dest); + + if (dest == stret[0] || dest == stret[1] || + dest == stret[2] || dest == stret[3]) + goto is_ret; + } + } else { + /* external call */ + if ((text[i] & 0xc0000000) == 0x40000000) { + int32_t dst = text[i] << 2; + + dst += i * 4; + + if ((uintptr_t)dst >= (uintptr_t)symp->st_size) + goto is_ret; + } + + /* jmpl into %g0 -- this includes the retl pseudo op */ + if ((text[i] & 0xfff80000) == 0x81c00000) + goto is_ret; + + /* external branch -- possible return site */ + if (OP(text[i]) == OP_BRANCH) { + int32_t dst; + int baa; + + switch (OP2(text[i])) { + case OP2_BPcc: + dst = text[i] & 0x7ffff; + dst <<= 13; + dst >>= 11; + + baa = COND(text[i]) == 8 && A(text[i]); + break; + case OP2_Bicc: + dst = text[i] & 0x3fffff; + dst <<= 10; + dst >>= 8; + + baa = COND(text[i]) == 8 && A(text[i]); + break; + case OP2_BPr: + dst = (((text[i]) >> 6) & 0xc000) | + ((text[i]) & 0x3fff); + dst <<= 16; + dst >>= 14; + + baa = 0; + break; + case OP2_FBPfcc: + dst = text[i] & 0x7ffff; + dst <<= 13; + dst >>= 11; + + baa = COND(text[i]) == 8 && A(text[i]); + break; + case OP2_FBfcc: + dst = text[i] & 0x3fffff; + dst <<= 10; + dst >>= 8; + + baa = COND(text[i]) == 8 && A(text[i]); + break; + default: + continue; + } + + dst += i * 4; + + /* + * Interpret branches outside of the function's + * bounds as potential return sites. If the + * branch is a ba,a don't skip the instruction + * in the delay slot. + */ + if ((uintptr_t)dst >= + (uintptr_t)symp->st_size) { + if (baa) + goto is_ret_baa; + else + goto is_ret; + } + } + } + + continue; +is_ret: + i++; +is_ret_baa: + dt_dprintf("return at offset %x\n", i * 4); + ftp->ftps_offs[ftp->ftps_noffs++] = i * 4; + } + + free(text); + if (ftp->ftps_noffs > 0) { + if (ioctl(dtp->dt_ftfd, FASTTRAPIOC_MAKEPROBE, ftp) != 0) { + dt_dprintf("fasttrap probe creation ioctl failed: %s\n", + strerror(errno)); + return (dt_set_errno(dtp, errno)); + } + } + + + return (ftp->ftps_noffs); +} + +/*ARGSUSED*/ +int +dt_pid_create_offset_probe(struct ps_prochandle *P, dtrace_hdl_t *dtp, + fasttrap_probe_spec_t *ftp, const GElf_Sym *symp, ulong_t off) +{ + if (off & 0x3) + return (DT_PROC_ALIGN); + + ftp->ftps_type = DTFTP_OFFSETS; + ftp->ftps_pc = (uintptr_t)symp->st_value; + ftp->ftps_size = (size_t)symp->st_size; + ftp->ftps_noffs = 1; + ftp->ftps_offs[0] = off; + + if (ioctl(dtp->dt_ftfd, FASTTRAPIOC_MAKEPROBE, ftp) != 0) { + dt_dprintf("fasttrap probe creation ioctl failed: %s\n", + strerror(errno)); + return (dt_set_errno(dtp, errno)); + } + + return (1); +} + +/*ARGSUSED*/ +int +dt_pid_create_glob_offset_probes(struct ps_prochandle *P, dtrace_hdl_t *dtp, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Jul 17 18:31:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 81AA31065674; Sat, 17 Jul 2010 18:31:31 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 572878FC17; Sat, 17 Jul 2010 18:31:31 +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 o6HIVVRH007210; Sat, 17 Jul 2010 18:31:31 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6HIVVO0007209; Sat, 17 Jul 2010 18:31:31 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201007171831.o6HIVVO0007209@svn.freebsd.org> From: Rui Paulo Date: Sat, 17 Jul 2010 18:31:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210199 - in head/cddl/contrib/opensolaris/lib/libdtrace: i386 sparc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jul 2010 18:31:31 -0000 Author: rpaulo Date: Sat Jul 17 18:31:31 2010 New Revision: 210199 URL: http://svn.freebsd.org/changeset/base/210199 Log: Merge from vendor: libdtrace MD parts needed by fasttrap. Sponsored by: The FreeBSD Foundation Added: head/cddl/contrib/opensolaris/lib/libdtrace/i386/ - copied from r210198, vendor/opensolaris/dist/lib/libdtrace/i386/ head/cddl/contrib/opensolaris/lib/libdtrace/sparc/ - copied from r210198, vendor/opensolaris/dist/lib/libdtrace/sparc/ Modified: Directory Properties: head/cddl/contrib/opensolaris/ (props changed) From owner-svn-src-all@FreeBSD.ORG Sat Jul 17 18:35:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F26D1065670; Sat, 17 Jul 2010 18:35:39 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 640088FC12; Sat, 17 Jul 2010 18:35:39 +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 o6HIZdR8008134; Sat, 17 Jul 2010 18:35:39 GMT (envelope-from tijl@svn.freebsd.org) Received: (from tijl@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6HIZdqL008131; Sat, 17 Jul 2010 18:35:39 GMT (envelope-from tijl@svn.freebsd.org) Message-Id: <201007171835.o6HIZdqL008131@svn.freebsd.org> From: Tijl Coosemans Date: Sat, 17 Jul 2010 18:35:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210200 - in head: share/misc usr.bin/calendar/calendars X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jul 2010 18:35:39 -0000 Author: tijl Date: Sat Jul 17 18:35:39 2010 New Revision: 210200 URL: http://svn.freebsd.org/changeset/base/210200 Log: - Add myself to committers-src.dot - Add myself to calendar.freebsd Approved by: kib (mentor) Modified: head/share/misc/committers-src.dot head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/share/misc/committers-src.dot ============================================================================== --- head/share/misc/committers-src.dot Sat Jul 17 18:31:31 2010 (r210199) +++ head/share/misc/committers-src.dot Sat Jul 17 18:35:39 2010 (r210200) @@ -192,6 +192,7 @@ syrinx [label="Shteryana Shopova\nsyrinx takawata [label="Takanori Watanabe\ntakawata@FreeBSD.org\n2000/07/06"] thompsa [label="Andrew Thompson\nthompsa@FreeBSD.org\n2005/05/25"] ticso [label="Bernd Walter\nticso@FreeBSD.org\n2002/01/31"] +tijl [label="Tijl Coosemans\ntijl@FreeBSD.org\n2010/07/16"] trasz [label="Edward Tomasz Napierala\ntrasz@FreeBSD.org\n2008/08/22"] trhodes [label="Tom Rhodes\ntrhodes@FreeBSD.org\n2002/05/28"] tuexen [label="Michael Tuexen\ntuexen@FreeBSD.org\n2009/06/06"] @@ -375,6 +376,7 @@ kib -> pho kib -> rdivacky kib -> rmacklem kib -> stas +kib -> tijl kmacy -> lstewart Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Sat Jul 17 18:31:31 2010 (r210199) +++ head/usr.bin/calendar/calendars/calendar.freebsd Sat Jul 17 18:35:39 2010 (r210200) @@ -289,6 +289,7 @@ 11/10 Gregory Neil Shapiro born in Providence, Rhode Island, United States, 1970 11/13 John Baldwin born in Stuart, Virginia, United States, 1977 11/15 Lars Engels born in Hilden, Nordrhein-Westfalen, Germany, 1980 +11/15 Tijl Coosemans born in Duffel, Belgium, 1983 11/16 Jose Maria Alcaide Salinas born in Madrid, Spain, 1962 11/17 Ralf S. Engelschall born in Dachau, Bavaria, Germany, 1972 11/18 Thomas Quinot born in Paris, France, 1977