From owner-svn-src-all@FreeBSD.ORG Sun Nov 1 01:08:55 2009 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 DC5EB106566C; Sun, 1 Nov 2009 01:08: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 9D0BB8FC0A; Sun, 1 Nov 2009 01:08:55 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id nA113cub047894; Sat, 31 Oct 2009 19:03:38 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sat, 31 Oct 2009 19:03:53 -0600 (MDT) Message-Id: <20091031.190353.-332187386.imp@bsdimp.com> To: ed@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <200910311035.n9VAZfIb082932@svn.freebsd.org> References: <200910311035.n9VAZfIb082932@svn.freebsd.org> X-Mailer: Mew version 5.2 on Emacs 21.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 Subject: Re: svn commit: r198706 - 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, 01 Nov 2009 01:08:56 -0000 In message: <200910311035.n9VAZfIb082932@svn.freebsd.org> Ed Schouten writes: : Author: ed : Date: Sat Oct 31 10:35:41 2009 : New Revision: 198706 : URL: http://svn.freebsd.org/changeset/base/198706 : : Log: : Turn unused structure fields of cdevsw into spares. : : d_uid, d_gid and d_mode are unused, because permissions are stored in : cdevpriv nowadays. d_kind doesn't seem to be used at all. We no longer : keep a list of cdevsw's, so d_list is also unused. : : uid_t and gid_t are 32 bits, but mode_t is 16 bits, Because of alignment : constraints of d_kind, we can safely turn it into three 32-bit integers. : d_kind and d_list is equal in size to three pointers. : : Discussed with: kib Don't we need a D_VERSION bump for this? Warner : Modified: : head/sys/sys/conf.h : : Modified: head/sys/sys/conf.h : ============================================================================== : --- head/sys/sys/conf.h Sat Oct 31 09:03:48 2009 (r198705) : +++ head/sys/sys/conf.h Sat Oct 31 10:35:41 2009 (r198706) : @@ -210,15 +210,13 @@ struct cdevsw { : d_kqfilter_t *d_kqfilter; : d_purge_t *d_purge; : d_mmap_single_t *d_mmap_single; : - uid_t d_uid; : - gid_t d_gid; : - mode_t d_mode; : - const char *d_kind; : + : + int32_t d_spare0[3]; : + void *d_spare1[3]; : : /* These fields should not be messed with by drivers */ : - LIST_ENTRY(cdevsw) d_list; : LIST_HEAD(, cdev) d_devs; : - int d_spare3; : + int d_spare2; : union { : struct cdevsw *gianttrick; : SLIST_ENTRY(cdevsw) postfree_list; : From owner-svn-src-all@FreeBSD.ORG Sun Nov 1 01:12:13 2009 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 B73A21065670; Sun, 1 Nov 2009 01:12:13 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 579298FC12; Sun, 1 Nov 2009 01:12:13 +0000 (UTC) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 33DBD1CC4D; Sun, 1 Nov 2009 02:12:12 +0100 (CET) Date: Sun, 1 Nov 2009 02:12:12 +0100 From: Ed Schouten To: "M. Warner Losh" Message-ID: <20091101011212.GG1293@hoeg.nl> References: <200910311035.n9VAZfIb082932@svn.freebsd.org> <20091031.190353.-332187386.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="QHrz2k/ePFTn56xd" Content-Disposition: inline In-Reply-To: <20091031.190353.-332187386.imp@bsdimp.com> 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: r198706 - 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, 01 Nov 2009 01:12:13 -0000 --QHrz2k/ePFTn56xd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Warner, * M. Warner Losh wrote: > Don't we need a D_VERSION bump for this? No, we don't. All these fields are not used by drivers, just some old version of the devfs code. I made sure struct cdevsw didn't change in size, so there should be no API nor ABI conflicts. --=20 Ed Schouten WWW: http://80386.nl/ --QHrz2k/ePFTn56xd Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkrs4GwACgkQ52SDGA2eCwXXzACZAYt0knmQr/XLxs6BxOjsJALf PS8An1s9qVvAJoQ7gRpy+hAqYndiRjhC =WWlo -----END PGP SIGNATURE----- --QHrz2k/ePFTn56xd-- From owner-svn-src-all@FreeBSD.ORG Sun Nov 1 03:02:36 2009 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 AE04E106568D; Sun, 1 Nov 2009 03:02:36 +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 46F6B8FC08; Sun, 1 Nov 2009 03:02:36 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id nA12unVm048720; Sat, 31 Oct 2009 20:56:49 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sat, 31 Oct 2009 20:57:04 -0600 (MDT) Message-Id: <20091031.205704.-79135471.imp@bsdimp.com> To: ed@80386.nl From: "M. Warner Losh" In-Reply-To: <20091101011212.GG1293@hoeg.nl> References: <200910311035.n9VAZfIb082932@svn.freebsd.org> <20091031.190353.-332187386.imp@bsdimp.com> <20091101011212.GG1293@hoeg.nl> X-Mailer: Mew version 5.2 on Emacs 21.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 Subject: Re: svn commit: r198706 - 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, 01 Nov 2009 03:02:36 -0000 In message: <20091101011212.GG1293@hoeg.nl> Ed Schouten writes: : Hi Warner, : : * M. Warner Losh wrote: : > Don't we need a D_VERSION bump for this? : : No, we don't. All these fields are not used by drivers, just some old : version of the devfs code. I made sure struct cdevsw didn't change in : size, so there should be no API nor ABI conflicts. On all platforms? A version bump is trivial... Warner From owner-svn-src-all@FreeBSD.ORG Sun Nov 1 08:20:30 2009 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 A1F661065676; Sun, 1 Nov 2009 08:20:30 +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 9145B8FC15; Sun, 1 Nov 2009 08:20: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 nA18KUl8017210; Sun, 1 Nov 2009 08:20:30 GMT (envelope-from rdivacky@svn.freebsd.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA18KUj4017208; Sun, 1 Nov 2009 08:20:30 GMT (envelope-from rdivacky@svn.freebsd.org) Message-Id: <200911010820.nA18KUj4017208@svn.freebsd.org> From: Roman Divacky Date: Sun, 1 Nov 2009 08:20: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: r198741 - 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: Sun, 01 Nov 2009 08:20:30 -0000 Author: rdivacky Date: Sun Nov 1 08:20:30 2009 New Revision: 198741 URL: http://svn.freebsd.org/changeset/base/198741 Log: Replace -iprefix with -isystem. We only need alternative header files search path and thus -isystem is sufficient. -iprefix is meant to do something entirely different. Approved by: ed (mentor) OKed by: ru, kan Tested by: make universe Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sun Nov 1 04:57:41 2009 (r198740) +++ head/Makefile.inc1 Sun Nov 1 08:20:30 2009 (r198741) @@ -272,7 +272,7 @@ LIB32CPUFLAGS= -march=i686 -mmmx -msse - LIB32CPUFLAGS= -march=${TARGET_CPUTYPE} .endif LIB32FLAGS= -m32 ${LIB32CPUFLAGS} -mfancy-math-387 -DCOMPAT_32BIT \ - -iprefix ${LIB32TMP}/usr/ \ + -isystem ${LIB32TMP}/usr/include/ \ -L${LIB32TMP}/usr/lib32 \ -B${LIB32TMP}/usr/lib32 From owner-svn-src-all@FreeBSD.ORG Sun Nov 1 08:45:45 2009 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 43B061065676; Sun, 1 Nov 2009 08:45: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 2F2178FC18; Sun, 1 Nov 2009 08: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 nA18jjdW017751; Sun, 1 Nov 2009 08:45:45 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA18jice017741; Sun, 1 Nov 2009 08:45:44 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200911010845.nA18jice017741@svn.freebsd.org> From: Alan Cox Date: Sun, 1 Nov 2009 08:45:44 +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: r198742 - in stable/7/sys: . amd64/include arm/include contrib/pf i386/include ia64/include kern powerpc/include sparc64/include sun4v/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: Sun, 01 Nov 2009 08:45:45 -0000 Author: alc Date: Sun Nov 1 08:45:44 2009 New Revision: 198742 URL: http://svn.freebsd.org/changeset/base/198742 Log: MFC r197316 Add a new sysctl for reporting all of the supported page sizes. Modified: stable/7/sys/ (props changed) stable/7/sys/amd64/include/param.h stable/7/sys/arm/include/param.h stable/7/sys/contrib/pf/ (props changed) stable/7/sys/i386/include/param.h stable/7/sys/ia64/include/param.h stable/7/sys/kern/kern_mib.c stable/7/sys/powerpc/include/param.h stable/7/sys/sparc64/include/param.h stable/7/sys/sun4v/include/param.h stable/7/sys/sys/systm.h Modified: stable/7/sys/amd64/include/param.h ============================================================================== --- stable/7/sys/amd64/include/param.h Sun Nov 1 08:20:30 2009 (r198741) +++ stable/7/sys/amd64/include/param.h Sun Nov 1 08:45:44 2009 (r198742) @@ -115,6 +115,8 @@ #define NBPML4 (1ul<flags & SCTL_MASK32) { + /* + * Recreate the "pagesizes" array with 32-bit elements. Truncate + * any page size greater than UINT32_MAX to zero. + */ + for (i = 0; i < MAXPAGESIZES; i++) + pagesizes32[i] = (uint32_t)pagesizes[i]; + + error = SYSCTL_OUT(req, pagesizes32, sizeof(pagesizes32)); + } else +#endif + error = SYSCTL_OUT(req, pagesizes, sizeof(pagesizes)); + return (error); +} +SYSCTL_PROC(_hw, OID_AUTO, pagesizes, CTLTYPE_ULONG | CTLFLAG_RD, + NULL, 0, sysctl_hw_pagesizes, "LU", "Supported page sizes"); + static char machine_arch[] = MACHINE_ARCH; SYSCTL_STRING(_hw, HW_MACHINE_ARCH, machine_arch, CTLFLAG_RD, machine_arch, 0, "System architecture"); Modified: stable/7/sys/powerpc/include/param.h ============================================================================== --- stable/7/sys/powerpc/include/param.h Sun Nov 1 08:20:30 2009 (r198741) +++ stable/7/sys/powerpc/include/param.h Sun Nov 1 08:45:44 2009 (r198742) @@ -81,6 +81,8 @@ #define PAGE_MASK (PAGE_SIZE - 1) #define NPTEPG (PAGE_SIZE/(sizeof (pt_entry_t))) +#define MAXPAGESIZES 1 /* maximum number of supported page sizes */ + #ifndef KSTACK_PAGES #define KSTACK_PAGES 4 /* includes pcb */ #endif Modified: stable/7/sys/sparc64/include/param.h ============================================================================== --- stable/7/sys/sparc64/include/param.h Sun Nov 1 08:20:30 2009 (r198741) +++ stable/7/sys/sparc64/include/param.h Sun Nov 1 08:45:44 2009 (r198742) @@ -107,6 +107,8 @@ #define PAGE_SIZE_MAX PAGE_SIZE_4M #define PAGE_MASK_MAX PAGE_MASK_4M +#define MAXPAGESIZES 1 /* maximum number of supported page sizes */ + #ifndef KSTACK_PAGES #define KSTACK_PAGES 4 /* pages of kernel stack (with pcb) */ #endif Modified: stable/7/sys/sun4v/include/param.h ============================================================================== --- stable/7/sys/sun4v/include/param.h Sun Nov 1 08:20:30 2009 (r198741) +++ stable/7/sys/sun4v/include/param.h Sun Nov 1 08:45:44 2009 (r198742) @@ -102,6 +102,8 @@ #define PAGE_SIZE_MAX PAGE_SIZE_4M #define PAGE_MASK_MAX PAGE_MASK_4M +#define MAXPAGESIZES 1 /* maximum number of supported page sizes */ + #ifndef KSTACK_PAGES #define KSTACK_PAGES 4 /* pages of kernel stack (with pcb) */ #endif Modified: stable/7/sys/sys/systm.h ============================================================================== --- stable/7/sys/sys/systm.h Sun Nov 1 08:20:30 2009 (r198741) +++ stable/7/sys/sys/systm.h Sun Nov 1 08:45:44 2009 (r198742) @@ -60,6 +60,7 @@ extern u_int nselcoll; /* select collis extern struct mtx sellock; /* select lock variable */ extern struct cv selwait; /* select conditional variable */ +extern u_long pagesizes[]; /* supported page sizes */ extern long physmem; /* physical memory */ extern long realmem; /* 'real' memory */ From owner-svn-src-all@FreeBSD.ORG Sun Nov 1 08:48:31 2009 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 39988106566B; Sun, 1 Nov 2009 08:48:31 +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 27C6E8FC08; Sun, 1 Nov 2009 08:48: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 nA18mUJj017841; Sun, 1 Nov 2009 08:48:30 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA18mUNQ017838; Sun, 1 Nov 2009 08:48:30 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200911010848.nA18mUNQ017838@svn.freebsd.org> From: Alan Cox Date: Sun, 1 Nov 2009 08:48:30 +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: r198743 - in stable/7/sys: . amd64/amd64 contrib/pf i386/i386 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, 01 Nov 2009 08:48:31 -0000 Author: alc Date: Sun Nov 1 08:48:30 2009 New Revision: 198743 URL: http://svn.freebsd.org/changeset/base/198743 Log: MFC r197317 When superpages are enabled, add the 2 or 4MB page size to the array of supported page sizes. Modified: stable/7/sys/ (props changed) stable/7/sys/amd64/amd64/pmap.c stable/7/sys/contrib/pf/ (props changed) stable/7/sys/i386/i386/pmap.c Modified: stable/7/sys/amd64/amd64/pmap.c ============================================================================== --- stable/7/sys/amd64/amd64/pmap.c Sun Nov 1 08:45:44 2009 (r198742) +++ stable/7/sys/amd64/amd64/pmap.c Sun Nov 1 08:48:30 2009 (r198743) @@ -666,6 +666,11 @@ pmap_init(void) * Are large page mappings enabled? */ TUNABLE_INT_FETCH("vm.pmap.pg_ps_enabled", &pg_ps_enabled); + if (pg_ps_enabled) { + KASSERT(MAXPAGESIZES > 1 && pagesizes[1] == 0, + ("pmap_init: can't assign to pagesizes[1]")); + pagesizes[1] = NBPDR; + } /* * Calculate the size of the pv head table for superpages. Modified: stable/7/sys/i386/i386/pmap.c ============================================================================== --- stable/7/sys/i386/i386/pmap.c Sun Nov 1 08:45:44 2009 (r198742) +++ stable/7/sys/i386/i386/pmap.c Sun Nov 1 08:48:30 2009 (r198743) @@ -666,6 +666,11 @@ pmap_init(void) * Are large page mappings enabled? */ TUNABLE_INT_FETCH("vm.pmap.pg_ps_enabled", &pg_ps_enabled); + if (pg_ps_enabled) { + KASSERT(MAXPAGESIZES > 1 && pagesizes[1] == 0, + ("pmap_init: can't assign to pagesizes[1]")); + pagesizes[1] = NBPDR; + } /* * Calculate the size of the pv head table for superpages. From owner-svn-src-all@FreeBSD.ORG Sun Nov 1 10:01:39 2009 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 63B4E1065670; Sun, 1 Nov 2009 10:01:39 +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 515F58FC19; Sun, 1 Nov 2009 10:01: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 nA1A1drG019270; Sun, 1 Nov 2009 10:01:39 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1A1dQn019268; Sun, 1 Nov 2009 10:01:39 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200911011001.nA1A1dQn019268@svn.freebsd.org> From: Alexander Motin Date: Sun, 1 Nov 2009 10:01:39 +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: r198744 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris conf contrib/dev/acpica contrib/pf dev/xen/xenpci 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, 01 Nov 2009 10:01:39 -0000 Author: mav Date: Sun Nov 1 10:01:39 2009 New Revision: 198744 URL: http://svn.freebsd.org/changeset/base/198744 Log: MFC rev. 198623: Add missing ATA kernel options dependencies. Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/conf/files 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/conf/files ============================================================================== --- stable/8/sys/conf/files Sun Nov 1 08:48:30 2009 (r198743) +++ stable/8/sys/conf/files Sun Nov 1 10:01:39 2009 (r198744) @@ -517,14 +517,14 @@ dev/ata/chipsets/ata-highpoint.c optiona dev/ata/chipsets/ata-intel.c optional ata pci | ataintel dev/ata/chipsets/ata-ite.c optional ata pci | ataite dev/ata/chipsets/ata-jmicron.c optional ata pci | atajmicron -dev/ata/chipsets/ata-marvell.c optional ata pci | atamarvell +dev/ata/chipsets/ata-marvell.c optional ata pci | atamarvell | ataadaptec dev/ata/chipsets/ata-micron.c optional ata pci | atamicron dev/ata/chipsets/ata-national.c optional ata pci | atanational dev/ata/chipsets/ata-netcell.c optional ata pci | atanetcell dev/ata/chipsets/ata-nvidia.c optional ata pci | atanvidia dev/ata/chipsets/ata-promise.c optional ata pci | atapromise dev/ata/chipsets/ata-serverworks.c optional ata pci | ataserverworks -dev/ata/chipsets/ata-siliconimage.c optional ata pci | atasiliconimage +dev/ata/chipsets/ata-siliconimage.c optional ata pci | atasiliconimage | ataati dev/ata/chipsets/ata-sis.c optional ata pci | atasis dev/ata/chipsets/ata-via.c optional ata pci | atavia dev/ata/ata-disk.c optional atadisk From owner-svn-src-all@FreeBSD.ORG Sun Nov 1 10:30:31 2009 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 6B40C1065679; Sun, 1 Nov 2009 10:30:31 +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 5774A8FC08; Sun, 1 Nov 2009 10:30: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 nA1AUVQO019968; Sun, 1 Nov 2009 10:30:31 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1AUVsN019962; Sun, 1 Nov 2009 10:30:31 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200911011030.nA1AUVsN019962@svn.freebsd.org> From: Ed Schouten Date: Sun, 1 Nov 2009 10:30: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: r198745 - in stable/8: etc sys sys/amd64/include/xen sys/cddl/contrib/opensolaris sys/contrib/dev/acpica sys/contrib/pf sys/dev/syscons sys/dev/xen/xenpci sys/kern sys/sys usr.sbin/jail 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, 01 Nov 2009 10:30:31 -0000 Author: ed Date: Sun Nov 1 10:30:30 2009 New Revision: 198745 URL: http://svn.freebsd.org/changeset/base/198745 Log: MFC various commits back to stable/8: SVN r197174: Make sure we never place the cursor outside the screen. For some vague reason, it may be possible that scp->cursor_pos exceeds scp->ysize * scp->xsize. This means that teken_set_cursor() may get called with an invalid position. Just ignore the old cursor position in this case. Reported by: Paul B. Mahol SVN r198213: Make lock devices work properly. It turned out I did add the code to use the init state devices to set the termios structure when opening the device, but it seems I totally forgot to add the bits required to force the actual locking of flags through the lock state devices. Reported by: ru SVN r198215, r198217: Fix a typo in the jail(8) manpage. Submitted by: Jille Timmermans SVN r198216: Fix qouting in a comment, to make it look more consistent Submitted by: Jille Timmermans SVN r198223: Properly set the low watermarks when reducing the baud rate. Now that buffers are deallocated lazily, we should not use tty*q_getsize() to obtain the buffer size to calculate the low watermarks. Doing this may cause the watermark to be placed outside the typical buffer size. This caused some regressions after my previous commit to the TTY code, which allows pseudo-devices to resize the buffers as well. Reported by: yongari, dougb Modified: stable/8/etc/ (props changed) stable/8/etc/rc.subr 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/syscons/scterm-teken.c stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/kern/tty.c stable/8/sys/sys/ttyqueue.h stable/8/usr.sbin/jail/ (props changed) stable/8/usr.sbin/jail/jail.8 Modified: stable/8/etc/rc.subr ============================================================================== --- stable/8/etc/rc.subr Sun Nov 1 10:01:39 2009 (r198744) +++ stable/8/etc/rc.subr Sun Nov 1 10:30:30 2009 (r198745) @@ -565,7 +565,7 @@ run_rc_command() rc_fast=yes rc_quiet=yes ;; - force*) # "force prefix; always run + force*) # "force" prefix; always run rc_force=yes _rc_prefix=force rc_arg=${rc_arg#${_rc_prefix}} Modified: stable/8/sys/dev/syscons/scterm-teken.c ============================================================================== --- stable/8/sys/dev/syscons/scterm-teken.c Sun Nov 1 10:01:39 2009 (r198744) +++ stable/8/sys/dev/syscons/scterm-teken.c Sun Nov 1 10:30:30 2009 (r198745) @@ -130,9 +130,12 @@ scteken_init(scr_stat *scp, void **softc tp.tp_col = scp->xsize; teken_set_winsize(&ts->ts_teken, &tp); - tp.tp_row = scp->cursor_pos / scp->xsize; - tp.tp_col = scp->cursor_pos % scp->xsize; - teken_set_cursor(&ts->ts_teken, &tp); + if (scp->cursor_pos < scp->ysize * scp->xsize) { + /* Valid old cursor position. */ + tp.tp_row = scp->cursor_pos / scp->xsize; + tp.tp_col = scp->cursor_pos % scp->xsize; + teken_set_cursor(&ts->ts_teken, &tp); + } break; } Modified: stable/8/sys/kern/tty.c ============================================================================== --- stable/8/sys/kern/tty.c Sun Nov 1 10:01:39 2009 (r198744) +++ stable/8/sys/kern/tty.c Sun Nov 1 10:30:30 2009 (r198745) @@ -109,14 +109,14 @@ tty_watermarks(struct tty *tp) ttyinq_setsize(&tp->t_inq, tp, bs); /* Set low watermark at 10% (when 90% is available). */ - tp->t_inlow = (ttyinq_getsize(&tp->t_inq) * 9) / 10; + tp->t_inlow = (ttyinq_getallocatedsize(&tp->t_inq) * 9) / 10; /* Provide an ouput buffer for 0.2 seconds of data. */ bs = MIN(tp->t_termios.c_ospeed / 5, TTYBUF_MAX); ttyoutq_setsize(&tp->t_outq, tp, bs); /* Set low watermark at 10% (when 90% is available). */ - tp->t_outlow = (ttyoutq_getsize(&tp->t_outq) * 9) / 10; + tp->t_outlow = (ttyoutq_getallocatedsize(&tp->t_outq) * 9) / 10; } static int @@ -523,6 +523,34 @@ ttydev_ioctl(struct cdev *dev, u_long cm goto done; } + if (cmd == TIOCSETA || cmd == TIOCSETAW || cmd == TIOCSETAF) { + struct termios *old = &tp->t_termios; + struct termios *new = (struct termios *)data; + struct termios *lock = TTY_CALLOUT(tp, dev) ? + &tp->t_termios_lock_out : &tp->t_termios_lock_in; + int cc; + + /* + * Lock state devices. Just overwrite the values of the + * commands that are currently in use. + */ + new->c_iflag = (old->c_iflag & lock->c_iflag) | + (new->c_iflag & ~lock->c_iflag); + new->c_oflag = (old->c_oflag & lock->c_oflag) | + (new->c_oflag & ~lock->c_oflag); + new->c_cflag = (old->c_cflag & lock->c_cflag) | + (new->c_cflag & ~lock->c_cflag); + new->c_lflag = (old->c_lflag & lock->c_lflag) | + (new->c_lflag & ~lock->c_lflag); + for (cc = 0; cc < NCCS; ++cc) + if (lock->c_cc[cc]) + new->c_cc[cc] = old->c_cc[cc]; + if (lock->c_ispeed) + new->c_ispeed = old->c_ispeed; + if (lock->c_ospeed) + new->c_ospeed = old->c_ospeed; + } + error = tty_ioctl(tp, cmd, data, td); done: tty_unlock(tp); Modified: stable/8/sys/sys/ttyqueue.h ============================================================================== --- stable/8/sys/sys/ttyqueue.h Sun Nov 1 10:01:39 2009 (r198744) +++ stable/8/sys/sys/ttyqueue.h Sun Nov 1 10:30:30 2009 (r198745) @@ -93,6 +93,13 @@ ttyinq_getsize(struct ttyinq *ti) } static __inline size_t +ttyinq_getallocatedsize(struct ttyinq *ti) +{ + + return (ti->ti_quota * TTYINQ_DATASIZE); +} + +static __inline size_t ttyinq_bytesleft(struct ttyinq *ti) { size_t len; @@ -143,6 +150,13 @@ ttyoutq_getsize(struct ttyoutq *to) } static __inline size_t +ttyoutq_getallocatedsize(struct ttyoutq *to) +{ + + return (to->to_quota * TTYOUTQ_DATASIZE); +} + +static __inline size_t ttyoutq_bytesleft(struct ttyoutq *to) { size_t len; Modified: stable/8/usr.sbin/jail/jail.8 ============================================================================== --- stable/8/usr.sbin/jail/jail.8 Sun Nov 1 10:01:39 2009 (r198744) +++ stable/8/usr.sbin/jail/jail.8 Sun Nov 1 10:30:30 2009 (r198745) @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 25, 2009 +.Dd October 18, 2009 .Dt JAIL 8 .Os .Sh NAME @@ -377,7 +377,7 @@ Since raw sockets can be used to configu network subsystems, extra caution should be used where privileged access to jails is given out to untrusted parties. .It Va allow.chflags -Normally, priveleged users inside a jail are treated as unprivileged by +Normally, privileged users inside a jail are treated as unprivileged by .Xr chflags 2 . When this parameter is set, such users are treated as privileged, and may manipulate system file flags subject to the usual constraints on From owner-svn-src-all@FreeBSD.ORG Sun Nov 1 10:56:03 2009 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 D8664106566C; Sun, 1 Nov 2009 10:56:03 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9257B8FC14; Sun, 1 Nov 2009 10:56: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 nA1Au3ne021537; Sun, 1 Nov 2009 10:56:03 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1Au3ic021534; Sun, 1 Nov 2009 10:56:03 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <200911011056.nA1Au3ic021534@svn.freebsd.org> From: Christian Brueffer Date: Sun, 1 Nov 2009 10:56:03 +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: r198746 - stable/8/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: Sun, 01 Nov 2009 10:56:04 -0000 Author: brueffer Date: Sun Nov 1 10:56:03 2009 New Revision: 198746 URL: http://svn.freebsd.org/changeset/base/198746 Log: MFC: r198609 Revert part of r198363, there is no "device cam", it is included in "device scbus". Modified: stable/8/share/man/man4/ (props changed) stable/8/share/man/man4/atapicam.4 stable/8/share/man/man4/umass.4 Modified: stable/8/share/man/man4/atapicam.4 ============================================================================== --- stable/8/share/man/man4/atapicam.4 Sun Nov 1 10:30:30 2009 (r198745) +++ stable/8/share/man/man4/atapicam.4 Sun Nov 1 10:56:03 2009 (r198746) @@ -39,7 +39,6 @@ place the following lines in your kernel configuration file: .Bd -ragged -offset indent .Cd "device scbus" -.Cd "device cam" .Cd "device ata" .Cd "device atapicam" .Ed Modified: stable/8/share/man/man4/umass.4 ============================================================================== --- stable/8/share/man/man4/umass.4 Sun Nov 1 10:30:30 2009 (r198745) +++ stable/8/share/man/man4/umass.4 Sun Nov 1 10:56:03 2009 (r198746) @@ -39,7 +39,6 @@ place the following line in your kernel configuration file: .Bd -ragged -offset indent .Cd "device scbus" -.Cd "device cam" .Cd "device usb" .Cd "device umass" .Ed From owner-svn-src-all@FreeBSD.ORG Sun Nov 1 10:57:07 2009 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 B7B151065693; Sun, 1 Nov 2009 10:57:07 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A69A38FC18; Sun, 1 Nov 2009 10:57: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 nA1Av7HT021604; Sun, 1 Nov 2009 10:57:07 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1Av71L021601; Sun, 1 Nov 2009 10:57:07 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <200911011057.nA1Av71L021601@svn.freebsd.org> From: Christian Brueffer Date: Sun, 1 Nov 2009 10:57:07 +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: r198747 - stable/7/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: Sun, 01 Nov 2009 10:57:07 -0000 Author: brueffer Date: Sun Nov 1 10:57:07 2009 New Revision: 198747 URL: http://svn.freebsd.org/changeset/base/198747 Log: MFC: r198609 Revert part of r198363, there is no "device cam", it is included in "device scbus". Modified: stable/7/share/man/man4/ (props changed) stable/7/share/man/man4/atapicam.4 stable/7/share/man/man4/umass.4 Modified: stable/7/share/man/man4/atapicam.4 ============================================================================== --- stable/7/share/man/man4/atapicam.4 Sun Nov 1 10:56:03 2009 (r198746) +++ stable/7/share/man/man4/atapicam.4 Sun Nov 1 10:57:07 2009 (r198747) @@ -39,7 +39,6 @@ place the following lines in your kernel configuration file: .Bd -ragged -offset indent .Cd "device scbus" -.Cd "device cam" .Cd "device ata" .Cd "device atapicam" .Ed Modified: stable/7/share/man/man4/umass.4 ============================================================================== --- stable/7/share/man/man4/umass.4 Sun Nov 1 10:56:03 2009 (r198746) +++ stable/7/share/man/man4/umass.4 Sun Nov 1 10:57:07 2009 (r198747) @@ -39,7 +39,6 @@ place the following line in your kernel configuration file: .Bd -ragged -offset indent .Cd "device scbus" -.Cd "device cam" .Cd "device usb" .Cd "device umass" .Ed From owner-svn-src-all@FreeBSD.ORG Sun Nov 1 11:31:07 2009 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 6C40E106566C; Sun, 1 Nov 2009 11:31:07 +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 5B5D48FC0A; Sun, 1 Nov 2009 11:31: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 nA1BV798022281; Sun, 1 Nov 2009 11:31:07 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1BV6lO022276; Sun, 1 Nov 2009 11:31:06 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200911011131.nA1BV6lO022276@svn.freebsd.org> From: Alexander Motin Date: Sun, 1 Nov 2009 11:31: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: r198748 - in head/sys/cam: . ata scsi 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, 01 Nov 2009 11:31:07 -0000 Author: mav Date: Sun Nov 1 11:31:06 2009 New Revision: 198748 URL: http://svn.freebsd.org/changeset/base/198748 Log: MFp4: Fix reference counting bug, when device unreferenced before then invalidated. To do it, do not handle validity flag as another reference, but explicitly modify reference count each time flag is modified. Discovered by: thompsa Modified: head/sys/cam/ata/ata_xpt.c head/sys/cam/cam_xpt.c head/sys/cam/cam_xpt_internal.h head/sys/cam/scsi/scsi_xpt.c Modified: head/sys/cam/ata/ata_xpt.c ============================================================================== --- head/sys/cam/ata/ata_xpt.c Sun Nov 1 10:57:07 2009 (r198747) +++ head/sys/cam/ata/ata_xpt.c Sun Nov 1 11:31:06 2009 (r198748) @@ -733,6 +733,7 @@ noerror: case PROBE_SET_MULTI: if (periph->path->device->flags & CAM_DEV_UNCONFIGURED) { path->device->flags &= ~CAM_DEV_UNCONFIGURED; + xpt_acquire_device(path->device); done_ccb->ccb_h.func_code = XPT_GDEV_TYPE; xpt_action(done_ccb); xpt_async(AC_FOUND_DEVICE, done_ccb->ccb_h.path, @@ -777,6 +778,7 @@ noerror: ata_device_transport(path); if (periph->path->device->flags & CAM_DEV_UNCONFIGURED) { path->device->flags &= ~CAM_DEV_UNCONFIGURED; + xpt_acquire_device(path->device); done_ccb->ccb_h.func_code = XPT_GDEV_TYPE; xpt_action(done_ccb); xpt_async(AC_FOUND_DEVICE, done_ccb->ccb_h.path, done_ccb); @@ -810,6 +812,7 @@ noerror: path->device->flags |= CAM_DEV_IDENTIFY_DATA_VALID; if (periph->path->device->flags & CAM_DEV_UNCONFIGURED) { path->device->flags &= ~CAM_DEV_UNCONFIGURED; + xpt_acquire_device(path->device); done_ccb->ccb_h.func_code = XPT_GDEV_TYPE; xpt_action(done_ccb); xpt_async(AC_FOUND_DEVICE, done_ccb->ccb_h.path, @@ -1485,8 +1488,10 @@ ata_dev_async(u_int32_t async_code, stru CAM_EXPECT_INQ_CHANGE, NULL); } xpt_release_path(&newpath); - } else if (async_code == AC_LOST_DEVICE) { + } else if (async_code == AC_LOST_DEVICE && + (device->flags & CAM_DEV_UNCONFIGURED) == 0) { device->flags |= CAM_DEV_UNCONFIGURED; + xpt_release_device(device); } else if (async_code == AC_TRANSFER_NEG) { struct ccb_trans_settings *settings; Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Sun Nov 1 10:57:07 2009 (r198747) +++ head/sys/cam/cam_xpt.c Sun Nov 1 11:31:06 2009 (r198748) @@ -217,9 +217,7 @@ static void xpt_release_devq_device(str int run_queue); static struct cam_et* xpt_alloc_target(struct cam_eb *bus, target_id_t target_id); -static void xpt_release_target(struct cam_eb *bus, struct cam_et *target); -static void xpt_release_device(struct cam_eb *bus, struct cam_et *target, - struct cam_ed *device); +static void xpt_release_target(struct cam_et *target); static struct cam_eb* xpt_find_bus(path_id_t path_id); static struct cam_et* @@ -3521,9 +3519,9 @@ xpt_compile_path(struct cam_path *new_pa CAM_DEBUG(new_path, CAM_DEBUG_TRACE, ("xpt_compile_path\n")); } else { if (device != NULL) - xpt_release_device(bus, target, device); + xpt_release_device(device); if (target != NULL) - xpt_release_target(bus, target); + xpt_release_target(target); if (bus != NULL) xpt_release_bus(bus); } @@ -3535,11 +3533,11 @@ xpt_release_path(struct cam_path *path) { CAM_DEBUG(path, CAM_DEBUG_TRACE, ("xpt_release_path\n")); if (path->device != NULL) { - xpt_release_device(path->bus, path->target, path->device); + xpt_release_device(path->device); path->device = NULL; } if (path->target != NULL) { - xpt_release_target(path->bus, path->target); + xpt_release_target(path->target); path->target = NULL; } if (path->bus != NULL) { @@ -4375,15 +4373,15 @@ xpt_alloc_target(struct cam_eb *bus, tar } static void -xpt_release_target(struct cam_eb *bus, struct cam_et *target) +xpt_release_target(struct cam_et *target) { if ((--target->refcount == 0) && (TAILQ_FIRST(&target->ed_entries) == NULL)) { - TAILQ_REMOVE(&bus->et_entries, target, links); - bus->generation++; + TAILQ_REMOVE(&target->bus->et_entries, target, links); + target->bus->generation++; + xpt_release_bus(target->bus); free(target, M_CAMXPT); - xpt_release_bus(bus); } } @@ -4470,13 +4468,18 @@ xpt_alloc_device(struct cam_eb *bus, str return (device); } -static void -xpt_release_device(struct cam_eb *bus, struct cam_et *target, - struct cam_ed *device) +void +xpt_acquire_device(struct cam_ed *device) +{ + + device->refcount++; +} + +void +xpt_release_device(struct cam_ed *device) { - if ((--device->refcount == 0) - && ((device->flags & CAM_DEV_UNCONFIGURED) != 0)) { + if (--device->refcount == 0) { struct cam_devq *devq; if (device->alloc_ccb_entry.pinfo.index != CAM_UNQUEUED_INDEX @@ -4486,16 +4489,16 @@ xpt_release_device(struct cam_eb *bus, s if ((device->flags & CAM_DEV_REL_TIMEOUT_PENDING) != 0) callout_stop(&device->callout); - TAILQ_REMOVE(&target->ed_entries, device,links); - target->generation++; - bus->sim->max_ccbs -= device->ccbq.devq_openings; + TAILQ_REMOVE(&device->target->ed_entries, device,links); + device->target->generation++; + device->target->bus->sim->max_ccbs -= device->ccbq.devq_openings; /* Release our slot in the devq */ - devq = bus->sim->devq; + devq = device->target->bus->sim->devq; cam_devq_resize(devq, devq->alloc_queue.array_size - 1); camq_fini(&device->drvq); cam_ccbq_fini(&device->ccbq); + xpt_release_target(device->target); free(device, M_CAMXPT); - xpt_release_target(bus, target); } } Modified: head/sys/cam/cam_xpt_internal.h ============================================================================== --- head/sys/cam/cam_xpt_internal.h Sun Nov 1 10:57:07 2009 (r198747) +++ head/sys/cam/cam_xpt_internal.h Sun Nov 1 11:31:06 2009 (r198748) @@ -37,9 +37,7 @@ struct cam_ed; typedef struct cam_ed * (*xpt_alloc_device_func)(struct cam_eb *bus, struct cam_et *target, lun_id_t lun_id); -typedef void (*xpt_release_device_func)(struct cam_eb *bus, - struct cam_et *target, - struct cam_ed *device); +typedef void (*xpt_release_device_func)(struct cam_ed *device); typedef void (*xpt_action_func)(union ccb *start_ccb); typedef void (*xpt_dev_async_func)(u_int32_t async_code, struct cam_eb *bus, @@ -172,6 +170,8 @@ struct xpt_xport * ata_get_xport(void); struct cam_ed * xpt_alloc_device(struct cam_eb *bus, struct cam_et *target, lun_id_t lun_id); +void xpt_acquire_device(struct cam_ed *device); +void xpt_release_device(struct cam_ed *device); void xpt_run_dev_sendq(struct cam_eb *bus); int xpt_schedule_dev(struct camq *queue, cam_pinfo *dev_pinfo, u_int32_t new_priority); Modified: head/sys/cam/scsi/scsi_xpt.c ============================================================================== --- head/sys/cam/scsi/scsi_xpt.c Sun Nov 1 10:57:07 2009 (r198747) +++ head/sys/cam/scsi/scsi_xpt.c Sun Nov 1 11:31:06 2009 (r198748) @@ -1076,8 +1076,10 @@ probedone(struct cam_periph *periph, uni else PROBE_SET_ACTION(softc, PROBE_SERIAL_NUM_0); - path->device->flags &= ~CAM_DEV_UNCONFIGURED; - + if (path->device->flags & CAM_DEV_UNCONFIGURED) { + path->device->flags &= ~CAM_DEV_UNCONFIGURED; + xpt_acquire_device(path->device); + } xpt_release_ccb(done_ccb); xpt_schedule(periph, priority); return; @@ -1336,8 +1338,12 @@ probedone(struct cam_periph *periph, uni CAM_DEBUG(periph->path, CAM_DEBUG_INFO, ("Leave Domain Validation\n")); } + if (path->device->flags & CAM_DEV_UNCONFIGURED) { + path->device->flags &= ~CAM_DEV_UNCONFIGURED; + xpt_acquire_device(path->device); + } path->device->flags &= - ~(CAM_DEV_UNCONFIGURED|CAM_DEV_IN_DV|CAM_DEV_DV_HIT_BOTTOM); + ~(CAM_DEV_IN_DV|CAM_DEV_DV_HIT_BOTTOM); if ((softc->flags & PROBE_NO_ANNOUNCE) == 0) { /* Inform the XPT that a new device has been found */ done_ccb->ccb_h.func_code = XPT_GDEV_TYPE; @@ -1387,8 +1393,12 @@ probedone(struct cam_periph *periph, uni CAM_DEBUG(periph->path, CAM_DEBUG_INFO, ("Leave Domain Validation Successfully\n")); } + if (path->device->flags & CAM_DEV_UNCONFIGURED) { + path->device->flags &= ~CAM_DEV_UNCONFIGURED; + xpt_acquire_device(path->device); + } path->device->flags &= - ~(CAM_DEV_UNCONFIGURED|CAM_DEV_IN_DV|CAM_DEV_DV_HIT_BOTTOM); + ~(CAM_DEV_IN_DV|CAM_DEV_DV_HIT_BOTTOM); if ((softc->flags & PROBE_NO_ANNOUNCE) == 0) { /* Inform the XPT that a new device has been found */ done_ccb->ccb_h.func_code = XPT_GDEV_TYPE; @@ -2375,8 +2385,10 @@ scsi_dev_async(u_int32_t async_code, str CAM_EXPECT_INQ_CHANGE, NULL); } xpt_release_path(&newpath); - } else if (async_code == AC_LOST_DEVICE) { + } else if (async_code == AC_LOST_DEVICE && + (device->flags & CAM_DEV_UNCONFIGURED) == 0) { device->flags |= CAM_DEV_UNCONFIGURED; + xpt_release_device(device); } else if (async_code == AC_TRANSFER_NEG) { struct ccb_trans_settings *settings; From owner-svn-src-all@FreeBSD.ORG Sun Nov 1 11:34:14 2009 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 5E9A3106566B; Sun, 1 Nov 2009 11:34:14 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4C0888FC0A; Sun, 1 Nov 2009 11:34: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 nA1BYDvP022375; Sun, 1 Nov 2009 11:34:13 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1BYD9f022372; Sun, 1 Nov 2009 11:34:13 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <200911011134.nA1BYD9f022372@svn.freebsd.org> From: Andriy Gapon Date: Sun, 1 Nov 2009 11:34:13 +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: r198749 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci 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, 01 Nov 2009 11:34:14 -0000 Author: avg Date: Sun Nov 1 11:34:13 2009 New Revision: 198749 URL: http://svn.freebsd.org/changeset/base/198749 Log: MFC r197128,197325: add support for smbus controller found in AMD SB700 Modified: 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) stable/8/sys/pci/intpm.c stable/8/sys/pci/intpmreg.h Modified: stable/8/sys/pci/intpm.c ============================================================================== --- stable/8/sys/pci/intpm.c Sun Nov 1 11:31:06 2009 (r198748) +++ stable/8/sys/pci/intpm.c Sun Nov 1 11:34:13 2009 (r198749) @@ -53,6 +53,8 @@ struct intsmb_softc { void *irq_hand; device_t smbus; int isbusy; + int cfg_irq9; + int poll; struct mtx lock; }; @@ -96,6 +98,10 @@ intsmb_probe(device_t dev) #endif device_set_desc(dev, "Intel PIIX4 SMBUS Interface"); break; + case 0x43851002: + device_set_desc(dev, "AMD SB600/700/710/750 SMBus Controller"); + /* XXX Maybe force polling right here? */ + break; default: return (ENXIO); } @@ -108,12 +114,24 @@ intsmb_attach(device_t dev) { struct intsmb_softc *sc = device_get_softc(dev); int error, rid, value; + int intr; char *str; sc->dev = dev; mtx_init(&sc->lock, device_get_nameunit(dev), "intsmb", MTX_DEF); + sc->cfg_irq9 = 0; +#ifndef NO_CHANGE_PCICONF + switch (pci_get_devid(dev)) { + case 0x71138086: /* Intel 82371AB */ + case 0x719b8086: /* Intel 82443MX */ + /* Changing configuration is allowed. */ + sc->cfg_irq9 = 1; + break; + } +#endif + rid = PCI_BASE_ADDR_SMB; sc->io_res = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid, RF_ACTIVE); @@ -123,27 +141,42 @@ intsmb_attach(device_t dev) goto fail; } -#ifndef NO_CHANGE_PCICONF - pci_write_config(dev, PCIR_INTLINE, 0x9, 1); - pci_write_config(dev, PCI_HST_CFG_SMB, - PCI_INTR_SMB_IRQ9 | PCI_INTR_SMB_ENABLE, 1); -#endif + if (sc->cfg_irq9) { + pci_write_config(dev, PCIR_INTLINE, 0x9, 1); + pci_write_config(dev, PCI_HST_CFG_SMB, + PCI_INTR_SMB_IRQ9 | PCI_INTR_SMB_ENABLE, 1); + } value = pci_read_config(dev, PCI_HST_CFG_SMB, 1); - switch (value & 0xe) { + sc->poll = (value & PCI_INTR_SMB_ENABLE) == 0; + intr = value & PCI_INTR_SMB_MASK; + switch (intr) { case PCI_INTR_SMB_SMI: str = "SMI"; break; case PCI_INTR_SMB_IRQ9: str = "IRQ 9"; break; + case PCI_INTR_SMB_IRQ_PCI: + str = "PCI IRQ"; + break; default: str = "BOGUS"; } + device_printf(dev, "intr %s %s ", str, - (value & 1) ? "enabled" : "disabled"); + sc->poll == 0 ? "enabled" : "disabled"); printf("revision %d\n", pci_read_config(dev, PCI_REVID_SMB, 1)); - if ((value & 0xe) != PCI_INTR_SMB_IRQ9) { + if (!sc->poll && intr == PCI_INTR_SMB_SMI) { + device_printf(dev, + "using polling mode when configured interrupt is SMI\n"); + sc->poll = 1; + } + + if (sc->poll) + goto no_intr; + + if (intr != PCI_INTR_SMB_IRQ9 && intr != PCI_INTR_SMB_IRQ_PCI) { device_printf(dev, "Unsupported interrupt mode\n"); error = ENXIO; goto fail; @@ -151,7 +184,9 @@ intsmb_attach(device_t dev) /* Force IRQ 9. */ rid = 0; - bus_set_resource(dev, SYS_RES_IRQ, rid, 9, 1); + if (sc->cfg_irq9) + bus_set_resource(dev, SYS_RES_IRQ, rid, 9, 1); + sc->irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_SHAREABLE | RF_ACTIVE); if (sc->irq_res == NULL) { @@ -167,6 +202,7 @@ intsmb_attach(device_t dev) goto fail; } +no_intr: sc->isbusy = 0; sc->smbus = device_add_child(dev, "smbus", -1); if (sc->smbus == NULL) { @@ -361,7 +397,7 @@ intsmb_start(struct intsmb_softc *sc, un tmp |= PIIX4_SMBHSTCNT_START; /* While not in autoconfiguration enable interrupts. */ - if (!cold && !nointr) + if (!sc->poll && !cold && !nointr) tmp |= PIIX4_SMBHSTCNT_INTREN; bus_write_1(sc->io_res, PIIX4_SMBHSTCNT, tmp); } @@ -411,8 +447,6 @@ intsmb_stop_poll(struct intsmb_softc *sc if (!(status & PIIX4_SMBHSTSTAT_BUSY)) { sc->isbusy = 0; error = intsmb_error(sc->dev, status); - if (error == 0 && !(status & PIIX4_SMBHSTSTAT_INTR)) - device_printf(sc->dev, "unknown cause why?\n"); return (error); } } @@ -434,7 +468,7 @@ intsmb_stop(struct intsmb_softc *sc) INTSMB_LOCK_ASSERT(sc); - if (cold) + if (sc->poll || cold) /* So that it can use device during device probe on SMBus. */ return (intsmb_stop_poll(sc)); Modified: stable/8/sys/pci/intpmreg.h ============================================================================== --- stable/8/sys/pci/intpmreg.h Sun Nov 1 11:31:06 2009 (r198748) +++ stable/8/sys/pci/intpmreg.h Sun Nov 1 11:34:13 2009 (r198749) @@ -35,7 +35,9 @@ #define PCI_BASE_ADDR_SMB 0x90 /* IO BAR. */ #define PCI_BASE_ADDR_PM 0x40 #define PCI_HST_CFG_SMB 0xd2 /* Host Configuration */ +#define PCI_INTR_SMB_MASK 0xe #define PCI_INTR_SMB_SMI 0 +#define PCI_INTR_SMB_IRQ_PCI 2 #define PCI_INTR_SMB_IRQ9 8 #define PCI_INTR_SMB_ENABLE 1 #define PCI_SLV_CMD_SMB 0xd3 /*SLAVE COMMAND*/ From owner-svn-src-all@FreeBSD.ORG Sun Nov 1 11:39:08 2009 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 4B2AE1065676; Sun, 1 Nov 2009 11:39:08 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3AC7C8FC08; Sun, 1 Nov 2009 11:39: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 nA1Bd8mU022527; Sun, 1 Nov 2009 11:39:08 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1Bd8nf022525; Sun, 1 Nov 2009 11:39:08 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <200911011139.nA1Bd8nf022525@svn.freebsd.org> From: Christian Brueffer Date: Sun, 1 Nov 2009 11:39: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: r198750 - head/usr.sbin/usbconfig 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, 01 Nov 2009 11:39:08 -0000 Author: brueffer Date: Sun Nov 1 11:39:07 2009 New Revision: 198750 URL: http://svn.freebsd.org/changeset/base/198750 Log: Expand DESCRIPTION and a basic EXAMPLES section. PR: 139605 Submitted by: Warren Block MFC after: 1 week Modified: head/usr.sbin/usbconfig/usbconfig.8 Modified: head/usr.sbin/usbconfig/usbconfig.8 ============================================================================== --- head/usr.sbin/usbconfig/usbconfig.8 Sun Nov 1 11:34:13 2009 (r198749) +++ head/usr.sbin/usbconfig/usbconfig.8 Sun Nov 1 11:39:07 2009 (r198750) @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd Sep 28, 2008 +.Dd November 1, 2009 .Dt USBCONFIG 8 .Os .Sh NAME @@ -49,5 +49,13 @@ Should only be used in conjunction with .It Fl h Show help and available commands. .El +.Pp +When called without options, +.Nm +prints a list of all available USB devices. +.Sh EXAMPLES +Show information about the device on USB bus 1 at address 2: +.Pp +.Dl usbconfig -u 1 -a 2 dump_info .Sh SEE ALSO .Xr usb 4 From owner-svn-src-all@FreeBSD.ORG Sun Nov 1 11:41:20 2009 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 8B7EE106566C; Sun, 1 Nov 2009 11:41:20 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6E3338FC15; Sun, 1 Nov 2009 11:41: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 nA1BfKTc022602; Sun, 1 Nov 2009 11:41:20 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1BfKcP022599; Sun, 1 Nov 2009 11:41:20 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <200911011141.nA1BfKcP022599@svn.freebsd.org> From: Andriy Gapon Date: Sun, 1 Nov 2009 11:41:20 +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: r198751 - in stable/7/sys: . contrib/pf 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, 01 Nov 2009 11:41:20 -0000 Author: avg Date: Sun Nov 1 11:41:20 2009 New Revision: 198751 URL: http://svn.freebsd.org/changeset/base/198751 Log: MFC r197128,197325: add support for smbus controller found in AMD SB700 Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/pci/intpm.c stable/7/sys/pci/intpmreg.h Modified: stable/7/sys/pci/intpm.c ============================================================================== --- stable/7/sys/pci/intpm.c Sun Nov 1 11:39:07 2009 (r198750) +++ stable/7/sys/pci/intpm.c Sun Nov 1 11:41:20 2009 (r198751) @@ -53,6 +53,8 @@ struct intsmb_softc { void *irq_hand; device_t smbus; int isbusy; + int cfg_irq9; + int poll; struct mtx lock; }; @@ -96,6 +98,10 @@ intsmb_probe(device_t dev) #endif device_set_desc(dev, "Intel PIIX4 SMBUS Interface"); break; + case 0x43851002: + device_set_desc(dev, "AMD SB600/700/710/750 SMBus Controller"); + /* XXX Maybe force polling right here? */ + break; default: return (ENXIO); } @@ -108,12 +114,24 @@ intsmb_attach(device_t dev) { struct intsmb_softc *sc = device_get_softc(dev); int error, rid, value; + int intr; char *str; sc->dev = dev; mtx_init(&sc->lock, device_get_nameunit(dev), "intsmb", MTX_DEF); + sc->cfg_irq9 = 0; +#ifndef NO_CHANGE_PCICONF + switch (pci_get_devid(dev)) { + case 0x71138086: /* Intel 82371AB */ + case 0x719b8086: /* Intel 82443MX */ + /* Changing configuration is allowed. */ + sc->cfg_irq9 = 1; + break; + } +#endif + rid = PCI_BASE_ADDR_SMB; sc->io_res = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid, RF_ACTIVE); @@ -123,27 +141,42 @@ intsmb_attach(device_t dev) goto fail; } -#ifndef NO_CHANGE_PCICONF - pci_write_config(dev, PCIR_INTLINE, 0x9, 1); - pci_write_config(dev, PCI_HST_CFG_SMB, - PCI_INTR_SMB_IRQ9 | PCI_INTR_SMB_ENABLE, 1); -#endif + if (sc->cfg_irq9) { + pci_write_config(dev, PCIR_INTLINE, 0x9, 1); + pci_write_config(dev, PCI_HST_CFG_SMB, + PCI_INTR_SMB_IRQ9 | PCI_INTR_SMB_ENABLE, 1); + } value = pci_read_config(dev, PCI_HST_CFG_SMB, 1); - switch (value & 0xe) { + sc->poll = (value & PCI_INTR_SMB_ENABLE) == 0; + intr = value & PCI_INTR_SMB_MASK; + switch (intr) { case PCI_INTR_SMB_SMI: str = "SMI"; break; case PCI_INTR_SMB_IRQ9: str = "IRQ 9"; break; + case PCI_INTR_SMB_IRQ_PCI: + str = "PCI IRQ"; + break; default: str = "BOGUS"; } + device_printf(dev, "intr %s %s ", str, - (value & 1) ? "enabled" : "disabled"); + sc->poll == 0 ? "enabled" : "disabled"); printf("revision %d\n", pci_read_config(dev, PCI_REVID_SMB, 1)); - if ((value & 0xe) != PCI_INTR_SMB_IRQ9) { + if (!sc->poll && intr == PCI_INTR_SMB_SMI) { + device_printf(dev, + "using polling mode when configured interrupt is SMI\n"); + sc->poll = 1; + } + + if (sc->poll) + goto no_intr; + + if (intr != PCI_INTR_SMB_IRQ9 && intr != PCI_INTR_SMB_IRQ_PCI) { device_printf(dev, "Unsupported interrupt mode\n"); error = ENXIO; goto fail; @@ -151,7 +184,9 @@ intsmb_attach(device_t dev) /* Force IRQ 9. */ rid = 0; - bus_set_resource(dev, SYS_RES_IRQ, rid, 9, 1); + if (sc->cfg_irq9) + bus_set_resource(dev, SYS_RES_IRQ, rid, 9, 1); + sc->irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_SHAREABLE | RF_ACTIVE); if (sc->irq_res == NULL) { @@ -167,6 +202,7 @@ intsmb_attach(device_t dev) goto fail; } +no_intr: sc->isbusy = 0; sc->smbus = device_add_child(dev, "smbus", -1); if (sc->smbus == NULL) { @@ -361,7 +397,7 @@ intsmb_start(struct intsmb_softc *sc, un tmp |= PIIX4_SMBHSTCNT_START; /* While not in autoconfiguration enable interrupts. */ - if (!cold && !nointr) + if (!sc->poll && !cold && !nointr) tmp |= PIIX4_SMBHSTCNT_INTREN; bus_write_1(sc->io_res, PIIX4_SMBHSTCNT, tmp); } @@ -411,8 +447,6 @@ intsmb_stop_poll(struct intsmb_softc *sc if (!(status & PIIX4_SMBHSTSTAT_BUSY)) { sc->isbusy = 0; error = intsmb_error(sc->dev, status); - if (error == 0 && !(status & PIIX4_SMBHSTSTAT_INTR)) - device_printf(sc->dev, "unknown cause why?\n"); return (error); } } @@ -434,7 +468,7 @@ intsmb_stop(struct intsmb_softc *sc) INTSMB_LOCK_ASSERT(sc); - if (cold) + if (sc->poll || cold) /* So that it can use device during device probe on SMBus. */ return (intsmb_stop_poll(sc)); Modified: stable/7/sys/pci/intpmreg.h ============================================================================== --- stable/7/sys/pci/intpmreg.h Sun Nov 1 11:39:07 2009 (r198750) +++ stable/7/sys/pci/intpmreg.h Sun Nov 1 11:41:20 2009 (r198751) @@ -35,7 +35,9 @@ #define PCI_BASE_ADDR_SMB 0x90 /* IO BAR. */ #define PCI_BASE_ADDR_PM 0x40 #define PCI_HST_CFG_SMB 0xd2 /* Host Configuration */ +#define PCI_INTR_SMB_MASK 0xe #define PCI_INTR_SMB_SMI 0 +#define PCI_INTR_SMB_IRQ_PCI 2 #define PCI_INTR_SMB_IRQ9 8 #define PCI_INTR_SMB_ENABLE 1 #define PCI_SLV_CMD_SMB 0xd3 /*SLAVE COMMAND*/ From owner-svn-src-all@FreeBSD.ORG Sun Nov 1 13:06:15 2009 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 8FC2C106566B; Sun, 1 Nov 2009 13:06:15 +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 7F84A8FC19; Sun, 1 Nov 2009 13:06: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 nA1D6Fjm024213; Sun, 1 Nov 2009 13:06:15 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1D6F4x024211; Sun, 1 Nov 2009 13:06:15 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200911011306.nA1D6F4x024211@svn.freebsd.org> From: Alexander Motin Date: Sun, 1 Nov 2009 13:06: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: r198752 - head/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: Sun, 01 Nov 2009 13:06:15 -0000 Author: mav Date: Sun Nov 1 13:06:15 2009 New Revision: 198752 URL: http://svn.freebsd.org/changeset/base/198752 Log: MFp4: Allow SATA1 SiI chips to do full-sized DMA. Specification tells that we may release DMA constrants even more, but it require some additional handling. Modified: head/sys/dev/ata/chipsets/ata-siliconimage.c Modified: head/sys/dev/ata/chipsets/ata-siliconimage.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-siliconimage.c Sun Nov 1 11:41:20 2009 (r198751) +++ head/sys/dev/ata/chipsets/ata-siliconimage.c Sun Nov 1 13:06:15 2009 (r198752) @@ -340,6 +340,7 @@ ata_sii_ch_attach(device_t dev) ATA_OUTL(ctlr->r_res2, 0x148 + (unit01 << 7) + (unit10 << 8),(1 << 16)); } + ch->dma.max_iosize = (ATA_DMA_ENTRIES - 1) * PAGE_SIZE; if (ctlr->chip->cfg2 & SII_BUG) { /* work around errata in early chips */ ch->dma.boundary = 8192; From owner-svn-src-all@FreeBSD.ORG Sun Nov 1 15:15:44 2009 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 E34E51065696; Sun, 1 Nov 2009 15:15:44 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id BFE048FC20; Sun, 1 Nov 2009 15:15:44 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 5758646B06; Sun, 1 Nov 2009 10:15:44 -0500 (EST) Date: Sun, 1 Nov 2009 15:15:44 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Ed Schouten In-Reply-To: <200910311035.n9VAZfIb082932@svn.freebsd.org> Message-ID: References: <200910311035.n9VAZfIb082932@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) 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: r198706 - 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, 01 Nov 2009 15:15:45 -0000 On Sat, 31 Oct 2009, Ed Schouten wrote: > Turn unused structure fields of cdevsw into spares. > > d_uid, d_gid and d_mode are unused, because permissions are stored in > cdevpriv nowadays. d_kind doesn't seem to be used at all. We no longer > keep a list of cdevsw's, so d_list is also unused. > > uid_t and gid_t are 32 bits, but mode_t is 16 bits, Because of alignment > constraints of d_kind, we can safely turn it into three 32-bit integers. > d_kind and d_list is equal in size to three pointers. The underlying change seems fine, especially in -CURRENT, but I'm confused by the paragraph here on alignment and safety. What do you mean by safe, and does it matter? From a casual glance (perhaps mistaken), it looks like this changes the KBI, so all modules declaring struct cdevsw will need to be rebuilt. Robert N M Watson Computer Laboratory University of Cambridge > > Discussed with: kib > > Modified: > head/sys/sys/conf.h > > Modified: head/sys/sys/conf.h > ============================================================================== > --- head/sys/sys/conf.h Sat Oct 31 09:03:48 2009 (r198705) > +++ head/sys/sys/conf.h Sat Oct 31 10:35:41 2009 (r198706) > @@ -210,15 +210,13 @@ struct cdevsw { > d_kqfilter_t *d_kqfilter; > d_purge_t *d_purge; > d_mmap_single_t *d_mmap_single; > - uid_t d_uid; > - gid_t d_gid; > - mode_t d_mode; > - const char *d_kind; > + > + int32_t d_spare0[3]; > + void *d_spare1[3]; > > /* These fields should not be messed with by drivers */ > - LIST_ENTRY(cdevsw) d_list; > LIST_HEAD(, cdev) d_devs; > - int d_spare3; > + int d_spare2; > union { > struct cdevsw *gianttrick; > SLIST_ENTRY(cdevsw) postfree_list; > From owner-svn-src-all@FreeBSD.ORG Sun Nov 1 15:31:29 2009 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 D15C5106566C; Sun, 1 Nov 2009 15:31:29 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 78F668FC2C; Sun, 1 Nov 2009 15:31:29 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 2B67C46B2A; Sun, 1 Nov 2009 10:31:29 -0500 (EST) Date: Sun, 1 Nov 2009 15:31:29 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Ed Schouten In-Reply-To: <200911011030.nA1AUVsN019962@svn.freebsd.org> Message-ID: References: <200911011030.nA1AUVsN019962@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed 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: r198745 - in stable/8: etc sys sys/amd64/include/xen sys/cddl/contrib/opensolaris sys/contrib/dev/acpica sys/contrib/pf sys/dev/syscons sys/dev/xen/xenpci sys/kern sys/sys usr.sbin/jail 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, 01 Nov 2009 15:31:29 -0000 On Sun, 1 Nov 2009, Ed Schouten wrote: > Log: > MFC various commits back to stable/8: Is there some relationship between the various changesets merged together here? One nice thing about grouping merged changesets in some way is that it makes backing them out more sensible if there's a problem (since you just revert the whole changeset, etc). Robert > > SVN r197174: > Make sure we never place the cursor outside the screen. > > For some vague reason, it may be possible that scp->cursor_pos exceeds > scp->ysize * scp->xsize. This means that teken_set_cursor() may get > called with an invalid position. Just ignore the old cursor position in > this case. > > Reported by: Paul B. Mahol > > SVN r198213: > Make lock devices work properly. > > It turned out I did add the code to use the init state devices to set > the termios structure when opening the device, but it seems I totally > forgot to add the bits required to force the actual locking of flags > through the lock state devices. > > Reported by: ru > > SVN r198215, r198217: > Fix a typo in the jail(8) manpage. > > Submitted by: Jille Timmermans > > SVN r198216: > Fix qouting in a comment, to make it look more consistent > > Submitted by: Jille Timmermans > > SVN r198223: > Properly set the low watermarks when reducing the baud rate. > > Now that buffers are deallocated lazily, we should not use > tty*q_getsize() to obtain the buffer size to calculate the low > watermarks. Doing this may cause the watermark to be placed outside the > typical buffer size. > > This caused some regressions after my previous commit to the TTY code, > which allows pseudo-devices to resize the buffers as well. > > Reported by: yongari, dougb > > Modified: > stable/8/etc/ (props changed) > stable/8/etc/rc.subr > 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/syscons/scterm-teken.c > stable/8/sys/dev/xen/xenpci/ (props changed) > stable/8/sys/kern/tty.c > stable/8/sys/sys/ttyqueue.h > stable/8/usr.sbin/jail/ (props changed) > stable/8/usr.sbin/jail/jail.8 > > Modified: stable/8/etc/rc.subr > ============================================================================== > --- stable/8/etc/rc.subr Sun Nov 1 10:01:39 2009 (r198744) > +++ stable/8/etc/rc.subr Sun Nov 1 10:30:30 2009 (r198745) > @@ -565,7 +565,7 @@ run_rc_command() > rc_fast=yes > rc_quiet=yes > ;; > - force*) # "force prefix; always run > + force*) # "force" prefix; always run > rc_force=yes > _rc_prefix=force > rc_arg=${rc_arg#${_rc_prefix}} > > Modified: stable/8/sys/dev/syscons/scterm-teken.c > ============================================================================== > --- stable/8/sys/dev/syscons/scterm-teken.c Sun Nov 1 10:01:39 2009 (r198744) > +++ stable/8/sys/dev/syscons/scterm-teken.c Sun Nov 1 10:30:30 2009 (r198745) > @@ -130,9 +130,12 @@ scteken_init(scr_stat *scp, void **softc > tp.tp_col = scp->xsize; > teken_set_winsize(&ts->ts_teken, &tp); > > - tp.tp_row = scp->cursor_pos / scp->xsize; > - tp.tp_col = scp->cursor_pos % scp->xsize; > - teken_set_cursor(&ts->ts_teken, &tp); > + if (scp->cursor_pos < scp->ysize * scp->xsize) { > + /* Valid old cursor position. */ > + tp.tp_row = scp->cursor_pos / scp->xsize; > + tp.tp_col = scp->cursor_pos % scp->xsize; > + teken_set_cursor(&ts->ts_teken, &tp); > + } > break; > } > > > Modified: stable/8/sys/kern/tty.c > ============================================================================== > --- stable/8/sys/kern/tty.c Sun Nov 1 10:01:39 2009 (r198744) > +++ stable/8/sys/kern/tty.c Sun Nov 1 10:30:30 2009 (r198745) > @@ -109,14 +109,14 @@ tty_watermarks(struct tty *tp) > ttyinq_setsize(&tp->t_inq, tp, bs); > > /* Set low watermark at 10% (when 90% is available). */ > - tp->t_inlow = (ttyinq_getsize(&tp->t_inq) * 9) / 10; > + tp->t_inlow = (ttyinq_getallocatedsize(&tp->t_inq) * 9) / 10; > > /* Provide an ouput buffer for 0.2 seconds of data. */ > bs = MIN(tp->t_termios.c_ospeed / 5, TTYBUF_MAX); > ttyoutq_setsize(&tp->t_outq, tp, bs); > > /* Set low watermark at 10% (when 90% is available). */ > - tp->t_outlow = (ttyoutq_getsize(&tp->t_outq) * 9) / 10; > + tp->t_outlow = (ttyoutq_getallocatedsize(&tp->t_outq) * 9) / 10; > } > > static int > @@ -523,6 +523,34 @@ ttydev_ioctl(struct cdev *dev, u_long cm > goto done; > } > > + if (cmd == TIOCSETA || cmd == TIOCSETAW || cmd == TIOCSETAF) { > + struct termios *old = &tp->t_termios; > + struct termios *new = (struct termios *)data; > + struct termios *lock = TTY_CALLOUT(tp, dev) ? > + &tp->t_termios_lock_out : &tp->t_termios_lock_in; > + int cc; > + > + /* > + * Lock state devices. Just overwrite the values of the > + * commands that are currently in use. > + */ > + new->c_iflag = (old->c_iflag & lock->c_iflag) | > + (new->c_iflag & ~lock->c_iflag); > + new->c_oflag = (old->c_oflag & lock->c_oflag) | > + (new->c_oflag & ~lock->c_oflag); > + new->c_cflag = (old->c_cflag & lock->c_cflag) | > + (new->c_cflag & ~lock->c_cflag); > + new->c_lflag = (old->c_lflag & lock->c_lflag) | > + (new->c_lflag & ~lock->c_lflag); > + for (cc = 0; cc < NCCS; ++cc) > + if (lock->c_cc[cc]) > + new->c_cc[cc] = old->c_cc[cc]; > + if (lock->c_ispeed) > + new->c_ispeed = old->c_ispeed; > + if (lock->c_ospeed) > + new->c_ospeed = old->c_ospeed; > + } > + > error = tty_ioctl(tp, cmd, data, td); > done: tty_unlock(tp); > > > Modified: stable/8/sys/sys/ttyqueue.h > ============================================================================== > --- stable/8/sys/sys/ttyqueue.h Sun Nov 1 10:01:39 2009 (r198744) > +++ stable/8/sys/sys/ttyqueue.h Sun Nov 1 10:30:30 2009 (r198745) > @@ -93,6 +93,13 @@ ttyinq_getsize(struct ttyinq *ti) > } > > static __inline size_t > +ttyinq_getallocatedsize(struct ttyinq *ti) > +{ > + > + return (ti->ti_quota * TTYINQ_DATASIZE); > +} > + > +static __inline size_t > ttyinq_bytesleft(struct ttyinq *ti) > { > size_t len; > @@ -143,6 +150,13 @@ ttyoutq_getsize(struct ttyoutq *to) > } > > static __inline size_t > +ttyoutq_getallocatedsize(struct ttyoutq *to) > +{ > + > + return (to->to_quota * TTYOUTQ_DATASIZE); > +} > + > +static __inline size_t > ttyoutq_bytesleft(struct ttyoutq *to) > { > size_t len; > > Modified: stable/8/usr.sbin/jail/jail.8 > ============================================================================== > --- stable/8/usr.sbin/jail/jail.8 Sun Nov 1 10:01:39 2009 (r198744) > +++ stable/8/usr.sbin/jail/jail.8 Sun Nov 1 10:30:30 2009 (r198745) > @@ -34,7 +34,7 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd July 25, 2009 > +.Dd October 18, 2009 > .Dt JAIL 8 > .Os > .Sh NAME > @@ -377,7 +377,7 @@ Since raw sockets can be used to configu > network subsystems, extra caution should be used where privileged access > to jails is given out to untrusted parties. > .It Va allow.chflags > -Normally, priveleged users inside a jail are treated as unprivileged by > +Normally, privileged users inside a jail are treated as unprivileged by > .Xr chflags 2 . > When this parameter is set, such users are treated as privileged, and > may manipulate system file flags subject to the usual constraints on > From owner-svn-src-all@FreeBSD.ORG Sun Nov 1 15:33:40 2009 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 E1556106566C; Sun, 1 Nov 2009 15:33:40 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 824808FC0A; Sun, 1 Nov 2009 15:33:40 +0000 (UTC) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 515981CF70; Sun, 1 Nov 2009 16:33:39 +0100 (CET) Date: Sun, 1 Nov 2009 16:33:39 +0100 From: Ed Schouten To: Robert Watson Message-ID: <20091101153339.GH1293@hoeg.nl> References: <200910311035.n9VAZfIb082932@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Bina0ufSB9dLMnVr" Content-Disposition: inline In-Reply-To: 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: r198706 - 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, 01 Nov 2009 15:33:41 -0000 --Bina0ufSB9dLMnVr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Robert, * Robert Watson wrote: > The underlying change seems fine, especially in -CURRENT, but I'm > confused by the paragraph here on alignment and safety. What do you > mean by safe, and does it matter? With safe I mean that all useful members still begin at the same offset within the structure. I'm not sure whether it matters at all, because I can imagine d_devs could be moved around without having any effect, but I'm not going to make any predictions on that. > From a casual glance (perhaps mistaken), it looks like this changes > the KBI, so all modules declaring struct cdevsw will need to be > rebuilt. It shouldn't, right? - uid_t d_uid; - gid_t d_gid; - mode_t d_mode; - const char *d_kind; + + int32_t d_spare0[3]; + void *d_spare1[3]; /* These fields should not be messed with by drivers */ - LIST_ENTRY(cdevsw) d_list; d_uid, d_gid and d_mode is equal to: int32_t d_uid; int32_t d_gid; int16_t d_mode; Because d_kind is a pointer, there will be a hole in the structure of at least 2 bytes (maybe even 6), which means we can safely extend d_mode to 32 bits as well. I could have decided to leave it at uint16_t, but that would only obfuscate it even more when we would try to reclaim some space there. d_list is just two pointers, so I merged it with d_kind into an array of three pointers. --=20 Ed Schouten WWW: http://80386.nl/ --Bina0ufSB9dLMnVr Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkrtqlMACgkQ52SDGA2eCwUPBgCfXSx7mkhM4zu3hSCN+jcucGxC M38An0vDiD4tkSSbYUHnG4MEDC4FOyOT =K5yx -----END PGP SIGNATURE----- --Bina0ufSB9dLMnVr-- From owner-svn-src-all@FreeBSD.ORG Sun Nov 1 15:43:36 2009 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 DA520106566B; Sun, 1 Nov 2009 15:43:36 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 9B5058FC0C; Sun, 1 Nov 2009 15:43:36 +0000 (UTC) Received: by palm.hoeg.nl (Postfix, from userid 1000) id C3E7D1CF70; Sun, 1 Nov 2009 16:43:35 +0100 (CET) Date: Sun, 1 Nov 2009 16:43:35 +0100 From: Ed Schouten To: Robert Watson Message-ID: <20091101154335.GJ1293@hoeg.nl> References: <200911011030.nA1AUVsN019962@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="HlXFiQcSFG/a+HqU" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) 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: r198745 - in stable/8: etc sys sys/amd64/include/xen sys/cddl/contrib/opensolaris sys/contrib/dev/acpica sys/contrib/pf sys/dev/syscons sys/dev/xen/xenpci sys/kern sys/sys usr.sbin/jail 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, 01 Nov 2009 15:43:37 -0000 --HlXFiQcSFG/a+HqU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello Robert, * Robert Watson wrote: > Is there some relationship between the various changesets merged > together here? One nice thing about grouping merged changesets in > some way is that it makes backing them out more sensible if there's > a problem (since you just revert the whole changeset, etc). Well, it initially happened like this, because I wanted to merge back multiple changes back to releng/8 with re@'s approval. re@ required diff files to include commit messages and proper mergeinfo. Because I can't think of a way to prepare a larger set of patches that include proper mergeinfo without constantly reverting back and forth or keeping track of multiple 1.2 GB checkouts, I eventually just decided to create a bigger patch, so it was more an exception than a routine. Reverting patches shouldn't be a problem, because I could always just svn merge -c -123456 to revert individual commits. --=20 Ed Schouten WWW: http://80386.nl/ --HlXFiQcSFG/a+HqU Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkrtrKcACgkQ52SDGA2eCwVSaQCfdWZyR9hTrFO+cvI1pTd6q0Bu fbkAoIE8nt3tLb1DZE57KXPkbhp8vBHp =bUCl -----END PGP SIGNATURE----- --HlXFiQcSFG/a+HqU-- From owner-svn-src-all@FreeBSD.ORG Sun Nov 1 16:15:21 2009 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 DEECB1065676; Sun, 1 Nov 2009 16:15:21 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id B95548FC13; Sun, 1 Nov 2009 16:15:21 +0000 (UTC) Received: from [192.168.2.101] (host217-43-176-60.range217-43.btcentralplus.com [217.43.176.60]) by cyrus.watson.org (Postfix) with ESMTPSA id BF2BB46B2A; Sun, 1 Nov 2009 11:15:20 -0500 (EST) Mime-Version: 1.0 (Apple Message framework v1076) Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes From: "Robert N. M. Watson" In-Reply-To: <20091101153339.GH1293@hoeg.nl> Date: Sun, 1 Nov 2009 16:15:18 +0000 Content-Transfer-Encoding: 7bit Message-Id: References: <200910311035.n9VAZfIb082932@svn.freebsd.org> <20091101153339.GH1293@hoeg.nl> To: Ed Schouten X-Mailer: Apple Mail (2.1076) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r198706 - 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, 01 Nov 2009 16:15:22 -0000 On 1 Nov 2009, at 15:33, Ed Schouten wrote: > Because d_kind is a pointer, there will be a hole in the structure > of at > least 2 bytes (maybe even 6), which means we can safely extend > d_mode to > 32 bits as well. I could have decided to leave it at uint16_t, but > that > would only obfuscate it even more when we would try to reclaim some > space there. > > d_list is just two pointers, so I merged it with d_kind into an > array of > three pointers No, you're right, and I was mistaken, it seems fine on i386 and amd64. And, at least here, d_devs is at the same offset on both architectures. The only really "weird" architecture is arm, which I believe aligns char and short to 32-bit, but that should be OK here I think as well. Robert From owner-svn-src-all@FreeBSD.ORG Sun Nov 1 16:41:07 2009 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 9ACC31065694; Sun, 1 Nov 2009 16:41:07 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 6FB888FC19; Sun, 1 Nov 2009 16:41:07 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 0965546B39; Sun, 1 Nov 2009 11:41:07 -0500 (EST) Date: Sun, 1 Nov 2009 16:41:06 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Ed Schouten In-Reply-To: <20091101154335.GJ1293@hoeg.nl> Message-ID: References: <200911011030.nA1AUVsN019962@svn.freebsd.org> <20091101154335.GJ1293@hoeg.nl> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed 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: r198745 - in stable/8: etc sys sys/amd64/include/xen sys/cddl/contrib/opensolaris sys/contrib/dev/acpica sys/contrib/pf sys/dev/syscons sys/dev/xen/xenpci sys/kern sys/sys usr.sbin/jail 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, 01 Nov 2009 16:41:07 -0000 On Sun, 1 Nov 2009, Ed Schouten wrote: > * Robert Watson wrote: >> Is there some relationship between the various changesets merged together >> here? One nice thing about grouping merged changesets in some way is that >> it makes backing them out more sensible if there's a problem (since you >> just revert the whole changeset, etc). > > Well, it initially happened like this, because I wanted to merge back > multiple changes back to releng/8 with re@'s approval. re@ required diff > files to include commit messages and proper mergeinfo. > > Because I can't think of a way to prepare a larger set of patches that > include proper mergeinfo without constantly reverting back and forth or > keeping track of multiple 1.2 GB checkouts, I eventually just decided to > create a bigger patch, so it was more an exception than a routine. > > Reverting patches shouldn't be a problem, because I could always just svn > merge -c -123456 to revert individual commits. I had more in mind that instructions to locally roll back particular changesets to users will have weird side effects that they didn't have before. Robert From owner-svn-src-all@FreeBSD.ORG Sun Nov 1 17:15:39 2009 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 001971065748; Sun, 1 Nov 2009 17:15:38 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DE28E8FC13; Sun, 1 Nov 2009 17:15: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 nA1HFcm4028975; Sun, 1 Nov 2009 17:15:38 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1HFcpG028973; Sun, 1 Nov 2009 17:15:38 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <200911011715.nA1HFcpG028973@svn.freebsd.org> From: Andriy Gapon Date: Sun, 1 Nov 2009 17:15: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: r198755 - stable/7/usr.bin/fstat 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, 01 Nov 2009 17:15:39 -0000 Author: avg Date: Sun Nov 1 17:15:38 2009 New Revision: 198755 URL: http://svn.freebsd.org/changeset/base/198755 Log: MFC 196399: fstat: fix fsid comparison on systems with 64-bit long Modified: stable/7/usr.bin/fstat/ (props changed) stable/7/usr.bin/fstat/fstat.c stable/7/usr.bin/fstat/zfs.c Modified: stable/7/usr.bin/fstat/fstat.c ============================================================================== --- stable/7/usr.bin/fstat/fstat.c Sun Nov 1 17:05:08 2009 (r198754) +++ stable/7/usr.bin/fstat/fstat.c Sun Nov 1 17:15:38 2009 (r198755) @@ -649,7 +649,7 @@ devfs_filestat(struct vnode *vp, struct (void *)devfs_dirent.de_vnode, Pid); return 0; } - fsp->fsid = (long)mount.mnt_stat.f_fsid.val[0]; + fsp->fsid = (long)(uint32_t)mount.mnt_stat.f_fsid.val[0]; fsp->fileid = devfs_dirent.de_inode; fsp->mode = (devfs_dirent.de_mode & ~S_IFMT) | S_IFCHR; fsp->size = 0; Modified: stable/7/usr.bin/fstat/zfs.c ============================================================================== --- stable/7/usr.bin/fstat/zfs.c Sun Nov 1 17:05:08 2009 (r198754) +++ stable/7/usr.bin/fstat/zfs.c Sun Nov 1 17:15:38 2009 (r198755) @@ -117,7 +117,7 @@ zfs_filestat(struct vnode *vp, struct fi goto bad; } - fsp->fsid = (long)mount.mnt_stat.f_fsid.val[0]; + fsp->fsid = (long)(uint32_t)mount.mnt_stat.f_fsid.val[0]; fsp->fileid = *zid; /* * XXX: Shows up wrong in output, but UFS has this error too. Could From owner-svn-src-all@FreeBSD.ORG Sun Nov 1 17:17:26 2009 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 A95D31065670; Sun, 1 Nov 2009 17:17:26 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 5BC688FC12; Sun, 1 Nov 2009 17:17:26 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 874776D41B; Sun, 1 Nov 2009 17:17:25 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 6F3DE84503; Sun, 1 Nov 2009 18:17:25 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Ed Schouten References: <200911011030.nA1AUVsN019962@svn.freebsd.org> <20091101154335.GJ1293@hoeg.nl> Date: Sun, 01 Nov 2009 18:17:25 +0100 In-Reply-To: <20091101154335.GJ1293@hoeg.nl> (Ed Schouten's message of "Sun, 1 Nov 2009 16:43:35 +0100") Message-ID: <86hbtejhay.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Robert Watson , svn-src-stable-8@freebsd.org Subject: Re: svn commit: r198745 - in stable/8: etc sys sys/amd64/include/xen sys/cddl/contrib/opensolaris sys/contrib/dev/acpica sys/contrib/pf sys/dev/syscons sys/dev/xen/xenpci sys/kern sys/sys usr.sbin/jail 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, 01 Nov 2009 17:17:26 -0000 Ed Schouten writes: > Because I can't think of a way to prepare a larger set of patches that > include proper mergeinfo without constantly reverting back and forth or > keeping track of multiple 1.2 GB checkouts, I eventually just decided to > create a bigger patch, so it was more an exception than a routine. Use ZFS, snapshot a clean tree and create a separate clone for each patchset. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Sun Nov 1 17:36:37 2009 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 1872D106566C; Sun, 1 Nov 2009 17:36:37 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 04A1C8FC1A; Sun, 1 Nov 2009 17:36: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 nA1Haaw7029491; Sun, 1 Nov 2009 17:36:36 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1Haa10029490; Sun, 1 Nov 2009 17:36:36 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <200911011736.nA1Haa10029490@svn.freebsd.org> From: Andriy Gapon Date: Sun, 1 Nov 2009 17:36: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: r198756 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci 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, 01 Nov 2009 17:36:37 -0000 Author: avg Date: Sun Nov 1 17:36:36 2009 New Revision: 198756 URL: http://svn.freebsd.org/changeset/base/198756 Log: MFC 197641: print_caddr_t: drop incorrect __unused from parameter Modified: 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) stable/8/sys/kern/init_main.c Modified: stable/8/sys/kern/init_main.c ============================================================================== --- stable/8/sys/kern/init_main.c Sun Nov 1 17:15:38 2009 (r198755) +++ stable/8/sys/kern/init_main.c Sun Nov 1 17:36:36 2009 (r198756) @@ -284,7 +284,7 @@ restart: *************************************************************************** */ static void -print_caddr_t(void *data __unused) +print_caddr_t(void *data) { printf("%s", (char *)data); } From owner-svn-src-all@FreeBSD.ORG Sun Nov 1 17:37:03 2009 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 B1A7710656C1; Sun, 1 Nov 2009 17:37:03 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9F5908FC17; Sun, 1 Nov 2009 17:37: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 nA1Hb3gJ029536; Sun, 1 Nov 2009 17:37:03 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1Hb3Kl029534; Sun, 1 Nov 2009 17:37:03 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <200911011737.nA1Hb3Kl029534@svn.freebsd.org> From: Andriy Gapon Date: Sun, 1 Nov 2009 17:37:03 +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: r198757 - in stable/7/sys: . contrib/pf 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, 01 Nov 2009 17:37:03 -0000 Author: avg Date: Sun Nov 1 17:37:03 2009 New Revision: 198757 URL: http://svn.freebsd.org/changeset/base/198757 Log: MFC 197641: print_caddr_t: drop incorrect __unused from parameter Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/kern/init_main.c Modified: stable/7/sys/kern/init_main.c ============================================================================== --- stable/7/sys/kern/init_main.c Sun Nov 1 17:36:36 2009 (r198756) +++ stable/7/sys/kern/init_main.c Sun Nov 1 17:37:03 2009 (r198757) @@ -284,7 +284,7 @@ restart: *************************************************************************** */ static void -print_caddr_t(void *data __unused) +print_caddr_t(void *data) { printf("%s", (char *)data); } From owner-svn-src-all@FreeBSD.ORG Sun Nov 1 17:40:05 2009 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 97F361065670; Sun, 1 Nov 2009 17:40:05 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 842768FC15; Sun, 1 Nov 2009 17:40: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 nA1He5X9029651; Sun, 1 Nov 2009 17:40:05 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1He5i5029649; Sun, 1 Nov 2009 17:40:05 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <200911011740.nA1He5i5029649@svn.freebsd.org> From: Andriy Gapon Date: Sun, 1 Nov 2009 17:40:05 +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: r198758 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci 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, 01 Nov 2009 17:40:05 -0000 Author: avg Date: Sun Nov 1 17:40:05 2009 New Revision: 198758 URL: http://svn.freebsd.org/changeset/base/198758 Log: MFC 197658: print machine in kernel boot version string PR: kern/126926 Modified: 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) stable/8/sys/kern/init_main.c Modified: stable/8/sys/kern/init_main.c ============================================================================== --- stable/8/sys/kern/init_main.c Sun Nov 1 17:37:03 2009 (r198757) +++ stable/8/sys/kern/init_main.c Sun Nov 1 17:40:05 2009 (r198758) @@ -288,11 +288,24 @@ print_caddr_t(void *data) { printf("%s", (char *)data); } + +static void +print_version(void *data __unused) +{ + int len; + + /* Strip a trailing newline from version. */ + len = strlen(version); + while (len > 0 && version[len - 1] == '\n') + len--; + printf("%.*s %s\n", len, version, machine); +} + SYSINIT(announce, SI_SUB_COPYRIGHT, SI_ORDER_FIRST, print_caddr_t, copyright); SYSINIT(trademark, SI_SUB_COPYRIGHT, SI_ORDER_SECOND, print_caddr_t, trademark); -SYSINIT(version, SI_SUB_COPYRIGHT, SI_ORDER_THIRD, print_caddr_t, version); +SYSINIT(version, SI_SUB_COPYRIGHT, SI_ORDER_THIRD, print_version, NULL); #ifdef WITNESS static char wit_warn[] = From owner-svn-src-all@FreeBSD.ORG Sun Nov 1 17:43:00 2009 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 1091E106566B; Sun, 1 Nov 2009 17:43:00 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F22A68FC08; Sun, 1 Nov 2009 17:42: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 nA1Hgxt7029753; Sun, 1 Nov 2009 17:42:59 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1Hgx0N029751; Sun, 1 Nov 2009 17:42:59 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <200911011742.nA1Hgx0N029751@svn.freebsd.org> From: Andriy Gapon Date: Sun, 1 Nov 2009 17:42:59 +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: r198759 - in stable/7/sys: . contrib/pf 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, 01 Nov 2009 17:43:00 -0000 Author: avg Date: Sun Nov 1 17:42:59 2009 New Revision: 198759 URL: http://svn.freebsd.org/changeset/base/198759 Log: MFC 197658: print machine in kernel boot version string PR: kern/126926 Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/kern/init_main.c Modified: stable/7/sys/kern/init_main.c ============================================================================== --- stable/7/sys/kern/init_main.c Sun Nov 1 17:40:05 2009 (r198758) +++ stable/7/sys/kern/init_main.c Sun Nov 1 17:42:59 2009 (r198759) @@ -288,11 +288,24 @@ print_caddr_t(void *data) { printf("%s", (char *)data); } + +static void +print_version(void *data __unused) +{ + int len; + + /* Strip a trailing newline from version. */ + len = strlen(version); + while (len > 0 && version[len - 1] == '\n') + len--; + printf("%.*s %s\n", len, version, machine); +} + SYSINIT(announce, SI_SUB_COPYRIGHT, SI_ORDER_FIRST, print_caddr_t, copyright); SYSINIT(trademark, SI_SUB_COPYRIGHT, SI_ORDER_SECOND, print_caddr_t, trademark); -SYSINIT(version, SI_SUB_COPYRIGHT, SI_ORDER_THIRD, print_caddr_t, version); +SYSINIT(version, SI_SUB_COPYRIGHT, SI_ORDER_THIRD, print_version, NULL); #ifdef WITNESS static char wit_warn[] = From owner-svn-src-all@FreeBSD.ORG Sun Nov 1 17:45:38 2009 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 62826106568D; Sun, 1 Nov 2009 17:45:38 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4E89E8FC18; Sun, 1 Nov 2009 17:45: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 nA1HjbrL029895; Sun, 1 Nov 2009 17:45:38 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1HjbrE029892; Sun, 1 Nov 2009 17:45:37 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <200911011745.nA1HjbrE029892@svn.freebsd.org> From: Andriy Gapon Date: Sun, 1 Nov 2009 17:45:37 +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: r198760 - in stable/8/sys: . amd64/include amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci 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: Sun, 01 Nov 2009 17:45:38 -0000 Author: avg Date: Sun Nov 1 17:45:37 2009 New Revision: 198760 URL: http://svn.freebsd.org/changeset/base/198760 Log: MFC 197647: cpufunc.h: unify/correct style of c extension names Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/cpufunc.h 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) stable/8/sys/i386/include/cpufunc.h Modified: stable/8/sys/amd64/include/cpufunc.h ============================================================================== --- stable/8/sys/amd64/include/cpufunc.h Sun Nov 1 17:42:59 2009 (r198759) +++ stable/8/sys/amd64/include/cpufunc.h Sun Nov 1 17:45:37 2009 (r198760) @@ -277,7 +277,7 @@ static __inline void mfence(void) { - __asm__ __volatile("mfence" : : : "memory"); + __asm __volatile("mfence" : : : "memory"); } static __inline void @@ -457,14 +457,14 @@ load_es(u_int sel) __asm __volatile("mov %0,%%es" : : "rm" (sel)); } -static inline void +static __inline void cpu_monitor(const void *addr, int extensions, int hints) { __asm __volatile("monitor;" : :"a" (addr), "c" (extensions), "d"(hints)); } -static inline void +static __inline void cpu_mwait(int extensions, int hints) { __asm __volatile("mwait;" : :"a" (hints), "c" (extensions)); Modified: stable/8/sys/i386/include/cpufunc.h ============================================================================== --- stable/8/sys/i386/include/cpufunc.h Sun Nov 1 17:42:59 2009 (r198759) +++ stable/8/sys/i386/include/cpufunc.h Sun Nov 1 17:45:37 2009 (r198760) @@ -132,14 +132,14 @@ enable_intr(void) #endif } -static inline void +static __inline void cpu_monitor(const void *addr, int extensions, int hints) { __asm __volatile("monitor;" : :"a" (addr), "c" (extensions), "d"(hints)); } -static inline void +static __inline void cpu_mwait(int extensions, int hints) { __asm __volatile("mwait;" : :"a" (hints), "c" (extensions)); From owner-svn-src-all@FreeBSD.ORG Sun Nov 1 17:53:33 2009 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 62041106566C; Sun, 1 Nov 2009 17:53:33 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4ED8A8FC1B; Sun, 1 Nov 2009 17:53: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 nA1HrXOv030110; Sun, 1 Nov 2009 17:53:33 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1HrXW0030108; Sun, 1 Nov 2009 17:53:33 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <200911011753.nA1HrXW0030108@svn.freebsd.org> From: Andriy Gapon Date: Sun, 1 Nov 2009 17:53:33 +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: r198761 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci 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: Sun, 01 Nov 2009 17:53:33 -0000 Author: avg Date: Sun Nov 1 17:53:33 2009 New Revision: 198761 URL: http://svn.freebsd.org/changeset/base/198761 Log: MFC 198271: add amdtemp to i386 NOTES Modified: 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) stable/8/sys/i386/conf/NOTES Modified: stable/8/sys/i386/conf/NOTES ============================================================================== --- stable/8/sys/i386/conf/NOTES Sun Nov 1 17:45:37 2009 (r198760) +++ stable/8/sys/i386/conf/NOTES Sun Nov 1 17:53:33 2009 (r198761) @@ -786,8 +786,10 @@ device ichwd # Temperature sensors: # # coretemp: on-die sensor on Intel Core and newer CPUs +# amdtemp: on-die sensor on AMD K8/K10/K11 CPUs # device coretemp +device amdtemp # # CPU control pseudo-device. Provides access to MSRs, CPUID info and From owner-svn-src-all@FreeBSD.ORG Sun Nov 1 17:54:49 2009 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 7BE0E1065670; Sun, 1 Nov 2009 17:54:49 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 69DD78FC0A; Sun, 1 Nov 2009 17:54: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 nA1HsnaQ030188; Sun, 1 Nov 2009 17:54:49 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1HsngE030186; Sun, 1 Nov 2009 17:54:49 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <200911011754.nA1HsngE030186@svn.freebsd.org> From: Andriy Gapon Date: Sun, 1 Nov 2009 17:54:49 +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: r198762 - in stable/7/sys: . contrib/pf 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: Sun, 01 Nov 2009 17:54:49 -0000 Author: avg Date: Sun Nov 1 17:54:49 2009 New Revision: 198762 URL: http://svn.freebsd.org/changeset/base/198762 Log: MFC 198271: add amdtemp to i386 NOTES Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/i386/conf/NOTES Modified: stable/7/sys/i386/conf/NOTES ============================================================================== --- stable/7/sys/i386/conf/NOTES Sun Nov 1 17:53:33 2009 (r198761) +++ stable/7/sys/i386/conf/NOTES Sun Nov 1 17:54:49 2009 (r198762) @@ -870,8 +870,10 @@ device ichwd # Temperature sensors: # # coretemp: on-die sensor on Intel Core and newer CPUs +# amdtemp: on-die sensor on AMD K8/K10/K11 CPUs # device coretemp +device amdtemp #--------------------------------------------------------------------------- # ISDN4BSD From owner-svn-src-all@FreeBSD.ORG Sun Nov 1 17:56:46 2009 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 431F6106566B; Sun, 1 Nov 2009 17:56:46 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2F8508FC08; Sun, 1 Nov 2009 17:56: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 nA1Hujp1030294; Sun, 1 Nov 2009 17:56:45 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1HujOF030292; Sun, 1 Nov 2009 17:56:45 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <200911011756.nA1HujOF030292@svn.freebsd.org> From: Andriy Gapon Date: Sun, 1 Nov 2009 17:56:45 +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: r198763 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci modules 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, 01 Nov 2009 17:56:46 -0000 Author: avg Date: Sun Nov 1 17:56:45 2009 New Revision: 198763 URL: http://svn.freebsd.org/changeset/base/198763 Log: MFC 198279: fix sorting of some amd* entries in some makefiles Modified: 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) stable/8/sys/modules/Makefile Modified: stable/8/sys/modules/Makefile ============================================================================== --- stable/8/sys/modules/Makefile Sun Nov 1 17:54:49 2009 (r198762) +++ stable/8/sys/modules/Makefile Sun Nov 1 17:56:45 2009 (r198763) @@ -18,10 +18,10 @@ SUBDIR= ${_3dfx} \ ${_aic} \ aic7xxx \ aio \ - ${_amd} \ - ${_amdtemp} \ alc \ ale \ + ${_amd} \ + ${_amdtemp} \ amr \ ${_an} \ ${_aout} \ From owner-svn-src-all@FreeBSD.ORG Sun Nov 1 17:58:57 2009 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 510EC106568F; Sun, 1 Nov 2009 17:58:57 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3F2DB8FC0A; Sun, 1 Nov 2009 17:58: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 nA1Hwvcn030394; Sun, 1 Nov 2009 17:58:57 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1HwvF8030392; Sun, 1 Nov 2009 17:58:57 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <200911011758.nA1HwvF8030392@svn.freebsd.org> From: Andriy Gapon Date: Sun, 1 Nov 2009 17:58:57 +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: r198764 - in stable/7/sys: . contrib/pf modules 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, 01 Nov 2009 17:58:57 -0000 Author: avg Date: Sun Nov 1 17:58:56 2009 New Revision: 198764 URL: http://svn.freebsd.org/changeset/base/198764 Log: MFC 198279: fix sorting of some amd* entries in some makefiles Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/modules/Makefile Modified: stable/7/sys/modules/Makefile ============================================================================== --- stable/7/sys/modules/Makefile Sun Nov 1 17:56:45 2009 (r198763) +++ stable/7/sys/modules/Makefile Sun Nov 1 17:58:56 2009 (r198764) @@ -16,10 +16,10 @@ SUBDIR= ${_3dfx} \ ${_aic} \ aic7xxx \ aio \ - ${_amd} \ - ${_amdtemp} \ alc \ ale \ + ${_amd} \ + ${_amdtemp} \ amr \ ${_an} \ ${_aout} \ From owner-svn-src-all@FreeBSD.ORG Sun Nov 1 18:10:39 2009 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 F3B96106568F; Sun, 1 Nov 2009 18:10:38 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E20E38FC1E; Sun, 1 Nov 2009 18:10: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 nA1IAcjm030829; Sun, 1 Nov 2009 18:10:38 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1IAc9A030827; Sun, 1 Nov 2009 18:10:38 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <200911011810.nA1IAc9A030827@svn.freebsd.org> From: Andriy Gapon Date: Sun, 1 Nov 2009 18:10: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: r198765 - stable/8/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: Sun, 01 Nov 2009 18:10:39 -0000 Author: avg Date: Sun Nov 1 18:10:38 2009 New Revision: 198765 URL: http://svn.freebsd.org/changeset/base/198765 Log: MFC 198279: fix sorting of some amd* entries in some makefiles Modified: stable/8/share/man/man4/ (props changed) stable/8/share/man/man4/Makefile Modified: stable/8/share/man/man4/Makefile ============================================================================== --- stable/8/share/man/man4/Makefile Sun Nov 1 17:58:56 2009 (r198764) +++ stable/8/share/man/man4/Makefile Sun Nov 1 18:10:38 2009 (r198765) @@ -30,8 +30,8 @@ MAN= aac.4 \ ale.4 \ altq.4 \ amd.4 \ - ${_amdtemp.4} \ ${_amdsmb.4} \ + ${_amdtemp.4} \ amr.4 \ an.4 \ arcmsr.4 \ From owner-svn-src-all@FreeBSD.ORG Sun Nov 1 18:16:56 2009 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 01BC51065670; Sun, 1 Nov 2009 18:16:56 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E35BE8FC17; Sun, 1 Nov 2009 18:16: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 nA1IGtdf031031; Sun, 1 Nov 2009 18:16:55 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1IGt7A031029; Sun, 1 Nov 2009 18:16:55 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <200911011816.nA1IGt7A031029@svn.freebsd.org> From: Andriy Gapon Date: Sun, 1 Nov 2009 18:16:55 +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: r198766 - stable/8/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: Sun, 01 Nov 2009 18:16:56 -0000 Author: avg Date: Sun Nov 1 18:16:55 2009 New Revision: 198766 URL: http://svn.freebsd.org/changeset/base/198766 Log: MFC 198272, 198288: fix watchdogd(8) reference Modified: stable/8/share/man/man4/ (props changed) stable/8/share/man/man4/ichwd.4 Modified: stable/8/share/man/man4/ichwd.4 ============================================================================== --- stable/8/share/man/man4/ichwd.4 Sun Nov 1 18:10:38 2009 (r198765) +++ stable/8/share/man/man4/ichwd.4 Sun Nov 1 18:16:55 2009 (r198766) @@ -66,7 +66,7 @@ it believes the WDT is disabled. .Sh SEE ALSO .Xr watchdog 4 , .Xr watchdog 8 , -.Xr watchdogd 8, +.Xr watchdogd 8 , .Xr watchdog 9 .Rs .%T Using the Intel ICH Family Watchdog Timer (WDT) From owner-svn-src-all@FreeBSD.ORG Sun Nov 1 18:19:00 2009 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 E3874106568B; Sun, 1 Nov 2009 18:19:00 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D23EE8FC0A; Sun, 1 Nov 2009 18:19: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 nA1IJ0NP031146; Sun, 1 Nov 2009 18:19:00 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1IJ0pq031144; Sun, 1 Nov 2009 18:19:00 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <200911011819.nA1IJ0pq031144@svn.freebsd.org> From: Andriy Gapon Date: Sun, 1 Nov 2009 18:19:00 +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: r198767 - stable/7/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: Sun, 01 Nov 2009 18:19:01 -0000 Author: avg Date: Sun Nov 1 18:19:00 2009 New Revision: 198767 URL: http://svn.freebsd.org/changeset/base/198767 Log: MFC 198272, 198288: fix watchdogd(8) reference Modified: stable/7/share/man/man4/ (props changed) stable/7/share/man/man4/ichwd.4 Modified: stable/7/share/man/man4/ichwd.4 ============================================================================== --- stable/7/share/man/man4/ichwd.4 Sun Nov 1 18:16:55 2009 (r198766) +++ stable/7/share/man/man4/ichwd.4 Sun Nov 1 18:19:00 2009 (r198767) @@ -66,7 +66,7 @@ it believes the WDT is disabled. .Sh SEE ALSO .Xr watchdog 4 , .Xr watchdog 8 , -.Xr watchdogd 8, +.Xr watchdogd 8 , .Xr watchdog 9 .Rs .%T Using the Intel ICH Family Watchdog Timer (WDT) From owner-svn-src-all@FreeBSD.ORG Sun Nov 1 18:25:11 2009 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 BA8B71065676; Sun, 1 Nov 2009 18:25:11 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A98CF8FC12; Sun, 1 Nov 2009 18:25: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 nA1IPBgi031335; Sun, 1 Nov 2009 18:25:11 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1IPBQ2031333; Sun, 1 Nov 2009 18:25:11 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <200911011825.nA1IPBQ2031333@svn.freebsd.org> From: Christian Brueffer Date: Sun, 1 Nov 2009 18:25: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: r198768 - head/sbin/mknod 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, 01 Nov 2009 18:25:11 -0000 Author: brueffer Date: Sun Nov 1 18:25:11 2009 New Revision: 198768 URL: http://svn.freebsd.org/changeset/base/198768 Log: Refine r198714, it's not as easy as just leaving the major number zero. Submitted by: ed MFC after: 1 week Modified: head/sbin/mknod/mknod.8 Modified: head/sbin/mknod/mknod.8 ============================================================================== --- head/sbin/mknod/mknod.8 Sun Nov 1 18:19:00 2009 (r198767) +++ head/sbin/mknod/mknod.8 Sun Nov 1 18:25:11 2009 (r198768) @@ -74,7 +74,6 @@ and pseudo devices, and are type .It Ar major The major device number is an integer number which tells the kernel which device driver entry point to use. -This is a compatibility shim and should be left zero. .It Ar minor The minor device number tells the kernel which subunit the node corresponds to on the device; for example, From owner-svn-src-all@FreeBSD.ORG Sun Nov 1 18:39:26 2009 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 EA7151065670; Sun, 1 Nov 2009 18:39:26 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D6F5A8FC13; Sun, 1 Nov 2009 18:39: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 nA1IdQRd031725; Sun, 1 Nov 2009 18:39:26 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1IdQIL031721; Sun, 1 Nov 2009 18:39:26 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <200911011839.nA1IdQIL031721@svn.freebsd.org> From: Andriy Gapon Date: Sun, 1 Nov 2009 18:39:26 +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: r198769 - in stable/8/sys: . amd64/include/xen amd64/pci cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/pci dev/xen/xenpci i386/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, 01 Nov 2009 18:39:27 -0000 Author: avg Date: Sun Nov 1 18:39:26 2009 New Revision: 198769 URL: http://svn.freebsd.org/changeset/base/198769 Log: MFC 197450: number of cleanups in i386 and amd64 pci md code Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/amd64/pci/pci_cfgreg.c 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/pci/pcireg.h stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/i386/pci/pci_cfgreg.c Modified: stable/8/sys/amd64/pci/pci_cfgreg.c ============================================================================== --- stable/8/sys/amd64/pci/pci_cfgreg.c Sun Nov 1 18:25:11 2009 (r198768) +++ stable/8/sys/amd64/pci/pci_cfgreg.c Sun Nov 1 18:39:26 2009 (r198769) @@ -181,9 +181,9 @@ pci_cfgenable(unsigned bus, unsigned slo { int dataport = 0; - if (bus <= PCI_BUSMAX && slot < 32 && func <= PCI_FUNCMAX && - reg <= PCI_REGMAX && bytes != 3 && (unsigned) bytes <= 4 && - (reg & (bytes - 1)) == 0) { + if (bus <= PCI_BUSMAX && slot <= PCI_SLOTMAX && func <= PCI_FUNCMAX && + (unsigned)reg <= PCI_REGMAX && bytes != 3 && + (unsigned)bytes <= 4 && (reg & (bytes - 1)) == 0) { outl(CONF1_ADDR_PORT, (1 << 31) | (bus << 16) | (slot << 11) | (func << 8) | (reg & ~0x03)); dataport = CONF1_DATA_PORT + (reg & 0x03); @@ -281,7 +281,7 @@ pcie_cfgregopen(uint64_t base, uint8_t m * fall back to using type 1 config access instead. */ if (pci_cfgregopen() != 0) { - for (slot = 0; slot < 32; slot++) { + for (slot = 0; slot <= PCI_SLOTMAX; slot++) { val1 = pcireg_cfgread(0, slot, 0, 0, 4); if (val1 == 0xffffffff) continue; @@ -309,8 +309,8 @@ pciereg_cfgread(int bus, unsigned slot, volatile vm_offset_t va; int data = -1; - if (bus < pcie_minbus || bus > pcie_maxbus || slot >= 32 || - func > PCI_FUNCMAX || reg >= 0x1000) + if (bus < pcie_minbus || bus > pcie_maxbus || slot > PCI_SLOTMAX || + func > PCI_FUNCMAX || reg > PCIE_REGMAX) return (-1); va = PCIE_VADDR(pcie_base, reg, bus, slot, func); @@ -336,8 +336,8 @@ pciereg_cfgwrite(int bus, unsigned slot, { volatile vm_offset_t va; - if (bus < pcie_minbus || bus > pcie_maxbus || slot >= 32 || - func > PCI_FUNCMAX || reg >= 0x1000) + if (bus < pcie_minbus || bus > pcie_maxbus || slot > PCI_SLOTMAX || + func > PCI_FUNCMAX || reg > PCIE_REGMAX) return; va = PCIE_VADDR(pcie_base, reg, bus, slot, func); Modified: stable/8/sys/dev/pci/pcireg.h ============================================================================== --- stable/8/sys/dev/pci/pcireg.h Sun Nov 1 18:25:11 2009 (r198768) +++ stable/8/sys/dev/pci/pcireg.h Sun Nov 1 18:39:26 2009 (r198769) @@ -44,6 +44,7 @@ #define PCI_SLOTMAX 31 /* highest supported slot number */ #define PCI_FUNCMAX 7 /* highest supported function number */ #define PCI_REGMAX 255 /* highest supported config register addr. */ +#define PCIE_REGMAX 4095 /* highest supported config register addr. */ #define PCI_MAXHDRTYPE 2 /* PCI config header registers for all devices */ Modified: stable/8/sys/i386/pci/pci_cfgreg.c ============================================================================== --- stable/8/sys/i386/pci/pci_cfgreg.c Sun Nov 1 18:25:11 2009 (r198768) +++ stable/8/sys/i386/pci/pci_cfgreg.c Sun Nov 1 18:39:26 2009 (r198769) @@ -299,9 +299,9 @@ pci_cfgenable(unsigned bus, unsigned slo if (bus <= PCI_BUSMAX && slot < devmax && func <= PCI_FUNCMAX - && reg <= PCI_REGMAX + && (unsigned)reg <= PCI_REGMAX && bytes != 3 - && (unsigned) bytes <= 4 + && (unsigned)bytes <= 4 && (reg & (bytes - 1)) == 0) { switch (cfgmech) { case CFGMECH_PCIE: @@ -595,7 +595,7 @@ pcie_cfgregopen(uint64_t base, uint8_t m * fall back to using type 1 config access instead. */ if (pci_cfgregopen() != 0) { - for (slot = 0; slot < 32; slot++) { + for (slot = 0; slot <= PCI_SLOTMAX; slot++) { val1 = pcireg_cfgread(0, slot, 0, 0, 4); if (val1 == 0xffffffff) continue; @@ -661,8 +661,8 @@ pciereg_cfgread(int bus, unsigned slot, vm_paddr_t pa, papage; int data = -1; - if (bus < pcie_minbus || bus > pcie_maxbus || slot >= 32 || - func > PCI_FUNCMAX || reg >= 0x1000 || bytes > 4 || bytes == 3) + if (bus < pcie_minbus || bus > pcie_maxbus || slot > PCI_SLOTMAX || + func > PCI_FUNCMAX || reg > PCIE_REGMAX) return (-1); critical_enter(); @@ -695,8 +695,8 @@ pciereg_cfgwrite(int bus, unsigned slot, volatile vm_offset_t va; vm_paddr_t pa, papage; - if (bus < pcie_minbus || bus > pcie_maxbus || slot >= 32 || - func > PCI_FUNCMAX || reg >= 0x1000) + if (bus < pcie_minbus || bus > pcie_maxbus || slot > PCI_SLOTMAX || + func > PCI_FUNCMAX || reg > PCIE_REGMAX) return; critical_enter(); From owner-svn-src-all@FreeBSD.ORG Sun Nov 1 18:40:03 2009 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 91D76106568B; Sun, 1 Nov 2009 18:40:03 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7F9828FC0C; Sun, 1 Nov 2009 18:40: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 nA1Ie3Zs031783; Sun, 1 Nov 2009 18:40:03 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1Ie3jC031779; Sun, 1 Nov 2009 18:40:03 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <200911011840.nA1Ie3jC031779@svn.freebsd.org> From: Andriy Gapon Date: Sun, 1 Nov 2009 18:40:03 +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: r198770 - in stable/7/sys: . amd64/pci contrib/pf dev/pci i386/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, 01 Nov 2009 18:40:03 -0000 Author: avg Date: Sun Nov 1 18:40:03 2009 New Revision: 198770 URL: http://svn.freebsd.org/changeset/base/198770 Log: MFC 197450: number of cleanups in i386 and amd64 pci md code Modified: stable/7/sys/ (props changed) stable/7/sys/amd64/pci/pci_cfgreg.c stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/pci/pcireg.h stable/7/sys/i386/pci/pci_cfgreg.c Modified: stable/7/sys/amd64/pci/pci_cfgreg.c ============================================================================== --- stable/7/sys/amd64/pci/pci_cfgreg.c Sun Nov 1 18:39:26 2009 (r198769) +++ stable/7/sys/amd64/pci/pci_cfgreg.c Sun Nov 1 18:40:03 2009 (r198770) @@ -181,9 +181,9 @@ pci_cfgenable(unsigned bus, unsigned slo { int dataport = 0; - if (bus <= PCI_BUSMAX && slot < 32 && func <= PCI_FUNCMAX && - reg <= PCI_REGMAX && bytes != 3 && (unsigned) bytes <= 4 && - (reg & (bytes - 1)) == 0) { + if (bus <= PCI_BUSMAX && slot <= PCI_SLOTMAX && func <= PCI_FUNCMAX && + (unsigned)reg <= PCI_REGMAX && bytes != 3 && + (unsigned)bytes <= 4 && (reg & (bytes - 1)) == 0) { outl(CONF1_ADDR_PORT, (1 << 31) | (bus << 16) | (slot << 11) | (func << 8) | (reg & ~0x03)); dataport = CONF1_DATA_PORT + (reg & 0x03); @@ -281,7 +281,7 @@ pcie_cfgregopen(uint64_t base, uint8_t m * fall back to using type 1 config access instead. */ if (pci_cfgregopen() != 0) { - for (slot = 0; slot < 32; slot++) { + for (slot = 0; slot <= PCI_SLOTMAX; slot++) { val1 = pcireg_cfgread(0, slot, 0, 0, 4); if (val1 == 0xffffffff) continue; @@ -309,8 +309,8 @@ pciereg_cfgread(int bus, unsigned slot, volatile vm_offset_t va; int data = -1; - if (bus < pcie_minbus || bus > pcie_maxbus || slot >= 32 || - func > PCI_FUNCMAX || reg >= 0x1000) + if (bus < pcie_minbus || bus > pcie_maxbus || slot > PCI_SLOTMAX || + func > PCI_FUNCMAX || reg > PCIE_REGMAX) return (-1); va = PCIE_VADDR(pcie_base, reg, bus, slot, func); @@ -336,8 +336,8 @@ pciereg_cfgwrite(int bus, unsigned slot, { volatile vm_offset_t va; - if (bus < pcie_minbus || bus > pcie_maxbus || slot >= 32 || - func > PCI_FUNCMAX || reg >= 0x1000) + if (bus < pcie_minbus || bus > pcie_maxbus || slot > PCI_SLOTMAX || + func > PCI_FUNCMAX || reg > PCIE_REGMAX) return; va = PCIE_VADDR(pcie_base, reg, bus, slot, func); Modified: stable/7/sys/dev/pci/pcireg.h ============================================================================== --- stable/7/sys/dev/pci/pcireg.h Sun Nov 1 18:39:26 2009 (r198769) +++ stable/7/sys/dev/pci/pcireg.h Sun Nov 1 18:40:03 2009 (r198770) @@ -44,6 +44,7 @@ #define PCI_SLOTMAX 31 /* highest supported slot number */ #define PCI_FUNCMAX 7 /* highest supported function number */ #define PCI_REGMAX 255 /* highest supported config register addr. */ +#define PCIE_REGMAX 4095 /* highest supported config register addr. */ #define PCI_MAXHDRTYPE 2 /* PCI config header registers for all devices */ Modified: stable/7/sys/i386/pci/pci_cfgreg.c ============================================================================== --- stable/7/sys/i386/pci/pci_cfgreg.c Sun Nov 1 18:39:26 2009 (r198769) +++ stable/7/sys/i386/pci/pci_cfgreg.c Sun Nov 1 18:40:03 2009 (r198770) @@ -291,9 +291,9 @@ pci_cfgenable(unsigned bus, unsigned slo if (bus <= PCI_BUSMAX && slot < devmax && func <= PCI_FUNCMAX - && reg <= PCI_REGMAX + && (unsigned)reg <= PCI_REGMAX && bytes != 3 - && (unsigned) bytes <= 4 + && (unsigned)bytes <= 4 && (reg & (bytes - 1)) == 0) { switch (cfgmech) { case CFGMECH_PCIE: @@ -586,7 +586,7 @@ pcie_cfgregopen(uint64_t base, uint8_t m * fall back to using type 1 config access instead. */ if (pci_cfgregopen() != 0) { - for (slot = 0; slot < 32; slot++) { + for (slot = 0; slot <= PCI_SLOTMAX; slot++) { val1 = pcireg_cfgread(0, slot, 0, 0, 4); if (val1 == 0xffffffff) continue; @@ -651,8 +651,8 @@ pciereg_cfgread(int bus, unsigned slot, vm_paddr_t pa, papage; int data = -1; - if (bus < pcie_minbus || bus > pcie_maxbus || slot >= 32 || - func > PCI_FUNCMAX || reg >= 0x1000 || bytes > 4 || bytes == 3) + if (bus < pcie_minbus || bus > pcie_maxbus || slot > PCI_SLOTMAX || + func > PCI_FUNCMAX || reg > PCIE_REGMAX) return (-1); critical_enter(); @@ -685,8 +685,8 @@ pciereg_cfgwrite(int bus, unsigned slot, volatile vm_offset_t va; vm_paddr_t pa, papage; - if (bus < pcie_minbus || bus > pcie_maxbus || slot >= 32 || - func > PCI_FUNCMAX || reg >= 0x1000) + if (bus < pcie_minbus || bus > pcie_maxbus || slot > PCI_SLOTMAX || + func > PCI_FUNCMAX || reg > PCIE_REGMAX) return; critical_enter(); From owner-svn-src-all@FreeBSD.ORG Sun Nov 1 18:43:37 2009 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 335131065676; Sun, 1 Nov 2009 18:43:37 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (skuns.zoral.com.ua [91.193.166.194]) by mx1.freebsd.org (Postfix) with ESMTP id 7D4858FC18; Sun, 1 Nov 2009 18:43:36 +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 nA1IhNhf004455 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 1 Nov 2009 20:43:23 +0200 (EET) (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.3/8.14.3) with ESMTP id nA1IhNa6004433; Sun, 1 Nov 2009 20:43:23 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id nA1IhM6g004432; Sun, 1 Nov 2009 20:43:22 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 1 Nov 2009 20:43:22 +0200 From: Kostik Belousov To: Christian Brueffer Message-ID: <20091101184322.GP2147@deviant.kiev.zoral.com.ua> References: <200911011825.nA1IPBQ2031333@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="rJ8inJ6ig7iY3YX9" Content-Disposition: inline In-Reply-To: <200911011825.nA1IPBQ2031333@svn.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=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham 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: r198768 - head/sbin/mknod 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, 01 Nov 2009 18:43:37 -0000 --rJ8inJ6ig7iY3YX9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Nov 01, 2009 at 06:25:11PM +0000, Christian Brueffer wrote: > Author: brueffer > Date: Sun Nov 1 18:25:11 2009 > New Revision: 198768 > URL: http://svn.freebsd.org/changeset/base/198768 >=20 > Log: > Refine r198714, it's not as easy as just leaving the major number zero. > =20 > Submitted by: ed > MFC after: 1 week >=20 > Modified: > head/sbin/mknod/mknod.8 >=20 > Modified: head/sbin/mknod/mknod.8 > =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/sbin/mknod/mknod.8 Sun Nov 1 18:19:00 2009 (r198767) > +++ head/sbin/mknod/mknod.8 Sun Nov 1 18:25:11 2009 (r198768) > @@ -74,7 +74,6 @@ and pseudo devices, and are type > .It Ar major > The major device number is an integer number which tells the kernel > which device driver entry point to use. > -This is a compatibility shim and should be left zero. > .It Ar minor > The minor device number tells the kernel which subunit > the node corresponds to on the device; for example, It seems that description of majors/minors there is absolutely irrelevant to the freebsd device nodes. Devfs simply does not work this way anymore for long time. Moreover, you cannot create special node that would become a node used to access device driver in the freebsd. The only use that is left for mknod c|b is to create special nodes on the filesystems exported by NFS for other un*xes. --rJ8inJ6ig7iY3YX9 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkrt1soACgkQC3+MBN1Mb4gYdgCfVRG9fAgxWvdhXDPTpd9xRiCA 2zUAn0VejdTxf0D8KBwijJXL3VXhVJSa =6dAU -----END PGP SIGNATURE----- --rJ8inJ6ig7iY3YX9-- From owner-svn-src-all@FreeBSD.ORG Sun Nov 1 18:48:06 2009 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 EA1131065676; Sun, 1 Nov 2009 18:48:06 +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 D88EC8FC17; Sun, 1 Nov 2009 18:48: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 nA1Im6Fi032015; Sun, 1 Nov 2009 18:48:06 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1Im6D5032013; Sun, 1 Nov 2009 18:48:06 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200911011848.nA1Im6D5032013@svn.freebsd.org> From: Alan Cox Date: Sun, 1 Nov 2009 18:48: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: r198771 - in stable/8/gnu/usr.bin/groff: . tmac 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, 01 Nov 2009 18:48:07 -0000 Author: alc Date: Sun Nov 1 18:48:06 2009 New Revision: 198771 URL: http://svn.freebsd.org/changeset/base/198771 Log: MFC r197393 Add FreeBSD 7.2 and 7.3. Modified: stable/8/gnu/usr.bin/groff/ (props changed) stable/8/gnu/usr.bin/groff/tmac/mdoc.local Modified: stable/8/gnu/usr.bin/groff/tmac/mdoc.local ============================================================================== --- stable/8/gnu/usr.bin/groff/tmac/mdoc.local Sun Nov 1 18:40:03 2009 (r198770) +++ stable/8/gnu/usr.bin/groff/tmac/mdoc.local Sun Nov 1 18:48:06 2009 (r198771) @@ -72,6 +72,8 @@ .ds doc-operating-system-FreeBSD-6.3 6.3 .ds doc-operating-system-FreeBSD-6.4 6.4 .ds doc-operating-system-FreeBSD-7.1 7.1 +.ds doc-operating-system-FreeBSD-7.2 7.2 +.ds doc-operating-system-FreeBSD-7.3 7.3 .ds doc-operating-system-FreeBSD-8.0 8.0 . .\" Definitions not (yet) in doc-syms From owner-svn-src-all@FreeBSD.ORG Sun Nov 1 19:22:08 2009 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 96B1910656A7; Sun, 1 Nov 2009 19:22:08 +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 822988FC1A; Sun, 1 Nov 2009 19:22: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 nA1JM87B032952; Sun, 1 Nov 2009 19:22:08 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1JM8OY032946; Sun, 1 Nov 2009 19:22:08 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200911011922.nA1JM8OY032946@svn.freebsd.org> From: Alan Cox Date: Sun, 1 Nov 2009 19:22:08 +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: r198772 - in stable/8: lib/libc/gen sys sys/amd64/include/xen sys/cddl/contrib/opensolaris sys/contrib/dev/acpica sys/contrib/pf sys/dev/xen/xenpci 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, 01 Nov 2009 19:22:08 -0000 Author: alc Date: Sun Nov 1 19:22:07 2009 New Revision: 198772 URL: http://svn.freebsd.org/changeset/base/198772 Log: MFC r197331, r197394 Add getpagesizes(3). Added: stable/8/lib/libc/gen/getpagesizes.3 - copied, changed from r197331, head/lib/libc/gen/getpagesizes.3 stable/8/lib/libc/gen/getpagesizes.c - copied unchanged from r197331, head/lib/libc/gen/getpagesizes.c Modified: stable/8/lib/libc/gen/ (props changed) stable/8/lib/libc/gen/Makefile.inc stable/8/lib/libc/gen/Symbol.map 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) stable/8/sys/sys/mman.h Modified: stable/8/lib/libc/gen/Makefile.inc ============================================================================== --- stable/8/lib/libc/gen/Makefile.inc Sun Nov 1 18:48:06 2009 (r198771) +++ stable/8/lib/libc/gen/Makefile.inc Sun Nov 1 19:22:07 2009 (r198772) @@ -15,7 +15,7 @@ SRCS+= __getosreldate.c __xuname.c \ getbootfile.c getbsize.c \ getcap.c getcwd.c getdomainname.c getgrent.c getgrouplist.c \ gethostname.c getloadavg.c getlogin.c getmntinfo.c getnetgrent.c \ - getosreldate.c getpagesize.c \ + getosreldate.c getpagesize.c getpagesizes.c \ getpeereid.c getprogname.c getpwent.c getttyent.c \ getusershell.c getvfsbyname.c glob.c \ initgroups.c isatty.c isinf.c isnan.c jrand48.c lcong48.c \ @@ -51,8 +51,8 @@ MAN+= alarm.3 arc4random.3 \ getbootfile.3 getbsize.3 getcap.3 getcontext.3 getcwd.3 \ getdiskbyname.3 getdomainname.3 getfsent.3 \ getgrent.3 getgrouplist.3 gethostname.3 getloadavg.3 \ - getmntinfo.3 getnetgrent.3 getosreldate.3 \ - getpagesize.3 getpass.3 getpeereid.3 getprogname.3 getpwent.3 \ + getmntinfo.3 getnetgrent.3 getosreldate.3 getpagesize.3 \ + getpagesizes.3 getpass.3 getpeereid.3 getprogname.3 getpwent.3 \ getttyent.3 getusershell.3 getvfsbyname.3 \ glob.3 initgroups.3 isgreater.3 ldexp.3 lockf.3 makecontext.3 \ modf.3 \ Modified: stable/8/lib/libc/gen/Symbol.map ============================================================================== --- stable/8/lib/libc/gen/Symbol.map Sun Nov 1 18:48:06 2009 (r198771) +++ stable/8/lib/libc/gen/Symbol.map Sun Nov 1 19:22:07 2009 (r198772) @@ -366,6 +366,10 @@ FBSD_1.1 { tcsetsid; }; +FBSD_1.2 { + getpagesizes; +}; + FBSDprivate_1.0 { /* needed by thread libraries */ __thr_jtable; Copied and modified: stable/8/lib/libc/gen/getpagesizes.3 (from r197331, head/lib/libc/gen/getpagesizes.3) ============================================================================== --- head/lib/libc/gen/getpagesizes.3 Sat Sep 19 18:01:32 2009 (r197331, copy source) +++ stable/8/lib/libc/gen/getpagesizes.3 Sun Nov 1 19:22:07 2009 (r198772) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 19, 2009 +.Dd September 21, 2009 .Dt GETPAGESIZES 3 .Os .Sh NAME @@ -94,5 +94,6 @@ function first appeared in Solaris 9. This manual page was written in conjunction with a new but compatible implementation that was first released in .Fx 7.3 . -.Sh AUTHOR -.An Alan L. Cox Aq alc@cs.rice.edu +.Sh AUTHORS +This manual page was written by +.An Alan L. Cox Aq alc@cs.rice.edu . Copied: stable/8/lib/libc/gen/getpagesizes.c (from r197331, head/lib/libc/gen/getpagesizes.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/lib/libc/gen/getpagesizes.c Sun Nov 1 19:22:07 2009 (r198772, copy of r197331, head/lib/libc/gen/getpagesizes.c) @@ -0,0 +1,78 @@ +/*- + * Copyright (c) 2009 Alan L. Cox + * 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$"); + +#include +#include +#include + +#include + +/* + * Retrieves page size information from the system. Specifically, returns the + * number of distinct page sizes that are supported by the system, if + * "pagesize" is NULL and "nelem" is 0. Otherwise, assigns up to "nelem" of + * the system-supported page sizes to consecutive elements of the array + * referenced by "pagesize", and returns the number of such page sizes that it + * assigned to the array. These page sizes are expressed in bytes. + * + * The implementation of this function does not directly or indirectly call + * malloc(3) or any other dynamic memory allocator that may itself call this + * function. + */ +int +getpagesizes(size_t pagesize[], int nelem) +{ + static u_long ps[MAXPAGESIZES]; + static int nops; + size_t size; + int i; + + if (nelem < 0 || (nelem > 0 && pagesize == NULL)) { + errno = EINVAL; + return (-1); + } + /* Cache the result of the sysctl(2). */ + if (nops == 0) { + size = sizeof(ps); + if (sysctlbyname("hw.pagesizes", ps, &size, NULL, 0) == -1) + return (-1); + /* Count the number of page sizes that are supported. */ + nops = size / sizeof(ps[0]); + while (nops > 0 && ps[nops - 1] == 0) + nops--; + } + if (pagesize == NULL) + return (nops); + /* Return up to "nelem" page sizes from the cached result. */ + if (nelem > nops) + nelem = nops; + for (i = 0; i < nelem; i++) + pagesize[i] = ps[i]; + return (nelem); +} Modified: stable/8/sys/sys/mman.h ============================================================================== --- stable/8/sys/sys/mman.h Sun Nov 1 18:48:06 2009 (r198771) +++ stable/8/sys/sys/mman.h Sun Nov 1 19:22:07 2009 (r198772) @@ -208,6 +208,7 @@ __BEGIN_DECLS * posix_typed_mem_open(). */ #if __BSD_VISIBLE +int getpagesizes(size_t *, int); int madvise(void *, size_t, int); int mincore(const void *, size_t, char *); int minherit(void *, size_t, int); From owner-svn-src-all@FreeBSD.ORG Sun Nov 1 20:14:28 2009 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 EF1EC106566B; Sun, 1 Nov 2009 20:14:28 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from monday.kientzle.com (kientzle.com [66.166.149.50]) by mx1.freebsd.org (Postfix) with ESMTP id BE8258FC12; Sun, 1 Nov 2009 20:14:28 +0000 (UTC) Received: (from root@localhost) by monday.kientzle.com (8.14.3/8.14.3) id nA1KESC4079780; Sun, 1 Nov 2009 20:14:28 GMT (envelope-from kientzle@freebsd.org) Received: from dark.x.kientzle.com (fw2.kientzle.com [10.123.1.2]) by kientzle.com with SMTP id ad5xuba7yk3cyq4r4amswifb9a; Sun, 01 Nov 2009 20:14:28 +0000 (UTC) (envelope-from kientzle@freebsd.org) Message-ID: <4AEDEC24.2000206@freebsd.org> Date: Sun, 01 Nov 2009 12:14:28 -0800 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.1.21) Gecko/20090601 SeaMonkey/1.1.16 MIME-Version: 1.0 To: Kostik Belousov References: <200911011825.nA1IPBQ2031333@svn.freebsd.org> <20091101184322.GP2147@deviant.kiev.zoral.com.ua> In-Reply-To: <20091101184322.GP2147@deviant.kiev.zoral.com.ua> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Christian Brueffer Subject: Re: svn commit: r198768 - head/sbin/mknod 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, 01 Nov 2009 20:14:29 -0000 Kostik Belousov wrote: > On Sun, Nov 01, 2009 at 06:25:11PM +0000, Christian Brueffer wrote: >> Author: brueffer >> Date: Sun Nov 1 18:25:11 2009 >> New Revision: 198768 >> URL: http://svn.freebsd.org/changeset/base/198768 >> >> Log: >> Refine r198714, it's not as easy as just leaving the major number zero. >> >> Submitted by: ed >> MFC after: 1 week >> > > Moreover, you cannot create special node that would become a node used to > access device driver in the freebsd. > > The only use that is left for mknod c|b is to create special nodes on > the filesystems exported by NFS for other un*xes. I wonder if mknod c|b should print a warning? Tim From owner-svn-src-all@FreeBSD.ORG Sun Nov 1 20:22:43 2009 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 BE37A1065676; Sun, 1 Nov 2009 20:22:43 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 5CCC78FC12; Sun, 1 Nov 2009 20:22:43 +0000 (UTC) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 9A6951CD0A; Sun, 1 Nov 2009 21:22:42 +0100 (CET) Date: Sun, 1 Nov 2009 21:22:42 +0100 From: Ed Schouten To: Kostik Belousov Message-ID: <20091101202242.GK1293@hoeg.nl> References: <200911011825.nA1IPBQ2031333@svn.freebsd.org> <20091101184322.GP2147@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="I2AcQh+/kfs26T/w" Content-Disposition: inline In-Reply-To: <20091101184322.GP2147@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Christian Brueffer Subject: Re: svn commit: r198768 - head/sbin/mknod 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, 01 Nov 2009 20:22:43 -0000 --I2AcQh+/kfs26T/w Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Kostik Belousov wrote: > It seems that description of majors/minors there is absolutely irrelevant > to the freebsd device nodes. Devfs simply does not work this way anymore > for long time. Which is why I proposed changing these sentences to the past tense, i.e.: The major device number is an integer number which tells the kernel which device driver entry point to use. should become: The major device number is an integer number which used to tell the kernel which device driver entry point to use. and: The minor device number tells the kernel which subunit the node corresponds to on the device; for example, should become: The minor device number used to tell the kernel which subunit the node corresponds to on the device; for example, Because there are also various discrepancies between how FreeBSD and not-FreeBSD divide dev_t's into major and minor numbers, I would almost suggest merging mknod(8)'s major and minor argument into one, namely a (hexa)decimal 32-bit value. --=20 Ed Schouten WWW: http://80386.nl/ --I2AcQh+/kfs26T/w Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkrt7hIACgkQ52SDGA2eCwVbyACeMx9ujeGDnHiO/XYo06QTZNqA meUAn195PEQuYcNbrmmTv/qa64AjE1a3 =/4bR -----END PGP SIGNATURE----- --I2AcQh+/kfs26T/w-- From owner-svn-src-all@FreeBSD.ORG Sun Nov 1 20:24:17 2009 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 8512F1065676; Sun, 1 Nov 2009 20:24:17 +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 72E4F8FC23; Sun, 1 Nov 2009 20:24: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 nA1KOHtd034444; Sun, 1 Nov 2009 20:24:17 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1KOHvi034442; Sun, 1 Nov 2009 20:24:17 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200911012024.nA1KOHvi034442@svn.freebsd.org> From: Alan Cox Date: Sun, 1 Nov 2009 20:24:17 +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: r198773 - in stable/8/lib/libc: . gen stdio stdtime string 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, 01 Nov 2009 20:24:17 -0000 Author: alc Date: Sun Nov 1 20:24:17 2009 New Revision: 198773 URL: http://svn.freebsd.org/changeset/base/198773 Log: MFC r197163 Add the FBSD_1.2 namespace. Reminded by: kib Modified: stable/8/lib/libc/ (props changed) stable/8/lib/libc/Versions.def stable/8/lib/libc/gen/ (props changed) stable/8/lib/libc/stdio/asprintf.c (props changed) stable/8/lib/libc/stdtime/ (props changed) stable/8/lib/libc/string/ffsll.c (props changed) stable/8/lib/libc/string/flsll.c (props changed) stable/8/lib/libc/string/wcpcpy.c (props changed) stable/8/lib/libc/string/wcpncpy.c (props changed) Modified: stable/8/lib/libc/Versions.def ============================================================================== --- stable/8/lib/libc/Versions.def Sun Nov 1 19:22:07 2009 (r198772) +++ stable/8/lib/libc/Versions.def Sun Nov 1 20:24:17 2009 (r198773) @@ -1,5 +1,11 @@ # $FreeBSD$ +# +# Note: Whenever bumping the FBSD version, always make +# FBSDprivate_1.0 depend on the new FBSD version. +# This will keep it at the end of the dependency chain. +# + # This is our first version; it depends on no other. # This version was first added to 7.0-current. FBSD_1.0 { @@ -9,6 +15,10 @@ FBSD_1.0 { FBSD_1.1 { } FBSD_1.0; +# This version was first added to 9.0-current. +FBSD_1.2 { +} FBSD_1.1; + # This is our private namespace. Any global interfaces that are # strictly for use only by other FreeBSD applications and libraries # are listed here. We use a separate namespace so we can write @@ -16,4 +26,4 @@ FBSD_1.1 { # # Please do NOT increment the version of this namespace. FBSDprivate_1.0 { -} FBSD_1.1; +} FBSD_1.2; From owner-svn-src-all@FreeBSD.ORG Sun Nov 1 21:03:51 2009 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 18F351065670; Sun, 1 Nov 2009 21:03:51 +0000 (UTC) (envelope-from andy@fud.org.nz) Received: from mail-vw0-f173.google.com (mail-vw0-f173.google.com [209.85.212.173]) by mx1.freebsd.org (Postfix) with ESMTP id 7386E8FC15; Sun, 1 Nov 2009 21:03:50 +0000 (UTC) Received: by vws3 with SMTP id 3so1070878vws.3 for ; Sun, 01 Nov 2009 13:03:49 -0800 (PST) MIME-Version: 1.0 Sender: andy@fud.org.nz Received: by 10.220.121.155 with SMTP id h27mr4140381vcr.80.1257109429307; Sun, 01 Nov 2009 13:03:49 -0800 (PST) In-Reply-To: <200911011131.nA1BV6lO022276@svn.freebsd.org> References: <200911011131.nA1BV6lO022276@svn.freebsd.org> Date: Mon, 2 Nov 2009 10:03:49 +1300 X-Google-Sender-Auth: a4aed67d5d0713c3 Message-ID: <1280352d0911011303g1c07ec48o7782fc8974e65fa7@mail.gmail.com> From: Andrew Thompson To: Alexander Motin 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: r198748 - in head/sys/cam: . ata scsi 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, 01 Nov 2009 21:03:51 -0000 2009/11/2 Alexander Motin : > Author: mav > Date: Sun Nov =A01 11:31:06 2009 > New Revision: 198748 > URL: http://svn.freebsd.org/changeset/base/198748 > > Log: > =A0MFp4: > =A0Fix reference counting bug, when device unreferenced before then > =A0invalidated. To do it, do not handle validity flag as another > =A0reference, but explicitly modify reference count each time flag is > =A0modified. > > =A0Discovered by: =A0 =A0 =A0 =A0thompsa Thanks! From owner-svn-src-all@FreeBSD.ORG Sun Nov 1 21:41:44 2009 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 7D3E5106566C; Sun, 1 Nov 2009 21:41: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 6C0918FC14; Sun, 1 Nov 2009 21:41: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 nA1Lfi91036064; Sun, 1 Nov 2009 21:41:44 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1Lfi8r036062; Sun, 1 Nov 2009 21:41:44 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200911012141.nA1Lfi8r036062@svn.freebsd.org> From: Andrew Thompson Date: Sun, 1 Nov 2009 21:41: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: r198774 - 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: Sun, 01 Nov 2009 21:41:44 -0000 Author: thompsa Date: Sun Nov 1 21:41:44 2009 New Revision: 198774 URL: http://svn.freebsd.org/changeset/base/198774 Log: Check unit number and provide string name for consdev. Submitted by: HPS Modified: head/sys/dev/usb/serial/usb_serial.c Modified: head/sys/dev/usb/serial/usb_serial.c ============================================================================== --- head/sys/dev/usb/serial/usb_serial.c Sun Nov 1 20:24:17 2009 (r198773) +++ head/sys/dev/usb/serial/usb_serial.c Sun Nov 1 21:41:44 2009 (r198774) @@ -1300,7 +1300,12 @@ CONSOLE_DRIVER(ucom); static void ucom_cnprobe(struct consdev *cp) { - cp->cn_pri = CN_NORMAL; + if (ucom_cons_unit != -1) + cp->cn_pri = CN_NORMAL; + else + cp->cn_pri = CN_DEAD; + + strlcpy(cp->cn_name, "ucom", sizeof(cp->cn_name)); } static void From owner-svn-src-all@FreeBSD.ORG Sun Nov 1 21:44:38 2009 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 D5EE61065670; Sun, 1 Nov 2009 21:44:38 +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 C4A928FC13; Sun, 1 Nov 2009 21:44: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 nA1LibJR036181; Sun, 1 Nov 2009 21:44:37 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1LiboX036178; Sun, 1 Nov 2009 21:44:37 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200911012144.nA1LiboX036178@svn.freebsd.org> From: Andrew Thompson Date: Sun, 1 Nov 2009 21:44: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: r198775 - 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: Sun, 01 Nov 2009 21:44:38 -0000 Author: thompsa Date: Sun Nov 1 21:44:37 2009 New Revision: 198775 URL: http://svn.freebsd.org/changeset/base/198775 Log: Fix a corner case where usbd_transfer_drain() can return too early if the callback has dropped the mutex, leading to a panic. Submitted by: HPS MFC after: 3 days Modified: head/sys/dev/usb/usb_core.h head/sys/dev/usb/usb_transfer.c Modified: head/sys/dev/usb/usb_core.h ============================================================================== --- head/sys/dev/usb/usb_core.h Sun Nov 1 21:41:44 2009 (r198774) +++ head/sys/dev/usb/usb_core.h Sun Nov 1 21:44:37 2009 (r198775) @@ -112,6 +112,7 @@ struct usb_xfer_flags_int { uint8_t curr_dma_set:1; /* used by USB HC/DC driver */ uint8_t can_cancel_immed:1; /* set if USB transfer can be * cancelled immediately */ + uint8_t doing_callback:1; /* set if executing the callback */ }; /* Modified: head/sys/dev/usb/usb_transfer.c ============================================================================== --- head/sys/dev/usb/usb_transfer.c Sun Nov 1 21:41:44 2009 (r198774) +++ head/sys/dev/usb/usb_transfer.c Sun Nov 1 21:44:37 2009 (r198775) @@ -1797,8 +1797,18 @@ usbd_transfer_drain(struct usb_xfer *xfe usbd_transfer_stop(xfer); - while (usbd_transfer_pending(xfer)) { + while (usbd_transfer_pending(xfer) || + xfer->flags_int.doing_callback) { + + /* + * It is allowed that the callback can drop its + * transfer mutex. In that case checking only + * "usbd_transfer_pending()" is not enough to tell if + * the USB transfer is fully drained. We also need to + * check the internal "doing_callback" flag. + */ xfer->flags_int.draining = 1; + /* * Wait until the current outstanding USB * transfer is complete ! @@ -2043,6 +2053,9 @@ usbd_callback_wrapper(struct usb_xfer_qu /* get next USB transfer in the queue */ info->done_q.curr = NULL; + /* set flag in case of drain */ + xfer->flags_int.doing_callback = 1; + USB_BUS_UNLOCK(info->bus); USB_BUS_LOCK_ASSERT(info->bus, MA_NOTOWNED); @@ -2095,12 +2108,17 @@ usbd_callback_wrapper(struct usb_xfer_qu if ((!xfer->flags_int.open) && (xfer->flags_int.started) && (xfer->usb_state == USB_ST_ERROR)) { + /* clear flag in case of drain */ + xfer->flags_int.doing_callback = 0; /* try to loop, but not recursivly */ usb_command_wrapper(&info->done_q, xfer); return; } done: + /* clear flag in case of drain */ + xfer->flags_int.doing_callback = 0; + /* * Check if we are draining. */ From owner-svn-src-all@FreeBSD.ORG Sun Nov 1 21:48:18 2009 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 E1D8B1065672; Sun, 1 Nov 2009 21:48:18 +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 D08328FC0C; Sun, 1 Nov 2009 21:48: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 nA1LmIjT036295; Sun, 1 Nov 2009 21:48:18 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1LmI6R036292; Sun, 1 Nov 2009 21:48:18 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200911012148.nA1LmI6R036292@svn.freebsd.org> From: Andrew Thompson Date: Sun, 1 Nov 2009 21:48: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: r198776 - 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: Sun, 01 Nov 2009 21:48:19 -0000 Author: thompsa Date: Sun Nov 1 21:48:18 2009 New Revision: 198776 URL: http://svn.freebsd.org/changeset/base/198776 Log: - Add usb_fill_bulk_urb() and usb_bulk_msg() linux compat functions [1] - Don't write actual length if the actual length pointer is NULL [2] - correct Linux Compatibility error codes for short isochronous IN transfers and make status field signed. Submitted by: Leunam Elebek [1], Manuel Gebele [2] Modified: head/sys/dev/usb/usb_compat_linux.c head/sys/dev/usb/usb_compat_linux.h Modified: head/sys/dev/usb/usb_compat_linux.c ============================================================================== --- head/sys/dev/usb/usb_compat_linux.c Sun Nov 1 21:44:37 2009 (r198775) +++ head/sys/dev/usb/usb_compat_linux.c Sun Nov 1 21:48:18 2009 (r198776) @@ -624,10 +624,11 @@ usb_start_wait_urb(struct urb *urb, usb_ done: if (do_unlock) mtx_unlock(&Giant); - if (err) { - *p_actlen = 0; - } else { - *p_actlen = urb->actual_length; + if (p_actlen != NULL) { + if (err) + *p_actlen = 0; + else + *p_actlen = urb->actual_length; } return (err); } @@ -1362,8 +1363,17 @@ usb_linux_isoc_callback(struct usb_xfer for (x = 0; x < urb->number_of_packets; x++) { uipd = urb->iso_frame_desc + x; + if (uipd->length > xfer->frlengths[x]) { + if (urb->transfer_flags & URB_SHORT_NOT_OK) { + /* XXX should be EREMOTEIO */ + uipd->status = -EPIPE; + } else { + uipd->status = 0; + } + } else { + uipd->status = 0; + } uipd->actual_length = xfer->frlengths[x]; - uipd->status = 0; if (!xfer->flags.ext_buffer) { usbd_copy_out(xfer->frbuffers, offset, USB_ADD_BYTES(urb->transfer_buffer, @@ -1385,8 +1395,8 @@ usb_linux_isoc_callback(struct usb_xfer if (xfer->actlen < xfer->sumlen) { /* short transfer */ if (urb->transfer_flags & URB_SHORT_NOT_OK) { - urb->status = -EPIPE; /* XXX should be - * EREMOTEIO */ + /* XXX should be EREMOTEIO */ + urb->status = -EPIPE; } else { urb->status = 0; } @@ -1482,6 +1492,7 @@ tr_setup: /* Set zero for "actual_length" */ for (x = 0; x < urb->number_of_packets; x++) { urb->iso_frame_desc[x].actual_length = 0; + urb->iso_frame_desc[x].status = urb->status; } /* call callback */ @@ -1663,3 +1674,58 @@ setup_bulk: goto tr_setup; } } + +/*------------------------------------------------------------------------* + * usb_fill_bulk_urb + *------------------------------------------------------------------------*/ +void +usb_fill_bulk_urb(struct urb *urb, struct usb_device *udev, + struct usb_host_endpoint *uhe, void *buf, + int length, usb_complete_t callback, void *arg) +{ + urb->dev = udev; + urb->endpoint = uhe; + urb->transfer_buffer = buf; + urb->transfer_buffer_length = length; + urb->complete = callback; + urb->context = arg; +} + +/*------------------------------------------------------------------------* + * usb_bulk_msg + * + * NOTE: This function can also be used for interrupt endpoints! + * + * Return values: + * 0: Success + * Else: Failure + *------------------------------------------------------------------------*/ +int +usb_bulk_msg(struct usb_device *udev, struct usb_host_endpoint *uhe, + void *data, int len, uint16_t *pactlen, usb_timeout_t timeout) +{ + struct urb *urb; + int err; + + if (uhe == NULL) + return (-EINVAL); + if (len < 0) + return (-EINVAL); + + err = usb_setup_endpoint(udev, uhe, 4096 /* bytes */); + if (err) + return (err); + + urb = usb_alloc_urb(0, 0); + if (urb == NULL) + return (-ENOMEM); + + usb_fill_bulk_urb(urb, udev, uhe, data, len, + usb_linux_wait_complete, NULL); + + err = usb_start_wait_urb(urb, timeout, pactlen); + + usb_free_urb(urb); + + return (err); +} Modified: head/sys/dev/usb/usb_compat_linux.h ============================================================================== --- head/sys/dev/usb/usb_compat_linux.h Sun Nov 1 21:44:37 2009 (r198775) +++ head/sys/dev/usb/usb_compat_linux.h Sun Nov 1 21:48:18 2009 (r198776) @@ -217,7 +217,7 @@ struct usb_iso_packet_descriptor { * packets are usually back to back) */ uint16_t length; /* expected length */ uint16_t actual_length; - uint16_t status; + int16_t status; /* transfer status */ }; /* @@ -299,6 +299,11 @@ void usb_set_intfdata(struct usb_interfa void usb_linux_register(void *arg); void usb_linux_deregister(void *arg); +void usb_fill_bulk_urb(struct urb *, struct usb_device *, + struct usb_host_endpoint *, void *, int, usb_complete_t, void *); +int usb_bulk_msg(struct usb_device *, struct usb_host_endpoint *, + void *, int, uint16_t *, usb_timeout_t); + #define interface_to_usbdev(intf) (intf)->linux_udev #define interface_to_bsddev(intf) (intf)->linux_udev From owner-svn-src-all@FreeBSD.ORG Sun Nov 1 21:55:20 2009 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 F111C1065670; Sun, 1 Nov 2009 21:55:20 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id AC4C88FC18; Sun, 1 Nov 2009 21:55:20 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id B03D46D41B; Sun, 1 Nov 2009 21:55:19 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 923538450A; Sun, 1 Nov 2009 22:55:19 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Ed Schouten References: <200911011825.nA1IPBQ2031333@svn.freebsd.org> <20091101184322.GP2147@deviant.kiev.zoral.com.ua> <20091101202242.GK1293@hoeg.nl> Date: Sun, 01 Nov 2009 22:55:19 +0100 In-Reply-To: <20091101202242.GK1293@hoeg.nl> (Ed Schouten's message of "Sun, 1 Nov 2009 21:22:42 +0100") Message-ID: <86y6mpj4fs.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Kostik Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Christian Brueffer Subject: Re: svn commit: r198768 - head/sbin/mknod 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, 01 Nov 2009 21:55:21 -0000 Ed Schouten writes: > Which is why I proposed changing these sentences to the past tense, > i.e.: > > The major device number is an integer number which tells the > kernel which device driver entry point to use. > > should become: > > The major device number is an integer number which used to tell > the kernel which device driver entry point to use. > > and: > > The minor device number tells the kernel which subunit the node > corresponds to on the device; for example, > > should become: > > The minor device number used to tell the kernel which subunit > the node corresponds to on the device; for example, How about replacing both paragraphs with major, minor Historically, a device number consisted of two parts: the major number, which identified a device driver, and the minor number, which identified an individual device handled by that driver. FreeBSD no longer makes that distinction; each device has a unique system-wide minor number, and the major number is always zero. However, the distinction is still important when creating device nodes on a file system intended for use by an older system. (modulo errors in grammar and style) The paragraph about b | c should be altered in a similar manner, to emphasize that FreeBSD does not have block devices, but that block device nodes can still be created for use by older systems. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Sun Nov 1 22:05:36 2009 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 287181065679; Sun, 1 Nov 2009 22:05:36 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id BB2068FC16; Sun, 1 Nov 2009 22:05:35 +0000 (UTC) Received: by palm.hoeg.nl (Postfix, from userid 1000) id A2D581CF71; Sun, 1 Nov 2009 23:05:33 +0100 (CET) Date: Sun, 1 Nov 2009 23:05:33 +0100 From: Ed Schouten To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Message-ID: <20091101220533.GL1293@hoeg.nl> References: <200911011825.nA1IPBQ2031333@svn.freebsd.org> <20091101184322.GP2147@deviant.kiev.zoral.com.ua> <20091101202242.GK1293@hoeg.nl> <86y6mpj4fs.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="bNOIqPvWVsuhXMpy" Content-Disposition: inline In-Reply-To: <86y6mpj4fs.fsf@ds4.des.no> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Kostik Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Christian Brueffer Subject: Re: svn commit: r198768 - head/sbin/mknod 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, 01 Nov 2009 22:05:36 -0000 --bNOIqPvWVsuhXMpy Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Dag-Erling, * Dag-Erling Sm=F8rgrav wrote: > identified an individual device handled by that driver. FreeBSD no > longer makes that distinction; each device has a unique system-wide > minor number, and the major number is always zero. However, the ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ As pointed out earlier, this is not true. Major numbers can be non-zero. | #define major(x) ((int)(((u_int)(x) >> 8)&0xff)) Devices 256-511 will have a major number of 1, etc. Apart from that, I think there is also a fair amount of overlap with the COMPATIBILITY section of the same manpage. --=20 Ed Schouten WWW: http://80386.nl/ --bNOIqPvWVsuhXMpy Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkruBi0ACgkQ52SDGA2eCwUrbACfaPx9ysKO80S7AdnDtbx4K6TW cvAAniyYKDAJ23nYFSTvBB/nixkwA3Hu =g2Xe -----END PGP SIGNATURE----- --bNOIqPvWVsuhXMpy-- From owner-svn-src-all@FreeBSD.ORG Sun Nov 1 22:37:39 2009 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 C364E106568D; Sun, 1 Nov 2009 22:37:39 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 7E9648FC18; Sun, 1 Nov 2009 22:37:39 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 6AB126D41B; Sun, 1 Nov 2009 22:37:38 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 328AA84503; Sun, 1 Nov 2009 23:37:38 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Ed Schouten References: <200911011825.nA1IPBQ2031333@svn.freebsd.org> <20091101184322.GP2147@deviant.kiev.zoral.com.ua> <20091101202242.GK1293@hoeg.nl> <86y6mpj4fs.fsf@ds4.des.no> <20091101220533.GL1293@hoeg.nl> Date: Sun, 01 Nov 2009 23:37:38 +0100 In-Reply-To: <20091101220533.GL1293@hoeg.nl> (Ed Schouten's message of "Sun, 1 Nov 2009 23:05:33 +0100") Message-ID: <86tyxdj2h9.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Kostik Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Christian Brueffer Subject: Re: svn commit: r198768 - head/sbin/mknod 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, 01 Nov 2009 22:37:39 -0000 Ed Schouten writes: > > Dag-Erling Sm=C3=B8rgrav writes: > > identified an individual device handled by that driver. FreeBSD no > > longer makes that distinction; each device has a unique system-wide > > minor number, and the major number is always zero. However, the > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > As pointed out earlier, this is not true. Major numbers can be non-zero. > > | #define major(x) ((int)(((u_int)(x) >> 8)&0xff)) > > Devices 256-511 will have a major number of 1, etc. So: Each device has a unique system-wide device number; the minor number contains the eight least-significant bits, and the major number contains the rest. (device numbers are currently unsigned int; is there a reason not to make them explicitly 32 bits wide, i.e. uint32_t?) > Apart from that, I think there is also a fair amount of overlap with the > COMPATIBILITY section of the same manpage. Yeah, but who reads those? :) DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Sun Nov 1 22:39:49 2009 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 ACB3C1065670; Sun, 1 Nov 2009 22:39:49 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 6D6288FC0A; Sun, 1 Nov 2009 22:39:49 +0000 (UTC) Received: by palm.hoeg.nl (Postfix, from userid 1000) id C338F1CD0A; Sun, 1 Nov 2009 23:39:48 +0100 (CET) Date: Sun, 1 Nov 2009 23:39:48 +0100 From: Ed Schouten To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Message-ID: <20091101223948.GN1293@hoeg.nl> References: <200911011825.nA1IPBQ2031333@svn.freebsd.org> <20091101184322.GP2147@deviant.kiev.zoral.com.ua> <20091101202242.GK1293@hoeg.nl> <86y6mpj4fs.fsf@ds4.des.no> <20091101220533.GL1293@hoeg.nl> <86tyxdj2h9.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="y8hmAOsilT9lKboI" Content-Disposition: inline In-Reply-To: <86tyxdj2h9.fsf@ds4.des.no> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Kostik Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Christian Brueffer Subject: Re: svn commit: r198768 - head/sbin/mknod 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, 01 Nov 2009 22:39:49 -0000 --y8hmAOsilT9lKboI Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Dag-Erling Sm=F8rgrav wrote: > (device numbers are currently unsigned int; is there a reason not to > make them explicitly 32 bits wide, i.e. uint32_t?) I think it should explicitly use dev_t or something, right? --=20 Ed Schouten WWW: http://80386.nl/ --y8hmAOsilT9lKboI Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkruDjQACgkQ52SDGA2eCwV6IgCeL0c3lPSZ1PQ+ShZJWMxgaZ1j /0oAoIEM2tq5H2VcN+S4YGfXOiJp6TIb =J713 -----END PGP SIGNATURE----- --y8hmAOsilT9lKboI-- From owner-svn-src-all@FreeBSD.ORG Sun Nov 1 23:59:18 2009 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 B58B4106566C; Sun, 1 Nov 2009 23:59:18 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 703BD8FC08; Sun, 1 Nov 2009 23:59:18 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 4E7FD6D41C; Sun, 1 Nov 2009 23:59:17 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 312BB844D2; Mon, 2 Nov 2009 00:59:17 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Ed Schouten References: <200911011825.nA1IPBQ2031333@svn.freebsd.org> <20091101184322.GP2147@deviant.kiev.zoral.com.ua> <20091101202242.GK1293@hoeg.nl> <86y6mpj4fs.fsf@ds4.des.no> <20091101220533.GL1293@hoeg.nl> <86tyxdj2h9.fsf@ds4.des.no> <20091101223948.GN1293@hoeg.nl> Date: Mon, 02 Nov 2009 00:59:16 +0100 In-Reply-To: <20091101223948.GN1293@hoeg.nl> (Ed Schouten's message of "Sun, 1 Nov 2009 23:39:48 +0100") Message-ID: <86pr81iyp7.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Kostik Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Christian Brueffer Subject: Re: svn commit: r198768 - head/sbin/mknod 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, 01 Nov 2009 23:59:18 -0000 Ed Schouten writes: > Dag-Erling Sm=C3=B8rgrav writes: > > (device numbers are currently unsigned int; is there a reason not to > > make them explicitly 32 bits wide, i.e. uint32_t?) > I think it should explicitly use dev_t or something, right? Ah, I was looking in the wrong header; it is indeed a uint32_t. So: b | c Type of device. Historically, block devices were provided to allow byte-level access to hardware that required data to be read or written in fixed-sized blocks. FreeBSD no longer has block devices, and all device nodes should be created as character devices. However, the distinction between block and character devices is still important when creating device nodes on a filesystem intended for use by older systems. (it's been so long since we dropped block devices that I actually had to look up the details in an old copy of D&I) major, minor Historically, a device number consisted of two parts: the major number, which identified a device driver, and the minor number, which identified an individual device handled by that driver. FreeBSD no longer makes that distinction. Instead, every device in the system has a unique 32-bit device number. For compatibility with software that still expects separate major and minor numbers, this 32-bit device number is split into a 24-bit major number and an 8-bit minor number. However, the distinction between major and minor numbers is still important when creating device nodes on a filesystem intended for use by older systems. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 03:28:41 2009 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 19CFA1065670; Mon, 2 Nov 2009 03:28:41 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from pele.citylink.co.nz (pele.citylink.co.nz [202.8.44.226]) by mx1.freebsd.org (Postfix) with ESMTP id D04138FC12; Mon, 2 Nov 2009 03:28:40 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by pele.citylink.co.nz (Postfix) with ESMTP id AA007FFB6; Mon, 2 Nov 2009 16:13:23 +1300 (NZDT) X-Virus-Scanned: Debian amavisd-new at citylink.co.nz Received: from pele.citylink.co.nz ([127.0.0.1]) by localhost (pele.citylink.co.nz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2PD+Ozh8Esky; Mon, 2 Nov 2009 16:13:19 +1300 (NZDT) Received: from citylink.fud.org.nz (unknown [202.8.44.45]) by pele.citylink.co.nz (Postfix) with ESMTP; Mon, 2 Nov 2009 16:13:19 +1300 (NZDT) Received: by citylink.fud.org.nz (Postfix, from userid 1001) id 9AA3811475; Mon, 2 Nov 2009 16:13:18 +1300 (NZDT) Date: Mon, 2 Nov 2009 16:13:18 +1300 From: Andrew Thompson To: Alexander Motin Message-ID: <20091102031318.GB49898@citylink.fud.org.nz> References: <200911011131.nA1BV6lO022276@svn.freebsd.org> <1280352d0911011907k34498c71g5b49ffb7220c377b@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1280352d0911011907k34498c71g5b49ffb7220c377b@mail.gmail.com> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r198748 - in head/sys/cam: . ata scsi 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, 02 Nov 2009 03:28:41 -0000 > Author: mav > Date: Sun Nov 1 11:31:06 2009 > New Revision: 198748 > URL: http://svn.freebsd.org/changeset/base/198748 > > Log: > MFp4: > Fix reference counting bug, when device unreferenced before then > invalidated. To do it, do not handle validity flag as another > reference, but explicitly modify reference count each time flag is > modified. There is still one problem with this. In xpt_async() we go through the device list on the target and call the async function followed by xpt_async_bcast(). With the above change its possible for scsi_dev_async() to free the device due to dropping the CAM_DEV_UNCONFIGURED flag, leading to a panic in xpt_async_bcast() on freed memory. This fixes it for me. Index: cam/cam_xpt.c =================================================================== --- cam/cam_xpt.c (revision 198779) +++ cam/cam_xpt.c (working copy) @@ -4023,12 +4023,15 @@ xpt_async(u_int32_t async_code, struct cam_path *p && device->lun_id != CAM_LUN_WILDCARD) continue; + /* The async callback could free the device */ + xpt_acquire_device(device); (*(bus->xport->async))(async_code, bus, target, device, async_arg); xpt_async_bcast(&device->asyncs, async_code, path, async_arg); + xpt_release_device(device); } } From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 06:36:55 2009 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 E5A231065670; Mon, 2 Nov 2009 06:36:54 +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 D275D8FC08; Mon, 2 Nov 2009 06:36:54 +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 nA26asOG047830; Mon, 2 Nov 2009 06:36:54 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA26asBM047828; Mon, 2 Nov 2009 06:36:54 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <200911020636.nA26asBM047828@svn.freebsd.org> From: Hiroki Sato Date: Mon, 2 Nov 2009 06:36:54 +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: r198780 - in releng/8.0/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/usb/input dev/xen/xenpci 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, 02 Nov 2009 06:36:55 -0000 Author: hrs Date: Mon Nov 2 06:36:54 2009 New Revision: 198780 URL: http://svn.freebsd.org/changeset/base/198780 Log: MFC r197999: Fix the 106/109 USB Japanese keyboard "underscore" issue. Sun Type 6 USB keyboard support (added in rev 1.46) conflicted with some scan codes used in Japanese keyboards because the scan code conversion routine was ambiguous for the overlapped codes. PR: ports/134005 Submitted by: YAMASHIRO Jun Approved by: re (kib) Modified: releng/8.0/sys/ (props changed) releng/8.0/sys/amd64/include/xen/ (props changed) releng/8.0/sys/cddl/contrib/opensolaris/ (props changed) releng/8.0/sys/contrib/dev/acpica/ (props changed) releng/8.0/sys/contrib/pf/ (props changed) releng/8.0/sys/dev/usb/input/ukbd.c releng/8.0/sys/dev/xen/xenpci/ (props changed) Modified: releng/8.0/sys/dev/usb/input/ukbd.c ============================================================================== --- releng/8.0/sys/dev/usb/input/ukbd.c Mon Nov 2 00:41:10 2009 (r198779) +++ releng/8.0/sys/dev/usb/input/ukbd.c Mon Nov 2 06:36:54 2009 (r198780) @@ -247,8 +247,8 @@ static const uint8_t ukbd_trtab[256] = { NN, NN, NN, NN, NN, NN, NN, NN, /* 68 - 6F */ NN, NN, NN, NN, 115, 108, 111, 113, /* 70 - 77 */ 109, 110, 112, 118, 114, 116, 117, 119, /* 78 - 7F */ - 121, 120, NN, NN, NN, NN, NN, 115, /* 80 - 87 */ - 112, 125, 121, 123, NN, NN, NN, NN, /* 88 - 8F */ + 121, 120, NN, NN, NN, NN, NN, 123, /* 80 - 87 */ + 124, 125, 126, 127, 128, NN, NN, NN, /* 88 - 8F */ NN, NN, NN, NN, NN, NN, NN, NN, /* 90 - 97 */ NN, NN, NN, NN, NN, NN, NN, NN, /* 98 - 9F */ NN, NN, NN, NN, NN, NN, NN, NN, /* A0 - A7 */ @@ -1636,20 +1636,59 @@ static int ukbd_key2scan(struct ukbd_softc *sc, int code, int shift, int up) { static const int scan[] = { - 0x1c, 0x1d, 0x35, - 0x37 | SCAN_PREFIX_SHIFT, /* PrintScreen */ - 0x38, 0x47, 0x48, 0x49, 0x4b, 0x4d, 0x4f, - 0x50, 0x51, 0x52, 0x53, - 0x46, /* XXX Pause/Break */ - 0x5b, 0x5c, 0x5d, + /* 89 */ + 0x11c, /* Enter */ + /* 90-99 */ + 0x11d, /* Ctrl-R */ + 0x135, /* Divide */ + 0x137 | SCAN_PREFIX_SHIFT, /* PrintScreen */ + 0x138, /* Alt-R */ + 0x147, /* Home */ + 0x148, /* Up */ + 0x149, /* PageUp */ + 0x14b, /* Left */ + 0x14d, /* Right */ + 0x14f, /* End */ + /* 100-109 */ + 0x150, /* Down */ + 0x151, /* PageDown */ + 0x152, /* Insert */ + 0x153, /* Delete */ + 0x146, /* XXX Pause/Break */ + 0x15b, /* Win_L(Super_L) */ + 0x15c, /* Win_R(Super_R) */ + 0x15d, /* Application(Menu) */ + /* SUN TYPE 6 USB KEYBOARD */ - 0x68, 0x5e, 0x5f, 0x60, 0x61, 0x62, 0x63, - 0x64, 0x65, 0x66, 0x67, 0x25, 0x1f, 0x1e, - 0x20, + 0x168, /* Sun Type 6 Help */ + 0x15e, /* Sun Type 6 Stop */ + /* 110 - 119 */ + 0x15f, /* Sun Type 6 Again */ + 0x160, /* Sun Type 6 Props */ + 0x161, /* Sun Type 6 Undo */ + 0x162, /* Sun Type 6 Front */ + 0x163, /* Sun Type 6 Copy */ + 0x164, /* Sun Type 6 Open */ + 0x165, /* Sun Type 6 Paste */ + 0x166, /* Sun Type 6 Find */ + 0x167, /* Sun Type 6 Cut */ + 0x125, /* Sun Type 6 Mute */ + /* 120 - 128 */ + 0x11f, /* Sun Type 6 VolumeDown */ + 0x11e, /* Sun Type 6 VolumeUp */ + 0x120, /* Sun Type 6 PowerDown */ + + /* Japanese 106/109 keyboard */ + 0x73, /* Keyboard Intl' 1 (backslash / underscore) */ + 0x70, /* Keyboard Intl' 2 (Katakana / Hiragana) */ + 0x7d, /* Keyboard Intl' 3 (Yen sign) (Not using in jp106/109) */ + 0x79, /* Keyboard Intl' 4 (Henkan) */ + 0x7b, /* Keyboard Intl' 5 (Muhenkan) */ + 0x5c, /* Keyboard Intl' 6 (Keypad ,) (For PC-9821 layout) */ }; if ((code >= 89) && (code < (89 + (sizeof(scan) / sizeof(scan[0]))))) { - code = scan[code - 89] | SCAN_PREFIX_E0; + code = scan[code - 89]; } /* Pause/Break */ if ((code == 104) && (!(shift & (MOD_CONTROL_L | MOD_CONTROL_R)))) { From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 07:21:14 2009 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 05CC8106566B; Mon, 2 Nov 2009 07:21:14 +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 E876B8FC1D; Mon, 2 Nov 2009 07:21: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 nA27LDDc048766; Mon, 2 Nov 2009 07:21:13 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA27LDq1048764; Mon, 2 Nov 2009 07:21:13 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <200911020721.nA27LDq1048764@svn.freebsd.org> From: Colin Percival Date: Mon, 2 Nov 2009 07:21: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: r198781 - head/lib/libc/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: Mon, 02 Nov 2009 07:21:14 -0000 Author: cperciva Date: Mon Nov 2 07:21:13 2009 New Revision: 198781 URL: http://svn.freebsd.org/changeset/base/198781 Log: Attempt to reduce accidental foot-shooting by pointing out that accept(2)ed sockets do not necessarily inherit O_NONBLOCK from listening sockets on non-FreeBSD platforms. Feet shot: cperciva MFC after: 1 month Modified: head/lib/libc/sys/accept.2 Modified: head/lib/libc/sys/accept.2 ============================================================================== --- head/lib/libc/sys/accept.2 Mon Nov 2 06:36:54 2009 (r198780) +++ head/lib/libc/sys/accept.2 Mon Nov 2 07:21:13 2009 (r198781) @@ -126,6 +126,10 @@ new socket. For some applications, performance may be enhanced by using an .Xr accept_filter 9 to pre-process incoming connections. +.Pp +Portable programs should not rely on the +.Dv O_NONBLOCK +property being inherited. .Sh RETURN VALUES The call returns \-1 on error. If it succeeds, it returns a non-negative From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 08:31:00 2009 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 F14611065693; Mon, 2 Nov 2009 08:31: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 E019D8FC28; Mon, 2 Nov 2009 08: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 nA28V0SO050190; Mon, 2 Nov 2009 08:31:00 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA28V0iI050188; Mon, 2 Nov 2009 08:31:00 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200911020831.nA28V0iI050188@svn.freebsd.org> From: Alexander Motin Date: Mon, 2 Nov 2009 08:31: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: r198782 - head/sys/cam 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, 02 Nov 2009 08:31:01 -0000 Author: mav Date: Mon Nov 2 08:31:00 2009 New Revision: 198782 URL: http://svn.freebsd.org/changeset/base/198782 Log: The async callback could free the device. If it is a broadcast async, it doesn't hold device reference, so take our own reference. Submitted by: thompsa Modified: head/sys/cam/cam_xpt.c Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Mon Nov 2 07:21:13 2009 (r198781) +++ head/sys/cam/cam_xpt.c Mon Nov 2 08:31:00 2009 (r198782) @@ -4022,13 +4022,19 @@ xpt_async(u_int32_t async_code, struct c && path->device->lun_id != CAM_LUN_WILDCARD && device->lun_id != CAM_LUN_WILDCARD) continue; - + /* + * The async callback could free the device. + * If it is a broadcast async, it doesn't hold + * device reference, so take our own reference. + */ + xpt_acquire_device(device); (*(bus->xport->async))(async_code, bus, target, device, async_arg); xpt_async_bcast(&device->asyncs, async_code, path, async_arg); + xpt_release_device(device); } } From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 09:47:16 2009 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 55C911065670; Mon, 2 Nov 2009 09:47:16 +0000 (UTC) (envelope-from fjoe@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4417A8FC08; Mon, 2 Nov 2009 09:47: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 nA29lFVn051834; Mon, 2 Nov 2009 09:47:15 GMT (envelope-from fjoe@svn.freebsd.org) Received: (from fjoe@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA29lFbr051832; Mon, 2 Nov 2009 09:47:15 GMT (envelope-from fjoe@svn.freebsd.org) Message-Id: <200911020947.nA29lFbr051832@svn.freebsd.org> From: Max Khon Date: Mon, 2 Nov 2009 09:47:15 +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: r198783 - stable/8/sys/tools 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, 02 Nov 2009 09:47:16 -0000 Author: fjoe Date: Mon Nov 2 09:47:15 2009 New Revision: 198783 URL: http://svn.freebsd.org/changeset/base/198783 Log: MFC: Allow KMOD with hypens and dots. Modified: stable/8/sys/tools/fw_stub.awk Modified: stable/8/sys/tools/fw_stub.awk ============================================================================== --- stable/8/sys/tools/fw_stub.awk Mon Nov 2 08:31:00 2009 (r198782) +++ stable/8/sys/tools/fw_stub.awk Mon Nov 2 09:47:15 2009 (r198783) @@ -118,6 +118,8 @@ if (!num_files || !opt_m) cfilename = opt_c; ctmpfilename = cfilename ".tmp"; +modname = opt_m; +gsub(/[-\.]/, "_", modname); printc("#include \ #include \ @@ -139,7 +141,7 @@ for (file_i = 0; file_i < num_files; fil } printc("\nstatic int\n"\ -opt_m "_fw_modevent(module_t mod, int type, void *unused)\ +modname "_fw_modevent(module_t mod, int type, void *unused)\ {\ const struct firmware *fp, *parent;\ int error;\ @@ -206,14 +208,14 @@ printc("\t\treturn (error);\ return (EINVAL);\ }\ \ -static moduledata_t " opt_m "_fw_mod = {\ - \"" opt_m "_fw\",\ - " opt_m "_fw_modevent,\ +static moduledata_t " modname "_fw_mod = {\ + \"" modname "_fw\",\ + " modname "_fw_modevent,\ 0\ };\ -DECLARE_MODULE(" opt_m "_fw, " opt_m "_fw_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST);\ -MODULE_VERSION(" opt_m "_fw, 1);\ -MODULE_DEPEND(" opt_m "_fw, firmware, 1, 1, 1);\ +DECLARE_MODULE(" modname "_fw, " modname "_fw_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST);\ +MODULE_VERSION(" modname "_fw, 1);\ +MODULE_DEPEND(" modname "_fw, firmware, 1, 1, 1);\ "); if (opt_c) From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 09:47:41 2009 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 7D22F10656A6; Mon, 2 Nov 2009 09:47:41 +0000 (UTC) (envelope-from fjoe@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6BCD58FC33; Mon, 2 Nov 2009 09:47: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 nA29lflY051883; Mon, 2 Nov 2009 09:47:41 GMT (envelope-from fjoe@svn.freebsd.org) Received: (from fjoe@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA29lfNG051881; Mon, 2 Nov 2009 09:47:41 GMT (envelope-from fjoe@svn.freebsd.org) Message-Id: <200911020947.nA29lfNG051881@svn.freebsd.org> From: Max Khon Date: Mon, 2 Nov 2009 09:47: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: r198784 - stable/7/sys/tools 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, 02 Nov 2009 09:47:41 -0000 Author: fjoe Date: Mon Nov 2 09:47:41 2009 New Revision: 198784 URL: http://svn.freebsd.org/changeset/base/198784 Log: MFC: Allow KMOD with hypens and dots. Modified: stable/7/sys/tools/fw_stub.awk Modified: stable/7/sys/tools/fw_stub.awk ============================================================================== --- stable/7/sys/tools/fw_stub.awk Mon Nov 2 09:47:15 2009 (r198783) +++ stable/7/sys/tools/fw_stub.awk Mon Nov 2 09:47:41 2009 (r198784) @@ -118,6 +118,8 @@ if (!num_files || !opt_m) cfilename = opt_c; ctmpfilename = cfilename ".tmp"; +modname = opt_m; +gsub(/[-\.]/, "_", modname); printc("#include \ #include \ @@ -139,7 +141,7 @@ for (file_i = 0; file_i < num_files; fil } printc("\nstatic int\n"\ -opt_m "_fw_modevent(module_t mod, int type, void *unused)\ +modname "_fw_modevent(module_t mod, int type, void *unused)\ {\ const struct firmware *fp, *parent;\ int error;\ @@ -206,14 +208,14 @@ printc("\t\treturn (error);\ return (EINVAL);\ }\ \ -static moduledata_t " opt_m "_fw_mod = {\ - \"" opt_m "_fw\",\ - " opt_m "_fw_modevent,\ +static moduledata_t " modname "_fw_mod = {\ + \"" modname "_fw\",\ + " modname "_fw_modevent,\ 0\ };\ -DECLARE_MODULE(" opt_m "_fw, " opt_m "_fw_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST);\ -MODULE_VERSION(" opt_m "_fw, 1);\ -MODULE_DEPEND(" opt_m "_fw, firmware, 1, 1, 1);\ +DECLARE_MODULE(" modname "_fw, " modname "_fw_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST);\ +MODULE_VERSION(" modname "_fw, 1);\ +MODULE_DEPEND(" modname "_fw, firmware, 1, 1, 1);\ "); if (opt_c) From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 09:56:46 2009 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 E21AA1065670; Mon, 2 Nov 2009 09:56:46 +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 D17B08FC1D; Mon, 2 Nov 2009 09:56: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 nA29ukCN052101; Mon, 2 Nov 2009 09:56:46 GMT (envelope-from remko@svn.freebsd.org) Received: (from remko@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA29ukQo052099; Mon, 2 Nov 2009 09:56:46 GMT (envelope-from remko@svn.freebsd.org) Message-Id: <200911020956.nA29ukQo052099@svn.freebsd.org> From: Remko Lodder Date: Mon, 2 Nov 2009 09:56: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: r198785 - head/etc/rc.d 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, 02 Nov 2009 09:56:47 -0000 Author: remko Date: Mon Nov 2 09:56:46 2009 New Revision: 198785 URL: http://svn.freebsd.org/changeset/base/198785 Log: Execute the start/stop process of a jail in the background. This will prevent that the script hangs during startup, which could cause annoying effects after rebooting for example. PR: kern/139422 Submitted by: Andrey Groshev Approved by: imp (mentor, implicit) MFC after: 3 days Facilitated by: Snow B.V. Modified: head/etc/rc.d/jail Modified: head/etc/rc.d/jail ============================================================================== --- head/etc/rc.d/jail Mon Nov 2 09:47:41 2009 (r198784) +++ head/etc/rc.d/jail Mon Nov 2 09:56:46 2009 (r198785) @@ -728,4 +728,4 @@ fi if [ -n "$*" ]; then jail_list="$*" fi -run_rc_command "${cmd}" +run_rc_command "${cmd}" & From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 10:04:38 2009 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 DE36C106568B; Mon, 2 Nov 2009 10:04:38 +0000 (UTC) (envelope-from dwmalone@maths.tcd.ie) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [IPv6:2001:770:10:300::86e2:510b]) by mx1.freebsd.org (Postfix) with SMTP id E46168FC1A; Mon, 2 Nov 2009 10:04:37 +0000 (UTC) Received: from walton.maths.tcd.ie ([134.226.81.10] helo=walton.maths.tcd.ie) by salmon.maths.tcd.ie with SMTP id ; 2 Nov 2009 10:04:36 +0000 (GMT) Date: Mon, 2 Nov 2009 10:04:35 +0000 From: David Malone To: Ed Schouten Message-ID: <20091102100435.GA67211@walton.maths.tcd.ie> References: <200910311035.n9VAZfIb082932@svn.freebsd.org> <20091031.190353.-332187386.imp@bsdimp.com> <20091101011212.GG1293@hoeg.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20091101011212.GG1293@hoeg.nl> User-Agent: Mutt/1.5.6i Sender: dwmalone@maths.tcd.ie Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, "M. Warner Losh" Subject: Re: svn commit: r198706 - 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: Mon, 02 Nov 2009 10:04:39 -0000 On Sun, Nov 01, 2009 at 02:12:12AM +0100, Ed Schouten wrote: > No, we don't. All these fields are not used by drivers, just some old > version of the devfs code. I made sure struct cdevsw didn't change in > size, so there should be no API nor ABI conflicts. Surely it is an API change, but not an ABI change? Code that used to do: d.d_uid = 3; will no longer compile, but code that was comipled with the old version will still run. I understand that the assignment doesn't do anything useful, but I suppose there still could be code that does it? David. From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 10:24:05 2009 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 C90AA106566B; Mon, 2 Nov 2009 10:24:05 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 681CA8FC12; Mon, 2 Nov 2009 10:24:05 +0000 (UTC) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 762BE1CD0A; Mon, 2 Nov 2009 11:24:04 +0100 (CET) Date: Mon, 2 Nov 2009 11:24:04 +0100 From: Ed Schouten To: David Malone Message-ID: <20091102102404.GP1293@hoeg.nl> References: <200910311035.n9VAZfIb082932@svn.freebsd.org> <20091031.190353.-332187386.imp@bsdimp.com> <20091101011212.GG1293@hoeg.nl> <20091102100435.GA67211@walton.maths.tcd.ie> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="BXjkYym6qfApNY5c" Content-Disposition: inline In-Reply-To: <20091102100435.GA67211@walton.maths.tcd.ie> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, "M. Warner Losh" Subject: Re: svn commit: r198706 - 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: Mon, 02 Nov 2009 10:24:05 -0000 --BXjkYym6qfApNY5c Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello David, * David Malone wrote: > Surely it is an API change, but not an ABI change? Code that used > to do: >=20 > d.d_uid =3D 3; >=20 > will no longer compile, but code that was comipled with the old > version will still run. I understand that the assignment doesn't > do anything useful, but I suppose there still could be code that > does it? Yes, in theory there could be pieces of code that do that, but keep in mind that d_uid was never meant to be used by device drivers. It was used by devfs internally, before cdevpriv existed. Looking at the SVN logs, it was introduced in March 2005, but it was already rendered useless in September that same year, when devfs was modified to just obtain the ownership/modes from the cdevpriv instead of the cdevsw. Interesting commits: - http://svn.freebsd.org/viewvc/base?view=3Drevision&revision=3D143746 - http://svn.freebsd.org/viewvc/base?view=3Drevision&revision=3D150342 --=20 Ed Schouten WWW: http://80386.nl/ --BXjkYym6qfApNY5c Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkrus0QACgkQ52SDGA2eCwUlKwCdG75s+oKDvQJLRpiEgWUpC5By QJ0AniOiL7vUESGkSnqFOsxOWNq0LdK3 =EgKL -----END PGP SIGNATURE----- --BXjkYym6qfApNY5c-- From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 11:07:42 2009 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 ACB42106568B; Mon, 2 Nov 2009 11:07:42 +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 9A9668FC3E; Mon, 2 Nov 2009 11:07: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 nA2B7gKh054860; Mon, 2 Nov 2009 11:07:42 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2B7gP4054855; Mon, 2 Nov 2009 11:07:42 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <200911021107.nA2B7gP4054855@svn.freebsd.org> From: Rui Paulo Date: Mon, 2 Nov 2009 11:07: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: r198786 - in head/sys: compat/ndis dev/if_ndis 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, 02 Nov 2009 11:07:42 -0000 Author: rpaulo Date: Mon Nov 2 11:07:42 2009 New Revision: 198786 URL: http://svn.freebsd.org/changeset/base/198786 Log: Big style cleanup. While there remove references to FreeBSD versions older than 6.0. Submitted by: Paul B Mahol Modified: head/sys/compat/ndis/kern_ndis.c head/sys/compat/ndis/kern_windrv.c head/sys/compat/ndis/subr_hal.c head/sys/compat/ndis/subr_ndis.c head/sys/compat/ndis/subr_ntoskrnl.c head/sys/compat/ndis/subr_pe.c head/sys/compat/ndis/subr_usbd.c head/sys/dev/if_ndis/if_ndis.c head/sys/dev/if_ndis/if_ndis_usb.c Modified: head/sys/compat/ndis/kern_ndis.c ============================================================================== --- head/sys/compat/ndis/kern_ndis.c Mon Nov 2 09:56:46 2009 (r198785) +++ head/sys/compat/ndis/kern_ndis.c Mon Nov 2 11:07:42 2009 (r198786) @@ -184,7 +184,7 @@ ndis_modevent(module_t mod, int cmd, voi break; } - return(error); + return (error); } DEV_MODULE(ndisapi, ndis_modevent, NULL); MODULE_VERSION(ndisapi, 1); @@ -193,7 +193,6 @@ static void ndis_sendrsrcavail_func(adapter) ndis_handle adapter; { - return; } static void @@ -211,8 +210,7 @@ ndis_status_func(adapter, status, sbuf, sc = device_get_softc(block->nmb_physdeviceobj->do_devext); ifp = sc->ifp; if (ifp->if_flags & IFF_DEBUG) - device_printf (sc->ndis_dev, "status: %x\n", status); - return; + device_printf(sc->ndis_dev, "status: %x\n", status); } static void @@ -227,8 +225,7 @@ ndis_statusdone_func(adapter) sc = device_get_softc(block->nmb_physdeviceobj->do_devext); ifp = sc->ifp; if (ifp->if_flags & IFF_DEBUG) - device_printf (sc->ndis_dev, "status complete\n"); - return; + device_printf(sc->ndis_dev, "status complete\n"); } static void @@ -241,7 +238,6 @@ ndis_setdone_func(adapter, status) block->nmb_setstat = status; KeSetEvent(&block->nmb_setevent, IO_NO_INCREMENT, FALSE); - return; } static void @@ -254,7 +250,6 @@ ndis_getdone_func(adapter, status) block->nmb_getstat = status; KeSetEvent(&block->nmb_getevent, IO_NO_INCREMENT, FALSE); - return; } static void @@ -270,10 +265,8 @@ ndis_resetdone_func(ndis_handle adapter, ifp = sc->ifp; if (ifp->if_flags & IFF_DEBUG) - device_printf (sc->ndis_dev, "reset done...\n"); + device_printf(sc->ndis_dev, "reset done...\n"); KeSetEvent(&block->nmb_resetevent, IO_NO_INCREMENT, FALSE); - - return; } int @@ -287,7 +280,7 @@ ndis_create_sysctls(arg) struct sysctl_ctx_entry *e; if (arg == NULL) - return(EINVAL); + return (EINVAL); sc = arg; vals = sc->ndis_regvals; @@ -367,7 +360,7 @@ ndis_create_sysctls(arg) "Interrupt Number", buf, CTLFLAG_RD); } - return(0); + return (0); } int @@ -388,7 +381,7 @@ ndis_add_sysctl(arg, key, desc, val, fla if (cfg == NULL) { printf("failed for %s\n", key); - return(ENOMEM); + return (ENOMEM); } cfg->ndis_cfg.nc_cfgkey = strdup(key, M_DEVBUF); @@ -415,7 +408,7 @@ ndis_add_sysctl(arg, key, desc, val, fla cfg->ndis_cfg.nc_cfgdesc); #endif - return(0); + return (0); } /* @@ -451,7 +444,7 @@ ndis_flush_sysctls(arg) free(cfg, M_DEVBUF); } - return(0); + return (0); } static void @@ -488,8 +481,6 @@ ndis_return(dobj, arg) KeAcquireSpinLock(&block->nmb_returnlock, &irql); } KeReleaseSpinLock(&block->nmb_returnlock, irql); - - return; } void @@ -522,8 +513,6 @@ ndis_return_packet(buf, arg) IoQueueWorkItem(block->nmb_returnitem, (io_workitem_func)kernndis_functbl[7].ipt_wrap, WORKQUEUE_CRITICAL, block); - - return; } void @@ -540,8 +529,6 @@ ndis_free_bufs(b0) IoFreeMdl(b0); b0 = next; } - - return; } void @@ -553,7 +540,6 @@ ndis_free_packet(p) ndis_free_bufs(p->np_private.npp_head); NdisFreePacket(p); - return; } int @@ -567,26 +553,18 @@ ndis_convert_res(arg) device_t dev; struct resource_list *brl; struct resource_list_entry *brle; -#if __FreeBSD_version < 600022 - struct resource_list brl_rev; - struct resource_list_entry *n; -#endif int error = 0; sc = arg; block = sc->ndis_block; dev = sc->ndis_dev; -#if __FreeBSD_version < 600022 - SLIST_INIT(&brl_rev); -#endif - rl = malloc(sizeof(ndis_resource_list) + (sizeof(cm_partial_resource_desc) * (sc->ndis_rescnt - 1)), M_DEVBUF, M_NOWAIT|M_ZERO); if (rl == NULL) - return(ENOMEM); + return (ENOMEM); rl->cprl_version = 5; rl->cprl_version = 1; @@ -597,37 +575,7 @@ ndis_convert_res(arg) if (brl != NULL) { -#if __FreeBSD_version < 600022 - /* - * We have a small problem. Some PCI devices have - * multiple I/O ranges. Windows orders them starting - * from lowest numbered BAR to highest. We discover - * them in that order too, but insert them into a singly - * linked list head first, which means when time comes - * to traverse the list, we enumerate them in reverse - * order. This screws up some drivers which expect the - * BARs to be in ascending order so that they can choose - * the "first" one as their register space. Unfortunately, - * in order to fix this, we have to create our own - * temporary list with the entries in reverse order. - */ - - SLIST_FOREACH(brle, brl, link) { - n = malloc(sizeof(struct resource_list_entry), - M_TEMP, M_NOWAIT); - if (n == NULL) { - error = ENOMEM; - goto bad; - } - bcopy((char *)brle, (char *)n, - sizeof(struct resource_list_entry)); - SLIST_INSERT_HEAD(&brl_rev, n, link); - } - - SLIST_FOREACH(brle, &brl_rev, link) { -#else STAILQ_FOREACH(brle, brl, link) { -#endif switch (brle->type) { case SYS_RES_IOPORT: prd->cprd_type = CmResourceTypePort; @@ -671,17 +619,7 @@ ndis_convert_res(arg) block->nmb_rlist = rl; -#if __FreeBSD_version < 600022 -bad: - - while (!SLIST_EMPTY(&brl_rev)) { - n = SLIST_FIRST(&brl_rev); - SLIST_REMOVE_HEAD(&brl_rev, link); - free (n, M_TEMP); - } -#endif - - return(error); + return (error); } /* @@ -711,7 +649,7 @@ ndis_ptom(m0, p) int diff; if (p == NULL || m0 == NULL) - return(EINVAL); + return (EINVAL); priv = &p->np_private; buf = priv->npp_head; @@ -729,7 +667,7 @@ ndis_ptom(m0, p) if (m == NULL) { m_freem(*m0); *m0 = NULL; - return(ENOBUFS); + return (ENOBUFS); } m->m_len = MmGetMdlByteCount(buf); m->m_data = MmGetMdlVirtualAddress(buf); @@ -765,7 +703,7 @@ ndis_ptom(m0, p) } (*m0)->m_pkthdr.len = totlen; - return(0); + return (0); } /* @@ -793,7 +731,7 @@ ndis_mtop(m0, p) ndis_packet_private *priv; if (p == NULL || *p == NULL || m0 == NULL) - return(EINVAL); + return (EINVAL); priv = &(*p)->np_private; priv->npp_totlen = m0->m_pkthdr.len; @@ -805,7 +743,7 @@ ndis_mtop(m0, p) if (buf == NULL) { ndis_free_packet(*p); *p = NULL; - return(ENOMEM); + return (ENOMEM); } MmBuildMdlForNonPagedPool(buf); @@ -818,7 +756,7 @@ ndis_mtop(m0, p) priv->npp_tail = buf; - return(0); + return (0); } int @@ -831,25 +769,25 @@ ndis_get_supported_oids(arg, oids, oidcn ndis_oid *o; if (arg == NULL || oids == NULL || oidcnt == NULL) - return(EINVAL); + return (EINVAL); len = 0; ndis_get_info(arg, OID_GEN_SUPPORTED_LIST, NULL, &len); o = malloc(len, M_DEVBUF, M_NOWAIT); if (o == NULL) - return(ENOMEM); + return (ENOMEM); rval = ndis_get_info(arg, OID_GEN_SUPPORTED_LIST, o, &len); if (rval) { free(o, M_DEVBUF); - return(rval); + return (rval); } *oids = o; *oidcnt = len / 4; - return(0); + return (0); } int @@ -893,7 +831,7 @@ ndis_set_info(arg, oid, buf, buflen) sc->ndis_block->nmb_devicectx == NULL) { sc->ndis_block->nmb_pendingreq = NULL; KeReleaseSpinLock(&sc->ndis_block->nmb_lock, irql); - return(ENXIO); + return (ENXIO); } rval = MSCALL6(setfunc, adapter, oid, buf, *buflen, @@ -917,19 +855,19 @@ ndis_set_info(arg, oid, buf, buflen) *buflen = bytesneeded; if (rval == NDIS_STATUS_INVALID_LENGTH) - return(ENOSPC); + return (ENOSPC); if (rval == NDIS_STATUS_INVALID_OID) - return(EINVAL); + return (EINVAL); if (rval == NDIS_STATUS_NOT_SUPPORTED || rval == NDIS_STATUS_NOT_ACCEPTED) - return(ENOTSUP); + return (ENOTSUP); if (rval != NDIS_STATUS_SUCCESS) - return(ENODEV); + return (ENODEV); - return(0); + return (0); } typedef void (*ndis_senddone_func)(ndis_handle, ndis_packet *, ndis_status); @@ -951,7 +889,7 @@ ndis_send_packets(arg, packets, cnt) sc = arg; adapter = sc->ndis_block->nmb_miniportadapterctx; if (adapter == NULL) - return(ENXIO); + return (ENXIO); sendfunc = sc->ndis_chars->nmc_sendmulti_func; senddonefunc = sc->ndis_block->nmb_senddone_func; @@ -976,7 +914,7 @@ ndis_send_packets(arg, packets, cnt) if (NDIS_SERIALIZED(sc->ndis_block)) KeReleaseSpinLock(&sc->ndis_block->nmb_lock, irql); - return(0); + return (0); } int @@ -994,7 +932,7 @@ ndis_send_packet(arg, packet) sc = arg; adapter = sc->ndis_block->nmb_miniportadapterctx; if (adapter == NULL) - return(ENXIO); + return (ENXIO); sendfunc = sc->ndis_chars->nmc_sendsingle_func; senddonefunc = sc->ndis_block->nmb_senddone_func; @@ -1006,7 +944,7 @@ ndis_send_packet(arg, packet) if (status == NDIS_STATUS_PENDING) { if (NDIS_SERIALIZED(sc->ndis_block)) KeReleaseSpinLock(&sc->ndis_block->nmb_lock, irql); - return(0); + return (0); } MSCALL3(senddonefunc, sc->ndis_block, packet, status); @@ -1014,7 +952,7 @@ ndis_send_packet(arg, packet) if (NDIS_SERIALIZED(sc->ndis_block)) KeReleaseSpinLock(&sc->ndis_block->nmb_lock, irql); - return(0); + return (0); } int @@ -1030,18 +968,18 @@ ndis_init_dma(arg) M_DEVBUF, M_NOWAIT|M_ZERO); if (sc->ndis_tmaps == NULL) - return(ENOMEM); + return (ENOMEM); for (i = 0; i < sc->ndis_maxpkts; i++) { error = bus_dmamap_create(sc->ndis_ttag, 0, &sc->ndis_tmaps[i]); if (error) { free(sc->ndis_tmaps, M_DEVBUF); - return(ENODEV); + return (ENODEV); } } - return(0); + return (0); } int @@ -1070,7 +1008,7 @@ ndis_destroy_dma(arg) bus_dma_tag_destroy(sc->ndis_ttag); - return(0); + return (0); } int @@ -1093,7 +1031,7 @@ ndis_reset_nic(arg) if (adapter == NULL || resetfunc == NULL || sc->ndis_block->nmb_devicectx == NULL) { NDIS_UNLOCK(sc); - return(EIO); + return (EIO); } NDIS_UNLOCK(sc); @@ -1112,7 +1050,7 @@ ndis_reset_nic(arg) KeWaitForSingleObject(&sc->ndis_block->nmb_resetevent, 0, 0, FALSE, NULL); - return(0); + return (0); } int @@ -1149,7 +1087,7 @@ ndis_halt_nic(arg) adapter = sc->ndis_block->nmb_miniportadapterctx; if (adapter == NULL) { NDIS_UNLOCK(sc); - return(EIO); + return (EIO); } sc->ndis_block->nmb_devicectx = NULL; @@ -1169,7 +1107,7 @@ ndis_halt_nic(arg) sc->ndis_block->nmb_miniportadapterctx = NULL; NDIS_UNLOCK(sc); - return(0); + return (0); } int @@ -1186,7 +1124,7 @@ ndis_shutdown_nic(arg) shutdownfunc = sc->ndis_chars->nmc_shutdown_handler; NDIS_UNLOCK(sc); if (adapter == NULL || shutdownfunc == NULL) - return(EIO); + return (EIO); if (sc->ndis_chars->nmc_rsvd0 == NULL) MSCALL1(shutdownfunc, adapter); @@ -1195,7 +1133,7 @@ ndis_shutdown_nic(arg) TAILQ_REMOVE(&ndis_devhead, sc->ndis_block, link); - return(0); + return (0); } int @@ -1215,7 +1153,7 @@ ndis_pnpevent_nic(arg, type) pnpeventfunc = sc->ndis_chars->nmc_pnpevent_handler; NDIS_UNLOCK(sc); if (adapter == NULL || pnpeventfunc == NULL) - return(EIO); + return (EIO); if (sc->ndis_chars->nmc_rsvd0 == NULL) MSCALL4(pnpeventfunc, adapter, type, NULL, 0); @@ -1237,7 +1175,7 @@ ndis_init_nic(arg) uint32_t chosenmedium, i; if (arg == NULL) - return(EINVAL); + return (EINVAL); sc = arg; NDIS_LOCK(sc); @@ -1262,7 +1200,7 @@ ndis_init_nic(arg) NDIS_LOCK(sc); sc->ndis_block->nmb_miniportadapterctx = NULL; NDIS_UNLOCK(sc); - return(ENXIO); + return (status); } /* @@ -1281,7 +1219,7 @@ ndis_init_nic(arg) sc->ndis_block->nmb_devicectx = sc; NDIS_UNLOCK(sc); - return(0); + return (0); } static void @@ -1305,8 +1243,6 @@ ndis_intrsetup(dpc, dobj, ip, sc) if (KeInsertQueueDpc(&intr->ni_dpc, NULL, NULL) == TRUE) intr->ni_dpccnt++; KeReleaseSpinLockFromDpcLevel(&intr->ni_dpccountlock); - - return; } int @@ -1343,7 +1279,7 @@ ndis_get_info(arg, oid, buf, buflen) sc->ndis_block->nmb_devicectx == NULL) { sc->ndis_block->nmb_pendingreq = NULL; KeReleaseSpinLock(&sc->ndis_block->nmb_lock, irql); - return(ENXIO); + return (ENXIO); } rval = MSCALL6(queryfunc, adapter, oid, buf, *buflen, @@ -1370,19 +1306,19 @@ ndis_get_info(arg, oid, buf, buflen) if (rval == NDIS_STATUS_INVALID_LENGTH || rval == NDIS_STATUS_BUFFER_TOO_SHORT) - return(ENOSPC); + return (ENOSPC); if (rval == NDIS_STATUS_INVALID_OID) - return(EINVAL); + return (EINVAL); if (rval == NDIS_STATUS_NOT_SUPPORTED || rval == NDIS_STATUS_NOT_ACCEPTED) - return(ENOTSUP); + return (ENOTSUP); if (rval != NDIS_STATUS_SUCCESS) - return(ENODEV); + return (ENODEV); - return(0); + return (0); } uint32_t @@ -1403,14 +1339,14 @@ NdisAddDevice(drv, pdo) INTR_TYPE_NET | INTR_MPSAFE, NULL, ntoskrnl_intr, NULL, &sc->ndis_intrhand); if (error) - return(NDIS_STATUS_FAILURE); + return (NDIS_STATUS_FAILURE); } status = IoCreateDevice(drv, sizeof(ndis_miniport_block), NULL, FILE_DEVICE_UNKNOWN, 0, FALSE, &fdo); if (status != STATUS_SUCCESS) - return(status); + return (status); block = fdo->do_devext; @@ -1446,7 +1382,7 @@ NdisAddDevice(drv, pdo) if (status != NDIS_STATUS_SUCCESS) { IoDetachDevice(block->nmb_nextdeviceobj); IoDeleteDevice(fdo); - return(status); + return (status); } InitializeListHead((&block->nmb_packetlist)); } @@ -1498,5 +1434,5 @@ ndis_unload_driver(arg) IoDetachDevice(sc->ndis_block->nmb_nextdeviceobj); IoDeleteDevice(fdo); - return(0); + return (0); } Modified: head/sys/compat/ndis/kern_windrv.c ============================================================================== --- head/sys/compat/ndis/kern_windrv.c Mon Nov 2 09:56:46 2009 (r198785) +++ head/sys/compat/ndis/kern_windrv.c Mon Nov 2 11:07:42 2009 (r198786) @@ -123,7 +123,7 @@ windrv_libinit(void) panic("failed to allocate thread info blocks"); smp_rendezvous(NULL, x86_newldt, NULL, NULL); #endif - return(0); + return (0); } int @@ -148,7 +148,7 @@ windrv_libfini(void) smp_rendezvous(NULL, x86_oldldt, NULL, NULL); ExFreePool(my_tids); #endif - return(0); + return (0); } /* @@ -172,7 +172,7 @@ windrv_lookup(img, name) if (name != NULL) { RtlInitAnsiString(&as, name); if (RtlAnsiStringToUnicodeString(&us, &as, TRUE)) - return(NULL); + return (NULL); } mtx_lock(&drvdb_mtx); @@ -183,7 +183,7 @@ windrv_lookup(img, name) mtx_unlock(&drvdb_mtx); if (name != NULL) ExFreePool(us.us_buf); - return(d->windrv_object); + return (d->windrv_object); } } mtx_unlock(&drvdb_mtx); @@ -191,7 +191,7 @@ windrv_lookup(img, name) if (name != NULL) RtlFreeUnicodeString(&us); - return(NULL); + return (NULL); } struct drvdb_ent * @@ -209,12 +209,12 @@ windrv_match(matchfunc, ctx) match = matchfunc(d->windrv_bustype, d->windrv_devlist, ctx); if (match == TRUE) { mtx_unlock(&drvdb_mtx); - return(d); + return (d); } } mtx_unlock(&drvdb_mtx); - return(NULL); + return (NULL); } /* @@ -283,7 +283,7 @@ windrv_unload(mod, img, len) return (ENOENT); if (drv == NULL) - return(ENOENT); + return (ENOENT); /* * Destroy any custom extensions that may have been added. @@ -306,7 +306,7 @@ windrv_unload(mod, img, len) /* Free our DB handle */ free(r, M_DEVBUF); - return(0); + return (0); } #define WINDRV_LOADED htonl(0x42534F44) @@ -345,28 +345,28 @@ windrv_load(mod, img, len, bustype, devl /* Perform text relocation */ if (pe_relocate(img)) - return(ENOEXEC); + return (ENOEXEC); /* Dynamically link the NDIS.SYS routines -- required. */ if (pe_patch_imports(img, "NDIS", ndis_functbl)) - return(ENOEXEC); + return (ENOEXEC); /* Dynamically link the HAL.dll routines -- optional. */ if (pe_get_import_descriptor(img, &imp_desc, "HAL") == 0) { if (pe_patch_imports(img, "HAL", hal_functbl)) - return(ENOEXEC); + return (ENOEXEC); } /* Dynamically link ntoskrnl.exe -- optional. */ if (pe_get_import_descriptor(img, &imp_desc, "ntoskrnl") == 0) { if (pe_patch_imports(img, "ntoskrnl", ntoskrnl_functbl)) - return(ENOEXEC); + return (ENOEXEC); } /* Dynamically link USBD.SYS -- optional */ if (pe_get_import_descriptor(img, &imp_desc, "USBD") == 0) { if (pe_patch_imports(img, "USBD", usbd_functbl)) - return(ENOEXEC); + return (ENOEXEC); } *ptr = WINDRV_LOADED; @@ -398,7 +398,7 @@ skipreloc: if (drv->dro_driverext == NULL) { free(new, M_DEVBUF); free(drv, M_DEVBUF); - return(ENOMEM); + return (ENOMEM); } InitializeListHead((&drv->dro_driverext->dre_usrext)); @@ -410,7 +410,7 @@ skipreloc: if (RtlAnsiStringToUnicodeString(&drv->dro_drivername, &as, TRUE)) { free(new, M_DEVBUF); free(drv, M_DEVBUF); - return(ENOMEM); + return (ENOMEM); } new->windrv_object = drv; @@ -426,7 +426,7 @@ skipreloc: RtlFreeUnicodeString(&drv->dro_drivername); free(drv, M_DEVBUF); free(new, M_DEVBUF); - return(ENODEV); + return (ENODEV); } mtx_lock(&drvdb_mtx); @@ -463,7 +463,7 @@ windrv_create_pdo(drv, bsddev) dev->do_devext = bsddev; - return(STATUS_SUCCESS); + return (STATUS_SUCCESS); } void @@ -482,8 +482,6 @@ windrv_destroy_pdo(drv, bsddev) mtx_lock(&drvdb_mtx); IoDeleteDevice(pdo); mtx_unlock(&drvdb_mtx); - - return; } /* @@ -503,13 +501,13 @@ windrv_find_pdo(drv, bsddev) while (pdo != NULL) { if (pdo->do_devext == bsddev) { mtx_unlock(&drvdb_mtx); - return(pdo); + return (pdo); } pdo = pdo->do_nextdev; } mtx_unlock(&drvdb_mtx); - return(NULL); + return (NULL); } /* @@ -533,7 +531,7 @@ windrv_bus_attach(drv, name) if (RtlAnsiStringToUnicodeString(&drv->dro_drivername, &as, TRUE)) { free(new, M_DEVBUF); - return(ENOMEM); + return (ENOMEM); } /* @@ -550,7 +548,7 @@ windrv_bus_attach(drv, name) STAILQ_INSERT_HEAD(&drvdb_head, new, link); mtx_unlock(&drvdb_mtx); - return(0); + return (0); } #ifdef __amd64__ @@ -578,7 +576,7 @@ windrv_wrap(func, wrap, argcnt, ftype) p = malloc((wrapend - wrapstart), M_DEVBUF, M_NOWAIT); if (p == NULL) - return(ENOMEM); + return (ENOMEM); /* Copy over the code. */ @@ -591,7 +589,7 @@ windrv_wrap(func, wrap, argcnt, ftype) *wrap = p; - return(0); + return (0); } #endif /* __amd64__ */ @@ -695,8 +693,6 @@ ctxsw_utow(void) x86_critical_exit(); /* Now entering Windows land, population: you. */ - - return; } /* @@ -722,7 +718,6 @@ ctxsw_wtou(void) if (t->tid_cpu != curthread->td_oncpu) panic("ctxsw GOT MOVED TO OTHER CPU!"); #endif - return; } static int windrv_wrap_stdcall(funcptr, funcptr *, int); @@ -754,7 +749,7 @@ windrv_wrap_fastcall(func, wrap, argcnt) p = malloc((wrapend - wrapstart), M_DEVBUF, M_NOWAIT); if (p == NULL) - return(ENOMEM); + return (ENOMEM); /* Copy over the code. */ @@ -774,7 +769,7 @@ windrv_wrap_fastcall(func, wrap, argcnt) *wrap = p; - return(0); + return (0); } extern void x86_stdcall_wrap(void); @@ -802,7 +797,7 @@ windrv_wrap_stdcall(func, wrap, argcnt) p = malloc((wrapend - wrapstart), M_DEVBUF, M_NOWAIT); if (p == NULL) - return(ENOMEM); + return (ENOMEM); /* Copy over the code. */ @@ -818,7 +813,7 @@ windrv_wrap_stdcall(func, wrap, argcnt) *wrap = p; - return(0); + return (0); } extern void x86_regparm_wrap(void); @@ -842,7 +837,7 @@ windrv_wrap_regparm(func, wrap) p = malloc((wrapend - wrapstart), M_DEVBUF, M_NOWAIT); if (p == NULL) - return(ENOMEM); + return (ENOMEM); /* Copy over the code. */ @@ -855,7 +850,7 @@ windrv_wrap_regparm(func, wrap) *wrap = p; - return(0); + return (0); } int @@ -867,18 +862,18 @@ windrv_wrap(func, wrap, argcnt, ftype) { switch(ftype) { case WINDRV_WRAP_FASTCALL: - return(windrv_wrap_fastcall(func, wrap, argcnt)); + return (windrv_wrap_fastcall(func, wrap, argcnt)); case WINDRV_WRAP_STDCALL: - return(windrv_wrap_stdcall(func, wrap, argcnt)); + return (windrv_wrap_stdcall(func, wrap, argcnt)); case WINDRV_WRAP_REGPARM: - return(windrv_wrap_regparm(func, wrap)); + return (windrv_wrap_regparm(func, wrap)); case WINDRV_WRAP_CDECL: - return(windrv_wrap_stdcall(func, wrap, 0)); + return (windrv_wrap_stdcall(func, wrap, 0)); default: break; } - return(EINVAL); + return (EINVAL); } static void @@ -909,8 +904,6 @@ x86_oldldt(dummy) x86_setldt(>able, ltable); mtx_unlock_spin(&dt_lock); - - return; } static void @@ -959,8 +952,6 @@ x86_newldt(dummy) mtx_unlock_spin(&dt_lock); /* Whew. */ - - return; } #endif /* __i386__ */ @@ -971,5 +962,5 @@ windrv_unwrap(func) { free(func, M_DEVBUF); - return(0); + return (0); } Modified: head/sys/compat/ndis/subr_hal.c ============================================================================== --- head/sys/compat/ndis/subr_hal.c Mon Nov 2 09:56:46 2009 (r198785) +++ head/sys/compat/ndis/subr_hal.c Mon Nov 2 11:07:42 2009 (r198786) @@ -102,8 +102,7 @@ hal_libinit() patch++; } - - return(0); + return (0); } int @@ -121,7 +120,7 @@ hal_libfini() patch++; } - return(0); + return (0); } static void @@ -129,7 +128,6 @@ KeStallExecutionProcessor(usecs) uint32_t usecs; { DELAY(usecs); - return; } static void @@ -138,21 +136,18 @@ WRITE_PORT_ULONG(port, val) uint32_t val; { bus_space_write_4(NDIS_BUS_SPACE_IO, 0x0, (bus_size_t)port, val); - return; } static void WRITE_PORT_USHORT(uint16_t *port, uint16_t val) { bus_space_write_2(NDIS_BUS_SPACE_IO, 0x0, (bus_size_t)port, val); - return; } static void WRITE_PORT_UCHAR(uint8_t *port, uint8_t val) { bus_space_write_1(NDIS_BUS_SPACE_IO, 0x0, (bus_size_t)port, val); - return; } static void @@ -163,7 +158,6 @@ WRITE_PORT_BUFFER_ULONG(port, val, cnt) { bus_space_write_multi_4(NDIS_BUS_SPACE_IO, 0x0, (bus_size_t)port, val, cnt); - return; } static void @@ -174,7 +168,6 @@ WRITE_PORT_BUFFER_USHORT(port, val, cnt) { bus_space_write_multi_2(NDIS_BUS_SPACE_IO, 0x0, (bus_size_t)port, val, cnt); - return; } static void @@ -185,28 +178,27 @@ WRITE_PORT_BUFFER_UCHAR(port, val, cnt) { bus_space_write_multi_1(NDIS_BUS_SPACE_IO, 0x0, (bus_size_t)port, val, cnt); - return; } static uint16_t READ_PORT_USHORT(port) uint16_t *port; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 12:03:05 2009 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 2B78C10656C1; Mon, 2 Nov 2009 12:03:05 +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 1B4D28FC1B; Mon, 2 Nov 2009 12:03: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 nA2C347U056039; Mon, 2 Nov 2009 12:03:04 GMT (envelope-from remko@svn.freebsd.org) Received: (from remko@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2C34EL056037; Mon, 2 Nov 2009 12:03:04 GMT (envelope-from remko@svn.freebsd.org) Message-Id: <200911021203.nA2C34EL056037@svn.freebsd.org> From: Remko Lodder Date: Mon, 2 Nov 2009 12:03: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: r198787 - 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: Mon, 02 Nov 2009 12:03:05 -0000 Author: remko Date: Mon Nov 2 12:03:04 2009 New Revision: 198787 URL: http://svn.freebsd.org/changeset/base/198787 Log: Document the WWWSUPFILE variable. PR: 137723 Submitted by: Sofian Brabez Approved by: imp (mentor, implicit) MFC after: 3 days Facilitated by: Snow B.V. Modified: head/share/man/man5/make.conf.5 Modified: head/share/man/man5/make.conf.5 ============================================================================== --- head/share/man/man5/make.conf.5 Mon Nov 2 11:07:42 2009 (r198786) +++ head/share/man/man5/make.conf.5 Mon Nov 2 12:03:04 2009 (r198787) @@ -318,6 +318,14 @@ Set this to use .Xr cvsup 1 to update your ports with .Dq Li "make update" . +.It Va WWWSUPFILE +.Pq Vt str +The www +.Ar supfile +to use when doing a +.Dq Li "make update" +This defaults to +.Pa /usr/share/examples/cvsup/www\-supfile . .El .Ss "BUILDING THE KERNEL" The following list provides a name and short description for variables From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 12:35:39 2009 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 97727106566C; Mon, 2 Nov 2009 12:35:39 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4EAE18FC20; Mon, 2 Nov 2009 12: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 nA2CZc7U056832; Mon, 2 Nov 2009 12:35:38 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2CZc1R056811; Mon, 2 Nov 2009 12:35:38 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <200911021235.nA2CZc1R056811@svn.freebsd.org> From: Christian Brueffer Date: Mon, 2 Nov 2009 12:35: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: r198788 - in head: bin/getfacl lib/libc/gen lib/libpmc share/man/man4 share/man/man5 share/man/man7 usr.bin/tail usr.sbin/i2c usr.sbin/nfsd usr.sbin/wake 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, 02 Nov 2009 12:35:39 -0000 Author: brueffer Date: Mon Nov 2 12:35:38 2009 New Revision: 198788 URL: http://svn.freebsd.org/changeset/base/198788 Log: Use our canonical .Dd format. Submitted by: Ulrich Spoerlein Modified: head/bin/getfacl/getfacl.1 head/lib/libc/gen/posix_spawn.3 head/lib/libc/gen/posix_spawn_file_actions_addopen.3 head/lib/libc/gen/posix_spawn_file_actions_init.3 head/lib/libc/gen/posix_spawnattr_getflags.3 head/lib/libc/gen/posix_spawnattr_getpgroup.3 head/lib/libc/gen/posix_spawnattr_getschedparam.3 head/lib/libc/gen/posix_spawnattr_getschedpolicy.3 head/lib/libc/gen/posix_spawnattr_getsigdefault.3 head/lib/libc/gen/posix_spawnattr_getsigmask.3 head/lib/libc/gen/posix_spawnattr_init.3 head/lib/libpmc/pmc_attach.3 head/share/man/man4/tty.4 head/share/man/man5/ar.5 head/share/man/man5/msdosfs.5 head/share/man/man7/adding_user.7 head/usr.bin/tail/tail.1 head/usr.sbin/i2c/i2c.8 head/usr.sbin/nfsd/stablerestart.5 head/usr.sbin/wake/wake.8 Modified: head/bin/getfacl/getfacl.1 ============================================================================== --- head/bin/getfacl/getfacl.1 Mon Nov 2 12:03:04 2009 (r198787) +++ head/bin/getfacl/getfacl.1 Mon Nov 2 12:35:38 2009 (r198788) @@ -30,7 +30,7 @@ .\" Developed by the TrustedBSD Project. .\" Support for POSIX.1e access control lists. .\" -.Dd September 04, 2009 +.Dd September 4, 2009 .Dt GETFACL 1 .Os .Sh NAME Modified: head/lib/libc/gen/posix_spawn.3 ============================================================================== --- head/lib/libc/gen/posix_spawn.3 Mon Nov 2 12:03:04 2009 (r198787) +++ head/lib/libc/gen/posix_spawn.3 Mon Nov 2 12:35:38 2009 (r198788) @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Mar 24, 2008 +.Dd March 24, 2008 .Dt POSIX_SPAWN 3 .Os .Sh NAME Modified: head/lib/libc/gen/posix_spawn_file_actions_addopen.3 ============================================================================== --- head/lib/libc/gen/posix_spawn_file_actions_addopen.3 Mon Nov 2 12:03:04 2009 (r198787) +++ head/lib/libc/gen/posix_spawn_file_actions_addopen.3 Mon Nov 2 12:35:38 2009 (r198788) @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Mar 24, 2008 +.Dd March 24, 2008 .Dt POSIX_SPAWN_FILE_ACTIONS_ADDOPEN 3 .Os .Sh NAME Modified: head/lib/libc/gen/posix_spawn_file_actions_init.3 ============================================================================== --- head/lib/libc/gen/posix_spawn_file_actions_init.3 Mon Nov 2 12:03:04 2009 (r198787) +++ head/lib/libc/gen/posix_spawn_file_actions_init.3 Mon Nov 2 12:35:38 2009 (r198788) @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Mar 24, 2008 +.Dd March 24, 2008 .Dt POSIX_SPAWN_FILE_ACTIONS_INIT 3 .Os .Sh NAME Modified: head/lib/libc/gen/posix_spawnattr_getflags.3 ============================================================================== --- head/lib/libc/gen/posix_spawnattr_getflags.3 Mon Nov 2 12:03:04 2009 (r198787) +++ head/lib/libc/gen/posix_spawnattr_getflags.3 Mon Nov 2 12:35:38 2009 (r198788) @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Mar 24, 2008 +.Dd March 24, 2008 .Dt POSIX_SPAWNATTR_GETFLAGS 3 .Os .Sh NAME Modified: head/lib/libc/gen/posix_spawnattr_getpgroup.3 ============================================================================== --- head/lib/libc/gen/posix_spawnattr_getpgroup.3 Mon Nov 2 12:03:04 2009 (r198787) +++ head/lib/libc/gen/posix_spawnattr_getpgroup.3 Mon Nov 2 12:35:38 2009 (r198788) @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Mar 24, 2008 +.Dd March 24, 2008 .Dt POSIX_SPAWNATTR_GETPGROUP 3 .Os .Sh NAME Modified: head/lib/libc/gen/posix_spawnattr_getschedparam.3 ============================================================================== --- head/lib/libc/gen/posix_spawnattr_getschedparam.3 Mon Nov 2 12:03:04 2009 (r198787) +++ head/lib/libc/gen/posix_spawnattr_getschedparam.3 Mon Nov 2 12:35:38 2009 (r198788) @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Mar 24, 2008 +.Dd March 24, 2008 .Dt POSIX_SPAWNATTR_GETSCHEDPARAM 3 .Os .Sh NAME Modified: head/lib/libc/gen/posix_spawnattr_getschedpolicy.3 ============================================================================== --- head/lib/libc/gen/posix_spawnattr_getschedpolicy.3 Mon Nov 2 12:03:04 2009 (r198787) +++ head/lib/libc/gen/posix_spawnattr_getschedpolicy.3 Mon Nov 2 12:35:38 2009 (r198788) @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Mar 24, 2008 +.Dd March 24, 2008 .Dt POSIX_SPAWNATTR_GETSCHEDPOLICY 3 .Os .Sh NAME Modified: head/lib/libc/gen/posix_spawnattr_getsigdefault.3 ============================================================================== --- head/lib/libc/gen/posix_spawnattr_getsigdefault.3 Mon Nov 2 12:03:04 2009 (r198787) +++ head/lib/libc/gen/posix_spawnattr_getsigdefault.3 Mon Nov 2 12:35:38 2009 (r198788) @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Mar 24, 2008 +.Dd March 24, 2008 .Dt POSIX_SPAWNATTR_GETSIGDEFAULT 3 .Os .Sh NAME Modified: head/lib/libc/gen/posix_spawnattr_getsigmask.3 ============================================================================== --- head/lib/libc/gen/posix_spawnattr_getsigmask.3 Mon Nov 2 12:03:04 2009 (r198787) +++ head/lib/libc/gen/posix_spawnattr_getsigmask.3 Mon Nov 2 12:35:38 2009 (r198788) @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Mar 24, 2008 +.Dd March 24, 2008 .Dt POSIX_SPAWNATTR_GETSIGMASK 3 .Os .Sh NAME Modified: head/lib/libc/gen/posix_spawnattr_init.3 ============================================================================== --- head/lib/libc/gen/posix_spawnattr_init.3 Mon Nov 2 12:03:04 2009 (r198787) +++ head/lib/libc/gen/posix_spawnattr_init.3 Mon Nov 2 12:35:38 2009 (r198788) @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Mar 24, 2008 +.Dd March 24, 2008 .Dt POSIX_SPAWNATTR_INIT 3 .Os .Sh NAME Modified: head/lib/libpmc/pmc_attach.3 ============================================================================== --- head/lib/libpmc/pmc_attach.3 Mon Nov 2 12:03:04 2009 (r198787) +++ head/lib/libpmc/pmc_attach.3 Mon Nov 2 12:35:38 2009 (r198788) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 25 2007 +.Dd November 25, 2007 .Os .Dt PMC_ATTACH 3 .Sh NAME Modified: head/share/man/man4/tty.4 ============================================================================== --- head/share/man/man4/tty.4 Mon Nov 2 12:03:04 2009 (r198787) +++ head/share/man/man4/tty.4 Mon Nov 2 12:35:38 2009 (r198788) @@ -32,7 +32,7 @@ .\" @(#)tty.4 8.3 (Berkeley) 4/19/94 .\" $FreeBSD$ .\" -.Dd Jun 27, 2007 +.Dd June 27, 2007 .Dt TTY 4 .Os .Sh NAME Modified: head/share/man/man5/ar.5 ============================================================================== --- head/share/man/man5/ar.5 Mon Nov 2 12:03:04 2009 (r198787) +++ head/share/man/man5/ar.5 Mon Nov 2 12:35:38 2009 (r198788) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 07, 2007 +.Dd September 7, 2007 .Os .Dt AR 5 .Sh NAME Modified: head/share/man/man5/msdosfs.5 ============================================================================== --- head/share/man/man5/msdosfs.5 Mon Nov 2 12:03:04 2009 (r198787) +++ head/share/man/man5/msdosfs.5 Mon Nov 2 12:35:38 2009 (r198788) @@ -2,7 +2,7 @@ .\" Written by Tom Rhodes .\" This file is in the public domain. .\" -.Dd Aug 22, 2007 +.Dd August 22, 2007 .Dt MSDOSFS 5 .Os .Sh NAME Modified: head/share/man/man7/adding_user.7 ============================================================================== --- head/share/man/man7/adding_user.7 Mon Nov 2 12:03:04 2009 (r198787) +++ head/share/man/man7/adding_user.7 Mon Nov 2 12:35:38 2009 (r198788) @@ -32,7 +32,7 @@ .\" @(#)adduser.8 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd Jan 30, 2009 +.Dd January 30, 2009 .Dt ADDING_USER 8 .Os .Sh NAME Modified: head/usr.bin/tail/tail.1 ============================================================================== --- head/usr.bin/tail/tail.1 Mon Nov 2 12:03:04 2009 (r198787) +++ head/usr.bin/tail/tail.1 Mon Nov 2 12:35:38 2009 (r198788) @@ -35,7 +35,7 @@ .\" @(#)tail.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd June 05, 2009 +.Dd June 5, 2009 .Dt TAIL 1 .Os .Sh NAME Modified: head/usr.sbin/i2c/i2c.8 ============================================================================== --- head/usr.sbin/i2c/i2c.8 Mon Nov 2 12:03:04 2009 (r198787) +++ head/usr.sbin/i2c/i2c.8 Mon Nov 2 12:35:38 2009 (r198788) @@ -26,7 +26,7 @@ .\" $FreeBSD$ .\" -.Dd Jan 23, 2009 +.Dd January 23, 2009 .Dt I2C 8 .Os .Sh NAME Modified: head/usr.sbin/nfsd/stablerestart.5 ============================================================================== --- head/usr.sbin/nfsd/stablerestart.5 Mon Nov 2 12:03:04 2009 (r198787) +++ head/usr.sbin/nfsd/stablerestart.5 Mon Nov 2 12:35:38 2009 (r198788) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Sept 7, 2007 +.Dd September 7, 2007 .Dt STABLERESTART 5 .Os .Sh NAME Modified: head/usr.sbin/wake/wake.8 ============================================================================== --- head/usr.sbin/wake/wake.8 Mon Nov 2 12:03:04 2009 (r198787) +++ head/usr.sbin/wake/wake.8 Mon Nov 2 12:35:38 2009 (r198788) @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd June 27 2009 +.Dd June 27, 2009 .Dt WAKE 8 .Os .Sh NAME From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 15:00:40 2009 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 266A6106568D; Mon, 2 Nov 2009 15:00:40 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id F296E8FC1B; Mon, 2 Nov 2009 15:00:39 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 8E32546B46; Mon, 2 Nov 2009 10:00:39 -0500 (EST) Date: Mon, 2 Nov 2009 15:00:39 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Colin Percival In-Reply-To: <200911020721.nA27LDq1048764@svn.freebsd.org> Message-ID: References: <200911020721.nA27LDq1048764@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="621616949-1518405475-1257174039=:37561" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r198781 - head/lib/libc/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: Mon, 02 Nov 2009 15:00:40 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --621616949-1518405475-1257174039=:37561 Content-Type: TEXT/PLAIN; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8BIT On Mon, 2 Nov 2009, Colin Percival wrote: > Attempt to reduce accidental foot-shooting by pointing out that > accept(2)ed sockets do not necessarily inherit O_NONBLOCK from > listening sockets on non-FreeBSD platforms. I wonder how much trouble we should go to to document bugs in other systems as non-portabilities for features that work in our system. This bug in Linux was brought to my attention recently: SO_RCVLOWAT and SO_SNDLOWAT Specify the minimum number of bytes in the buffer until the socket layer will pass the data to the protocol (SO_SNDLOWAT) or the user on receiving (SO_RCVLOWAT). These two values are ini‐ tialized to 1. SO_SNDLOWAT is not changeable on Linux (setsock‐ opt(2) fails with the error ENOPROTOOPT). SO_RCVLOWAT is changeable only since Linux 2.4. The select(2) and poll(2) sys‐ tem calls currently do not respect the SO_RCVLOWAT setting on Linux, and mark a socket readable when even a single byte of data is available. A subsequent read from the socket will block until SO_RCVLOWAT bytes are available. I think a more general caution for accept(2) might instead be: BUGS The inheritence of socket options from a listen socket to a newly accepted socket is inconsistent across protocols, and non-portable. Robert > > Feet shot: cperciva > MFC after: 1 month > > Modified: > head/lib/libc/sys/accept.2 > > Modified: head/lib/libc/sys/accept.2 > ============================================================================== > --- head/lib/libc/sys/accept.2 Mon Nov 2 06:36:54 2009 (r198780) > +++ head/lib/libc/sys/accept.2 Mon Nov 2 07:21:13 2009 (r198781) > @@ -126,6 +126,10 @@ new socket. > For some applications, performance may be enhanced by using an > .Xr accept_filter 9 > to pre-process incoming connections. > +.Pp > +Portable programs should not rely on the > +.Dv O_NONBLOCK > +property being inherited. > .Sh RETURN VALUES > The call returns \-1 on error. > If it succeeds, it returns a non-negative > --621616949-1518405475-1257174039=:37561-- From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 15:09:04 2009 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 5229310656C5; Mon, 2 Nov 2009 15:09:04 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from gizmo.2hip.net (gizmo.2hip.net [64.74.207.195]) by mx1.freebsd.org (Postfix) with ESMTP id 1067B8FC27; Mon, 2 Nov 2009 15:09:03 +0000 (UTC) Received: from [192.168.1.4] (adsl-150-102-19.bna.bellsouth.net [72.150.102.19]) (authenticated bits=0) by gizmo.2hip.net (8.14.3/8.14.3) with ESMTP id nA2F8wRT020125 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Mon, 2 Nov 2009 10:09:01 -0500 (EST) (envelope-from rnoland@FreeBSD.org) From: Robert Noland To: Robert Watson In-Reply-To: References: <200911020721.nA27LDq1048764@svn.freebsd.org> Content-Type: text/plain; charset="iso-2022-jp" Organization: FreeBSD Date: Mon, 02 Nov 2009 09:08:53 -0600 Message-Id: <1257174533.73292.10.camel@balrog.2hip.net> Mime-Version: 1.0 X-Mailer: Evolution 2.26.3 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00, RCVD_IN_SORBS_DUL, RDNS_DYNAMIC, SPF_SOFTFAIL autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on gizmo.2hip.net Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Colin Percival Subject: Re: svn commit: r198781 - head/lib/libc/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: Mon, 02 Nov 2009 15:09:04 -0000 On Mon, 2009-11-02 at 15:00 +0000, Robert Watson wrote: > On Mon, 2 Nov 2009, Colin Percival wrote: > > > Attempt to reduce accidental foot-shooting by pointing out that > > accept(2)ed sockets do not necessarily inherit O_NONBLOCK from > > listening sockets on non-FreeBSD platforms. > > I wonder how much trouble we should go to to document bugs in other systems as > non-portabilities for features that work in our system. This bug in Linux was > brought to my attention recently: > > SO_RCVLOWAT and SO_SNDLOWAT > Specify the minimum number of bytes in the buffer until the > socket layer will pass the data to the protocol (SO_SNDLOWAT) or > the user on receiving (SO_RCVLOWAT). These two values are ini$B!>(B > tialized to 1. SO_SNDLOWAT is not changeable on Linux (setsock$B!>(B > opt(2) fails with the error ENOPROTOOPT). SO_RCVLOWAT is > changeable only since Linux 2.4. The select(2) and poll(2) sys$B!>(B > tem calls currently do not respect the SO_RCVLOWAT setting on > Linux, and mark a socket readable when even a single byte of > data is available. A subsequent read from the socket will block > until SO_RCVLOWAT bytes are available. > > I think a more general caution for accept(2) might instead be: > > BUGS > The inheritence of socket options from a listen socket to a newly > accepted socket is inconsistent across protocols, and non-portable. I don't think we have any business documenting what linux does or does not do. As much as I would hate to see someone wasting time finding this linux bug, we should only document our own behavior. Hopefully we at least have a hope of keeping that information accurate. robert. > Robert > > > > > Feet shot: cperciva > > MFC after: 1 month > > > > Modified: > > head/lib/libc/sys/accept.2 > > > > Modified: head/lib/libc/sys/accept.2 > > ============================================================================== > > --- head/lib/libc/sys/accept.2 Mon Nov 2 06:36:54 2009 (r198780) > > +++ head/lib/libc/sys/accept.2 Mon Nov 2 07:21:13 2009 (r198781) > > @@ -126,6 +126,10 @@ new socket. > > For some applications, performance may be enhanced by using an > > .Xr accept_filter 9 > > to pre-process incoming connections. > > +.Pp > > +Portable programs should not rely on the > > +.Dv O_NONBLOCK > > +property being inherited. > > .Sh RETURN VALUES > > The call returns \-1 on error. > > If it succeeds, it returns a non-negative > > -- Robert Noland FreeBSD From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 15:51:09 2009 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 771331065676; Mon, 2 Nov 2009 15:51:09 +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 343458FC13; Mon, 2 Nov 2009 15:51:09 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id nA2FjwNo071234; Mon, 2 Nov 2009 08:45:58 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 02 Nov 2009 08:46:16 -0700 (MST) Message-Id: <20091102.084616.-1258100553.imp@bsdimp.com> To: ed@80386.nl From: "M. Warner Losh" In-Reply-To: <20091102102404.GP1293@hoeg.nl> References: <20091101011212.GG1293@hoeg.nl> <20091102100435.GA67211@walton.maths.tcd.ie> <20091102102404.GP1293@hoeg.nl> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: dwmalone@maths.tcd.ie, svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r198706 - 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: Mon, 02 Nov 2009 15:51:09 -0000 In message: <20091102102404.GP1293@hoeg.nl> Ed Schouten writes: : Hello David, : : * David Malone wrote: : > Surely it is an API change, but not an ABI change? Code that used : > to do: : > : > d.d_uid = 3; : > : > will no longer compile, but code that was comipled with the old : > version will still run. I understand that the assignment doesn't : > do anything useful, but I suppose there still could be code that : > does it? : : Yes, in theory there could be pieces of code that do that, but keep in : mind that d_uid was never meant to be used by device drivers. It was : used by devfs internally, before cdevpriv existed. : : Looking at the SVN logs, it was introduced in March 2005, but it was : already rendered useless in September that same year, when devfs was : modified to just obtain the ownership/modes from the cdevpriv instead of : the cdevsw. : : Interesting commits: : : - http://svn.freebsd.org/viewvc/base?view=revision&revision=143746 : - http://svn.freebsd.org/viewvc/base?view=revision&revision=150342 True, but you've now spent way more time than a version bump would have taken on this. The first of these also does a version bump. :) And you haven't answered my question: Have you confirmed that there's no ABI changes on all platforms? Warner From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 15:53:33 2009 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 0A8751065676; Mon, 2 Nov 2009 15:53:33 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D19148FC08; Mon, 2 Nov 2009 15:53: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 nA2FrWAL061379; Mon, 2 Nov 2009 15:53:32 GMT (envelope-from rnoland@svn.freebsd.org) Received: (from rnoland@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2FrWpY061377; Mon, 2 Nov 2009 15:53:32 GMT (envelope-from rnoland@svn.freebsd.org) Message-Id: <200911021553.nA2FrWpY061377@svn.freebsd.org> From: Robert Noland Date: Mon, 2 Nov 2009 15:53:32 +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: r198792 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/drm dev/xen/xenpci 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, 02 Nov 2009 15:53:33 -0000 Author: rnoland Date: Mon Nov 2 15:53:32 2009 New Revision: 198792 URL: http://svn.freebsd.org/changeset/base/198792 Log: MFC 198691 Fix blitter support for RS880 chips Modified: 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/drm/r600_blit.c stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/drm/r600_blit.c ============================================================================== --- stable/8/sys/dev/drm/r600_blit.c Mon Nov 2 15:43:54 2009 (r198791) +++ stable/8/sys/dev/drm/r600_blit.c Mon Nov 2 15:53:32 2009 (r198792) @@ -1367,7 +1367,7 @@ set_vtx_resource(drm_radeon_private_t *d if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV610) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV620) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780) || - /*((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS880) ||*/ + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS880) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV710)) cp_set_surface_sync(dev_priv, R600_TC_ACTION_ENA, 48, gpu_addr); @@ -1509,7 +1509,7 @@ set_default_state(drm_radeon_private_t * case CHIP_RV610: case CHIP_RV620: case CHIP_RS780: - /*case CHIP_RS880:*/ + case CHIP_RS880: default: num_ps_gprs = 84; num_vs_gprs = 36; @@ -1591,7 +1591,7 @@ set_default_state(drm_radeon_private_t * if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV610) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV620) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780) || - /*((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS880) ||*/ + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS880) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV710)) sq_config = 0; else From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 15:54:15 2009 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 C103D106566B; Mon, 2 Nov 2009 15:54:15 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 605A58FC08; Mon, 2 Nov 2009 15:54:15 +0000 (UTC) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 4B9351CF71; Mon, 2 Nov 2009 16:54:14 +0100 (CET) Date: Mon, 2 Nov 2009 16:54:14 +0100 From: Ed Schouten To: "M. Warner Losh" Message-ID: <20091102155414.GR1293@hoeg.nl> References: <20091101011212.GG1293@hoeg.nl> <20091102100435.GA67211@walton.maths.tcd.ie> <20091102102404.GP1293@hoeg.nl> <20091102.084616.-1258100553.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="6CpFlezhW0MxRmxw" Content-Disposition: inline In-Reply-To: <20091102.084616.-1258100553.imp@bsdimp.com> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: dwmalone@maths.tcd.ie, svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r198706 - 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: Mon, 02 Nov 2009 15:54:15 -0000 --6CpFlezhW0MxRmxw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * M. Warner Losh wrote: > And you haven't answered my question: Have you confirmed that there's > no ABI changes on all platforms? Confirmed on all platforms? No. I've only tested it on i386 and amd64. I think someone also tested it on arm, so this makes me believe other architectures will also work as expected. --=20 Ed Schouten WWW: http://80386.nl/ --6CpFlezhW0MxRmxw Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkrvAKYACgkQ52SDGA2eCwVQVQCfUf64ghgZLH/vCmNgUgq0CDGm SRgAn0lnQQWBKQ7U6onxfMP6Vr0zkoXb =E9No -----END PGP SIGNATURE----- --6CpFlezhW0MxRmxw-- From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 15:54:41 2009 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 B2BAB10656C3; Mon, 2 Nov 2009 15:54:41 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A09298FC08; Mon, 2 Nov 2009 15: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 nA2FsfFb061437; Mon, 2 Nov 2009 15:54:41 GMT (envelope-from rnoland@svn.freebsd.org) Received: (from rnoland@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2FsfbD061435; Mon, 2 Nov 2009 15:54:41 GMT (envelope-from rnoland@svn.freebsd.org) Message-Id: <200911021554.nA2FsfbD061435@svn.freebsd.org> From: Robert Noland Date: Mon, 2 Nov 2009 15:54: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: r198793 - in stable/7/sys: . contrib/pf dev/drm 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, 02 Nov 2009 15:54:41 -0000 Author: rnoland Date: Mon Nov 2 15:54:41 2009 New Revision: 198793 URL: http://svn.freebsd.org/changeset/base/198793 Log: MFC 198691 Fix blitter support for RS880 chips Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/drm/r600_blit.c Modified: stable/7/sys/dev/drm/r600_blit.c ============================================================================== --- stable/7/sys/dev/drm/r600_blit.c Mon Nov 2 15:53:32 2009 (r198792) +++ stable/7/sys/dev/drm/r600_blit.c Mon Nov 2 15:54:41 2009 (r198793) @@ -1367,7 +1367,7 @@ set_vtx_resource(drm_radeon_private_t *d if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV610) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV620) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780) || - /*((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS880) ||*/ + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS880) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV710)) cp_set_surface_sync(dev_priv, R600_TC_ACTION_ENA, 48, gpu_addr); @@ -1509,7 +1509,7 @@ set_default_state(drm_radeon_private_t * case CHIP_RV610: case CHIP_RV620: case CHIP_RS780: - /*case CHIP_RS880:*/ + case CHIP_RS880: default: num_ps_gprs = 84; num_vs_gprs = 36; @@ -1591,7 +1591,7 @@ set_default_state(drm_radeon_private_t * if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV610) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV620) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780) || - /*((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS880) ||*/ + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS880) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV710)) sq_config = 0; else From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 15:57:04 2009 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 3859B1065692; Mon, 2 Nov 2009 15:57:04 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0B3818FC16; Mon, 2 Nov 2009 15:57: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 nA2Fv3O4061548; Mon, 2 Nov 2009 15:57:03 GMT (envelope-from rnoland@svn.freebsd.org) Received: (from rnoland@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2Fv3g0061546; Mon, 2 Nov 2009 15:57:03 GMT (envelope-from rnoland@svn.freebsd.org) Message-Id: <200911021557.nA2Fv3g0061546@svn.freebsd.org> From: Robert Noland Date: Mon, 2 Nov 2009 15:57:03 +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: r198794 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/drm dev/xen/xenpci 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, 02 Nov 2009 15:57:04 -0000 Author: rnoland Date: Mon Nov 2 15:57:03 2009 New Revision: 198794 URL: http://svn.freebsd.org/changeset/base/198794 Log: MFC 198692 Use system specified memory barriers rather than rolling our own. Modified: 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/drm/drmP.h stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/drm/drmP.h ============================================================================== --- stable/8/sys/dev/drm/drmP.h Mon Nov 2 15:54:41 2009 (r198793) +++ stable/8/sys/dev/drm/drmP.h Mon Nov 2 15:57:03 2009 (r198794) @@ -223,23 +223,9 @@ typedef u_int8_t u8; * DRM_WRITEMEMORYBARRIER() prevents reordering of writes. * DRM_MEMORYBARRIER() prevents reordering of reads and writes. */ -#if defined(__i386__) -#define DRM_READMEMORYBARRIER() __asm __volatile( \ - "lock; addl $0,0(%%esp)" : : : "memory"); -#define DRM_WRITEMEMORYBARRIER() __asm __volatile("" : : : "memory"); -#define DRM_MEMORYBARRIER() __asm __volatile( \ - "lock; addl $0,0(%%esp)" : : : "memory"); -#elif defined(__alpha__) -#define DRM_READMEMORYBARRIER() alpha_mb(); -#define DRM_WRITEMEMORYBARRIER() alpha_wmb(); -#define DRM_MEMORYBARRIER() alpha_mb(); -#elif defined(__amd64__) -#define DRM_READMEMORYBARRIER() __asm __volatile( \ - "lock; addl $0,0(%%rsp)" : : : "memory"); -#define DRM_WRITEMEMORYBARRIER() __asm __volatile("" : : : "memory"); -#define DRM_MEMORYBARRIER() __asm __volatile( \ - "lock; addl $0,0(%%rsp)" : : : "memory"); -#endif +#define DRM_READMEMORYBARRIER() rmb() +#define DRM_WRITEMEMORYBARRIER() wmb() +#define DRM_MEMORYBARRIER() mb() #define DRM_READ8(map, offset) \ *(volatile u_int8_t *)(((vm_offset_t)(map)->handle) + \ From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 15:59:56 2009 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 62FB5106566C; Mon, 2 Nov 2009 15:59:56 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 359598FC1F; Mon, 2 Nov 2009 15:59:56 +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 nA2FxuXk061660; Mon, 2 Nov 2009 15:59:56 GMT (envelope-from rnoland@svn.freebsd.org) Received: (from rnoland@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2Fxu3D061658; Mon, 2 Nov 2009 15:59:56 GMT (envelope-from rnoland@svn.freebsd.org) Message-Id: <200911021559.nA2Fxu3D061658@svn.freebsd.org> From: Robert Noland Date: Mon, 2 Nov 2009 15:59:56 +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: r198795 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/drm dev/xen/xenpci 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, 02 Nov 2009 15:59:56 -0000 Author: rnoland Date: Mon Nov 2 15:59:55 2009 New Revision: 198795 URL: http://svn.freebsd.org/changeset/base/198795 Log: MFC 198695 A bit of cleanup work on radeon_freelist_get() * Fix the main loop to search all buffers before sleeping. * Remove dead code Modified: 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/drm/radeon_cp.c stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/drm/radeon_cp.c ============================================================================== --- stable/8/sys/dev/drm/radeon_cp.c Mon Nov 2 15:57:03 2009 (r198794) +++ stable/8/sys/dev/drm/radeon_cp.c Mon Nov 2 15:59:55 2009 (r198795) @@ -1860,8 +1860,8 @@ struct drm_buf *radeon_freelist_get(stru for (t = 0; t < dev_priv->usec_timeout; t++) { u32 done_age = GET_SCRATCH(dev_priv, 1); DRM_DEBUG("done_age = %d\n", done_age); - for (i = start; i < dma->buf_count; i++) { - buf = dma->buflist[i]; + for (i = 0; i < dma->buf_count; i++) { + buf = dma->buflist[start]; buf_priv = buf->dev_private; if (buf->file_priv == NULL || (buf->pending && buf_priv->age <= @@ -1870,7 +1870,8 @@ struct drm_buf *radeon_freelist_get(stru buf->pending = 0; return buf; } - start = 0; + if (++start >= dma->buf_count) + start = 0; } if (t) { @@ -1879,47 +1880,9 @@ struct drm_buf *radeon_freelist_get(stru } } - DRM_DEBUG("returning NULL!\n"); return NULL; } -#if 0 -struct drm_buf *radeon_freelist_get(struct drm_device * dev) -{ - struct drm_device_dma *dma = dev->dma; - drm_radeon_private_t *dev_priv = dev->dev_private; - drm_radeon_buf_priv_t *buf_priv; - struct drm_buf *buf; - int i, t; - int start; - u32 done_age; - - done_age = radeon_read_ring_rptr(dev_priv, RADEON_SCRATCHOFF(1)); - if (++dev_priv->last_buf >= dma->buf_count) - dev_priv->last_buf = 0; - - start = dev_priv->last_buf; - dev_priv->stats.freelist_loops++; - - for (t = 0; t < 2; t++) { - for (i = start; i < dma->buf_count; i++) { - buf = dma->buflist[i]; - buf_priv = buf->dev_private; - if (buf->file_priv == 0 || (buf->pending && - buf_priv->age <= - done_age)) { - dev_priv->stats.requested_bufs++; - buf->pending = 0; - return buf; - } - } - start = 0; - } - - return NULL; -} -#endif - void radeon_freelist_reset(struct drm_device * dev) { struct drm_device_dma *dma = dev->dma; From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 16:00:20 2009 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 EF2BE106573F; Mon, 2 Nov 2009 16:00:01 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AC3428FC1A; Mon, 2 Nov 2009 16:00: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 nA2G01iD061712; Mon, 2 Nov 2009 16:00:01 GMT (envelope-from rnoland@svn.freebsd.org) Received: (from rnoland@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2G01HF061711; Mon, 2 Nov 2009 16:00:01 GMT (envelope-from rnoland@svn.freebsd.org) Message-Id: <200911021600.nA2G01HF061711@svn.freebsd.org> From: Robert Noland Date: Mon, 2 Nov 2009 16:00:01 +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: r198796 - in stable/7/sys: . contrib/pf dev/drm 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, 02 Nov 2009 16:00:20 -0000 Author: rnoland Date: Mon Nov 2 16:00:01 2009 New Revision: 198796 URL: http://svn.freebsd.org/changeset/base/198796 Log: MFC 198695 A bit of cleanup work on radeon_freelist_get() * Fix the main loop to search all buffers before sleeping. * Remove dead code Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/drm/radeon_cp.c Modified: stable/7/sys/dev/drm/radeon_cp.c ============================================================================== --- stable/7/sys/dev/drm/radeon_cp.c Mon Nov 2 15:59:55 2009 (r198795) +++ stable/7/sys/dev/drm/radeon_cp.c Mon Nov 2 16:00:01 2009 (r198796) @@ -1860,8 +1860,8 @@ struct drm_buf *radeon_freelist_get(stru for (t = 0; t < dev_priv->usec_timeout; t++) { u32 done_age = GET_SCRATCH(dev_priv, 1); DRM_DEBUG("done_age = %d\n", done_age); - for (i = start; i < dma->buf_count; i++) { - buf = dma->buflist[i]; + for (i = 0; i < dma->buf_count; i++) { + buf = dma->buflist[start]; buf_priv = buf->dev_private; if (buf->file_priv == NULL || (buf->pending && buf_priv->age <= @@ -1870,7 +1870,8 @@ struct drm_buf *radeon_freelist_get(stru buf->pending = 0; return buf; } - start = 0; + if (++start >= dma->buf_count) + start = 0; } if (t) { @@ -1879,47 +1880,9 @@ struct drm_buf *radeon_freelist_get(stru } } - DRM_DEBUG("returning NULL!\n"); return NULL; } -#if 0 -struct drm_buf *radeon_freelist_get(struct drm_device * dev) -{ - struct drm_device_dma *dma = dev->dma; - drm_radeon_private_t *dev_priv = dev->dev_private; - drm_radeon_buf_priv_t *buf_priv; - struct drm_buf *buf; - int i, t; - int start; - u32 done_age; - - done_age = radeon_read_ring_rptr(dev_priv, RADEON_SCRATCHOFF(1)); - if (++dev_priv->last_buf >= dma->buf_count) - dev_priv->last_buf = 0; - - start = dev_priv->last_buf; - dev_priv->stats.freelist_loops++; - - for (t = 0; t < 2; t++) { - for (i = start; i < dma->buf_count; i++) { - buf = dma->buflist[i]; - buf_priv = buf->dev_private; - if (buf->file_priv == 0 || (buf->pending && - buf_priv->age <= - done_age)) { - dev_priv->stats.requested_bufs++; - buf->pending = 0; - return buf; - } - } - start = 0; - } - - return NULL; -} -#endif - void radeon_freelist_reset(struct drm_device * dev) { struct drm_device_dma *dma = dev->dma; From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 16:02:16 2009 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 A88631065672; Mon, 2 Nov 2009 16:02:16 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 94EB38FC0C; Mon, 2 Nov 2009 16:02: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 nA2G2Gph061836; Mon, 2 Nov 2009 16:02:16 GMT (envelope-from rnoland@svn.freebsd.org) Received: (from rnoland@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2G2Gsv061834; Mon, 2 Nov 2009 16:02:16 GMT (envelope-from rnoland@svn.freebsd.org) Message-Id: <200911021602.nA2G2Gsv061834@svn.freebsd.org> From: Robert Noland Date: Mon, 2 Nov 2009 16:02: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: r198797 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/drm dev/xen/xenpci 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, 02 Nov 2009 16:02:16 -0000 Author: rnoland Date: Mon Nov 2 16:02:16 2009 New Revision: 198797 URL: http://svn.freebsd.org/changeset/base/198797 Log: MFC 198696 Cleanup in r600_blit - Don't bother to assign vb until we know we have enough space - Add variables for sx2, sy2, dx2, dy2 so that these aren't calculated over and over, also reduce chance of errors. - Use switch to assign color/format Modified: 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/drm/r600_blit.c stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/drm/r600_blit.c ============================================================================== --- stable/8/sys/dev/drm/r600_blit.c Mon Nov 2 16:00:01 2009 (r198796) +++ stable/8/sys/dev/drm/r600_blit.c Mon Nov 2 16:02:16 2009 (r198797) @@ -1719,7 +1719,10 @@ r600_blit_copy(struct drm_device *dev, u32 *vb; vb = (u32 *) ((char *)dev->agp_buffer_map->handle + - dev_priv->blit_vb->offset + dev_priv->blit_vb->used); + dev_priv->blit_vb->offset + dev_priv->blit_vb->used); + DRM_DEBUG("src=0x%016llx, dst=0x%016llx, size=%d\n", + (unsigned long long)src_gpu_addr, + (unsigned long long)dst_gpu_addr, size_bytes); if ((size_bytes & 3) || (src_gpu_addr & 3) || (dst_gpu_addr & 3)) { max_bytes = 8192; @@ -1757,7 +1760,7 @@ r600_blit_copy(struct drm_device *dev, return; set_shaders(dev); vb = (u32 *) ((char *)dev->agp_buffer_map->handle + - dev_priv->blit_vb->offset + dev_priv->blit_vb->used); + dev_priv->blit_vb->offset + dev_priv->blit_vb->used); } vb[0] = i2f(dst_x); @@ -1847,7 +1850,7 @@ r600_blit_copy(struct drm_device *dev, return; set_shaders(dev); vb = (u32 *) ((char *)dev->agp_buffer_map->handle + - dev_priv->blit_vb->offset + dev_priv->blit_vb->used); + dev_priv->blit_vb->offset + dev_priv->blit_vb->used); } vb[0] = i2f(dst_x / 4); @@ -1913,12 +1916,10 @@ r600_blit_swap(struct drm_device *dev, { drm_radeon_private_t *dev_priv = dev->dev_private; int cb_format, tex_format; + int sx2, sy2, dx2, dy2; u64 vb_addr; u32 *vb; - vb = (u32 *) ((char *)dev->agp_buffer_map->handle + - dev_priv->blit_vb->offset + dev_priv->blit_vb->used); - if ((dev_priv->blit_vb->used + 48) > dev_priv->blit_vb->total) { dev_priv->blit_vb->used = 0; radeon_cp_discard_buffer(dev, dev_priv->blit_vb); @@ -1926,20 +1927,14 @@ r600_blit_swap(struct drm_device *dev, if (!dev_priv->blit_vb) return; set_shaders(dev); - vb = (u32 *) ((char *)dev->agp_buffer_map->handle + - dev_priv->blit_vb->offset + dev_priv->blit_vb->used); } + vb = (u32 *) ((char *)dev->agp_buffer_map->handle + + dev_priv->blit_vb->offset + dev_priv->blit_vb->used); - if (cpp == 4) { - cb_format = COLOR_8_8_8_8; - tex_format = FMT_8_8_8_8; - } else if (cpp == 2) { - cb_format = COLOR_5_6_5; - tex_format = FMT_5_6_5; - } else { - cb_format = COLOR_8; - tex_format = FMT_8; - } + sx2 = sx + w; + sy2 = sy + h; + dx2 = dx + w; + dy2 = dy + h; vb[0] = i2f(dx); vb[1] = i2f(dy); @@ -1947,31 +1942,46 @@ r600_blit_swap(struct drm_device *dev, vb[3] = i2f(sy); vb[4] = i2f(dx); - vb[5] = i2f(dy + h); + vb[5] = i2f(dy2); vb[6] = i2f(sx); - vb[7] = i2f(sy + h); + vb[7] = i2f(sy2); + + vb[8] = i2f(dx2); + vb[9] = i2f(dy2); + vb[10] = i2f(sx2); + vb[11] = i2f(sy2); - vb[8] = i2f(dx + w); - vb[9] = i2f(dy + h); - vb[10] = i2f(sx + w); - vb[11] = i2f(sy + h); + switch(cpp) { + case 4: + cb_format = COLOR_8_8_8_8; + tex_format = FMT_8_8_8_8; + break; + case 2: + cb_format = COLOR_5_6_5; + tex_format = FMT_5_6_5; + break; + default: + cb_format = COLOR_8; + tex_format = FMT_8; + break; + } /* src */ set_tex_resource(dev_priv, tex_format, src_pitch / cpp, - sy + h, src_pitch / cpp, + sy2, src_pitch / cpp, src_gpu_addr); cp_set_surface_sync(dev_priv, - R600_TC_ACTION_ENA, (src_pitch * (sy + h)), src_gpu_addr); + R600_TC_ACTION_ENA, src_pitch * sy2, src_gpu_addr); /* dst */ set_render_target(dev_priv, cb_format, - dst_pitch / cpp, dy + h, + dst_pitch / cpp, dy2, dst_gpu_addr); /* scissors */ - set_scissors(dev_priv, dx, dy, dx + w, dy + h); + set_scissors(dev_priv, dx, dy, dx2, dy2); /* Vertex buffer setup */ vb_addr = dev_priv->gart_buffers_offset + @@ -1984,7 +1994,7 @@ r600_blit_swap(struct drm_device *dev, cp_set_surface_sync(dev_priv, R600_CB_ACTION_ENA | R600_CB0_DEST_BASE_ENA, - dst_pitch * (dy + h), dst_gpu_addr); + dst_pitch * dy2, dst_gpu_addr); dev_priv->blit_vb->used += 12 * 4; } From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 16:02:37 2009 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 05BAC1065693; Mon, 2 Nov 2009 16:02:37 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E74B68FC16; Mon, 2 Nov 2009 16:02: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 nA2G2atX061877; Mon, 2 Nov 2009 16:02:36 GMT (envelope-from rnoland@svn.freebsd.org) Received: (from rnoland@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2G2a82061875; Mon, 2 Nov 2009 16:02:36 GMT (envelope-from rnoland@svn.freebsd.org) Message-Id: <200911021602.nA2G2a82061875@svn.freebsd.org> From: Robert Noland Date: Mon, 2 Nov 2009 16:02:36 +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: r198798 - in stable/7/sys: . contrib/pf dev/drm 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, 02 Nov 2009 16:02:37 -0000 Author: rnoland Date: Mon Nov 2 16:02:36 2009 New Revision: 198798 URL: http://svn.freebsd.org/changeset/base/198798 Log: MFC 198696 Cleanup in r600_blit - Don't bother to assign vb until we know we have enough space - Add variables for sx2, sy2, dx2, dy2 so that these aren't calculated over and over, also reduce chance of errors. - Use switch to assign color/format Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/drm/r600_blit.c Modified: stable/7/sys/dev/drm/r600_blit.c ============================================================================== --- stable/7/sys/dev/drm/r600_blit.c Mon Nov 2 16:02:16 2009 (r198797) +++ stable/7/sys/dev/drm/r600_blit.c Mon Nov 2 16:02:36 2009 (r198798) @@ -1719,7 +1719,10 @@ r600_blit_copy(struct drm_device *dev, u32 *vb; vb = (u32 *) ((char *)dev->agp_buffer_map->handle + - dev_priv->blit_vb->offset + dev_priv->blit_vb->used); + dev_priv->blit_vb->offset + dev_priv->blit_vb->used); + DRM_DEBUG("src=0x%016llx, dst=0x%016llx, size=%d\n", + (unsigned long long)src_gpu_addr, + (unsigned long long)dst_gpu_addr, size_bytes); if ((size_bytes & 3) || (src_gpu_addr & 3) || (dst_gpu_addr & 3)) { max_bytes = 8192; @@ -1757,7 +1760,7 @@ r600_blit_copy(struct drm_device *dev, return; set_shaders(dev); vb = (u32 *) ((char *)dev->agp_buffer_map->handle + - dev_priv->blit_vb->offset + dev_priv->blit_vb->used); + dev_priv->blit_vb->offset + dev_priv->blit_vb->used); } vb[0] = i2f(dst_x); @@ -1847,7 +1850,7 @@ r600_blit_copy(struct drm_device *dev, return; set_shaders(dev); vb = (u32 *) ((char *)dev->agp_buffer_map->handle + - dev_priv->blit_vb->offset + dev_priv->blit_vb->used); + dev_priv->blit_vb->offset + dev_priv->blit_vb->used); } vb[0] = i2f(dst_x / 4); @@ -1913,12 +1916,10 @@ r600_blit_swap(struct drm_device *dev, { drm_radeon_private_t *dev_priv = dev->dev_private; int cb_format, tex_format; + int sx2, sy2, dx2, dy2; u64 vb_addr; u32 *vb; - vb = (u32 *) ((char *)dev->agp_buffer_map->handle + - dev_priv->blit_vb->offset + dev_priv->blit_vb->used); - if ((dev_priv->blit_vb->used + 48) > dev_priv->blit_vb->total) { dev_priv->blit_vb->used = 0; radeon_cp_discard_buffer(dev, dev_priv->blit_vb); @@ -1926,20 +1927,14 @@ r600_blit_swap(struct drm_device *dev, if (!dev_priv->blit_vb) return; set_shaders(dev); - vb = (u32 *) ((char *)dev->agp_buffer_map->handle + - dev_priv->blit_vb->offset + dev_priv->blit_vb->used); } + vb = (u32 *) ((char *)dev->agp_buffer_map->handle + + dev_priv->blit_vb->offset + dev_priv->blit_vb->used); - if (cpp == 4) { - cb_format = COLOR_8_8_8_8; - tex_format = FMT_8_8_8_8; - } else if (cpp == 2) { - cb_format = COLOR_5_6_5; - tex_format = FMT_5_6_5; - } else { - cb_format = COLOR_8; - tex_format = FMT_8; - } + sx2 = sx + w; + sy2 = sy + h; + dx2 = dx + w; + dy2 = dy + h; vb[0] = i2f(dx); vb[1] = i2f(dy); @@ -1947,31 +1942,46 @@ r600_blit_swap(struct drm_device *dev, vb[3] = i2f(sy); vb[4] = i2f(dx); - vb[5] = i2f(dy + h); + vb[5] = i2f(dy2); vb[6] = i2f(sx); - vb[7] = i2f(sy + h); + vb[7] = i2f(sy2); + + vb[8] = i2f(dx2); + vb[9] = i2f(dy2); + vb[10] = i2f(sx2); + vb[11] = i2f(sy2); - vb[8] = i2f(dx + w); - vb[9] = i2f(dy + h); - vb[10] = i2f(sx + w); - vb[11] = i2f(sy + h); + switch(cpp) { + case 4: + cb_format = COLOR_8_8_8_8; + tex_format = FMT_8_8_8_8; + break; + case 2: + cb_format = COLOR_5_6_5; + tex_format = FMT_5_6_5; + break; + default: + cb_format = COLOR_8; + tex_format = FMT_8; + break; + } /* src */ set_tex_resource(dev_priv, tex_format, src_pitch / cpp, - sy + h, src_pitch / cpp, + sy2, src_pitch / cpp, src_gpu_addr); cp_set_surface_sync(dev_priv, - R600_TC_ACTION_ENA, (src_pitch * (sy + h)), src_gpu_addr); + R600_TC_ACTION_ENA, src_pitch * sy2, src_gpu_addr); /* dst */ set_render_target(dev_priv, cb_format, - dst_pitch / cpp, dy + h, + dst_pitch / cpp, dy2, dst_gpu_addr); /* scissors */ - set_scissors(dev_priv, dx, dy, dx + w, dy + h); + set_scissors(dev_priv, dx, dy, dx2, dy2); /* Vertex buffer setup */ vb_addr = dev_priv->gart_buffers_offset + @@ -1984,7 +1994,7 @@ r600_blit_swap(struct drm_device *dev, cp_set_surface_sync(dev_priv, R600_CB_ACTION_ENA | R600_CB0_DEST_BASE_ENA, - dst_pitch * (dy + h), dst_gpu_addr); + dst_pitch * dy2, dst_gpu_addr); dev_priv->blit_vb->used += 12 * 4; } From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 16:22:59 2009 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 BD27E1065670; Mon, 2 Nov 2009 16:22:59 +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 A9A8C8FC0A; Mon, 2 Nov 2009 16: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 nA2GMxxv062409; Mon, 2 Nov 2009 16:22:59 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2GMxIS062407; Mon, 2 Nov 2009 16:22:59 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <200911021622.nA2GMxIS062407@svn.freebsd.org> From: Ed Maste Date: Mon, 2 Nov 2009 16:22:59 +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: r198799 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/aac dev/xen/xenpci 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, 02 Nov 2009 16:22:59 -0000 Author: emaste Date: Mon Nov 2 16:22:59 2009 New Revision: 198799 URL: http://svn.freebsd.org/changeset/base/198799 Log: MFC r198541: Do first controller time sync after 1 minute, as in Adaptec's vendor driver. Modified: 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/aac/aac.c stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/aac/aac.c ============================================================================== --- stable/8/sys/dev/aac/aac.c Mon Nov 2 16:02:36 2009 (r198798) +++ stable/8/sys/dev/aac/aac.c Mon Nov 2 16:22:59 2009 (r198799) @@ -354,7 +354,7 @@ aac_attach(struct aac_softc *sc) } mtx_lock(&sc->aac_io_lock); - callout_reset(&sc->aac_daemontime, 30 * 60 * hz, aac_daemon, sc); + callout_reset(&sc->aac_daemontime, 60 * hz, aac_daemon, sc); mtx_unlock(&sc->aac_io_lock); return(0); From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 16:25:01 2009 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 A24EE106566B; Mon, 2 Nov 2009 16:25:01 +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 8FE9A8FC18; Mon, 2 Nov 2009 16:25: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 nA2GP1ik062488; Mon, 2 Nov 2009 16:25:01 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2GP1cL062486; Mon, 2 Nov 2009 16:25:01 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <200911021625.nA2GP1cL062486@svn.freebsd.org> From: Ed Maste Date: Mon, 2 Nov 2009 16:25:01 +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: r198800 - in stable/7/sys: . contrib/pf dev/aac 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, 02 Nov 2009 16:25:01 -0000 Author: emaste Date: Mon Nov 2 16:25:00 2009 New Revision: 198800 URL: http://svn.freebsd.org/changeset/base/198800 Log: MFC r198541: Do first controller time sync after 1 minute, as in Adaptec's vendor driver. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/aac/aac.c Modified: stable/7/sys/dev/aac/aac.c ============================================================================== --- stable/7/sys/dev/aac/aac.c Mon Nov 2 16:22:59 2009 (r198799) +++ stable/7/sys/dev/aac/aac.c Mon Nov 2 16:25:00 2009 (r198800) @@ -354,7 +354,7 @@ aac_attach(struct aac_softc *sc) } mtx_lock(&sc->aac_io_lock); - callout_reset(&sc->aac_daemontime, 30 * 60 * hz, aac_daemon, sc); + callout_reset(&sc->aac_daemontime, 60 * hz, aac_daemon, sc); mtx_unlock(&sc->aac_io_lock); return(0); From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 16:25:15 2009 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 81D421065694; Mon, 2 Nov 2009 16:25:15 +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 6F97D8FC18; Mon, 2 Nov 2009 16:25: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 nA2GPFpC062535; Mon, 2 Nov 2009 16:25:15 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2GPF3U062533; Mon, 2 Nov 2009 16:25:15 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <200911021625.nA2GPF3U062533@svn.freebsd.org> From: Ed Maste Date: Mon, 2 Nov 2009 16:25:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198801 - in stable/6/sys: . conf contrib/pf dev/aac 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: Mon, 02 Nov 2009 16:25:15 -0000 Author: emaste Date: Mon Nov 2 16:25:15 2009 New Revision: 198801 URL: http://svn.freebsd.org/changeset/base/198801 Log: MFC r198541: Do first controller time sync after 1 minute, as in Adaptec's vendor driver. Modified: stable/6/sys/ (props changed) stable/6/sys/conf/ (props changed) stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/aac/aac.c stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/sys/dev/aac/aac.c ============================================================================== --- stable/6/sys/dev/aac/aac.c Mon Nov 2 16:25:00 2009 (r198800) +++ stable/6/sys/dev/aac/aac.c Mon Nov 2 16:25:15 2009 (r198801) @@ -354,7 +354,7 @@ aac_attach(struct aac_softc *sc) } mtx_lock(&sc->aac_io_lock); - callout_reset(&sc->aac_daemontime, 30 * 60 * hz, aac_daemon, sc); + callout_reset(&sc->aac_daemontime, 60 * hz, aac_daemon, sc); mtx_unlock(&sc->aac_io_lock); return(0); From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 16:27:34 2009 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 C3C07106566C; Mon, 2 Nov 2009 16:27:34 +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 B1FB68FC12; Mon, 2 Nov 2009 16:27: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 nA2GRYso062639; Mon, 2 Nov 2009 16:27:34 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2GRYPj062637; Mon, 2 Nov 2009 16:27:34 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <200911021627.nA2GRYPj062637@svn.freebsd.org> From: Ed Maste Date: Mon, 2 Nov 2009 16:27: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: r198802 - in stable/8/usr.sbin/ntp: . doc 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, 02 Nov 2009 16:27:34 -0000 Author: emaste Date: Mon Nov 2 16:27:34 2009 New Revision: 198802 URL: http://svn.freebsd.org/changeset/base/198802 Log: MFC r198029: Correct typo: thetime -> the time PR: docs/139447 Submitted by: Guido Falsi mad at madpilot dot net Modified: stable/8/usr.sbin/ntp/ (props changed) stable/8/usr.sbin/ntp/doc/ntpd.8 Modified: stable/8/usr.sbin/ntp/doc/ntpd.8 ============================================================================== --- stable/8/usr.sbin/ntp/doc/ntpd.8 Mon Nov 2 16:25:15 2009 (r198801) +++ stable/8/usr.sbin/ntp/doc/ntpd.8 Mon Nov 2 16:27:34 2009 (r198802) @@ -121,7 +121,7 @@ Normally, .Nm exits with a message to the system log if the offset exceeds the panic threshold, which is 1000 s by default. -This option allows thetime to be set to any value without restriction; +This option allows the time to be set to any value without restriction; however, this can happen only once. If the threshold is exceeded after that, .Nm From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 16:29:04 2009 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 609C01065672; Mon, 2 Nov 2009 16:29:04 +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 4EC338FC14; Mon, 2 Nov 2009 16:29: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 nA2GT44D062728; Mon, 2 Nov 2009 16:29:04 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2GT4jq062726; Mon, 2 Nov 2009 16:29:04 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <200911021629.nA2GT4jq062726@svn.freebsd.org> From: Ed Maste Date: Mon, 2 Nov 2009 16:29:04 +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: r198803 - in stable/7/usr.sbin/ntp: . doc 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, 02 Nov 2009 16:29:04 -0000 Author: emaste Date: Mon Nov 2 16:29:04 2009 New Revision: 198803 URL: http://svn.freebsd.org/changeset/base/198803 Log: MFC r198029: Correct typo: thetime -> the time PR: docs/139447 Submitted by: Guido Falsi mad at madpilot dot net Modified: stable/7/usr.sbin/ntp/ (props changed) stable/7/usr.sbin/ntp/doc/ntpd.8 Modified: stable/7/usr.sbin/ntp/doc/ntpd.8 ============================================================================== --- stable/7/usr.sbin/ntp/doc/ntpd.8 Mon Nov 2 16:27:34 2009 (r198802) +++ stable/7/usr.sbin/ntp/doc/ntpd.8 Mon Nov 2 16:29:04 2009 (r198803) @@ -121,7 +121,7 @@ Normally, .Nm exits with a message to the system log if the offset exceeds the panic threshold, which is 1000 s by default. -This option allows thetime to be set to any value without restriction; +This option allows the time to be set to any value without restriction; however, this can happen only once. If the threshold is exceeded after that, .Nm From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 16:29:54 2009 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 B40CB106566C; Mon, 2 Nov 2009 16:29:54 +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 A1FA68FC1F; Mon, 2 Nov 2009 16:29:54 +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 nA2GTsMY062782; Mon, 2 Nov 2009 16:29:54 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2GTsmw062780; Mon, 2 Nov 2009 16:29:54 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <200911021629.nA2GTsmw062780@svn.freebsd.org> From: Ed Maste Date: Mon, 2 Nov 2009 16:29:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198804 - in stable/6/usr.sbin/ntp: . doc 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, 02 Nov 2009 16:29:54 -0000 Author: emaste Date: Mon Nov 2 16:29:54 2009 New Revision: 198804 URL: http://svn.freebsd.org/changeset/base/198804 Log: MFC r198029: Correct typo: thetime -> the time PR: docs/139447 Submitted by: Guido Falsi mad at madpilot dot net Modified: stable/6/usr.sbin/ntp/ (props changed) stable/6/usr.sbin/ntp/doc/ (props changed) stable/6/usr.sbin/ntp/doc/ntpd.8 Modified: stable/6/usr.sbin/ntp/doc/ntpd.8 ============================================================================== --- stable/6/usr.sbin/ntp/doc/ntpd.8 Mon Nov 2 16:29:04 2009 (r198803) +++ stable/6/usr.sbin/ntp/doc/ntpd.8 Mon Nov 2 16:29:54 2009 (r198804) @@ -120,7 +120,7 @@ Normally, .Nm exits with a message to the system log if the offset exceeds the panic threshold, which is 1000 s by default. -This option allows thetime to be set to any value without restriction; +This option allows the time to be set to any value without restriction; however, this can happen only once. If the threshold is exceeded after that, .Nm From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 16:32:33 2009 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 42BD91065679; Mon, 2 Nov 2009 16:32:33 +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 2F7278FC1F; Mon, 2 Nov 2009 16:32: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 nA2GWXPF062888; Mon, 2 Nov 2009 16:32:33 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2GWXLC062886; Mon, 2 Nov 2009 16:32:33 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <200911021632.nA2GWXLC062886@svn.freebsd.org> From: Ed Maste Date: Mon, 2 Nov 2009 16:32:33 +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: r198805 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci 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, 02 Nov 2009 16:32:33 -0000 Author: emaste Date: Mon Nov 2 16:32:32 2009 New Revision: 198805 URL: http://svn.freebsd.org/changeset/base/198805 Log: MFC r197692: In fill_kinfo_thread, copy the thread's name into struct kinfo_proc even if it is empty. Otherwise the previous thread's name would remain in the struct and then be reported for this thread. Submitted by: Ryan Stone Modified: 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) stable/8/sys/kern/kern_proc.c Modified: stable/8/sys/kern/kern_proc.c ============================================================================== --- stable/8/sys/kern/kern_proc.c Mon Nov 2 16:29:54 2009 (r198804) +++ stable/8/sys/kern/kern_proc.c Mon Nov 2 16:32:32 2009 (r198805) @@ -847,8 +847,7 @@ fill_kinfo_thread(struct thread *td, str strlcpy(kp->ki_wmesg, td->td_wmesg, sizeof(kp->ki_wmesg)); else bzero(kp->ki_wmesg, sizeof(kp->ki_wmesg)); - if (td->td_name[0] != '\0') - strlcpy(kp->ki_ocomm, td->td_name, sizeof(kp->ki_ocomm)); + strlcpy(kp->ki_ocomm, td->td_name, sizeof(kp->ki_ocomm)); if (TD_ON_LOCK(td)) { kp->ki_kiflag |= KI_LOCKBLOCK; strlcpy(kp->ki_lockname, td->td_lockname, From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 16:46:07 2009 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 6575A1065894; Mon, 2 Nov 2009 16:46:07 +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 51CD08FC14; Mon, 2 Nov 2009 16:46: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 nA2Gk7R1063225; Mon, 2 Nov 2009 16:46:07 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2Gk7Sq063223; Mon, 2 Nov 2009 16:46:07 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <200911021646.nA2Gk7Sq063223@svn.freebsd.org> From: Ed Maste Date: Mon, 2 Nov 2009 16:46:07 +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: r198806 - in stable/8/sys: . amd64/include/xen boot/i386/libi386 cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci 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, 02 Nov 2009 16:46:07 -0000 Author: emaste Date: Mon Nov 2 16:46:06 2009 New Revision: 198806 URL: http://svn.freebsd.org/changeset/base/198806 Log: MFC r197082: If the pxe client is told to use / as the root path, honour that rather of trying to mount /pxeroot instead. PR: i386/106493 Submitted by: Andrey Russev Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/boot/i386/libi386/pxe.c 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/boot/i386/libi386/pxe.c ============================================================================== --- stable/8/sys/boot/i386/libi386/pxe.c Mon Nov 2 16:32:32 2009 (r198805) +++ stable/8/sys/boot/i386/libi386/pxe.c Mon Nov 2 16:46:06 2009 (r198806) @@ -282,7 +282,7 @@ pxe_open(struct open_file *f, ...) bootp(pxe_sock, BOOTP_PXE); if (rootip.s_addr == 0) rootip.s_addr = bootplayer.sip; - if (!rootpath[1]) + if (!rootpath[0]) strcpy(rootpath, PXENFSROOTPATH); for (i = 0; rootpath[i] != '\0' && i < FNAME_SIZE; i++) From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 16:46:53 2009 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 E70E41065679; Mon, 2 Nov 2009 16:46:53 +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 D4DDC8FC1F; Mon, 2 Nov 2009 16:46: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 nA2GkrHC063274; Mon, 2 Nov 2009 16:46:53 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2GkrCk063272; Mon, 2 Nov 2009 16:46:53 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <200911021646.nA2GkrCk063272@svn.freebsd.org> From: Ed Maste Date: Mon, 2 Nov 2009 16:46: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: r198807 - in stable/7/sys: . boot/i386/libi386 contrib/pf 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, 02 Nov 2009 16:46:54 -0000 Author: emaste Date: Mon Nov 2 16:46:53 2009 New Revision: 198807 URL: http://svn.freebsd.org/changeset/base/198807 Log: MFC r197082: If the pxe client is told to use / as the root path, honour that rather of trying to mount /pxeroot instead. PR: i386/106493 Submitted by: Andrey Russev Modified: stable/7/sys/ (props changed) stable/7/sys/boot/i386/libi386/pxe.c stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/boot/i386/libi386/pxe.c ============================================================================== --- stable/7/sys/boot/i386/libi386/pxe.c Mon Nov 2 16:46:06 2009 (r198806) +++ stable/7/sys/boot/i386/libi386/pxe.c Mon Nov 2 16:46:53 2009 (r198807) @@ -282,7 +282,7 @@ pxe_open(struct open_file *f, ...) bootp(pxe_sock, BOOTP_PXE); if (rootip.s_addr == 0) rootip.s_addr = bootplayer.sip; - if (!rootpath[1]) + if (!rootpath[0]) strcpy(rootpath, PXENFSROOTPATH); for (i = 0; rootpath[i] != '\0' && i < FNAME_SIZE; i++) From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 16:49:57 2009 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 59BC91065694; Mon, 2 Nov 2009 16:49:57 +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 4712A8FC17; Mon, 2 Nov 2009 16:49: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 nA2Gnvr5063382; Mon, 2 Nov 2009 16:49:57 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2GnvkY063380; Mon, 2 Nov 2009 16:49:57 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <200911021649.nA2GnvkY063380@svn.freebsd.org> From: Ed Maste Date: Mon, 2 Nov 2009 16:49:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198808 - in stable/6/sys: . boot/i386/libi386 conf contrib/pf 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: Mon, 02 Nov 2009 16:49:57 -0000 Author: emaste Date: Mon Nov 2 16:49:57 2009 New Revision: 198808 URL: http://svn.freebsd.org/changeset/base/198808 Log: MFC r197082: If the pxe client is told to use / as the root path, honour that rather of trying to mount /pxeroot instead. PR: i386/106493 Submitted by: Andrey Russev Modified: stable/6/sys/ (props changed) stable/6/sys/boot/i386/libi386/pxe.c stable/6/sys/conf/ (props changed) stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/sys/boot/i386/libi386/pxe.c ============================================================================== --- stable/6/sys/boot/i386/libi386/pxe.c Mon Nov 2 16:46:53 2009 (r198807) +++ stable/6/sys/boot/i386/libi386/pxe.c Mon Nov 2 16:49:57 2009 (r198808) @@ -282,7 +282,7 @@ pxe_open(struct open_file *f, ...) bootp(pxe_sock, BOOTP_PXE); if (rootip.s_addr == 0) rootip.s_addr = bootplayer.sip; - if (!rootpath[1]) + if (!rootpath[0]) strcpy(rootpath, PXENFSROOTPATH); for (i = 0; rootpath[i] != '\0' && i < FNAME_SIZE; i++) From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 16:54:24 2009 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 3FE621065695; Mon, 2 Nov 2009 16:54:24 +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 2C58F8FC08; Mon, 2 Nov 2009 16:54: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 nA2GsOA4063517; Mon, 2 Nov 2009 16:54:24 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2GsOo3063516; Mon, 2 Nov 2009 16:54:24 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <200911021654.nA2GsOo3063516@svn.freebsd.org> From: Ed Maste Date: Mon, 2 Nov 2009 16:54: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: r198809 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/aac dev/xen/xenpci 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, 02 Nov 2009 16:54:24 -0000 Author: emaste Date: Mon Nov 2 16:54:23 2009 New Revision: 198809 URL: http://svn.freebsd.org/changeset/base/198809 Log: MFC r197011: Increase AAC_CMD_TIMEOUT from 30s to 120s to help avoid spurious "COMMAND 0x........ TIMEOUT AFTER .. SECONDS" messages. Any commands that get truly stuck will still trigger the warning and the hardware health check, just a little bit later. Modified: 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/aac/aacvar.h stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/aac/aacvar.h ============================================================================== --- stable/8/sys/dev/aac/aacvar.h Mon Nov 2 16:49:57 2009 (r198808) +++ stable/8/sys/dev/aac/aacvar.h Mon Nov 2 16:54:23 2009 (r198809) @@ -88,7 +88,7 @@ /* * Timeout for normal commands */ -#define AAC_CMD_TIMEOUT 30 /* seconds */ +#define AAC_CMD_TIMEOUT 120 /* seconds */ /* * Rate at which we periodically check for timed out commands and kick the From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 16:55:34 2009 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 32B61106568B; Mon, 2 Nov 2009 16:55:34 +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 20C9C8FC13; Mon, 2 Nov 2009 16:55: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 nA2GtYRK063607; Mon, 2 Nov 2009 16:55:34 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2GtYrg063605; Mon, 2 Nov 2009 16:55:34 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <200911021655.nA2GtYrg063605@svn.freebsd.org> From: Ed Maste Date: Mon, 2 Nov 2009 16:55:34 +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: r198810 - in stable/7/sys: . contrib/pf dev/aac 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, 02 Nov 2009 16:55:34 -0000 Author: emaste Date: Mon Nov 2 16:55:33 2009 New Revision: 198810 URL: http://svn.freebsd.org/changeset/base/198810 Log: MFC r197011: Increase AAC_CMD_TIMEOUT from 30s to 120s to help avoid spurious "COMMAND 0x........ TIMEOUT AFTER .. SECONDS" messages. Any commands that get truly stuck will still trigger the warning and the hardware health check, just a little bit later. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/aac/aacvar.h Modified: stable/7/sys/dev/aac/aacvar.h ============================================================================== --- stable/7/sys/dev/aac/aacvar.h Mon Nov 2 16:54:23 2009 (r198809) +++ stable/7/sys/dev/aac/aacvar.h Mon Nov 2 16:55:33 2009 (r198810) @@ -88,7 +88,7 @@ /* * Timeout for normal commands */ -#define AAC_CMD_TIMEOUT 30 /* seconds */ +#define AAC_CMD_TIMEOUT 120 /* seconds */ /* * Rate at which we periodically check for timed out commands and kick the From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 16:56:59 2009 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 86307106568F; Mon, 2 Nov 2009 16:56:59 +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 74D2F8FC19; Mon, 2 Nov 2009 16:56: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 nA2Gux6h063689; Mon, 2 Nov 2009 16:56:59 GMT (envelope-from ivoras@svn.freebsd.org) Received: (from ivoras@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2GuxK1063687; Mon, 2 Nov 2009 16:56:59 GMT (envelope-from ivoras@svn.freebsd.org) Message-Id: <200911021656.nA2GuxK1063687@svn.freebsd.org> From: Ivan Voras Date: Mon, 2 Nov 2009 16:56: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: r198811 - head/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: Mon, 02 Nov 2009 16:56:59 -0000 Author: ivoras Date: Mon Nov 2 16:56:59 2009 New Revision: 198811 URL: http://svn.freebsd.org/changeset/base/198811 Log: Add sysctl documentation strings. The descriptions are derived from tuning(7). One of the descriptions references tuning(7) because it is too complex to adequatly describe here (it is not a simple boolean sysctl) and users should be warned to that. Reviewed by: alc, kib Approved by: gnn (mentor) Modified: head/sys/vm/swap_pager.c Modified: head/sys/vm/swap_pager.c ============================================================================== --- head/sys/vm/swap_pager.c Mon Nov 2 16:55:33 2009 (r198810) +++ head/sys/vm/swap_pager.c Mon Nov 2 16:56:59 2009 (r198811) @@ -155,11 +155,15 @@ int swap_pager_avail; static int swdev_syscall_active = 0; /* serialize swap(on|off) */ static vm_ooffset_t swap_total; -SYSCTL_QUAD(_vm, OID_AUTO, swap_total, CTLFLAG_RD, &swap_total, 0, ""); +SYSCTL_QUAD(_vm, OID_AUTO, swap_total, CTLFLAG_RD, &swap_total, 0, + "Total amount of available swap storage."); static vm_ooffset_t swap_reserved; -SYSCTL_QUAD(_vm, OID_AUTO, swap_reserved, CTLFLAG_RD, &swap_reserved, 0, ""); +SYSCTL_QUAD(_vm, OID_AUTO, swap_reserved, CTLFLAG_RD, &swap_reserved, 0, + "Amount of swap storage needed to back all allocated anonymous memory."); static int overcommit = 0; -SYSCTL_INT(_vm, OID_AUTO, overcommit, CTLFLAG_RW, &overcommit, 0, ""); +SYSCTL_INT(_vm, OID_AUTO, overcommit, CTLFLAG_RW, &overcommit, 0, + "Configure virtual memory overcommit behavior. See tuning(7) " + "for details."); /* bits from overcommit */ #define SWAP_RESERVE_FORCE_ON (1 << 0) From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 17:45:40 2009 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 43CB3106568B; Mon, 2 Nov 2009 17:45:40 +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 328638FC25; Mon, 2 Nov 2009 17: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 nA2HjecS064715; Mon, 2 Nov 2009 17:45:40 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2Hjewx064713; Mon, 2 Nov 2009 17:45:40 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200911021745.nA2Hjewx064713@svn.freebsd.org> From: Alan Cox Date: Mon, 2 Nov 2009 17: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: r198812 - head/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: Mon, 02 Nov 2009 17:45:40 -0000 Author: alc Date: Mon Nov 2 17:45:39 2009 New Revision: 198812 URL: http://svn.freebsd.org/changeset/base/198812 Log: Avoid pointless calls to pmap_protect(). Reviewed by: kib Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Mon Nov 2 16:56:59 2009 (r198811) +++ head/sys/vm/vm_map.c Mon Nov 2 17:45:39 2009 (r198812) @@ -1914,10 +1914,10 @@ vm_map_protect(vm_map_t map, vm_offset_t } /* - * Update physical map if necessary. Worry about copy-on-write - * here. + * When restricting access, update the physical map. Worry + * about copy-on-write here. */ - if (current->protection != old_prot) { + if ((old_prot & ~current->protection) != 0) { #define MASK(entry) (((entry)->eflags & MAP_ENTRY_COW) ? ~VM_PROT_WRITE : \ VM_PROT_ALL) pmap_protect(map->pmap, current->start, From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 18:08:20 2009 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 E39D0106566C; Mon, 2 Nov 2009 18:08:19 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout027.mac.com (asmtpout027.mac.com [17.148.16.102]) by mx1.freebsd.org (Postfix) with ESMTP id C979E8FC12; Mon, 2 Nov 2009 18:08:19 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=us-ascii; format=flowed; delsp=yes Received: from macbook-pro.jnpr.net (natint3.juniper.net [66.129.224.36]) by asmtp027.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0KSH007F6UDT5F30@asmtp027.mac.com>; Mon, 02 Nov 2009 10:08:19 -0800 (PST) From: Marcel Moolenaar In-reply-to: <20091102155414.GR1293@hoeg.nl> Date: Mon, 02 Nov 2009 10:08:17 -0800 Message-id: References: <20091101011212.GG1293@hoeg.nl> <20091102100435.GA67211@walton.maths.tcd.ie> <20091102102404.GP1293@hoeg.nl> <20091102.084616.-1258100553.imp@bsdimp.com> <20091102155414.GR1293@hoeg.nl> To: Ed Schouten X-Mailer: Apple Mail (2.1076) Cc: dwmalone@maths.tcd.ie, svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, "M. Warner Losh" Subject: Re: svn commit: r198706 - 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: Mon, 02 Nov 2009 18:08:21 -0000 On Nov 2, 2009, at 7:54 AM, Ed Schouten wrote: > * M. Warner Losh wrote: >> And you haven't answered my question: Have you confirmed that there's >> no ABI changes on all platforms? > > Confirmed on all platforms? No. I've only tested it on i386 and > amd64. I > think someone also tested it on arm, so this makes me believe other > architectures will also work as expected. When you bank on alignment, don't just test i386 and amd64. Please put in the extra effort to contact platform owners to give you a thumbs up. While I'm responding: please do a version bump as Warner suggested. The pain of needing one without having done so, is infinitely more than the effort or repo bloat can be together. Oh, and no, I don't think this changes the ABI :-) For a change that does change the ABI: revision 198506 tcsh(1) dumps core with a sig 11... Trick or treat... -- Marcel Moolenaar xcllnt@mac.com From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 18:15:11 2009 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 7EC401065672; Mon, 2 Nov 2009 18:15:11 +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 6D41B8FC0C; Mon, 2 Nov 2009 18:15: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 nA2IFBj1065407; Mon, 2 Nov 2009 18:15:11 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2IFBPr065404; Mon, 2 Nov 2009 18:15:11 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200911021815.nA2IFBPr065404@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 2 Nov 2009 18:15: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: r198813 - head/sys/dev/mii 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, 02 Nov 2009 18:15:11 -0000 Author: yongari Date: Mon Nov 2 18:15:11 2009 New Revision: 198813 URL: http://svn.freebsd.org/changeset/base/198813 Log: Add BCM5761 PHY id. Modified: head/sys/dev/mii/brgphy.c head/sys/dev/mii/miidevs Modified: head/sys/dev/mii/brgphy.c ============================================================================== --- head/sys/dev/mii/brgphy.c Mon Nov 2 17:45:39 2009 (r198812) +++ head/sys/dev/mii/brgphy.c Mon Nov 2 18:15:11 2009 (r198813) @@ -134,6 +134,7 @@ static const struct mii_phydesc brgphys[ MII_PHY_DESC(xxBROADCOM_ALT1, BCM5709CAX), MII_PHY_DESC(xxBROADCOM_ALT1, BCM5722), MII_PHY_DESC(xxBROADCOM_ALT1, BCM5709C), + MII_PHY_DESC(xxBROADCOM_ALT1, BCM5761), MII_PHY_DESC(BROADCOM2, BCM5906), MII_PHY_END }; Modified: head/sys/dev/mii/miidevs ============================================================================== --- head/sys/dev/mii/miidevs Mon Nov 2 17:45:39 2009 (r198812) +++ head/sys/dev/mii/miidevs Mon Nov 2 18:15:11 2009 (r198813) @@ -154,6 +154,7 @@ model xxBROADCOM_ALT1 BCM5708S 0x0015 BC model xxBROADCOM_ALT1 BCM5709CAX 0x002c BCM5709C(AX) 10/100/1000baseTX PHY model xxBROADCOM_ALT1 BCM5722 0x002d BCM5722 10/100/1000baseTX PHY model xxBROADCOM_ALT1 BCM5709C 0x003c BCM5709C 10/100/1000baseTX PHY +model xxBROADCOM_ALT1 BCM5761 0x003d BCM5761 10/100/1000baseTX PHY model BROADCOM2 BCM5906 0x0004 BCM5906 10/100baseTX PHY /* Cicada Semiconductor PHYs (now owned by Vitesse?) */ From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 18:20:25 2009 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id C975210656AC for ; Mon, 2 Nov 2009 18:20:25 +0000 (UTC) (envelope-from cperciva@freebsd.org) Received: from xps.daemonology.net (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx2.freebsd.org (Postfix) with SMTP id 194EF161B21 for ; Mon, 2 Nov 2009 18:20:20 +0000 (UTC) Received: (qmail 21282 invoked from network); 2 Nov 2009 18:20:19 -0000 Received: from unknown (HELO xps.daemonology.net) (127.0.0.1) by localhost with SMTP; 2 Nov 2009 18:20:19 -0000 Message-ID: <4AEF22E3.5070701@freebsd.org> Date: Mon, 02 Nov 2009 10:20:19 -0800 From: Colin Percival User-Agent: Thunderbird 2.0.0.23 (X11/20090919) MIME-Version: 1.0 To: Robert Watson References: <200911020721.nA27LDq1048764@svn.freebsd.org> In-Reply-To: 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: r198781 - head/lib/libc/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: Mon, 02 Nov 2009 18:20:25 -0000 Robert Watson wrote: > On Mon, 2 Nov 2009, Colin Percival wrote: >> Attempt to reduce accidental foot-shooting by pointing out that >> accept(2)ed sockets do not necessarily inherit O_NONBLOCK from >> listening sockets on non-FreeBSD platforms. > > I wonder how much trouble we should go to to document bugs in other > systems as non-portabilities for features that work in our system. I don't think there's any simple rule to apply here except "use common sense". One can argue that FreeBSD man pages exist for the purpose of documenting FreeBSD; but I'd also like to think that FreeBSD is a good development platform for writing portable applications, so alerting our users to potentially non-portable code certainly has some value. (And there are many other examples of "portable programs should not..." in our man pages, not just the one I added.) The non-portability I just documented was a particularly obnoxious one, since in event-driven code it can go unnoticed for a long time -- as I just recently discovered. > I think a more general caution for accept(2) might instead be: > > BUGS > The inheritence of socket options from a listen socket to a newly > accepted socket is inconsistent across protocols, and non-portable. I was originally going to write it that way, but when I looked at the existing text I saw that it only mentioned inheriting O_NONBLOCK and said nothing about other options -- so I figured that it was appropriate to follow suit and only mention O_NONBLOCK in saying what was non-portable. -- Colin Percival Security Officer, FreeBSD | freebsd.org | The power to serve Founder / author, Tarsnap | tarsnap.com | Online backups for the truly paranoid From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 18:29:16 2009 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 B22C4106568B; Mon, 2 Nov 2009 18:29:16 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 8B1948FC19; Mon, 2 Nov 2009 18:29:16 +0000 (UTC) Received: from [192.168.2.101] (host217-43-176-60.range217-43.btcentralplus.com [217.43.176.60]) by cyrus.watson.org (Postfix) with ESMTPSA id CCD7F46B06; Mon, 2 Nov 2009 13:29:14 -0500 (EST) Mime-Version: 1.0 (Apple Message framework v1076) Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes From: "Robert N. M. Watson" In-Reply-To: <4AEF22E3.5070701@freebsd.org> Date: Mon, 2 Nov 2009 18:29:12 +0000 Content-Transfer-Encoding: 7bit Message-Id: References: <200911020721.nA27LDq1048764@svn.freebsd.org> <4AEF22E3.5070701@freebsd.org> To: Colin Percival X-Mailer: Apple Mail (2.1076) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r198781 - head/lib/libc/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: Mon, 02 Nov 2009 18:29:16 -0000 On 2 Nov 2009, at 18:20, Colin Percival wrote: >> I think a more general caution for accept(2) might instead be: >> >> BUGS >> The inheritence of socket options from a listen socket to a newly >> accepted socket is inconsistent across protocols, and non- >> portable. > > I was originally going to write it that way, but when I looked at the > existing text I saw that it only mentioned inheriting O_NONBLOCK and > said > nothing about other options -- so I figured that it was appropriate to > follow suit and only mention O_NONBLOCK in saying what was non- > portable. We preserve a number of socket options and other properties across accept(2), but not all. For example, we do preserve most socket-level options, linger state, routing fib number, and socket buffer sizing/ watermarks, as well as many connection properties such as TCP_NODELAY. However, if history is anything to go by, we also fail to preserve quite a few properties, and we've had a number of bug fixes over the years topping up the list of things inherited over accept. Robert From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 18:35:07 2009 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 4681B106568F; Mon, 2 Nov 2009 18:35:06 +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 34F588FC1A; Mon, 2 Nov 2009 18:35: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 nA2IZ6e9065998; Mon, 2 Nov 2009 18:35:06 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2IZ6WI065996; Mon, 2 Nov 2009 18:35:06 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200911021835.nA2IZ6WI065996@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 2 Nov 2009 18:35: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: r198814 - head/sys/dev/re 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, 02 Nov 2009 18:35:07 -0000 Author: yongari Date: Mon Nov 2 18:35:05 2009 New Revision: 198814 URL: http://svn.freebsd.org/changeset/base/198814 Log: Add a check to know whether driver is still running after reacquiring driver lock in Rx handler. re(4) drops a driver lock before passing received frame to upper stack and reacquire the lock. During the time window ioctl calls could be executed and if the ioctl was interface down request, driver will stop the controller and free allocated mbufs. After that when driver comes back to Rx handler again it does not know what was happend so it could access free mbufs which in turn cause panic. Reported by: Norbert Papke < npapk <> acm dot org > Tested by: Norbert Papke < npapk <> acm dot org > Modified: head/sys/dev/re/if_re.c Modified: head/sys/dev/re/if_re.c ============================================================================== --- head/sys/dev/re/if_re.c Mon Nov 2 18:15:11 2009 (r198813) +++ head/sys/dev/re/if_re.c Mon Nov 2 18:35:05 2009 (r198814) @@ -1817,6 +1817,8 @@ re_rxeof(struct rl_softc *sc, int *rx_np for (i = sc->rl_ldata.rl_rx_prodidx; maxpkt > 0; i = RL_RX_DESC_NXT(sc, i)) { + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) + break; cur_rx = &sc->rl_ldata.rl_rx_list[i]; rxstat = le32toh(cur_rx->rl_cmdstat); if ((rxstat & RL_RDESC_STAT_OWN) != 0) From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 18:44:02 2009 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 B0C7F106566B; Mon, 2 Nov 2009 18:44:02 +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 84D668FC1B; Mon, 2 Nov 2009 18:44: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 nA2Ii2op066254; Mon, 2 Nov 2009 18:44:02 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2Ii2br066253; Mon, 2 Nov 2009 18:44:02 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200911021844.nA2Ii2br066253@svn.freebsd.org> From: Alan Cox Date: Mon, 2 Nov 2009 18:44: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: r198815 - stable/8/lib/libc/stdlib 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, 02 Nov 2009 18:44:02 -0000 Author: alc Date: Mon Nov 2 18:44:01 2009 New Revision: 198815 URL: http://svn.freebsd.org/changeset/base/198815 Log: MFC r197524 Make malloc(3) superpage aware. Modified: stable/8/lib/libc/stdlib/ (props changed) stable/8/lib/libc/stdlib/malloc.3 stable/8/lib/libc/stdlib/malloc.c Modified: stable/8/lib/libc/stdlib/malloc.3 ============================================================================== --- stable/8/lib/libc/stdlib/malloc.3 Mon Nov 2 18:35:05 2009 (r198814) +++ stable/8/lib/libc/stdlib/malloc.3 Mon Nov 2 18:44:01 2009 (r198815) @@ -32,7 +32,7 @@ .\" @(#)malloc.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd August 26, 2008 +.Dd September 26, 2009 .Dt MALLOC 3 .Os .Sh NAME @@ -245,7 +245,8 @@ will be initialized to 0x5a. This is intended for debugging and will impact performance negatively. .It K Double/halve the virtual memory chunk size. -The default chunk size is 1 MB. +The default chunk size is the maximum of 1 MB and the largest +page size that is less than or equal to 4 MB. .It M Use .Xr mmap 2 @@ -561,6 +562,7 @@ _malloc_options = "X"; .Xr alloca 3 , .Xr atexit 3 , .Xr getpagesize 3 , +.Xr getpagesizes 3 , .Xr memory 3 , .Xr posix_memalign 3 .Sh STANDARDS Modified: stable/8/lib/libc/stdlib/malloc.c ============================================================================== --- stable/8/lib/libc/stdlib/malloc.c Mon Nov 2 18:35:05 2009 (r198814) +++ stable/8/lib/libc/stdlib/malloc.c Mon Nov 2 18:44:01 2009 (r198815) @@ -4795,6 +4795,21 @@ malloc_init_hard(void) } } + /* + * Increase the chunk size to the largest page size that is greater + * than the default chunk size and less than or equal to 4MB. + */ + { + size_t pagesizes[MAXPAGESIZES]; + int k, nsizes; + + nsizes = getpagesizes(pagesizes, MAXPAGESIZES); + for (k = 0; k < nsizes; k++) + if (pagesizes[k] <= (1LU << 22)) + while ((1LU << opt_chunk_2pow) < pagesizes[k]) + opt_chunk_2pow++; + } + for (i = 0; i < 3; i++) { unsigned j; From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 18:51:24 2009 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 CA71E106566B; Mon, 2 Nov 2009 18:51:24 +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 B94278FC18; Mon, 2 Nov 2009 18:51: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 nA2IpOx9066446; Mon, 2 Nov 2009 18:51:24 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2IpOZ4066444; Mon, 2 Nov 2009 18:51:24 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <200911021851.nA2IpOZ4066444@svn.freebsd.org> From: Rui Paulo Date: Mon, 2 Nov 2009 18:51:24 +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: r198816 - head/sys/compat/ndis 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, 02 Nov 2009 18:51:24 -0000 Author: rpaulo Date: Mon Nov 2 18:51:24 2009 New Revision: 198816 URL: http://svn.freebsd.org/changeset/base/198816 Log: Fix a non-style change that snuck in. Spotted by: danfe Modified: head/sys/compat/ndis/kern_ndis.c Modified: head/sys/compat/ndis/kern_ndis.c ============================================================================== --- head/sys/compat/ndis/kern_ndis.c Mon Nov 2 18:44:01 2009 (r198815) +++ head/sys/compat/ndis/kern_ndis.c Mon Nov 2 18:51:24 2009 (r198816) @@ -1200,7 +1200,7 @@ ndis_init_nic(arg) NDIS_LOCK(sc); sc->ndis_block->nmb_miniportadapterctx = NULL; NDIS_UNLOCK(sc); - return (status); + return (ENXIO); } /* From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 18:55:05 2009 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 861AE106568B for ; Mon, 2 Nov 2009 18:55:05 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.187]) by mx1.freebsd.org (Postfix) with ESMTP id F09478FC1B for ; Mon, 2 Nov 2009 18:55:04 +0000 (UTC) Received: from vampire.homelinux.org (dslb-088-067-242-013.pools.arcor-ip.net [88.67.242.13]) by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis) id 0MEaVh-1My8BK2Smv-00FwbL; Mon, 02 Nov 2009 19:55:03 +0100 Received: (qmail 75869 invoked from network); 2 Nov 2009 18:55:02 -0000 Received: from kvm.laiers.local (HELO kvm.localnet) (192.168.4.188) by laiers.local with SMTP; 2 Nov 2009 18:55:02 -0000 From: Max Laier Organization: FreeBSD To: Colin Percival Date: Mon, 2 Nov 2009 19:55:02 +0100 User-Agent: KMail/1.12.2 (Linux/2.6.31-ARCH; KDE/4.3.2; x86_64; ; ) References: <200911020721.nA27LDq1048764@svn.freebsd.org> <4AEF22E3.5070701@freebsd.org> In-Reply-To: <4AEF22E3.5070701@freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <200911021955.02459.max@love2party.net> X-Provags-ID: V01U2FsdGVkX184ESEz+embCEgc89mkIOZ5KOXXKhdlZEfCY/q n8YHpw4nKTqs5fx72ZUdLzue83YJGVhNaBcDiq7COA8bSQ3GOC Ep5UiUd+xNblAx4+9UqaA== Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Robert Watson Subject: Re: svn commit: r198781 - head/lib/libc/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: Mon, 02 Nov 2009 18:55:05 -0000 On Monday 02 November 2009 19:20:19 Colin Percival wrote: > Robert Watson wrote: > > On Mon, 2 Nov 2009, Colin Percival wrote: > >> Attempt to reduce accidental foot-shooting by pointing out that > >> accept(2)ed sockets do not necessarily inherit O_NONBLOCK from > >> listening sockets on non-FreeBSD platforms. > > > > I wonder how much trouble we should go to to document bugs in other > > systems as non-portabilities for features that work in our system. > > I don't think there's any simple rule to apply here except "use common > sense". One can argue that FreeBSD man pages exist for the purpose of > documenting FreeBSD; but I'd also like to think that FreeBSD is a good > development platform for writing portable applications, so alerting our > users to potentially non-portable code certainly has some value. (And +1 ... FreeBSD is such a great development platform specifically because of the complete man page collection. I'd argue, however, that we should keep the portability notes to the fact that there might be a difference - without going into too much detail what/where and why that difference is. In addition, the more detail we add, the more likely it is that the information grows stale as others realize that they should follow our lead ;) > there are many other examples of "portable programs should not..." in > our man pages, not just the one I added.) > > The non-portability I just documented was a particularly obnoxious one, > since in event-driven code it can go unnoticed for a long time -- as I > just recently discovered. > > > I think a more general caution for accept(2) might instead be: > > > > BUGS > > The inheritence of socket options from a listen socket to a newly > > accepted socket is inconsistent across protocols, and non-portable. > > I was originally going to write it that way, but when I looked at the > existing text I saw that it only mentioned inheriting O_NONBLOCK and said > nothing about other options -- so I figured that it was appropriate to > follow suit and only mention O_NONBLOCK in saying what was non-portable. > -- /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 19:01:20 2009 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 632EE106566B; Mon, 2 Nov 2009 19:01:20 +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 507228FC12; Mon, 2 Nov 2009 19:01: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 nA2J1K0r066730; Mon, 2 Nov 2009 19:01:20 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2J1K8b066728; Mon, 2 Nov 2009 19:01:20 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <200911021901.nA2J1K8b066728@svn.freebsd.org> From: Ed Maste Date: Mon, 2 Nov 2009 19:01:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198817 - in stable/6/sys: . conf contrib/pf dev/aac 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: Mon, 02 Nov 2009 19:01:20 -0000 Author: emaste Date: Mon Nov 2 19:01:20 2009 New Revision: 198817 URL: http://svn.freebsd.org/changeset/base/198817 Log: MFC r197011: Increase AAC_CMD_TIMEOUT from 30s to 120s to help avoid spurious "COMMAND 0x........ TIMEOUT AFTER .. SECONDS" messages. Any commands that get truly stuck will still trigger the warning and the hardware health check, just a little bit later. Modified: stable/6/sys/ (props changed) stable/6/sys/conf/ (props changed) stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/aac/aacvar.h stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/sys/dev/aac/aacvar.h ============================================================================== --- stable/6/sys/dev/aac/aacvar.h Mon Nov 2 18:51:24 2009 (r198816) +++ stable/6/sys/dev/aac/aacvar.h Mon Nov 2 19:01:20 2009 (r198817) @@ -88,7 +88,7 @@ /* * Timeout for normal commands */ -#define AAC_CMD_TIMEOUT 30 /* seconds */ +#define AAC_CMD_TIMEOUT 120 /* seconds */ /* * Rate at which we periodically check for timed out commands and kick the From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 19:02:32 2009 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 33156106568F; Mon, 2 Nov 2009 19:02:32 +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 209228FC1F; Mon, 2 Nov 2009 19:02: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 nA2J2WwL066785; Mon, 2 Nov 2009 19:02:32 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2J2Vvb066782; Mon, 2 Nov 2009 19:02:31 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200911021902.nA2J2Vvb066782@svn.freebsd.org> From: Alexander Motin Date: Mon, 2 Nov 2009 19:02: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: r198818 - in head/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: Mon, 02 Nov 2009 19:02:32 -0000 Author: mav Date: Mon Nov 2 19:02:31 2009 New Revision: 198818 URL: http://svn.freebsd.org/changeset/base/198818 Log: Add IDs for nVidia MCP65/77/79/89 SATA conntrollers. Modified: head/sys/dev/ata/ata-pci.h head/sys/dev/ata/chipsets/ata-nvidia.c Modified: head/sys/dev/ata/ata-pci.h ============================================================================== --- head/sys/dev/ata/ata-pci.h Mon Nov 2 19:01:20 2009 (r198817) +++ head/sys/dev/ata/ata-pci.h Mon Nov 2 19:02:31 2009 (r198818) @@ -260,6 +260,15 @@ struct ata_pci_controller { #define ATA_NFORCE_MCP61_S2 0x03f610de #define ATA_NFORCE_MCP61_S3 0x03f710de #define ATA_NFORCE_MCP65 0x044810de +#define ATA_NFORCE_MCP65_A0 0x044c10de +#define ATA_NFORCE_MCP65_A1 0x044d10de +#define ATA_NFORCE_MCP65_A2 0x044e10de +#define ATA_NFORCE_MCP65_A3 0x044f10de +#define ATA_NFORCE_MCP65_A4 0x045c10de +#define ATA_NFORCE_MCP65_A5 0x045d10de +#define ATA_NFORCE_MCP65_A6 0x045e10de +#define ATA_NFORCE_MCP65_A7 0x045f10de +#define ATA_NFORCE_MCP67 0x056010de #define ATA_NFORCE_MCP67_A0 0x055010de #define ATA_NFORCE_MCP67_A1 0x055110de #define ATA_NFORCE_MCP67_A2 0x055210de @@ -273,7 +282,6 @@ struct ata_pci_controller { #define ATA_NFORCE_MCP67_AA 0x055A10de #define ATA_NFORCE_MCP67_AB 0x055B10de #define ATA_NFORCE_MCP67_AC 0x058410de -#define ATA_NFORCE_MCP67 0x056010de #define ATA_NFORCE_MCP73 0x056c10de #define ATA_NFORCE_MCP73_A0 0x07f010de #define ATA_NFORCE_MCP73_A1 0x07f110de @@ -288,6 +296,42 @@ struct ata_pci_controller { #define ATA_NFORCE_MCP73_AA 0x07fa10de #define ATA_NFORCE_MCP73_AB 0x07fb10de #define ATA_NFORCE_MCP77 0x075910de +#define ATA_NFORCE_MCP77_A0 0x0ad010de +#define ATA_NFORCE_MCP77_A1 0x0ad110de +#define ATA_NFORCE_MCP77_A2 0x0ad210de +#define ATA_NFORCE_MCP77_A3 0x0ad310de +#define ATA_NFORCE_MCP77_A4 0x0ad410de +#define ATA_NFORCE_MCP77_A5 0x0ad510de +#define ATA_NFORCE_MCP77_A6 0x0ad610de +#define ATA_NFORCE_MCP77_A7 0x0ad710de +#define ATA_NFORCE_MCP77_A8 0x0ad810de +#define ATA_NFORCE_MCP77_A9 0x0ad910de +#define ATA_NFORCE_MCP77_AA 0x0ada10de +#define ATA_NFORCE_MCP77_AB 0x0adb10de +#define ATA_NFORCE_MCP79_A0 0x0ab410de +#define ATA_NFORCE_MCP79_A1 0x0ab510de +#define ATA_NFORCE_MCP79_A2 0x0ab610de +#define ATA_NFORCE_MCP79_A3 0x0ab710de +#define ATA_NFORCE_MCP79_A4 0x0ab810de +#define ATA_NFORCE_MCP79_A5 0x0ab910de +#define ATA_NFORCE_MCP79_A6 0x0aba10de +#define ATA_NFORCE_MCP79_A7 0x0abb10de +#define ATA_NFORCE_MCP79_A8 0x0abc10de +#define ATA_NFORCE_MCP79_A9 0x0abd10de +#define ATA_NFORCE_MCP79_AA 0x0abe10de +#define ATA_NFORCE_MCP79_AB 0x0abf10de +#define ATA_NFORCE_MCP89_A0 0x0d8410de +#define ATA_NFORCE_MCP89_A1 0x0d8510de +#define ATA_NFORCE_MCP89_A2 0x0d8610de +#define ATA_NFORCE_MCP89_A3 0x0d8710de +#define ATA_NFORCE_MCP89_A4 0x0d8810de +#define ATA_NFORCE_MCP89_A5 0x0d8910de +#define ATA_NFORCE_MCP89_A6 0x0d8a10de +#define ATA_NFORCE_MCP89_A7 0x0d8b10de +#define ATA_NFORCE_MCP89_A8 0x0d8c10de +#define ATA_NFORCE_MCP89_A9 0x0d8d10de +#define ATA_NFORCE_MCP89_AA 0x0d8e10de +#define ATA_NFORCE_MCP89_AB 0x0d8f10de #define ATA_PROMISE_ID 0x105a #define ATA_PDC20246 0x4d33105a Modified: head/sys/dev/ata/chipsets/ata-nvidia.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-nvidia.c Mon Nov 2 19:01:20 2009 (r198817) +++ head/sys/dev/ata/chipsets/ata-nvidia.c Mon Nov 2 19:02:31 2009 (r198818) @@ -97,6 +97,14 @@ ata_nvidia_probe(device_t dev) { ATA_NFORCE_MCP61_S2, 0, NV4|NVQ, 0, ATA_SA300, "nForce MCP61" }, { ATA_NFORCE_MCP61_S3, 0, NV4|NVQ, 0, ATA_SA300, "nForce MCP61" }, { ATA_NFORCE_MCP65, 0, 0, 0, ATA_UDMA6, "nForce MCP65" }, + { ATA_NFORCE_MCP65_A0, 0, NVAHCI, 0, ATA_SA300, "nForce MCP65" }, + { ATA_NFORCE_MCP65_A1, 0, NVAHCI, 0, ATA_SA300, "nForce MCP65" }, + { ATA_NFORCE_MCP65_A2, 0, NVAHCI, 0, ATA_SA300, "nForce MCP65" }, + { ATA_NFORCE_MCP65_A3, 0, NVAHCI, 0, ATA_SA300, "nForce MCP65" }, + { ATA_NFORCE_MCP65_A4, 0, NVAHCI, 0, ATA_SA300, "nForce MCP65" }, + { ATA_NFORCE_MCP65_A5, 0, NVAHCI, 0, ATA_SA300, "nForce MCP65" }, + { ATA_NFORCE_MCP65_A6, 0, NVAHCI, 0, ATA_SA300, "nForce MCP65" }, + { ATA_NFORCE_MCP65_A7, 0, NVAHCI, 0, ATA_SA300, "nForce MCP65" }, { ATA_NFORCE_MCP67, 0, 0, 0, ATA_UDMA6, "nForce MCP67" }, { ATA_NFORCE_MCP67_A0, 0, NVAHCI, 0, ATA_SA300, "nForce MCP67" }, { ATA_NFORCE_MCP67_A1, 0, NVAHCI, 0, ATA_SA300, "nForce MCP67" }, @@ -125,6 +133,42 @@ ata_nvidia_probe(device_t dev) { ATA_NFORCE_MCP73_AA, 0, NVAHCI, 0, ATA_SA300, "nForce MCP73" }, { ATA_NFORCE_MCP73_AB, 0, NVAHCI, 0, ATA_SA300, "nForce MCP73" }, { ATA_NFORCE_MCP77, 0, 0, 0, ATA_UDMA6, "nForce MCP77" }, + { ATA_NFORCE_MCP77_A0, 0, NVAHCI, 0, ATA_SA300, "nForce MCP77" }, + { ATA_NFORCE_MCP77_A1, 0, NVAHCI, 0, ATA_SA300, "nForce MCP77" }, + { ATA_NFORCE_MCP77_A2, 0, NVAHCI, 0, ATA_SA300, "nForce MCP77" }, + { ATA_NFORCE_MCP77_A3, 0, NVAHCI, 0, ATA_SA300, "nForce MCP77" }, + { ATA_NFORCE_MCP77_A4, 0, NVAHCI, 0, ATA_SA300, "nForce MCP77" }, + { ATA_NFORCE_MCP77_A5, 0, NVAHCI, 0, ATA_SA300, "nForce MCP77" }, + { ATA_NFORCE_MCP77_A6, 0, NVAHCI, 0, ATA_SA300, "nForce MCP77" }, + { ATA_NFORCE_MCP77_A7, 0, NVAHCI, 0, ATA_SA300, "nForce MCP77" }, + { ATA_NFORCE_MCP77_A8, 0, NVAHCI, 0, ATA_SA300, "nForce MCP77" }, + { ATA_NFORCE_MCP77_A9, 0, NVAHCI, 0, ATA_SA300, "nForce MCP77" }, + { ATA_NFORCE_MCP77_AA, 0, NVAHCI, 0, ATA_SA300, "nForce MCP77" }, + { ATA_NFORCE_MCP77_AB, 0, NVAHCI, 0, ATA_SA300, "nForce MCP77" }, + { ATA_NFORCE_MCP79_A0, 0, NVAHCI, 0, ATA_SA300, "nForce MCP79" }, + { ATA_NFORCE_MCP79_A1, 0, NVAHCI, 0, ATA_SA300, "nForce MCP79" }, + { ATA_NFORCE_MCP79_A2, 0, NVAHCI, 0, ATA_SA300, "nForce MCP79" }, + { ATA_NFORCE_MCP79_A3, 0, NVAHCI, 0, ATA_SA300, "nForce MCP79" }, + { ATA_NFORCE_MCP79_A4, 0, NVAHCI, 0, ATA_SA300, "nForce MCP79" }, + { ATA_NFORCE_MCP79_A5, 0, NVAHCI, 0, ATA_SA300, "nForce MCP79" }, + { ATA_NFORCE_MCP79_A6, 0, NVAHCI, 0, ATA_SA300, "nForce MCP79" }, + { ATA_NFORCE_MCP79_A7, 0, NVAHCI, 0, ATA_SA300, "nForce MCP79" }, + { ATA_NFORCE_MCP79_A8, 0, NVAHCI, 0, ATA_SA300, "nForce MCP79" }, + { ATA_NFORCE_MCP79_A9, 0, NVAHCI, 0, ATA_SA300, "nForce MCP79" }, + { ATA_NFORCE_MCP79_AA, 0, NVAHCI, 0, ATA_SA300, "nForce MCP79" }, + { ATA_NFORCE_MCP79_AB, 0, NVAHCI, 0, ATA_SA300, "nForce MCP79" }, + { ATA_NFORCE_MCP89_A0, 0, NVAHCI, 0, ATA_SA300, "nForce MCP89" }, + { ATA_NFORCE_MCP89_A1, 0, NVAHCI, 0, ATA_SA300, "nForce MCP89" }, + { ATA_NFORCE_MCP89_A2, 0, NVAHCI, 0, ATA_SA300, "nForce MCP89" }, + { ATA_NFORCE_MCP89_A3, 0, NVAHCI, 0, ATA_SA300, "nForce MCP89" }, + { ATA_NFORCE_MCP89_A4, 0, NVAHCI, 0, ATA_SA300, "nForce MCP89" }, + { ATA_NFORCE_MCP89_A5, 0, NVAHCI, 0, ATA_SA300, "nForce MCP89" }, + { ATA_NFORCE_MCP89_A6, 0, NVAHCI, 0, ATA_SA300, "nForce MCP89" }, + { ATA_NFORCE_MCP89_A7, 0, NVAHCI, 0, ATA_SA300, "nForce MCP89" }, + { ATA_NFORCE_MCP89_A8, 0, NVAHCI, 0, ATA_SA300, "nForce MCP89" }, + { ATA_NFORCE_MCP89_A9, 0, NVAHCI, 0, ATA_SA300, "nForce MCP89" }, + { ATA_NFORCE_MCP89_AA, 0, NVAHCI, 0, ATA_SA300, "nForce MCP89" }, + { ATA_NFORCE_MCP89_AB, 0, NVAHCI, 0, ATA_SA300, "nForce MCP89" }, { 0, 0, 0, 0, 0, 0}} ; if (pci_get_vendor(dev) != ATA_NVIDIA_ID) From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 19:13:13 2009 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 47E0F106566C; Mon, 2 Nov 2009 19:13:13 +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 36A998FC2A; Mon, 2 Nov 2009 19:13: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 nA2JDDqV067091; Mon, 2 Nov 2009 19:13:13 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2JDDA8067089; Mon, 2 Nov 2009 19:13:13 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <200911021913.nA2JDDA8067089@svn.freebsd.org> From: Rui Paulo Date: Mon, 2 Nov 2009 19:13: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: r198819 - head/sys/compat/ndis 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, 02 Nov 2009 19:13:13 -0000 Author: rpaulo Date: Mon Nov 2 19:13:12 2009 New Revision: 198819 URL: http://svn.freebsd.org/changeset/base/198819 Log: Revert a functional change that snuck in. Modified: head/sys/compat/ndis/subr_ndis.c Modified: head/sys/compat/ndis/subr_ndis.c ============================================================================== --- head/sys/compat/ndis/subr_ndis.c Mon Nov 2 19:02:31 2009 (r198818) +++ head/sys/compat/ndis/subr_ndis.c Mon Nov 2 19:13:12 2009 (r198819) @@ -1246,7 +1246,7 @@ NdisMQueryAdapterResources(status, adapt { ndis_miniport_block *block; struct ndis_softc *sc; - uint32_t rsclen; + int rsclen; block = (ndis_miniport_block *)adapter; sc = device_get_softc(block->nmb_physdeviceobj->do_devext); From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 20:18:52 2009 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 7B507106566B; Mon, 2 Nov 2009 20:18:52 +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 6AAB98FC1B; Mon, 2 Nov 2009 20:18: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 nA2KIpWP068435; Mon, 2 Nov 2009 20:18:51 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2KIp6Q068433; Mon, 2 Nov 2009 20:18:51 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200911022018.nA2KIp6Q068433@svn.freebsd.org> From: John Baldwin Date: Mon, 2 Nov 2009 20:18: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: r198820 - head/sbin/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, 02 Nov 2009 20:18:52 -0000 Author: jhb Date: Mon Nov 2 20:18:50 2009 New Revision: 198820 URL: http://svn.freebsd.org/changeset/base/198820 Log: Ensure 'kvm' is always initialized. If "-M" was not specified and the garbage value on the stack was not zero, then 'ddb capture' would try to use the garbage value as a kvm_t pointer. MFC after: 1 week Modified: head/sbin/ddb/ddb_capture.c Modified: head/sbin/ddb/ddb_capture.c ============================================================================== --- head/sbin/ddb/ddb_capture.c Mon Nov 2 19:13:12 2009 (r198819) +++ head/sbin/ddb/ddb_capture.c Mon Nov 2 20:18:50 2009 (r198820) @@ -204,6 +204,7 @@ ddb_capture(int argc, char *argv[]) mflag = NULL; nflag = NULL; + kvm = NULL; while ((ch = getopt(argc, argv, "M:N:")) != -1) { switch (ch) { case 'M': From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 20:34:41 2009 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 6726F106568B for ; Mon, 2 Nov 2009 20:34:41 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (skuns.zoral.com.ua [91.193.166.194]) by mx1.freebsd.org (Postfix) with ESMTP id B7CD48FC21 for ; Mon, 2 Nov 2009 20:34:40 +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 nA2KYK46030820 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 2 Nov 2009 22:34:20 +0200 (EET) (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.3/8.14.3) with ESMTP id nA2KYKuE032207; Mon, 2 Nov 2009 22:34:20 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id nA2KYJW1032206; Mon, 2 Nov 2009 22:34:19 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 2 Nov 2009 22:34:19 +0200 From: Kostik Belousov To: Marcel Moolenaar Message-ID: <20091102203419.GV2147@deviant.kiev.zoral.com.ua> References: <20091101011212.GG1293@hoeg.nl> <20091102100435.GA67211@walton.maths.tcd.ie> <20091102102404.GP1293@hoeg.nl> <20091102.084616.-1258100553.imp@bsdimp.com> <20091102155414.GR1293@hoeg.nl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="BlkQeOBdElZ1aiuH" Content-Disposition: inline In-Reply-To: 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=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: Ed Schouten , src-committers@freebsd.org, svn-src-all@freebsd.org, dwmalone@maths.tcd.ie, svn-src-head@freebsd.org, "M. Warner Losh" Subject: Re: svn commit: r198706 - 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: Mon, 02 Nov 2009 20:34:41 -0000 --BlkQeOBdElZ1aiuH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Nov 02, 2009 at 10:08:17AM -0800, Marcel Moolenaar wrote: > For a change that does change the ABI: revision 198506 > tcsh(1) dumps core with a sig 11... Can you provide some details ? Which architecture is it ? What is the backtrace ? What is the ktrace before SIGSEGV ? --BlkQeOBdElZ1aiuH Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkrvQksACgkQC3+MBN1Mb4jy3wCg3SLnDSMWrM8GL3D3gRkubR0F fWYAoLSD18M2zezqKCsysncV18ARCqmD =6COr -----END PGP SIGNATURE----- --BlkQeOBdElZ1aiuH-- From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 20:37:50 2009 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 72AA1106568D; Mon, 2 Nov 2009 20:37:50 +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 45FB28FC2E; Mon, 2 Nov 2009 20:37: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 nA2KboSA068932; Mon, 2 Nov 2009 20:37:50 GMT (envelope-from simon@svn.freebsd.org) Received: (from simon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2Kboga068930; Mon, 2 Nov 2009 20:37:50 GMT (envelope-from simon@svn.freebsd.org) Message-Id: <200911022037.nA2Kboga068930@svn.freebsd.org> From: "Simon L. Nielsen" Date: Mon, 2 Nov 2009 20:37:50 +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: r198821 - svnadmin/hooks/scripts 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, 02 Nov 2009 20:37:50 -0000 Author: simon Date: Mon Nov 2 20:37:49 2009 New Revision: 198821 URL: http://svn.freebsd.org/changeset/base/198821 Log: Change the handling of directory property changes in the svn mailer script: - Removes all directories that have only prop-changes from the subject line (unless there are only prop-changes in the commit). - Move directory prop-changes to a separate category at the end of the change listing. This should hopefully reduce the problem mergeinfo in sys/contrib etc. "cluttering up" commit mails, and should also make it easier to spot when there is mergeinfo missing (or misplaced) in a MFC. Submitted by: mlaier (also most of the commit message) Reviewed by: peter (the general idea) Modified: svnadmin/hooks/scripts/mailer.py Directory Properties: Modified: svnadmin/hooks/scripts/mailer.py ============================================================================== --- svnadmin/hooks/scripts/mailer.py Mon Nov 2 20:18:50 2009 (r198820) +++ svnadmin/hooks/scripts/mailer.py Mon Nov 2 20:37:49 2009 (r198821) @@ -370,9 +370,14 @@ class Commit(Messenger): # figure out the changed directories dirs = { } + pdirs = { } for path, change in self.changelist: if change.item_kind == svn.core.svn_node_dir: - dirs[path] = None + # do not include dirs that have only prop changes + if change.prop_changes: + pdirs[path] = None + else: + dirs[path] = None else: idx = string.rfind(path, '/') if idx == -1: @@ -380,7 +385,10 @@ class Commit(Messenger): else: dirs[path[:idx]] = None - dirlist = dirs.keys() + if len(dirs) == 0: + dirlist = pdirs.keys() + else: + dirlist = dirs.keys() commondir, dirlist = get_commondir(dirlist) @@ -1029,6 +1037,7 @@ class TextCommitRenderer: w = self.output.write w(header + ':\n') + ps = '' for d in data_list: if d.is_dir: is_dir = '/' @@ -1037,11 +1046,13 @@ class TextCommitRenderer: if d.props_changed: if d.text_changed: props = ' (contents, props changed)' + w(' %s%s%s\n' % (d.path, is_dir, props)) else: props = ' (props changed)' + ps = ('%s %s%s%s\n' % (ps, d.path, is_dir, props)) else: props = '' - w(' %s%s%s\n' % (d.path, is_dir, props)) + w(' %s%s%s\n' % (d.path, is_dir, props)) if d.copied: if is_dir: text = '' @@ -1051,6 +1062,7 @@ class TextCommitRenderer: text = ' unchanged' w(' - copied%s from r%d, %s%s\n' % (text, d.base_rev, d.base_path, is_dir)) + w('Directory Properties:\n%s' % (ps)) def _render_diffs(self, diffs, section_header): """Render diffs. Write the SECTION_HEADER if there are actually From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 20:45:42 2009 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 093DE1065676; Mon, 2 Nov 2009 20:45:42 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout025.mac.com (asmtpout025.mac.com [17.148.16.100]) by mx1.freebsd.org (Postfix) with ESMTP id E37368FC13; Mon, 2 Nov 2009 20:45:41 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=us-ascii; format=flowed; delsp=yes Received: from macbook-pro.jnpr.net (natint3.juniper.net [66.129.224.36]) by asmtp025.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0KSI007531O4UTA0@asmtp025.mac.com>; Mon, 02 Nov 2009 12:45:41 -0800 (PST) From: Marcel Moolenaar In-reply-to: <20091102203419.GV2147@deviant.kiev.zoral.com.ua> Date: Mon, 02 Nov 2009 12:45:39 -0800 Message-id: <5537A11F-92AC-4D73-BBE7-297A1575BE1B@mac.com> References: <20091101011212.GG1293@hoeg.nl> <20091102100435.GA67211@walton.maths.tcd.ie> <20091102102404.GP1293@hoeg.nl> <20091102.084616.-1258100553.imp@bsdimp.com> <20091102155414.GR1293@hoeg.nl> <20091102203419.GV2147@deviant.kiev.zoral.com.ua> To: Kostik Belousov X-Mailer: Apple Mail (2.1076) Cc: Ed Schouten , src-committers@freebsd.org, svn-src-all@freebsd.org, dwmalone@maths.tcd.ie, svn-src-head@freebsd.org, "M. Warner Losh" Subject: Re: svn commit: r198706 - 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: Mon, 02 Nov 2009 20:45:42 -0000 On Nov 2, 2009, at 12:34 PM, Kostik Belousov wrote: > On Mon, Nov 02, 2009 at 10:08:17AM -0800, Marcel Moolenaar wrote: >> For a change that does change the ABI: revision 198506 >> tcsh(1) dumps core with a sig 11... > > Can you provide some details ? Which architecture is it ? > What is the backtrace ? What is the ktrace before SIGSEGV ? I'm working on it. I see it on ia64, so the root cause may be an ia64-specific bug. The sig 11 happens when csh calls sigsuspend: (gdb) l *$b0 0x20000000000483a0 is in pjwait (/nfs/freebsd/base/head/bin/csh/../../ contrib/tcsh/sh.proc.c:513). 508 while ((fp = (fp->p_friends)) != pp); 509 if ((jobflags & PRUNNING) == 0) 510 break; 511 jobdebug_xprintf(("%d starting to sigsuspend for SIGCHLD on %d\n", 512 getpid(), fp->p_procid)); 513 sigsuspend(&pause_mask); 514 } 515 cleanup_until(&oset); 516 jobdebug_xprintf(("%d returned from sigsuspend loop\n", getpid ())); 517 #ifdef BSDJOBS (gdb) FYI, -- Marcel Moolenaar xcllnt@mac.com From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 21:22:31 2009 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 60FFB106568F; Mon, 2 Nov 2009 21:22:31 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 36F9B8FC22; Mon, 2 Nov 2009 21:22: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 nA2LMUp3070118; Mon, 2 Nov 2009 21:22:30 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2LMUtt070116; Mon, 2 Nov 2009 21:22:30 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <200911022122.nA2LMUtt070116@svn.freebsd.org> From: Matt Jacob Date: Mon, 2 Nov 2009 21:22: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: r198822 - head/sys/dev/isp 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, 02 Nov 2009 21:22:31 -0000 Author: mjacob Date: Mon Nov 2 21:22:30 2009 New Revision: 198822 URL: http://svn.freebsd.org/changeset/base/198822 Log: Unbreak SBus cards which have been broken (apparently) for a while. Most of the pieces came from Marius- correct settings for channels and resource management. The one piece missing was that you cannot for SBus cards replace 32 bit operations with A64 operations- not supported. Submitted by: marius MFC after: 3 days Modified: head/sys/dev/isp/isp_sbus.c Directory Properties: Modified: head/sys/dev/isp/isp_sbus.c ============================================================================== --- head/sys/dev/isp/isp_sbus.c Mon Nov 2 20:37:49 2009 (r198821) +++ head/sys/dev/isp/isp_sbus.c Mon Nov 2 21:22:30 2009 (r198822) @@ -193,6 +193,8 @@ isp_sbus_attach(device_t dev) isp->isp_param = &sbs->sbus_param; isp->isp_osinfo.pc.ptr = &sbs->sbus_spi; isp->isp_revision = 0; /* XXX */ + isp->isp_dev = dev; + isp->isp_nchan = 1; ISP_SET_PC(isp, 0, role, role); /* @@ -316,18 +318,16 @@ isp_sbus_attach(device_t dev) goto bad; } isp_init(isp); - if (role != ISP_ROLE_NONE && isp->isp_state != ISP_INITSTATE) { - isp_uninit(isp); - ISP_UNLOCK(isp); - goto bad; + if (isp->isp_state == ISP_INITSTATE) { + isp->isp_state = ISP_RUNSTATE; } - isp_attach(isp); - if (role != ISP_ROLE_NONE && isp->isp_state != ISP_RUNSTATE) { + ISP_UNLOCK(isp); + if (isp_attach(isp)) { + ISP_LOCK(isp); isp_uninit(isp); ISP_UNLOCK(isp); goto bad; } - ISP_UNLOCK(isp); return (0); bad: @@ -345,13 +345,10 @@ bad: } if (regs) { - (void) bus_release_resource(dev, 0, 0, regs); + (void) bus_release_resource(dev, SYS_RES_MEMORY, 0, regs); } if (sbs) { - if (sbs->sbus_isp.isp_param) { - free(sbs->sbus_isp.isp_param, M_DEVBUF); - } free(sbs, M_DEVBUF); } return (ENXIO); @@ -584,13 +581,6 @@ dma2(void *arg, bus_dma_segment_t *dm_se isp = mp->isp; rq = mp->rq; if (nseg) { - if (sizeof (bus_addr_t) > 4) { - if (rq->req_header.rqs_entry_type == RQSTYPE_T2RQS) { - rq->req_header.rqs_entry_type = RQSTYPE_T3RQS; - } else if (rq->req_header.rqs_entry_type == RQSTYPE_REQUEST) { - rq->req_header.rqs_entry_type = RQSTYPE_A64; - } - } if ((csio->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN) { bus_dmamap_sync(isp->isp_osinfo.dmat, PISP_PCMD(csio)->dmap, BUS_DMASYNC_PREREAD); ddir = ISP_FROM_DEVICE; From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 21:39:45 2009 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 A53811065676; Mon, 2 Nov 2009 21:39:45 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6EB8A8FC08; Mon, 2 Nov 2009 21:39: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 nA2Ldjgl070540; Mon, 2 Nov 2009 21:39:45 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2LdjOg070536; Mon, 2 Nov 2009 21:39:45 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <200911022139.nA2LdjOg070536@svn.freebsd.org> From: Edwin Groothuis Date: Mon, 2 Nov 2009 21:39:45 +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: r198823 - vendor/tzdata/dist 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, 02 Nov 2009 21:39:45 -0000 Author: edwin Date: Mon Nov 2 21:39:45 2009 New Revision: 198823 URL: http://svn.freebsd.org/changeset/base/198823 Log: Vendor import of tzdata2009q: - New region: Asia/Novokuznetsk - Kemerovo oblast' (Kemerovo region) in Russia will change current time zone on 29 March 2010 - Add historical data for Hongkong 1941 - 1980 - Syria will go to winter time in the last weekend of October 2009. Obtained from: ftp://elsie.nci.nih.gov/pub/ Modified: vendor/tzdata/dist/asia vendor/tzdata/dist/europe vendor/tzdata/dist/zone.tab Modified: vendor/tzdata/dist/asia ============================================================================== --- vendor/tzdata/dist/asia Mon Nov 2 21:22:30 2009 (r198822) +++ vendor/tzdata/dist/asia Mon Nov 2 21:39:45 2009 (r198823) @@ -1,5 +1,4 @@ -#
-# @(#)asia	8.42
+# @(#)asia	8.44
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -369,14 +368,84 @@ Zone	Asia/Kashgar	5:03:56	-	LMT	1928 # o
 			5:00	-	KAST	1980 May
 			8:00	PRC	C%sT
 
+
+# From Lee Yiu Chung (2009-10-24):
+# I found there are some mistakes for the historial DST rule for Hong
+# Kong. Accoring to the DST record from Hong Kong Observatory (actually,
+# it is not [an] observatory, but the official meteorological agency of HK,
+# and also serves as the official timing agency), there are some missing
+# and incorrect rules. Although the exact switch over time is missing, I
+# think 3:30 is correct. The official DST record for Hong Kong can be
+# obtained from
+# 
+# http://www.hko.gov.hk/gts/time/Summertime.htm
+# .
+
+# From Arthur David Olson (2009-10-28):
+# Here are the dates given at
+# 
+# http://www.hko.gov.hk/gts/time/Summertime.htm
+# 
+# as of 2009-10-28:
+# Year        Period
+# 1941        1 Apr to 30 Sep
+# 1942        Whole year 
+# 1943        Whole year
+# 1944        Whole year
+# 1945        Whole year
+# 1946        20 Apr to 1 Dec
+# 1947        13 Apr to 30 Dec
+# 1948        2 May to 31 Oct
+# 1949        3 Apr to 30 Oct
+# 1950        2 Apr to 29 Oct
+# 1951        1 Apr to 28 Oct
+# 1952        6 Apr to 25 Oct
+# 1953        5 Apr to 1 Nov
+# 1954        21 Mar to 31 Oct
+# 1955        20 Mar to 6 Nov
+# 1956        18 Mar to 4 Nov
+# 1957        24 Mar to 3 Nov
+# 1958        23 Mar to 2 Nov
+# 1959        22 Mar to 1 Nov
+# 1960        20 Mar to 6 Nov
+# 1961        19 Mar to 5 Nov
+# 1962        18 Mar to 4 Nov
+# 1963        24 Mar to 3 Nov
+# 1964        22 Mar to 1 Nov
+# 1965        18 Apr to 17 Oct
+# 1966        17 Apr to 16 Oct
+# 1967        16 Apr to 22 Oct
+# 1968        21 Apr to 20 Oct
+# 1969        20 Apr to 19 Oct
+# 1970        19 Apr to 18 Oct
+# 1971        18 Apr to 17 Oct
+# 1972        16 Apr to 22 Oct
+# 1973        22 Apr to 21 Oct
+# 1973/74     30 Dec 73 to 20 Oct 74
+# 1975        20 Apr to 19 Oct
+# 1976        18 Apr to 17 Oct
+# 1977        Nil
+# 1978        Nil
+# 1979        13 May to 21 Oct
+# 1980 to Now Nil
+# The page does not give start or end times of day.
+# The page does not give a start date for 1942.
+# The page does not givw an end date for 1945.
+# The Japanese occupation of Hong Kong began on 1941-12-25.
+# The Japanese surrender of Hong Kong was signed 1945-09-15.
+# For lack of anything better, use start of those days as the transition times.
+
 # Hong Kong (Xianggang)
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
+Rule	HK	1941	only	-	Apr	1	3:30	1:00	S
+Rule	HK	1941	only	-	Sep	30	3:30	0	-
 Rule	HK	1946	only	-	Apr	20	3:30	1:00	S
 Rule	HK	1946	only	-	Dec	1	3:30	0	-
 Rule	HK	1947	only	-	Apr	13	3:30	1:00	S
 Rule	HK	1947	only	-	Dec	30	3:30	0	-
 Rule	HK	1948	only	-	May	2	3:30	1:00	S
-Rule	HK	1948	1952	-	Oct	lastSun	3:30	0	-
+Rule	HK	1948	1951	-	Oct	lastSun	3:30	0	-
+Rule	HK	1952	only	-	Oct	25	3:30	0	-
 Rule	HK	1949	1953	-	Apr	Sun>=1	3:30	1:00	S
 Rule	HK	1953	only	-	Nov	1	3:30	0	-
 Rule	HK	1954	1964	-	Mar	Sun>=18	3:30	1:00	S
@@ -384,13 +453,15 @@ Rule	HK	1954	only	-	Oct	31	3:30	0	-
 Rule	HK	1955	1964	-	Nov	Sun>=1	3:30	0	-
 Rule	HK	1965	1977	-	Apr	Sun>=16	3:30	1:00	S
 Rule	HK	1965	1977	-	Oct	Sun>=16	3:30	0	-
-Rule	HK	1979	1980	-	May	Sun>=8	3:30	1:00	S
-Rule	HK	1979	1980	-	Oct	Sun>=16	3:30	0	-
+Rule	HK	1973	only	-	Dec	30	3:30	1:00	S
+Rule	HK	1979	only	-	May	Sun>=8	3:30	1:00	S
+Rule	HK	1979	only	-	Oct	Sun>=16	3:30	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Hong_Kong	7:36:36 -	LMT	1904 Oct 30
+			8:00	HK	HK%sT	1941 Dec 25
+			9:00	-	JST	1945 Sep 15
 			8:00	HK	HK%sT
 
-
 ###############################################################################
 
 # Taiwan
@@ -2236,9 +2307,23 @@ Rule	Syria	2007	only	-	Nov	 Fri>=1	0:00	
 # http://www.timeanddate.com/news/time/syria-dst-starts-march-27-2009.html
 # 
 
+# From Steffen Thorsen (2009-10-27):
+# The Syrian Arab News Network on 2009-09-29 reported that Syria will 
+# revert back to winter (standard) time on midnight between Thursday 
+# 2009-10-29 and Friday 2009-10-30:
+# 
+# http://www.sana.sy/ara/2/2009/09/29/247012.htm (Arabic)
+# 
+
+# From Arthur David Olson (2009-10-28):
+# We'll see if future DST switching times turn out to be end of the last
+# Thursday of the month or the start of the last Friday of the month or
+# something else. For now, use the start of the last Friday.
+
 Rule	Syria	2008	only	-	Apr	Fri>=1	0:00	1:00	S
-Rule	Syria	2008	max	-	Nov	1	0:00	0	-
+Rule	Syria	2008	only	-	Nov	1	0:00	0	-
 Rule	Syria	2009	max	-	Mar	lastFri	0:00	1:00	S
+Rule	Syria	2009	max	-	Oct	lastFri	0:00	0	-
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Damascus	2:25:12 -	LMT	1920	# Dimashq

Modified: vendor/tzdata/dist/europe
==============================================================================
--- vendor/tzdata/dist/europe	Mon Nov  2 21:22:30 2009	(r198822)
+++ vendor/tzdata/dist/europe	Mon Nov  2 21:39:45 2009	(r198823)
@@ -1,5 +1,5 @@
 # 
-# @(#)europe	8.22
+# @(#)europe	8.24
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -2072,9 +2072,43 @@ Zone Asia/Novosibirsk	 5:31:40 -	LMT	191
 			 6:00	Russia	NOV%sT	1992 Jan 19 2:00s
 			 7:00	Russia	NOV%sT	1993 May 23 # say Shanks & P.
 			 6:00	Russia	NOV%sT
+
+# From Alexander Krivenyshev (2009-10-13):
+# Kemerovo oblast' (Kemerovo region) in Russia will change current time zone on
+# March 28, 2010:
+# from current Russia Zone 6 - Krasnoyarsk Time Zone (KRA) UTC +0700
+# to Russia Zone 5 - Novosibirsk Time Zone (NOV) UTC +0600
+#
+# This is according to Government of Russia decree # 740, on September
+# 14, 2009 "Application in the territory of the Kemerovo region the Fifth
+# time zone." ("Russia Zone 5" or old "USSR Zone 5" is GMT +0600)
+#
+# Russian Government web site (Russian language)
+# 
+# http://www.government.ru/content/governmentactivity/rfgovernmentdecisions/archive/2009/09/14/991633.htm
+# 
+# or Russian-English translation by WorldTimeZone.com with reference
+# map to local region and new Russia Time Zone map after March 28, 2010
+# 
+# http://www.worldtimezone.com/dst_news/dst_news_russia03.html
+# 
+#
+# Thus, when Russia will switch to DST on the night of March 28, 2010
+# Kemerovo region (Kemerovo oblast') will not change the clock.
+#
+# As a result, Kemerovo oblast' will be in the same time zone as
+# Novosibirsk, Omsk, Tomsk, Barnaul and Altai Republic.
+
+Zone Asia/Novokuznetsk	 5:48:48 -	NMT	1920 Jan  6
+			 6:00	-	KRAT	1930 Jun 21 # Krasnoyarsk Time
+			 7:00	Russia	KRA%sT	1991 Mar 31 2:00s
+			 6:00	Russia	KRA%sT	1992 Jan 19 2:00s
+			 7:00	Russia	KRA%sT	2010 Mar 28 2:00s
+			 6:00	Russia	NOV%sT # Novosibirsk/Novokuznetsk Time
+
 #
 # From Oscar van Vlijmen (2001-08-25): [This region consists of]
-# Kemerovskaya oblast', Krasnoyarskij kraj,
+# Krasnoyarskij kraj,
 # Tajmyrskij (Dolgano-Nenetskij) avtonomnyj okrug,
 # Respublika Tuva, Respublika Khakasiya, Evenkijskij avtonomnyj okrug.
 Zone Asia/Krasnoyarsk	 6:11:20 -	LMT	1920 Jan  6

Modified: vendor/tzdata/dist/zone.tab
==============================================================================
--- vendor/tzdata/dist/zone.tab	Mon Nov  2 21:22:30 2009	(r198822)
+++ vendor/tzdata/dist/zone.tab	Mon Nov  2 21:39:45 2009	(r198823)
@@ -1,5 +1,5 @@
 # 
-# @(#)zone.tab	8.28
+# @(#)zone.tab	8.29
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 #
@@ -330,6 +330,7 @@ RU	+5312+05009	Europe/Samara	Moscow+01 -
 RU	+5651+06036	Asia/Yekaterinburg	Moscow+02 - Urals
 RU	+5500+07324	Asia/Omsk	Moscow+03 - west Siberia
 RU	+5502+08255	Asia/Novosibirsk	Moscow+03 - Novosibirsk
+RU	+5345+08707	Asia/Novokuznetsk	Moscow+03 - Novokuznetsk
 RU	+5601+09250	Asia/Krasnoyarsk	Moscow+04 - Yenisei River
 RU	+5216+10420	Asia/Irkutsk	Moscow+05 - Lake Baikal
 RU	+6200+12940	Asia/Yakutsk	Moscow+06 - Lena River

From owner-svn-src-all@FreeBSD.ORG  Mon Nov  2 21:40:50 2009
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 CAFA9106568B;
	Mon,  2 Nov 2009 21:40:50 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A06A88FC17;
	Mon,  2 Nov 2009 21:40: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 nA2LeoTd070615;
	Mon, 2 Nov 2009 21:40:50 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2LeoZC070614;
	Mon, 2 Nov 2009 21:40:50 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <200911022140.nA2LeoZC070614@svn.freebsd.org>
From: Edwin Groothuis 
Date: Mon, 2 Nov 2009 21:40:50 +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: r198824 - vendor/tzdata/tzdata2009q
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, 02 Nov 2009 21:40:50 -0000

Author: edwin
Date: Mon Nov  2 21:40:50 2009
New Revision: 198824
URL: http://svn.freebsd.org/changeset/base/198824

Log:
  Tag of tzdata2009q

Added:
  vendor/tzdata/tzdata2009q/
     - copied from r198823, vendor/tzdata/dist/

From owner-svn-src-all@FreeBSD.ORG  Mon Nov  2 21:44:10 2009
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 C0226106566C;
	Mon,  2 Nov 2009 21:44:10 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id AE3048FC15;
	Mon,  2 Nov 2009 21:44: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 nA2LiAF7070740;
	Mon, 2 Nov 2009 21:44:10 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2LiAIx070736;
	Mon, 2 Nov 2009 21:44:10 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <200911022144.nA2LiAIx070736@svn.freebsd.org>
From: Edwin Groothuis 
Date: Mon, 2 Nov 2009 21:44: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: r198825 - head/share/zoneinfo
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, 02 Nov 2009 21:44:10 -0000

Author: edwin
Date: Mon Nov  2 21:44:10 2009
New Revision: 198825
URL: http://svn.freebsd.org/changeset/base/198825

Log:
  MFV of tzdata2009q:
  
  - New region: Asia/Novokuznetsk
  - Kemerovo oblast' (Kemerovo region) in Russia will change current
    time zone on 29 March 2010
  - Add historical data for Hongkong 1941 - 1980
  - Syria will go to winter time in the last weekend of October 2009.
  
  MFC after:	2 days

Modified:
  head/share/zoneinfo/asia
  head/share/zoneinfo/europe
  head/share/zoneinfo/zone.tab
Directory Properties:
  head/share/zoneinfo/   (props changed)

Modified: head/share/zoneinfo/asia
==============================================================================
--- head/share/zoneinfo/asia	Mon Nov  2 21:40:50 2009	(r198824)
+++ head/share/zoneinfo/asia	Mon Nov  2 21:44:10 2009	(r198825)
@@ -1,5 +1,4 @@
-# 
-# @(#)asia	8.42
+# @(#)asia	8.44
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -369,14 +368,84 @@ Zone	Asia/Kashgar	5:03:56	-	LMT	1928 # o
 			5:00	-	KAST	1980 May
 			8:00	PRC	C%sT
 
+
+# From Lee Yiu Chung (2009-10-24):
+# I found there are some mistakes for the historial DST rule for Hong
+# Kong. Accoring to the DST record from Hong Kong Observatory (actually,
+# it is not [an] observatory, but the official meteorological agency of HK,
+# and also serves as the official timing agency), there are some missing
+# and incorrect rules. Although the exact switch over time is missing, I
+# think 3:30 is correct. The official DST record for Hong Kong can be
+# obtained from
+# 
+# http://www.hko.gov.hk/gts/time/Summertime.htm
+# .
+
+# From Arthur David Olson (2009-10-28):
+# Here are the dates given at
+# 
+# http://www.hko.gov.hk/gts/time/Summertime.htm
+# 
+# as of 2009-10-28:
+# Year        Period
+# 1941        1 Apr to 30 Sep
+# 1942        Whole year 
+# 1943        Whole year
+# 1944        Whole year
+# 1945        Whole year
+# 1946        20 Apr to 1 Dec
+# 1947        13 Apr to 30 Dec
+# 1948        2 May to 31 Oct
+# 1949        3 Apr to 30 Oct
+# 1950        2 Apr to 29 Oct
+# 1951        1 Apr to 28 Oct
+# 1952        6 Apr to 25 Oct
+# 1953        5 Apr to 1 Nov
+# 1954        21 Mar to 31 Oct
+# 1955        20 Mar to 6 Nov
+# 1956        18 Mar to 4 Nov
+# 1957        24 Mar to 3 Nov
+# 1958        23 Mar to 2 Nov
+# 1959        22 Mar to 1 Nov
+# 1960        20 Mar to 6 Nov
+# 1961        19 Mar to 5 Nov
+# 1962        18 Mar to 4 Nov
+# 1963        24 Mar to 3 Nov
+# 1964        22 Mar to 1 Nov
+# 1965        18 Apr to 17 Oct
+# 1966        17 Apr to 16 Oct
+# 1967        16 Apr to 22 Oct
+# 1968        21 Apr to 20 Oct
+# 1969        20 Apr to 19 Oct
+# 1970        19 Apr to 18 Oct
+# 1971        18 Apr to 17 Oct
+# 1972        16 Apr to 22 Oct
+# 1973        22 Apr to 21 Oct
+# 1973/74     30 Dec 73 to 20 Oct 74
+# 1975        20 Apr to 19 Oct
+# 1976        18 Apr to 17 Oct
+# 1977        Nil
+# 1978        Nil
+# 1979        13 May to 21 Oct
+# 1980 to Now Nil
+# The page does not give start or end times of day.
+# The page does not give a start date for 1942.
+# The page does not givw an end date for 1945.
+# The Japanese occupation of Hong Kong began on 1941-12-25.
+# The Japanese surrender of Hong Kong was signed 1945-09-15.
+# For lack of anything better, use start of those days as the transition times.
+
 # Hong Kong (Xianggang)
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
+Rule	HK	1941	only	-	Apr	1	3:30	1:00	S
+Rule	HK	1941	only	-	Sep	30	3:30	0	-
 Rule	HK	1946	only	-	Apr	20	3:30	1:00	S
 Rule	HK	1946	only	-	Dec	1	3:30	0	-
 Rule	HK	1947	only	-	Apr	13	3:30	1:00	S
 Rule	HK	1947	only	-	Dec	30	3:30	0	-
 Rule	HK	1948	only	-	May	2	3:30	1:00	S
-Rule	HK	1948	1952	-	Oct	lastSun	3:30	0	-
+Rule	HK	1948	1951	-	Oct	lastSun	3:30	0	-
+Rule	HK	1952	only	-	Oct	25	3:30	0	-
 Rule	HK	1949	1953	-	Apr	Sun>=1	3:30	1:00	S
 Rule	HK	1953	only	-	Nov	1	3:30	0	-
 Rule	HK	1954	1964	-	Mar	Sun>=18	3:30	1:00	S
@@ -384,13 +453,15 @@ Rule	HK	1954	only	-	Oct	31	3:30	0	-
 Rule	HK	1955	1964	-	Nov	Sun>=1	3:30	0	-
 Rule	HK	1965	1977	-	Apr	Sun>=16	3:30	1:00	S
 Rule	HK	1965	1977	-	Oct	Sun>=16	3:30	0	-
-Rule	HK	1979	1980	-	May	Sun>=8	3:30	1:00	S
-Rule	HK	1979	1980	-	Oct	Sun>=16	3:30	0	-
+Rule	HK	1973	only	-	Dec	30	3:30	1:00	S
+Rule	HK	1979	only	-	May	Sun>=8	3:30	1:00	S
+Rule	HK	1979	only	-	Oct	Sun>=16	3:30	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Hong_Kong	7:36:36 -	LMT	1904 Oct 30
+			8:00	HK	HK%sT	1941 Dec 25
+			9:00	-	JST	1945 Sep 15
 			8:00	HK	HK%sT
 
-
 ###############################################################################
 
 # Taiwan
@@ -2236,9 +2307,23 @@ Rule	Syria	2007	only	-	Nov	 Fri>=1	0:00	
 # http://www.timeanddate.com/news/time/syria-dst-starts-march-27-2009.html
 # 
 
+# From Steffen Thorsen (2009-10-27):
+# The Syrian Arab News Network on 2009-09-29 reported that Syria will 
+# revert back to winter (standard) time on midnight between Thursday 
+# 2009-10-29 and Friday 2009-10-30:
+# 
+# http://www.sana.sy/ara/2/2009/09/29/247012.htm (Arabic)
+# 
+
+# From Arthur David Olson (2009-10-28):
+# We'll see if future DST switching times turn out to be end of the last
+# Thursday of the month or the start of the last Friday of the month or
+# something else. For now, use the start of the last Friday.
+
 Rule	Syria	2008	only	-	Apr	Fri>=1	0:00	1:00	S
-Rule	Syria	2008	max	-	Nov	1	0:00	0	-
+Rule	Syria	2008	only	-	Nov	1	0:00	0	-
 Rule	Syria	2009	max	-	Mar	lastFri	0:00	1:00	S
+Rule	Syria	2009	max	-	Oct	lastFri	0:00	0	-
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Damascus	2:25:12 -	LMT	1920	# Dimashq

Modified: head/share/zoneinfo/europe
==============================================================================
--- head/share/zoneinfo/europe	Mon Nov  2 21:40:50 2009	(r198824)
+++ head/share/zoneinfo/europe	Mon Nov  2 21:44:10 2009	(r198825)
@@ -1,5 +1,5 @@
 # 
-# @(#)europe	8.22
+# @(#)europe	8.24
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -2072,9 +2072,43 @@ Zone Asia/Novosibirsk	 5:31:40 -	LMT	191
 			 6:00	Russia	NOV%sT	1992 Jan 19 2:00s
 			 7:00	Russia	NOV%sT	1993 May 23 # say Shanks & P.
 			 6:00	Russia	NOV%sT
+
+# From Alexander Krivenyshev (2009-10-13):
+# Kemerovo oblast' (Kemerovo region) in Russia will change current time zone on
+# March 28, 2010:
+# from current Russia Zone 6 - Krasnoyarsk Time Zone (KRA) UTC +0700
+# to Russia Zone 5 - Novosibirsk Time Zone (NOV) UTC +0600
+#
+# This is according to Government of Russia decree # 740, on September
+# 14, 2009 "Application in the territory of the Kemerovo region the Fifth
+# time zone." ("Russia Zone 5" or old "USSR Zone 5" is GMT +0600)
+#
+# Russian Government web site (Russian language)
+# 
+# http://www.government.ru/content/governmentactivity/rfgovernmentdecisions/archive/2009/09/14/991633.htm
+# 
+# or Russian-English translation by WorldTimeZone.com with reference
+# map to local region and new Russia Time Zone map after March 28, 2010
+# 
+# http://www.worldtimezone.com/dst_news/dst_news_russia03.html
+# 
+#
+# Thus, when Russia will switch to DST on the night of March 28, 2010
+# Kemerovo region (Kemerovo oblast') will not change the clock.
+#
+# As a result, Kemerovo oblast' will be in the same time zone as
+# Novosibirsk, Omsk, Tomsk, Barnaul and Altai Republic.
+
+Zone Asia/Novokuznetsk	 5:48:48 -	NMT	1920 Jan  6
+			 6:00	-	KRAT	1930 Jun 21 # Krasnoyarsk Time
+			 7:00	Russia	KRA%sT	1991 Mar 31 2:00s
+			 6:00	Russia	KRA%sT	1992 Jan 19 2:00s
+			 7:00	Russia	KRA%sT	2010 Mar 28 2:00s
+			 6:00	Russia	NOV%sT # Novosibirsk/Novokuznetsk Time
+
 #
 # From Oscar van Vlijmen (2001-08-25): [This region consists of]
-# Kemerovskaya oblast', Krasnoyarskij kraj,
+# Krasnoyarskij kraj,
 # Tajmyrskij (Dolgano-Nenetskij) avtonomnyj okrug,
 # Respublika Tuva, Respublika Khakasiya, Evenkijskij avtonomnyj okrug.
 Zone Asia/Krasnoyarsk	 6:11:20 -	LMT	1920 Jan  6

Modified: head/share/zoneinfo/zone.tab
==============================================================================
--- head/share/zoneinfo/zone.tab	Mon Nov  2 21:40:50 2009	(r198824)
+++ head/share/zoneinfo/zone.tab	Mon Nov  2 21:44:10 2009	(r198825)
@@ -1,5 +1,5 @@
 # 
-# @(#)zone.tab	8.28
+# @(#)zone.tab	8.29
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 #
@@ -330,6 +330,7 @@ RU	+5312+05009	Europe/Samara	Moscow+01 -
 RU	+5651+06036	Asia/Yekaterinburg	Moscow+02 - Urals
 RU	+5500+07324	Asia/Omsk	Moscow+03 - west Siberia
 RU	+5502+08255	Asia/Novosibirsk	Moscow+03 - Novosibirsk
+RU	+5345+08707	Asia/Novokuznetsk	Moscow+03 - Novokuznetsk
 RU	+5601+09250	Asia/Krasnoyarsk	Moscow+04 - Yenisei River
 RU	+5216+10420	Asia/Irkutsk	Moscow+05 - Lake Baikal
 RU	+6200+12940	Asia/Yakutsk	Moscow+06 - Lena River

From owner-svn-src-all@FreeBSD.ORG  Mon Nov  2 21:44:58 2009
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 569AD1065676;
	Mon,  2 Nov 2009 21:44:58 +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 45AD78FC14;
	Mon,  2 Nov 2009 21:44: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 nA2Liw2P070793;
	Mon, 2 Nov 2009 21:44:58 GMT (envelope-from simon@svn.freebsd.org)
Received: (from simon@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2Liw4K070791;
	Mon, 2 Nov 2009 21:44:58 GMT (envelope-from simon@svn.freebsd.org)
Message-Id: <200911022144.nA2Liw4K070791@svn.freebsd.org>
From: "Simon L. Nielsen" 
Date: Mon, 2 Nov 2009 21:44:58 +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: r198826 - svnadmin/hooks/scripts
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, 02 Nov 2009 21:44:58 -0000

Author: simon
Date: Mon Nov  2 21:44:57 2009
New Revision: 198826
URL: http://svn.freebsd.org/changeset/base/198826

Log:
  Only print the 'Directory Properties' section if we actually have
  changed directory properties.

Modified:
  svnadmin/hooks/scripts/mailer.py

Modified: svnadmin/hooks/scripts/mailer.py
==============================================================================
--- svnadmin/hooks/scripts/mailer.py	Mon Nov  2 21:44:10 2009	(r198825)
+++ svnadmin/hooks/scripts/mailer.py	Mon Nov  2 21:44:57 2009	(r198826)
@@ -1062,7 +1062,8 @@ class TextCommitRenderer:
           text = ' unchanged'
         w('     - copied%s from r%d, %s%s\n'
           % (text, d.base_rev, d.base_path, is_dir))
-    w('Directory Properties:\n%s' % (ps))
+    if len(ps) > 0:
+      w('Directory Properties:\n%s' % (ps))
 
   def _render_diffs(self, diffs, section_header):
     """Render diffs. Write the SECTION_HEADER if there are actually

From owner-svn-src-all@FreeBSD.ORG  Mon Nov  2 22:32:15 2009
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 44A61106566B;
	Mon,  2 Nov 2009 22:32:15 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 291428FC18;
	Mon,  2 Nov 2009 22:32: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 nA2MWEqh071857;
	Mon, 2 Nov 2009 22:32:14 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2MWEsm071854;
	Mon, 2 Nov 2009 22:32:14 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <200911022232.nA2MWEsm071854@svn.freebsd.org>
From: Edwin Groothuis 
Date: Mon, 2 Nov 2009 22:32:14 +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: r198828 - in vendor/tzcode/dist: unused zic
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, 02 Nov 2009 22:32:15 -0000

Author: edwin
Date: Mon Nov  2 22:32:14 2009
New Revision: 198828
URL: http://svn.freebsd.org/changeset/base/198828

Log:
  Vendor import of tzcode2009q:
  
  - Add more references in tz-art.htm
  - Cleanup unnecessary local variables in zdump.
  
  Obtained from:	ftp://elsie.nci.nih.gov/pub/

Modified:
  vendor/tzcode/dist/unused/tz-art.htm
  vendor/tzcode/dist/zic/zdump.c

Modified: vendor/tzcode/dist/unused/tz-art.htm
==============================================================================
--- vendor/tzcode/dist/unused/tz-art.htm	Mon Nov  2 21:48:00 2009	(r198827)
+++ vendor/tzcode/dist/unused/tz-art.htm	Mon Nov  2 22:32:14 2009	(r198828)
@@ -9,7 +9,7 @@ PUBLIC "-//W3C//DTD HTML 4.01//EN"
 
 

Time and the Arts

-@(#)tz-art.htm 8.13 +@(#)tz-art.htm 8.14

This file is in the public domain, so clarified as of @@ -354,7 +354,8 @@ premonition in the "We Had a Dream" epis (originally aired 2007-02-28).

  • -In the 1946 "A Matter of Life and Death," +In the 1946 movie "A Matter of Life and Death" +(U.S. title "Stairway to Heaven") there is a reference to British Double Summer Time. The time does not play a large part in the plot; it's just a passing reference to the time when one of the @@ -363,6 +364,31 @@ The IMDb page is at http://us.imdb.com/title/tt0038733/ . (Dave Cantor) +
  • +The 1953 railway comedy movie "The Titfield Thunderbolt" includes a +play on words on British Double Summer Time. Valentine's wife wants +him to leave the pub and asks him, "Do you know what time it is?" +And he, happy where he is, replies: "Yes, my love. Summer double time." +IMDB page: + +http://us.imdb.com/title/tt0046436/ +. (Mark Brader, 2009-10-02) +
  • +
  • +The premise of the 1999 caper movie "Entrapment" involves computers +in an international banking network being shut down briefly at +midnight in each time zone to avoid any problems at the transition +from the year 1999 to 2000 in that zone. (Hmmmm.) If this shutdown +is extended by 10 seconds, it will create a one-time opportunity for +a gigantic computerized theft. To achieve this, at one location the +crooks interfere with the microwave system supplying time signals to +the computer, advancing the time by 0.1 second each minute over the +last hour of 1999. (So this movie teaches us that 0.1 x 60 = 10.) +IMDB page: + +http://us.imdb.com/title/tt0137494/ +. (Mark Brader, 2009-10-02) +

  • Modified: vendor/tzcode/dist/zic/zdump.c ============================================================================== --- vendor/tzcode/dist/zic/zdump.c Mon Nov 2 21:48:00 2009 (r198827) +++ vendor/tzcode/dist/zic/zdump.c Mon Nov 2 22:32:14 2009 (r198828) @@ -3,7 +3,7 @@ ** 2009-05-17 by Arthur David Olson. */ -static char elsieid[] = "@(#)zdump.c 8.9"; +static char elsieid[] = "@(#)zdump.c 8.10"; /* ** This code has been made independent of the rest of the time @@ -236,7 +236,9 @@ const char * const zone; } static void -usage(const char *progname, FILE *stream, int status) +usage(stream, status) +FILE * const stream; +const int status { (void) fprintf(stream, _("%s: usage is %s [ --version ] [ --help ] [ -v ] [ -c [loyear,]hiyear ] zonename ...\n\ @@ -283,7 +285,7 @@ char * argv[]; (void) printf("%s\n", elsieid); exit(EXIT_SUCCESS); } else if (strcmp(argv[i], "--help") == 0) { - usage(progname, stdout, EXIT_SUCCESS); + usage(stdout, EXIT_SUCCESS); } vflag = 0; cutarg = NULL; @@ -293,7 +295,7 @@ char * argv[]; else cutarg = optarg; if ((c != EOF && c != -1) || (optind == argc - 1 && strcmp(argv[optind], "=") == 0)) { - usage(progname, stderr, EXIT_FAILURE); + usage(stderr, EXIT_FAILURE); } if (vflag) { if (cutarg != NULL) { From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 22:33:04 2009 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 B8052106566C; Mon, 2 Nov 2009 22:33:04 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8E2838FC12; Mon, 2 Nov 2009 22:33: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 nA2MX4vw071931; Mon, 2 Nov 2009 22:33:04 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2MX4A1071930; Mon, 2 Nov 2009 22:33:04 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <200911022233.nA2MX4A1071930@svn.freebsd.org> From: Edwin Groothuis Date: Mon, 2 Nov 2009 22:33:04 +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: r198829 - vendor/tzcode/tzcode2009q 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, 02 Nov 2009 22:33:04 -0000 Author: edwin Date: Mon Nov 2 22:33:04 2009 New Revision: 198829 URL: http://svn.freebsd.org/changeset/base/198829 Log: Tag of tzcode2009q Added: vendor/tzcode/tzcode2009q/ - copied from r198828, vendor/tzcode/dist/ From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 23:02:12 2009 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 2423C106566B; Mon, 2 Nov 2009 23:02:12 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 133078FC22; Mon, 2 Nov 2009 23:02: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 nA2N2BNL072719; Mon, 2 Nov 2009 23:02:11 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2N2BBA072716; Mon, 2 Nov 2009 23:02:11 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <200911022302.nA2N2BBA072716@svn.freebsd.org> From: Edwin Groothuis Date: Mon, 2 Nov 2009 23:02: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: r198831 - head/usr.sbin/zic 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, 02 Nov 2009 23:02:12 -0000 Author: edwin Date: Mon Nov 2 23:02:11 2009 New Revision: 198831 URL: http://svn.freebsd.org/changeset/base/198831 Log: MFV of r198828, tzcode2009q - Cleanup unnecessary local variables in zdump. - Fix man-page MFC after: 1 week Modified: head/usr.sbin/zic/zdump.c head/usr.sbin/zic/zic.8 Directory Properties: head/usr.sbin/zic/ (props changed) Modified: head/usr.sbin/zic/zdump.c ============================================================================== --- head/usr.sbin/zic/zdump.c Mon Nov 2 22:50:39 2009 (r198830) +++ head/usr.sbin/zic/zdump.c Mon Nov 2 23:02:11 2009 (r198831) @@ -6,7 +6,7 @@ #ifndef lint static const char rcsid[] = "$FreeBSD$"; -static char elsieid[] = "@(#)zdump.c 8.9"; +static char elsieid[] = "@(#)zdump.c 8.10"; #endif /* not lint */ /* @@ -152,7 +152,7 @@ static size_t longest; static char * progname; static int warned; -static void usage(const char *progname, FILE *stream, int status); +static void usage(FILE *stream, int status); static char * abbr(struct tm * tmp); static void abbrok(const char * abbrp, const char * zone); static long delta(struct tm * newp, struct tm * oldp); @@ -273,7 +273,7 @@ char * argv[]; if (strcmp(argv[i], "--version") == 0) { errx(EXIT_SUCCESS, "%s", elsieid); } else if (strcmp(argv[i], "--help") == 0) { - usage(progname, stdout, EXIT_SUCCESS); + usage(stdout, EXIT_SUCCESS); } vflag = 0; cutarg = NULL; @@ -283,7 +283,7 @@ char * argv[]; else cutarg = optarg; if ((c != -1) || (optind == argc - 1 && strcmp(argv[optind], "=") == 0)) { - usage(progname, stderr, EXIT_FAILURE); + usage(stderr, EXIT_FAILURE); } if (vflag) { if (cutarg != NULL) { @@ -468,7 +468,7 @@ const long y; } static void -usage(const char *progname, FILE *stream, int status) +usage(FILE *stream, int status) { fprintf(stream, _("usage: %s [--version] [-v] [--help] [-c [loyear,]hiyear] zonename ...\n\ Modified: head/usr.sbin/zic/zic.8 ============================================================================== --- head/usr.sbin/zic/zic.8 Mon Nov 2 22:50:39 2009 (r198830) +++ head/usr.sbin/zic/zic.8 Mon Nov 2 23:02:11 2009 (r198831) @@ -260,7 +260,7 @@ the variable part is null. .El .Pp A zone line has the form: -.Dl "Zone NAME GMTOFF RULES/SAVE FORMAT [UNTILYEAR [MONTH [DAY [TIME]]]] +.Dl "Zone NAME GMTOFF RULES/SAVE FORMAT [UNTILYEAR [MONTH [DAY [TIME]]]]" For example: .Dl "Zone Australia/Adelaide 9:30 Aus CST 1971 Oct 31 2:00 The fields that make up a zone line are: From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 23:30:16 2009 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 1FC06106566B; Mon, 2 Nov 2009 23:30:16 +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 0ED248FC13; Mon, 2 Nov 2009 23:30: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 nA2NUFnB073302; Mon, 2 Nov 2009 23:30:15 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2NUF3b073300; Mon, 2 Nov 2009 23:30:15 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200911022330.nA2NUF3b073300@svn.freebsd.org> From: Andrew Thompson Date: Mon, 2 Nov 2009 23:30: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: r198832 - head/sys/cam/scsi 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, 02 Nov 2009 23:30:16 -0000 Author: thompsa Date: Mon Nov 2 23:30:15 2009 New Revision: 198832 URL: http://svn.freebsd.org/changeset/base/198832 Log: Provide the same sanity check on the sector size in dagetcapacity as when the disk is first probed. dagetcapacity is called whenever the disk is opened from geom via d_open(), a zero sector size will cause geom to panic later on. Modified: head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Mon Nov 2 23:02:11 2009 (r198831) +++ head/sys/cam/scsi/scsi_da.c Mon Nov 2 23:30:15 2009 (r198832) @@ -1948,8 +1948,15 @@ dagetcapacity(struct cam_periph *periph) done: - if (error == 0) - dasetgeom(periph, block_len, maxsector); + if (error == 0) { + if (block_len >= MAXPHYS || block_len == 0) { + xpt_print(periph->path, + "unsupportable block size %ju\n", + (uintmax_t) block_len); + error = EINVAL; + } else + dasetgeom(periph, block_len, maxsector); + } xpt_release_ccb(ccb); From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 23:50:13 2009 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 2B3A61065672; Mon, 2 Nov 2009 23:50:13 +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 00B3E8FC08; Mon, 2 Nov 2009 23:50: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 nA2NoCeO073695; Mon, 2 Nov 2009 23:50:12 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2NoCcr073693; Mon, 2 Nov 2009 23:50:12 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200911022350.nA2NoCcr073693@svn.freebsd.org> From: Andrew Thompson Date: Mon, 2 Nov 2009 23:50: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: r198833 - head/usr.sbin/usbconfig 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, 02 Nov 2009 23:50:13 -0000 Author: thompsa Date: Mon Nov 2 23:50:12 2009 New Revision: 198833 URL: http://svn.freebsd.org/changeset/base/198833 Log: Add more verbose output when dumping the configuration descriptor. Submitted by: Hans Petter Selasky Modified: head/usr.sbin/usbconfig/dump.c Modified: head/usr.sbin/usbconfig/dump.c ============================================================================== --- head/usr.sbin/usbconfig/dump.c Mon Nov 2 23:30:15 2009 (r198832) +++ head/usr.sbin/usbconfig/dump.c Mon Nov 2 23:50:12 2009 (r198833) @@ -100,21 +100,66 @@ dump_field(struct libusb20_device *pdev, printf("%s%s = 0x%04x ", plevel, field, value); - if ((field[0] != 'i') || (field[1] == 'd')) { - printf("\n"); - return; - } - if (value == 0) { - printf(" \n"); - return; + if (strlen(plevel) == 8) { + /* Endpoint Descriptor */ + + if (strcmp(field, "bEndpointAddress") == 0) { + if (value & 0x80) + printf(" \n"); + else + printf(" \n"); + return; + } + + if (strcmp(field, "bmAttributes") == 0) { + switch (value & 0x03) { + case 0: + printf(" \n"); + break; + case 1: + switch (value & 0x0C) { + case 0x00: + printf(" \n"); + break; + case 0x04: + printf(" \n"); + break; + case 0x08: + printf(" \n"); + break; + default: + printf(" \n"); + break; + } + break; + case 2: + printf(" \n"); + break; + default: + printf(" \n"); + break; + } + return; + } } - if (libusb20_dev_req_string_simple_sync(pdev, value, - temp_string, sizeof(temp_string))) { - printf(" \n"); + + if ((field[0] == 'i') && (field[1] != 'd')) { + /* Indirect String Descriptor */ + if (value == 0) { + printf(" \n"); + return; + } + if (libusb20_dev_req_string_simple_sync(pdev, value, + temp_string, sizeof(temp_string))) { + printf(" \n"); + return; + } + printf(" <%s>\n", temp_string); return; } - printf(" <%s>\n", temp_string); - return; + + /* No additional information */ + printf("\n"); } static void From owner-svn-src-all@FreeBSD.ORG Tue Nov 3 08:41:15 2009 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 22CFF1065670; Tue, 3 Nov 2009 08:41:15 +0000 (UTC) (envelope-from oleg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ECCFE8FC1E; Tue, 3 Nov 2009 08:41: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 nA38fEw3084565; Tue, 3 Nov 2009 08:41:14 GMT (envelope-from oleg@svn.freebsd.org) Received: (from oleg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA38fEg3084563; Tue, 3 Nov 2009 08:41:14 GMT (envelope-from oleg@svn.freebsd.org) Message-Id: <200911030841.nA38fEg3084563@svn.freebsd.org> From: Oleg Bulyzhin Date: Tue, 3 Nov 2009 08:41: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: r198845 - head/sys/netinet/ipfw 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, 03 Nov 2009 08:41:15 -0000 Author: oleg Date: Tue Nov 3 08:41:14 2009 New Revision: 198845 URL: http://svn.freebsd.org/changeset/base/198845 Log: Fix two issues that can lead to exceeding configured pipe bandwidth: - do not expire queues which are not ready to be expired. - properly calculate available burst size. MFC after: 3 days Modified: head/sys/netinet/ipfw/ip_dummynet.c Modified: head/sys/netinet/ipfw/ip_dummynet.c ============================================================================== --- head/sys/netinet/ipfw/ip_dummynet.c Tue Nov 3 07:29:58 2009 (r198844) +++ head/sys/netinet/ipfw/ip_dummynet.c Tue Nov 3 08:41:14 2009 (r198845) @@ -244,6 +244,17 @@ void dummynet_drain(void); static int dummynet_io(struct mbuf **, int , struct ip_fw_args *); /* + * Flow queue is idle if: + * 1) it's empty for at least 1 tick + * 2) it has invalid timestamp (WF2Q case) + * 3) parent pipe has no 'exhausted' burst. + */ +#define QUEUE_IS_IDLE(q) ((q)->head == NULL && (q)->S == (q)->F + 1 && \ + curr_time > (q)->idle_time + 1 && \ + ((q)->numbytes + (curr_time - (q)->idle_time - 1) * \ + (q)->fs->pipe->bandwidth >= q->fs->pipe->burst)) + +/* * Heap management functions. * * In the heap, first node is element 0. Children of i are 2i+1 and 2i+2. @@ -1004,7 +1015,7 @@ expire_queues(struct dn_flow_set *fs) fs->last_expired = time_uptime ; for (i = 0 ; i <= fs->rq_size ; i++) /* last one is overflow */ for (prev=NULL, q = fs->rq[i] ; q != NULL ; ) - if (q->head != NULL || q->S != q->F+1) { + if (!QUEUE_IS_IDLE(q)) { prev = q ; q = q->next ; } else { /* entry is idle, expire it */ @@ -1134,7 +1145,7 @@ find_queue(struct dn_flow_set *fs, struc break ; /* found */ /* No match. Check if we can expire the entry */ - if (pipe_expire && q->head == NULL && q->S == q->F+1 ) { + if (pipe_expire && QUEUE_IS_IDLE(q)) { /* entry is idle and not in any heap, expire it */ struct dn_flow_queue *old_q = q ; @@ -1408,7 +1419,7 @@ dummynet_io(struct mbuf **m0, int dir, s if (q->idle_time < curr_time) { /* Calculate available burst size. */ q->numbytes += - (curr_time - q->idle_time) * pipe->bandwidth; + (curr_time - q->idle_time - 1) * pipe->bandwidth; if (q->numbytes > pipe->burst) q->numbytes = pipe->burst; if (io_fast) @@ -1418,8 +1429,8 @@ dummynet_io(struct mbuf **m0, int dir, s if (pipe->idle_time < curr_time) { /* Calculate available burst size. */ pipe->numbytes += - (curr_time - pipe->idle_time) * pipe->bandwidth; - if (pipe->numbytes > pipe->burst) + (curr_time - pipe->idle_time - 1) * pipe->bandwidth; + if (pipe->numbytes > 0 && pipe->numbytes > pipe->burst) pipe->numbytes = pipe->burst; if (io_fast) pipe->numbytes += pipe->bandwidth; From owner-svn-src-all@FreeBSD.ORG Tue Nov 3 09:04:04 2009 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 4564E106566B; Tue, 3 Nov 2009 09:04:04 +0000 (UTC) (envelope-from oleg@lath.rinet.ru) Received: from lath.rinet.ru (lath.rinet.ru [195.54.192.90]) by mx1.freebsd.org (Postfix) with ESMTP id F3E0C8FC16; Tue, 3 Nov 2009 09:04:03 +0000 (UTC) Received: by lath.rinet.ru (Postfix, from userid 222) id 2A422704C; Tue, 3 Nov 2009 11:45:18 +0300 (MSK) Date: Tue, 3 Nov 2009 11:45:18 +0300 From: Oleg Bulyzhin To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <20091103084518.GA45306@lath.rinet.ru> References: <200911030841.nA38fEg3084563@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200911030841.nA38fEg3084563@svn.freebsd.org> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: Subject: Re: svn commit: r198845 - head/sys/netinet/ipfw 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, 03 Nov 2009 09:04:04 -0000 On Tue, Nov 03, 2009 at 08:41:14AM +0000, Oleg Bulyzhin wrote: > Author: oleg > Date: Tue Nov 3 08:41:14 2009 > New Revision: 198845 > URL: http://svn.freebsd.org/changeset/base/198845 > > Log: > Fix two issues that can lead to exceeding configured pipe bandwidth: > - do not expire queues which are not ready to be expired. > - properly calculate available burst size. > > MFC after: 3 days > > Modified: > head/sys/netinet/ipfw/ip_dummynet.c Reviews are welcome, since i'm going to push this into 8.0-RELEASE. Thanks. -- Oleg. ================================================================ === Oleg Bulyzhin -- OBUL-RIPN -- OBUL-RIPE -- oleg@rinet.ru === ================================================================ From owner-svn-src-all@FreeBSD.ORG Tue Nov 3 09:17:24 2009 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 10A3E1065694; Tue, 3 Nov 2009 09:17:24 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 001928FC19; Tue, 3 Nov 2009 09:17: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 nA39HNWN085241; Tue, 3 Nov 2009 09:17:23 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA39HNCF085239; Tue, 3 Nov 2009 09:17:23 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <200911030917.nA39HNCF085239@svn.freebsd.org> From: Xin LI Date: Tue, 3 Nov 2009 09:17: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: r198846 - head/usr.sbin/crashinfo 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, 03 Nov 2009 09:17:24 -0000 Author: delphij Date: Tue Nov 3 09:17:23 2009 New Revision: 198846 URL: http://svn.freebsd.org/changeset/base/198846 Log: Set umask to 0x077 instead of the default. This prevents non-root user from reading crashinfo output, which could contain some sensitive information. Reviewed by: jhb MFC after: 1 week Modified: head/usr.sbin/crashinfo/crashinfo.sh Modified: head/usr.sbin/crashinfo/crashinfo.sh ============================================================================== --- head/usr.sbin/crashinfo/crashinfo.sh Tue Nov 3 08:41:14 2009 (r198845) +++ head/usr.sbin/crashinfo/crashinfo.sh Tue Nov 3 09:17:23 2009 (r198846) @@ -147,6 +147,8 @@ fi echo "Writing crash summary to $FILE." +umask 077 + # Simulate uname ostype=$(echo -e printf '"%s", ostype' | gdb -x /dev/stdin -batch $KERNEL) osrelease=$(echo -e printf '"%s", osrelease' | gdb -x /dev/stdin -batch $KERNEL) From owner-svn-src-all@FreeBSD.ORG Tue Nov 3 09:25:08 2009 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 C485C106566C; Tue, 3 Nov 2009 09:25:08 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B40B68FC16; Tue, 3 Nov 2009 09:25: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 nA39P8nv085488; Tue, 3 Nov 2009 09:25:08 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA39P8EM085486; Tue, 3 Nov 2009 09:25:08 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <200911030925.nA39P8EM085486@svn.freebsd.org> From: Xin LI Date: Tue, 3 Nov 2009 09:25: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: r198847 - head/usr.bin/leave 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, 03 Nov 2009 09:25:08 -0000 Author: delphij Date: Tue Nov 3 09:25:08 2009 New Revision: 198847 URL: http://svn.freebsd.org/changeset/base/198847 Log: Static'ify signal handler which is not called from outside. Modified: head/usr.bin/leave/leave.c Modified: head/usr.bin/leave/leave.c ============================================================================== --- head/usr.bin/leave/leave.c Tue Nov 3 09:17:23 2009 (r198846) +++ head/usr.bin/leave/leave.c Tue Nov 3 09:25:08 2009 (r198847) @@ -53,7 +53,7 @@ __FBSDID("$FreeBSD$"); #include #include -void doalarm(u_int); +static void doalarm(u_int); static void usage(void); /* From owner-svn-src-all@FreeBSD.ORG Tue Nov 3 09:28:46 2009 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 073E61065670; Tue, 3 Nov 2009 09:28:46 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EA9218FC16; Tue, 3 Nov 2009 09:28: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 nA39SjoZ085599; Tue, 3 Nov 2009 09:28:45 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA39SjLx085597; Tue, 3 Nov 2009 09:28:45 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <200911030928.nA39SjLx085597@svn.freebsd.org> From: Xin LI Date: Tue, 3 Nov 2009 09:28: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: r198848 - head/bin/ps 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, 03 Nov 2009 09:28:46 -0000 Author: delphij Date: Tue Nov 3 09:28:45 2009 New Revision: 198848 URL: http://svn.freebsd.org/changeset/base/198848 Log: Increase width for %CPU, RSS and VSZ columns for now. Modern systems tend to have larger memory, larger process, and more CPU. Modified: head/bin/ps/keyword.c Modified: head/bin/ps/keyword.c ============================================================================== --- head/bin/ps/keyword.c Tue Nov 3 09:25:08 2009 (r198847) +++ head/bin/ps/keyword.c Tue Nov 3 09:28:45 2009 (r198848) @@ -70,7 +70,7 @@ static int vcmp(const void *, const voi /* PLEASE KEEP THE TABLE BELOW SORTED ALPHABETICALLY!!! */ static VAR var[] = { - {"%cpu", "%CPU", NULL, 0, pcpu, NULL, 4, 0, CHAR, NULL, 0}, + {"%cpu", "%CPU", NULL, 0, pcpu, NULL, 5, 0, CHAR, NULL, 0}, {"%mem", "%MEM", NULL, 0, pmem, NULL, 4, 0, CHAR, NULL, 0}, {"acflag", "ACFLG", NULL, 0, kvar, NULL, 3, KOFF(ki_acflag), USHORT, "x", 0}, @@ -159,7 +159,7 @@ static VAR var[] = { UINT, UIDFMT, 0}, {"rgroup", "RGROUP", NULL, LJUST|DSIZ, rgroupname, s_rgroupname, USERLEN, 0, CHAR, NULL, 0}, - {"rss", "RSS", NULL, 0, kvar, NULL, 5, KOFF(ki_rssize), PGTOK, "ld", 0}, + {"rss", "RSS", NULL, 0, kvar, NULL, 6, KOFF(ki_rssize), PGTOK, "ld", 0}, {"rtprio", "RTPRIO", NULL, 0, priorityr, NULL, 7, KOFF(ki_pri), CHAR, NULL, 0}, {"ruid", "RUID", NULL, 0, kvar, NULL, UIDLEN, KOFF(ki_ruid), @@ -207,7 +207,7 @@ static VAR var[] = { NULL, 0}, {"usrpri", "", "upr", 0, NULL, NULL, 0, 0, CHAR, NULL, 0}, {"vsize", "", "vsz", 0, NULL, NULL, 0, 0, CHAR, NULL, 0}, - {"vsz", "VSZ", NULL, 0, vsize, NULL, 5, 0, CHAR, NULL, 0}, + {"vsz", "VSZ", NULL, 0, vsize, NULL, 6, 0, CHAR, NULL, 0}, {"wchan", "WCHAN", NULL, LJUST, wchan, NULL, 6, 0, CHAR, NULL, 0}, {"xstat", "XSTAT", NULL, 0, kvar, NULL, 4, KOFF(ki_xstat), USHORT, "x", 0}, From owner-svn-src-all@FreeBSD.ORG Tue Nov 3 10:15:28 2009 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 C55711065676 for ; Tue, 3 Nov 2009 10:15:28 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.186]) by mx1.freebsd.org (Postfix) with ESMTP id 598C58FC24 for ; Tue, 3 Nov 2009 10:15:28 +0000 (UTC) Received: from vampire.homelinux.org (dslb-088-067-242-013.pools.arcor-ip.net [88.67.242.13]) by mrelayeu.kundenserver.de (node=mreu0) with ESMTP (Nemesis) id 0MSmoL-1MgLhh2UGT-00RWxK; Tue, 03 Nov 2009 11:15:26 +0100 Received: (qmail 94176 invoked from network); 3 Nov 2009 10:14:02 -0000 Received: from kvm.laiers.local (HELO kvm.localnet) (192.168.4.188) by ns1.laiers.local with SMTP; 3 Nov 2009 10:14:02 -0000 From: Max Laier Organization: FreeBSD To: "Simon L. Nielsen" Date: Tue, 3 Nov 2009 11:13:58 +0100 User-Agent: KMail/1.12.2 (Linux/2.6.31-ARCH; KDE/4.3.2; x86_64; ; ) References: <200911022144.nA2Liw4K070791@svn.freebsd.org> In-Reply-To: <200911022144.nA2Liw4K070791@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <200911031113.59437.max@love2party.net> X-Provags-ID: V01U2FsdGVkX18ObnNoY3sMJ9Qyb1/h5EZq6ZyBh8F1pXpZaHQ natFPAdE+92s4BuO5qPIkeFE57LqIKFKWTt2SXRmoesfSwrVem ZalWLf3igUij9pKouL8bw== Cc: svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-svnadmin@freebsd.org Subject: Re: svn commit: r198826 - svnadmin/hooks/scripts 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, 03 Nov 2009 10:15:28 -0000 On Monday 02 November 2009 22:44:58 Simon L. Nielsen wrote: > Author: simon > Date: Mon Nov 2 21:44:57 2009 > New Revision: 198826 > URL: http://svn.freebsd.org/changeset/base/198826 > > Log: > Only print the 'Directory Properties' section if we actually have > changed directory properties. Thank you for the commit and sorry for this oversight. This is mine. > Modified: > svnadmin/hooks/scripts/mailer.py > > Modified: svnadmin/hooks/scripts/mailer.py > =========================================================================== > === --- svnadmin/hooks/scripts/mailer.py Mon Nov 2 21:44:10 2009 (r198825) > +++ svnadmin/hooks/scripts/mailer.py Mon Nov 2 21:44:57 2009 (r198826) @@ > -1062,7 +1062,8 @@ class TextCommitRenderer: > text = ' unchanged' > w(' - copied%s from r%d, %s%s\n' > % (text, d.base_rev, d.base_path, is_dir)) > - w('Directory Properties:\n%s' % (ps)) > + if len(ps) > 0: > + w('Directory Properties:\n%s' % (ps)) > > def _render_diffs(self, diffs, section_header): > """Render diffs. Write the SECTION_HEADER if there are actually > > > !DSPAM:4aef52ed799761205380022! > -- /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News From owner-svn-src-all@FreeBSD.ORG Tue Nov 3 11:19:06 2009 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 153D9106566B; Tue, 3 Nov 2009 11:19: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 033EA8FC0C; Tue, 3 Nov 2009 11:19: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 nA3BJ5I7090045; Tue, 3 Nov 2009 11:19:05 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA3BJ50K090039; Tue, 3 Nov 2009 11:19:05 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200911031119.nA3BJ50K090039@svn.freebsd.org> From: Alexander Motin Date: Tue, 3 Nov 2009 11:19: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: r198849 - in head/sys/cam: . 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, 03 Nov 2009 11:19:06 -0000 Author: mav Date: Tue Nov 3 11:19:05 2009 New Revision: 198849 URL: http://svn.freebsd.org/changeset/base/198849 Log: MFp4: Improve reporting ATA Status error details. Modified: head/sys/cam/ata/ata_all.c head/sys/cam/ata/ata_all.h head/sys/cam/cam.c head/sys/cam/cam.h head/sys/cam/cam_periph.c Modified: head/sys/cam/ata/ata_all.c ============================================================================== --- head/sys/cam/ata/ata_all.c Tue Nov 3 09:28:45 2009 (r198848) +++ head/sys/cam/ata/ata_all.c Tue Nov 3 11:19:05 2009 (r198849) @@ -68,6 +68,185 @@ ata_version(int ver) return 0; } +char * +ata_op_string(struct ata_cmd *cmd) +{ + + switch (cmd->command) { + case 0x00: return ("NOP"); + case 0x03: return ("CFA_REQUEST_EXTENDED_ERROR"); + case 0x08: return ("DEVICE_RESET"); + case 0x20: return ("READ"); + case 0x24: return ("READ48"); + case 0x25: return ("READ_DMA48"); + case 0x26: return ("READ_DMA_QUEUED48"); + case 0x27: return ("READ_NATIVE_MAX_ADDRESS48"); + case 0x29: return ("READ_MUL48"); + case 0x2a: return ("READ_STREAM_DMA48"); + case 0x2b: return ("READ_STREAM48"); + case 0x2f: return ("READ_LOG_EXT"); + case 0x30: return ("WRITE"); + case 0x34: return ("WRITE48"); + case 0x35: return ("WRITE_DMA48"); + case 0x36: return ("WRITE_DMA_QUEUED48"); + case 0x37: return ("SET_MAX_ADDRESS48"); + case 0x39: return ("WRITE_MUL48"); + case 0x3a: return ("WRITE_STREAM_DMA48"); + case 0x3b: return ("WRITE_STREAM48"); + case 0x3d: return ("WRITE_DMA_FUA"); + case 0x3e: return ("WRITE_DMA_FUA48"); + case 0x3f: return ("WRITE_LOG_EXT"); + case 0x40: return ("READ_VERIFY"); + case 0x42: return ("READ_VERIFY48"); + case 0x51: return ("CONFIGURE_STREAM"); + case 0x60: return ("READ_FPDMA_QUEUED"); + case 0x61: return ("WRITE_FPDMA_QUEUED"); + case 0x70: return ("SEEK"); + case 0x87: return ("CFA_TRANSLATE_SECTOR"); + case 0x90: return ("EXECUTE_DEVICE_DIAGNOSTIC"); + case 0x92: return ("DOWNLOAD_MICROCODE"); + case 0xa0: return ("PACKET"); + case 0xa1: return ("ATAPI_IDENTIFY"); + case 0xa2: return ("SERVICE"); + case 0xb0: return ("SMART"); + case 0xb1: return ("DEVICE CONFIGURATION"); + case 0xc0: return ("CFA_ERASE"); + case 0xc4: return ("READ_MUL"); + case 0xc5: return ("WRITE_MUL"); + case 0xc6: return ("SET_MULTI"); + case 0xc7: return ("READ_DMA_QUEUED"); + case 0xc8: return ("READ_DMA"); + case 0xca: return ("WRITE_DMA"); + case 0xcc: return ("WRITE_DMA_QUEUED"); + case 0xcd: return ("CFA_WRITE_MULTIPLE_WITHOUT_ERASE"); + case 0xce: return ("WRITE_MULTIPLE_FUA48"); + case 0xd1: return ("CHECK_MEDIA_CARD_TYPE"); + case 0xda: return ("GET_MEDIA_STATUS"); + case 0xde: return ("MEDIA_LOCK"); + case 0xdf: return ("MEDIA_UNLOCK"); + case 0xe0: return ("STANDBY_IMMEDIATE"); + case 0xe1: return ("IDLE_IMMEDIATE"); + case 0xe2: return ("STANDBY"); + case 0xe3: return ("IDLE"); + case 0xe4: return ("READ_BUFFER/PM"); + case 0xe5: return ("CHECK_POWER_MODE"); + case 0xe6: return ("SLEEP"); + case 0xe7: return ("FLUSHCACHE"); + case 0xe8: return ("WRITE_PM"); + case 0xea: return ("FLUSHCACHE48"); + case 0xec: return ("ATA_IDENTIFY"); + case 0xed: return ("MEDIA_EJECT"); + case 0xef: + switch (cmd->features) { + case 0x03: return ("SETFEATURES SET TRANSFER MODE"); + case 0x02: return ("SETFEATURES ENABLE WCACHE"); + case 0x82: return ("SETFEATURES DISABLE WCACHE"); + case 0xaa: return ("SETFEATURES ENABLE RCACHE"); + case 0x55: return ("SETFEATURES DISABLE RCACHE"); + } + return "SETFEATURES"; + case 0xf1: return ("SECURITY_SET_PASSWORD"); + case 0xf2: return ("SECURITY_UNLOCK"); + case 0xf3: return ("SECURITY_ERASE_PREPARE"); + case 0xf4: return ("SECURITY_ERASE_UNIT"); + case 0xf5: return ("SECURITY_FREE_LOCK"); + case 0xf6: return ("SECURITY DISABLE PASSWORD"); + case 0xf8: return ("READ_NATIVE_MAX_ADDRESS"); + case 0xf9: return ("SET_MAX_ADDRESS"); + } + return "UNKNOWN"; +} + +char * +ata_cmd_string(struct ata_cmd *cmd, char *cmd_string, size_t len) +{ + + snprintf(cmd_string, len, "%02x %02x %02x %02x " + "%02x %02x %02x %02x %02x %02x %02x %02x", + cmd->command, cmd->features, + cmd->lba_low, cmd->lba_mid, cmd->lba_high, cmd->device, + cmd->lba_low_exp, cmd->lba_mid_exp, cmd->lba_high_exp, + cmd->features_exp, cmd->sector_count, cmd->sector_count_exp); + + return(cmd_string); +} + +char * +ata_res_string(struct ata_res *res, char *res_string, size_t len) +{ + + snprintf(res_string, len, "%02x %02x %02x %02x " + "%02x %02x %02x %02x %02x %02x %02x", + res->status, res->error, + res->lba_low, res->lba_mid, res->lba_high, res->device, + res->lba_low_exp, res->lba_mid_exp, res->lba_high_exp, + res->sector_count, res->sector_count_exp); + + return(res_string); +} + +/* + * ata_command_sbuf() returns 0 for success and -1 for failure. + */ +int +ata_command_sbuf(struct ccb_ataio *ataio, struct sbuf *sb) +{ + char cmd_str[(12 * 3) + 1]; + + sbuf_printf(sb, "CMD: %s: %s", + ata_op_string(&ataio->cmd), + ata_cmd_string(&ataio->cmd, cmd_str, sizeof(cmd_str))); + + return(0); +} + +/* + * ata_status_abuf() returns 0 for success and -1 for failure. + */ +int +ata_status_sbuf(struct ccb_ataio *ataio, struct sbuf *sb) +{ + + sbuf_printf(sb, "ATA Status: %02x (%s%s%s%s%s%s%s%s)", + ataio->res.status, + (ataio->res.status & 0x80) ? "BSY " : "", + (ataio->res.status & 0x40) ? "DRDY " : "", + (ataio->res.status & 0x20) ? "DF " : "", + (ataio->res.status & 0x10) ? "SERV " : "", + (ataio->res.status & 0x08) ? "DRQ " : "", + (ataio->res.status & 0x04) ? "CORR " : "", + (ataio->res.status & 0x02) ? "IDX " : "", + (ataio->res.status & 0x01) ? "ERR" : ""); + if (ataio->res.status & 1) { + sbuf_printf(sb, ", Error: %02x (%s%s%s%s%s%s%s%s)", + ataio->res.error, + (ataio->res.error & 0x80) ? "ICRC " : "", + (ataio->res.error & 0x40) ? "UNC " : "", + (ataio->res.error & 0x20) ? "MC " : "", + (ataio->res.error & 0x10) ? "IDNF " : "", + (ataio->res.error & 0x08) ? "MCR " : "", + (ataio->res.error & 0x04) ? "ABRT " : "", + (ataio->res.error & 0x02) ? "NM " : "", + (ataio->res.error & 0x01) ? "ILI" : ""); + } + + return(0); +} + +/* + * ata_res_sbuf() returns 0 for success and -1 for failure. + */ +int +ata_res_sbuf(struct ccb_ataio *ataio, struct sbuf *sb) +{ + char res_str[(11 * 3) + 1]; + + sbuf_printf(sb, "RES: %s", + ata_res_string(&ataio->res, res_str, sizeof(res_str))); + + return(0); +} + void ata_print_ident(struct ata_params *ident_data) { Modified: head/sys/cam/ata/ata_all.h ============================================================================== --- head/sys/cam/ata/ata_all.h Tue Nov 3 09:28:45 2009 (r198848) +++ head/sys/cam/ata/ata_all.h Tue Nov 3 11:19:05 2009 (r198849) @@ -81,6 +81,14 @@ struct ata_res { }; int ata_version(int ver); + +char * ata_op_string(struct ata_cmd *cmd); +char * ata_cmd_string(struct ata_cmd *cmd, char *cmd_string, size_t len); +char * ata_res_string(struct ata_res *res, char *res_string, size_t len); +int ata_command_sbuf(struct ccb_ataio *ataio, struct sbuf *sb); +int ata_status_sbuf(struct ccb_ataio *ataio, struct sbuf *sb); +int ata_res_sbuf(struct ccb_ataio *ataio, struct sbuf *sb); + void ata_print_ident(struct ata_params *ident_data); void ata_28bit_cmd(struct ccb_ataio *ataio, uint8_t cmd, uint8_t features, Modified: head/sys/cam/cam.c ============================================================================== --- head/sys/cam/cam.c Tue Nov 3 09:28:45 2009 (r198848) +++ head/sys/cam/cam.c Tue Nov 3 11:19:05 2009 (r198849) @@ -229,6 +229,21 @@ cam_error_string(struct cam_device *devi return(NULL); switch (ccb->ccb_h.func_code) { + case XPT_ATA_IO: + switch (proto_flags & CAM_EPF_LEVEL_MASK) { + case CAM_EPF_NONE: + break; + case CAM_EPF_ALL: + case CAM_EPF_NORMAL: + proto_flags |= CAM_EAF_PRINT_RESULT; + /* FALLTHROUGH */ + case CAM_EPF_MINIMAL: + proto_flags |= CAM_EAF_PRINT_STATUS; + /* FALLTHROUGH */ + default: + break; + } + break; case XPT_SCSI_IO: switch (proto_flags & CAM_EPF_LEVEL_MASK) { case CAM_EPF_NONE: @@ -256,10 +271,12 @@ cam_error_string(struct cam_device *devi sbuf_new(&sb, str, str_len, 0); if (flags & CAM_ESF_COMMAND) { - sbuf_cat(&sb, path_str); - switch (ccb->ccb_h.func_code) { + case XPT_ATA_IO: + ata_command_sbuf(&ccb->ataio, &sb); + sbuf_printf(&sb, "\n"); + break; case XPT_SCSI_IO: #ifdef _KERNEL scsi_command_string(&ccb->csio, &sb); @@ -267,7 +284,6 @@ cam_error_string(struct cam_device *devi scsi_command_string(device, &ccb->csio, &sb); #endif /* _KERNEL/!_KERNEL */ sbuf_printf(&sb, "\n"); - break; default: break; @@ -295,6 +311,22 @@ cam_error_string(struct cam_device *devi if (flags & CAM_ESF_PROTO_STATUS) { switch (ccb->ccb_h.func_code) { + case XPT_ATA_IO: + if ((ccb->ccb_h.status & CAM_STATUS_MASK) != + CAM_ATA_STATUS_ERROR) + break; + if (proto_flags & CAM_EAF_PRINT_STATUS) { + sbuf_cat(&sb, path_str); + ata_status_sbuf(&ccb->ataio, &sb); + sbuf_printf(&sb, "\n"); + } + if (proto_flags & CAM_EAF_PRINT_RESULT) { + sbuf_cat(&sb, path_str); + ata_res_sbuf(&ccb->ataio, &sb); + sbuf_printf(&sb, "\n"); + } + + break; case XPT_SCSI_IO: if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_SCSI_STATUS_ERROR) @@ -302,10 +334,6 @@ cam_error_string(struct cam_device *devi if (proto_flags & CAM_ESF_PRINT_STATUS) { sbuf_cat(&sb, path_str); - /* - * Print out the SCSI status byte as long as - * the user wants some protocol output. - */ sbuf_printf(&sb, "SCSI Status: %s\n", scsi_status_string(&ccb->csio)); } Modified: head/sys/cam/cam.h ============================================================================== --- head/sys/cam/cam.h Tue Nov 3 09:28:45 2009 (r198848) +++ head/sys/cam/cam.h Tue Nov 3 11:19:05 2009 (r198849) @@ -184,6 +184,12 @@ typedef enum { CAM_ESF_PRINT_SENSE = 0x20 } cam_error_scsi_flags; +typedef enum { + CAM_EAF_PRINT_NONE = 0x00, + CAM_EAF_PRINT_STATUS = 0x10, + CAM_EAF_PRINT_RESULT = 0x20 +} cam_error_ata_flags; + struct cam_status_entry { cam_status status_code; Modified: head/sys/cam/cam_periph.c ============================================================================== --- head/sys/cam/cam_periph.c Tue Nov 3 09:28:45 2009 (r198848) +++ head/sys/cam/cam_periph.c Tue Nov 3 11:19:05 2009 (r198849) @@ -1612,6 +1612,7 @@ cam_periph_error(union ccb *ccb, cam_fla if (bootverbose && printed == 0) { xpt_print(ccb->ccb_h.path, "Request completed with CAM_ATA_STATUS_ERROR\n"); + cam_error_print(ccb, CAM_ESF_ALL, CAM_EPF_ALL); printed++; } /* FALLTHROUGH */ From owner-svn-src-all@FreeBSD.ORG Tue Nov 3 11:31:55 2009 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 78981106566C; Tue, 3 Nov 2009 11:31:55 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail01.syd.optusnet.com.au (mail01.syd.optusnet.com.au [211.29.132.182]) by mx1.freebsd.org (Postfix) with ESMTP id 140D18FC13; Tue, 3 Nov 2009 11:31:54 +0000 (UTC) Received: from c220-239-235-116.carlnfd3.nsw.optusnet.com.au (c220-239-235-116.carlnfd3.nsw.optusnet.com.au [220.239.235.116]) by mail01.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id nA3BVoHl030841 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 3 Nov 2009 22:31:52 +1100 Date: Tue, 3 Nov 2009 22:31:49 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Xin LI In-Reply-To: <200911030928.nA39SjLx085597@svn.freebsd.org> Message-ID: <20091103214231.H23957@delplex.bde.org> References: <200911030928.nA39SjLx085597@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: r198848 - head/bin/ps 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, 03 Nov 2009 11:31:55 -0000 On Tue, 3 Nov 2009, Xin LI wrote: > Log: > Increase width for %CPU, RSS and VSZ columns for now. Modern systems > tend to have larger memory, larger process, and more CPU. This uses space that is not available. Command names(+args) are now truncated to 9 columns in "ps l" output :-(. They used to be truncated to 11 columns recently (down from 12 columns in FreeBSD-5.2). %CPU != CPU. Modern systems don't really have more %CPU. The maximum percentage of anything is still 100.0. However, there are various bugs that result in a percentage of 100.0 being misdisplayed and "percentages" of more than 100.0 occurring: - ps used %4.1f format. This works for all percentages <= 99.9 (after rounding), but not for 100.0. Now ps uses %5.1 format, so 100.0 is displayed correctly, but all normal percentages are displayed worse than before (space that is not available is used to make them harder to read). - %CPU is not divided by the number of CPUs. Thus a multi-threaded process can have %CPU almost as large as * 100.0. This might be a feature. E.g., on mostly-idle systems, the idle process consists of threads which take akmost 100.0% CPU each, so the total %CPU for the idle process is almost the above maximum (it is now 799.2 on ref8.freebsd.org due to ref8 having 8 mostly-idle CPUs). Since ps now uses %5.1 format, it can display %CPU correctly on all systems with <= 9 CPUs, and on most systems with 10 CPUs (since the value of 1000.0 which is too wide for %5.1 format is even harder to reach on a 10-CPU system than the value of 100.0 which is too wide for %4.1 format is to reach on 1 a-CPU system). The format is still broken on systems with >= 11 CPUs. - perhaps schedular bugs can result in %CPU being transiently slightly greater than 100.0 for an individual thread. Expanding %CPU doesn't truncate "ps l" since "ps l" doesn't print %CPU. Thus the recent truncation is only from 11 COMMAND columns to 9 instead of to 8. There seems to be no better fix than to further granulate and dehumanize the numbers so that they fit in the available space. E.g., a %CPU of >= 100 and < 9999 should be displayed in %4.0f format; this only involvues granulation, but above 9999 it needs to be dehumanized as well and displayed in k or M or larger granularity (it can be > 9999 with 100 CPUs and > 999k with 10000 CPUs). A VSZ of >= 10000 (k implicit) needs to be displayed in M or larger granularity (M explicit). Bruce From owner-svn-src-all@FreeBSD.ORG Tue Nov 3 11:41:21 2009 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 9435D106568D; Tue, 3 Nov 2009 11:41:21 +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 8338B8FC13; Tue, 3 Nov 2009 11:41: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 nA3BfLfc090453; Tue, 3 Nov 2009 11:41:21 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA3BfLNB090451; Tue, 3 Nov 2009 11:41:21 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200911031141.nA3BfLNB090451@svn.freebsd.org> From: Ed Schouten Date: Tue, 3 Nov 2009 11:41: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: r198850 - head/sbin/sysctl 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, 03 Nov 2009 11:41:21 -0000 Author: ed Date: Tue Nov 3 11:41:21 2009 New Revision: 198850 URL: http://svn.freebsd.org/changeset/base/198850 Log: Just use devname(3) to print device names. Right now sysctl just prints the major/minor numbers of a device. Instead of rolling our own routine for this, we'd better just call devname(3) to perform a translation to a device name for us. Modified: head/sbin/sysctl/sysctl.c Modified: head/sbin/sysctl/sysctl.c ============================================================================== --- head/sbin/sysctl/sysctl.c Tue Nov 3 11:19:05 2009 (r198849) +++ head/sbin/sysctl/sysctl.c Tue Nov 3 11:41:21 2009 (r198850) @@ -419,14 +419,7 @@ T_dev_t(int l2, void *p) warnx("T_dev_T %d != %d", l2, sizeof(*d)); return (1); } - if ((int)(*d) != -1) { - if (minor(*d) > 255 || minor(*d) < 0) - printf("{ major = %d, minor = 0x%x }", - major(*d), minor(*d)); - else - printf("{ major = %d, minor = %d }", - major(*d), minor(*d)); - } + printf("%s", devname(*d, S_IFCHR)); return (0); } From owner-svn-src-all@FreeBSD.ORG Tue Nov 3 11:47:07 2009 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 9FC701065693; Tue, 3 Nov 2009 11:47:07 +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 8E5358FC2E; Tue, 3 Nov 2009 11:47: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 nA3Bl7XR090604; Tue, 3 Nov 2009 11:47:07 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA3Bl7PF090601; Tue, 3 Nov 2009 11:47:07 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200911031147.nA3Bl7PF090601@svn.freebsd.org> From: Alexander Motin Date: Tue, 3 Nov 2009 11:47: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: r198851 - head/sys/dev/ahci 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, 03 Nov 2009 11:47:07 -0000 Author: mav Date: Tue Nov 3 11:47:07 2009 New Revision: 198851 URL: http://svn.freebsd.org/changeset/base/198851 Log: MFp4: - Handle timeouts and fatal errors with port hard-reset. The rest of recovery will be done by XPT on receiving async event. More gracefull per-device soft-reset recovery can be implemented later. - Add workaround for ATI SB600/SB700 PMP probe related bug, to speedup boot. Modified: head/sys/dev/ahci/ahci.c head/sys/dev/ahci/ahci.h Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Tue Nov 3 11:41:21 2009 (r198850) +++ head/sys/dev/ahci/ahci.c Tue Nov 3 11:47:07 2009 (r198851) @@ -1221,6 +1221,13 @@ ahci_execute_transaction(struct ahci_slo et = AHCI_ERR_TFE; break; } + /* Workaround for ATI SB600/SB700 chipsets. */ + if (ccb->ccb_h.target_id == 15 && + pci_get_vendor(device_get_parent(dev)) == 0x1002 && + (ATA_INL(ch->r_mem, AHCI_P_IS) & AHCI_P_IX_IPM)) { + et = AHCI_ERR_TIMEOUT; + break; + } } if (timeout && (count >= timeout)) { device_printf(ch->dev, @@ -1275,10 +1282,8 @@ ahci_timeout(struct ahci_slot *slot) ATA_INL(ch->r_mem, AHCI_P_IS), ATA_INL(ch->r_mem, AHCI_P_CI), ATA_INL(ch->r_mem, AHCI_P_SACT), ch->rslots, ATA_INL(ch->r_mem, AHCI_P_TFD), ATA_INL(ch->r_mem, AHCI_P_SERR)); - /* Kick controller into sane state. */ - ahci_stop(ch->dev); - ahci_start(ch->dev); + ch->fatalerr = 1; /* Handle frozen command. */ if (ch->frozen) { union ccb *fccb = ch->frozen; @@ -1360,6 +1365,7 @@ ahci_end_transaction(struct ahci_slot *s ccb->csio.scsi_status = SCSI_STATUS_OK; break; case AHCI_ERR_INVALID: + ch->fatalerr = 1; ccb->ccb_h.status |= CAM_REQ_INVALID; break; case AHCI_ERR_INNOCENT: @@ -1375,6 +1381,7 @@ ahci_end_transaction(struct ahci_slot *s } break; case AHCI_ERR_SATA: + ch->fatalerr = 1; if (!ch->readlog) { xpt_freeze_simq(ch->sim, 1); ccb->ccb_h.status &= ~CAM_STATUS_MASK; @@ -1383,6 +1390,10 @@ ahci_end_transaction(struct ahci_slot *s ccb->ccb_h.status |= CAM_UNCOR_PARITY; break; case AHCI_ERR_TIMEOUT: + /* Do no treat soft-reset timeout as fatal here. */ + if (ccb->ccb_h.func_code != XPT_ATA_IO || + !(ccb->ataio.cmd.flags & CAM_ATAIO_CONTROL)) + ch->fatalerr = 1; if (!ch->readlog) { xpt_freeze_simq(ch->sim, 1); ccb->ccb_h.status &= ~CAM_STATUS_MASK; @@ -1391,6 +1402,7 @@ ahci_end_transaction(struct ahci_slot *s ccb->ccb_h.status |= CAM_CMD_TIMEOUT; break; default: + ch->fatalerr = 1; ccb->ccb_h.status |= CAM_REQ_CMP_ERR; } /* Free slot. */ @@ -1414,12 +1426,13 @@ ahci_end_transaction(struct ahci_slot *s ahci_begin_transaction(dev, ccb); return; } + /* If it was our READ LOG command - process it. */ + if (ch->readlog) { + ahci_process_read_log(dev, ccb); /* If it was NCQ command error, put result on hold. */ - if (et == AHCI_ERR_NCQ) { + } else if (et == AHCI_ERR_NCQ) { ch->hold[slot->slot] = ccb; - } else if (ch->readlog) /* If it was our READ LOG command - process it. */ - ahci_process_read_log(dev, ccb); - else + } else xpt_done(ccb); /* Unfreeze frozen command. */ if (ch->frozen && ch->numrslots == 0) { @@ -1428,6 +1441,13 @@ ahci_end_transaction(struct ahci_slot *s ahci_begin_transaction(dev, fccb); xpt_release_simq(ch->sim, TRUE); } + /* If we have no other active commands, ... */ + if (ch->rslots == 0) { + /* if there was fatal error - reset port. */ + if (ch->fatalerr) { + ahci_reset(dev); + } + } /* Start PM timer. */ if (ch->numrslots == 0 && ch->pm_level > 3) { callout_schedule(&ch->pm_timer, @@ -1674,6 +1694,13 @@ ahci_reset(device_t dev) /* XXX; Commands in loading state. */ ahci_end_transaction(&ch->slot[i], AHCI_ERR_INNOCENT); } + for (i = 0; i < ch->numslots; i++) { + if (!ch->hold[i]) + continue; + xpt_done(ch->hold[i]); + ch->hold[i] = NULL; + } + ch->fatalerr = 0; /* Tell the XPT about the event */ xpt_async(AC_BUS_RESET, ch->path, NULL); /* Disable port interrupts */ Modified: head/sys/dev/ahci/ahci.h ============================================================================== --- head/sys/dev/ahci/ahci.h Tue Nov 3 11:41:21 2009 (r198850) +++ head/sys/dev/ahci/ahci.h Tue Nov 3 11:47:07 2009 (r198851) @@ -366,6 +366,7 @@ struct ahci_channel { int numrslots; /* Number of running slots */ int numtslots; /* Number of tagged slots */ int readlog; /* Our READ LOG active */ + int fatalerr; /* Fatal error happend */ int lastslot; /* Last used slot */ int taggedtarget; /* Last tagged target */ union ccb *frozen; /* Frozen command */ From owner-svn-src-all@FreeBSD.ORG Tue Nov 3 12:03:13 2009 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 6967A106568B; Tue, 3 Nov 2009 12:03:13 +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 56CE58FC19; Tue, 3 Nov 2009 12:03: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 nA3C3DXc090942; Tue, 3 Nov 2009 12:03:13 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA3C3DGn090939; Tue, 3 Nov 2009 12:03:13 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200911031203.nA3C3DGn090939@svn.freebsd.org> From: Alexander Motin Date: Tue, 3 Nov 2009 12:03: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: r198852 - head/sys/dev/siis 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, 03 Nov 2009 12:03:13 -0000 Author: mav Date: Tue Nov 3 12:03:13 2009 New Revision: 198852 URL: http://svn.freebsd.org/changeset/base/198852 Log: MFp4: - Rework timeout handling, to make it more graceful for devices sharing controller port (with PMP). Wait for other commands completion/timeout before initiating recovery. - Handle timeouts and fatal errors with port hard-reset. The rest of recovery will be done by XPT on receiving async event. More gracefull per-device soft-reset recovery can be implemented later. Modified: head/sys/dev/siis/siis.c head/sys/dev/siis/siis.h Modified: head/sys/dev/siis/siis.c ============================================================================== --- head/sys/dev/siis/siis.c Tue Nov 3 11:47:07 2009 (r198851) +++ head/sys/dev/siis/siis.c Tue Nov 3 12:03:13 2009 (r198852) @@ -511,7 +511,10 @@ siis_ch_resume(device_t dev) /* Get port out of reset state. */ ATA_OUTL(ch->r_mem, SIIS_P_CTLCLR, SIIS_P_CTL_PORT_RESET); ATA_OUTL(ch->r_mem, SIIS_P_CTLCLR, SIIS_P_CTL_32BIT); - ATA_OUTL(ch->r_mem, SIIS_P_CTLCLR, SIIS_P_CTL_PME); + if (ch->pm_present) + ATA_OUTL(ch->r_mem, SIIS_P_CTLSET, SIIS_P_CTL_PME); + else + ATA_OUTL(ch->r_mem, SIIS_P_CTLCLR, SIIS_P_CTL_PME); /* Enable port interrupts */ ATA_OUTL(ch->r_mem, SIIS_P_IESET, SIIS_P_IX_ENABLED); return (0); @@ -764,7 +767,7 @@ siis_ch_intr(void *data) estatus == SIIS_P_CMDERR_DATAFIS) { tslots = ch->numtslots[port]; for (i = 0; i < SIIS_MAX_SLOTS; i++) { - /* XXX: reqests in loading state. */ + /* XXX: requests in loading state. */ if (((ch->rslots >> i) & 1) == 0) continue; if (ch->slot[i].ccb->ccb_h.target_id != port) @@ -796,7 +799,7 @@ siis_ch_intr(void *data) } else et = SIIS_ERR_INVALID; for (i = 0; i < SIIS_MAX_SLOTS; i++) { - /* XXX: reqests in loading state. */ + /* XXX: requests in loading state. */ if (((ch->rslots >> i) & 1) == 0) continue; siis_end_transaction(&ch->slot[i], et); @@ -967,48 +970,51 @@ siis_execute_transaction(struct siis_slo return; } -/* Locked by callout mechanism. */ +/* Must be called with channel locked. */ static void -siis_timeout(struct siis_slot *slot) +siis_process_timeout(device_t dev) { - device_t dev = slot->dev; struct siis_channel *ch = device_get_softc(dev); int i; mtx_assert(&ch->mtx, MA_OWNED); - device_printf(dev, "Timeout on slot %d\n", slot->slot); -device_printf(dev, "%s is %08x ss %08x rs %08x es %08x sts %08x serr %08x\n", - __func__, ATA_INL(ch->r_mem, SIIS_P_IS), ATA_INL(ch->r_mem, SIIS_P_SS), ch->rslots, - ATA_INL(ch->r_mem, SIIS_P_CMDERR), ATA_INL(ch->r_mem, SIIS_P_STS), - ATA_INL(ch->r_mem, SIIS_P_SERR)); - /* Kick controller into sane state. */ - siis_portinit(ch->dev); - - if (!ch->readlog) + if (!ch->readlog && !ch->recovery) { xpt_freeze_simq(ch->sim, ch->numrslots); - /* Handle frozen command. */ - if (ch->frozen) { - union ccb *fccb = ch->frozen; - ch->frozen = NULL; - fccb->ccb_h.status &= ~CAM_STATUS_MASK; - fccb->ccb_h.status |= CAM_REQUEUE_REQ | CAM_RELEASE_SIMQ; - if (!(fccb->ccb_h.status & CAM_DEV_QFRZN)) { - xpt_freeze_devq(fccb->ccb_h.path, 1); - fccb->ccb_h.status |= CAM_DEV_QFRZN; - } - xpt_done(fccb); + ch->recovery = 1; } - /* Handle command with timeout. */ - siis_end_transaction(&ch->slot[slot->slot], SIIS_ERR_TIMEOUT); /* Handle the rest of commands. */ for (i = 0; i < SIIS_MAX_SLOTS; i++) { /* Do we have a running request on slot? */ if (ch->slot[i].state < SIIS_SLOT_RUNNING) continue; - siis_end_transaction(&ch->slot[i], SIIS_ERR_INNOCENT); + siis_end_transaction(&ch->slot[i], SIIS_ERR_TIMEOUT); } } +/* Locked by callout mechanism. */ +static void +siis_timeout(struct siis_slot *slot) +{ + device_t dev = slot->dev; + struct siis_channel *ch = device_get_softc(dev); + + mtx_assert(&ch->mtx, MA_OWNED); + device_printf(dev, "Timeout on slot %d\n", slot->slot); +device_printf(dev, "%s is %08x ss %08x rs %08x es %08x sts %08x serr %08x\n", + __func__, ATA_INL(ch->r_mem, SIIS_P_IS), ATA_INL(ch->r_mem, SIIS_P_SS), ch->rslots, + ATA_INL(ch->r_mem, SIIS_P_CMDERR), ATA_INL(ch->r_mem, SIIS_P_STS), + ATA_INL(ch->r_mem, SIIS_P_SERR)); + + if (ch->toslots == 0) + xpt_freeze_simq(ch->sim, 1); + ch->toslots |= (1 << slot->slot); + if ((ch->rslots & ~ch->toslots) == 0) + siis_process_timeout(dev); + else + device_printf(dev, " ... waiting for slots %08x\n", + ch->rslots & ~ch->toslots); +} + /* Must be called with channel locked. */ static void siis_end_transaction(struct siis_slot *slot, enum siis_err_type et) @@ -1071,6 +1077,7 @@ siis_end_transaction(struct siis_slot *s ccb->csio.scsi_status = SCSI_STATUS_OK; break; case SIIS_ERR_INVALID: + ch->fatalerr = 1; ccb->ccb_h.status |= CAM_REQ_INVALID; break; case SIIS_ERR_INNOCENT: @@ -1086,9 +1093,11 @@ siis_end_transaction(struct siis_slot *s } break; case SIIS_ERR_SATA: + ch->fatalerr = 1; ccb->ccb_h.status |= CAM_UNCOR_PARITY; break; case SIIS_ERR_TIMEOUT: + ch->fatalerr = 1; ccb->ccb_h.status |= CAM_CMD_TIMEOUT; break; default: @@ -1097,6 +1106,11 @@ siis_end_transaction(struct siis_slot *s /* Free slot. */ ch->rslots &= ~(1 << slot->slot); ch->aslots &= ~(1 << slot->slot); + if (et != SIIS_ERR_TIMEOUT) { + if (ch->toslots == (1 << slot->slot)) + xpt_release_simq(ch->sim, TRUE); + ch->toslots &= ~(1 << slot->slot); + } slot->state = SIIS_SLOT_EMPTY; slot->ccb = NULL; /* Update channel stats. */ @@ -1105,13 +1119,14 @@ siis_end_transaction(struct siis_slot *s (ccb->ataio.cmd.flags & CAM_ATAIO_FPDMA)) { ch->numtslots[ccb->ccb_h.target_id]--; } + /* If it was our READ LOG command - process it. */ + if (ch->readlog) { + siis_process_read_log(dev, ccb); /* If it was NCQ command error, put result on hold. */ - if (et == SIIS_ERR_NCQ) { + } else if (et == SIIS_ERR_NCQ) { ch->hold[slot->slot] = ccb; ch->numhslots++; - } else if (ch->readlog) /* If it was our READ LOG command - process it. */ - siis_process_read_log(dev, ccb); - else + } else xpt_done(ccb); /* Unfreeze frozen command. */ if (ch->frozen && ch->numrslots == 0) { @@ -1122,13 +1137,20 @@ siis_end_transaction(struct siis_slot *s } /* If we have no other active commands, ... */ if (ch->rslots == 0) { - /* if we have slots in error, we can reinit port. */ - if (ch->eslots != 0) - siis_portinit(dev); - /* if there commands on hold, we can do READ LOG. */ - if (!ch->readlog && ch->numhslots) - siis_issue_read_log(dev); - } + /* if there were timeouts or fatal error - reset port. */ + if (ch->toslots != 0 || ch->fatalerr) { + siis_reset(dev); + } else { + /* if we have slots in error, we can reinit port. */ + if (ch->eslots != 0) + siis_portinit(dev); + /* if there commands on hold, we can do READ LOG. */ + if (!ch->readlog && ch->numhslots) + siis_issue_read_log(dev); + } + /* If all the reset of commands are in timeout - abort them. */ + } else if ((ch->rslots & ~ch->toslots) == 0) + siis_process_timeout(dev); } static void @@ -1296,13 +1318,14 @@ static void siis_reset(device_t dev) { struct siis_channel *ch = device_get_softc(dev); - int i; + int i, retry = 0; uint32_t val; if (bootverbose) device_printf(dev, "SIIS reset...\n"); - xpt_freeze_simq(ch->sim, ch->numrslots); - /* Requeue freezed command. */ + if (!ch->readlog && !ch->recovery) + xpt_freeze_simq(ch->sim, ch->numrslots); + /* Requeue frozen command. */ if (ch->frozen) { union ccb *fccb = ch->frozen; ch->frozen = NULL; @@ -1322,6 +1345,20 @@ siis_reset(device_t dev) /* XXX; Commands in loading state. */ siis_end_transaction(&ch->slot[i], SIIS_ERR_INNOCENT); } + /* Finish all holden commands as-is. */ + for (i = 0; i < SIIS_MAX_SLOTS; i++) { + if (!ch->hold[i]) + continue; + xpt_done(ch->hold[i]); + ch->hold[i] = NULL; + ch->numhslots--; + } + if (ch->toslots != 0) + xpt_release_simq(ch->sim, TRUE); + ch->eslots = 0; + ch->recovery = 0; + ch->toslots = 0; + ch->fatalerr = 0; /* Disable port interrupts */ ATA_OUTL(ch->r_mem, SIIS_P_IECLR, 0x0000FFFF); /* Set speed limit. */ @@ -1336,6 +1373,7 @@ siis_reset(device_t dev) ATA_OUTL(ch->r_mem, SIIS_P_SCTL, ATA_SC_DET_IDLE | val | ((ch->pm_level > 0) ? 0 : (ATA_SC_IPM_DIS_PARTIAL | ATA_SC_IPM_DIS_SLUMBER))); +retry: siis_devreset(dev); /* Reset and reconnect PHY, */ if (!siis_sata_connect(ch)) { @@ -1350,8 +1388,25 @@ siis_reset(device_t dev) return; } /* Wait for clearing busy status. */ - if (siis_wait_ready(dev, 10000)) + if (siis_wait_ready(dev, 10000)) { device_printf(dev, "device ready timeout\n"); + if (!retry) { + device_printf(dev, "trying full port reset ...\n"); + /* Get port to the reset state. */ + ATA_OUTL(ch->r_mem, SIIS_P_CTLSET, SIIS_P_CTL_PORT_RESET); + DELAY(10000); + /* Get port out of reset state. */ + ATA_OUTL(ch->r_mem, SIIS_P_CTLCLR, SIIS_P_CTL_PORT_RESET); + ATA_OUTL(ch->r_mem, SIIS_P_CTLCLR, SIIS_P_CTL_32BIT); + if (ch->pm_present) + ATA_OUTL(ch->r_mem, SIIS_P_CTLSET, SIIS_P_CTL_PME); + else + ATA_OUTL(ch->r_mem, SIIS_P_CTLCLR, SIIS_P_CTL_PME); + siis_wait_ready(dev, 5000); + retry = 1; + goto retry; + } + } ch->devices = 1; /* Enable port interrupts */ ATA_OUTL(ch->r_mem, SIIS_P_IS, 0xFFFFFFFF); @@ -1487,7 +1542,8 @@ siisaction(struct cam_sim *sim, union cc struct ccb_trans_settings *cts = &ccb->cts; if (cts->xport_specific.sata.valid & CTS_SATA_VALID_PM) { - if (cts->xport_specific.sata.pm_present) + ch->pm_present = cts->xport_specific.sata.pm_present; + if (ch->pm_present) ATA_OUTL(ch->r_mem, SIIS_P_CTLSET, SIIS_P_CTL_PME); else ATA_OUTL(ch->r_mem, SIIS_P_CTLCLR, SIIS_P_CTL_PME); @@ -1522,9 +1578,7 @@ siisaction(struct cam_sim *sim, union cc cts->xport_specific.sata.bitrate = 150000; cts->xport_specific.sata.valid |= CTS_SATA_VALID_SPEED; } - cts->xport_specific.sata.pm_present = - (ATA_INL(ch->r_mem, SIIS_P_STS) & SIIS_P_CTL_PME) ? - 1 : 0; + cts->xport_specific.sata.pm_present = ch->pm_present; cts->xport_specific.sata.valid |= CTS_SATA_VALID_PM; ccb->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); Modified: head/sys/dev/siis/siis.h ============================================================================== --- head/sys/dev/siis/siis.h Tue Nov 3 11:47:07 2009 (r198851) +++ head/sys/dev/siis/siis.h Tue Nov 3 12:03:13 2009 (r198852) @@ -373,13 +373,14 @@ struct siis_channel { uint32_t rslots; /* Running slots */ uint32_t aslots; /* Slots with atomic commands */ uint32_t eslots; /* Slots in error */ + uint32_t toslots; /* Slots in timeout */ int numrslots; /* Number of running slots */ int numtslots[SIIS_MAX_SLOTS]; /* Number of tagged slots */ int numhslots; /* Number of holden slots */ int readlog; /* Our READ LOG active */ + int fatalerr; /* Fatal error happend */ int recovery; /* Some slots are in error */ int lastslot; /* Last used slot */ - int taggedtarget; /* Last tagged target */ union ccb *frozen; /* Frozen command */ }; From owner-svn-src-all@FreeBSD.ORG Tue Nov 3 12:52:35 2009 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 C7222106566B; Tue, 3 Nov 2009 12:52: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 B623D8FC15; Tue, 3 Nov 2009 12:52: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 nA3CqZgb092017; Tue, 3 Nov 2009 12:52:35 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA3CqZdj092015; Tue, 3 Nov 2009 12:52:35 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200911031252.nA3CqZdj092015@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 3 Nov 2009 12:52: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: r198853 - 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, 03 Nov 2009 12:52:35 -0000 Author: kib Date: Tue Nov 3 12:52:35 2009 New Revision: 198853 URL: http://svn.freebsd.org/changeset/base/198853 Log: If socket buffer space appears to be lower then sum of count of already prepared bytes and next portion of transfer, inner loop of kern_sendfile() aborts, not preparing next mbuf for socket buffer, and not modifying any outer loop invariants. The thread loops in the outer loop forever. Instead of breaking from inner loop, prepare only bytes that fit into the socket buffer space. In collaboration with: pho Reviewed by: bz PR: kern/138999 MFC after: 2 weeks Modified: head/sys/kern/uipc_syscalls.c Modified: head/sys/kern/uipc_syscalls.c ============================================================================== --- head/sys/kern/uipc_syscalls.c Tue Nov 3 12:03:13 2009 (r198852) +++ head/sys/kern/uipc_syscalls.c Tue Nov 3 12:52:35 2009 (r198853) @@ -2037,20 +2037,12 @@ retry_space: rem = obj->un_pager.vnp.vnp_size - uap->offset - fsbytes - loopbytes; xfsize = omin(rem, xfsize); + xfsize = omin(space - loopbytes, xfsize); if (xfsize <= 0) { VM_OBJECT_UNLOCK(obj); done = 1; /* all data sent */ break; } - /* - * Don't overflow the send buffer. - * Stop here and send out what we've - * already got. - */ - if (space < loopbytes + xfsize) { - VM_OBJECT_UNLOCK(obj); - break; - } /* * Attempt to look up the page. Allocate From owner-svn-src-all@FreeBSD.ORG Tue Nov 3 16:46:52 2009 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 D0C5E1065692; Tue, 3 Nov 2009 16:46:52 +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 BF02B8FC1D; Tue, 3 Nov 2009 16:46: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 nA3GkqZr096845; Tue, 3 Nov 2009 16:46:52 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA3GkqB4096838; Tue, 3 Nov 2009 16:46:52 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <200911031646.nA3GkqB4096838@svn.freebsd.org> From: Attilio Rao Date: Tue, 3 Nov 2009 16:46: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: r198854 - in head/sys: kern 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: Tue, 03 Nov 2009 16:46:52 -0000 Author: attilio Date: Tue Nov 3 16:46:52 2009 New Revision: 198854 URL: http://svn.freebsd.org/changeset/base/198854 Log: Split P_NOLOAD into a per-thread flag (TDF_NOLOAD). This improvements aims for avoiding further cache-misses in scheduler specific functions which need to keep track of average thread running time and further locking in places setting for this flag. Reported by: jeff (originally), kris (currently) Reviewed by: jhb Tested by: Giuseppe Cocomazzi Modified: head/sys/kern/kern_idle.c head/sys/kern/kern_intr.c head/sys/kern/sched_4bsd.c head/sys/kern/sched_ule.c head/sys/sys/proc.h head/sys/vm/vm_zeroidle.c Modified: head/sys/kern/kern_idle.c ============================================================================== --- head/sys/kern/kern_idle.c Tue Nov 3 12:52:35 2009 (r198853) +++ head/sys/kern/kern_idle.c Tue Nov 3 16:46:52 2009 (r198854) @@ -74,10 +74,9 @@ idle_setup(void *dummy) if (error) panic("idle_setup: kproc_create error %d\n", error); - p->p_flag |= P_NOLOAD; thread_lock(td); TD_SET_CAN_RUN(td); - td->td_flags |= TDF_IDLETD; + td->td_flags |= TDF_IDLETD | TDF_NOLOAD; sched_class(td, PRI_IDLE); sched_prio(td, PRI_MAX_IDLE); thread_unlock(td); Modified: head/sys/kern/kern_intr.c ============================================================================== --- head/sys/kern/kern_intr.c Tue Nov 3 12:52:35 2009 (r198853) +++ head/sys/kern/kern_intr.c Tue Nov 3 16:46:52 2009 (r198854) @@ -1061,6 +1061,7 @@ int swi_add(struct intr_event **eventp, const char *name, driver_intr_t handler, void *arg, int pri, enum intr_type flags, void **cookiep) { + struct thread *td; struct intr_event *ie; int error; @@ -1085,11 +1086,10 @@ swi_add(struct intr_event **eventp, cons if (error) return (error); if (pri == SWI_CLOCK) { - struct proc *p; - p = ie->ie_thread->it_thread->td_proc; - PROC_LOCK(p); - p->p_flag |= P_NOLOAD; - PROC_UNLOCK(p); + td = ie->ie_thread->it_thread; + thread_lock(td); + td->td_flags |= TDF_NOLOAD; + thread_unlock(td); } return (0); } Modified: head/sys/kern/sched_4bsd.c ============================================================================== --- head/sys/kern/sched_4bsd.c Tue Nov 3 12:52:35 2009 (r198853) +++ head/sys/kern/sched_4bsd.c Tue Nov 3 16:46:52 2009 (r198854) @@ -728,10 +728,10 @@ sched_exit_thread(struct thread *td, str thread_lock(td); td->td_estcpu = ESTCPULIM(td->td_estcpu + child->td_estcpu); thread_unlock(td); - mtx_lock_spin(&sched_lock); - if ((child->td_proc->p_flag & P_NOLOAD) == 0) + thread_lock(child); + if ((child->td_flags & TDF_NOLOAD) == 0) sched_load_rem(); - mtx_unlock_spin(&sched_lock); + thread_unlock(child); } void @@ -937,7 +937,7 @@ sched_switch(struct thread *td, struct t thread_unlock(td); } - if ((p->p_flag & P_NOLOAD) == 0) + if ((td->td_flags & TDF_NOLOAD) == 0) sched_load_rem(); if (newtd) @@ -980,7 +980,7 @@ sched_switch(struct thread *td, struct t ("trying to run inhibited thread")); newtd->td_flags |= TDF_DIDRUN; TD_SET_RUNNING(newtd); - if ((newtd->td_proc->p_flag & P_NOLOAD) == 0) + if ((newtd->td_flags & TDF_NOLOAD) == 0) sched_load_add(); } else { newtd = choosethread(); @@ -1289,7 +1289,7 @@ sched_add(struct thread *td, int flags) } } - if ((td->td_proc->p_flag & P_NOLOAD) == 0) + if ((td->td_flags & TDF_NOLOAD) == 0) sched_load_add(); runq_add(ts->ts_runq, td, flags); if (cpu != NOCPU) @@ -1338,7 +1338,7 @@ sched_add(struct thread *td, int flags) if (maybe_preempt(td)) return; } - if ((td->td_proc->p_flag & P_NOLOAD) == 0) + if ((td->td_flags & TDF_NOLOAD) == 0) sched_load_add(); runq_add(ts->ts_runq, td, flags); maybe_resched(td); @@ -1360,7 +1360,7 @@ sched_rem(struct thread *td) "prio:%d", td->td_priority, KTR_ATTR_LINKED, sched_tdname(curthread)); - if ((td->td_proc->p_flag & P_NOLOAD) == 0) + if ((td->td_flags & TDF_NOLOAD) == 0) sched_load_rem(); #ifdef SMP if (ts->ts_runq != &runq) Modified: head/sys/kern/sched_ule.c ============================================================================== --- head/sys/kern/sched_ule.c Tue Nov 3 12:52:35 2009 (r198853) +++ head/sys/kern/sched_ule.c Tue Nov 3 16:46:52 2009 (r198854) @@ -495,7 +495,7 @@ tdq_load_add(struct tdq *tdq, struct thr THREAD_LOCK_ASSERT(td, MA_OWNED); tdq->tdq_load++; - if ((td->td_proc->p_flag & P_NOLOAD) == 0) + if ((td->td_flags & TDF_NOLOAD) == 0) tdq->tdq_sysload++; KTR_COUNTER0(KTR_SCHED, "load", tdq->tdq_loadname, tdq->tdq_load); } @@ -514,7 +514,7 @@ tdq_load_rem(struct tdq *tdq, struct thr ("tdq_load_rem: Removing with 0 load on queue %d", TDQ_ID(tdq))); tdq->tdq_load--; - if ((td->td_proc->p_flag & P_NOLOAD) == 0) + if ((td->td_flags & TDF_NOLOAD) == 0) tdq->tdq_sysload--; KTR_COUNTER0(KTR_SCHED, "load", tdq->tdq_loadname, tdq->tdq_load); } Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Tue Nov 3 12:52:35 2009 (r198853) +++ head/sys/sys/proc.h Tue Nov 3 16:46:52 2009 (r198854) @@ -322,7 +322,7 @@ do { \ #define TDF_NEEDSUSPCHK 0x00008000 /* Thread may need to suspend. */ #define TDF_NEEDRESCHED 0x00010000 /* Thread needs to yield. */ #define TDF_NEEDSIGCHK 0x00020000 /* Thread may need signal delivery. */ -#define TDF_UNUSED18 0x00040000 /* --available-- */ +#define TDF_NOLOAD 0x00040000 /* Ignore during load avg calculations. */ #define TDF_UNUSED19 0x00080000 /* Thread is sleeping on a umtx. */ #define TDF_THRWAKEUP 0x00100000 /* Libthr thread must not suspend itself. */ #define TDF_UNUSED21 0x00200000 /* --available-- */ @@ -558,7 +558,7 @@ struct proc { #define P_ADVLOCK 0x00001 /* Process may hold a POSIX advisory lock. */ #define P_CONTROLT 0x00002 /* Has a controlling terminal. */ #define P_KTHREAD 0x00004 /* Kernel thread (*). */ -#define P_NOLOAD 0x00008 /* Ignore during load avg calculations. */ +#define P_UNUSED0 0x00008 /* available. */ #define P_PPWAIT 0x00010 /* Parent is waiting for child to exec/exit. */ #define P_PROFIL 0x00020 /* Has started profiling. */ #define P_STOPPROF 0x00040 /* Has thread requesting to stop profiling. */ Modified: head/sys/vm/vm_zeroidle.c ============================================================================== --- head/sys/vm/vm_zeroidle.c Tue Nov 3 12:52:35 2009 (r198853) +++ head/sys/vm/vm_zeroidle.c Tue Nov 3 16:46:52 2009 (r198854) @@ -139,26 +139,21 @@ vm_pagezero(void __unused *arg) } } -static struct proc *pagezero_proc; - static void pagezero_start(void __unused *arg) { int error; + struct proc *p; struct thread *td; - error = kproc_create(vm_pagezero, NULL, &pagezero_proc, RFSTOPPED, 0, - "pagezero"); + error = kproc_create(vm_pagezero, NULL, &p, RFSTOPPED, 0, "pagezero"); if (error) panic("pagezero_start: error %d\n", error); - /* - * We're an idle task, don't count us in the load. - */ - PROC_LOCK(pagezero_proc); - pagezero_proc->p_flag |= P_NOLOAD; - PROC_UNLOCK(pagezero_proc); - td = FIRST_THREAD_IN_PROC(pagezero_proc); + td = FIRST_THREAD_IN_PROC(p); thread_lock(td); + + /* We're an idle task, don't count us in the load. */ + td->td_flags |= TDF_NOLOAD; sched_class(td, PRI_IDLE); sched_prio(td, PRI_MAX_IDLE); sched_add(td, SRQ_BORING); From owner-svn-src-all@FreeBSD.ORG Tue Nov 3 17:15:16 2009 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 3623D1065695; Tue, 3 Nov 2009 17:15:16 +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 2528A8FC1F; Tue, 3 Nov 2009 17:15: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 nA3HFGlU097554; Tue, 3 Nov 2009 17:15:16 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA3HFG7T097552; Tue, 3 Nov 2009 17:15:16 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200911031715.nA3HFG7T097552@svn.freebsd.org> From: Alan Cox Date: Tue, 3 Nov 2009 17:15: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: r198855 - head/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: Tue, 03 Nov 2009 17:15:16 -0000 Author: alc Date: Tue Nov 3 17:15:15 2009 New Revision: 198855 URL: http://svn.freebsd.org/changeset/base/198855 Log: Eliminate a bit of hackery from vm_fault(). The operations that this hackery sought to prevent are now properly supported by vm_map_protect(). (See r198505.) Reviewed by: kib Modified: head/sys/vm/vm_fault.c Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Tue Nov 3 16:46:52 2009 (r198854) +++ head/sys/vm/vm_fault.c Tue Nov 3 17:15:15 2009 (r198855) @@ -264,17 +264,6 @@ RetryFault:; &fs.entry, &fs.first_object, &fs.first_pindex, &prot, &wired); if (result != KERN_SUCCESS) return (result); - - /* - * If we don't COW now, on a user wire, the user will never - * be able to write to the mapping. If we don't make this - * restriction, the bookkeeping would be nearly impossible. - * - * XXX The following assignment modifies the map without - * holding a write lock on it. - */ - if ((fs.entry->protection & VM_PROT_WRITE) == 0) - fs.entry->max_protection &= ~VM_PROT_WRITE; } map_generation = fs.map->timestamp; From owner-svn-src-all@FreeBSD.ORG Tue Nov 3 18:40:42 2009 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 DD30E106566B; Tue, 3 Nov 2009 18:40:42 +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 CBBEE8FC13; Tue, 3 Nov 2009 18:40: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 nA3IegLC099752; Tue, 3 Nov 2009 18:40:42 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA3Iegir099750; Tue, 3 Nov 2009 18:40:42 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200911031840.nA3Iegir099750@svn.freebsd.org> From: John Baldwin Date: Tue, 3 Nov 2009 18:40: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: r198856 - head/secure/usr.bin/bdes 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, 03 Nov 2009 18:40:43 -0000 Author: jhb Date: Tue Nov 3 18:40:42 2009 New Revision: 198856 URL: http://svn.freebsd.org/changeset/base/198856 Log: Fix a couple of comment typos. MFC after: 1 week Modified: head/secure/usr.bin/bdes/bdes.c Modified: head/secure/usr.bin/bdes/bdes.c ============================================================================== --- head/secure/usr.bin/bdes/bdes.c Tue Nov 3 17:15:15 2009 (r198855) +++ head/secure/usr.bin/bdes/bdes.c Tue Nov 3 18:40:42 2009 (r198856) @@ -170,11 +170,11 @@ main(int argc, char *argv[]) int i; /* counter in a for loop */ char *p; /* used to obtain the key */ DES_cblock msgbuf; /* I/O buffer */ - int kflag; /* command-line encryptiooon key */ + int kflag; /* command-line encryption key */ setproctitle("-"); /* Hide command-line arguments */ - /* initialize the initialization vctor */ + /* initialize the initialization vector */ MEMZERO(ivec, 8); /* process the argument list */ From owner-svn-src-all@FreeBSD.ORG Tue Nov 3 19:05:06 2009 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 3C0C9106566C; Tue, 3 Nov 2009 19:05:06 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2A3A98FC17; Tue, 3 Nov 2009 19:05: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 nA3J55Jh000743; Tue, 3 Nov 2009 19:05:05 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA3J55Wo000741; Tue, 3 Nov 2009 19:05:05 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <200911031905.nA3J55Wo000741@svn.freebsd.org> From: Jaakko Heinonen Date: Tue, 3 Nov 2009 19:05: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: r198857 - head/sys/dev/fdc 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, 03 Nov 2009 19:05:06 -0000 Author: jh Date: Tue Nov 3 19:05:05 2009 New Revision: 198857 URL: http://svn.freebsd.org/changeset/base/198857 Log: fdc(4) module unload fixes: - Tear down the interrupt handler before killing the worker thread. - Do geom withering as GEOM event to avoid acquiring the GEOM topology lock under Giant. PR: kern/104079 Reviewed by: joerg Approved by: trasz (mentor) Modified: head/sys/dev/fdc/fdc.c Modified: head/sys/dev/fdc/fdc.c ============================================================================== --- head/sys/dev/fdc/fdc.c Tue Nov 3 18:40:42 2009 (r198856) +++ head/sys/dev/fdc/fdc.c Tue Nov 3 19:05:05 2009 (r198857) @@ -1734,6 +1734,10 @@ fdc_detach(device_t dev) if ((error = bus_generic_detach(dev))) return (error); + if (fdc->fdc_intr) + bus_teardown_intr(dev, fdc->res_irq, fdc->fdc_intr); + fdc->fdc_intr = NULL; + /* kill worker thread */ mtx_lock(&fdc->fdc_mtx); fdc->flags |= FDC_KTHREAD_EXIT; @@ -2031,15 +2035,22 @@ fd_attach(device_t dev) return (0); } +static void +fd_detach_geom(void *arg, int flag) +{ + struct fd_data *fd = arg; + + g_topology_assert(); + g_wither_geom(fd->fd_geom, ENXIO); +} + static int fd_detach(device_t dev) { struct fd_data *fd; fd = device_get_softc(dev); - g_topology_lock(); - g_wither_geom(fd->fd_geom, ENXIO); - g_topology_unlock(); + g_waitfor_event(fd_detach_geom, fd, M_WAITOK, NULL); while (device_get_state(dev) == DS_BUSY) tsleep(fd, PZERO, "fdd", hz/10); callout_drain(&fd->toffhandle); From owner-svn-src-all@FreeBSD.ORG Tue Nov 3 19:30:36 2009 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 7CECA106568F; Tue, 3 Nov 2009 19:30:36 +0000 (UTC) (envelope-from tom@tomjudge.com) Received: from tomjudge.vm.bytemark.co.uk (tomjudge.vm.bytemark.co.uk [80.68.91.100]) by mx1.freebsd.org (Postfix) with ESMTP id CA5758FC1C; Tue, 3 Nov 2009 19:30:35 +0000 (UTC) Received: from localhost (localhost.localdomain [127.0.0.1]) by tomjudge.vm.bytemark.co.uk (Postfix) with ESMTP id 20AFE48A99; Tue, 3 Nov 2009 19:30:35 +0000 (GMT) X-Virus-Scanned: Debian amavisd-new at tomjudge.vm.bytemark.co.uk Received: from tomjudge.vm.bytemark.co.uk ([127.0.0.1]) by localhost (tomjudge.vm.bytemark.co.uk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2SE2SJaUdzFw; Tue, 3 Nov 2009 19:30:26 +0000 (GMT) Received: from rita.nodomain (unknown [192.168.205.6]) by tomjudge.vm.bytemark.co.uk (Postfix) with ESMTP id DFA4848A7C; Tue, 3 Nov 2009 19:30:23 +0000 (GMT) Message-ID: <4AF08495.5040507@tomjudge.com> Date: Tue, 03 Nov 2009 19:29:25 +0000 From: Tom Judge User-Agent: Thunderbird 2.0.0.23 (X11/20090822) MIME-Version: 1.0 To: Stanislav Sedov References: <200910211247.n9LCl9Ab099426@svn.freebsd.org> In-Reply-To: <200910211247.n9LCl9Ab099426@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r198320 - in head/sys: conf dev/bce 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, 03 Nov 2009 19:30:36 -0000 Hi Stanislav, Any chance this can be MFC'd to stable/8, stable/7 and releng/8.0? Tom Stanislav Sedov wrote: > Author: stas > Date: Wed Oct 21 12:47:09 2009 > New Revision: 198320 > URL: http://svn.freebsd.org/changeset/base/198320 > > Log: > - Introduce new option BCE_JUMBO_HDRSPLIT that allows user to enable header > splitting in bce(4) instead of (ab)using ZERO_COPY_SOCKETS that was not > propagated into if_bce.c anyway. It is disabled by default. > > Approved by: davidch > MFC after: 3 days > > Modified: > head/sys/conf/NOTES > head/sys/conf/options > head/sys/dev/bce/if_bce.c > head/sys/dev/bce/if_bcereg.h > > Modified: head/sys/conf/NOTES > ============================================================================== > --- head/sys/conf/NOTES Wed Oct 21 12:42:25 2009 (r198319) > +++ head/sys/conf/NOTES Wed Oct 21 12:47:09 2009 (r198320) > @@ -1985,6 +1985,12 @@ device lmc > # only works for Tigon II chips, and has no effect for Tigon I chips. > options TI_JUMBO_HDRSPLIT > > +# > +# Use header splitting feature on bce(4) adapters. > +# This may help to reduce the amount of jumbo-sized memory buffers used. > +# > +options BCE_JUMBO_HDRSPLIT > + > # These two options allow manipulating the mbuf cluster size and mbuf size, > # respectively. Be very careful with NIC driver modules when changing > # these from their default values, because that can potentially cause a > > Modified: head/sys/conf/options > ============================================================================== > --- head/sys/conf/options Wed Oct 21 12:42:25 2009 (r198319) > +++ head/sys/conf/options Wed Oct 21 12:47:09 2009 (r198320) > @@ -511,6 +511,7 @@ DRM_DEBUG opt_drm.h > ZERO_COPY_SOCKETS opt_zero.h > TI_PRIVATE_JUMBOS opt_ti.h > TI_JUMBO_HDRSPLIT opt_ti.h > +BCE_JUMBO_HDRSPLIT opt_bce.h > > # XXX Conflict: # of devices vs network protocol (Native ATM). > # This makes "atm.h" unusable. > > Modified: head/sys/dev/bce/if_bce.c > ============================================================================== > --- head/sys/dev/bce/if_bce.c Wed Oct 21 12:42:25 2009 (r198319) > +++ head/sys/dev/bce/if_bce.c Wed Oct 21 12:47:09 2009 (r198320) > @@ -293,12 +293,12 @@ static void bce_dump_enet (str > static void bce_dump_mbuf (struct bce_softc *, struct mbuf *); > static void bce_dump_tx_mbuf_chain (struct bce_softc *, u16, int); > static void bce_dump_rx_mbuf_chain (struct bce_softc *, u16, int); > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > static void bce_dump_pg_mbuf_chain (struct bce_softc *, u16, int); > #endif > static void bce_dump_txbd (struct bce_softc *, int, struct tx_bd *); > static void bce_dump_rxbd (struct bce_softc *, int, struct rx_bd *); > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > static void bce_dump_pgbd (struct bce_softc *, int, struct rx_bd *); > #endif > static void bce_dump_l2fhdr (struct bce_softc *, int, struct l2_fhdr *); > @@ -306,7 +306,7 @@ static void bce_dump_ctx (struct bce_s > static void bce_dump_ftqs (struct bce_softc *); > static void bce_dump_tx_chain (struct bce_softc *, u16, int); > static void bce_dump_rx_chain (struct bce_softc *, u16, int); > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > static void bce_dump_pg_chain (struct bce_softc *, u16, int); > #endif > static void bce_dump_status_block (struct bce_softc *); > @@ -393,7 +393,7 @@ static int bce_init_rx_chain (struct b > static void bce_fill_rx_chain (struct bce_softc *); > static void bce_free_rx_chain (struct bce_softc *); > > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > static int bce_get_pg_buf (struct bce_softc *, struct mbuf *, u16 *, u16 *); > static int bce_init_pg_chain (struct bce_softc *); > static void bce_fill_pg_chain (struct bce_softc *); > @@ -602,7 +602,7 @@ bce_print_adapter_info(struct bce_softc > /* Firmware version and device features. */ > printf("B/C (%s); Flags (", sc->bce_bc_ver); > > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > printf("SPLT "); > i++; > #endif > @@ -1066,7 +1066,7 @@ bce_attach(device_t dev) > * This may change later if the MTU size is set to > * something other than 1500. > */ > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > sc->rx_bd_mbuf_alloc_size = MHLEN; > /* Make sure offset is 16 byte aligned for hardware. */ > sc->rx_bd_mbuf_align_pad = roundup2((MSIZE - MHLEN), 16) - > @@ -2835,7 +2835,7 @@ bce_dma_free(struct bce_softc *sc) > } > > > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > /* Free, unmap and destroy all page buffer descriptor chain pages. */ > for (i = 0; i < PG_PAGES; i++ ) { > if (sc->pg_bd_chain[i] != NULL) { > @@ -2899,7 +2899,7 @@ bce_dma_free(struct bce_softc *sc) > sc->rx_mbuf_tag = NULL; > } > > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > /* Unload and destroy the page mbuf maps. */ > for (i = 0; i < TOTAL_PG_BD; i++) { > if (sc->pg_mbuf_map[i] != NULL) { > @@ -3345,7 +3345,7 @@ bce_dma_alloc(device_t dev) > /* > * Create a DMA tag for RX mbufs. > */ > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > max_size = max_seg_size = ((sc->rx_bd_mbuf_alloc_size < MCLBYTES) ? > MCLBYTES : sc->rx_bd_mbuf_alloc_size); > #else > @@ -3386,7 +3386,7 @@ bce_dma_alloc(device_t dev) > } > } > > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > /* > * Create a DMA tag for the page buffer descriptor chain, > * allocate and clear the memory, and fetch the physical > @@ -4473,7 +4473,7 @@ bce_stop(struct bce_softc *sc) > bce_disable_intr(sc); > > /* Free RX buffers. */ > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > bce_free_pg_chain(sc); > #endif > bce_free_rx_chain(sc); > @@ -4910,7 +4910,7 @@ bce_get_rx_buf(struct bce_softc *sc, str > goto bce_get_rx_buf_exit); > > /* This is a new mbuf allocation. */ > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > MGETHDR(m_new, M_DONTWAIT, MT_DATA); > #else > if (sc->rx_bd_mbuf_alloc_size <= MCLBYTES) > @@ -4991,7 +4991,7 @@ bce_get_rx_buf_exit: > } > > > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > /****************************************************************************/ > /* Encapsulate an mbuf cluster into the page chain. */ > /* */ > @@ -5100,7 +5100,7 @@ bce_get_pg_buf_exit: > > return(rc); > } > -#endif /* ZERO_COPY_SOCKETS */ > +#endif /* BCE_JUMBO_HDRSPLIT */ > > /****************************************************************************/ > /* Initialize the TX context memory. */ > @@ -5456,7 +5456,7 @@ bce_free_rx_chain(struct bce_softc *sc) > } > > > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > /****************************************************************************/ > /* Allocate memory and initialize the page data structures. */ > /* Assumes that bce_init_rx_chain() has not already been called. */ > @@ -5620,7 +5620,7 @@ bce_free_pg_chain(struct bce_softc *sc) > > DBEXIT(BCE_VERBOSE_RESET | BCE_VERBOSE_RECV | BCE_VERBOSE_UNLOAD); > } > -#endif /* ZERO_COPY_SOCKETS */ > +#endif /* BCE_JUMBO_HDRSPLIT */ > > > /****************************************************************************/ > @@ -5793,7 +5793,7 @@ bce_rx_intr(struct bce_softc *sc) > unsigned int pkt_len; > u16 sw_rx_cons, sw_rx_cons_idx, hw_rx_cons; > u32 status; > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > unsigned int rem_len; > u16 sw_pg_cons, sw_pg_cons_idx; > #endif > @@ -5809,7 +5809,7 @@ bce_rx_intr(struct bce_softc *sc) > bus_dmamap_sync(sc->rx_bd_chain_tag, > sc->rx_bd_chain_map[i], BUS_DMASYNC_POSTREAD); > > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > /* Prepare the page chain pages to be accessed by the host CPU. */ > for (int i = 0; i < PG_PAGES; i++) > bus_dmamap_sync(sc->pg_bd_chain_tag, > @@ -5821,7 +5821,7 @@ bce_rx_intr(struct bce_softc *sc) > > /* Get working copies of the driver's view of the consumer indices. */ > sw_rx_cons = sc->rx_cons; > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > sw_pg_cons = sc->pg_cons; > #endif > > @@ -5882,7 +5882,7 @@ bce_rx_intr(struct bce_softc *sc) > */ > m_adj(m0, sizeof(struct l2_fhdr) + ETHER_ALIGN); > > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > /* > * Check whether the received frame fits in a single > * mbuf or not (i.e. packet data + FCS <= > @@ -6056,7 +6056,7 @@ bce_rx_int_next_rx: > if (m0) { > /* Make sure we don't lose our place when we release the lock. */ > sc->rx_cons = sw_rx_cons; > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > sc->pg_cons = sw_pg_cons; > #endif > > @@ -6066,7 +6066,7 @@ bce_rx_int_next_rx: > > /* Recover our place. */ > sw_rx_cons = sc->rx_cons; > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > sw_pg_cons = sc->pg_cons; > #endif > } > @@ -6077,7 +6077,7 @@ bce_rx_int_next_rx: > } > > /* No new packets to process. Refill the RX and page chains and exit. */ > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > sc->pg_cons = sw_pg_cons; > bce_fill_pg_chain(sc); > #endif > @@ -6090,7 +6090,7 @@ bce_rx_int_next_rx: > bus_dmamap_sync(sc->rx_bd_chain_tag, > sc->rx_bd_chain_map[i], BUS_DMASYNC_PREWRITE); > > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > for (int i = 0; i < PG_PAGES; i++) > bus_dmamap_sync(sc->pg_bd_chain_tag, > sc->pg_bd_chain_map[i], BUS_DMASYNC_PREWRITE); > @@ -6336,7 +6336,7 @@ bce_init_locked(struct bce_softc *sc) > * Calculate and program the hardware Ethernet MTU > * size. Be generous on the receive if we have room. > */ > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > if (ifp->if_mtu <= (sc->rx_bd_mbuf_data_len + sc->pg_bd_mbuf_alloc_size)) > ether_mtu = sc->rx_bd_mbuf_data_len + sc->pg_bd_mbuf_alloc_size; > #else > @@ -6368,7 +6368,7 @@ bce_init_locked(struct bce_softc *sc) > /* Program appropriate promiscuous/multicast filtering. */ > bce_set_rx_mode(sc); > > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > DBPRINT(sc, BCE_INFO_LOAD, "%s(): pg_bd_mbuf_alloc_size = %d\n", > __FUNCTION__, sc->pg_bd_mbuf_alloc_size); > > @@ -6881,7 +6881,7 @@ bce_ioctl(struct ifnet *ifp, u_long comm > BCE_LOCK(sc); > ifp->if_mtu = ifr->ifr_mtu; > ifp->if_drv_flags &= ~IFF_DRV_RUNNING; > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > /* No buffer allocation size changes are necessary. */ > #else > /* Recalculate our buffer allocation sizes. */ > @@ -7584,7 +7584,7 @@ bce_tick(void *xsc) > bce_stats_update(sc); > > /* Top off the receive and page chains. */ > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > bce_fill_pg_chain(sc); > #endif > bce_fill_rx_chain(sc); > @@ -7764,7 +7764,7 @@ bce_sysctl_dump_tx_chain(SYSCTL_HANDLER_ > } > > > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > /****************************************************************************/ > /* Provides a sysctl interface to allow dumping the page chain. */ > /* */ > @@ -8392,7 +8392,7 @@ bce_add_sysctls(struct bce_softc *sc) > (void *)sc, 0, > bce_sysctl_dump_tx_chain, "I", "Dump tx_bd chain"); > > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > SYSCTL_ADD_PROC(ctx, children, OID_AUTO, > "dump_pg_chain", CTLTYPE_INT | CTLFLAG_RW, > (void *)sc, 0, > @@ -8687,7 +8687,7 @@ bce_dump_rx_mbuf_chain(struct bce_softc > } > > > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > /****************************************************************************/ > /* Prints out the mbufs in the mbuf page chain. */ > /* */ > @@ -8811,7 +8811,7 @@ bce_dump_rxbd(struct bce_softc *sc, int > } > > > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > /****************************************************************************/ > /* Prints out a rx_bd structure in the page chain. */ > /* */ > @@ -9298,7 +9298,7 @@ bce_dump_rx_chain(struct bce_softc *sc, > } > > > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > /****************************************************************************/ > /* Prints out the page chain. */ > /* */ > @@ -9779,7 +9779,7 @@ bce_dump_driver_state(struct bce_softc * > "0x%08X:%08X - (sc->rx_bd_chain) rx_bd chain virtual address\n", > val_hi, val_lo); > > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > val_hi = BCE_ADDR_HI(sc->pg_bd_chain); > val_lo = BCE_ADDR_LO(sc->pg_bd_chain); > BCE_PRINTF( > @@ -9799,7 +9799,7 @@ bce_dump_driver_state(struct bce_softc * > "0x%08X:%08X - (sc->rx_mbuf_ptr) rx mbuf chain virtual address\n", > val_hi, val_lo); > > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > val_hi = BCE_ADDR_HI(sc->pg_mbuf_ptr); > val_lo = BCE_ADDR_LO(sc->pg_mbuf_ptr); > BCE_PRINTF( > @@ -9852,7 +9852,7 @@ bce_dump_driver_state(struct bce_softc * > BCE_PRINTF(" 0x%08X - (sc->free_rx_bd) free rx_bd's\n", > sc->free_rx_bd); > > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > BCE_PRINTF(" 0x%04X(0x%04X) - (sc->pg_prod) page producer index\n", > sc->pg_prod, (u16) PG_CHAIN_IDX(sc->pg_prod)); > > @@ -10358,7 +10358,7 @@ bce_breakpoint(struct bce_softc *sc) > bce_dump_tpat_state(sc, 0); > bce_dump_cp_state(sc, 0); > bce_dump_com_state(sc, 0); > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > bce_dump_pgbd(sc, 0, NULL); > bce_dump_pg_mbuf_chain(sc, 0, USABLE_PG_BD); > bce_dump_pg_chain(sc, 0, USABLE_PG_BD); > > Modified: head/sys/dev/bce/if_bcereg.h > ============================================================================== > --- head/sys/dev/bce/if_bcereg.h Wed Oct 21 12:42:25 2009 (r198319) > +++ head/sys/dev/bce/if_bcereg.h Wed Oct 21 12:47:09 2009 (r198320) > @@ -6216,7 +6216,7 @@ struct l2_fhdr { > #define RX_PAGE(x) (((x) & ~USABLE_RX_BD_PER_PAGE) >> (BCM_PAGE_BITS - 4)) > #define RX_IDX(x) ((x) & USABLE_RX_BD_PER_PAGE) > > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > /* > * To accomodate jumbo frames, the page chain should > * be 4 times larger than the receive chain. > @@ -6238,7 +6238,7 @@ struct l2_fhdr { > #define PG_PAGE(x) (((x) & ~USABLE_PG_BD_PER_PAGE) >> (BCM_PAGE_BITS - 4)) > #define PG_IDX(x) ((x) & USABLE_PG_BD_PER_PAGE) > > -#endif /* ZERO_COPY_SOCKETS */ > +#endif /* BCE_JUMBO_HDRSPLIT */ > > #define CTX_INIT_RETRY_COUNT 10 > > @@ -6517,7 +6517,7 @@ struct bce_softc > u16 tx_cons; > u32 tx_prod_bseq; /* Counts the bytes used. */ > > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > u16 pg_prod; > u16 pg_cons; > #endif > @@ -6534,7 +6534,7 @@ struct bce_softc > int rx_bd_mbuf_data_len; > int rx_bd_mbuf_align_pad; > > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > int pg_bd_mbuf_alloc_size; > #endif > > @@ -6556,7 +6556,7 @@ struct bce_softc > struct rx_bd *rx_bd_chain[RX_PAGES]; > bus_addr_t rx_bd_chain_paddr[RX_PAGES]; > > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > /* H/W maintained page buffer descriptor chain structure. */ > bus_dma_tag_t pg_bd_chain_tag; > bus_dmamap_t pg_bd_chain_map[PG_PAGES]; > @@ -6593,7 +6593,7 @@ struct bce_softc > bus_dma_tag_t rx_mbuf_tag; > bus_dma_tag_t tx_mbuf_tag; > > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > bus_dma_tag_t pg_mbuf_tag; > #endif > > @@ -6605,7 +6605,7 @@ struct bce_softc > bus_dmamap_t rx_mbuf_map[TOTAL_RX_BD]; > struct mbuf *rx_mbuf_ptr[TOTAL_RX_BD]; > > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > /* S/W maintained mbuf page chain structure. */ > bus_dmamap_t pg_mbuf_map[TOTAL_PG_BD]; > struct mbuf *pg_mbuf_ptr[TOTAL_PG_BD]; > @@ -6617,7 +6617,7 @@ struct bce_softc > u16 used_tx_bd; > u16 max_tx_bd; > > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > u16 free_pg_bd; > u16 max_pg_bd; > #endif > @@ -6705,7 +6705,7 @@ struct bce_softc > int debug_tx_mbuf_alloc; > int debug_rx_mbuf_alloc; > > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > int debug_pg_mbuf_alloc; > #endif > > @@ -6722,7 +6722,7 @@ struct bce_softc > u32 rx_low_watermark; /* Lowest number of rx_bd's free. */ > u32 rx_empty_count; /* Number of times the RX chain was empty. */ > > -#ifdef ZERO_COPY_SOCKETS > +#ifdef BCE_JUMBO_HDRSPLIT > u32 pg_low_watermark; /* Lowest number of pages free. */ > u32 pg_empty_count; /* Number of times the page chain was empty. */ > #endif > _______________________________________________ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-all@FreeBSD.ORG Tue Nov 3 20:22:09 2009 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 7D9EB106566B; Tue, 3 Nov 2009 20:22:09 +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 6B06A8FC1C; Tue, 3 Nov 2009 20:22:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA3KM9lB003438; Tue, 3 Nov 2009 20:22:09 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA3KM96H003434; Tue, 3 Nov 2009 20:22:09 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <200911032022.nA3KM96H003434@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 3 Nov 2009 20:22: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: r198858 - in head/sys: dev/fb dev/syscons 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, 03 Nov 2009 20:22:09 -0000 Author: jkim Date: Tue Nov 3 20:22:09 2009 New Revision: 198858 URL: http://svn.freebsd.org/changeset/base/198858 Log: Fix VESA color palette corruption: - VBE 3.0 says palette format resets to 6-bit mode when video mode changes. We simply set 8-bit mode when we switch modes if the adapter supports it. - VBE 3.0 also says if the mode is not VGA compatible, we must use VBE function to save/restore palette. Otherwise, VGA function may be used. Thus, reinstate the save/load palette functions only for non-VGA compatible modes regardless of its palette format. - Let vesa(4) set VESA modes even if vga(4) claims to support it. - Reset default palette if VESA pixel mode is set initially. - Fix more style nits. Modified: head/sys/dev/fb/vesa.c head/sys/dev/syscons/syscons.c head/sys/sys/fbio.h Modified: head/sys/dev/fb/vesa.c ============================================================================== --- head/sys/dev/fb/vesa.c Tue Nov 3 19:05:05 2009 (r198857) +++ head/sys/dev/fb/vesa.c Tue Nov 3 20:22:09 2009 (r198858) @@ -174,10 +174,8 @@ static int vesa_bios_save_palette2(int s u_char *b, int bits); static int vesa_bios_load_palette(int start, int colors, u_char *palette, int bits); -#ifdef notyet static int vesa_bios_load_palette2(int start, int colors, u_char *r, u_char *g, u_char *b, int bits); -#endif #define STATE_SIZE 0 #define STATE_SAVE 1 #define STATE_LOAD 2 @@ -415,9 +413,9 @@ vesa_bios_save_palette(int start, int co 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] = p[i * 4 + 2] << bits; + palette[i * 3 + 1] = p[i * 4 + 1] << bits; + palette[i * 3 + 2] = p[i * 4] << bits; } x86bios_free(p, colors * 4); @@ -455,9 +453,9 @@ vesa_bios_save_palette2(int start, int c 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] = p[i * 4 + 2] << bits; + g[i] = p[i * 4 + 1] << bits; + b[i] = p[i * 4] << bits; } x86bios_free(p, colors * 4); @@ -487,10 +485,10 @@ vesa_bios_load_palette(int start, int co 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; + 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; } x86bios_intr(®s, 0x10); x86bios_free(p, colors * 4); @@ -498,7 +496,6 @@ vesa_bios_load_palette(int start, int co return (regs.R_AX != 0x004f); } -#ifdef notyet static int vesa_bios_load_palette2(int start, int colors, u_char *r, u_char *g, u_char *b, int bits) @@ -523,17 +520,16 @@ vesa_bios_load_palette2(int start, int c 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; + 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; } x86bios_intr(®s, 0x10); x86bios_free(p, colors * 4); return (regs.R_AX != 0x004f); } -#endif static ssize_t vesa_bios_state_buf_size(void) @@ -702,6 +698,7 @@ vesa_translate_flags(u_int16_t vflags) { V_MODECOLOR, V_INFO_COLOR, 0 }, { V_MODEGRAPHICS, V_INFO_GRAPHICS, 0 }, { V_MODELFB, V_INFO_LINEAR, 0 }, + { V_MODENONVGA, V_INFO_NONVGA, 0 }, }; int flags; int i; @@ -1275,7 +1272,8 @@ vesa_set_mode(video_adapter_t *adp, int * the new mode correctly. */ if (VESA_MODE(adp->va_mode)) { - if ((*prevvidsw->get_info)(adp, mode, &info) == 0) { + if (!VESA_MODE(mode) && + (*prevvidsw->get_info)(adp, mode, &info) == 0) { int10_set_mode(adp->va_initial_bios_mode); if (adp->va_info.vi_flags & V_INFO_LINEAR) vesa_unmap_buffer(adp->va_buffer, @@ -1288,7 +1286,7 @@ vesa_set_mode(video_adapter_t *adp, int } /* we may not need to handle this mode after all... */ - if ((*prevvidsw->set_mode)(adp, mode) == 0) + if (!VESA_MODE(mode) && (*prevvidsw->set_mode)(adp, mode) == 0) return (0); /* is the new mode supported? */ @@ -1306,6 +1304,9 @@ vesa_set_mode(video_adapter_t *adp, int if (vesa_bios_set_mode(mode | ((info.vi_flags & V_INFO_LINEAR) ? 0x4000 : 0))) return (1); + if ((vesa_adp_info->v_flags & V_DAC8) != 0) + vesa_bios_set_dac(8); + if (adp->va_info.vi_flags & V_INFO_LINEAR) vesa_unmap_buffer(adp->va_buffer, vesa_adp_info->v_memsize*64*1024); @@ -1382,17 +1383,11 @@ static int vesa_save_palette(video_adapter_t *adp, u_char *palette) { int bits; - int error; - if ((adp == vesa_adp) && (vesa_adp_info->v_flags & V_DAC8) - && VESA_MODE(adp->va_mode)) { - bits = vesa_bios_get_dac(); - error = vesa_bios_save_palette(0, 256, palette, bits); - if (error == 0) - return (0); - if (bits != 6) - return (error); - } + if ((adp == vesa_adp) && + (adp->va_info.vi_flags & V_INFO_NONVGA) != 0 && + (bits = vesa_bios_get_dac()) >= 6) + return (vesa_bios_save_palette(0, 256, palette, bits)); return ((*prevvidsw->save_palette)(adp, palette)); } @@ -1400,19 +1395,12 @@ vesa_save_palette(video_adapter_t *adp, static int vesa_load_palette(video_adapter_t *adp, u_char *palette) { -#ifdef notyet int bits; - int error; - if ((adp == vesa_adp) && (vesa_adp_info->v_flags & V_DAC8) - && VESA_MODE(adp->va_mode) && ((bits = vesa_bios_set_dac(8)) > 6)) { - error = vesa_bios_load_palette(0, 256, palette, bits); - if (error == 0) - return (0); - if (vesa_bios_set_dac(6) != 6) - return (1); - } -#endif /* notyet */ + if ((adp == vesa_adp) && + (adp->va_info.vi_flags & V_INFO_NONVGA) != 0 && + (bits = vesa_bios_get_dac()) >= 6) + return (vesa_bios_load_palette(0, 256, palette, bits)); return ((*prevvidsw->load_palette)(adp, palette)); } @@ -1637,14 +1625,11 @@ get_palette(video_adapter_t *adp, int ba return (1); if ((base + count) > 256) return (1); - if (!(vesa_adp_info->v_flags & V_DAC8) || !VESA_MODE(adp->va_mode)) + if ((adp->va_info.vi_flags & V_INFO_NONVGA) == 0 || + (bits = vesa_bios_get_dac()) < 6) return (1); - bits = vesa_bios_get_dac(); - if (bits <= 6) - return (1); - - r = malloc(count*3, M_DEVBUF, M_WAITOK); + r = malloc(count * 3, M_DEVBUF, M_WAITOK); g = r + count; b = g + count; error = vesa_bios_save_palette2(base, count, r, g, b, bits); @@ -1659,7 +1644,6 @@ get_palette(video_adapter_t *adp, int ba } free(r, M_DEVBUF); - /* if error && bits != 6 at this point, we are in trouble... XXX */ return (error); } @@ -1667,8 +1651,6 @@ static int set_palette(video_adapter_t *adp, int base, int count, u_char *red, u_char *green, u_char *blue, u_char *trans) { - return (1); -#ifdef notyet u_char *r; u_char *g; u_char *b; @@ -1677,11 +1659,11 @@ set_palette(video_adapter_t *adp, int ba if ((base < 0) || (base >= 256) || (base + count > 256)) return (1); - if (!(vesa_adp_info->v_flags & V_DAC8) || !VESA_MODE(adp->va_mode) - || ((bits = vesa_bios_set_dac(8)) <= 6)) + if ((adp->va_info.vi_flags & V_INFO_NONVGA) == 0 || + (bits = vesa_bios_get_dac()) < 6) return (1); - r = malloc(count*3, M_DEVBUF, M_WAITOK); + r = malloc(count * 3, M_DEVBUF, M_WAITOK); g = r + count; b = g + count; copyin(red, r, count); @@ -1690,13 +1672,8 @@ set_palette(video_adapter_t *adp, int ba error = vesa_bios_load_palette2(base, count, r, g, b, bits); free(r, M_DEVBUF); - if (error == 0) - return (0); - /* if the following call fails, we are in trouble... XXX */ - vesa_bios_set_dac(6); - return (1); -#endif /* notyet */ + return (error); } static int Modified: head/sys/dev/syscons/syscons.c ============================================================================== --- head/sys/dev/syscons/syscons.c Tue Nov 3 19:05:05 2009 (r198857) +++ head/sys/dev/syscons/syscons.c Tue Nov 3 20:22:09 2009 (r198858) @@ -414,6 +414,9 @@ sc_attach_unit(int unit, int flags) #endif sc_set_graphics_mode(scp, NULL, vmode); sc_set_pixel_mode(scp, NULL, 0, 0, 16, 8); +#ifndef SC_NO_PALETTE_LOADING + vidd_save_palette(sc->adp, sc->palette); +#endif sc->initial_mode = vmode; #ifdef DEV_SPLASH /* put up the splash again! */ Modified: head/sys/sys/fbio.h ============================================================================== --- head/sys/sys/fbio.h Tue Nov 3 19:05:05 2009 (r198857) +++ head/sys/sys/fbio.h Tue Nov 3 20:22:09 2009 (r198858) @@ -269,6 +269,7 @@ struct video_info { #define V_INFO_GRAPHICS (1 << 1) #define V_INFO_LINEAR (1 << 2) #define V_INFO_VESA (1 << 3) +#define V_INFO_NONVGA (1 << 4) int vi_width; int vi_height; int vi_cwidth; From owner-svn-src-all@FreeBSD.ORG Tue Nov 3 21:06:19 2009 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 79ED91065670; Tue, 3 Nov 2009 21:06:19 +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 68D0C8FC0A; Tue, 3 Nov 2009 21: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 nA3L6JUQ004920; Tue, 3 Nov 2009 21:06:19 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA3L6JCn004918; Tue, 3 Nov 2009 21:06:19 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200911032106.nA3L6JCn004918@svn.freebsd.org> From: Andrew Thompson Date: Tue, 3 Nov 2009 21: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: r198859 - 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, 03 Nov 2009 21:06:19 -0000 Author: thompsa Date: Tue Nov 3 21:06:19 2009 New Revision: 198859 URL: http://svn.freebsd.org/changeset/base/198859 Log: Belatedly add an UPDATING message for the usb ethernet ifnet naming in r188412. MFC after: 3 days Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Tue Nov 3 20:22:09 2009 (r198858) +++ head/UPDATING Tue Nov 3 21:06:19 2009 (r198859) @@ -537,6 +537,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. # Map old usb library to new one for usb2 stack libusb-0.1.so.8 libusb20.so.1 +20090209: + All USB ethernet devices now attach as interfaces under the name ueN + (eg. ue0). This is to provide a predictable name as vendors often + change usb chipsets in a product without notice. + 20090203: The ichsmb(4) driver has been changed to require SMBus slave addresses be left-justified (xxxxxxx0b) rather than right-justified. From owner-svn-src-all@FreeBSD.ORG Tue Nov 3 21:06:20 2009 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 12A6D106566B; Tue, 3 Nov 2009 21:06:20 +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 00A9E8FC12; Tue, 3 Nov 2009 21:06: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 nA3L6J8s004943; Tue, 3 Nov 2009 21:06:19 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA3L6Jhq004939; Tue, 3 Nov 2009 21:06:19 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200911032106.nA3L6Jhq004939@svn.freebsd.org> From: Ed Schouten Date: Tue, 3 Nov 2009 21: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: r198860 - 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: Tue, 03 Nov 2009 21:06:20 -0000 Author: ed Date: Tue Nov 3 21:06:19 2009 New Revision: 198860 URL: http://svn.freebsd.org/changeset/base/198860 Log: Make /dev/klog and kern.msgbuf* MPSAFE. Normally msgbufp is locked using Giant. Switch it to use the msgbuf_lock. Instead of changing the tsleep() calls to msleep(), just convert it to condvar(9). In my opinion the locking around msgbuf_peekbytes() still remains questionable. It looks like locks are dropped while performing copies of multiple blocks to userspace, which may cause the msgbuf to be reset in the mean time. At least getting it underneath from Giant should make it a little easier for us to figure out how to solve that. Reminded by: rdivacky Modified: head/sys/kern/subr_log.c head/sys/kern/subr_prf.c head/sys/sys/msgbuf.h Modified: head/sys/kern/subr_log.c ============================================================================== --- head/sys/kern/subr_log.c Tue Nov 3 21:06:19 2009 (r198859) +++ head/sys/kern/subr_log.c Tue Nov 3 21:06:19 2009 (r198860) @@ -53,7 +53,6 @@ __FBSDID("$FreeBSD$"); #define LOG_RDPRI (PZERO + 1) #define LOG_ASYNC 0x04 -#define LOG_RDWAIT 0x08 static d_open_t logopen; static d_close_t logclose; @@ -65,7 +64,6 @@ static void logtimeout(void *arg); static struct cdevsw log_cdevsw = { .d_version = D_VERSION, - .d_flags = D_NEEDGIANT, .d_open = logopen, .d_close = logclose, .d_read = logread, @@ -81,7 +79,10 @@ static struct logsoftc { struct callout sc_callout; /* callout to wakeup syslog */ } logsoftc; -int log_open; /* also used in log() */ +int log_open; /* also used in log() */ +static struct cv log_wakeup; +struct mtx msgbuf_lock; +MTX_SYSINIT(msgbuf_lock, &msgbuf_lock, "msgbuf lock", MTX_DEF); /* Times per second to check for a pending syslog wakeup. */ static int log_wakeups_per_second = 5; @@ -92,17 +93,23 @@ SYSCTL_INT(_kern, OID_AUTO, log_wakeups_ static int logopen(struct cdev *dev, int flags, int mode, struct thread *td) { - if (log_open) - return (EBUSY); - log_open = 1; - callout_init(&logsoftc.sc_callout, 0); - fsetown(td->td_proc->p_pid, &logsoftc.sc_sigio); /* signal process only */ + if (log_wakeups_per_second < 1) { printf("syslog wakeup is less than one. Adjusting to 1.\n"); log_wakeups_per_second = 1; } + + mtx_lock(&msgbuf_lock); + if (log_open) { + mtx_unlock(&msgbuf_lock); + return (EBUSY); + } + log_open = 1; callout_reset(&logsoftc.sc_callout, hz / log_wakeups_per_second, logtimeout, NULL); + mtx_unlock(&msgbuf_lock); + + fsetown(td->td_proc->p_pid, &logsoftc.sc_sigio); /* signal process only */ return (0); } @@ -111,10 +118,14 @@ static int logclose(struct cdev *dev, int flag, int mode, struct thread *td) { - log_open = 0; + funsetown(&logsoftc.sc_sigio); + + mtx_lock(&msgbuf_lock); callout_stop(&logsoftc.sc_callout); logsoftc.sc_state = 0; - funsetown(&logsoftc.sc_sigio); + log_open = 0; + mtx_unlock(&msgbuf_lock); + return (0); } @@ -124,32 +135,32 @@ logread(struct cdev *dev, struct uio *ui { char buf[128]; struct msgbuf *mbp = msgbufp; - int error = 0, l, s; + int error = 0, l; - s = splhigh(); + mtx_lock(&msgbuf_lock); while (msgbuf_getcount(mbp) == 0) { if (flag & IO_NDELAY) { - splx(s); + mtx_unlock(&msgbuf_lock); return (EWOULDBLOCK); } - logsoftc.sc_state |= LOG_RDWAIT; - if ((error = tsleep(mbp, LOG_RDPRI | PCATCH, "klog", 0))) { - splx(s); + if ((error = cv_wait_sig(&log_wakeup, &msgbuf_lock)) != 0) { + mtx_unlock(&msgbuf_lock); return (error); } } - splx(s); - logsoftc.sc_state &= ~LOG_RDWAIT; while (uio->uio_resid > 0) { l = imin(sizeof(buf), uio->uio_resid); l = msgbuf_getbytes(mbp, buf, l); if (l == 0) break; + mtx_unlock(&msgbuf_lock); error = uiomove(buf, l, uio); - if (error) - break; + if (error || uio->uio_resid == 0) + return (error); + mtx_lock(&msgbuf_lock); } + mtx_unlock(&msgbuf_lock); return (error); } @@ -157,18 +168,16 @@ logread(struct cdev *dev, struct uio *ui static int logpoll(struct cdev *dev, int events, struct thread *td) { - int s; int revents = 0; - s = splhigh(); - if (events & (POLLIN | POLLRDNORM)) { + mtx_lock(&msgbuf_lock); if (msgbuf_getcount(msgbufp) > 0) revents |= events & (POLLIN | POLLRDNORM); else selrecord(td, &logsoftc.sc_selp); + mtx_unlock(&msgbuf_lock); } - splx(s); return (revents); } @@ -183,20 +192,16 @@ logtimeout(void *arg) log_wakeups_per_second = 1; } if (msgbuftrigger == 0) { - callout_reset(&logsoftc.sc_callout, - hz / log_wakeups_per_second, logtimeout, NULL); + callout_schedule(&logsoftc.sc_callout, + hz / log_wakeups_per_second); return; } msgbuftrigger = 0; selwakeuppri(&logsoftc.sc_selp, LOG_RDPRI); if ((logsoftc.sc_state & LOG_ASYNC) && logsoftc.sc_sigio != NULL) pgsigio(&logsoftc.sc_sigio, SIGIO, 0); - if (logsoftc.sc_state & LOG_RDWAIT) { - wakeup(msgbufp); - logsoftc.sc_state &= ~LOG_RDWAIT; - } - callout_reset(&logsoftc.sc_callout, hz / log_wakeups_per_second, - logtimeout, NULL); + cv_broadcastpri(&log_wakeup, LOG_RDPRI); + callout_schedule(&logsoftc.sc_callout, hz / log_wakeups_per_second); } /*ARGSUSED*/ @@ -215,10 +220,12 @@ logioctl(struct cdev *dev, u_long com, c break; case FIOASYNC: + mtx_lock(&msgbuf_lock); if (*(int *)data) logsoftc.sc_state |= LOG_ASYNC; else logsoftc.sc_state &= ~LOG_ASYNC; + mtx_unlock(&msgbuf_lock); break; case FIOSETOWN: @@ -247,6 +254,8 @@ static void log_drvinit(void *unused) { + cv_init(&log_wakeup, "klog"); + callout_init_mtx(&logsoftc.sc_callout, &msgbuf_lock, 0); make_dev(&log_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, "klog"); } Modified: head/sys/kern/subr_prf.c ============================================================================== --- head/sys/kern/subr_prf.c Tue Nov 3 21:06:19 2009 (r198859) +++ head/sys/kern/subr_prf.c Tue Nov 3 21:06:19 2009 (r198860) @@ -923,16 +923,24 @@ sysctl_kern_msgbuf(SYSCTL_HANDLER_ARGS) } /* Read the whole buffer, one chunk at a time. */ + mtx_lock(&msgbuf_lock); msgbuf_peekbytes(msgbufp, NULL, 0, &seq); - while ((len = msgbuf_peekbytes(msgbufp, buf, sizeof(buf), &seq)) > 0) { + for (;;) { + len = msgbuf_peekbytes(msgbufp, buf, sizeof(buf), &seq); + mtx_unlock(&msgbuf_lock); + if (len == 0) + return (0); + error = sysctl_handle_opaque(oidp, buf, len, req); if (error) return (error); + + mtx_lock(&msgbuf_lock); } - return (0); } -SYSCTL_PROC(_kern, OID_AUTO, msgbuf, CTLTYPE_STRING | CTLFLAG_RD, +SYSCTL_PROC(_kern, OID_AUTO, msgbuf, + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, 0, sysctl_kern_msgbuf, "A", "Contents of kernel message buffer"); static int msgbuf_clearflag; @@ -943,15 +951,18 @@ sysctl_kern_msgbuf_clear(SYSCTL_HANDLER_ int error; error = sysctl_handle_int(oidp, oidp->oid_arg1, oidp->oid_arg2, req); if (!error && req->newptr) { + mtx_lock(&msgbuf_lock); msgbuf_clear(msgbufp); + mtx_unlock(&msgbuf_lock); msgbuf_clearflag = 0; } return (error); } SYSCTL_PROC(_kern, OID_AUTO, msgbuf_clear, - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_SECURE, &msgbuf_clearflag, 0, - sysctl_kern_msgbuf_clear, "I", "Clear kernel message buffer"); + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_SECURE | CTLFLAG_MPSAFE, + &msgbuf_clearflag, 0, sysctl_kern_msgbuf_clear, "I", + "Clear kernel message buffer"); #ifdef DDB Modified: head/sys/sys/msgbuf.h ============================================================================== --- head/sys/sys/msgbuf.h Tue Nov 3 21:06:19 2009 (r198859) +++ head/sys/sys/msgbuf.h Tue Nov 3 21:06:19 2009 (r198860) @@ -54,6 +54,7 @@ struct msgbuf { #ifdef _KERNEL extern int msgbuftrigger; extern struct msgbuf *msgbufp; +extern struct mtx msgbuf_lock; void msgbufinit(void *ptr, int size); void msgbuf_addchar(struct msgbuf *mbp, int c); From owner-svn-src-all@FreeBSD.ORG Tue Nov 3 21:47:07 2009 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 EC5411065670; Tue, 3 Nov 2009 21:47:07 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DB8108FC0C; Tue, 3 Nov 2009 21:47: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 nA3Ll7hr006234; Tue, 3 Nov 2009 21:47:07 GMT (envelope-from weongyo@svn.freebsd.org) Received: (from weongyo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA3Ll7AA006232; Tue, 3 Nov 2009 21:47:07 GMT (envelope-from weongyo@svn.freebsd.org) Message-Id: <200911032147.nA3Ll7AA006232@svn.freebsd.org> From: Weongyo Jeong Date: Tue, 3 Nov 2009 21:47: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: r198862 - 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: Tue, 03 Nov 2009 21:47:08 -0000 Author: weongyo Date: Tue Nov 3 21:47:07 2009 New Revision: 198862 URL: http://svn.freebsd.org/changeset/base/198862 Log: fixes a typo that value should be 0 not 10. Modified: head/sys/dev/usb/wlan/if_urtw.c Modified: head/sys/dev/usb/wlan/if_urtw.c ============================================================================== --- head/sys/dev/usb/wlan/if_urtw.c Tue Nov 3 21:24:37 2009 (r198861) +++ head/sys/dev/usb/wlan/if_urtw.c Tue Nov 3 21:47:07 2009 (r198862) @@ -1688,7 +1688,7 @@ urtw_tx_start(struct urtw_softc *sc, str ieee80211_radiotap_tx(vap, m0); } - if ((wh->i_fc[10] & IEEE80211_FC0_TYPE_MASK) == IEEE80211_FC0_TYPE_MGT || + if ((wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) == IEEE80211_FC0_TYPE_MGT || (wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) == IEEE80211_FC0_TYPE_CTL) { tp = &vap->iv_txparms[ieee80211_chan2mode(ic->ic_curchan)]; rate = tp->mgmtrate; From owner-svn-src-all@FreeBSD.ORG Tue Nov 3 21:57:01 2009 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 4F22E106566B; Tue, 3 Nov 2009 21:57:01 +0000 (UTC) (envelope-from mlaier@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 242F58FC14; Tue, 3 Nov 2009 21:57: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 nA3Lv06V006584; Tue, 3 Nov 2009 21:57:00 GMT (envelope-from mlaier@svn.freebsd.org) Received: (from mlaier@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA3Lv0Qn006582; Tue, 3 Nov 2009 21:57:00 GMT (envelope-from mlaier@svn.freebsd.org) Message-Id: <200911032157.nA3Lv0Qn006582@svn.freebsd.org> From: Max Laier Date: Tue, 3 Nov 2009 21:57:00 +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: r198863 - stable/8/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, 03 Nov 2009 21:57:01 -0000 Author: mlaier Date: Tue Nov 3 21:57:00 2009 New Revision: 198863 URL: http://svn.freebsd.org/changeset/base/198863 Log: MFC r197334,r197433: Extract svn and git version info from git-svn repos. Modified: stable/8/sys/conf/newvers.sh 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/conf/newvers.sh ============================================================================== --- stable/8/sys/conf/newvers.sh Tue Nov 3 21:47:07 2009 (r198862) +++ stable/8/sys/conf/newvers.sh Tue Nov 3 21:57:00 2009 (r198863) @@ -89,28 +89,54 @@ i=`${MAKE:-make} -V KERN_IDENT` case "$d" in */sys/*) + SRCDIR=${d##*obj} + if [ -n "$MACHINE" ]; then + SRCDIR=${SRCDIR##/$MACHINE} + fi + SRCDIR=${SRCDIR%%/sys/*} + for dir in /bin /usr/bin /usr/local/bin; do - if [ -x "${dir}/svnversion" ]; then + if [ -d "${SRCDIR}/sys/.svn" -a -x "${dir}/svnversion" ] ; then svnversion=${dir}/svnversion - SRCDIR=${d##*obj} - if [ -n "$MACHINE" ]; then - SRCDIR=${SRCDIR##/$MACHINE} - fi - SRCDIR=${SRCDIR%%/sys/*} + break + fi + if [ -d "${SRCDIR}/.git" -a -x "${dir}/git" ] ; then + git_cmd="${dir}/git --git-dir=${SRCDIR}/.git" break fi done - if [ -n "$svnversion" -a -d "${SRCDIR}/sys/.svn" ] ; then + if [ -n "$svnversion" ] ; then svn=" r`cd ${SRCDIR}/sys && $svnversion`" fi + if [ -n "$git_cmd" ] ; then + git=`$git_cmd rev-parse --verify --short HEAD 2>/dev/null` + svn=`$git_cmd svn find-rev $git 2>/dev/null` + if [ -n "$svn" ] ; then + svn=" r${svn}" + git="=${git}" + else + svn=`$git_cmd log | fgrep 'git-svn-id:' | head -1 | \ + sed -n 's/^.*@\([0-9][0-9]*\).*$/\1/p'` + if [ -n $svn ] ; then + svn=" r${svn}" + git="+${git}" + else + git=" ${git}" + fi + fi + if $git_cmd --work-tree=${SRCDIR} diff-index \ + --name-only HEAD | read dummy; then + git="${git}-dirty" + fi + fi ;; esac cat << EOF > vers.c $COPYRIGHT -#define SCCSSTR "@(#)${VERSION} #${v}${svn}: ${t}" -#define VERSTR "${VERSION} #${v}${svn}: ${t}\\n ${u}@${h}:${d}\\n" +#define SCCSSTR "@(#)${VERSION} #${v}${svn}${git}: ${t}" +#define VERSTR "${VERSION} #${v}${svn}${git}: ${t}\\n ${u}@${h}:${d}\\n" #define RELSTR "${RELEASE}" char sccs[sizeof(SCCSSTR) > 128 ? sizeof(SCCSSTR) : 128] = SCCSSTR; From owner-svn-src-all@FreeBSD.ORG Tue Nov 3 23:26:32 2009 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 28FD11065672; Tue, 3 Nov 2009 23:26:32 +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 1804C8FC1B; Tue, 3 Nov 2009 23:26: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 nA3NQVJ7009195; Tue, 3 Nov 2009 23:26:31 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA3NQVZG009193; Tue, 3 Nov 2009 23:26:31 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <200911032326.nA3NQVZG009193@svn.freebsd.org> From: Rui Paulo Date: Tue, 3 Nov 2009 23:26: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: r198864 - stable/8/sys/net80211 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, 03 Nov 2009 23:26:32 -0000 Author: rpaulo Date: Tue Nov 3 23:26:31 2009 New Revision: 198864 URL: http://svn.freebsd.org/changeset/base/198864 Log: MFC r198581: Update the route's sequence number upon receiving a RANN. Modified: stable/8/sys/net80211/ieee80211_hwmp.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/net80211/ieee80211_hwmp.c ============================================================================== --- stable/8/sys/net80211/ieee80211_hwmp.c Tue Nov 3 21:57:00 2009 (r198863) +++ stable/8/sys/net80211/ieee80211_hwmp.c Tue Nov 3 23:26:31 2009 (r198864) @@ -1239,15 +1239,18 @@ hwmp_recv_rann(struct ieee80211vap *vap, return; } hr = IEEE80211_MESH_ROUTE_PRIV(rt, struct ieee80211_hwmp_route); - if (HWMP_SEQ_GT(rann->rann_seq, hr->hr_seq) && rann->rann_ttl > 1 && - rann->rann_hopcount < hs->hs_maxhops && - (ms->ms_flags & IEEE80211_MESHFLAGS_FWD)) { - memcpy(&prann, rann, sizeof(prann)); - prann.rann_hopcount += 1; - prann.rann_ttl -= 1; - prann.rann_metric += ms->ms_pmetric->mpm_metric(ni); - hwmp_send_rann(vap->iv_bss, vap->iv_myaddr, broadcastaddr, - &prann); + if (HWMP_SEQ_GT(rann->rann_seq, hr->hr_seq)) { + hr->hr_seq = rann->rann_seq; + if (rann->rann_ttl > 1 && + rann->rann_hopcount < hs->hs_maxhops && + (ms->ms_flags & IEEE80211_MESHFLAGS_FWD)) { + memcpy(&prann, rann, sizeof(prann)); + prann.rann_hopcount += 1; + prann.rann_ttl -= 1; + prann.rann_metric += ms->ms_pmetric->mpm_metric(ni); + hwmp_send_rann(vap->iv_bss, vap->iv_myaddr, + broadcastaddr, &prann); + } } } From owner-svn-src-all@FreeBSD.ORG Tue Nov 3 23:26:58 2009 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 90B8110656A4; Tue, 3 Nov 2009 23:26:58 +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 80CE48FC25; Tue, 3 Nov 2009 23:26: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 nA3NQwAD009241; Tue, 3 Nov 2009 23:26:58 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA3NQwqJ009239; Tue, 3 Nov 2009 23:26:58 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200911032326.nA3NQwqJ009239@svn.freebsd.org> From: Alexander Motin Date: Tue, 3 Nov 2009 23:26: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: r198865 - 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, 03 Nov 2009 23:26:58 -0000 Author: mav Date: Tue Nov 3 23:26:58 2009 New Revision: 198865 URL: http://svn.freebsd.org/changeset/base/198865 Log: Fix constants. Modified: head/sys/sys/ata.h Modified: head/sys/sys/ata.h ============================================================================== --- head/sys/sys/ata.h Tue Nov 3 23:26:31 2009 (r198864) +++ head/sys/sys/ata.h Tue Nov 3 23:26:58 2009 (r198865) @@ -207,8 +207,8 @@ struct ata_params { u_int16_t reserved104[2]; /*106*/ u_int16_t pss; #define ATA_PSS_LSPPS 0x000F -#define ATA_PSS_LSSABOVE512 0x2000 -#define ATA_PSS_MULTLS 0x4000 +#define ATA_PSS_LSSABOVE512 0x1000 +#define ATA_PSS_MULTLS 0x2000 /*107*/ u_int16_t isd; /*108*/ u_int16_t wwn[4]; u_int16_t reserved112[5]; From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 00:58:21 2009 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 EAABF1065672; Wed, 4 Nov 2009 00:58:21 +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 C00FC8FC16; Wed, 4 Nov 2009 00:58: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 nA40wK7C011759; Wed, 4 Nov 2009 00:58:20 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA40wKZp011756; Wed, 4 Nov 2009 00:58:20 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <200911040058.nA40wKZp011756@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 4 Nov 2009 00:58: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: r198866 - in head/sys: dev/fb 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: Wed, 04 Nov 2009 00:58:22 -0000 Author: jkim Date: Wed Nov 4 00:58:20 2009 New Revision: 198866 URL: http://svn.freebsd.org/changeset/base/198866 Log: Save/restore VGA color palette while suspending and resuming. Modified: head/sys/dev/fb/vgareg.h head/sys/isa/vga_isa.c Modified: head/sys/dev/fb/vgareg.h ============================================================================== --- head/sys/dev/fb/vgareg.h Tue Nov 3 23:26:58 2009 (r198865) +++ head/sys/dev/fb/vgareg.h Wed Nov 4 00:58:20 2009 (r198866) @@ -70,6 +70,7 @@ struct video_adapter; typedef struct vga_softc { struct video_adapter *adp; void *state_buf; + void *pal_buf; #ifdef FB_INSTALL_CDEV genfb_softc_t gensc; #endif Modified: head/sys/isa/vga_isa.c ============================================================================== --- head/sys/isa/vga_isa.c Tue Nov 3 23:26:58 2009 (r198865) +++ head/sys/isa/vga_isa.c Wed Nov 4 00:58:20 2009 (r198866) @@ -179,17 +179,33 @@ isavga_suspend(device_t dev) nbytes = vidd_save_state(sc->adp, NULL, 0); if (nbytes <= 0) return (0); - sc->state_buf = malloc(nbytes, M_TEMP, M_NOWAIT | M_ZERO); - if (sc->state_buf == NULL) - return (0); - if (bootverbose) - device_printf(dev, "saving %d bytes of video state\n", nbytes); - if (vidd_save_state(sc->adp, sc->state_buf, nbytes) != 0) { - device_printf(dev, "failed to save state (nbytes=%d)\n", - nbytes); - free(sc->state_buf, M_TEMP); - sc->state_buf = NULL; + sc->state_buf = malloc(nbytes, M_TEMP, M_NOWAIT); + if (sc->state_buf != NULL) { + if (bootverbose) + device_printf(dev, "saving %d bytes of video state\n", + nbytes); + if (vidd_save_state(sc->adp, sc->state_buf, nbytes) != 0) { + device_printf(dev, "failed to save state (nbytes=%d)\n", + nbytes); + free(sc->state_buf, M_TEMP); + sc->state_buf = NULL; + } } + + /* Save the color palette across the suspend. */ + if (sc->pal_buf != NULL) + free(sc->pal_buf, M_TEMP); + sc->pal_buf = malloc(256 * 3, M_TEMP, M_NOWAIT); + if (sc->pal_buf != NULL) { + if (bootverbose) + device_printf(dev, "saving color palette\n"); + if (vidd_save_palette(sc->adp, sc->pal_buf) != 0) { + device_printf(dev, "failed to save palette\n"); + free(sc->pal_buf, M_TEMP); + sc->pal_buf = NULL; + } + } + return (0); } @@ -205,6 +221,12 @@ isavga_resume(device_t dev) free(sc->state_buf, M_TEMP); sc->state_buf = NULL; } + if (sc->pal_buf != NULL) { + if (vidd_load_palette(sc->adp, sc->pal_buf) != 0) + device_printf(dev, "failed to reload palette\n"); + free(sc->pal_buf, M_TEMP); + sc->pal_buf = NULL; + } bus_generic_resume(dev); return 0; From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 01:00:28 2009 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 D0406106568B; Wed, 4 Nov 2009 01:00:28 +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 BFEF98FC12; Wed, 4 Nov 2009 01:00: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 nA410SHq011885; Wed, 4 Nov 2009 01:00:28 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA410SsC011883; Wed, 4 Nov 2009 01:00:28 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <200911040100.nA410SsC011883@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 4 Nov 2009 01:00:28 +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: r198867 - 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: Wed, 04 Nov 2009 01:00:28 -0000 Author: jkim Date: Wed Nov 4 01:00:28 2009 New Revision: 198867 URL: http://svn.freebsd.org/changeset/base/198867 Log: Restore color palette format if we reset video mode. Modified: head/sys/dev/fb/vesa.c Modified: head/sys/dev/fb/vesa.c ============================================================================== --- head/sys/dev/fb/vesa.c Wed Nov 4 00:58:20 2009 (r198866) +++ head/sys/dev/fb/vesa.c Wed Nov 4 01:00:28 2009 (r198867) @@ -1470,6 +1470,8 @@ vesa_load_state(video_adapter_t *adp, vo (flags & V_INFO_LINEAR) != 0) mode |= 0x4000; (void)vesa_bios_set_mode(mode); + if ((vesa_adp_info->v_flags & V_DAC8) != 0) + (void)vesa_bios_set_dac(8); (void)(*vidsw[adp->va_index]->set_hw_cursor)(adp, -1, -1); } From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 01:33:00 2009 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 23ED61065676; Wed, 4 Nov 2009 01:33:00 +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 1225E8FC0A; Wed, 4 Nov 2009 01:33: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 nA41Wxkc012753; Wed, 4 Nov 2009 01:32:59 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA41WxtQ012750; Wed, 4 Nov 2009 01:32:59 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <200911040132.nA41WxtQ012750@svn.freebsd.org> From: Attilio Rao Date: Wed, 4 Nov 2009 01:32: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: r198868 - in head/sys: amd64/amd64 i386/i386 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, 04 Nov 2009 01:33:00 -0000 Author: attilio Date: Wed Nov 4 01:32:59 2009 New Revision: 198868 URL: http://svn.freebsd.org/changeset/base/198868 Log: Opteron rev E family of processor expose a bug where, in very rare ocassions, memory barriers semantic is not honoured by the hardware itself. As a result, some random breakage can happen in uninvestigable ways (for further explanation see at the content of the commit itself). As long as just a specific familly is bugged of an entire architecture is broken, a complete fix-up is impratical without harming to some extents the other correct cases. Considering that (and considering the frequency of the bug exposure) just print out a warning message if the affected machine is identified. Pointed out by: Samy Al Bahra Help on wordings by: jeff MFC: 3 days Modified: head/sys/amd64/amd64/identcpu.c head/sys/i386/i386/identcpu.c Modified: head/sys/amd64/amd64/identcpu.c ============================================================================== --- head/sys/amd64/amd64/identcpu.c Wed Nov 4 01:00:28 2009 (r198867) +++ head/sys/amd64/amd64/identcpu.c Wed Nov 4 01:32:59 2009 (r198868) @@ -607,6 +607,24 @@ print_AMD_info(void) printf(", %d lines/tag", (regs[2] >> 8) & 0x0f); print_AMD_l2_assoc((regs[2] >> 12) & 0x0f); } + + /* + * Opteron Rev E shows a bug as in very rare occasions a read memory + * barrier is not performed as expected if it is followed by a + * non-atomic read-modify-write instruction. + * As long as that bug pops up very rarely (intensive machine usage + * on other operating systems generally generates one unexplainable + * crash any 2 months) and as long as a model specific fix would be + * impratical at this stage, print out a warning string if the broken + * model and family are identified. + */ + if (CPUID_TO_FAMILY(cpu_id) == 0xf && CPUID_TO_MODEL(cpu_id) >= 0x20 && + CPUID_TO_MODEL(cpu_id) <= 0x3f) { + printf("WARNING: This architecture revision has known SMP " + "hardware bugs which may cause random instability\n"); + printf("WARNING: For details see: " + "http://bugzilla.kernel.org/show_bug.cgi?id=11305\n"); + } } static void Modified: head/sys/i386/i386/identcpu.c ============================================================================== --- head/sys/i386/i386/identcpu.c Wed Nov 4 01:00:28 2009 (r198867) +++ head/sys/i386/i386/identcpu.c Wed Nov 4 01:32:59 2009 (r198868) @@ -1303,6 +1303,24 @@ print_AMD_info(void) (amd_whcr & 0x0100) ? "Enable" : "Disable"); } } + + /* + * Opteron Rev E shows a bug as in very rare occasions a read memory + * barrier is not performed as expected if it is followed by a + * non-atomic read-modify-write instruction. + * As long as that bug pops up very rarely (intensive machine usage + * on other operating systems generally generates one unexplainable + * crash any 2 months) and as long as a model specific fix would be + * impratical at this stage, print out a warning string if the broken + * model and family are identified. + */ + if (CPUID_TO_FAMILY(cpu_id) == 0xf && CPUID_TO_MODEL(cpu_id) >= 0x20 && + CPUID_TO_MODEL(cpu_id) <= 0x3f) { + printf("WARNING: This architecture revision has known SMP " + "hardware bugs which may cause random instability\n"); + printf("WARNING: For details see: " + "http://bugzilla.kernel.org/show_bug.cgi?id=11305\n"); + } } static void From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 01:50:26 2009 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 0B35F1065693; Wed, 4 Nov 2009 01:50:26 +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 D43C58FC1E; Wed, 4 Nov 2009 01:50: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 nA41oPL5013290; Wed, 4 Nov 2009 01:50:25 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA41oPZ3013287; Wed, 4 Nov 2009 01:50:25 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200911040150.nA41oPZ3013287@svn.freebsd.org> From: Andrew Thompson Date: Wed, 4 Nov 2009 01:50:25 +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: r198869 - stable/8/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: Wed, 04 Nov 2009 01:50:26 -0000 Author: thompsa Date: Wed Nov 4 01:50:25 2009 New Revision: 198869 URL: http://svn.freebsd.org/changeset/base/198869 Log: MFC r198775 Fix a corner case where usbd_transfer_drain() can return too early if the callback has dropped the mutex, leading to a panic. Submitted by: HPS Modified: stable/8/sys/dev/usb/usb_core.h stable/8/sys/dev/usb/usb_transfer.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/usb/usb_core.h ============================================================================== --- stable/8/sys/dev/usb/usb_core.h Wed Nov 4 01:32:59 2009 (r198868) +++ stable/8/sys/dev/usb/usb_core.h Wed Nov 4 01:50:25 2009 (r198869) @@ -112,6 +112,7 @@ struct usb_xfer_flags_int { uint8_t curr_dma_set:1; /* used by USB HC/DC driver */ uint8_t can_cancel_immed:1; /* set if USB transfer can be * cancelled immediately */ + uint8_t doing_callback:1; /* set if executing the callback */ }; /* Modified: stable/8/sys/dev/usb/usb_transfer.c ============================================================================== --- stable/8/sys/dev/usb/usb_transfer.c Wed Nov 4 01:32:59 2009 (r198868) +++ stable/8/sys/dev/usb/usb_transfer.c Wed Nov 4 01:50:25 2009 (r198869) @@ -1797,8 +1797,18 @@ usbd_transfer_drain(struct usb_xfer *xfe usbd_transfer_stop(xfer); - while (usbd_transfer_pending(xfer)) { + while (usbd_transfer_pending(xfer) || + xfer->flags_int.doing_callback) { + + /* + * It is allowed that the callback can drop its + * transfer mutex. In that case checking only + * "usbd_transfer_pending()" is not enough to tell if + * the USB transfer is fully drained. We also need to + * check the internal "doing_callback" flag. + */ xfer->flags_int.draining = 1; + /* * Wait until the current outstanding USB * transfer is complete ! @@ -2043,6 +2053,9 @@ usbd_callback_wrapper(struct usb_xfer_qu /* get next USB transfer in the queue */ info->done_q.curr = NULL; + /* set flag in case of drain */ + xfer->flags_int.doing_callback = 1; + USB_BUS_UNLOCK(info->bus); USB_BUS_LOCK_ASSERT(info->bus, MA_NOTOWNED); @@ -2095,12 +2108,17 @@ usbd_callback_wrapper(struct usb_xfer_qu if ((!xfer->flags_int.open) && (xfer->flags_int.started) && (xfer->usb_state == USB_ST_ERROR)) { + /* clear flag in case of drain */ + xfer->flags_int.doing_callback = 0; /* try to loop, but not recursivly */ usb_command_wrapper(&info->done_q, xfer); return; } done: + /* clear flag in case of drain */ + xfer->flags_int.doing_callback = 0; + /* * Check if we are draining. */ From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 03:12:57 2009 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 6B74A106568F; Wed, 4 Nov 2009 03:12:57 +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 5AC678FC1C; Wed, 4 Nov 2009 03:12: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 nA43CvY7015912; Wed, 4 Nov 2009 03:12:57 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA43CvCu015910; Wed, 4 Nov 2009 03:12:57 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200911040312.nA43CvCu015910@svn.freebsd.org> From: Alan Cox Date: Wed, 4 Nov 2009 03:12: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: r198870 - head/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: Wed, 04 Nov 2009 03:12:57 -0000 Author: alc Date: Wed Nov 4 03:12:56 2009 New Revision: 198870 URL: http://svn.freebsd.org/changeset/base/198870 Log: Eliminate an unnecessary #include. (This #include should have been removed in r188331 when vnode_pager_lock() was eliminated.) Modified: head/sys/vm/vm_fault.c Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Wed Nov 4 01:50:25 2009 (r198869) +++ head/sys/vm/vm_fault.c Wed Nov 4 03:12:56 2009 (r198870) @@ -96,7 +96,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include /* XXX Temporary for VFS_LOCK_GIANT() */ From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 04:12:56 2009 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 C904C1065676; Wed, 4 Nov 2009 04:12:56 +0000 (UTC) (envelope-from benno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B7CAD8FC0C; Wed, 4 Nov 2009 04:12:56 +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 nA44CuQY017607; Wed, 4 Nov 2009 04:12:56 GMT (envelope-from benno@svn.freebsd.org) Received: (from benno@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA44CuSq017605; Wed, 4 Nov 2009 04:12:56 GMT (envelope-from benno@svn.freebsd.org) Message-Id: <200911040412.nA44CuSq017605@svn.freebsd.org> From: Benno Rice Date: Wed, 4 Nov 2009 04:12:56 +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: r198871 - head/share/man/man3 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, 04 Nov 2009 04:12:56 -0000 Author: benno Date: Wed Nov 4 04:12:56 2009 New Revision: 198871 URL: http://svn.freebsd.org/changeset/base/198871 Log: Fix typo (noded -> nodes). Modified: head/share/man/man3/tree.3 Modified: head/share/man/man3/tree.3 ============================================================================== --- head/share/man/man3/tree.3 Wed Nov 4 03:12:56 2009 (r198870) +++ head/share/man/man3/tree.3 Wed Nov 4 04:12:56 2009 (r198871) @@ -384,7 +384,7 @@ macros, but should be used only once. Finally, the .Fa CMP -argument is the name of a function used to compare tree noded +argument is the name of a function used to compare tree nodes with each other. The function takes two arguments of type .Vt "struct TYPE *" . From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 04:41:03 2009 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 9B36F106568F; Wed, 4 Nov 2009 04:41:03 +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 702008FC14; Wed, 4 Nov 2009 04:41: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 nA44f3cw018348; Wed, 4 Nov 2009 04:41:03 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA44f3HN018343; Wed, 4 Nov 2009 04:41:03 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200911040441.nA44f3HN018343@svn.freebsd.org> From: Alan Cox Date: Wed, 4 Nov 2009 04:41: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: r198872 - in head/sys/arm: arm at91 mv sa11x0 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, 04 Nov 2009 04:41:03 -0000 Author: alc Date: Wed Nov 4 04:41:03 2009 New Revision: 198872 URL: http://svn.freebsd.org/changeset/base/198872 Log: Eliminate an unnecessary vm include file. Modified: head/sys/arm/arm/machdep.c head/sys/arm/at91/at91_machdep.c head/sys/arm/mv/mv_machdep.c head/sys/arm/sa11x0/assabet_machdep.c Modified: head/sys/arm/arm/machdep.c ============================================================================== --- head/sys/arm/arm/machdep.c Wed Nov 4 04:12:56 2009 (r198871) +++ head/sys/arm/arm/machdep.c Wed Nov 4 04:41:03 2009 (r198872) @@ -77,7 +77,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include Modified: head/sys/arm/at91/at91_machdep.c ============================================================================== --- head/sys/arm/at91/at91_machdep.c Wed Nov 4 04:12:56 2009 (r198871) +++ head/sys/arm/at91/at91_machdep.c Wed Nov 4 04:41:03 2009 (r198872) @@ -79,7 +79,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/arm/mv/mv_machdep.c ============================================================================== --- head/sys/arm/mv/mv_machdep.c Wed Nov 4 04:12:56 2009 (r198871) +++ head/sys/arm/mv/mv_machdep.c Wed Nov 4 04:41:03 2009 (r198872) @@ -72,7 +72,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/arm/sa11x0/assabet_machdep.c ============================================================================== --- head/sys/arm/sa11x0/assabet_machdep.c Wed Nov 4 04:12:56 2009 (r198871) +++ head/sys/arm/sa11x0/assabet_machdep.c Wed Nov 4 04:41:03 2009 (r198872) @@ -82,7 +82,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 05:58:14 2009 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 01B40106566B; Wed, 4 Nov 2009 05:58:14 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 96E368FC08; Wed, 4 Nov 2009 05:58:13 +0000 (UTC) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 4B3FD1CD0A; Wed, 4 Nov 2009 06:58:12 +0100 (CET) Date: Wed, 4 Nov 2009 06:58:12 +0100 From: Ed Schouten To: Attilio Rao Message-ID: <20091104055811.GY1293@hoeg.nl> References: <200911040132.nA41WxtQ012750@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jk5HhkA9Kov5Oxsi" Content-Disposition: inline In-Reply-To: <200911040132.nA41WxtQ012750@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: r198868 - in head/sys: amd64/amd64 i386/i386 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, 04 Nov 2009 05:58:14 -0000 --jk5HhkA9Kov5Oxsi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Attilio, * Attilio Rao wrote: > Opteron rev E family of processor expose a bug where, in very rare > ocassions, memory barriers semantic is not honoured by the hardware > itself. As a result, some random breakage can happen in uninvestigable > ways (for further explanation see at the content of the commit itself). Ooh. Sounds like an interesting bug. The bug doesn't manifest itself on UP, right? If so, maybe we should add some very short instructions to the warning on how to disable SMP. --=20 Ed Schouten WWW: http://80386.nl/ --jk5HhkA9Kov5Oxsi Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkrxF/MACgkQ52SDGA2eCwUNSgCcDHBZ4U8o2uNTBWNKS19RrX2S rbsAnA+J5C+IzGvklU+GJcZhBhLY9a8v =TekQ -----END PGP SIGNATURE----- --jk5HhkA9Kov5Oxsi-- From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 06:47:14 2009 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 87C1D106566C; Wed, 4 Nov 2009 06:47:14 +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 772848FC15; Wed, 4 Nov 2009 06:47: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 nA46lEI3021792; Wed, 4 Nov 2009 06:47:14 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA46lEUg021790; Wed, 4 Nov 2009 06:47:14 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <200911040647.nA46lEUg021790@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 4 Nov 2009 06:47: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: r198873 - 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: Wed, 04 Nov 2009 06:47:14 -0000 Author: trasz Date: Wed Nov 4 06:47:14 2009 New Revision: 198873 URL: http://svn.freebsd.org/changeset/base/198873 Log: While VAPPEND without VWRITE makes sense for VOP_ACCESSX(9) (e.g. to check for the permission to create subdirectory (ACE4_ADD_SUBDIRECTORY)), it doesn't really make sense for VOP_ACCESS(9). Also, many VOP_ACCESS(9) implementations don't expect that. Make sure we don't confuse them. Modified: head/sys/kern/vfs_default.c Modified: head/sys/kern/vfs_default.c ============================================================================== --- head/sys/kern/vfs_default.c Wed Nov 4 04:41:03 2009 (r198872) +++ head/sys/kern/vfs_default.c Wed Nov 4 06:47:14 2009 (r198873) @@ -353,6 +353,14 @@ vop_stdaccessx(struct vop_accessx_args * if (accmode == 0) return (0); + /* + * Many VOP_APPEND implementations don't expect VAPPEND without VWRITE + * being set, e.g. they check whether the filesystem is read-only only + * when VWRITE is set. Make sure we don't confuse them. + */ + if (accmode & VAPPEND) + accmode |= VWRITE; + return (VOP_ACCESS(ap->a_vp, accmode, ap->a_cred, ap->a_td)); } From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 06:48:34 2009 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 B8A4610656AD; Wed, 4 Nov 2009 06:48:34 +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 A834C8FC29; Wed, 4 Nov 2009 06:48: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 nA46mYin021864; Wed, 4 Nov 2009 06:48:34 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA46mYrb021862; Wed, 4 Nov 2009 06:48:34 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <200911040648.nA46mYrb021862@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 4 Nov 2009 06:48: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: r198874 - 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: Wed, 04 Nov 2009 06:48:34 -0000 Author: trasz Date: Wed Nov 4 06:48:34 2009 New Revision: 198874 URL: http://svn.freebsd.org/changeset/base/198874 Log: Make sure we don't end up with VAPPEND without VWRITE, if someone calls open(2) like this: open(..., O_APPEND). Modified: head/sys/kern/vfs_vnops.c Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Wed Nov 4 06:47:14 2009 (r198873) +++ head/sys/kern/vfs_vnops.c Wed Nov 4 06:48:34 2009 (r198874) @@ -213,7 +213,7 @@ restart: if (fmode & FEXEC) accmode |= VEXEC; if (fmode & O_APPEND) - accmode |= VAPPEND; + accmode |= VWRITE | VAPPEND; #ifdef MAC error = mac_vnode_check_open(cred, vp, accmode); if (error) From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 07:04:16 2009 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 5D02D106566B; Wed, 4 Nov 2009 07:04:16 +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 32DA18FC1A; Wed, 4 Nov 2009 07:04: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 nA474FSt022332; Wed, 4 Nov 2009 07:04:15 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA474FDo022330; Wed, 4 Nov 2009 07:04:15 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <200911040704.nA474FDo022330@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 4 Nov 2009 07:04: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: r198875 - 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: Wed, 04 Nov 2009 07:04:16 -0000 Author: trasz Date: Wed Nov 4 07:04:15 2009 New Revision: 198875 URL: http://svn.freebsd.org/changeset/base/198875 Log: Style fixes. Modified: head/sys/kern/vfs_acl.c Modified: head/sys/kern/vfs_acl.c ============================================================================== --- head/sys/kern/vfs_acl.c Wed Nov 4 06:48:34 2009 (r198874) +++ head/sys/kern/vfs_acl.c Wed Nov 4 07:04:15 2009 (r198875) @@ -213,7 +213,7 @@ vacl_set_acl(struct thread *td, struct v inkernelacl = acl_alloc(M_WAITOK); error = acl_copyin(aclp, inkernelacl, type); - if (error) + if (error != 0) goto out; error = vn_start_write(vp, &mp, V_WAIT | PCATCH); if (error != 0) @@ -233,7 +233,7 @@ out_unlock: vn_finished_write(mp); out: acl_free(inkernelacl); - return(error); + return (error); } /* @@ -276,12 +276,12 @@ vacl_delete(struct thread *td, struct vn int error; error = vn_start_write(vp, &mp, V_WAIT | PCATCH); - if (error) + if (error != 0) return (error); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); #ifdef MAC error = mac_vnode_check_deleteacl(td->td_ucred, vp, type); - if (error) + if (error != 0) goto out; #endif error = VOP_SETACL(vp, acl_type_unold(type), 0, td->td_ucred, td); @@ -305,7 +305,7 @@ vacl_aclcheck(struct thread *td, struct inkernelacl = acl_alloc(M_WAITOK); error = acl_copyin(aclp, inkernelacl, type); - if (error) + if (error != 0) goto out; error = VOP_ACLCHECK(vp, type, inkernelacl, td->td_ucred, td); out: @@ -501,7 +501,7 @@ __acl_delete_fd(struct thread *td, struc int __acl_aclcheck_file(struct thread *td, struct __acl_aclcheck_file_args *uap) { - struct nameidata nd; + struct nameidata nd; int vfslocked, error; NDINIT(&nd, LOOKUP, MPSAFE|FOLLOW, UIO_USERSPACE, uap->path, td); @@ -521,7 +521,7 @@ __acl_aclcheck_file(struct thread *td, s int __acl_aclcheck_link(struct thread *td, struct __acl_aclcheck_link_args *uap) { - struct nameidata nd; + struct nameidat nd; int vfslocked, error; NDINIT(&nd, LOOKUP, MPSAFE|NOFOLLOW, UIO_USERSPACE, uap->path, td); From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 07:04:35 2009 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 165DA10657C1; Wed, 4 Nov 2009 07:04:35 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (chello089077035009.chello.pl [89.77.35.9]) by mx1.freebsd.org (Postfix) with ESMTP id 4FFDF8FC15; Wed, 4 Nov 2009 07:04:33 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 2F0C545E94; Wed, 4 Nov 2009 08:04:32 +0100 (CET) Received: from localhost (chello089077035009.chello.pl [89.77.35.9]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id E978745C8A; Wed, 4 Nov 2009 08:04:26 +0100 (CET) Date: Wed, 4 Nov 2009 08:04:27 +0100 From: Pawel Jakub Dawidek To: Edward Tomasz Napierala Message-ID: <20091104070427.GE2073@garage.freebsd.pl> References: <200911040648.nA46mYrb021862@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ULyIDA2m8JTe+TiX" Content-Disposition: inline In-Reply-To: <200911040648.nA46mYrb021862@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 9.0-CURRENT i386 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-0.6 required=4.5 tests=BAYES_00,RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r198874 - 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: Wed, 04 Nov 2009 07:04:35 -0000 --ULyIDA2m8JTe+TiX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 04, 2009 at 06:48:34AM +0000, Edward Tomasz Napierala wrote: > Author: trasz > Date: Wed Nov 4 06:48:34 2009 > New Revision: 198874 > URL: http://svn.freebsd.org/changeset/base/198874 >=20 > Log: > Make sure we don't end up with VAPPEND without VWRITE, if someone calls= open(2) > like this: open(..., O_APPEND). >=20 > Modified: > head/sys/kern/vfs_vnops.c >=20 > Modified: head/sys/kern/vfs_vnops.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/kern/vfs_vnops.c Wed Nov 4 06:47:14 2009 (r198873) > +++ head/sys/kern/vfs_vnops.c Wed Nov 4 06:48:34 2009 (r198874) > @@ -213,7 +213,7 @@ restart: > if (fmode & FEXEC) > accmode |=3D VEXEC; > if (fmode & O_APPEND) > - accmode |=3D VAPPEND; > + accmode |=3D VWRITE | VAPPEND; > #ifdef MAC > error =3D mac_vnode_check_open(cred, vp, accmode); > if (error) Why? If someone does O_APPEND only we don't want to give him write access... --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --ULyIDA2m8JTe+TiX Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD4DBQFK8Sd6ForvXbEpPzQRAgvmAJ9Qnz7Dl78+vfqBPmTQc+wk4dG0HgCYo9rI OGyaT691cOXGNOven1BgRQ== =cNJO -----END PGP SIGNATURE----- --ULyIDA2m8JTe+TiX-- From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 07:07:50 2009 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 595C7106566B; Wed, 4 Nov 2009 07:07:50 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (chello089077035009.chello.pl [89.77.35.9]) by mx1.freebsd.org (Postfix) with ESMTP id 96A648FC12; Wed, 4 Nov 2009 07:07:49 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 432BF45E93; Wed, 4 Nov 2009 08:07:48 +0100 (CET) Received: from localhost (chello089077035009.chello.pl [89.77.35.9]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 3032745C8A; Wed, 4 Nov 2009 08:07:41 +0100 (CET) Date: Wed, 4 Nov 2009 08:07:41 +0100 From: Pawel Jakub Dawidek To: Edward Tomasz Napierala Message-ID: <20091104070741.GF2073@garage.freebsd.pl> References: <200911040647.nA46lEUg021790@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="0z5c7mBtSy1wdr4F" Content-Disposition: inline In-Reply-To: <200911040647.nA46lEUg021790@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 9.0-CURRENT i386 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-0.6 required=4.5 tests=BAYES_00,RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r198873 - 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: Wed, 04 Nov 2009 07:07:50 -0000 --0z5c7mBtSy1wdr4F Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 04, 2009 at 06:47:14AM +0000, Edward Tomasz Napierala wrote: > Author: trasz > Date: Wed Nov 4 06:47:14 2009 > New Revision: 198873 > URL: http://svn.freebsd.org/changeset/base/198873 >=20 > Log: > While VAPPEND without VWRITE makes sense for VOP_ACCESSX(9) (e.g. to ch= eck > for the permission to create subdirectory (ACE4_ADD_SUBDIRECTORY)), it = doesn't > really make sense for VOP_ACCESS(9). Also, many VOP_ACCESS(9) implemen= tations > don't expect that. Make sure we don't confuse them. >=20 > Modified: > head/sys/kern/vfs_default.c >=20 > Modified: head/sys/kern/vfs_default.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/kern/vfs_default.c Wed Nov 4 04:41:03 2009 (r198872) > +++ head/sys/kern/vfs_default.c Wed Nov 4 06:47:14 2009 (r198873) > @@ -353,6 +353,14 @@ vop_stdaccessx(struct vop_accessx_args * > if (accmode =3D=3D 0) > return (0); > =20 > + /* > + * Many VOP_APPEND implementations don't expect VAPPEND without VWRITE > + * being set, e.g. they check whether the filesystem is read-only only > + * when VWRITE is set. Make sure we don't confuse them. But O_APPEND alone is legal and doesn't provide write access. This is fine for file systems to only check for read-only in VWRITE case. If file system you're talking about is ZFS it was simply a bug in ZFS. > + */ > + if (accmode & VAPPEND) > + accmode |=3D VWRITE; > return (VOP_ACCESS(ap->a_vp, accmode, ap->a_cred, ap->a_td)); --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --0z5c7mBtSy1wdr4F Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFK8Sg8ForvXbEpPzQRAuwQAKCvuy9SrNfUQsILfjhgETmX7giKBwCggdnc clSfwQHH8P2Zk3JvaBy79wM= =r1yn -----END PGP SIGNATURE----- --0z5c7mBtSy1wdr4F-- From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 07:14:18 2009 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 3AEBA106566B; Wed, 4 Nov 2009 07:14:18 +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 2A59D8FC17; Wed, 4 Nov 2009 07:14: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 nA47EG8c022621; Wed, 4 Nov 2009 07:14:16 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA47EGDc022619; Wed, 4 Nov 2009 07:14:16 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <200911040714.nA47EGDc022619@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 4 Nov 2009 07:14: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: r198876 - 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: Wed, 04 Nov 2009 07:14:18 -0000 Author: trasz Date: Wed Nov 4 07:14:16 2009 New Revision: 198876 URL: http://svn.freebsd.org/changeset/base/198876 Log: Revert r198874, pending further discussion. Modified: head/sys/kern/vfs_vnops.c Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Wed Nov 4 07:04:15 2009 (r198875) +++ head/sys/kern/vfs_vnops.c Wed Nov 4 07:14:16 2009 (r198876) @@ -213,7 +213,7 @@ restart: if (fmode & FEXEC) accmode |= VEXEC; if (fmode & O_APPEND) - accmode |= VWRITE | VAPPEND; + accmode |= VAPPEND; #ifdef MAC error = mac_vnode_check_open(cred, vp, accmode); if (error) From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 08:25:58 2009 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 DC0AD106568B; Wed, 4 Nov 2009 08:25:58 +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 CBA298FC0C; Wed, 4 Nov 2009 08:25: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 nA48PwZU024362; Wed, 4 Nov 2009 08:25:58 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA48PwuI024360; Wed, 4 Nov 2009 08:25:58 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <200911040825.nA48PwuI024360@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 4 Nov 2009 08:25: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: r198877 - 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: Wed, 04 Nov 2009 08:25:59 -0000 Author: trasz Date: Wed Nov 4 08:25:58 2009 New Revision: 198877 URL: http://svn.freebsd.org/changeset/base/198877 Log: Fix build. Submitted by: Andrius Morkūnas Modified: head/sys/kern/vfs_acl.c Modified: head/sys/kern/vfs_acl.c ============================================================================== --- head/sys/kern/vfs_acl.c Wed Nov 4 07:14:16 2009 (r198876) +++ head/sys/kern/vfs_acl.c Wed Nov 4 08:25:58 2009 (r198877) @@ -521,7 +521,7 @@ __acl_aclcheck_file(struct thread *td, s int __acl_aclcheck_link(struct thread *td, struct __acl_aclcheck_link_args *uap) { - struct nameidat nd; + struct nameidata nd; int vfslocked, error; NDINIT(&nd, LOOKUP, MPSAFE|NOFOLLOW, UIO_USERSPACE, uap->path, td); From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 10:46:56 2009 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 E5804106568D; Wed, 4 Nov 2009 10:46:55 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D22088FC1D; Wed, 4 Nov 2009 10:46: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 nA4Akta8028777; Wed, 4 Nov 2009 10:46:55 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4Akt03028773; Wed, 4 Nov 2009 10:46:55 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <200911041046.nA4Akt03028773@svn.freebsd.org> From: Edwin Groothuis Date: Wed, 4 Nov 2009 10:46:55 +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: r198878 - stable/8/share/zoneinfo 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, 04 Nov 2009 10:46:56 -0000 Author: edwin Date: Wed Nov 4 10:46:55 2009 New Revision: 198878 URL: http://svn.freebsd.org/changeset/base/198878 Log: MFC of r198825: tzdata2009q - New region: Asia/Novokuznetsk - Kemerovo oblast' (Kemerovo region) in Russia will change current time zone on 29 March 2010 - Add historical data for Hongkong 1941 - 1980 - Syria will go to winter time in the last weekend of October 2009. Modified: stable/8/share/zoneinfo/asia stable/8/share/zoneinfo/europe stable/8/share/zoneinfo/zone.tab Directory Properties: stable/8/share/zoneinfo/ (props changed) Modified: stable/8/share/zoneinfo/asia ============================================================================== --- stable/8/share/zoneinfo/asia Wed Nov 4 08:25:58 2009 (r198877) +++ stable/8/share/zoneinfo/asia Wed Nov 4 10:46:55 2009 (r198878) @@ -1,5 +1,4 @@ -#
    -# @(#)asia	8.42
    +# @(#)asia	8.44
     # This file is in the public domain, so clarified as of
     # 2009-05-17 by Arthur David Olson.
     
    @@ -369,14 +368,84 @@ Zone	Asia/Kashgar	5:03:56	-	LMT	1928 # o
     			5:00	-	KAST	1980 May
     			8:00	PRC	C%sT
     
    +
    +# From Lee Yiu Chung (2009-10-24):
    +# I found there are some mistakes for the historial DST rule for Hong
    +# Kong. Accoring to the DST record from Hong Kong Observatory (actually,
    +# it is not [an] observatory, but the official meteorological agency of HK,
    +# and also serves as the official timing agency), there are some missing
    +# and incorrect rules. Although the exact switch over time is missing, I
    +# think 3:30 is correct. The official DST record for Hong Kong can be
    +# obtained from
    +# 
    +# http://www.hko.gov.hk/gts/time/Summertime.htm
    +# .
    +
    +# From Arthur David Olson (2009-10-28):
    +# Here are the dates given at
    +# 
    +# http://www.hko.gov.hk/gts/time/Summertime.htm
    +# 
    +# as of 2009-10-28:
    +# Year        Period
    +# 1941        1 Apr to 30 Sep
    +# 1942        Whole year 
    +# 1943        Whole year
    +# 1944        Whole year
    +# 1945        Whole year
    +# 1946        20 Apr to 1 Dec
    +# 1947        13 Apr to 30 Dec
    +# 1948        2 May to 31 Oct
    +# 1949        3 Apr to 30 Oct
    +# 1950        2 Apr to 29 Oct
    +# 1951        1 Apr to 28 Oct
    +# 1952        6 Apr to 25 Oct
    +# 1953        5 Apr to 1 Nov
    +# 1954        21 Mar to 31 Oct
    +# 1955        20 Mar to 6 Nov
    +# 1956        18 Mar to 4 Nov
    +# 1957        24 Mar to 3 Nov
    +# 1958        23 Mar to 2 Nov
    +# 1959        22 Mar to 1 Nov
    +# 1960        20 Mar to 6 Nov
    +# 1961        19 Mar to 5 Nov
    +# 1962        18 Mar to 4 Nov
    +# 1963        24 Mar to 3 Nov
    +# 1964        22 Mar to 1 Nov
    +# 1965        18 Apr to 17 Oct
    +# 1966        17 Apr to 16 Oct
    +# 1967        16 Apr to 22 Oct
    +# 1968        21 Apr to 20 Oct
    +# 1969        20 Apr to 19 Oct
    +# 1970        19 Apr to 18 Oct
    +# 1971        18 Apr to 17 Oct
    +# 1972        16 Apr to 22 Oct
    +# 1973        22 Apr to 21 Oct
    +# 1973/74     30 Dec 73 to 20 Oct 74
    +# 1975        20 Apr to 19 Oct
    +# 1976        18 Apr to 17 Oct
    +# 1977        Nil
    +# 1978        Nil
    +# 1979        13 May to 21 Oct
    +# 1980 to Now Nil
    +# The page does not give start or end times of day.
    +# The page does not give a start date for 1942.
    +# The page does not givw an end date for 1945.
    +# The Japanese occupation of Hong Kong began on 1941-12-25.
    +# The Japanese surrender of Hong Kong was signed 1945-09-15.
    +# For lack of anything better, use start of those days as the transition times.
    +
     # Hong Kong (Xianggang)
     # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
    +Rule	HK	1941	only	-	Apr	1	3:30	1:00	S
    +Rule	HK	1941	only	-	Sep	30	3:30	0	-
     Rule	HK	1946	only	-	Apr	20	3:30	1:00	S
     Rule	HK	1946	only	-	Dec	1	3:30	0	-
     Rule	HK	1947	only	-	Apr	13	3:30	1:00	S
     Rule	HK	1947	only	-	Dec	30	3:30	0	-
     Rule	HK	1948	only	-	May	2	3:30	1:00	S
    -Rule	HK	1948	1952	-	Oct	lastSun	3:30	0	-
    +Rule	HK	1948	1951	-	Oct	lastSun	3:30	0	-
    +Rule	HK	1952	only	-	Oct	25	3:30	0	-
     Rule	HK	1949	1953	-	Apr	Sun>=1	3:30	1:00	S
     Rule	HK	1953	only	-	Nov	1	3:30	0	-
     Rule	HK	1954	1964	-	Mar	Sun>=18	3:30	1:00	S
    @@ -384,13 +453,15 @@ Rule	HK	1954	only	-	Oct	31	3:30	0	-
     Rule	HK	1955	1964	-	Nov	Sun>=1	3:30	0	-
     Rule	HK	1965	1977	-	Apr	Sun>=16	3:30	1:00	S
     Rule	HK	1965	1977	-	Oct	Sun>=16	3:30	0	-
    -Rule	HK	1979	1980	-	May	Sun>=8	3:30	1:00	S
    -Rule	HK	1979	1980	-	Oct	Sun>=16	3:30	0	-
    +Rule	HK	1973	only	-	Dec	30	3:30	1:00	S
    +Rule	HK	1979	only	-	May	Sun>=8	3:30	1:00	S
    +Rule	HK	1979	only	-	Oct	Sun>=16	3:30	0	-
     # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
     Zone	Asia/Hong_Kong	7:36:36 -	LMT	1904 Oct 30
    +			8:00	HK	HK%sT	1941 Dec 25
    +			9:00	-	JST	1945 Sep 15
     			8:00	HK	HK%sT
     
    -
     ###############################################################################
     
     # Taiwan
    @@ -2236,9 +2307,23 @@ Rule	Syria	2007	only	-	Nov	 Fri>=1	0:00	
     # http://www.timeanddate.com/news/time/syria-dst-starts-march-27-2009.html
     # 
     
    +# From Steffen Thorsen (2009-10-27):
    +# The Syrian Arab News Network on 2009-09-29 reported that Syria will 
    +# revert back to winter (standard) time on midnight between Thursday 
    +# 2009-10-29 and Friday 2009-10-30:
    +# 
    +# http://www.sana.sy/ara/2/2009/09/29/247012.htm (Arabic)
    +# 
    +
    +# From Arthur David Olson (2009-10-28):
    +# We'll see if future DST switching times turn out to be end of the last
    +# Thursday of the month or the start of the last Friday of the month or
    +# something else. For now, use the start of the last Friday.
    +
     Rule	Syria	2008	only	-	Apr	Fri>=1	0:00	1:00	S
    -Rule	Syria	2008	max	-	Nov	1	0:00	0	-
    +Rule	Syria	2008	only	-	Nov	1	0:00	0	-
     Rule	Syria	2009	max	-	Mar	lastFri	0:00	1:00	S
    +Rule	Syria	2009	max	-	Oct	lastFri	0:00	0	-
     
     # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
     Zone	Asia/Damascus	2:25:12 -	LMT	1920	# Dimashq
    
    Modified: stable/8/share/zoneinfo/europe
    ==============================================================================
    --- stable/8/share/zoneinfo/europe	Wed Nov  4 08:25:58 2009	(r198877)
    +++ stable/8/share/zoneinfo/europe	Wed Nov  4 10:46:55 2009	(r198878)
    @@ -1,5 +1,5 @@
     # 
    -# @(#)europe	8.22
    +# @(#)europe	8.24
     # This file is in the public domain, so clarified as of
     # 2009-05-17 by Arthur David Olson.
     
    @@ -2072,9 +2072,43 @@ Zone Asia/Novosibirsk	 5:31:40 -	LMT	191
     			 6:00	Russia	NOV%sT	1992 Jan 19 2:00s
     			 7:00	Russia	NOV%sT	1993 May 23 # say Shanks & P.
     			 6:00	Russia	NOV%sT
    +
    +# From Alexander Krivenyshev (2009-10-13):
    +# Kemerovo oblast' (Kemerovo region) in Russia will change current time zone on
    +# March 28, 2010:
    +# from current Russia Zone 6 - Krasnoyarsk Time Zone (KRA) UTC +0700
    +# to Russia Zone 5 - Novosibirsk Time Zone (NOV) UTC +0600
    +#
    +# This is according to Government of Russia decree # 740, on September
    +# 14, 2009 "Application in the territory of the Kemerovo region the Fifth
    +# time zone." ("Russia Zone 5" or old "USSR Zone 5" is GMT +0600)
    +#
    +# Russian Government web site (Russian language)
    +# 
    +# http://www.government.ru/content/governmentactivity/rfgovernmentdecisions/archive/2009/09/14/991633.htm
    +# 
    +# or Russian-English translation by WorldTimeZone.com with reference
    +# map to local region and new Russia Time Zone map after March 28, 2010
    +# 
    +# http://www.worldtimezone.com/dst_news/dst_news_russia03.html
    +# 
    +#
    +# Thus, when Russia will switch to DST on the night of March 28, 2010
    +# Kemerovo region (Kemerovo oblast') will not change the clock.
    +#
    +# As a result, Kemerovo oblast' will be in the same time zone as
    +# Novosibirsk, Omsk, Tomsk, Barnaul and Altai Republic.
    +
    +Zone Asia/Novokuznetsk	 5:48:48 -	NMT	1920 Jan  6
    +			 6:00	-	KRAT	1930 Jun 21 # Krasnoyarsk Time
    +			 7:00	Russia	KRA%sT	1991 Mar 31 2:00s
    +			 6:00	Russia	KRA%sT	1992 Jan 19 2:00s
    +			 7:00	Russia	KRA%sT	2010 Mar 28 2:00s
    +			 6:00	Russia	NOV%sT # Novosibirsk/Novokuznetsk Time
    +
     #
     # From Oscar van Vlijmen (2001-08-25): [This region consists of]
    -# Kemerovskaya oblast', Krasnoyarskij kraj,
    +# Krasnoyarskij kraj,
     # Tajmyrskij (Dolgano-Nenetskij) avtonomnyj okrug,
     # Respublika Tuva, Respublika Khakasiya, Evenkijskij avtonomnyj okrug.
     Zone Asia/Krasnoyarsk	 6:11:20 -	LMT	1920 Jan  6
    
    Modified: stable/8/share/zoneinfo/zone.tab
    ==============================================================================
    --- stable/8/share/zoneinfo/zone.tab	Wed Nov  4 08:25:58 2009	(r198877)
    +++ stable/8/share/zoneinfo/zone.tab	Wed Nov  4 10:46:55 2009	(r198878)
    @@ -1,5 +1,5 @@
     # 
    -# @(#)zone.tab	8.28
    +# @(#)zone.tab	8.29
     # This file is in the public domain, so clarified as of
     # 2009-05-17 by Arthur David Olson.
     #
    @@ -330,6 +330,7 @@ RU	+5312+05009	Europe/Samara	Moscow+01 -
     RU	+5651+06036	Asia/Yekaterinburg	Moscow+02 - Urals
     RU	+5500+07324	Asia/Omsk	Moscow+03 - west Siberia
     RU	+5502+08255	Asia/Novosibirsk	Moscow+03 - Novosibirsk
    +RU	+5345+08707	Asia/Novokuznetsk	Moscow+03 - Novokuznetsk
     RU	+5601+09250	Asia/Krasnoyarsk	Moscow+04 - Yenisei River
     RU	+5216+10420	Asia/Irkutsk	Moscow+05 - Lake Baikal
     RU	+6200+12940	Asia/Yakutsk	Moscow+06 - Lena River
    
    From owner-svn-src-all@FreeBSD.ORG  Wed Nov  4 10:47:05 2009
    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 A85E91065759;
    	Wed,  4 Nov 2009 10:47:03 +0000 (UTC)
    	(envelope-from edwin@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
    	by mx1.freebsd.org (Postfix) with ESMTP id 1C0438FC15;
    	Wed,  4 Nov 2009 10:47: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 nA4Al38v028820;
    	Wed, 4 Nov 2009 10:47:03 GMT (envelope-from edwin@svn.freebsd.org)
    Received: (from edwin@localhost)
    	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4Al2Pe028816;
    	Wed, 4 Nov 2009 10:47:02 GMT (envelope-from edwin@svn.freebsd.org)
    Message-Id: <200911041047.nA4Al2Pe028816@svn.freebsd.org>
    From: Edwin Groothuis 
    Date: Wed, 4 Nov 2009 10:47:02 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
    	svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org
    X-SVN-Group: stable-6
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    Cc: 
    Subject: svn commit: r198879 - stable/6/share/zoneinfo
    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, 04 Nov 2009 10:47:05 -0000
    
    Author: edwin
    Date: Wed Nov  4 10:47:02 2009
    New Revision: 198879
    URL: http://svn.freebsd.org/changeset/base/198879
    
    Log:
      MFC of r198825: tzdata2009q
      
      - New region: Asia/Novokuznetsk
      - Kemerovo oblast' (Kemerovo region) in Russia will change current
        time zone on 29 March 2010
      - Add historical data for Hongkong 1941 - 1980
      - Syria will go to winter time in the last weekend of October 2009.
    
    Modified:
      stable/6/share/zoneinfo/asia
      stable/6/share/zoneinfo/europe
      stable/6/share/zoneinfo/zone.tab
    Directory Properties:
      stable/6/share/zoneinfo/   (props changed)
    
    Modified: stable/6/share/zoneinfo/asia
    ==============================================================================
    --- stable/6/share/zoneinfo/asia	Wed Nov  4 10:46:55 2009	(r198878)
    +++ stable/6/share/zoneinfo/asia	Wed Nov  4 10:47:02 2009	(r198879)
    @@ -1,5 +1,4 @@
    -# 
    -# @(#)asia	8.42
    +# @(#)asia	8.44
     # This file is in the public domain, so clarified as of
     # 2009-05-17 by Arthur David Olson.
     
    @@ -369,14 +368,84 @@ Zone	Asia/Kashgar	5:03:56	-	LMT	1928 # o
     			5:00	-	KAST	1980 May
     			8:00	PRC	C%sT
     
    +
    +# From Lee Yiu Chung (2009-10-24):
    +# I found there are some mistakes for the historial DST rule for Hong
    +# Kong. Accoring to the DST record from Hong Kong Observatory (actually,
    +# it is not [an] observatory, but the official meteorological agency of HK,
    +# and also serves as the official timing agency), there are some missing
    +# and incorrect rules. Although the exact switch over time is missing, I
    +# think 3:30 is correct. The official DST record for Hong Kong can be
    +# obtained from
    +# 
    +# http://www.hko.gov.hk/gts/time/Summertime.htm
    +# .
    +
    +# From Arthur David Olson (2009-10-28):
    +# Here are the dates given at
    +# 
    +# http://www.hko.gov.hk/gts/time/Summertime.htm
    +# 
    +# as of 2009-10-28:
    +# Year        Period
    +# 1941        1 Apr to 30 Sep
    +# 1942        Whole year 
    +# 1943        Whole year
    +# 1944        Whole year
    +# 1945        Whole year
    +# 1946        20 Apr to 1 Dec
    +# 1947        13 Apr to 30 Dec
    +# 1948        2 May to 31 Oct
    +# 1949        3 Apr to 30 Oct
    +# 1950        2 Apr to 29 Oct
    +# 1951        1 Apr to 28 Oct
    +# 1952        6 Apr to 25 Oct
    +# 1953        5 Apr to 1 Nov
    +# 1954        21 Mar to 31 Oct
    +# 1955        20 Mar to 6 Nov
    +# 1956        18 Mar to 4 Nov
    +# 1957        24 Mar to 3 Nov
    +# 1958        23 Mar to 2 Nov
    +# 1959        22 Mar to 1 Nov
    +# 1960        20 Mar to 6 Nov
    +# 1961        19 Mar to 5 Nov
    +# 1962        18 Mar to 4 Nov
    +# 1963        24 Mar to 3 Nov
    +# 1964        22 Mar to 1 Nov
    +# 1965        18 Apr to 17 Oct
    +# 1966        17 Apr to 16 Oct
    +# 1967        16 Apr to 22 Oct
    +# 1968        21 Apr to 20 Oct
    +# 1969        20 Apr to 19 Oct
    +# 1970        19 Apr to 18 Oct
    +# 1971        18 Apr to 17 Oct
    +# 1972        16 Apr to 22 Oct
    +# 1973        22 Apr to 21 Oct
    +# 1973/74     30 Dec 73 to 20 Oct 74
    +# 1975        20 Apr to 19 Oct
    +# 1976        18 Apr to 17 Oct
    +# 1977        Nil
    +# 1978        Nil
    +# 1979        13 May to 21 Oct
    +# 1980 to Now Nil
    +# The page does not give start or end times of day.
    +# The page does not give a start date for 1942.
    +# The page does not givw an end date for 1945.
    +# The Japanese occupation of Hong Kong began on 1941-12-25.
    +# The Japanese surrender of Hong Kong was signed 1945-09-15.
    +# For lack of anything better, use start of those days as the transition times.
    +
     # Hong Kong (Xianggang)
     # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
    +Rule	HK	1941	only	-	Apr	1	3:30	1:00	S
    +Rule	HK	1941	only	-	Sep	30	3:30	0	-
     Rule	HK	1946	only	-	Apr	20	3:30	1:00	S
     Rule	HK	1946	only	-	Dec	1	3:30	0	-
     Rule	HK	1947	only	-	Apr	13	3:30	1:00	S
     Rule	HK	1947	only	-	Dec	30	3:30	0	-
     Rule	HK	1948	only	-	May	2	3:30	1:00	S
    -Rule	HK	1948	1952	-	Oct	lastSun	3:30	0	-
    +Rule	HK	1948	1951	-	Oct	lastSun	3:30	0	-
    +Rule	HK	1952	only	-	Oct	25	3:30	0	-
     Rule	HK	1949	1953	-	Apr	Sun>=1	3:30	1:00	S
     Rule	HK	1953	only	-	Nov	1	3:30	0	-
     Rule	HK	1954	1964	-	Mar	Sun>=18	3:30	1:00	S
    @@ -384,13 +453,15 @@ Rule	HK	1954	only	-	Oct	31	3:30	0	-
     Rule	HK	1955	1964	-	Nov	Sun>=1	3:30	0	-
     Rule	HK	1965	1977	-	Apr	Sun>=16	3:30	1:00	S
     Rule	HK	1965	1977	-	Oct	Sun>=16	3:30	0	-
    -Rule	HK	1979	1980	-	May	Sun>=8	3:30	1:00	S
    -Rule	HK	1979	1980	-	Oct	Sun>=16	3:30	0	-
    +Rule	HK	1973	only	-	Dec	30	3:30	1:00	S
    +Rule	HK	1979	only	-	May	Sun>=8	3:30	1:00	S
    +Rule	HK	1979	only	-	Oct	Sun>=16	3:30	0	-
     # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
     Zone	Asia/Hong_Kong	7:36:36 -	LMT	1904 Oct 30
    +			8:00	HK	HK%sT	1941 Dec 25
    +			9:00	-	JST	1945 Sep 15
     			8:00	HK	HK%sT
     
    -
     ###############################################################################
     
     # Taiwan
    @@ -2236,9 +2307,23 @@ Rule	Syria	2007	only	-	Nov	 Fri>=1	0:00	
     # http://www.timeanddate.com/news/time/syria-dst-starts-march-27-2009.html
     # 
     
    +# From Steffen Thorsen (2009-10-27):
    +# The Syrian Arab News Network on 2009-09-29 reported that Syria will 
    +# revert back to winter (standard) time on midnight between Thursday 
    +# 2009-10-29 and Friday 2009-10-30:
    +# 
    +# http://www.sana.sy/ara/2/2009/09/29/247012.htm (Arabic)
    +# 
    +
    +# From Arthur David Olson (2009-10-28):
    +# We'll see if future DST switching times turn out to be end of the last
    +# Thursday of the month or the start of the last Friday of the month or
    +# something else. For now, use the start of the last Friday.
    +
     Rule	Syria	2008	only	-	Apr	Fri>=1	0:00	1:00	S
    -Rule	Syria	2008	max	-	Nov	1	0:00	0	-
    +Rule	Syria	2008	only	-	Nov	1	0:00	0	-
     Rule	Syria	2009	max	-	Mar	lastFri	0:00	1:00	S
    +Rule	Syria	2009	max	-	Oct	lastFri	0:00	0	-
     
     # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
     Zone	Asia/Damascus	2:25:12 -	LMT	1920	# Dimashq
    
    Modified: stable/6/share/zoneinfo/europe
    ==============================================================================
    --- stable/6/share/zoneinfo/europe	Wed Nov  4 10:46:55 2009	(r198878)
    +++ stable/6/share/zoneinfo/europe	Wed Nov  4 10:47:02 2009	(r198879)
    @@ -1,5 +1,5 @@
     # 
    -# @(#)europe	8.22
    +# @(#)europe	8.24
     # This file is in the public domain, so clarified as of
     # 2009-05-17 by Arthur David Olson.
     
    @@ -2072,9 +2072,43 @@ Zone Asia/Novosibirsk	 5:31:40 -	LMT	191
     			 6:00	Russia	NOV%sT	1992 Jan 19 2:00s
     			 7:00	Russia	NOV%sT	1993 May 23 # say Shanks & P.
     			 6:00	Russia	NOV%sT
    +
    +# From Alexander Krivenyshev (2009-10-13):
    +# Kemerovo oblast' (Kemerovo region) in Russia will change current time zone on
    +# March 28, 2010:
    +# from current Russia Zone 6 - Krasnoyarsk Time Zone (KRA) UTC +0700
    +# to Russia Zone 5 - Novosibirsk Time Zone (NOV) UTC +0600
    +#
    +# This is according to Government of Russia decree # 740, on September
    +# 14, 2009 "Application in the territory of the Kemerovo region the Fifth
    +# time zone." ("Russia Zone 5" or old "USSR Zone 5" is GMT +0600)
    +#
    +# Russian Government web site (Russian language)
    +# 
    +# http://www.government.ru/content/governmentactivity/rfgovernmentdecisions/archive/2009/09/14/991633.htm
    +# 
    +# or Russian-English translation by WorldTimeZone.com with reference
    +# map to local region and new Russia Time Zone map after March 28, 2010
    +# 
    +# http://www.worldtimezone.com/dst_news/dst_news_russia03.html
    +# 
    +#
    +# Thus, when Russia will switch to DST on the night of March 28, 2010
    +# Kemerovo region (Kemerovo oblast') will not change the clock.
    +#
    +# As a result, Kemerovo oblast' will be in the same time zone as
    +# Novosibirsk, Omsk, Tomsk, Barnaul and Altai Republic.
    +
    +Zone Asia/Novokuznetsk	 5:48:48 -	NMT	1920 Jan  6
    +			 6:00	-	KRAT	1930 Jun 21 # Krasnoyarsk Time
    +			 7:00	Russia	KRA%sT	1991 Mar 31 2:00s
    +			 6:00	Russia	KRA%sT	1992 Jan 19 2:00s
    +			 7:00	Russia	KRA%sT	2010 Mar 28 2:00s
    +			 6:00	Russia	NOV%sT # Novosibirsk/Novokuznetsk Time
    +
     #
     # From Oscar van Vlijmen (2001-08-25): [This region consists of]
    -# Kemerovskaya oblast', Krasnoyarskij kraj,
    +# Krasnoyarskij kraj,
     # Tajmyrskij (Dolgano-Nenetskij) avtonomnyj okrug,
     # Respublika Tuva, Respublika Khakasiya, Evenkijskij avtonomnyj okrug.
     Zone Asia/Krasnoyarsk	 6:11:20 -	LMT	1920 Jan  6
    
    Modified: stable/6/share/zoneinfo/zone.tab
    ==============================================================================
    --- stable/6/share/zoneinfo/zone.tab	Wed Nov  4 10:46:55 2009	(r198878)
    +++ stable/6/share/zoneinfo/zone.tab	Wed Nov  4 10:47:02 2009	(r198879)
    @@ -1,5 +1,5 @@
     # 
    -# @(#)zone.tab	8.28
    +# @(#)zone.tab	8.29
     # This file is in the public domain, so clarified as of
     # 2009-05-17 by Arthur David Olson.
     #
    @@ -330,6 +330,7 @@ RU	+5312+05009	Europe/Samara	Moscow+01 -
     RU	+5651+06036	Asia/Yekaterinburg	Moscow+02 - Urals
     RU	+5500+07324	Asia/Omsk	Moscow+03 - west Siberia
     RU	+5502+08255	Asia/Novosibirsk	Moscow+03 - Novosibirsk
    +RU	+5345+08707	Asia/Novokuznetsk	Moscow+03 - Novokuznetsk
     RU	+5601+09250	Asia/Krasnoyarsk	Moscow+04 - Yenisei River
     RU	+5216+10420	Asia/Irkutsk	Moscow+05 - Lake Baikal
     RU	+6200+12940	Asia/Yakutsk	Moscow+06 - Lena River
    
    From owner-svn-src-all@FreeBSD.ORG  Wed Nov  4 10:47:09 2009
    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 631111065692;
    	Wed,  4 Nov 2009 10:47:09 +0000 (UTC)
    	(envelope-from edwin@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
    	by mx1.freebsd.org (Postfix) with ESMTP id 5022F8FC0C;
    	Wed,  4 Nov 2009 10:47:09 +0000 (UTC)
    Received: from svn.freebsd.org (localhost [127.0.0.1])
    	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA4Al96W028861;
    	Wed, 4 Nov 2009 10:47:09 GMT (envelope-from edwin@svn.freebsd.org)
    Received: (from edwin@localhost)
    	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4Al91C028857;
    	Wed, 4 Nov 2009 10:47:09 GMT (envelope-from edwin@svn.freebsd.org)
    Message-Id: <200911041047.nA4Al91C028857@svn.freebsd.org>
    From: Edwin Groothuis 
    Date: Wed, 4 Nov 2009 10:47:09 +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: r198880 - stable/7/share/zoneinfo
    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, 04 Nov 2009 10:47:09 -0000
    
    Author: edwin
    Date: Wed Nov  4 10:47:09 2009
    New Revision: 198880
    URL: http://svn.freebsd.org/changeset/base/198880
    
    Log:
      MFC of r198825: tzdata2009q
      
      - New region: Asia/Novokuznetsk
      - Kemerovo oblast' (Kemerovo region) in Russia will change current
        time zone on 29 March 2010
      - Add historical data for Hongkong 1941 - 1980
      - Syria will go to winter time in the last weekend of October 2009.
    
    Modified:
      stable/7/share/zoneinfo/asia
      stable/7/share/zoneinfo/europe
      stable/7/share/zoneinfo/zone.tab
    Directory Properties:
      stable/7/share/zoneinfo/   (props changed)
    
    Modified: stable/7/share/zoneinfo/asia
    ==============================================================================
    --- stable/7/share/zoneinfo/asia	Wed Nov  4 10:47:02 2009	(r198879)
    +++ stable/7/share/zoneinfo/asia	Wed Nov  4 10:47:09 2009	(r198880)
    @@ -1,5 +1,4 @@
    -# 
    -# @(#)asia	8.42
    +# @(#)asia	8.44
     # This file is in the public domain, so clarified as of
     # 2009-05-17 by Arthur David Olson.
     
    @@ -369,14 +368,84 @@ Zone	Asia/Kashgar	5:03:56	-	LMT	1928 # o
     			5:00	-	KAST	1980 May
     			8:00	PRC	C%sT
     
    +
    +# From Lee Yiu Chung (2009-10-24):
    +# I found there are some mistakes for the historial DST rule for Hong
    +# Kong. Accoring to the DST record from Hong Kong Observatory (actually,
    +# it is not [an] observatory, but the official meteorological agency of HK,
    +# and also serves as the official timing agency), there are some missing
    +# and incorrect rules. Although the exact switch over time is missing, I
    +# think 3:30 is correct. The official DST record for Hong Kong can be
    +# obtained from
    +# 
    +# http://www.hko.gov.hk/gts/time/Summertime.htm
    +# .
    +
    +# From Arthur David Olson (2009-10-28):
    +# Here are the dates given at
    +# 
    +# http://www.hko.gov.hk/gts/time/Summertime.htm
    +# 
    +# as of 2009-10-28:
    +# Year        Period
    +# 1941        1 Apr to 30 Sep
    +# 1942        Whole year 
    +# 1943        Whole year
    +# 1944        Whole year
    +# 1945        Whole year
    +# 1946        20 Apr to 1 Dec
    +# 1947        13 Apr to 30 Dec
    +# 1948        2 May to 31 Oct
    +# 1949        3 Apr to 30 Oct
    +# 1950        2 Apr to 29 Oct
    +# 1951        1 Apr to 28 Oct
    +# 1952        6 Apr to 25 Oct
    +# 1953        5 Apr to 1 Nov
    +# 1954        21 Mar to 31 Oct
    +# 1955        20 Mar to 6 Nov
    +# 1956        18 Mar to 4 Nov
    +# 1957        24 Mar to 3 Nov
    +# 1958        23 Mar to 2 Nov
    +# 1959        22 Mar to 1 Nov
    +# 1960        20 Mar to 6 Nov
    +# 1961        19 Mar to 5 Nov
    +# 1962        18 Mar to 4 Nov
    +# 1963        24 Mar to 3 Nov
    +# 1964        22 Mar to 1 Nov
    +# 1965        18 Apr to 17 Oct
    +# 1966        17 Apr to 16 Oct
    +# 1967        16 Apr to 22 Oct
    +# 1968        21 Apr to 20 Oct
    +# 1969        20 Apr to 19 Oct
    +# 1970        19 Apr to 18 Oct
    +# 1971        18 Apr to 17 Oct
    +# 1972        16 Apr to 22 Oct
    +# 1973        22 Apr to 21 Oct
    +# 1973/74     30 Dec 73 to 20 Oct 74
    +# 1975        20 Apr to 19 Oct
    +# 1976        18 Apr to 17 Oct
    +# 1977        Nil
    +# 1978        Nil
    +# 1979        13 May to 21 Oct
    +# 1980 to Now Nil
    +# The page does not give start or end times of day.
    +# The page does not give a start date for 1942.
    +# The page does not givw an end date for 1945.
    +# The Japanese occupation of Hong Kong began on 1941-12-25.
    +# The Japanese surrender of Hong Kong was signed 1945-09-15.
    +# For lack of anything better, use start of those days as the transition times.
    +
     # Hong Kong (Xianggang)
     # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
    +Rule	HK	1941	only	-	Apr	1	3:30	1:00	S
    +Rule	HK	1941	only	-	Sep	30	3:30	0	-
     Rule	HK	1946	only	-	Apr	20	3:30	1:00	S
     Rule	HK	1946	only	-	Dec	1	3:30	0	-
     Rule	HK	1947	only	-	Apr	13	3:30	1:00	S
     Rule	HK	1947	only	-	Dec	30	3:30	0	-
     Rule	HK	1948	only	-	May	2	3:30	1:00	S
    -Rule	HK	1948	1952	-	Oct	lastSun	3:30	0	-
    +Rule	HK	1948	1951	-	Oct	lastSun	3:30	0	-
    +Rule	HK	1952	only	-	Oct	25	3:30	0	-
     Rule	HK	1949	1953	-	Apr	Sun>=1	3:30	1:00	S
     Rule	HK	1953	only	-	Nov	1	3:30	0	-
     Rule	HK	1954	1964	-	Mar	Sun>=18	3:30	1:00	S
    @@ -384,13 +453,15 @@ Rule	HK	1954	only	-	Oct	31	3:30	0	-
     Rule	HK	1955	1964	-	Nov	Sun>=1	3:30	0	-
     Rule	HK	1965	1977	-	Apr	Sun>=16	3:30	1:00	S
     Rule	HK	1965	1977	-	Oct	Sun>=16	3:30	0	-
    -Rule	HK	1979	1980	-	May	Sun>=8	3:30	1:00	S
    -Rule	HK	1979	1980	-	Oct	Sun>=16	3:30	0	-
    +Rule	HK	1973	only	-	Dec	30	3:30	1:00	S
    +Rule	HK	1979	only	-	May	Sun>=8	3:30	1:00	S
    +Rule	HK	1979	only	-	Oct	Sun>=16	3:30	0	-
     # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
     Zone	Asia/Hong_Kong	7:36:36 -	LMT	1904 Oct 30
    +			8:00	HK	HK%sT	1941 Dec 25
    +			9:00	-	JST	1945 Sep 15
     			8:00	HK	HK%sT
     
    -
     ###############################################################################
     
     # Taiwan
    @@ -2236,9 +2307,23 @@ Rule	Syria	2007	only	-	Nov	 Fri>=1	0:00	
     # http://www.timeanddate.com/news/time/syria-dst-starts-march-27-2009.html
     # 
     
    +# From Steffen Thorsen (2009-10-27):
    +# The Syrian Arab News Network on 2009-09-29 reported that Syria will 
    +# revert back to winter (standard) time on midnight between Thursday 
    +# 2009-10-29 and Friday 2009-10-30:
    +# 
    +# http://www.sana.sy/ara/2/2009/09/29/247012.htm (Arabic)
    +# 
    +
    +# From Arthur David Olson (2009-10-28):
    +# We'll see if future DST switching times turn out to be end of the last
    +# Thursday of the month or the start of the last Friday of the month or
    +# something else. For now, use the start of the last Friday.
    +
     Rule	Syria	2008	only	-	Apr	Fri>=1	0:00	1:00	S
    -Rule	Syria	2008	max	-	Nov	1	0:00	0	-
    +Rule	Syria	2008	only	-	Nov	1	0:00	0	-
     Rule	Syria	2009	max	-	Mar	lastFri	0:00	1:00	S
    +Rule	Syria	2009	max	-	Oct	lastFri	0:00	0	-
     
     # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
     Zone	Asia/Damascus	2:25:12 -	LMT	1920	# Dimashq
    
    Modified: stable/7/share/zoneinfo/europe
    ==============================================================================
    --- stable/7/share/zoneinfo/europe	Wed Nov  4 10:47:02 2009	(r198879)
    +++ stable/7/share/zoneinfo/europe	Wed Nov  4 10:47:09 2009	(r198880)
    @@ -1,5 +1,5 @@
     # 
    -# @(#)europe	8.22
    +# @(#)europe	8.24
     # This file is in the public domain, so clarified as of
     # 2009-05-17 by Arthur David Olson.
     
    @@ -2072,9 +2072,43 @@ Zone Asia/Novosibirsk	 5:31:40 -	LMT	191
     			 6:00	Russia	NOV%sT	1992 Jan 19 2:00s
     			 7:00	Russia	NOV%sT	1993 May 23 # say Shanks & P.
     			 6:00	Russia	NOV%sT
    +
    +# From Alexander Krivenyshev (2009-10-13):
    +# Kemerovo oblast' (Kemerovo region) in Russia will change current time zone on
    +# March 28, 2010:
    +# from current Russia Zone 6 - Krasnoyarsk Time Zone (KRA) UTC +0700
    +# to Russia Zone 5 - Novosibirsk Time Zone (NOV) UTC +0600
    +#
    +# This is according to Government of Russia decree # 740, on September
    +# 14, 2009 "Application in the territory of the Kemerovo region the Fifth
    +# time zone." ("Russia Zone 5" or old "USSR Zone 5" is GMT +0600)
    +#
    +# Russian Government web site (Russian language)
    +# 
    +# http://www.government.ru/content/governmentactivity/rfgovernmentdecisions/archive/2009/09/14/991633.htm
    +# 
    +# or Russian-English translation by WorldTimeZone.com with reference
    +# map to local region and new Russia Time Zone map after March 28, 2010
    +# 
    +# http://www.worldtimezone.com/dst_news/dst_news_russia03.html
    +# 
    +#
    +# Thus, when Russia will switch to DST on the night of March 28, 2010
    +# Kemerovo region (Kemerovo oblast') will not change the clock.
    +#
    +# As a result, Kemerovo oblast' will be in the same time zone as
    +# Novosibirsk, Omsk, Tomsk, Barnaul and Altai Republic.
    +
    +Zone Asia/Novokuznetsk	 5:48:48 -	NMT	1920 Jan  6
    +			 6:00	-	KRAT	1930 Jun 21 # Krasnoyarsk Time
    +			 7:00	Russia	KRA%sT	1991 Mar 31 2:00s
    +			 6:00	Russia	KRA%sT	1992 Jan 19 2:00s
    +			 7:00	Russia	KRA%sT	2010 Mar 28 2:00s
    +			 6:00	Russia	NOV%sT # Novosibirsk/Novokuznetsk Time
    +
     #
     # From Oscar van Vlijmen (2001-08-25): [This region consists of]
    -# Kemerovskaya oblast', Krasnoyarskij kraj,
    +# Krasnoyarskij kraj,
     # Tajmyrskij (Dolgano-Nenetskij) avtonomnyj okrug,
     # Respublika Tuva, Respublika Khakasiya, Evenkijskij avtonomnyj okrug.
     Zone Asia/Krasnoyarsk	 6:11:20 -	LMT	1920 Jan  6
    
    Modified: stable/7/share/zoneinfo/zone.tab
    ==============================================================================
    --- stable/7/share/zoneinfo/zone.tab	Wed Nov  4 10:47:02 2009	(r198879)
    +++ stable/7/share/zoneinfo/zone.tab	Wed Nov  4 10:47:09 2009	(r198880)
    @@ -1,5 +1,5 @@
     # 
    -# @(#)zone.tab	8.28
    +# @(#)zone.tab	8.29
     # This file is in the public domain, so clarified as of
     # 2009-05-17 by Arthur David Olson.
     #
    @@ -330,6 +330,7 @@ RU	+5312+05009	Europe/Samara	Moscow+01 -
     RU	+5651+06036	Asia/Yekaterinburg	Moscow+02 - Urals
     RU	+5500+07324	Asia/Omsk	Moscow+03 - west Siberia
     RU	+5502+08255	Asia/Novosibirsk	Moscow+03 - Novosibirsk
    +RU	+5345+08707	Asia/Novokuznetsk	Moscow+03 - Novokuznetsk
     RU	+5601+09250	Asia/Krasnoyarsk	Moscow+04 - Yenisei River
     RU	+5216+10420	Asia/Irkutsk	Moscow+05 - Lake Baikal
     RU	+6200+12940	Asia/Yakutsk	Moscow+06 - Lena River
    
    From owner-svn-src-all@FreeBSD.ORG  Wed Nov  4 12:35:35 2009
    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 669EB106568B;
    	Wed,  4 Nov 2009 12:35:35 +0000 (UTC)
    	(envelope-from brueffer@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
    	by mx1.freebsd.org (Postfix) with ESMTP id 54A4A8FC13;
    	Wed,  4 Nov 2009 12:35: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 nA4CZZ4b031579;
    	Wed, 4 Nov 2009 12:35:35 GMT (envelope-from brueffer@svn.freebsd.org)
    Received: (from brueffer@localhost)
    	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4CZZOV031577;
    	Wed, 4 Nov 2009 12:35:35 GMT (envelope-from brueffer@svn.freebsd.org)
    Message-Id: <200911041235.nA4CZZOV031577@svn.freebsd.org>
    From: Christian Brueffer 
    Date: Wed, 4 Nov 2009 12:35:35 +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: r198881 - stable/8/sys/dev/amr
    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, 04 Nov 2009 12:35:35 -0000
    
    Author: brueffer
    Date: Wed Nov  4 12:35:35 2009
    New Revision: 198881
    URL: http://svn.freebsd.org/changeset/base/198881
    
    Log:
      MFC: r198546
      
      Remove spurious `)`
    
    Modified:
      stable/8/sys/dev/amr/amr.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/amr/amr.c
    ==============================================================================
    --- stable/8/sys/dev/amr/amr.c	Wed Nov  4 10:47:09 2009	(r198880)
    +++ stable/8/sys/dev/amr/amr.c	Wed Nov  4 12:35:35 2009	(r198881)
    @@ -225,7 +225,7 @@ amr_attach(struct amr_softc *sc)
         }
     
     #ifdef AMR_BOARD_INIT
    -    if ((AMR_IS_QUARTZ(sc) ? amr_quartz_init(sc) : amr_std_init(sc))))
    +    if ((AMR_IS_QUARTZ(sc) ? amr_quartz_init(sc) : amr_std_init(sc)))
     	return(ENXIO);
     #endif
     
    
    From owner-svn-src-all@FreeBSD.ORG  Wed Nov  4 12:38:21 2009
    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 ABE63106568D;
    	Wed,  4 Nov 2009 12:38:21 +0000 (UTC)
    	(envelope-from brueffer@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
    	by mx1.freebsd.org (Postfix) with ESMTP id 866958FC19;
    	Wed,  4 Nov 2009 12:38: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 nA4CcLUg031667;
    	Wed, 4 Nov 2009 12:38:21 GMT (envelope-from brueffer@svn.freebsd.org)
    Received: (from brueffer@localhost)
    	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4CcLNP031665;
    	Wed, 4 Nov 2009 12:38:21 GMT (envelope-from brueffer@svn.freebsd.org)
    Message-Id: <200911041238.nA4CcLNP031665@svn.freebsd.org>
    From: Christian Brueffer 
    Date: Wed, 4 Nov 2009 12:38:21 +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: r198882 - stable/7/sys/dev/amr
    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, 04 Nov 2009 12:38:21 -0000
    
    Author: brueffer
    Date: Wed Nov  4 12:38:21 2009
    New Revision: 198882
    URL: http://svn.freebsd.org/changeset/base/198882
    
    Log:
      MFC: r198546
      
      Remove spurious `)`
    
    Modified:
      stable/7/sys/dev/amr/amr.c
    Directory Properties:
      stable/7/sys/   (props changed)
      stable/7/sys/contrib/pf/   (props changed)
    
    Modified: stable/7/sys/dev/amr/amr.c
    ==============================================================================
    --- stable/7/sys/dev/amr/amr.c	Wed Nov  4 12:35:35 2009	(r198881)
    +++ stable/7/sys/dev/amr/amr.c	Wed Nov  4 12:38:21 2009	(r198882)
    @@ -231,7 +231,7 @@ amr_attach(struct amr_softc *sc)
         }
     
     #ifdef AMR_BOARD_INIT
    -    if ((AMR_IS_QUARTZ(sc) ? amr_quartz_init(sc) : amr_std_init(sc))))
    +    if ((AMR_IS_QUARTZ(sc) ? amr_quartz_init(sc) : amr_std_init(sc)))
     	return(ENXIO);
     #endif
     
    
    From owner-svn-src-all@FreeBSD.ORG  Wed Nov  4 12:43:33 2009
    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 93F67106566C;
    	Wed,  4 Nov 2009 12:43:33 +0000 (UTC)
    	(envelope-from brueffer@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
    	by mx1.freebsd.org (Postfix) with ESMTP id 81DD18FC1D;
    	Wed,  4 Nov 2009 12:43: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 nA4ChWds031806;
    	Wed, 4 Nov 2009 12:43:32 GMT (envelope-from brueffer@svn.freebsd.org)
    Received: (from brueffer@localhost)
    	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4ChWQi031804;
    	Wed, 4 Nov 2009 12:43:32 GMT (envelope-from brueffer@svn.freebsd.org)
    Message-Id: <200911041243.nA4ChWQi031804@svn.freebsd.org>
    From: Christian Brueffer 
    Date: Wed, 4 Nov 2009 12:43:32 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
    	svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org
    X-SVN-Group: stable-6
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    Cc: 
    Subject: svn commit: r198883 - stable/6/sys/dev/amr
    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, 04 Nov 2009 12:43:33 -0000
    
    Author: brueffer
    Date: Wed Nov  4 12:43:31 2009
    New Revision: 198883
    URL: http://svn.freebsd.org/changeset/base/198883
    
    Log:
      MFC: r198546
      
      Remove spurious `)`
    
    Modified:
      stable/6/sys/dev/amr/amr.c
    Directory Properties:
      stable/6/sys/   (props changed)
      stable/6/sys/conf/   (props changed)
      stable/6/sys/contrib/pf/   (props changed)
      stable/6/sys/dev/cxgb/   (props changed)
    
    Modified: stable/6/sys/dev/amr/amr.c
    ==============================================================================
    --- stable/6/sys/dev/amr/amr.c	Wed Nov  4 12:38:21 2009	(r198882)
    +++ stable/6/sys/dev/amr/amr.c	Wed Nov  4 12:43:31 2009	(r198883)
    @@ -229,7 +229,7 @@ amr_attach(struct amr_softc *sc)
         }
     
     #ifdef AMR_BOARD_INIT
    -    if ((AMR_IS_QUARTZ(sc) ? amr_quartz_init(sc) : amr_std_init(sc))))
    +    if ((AMR_IS_QUARTZ(sc) ? amr_quartz_init(sc) : amr_std_init(sc)))
     	return(ENXIO);
     #endif
     
    
    From owner-svn-src-all@FreeBSD.ORG  Wed Nov  4 12:49:43 2009
    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 2C178106566C;
    	Wed,  4 Nov 2009 12:49:43 +0000 (UTC)
    	(envelope-from asmrookie@gmail.com)
    Received: from mail-bw0-f213.google.com (mail-bw0-f213.google.com
    	[209.85.218.213])
    	by mx1.freebsd.org (Postfix) with ESMTP id 55FBC8FC13;
    	Wed,  4 Nov 2009 12:49:41 +0000 (UTC)
    Received: by bwz5 with SMTP id 5so9042286bwz.3
    	for ; Wed, 04 Nov 2009 04:49:41 -0800 (PST)
    DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
    	h=domainkey-signature:mime-version:sender:received:in-reply-to
    	:references:date:x-google-sender-auth:message-id:subject:from:to:cc
    	:content-type; bh=XpNh1akFifabyW1zu5RBTwZW2CnpDJUbYHykLCw7ihs=;
    	b=OsTNwiraP03cwRpbOIrgP2IbPQZLCEA5ArhXUdkYLXPTR1kvEZURIpeMsuXx679h55
    	Ls8bHUx/g6Qqwe2mCyfv3tXA+rje+5ooKSnfWDeL4xXi5BK7c7on0HRuMJMR9V8EJ/zd
    	naNPSFYPA4De8DdLwgDTQiI0qTBwEEbgWP4PM=
    DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
    	h=mime-version:sender:in-reply-to:references:date
    	:x-google-sender-auth:message-id:subject:from:to:cc:content-type;
    	b=BeaoHFw9/VQzH3FaMdOQar58yoXJGGARJrKyirHxxCTitx07/JnjH6O5zexE+E1+ZE
    	5+nlRCnzi2Olzgnf2GFLcjGeTFxQyeEKaL4WZQweA4LOX3EKzpl9Mc7LzHkWvydin0/b
    	a5u2YR6pd02Qa1eXrvcijS7fYanJCHdUC+qBs=
    MIME-Version: 1.0
    Sender: asmrookie@gmail.com
    Received: by 10.223.14.140 with SMTP id g12mr201744faa.50.1257338981090; Wed, 
    	04 Nov 2009 04:49:41 -0800 (PST)
    In-Reply-To: <20091104055811.GY1293@hoeg.nl>
    References: <200911040132.nA41WxtQ012750@svn.freebsd.org>
    	<20091104055811.GY1293@hoeg.nl>
    Date: Wed, 4 Nov 2009 13:49:41 +0100
    X-Google-Sender-Auth: 531ed258d7574ae1
    Message-ID: <3bbf2fe10911040449j5938ca7eqca5829ceced66f48@mail.gmail.com>
    From: Attilio Rao 
    To: Ed Schouten 
    Content-Type: text/plain; charset=UTF-8
    Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
    	src-committers@freebsd.org
    Subject: Re: svn commit: r198868 - in head/sys: amd64/amd64 i386/i386
    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, 04 Nov 2009 12:49:43 -0000
    
    2009/11/4 Ed Schouten :
    > Hi Attilio,
    >
    > * Attilio Rao  wrote:
    >> Opteron rev E family of processor expose a bug where, in very rare
    >> ocassions, memory barriers semantic is not honoured by the hardware
    >> itself. As a result, some random breakage can happen in uninvestigable
    >> ways (for further explanation see at the content of the commit itself).
    >
    > Ooh. Sounds like an interesting bug.
    >
    > The bug doesn't manifest itself on UP, right? If so, maybe we should add
    > some very short instructions to the warning on how to disable SMP.
    
    Due to the semantic of the bug, I think that it can manifest itself on
    UP and a memory barrier failing on UP means that PREEMPTION can blow
    up. Considering this I wouldn't suggest anything different between the
    UP vs SMP case.
    
    Attilio
    
    
    -- 
    Peace can only be achieved by understanding - A. Einstein
    
    From owner-svn-src-all@FreeBSD.ORG  Wed Nov  4 13:06:09 2009
    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 677FB106568F;
    	Wed,  4 Nov 2009 13:06:09 +0000 (UTC)
    	(envelope-from brueffer@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
    	by mx1.freebsd.org (Postfix) with ESMTP id 555698FC15;
    	Wed,  4 Nov 2009 13:06:09 +0000 (UTC)
    Received: from svn.freebsd.org (localhost [127.0.0.1])
    	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA4D69Po032337;
    	Wed, 4 Nov 2009 13:06:09 GMT (envelope-from brueffer@svn.freebsd.org)
    Received: (from brueffer@localhost)
    	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4D698O032335;
    	Wed, 4 Nov 2009 13:06:09 GMT (envelope-from brueffer@svn.freebsd.org)
    Message-Id: <200911041306.nA4D698O032335@svn.freebsd.org>
    From: Christian Brueffer 
    Date: Wed, 4 Nov 2009 13:06:09 +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: r198884 - stable/8/sys/boot/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, 04 Nov 2009 13:06:09 -0000
    
    Author: brueffer
    Date: Wed Nov  4 13:06:09 2009
    New Revision: 198884
    URL: http://svn.freebsd.org/changeset/base/198884
    
    Log:
      MFC: r198537
      
      Close a file descriptor leak in an error case.
    
    Modified:
      stable/8/sys/boot/common/commands.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/boot/common/commands.c
    ==============================================================================
    --- stable/8/sys/boot/common/commands.c	Wed Nov  4 12:43:31 2009	(r198883)
    +++ stable/8/sys/boot/common/commands.c	Wed Nov  4 13:06:09 2009	(r198884)
    @@ -150,6 +150,7 @@ command_help(int argc, char *argv[]) 
     	break;
         default:
     	command_errmsg = "usage is 'help  []";
    +	close(hfd);
     	return(CMD_ERROR);
         }
     
    
    From owner-svn-src-all@FreeBSD.ORG  Wed Nov  4 13:08:57 2009
    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 7FB03106566B;
    	Wed,  4 Nov 2009 13:08:57 +0000 (UTC)
    	(envelope-from brueffer@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
    	by mx1.freebsd.org (Postfix) with ESMTP id 6D73A8FC0C;
    	Wed,  4 Nov 2009 13:08: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 nA4D8voQ032432;
    	Wed, 4 Nov 2009 13:08:57 GMT (envelope-from brueffer@svn.freebsd.org)
    Received: (from brueffer@localhost)
    	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4D8v4B032430;
    	Wed, 4 Nov 2009 13:08:57 GMT (envelope-from brueffer@svn.freebsd.org)
    Message-Id: <200911041308.nA4D8v4B032430@svn.freebsd.org>
    From: Christian Brueffer 
    Date: Wed, 4 Nov 2009 13:08:57 +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: r198885 - stable/7/sys/boot/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, 04 Nov 2009 13:08:57 -0000
    
    Author: brueffer
    Date: Wed Nov  4 13:08:57 2009
    New Revision: 198885
    URL: http://svn.freebsd.org/changeset/base/198885
    
    Log:
      MFC: r198537
      
      Close a file descriptor leak in an error case.
    
    Modified:
      stable/7/sys/boot/common/commands.c
    Directory Properties:
      stable/7/sys/   (props changed)
      stable/7/sys/contrib/pf/   (props changed)
    
    Modified: stable/7/sys/boot/common/commands.c
    ==============================================================================
    --- stable/7/sys/boot/common/commands.c	Wed Nov  4 13:06:09 2009	(r198884)
    +++ stable/7/sys/boot/common/commands.c	Wed Nov  4 13:08:57 2009	(r198885)
    @@ -150,6 +150,7 @@ command_help(int argc, char *argv[]) 
     	break;
         default:
     	command_errmsg = "usage is 'help  []";
    +	close(hfd);
     	return(CMD_ERROR);
         }
     
    
    From owner-svn-src-all@FreeBSD.ORG  Wed Nov  4 13:30:32 2009
    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 7EF0A1065676;
    	Wed,  4 Nov 2009 13:30:32 +0000 (UTC)
    	(envelope-from brueffer@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
    	by mx1.freebsd.org (Postfix) with ESMTP id 6CC818FC0C;
    	Wed,  4 Nov 2009 13:30: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 nA4DUWR5032912;
    	Wed, 4 Nov 2009 13:30:32 GMT (envelope-from brueffer@svn.freebsd.org)
    Received: (from brueffer@localhost)
    	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4DUW3e032910;
    	Wed, 4 Nov 2009 13:30:32 GMT (envelope-from brueffer@svn.freebsd.org)
    Message-Id: <200911041330.nA4DUW3e032910@svn.freebsd.org>
    From: Christian Brueffer 
    Date: Wed, 4 Nov 2009 13:30:32 +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: r198886 - stable/8/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: Wed, 04 Nov 2009 13:30:32 -0000
    
    Author: brueffer
    Date: Wed Nov  4 13:30:32 2009
    New Revision: 198886
    URL: http://svn.freebsd.org/changeset/base/198886
    
    Log:
      MFC: r198539
      
      Close a stream file descriptor leak.
    
    Modified:
      stable/8/sys/netinet/libalias/alias.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/netinet/libalias/alias.c
    ==============================================================================
    --- stable/8/sys/netinet/libalias/alias.c	Wed Nov  4 13:08:57 2009	(r198885)
    +++ stable/8/sys/netinet/libalias/alias.c	Wed Nov  4 13:30:32 2009	(r198886)
    @@ -1669,6 +1669,7 @@ LibAliasRefreshModules(void)
     			LibAliasLoadModule(buf);
     		}
     	}
    +	fclose(fd);
     	return (0);
     }
     
    
    From owner-svn-src-all@FreeBSD.ORG  Wed Nov  4 13:32:25 2009
    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 E3817106568F;
    	Wed,  4 Nov 2009 13:32:25 +0000 (UTC)
    	(envelope-from brueffer@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
    	by mx1.freebsd.org (Postfix) with ESMTP id D17DC8FC17;
    	Wed,  4 Nov 2009 13:32: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 nA4DWPg8032990;
    	Wed, 4 Nov 2009 13:32:25 GMT (envelope-from brueffer@svn.freebsd.org)
    Received: (from brueffer@localhost)
    	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4DWPHK032988;
    	Wed, 4 Nov 2009 13:32:25 GMT (envelope-from brueffer@svn.freebsd.org)
    Message-Id: <200911041332.nA4DWPHK032988@svn.freebsd.org>
    From: Christian Brueffer 
    Date: Wed, 4 Nov 2009 13:32: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: r198887 - stable/7/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: Wed, 04 Nov 2009 13:32:26 -0000
    
    Author: brueffer
    Date: Wed Nov  4 13:32:25 2009
    New Revision: 198887
    URL: http://svn.freebsd.org/changeset/base/198887
    
    Log:
      MFC: 198539
      
      Close a stream file descriptor leak.
    
    Modified:
      stable/7/sys/netinet/libalias/alias.c
    Directory Properties:
      stable/7/sys/   (props changed)
      stable/7/sys/contrib/pf/   (props changed)
    
    Modified: stable/7/sys/netinet/libalias/alias.c
    ==============================================================================
    --- stable/7/sys/netinet/libalias/alias.c	Wed Nov  4 13:30:32 2009	(r198886)
    +++ stable/7/sys/netinet/libalias/alias.c	Wed Nov  4 13:32:25 2009	(r198887)
    @@ -1580,6 +1580,7 @@ LibAliasRefreshModules(void)
     			LibAliasLoadModule(buf);
     		}
     	}
    +	fclose(fd);
     	return (0);
     }
     
    
    From owner-svn-src-all@FreeBSD.ORG  Wed Nov  4 13:40:04 2009
    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 C1D281065679;
    	Wed,  4 Nov 2009 13:40:04 +0000 (UTC)
    	(envelope-from brueffer@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
    	by mx1.freebsd.org (Postfix) with ESMTP id AF8068FC12;
    	Wed,  4 Nov 2009 13:40: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 nA4De4jC033191;
    	Wed, 4 Nov 2009 13:40:04 GMT (envelope-from brueffer@svn.freebsd.org)
    Received: (from brueffer@localhost)
    	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4De4Mr033189;
    	Wed, 4 Nov 2009 13:40:04 GMT (envelope-from brueffer@svn.freebsd.org)
    Message-Id: <200911041340.nA4De4Mr033189@svn.freebsd.org>
    From: Christian Brueffer 
    Date: Wed, 4 Nov 2009 13:40:04 +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: r198888 - stable/8/lib/libstand
    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, 04 Nov 2009 13:40:04 -0000
    
    Author: brueffer
    Date: Wed Nov  4 13:40:04 2009
    New Revision: 198888
    URL: http://svn.freebsd.org/changeset/base/198888
    
    Log:
      MFC: r198542
      
      Initialize f_rabuf in the raw device case. A subsequent close()
      later on would try to free it, leading to a crash.
    
    Modified:
      stable/8/lib/libstand/open.c
    Directory Properties:
      stable/8/lib/libstand/   (props changed)
    
    Modified: stable/8/lib/libstand/open.c
    ==============================================================================
    --- stable/8/lib/libstand/open.c	Wed Nov  4 13:32:25 2009	(r198887)
    +++ stable/8/lib/libstand/open.c	Wed Nov  4 13:40:04 2009	(r198888)
    @@ -113,6 +113,7 @@ open(const char *fname, int mode)
         /* see if we opened a raw device; otherwise, 'file' is the file name. */
         if (file == (char *)0 || *file == '\0') {
     	f->f_flags |= F_RAW;
    +	f->f_rabuf = NULL;
     	return (fd);
         }
     
    
    From owner-svn-src-all@FreeBSD.ORG  Wed Nov  4 13:40:51 2009
    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 4F211106566B;
    	Wed,  4 Nov 2009 13:40:51 +0000 (UTC)
    	(envelope-from brueffer@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
    	by mx1.freebsd.org (Postfix) with ESMTP id 3D2318FC1E;
    	Wed,  4 Nov 2009 13:40: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 nA4DepeX033254;
    	Wed, 4 Nov 2009 13:40:51 GMT (envelope-from brueffer@svn.freebsd.org)
    Received: (from brueffer@localhost)
    	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4Depix033252;
    	Wed, 4 Nov 2009 13:40:51 GMT (envelope-from brueffer@svn.freebsd.org)
    Message-Id: <200911041340.nA4Depix033252@svn.freebsd.org>
    From: Christian Brueffer 
    Date: Wed, 4 Nov 2009 13:40:51 +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: r198889 - stable/7/lib/libstand
    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, 04 Nov 2009 13:40:51 -0000
    
    Author: brueffer
    Date: Wed Nov  4 13:40:50 2009
    New Revision: 198889
    URL: http://svn.freebsd.org/changeset/base/198889
    
    Log:
      MFC: r198542
      
      Initialize f_rabuf in the raw device case. A subsequent close()
      later on would try to free it, leading to a crash.
    
    Modified:
      stable/7/lib/libstand/open.c
    Directory Properties:
      stable/7/lib/libstand/   (props changed)
    
    Modified: stable/7/lib/libstand/open.c
    ==============================================================================
    --- stable/7/lib/libstand/open.c	Wed Nov  4 13:40:04 2009	(r198888)
    +++ stable/7/lib/libstand/open.c	Wed Nov  4 13:40:50 2009	(r198889)
    @@ -113,6 +113,7 @@ open(const char *fname, int mode)
         /* see if we opened a raw device; otherwise, 'file' is the file name. */
         if (file == (char *)0 || *file == '\0') {
     	f->f_flags |= F_RAW;
    +	f->f_rabuf = NULL;
     	return (fd);
         }
     
    
    From owner-svn-src-all@FreeBSD.ORG  Wed Nov  4 13:41:43 2009
    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 903251065670;
    	Wed,  4 Nov 2009 13:41:43 +0000 (UTC)
    	(envelope-from brueffer@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
    	by mx1.freebsd.org (Postfix) with ESMTP id 7E1938FC1A;
    	Wed,  4 Nov 2009 13:41: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 nA4DfhQ1033322;
    	Wed, 4 Nov 2009 13:41:43 GMT (envelope-from brueffer@svn.freebsd.org)
    Received: (from brueffer@localhost)
    	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4DfhNq033320;
    	Wed, 4 Nov 2009 13:41:43 GMT (envelope-from brueffer@svn.freebsd.org)
    Message-Id: <200911041341.nA4DfhNq033320@svn.freebsd.org>
    From: Christian Brueffer 
    Date: Wed, 4 Nov 2009 13:41:43 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
    	svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org
    X-SVN-Group: stable-6
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    Cc: 
    Subject: svn commit: r198890 - stable/6/lib/libstand
    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, 04 Nov 2009 13:41:43 -0000
    
    Author: brueffer
    Date: Wed Nov  4 13:41:43 2009
    New Revision: 198890
    URL: http://svn.freebsd.org/changeset/base/198890
    
    Log:
      MFC: 198542
      
      Initialize f_rabuf in the raw device case. A subsequent close()
      later on would try to free it, leading to a crash.
    
    Modified:
      stable/6/lib/libstand/open.c
    Directory Properties:
      stable/6/lib/libstand/   (props changed)
    
    Modified: stable/6/lib/libstand/open.c
    ==============================================================================
    --- stable/6/lib/libstand/open.c	Wed Nov  4 13:40:50 2009	(r198889)
    +++ stable/6/lib/libstand/open.c	Wed Nov  4 13:41:43 2009	(r198890)
    @@ -117,6 +117,7 @@ open(const char *fname, int mode)
         /* see if we opened a raw device; otherwise, 'file' is the file name. */
         if (file == (char *)0 || *file == '\0') {
     	f->f_flags |= F_RAW;
    +	f->f_rabuf = NULL;
     	return (fd);
         }
     
    
    From owner-svn-src-all@FreeBSD.ORG  Wed Nov  4 14:19:24 2009
    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 6CD9E10656EA;
    	Wed,  4 Nov 2009 14:19:24 +0000 (UTC)
    	(envelope-from jkoshy@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
    	by mx1.freebsd.org (Postfix) with ESMTP id 42A588FC24;
    	Wed,  4 Nov 2009 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 nA4EJOba034162;
    	Wed, 4 Nov 2009 14:19:24 GMT (envelope-from jkoshy@svn.freebsd.org)
    Received: (from jkoshy@localhost)
    	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4EJO2P034160;
    	Wed, 4 Nov 2009 14:19:24 GMT (envelope-from jkoshy@svn.freebsd.org)
    Message-Id: <200911041419.nA4EJO2P034160@svn.freebsd.org>
    From: Joseph Koshy 
    Date: Wed, 4 Nov 2009 14:19:24 +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: r198891 - 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: Wed, 04 Nov 2009 14:19:24 -0000
    
    Author: jkoshy
    Date: Wed Nov  4 14:19:23 2009
    New Revision: 198891
    URL: http://svn.freebsd.org/changeset/base/198891
    
    Log:
      Fabien Thomas (fabient@) is free to fly solo henceforth.
    
    Modified:
      svnadmin/conf/mentors
    
    Modified: svnadmin/conf/mentors
    ==============================================================================
    --- svnadmin/conf/mentors	Wed Nov  4 13:41:43 2009	(r198890)
    +++ svnadmin/conf/mentors	Wed Nov  4 14:19:23 2009	(r198891)
    @@ -13,7 +13,6 @@
     cbzimmer	sam
     dchagin		kib
     eri		mlaier		Co-mentor: thompsa
    -fabient		jkoshy
     ivoras		gnn
     jh		trasz		Co-mentor: rwatson
     jinmei		gnn
    
    From owner-svn-src-all@FreeBSD.ORG  Wed Nov  4 14:43:21 2009
    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 820F3106566B;
    	Wed,  4 Nov 2009 14:43:21 +0000 (UTC)
    	(envelope-from kostikbel@gmail.com)
    Received: from mail.zoral.com.ua (skuns.zoral.com.ua [91.193.166.194])
    	by mx1.freebsd.org (Postfix) with ESMTP id AC0808FC1D;
    	Wed,  4 Nov 2009 14:43:20 +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 nA4EhFBE034497
    	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
    	Wed, 4 Nov 2009 16:43:15 +0200 (EET)
    	(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.3/8.14.3) with ESMTP id
    	nA4EhFtc039704; Wed, 4 Nov 2009 16:43:15 +0200 (EET)
    	(envelope-from kostikbel@gmail.com)
    Received: (from kostik@localhost)
    	by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id nA4EhFfs039703; 
    	Wed, 4 Nov 2009 16:43:15 +0200 (EET)
    	(envelope-from kostikbel@gmail.com)
    X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to
    	kostikbel@gmail.com using -f
    Date: Wed, 4 Nov 2009 16:43:15 +0200
    From: Kostik Belousov 
    To: Attilio Rao 
    Message-ID: <20091104144315.GH2331@deviant.kiev.zoral.com.ua>
    References: <200911040132.nA41WxtQ012750@svn.freebsd.org>
    	<20091104055811.GY1293@hoeg.nl>
    	<3bbf2fe10911040449j5938ca7eqca5829ceced66f48@mail.gmail.com>
    Mime-Version: 1.0
    Content-Type: multipart/signed; micalg=pgp-sha1;
    	protocol="application/pgp-signature"; boundary="54u2kuW9sGWg/X+X"
    Content-Disposition: inline
    In-Reply-To: <3bbf2fe10911040449j5938ca7eqca5829ceced66f48@mail.gmail.com>
    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=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00
    	autolearn=ham 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, Ed Schouten ,
    	svn-src-all@freebsd.org, src-committers@freebsd.org
    Subject: Re: svn commit: r198868 - in head/sys: amd64/amd64 i386/i386
    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, 04 Nov 2009 14:43:21 -0000
    
    
    --54u2kuW9sGWg/X+X
    Content-Type: text/plain; charset=us-ascii
    Content-Disposition: inline
    Content-Transfer-Encoding: quoted-printable
    
    On Wed, Nov 04, 2009 at 01:49:41PM +0100, Attilio Rao wrote:
    > 2009/11/4 Ed Schouten :
    > > Hi Attilio,
    > >
    > > * Attilio Rao  wrote:
    > >> Opteron rev E family of processor expose a bug where, in very rare
    > >> ocassions, memory barriers semantic is not honoured by the hardware
    > >> itself. As a result, some random breakage can happen in uninvestigable
    > >> ways (for further explanation see at the content of the commit itself).
    > >
    > > Ooh. Sounds like an interesting bug.
    > >
    > > The bug doesn't manifest itself on UP, right? If so, maybe we should add
    > > some very short instructions to the warning on how to disable SMP.
    >=20
    > Due to the semantic of the bug, I think that it can manifest itself on
    > UP and a memory barrier failing on UP means that PREEMPTION can blow
    > up. Considering this I wouldn't suggest anything different between the
    > UP vs SMP case.
    
    CPU is always self-consistent, isn't it ?
    
    Also, I very much dislike idea of making our kernel a collection of
    references to the man pages and URLs, esp. when URL point to the
    resource not controlled by the project.
    
    --54u2kuW9sGWg/X+X
    Content-Type: application/pgp-signature
    Content-Disposition: inline
    
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.10 (FreeBSD)
    
    iEYEARECAAYFAkrxkwIACgkQC3+MBN1Mb4isvACg5S8wnOv93nIr3CtXoN86fXrO
    Em8AoLB0JX5z0jghg5cttbDKDdd+CfE9
    =TN3q
    -----END PGP SIGNATURE-----
    
    --54u2kuW9sGWg/X+X--
    
    From owner-svn-src-all@FreeBSD.ORG  Wed Nov  4 14:58:59 2009
    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 857AE1065693;
    	Wed,  4 Nov 2009 14:58: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 6E8988FC2F;
    	Wed,  4 Nov 2009 14:58: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 nA4EwxjW035197;
    	Wed, 4 Nov 2009 14:58:59 GMT (envelope-from rdivacky@svn.freebsd.org)
    Received: (from rdivacky@localhost)
    	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4Eww0E035188;
    	Wed, 4 Nov 2009 14:58:58 GMT (envelope-from rdivacky@svn.freebsd.org)
    Message-Id: <200911041458.nA4Eww0E035188@svn.freebsd.org>
    From: Roman Divacky 
    Date: Wed, 4 Nov 2009 14:58: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: r198892 - in vendor/llvm/dist: . autoconf cmake
    	cmake/modules docs docs/CommandGuide docs/tutorial
    	examples/BrainF include/llvm include/llvm-c
    	include/llvm-c/Transforms include/llvm/ADT...
    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, 04 Nov 2009 14:58:59 -0000
    
    Author: rdivacky
    Date: Wed Nov  4 14:58:56 2009
    New Revision: 198892
    URL: http://svn.freebsd.org/changeset/base/198892
    
    Log:
      Update LLVM to r86025.
    
    Added:
      vendor/llvm/dist/include/llvm/ADT/StringSwitch.h
      vendor/llvm/dist/include/llvm/Analysis/MemoryBuiltins.h
      vendor/llvm/dist/include/llvm/CodeGen/ProcessImplicitDefs.h
      vendor/llvm/dist/include/llvm/CodeGen/SlotIndexes.h
      vendor/llvm/dist/include/llvm/System/AIXDataTypesFix.h
      vendor/llvm/dist/include/llvm/System/DataTypes.h.cmake
      vendor/llvm/dist/include/llvm/System/DataTypes.h.in
      vendor/llvm/dist/lib/Analysis/MemoryBuiltins.cpp
      vendor/llvm/dist/lib/CodeGen/AggressiveAntiDepBreaker.cpp
      vendor/llvm/dist/lib/CodeGen/AggressiveAntiDepBreaker.h
      vendor/llvm/dist/lib/CodeGen/AntiDepBreaker.h
      vendor/llvm/dist/lib/CodeGen/CriticalAntiDepBreaker.cpp
      vendor/llvm/dist/lib/CodeGen/CriticalAntiDepBreaker.h
      vendor/llvm/dist/lib/CodeGen/ProcessImplicitDefs.cpp
      vendor/llvm/dist/lib/CodeGen/SlotIndexes.cpp
      vendor/llvm/dist/lib/Target/ARM/NEONMoveFix.cpp
      vendor/llvm/dist/lib/Transforms/Scalar/ABCD.cpp
      vendor/llvm/dist/lib/Transforms/Scalar/GEPSplitter.cpp
      vendor/llvm/dist/lib/Transforms/Scalar/LoopUnrollPass.cpp
      vendor/llvm/dist/lib/Transforms/Scalar/SCCVN.cpp
      vendor/llvm/dist/lib/Transforms/Utils/LoopUnroll.cpp
      vendor/llvm/dist/test/Analysis/BasicAA/phi-and-select.ll
      vendor/llvm/dist/test/CodeGen/ARM/2009-10-02-NEONSubregsBug.ll
      vendor/llvm/dist/test/CodeGen/ARM/2009-10-27-double-align.ll
      vendor/llvm/dist/test/CodeGen/ARM/2009-10-30.ll
      vendor/llvm/dist/test/CodeGen/ARM/2009-11-01-NeonMoves.ll
      vendor/llvm/dist/test/CodeGen/ARM/2009-11-02-NegativeLane.ll
      vendor/llvm/dist/test/CodeGen/ARM/fpconsts.ll
      vendor/llvm/dist/test/CodeGen/Thumb2/2009-11-01-CopyReg2RegBug.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/ldr-str-imm12.ll
      vendor/llvm/dist/test/CodeGen/Thumb2/machine-licm.ll
      vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-cbnz.ll
      vendor/llvm/dist/test/CodeGen/X86/2009-10-25-RewriterBug.ll
      vendor/llvm/dist/test/CodeGen/X86/2009-11-04-SubregCoalescingBug.ll
      vendor/llvm/dist/test/CodeGen/X86/constant-pool-sharing.ll
      vendor/llvm/dist/test/CodeGen/X86/large-gep-scale.ll
      vendor/llvm/dist/test/CodeGen/X86/negative-stride-fptosi-user.ll
      vendor/llvm/dist/test/CodeGen/X86/palignr-2.ll
      vendor/llvm/dist/test/CodeGen/X86/x86-64-jumps.ll
      vendor/llvm/dist/test/DebugInfo/2009-11-03-InsertExtractValue.ll
      vendor/llvm/dist/test/Feature/terminators.ll
      vendor/llvm/dist/test/FrontendC++/2009-10-27-crash.cpp
      vendor/llvm/dist/test/FrontendC++/integration-O2.cpp
      vendor/llvm/dist/test/LLVMC/OptionPreprocessor.td
      vendor/llvm/dist/test/Transforms/DeadStoreElimination/lifetime-simple.ll
      vendor/llvm/dist/test/Transforms/GVN/invariant-simple.ll
      vendor/llvm/dist/test/Transforms/GVN/lifetime-simple.ll
      vendor/llvm/dist/test/Transforms/GlobalOpt/heap-sra-3.ll
      vendor/llvm/dist/test/Transforms/GlobalOpt/heap-sra-4.ll
      vendor/llvm/dist/test/Transforms/LoopDeletion/multiple-exit-conditions.ll
      vendor/llvm/dist/test/Transforms/SCCP/crash.ll
      vendor/llvm/dist/test/Transforms/SimplifyCFG/duplicate-phis.ll
    Deleted:
      vendor/llvm/dist/lib/Analysis/MallocHelper.cpp
      vendor/llvm/dist/lib/ExecutionEngine/JIT/MacOSJITEventListener.cpp
      vendor/llvm/dist/lib/Target/PIC16/MCSectionPIC16.h
      vendor/llvm/dist/lib/Transforms/IPO/RaiseAllocations.cpp
      vendor/llvm/dist/lib/Transforms/Scalar/CodeGenLICM.cpp
      vendor/llvm/dist/lib/Transforms/Utils/UnrollLoop.cpp
    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/cmake/config-ix.cmake
      vendor/llvm/dist/cmake/modules/LLVMLibDeps.cmake
      vendor/llvm/dist/cmake/modules/LLVMProcessSources.cmake
      vendor/llvm/dist/configure
      vendor/llvm/dist/docs/BitCodeFormat.html
      vendor/llvm/dist/docs/CommandGuide/lit.pod
      vendor/llvm/dist/docs/CompilerDriver.html
      vendor/llvm/dist/docs/GettingStarted.html
      vendor/llvm/dist/docs/LangRef.html
      vendor/llvm/dist/docs/Passes.html
      vendor/llvm/dist/docs/ReleaseNotes.html
      vendor/llvm/dist/docs/TableGenFundamentals.html
      vendor/llvm/dist/docs/tutorial/LangImpl4.html
      vendor/llvm/dist/docs/tutorial/OCamlLangImpl4.html
      vendor/llvm/dist/examples/BrainF/BrainF.cpp
      vendor/llvm/dist/include/llvm-c/Core.h
      vendor/llvm/dist/include/llvm-c/Transforms/IPO.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/ImmutableList.h
      vendor/llvm/dist/include/llvm/ADT/ImmutableSet.h
      vendor/llvm/dist/include/llvm/ADT/SmallPtrSet.h
      vendor/llvm/dist/include/llvm/ADT/SparseBitVector.h
      vendor/llvm/dist/include/llvm/ADT/StringExtras.h
      vendor/llvm/dist/include/llvm/ADT/Twine.h
      vendor/llvm/dist/include/llvm/ADT/ValueMap.h
      vendor/llvm/dist/include/llvm/Analysis/AliasSetTracker.h
      vendor/llvm/dist/include/llvm/Analysis/DebugInfo.h
      vendor/llvm/dist/include/llvm/Analysis/Dominators.h
      vendor/llvm/dist/include/llvm/Analysis/LoopInfo.h
      vendor/llvm/dist/include/llvm/Analysis/ScalarEvolution.h
      vendor/llvm/dist/include/llvm/Analysis/ValueTracking.h
      vendor/llvm/dist/include/llvm/BasicBlock.h
      vendor/llvm/dist/include/llvm/Bitcode/BitCodes.h
      vendor/llvm/dist/include/llvm/Bitcode/Deserialize.h
      vendor/llvm/dist/include/llvm/Bitcode/LLVMBitCodes.h
      vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h
      vendor/llvm/dist/include/llvm/CodeGen/BinaryObject.h
      vendor/llvm/dist/include/llvm/CodeGen/ELFRelocation.h
      vendor/llvm/dist/include/llvm/CodeGen/JITCodeEmitter.h
      vendor/llvm/dist/include/llvm/CodeGen/LatencyPriorityQueue.h
      vendor/llvm/dist/include/llvm/CodeGen/LiveInterval.h
      vendor/llvm/dist/include/llvm/CodeGen/LiveIntervalAnalysis.h
      vendor/llvm/dist/include/llvm/CodeGen/LiveStackAnalysis.h
      vendor/llvm/dist/include/llvm/CodeGen/MachineBasicBlock.h
      vendor/llvm/dist/include/llvm/CodeGen/MachineCodeEmitter.h
      vendor/llvm/dist/include/llvm/CodeGen/MachineFrameInfo.h
      vendor/llvm/dist/include/llvm/CodeGen/MachineInstrBuilder.h
      vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfo.h
      vendor/llvm/dist/include/llvm/CodeGen/MachineOperand.h
      vendor/llvm/dist/include/llvm/CodeGen/MachineRelocation.h
      vendor/llvm/dist/include/llvm/CodeGen/PseudoSourceValue.h
      vendor/llvm/dist/include/llvm/CodeGen/ScheduleDAG.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/ValueTypes.h
      vendor/llvm/dist/include/llvm/Constant.h
      vendor/llvm/dist/include/llvm/Constants.h
      vendor/llvm/dist/include/llvm/ExecutionEngine/ExecutionEngine.h
      vendor/llvm/dist/include/llvm/ExecutionEngine/GenericValue.h
      vendor/llvm/dist/include/llvm/ExecutionEngine/JITEventListener.h
      vendor/llvm/dist/include/llvm/ExecutionEngine/JITMemoryManager.h
      vendor/llvm/dist/include/llvm/InstrTypes.h
      vendor/llvm/dist/include/llvm/Instruction.def
      vendor/llvm/dist/include/llvm/Instruction.h
      vendor/llvm/dist/include/llvm/Instructions.h
      vendor/llvm/dist/include/llvm/Intrinsics.td
      vendor/llvm/dist/include/llvm/LinkAllPasses.h
      vendor/llvm/dist/include/llvm/MC/MCAsmLexer.h
      vendor/llvm/dist/include/llvm/MC/MCAsmParser.h
      vendor/llvm/dist/include/llvm/MC/MCAssembler.h
      vendor/llvm/dist/include/llvm/MC/MCDisassembler.h
      vendor/llvm/dist/include/llvm/MC/MCExpr.h
      vendor/llvm/dist/include/llvm/MC/MCInst.h
      vendor/llvm/dist/include/llvm/MC/MCStreamer.h
      vendor/llvm/dist/include/llvm/MC/MCSymbol.h
      vendor/llvm/dist/include/llvm/MC/MCValue.h
      vendor/llvm/dist/include/llvm/Metadata.h
      vendor/llvm/dist/include/llvm/Module.h
      vendor/llvm/dist/include/llvm/Pass.h
      vendor/llvm/dist/include/llvm/Support/Allocator.h
      vendor/llvm/dist/include/llvm/Support/ConstantRange.h
      vendor/llvm/dist/include/llvm/Support/Debug.h
      vendor/llvm/dist/include/llvm/Support/ELF.h
      vendor/llvm/dist/include/llvm/Support/IRBuilder.h
      vendor/llvm/dist/include/llvm/Support/InstVisitor.h
      vendor/llvm/dist/include/llvm/Support/MathExtras.h
      vendor/llvm/dist/include/llvm/Support/MemoryBuffer.h
      vendor/llvm/dist/include/llvm/Support/MemoryObject.h
      vendor/llvm/dist/include/llvm/Support/PointerLikeTypeTraits.h
      vendor/llvm/dist/include/llvm/Support/SlowOperationInformer.h
      vendor/llvm/dist/include/llvm/Support/StandardPasses.h
      vendor/llvm/dist/include/llvm/Support/TargetFolder.h
      vendor/llvm/dist/include/llvm/Support/Timer.h
      vendor/llvm/dist/include/llvm/Support/raw_ostream.h
      vendor/llvm/dist/include/llvm/System/Atomic.h
      vendor/llvm/dist/include/llvm/System/Disassembler.h
      vendor/llvm/dist/include/llvm/System/Memory.h
      vendor/llvm/dist/include/llvm/System/TimeValue.h
      vendor/llvm/dist/include/llvm/Target/SubtargetFeature.h
      vendor/llvm/dist/include/llvm/Target/Target.td
      vendor/llvm/dist/include/llvm/Target/TargetData.h
      vendor/llvm/dist/include/llvm/Target/TargetInstrDesc.h
      vendor/llvm/dist/include/llvm/Target/TargetInstrInfo.h
      vendor/llvm/dist/include/llvm/Target/TargetJITInfo.h
      vendor/llvm/dist/include/llvm/Target/TargetLowering.h
      vendor/llvm/dist/include/llvm/Target/TargetSelectionDAG.td
      vendor/llvm/dist/include/llvm/Transforms/IPO.h
      vendor/llvm/dist/include/llvm/Transforms/Scalar.h
      vendor/llvm/dist/include/llvm/Transforms/Utils/BasicBlockUtils.h
      vendor/llvm/dist/include/llvm/Transforms/Utils/SSAUpdater.h
      vendor/llvm/dist/include/llvm/Transforms/Utils/ValueMapper.h
      vendor/llvm/dist/include/llvm/Type.h
      vendor/llvm/dist/include/llvm/TypeSymbolTable.h
      vendor/llvm/dist/include/llvm/Value.h
      vendor/llvm/dist/include/llvm/ValueSymbolTable.h
      vendor/llvm/dist/lib/Analysis/AliasAnalysis.cpp
      vendor/llvm/dist/lib/Analysis/AliasAnalysisCounter.cpp
      vendor/llvm/dist/lib/Analysis/AliasAnalysisEvaluator.cpp
      vendor/llvm/dist/lib/Analysis/AliasDebugger.cpp
      vendor/llvm/dist/lib/Analysis/AliasSetTracker.cpp
      vendor/llvm/dist/lib/Analysis/BasicAliasAnalysis.cpp
      vendor/llvm/dist/lib/Analysis/CFGPrinter.cpp
      vendor/llvm/dist/lib/Analysis/CMakeLists.txt
      vendor/llvm/dist/lib/Analysis/CaptureTracking.cpp
      vendor/llvm/dist/lib/Analysis/ConstantFolding.cpp
      vendor/llvm/dist/lib/Analysis/DbgInfoPrinter.cpp
      vendor/llvm/dist/lib/Analysis/DebugInfo.cpp
      vendor/llvm/dist/lib/Analysis/IPA/Andersens.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/InstCount.cpp
      vendor/llvm/dist/lib/Analysis/MemoryDependenceAnalysis.cpp
      vendor/llvm/dist/lib/Analysis/PointerTracking.cpp
      vendor/llvm/dist/lib/Analysis/ProfileEstimatorPass.cpp
      vendor/llvm/dist/lib/Analysis/ProfileInfo.cpp
      vendor/llvm/dist/lib/Analysis/ProfileInfoLoaderPass.cpp
      vendor/llvm/dist/lib/Analysis/ProfileVerifierPass.cpp
      vendor/llvm/dist/lib/Analysis/ScalarEvolution.cpp
      vendor/llvm/dist/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp
      vendor/llvm/dist/lib/Analysis/SparsePropagation.cpp
      vendor/llvm/dist/lib/Analysis/ValueTracking.cpp
      vendor/llvm/dist/lib/AsmParser/LLLexer.cpp
      vendor/llvm/dist/lib/AsmParser/LLParser.cpp
      vendor/llvm/dist/lib/AsmParser/LLParser.h
      vendor/llvm/dist/lib/AsmParser/LLToken.h
      vendor/llvm/dist/lib/Bitcode/Reader/BitcodeReader.cpp
      vendor/llvm/dist/lib/Bitcode/Reader/BitcodeReader.h
      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/AsmPrinter/AsmPrinter.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/CMakeLists.txt
      vendor/llvm/dist/lib/CodeGen/DeadMachineInstructionElim.cpp
      vendor/llvm/dist/lib/CodeGen/DwarfEHPrepare.cpp
      vendor/llvm/dist/lib/CodeGen/ELF.h
      vendor/llvm/dist/lib/CodeGen/ExactHazardRecognizer.cpp
      vendor/llvm/dist/lib/CodeGen/GCMetadata.cpp
      vendor/llvm/dist/lib/CodeGen/GCStrategy.cpp
      vendor/llvm/dist/lib/CodeGen/IfConversion.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/LowerSubregs.cpp
      vendor/llvm/dist/lib/CodeGen/MachineBasicBlock.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/MachineSink.cpp
      vendor/llvm/dist/lib/CodeGen/MachineVerifier.cpp
      vendor/llvm/dist/lib/CodeGen/OcamlGC.cpp
      vendor/llvm/dist/lib/CodeGen/PostRASchedulerList.cpp
      vendor/llvm/dist/lib/CodeGen/PreAllocSplitting.cpp
      vendor/llvm/dist/lib/CodeGen/PrologEpilogInserter.cpp
      vendor/llvm/dist/lib/CodeGen/PseudoSourceValue.cpp
      vendor/llvm/dist/lib/CodeGen/RegAllocLinearScan.cpp
      vendor/llvm/dist/lib/CodeGen/RegAllocLocal.cpp
      vendor/llvm/dist/lib/CodeGen/RegAllocPBQP.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.cpp
      vendor/llvm/dist/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
      vendor/llvm/dist/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
      vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
      vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
      vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp
      vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp
      vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
      vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.h
      vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
      vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
      vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuild.h
      vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGISel.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/Spiller.cpp
      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/TwoAddressInstructionPass.cpp
      vendor/llvm/dist/lib/CodeGen/UnreachableBlockElim.cpp
      vendor/llvm/dist/lib/CodeGen/VirtRegMap.cpp
      vendor/llvm/dist/lib/CodeGen/VirtRegMap.h
      vendor/llvm/dist/lib/CodeGen/VirtRegRewriter.cpp
      vendor/llvm/dist/lib/ExecutionEngine/ExecutionEngine.cpp
      vendor/llvm/dist/lib/ExecutionEngine/Interpreter/Execution.cpp
      vendor/llvm/dist/lib/ExecutionEngine/Interpreter/Interpreter.h
      vendor/llvm/dist/lib/ExecutionEngine/JIT/JIT.cpp
      vendor/llvm/dist/lib/ExecutionEngine/JIT/JIT.h
      vendor/llvm/dist/lib/ExecutionEngine/JIT/JITDebugRegisterer.h
      vendor/llvm/dist/lib/ExecutionEngine/JIT/JITEmitter.cpp
      vendor/llvm/dist/lib/ExecutionEngine/JIT/OProfileJITEventListener.cpp
      vendor/llvm/dist/lib/Linker/LinkModules.cpp
      vendor/llvm/dist/lib/MC/MCAsmInfo.cpp
      vendor/llvm/dist/lib/Support/APFloat.cpp
      vendor/llvm/dist/lib/Support/Allocator.cpp
      vendor/llvm/dist/lib/Support/Debug.cpp
      vendor/llvm/dist/lib/Support/MemoryBuffer.cpp
      vendor/llvm/dist/lib/System/DynamicLibrary.cpp
      vendor/llvm/dist/lib/System/Path.cpp
      vendor/llvm/dist/lib/System/Unix/Memory.inc
      vendor/llvm/dist/lib/System/Unix/Process.inc
      vendor/llvm/dist/lib/System/Unix/Signals.inc
      vendor/llvm/dist/lib/System/Win32/Memory.inc
      vendor/llvm/dist/lib/Target/ARM/ARM.h
      vendor/llvm/dist/lib/Target/ARM/ARM.td
      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/ARMCallingConv.td
      vendor/llvm/dist/lib/Target/ARM/ARMCodeEmitter.cpp
      vendor/llvm/dist/lib/Target/ARM/ARMConstantIslandPass.cpp
      vendor/llvm/dist/lib/Target/ARM/ARMConstantPoolValue.cpp
      vendor/llvm/dist/lib/Target/ARM/ARMConstantPoolValue.h
      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/ARMLoadStoreOptimizer.cpp
      vendor/llvm/dist/lib/Target/ARM/ARMRegisterInfo.td
      vendor/llvm/dist/lib/Target/ARM/ARMSubtarget.h
      vendor/llvm/dist/lib/Target/ARM/ARMTargetMachine.cpp
      vendor/llvm/dist/lib/Target/ARM/ARMTargetMachine.h
      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.h
      vendor/llvm/dist/lib/Target/ARM/AsmPrinter/ARMMCInstLower.cpp
      vendor/llvm/dist/lib/Target/ARM/CMakeLists.txt
      vendor/llvm/dist/lib/Target/ARM/NEONPreAllocPass.cpp
      vendor/llvm/dist/lib/Target/ARM/README.txt
      vendor/llvm/dist/lib/Target/ARM/Thumb1InstrInfo.cpp
      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/Thumb2RegisterInfo.cpp
      vendor/llvm/dist/lib/Target/ARM/Thumb2RegisterInfo.h
      vendor/llvm/dist/lib/Target/ARM/Thumb2SizeReduction.cpp
      vendor/llvm/dist/lib/Target/Alpha/AlphaBranchSelector.cpp
      vendor/llvm/dist/lib/Target/Alpha/AlphaCodeEmitter.cpp
      vendor/llvm/dist/lib/Target/Alpha/AlphaISelLowering.cpp
      vendor/llvm/dist/lib/Target/Alpha/AlphaISelLowering.h
      vendor/llvm/dist/lib/Target/Alpha/AlphaInstrInfo.td
      vendor/llvm/dist/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp
      vendor/llvm/dist/lib/Target/Blackfin/AsmPrinter/BlackfinAsmPrinter.cpp
      vendor/llvm/dist/lib/Target/Blackfin/BlackfinInstrInfo.td
      vendor/llvm/dist/lib/Target/CBackend/CBackend.cpp
      vendor/llvm/dist/lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp
      vendor/llvm/dist/lib/Target/CellSPU/SPU.h
      vendor/llvm/dist/lib/Target/CppBackend/CPPBackend.cpp
      vendor/llvm/dist/lib/Target/MSIL/MSILWriter.cpp
      vendor/llvm/dist/lib/Target/MSP430/AsmPrinter/CMakeLists.txt
      vendor/llvm/dist/lib/Target/MSP430/AsmPrinter/MSP430AsmPrinter.cpp
      vendor/llvm/dist/lib/Target/MSP430/MSP430InstrInfo.td
      vendor/llvm/dist/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp
      vendor/llvm/dist/lib/Target/Mips/MipsISelDAGToDAG.cpp
      vendor/llvm/dist/lib/Target/Mips/MipsISelLowering.cpp
      vendor/llvm/dist/lib/Target/Mips/MipsISelLowering.h
      vendor/llvm/dist/lib/Target/Mips/MipsInstrFPU.td
      vendor/llvm/dist/lib/Target/Mips/MipsInstrInfo.td
      vendor/llvm/dist/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp
      vendor/llvm/dist/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.h
      vendor/llvm/dist/lib/Target/PIC16/PIC16ABINames.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/Makefile
      vendor/llvm/dist/lib/Target/PIC16/PIC16TargetObjectFile.cpp
      vendor/llvm/dist/lib/Target/PIC16/PIC16TargetObjectFile.h
      vendor/llvm/dist/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp
      vendor/llvm/dist/lib/Target/PowerPC/PPCBranchSelector.cpp
      vendor/llvm/dist/lib/Target/PowerPC/PPCCodeEmitter.cpp
      vendor/llvm/dist/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
      vendor/llvm/dist/lib/Target/PowerPC/PPCInstr64Bit.td
      vendor/llvm/dist/lib/Target/PowerPC/PPCInstrInfo.td
      vendor/llvm/dist/lib/Target/README.txt
      vendor/llvm/dist/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp
      vendor/llvm/dist/lib/Target/Sparc/SparcInstrInfo.td
      vendor/llvm/dist/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.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.td
      vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp
      vendor/llvm/dist/lib/Target/X86/README.txt
      vendor/llvm/dist/lib/Target/X86/X86CodeEmitter.cpp
      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/X86InstrFPStack.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/X86RegisterInfo.cpp
      vendor/llvm/dist/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp
      vendor/llvm/dist/lib/Target/XCore/XCoreInstrInfo.td
      vendor/llvm/dist/lib/Transforms/IPO/ArgumentPromotion.cpp
      vendor/llvm/dist/lib/Transforms/IPO/CMakeLists.txt
      vendor/llvm/dist/lib/Transforms/IPO/ConstantMerge.cpp
      vendor/llvm/dist/lib/Transforms/IPO/DeadArgumentElimination.cpp
      vendor/llvm/dist/lib/Transforms/IPO/DeadTypeElimination.cpp
      vendor/llvm/dist/lib/Transforms/IPO/ExtractGV.cpp
      vendor/llvm/dist/lib/Transforms/IPO/FunctionAttrs.cpp
      vendor/llvm/dist/lib/Transforms/IPO/GlobalDCE.cpp
      vendor/llvm/dist/lib/Transforms/IPO/GlobalOpt.cpp
      vendor/llvm/dist/lib/Transforms/IPO/IPConstantPropagation.cpp
      vendor/llvm/dist/lib/Transforms/IPO/IPO.cpp
      vendor/llvm/dist/lib/Transforms/IPO/InlineAlways.cpp
      vendor/llvm/dist/lib/Transforms/IPO/InlineSimple.cpp
      vendor/llvm/dist/lib/Transforms/IPO/Internalize.cpp
      vendor/llvm/dist/lib/Transforms/IPO/LoopExtractor.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/PruneEH.cpp
      vendor/llvm/dist/lib/Transforms/IPO/StripDeadPrototypes.cpp
      vendor/llvm/dist/lib/Transforms/IPO/StripSymbols.cpp
      vendor/llvm/dist/lib/Transforms/IPO/StructRetPromotion.cpp
      vendor/llvm/dist/lib/Transforms/Instrumentation/BlockProfiling.cpp
      vendor/llvm/dist/lib/Transforms/Instrumentation/EdgeProfiling.cpp
      vendor/llvm/dist/lib/Transforms/Instrumentation/OptimalEdgeProfiling.cpp
      vendor/llvm/dist/lib/Transforms/Instrumentation/RSProfiling.cpp
      vendor/llvm/dist/lib/Transforms/Scalar/CMakeLists.txt
      vendor/llvm/dist/lib/Transforms/Scalar/CodeGenPrepare.cpp
      vendor/llvm/dist/lib/Transforms/Scalar/CondPropagate.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/InstructionCombining.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/SCCP.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/Utils/BasicBlockUtils.cpp
      vendor/llvm/dist/lib/Transforms/Utils/BasicInliner.cpp
      vendor/llvm/dist/lib/Transforms/Utils/BreakCriticalEdges.cpp
      vendor/llvm/dist/lib/Transforms/Utils/CMakeLists.txt
      vendor/llvm/dist/lib/Transforms/Utils/CloneFunction.cpp
      vendor/llvm/dist/lib/Transforms/Utils/CloneModule.cpp
      vendor/llvm/dist/lib/Transforms/Utils/CodeExtractor.cpp
      vendor/llvm/dist/lib/Transforms/Utils/InlineFunction.cpp
      vendor/llvm/dist/lib/Transforms/Utils/Local.cpp
      vendor/llvm/dist/lib/Transforms/Utils/LoopSimplify.cpp
      vendor/llvm/dist/lib/Transforms/Utils/LowerInvoke.cpp
      vendor/llvm/dist/lib/Transforms/Utils/LowerSwitch.cpp
      vendor/llvm/dist/lib/Transforms/Utils/Mem2Reg.cpp
      vendor/llvm/dist/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
      vendor/llvm/dist/lib/Transforms/Utils/SSI.cpp
      vendor/llvm/dist/lib/Transforms/Utils/SimplifyCFG.cpp
      vendor/llvm/dist/lib/Transforms/Utils/ValueMapper.cpp
      vendor/llvm/dist/lib/VMCore/AsmWriter.cpp
      vendor/llvm/dist/lib/VMCore/BasicBlock.cpp
      vendor/llvm/dist/lib/VMCore/ConstantFold.cpp
      vendor/llvm/dist/lib/VMCore/Constants.cpp
      vendor/llvm/dist/lib/VMCore/ConstantsContext.h
      vendor/llvm/dist/lib/VMCore/Core.cpp
      vendor/llvm/dist/lib/VMCore/Dominators.cpp
      vendor/llvm/dist/lib/VMCore/Function.cpp
      vendor/llvm/dist/lib/VMCore/Globals.cpp
      vendor/llvm/dist/lib/VMCore/Instruction.cpp
      vendor/llvm/dist/lib/VMCore/Instructions.cpp
      vendor/llvm/dist/lib/VMCore/LLVMContextImpl.h
      vendor/llvm/dist/lib/VMCore/LeakDetector.cpp
      vendor/llvm/dist/lib/VMCore/LeaksContext.h
      vendor/llvm/dist/lib/VMCore/Metadata.cpp
      vendor/llvm/dist/lib/VMCore/PassManager.cpp
      vendor/llvm/dist/lib/VMCore/PrintModulePass.cpp
      vendor/llvm/dist/lib/VMCore/Type.cpp
      vendor/llvm/dist/lib/VMCore/TypeSymbolTable.cpp
      vendor/llvm/dist/lib/VMCore/Value.cpp
      vendor/llvm/dist/lib/VMCore/Verifier.cpp
      vendor/llvm/dist/projects/sample/lib/sample/sample.c
      vendor/llvm/dist/test/Analysis/BasicAA/2006-03-03-BadArraySubscript.ll
      vendor/llvm/dist/test/Analysis/BasicAA/2009-10-13-AtomicModRef.ll
      vendor/llvm/dist/test/Analysis/BasicAA/featuretest.ll
      vendor/llvm/dist/test/Analysis/BasicAA/global-size.ll
      vendor/llvm/dist/test/Analysis/BasicAA/modref.ll
      vendor/llvm/dist/test/Analysis/BasicAA/store-promote.ll
      vendor/llvm/dist/test/Analysis/LoopInfo/2003-05-15-NestingProblem.ll
      vendor/llvm/dist/test/Analysis/ScalarEvolution/2007-11-18-OrInstruction.ll
      vendor/llvm/dist/test/Analysis/ScalarEvolution/2008-07-29-SGTTripCount.ll
      vendor/llvm/dist/test/Analysis/ScalarEvolution/2008-07-29-SMinExpr.ll
      vendor/llvm/dist/test/Analysis/ScalarEvolution/2008-08-04-IVOverflow.ll
      vendor/llvm/dist/test/Analysis/ScalarEvolution/2008-08-04-LongAddRec.ll
      vendor/llvm/dist/test/Analysis/ScalarEvolution/2009-05-09-PointerEdgeCount.ll
      vendor/llvm/dist/test/CodeGen/ARM/alloca.ll
      vendor/llvm/dist/test/CodeGen/ARM/arguments.ll
      vendor/llvm/dist/test/CodeGen/ARM/arguments_f64_backfill.ll
      vendor/llvm/dist/test/CodeGen/ARM/arm-negative-stride.ll
      vendor/llvm/dist/test/CodeGen/ARM/bfc.ll
      vendor/llvm/dist/test/CodeGen/ARM/call.ll
      vendor/llvm/dist/test/CodeGen/ARM/carry.ll
      vendor/llvm/dist/test/CodeGen/ARM/constants.ll
      vendor/llvm/dist/test/CodeGen/ARM/fmacs.ll
      vendor/llvm/dist/test/CodeGen/ARM/fnmacs.ll
      vendor/llvm/dist/test/CodeGen/ARM/fpmem.ll
      vendor/llvm/dist/test/CodeGen/ARM/ispositive.ll
      vendor/llvm/dist/test/CodeGen/ARM/ldm.ll
      vendor/llvm/dist/test/CodeGen/ARM/ldr.ll
      vendor/llvm/dist/test/CodeGen/ARM/long.ll
      vendor/llvm/dist/test/CodeGen/ARM/long_shift.ll
      vendor/llvm/dist/test/CodeGen/ARM/remat.ll
      vendor/llvm/dist/test/CodeGen/ARM/str_post.ll
      vendor/llvm/dist/test/CodeGen/ARM/tls2.ll
      vendor/llvm/dist/test/CodeGen/CPP/llvm2cpp.ll
      vendor/llvm/dist/test/CodeGen/Generic/intrinsics.ll
      vendor/llvm/dist/test/CodeGen/Thumb2/2009-08-04-SubregLoweringBug.ll
      vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-bcc.ll
      vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-bfc.ll
      vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-branch.ll
      vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-clz.ll
      vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-cmn2.ll
      vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-eor2.ll
      vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-mov.ll
      vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-str_post.ll
      vendor/llvm/dist/test/CodeGen/X86/2007-11-30-LoadFolding-Bug.ll
      vendor/llvm/dist/test/CodeGen/X86/2008-02-18-TailMergingBug.ll
      vendor/llvm/dist/test/CodeGen/X86/2008-05-12-tailmerge-5.ll
      vendor/llvm/dist/test/CodeGen/X86/break-anti-dependencies.ll
      vendor/llvm/dist/test/CodeGen/X86/convert-2-addr-3-addr-inc64.ll
      vendor/llvm/dist/test/CodeGen/X86/pic-load-remat.ll
      vendor/llvm/dist/test/CodeGen/X86/sink-hoist.ll
      vendor/llvm/dist/test/CodeGen/X86/vec_ins_extract.ll
      vendor/llvm/dist/test/CodeGen/X86/x86-64-pic-10.ll
      vendor/llvm/dist/test/Makefile
      vendor/llvm/dist/test/Other/2003-02-19-LoopInfoNestingBug.ll
      vendor/llvm/dist/test/Scripts/macho-dump
      vendor/llvm/dist/test/Transforms/ArgumentPromotion/aggregate-promote.ll
      vendor/llvm/dist/test/Transforms/ArgumentPromotion/basictest.ll
      vendor/llvm/dist/test/Transforms/ArgumentPromotion/byval.ll
      vendor/llvm/dist/test/Transforms/ArgumentPromotion/chained.ll
      vendor/llvm/dist/test/Transforms/ArgumentPromotion/control-flow2.ll
      vendor/llvm/dist/test/Transforms/ConstProp/float-to-ptr-cast.ll
      vendor/llvm/dist/test/Transforms/ConstProp/loads.ll
      vendor/llvm/dist/test/Transforms/DeadStoreElimination/2008-07-28-load-store.ll
      vendor/llvm/dist/test/Transforms/DeadStoreElimination/PartialStore.ll
      vendor/llvm/dist/test/Transforms/DeadStoreElimination/context-sensitive.ll
      vendor/llvm/dist/test/Transforms/DeadStoreElimination/simple.ll
      vendor/llvm/dist/test/Transforms/GlobalOpt/globalsra-partial.ll
      vendor/llvm/dist/test/Transforms/GlobalOpt/globalsra.ll
      vendor/llvm/dist/test/Transforms/GlobalOpt/malloc-promote-1.ll
      vendor/llvm/dist/test/Transforms/IndVarSimplify/preserve-gep-loop-variant.ll
      vendor/llvm/dist/test/Transforms/IndVarSimplify/preserve-gep-remainder.ll
      vendor/llvm/dist/test/Transforms/Inline/basictest.ll
      vendor/llvm/dist/test/Transforms/Inline/callgraph-update.ll
      vendor/llvm/dist/test/Transforms/InstCombine/2003-11-13-ConstExprCastCall.ll
      vendor/llvm/dist/test/Transforms/InstCombine/2007-10-10-EliminateMemCpy.ll
      vendor/llvm/dist/test/Transforms/InstCombine/add-shrink.ll
      vendor/llvm/dist/test/Transforms/InstCombine/add-sitofp.ll
      vendor/llvm/dist/test/Transforms/InstCombine/align-2d-gep.ll
      vendor/llvm/dist/test/Transforms/InstCombine/align-addr.ll
      vendor/llvm/dist/test/Transforms/InstCombine/align-inc.ll
      vendor/llvm/dist/test/Transforms/InstCombine/alloca.ll
      vendor/llvm/dist/test/Transforms/InstCombine/call.ll
      vendor/llvm/dist/test/Transforms/InstCombine/cast-load-gep.ll
      vendor/llvm/dist/test/Transforms/InstCombine/cast.ll
      vendor/llvm/dist/test/Transforms/InstCombine/cast2.ll
      vendor/llvm/dist/test/Transforms/InstCombine/constant-fold-gep.ll
      vendor/llvm/dist/test/Transforms/InstCombine/fold-bin-operand.ll
      vendor/llvm/dist/test/Transforms/InstCombine/fp-ret-bitcast.ll
      vendor/llvm/dist/test/Transforms/InstCombine/loadstore-alignment.ll
      vendor/llvm/dist/test/Transforms/InstCombine/malloc-free-delete.ll
      vendor/llvm/dist/test/Transforms/InstCombine/or.ll
      vendor/llvm/dist/test/Transforms/InstCombine/phi.ll
      vendor/llvm/dist/test/Transforms/InstCombine/preserve-sminmax.ll
      vendor/llvm/dist/test/Transforms/InstCombine/ptr-int-cast.ll
      vendor/llvm/dist/test/Transforms/InstCombine/store.ll
      vendor/llvm/dist/test/Transforms/InstCombine/sub.ll
      vendor/llvm/dist/test/Transforms/JumpThreading/no-irreducible-loops.ll
      vendor/llvm/dist/test/Transforms/LICM/2008-07-22-LoadGlobalConstant.ll
      vendor/llvm/dist/test/Transforms/LICM/Preserve-LCSSA.ll
      vendor/llvm/dist/test/Transforms/LoopRotate/2009-01-25-SingleEntryPhi.ll
      vendor/llvm/dist/test/Transforms/LoopRotate/LRCrash-1.ll
      vendor/llvm/dist/test/Transforms/LoopRotate/LRCrash-2.ll
      vendor/llvm/dist/test/Transforms/LoopRotate/LRCrash-3.ll
      vendor/llvm/dist/test/Transforms/LoopRotate/LRCrash-4.ll
      vendor/llvm/dist/test/Transforms/LoopRotate/LRCrash-5.ll
      vendor/llvm/dist/test/Transforms/LoopRotate/PhiRename-1.ll
      vendor/llvm/dist/test/Transforms/LoopRotate/PhiSelfRefernce-1.ll
      vendor/llvm/dist/test/Transforms/LoopRotate/pr2639.ll
      vendor/llvm/dist/test/Transforms/LoopRotate/preserve-scev.ll
      vendor/llvm/dist/test/Transforms/LoopSimplify/merge-exits.ll
      vendor/llvm/dist/test/Transforms/Mem2Reg/crash.ll
      vendor/llvm/dist/test/Transforms/MemCpyOpt/2008-03-13-ReturnSlotBitcast.ll
      vendor/llvm/dist/test/Transforms/MemCpyOpt/align.ll
      vendor/llvm/dist/test/Transforms/SCCP/ipsccp-basic.ll
      vendor/llvm/dist/test/Transforms/SCCP/loadtest.ll
      vendor/llvm/dist/test/Transforms/ScalarRepl/2003-05-29-ArrayFail.ll
      vendor/llvm/dist/test/Transforms/ScalarRepl/2006-11-07-InvalidArrayPromote.ll
      vendor/llvm/dist/test/Transforms/ScalarRepl/2008-06-05-loadstore-agg.ll
      vendor/llvm/dist/test/Transforms/ScalarRepl/2008-09-22-vector-gep.ll
      vendor/llvm/dist/test/Transforms/ScalarRepl/2009-03-04-MemCpyAlign.ll
      vendor/llvm/dist/test/Transforms/ScalarRepl/DifferingTypes.ll
      vendor/llvm/dist/test/Transforms/ScalarRepl/arraytest.ll
      vendor/llvm/dist/test/Transforms/ScalarRepl/basictest.ll
      vendor/llvm/dist/test/Transforms/ScalarRepl/bitfield-sroa.ll
      vendor/llvm/dist/test/Transforms/ScalarRepl/copy-aggregate.ll
      vendor/llvm/dist/test/Transforms/ScalarRepl/debuginfo.ll
      vendor/llvm/dist/test/Transforms/ScalarRepl/load-store-aggregate.ll
      vendor/llvm/dist/test/Transforms/ScalarRepl/memcpy-from-global.ll
      vendor/llvm/dist/test/Transforms/ScalarRepl/not-a-vector.ll
      vendor/llvm/dist/test/Transforms/ScalarRepl/union-fp-int.ll
      vendor/llvm/dist/test/Transforms/ScalarRepl/union-packed.ll
      vendor/llvm/dist/test/Transforms/ScalarRepl/vector_memcpy.ll
      vendor/llvm/dist/test/Transforms/ScalarRepl/vector_promote.ll
      vendor/llvm/dist/test/Transforms/SimplifyCFG/basictest.ll
      vendor/llvm/dist/test/lit.cfg
      vendor/llvm/dist/tools/gold/gold-plugin.cpp
      vendor/llvm/dist/tools/lli/lli.cpp
      vendor/llvm/dist/tools/llvm-mc/AsmLexer.h
      vendor/llvm/dist/tools/llvm-mc/llvm-mc.cpp
      vendor/llvm/dist/tools/llvmc/doc/LLVMC-Reference.rst
      vendor/llvm/dist/tools/opt/opt.cpp
      vendor/llvm/dist/unittests/ADT/StringMapTest.cpp
      vendor/llvm/dist/unittests/ADT/ValueMapTest.cpp
      vendor/llvm/dist/unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp
      vendor/llvm/dist/unittests/ExecutionEngine/JIT/JITMemoryManagerTest.cpp
      vendor/llvm/dist/unittests/ExecutionEngine/JIT/JITTest.cpp
      vendor/llvm/dist/unittests/ExecutionEngine/JIT/Makefile
      vendor/llvm/dist/unittests/Makefile.unittest
      vendor/llvm/dist/unittests/Support/ValueHandleTest.cpp
      vendor/llvm/dist/unittests/Transforms/Utils/Cloning.cpp
      vendor/llvm/dist/unittests/VMCore/MetadataTest.cpp
      vendor/llvm/dist/utils/TableGen/CodeGenDAGPatterns.cpp
      vendor/llvm/dist/utils/TableGen/CodeGenInstruction.cpp
      vendor/llvm/dist/utils/TableGen/CodeGenInstruction.h
      vendor/llvm/dist/utils/TableGen/DAGISelEmitter.cpp
      vendor/llvm/dist/utils/TableGen/InstrInfoEmitter.cpp
      vendor/llvm/dist/utils/TableGen/LLVMCConfigurationEmitter.cpp
      vendor/llvm/dist/utils/TableGen/Record.cpp
      vendor/llvm/dist/utils/TableGen/Record.h
      vendor/llvm/dist/utils/TableGen/TGLexer.h
      vendor/llvm/dist/utils/UpdateCMakeLists.pl
      vendor/llvm/dist/utils/buildit/build_llvm
      vendor/llvm/dist/utils/findoptdiff
      vendor/llvm/dist/utils/lit/TestRunner.py
      vendor/llvm/dist/utils/lit/Util.py
      vendor/llvm/dist/utils/lit/lit.py
      vendor/llvm/dist/utils/unittest/UnitTestMain/Makefile
      vendor/llvm/dist/utils/unittest/googletest/Makefile
      vendor/llvm/dist/utils/vim/llvm.vim
    
    Modified: vendor/llvm/dist/CMakeLists.txt
    ==============================================================================
    --- vendor/llvm/dist/CMakeLists.txt	Wed Nov  4 14:19:23 2009	(r198891)
    +++ vendor/llvm/dist/CMakeLists.txt	Wed Nov  4 14:58:56 2009	(r198892)
    @@ -319,16 +319,26 @@ if(LLVM_BUILD_EXAMPLES)
       add_subdirectory(examples)
     endif ()
     
    -install(DIRECTORY include
    -  DESTINATION .
    +install(DIRECTORY include/
    +  DESTINATION include
    +  FILES_MATCHING
    +  PATTERN "*.def"
    +  PATTERN "*.h"
    +  PATTERN "*.td"
    +  PATTERN "*.inc"
       PATTERN ".svn" EXCLUDE
    -  PATTERN "*.cmake" EXCLUDE
    -  PATTERN "*.in" EXCLUDE
    -  PATTERN "*.tmp" EXCLUDE
       )
     
    -install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include
    -  DESTINATION .
    +install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/
    +  DESTINATION include
    +  FILES_MATCHING
    +  PATTERN "*.def"
    +  PATTERN "*.h"
    +  PATTERN "*.gen"
    +  PATTERN "*.inc"
    +  # Exclude include/llvm/CMakeFiles/intrinsics_gen.dir, matched by "*.def"
    +  PATTERN "CMakeFiles" EXCLUDE
    +  PATTERN ".svn" EXCLUDE
       )
     
     # TODO: make and install documentation.
    
    Modified: vendor/llvm/dist/Makefile
    ==============================================================================
    --- vendor/llvm/dist/Makefile	Wed Nov  4 14:19:23 2009	(r198891)
    +++ vendor/llvm/dist/Makefile	Wed Nov  4 14:58:56 2009	(r198892)
    @@ -24,7 +24,8 @@ LEVEL := .
     # "llvmCore", then this is an "Apple-style" build; search for
     # "Apple-style" in the comments for more info.  Anything else is a
     # normal build.
    -ifneq ($(RC_ProjectName),llvmCore)  # Normal build (not "Apple-style").
    +ifneq ($(findstring llvmCore, $(RC_ProjectName)),llvmCore)  # Normal build (not "Apple-style").
    +
     ifeq ($(BUILD_DIRS_ONLY),1)
       DIRS := lib/System lib/Support utils
       OPTIONAL_DIRS :=
    @@ -94,6 +95,8 @@ cross-compile-build-tools:
     	$(Verb) if [ ! -f BuildTools/Makefile ]; then \
               $(MKDIR) BuildTools; \
     	  cd BuildTools ; \
    +	  unset CFLAGS ; \
    +	  unset CXXFLAGS ; \
     	  $(PROJ_SRC_DIR)/configure --build=$(BUILD_TRIPLE) \
     		--host=$(BUILD_TRIPLE) --target=$(BUILD_TRIPLE); \
     	  cd .. ; \
    @@ -133,8 +136,7 @@ dist-hook::
     	$(Echo) Eliminating files constructed by configure
     	$(Verb) $(RM) -f \
     	  $(TopDistDir)/include/llvm/Config/config.h  \
    -	  $(TopDistDir)/include/llvm/Support/DataTypes.h  \
    -	  $(TopDistDir)/include/llvm/Support/ThreadSupport.h
    +	  $(TopDistDir)/include/llvm/System/DataTypes.h
     
     clang-only: all
     tools-only: all
    @@ -150,7 +152,7 @@ FilesToConfig := \
       include/llvm/Config/config.h \
       include/llvm/Config/Targets.def \
     	include/llvm/Config/AsmPrinters.def \
    -  include/llvm/Support/DataTypes.h \
    +  include/llvm/System/DataTypes.h \
     	tools/llvmc/plugins/Base/Base.td
     FilesToConfigPATH  := $(addprefix $(LLVM_OBJ_ROOT)/,$(FilesToConfig))
     
    
    Modified: vendor/llvm/dist/Makefile.config.in
    ==============================================================================
    --- vendor/llvm/dist/Makefile.config.in	Wed Nov  4 14:19:23 2009	(r198891)
    +++ vendor/llvm/dist/Makefile.config.in	Wed Nov  4 14:58:56 2009	(r198892)
    @@ -250,6 +250,9 @@ RDYNAMIC := @RDYNAMIC@
     #DEBUG_SYMBOLS = 1
     @DEBUG_SYMBOLS@
     
    +# The compiler flags to use for optimized builds.
    +OPTIMIZE_OPTION := @OPTIMIZE_OPTION@
    +
     # When ENABLE_PROFILING is enabled, the llvm source base is built with profile
     # information to allow gprof to be used to get execution frequencies.
     #ENABLE_PROFILING = 1
    @@ -320,3 +323,9 @@ ENABLE_LLVMC_DYNAMIC = 0
     # support (via the -load option).
     ENABLE_LLVMC_DYNAMIC_PLUGINS = 1
     #@ENABLE_LLVMC_DYNAMIC_PLUGINS@
    +
    +# Optional flags supported by the compiler
    +# -Wno-missing-field-initializers
    +NO_MISSING_FIELD_INITIALIZERS = @NO_MISSING_FIELD_INITIALIZERS@
    +# -Wno-variadic-macros
    +NO_VARIADIC_MACROS = @NO_VARIADIC_MACROS@
    
    Modified: vendor/llvm/dist/Makefile.rules
    ==============================================================================
    --- vendor/llvm/dist/Makefile.rules	Wed Nov  4 14:19:23 2009	(r198891)
    +++ vendor/llvm/dist/Makefile.rules	Wed Nov  4 14:58:56 2009	(r198892)
    @@ -312,16 +312,6 @@ endif
     #--------------------------------------------------------------------
     
     CPP.Defines :=
    -# OPTIMIZE_OPTION - The optimization level option we want to build LLVM with
    -# this can be overridden on the make command line.
    -ifndef OPTIMIZE_OPTION
    -  ifneq ($(HOST_OS),MingW)
    -    OPTIMIZE_OPTION := -O3
    -  else
    -    OPTIMIZE_OPTION := -O2
    -  endif
    -endif
    -
     ifeq ($(ENABLE_OPTIMIZED),1)
       BuildMode := Release
       # Don't use -fomit-frame-pointer on Darwin or FreeBSD.
    @@ -566,6 +556,8 @@ endif
     ifeq ($(TARGET_OS),Darwin)
       ifneq ($(ARCH),ARM)
         TargetCommonOpts += -mmacosx-version-min=$(DARWIN_VERSION)
    +  else
    +    TargetCommonOpts += -marm
       endif
     endif
     
    @@ -1238,7 +1230,7 @@ endif
     endif
     
     ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux NetBSD FreeBSD))
    -LD.Flags += -Wl,--version-script=$(LLVM_SRC_ROOT)/autoconf/ExportMap.map
    +  LD.Flags += -Wl,--version-script=$(LLVM_SRC_ROOT)/autoconf/ExportMap.map
     endif
     endif
     
    
    Modified: vendor/llvm/dist/autoconf/configure.ac
    ==============================================================================
    --- vendor/llvm/dist/autoconf/configure.ac	Wed Nov  4 14:19:23 2009	(r198891)
    +++ vendor/llvm/dist/autoconf/configure.ac	Wed Nov  4 14:58:56 2009	(r198892)
    @@ -607,6 +607,23 @@ if test -n "$LLVMGXX" && test -z "$LLVMG
        AC_MSG_ERROR([Invalid llvm-gcc. Use --with-llvmgcc when --with-llvmgxx is used]);
     fi
     
    +dnl Override the option to use for optimized builds.
    +AC_ARG_WITH(optimize-option,
    +  AS_HELP_STRING([--with-optimize-option],
    +                 [Select the compiler options to use for optimized builds]),,
    +                 withval=default)
    +AC_MSG_CHECKING([optimization flags])
    +case "$withval" in
    +  default)
    +    case "$llvm_cv_os_type" in
    +    MingW) optimize_option=-O3 ;;
    +    *)     optimize_option=-O2 ;;
    +    esac ;;
    +  *) optimize_option="$withval" ;;
    +esac
    +AC_SUBST(OPTIMIZE_OPTION,$optimize_option)
    +AC_MSG_RESULT([$optimize_option])
    +
     dnl Specify extra build options
     AC_ARG_WITH(extra-options,
       AS_HELP_STRING([--with-extra-options],
    @@ -943,6 +960,12 @@ fi
     dnl Tool compatibility is okay if we make it here.
     AC_MSG_RESULT([ok])
     
    +dnl Check optional compiler flags. 
    +AC_MSG_CHECKING([optional compiler flags])
    +CXX_FLAG_CHECK(NO_VARIADIC_MACROS, [-Wno-variadic-macros])
    +CXX_FLAG_CHECK(NO_MISSING_FIELD_INITIALIZERS, [-Wno-missing-field-initializers])
    +AC_MSG_RESULT([$NO_VARIADIC_MACROS $NO_MISSING_FIELD_INITIALIZERS])
    +
     dnl===-----------------------------------------------------------------------===
     dnl===
     dnl=== SECTION 5: Check for libraries
    @@ -1349,7 +1372,7 @@ AC_CONFIG_HEADERS([include/llvm/Config/c
     AC_CONFIG_FILES([include/llvm/Config/Targets.def])
     AC_CONFIG_FILES([include/llvm/Config/AsmPrinters.def])
     AC_CONFIG_FILES([include/llvm/Config/AsmParsers.def])
    -AC_CONFIG_HEADERS([include/llvm/Support/DataTypes.h])
    +AC_CONFIG_HEADERS([include/llvm/System/DataTypes.h])
     
     dnl Configure the makefile's configuration data
     AC_CONFIG_FILES([Makefile.config])
    
    Modified: vendor/llvm/dist/cmake/config-ix.cmake
    ==============================================================================
    --- vendor/llvm/dist/cmake/config-ix.cmake	Wed Nov  4 14:19:23 2009	(r198891)
    +++ vendor/llvm/dist/cmake/config-ix.cmake	Wed Nov  4 14:58:56 2009	(r198892)
    @@ -83,9 +83,9 @@ check_symbol_exists(floorf math.h HAVE_F
     check_symbol_exists(mallinfo malloc.h HAVE_MALLINFO)
     check_symbol_exists(malloc_zone_statistics malloc/malloc.h
                         HAVE_MALLOC_ZONE_STATISTICS)
    -check_symbol_exists(mkdtemp unistd.h HAVE_MKDTEMP)
    -check_symbol_exists(mkstemp unistd.h HAVE_MKSTEMP)
    -check_symbol_exists(mktemp unistd.h HAVE_MKTEMP)
    +check_symbol_exists(mkdtemp "stdlib.h;unistd.h" HAVE_MKDTEMP)
    +check_symbol_exists(mkstemp "stdlib.h;unistd.h" HAVE_MKSTEMP)
    +check_symbol_exists(mktemp "stdlib.h;unistd.h" HAVE_MKTEMP)
     check_symbol_exists(pthread_mutex_lock pthread.h HAVE_PTHREAD_MUTEX_LOCK)
     check_symbol_exists(sbrk unistd.h HAVE_SBRK)
     check_symbol_exists(strtoll stdlib.h HAVE_STRTOLL)
    @@ -229,7 +229,7 @@ configure_file(
       )
     
     configure_file(
    -  ${LLVM_MAIN_INCLUDE_DIR}/llvm/Support/DataTypes.h.cmake
    -  ${LLVM_BINARY_DIR}/include/llvm/Support/DataTypes.h
    +  ${LLVM_MAIN_INCLUDE_DIR}/llvm/System/DataTypes.h.cmake
    +  ${LLVM_BINARY_DIR}/include/llvm/System/DataTypes.h
       )
     
    
    Modified: vendor/llvm/dist/cmake/modules/LLVMLibDeps.cmake
    ==============================================================================
    --- vendor/llvm/dist/cmake/modules/LLVMLibDeps.cmake	Wed Nov  4 14:19:23 2009	(r198891)
    +++ vendor/llvm/dist/cmake/modules/LLVMLibDeps.cmake	Wed Nov  4 14:58:56 2009	(r198892)
    @@ -23,7 +23,6 @@ set(MSVC_LIB_DEPS_LLVMCodeGen LLVMAnalys
     set(MSVC_LIB_DEPS_LLVMCore LLVMSupport LLVMSystem)
     set(MSVC_LIB_DEPS_LLVMCppBackend LLVMCore LLVMCppBackendInfo LLVMSupport LLVMSystem LLVMTarget)
     set(MSVC_LIB_DEPS_LLVMCppBackendInfo LLVMSupport)
    -set(MSVC_LIB_DEPS_LLVMDebugger LLVMAnalysis LLVMBitReader LLVMCore LLVMSupport LLVMSystem)
     set(MSVC_LIB_DEPS_LLVMExecutionEngine LLVMCore LLVMSupport LLVMSystem LLVMTarget)
     set(MSVC_LIB_DEPS_LLVMHello LLVMCore LLVMSupport LLVMSystem)
     set(MSVC_LIB_DEPS_LLVMInstrumentation LLVMAnalysis LLVMCore LLVMScalarOpts LLVMSupport LLVMSystem LLVMTransformUtils)
    
    Modified: vendor/llvm/dist/cmake/modules/LLVMProcessSources.cmake
    ==============================================================================
    --- vendor/llvm/dist/cmake/modules/LLVMProcessSources.cmake	Wed Nov  4 14:19:23 2009	(r198891)
    +++ vendor/llvm/dist/cmake/modules/LLVMProcessSources.cmake	Wed Nov  4 14:58:56 2009	(r198892)
    @@ -22,6 +22,7 @@ endmacro(add_header_files)
     
     function(llvm_process_sources OUT_VAR)
       set( sources ${ARGN} )
    +  llvm_check_source_file_list( ${sources} )
       # Create file dependencies on the tablegenned files, if any.  Seems
       # that this is not strictly needed, as dependencies of the .cpp
       # sources on the tablegenned .inc files are detected and handled,
    @@ -37,3 +38,17 @@ function(llvm_process_sources OUT_VAR)
       endif()
       set( ${OUT_VAR} ${sources} PARENT_SCOPE )
     endfunction(llvm_process_sources)
    +
    +
    +function(llvm_check_source_file_list)
    +  set(listed ${ARGN})
    +  file(GLOB globbed *.cpp)
    +  foreach(g ${globbed})
    +    get_filename_component(fn ${g} NAME)
    +    list(FIND listed ${fn} idx)
    +    if( idx LESS 0 )
    +      message(SEND_ERROR "Found unknown source file ${g}
    +Please update ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt\n")
    +    endif()
    +  endforeach()
    +endfunction(llvm_check_source_file_list)
    
    Modified: vendor/llvm/dist/configure
    ==============================================================================
    --- vendor/llvm/dist/configure	Wed Nov  4 14:19:23 2009	(r198891)
    +++ vendor/llvm/dist/configure	Wed Nov  4 14:58:56 2009	(r198892)
    @@ -848,6 +848,7 @@ LLVM_ENUM_TARGETS
     LLVM_ENUM_ASM_PRINTERS
     LLVM_ENUM_ASM_PARSERS
     ENABLE_CBE_PRINTF_A
    +OPTIMIZE_OPTION
     EXTRA_OPTIONS
     BINUTILS_INCDIR
     ENABLE_LLVMC_DYNAMIC
    @@ -913,6 +914,8 @@ LLVMGCCCOMMAND
     LLVMGXXCOMMAND
     LLVMGCC
     LLVMGXX
    +NO_VARIADIC_MACROS
    +NO_MISSING_FIELD_INITIALIZERS
     USE_UDIS86
     USE_OPROFILE
     HAVE_PTHREAD
    @@ -1595,6 +1598,8 @@ Optional Packages:
                               searches PATH)
       --with-llvmgxx          Specify location of llvm-g++ driver (default
                               searches PATH)
    +  --with-optimize-option  Select the compiler options to use for optimized
    +                          builds
       --with-extra-options    Specify additional options to compile LLVM with
       --with-ocaml-libdir     Specify install location for ocaml bindings (default
                               is stdlib)
    @@ -5190,6 +5195,29 @@ echo "$as_me: error: Invalid llvm-gcc. U
     fi
     
     
    +# Check whether --with-optimize-option was given.
    +if test "${with_optimize_option+set}" = set; then
    +  withval=$with_optimize_option;
    +else
    +  withval=default
    +fi
    +
    +{ echo "$as_me:$LINENO: checking optimization flags" >&5
    +echo $ECHO_N "checking optimization flags... $ECHO_C" >&6; }
    +case "$withval" in
    +  default)
    +    case "$llvm_cv_os_type" in
    +    MingW) optimize_option=-O3 ;;
    +    *)     optimize_option=-O2 ;;
    +    esac ;;
    +  *) optimize_option="$withval" ;;
    +esac
    +OPTIMIZE_OPTION=$optimize_option
    +
    +{ echo "$as_me:$LINENO: result: $optimize_option" >&5
    +echo "${ECHO_T}$optimize_option" >&6; }
    +
    +
     # Check whether --with-extra-options was given.
     if test "${with_extra_options+set}" = set; then
       withval=$with_extra_options;
    @@ -11008,7 +11036,7 @@ else
       lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
       lt_status=$lt_dlunknown
       cat > conftest.$ac_ext < conftest.$ac_ext
    +  echo '#line 13183 "configure"' > conftest.$ac_ext
       if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
       (eval $ac_compile) 2>&5
       ac_status=$?
    @@ -14870,11 +14898,11 @@ else
        -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
        -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
        -e 's:$: $lt_compiler_flag:'`
    -   (eval echo "\"\$as_me:14873: $lt_compile\"" >&5)
    +   (eval echo "\"\$as_me:14901: $lt_compile\"" >&5)
        (eval "$lt_compile" 2>conftest.err)
        ac_status=$?
        cat conftest.err >&5
    -   echo "$as_me:14877: \$? = $ac_status" >&5
    +   echo "$as_me:14905: \$? = $ac_status" >&5
        if (exit $ac_status) && test -s "$ac_outfile"; then
          # The compiler can only warn and ignore the option if not recognized
          # So say no if there are warnings other than the usual output.
    @@ -15138,11 +15166,11 @@ else
        -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
        -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
        -e 's:$: $lt_compiler_flag:'`
    -   (eval echo "\"\$as_me:15141: $lt_compile\"" >&5)
    +   (eval echo "\"\$as_me:15169: $lt_compile\"" >&5)
        (eval "$lt_compile" 2>conftest.err)
        ac_status=$?
        cat conftest.err >&5
    -   echo "$as_me:15145: \$? = $ac_status" >&5
    +   echo "$as_me:15173: \$? = $ac_status" >&5
        if (exit $ac_status) && test -s "$ac_outfile"; then
          # The compiler can only warn and ignore the option if not recognized
          # So say no if there are warnings other than the usual output.
    @@ -15242,11 +15270,11 @@ else
        -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
        -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
        -e 's:$: $lt_compiler_flag:'`
    -   (eval echo "\"\$as_me:15245: $lt_compile\"" >&5)
    +   (eval echo "\"\$as_me:15273: $lt_compile\"" >&5)
        (eval "$lt_compile" 2>out/conftest.err)
        ac_status=$?
        cat out/conftest.err >&5
    -   echo "$as_me:15249: \$? = $ac_status" >&5
    +   echo "$as_me:15277: \$? = $ac_status" >&5
        if (exit $ac_status) && test -s out/conftest2.$ac_objext
        then
          # The compiler can only warn and ignore the option if not recognized
    @@ -17694,7 +17722,7 @@ else
       lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
       lt_status=$lt_dlunknown
       cat > conftest.$ac_ext < conftest.$ac_ext <&5)
    +   (eval echo "\"\$as_me:20193: $lt_compile\"" >&5)
        (eval "$lt_compile" 2>conftest.err)
        ac_status=$?
        cat conftest.err >&5
    -   echo "$as_me:20169: \$? = $ac_status" >&5
    +   echo "$as_me:20197: \$? = $ac_status" >&5
        if (exit $ac_status) && test -s "$ac_outfile"; then
          # The compiler can only warn and ignore the option if not recognized
          # So say no if there are warnings other than the usual output.
    @@ -20266,11 +20294,11 @@ else
        -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
        -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
        -e 's:$: $lt_compiler_flag:'`
    -   (eval echo "\"\$as_me:20269: $lt_compile\"" >&5)
    +   (eval echo "\"\$as_me:20297: $lt_compile\"" >&5)
        (eval "$lt_compile" 2>out/conftest.err)
        ac_status=$?
        cat out/conftest.err >&5
    -   echo "$as_me:20273: \$? = $ac_status" >&5
    +   echo "$as_me:20301: \$? = $ac_status" >&5
        if (exit $ac_status) && test -s out/conftest2.$ac_objext
        then
          # The compiler can only warn and ignore the option if not recognized
    @@ -21836,11 +21864,11 @@ else
        -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
        -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
        -e 's:$: $lt_compiler_flag:'`
    -   (eval echo "\"\$as_me:21839: $lt_compile\"" >&5)
    +   (eval echo "\"\$as_me:21867: $lt_compile\"" >&5)
        (eval "$lt_compile" 2>conftest.err)
        ac_status=$?
        cat conftest.err >&5
    -   echo "$as_me:21843: \$? = $ac_status" >&5
    +   echo "$as_me:21871: \$? = $ac_status" >&5
        if (exit $ac_status) && test -s "$ac_outfile"; then
          # The compiler can only warn and ignore the option if not recognized
          # So say no if there are warnings other than the usual output.
    @@ -21940,11 +21968,11 @@ else
        -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
        -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
        -e 's:$: $lt_compiler_flag:'`
    -   (eval echo "\"\$as_me:21943: $lt_compile\"" >&5)
    +   (eval echo "\"\$as_me:21971: $lt_compile\"" >&5)
        (eval "$lt_compile" 2>out/conftest.err)
        ac_status=$?
        cat out/conftest.err >&5
    -   echo "$as_me:21947: \$? = $ac_status" >&5
    +   echo "$as_me:21975: \$? = $ac_status" >&5
        if (exit $ac_status) && test -s out/conftest2.$ac_objext
        then
          # The compiler can only warn and ignore the option if not recognized
    @@ -24175,11 +24203,11 @@ else
        -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
        -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
        -e 's:$: $lt_compiler_flag:'`
    -   (eval echo "\"\$as_me:24178: $lt_compile\"" >&5)
    +   (eval echo "\"\$as_me:24206: $lt_compile\"" >&5)
        (eval "$lt_compile" 2>conftest.err)
        ac_status=$?
        cat conftest.err >&5
    -   echo "$as_me:24182: \$? = $ac_status" >&5
    +   echo "$as_me:24210: \$? = $ac_status" >&5
        if (exit $ac_status) && test -s "$ac_outfile"; then
          # The compiler can only warn and ignore the option if not recognized
          # So say no if there are warnings other than the usual output.
    @@ -24443,11 +24471,11 @@ else
        -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
        -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
        -e 's:$: $lt_compiler_flag:'`
    -   (eval echo "\"\$as_me:24446: $lt_compile\"" >&5)
    +   (eval echo "\"\$as_me:24474: $lt_compile\"" >&5)
        (eval "$lt_compile" 2>conftest.err)
        ac_status=$?
        cat conftest.err >&5
    -   echo "$as_me:24450: \$? = $ac_status" >&5
    +   echo "$as_me:24478: \$? = $ac_status" >&5
        if (exit $ac_status) && test -s "$ac_outfile"; then
          # The compiler can only warn and ignore the option if not recognized
          # So say no if there are warnings other than the usual output.
    @@ -24547,11 +24575,11 @@ else
        -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
        -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
        -e 's:$: $lt_compiler_flag:'`
    -   (eval echo "\"\$as_me:24550: $lt_compile\"" >&5)
    +   (eval echo "\"\$as_me:24578: $lt_compile\"" >&5)
        (eval "$lt_compile" 2>out/conftest.err)
        ac_status=$?
        cat out/conftest.err >&5
    -   echo "$as_me:24554: \$? = $ac_status" >&5
    +   echo "$as_me:24582: \$? = $ac_status" >&5
        if (exit $ac_status) && test -s out/conftest2.$ac_objext
        then
          # The compiler can only warn and ignore the option if not recognized
    @@ -27459,6 +27487,15 @@ fi
     { echo "$as_me:$LINENO: result: ok" >&5
     echo "${ECHO_T}ok" >&6; }
     
    +{ echo "$as_me:$LINENO: checking optional compiler flags" >&5
    +echo $ECHO_N "checking optional compiler flags... $ECHO_C" >&6; }
    +NO_VARIADIC_MACROS=`$CXX -Wno-variadic-macros -fsyntax-only -xc /dev/null 2>/dev/null && echo -Wno-variadic-macros`
    +
    +NO_MISSING_FIELD_INITIALIZERS=`$CXX -Wno-missing-field-initializers -fsyntax-only -xc /dev/null 2>/dev/null && echo -Wno-missing-field-initializers`
    +
    +{ echo "$as_me:$LINENO: result: $NO_VARIADIC_MACROS $NO_MISSING_FIELD_INITIALIZERS" >&5
    +echo "${ECHO_T}$NO_VARIADIC_MACROS $NO_MISSING_FIELD_INITIALIZERS" >&6; }
    +
     
     
     { echo "$as_me:$LINENO: checking for sin in -lm" >&5
    @@ -35260,7 +35297,7 @@ ac_config_files="$ac_config_files includ
     
     ac_config_files="$ac_config_files include/llvm/Config/AsmParsers.def"
     
    -ac_config_headers="$ac_config_headers include/llvm/Support/DataTypes.h"
    +ac_config_headers="$ac_config_headers include/llvm/System/DataTypes.h"
     
     
     ac_config_files="$ac_config_files Makefile.config"
    @@ -35887,7 +35924,7 @@ do
         "include/llvm/Config/Targets.def") CONFIG_FILES="$CONFIG_FILES include/llvm/Config/Targets.def" ;;
         "include/llvm/Config/AsmPrinters.def") CONFIG_FILES="$CONFIG_FILES include/llvm/Config/AsmPrinters.def" ;;
         "include/llvm/Config/AsmParsers.def") CONFIG_FILES="$CONFIG_FILES include/llvm/Config/AsmParsers.def" ;;
    -    "include/llvm/Support/DataTypes.h") CONFIG_HEADERS="$CONFIG_HEADERS include/llvm/Support/DataTypes.h" ;;
    +    "include/llvm/System/DataTypes.h") CONFIG_HEADERS="$CONFIG_HEADERS include/llvm/System/DataTypes.h" ;;
         "Makefile.config") CONFIG_FILES="$CONFIG_FILES Makefile.config" ;;
         "llvm.spec") CONFIG_FILES="$CONFIG_FILES llvm.spec" ;;
         "docs/doxygen.cfg") CONFIG_FILES="$CONFIG_FILES docs/doxygen.cfg" ;;
    @@ -36061,11 +36098,11 @@ LLVM_ENUM_TARGETS!$LLVM_ENUM_TARGETS$ac_
     LLVM_ENUM_ASM_PRINTERS!$LLVM_ENUM_ASM_PRINTERS$ac_delim
     LLVM_ENUM_ASM_PARSERS!$LLVM_ENUM_ASM_PARSERS$ac_delim
     ENABLE_CBE_PRINTF_A!$ENABLE_CBE_PRINTF_A$ac_delim
    +OPTIMIZE_OPTION!$OPTIMIZE_OPTION$ac_delim
     EXTRA_OPTIONS!$EXTRA_OPTIONS$ac_delim
     BINUTILS_INCDIR!$BINUTILS_INCDIR$ac_delim
     ENABLE_LLVMC_DYNAMIC!$ENABLE_LLVMC_DYNAMIC$ac_delim
     ENABLE_LLVMC_DYNAMIC_PLUGINS!$ENABLE_LLVMC_DYNAMIC_PLUGINS$ac_delim
    -CXX!$CXX$ac_delim
     _ACEOF
     
       if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
    @@ -36107,6 +36144,7 @@ _ACEOF
     ac_delim='%!_!# '
     for ac_last_try in false false false false false :; do
       cat >conf$$subs.sed <<_ACEOF
    +CXX!$CXX$ac_delim
     CXXFLAGS!$CXXFLAGS$ac_delim
     ac_ct_CXX!$ac_ct_CXX$ac_delim
     NM!$NM$ac_delim
    @@ -36167,6 +36205,8 @@ LLVMGCCCOMMAND!$LLVMGCCCOMMAND$ac_delim
     LLVMGXXCOMMAND!$LLVMGXXCOMMAND$ac_delim
     LLVMGCC!$LLVMGCC$ac_delim
     LLVMGXX!$LLVMGXX$ac_delim
    +NO_VARIADIC_MACROS!$NO_VARIADIC_MACROS$ac_delim
    +NO_MISSING_FIELD_INITIALIZERS!$NO_MISSING_FIELD_INITIALIZERS$ac_delim
     USE_UDIS86!$USE_UDIS86$ac_delim
     USE_OPROFILE!$USE_OPROFILE$ac_delim
     HAVE_PTHREAD!$HAVE_PTHREAD$ac_delim
    @@ -36201,7 +36241,7 @@ LIBOBJS!$LIBOBJS$ac_delim
     LTLIBOBJS!$LTLIBOBJS$ac_delim
     _ACEOF
     
    -  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 92; then
    +  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 95; then
         break
       elif $ac_last_try; then
         { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
    
    Modified: vendor/llvm/dist/docs/BitCodeFormat.html
    ==============================================================================
    --- vendor/llvm/dist/docs/BitCodeFormat.html	Wed Nov  4 14:19:23 2009	(r198891)
    +++ vendor/llvm/dist/docs/BitCodeFormat.html	Wed Nov  4 14:58:56 2009	(r198892)
    @@ -27,6 +27,15 @@
       
  • LLVM IR Encoding
    1. Basics
    2. +
    3. MODULE_BLOCK Contents
    4. +
    5. PARAMATTR_BLOCK Contents
    6. +
    7. TYPE_BLOCK Contents
    8. +
    9. CONSTANTS_BLOCK Contents
    10. +
    11. FUNCTION_BLOCK Contents
    12. +
    13. TYPE_SYMTAB_BLOCK Contents
    14. +
    15. VALUE_SYMTAB_BLOCK Contents
    16. +
    17. METADATA_BLOCK Contents
    18. +
    19. METADATA_ATTACHMENT Contents
  • @@ -220,7 +229,7 @@ A bitstream is a sequential series of

    @@ -258,7 +267,7 @@ application specific. Nested blocks capt encoded in it, and various properties are associated with blocks as the file is parsed. Block definitions allow the reader to efficiently skip blocks in constant time if the reader wants a summary of blocks, or if it wants to -efficiently skip data they do not understand. The LLVM IR reader uses this +efficiently skip data it does not understand. The LLVM IR reader uses this mechanism to skip function bodies, lazily reading them on demand.

    @@ -268,7 +277,8 @@ block. In particular, each block mainta

      -
    1. A current abbrev id width. This value starts at 2, and is set every time a +
    2. A current abbrev id width. This value starts at 2 at the beginning of + the stream, and is set every time a block record is entered. The block entry specifies the abbrev id width for the body of the block.
    3. @@ -335,13 +345,14 @@ an even multiple of 32-bits.

      -Data records consist of a record code and a number of (up to) 64-bit integer -values. The interpretation of the code and values is application specific and -there are multiple different ways to encode a record (with an unabbrev record or -with an abbreviation). In the LLVM IR format, for example, there is a record +Data records consist of a record code and a number of (up to) 64-bit +integer values. The interpretation of the code and values is +application specific and may vary between different block types. +Records can be encoded either using an unabbrev record, or with an +abbreviation. In the LLVM IR format, for example, there is a record which encodes the target triple of a module. The code is -MODULE_CODE_TRIPLE, and the values of the record are the ASCII codes -for the characters in the string. +MODULE_CODE_TRIPLE, and the values of the record are the +ASCII codes for the characters in the string.

      @@ -358,7 +369,7 @@ Encoding

      An UNABBREV_RECORD provides a default fallback encoding, which is both completely general and extremely inefficient. It can describe an arbitrary -record by emitting the code and operands as vbrs. +record by emitting the code and operands as VBRs.

      @@ -391,6 +402,11 @@ allows the files to be completely self d abbreviations is defined below.

      +

      The record code, which is the first field of an abbreviated record, +may be encoded in the abbreviation definition (as a literal +operand) or supplied in the abbreviated record (as a Fixed or VBR +operand value).

      + @@ -409,8 +425,9 @@ emitted.

      Abbreviations can be determined dynamically per client, per file. Because the abbreviations are stored in the bitstream itself, different streams of the same -format can contain different sets of abbreviations if the specific stream does -not need it. As a concrete example, LLVM IR files usually emit an abbreviation +format can contain different sets of abbreviations according to the needs +of the specific stream. +As a concrete example, LLVM IR files usually emit an abbreviation for binary operators. If a specific LLVM module contained no or few binary operators, the abbreviation does not need to be emitted.

      @@ -431,7 +448,8 @@ defined abbreviations in the scope of th inside this immediate block — it is not visible in subblocks or enclosing blocks. Abbreviations are implicitly assigned IDs sequentially starting from 4 (the first application-defined abbreviation ID). Any abbreviations defined in a -BLOCKINFO record receive IDs first, in order, followed by any +BLOCKINFO record for the particular block type +receive IDs first, in order, followed by any abbreviations defined within the block itself. Abbreviated data records reference this ID to indicate what abbreviation they are invoking.

      @@ -461,31 +479,32 @@ emitted as their code, followed by the e

      The possible operand encodings are:

      -
        -
      1. Fixed: The field should be emitted as +
          +
        • Fixed (code 1): The field should be emitted as a fixed-width value, whose width is specified by the operand's extra data.
        • -
        • VBR: The field should be emitted as +
        • VBR (code 2): The field should be emitted as a variable-width value, whose width is specified by the operand's extra data.
        • -
        • Array: This field is an array of values. The array operand - has no extra data, but expects another operand to follow it which indicates +
        • Array (code 3): This field is an array of values. The array operand + has no extra data, but expects another operand to follow it, indicating the element type of the array. When reading an array in an abbreviated record, the first integer is a vbr6 that indicates the array length, followed by the encoded elements of the array. An array may only occur as the last operand of an abbreviation (except for the one final operand that gives the array's type).
        • -
        • Char6: This field should be emitted as +
        • Char6 (code 4): This field should be emitted as a char6-encoded value. This operand type takes no - extra data.
        • -
        • Blob: This field is emitted as a vbr6, followed by padding to a + extra data. Char6 encoding is normally used as an array element type. +
        • +
        • Blob (code 5): This field is emitted as a vbr6, followed by padding to a 32-bit boundary (for alignment) and an array of 8-bit objects. The array of bytes is further followed by tail padding to ensure that its total length is a multiple of 4 bytes. This makes it very efficient for the reader to decode the data without having to make a copy of it: it can use a pointer to the data in the mapped in file and poke directly at it. A blob may only occur as the last operand of an abbreviation.
        • -
      +

      For example, target triples in LLVM modules are encoded as a record of the @@ -517,7 +536,7 @@ as:

      1. The first value, 4, is the abbreviation ID for this abbreviation.
      2. -
      3. The second value, 2, is the code for TRIPLE in LLVM IR files.
      4. +
      5. The second value, 2, is the record code for TRIPLE records within LLVM IR file MODULE_BLOCK blocks.
      6. The third value, 4, is the length of the array.
      7. The rest of the values are the char6 encoded values for "abcd".
      8. @@ -541,7 +560,7 @@ used for any other string value.

        In addition to the basic block structure and record encodings, the bitstream -also defines specific builtin block types. These block types specify how the +also defines specific built-in block types. These block types specify how the stream is to be decoded or other metadata. In the future, new standard blocks may be added. Block IDs 0-7 are reserved for standard blocks.

        @@ -569,7 +588,7 @@ blocks. The currently specified records

        -The SETBID record indicates which block ID is being +The SETBID record (code 1) indicates which block ID is being described. SETBID records can occur multiple times throughout the block to change which block ID is being described. There must be a SETBID record prior to any other records. @@ -584,13 +603,13 @@ in BLOCKINFO blocks receive abb in DEFINE_ABBREV.

        -

        The BLOCKNAME can optionally occur in this block. The elements of -the record are the bytes for the string name of the block. llvm-bcanalyzer uses +

        The BLOCKNAME record (code 2) can optionally occur in this block. The elements of +the record are the bytes of the string name of the block. llvm-bcanalyzer can use this to dump out bitcode files symbolically.

        -

        The SETRECORDNAME record can optionally occur in this block. The -first entry is a record ID number and the rest of the elements of the record are -the bytes for the string name of the record. llvm-bcanalyzer uses +

        The SETRECORDNAME record (code 3) can also optionally occur in this block. The +first operand value is a record ID number, and the rest of the elements of the record are +the bytes for the string name of the record. llvm-bcanalyzer can use this to dump out bitcode files symbolically.

        @@ -626,7 +645,7 @@ Each of the fields are 32-bit fields sto the rest of the bitcode file fields). The Magic number is always 0x0B17C0DE and the version is currently always 0. The Offset field is the offset in bytes to the start of the bitcode stream in the file, and -the Size field is a size in bytes of the stream. CPUType is a target-specific +the Size field is the size in bytes of the stream. CPUType is a target-specific value that can be used to encode the CPU of the target.

        @@ -681,26 +700,28 @@ When combined with the bitcode magic num

        -Variable Width Integers are an efficient way to -encode arbitrary sized unsigned values, but is an extremely inefficient way to -encode signed values (as signed values are otherwise treated as maximally large -unsigned values). +Variable Width Integer encoding is an efficient way to +encode arbitrary sized unsigned values, but is an extremely inefficient for +encoding signed values, as signed values are otherwise treated as maximally large +unsigned values.

        -As such, signed vbr values of a specific width are emitted as follows: +As such, signed VBR values of a specific width are emitted as follows:

          -
        • Positive values are emitted as vbrs of the specified width, but with their +
        • Positive values are emitted as VBRs of the specified width, but with their value shifted left by one.
        • -
        • Negative values are emitted as vbrs of the specified width, but the negated +
        • Negative values are emitted as VBRs of the specified width, but the negated value is shifted left by one, and the low bit is set.

        -With this encoding, small positive and small negative values can both be emitted -efficiently. +With this encoding, small positive and small negative values can both +be emitted efficiently. Signed VBR encoding is used in +CST_CODE_INTEGER and CST_CODE_WIDE_INTEGER records +within CONSTANTS_BLOCK blocks.

        @@ -716,21 +737,23 @@ LLVM IR is defined with the following bl

          -
        • 8 — MODULE_BLOCK — This is the top-level block that +
        • 8 — MODULE_BLOCK — This is the top-level block that contains the entire module, and describes a variety of per-module information.
        • -
        • 9 — PARAMATTR_BLOCK — This enumerates the parameter +
        • 9 — PARAMATTR_BLOCK — This enumerates the parameter attributes.
        • -
        • 10 — TYPE_BLOCK — This describes all of the types in +
        • 10 — TYPE_BLOCK — This describes all of the types in the module.
        • -
        • 11 — CONSTANTS_BLOCK — This describes constants for a +
        • 11 — CONSTANTS_BLOCK — This describes constants for a module or function.
        • -
        • 12 — FUNCTION_BLOCK — This describes a function +
        • 12 — FUNCTION_BLOCK — This describes a function body.
        • -
        • 13 — TYPE_SYMTAB_BLOCK — This describes the type symbol +
        • 13 — TYPE_SYMTAB_BLOCK — This describes the type symbol table.
        • -
        • 14 — VALUE_SYMTAB_BLOCK — This describes a value symbol +
        • 14 — VALUE_SYMTAB_BLOCK — This describes a value symbol table.
        • +
        • 15 — METADATA_BLOCK — This describes metadata items.
        • +
        • 16 — METADATA_ATTACHMENT — This contains records associating metadata with function instruction values.
        @@ -741,7 +764,387 @@ LLVM IR is defined with the following bl
        -

        +

        The MODULE_BLOCK block (id 8) is the top-level block for LLVM +bitcode files, and each bitcode file must contain exactly one. In +addition to records (described below) containing information +about the module, a MODULE_BLOCK block may contain the +following sub-blocks: +

        + + + +
        + + + + +
        + +

        [VERSION, version#]

        + +

        The VERSION record (code 1) contains a single value +indicating the format version. Only version 0 is supported at this +time.

        +
        + + + + +
        +

        [TRIPLE, ...string...]

        + +

        The TRIPLE record (code 2) contains a variable number of +values representing the bytes of the target triple +specification string.

        +
        + + + + +
        +

        [DATALAYOUT, ...string...]

        + +

        The DATALAYOUT record (code 3) contains a variable number of +values representing the bytes of the target datalayout +specification string.

        +
        + + + + +
        +

        [ASM, ...string...]

        + +

        The ASM record (code 4) contains a variable number of +values representing the bytes of module asm strings, with +individual assembly blocks separated by newline (ASCII 10) characters.

        +
        + + + + +
        +

        [SECTIONNAME, ...string...]

        + +

        The SECTIONNAME record (code 5) contains a variable number +of values representing the bytes of a single section name +string. There should be one SECTIONNAME record for each +section name referenced (e.g., in global variable or function +section attributes) within the module. These records can be +referenced by the 1-based index in the section fields of +GLOBALVAR or FUNCTION records.

        +
        + + + + +
        +

        [DEPLIB, ...string...]

        + +

        The DEPLIB record (code 6) contains a variable number of +values representing the bytes of a single dependent library name +string, one of the libraries mentioned in a deplibs +declaration. There should be one DEPLIB record for each +library name referenced.

        +
        + + + + +
        +

        [GLOBALVAR, pointer type, isconst, initid, linkage, alignment, section, visibility, threadlocal]

        + +

        The GLOBALVAR record (code 7) marks the declaration or +definition of a global variable. The operand fields are:

        + +
          +
        • pointer type: The type index of the pointer type used to point to +this global variable
        • + +
        • isconst: Non-zero if the variable is treated as constant within +the module, or zero if it is not
        • + +
        • initid: If non-zero, the value index of the initializer for this +variable, plus 1.
        • + +
        • linkage: An encoding of the linkage +type for this variable: +
            +
          • external: code 0
          • +
          • weak: code 1
          • +
          • appending: code 2
          • +
          • internal: code 3
          • +
          • linkonce: code 4
          • +
          • dllimport: code 5
          • +
          • dllexport: code 6
          • +
          • extern_weak: code 7
          • +
          • common: code 8
          • +
          • private: code 9
          • +
          • weak_odr: code 10
          • +
          • linkonce_odr: code 11
          • +
          • available_externally: code 12
          • +
          • linker_private: code 13
          • +
          +
        • + +
        • alignment: The logarithm base 2 of the variable's requested +alignment, plus 1
        • + +
        • section: If non-zero, the 1-based section index in the +table of MODULE_CODE_SECTIONNAME +entries.
        • + +
        • visibility: If present, an +encoding of the visibility of this variable: +
            +
          • default: code 0
          • +
          • hidden: code 1
          • +
          • protected: code 2
          • +
          +
        • + +
        • threadlocal: If present and non-zero, indicates that the variable +is thread_local
        • + +
        +
        + + + + +
        *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 15:04:33 2009 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 66D6D106566B; Wed, 4 Nov 2009 15:04:33 +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 510768FC0A; Wed, 4 Nov 2009 15:04: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 nA4F4XM6035438; Wed, 4 Nov 2009 15:04:33 GMT (envelope-from rdivacky@svn.freebsd.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4F4Xp3035424; Wed, 4 Nov 2009 15:04:33 GMT (envelope-from rdivacky@svn.freebsd.org) Message-Id: <200911041504.nA4F4Xp3035424@svn.freebsd.org> From: Roman Divacky Date: Wed, 4 Nov 2009 15:04:33 +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: r198893 - in vendor/clang/dist: . clang.xcodeproj docs docs/tools include/clang-c include/clang/AST include/clang/Analysis include/clang/Analysis/PathSensitive include/clang/Analysis/Pa... 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, 04 Nov 2009 15:04:33 -0000 Author: rdivacky Date: Wed Nov 4 15:04:32 2009 New Revision: 198893 URL: http://svn.freebsd.org/changeset/base/198893 Log: Update clang to r86025. Added: vendor/clang/dist/include/clang/AST/TemplateBase.h vendor/clang/dist/include/clang/Analysis/PathSensitive/BugType.h vendor/clang/dist/include/clang/Analysis/PathSensitive/Checkers/ vendor/clang/dist/include/clang/Analysis/PathSensitive/Checkers/AttrNonNullChecker.h vendor/clang/dist/include/clang/Analysis/PathSensitive/Checkers/BadCallChecker.h vendor/clang/dist/include/clang/Analysis/PathSensitive/Checkers/DereferenceChecker.h vendor/clang/dist/include/clang/Analysis/PathSensitive/Checkers/DivZeroChecker.h vendor/clang/dist/include/clang/Analysis/PathSensitive/Checkers/UndefinedArgChecker.h vendor/clang/dist/include/clang/Analysis/PathSensitive/Checkers/UndefinedAssignmentChecker.h vendor/clang/dist/include/clang/Analysis/PathSensitive/Checkers/VLASizeChecker.h vendor/clang/dist/include/clang/Frontend/DiagnosticOptions.h vendor/clang/dist/lib/AST/TemplateBase.cpp vendor/clang/dist/lib/Analysis/AttrNonNullChecker.cpp vendor/clang/dist/lib/Analysis/BadCallChecker.cpp vendor/clang/dist/lib/Analysis/DereferenceChecker.cpp vendor/clang/dist/lib/Analysis/DivZeroChecker.cpp vendor/clang/dist/lib/Analysis/NSAutoreleasePoolChecker.cpp vendor/clang/dist/lib/Analysis/NSErrorChecker.cpp vendor/clang/dist/lib/Analysis/UndefinedArgChecker.cpp vendor/clang/dist/lib/Analysis/UndefinedAssignmentChecker.cpp vendor/clang/dist/lib/Analysis/VLASizeChecker.cpp vendor/clang/dist/lib/CodeGen/CGException.cpp vendor/clang/dist/test/CXX/dcl.decl/dcl.meaning/dcl.ref/p5.cpp vendor/clang/dist/test/CXX/temp/temp.spec/temp.explicit/p10.cpp vendor/clang/dist/test/CXX/temp/temp.spec/temp.explicit/p12.cpp vendor/clang/dist/test/CXX/temp/temp.spec/temp.explicit/p5.cpp vendor/clang/dist/test/CXX/temp/temp.spec/temp.explicit/p6.cpp vendor/clang/dist/test/CXX/temp/temp.spec/temp.explicit/p7.cpp vendor/clang/dist/test/CXX/temp/temp.spec/temp.explicit/p8.cpp vendor/clang/dist/test/CXX/temp/temp.spec/temp.explicit/p9-linkage.cpp vendor/clang/dist/test/CXX/temp/temp.spec/temp.explicit/p9.cpp vendor/clang/dist/test/CodeCompletion/macros.c vendor/clang/dist/test/CodeGen/object-size.c vendor/clang/dist/test/CodeGenCXX/array-construction.cpp vendor/clang/dist/test/CodeGenCXX/ptr-to-member-function.cpp vendor/clang/dist/test/FixIt/fixit-pmem.cpp vendor/clang/dist/test/Parser/cxx-parse-member-pointer-op.cpp vendor/clang/dist/test/Preprocessor/has_include.c vendor/clang/dist/test/Preprocessor/init.c vendor/clang/dist/test/Preprocessor/macro_undef.c vendor/clang/dist/test/Preprocessor/stdint.c vendor/clang/dist/test/Sema/parentheses.c vendor/clang/dist/test/SemaCXX/ptrtomember-badcall.cpp vendor/clang/dist/test/SemaCXX/value-initialization.cpp vendor/clang/dist/test/SemaObjC/conditional-expr-6.m vendor/clang/dist/test/SemaObjC/property-category-4.m vendor/clang/dist/test/SemaTemplate/instantiate-non-type-template-parameter.cpp vendor/clang/dist/test/SemaTemplate/operator-function-id-template.cpp vendor/clang/dist/test/SemaTemplate/template-id-expr.cpp vendor/clang/dist/test/SemaTemplate/template-id-printing.cpp Deleted: vendor/clang/dist/lib/Analysis/CheckNSError.cpp Modified: vendor/clang/dist/CMakeLists.txt vendor/clang/dist/clang.xcodeproj/project.pbxproj vendor/clang/dist/docs/LanguageExtensions.html vendor/clang/dist/docs/tools/clang.pod vendor/clang/dist/include/clang-c/Index.h vendor/clang/dist/include/clang/AST/ASTContext.h vendor/clang/dist/include/clang/AST/CanonicalType.h vendor/clang/dist/include/clang/AST/Decl.h vendor/clang/dist/include/clang/AST/DeclGroup.h vendor/clang/dist/include/clang/AST/DeclNodes.def vendor/clang/dist/include/clang/AST/DeclObjC.h vendor/clang/dist/include/clang/AST/DeclTemplate.h vendor/clang/dist/include/clang/AST/Expr.h vendor/clang/dist/include/clang/AST/ExprCXX.h vendor/clang/dist/include/clang/AST/RecordLayout.h vendor/clang/dist/include/clang/AST/Redeclarable.h vendor/clang/dist/include/clang/AST/StmtIterator.h vendor/clang/dist/include/clang/AST/StmtNodes.def 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/Analysis/CallGraph.h vendor/clang/dist/include/clang/Analysis/PathSensitive/AnalysisContext.h vendor/clang/dist/include/clang/Analysis/PathSensitive/BugReporter.h vendor/clang/dist/include/clang/Analysis/PathSensitive/Checker.h vendor/clang/dist/include/clang/Analysis/PathSensitive/GRExprEngine.h vendor/clang/dist/include/clang/Analysis/PathSensitive/GRState.h vendor/clang/dist/include/clang/Analysis/PathSensitive/GRTransferFuncs.h vendor/clang/dist/include/clang/Analysis/PathSensitive/Store.h vendor/clang/dist/include/clang/Analysis/PathSensitive/SymbolManager.h vendor/clang/dist/include/clang/Analysis/ProgramPoint.h vendor/clang/dist/include/clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h vendor/clang/dist/include/clang/Basic/Builtins.def vendor/clang/dist/include/clang/Basic/DiagnosticCommonKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticDriverKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticFrontendKinds.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/OnDiskHashTable.h vendor/clang/dist/include/clang/Basic/OperatorKinds.h vendor/clang/dist/include/clang/Basic/PartialDiagnostic.h vendor/clang/dist/include/clang/Basic/SourceManager.h vendor/clang/dist/include/clang/Basic/TargetInfo.h vendor/clang/dist/include/clang/Driver/Options.def vendor/clang/dist/include/clang/Frontend/ASTUnit.h vendor/clang/dist/include/clang/Frontend/CompileOptions.h vendor/clang/dist/include/clang/Frontend/DeclXML.def vendor/clang/dist/include/clang/Frontend/InitHeaderSearch.h vendor/clang/dist/include/clang/Frontend/InitPreprocessor.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/Index/Utils.h vendor/clang/dist/include/clang/Lex/LiteralSupport.h vendor/clang/dist/include/clang/Lex/Preprocessor.h vendor/clang/dist/include/clang/Lex/Token.h vendor/clang/dist/include/clang/Parse/Action.h vendor/clang/dist/include/clang/Parse/DeclSpec.h vendor/clang/dist/include/clang/Parse/Parser.h vendor/clang/dist/include/clang/Sema/CodeCompleteConsumer.h vendor/clang/dist/lib/AST/ASTContext.cpp vendor/clang/dist/lib/AST/CMakeLists.txt 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/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/RecordLayoutBuilder.cpp vendor/clang/dist/lib/AST/RecordLayoutBuilder.h vendor/clang/dist/lib/AST/StmtPrinter.cpp vendor/clang/dist/lib/AST/StmtProfile.cpp vendor/clang/dist/lib/AST/TemplateName.cpp vendor/clang/dist/lib/AST/Type.cpp vendor/clang/dist/lib/Analysis/BasicObjCFoundationChecks.cpp vendor/clang/dist/lib/Analysis/BasicObjCFoundationChecks.h vendor/clang/dist/lib/Analysis/BasicStore.cpp vendor/clang/dist/lib/Analysis/CFRefCount.cpp vendor/clang/dist/lib/Analysis/CMakeLists.txt vendor/clang/dist/lib/Analysis/CallGraph.cpp vendor/clang/dist/lib/Analysis/CheckObjCUnusedIVars.cpp vendor/clang/dist/lib/Analysis/GRExprEngine.cpp vendor/clang/dist/lib/Analysis/GRExprEngineInternalChecks.cpp vendor/clang/dist/lib/Analysis/RegionStore.cpp vendor/clang/dist/lib/Basic/CMakeLists.txt vendor/clang/dist/lib/Basic/IdentifierTable.cpp vendor/clang/dist/lib/Basic/TargetInfo.cpp vendor/clang/dist/lib/Basic/Targets.cpp vendor/clang/dist/lib/CodeGen/CGBuiltin.cpp vendor/clang/dist/lib/CodeGen/CGCXX.cpp vendor/clang/dist/lib/CodeGen/CGCall.cpp vendor/clang/dist/lib/CodeGen/CGDecl.cpp vendor/clang/dist/lib/CodeGen/CGExpr.cpp vendor/clang/dist/lib/CodeGen/CGExprAgg.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/CGRecordLayoutBuilder.h vendor/clang/dist/lib/CodeGen/CGRtti.cpp vendor/clang/dist/lib/CodeGen/CGStmt.cpp vendor/clang/dist/lib/CodeGen/CGValue.h vendor/clang/dist/lib/CodeGen/CGVtable.cpp 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/CodeGenTypes.cpp vendor/clang/dist/lib/CodeGen/Mangle.cpp vendor/clang/dist/lib/CodeGen/Mangle.h vendor/clang/dist/lib/Driver/Tools.cpp vendor/clang/dist/lib/Driver/Types.cpp vendor/clang/dist/lib/Frontend/ASTConsumers.cpp vendor/clang/dist/lib/Frontend/AnalysisConsumer.cpp vendor/clang/dist/lib/Frontend/InitHeaderSearch.cpp vendor/clang/dist/lib/Frontend/InitPreprocessor.cpp 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/PrintPreprocessedOutput.cpp vendor/clang/dist/lib/Frontend/RewriteObjC.cpp vendor/clang/dist/lib/Frontend/TextDiagnosticPrinter.cpp vendor/clang/dist/lib/Headers/CMakeLists.txt vendor/clang/dist/lib/Headers/stdint.h vendor/clang/dist/lib/Index/ResolveLocation.cpp vendor/clang/dist/lib/Lex/HeaderMap.cpp vendor/clang/dist/lib/Lex/PPDirectives.cpp vendor/clang/dist/lib/Lex/PPExpressions.cpp vendor/clang/dist/lib/Lex/PPMacroExpansion.cpp vendor/clang/dist/lib/Parse/AttributeList.cpp vendor/clang/dist/lib/Parse/DeclSpec.cpp vendor/clang/dist/lib/Parse/MinimalAction.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/ParseObjc.cpp 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/Sema/CodeCompleteConsumer.cpp vendor/clang/dist/lib/Sema/Sema.cpp vendor/clang/dist/lib/Sema/Sema.h vendor/clang/dist/lib/Sema/SemaCXXCast.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/SemaExpr.cpp vendor/clang/dist/lib/Sema/SemaExprCXX.cpp vendor/clang/dist/lib/Sema/SemaLookup.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/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/misc-ps-eager-assume.m vendor/clang/dist/test/Analysis/misc-ps-region-store.m vendor/clang/dist/test/Analysis/misc-ps.m vendor/clang/dist/test/Analysis/outofbound.c vendor/clang/dist/test/Analysis/retain-release-gc-only.m vendor/clang/dist/test/Analysis/retain-release.m vendor/clang/dist/test/Analysis/uninit-vals-ps-region.c vendor/clang/dist/test/Analysis/unused-ivars.m vendor/clang/dist/test/CMakeLists.txt vendor/clang/dist/test/CXX/basic/basic.lookup/basic.lookup.unqual/p14.cpp vendor/clang/dist/test/CXX/basic/basic.lookup/basic.lookup.unqual/p15.cpp vendor/clang/dist/test/CXX/class/class.union/p1.cpp vendor/clang/dist/test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p3.cpp vendor/clang/dist/test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p4.cpp vendor/clang/dist/test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p6.cpp vendor/clang/dist/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p10.cpp vendor/clang/dist/test/CXX/dcl.dcl/dcl.spec/dcl.typedef/p4.cpp vendor/clang/dist/test/CXX/temp/temp.decls/temp.class.spec/p6.cpp vendor/clang/dist/test/CXX/temp/temp.decls/temp.friend/p5.cpp vendor/clang/dist/test/CXX/temp/temp.param/p14.cpp vendor/clang/dist/test/CXX/temp/temp.res/temp.dep.res/temp.point/p1.cpp vendor/clang/dist/test/CXX/temp/temp.spec/temp.expl.spec/p3.cpp vendor/clang/dist/test/CXX/temp/temp.spec/temp.explicit/p3.cpp vendor/clang/dist/test/CodeGen/2008-07-21-mixed-var-fn-decl.c vendor/clang/dist/test/CodeGen/2008-07-29-override-alias-decl.c vendor/clang/dist/test/CodeGen/asm-inout.c vendor/clang/dist/test/CodeGen/blocks-2.c vendor/clang/dist/test/CodeGen/builtin-unwind-init.c vendor/clang/dist/test/CodeGen/cast-to-union.c vendor/clang/dist/test/CodeGen/function-attributes.c vendor/clang/dist/test/CodeGen/indirect-goto.c vendor/clang/dist/test/CodeGen/mangle.c vendor/clang/dist/test/CodeGen/union-init2.c vendor/clang/dist/test/CodeGen/volatile.c vendor/clang/dist/test/CodeGenCXX/ptr-to-datamember.cpp vendor/clang/dist/test/CodeGenCXX/temporaries.cpp vendor/clang/dist/test/CodeGenCXX/virt.cpp vendor/clang/dist/test/CodeGenObjC/PR4894-recursive-debug-crash.m vendor/clang/dist/test/CodeGenObjC/encode-test-2.m vendor/clang/dist/test/CodeGenObjC/synthesize_ivar.m vendor/clang/dist/test/Coverage/objc-language-features.inc vendor/clang/dist/test/Coverage/targets.c vendor/clang/dist/test/Driver/analyze.c vendor/clang/dist/test/Driver/ccc-add-args.c vendor/clang/dist/test/Driver/hello.c vendor/clang/dist/test/Driver/phases.c vendor/clang/dist/test/Driver/qa_override.c vendor/clang/dist/test/Driver/std.c vendor/clang/dist/test/Frontend/darwin-version.c vendor/clang/dist/test/Frontend/dependency-gen.c vendor/clang/dist/test/Lexer/block_cmt_end.c vendor/clang/dist/test/Makefile vendor/clang/dist/test/Misc/message-length.c vendor/clang/dist/test/PCH/pr4489.c vendor/clang/dist/test/Parser/cxx-template-decl.cpp vendor/clang/dist/test/Preprocessor/assembler-with-cpp.c vendor/clang/dist/test/Preprocessor/c99-6_10_3_3_p4.c vendor/clang/dist/test/Preprocessor/c99-6_10_3_4_p5.c vendor/clang/dist/test/Preprocessor/c99-6_10_3_4_p6.c vendor/clang/dist/test/Preprocessor/c99-6_10_3_4_p7.c vendor/clang/dist/test/Preprocessor/c99-6_10_3_4_p9.c vendor/clang/dist/test/Preprocessor/comment_save.c vendor/clang/dist/test/Preprocessor/comment_save_macro.c vendor/clang/dist/test/Preprocessor/line-directive.c vendor/clang/dist/test/Preprocessor/macro_disable3.c vendor/clang/dist/test/Preprocessor/macro_paste_mscomment.c vendor/clang/dist/test/Preprocessor/macro_rescan_varargs.c vendor/clang/dist/test/Preprocessor/macro_rparen_scan2.c vendor/clang/dist/test/Preprocessor/output_paste_avoid.c vendor/clang/dist/test/Preprocessor/stringize_misc.c vendor/clang/dist/test/Sema/attr-deprecated.c vendor/clang/dist/test/Sema/callingconv.c vendor/clang/dist/test/Sema/constant-builtins-2.c vendor/clang/dist/test/Sema/decl-invalid.c vendor/clang/dist/test/Sema/format-strings.c vendor/clang/dist/test/Sema/init.c vendor/clang/dist/test/Sema/offsetof.c vendor/clang/dist/test/Sema/return-noreturn.c vendor/clang/dist/test/Sema/return.c vendor/clang/dist/test/Sema/statements.c vendor/clang/dist/test/Sema/stdcall-fastcall.c vendor/clang/dist/test/Sema/vector-init.c vendor/clang/dist/test/SemaCXX/constructor.cpp vendor/clang/dist/test/SemaCXX/implicit-int.cpp vendor/clang/dist/test/SemaCXX/invalid-member-expr.cpp vendor/clang/dist/test/SemaCXX/invalid-template-specifier.cpp vendor/clang/dist/test/SemaCXX/nested-name-spec.cpp vendor/clang/dist/test/SemaCXX/new-delete.cpp vendor/clang/dist/test/SemaCXX/overloaded-operator.cpp vendor/clang/dist/test/SemaCXX/typedef-redecl.cpp vendor/clang/dist/test/SemaObjC/continuation-class-err.m vendor/clang/dist/test/SemaObjC/id-isa-ref.m vendor/clang/dist/test/SemaObjC/return.m vendor/clang/dist/test/SemaObjCXX/overload.mm vendor/clang/dist/test/SemaObjCXX/references.mm vendor/clang/dist/test/SemaTemplate/class-template-spec.cpp vendor/clang/dist/test/SemaTemplate/constructor-template.cpp vendor/clang/dist/test/SemaTemplate/copy-ctor-assign.cpp vendor/clang/dist/test/SemaTemplate/default-expr-arguments.cpp vendor/clang/dist/test/SemaTemplate/ext-vector-type.cpp vendor/clang/dist/test/SemaTemplate/friend-template.cpp vendor/clang/dist/test/SemaTemplate/instantiate-cast.cpp vendor/clang/dist/test/SemaTemplate/instantiate-declref-ice.cpp vendor/clang/dist/test/SemaTemplate/instantiate-declref.cpp vendor/clang/dist/test/SemaTemplate/instantiate-function-1.mm vendor/clang/dist/test/SemaTemplate/instantiate-method.cpp vendor/clang/dist/test/SemaTemplate/instantiate-subscript.cpp vendor/clang/dist/test/SemaTemplate/member-template-access-expr.cpp vendor/clang/dist/test/SemaTemplate/nested-name-spec-template.cpp vendor/clang/dist/test/SemaTemplate/nested-template.cpp vendor/clang/dist/test/lit.site.cfg.in vendor/clang/dist/tools/CIndex/CIndex.cpp vendor/clang/dist/tools/CIndex/CIndex.exports vendor/clang/dist/tools/CIndex/CMakeLists.txt vendor/clang/dist/tools/CMakeLists.txt vendor/clang/dist/tools/c-index-test/c-index-test.c vendor/clang/dist/tools/clang-cc/clang-cc.cpp vendor/clang/dist/tools/wpa/clang-wpa.cpp vendor/clang/dist/www/UniversalDriver.html vendor/clang/dist/www/analyzer/latest_checker.html.incl vendor/clang/dist/www/cxx_status.html Modified: vendor/clang/dist/CMakeLists.txt ============================================================================== --- vendor/clang/dist/CMakeLists.txt Wed Nov 4 14:58:56 2009 (r198892) +++ vendor/clang/dist/CMakeLists.txt Wed Nov 4 15:04:32 2009 (r198893) @@ -65,7 +65,7 @@ macro(add_clang_library name) set_target_properties(${name} PROPERTIES COMPILE_FLAGS ${cflag}) endif(MSVC) install(TARGETS ${name} - LIBRARY DESTINATION lib + LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}) endmacro(add_clang_library) @@ -83,8 +83,12 @@ include_directories( ${CMAKE_CURRENT_BINARY_DIR}/include ) -install(DIRECTORY include - DESTINATION . +install(DIRECTORY include/ + DESTINATION include + FILES_MATCHING + PATTERN "*.def" + PATTERN "*.h" + PATTERN "*.td" PATTERN ".svn" EXCLUDE ) Modified: vendor/clang/dist/clang.xcodeproj/project.pbxproj ============================================================================== --- vendor/clang/dist/clang.xcodeproj/project.pbxproj Wed Nov 4 14:58:56 2009 (r198892) +++ vendor/clang/dist/clang.xcodeproj/project.pbxproj Wed Nov 4 15:04:32 2009 (r198893) @@ -49,6 +49,7 @@ 1ADF47AF0F782C3200E48A8A /* SemaTemplateInstantiateDecl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ADF47AE0F782C3200E48A8A /* SemaTemplateInstantiateDecl.cpp */; }; 1AE4EE3E103B89ED00888A23 /* StmtProfile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AE4EE3D103B89ED00888A23 /* StmtProfile.cpp */; }; 1AE4EE40103B8A0A00888A23 /* TargetABIInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AE4EE3F103B8A0A00888A23 /* TargetABIInfo.cpp */; }; + 1AF1B50F109A4FB800AFAFAC /* CGException.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AF1B50E109A4FB800AFAFAC /* CGException.cpp */; }; 1AFEF4070F8A6B2300476F2B /* clang-cc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AFEF4050F8A6B2300476F2B /* clang-cc.cpp */; }; 1AFF8AE31012BFC900D248DA /* CGRecordLayoutBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AFF8AE11012BFC900D248DA /* CGRecordLayoutBuilder.cpp */; }; 3507E4C20E27FE2D00FB7B57 /* CheckObjCInstMethSignature.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3507E4C10E27FE2D00FB7B57 /* CheckObjCInstMethSignature.cpp */; }; @@ -399,6 +400,7 @@ 1AE4EE3B103B89CA00888A23 /* TreeTransform.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = TreeTransform.h; path = lib/Sema/TreeTransform.h; sourceTree = ""; tabWidth = 2; }; 1AE4EE3D103B89ED00888A23 /* StmtProfile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = StmtProfile.cpp; path = lib/AST/StmtProfile.cpp; sourceTree = ""; tabWidth = 2; }; 1AE4EE3F103B8A0A00888A23 /* TargetABIInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = TargetABIInfo.cpp; path = lib/CodeGen/TargetABIInfo.cpp; sourceTree = ""; tabWidth = 2; }; + 1AF1B50E109A4FB800AFAFAC /* CGException.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGException.cpp; path = lib/CodeGen/CGException.cpp; sourceTree = ""; tabWidth = 2; }; 1AFEF4050F8A6B2300476F2B /* clang-cc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = "clang-cc.cpp"; path = "tools/clang-cc/clang-cc.cpp"; sourceTree = ""; tabWidth = 2; }; 1AFF8AE11012BFC900D248DA /* CGRecordLayoutBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGRecordLayoutBuilder.cpp; path = lib/CodeGen/CGRecordLayoutBuilder.cpp; sourceTree = ""; tabWidth = 2; }; 1AFF8AE21012BFC900D248DA /* CGRecordLayoutBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = CGRecordLayoutBuilder.h; path = lib/CodeGen/CGRecordLayoutBuilder.h; sourceTree = ""; tabWidth = 2; }; @@ -515,6 +517,13 @@ 9012911C1048068D0083456D /* ASTUnit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ASTUnit.cpp; path = lib/Frontend/ASTUnit.cpp; sourceTree = ""; }; 9012911F104812F90083456D /* CIndex.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CIndex.cpp; path = tools/CIndex/CIndex.cpp; sourceTree = ""; }; 90129120104812F90083456D /* CIndex.exports */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = CIndex.exports; path = tools/CIndex/CIndex.exports; sourceTree = ""; }; + 904753791096376F00CBDDDD /* CXXInheritance.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CXXInheritance.h; path = clang/AST/CXXInheritance.h; sourceTree = ""; }; + 9047537A1096376F00CBDDDD /* Redeclarable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Redeclarable.h; path = clang/AST/Redeclarable.h; sourceTree = ""; }; + 9047537B1096376F00CBDDDD /* TypeLoc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TypeLoc.h; path = clang/AST/TypeLoc.h; sourceTree = ""; }; + 9047537C1096376F00CBDDDD /* TypeLocBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TypeLocBuilder.h; path = clang/AST/TypeLocBuilder.h; sourceTree = ""; }; + 9047537D1096376F00CBDDDD /* TypeLocNodes.def */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = TypeLocNodes.def; path = clang/AST/TypeLocNodes.def; sourceTree = ""; }; + 9047537E1096376F00CBDDDD /* TypeLocVisitor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TypeLocVisitor.h; path = clang/AST/TypeLocVisitor.h; sourceTree = ""; }; + 9047537F1096376F00CBDDDD /* TypeVisitor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TypeVisitor.h; path = clang/AST/TypeVisitor.h; sourceTree = ""; }; 9063F2210F9E8BDF002F7251 /* ExternalSemaSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ExternalSemaSource.h; path = clang/Sema/ExternalSemaSource.h; sourceTree = ""; }; 9063F2220F9E8BDF002F7251 /* SemaConsumer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SemaConsumer.h; path = clang/Sema/SemaConsumer.h; sourceTree = ""; }; 9063F2280F9E911F002F7251 /* OnDiskHashTable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OnDiskHashTable.h; sourceTree = ""; }; @@ -1257,6 +1266,7 @@ 35A3E7000DD3874400757F74 /* CGDebugInfo.cpp */, 35A3E7010DD3874400757F74 /* CGDebugInfo.h */, DE4264FB0C113592005A861D /* CGDecl.cpp */, + 1AF1B50E109A4FB800AFAFAC /* CGException.cpp */, DE4772FB0C10EAEC002239E8 /* CGExpr.cpp */, DEF2EFF20C6CDD74000C4259 /* CGExprAgg.cpp */, DE224FF70C7AA98800D370A5 /* CGExprComplex.cpp */, @@ -1298,6 +1308,13 @@ DEC8D98B0A9433BC00353FCA /* AST */ = { isa = PBXGroup; children = ( + 904753791096376F00CBDDDD /* CXXInheritance.h */, + 9047537A1096376F00CBDDDD /* Redeclarable.h */, + 9047537B1096376F00CBDDDD /* TypeLoc.h */, + 9047537C1096376F00CBDDDD /* TypeLocBuilder.h */, + 9047537D1096376F00CBDDDD /* TypeLocNodes.def */, + 9047537E1096376F00CBDDDD /* TypeLocVisitor.h */, + 9047537F1096376F00CBDDDD /* TypeVisitor.h */, DECB78540FA58F5500F5FBC7 /* AccessSpecifier.h */, DE613EF30E0E148D00B05B79 /* APValue.h */, DEC8D9A30A94346E00353FCA /* AST.h */, @@ -1901,6 +1918,7 @@ 1A535ED9107BC45E000C3AE7 /* CXXInheritance.cpp in Sources */, 1A6C01F7108128710072DEE4 /* CGRtti.cpp in Sources */, 1A81AA19108144F40094E50B /* CGVtable.cpp in Sources */, + 1AF1B50F109A4FB800AFAFAC /* CGException.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; Modified: vendor/clang/dist/docs/LanguageExtensions.html ============================================================================== --- vendor/clang/dist/docs/LanguageExtensions.html Wed Nov 4 14:58:56 2009 (r198892) +++ vendor/clang/dist/docs/LanguageExtensions.html Wed Nov 4 15:04:32 2009 (r198893) @@ -20,6 +20,7 @@ td {
        • Introduction
        • Feature Checking Macros
        • +
        • Include File Checking Macros
        • Builtin Macros
        • Vectors and Extended Vectors
        • Blocks
        • @@ -112,6 +113,69 @@ can be used like this:

          The feature tag is described along with the language feature below.

          + +

          Include File Checking Macros

          + + +

          Not all developments systems have the same include files. +The __has_include and +__has_include_next macros allow you to +check for the existence of an include file before doing +a possibly failing #include directive.

          + + +

          __has_include

          + + +

          This function-like macro takes a single file name string argument that +is the name of an include file. It evaluates to 1 if the file can +be found using the include paths, or 0 otherwise:

          + +
          +
          +// Note the two possible file name string formats.
          +#if __has_include("myinclude.h") && __has_include(<stdint.h>)
          +# include "myinclude.h"
          +#endif
          +
          +// To avoid problem with non-clang compilers not having this macro.
          +#if defined(__has_include) && __has_include("myinclude.h")
          +# include "myinclude.h"
          +#endif
          +
          +
          + +

          To test for this feature, use #if defined(__has_include).

          + + +

          __has_include_next

          + + +

          This function-like macro takes a single file name string argument that +is the name of an include file. It is like __has_include except that it +looks for the second instance of the given file found in the include +paths. It evaluates to 1 if the second instance of the file can +be found using the include paths, or 0 otherwise:

          + +
          +
          +// Note the two possible file name string formats.
          +#if __has_include_next("myinclude.h") && __has_include_next(<stdint.h>)
          +# include_next "myinclude.h"
          +#endif
          +
          +// To avoid problem with non-clang compilers not having this macro.
          +#if defined(__has_include_next) && __has_include_next("myinclude.h")
          +# include_next "myinclude.h"
          +#endif
          +
          +
          + +

          Note that __has_include_next, like the GNU extension +#include_next directive, is intended for use in headers only, +and will issue a warning if used in the top-level compilation +file. A warning will also be issued if an absolute path +is used in the file argument.

          Builtin Macros

          Modified: vendor/clang/dist/docs/tools/clang.pod ============================================================================== --- vendor/clang/dist/docs/tools/clang.pod Wed Nov 4 14:58:56 2009 (r198892) +++ vendor/clang/dist/docs/tools/clang.pod Wed Nov 4 15:04:32 2009 (r198893) @@ -424,6 +424,10 @@ Add the specified directory to the searc Do not search the standard system directories for include files. +=item B<-nobuiltininc> + +Do not search clang's builtin directory for include files. + =cut ## TODO, but do we really want people using this stuff? Modified: vendor/clang/dist/include/clang-c/Index.h ============================================================================== --- vendor/clang/dist/include/clang-c/Index.h Wed Nov 4 14:58:56 2009 (r198892) +++ vendor/clang/dist/include/clang-c/Index.h Wed Nov 4 15:04:32 2009 (r198893) @@ -16,10 +16,23 @@ #ifndef CLANG_C_INDEX_H #define CLANG_C_INDEX_H +#include + #ifdef __cplusplus extern "C" { #endif +/* MSVC DLL import/export. */ +#ifdef _MSC_VER + #ifdef _CINDEX_LIB_ + #define CINDEX_LINKAGE __declspec(dllexport) + #else + #define CINDEX_LINKAGE __declspec(dllimport) + #endif +#else + #define CINDEX_LINKAGE +#endif + /* Clang indeX abstractions. The backing store for the following API's will be clangs AST file (currently based on PCH). AST files are created as follows: @@ -33,6 +46,7 @@ typedef void *CXIndex; /* An typedef void *CXTranslationUnit; /* A translation unit instance. */ +typedef void *CXFile; /* A source file */ typedef void *CXDecl; /* A specific declaration within a translation unit. */ typedef void *CXStmt; /* A specific statement within a function/method */ @@ -138,22 +152,22 @@ typedef void *CXEntity; * -include-pch) allows 'excludeDeclsFromPCH' to remove redundant callbacks * (which gives the indexer the same performance benefit as the compiler). */ -CXIndex clang_createIndex(int excludeDeclarationsFromPCH, +CINDEX_LINKAGE CXIndex clang_createIndex(int excludeDeclarationsFromPCH, int displayDiagnostics); -void clang_disposeIndex(CXIndex); +CINDEX_LINKAGE void clang_disposeIndex(CXIndex); -const char *clang_getTranslationUnitSpelling(CXTranslationUnit CTUnit); +CINDEX_LINKAGE const char *clang_getTranslationUnitSpelling(CXTranslationUnit CTUnit); /* * \brief Create a translation unit from an AST file (-emit-ast). */ -CXTranslationUnit clang_createTranslationUnit( +CINDEX_LINKAGE CXTranslationUnit clang_createTranslationUnit( CXIndex, const char *ast_filename ); /** * \brief Destroy the specified CXTranslationUnit object. */ -void clang_disposeTranslationUnit(CXTranslationUnit); +CINDEX_LINKAGE void clang_disposeTranslationUnit(CXTranslationUnit); /** * \brief Return the CXTranslationUnit for a given source file and the provided @@ -170,7 +184,7 @@ void clang_disposeTranslationUnit(CXTran * '-o ' (both '-o' and '' are ignored) * */ -CXTranslationUnit clang_createTranslationUnitFromSourceFile( +CINDEX_LINKAGE CXTranslationUnit clang_createTranslationUnitFromSourceFile( CXIndex CIdx, const char *source_filename /* specify NULL if the source file is in clang_command_line_args */, int num_clang_command_line_args, @@ -197,7 +211,7 @@ CXTranslationUnit clang_createTranslatio typedef void *CXClientData; typedef void (*CXTranslationUnitIterator)(CXTranslationUnit, CXCursor, CXClientData); -void clang_loadTranslationUnit(CXTranslationUnit, CXTranslationUnitIterator, +CINDEX_LINKAGE void clang_loadTranslationUnit(CXTranslationUnit, CXTranslationUnitIterator, CXClientData); /* @@ -227,23 +241,30 @@ void clang_loadTranslationUnit(CXTransla */ typedef void (*CXDeclIterator)(CXDecl, CXCursor, CXClientData); -void clang_loadDeclaration(CXDecl, CXDeclIterator, CXClientData); +CINDEX_LINKAGE void clang_loadDeclaration(CXDecl, CXDeclIterator, CXClientData); + +/* + * CXFile Operations. + */ +CINDEX_LINKAGE const char *clang_getFileName(CXFile SFile); +CINDEX_LINKAGE time_t clang_getFileTime(CXFile SFile); /* * CXEntity Operations. */ -const char *clang_getDeclarationName(CXEntity); -const char *clang_getURI(CXEntity); -CXEntity clang_getEntity(const char *URI); +CINDEX_LINKAGE const char *clang_getDeclarationName(CXEntity); +CINDEX_LINKAGE const char *clang_getURI(CXEntity); +CINDEX_LINKAGE CXEntity clang_getEntity(const char *URI); /* * CXDecl Operations. */ -CXCursor clang_getCursorFromDecl(CXDecl); -CXEntity clang_getEntityFromDecl(CXDecl); -const char *clang_getDeclSpelling(CXDecl); -unsigned clang_getDeclLine(CXDecl); -unsigned clang_getDeclColumn(CXDecl); -const char *clang_getDeclSource(CXDecl); +CINDEX_LINKAGE CXCursor clang_getCursorFromDecl(CXDecl); +CINDEX_LINKAGE CXEntity clang_getEntityFromDecl(CXDecl); +CINDEX_LINKAGE const char *clang_getDeclSpelling(CXDecl); +CINDEX_LINKAGE unsigned clang_getDeclLine(CXDecl); +CINDEX_LINKAGE unsigned clang_getDeclColumn(CXDecl); +CINDEX_LINKAGE const char *clang_getDeclSource(CXDecl); /* deprecate */ +CINDEX_LINKAGE CXFile clang_getDeclSourceFile(CXDecl); /* * CXCursor Operations. @@ -252,38 +273,24 @@ const char *clang_getDeclSource(CXDecl); Usage: clang_getCursor() will translate a source/line/column position into an AST cursor (to derive semantic information from the source code). */ -CXCursor clang_getCursor(CXTranslationUnit, const char *source_name, +CINDEX_LINKAGE CXCursor clang_getCursor(CXTranslationUnit, const char *source_name, unsigned line, unsigned column); -/** - Usage: clang_getCursorWithHint() provides the same functionality as - clang_getCursor() except that it takes an option 'hint' argument. - The 'hint' is a temporary CXLookupHint object (whose lifetime is managed by - the caller) that should be initialized with clang_initCXLookupHint(). - - FIXME: Add a better comment once getCursorWithHint() has more functionality. - */ -typedef CXCursor CXLookupHint; -CXCursor clang_getCursorWithHint(CXTranslationUnit, const char *source_name, - unsigned line, unsigned column, - CXLookupHint *hint); - -void clang_initCXLookupHint(CXLookupHint *hint); - -enum CXCursorKind clang_getCursorKind(CXCursor); -unsigned clang_isDeclaration(enum CXCursorKind); -unsigned clang_isReference(enum CXCursorKind); -unsigned clang_isDefinition(enum CXCursorKind); -unsigned clang_isInvalid(enum CXCursorKind); - -unsigned clang_getCursorLine(CXCursor); -unsigned clang_getCursorColumn(CXCursor); -const char *clang_getCursorSource(CXCursor); -const char *clang_getCursorSpelling(CXCursor); +CINDEX_LINKAGE enum CXCursorKind clang_getCursorKind(CXCursor); +CINDEX_LINKAGE unsigned clang_isDeclaration(enum CXCursorKind); +CINDEX_LINKAGE unsigned clang_isReference(enum CXCursorKind); +CINDEX_LINKAGE unsigned clang_isDefinition(enum CXCursorKind); +CINDEX_LINKAGE unsigned clang_isInvalid(enum CXCursorKind); + +CINDEX_LINKAGE unsigned clang_getCursorLine(CXCursor); +CINDEX_LINKAGE unsigned clang_getCursorColumn(CXCursor); +CINDEX_LINKAGE const char *clang_getCursorSpelling(CXCursor); +CINDEX_LINKAGE const char *clang_getCursorSource(CXCursor); /* deprecate */ +CINDEX_LINKAGE CXFile clang_getCursorSourceFile(CXCursor); /* for debug/testing */ -const char *clang_getCursorKindSpelling(enum CXCursorKind Kind); -void clang_getDefinitionSpellingAndExtent(CXCursor, +CINDEX_LINKAGE const char *clang_getCursorKindSpelling(enum CXCursorKind Kind); +CINDEX_LINKAGE void clang_getDefinitionSpellingAndExtent(CXCursor, const char **startBuf, const char **endBuf, unsigned *startLine, @@ -296,7 +303,7 @@ void clang_getDefinitionSpellingAndExten * declaration. * If CXCursorKind == Cursor_Declaration, then this will return the declaration. */ -CXDecl clang_getCursorDecl(CXCursor); +CINDEX_LINKAGE CXDecl clang_getCursorDecl(CXCursor); #ifdef __cplusplus } Modified: vendor/clang/dist/include/clang/AST/ASTContext.h ============================================================================== --- vendor/clang/dist/include/clang/AST/ASTContext.h Wed Nov 4 14:58:56 2009 (r198892) +++ vendor/clang/dist/include/clang/AST/ASTContext.h Wed Nov 4 15:04:32 2009 (r198893) @@ -16,6 +16,7 @@ #include "clang/Basic/IdentifierTable.h" #include "clang/Basic/LangOptions.h" +#include "clang/Basic/OperatorKinds.h" #include "clang/AST/Attr.h" #include "clang/AST/Decl.h" #include "clang/AST/NestedNameSpecifier.h" @@ -301,22 +302,22 @@ public: const char *getCommentForDecl(const Decl *D); // Builtin Types. - QualType VoidTy; - QualType BoolTy; - QualType CharTy; - QualType WCharTy; // [C++ 3.9.1p5], integer type in C99. - QualType Char16Ty; // [C++0x 3.9.1p5], integer type in C99. - QualType Char32Ty; // [C++0x 3.9.1p5], integer type in C99. - QualType SignedCharTy, ShortTy, IntTy, LongTy, LongLongTy, Int128Ty; - QualType UnsignedCharTy, UnsignedShortTy, UnsignedIntTy, UnsignedLongTy; - QualType UnsignedLongLongTy, UnsignedInt128Ty; - QualType FloatTy, DoubleTy, LongDoubleTy; - QualType FloatComplexTy, DoubleComplexTy, LongDoubleComplexTy; - QualType VoidPtrTy, NullPtrTy; - QualType OverloadTy; - QualType DependentTy; - QualType UndeducedAutoTy; - QualType ObjCBuiltinIdTy, ObjCBuiltinClassTy; + CanQualType VoidTy; + CanQualType BoolTy; + CanQualType CharTy; + CanQualType WCharTy; // [C++ 3.9.1p5], integer type in C99. + CanQualType Char16Ty; // [C++0x 3.9.1p5], integer type in C99. + CanQualType Char32Ty; // [C++0x 3.9.1p5], integer type in C99. + CanQualType SignedCharTy, ShortTy, IntTy, LongTy, LongLongTy, Int128Ty; + CanQualType UnsignedCharTy, UnsignedShortTy, UnsignedIntTy, UnsignedLongTy; + CanQualType UnsignedLongLongTy, UnsignedInt128Ty; + CanQualType FloatTy, DoubleTy, LongDoubleTy; + CanQualType FloatComplexTy, DoubleComplexTy, LongDoubleComplexTy; + CanQualType VoidPtrTy, NullPtrTy; + CanQualType OverloadTy; + CanQualType DependentTy; + CanQualType UndeducedAutoTy; + CanQualType ObjCBuiltinIdTy, ObjCBuiltinClassTy; ASTContext(const LangOptions& LOpts, SourceManager &SM, TargetInfo &t, IdentifierTable &idents, SelectorTable &sels, @@ -387,10 +388,16 @@ public: /// getComplexType - Return the uniqued reference to the type for a complex /// number with the specified element type. QualType getComplexType(QualType T); + CanQualType getComplexType(CanQualType T) { + return CanQualType::CreateUnsafe(getComplexType((QualType) T)); + } /// getPointerType - Return the uniqued reference to the type for a pointer to /// the specified type. QualType getPointerType(QualType T); + CanQualType getPointerType(CanQualType T) { + return CanQualType::CreateUnsafe(getPointerType((QualType) T)); + } /// getBlockPointerType - Return the uniqued reference to the type for a block /// of the specified type. @@ -525,6 +532,11 @@ public: unsigned NumArgs, QualType Canon = QualType()); + QualType getTemplateSpecializationType(TemplateName T, + const TemplateArgumentLoc *Args, + unsigned NumArgs, + QualType Canon = QualType()); + QualType getQualifiedNameType(NestedNameSpecifier *NNS, QualType NamedType); QualType getTypenameType(NestedNameSpecifier *NNS, @@ -728,6 +740,8 @@ public: TemplateName getDependentTemplateName(NestedNameSpecifier *NNS, const IdentifierInfo *Name); + TemplateName getDependentTemplateName(NestedNameSpecifier *NNS, + OverloadedOperatorKind Operator); enum GetBuiltinTypeError { GE_None, //< No error @@ -739,7 +753,7 @@ public: QualType GetBuiltinType(unsigned ID, GetBuiltinTypeError &Error); private: - QualType getFromTargetType(unsigned Type) const; + CanQualType getFromTargetType(unsigned Type) const; //===--------------------------------------------------------------------===// // Type Predicates. @@ -826,6 +840,8 @@ public: llvm::SmallVectorImpl &Ivars); unsigned CountSynthesizedIvars(const ObjCInterfaceDecl *OI); unsigned CountProtocolSynthesizedIvars(const ObjCProtocolDecl *PD); + void CollectInheritedProtocols(const Decl *CDecl, + llvm::SmallVectorImpl &Protocols); //===--------------------------------------------------------------------===// // Type Operators @@ -1013,7 +1029,9 @@ public: bool canAssignObjCInterfaces(const ObjCInterfaceType *LHS, const ObjCInterfaceType *RHS); bool areComparableObjCPointerTypes(QualType LHS, QualType RHS); - + QualType areCommonBaseCompatible(const ObjCObjectPointerType *LHSOPT, + const ObjCObjectPointerType *RHSOPT); + // Functions for calculating composite types QualType mergeTypes(QualType, QualType); QualType mergeFunctionTypes(QualType, QualType); @@ -1085,12 +1103,18 @@ public: /// should be calculated based on the type. DeclaratorInfo *CreateDeclaratorInfo(QualType T, unsigned Size = 0); + /// \brief Allocate a DeclaratorInfo where all locations have been + /// initialized to a given location, which defaults to the empty + /// location. + DeclaratorInfo * + getTrivialDeclaratorInfo(QualType T, SourceLocation Loc = SourceLocation()); + private: ASTContext(const ASTContext&); // DO NOT IMPLEMENT void operator=(const ASTContext&); // DO NOT IMPLEMENT void InitBuiltinTypes(); - void InitBuiltinType(QualType &R, BuiltinType::Kind K); + void InitBuiltinType(CanQualType &R, BuiltinType::Kind K); // Return the ObjC type encoding for a given type. void getObjCEncodingForTypeImpl(QualType t, std::string &S, @@ -1103,6 +1127,18 @@ private: const ASTRecordLayout &getObjCLayout(const ObjCInterfaceDecl *D, const ObjCImplementationDecl *Impl); }; + +/// @brief Utility function for constructing a nullary selector. +static inline Selector GetNullarySelector(const char* name, ASTContext& Ctx) { + IdentifierInfo* II = &Ctx.Idents.get(name); + return Ctx.Selectors.getSelector(0, &II); +} + +/// @brief Utility function for constructing an unary selector. +static inline Selector GetUnarySelector(const char* name, ASTContext& Ctx) { + IdentifierInfo* II = &Ctx.Idents.get(name); + return Ctx.Selectors.getSelector(1, &II); +} } // end namespace clang Modified: vendor/clang/dist/include/clang/AST/CanonicalType.h ============================================================================== --- vendor/clang/dist/include/clang/AST/CanonicalType.h Wed Nov 4 14:58:56 2009 (r198892) +++ vendor/clang/dist/include/clang/AST/CanonicalType.h Wed Nov 4 15:04:32 2009 (r198893) @@ -64,15 +64,6 @@ public: CanQual(const CanQual& Other, typename llvm::enable_if, int>::type = 0); - /// \brief Implicit conversion to the underlying pointer. - /// - /// Also provides the ability to use canonical types in a boolean context, - /// e.g., - /// @code - /// if (CanQual Ptr = T->getAs()) { ... } - /// @endcode - operator const T*() const { return getTypePtr(); } - /// \brief Retrieve the underlying type pointer, which refers to a /// canonical type. T *getTypePtr() const { return cast_or_null(Stored.getTypePtr()); } @@ -80,6 +71,10 @@ public: /// \brief Implicit conversion to a qualified type. operator QualType() const { return Stored; } + bool isNull() const { + return Stored.isNull(); + } + /// \brief Retrieve a canonical type pointer with a different static type, /// upcasting or downcasting as needed. /// @@ -125,8 +120,10 @@ public: /// \brief Retrieve the unqualified form of this type. CanQual getUnqualifiedType() const; - CanQual getQualifiedType(unsigned TQs) const { - return CanQual::CreateUnsafe(QualType(getTypePtr(), TQs)); + /// \brief Retrieves a version of this type with const applied. + /// Note that this does not always yield a canonical type. + QualType withConst() const { + return Stored.withConst(); } /// \brief Determines whether this canonical type is more qualified than Modified: vendor/clang/dist/include/clang/AST/Decl.h ============================================================================== --- vendor/clang/dist/include/clang/AST/Decl.h Wed Nov 4 14:58:56 2009 (r198892) +++ vendor/clang/dist/include/clang/AST/Decl.h Wed Nov 4 15:04:32 2009 (r198893) @@ -605,6 +605,9 @@ public: /// \brief Determine whether this is or was instantiated from an out-of-line /// definition of a static data member. bool isOutOfLine() const; + + /// \brief If this is a static data member, find its out-of-line definition. + VarDecl *getOutOfLineDefinition(); /// \brief If this variable is an instantiated static data member of a /// class template specialization, returns the templated static data member @@ -768,7 +771,11 @@ public: Init = (UnparsedDefaultArgument *)0; } - QualType getOriginalType() const; + QualType getOriginalType() const { + if (getDeclaratorInfo()) + return getDeclaratorInfo()->getType(); + return getType(); + } /// setOwningFunction - Sets the function declaration that owns this /// ParmVarDecl. Since ParmVarDecls are often created before the @@ -778,41 +785,11 @@ public: // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { - return (D->getKind() == ParmVar || - D->getKind() == OriginalParmVar); + return (D->getKind() == ParmVar); } static bool classof(const ParmVarDecl *D) { return true; } }; -/// OriginalParmVarDecl - Represent a parameter to a function, when -/// the type of the parameter has been promoted. This node represents the -/// parameter to the function with its original type. -/// -class OriginalParmVarDecl : public ParmVarDecl { - friend class ParmVarDecl; -protected: - QualType OriginalType; -private: - OriginalParmVarDecl(DeclContext *DC, SourceLocation L, - IdentifierInfo *Id, QualType T, - DeclaratorInfo *DInfo, - QualType OT, StorageClass S, - Expr *DefArg) - : ParmVarDecl(OriginalParmVar, DC, L, Id, T, DInfo, S, DefArg), - OriginalType(OT) {} -public: - static OriginalParmVarDecl *Create(ASTContext &C, DeclContext *DC, - SourceLocation L,IdentifierInfo *Id, - QualType T, DeclaratorInfo *DInfo, - QualType OT, StorageClass S, Expr *DefArg); - - void setOriginalType(QualType T) { OriginalType = T; } - - // Implement isa/cast/dyncast/etc. - static bool classof(const Decl *D) { return D->getKind() == OriginalParmVar; } - static bool classof(const OriginalParmVarDecl *D) { return true; } -}; - /// FunctionDecl - An instance of this class is created to represent a /// function declaration or definition. /// @@ -1067,9 +1044,18 @@ public: StorageClass getStorageClass() const { return StorageClass(SClass); } void setStorageClass(StorageClass SC) { SClass = SC; } - bool isInline() const { return IsInline; } - void setInline(bool I) { IsInline = I; } + /// \brief Determine whether the "inline" keyword was specified for this + /// function. + bool isInlineSpecified() const { return IsInline; } + + /// Set whether the "inline" keyword was specified for this function. + void setInlineSpecified(bool I) { IsInline = I; } + /// \brief Determine whether this function should be inlined, because it is + /// either marked "inline" or is a member function of a C++ class that + /// was defined in the class body. + bool isInlined() const; + bool isInlineDefinitionExternallyVisible() const; /// isOverloadedOperator - Whether this function declaration @@ -1146,7 +1132,17 @@ public: return TemplateOrSpecialization. dyn_cast(); } - + + /// \brief Determines whether this function is a function template + /// specialization or a member of a class template specialization that can + /// be implicitly instantiated. + bool isImplicitlyInstantiable() const; + + /// \brief Retrieve the function declaration from which this function could + /// be instantiated, if it is an instantiation (rather than a non-template + /// or a specialization, for example). + FunctionDecl *getTemplateInstantiationPattern() const; + /// \brief Retrieve the primary template that this function template /// specialization either specializes or was instantiated from. /// @@ -1199,7 +1195,7 @@ public: /// instantiated from a template; otherwie, returns an invalid source /// location. SourceLocation getPointOfInstantiation() const; - + /// \brief Determine whether this is or was instantiated from an out-of-line /// definition of a member function. bool isOutOfLine() const; @@ -1337,20 +1333,29 @@ public: class TypedefDecl : public TypeDecl { /// UnderlyingType - This is the type the typedef is set to. - QualType UnderlyingType; + DeclaratorInfo *DInfo; + TypedefDecl(DeclContext *DC, SourceLocation L, - IdentifierInfo *Id, QualType T) - : TypeDecl(Typedef, DC, L, Id), UnderlyingType(T) {} + IdentifierInfo *Id, DeclaratorInfo *DInfo) + : TypeDecl(Typedef, DC, L, Id), DInfo(DInfo) {} virtual ~TypedefDecl() {} public: static TypedefDecl *Create(ASTContext &C, DeclContext *DC, - SourceLocation L,IdentifierInfo *Id, - QualType T); + SourceLocation L, IdentifierInfo *Id, + DeclaratorInfo *DInfo); + + DeclaratorInfo *getTypeDeclaratorInfo() const { + return DInfo; + } - QualType getUnderlyingType() const { return UnderlyingType; } - void setUnderlyingType(QualType newType) { UnderlyingType = newType; } + QualType getUnderlyingType() const { + return DInfo->getType(); + } + void setTypeDeclaratorInfo(DeclaratorInfo *newType) { + DInfo = newType; + } // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return D->getKind() == Typedef; } Modified: vendor/clang/dist/include/clang/AST/DeclGroup.h ============================================================================== --- vendor/clang/dist/include/clang/AST/DeclGroup.h Wed Nov 4 14:58:56 2009 (r198892) +++ vendor/clang/dist/include/clang/AST/DeclGroup.h Wed Nov 4 15:04:32 2009 (r198893) @@ -14,7 +14,7 @@ #ifndef LLVM_CLANG_AST_DECLGROUP_H #define LLVM_CLANG_AST_DECLGROUP_H -#include "llvm/Support/DataTypes.h" +#include "llvm/System/DataTypes.h" #include namespace clang { Modified: vendor/clang/dist/include/clang/AST/DeclNodes.def ============================================================================== --- vendor/clang/dist/include/clang/AST/DeclNodes.def Wed Nov 4 14:58:56 2009 (r198892) +++ vendor/clang/dist/include/clang/AST/DeclNodes.def Wed Nov 4 15:04:32 2009 (r198893) @@ -103,7 +103,6 @@ ABSTRACT_DECL(Named, Decl) DECL(Var, DeclaratorDecl) DECL(ImplicitParam, VarDecl) DECL(ParmVar, VarDecl) - DECL(OriginalParmVar, ParmVarDecl) DECL(NonTypeTemplateParm, VarDecl) DECL(Template, NamedDecl) DECL(FunctionTemplate, TemplateDecl) Modified: vendor/clang/dist/include/clang/AST/DeclObjC.h ============================================================================== --- vendor/clang/dist/include/clang/AST/DeclObjC.h Wed Nov 4 14:58:56 2009 (r198892) +++ vendor/clang/dist/include/clang/AST/DeclObjC.h Wed Nov 4 15:04:32 2009 (r198893) @@ -347,6 +347,8 @@ public: ObjCIvarDecl *getIvarDecl(IdentifierInfo *Id) const; ObjCPropertyDecl *FindPropertyDeclaration(IdentifierInfo *PropertyId) const; + ObjCPropertyDecl *FindPropertyVisibleInPrimaryClass( + IdentifierInfo *PropertyId) const; // Marks the end of the container. SourceLocation getAtEndLoc() const { return AtEndLoc; } @@ -862,7 +864,7 @@ public: }; class ObjCImplDecl : public ObjCContainerDecl { - /// Class interface for this category implementation + /// Class interface for this class/category implementation ObjCInterfaceDecl *ClassInterface; protected: @@ -935,14 +937,20 @@ public: SourceLocation L, IdentifierInfo *Id, ObjCInterfaceDecl *classInterface); - /// getIdentifier - Get the identifier that names the class + /// getIdentifier - Get the identifier that names the category /// interface associated with this implementation. + /// FIXME: This is a bad API, we are overriding the NamedDecl::getIdentifier() + /// to mean something different. For example: + /// ((NamedDecl *)SomeCategoryImplDecl)->getIdentifier() + /// returns the class interface name, whereas + /// ((ObjCCategoryImplDecl *)SomeCategoryImplDecl)->getIdentifier() + /// returns the category name. IdentifierInfo *getIdentifier() const { return Id; } void setIdentifier(IdentifierInfo *II) { Id = II; } - ObjCCategoryDecl *getCategoryClass() const; + ObjCCategoryDecl *getCategoryDecl() const; /// getName - Get the name of identifier for the class interface associated /// with this implementation as a StringRef. Modified: vendor/clang/dist/include/clang/AST/DeclTemplate.h ============================================================================== --- vendor/clang/dist/include/clang/AST/DeclTemplate.h Wed Nov 4 14:58:56 2009 (r198892) +++ vendor/clang/dist/include/clang/AST/DeclTemplate.h Wed Nov 4 15:04:32 2009 (r198893) @@ -15,8 +15,7 @@ #define LLVM_CLANG_AST_DECLTEMPLATE_H #include "clang/AST/DeclCXX.h" -#include "llvm/ADT/APSInt.h" -#include "llvm/ADT/FoldingSet.h" +#include "clang/AST/TemplateBase.h" #include "llvm/ADT/PointerUnion.h" #include @@ -91,6 +90,13 @@ public: /// arguments or if there is a parameter pack. unsigned getMinRequiredArguments() const; + /// \brief Get the depth of this template parameter list in the set of + /// template parameter lists. + /// + /// The first template parameter list in a declaration will have depth 0, + /// the second template parameter list will have depth 1, etc. + unsigned getDepth() const; + SourceLocation getTemplateLoc() const { return TemplateLoc; } SourceLocation getLAngleLoc() const { return LAngleLoc; } SourceLocation getRAngleLoc() const { return RAngleLoc; } @@ -100,251 +106,6 @@ public: } }; -/// \brief Represents a template argument within a class template -/// specialization. -class TemplateArgument { - union { - uintptr_t TypeOrValue; - struct { - char Value[sizeof(llvm::APSInt)]; - void *Type; - } Integer; - struct { - TemplateArgument *Args; - unsigned NumArgs; - bool CopyArgs; - } Args; - }; - - /// \brief Location of the beginning of this template argument. - SourceLocation StartLoc; - -public: - /// \brief The type of template argument we're storing. - enum ArgKind { - Null = 0, - /// The template argument is a type. Its value is stored in the - /// TypeOrValue field. - Type = 1, - /// The template argument is a declaration - Declaration = 2, - /// The template argument is an integral value stored in an llvm::APSInt. - Integral = 3, - /// The template argument is a value- or type-dependent expression - /// stored in an Expr*. - Expression = 4, - - /// The template argument is actually a parameter pack. Arguments are stored - /// in the Args struct. - Pack = 5 - } Kind; - - /// \brief Construct an empty, invalid template argument. - TemplateArgument() : TypeOrValue(0), StartLoc(), Kind(Null) { } - - /// \brief Construct a template type argument. - TemplateArgument(SourceLocation Loc, QualType T) : Kind(Type) { - TypeOrValue = reinterpret_cast(T.getAsOpaquePtr()); - StartLoc = Loc; - } - - /// \brief Construct a template argument that refers to a - /// declaration, which is either an external declaration or a - /// template declaration. - TemplateArgument(SourceLocation Loc, Decl *D) : Kind(Declaration) { - // FIXME: Need to be sure we have the "canonical" declaration! - TypeOrValue = reinterpret_cast(D); - StartLoc = Loc; - } - - /// \brief Construct an integral constant template argument. - TemplateArgument(SourceLocation Loc, const llvm::APSInt &Value, - QualType Type) - : Kind(Integral) { - new (Integer.Value) llvm::APSInt(Value); - Integer.Type = Type.getAsOpaquePtr(); - StartLoc = Loc; - } - - /// \brief Construct a template argument that is an expression. - /// - /// This form of template argument only occurs in template argument - /// lists used for dependent types and for expression; it will not - /// occur in a non-dependent, canonical template argument list. - TemplateArgument(Expr *E); - - /// \brief Copy constructor for a template argument. - TemplateArgument(const TemplateArgument &Other) : Kind(Other.Kind) { - if (Kind == Integral) { - new (Integer.Value) llvm::APSInt(*Other.getAsIntegral()); - Integer.Type = Other.Integer.Type; - } else if (Kind == Pack) { - Args.NumArgs = Other.Args.NumArgs; - Args.Args = new TemplateArgument[Args.NumArgs]; - for (unsigned I = 0; I != Args.NumArgs; ++I) - Args.Args[I] = Other.Args.Args[I]; - } - else - TypeOrValue = Other.TypeOrValue; - StartLoc = Other.StartLoc; - } - - TemplateArgument& operator=(const TemplateArgument& Other) { - // FIXME: Does not provide the strong guarantee for exception - // safety. - using llvm::APSInt; - - // FIXME: Handle Packs - assert(Kind != Pack && "FIXME: Handle packs"); - assert(Other.Kind != Pack && "FIXME: Handle packs"); - - if (Kind == Other.Kind && Kind == Integral) { - // Copy integral values. - *this->getAsIntegral() = *Other.getAsIntegral(); - Integer.Type = Other.Integer.Type; - } else { - // Destroy the current integral value, if that's what we're holding. - if (Kind == Integral) - getAsIntegral()->~APSInt(); - - Kind = Other.Kind; - - if (Other.Kind == Integral) { - new (Integer.Value) llvm::APSInt(*Other.getAsIntegral()); - Integer.Type = Other.Integer.Type; - } else - TypeOrValue = Other.TypeOrValue; - } - StartLoc = Other.StartLoc; - - return *this; - } - - ~TemplateArgument() { - using llvm::APSInt; - - if (Kind == Integral) - getAsIntegral()->~APSInt(); - else if (Kind == Pack && Args.CopyArgs) - delete[] Args.Args; - } - - /// \brief Return the kind of stored template argument. - ArgKind getKind() const { return Kind; } - - /// \brief Determine whether this template argument has no value. - bool isNull() const { return Kind == Null; } - - /// \brief Retrieve the template argument as a type. - QualType getAsType() const { - if (Kind != Type) - return QualType(); - - return QualType::getFromOpaquePtr(reinterpret_cast(TypeOrValue)); - } - - /// \brief Retrieve the template argument as a declaration. - Decl *getAsDecl() const { - if (Kind != Declaration) - return 0; - return reinterpret_cast(TypeOrValue); - } - - /// \brief Retrieve the template argument as an integral value. - llvm::APSInt *getAsIntegral() { - if (Kind != Integral) - return 0; - return reinterpret_cast(&Integer.Value[0]); - } - - const llvm::APSInt *getAsIntegral() const { - return const_cast(this)->getAsIntegral(); - } - - /// \brief Retrieve the type of the integral value. - QualType getIntegralType() const { - if (Kind != Integral) - return QualType(); - - return QualType::getFromOpaquePtr(Integer.Type); - } - - void setIntegralType(QualType T) { - assert(Kind == Integral && - "Cannot set the integral type of a non-integral template argument"); - Integer.Type = T.getAsOpaquePtr(); - }; - - /// \brief Retrieve the template argument as an expression. - Expr *getAsExpr() const { - if (Kind != Expression) - return 0; - - return reinterpret_cast(TypeOrValue); - } - - /// \brief Iterator that traverses the elements of a template argument pack. - typedef const TemplateArgument * pack_iterator; - - /// \brief Iterator referencing the first argument of a template argument - /// pack. - pack_iterator pack_begin() const { - assert(Kind == Pack); - return Args.Args; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 15:05:29 2009 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 27FC71065672; Wed, 4 Nov 2009 15:05:29 +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 F16D78FC20; Wed, 4 Nov 2009 15:05: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 nA4F5SUe035507; Wed, 4 Nov 2009 15:05:28 GMT (envelope-from rdivacky@svn.freebsd.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4F5SLE035506; Wed, 4 Nov 2009 15:05:28 GMT (envelope-from rdivacky@svn.freebsd.org) Message-Id: <200911041505.nA4F5SLE035506@svn.freebsd.org> From: Roman Divacky Date: Wed, 4 Nov 2009 15:05:28 +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: r198894 - vendor/llvm/llvm-r86025 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, 04 Nov 2009 15:05:29 -0000 Author: rdivacky Date: Wed Nov 4 15:05:28 2009 New Revision: 198894 URL: http://svn.freebsd.org/changeset/base/198894 Log: Tag llvm r86025. Added: vendor/llvm/llvm-r86025/ - copied from r198893, vendor/llvm/dist/ From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 15:05:52 2009 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 0B305106566B; Wed, 4 Nov 2009 15:05:52 +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 D50778FC16; Wed, 4 Nov 2009 15:05: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 nA4F5pnG035557; Wed, 4 Nov 2009 15:05:51 GMT (envelope-from rdivacky@svn.freebsd.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4F5pM3035556; Wed, 4 Nov 2009 15:05:51 GMT (envelope-from rdivacky@svn.freebsd.org) Message-Id: <200911041505.nA4F5pM3035556@svn.freebsd.org> From: Roman Divacky Date: Wed, 4 Nov 2009 15:05:51 +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: r198895 - vendor/clang/clang-r86025 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, 04 Nov 2009 15:05:52 -0000 Author: rdivacky Date: Wed Nov 4 15:05:51 2009 New Revision: 198895 URL: http://svn.freebsd.org/changeset/base/198895 Log: Tag clang r86025. Added: vendor/clang/clang-r86025/ - copied from r198894, vendor/clang/dist/ From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 15:07:56 2009 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 F23D3106568B; Wed, 4 Nov 2009 15:07:55 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id CC70B8FC1F; Wed, 4 Nov 2009 15:07:55 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 5080546B2E; Wed, 4 Nov 2009 10:07:55 -0500 (EST) Date: Wed, 4 Nov 2009 15:07:55 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Attilio Rao In-Reply-To: <200911040132.nA41WxtQ012750@svn.freebsd.org> Message-ID: References: <200911040132.nA41WxtQ012750@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) 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: r198868 - in head/sys: amd64/amd64 i386/i386 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, 04 Nov 2009 15:07:56 -0000 On Wed, 4 Nov 2009, Attilio Rao wrote: > + if (CPUID_TO_FAMILY(cpu_id) == 0xf && CPUID_TO_MODEL(cpu_id) >= 0x20 && > + CPUID_TO_MODEL(cpu_id) <= 0x3f) { > + printf("WARNING: This architecture revision has known SMP " > + "hardware bugs which may cause random instability\n"); > + printf("WARNING: For details see: " > + "http://bugzilla.kernel.org/show_bug.cgi?id=11305\n"); I think the warning is a good idea, but I don't think we should include the URL. We have no control over where it points or what information it will contain in the future. Is there a hardware vendor errata number/document that we can point at instead, or alternatively, can we just leave it with the first warning line? Robert From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 15:10:46 2009 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 EBC79106566C; Wed, 4 Nov 2009 15:10: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 C1D4A8FC21; Wed, 4 Nov 2009 15:10: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 nA4FAksa035765; Wed, 4 Nov 2009 15:10:46 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4FAkCA035763; Wed, 4 Nov 2009 15:10:46 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200911041510.nA4FAkCA035763@svn.freebsd.org> From: Alexander Motin Date: Wed, 4 Nov 2009 15:10: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: r198896 - head/sys/dev/siis 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, 04 Nov 2009 15:10:47 -0000 Author: mav Date: Wed Nov 4 15:10:46 2009 New Revision: 198896 URL: http://svn.freebsd.org/changeset/base/198896 Log: Do not unarm callout on request completion and change slot selection algorithm as done in ahci(4). This saves some CPU time on high request rates. Modified: head/sys/dev/siis/siis.c Modified: head/sys/dev/siis/siis.c ============================================================================== --- head/sys/dev/siis/siis.c Wed Nov 4 15:05:51 2009 (r198895) +++ head/sys/dev/siis/siis.c Wed Nov 4 15:10:46 2009 (r198896) @@ -641,6 +641,7 @@ siis_slotsfree(device_t dev) for (i = 0; i < SIIS_MAX_SLOTS; i++) { struct siis_slot *slot = &ch->slot[i]; + callout_drain(&slot->timeout); if (slot->dma.data_map) { bus_dmamap_destroy(ch->dma.data_tag, slot->dma.data_map); slot->dma.data_map = NULL; @@ -838,15 +839,11 @@ siis_begin_transaction(device_t dev, uni mtx_assert(&ch->mtx, MA_OWNED); /* Choose empty slot. */ tag = ch->lastslot; - do { - tag++; - if (tag >= SIIS_MAX_SLOTS) + while (ch->slot[tag].state != SIIS_SLOT_EMPTY) { + if (++tag >= SIIS_MAX_SLOTS) tag = 0; - if (ch->slot[tag].state == SIIS_SLOT_EMPTY) - break; - } while (tag != ch->lastslot); - if (ch->slot[tag].state != SIIS_SLOT_EMPTY) - device_printf(ch->dev, "ALL SLOTS BUSY!\n"); + KASSERT(tag != ch->lastslot, ("siis: ALL SLOTS BUSY!")); + } ch->lastslot = tag; /* Occupy chosen slot. */ slot = &ch->slot[tag]; @@ -999,6 +996,9 @@ siis_timeout(struct siis_slot *slot) struct siis_channel *ch = device_get_softc(dev); mtx_assert(&ch->mtx, MA_OWNED); + /* Check for stale timeout. */ + if (slot->state < SIIS_SLOT_RUNNING) + return; device_printf(dev, "Timeout on slot %d\n", slot->slot); device_printf(dev, "%s is %08x ss %08x rs %08x es %08x sts %08x serr %08x\n", __func__, ATA_INL(ch->r_mem, SIIS_P_IS), ATA_INL(ch->r_mem, SIIS_P_SS), ch->rslots, @@ -1024,8 +1024,6 @@ siis_end_transaction(struct siis_slot *s union ccb *ccb = slot->ccb; mtx_assert(&ch->mtx, MA_OWNED); - /* Cancel command execution timeout */ - callout_stop(&slot->timeout); bus_dmamap_sync(ch->dma.work_tag, ch->dma.work_map, BUS_DMASYNC_POSTWRITE); /* Read result registers to the result struct From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 15:24:33 2009 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 0348C1065679; Wed, 4 Nov 2009 15:24:33 +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 E53298FC23; Wed, 4 Nov 2009 15:24: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 nA4FOWpk036222; Wed, 4 Nov 2009 15:24:32 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4FOWP0036215; Wed, 4 Nov 2009 15:24:32 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200911041524.nA4FOWP0036215@svn.freebsd.org> From: Alexander Motin Date: Wed, 4 Nov 2009 15:24: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: r198897 - in head: sbin/camcontrol sys/cam/ata 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: Wed, 04 Nov 2009 15:24:33 -0000 Author: mav Date: Wed Nov 4 15:24:32 2009 New Revision: 198897 URL: http://svn.freebsd.org/changeset/base/198897 Log: MFp4: - Add support for sector size > 512 bytes and physical sector of several logical sectors, introduced by ATA-7 specification. - Remove some obsoleted code. Modified: head/sbin/camcontrol/camcontrol.c head/sys/cam/ata/ata_all.c head/sys/cam/ata/ata_all.h head/sys/cam/ata/ata_da.c head/sys/cam/ata/ata_xpt.c head/sys/sys/ata.h Modified: head/sbin/camcontrol/camcontrol.c ============================================================================== --- head/sbin/camcontrol/camcontrol.c Wed Nov 4 15:10:46 2009 (r198896) +++ head/sbin/camcontrol/camcontrol.c Wed Nov 4 15:24:32 2009 (r198897) @@ -1061,6 +1061,10 @@ atacapprint(struct ata_params *parm) printf("cylinders %d\n", parm->cylinders); printf("heads %d\n", parm->heads); printf("sectors/track %d\n", parm->sectors); + printf("sector size logical %u, physical %lu, offset %lu\n", + ata_logical_sector_size(parm), + (unsigned long)ata_physical_sector_size(parm), + (unsigned long)ata_logical_sector_offset(parm)); if (parm->config == ATA_PROTO_CFA || (parm->support.command2 & ATA_SUPPORT_CFA)) Modified: head/sys/cam/ata/ata_all.c ============================================================================== --- head/sys/cam/ata/ata_all.c Wed Nov 4 15:10:46 2009 (r198896) +++ head/sys/cam/ata/ata_all.c Wed Nov 4 15:24:32 2009 (r198897) @@ -271,6 +271,38 @@ ata_print_ident(struct ata_params *ident printf(" device\n"); } +uint32_t +ata_logical_sector_size(struct ata_params *ident_data) +{ + if ((ident_data->pss & 0xc000) == 0x4000 && + (ident_data->pss & ATA_PSS_LSSABOVE512)) { + return ((u_int32_t)ident_data->lss_1 | + ((u_int32_t)ident_data->lss_2 << 16)); + } + return (512); +} + +uint64_t +ata_physical_sector_size(struct ata_params *ident_data) +{ + if ((ident_data->pss & 0xc000) == 0x4000 && + (ident_data->pss & ATA_PSS_MULTLS)) { + return ((uint64_t)ata_logical_sector_size(ident_data) * + (1 << (ident_data->pss & ATA_PSS_LSPPS))); + } + return (512); +} + +uint64_t +ata_logical_sector_offset(struct ata_params *ident_data) +{ + if ((ident_data->lsalign & 0xc000) == 0x4000) { + return ((uint64_t)ata_logical_sector_size(ident_data) * + (ident_data->lsalign & 0x3fff)); + } + return (0); +} + void ata_28bit_cmd(struct ccb_ataio *ataio, uint8_t cmd, uint8_t features, uint32_t lba, uint8_t sector_count) Modified: head/sys/cam/ata/ata_all.h ============================================================================== --- head/sys/cam/ata/ata_all.h Wed Nov 4 15:10:46 2009 (r198896) +++ head/sys/cam/ata/ata_all.h Wed Nov 4 15:24:32 2009 (r198897) @@ -91,6 +91,10 @@ int ata_res_sbuf(struct ccb_ataio *ataio void ata_print_ident(struct ata_params *ident_data); +uint32_t ata_logical_sector_size(struct ata_params *ident_data); +uint64_t ata_physical_sector_size(struct ata_params *ident_data); +uint64_t ata_logical_sector_offset(struct ata_params *ident_data); + void ata_28bit_cmd(struct ccb_ataio *ataio, uint8_t cmd, uint8_t features, uint32_t lba, uint8_t sector_count); void ata_48bit_cmd(struct ccb_ataio *ataio, uint8_t cmd, uint16_t features, Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Wed Nov 4 15:10:46 2009 (r198896) +++ head/sys/cam/ata/ata_da.c Wed Nov 4 15:24:32 2009 (r198897) @@ -95,16 +95,14 @@ typedef enum { struct disk_params { u_int8_t heads; - u_int32_t cylinders; u_int8_t secs_per_track; - u_int32_t secsize; /* Number of bytes/sector */ - u_int64_t sectors; /* total number sectors */ + u_int32_t cylinders; + u_int32_t secsize; /* Number of bytes/logical sector */ + u_int64_t sectors; /* Total number sectors */ }; struct ada_softc { struct bio_queue_head bio_queue; - SLIST_ENTRY(ada_softc) links; - LIST_HEAD(, ccb_hdr) pending_ccbs; ada_state state; ada_flags flags; ada_quirks quirks; @@ -142,7 +140,7 @@ static void adadone(struct cam_periph * union ccb *done_ccb); static int adaerror(union ccb *ccb, u_int32_t cam_flags, u_int32_t sense_flags); -static void adasetgeom(struct cam_periph *periph, +static void adagetparams(struct cam_periph *periph, struct ccb_getdev *cgd); static timeout_t adasendorderedtag; static void adashutdown(void *arg, int howto); @@ -613,7 +611,6 @@ adaregister(struct cam_periph *periph, v return(CAM_REQ_CMP_ERR); } - LIST_INIT(&softc->pending_ccbs); bioq_init(&softc->bio_queue); if (cgd->ident_data.capabilities1 & ATA_SUPPORT_DMA) @@ -658,6 +655,7 @@ adaregister(struct cam_periph *periph, v * Register this media as a disk */ mtx_unlock(periph->sim->mtx); + adagetparams(periph, cgd); softc->disk = disk_alloc(); softc->disk->d_open = adaopen; softc->disk->d_close = adaclose; @@ -671,9 +669,9 @@ adaregister(struct cam_periph *periph, v else if (maxio > MAXPHYS) maxio = MAXPHYS; /* for safety */ if (cgd->ident_data.support.command2 & ATA_SUPPORT_ADDRESS48) - maxio = min(maxio, 65536 * 512); + maxio = min(maxio, 65536 * softc->params.secsize); else /* 28bit ATA command limit */ - maxio = min(maxio, 256 * 512); + maxio = min(maxio, 256 * softc->params.secsize); softc->disk->d_maxsize = maxio; softc->disk->d_unit = periph->unit_number; softc->disk->d_flags = 0; @@ -682,9 +680,12 @@ adaregister(struct cam_periph *periph, v strlcpy(softc->disk->d_ident, cgd->serial_num, MIN(sizeof(softc->disk->d_ident), cgd->serial_num_len + 1)); - adasetgeom(periph, cgd); softc->disk->d_sectorsize = softc->params.secsize; - softc->disk->d_mediasize = softc->params.secsize * (off_t)softc->params.sectors; + softc->disk->d_mediasize = (off_t)softc->params.sectors * + softc->params.secsize; + softc->disk->d_stripesize = ata_physical_sector_size(&cgd->ident_data); + softc->disk->d_stripeoffset = softc->disk->d_stripesize - + ata_logical_sector_offset(&cgd->ident_data); /* XXX: these are not actually "firmware" values, so they may be wrong */ softc->disk->d_fwsectors = softc->params.secs_per_track; softc->disk->d_fwheads = softc->params.heads; @@ -852,19 +853,10 @@ adastart(struct cam_periph *periph, unio break; } start_ccb->ccb_h.ccb_state = ADA_CCB_BUFFER_IO; - - /* - * Block out any asyncronous callbacks - * while we touch the pending ccb list. - */ - LIST_INSERT_HEAD(&softc->pending_ccbs, - &start_ccb->ccb_h, periph_links.le); - softc->outstanding_cmds++; - start_ccb->ccb_h.ccb_bp = bp; - bp = bioq_first(&softc->bio_queue); - + softc->outstanding_cmds++; xpt_action(start_ccb); + bp = bioq_first(&softc->bio_queue); } if (bp != NULL) { @@ -941,12 +933,6 @@ adadone(struct cam_periph *periph, union if (ataio->resid > 0) bp->bio_flags |= BIO_ERROR; } - - /* - * Block out any asyncronous callbacks - * while we touch the pending ccb list. - */ - LIST_REMOVE(&done_ccb->ccb_h, periph_links.le); softc->outstanding_cmds--; if (softc->outstanding_cmds == 0) softc->flags |= ADA_FLAG_WENT_IDLE; @@ -983,14 +969,14 @@ adaerror(union ccb *ccb, u_int32_t cam_f } static void -adasetgeom(struct cam_periph *periph, struct ccb_getdev *cgd) +adagetparams(struct cam_periph *periph, struct ccb_getdev *cgd) { struct ada_softc *softc = (struct ada_softc *)periph->softc; struct disk_params *dp = &softc->params; u_int64_t lbasize48; u_int32_t lbasize; - dp->secsize = 512; + dp->secsize = ata_logical_sector_size(&cgd->ident_data); if ((cgd->ident_data.atavalid & ATA_FLAG_54_58) && cgd->ident_data.current_heads && cgd->ident_data.current_sectors) { dp->heads = cgd->ident_data.current_heads; Modified: head/sys/cam/ata/ata_xpt.c ============================================================================== --- head/sys/cam/ata/ata_xpt.c Wed Nov 4 15:10:46 2009 (r198896) +++ head/sys/cam/ata/ata_xpt.c Wed Nov 4 15:24:32 2009 (r198897) @@ -363,10 +363,12 @@ probestart(struct cam_periph *periph, un cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS; cts.type = CTS_TYPE_CURRENT_SETTINGS; if (path->device->transport == XPORT_ATA) { - cts.xport_specific.ata.bytecount = sectors * 512; + cts.xport_specific.ata.bytecount = sectors * + ata_logical_sector_size(ident_buf); cts.xport_specific.ata.valid = CTS_ATA_VALID_BYTECOUNT; } else { - cts.xport_specific.sata.bytecount = sectors * 512; + cts.xport_specific.sata.bytecount = sectors * + ata_logical_sector_size(ident_buf); cts.xport_specific.sata.valid = CTS_SATA_VALID_BYTECOUNT; } xpt_action((union ccb *)&cts); Modified: head/sys/sys/ata.h ============================================================================== --- head/sys/sys/ata.h Wed Nov 4 15:10:46 2009 (r198896) +++ head/sys/sys/ata.h Wed Nov 4 15:24:32 2009 (r198897) @@ -234,7 +234,7 @@ struct ata_params { /*176*/ u_int8_t media_serial[60]; /*206*/ u_int16_t sct; u_int16_t reserved206[2]; -/*209*/ u_int16_t lbalign; +/*209*/ u_int16_t lsalign; /*210*/ u_int16_t wrv_sectors_m3_1; u_int16_t wrv_sectors_m3_2; /*212*/ u_int16_t wrv_sectors_m2_1; From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 15:25:27 2009 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 0E01D1065672; Wed, 4 Nov 2009 15:25:27 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id BFCB18FC21; Wed, 4 Nov 2009 15:25:26 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 1206B6D41C; Wed, 4 Nov 2009 15:25:26 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id E919D844E9; Wed, 4 Nov 2009 16:25:25 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Attilio Rao References: <200911040132.nA41WxtQ012750@svn.freebsd.org> Date: Wed, 04 Nov 2009 16:25:25 +0100 In-Reply-To: <200911040132.nA41WxtQ012750@svn.freebsd.org> (Attilio Rao's message of "Wed, 4 Nov 2009 01:32:59 +0000 (UTC)") Message-ID: <863a4ugvmi.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r198868 - in head/sys: amd64/amd64 i386/i386 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, 04 Nov 2009 15:25:27 -0000 Attilio Rao writes: > Log: > Opteron rev E family of processor expose a bug where, in very rare > ocassions, memory barriers semantic is not honoured by the hardware > itself. As a result, some random breakage can happen in uninvestigable > ways (for further explanation see at the content of the commit itself). According to the reference you gave, OpenSolaris has a workaround for this issue. Perhaps we should adopt it? DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 15:40:20 2009 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 8FC0D10656EF; Wed, 4 Nov 2009 15:40:20 +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 3CF058FC1B; Wed, 4 Nov 2009 15:40: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 nA4FeKfx036744; Wed, 4 Nov 2009 15:40:20 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4FeKu3036739; Wed, 4 Nov 2009 15:40:20 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200911041540.nA4FeKu3036739@svn.freebsd.org> From: Alexander Motin Date: Wed, 4 Nov 2009 15:40: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: r198899 - in head/sys/cam: . ata scsi 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, 04 Nov 2009 15:40:20 -0000 Author: mav Date: Wed Nov 4 15:40:19 2009 New Revision: 198899 URL: http://svn.freebsd.org/changeset/base/198899 Log: MFp4: - Remove CAM_PERIPH_POLLED flag. It is broken by design. Polling can't be periph flag. May be SIM, may be CCB, but now it works fine just without it. - Remove check unused for at least five years. If we will ever have non-BIO devices in CAM, this check is smallest of what we will need. - If several controllers complete requests same time, call swi_sched() only once. Modified: head/sys/cam/ata/ata_da.c head/sys/cam/cam_periph.h head/sys/cam/cam_xpt.c head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Wed Nov 4 15:27:27 2009 (r198898) +++ head/sys/cam/ata/ata_da.c Wed Nov 4 15:40:19 2009 (r198899) @@ -371,7 +371,6 @@ adadump(void *arg, void *virtual, vm_off } if (length > 0) { - periph->flags |= CAM_PERIPH_POLLED; xpt_setup_ccb(&ccb.ccb_h, periph->path, CAM_PRIORITY_NORMAL); ccb.ccb_h.ccb_state = ADA_CCB_DUMP; cam_fill_ataio(&ccb.ataio, @@ -431,7 +430,6 @@ adadump(void *arg, void *virtual, vm_off /*timeout*/0, /*getcount_only*/0); } - periph->flags &= ~CAM_PERIPH_POLLED; cam_periph_unlock(periph); return (0); } Modified: head/sys/cam/cam_periph.h ============================================================================== --- head/sys/cam/cam_periph.h Wed Nov 4 15:27:27 2009 (r198898) +++ head/sys/cam/cam_periph.h Wed Nov 4 15:40:19 2009 (r198899) @@ -117,7 +117,6 @@ struct cam_periph { #define CAM_PERIPH_INVALID 0x08 #define CAM_PERIPH_NEW_DEV_FOUND 0x10 #define CAM_PERIPH_RECOVERY_INPROG 0x20 -#define CAM_PERIPH_POLLED 0x40 u_int32_t immediate_priority; u_int32_t refcount; SLIST_HEAD(, ccb_hdr) ccb_list; /* For "immediate" requests */ Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Wed Nov 4 15:27:27 2009 (r198898) +++ head/sys/cam/cam_xpt.c Wed Nov 4 15:40:19 2009 (r198899) @@ -4238,6 +4238,7 @@ void xpt_done(union ccb *done_ccb) { struct cam_sim *sim; + int first; CAM_DEBUG(done_ccb->ccb_h.path, CAM_DEBUG_TRACE, ("xpt_done\n")); if ((done_ccb->ccb_h.func_code & XPT_FC_QUEUED) != 0) { @@ -4246,25 +4247,17 @@ xpt_done(union ccb *done_ccb) * any of the "non-immediate" type of ccbs. */ sim = done_ccb->ccb_h.path->bus->sim; - switch (done_ccb->ccb_h.path->periph->type) { - case CAM_PERIPH_BIO: - TAILQ_INSERT_TAIL(&sim->sim_doneq, &done_ccb->ccb_h, - sim_links.tqe); - done_ccb->ccb_h.pinfo.index = CAM_DONEQ_INDEX; - if ((sim->flags & CAM_SIM_ON_DONEQ) == 0) { - mtx_lock(&cam_simq_lock); - TAILQ_INSERT_TAIL(&cam_simq, sim, - links); - mtx_unlock(&cam_simq_lock); - sim->flags |= CAM_SIM_ON_DONEQ; - if ((done_ccb->ccb_h.path->periph->flags & - CAM_PERIPH_POLLED) == 0) - swi_sched(cambio_ih, 0); - } - break; - default: - panic("unknown periph type %d", - done_ccb->ccb_h.path->periph->type); + TAILQ_INSERT_TAIL(&sim->sim_doneq, &done_ccb->ccb_h, + sim_links.tqe); + done_ccb->ccb_h.pinfo.index = CAM_DONEQ_INDEX; + if ((sim->flags & CAM_SIM_ON_DONEQ) == 0) { + mtx_lock(&cam_simq_lock); + first = TAILQ_EMPTY(&cam_simq); + TAILQ_INSERT_TAIL(&cam_simq, sim, links); + mtx_unlock(&cam_simq_lock); + sim->flags |= CAM_SIM_ON_DONEQ; + if (first) + swi_sched(cambio_ih, 0); } } } Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Wed Nov 4 15:27:27 2009 (r198898) +++ head/sys/cam/scsi/scsi_da.c Wed Nov 4 15:40:19 2009 (r198899) @@ -859,7 +859,6 @@ dadump(void *arg, void *virtual, vm_offs } if (length > 0) { - periph->flags |= CAM_PERIPH_POLLED; xpt_setup_ccb(&csio.ccb_h, periph->path, CAM_PRIORITY_NORMAL); csio.ccb_h.ccb_state = DA_CCB_DUMP; scsi_read_write(&csio, @@ -885,7 +884,6 @@ dadump(void *arg, void *virtual, vm_offs else printf("status == 0x%x, scsi status == 0x%x\n", csio.ccb_h.status, csio.scsi_status); - periph->flags |= CAM_PERIPH_POLLED; return(EIO); } cam_periph_unlock(periph); @@ -929,7 +927,6 @@ dadump(void *arg, void *virtual, vm_offs } } } - periph->flags &= ~CAM_PERIPH_POLLED; cam_periph_unlock(periph); return (0); } From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 16:03:48 2009 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 067701065672; Wed, 4 Nov 2009 16:03: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 CEC998FC08; Wed, 4 Nov 2009 16:03: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 nA4G3lBj037421; Wed, 4 Nov 2009 16:03:47 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4G3lZ0037419; Wed, 4 Nov 2009 16:03:47 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200911041603.nA4G3lZ0037419@svn.freebsd.org> From: John Baldwin Date: Wed, 4 Nov 2009 16:03: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: r198900 - stable/8/sbin/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: Wed, 04 Nov 2009 16:03:48 -0000 Author: jhb Date: Wed Nov 4 16:03:47 2009 New Revision: 198900 URL: http://svn.freebsd.org/changeset/base/198900 Log: MFC 198585: When extracting the capture buffer from a crashdump, only read the valid portion of the capture buffer. Modified: stable/8/sbin/ddb/ddb_capture.c Directory Properties: stable/8/sbin/ddb/ (props changed) Modified: stable/8/sbin/ddb/ddb_capture.c ============================================================================== --- stable/8/sbin/ddb/ddb_capture.c Wed Nov 4 15:40:19 2009 (r198899) +++ stable/8/sbin/ddb/ddb_capture.c Wed Nov 4 16:03:47 2009 (r198900) @@ -95,24 +95,24 @@ kread_symbol(kvm_t *kvm, int index, void static void ddb_capture_print_kvm(kvm_t *kvm) { - u_int db_capture_bufsize; + u_int db_capture_bufoff; char *buffer, *db_capture_buf; if (kread_symbol(kvm, X_DB_CAPTURE_BUF, &db_capture_buf, sizeof(db_capture_buf), 0) < 0) errx(-1, "kvm: unable to read db_capture_buf"); - if (kread_symbol(kvm, X_DB_CAPTURE_BUFSIZE, &db_capture_bufsize, - sizeof(db_capture_bufsize), 0) < 0) - errx(-1, "kvm: unable to read db_capture_bufsize"); + if (kread_symbol(kvm, X_DB_CAPTURE_BUFOFF, &db_capture_bufoff, + sizeof(db_capture_bufoff), 0) < 0) + errx(-1, "kvm: unable to read db_capture_bufoff"); - buffer = malloc(db_capture_bufsize + 1); + buffer = malloc(db_capture_bufoff + 1); if (buffer == NULL) - err(-1, "malloc: db_capture_bufsize (%u)", - db_capture_bufsize); - bzero(buffer, db_capture_bufsize + 1); + err(-1, "malloc: db_capture_bufoff (%u)", + db_capture_bufoff); + bzero(buffer, db_capture_bufoff + 1); - if (kread(kvm, db_capture_buf, buffer, db_capture_bufsize, 0) < 0) + if (kread(kvm, db_capture_buf, buffer, db_capture_bufoff, 0) < 0) errx(-1, "kvm: unable to read buffer"); printf("%s\n", buffer); @@ -161,7 +161,7 @@ ddb_capture_status_kvm(kvm_t *kvm) errx(-1, "kvm: unable to read db_capture_bufsize"); if (kread_symbol(kvm, X_DB_CAPTURE_INPROGRESS, &db_capture_inprogress, sizeof(db_capture_inprogress), 0) < 0) - err(-1, "kvm: unable to read db_capture_inpgoress"); + err(-1, "kvm: unable to read db_capture_inprogress"); printf("%u/%u bytes used\n", db_capture_bufoff, db_capture_bufsize); if (db_capture_inprogress) printf("capture is on\n"); From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 16:03:59 2009 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 3E8DF106566C; Wed, 4 Nov 2009 16:03:59 +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 134998FC1E; Wed, 4 Nov 2009 16:03: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 nA4G3wAt037463; Wed, 4 Nov 2009 16:03:58 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4G3wGd037461; Wed, 4 Nov 2009 16:03:58 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200911041603.nA4G3wGd037461@svn.freebsd.org> From: John Baldwin Date: Wed, 4 Nov 2009 16:03:58 +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: r198901 - stable/7/sbin/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: Wed, 04 Nov 2009 16:03:59 -0000 Author: jhb Date: Wed Nov 4 16:03:58 2009 New Revision: 198901 URL: http://svn.freebsd.org/changeset/base/198901 Log: MFC 198585: When extracting the capture buffer from a crashdump, only read the valid portion of the capture buffer. Modified: stable/7/sbin/ddb/ddb_capture.c Directory Properties: stable/7/sbin/ddb/ (props changed) Modified: stable/7/sbin/ddb/ddb_capture.c ============================================================================== --- stable/7/sbin/ddb/ddb_capture.c Wed Nov 4 16:03:47 2009 (r198900) +++ stable/7/sbin/ddb/ddb_capture.c Wed Nov 4 16:03:58 2009 (r198901) @@ -95,24 +95,24 @@ kread_symbol(kvm_t *kvm, int index, void static void ddb_capture_print_kvm(kvm_t *kvm) { - u_int db_capture_bufsize; + u_int db_capture_bufoff; char *buffer, *db_capture_buf; if (kread_symbol(kvm, X_DB_CAPTURE_BUF, &db_capture_buf, sizeof(db_capture_buf), 0) < 0) errx(-1, "kvm: unable to read db_capture_buf"); - if (kread_symbol(kvm, X_DB_CAPTURE_BUFSIZE, &db_capture_bufsize, - sizeof(db_capture_bufsize), 0) < 0) - errx(-1, "kvm: unable to read db_capture_bufsize"); + if (kread_symbol(kvm, X_DB_CAPTURE_BUFOFF, &db_capture_bufoff, + sizeof(db_capture_bufoff), 0) < 0) + errx(-1, "kvm: unable to read db_capture_bufoff"); - buffer = malloc(db_capture_bufsize + 1); + buffer = malloc(db_capture_bufoff + 1); if (buffer == NULL) - err(-1, "malloc: db_capture_bufsize (%u)", - db_capture_bufsize); - bzero(buffer, db_capture_bufsize + 1); + err(-1, "malloc: db_capture_bufoff (%u)", + db_capture_bufoff); + bzero(buffer, db_capture_bufoff + 1); - if (kread(kvm, db_capture_buf, buffer, db_capture_bufsize, 0) < 0) + if (kread(kvm, db_capture_buf, buffer, db_capture_bufoff, 0) < 0) errx(-1, "kvm: unable to read buffer"); printf("%s\n", buffer); @@ -161,7 +161,7 @@ ddb_capture_status_kvm(kvm_t *kvm) errx(-1, "kvm: unable to read db_capture_bufsize"); if (kread_symbol(kvm, X_DB_CAPTURE_INPROGRESS, &db_capture_inprogress, sizeof(db_capture_inprogress), 0) < 0) - err(-1, "kvm: unable to read db_capture_inpgoress"); + err(-1, "kvm: unable to read db_capture_inprogress"); printf("%u/%u bytes used\n", db_capture_bufoff, db_capture_bufsize); if (db_capture_inprogress) printf("capture is on\n"); From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 16:04:02 2009 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 50EE91065693; Wed, 4 Nov 2009 16:04:02 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.156]) by mx1.freebsd.org (Postfix) with ESMTP id 5E61D8FC08; Wed, 4 Nov 2009 16:04:01 +0000 (UTC) Received: by fg-out-1718.google.com with SMTP id d23so1607674fga.13 for ; Wed, 04 Nov 2009 08:04:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type; bh=4ZcGnqzb6dH7R2J02TkknhHIohhkmPbFUnGQrq7dFQg=; b=NLQYpeoB3EYPppt+BViaghNWJ+0fXlADc7ZC//afDxJrEZKylJEuFvgNG39EjnvIDz tVAEucUncd1bLACMd7ejNrHCldF7axG0A2vZlLbVI+xpG8av0yAVf5R9DnHTeCZm/yWu yzD9PkpRzrKuPLf2+H/WZ/XxvMGvD26yZ1a0I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=VaTvGFXZL1Gj2kv1wRcq81SPBsw5+SZrK0QoZ1ecs21/fS/GOQn7D0/EORBFy3+fNJ ezJ5i7bE443T5xOTT1BuTxxX61SaE7fWFbqdSzSuzPRc0ciJful9Un2PbH/MiTVuk23d l14rl2FZ1ZiHZqjUejOAaVmm2OGvGueS+tEno= MIME-Version: 1.0 Sender: asmrookie@gmail.com Received: by 10.223.17.144 with SMTP id s16mr222422faa.41.1257350640304; Wed, 04 Nov 2009 08:04:00 -0800 (PST) In-Reply-To: References: <200911040132.nA41WxtQ012750@svn.freebsd.org> Date: Wed, 4 Nov 2009 17:04:00 +0100 X-Google-Sender-Auth: 2c0123bc7d3c7cc2 Message-ID: <3bbf2fe10911040804p6419778bgc363951104adb76e@mail.gmail.com> From: Attilio Rao To: Robert Watson Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r198868 - in head/sys: amd64/amd64 i386/i386 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, 04 Nov 2009 16:04:02 -0000 2009/11/4, Robert Watson : > > On Wed, 4 Nov 2009, Attilio Rao wrote: > > > + if (CPUID_TO_FAMILY(cpu_id) == 0xf && CPUID_TO_MODEL(cpu_id) >= > 0x20 && > > + CPUID_TO_MODEL(cpu_id) <= 0x3f) { > > + printf("WARNING: This architecture revision has known SMP > " > > + "hardware bugs which may cause random instability\n"); > > + printf("WARNING: For details see: " > > + > "http://bugzilla.kernel.org/show_bug.cgi?id=11305\n"); > > > > I think the warning is a good idea, but I don't think we should include the > URL. We have no control over where it points or what information it will > contain in the future. Is there a hardware vendor errata number/document > that we can point at instead, or alternatively, can we just leave it with > the first warning line? I tried to look for an errata pdf from AMD, but I've been unable to locate one and that's the only 'close' reference I could find. I'm fine with stripping the link, through, I actually wasn't very eager to add it, I just did for a complete reference. Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 16:05:10 2009 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 228F11065692; Wed, 4 Nov 2009 16:05:10 +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 10EFF8FC3C; Wed, 4 Nov 2009 16:05:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA4G59Kv037561; Wed, 4 Nov 2009 16:05:09 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4G59o6037559; Wed, 4 Nov 2009 16:05:09 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200911041605.nA4G59o6037559@svn.freebsd.org> From: John Baldwin Date: Wed, 4 Nov 2009 16:05:09 +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: r198902 - stable/8/usr.sbin/crashinfo 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, 04 Nov 2009 16:05:10 -0000 Author: jhb Date: Wed Nov 4 16:05:09 2009 New Revision: 198902 URL: http://svn.freebsd.org/changeset/base/198902 Log: MFC 198586: Include the output of the ddb(4) capture buffer. Modified: stable/8/usr.sbin/crashinfo/crashinfo.sh Directory Properties: stable/8/usr.sbin/crashinfo/ (props changed) Modified: stable/8/usr.sbin/crashinfo/crashinfo.sh ============================================================================== --- stable/8/usr.sbin/crashinfo/crashinfo.sh Wed Nov 4 16:03:58 2009 (r198901) +++ stable/8/usr.sbin/crashinfo/crashinfo.sh Wed Nov 4 16:05:09 2009 (r198902) @@ -304,3 +304,10 @@ echo "---------------------------------- echo "kernel config" echo config -x $KERNEL + +echo +echo "------------------------------------------------------------------------" +echo "ddb capture buffer" +echo + +ddb capture -M $VMCORE -N $KERNEL print From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 16:05:18 2009 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 ED39A106568B; Wed, 4 Nov 2009 16:05:18 +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 DC05A8FC1D; Wed, 4 Nov 2009 16:05: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 nA4G5ITm037600; Wed, 4 Nov 2009 16:05:18 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4G5I57037598; Wed, 4 Nov 2009 16:05:18 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200911041605.nA4G5I57037598@svn.freebsd.org> From: John Baldwin Date: Wed, 4 Nov 2009 16:05:18 +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: r198903 - stable/7/usr.sbin/crashinfo 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, 04 Nov 2009 16:05:19 -0000 Author: jhb Date: Wed Nov 4 16:05:18 2009 New Revision: 198903 URL: http://svn.freebsd.org/changeset/base/198903 Log: MFC 198586: Include the output of the ddb(4) capture buffer. Modified: stable/7/usr.sbin/crashinfo/crashinfo.sh Directory Properties: stable/7/usr.sbin/crashinfo/ (props changed) Modified: stable/7/usr.sbin/crashinfo/crashinfo.sh ============================================================================== --- stable/7/usr.sbin/crashinfo/crashinfo.sh Wed Nov 4 16:05:09 2009 (r198902) +++ stable/7/usr.sbin/crashinfo/crashinfo.sh Wed Nov 4 16:05:18 2009 (r198903) @@ -304,3 +304,10 @@ echo "---------------------------------- echo "kernel config" echo config -x $KERNEL + +echo +echo "------------------------------------------------------------------------" +echo "ddb capture buffer" +echo + +ddb capture -M $VMCORE -N $KERNEL print From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 16:06:02 2009 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 CA77C106568B; Wed, 4 Nov 2009 16:06:02 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-bw0-f213.google.com (mail-bw0-f213.google.com [209.85.218.213]) by mx1.freebsd.org (Postfix) with ESMTP id 08F988FC29; Wed, 4 Nov 2009 16:06:01 +0000 (UTC) Received: by bwz5 with SMTP id 5so9259480bwz.3 for ; Wed, 04 Nov 2009 08:06:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=2e/aYQ0xPnNW12fqq95fTDx7cEwhTpjXUb+dO74/qCw=; b=XPPxqErEH8NACQE3yyPlNQEA9zhjwtxvOzrTkF3vq6c8jhKd3Q5kRYA1w2kjl7mPkR EwxGE2ru4bW79IaD7dLEdN6mwU4leUt/MC+VjvEua9ixonVXKkYg1IUaeIvXr8nSF0qX PDpHzm14GXn0gS+YlR3WTKEsswwO6FFPWdHwU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=g92b3sBLUeApJDHn9KunGyI+TSGZqf1nYZI+tP69JYxJzeXoueKlNtsxDZeu8MMTn4 dy/F0FcxSVN4OFvkhN/BF78HkLwpdqoBr5pC4JLrbD0suJcy7MMnvvxY71hELuB1z7e1 Am7eWBwBqc3Z9bJMNXAgKcR+oSKaTcQDzyQAk= MIME-Version: 1.0 Sender: asmrookie@gmail.com Received: by 10.223.4.137 with SMTP id 9mr245686far.95.1257350760732; Wed, 04 Nov 2009 08:06:00 -0800 (PST) In-Reply-To: <863a4ugvmi.fsf@ds4.des.no> References: <200911040132.nA41WxtQ012750@svn.freebsd.org> <863a4ugvmi.fsf@ds4.des.no> Date: Wed, 4 Nov 2009 17:06:00 +0100 X-Google-Sender-Auth: 369e3cebfc72c5eb Message-ID: <3bbf2fe10911040806l7293ab6l99cce51ea9d7a64c@mail.gmail.com> From: Attilio Rao To: =?UTF-8?Q?Dag=2DErling_Sm=C3=B8rgrav?= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r198868 - in head/sys: amd64/amd64 i386/i386 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, 04 Nov 2009 16:06:02 -0000 2009/11/4, Dag-Erling Sm=C3=B8rgrav : > Attilio Rao writes: > > Log: > > Opteron rev E family of processor expose a bug where, in very rare > > ocassions, memory barriers semantic is not honoured by the hardware > > itself. As a result, some random breakage can happen in uninvestigabl= e > > ways (for further explanation see at the content of the commit itself= ). > > According to the reference you gave, OpenSolaris has a workaround for > this issue. Perhaps we should adopt it? IIRC, based on what I readed on-line, it could be still a WARNING msg, but I didn't double-check for it. On the other side, a possible complete solution would involve a boot-time patching mechanism, but we don't have it right now (differently from Linux) or disabling the SMP support, but it seems mostly a too heavy loss of performance due to the rarely appearence of the bug itself. I think the WARNING msg is a good compromise to all these other approaches. Attilio --=20 Peace can only be achieved by understanding - A. Einstein From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 16:06:38 2009 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 BBB2910656A9; Wed, 4 Nov 2009 16:06:38 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-bw0-f213.google.com (mail-bw0-f213.google.com [209.85.218.213]) by mx1.freebsd.org (Postfix) with ESMTP id D849B8FC30; Wed, 4 Nov 2009 16:06:37 +0000 (UTC) Received: by bwz5 with SMTP id 5so9260169bwz.3 for ; Wed, 04 Nov 2009 08:06:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type; bh=zj1iyIXz2AWPAdorvE2ogt1ZSYMhLEALHRSHYmCUmko=; b=qWtIYdYRkQCzXEK6co4d9kFMnN678KnisWRUHOMoaRy0zlFCPb4IH4U8vZOr+ROSiu hP/uKUEWTM9yXVDCLi7eTncJoIwrd5PuYzR9rid254efmClrtyWuEsmwjeELMS7JN6JW E82Bc8ysFeOHp+x1MnpUIqllipR3pCLBdBnFI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=bN+i5alEOREHhhvpvUyEPvOo7hjRAtUz11Y3Qss+MWeul/WTsGK8x/ISUlFSP98F6D Kcoeum2CPbGVBlFPx8s2/ghugHYxu+cfEF4zazsP0XDZzAcvo3p/o0kS6IqM+SH1Atey FsVfESM1ZIUp2+8bePL+Ghg2FewxhQdp9tjtI= MIME-Version: 1.0 Sender: asmrookie@gmail.com Received: by 10.223.161.215 with SMTP id s23mr234223fax.44.1257350796479; Wed, 04 Nov 2009 08:06:36 -0800 (PST) In-Reply-To: <20091104144315.GH2331@deviant.kiev.zoral.com.ua> References: <200911040132.nA41WxtQ012750@svn.freebsd.org> <20091104055811.GY1293@hoeg.nl> <3bbf2fe10911040449j5938ca7eqca5829ceced66f48@mail.gmail.com> <20091104144315.GH2331@deviant.kiev.zoral.com.ua> Date: Wed, 4 Nov 2009 17:06:36 +0100 X-Google-Sender-Auth: 36394d47c77d16f5 Message-ID: <3bbf2fe10911040806r37f00a8dq2aa3ccd1e5c7b241@mail.gmail.com> From: Attilio Rao To: Kostik Belousov Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, Ed Schouten , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r198868 - in head/sys: amd64/amd64 i386/i386 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, 04 Nov 2009 16:06:38 -0000 2009/11/4, Kostik Belousov : > On Wed, Nov 04, 2009 at 01:49:41PM +0100, Attilio Rao wrote: > > 2009/11/4 Ed Schouten : > > > Hi Attilio, > > > > > > * Attilio Rao wrote: > > >> Opteron rev E family of processor expose a bug where, in very rare > > >> ocassions, memory barriers semantic is not honoured by the hardware > > >> itself. As a result, some random breakage can happen in uninvestigable > > >> ways (for further explanation see at the content of the commit itself). > > > > > > Ooh. Sounds like an interesting bug. > > > > > > The bug doesn't manifest itself on UP, right? If so, maybe we should add > > > some very short instructions to the warning on how to disable SMP. > > > > Due to the semantic of the bug, I think that it can manifest itself on > > UP and a memory barrier failing on UP means that PREEMPTION can blow > > up. Considering this I wouldn't suggest anything different between the > > UP vs SMP case. > > CPU is always self-consistent, isn't it ? > > Also, I very much dislike idea of making our kernel a collection of > references to the man pages and URLs, esp. when URL point to the > resource not controlled by the project. Ok, as long as you are in favor of stripping the URL, I'm fine with it. Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 16:09:07 2009 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 D9A6F106566B; Wed, 4 Nov 2009 16:09:07 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 97E578FC0C; Wed, 4 Nov 2009 16:09:07 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 26A476D44C; Wed, 4 Nov 2009 16:09:06 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 02215844E9; Wed, 4 Nov 2009 17:09:05 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Attilio Rao References: <200911040132.nA41WxtQ012750@svn.freebsd.org> <863a4ugvmi.fsf@ds4.des.no> <3bbf2fe10911040806l7293ab6l99cce51ea9d7a64c@mail.gmail.com> Date: Wed, 04 Nov 2009 17:09:05 +0100 In-Reply-To: <3bbf2fe10911040806l7293ab6l99cce51ea9d7a64c@mail.gmail.com> (Attilio Rao's message of "Wed, 4 Nov 2009 17:06:00 +0100") Message-ID: <86y6mmff1a.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r198868 - in head/sys: amd64/amd64 i386/i386 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, 04 Nov 2009 16:09:07 -0000 Attilio Rao writes: > Dag-Erling Sm=C3=B8rgrav writes: > > According to the reference you gave, OpenSolaris has a workaround for > > this issue. Perhaps we should adopt it? > IIRC, based on what I readed on-line, it could be still a WARNING msg, > but I didn't double-check for it. Uh, apparently, it can be worked around with an additional lfence instruction... See the first couple of comments on that bugzilla page you linked to. If the cost is too high, we could make it conditional on "options BROKEN_OPTERON_E" or something. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 16:11:21 2009 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 A8CBB106568D; Wed, 4 Nov 2009 16:11:21 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 811D18FC16; Wed, 4 Nov 2009 16:11:21 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id EF8DE46B0D; Wed, 4 Nov 2009 11:11:20 -0500 (EST) Date: Wed, 4 Nov 2009 16:11:20 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Attilio Rao In-Reply-To: <3bbf2fe10911040804p6419778bgc363951104adb76e@mail.gmail.com> Message-ID: References: <200911040132.nA41WxtQ012750@svn.freebsd.org> <3bbf2fe10911040804p6419778bgc363951104adb76e@mail.gmail.com> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) 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: r198868 - in head/sys: amd64/amd64 i386/i386 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, 04 Nov 2009 16:11:21 -0000 On Wed, 4 Nov 2009, Attilio Rao wrote: >> I think the warning is a good idea, but I don't think we should include the >> URL. We have no control over where it points or what information it will >> contain in the future. Is there a hardware vendor errata number/document >> that we can point at instead, or alternatively, can we just leave it with >> the first warning line? > > I tried to look for an errata pdf from AMD, but I've been unable to locate > one and that's the only 'close' reference I could find. I'm fine with > stripping the link, through, I actually wasn't very eager to add it, I just > did for a complete reference. I'm fine with it in a source comment, just not sure about kernel output. Robert From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 16:15:30 2009 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 C8A44106566C; Wed, 4 Nov 2009 16:15:30 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-fx0-f227.google.com (mail-fx0-f227.google.com [209.85.220.227]) by mx1.freebsd.org (Postfix) with ESMTP id 0DC418FC13; Wed, 4 Nov 2009 16:15:29 +0000 (UTC) Received: by fxm27 with SMTP id 27so83255fxm.3 for ; Wed, 04 Nov 2009 08:15:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=gUndf19vxbMHV+XRcUU2OB5dXEasEOTVfqw+q4MlsCw=; b=qc/vRqlPQDl2+tADDbwiLeYrk2ikiALIjNFJNibAEfK+IHHc8vIIbqwlmuolYg0tKh CBraxu+RRVK08ZwdmkaHBgcv5eK5ZrimuL7uTIRax9jo6ZUiOlljiMnkb5Nr5iv7mVN9 HG5JiHxwPbGqfwcRzu2gvOcnLSb2GXVM3pXpg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=XeTAXgva8rsLx3+LMMuHbDnY1nbkYIaEXQFoTJOvIH0U5IUlt7s2a6FGKgVObm7xAk jlFCd4RpmknXrj8gbhOf+yMmuo2JGXnxq5H+b7Ewvymo5lz8Vv7Ki6oElt+jXq9QL2ut yOKIGynvjmK2uMGXyEEQEUy93Uvp9iJR0abm4= MIME-Version: 1.0 Sender: asmrookie@gmail.com Received: by 10.223.17.144 with SMTP id s16mr224504faa.41.1257351328909; Wed, 04 Nov 2009 08:15:28 -0800 (PST) In-Reply-To: <86y6mmff1a.fsf@ds4.des.no> References: <200911040132.nA41WxtQ012750@svn.freebsd.org> <863a4ugvmi.fsf@ds4.des.no> <3bbf2fe10911040806l7293ab6l99cce51ea9d7a64c@mail.gmail.com> <86y6mmff1a.fsf@ds4.des.no> Date: Wed, 4 Nov 2009 17:15:28 +0100 X-Google-Sender-Auth: 6b10b77bd85edd3a Message-ID: <3bbf2fe10911040815u780ea5d5h8252b46ddf0c5de7@mail.gmail.com> From: Attilio Rao To: =?UTF-8?Q?Dag=2DErling_Sm=C3=B8rgrav?= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r198868 - in head/sys: amd64/amd64 i386/i386 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, 04 Nov 2009 16:15:30 -0000 2009/11/4, Dag-Erling Sm=C3=B8rgrav : > Attilio Rao writes: > > Dag-Erling Sm=C3=B8rgrav writes: > > > According to the reference you gave, OpenSolaris has a workaround for > > > this issue. Perhaps we should adopt it? > > IIRC, based on what I readed on-line, it could be still a WARNING msg, > > but I didn't double-check for it. > > Uh, apparently, it can be worked around with an additional lfence > instruction... See the first couple of comments on that bugzilla page > you linked to. If the cost is too high, we could make it conditional on > "options BROKEN_OPTERON_E" or something. Yeah but the lfence is completely impratical from the overhead POV -- and actually I don't like the idea to add a compile time option based on family/model. We could maybe do a mixed approach: printout the WARNING msg only if the BROKEN_OPTERON_E is not used otherwise be ok. I still don't like it because it is going to dirty the atomic.h code a bit, but it can be an acceptable compromise. Attilio --=20 Peace can only be achieved by understanding - A. Einstein From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 16:16:51 2009 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 2AF83106568F; Wed, 4 Nov 2009 16:16:51 +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 1A3898FC1E; Wed, 4 Nov 2009 16:16: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 nA4GGpfa037972; Wed, 4 Nov 2009 16:16:51 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4GGo1B037970; Wed, 4 Nov 2009 16:16:50 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200911041616.nA4GGo1B037970@svn.freebsd.org> From: Alexander Motin Date: Wed, 4 Nov 2009 16:16: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: r198904 - head/sys/cam/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: Wed, 04 Nov 2009 16:16:51 -0000 Author: mav Date: Wed Nov 4 16:16:50 2009 New Revision: 198904 URL: http://svn.freebsd.org/changeset/base/198904 Log: PMP commands use short format. PMP write doesn't return result. Modified: head/sys/cam/ata/ata_all.c Modified: head/sys/cam/ata/ata_all.c ============================================================================== --- head/sys/cam/ata/ata_all.c Wed Nov 4 16:05:18 2009 (r198903) +++ head/sys/cam/ata/ata_all.c Wed Nov 4 16:16:50 2009 (r198904) @@ -368,30 +368,24 @@ void ata_pm_read_cmd(struct ccb_ataio *ataio, int reg, int port) { bzero(&ataio->cmd, sizeof(ataio->cmd)); - ataio->cmd.flags = CAM_ATAIO_48BIT | CAM_ATAIO_NEEDRESULT; + ataio->cmd.flags = CAM_ATAIO_NEEDRESULT; ataio->cmd.command = ATA_READ_PM; ataio->cmd.features = reg; - ataio->cmd.features_exp = reg >> 8; ataio->cmd.device = port & 0x0f; } void -ata_pm_write_cmd(struct ccb_ataio *ataio, int reg, int port, uint64_t val) +ata_pm_write_cmd(struct ccb_ataio *ataio, int reg, int port, uint32_t val) { bzero(&ataio->cmd, sizeof(ataio->cmd)); - ataio->cmd.flags = CAM_ATAIO_48BIT | CAM_ATAIO_NEEDRESULT; + ataio->cmd.flags = 0; ataio->cmd.command = ATA_WRITE_PM; ataio->cmd.features = reg; + ataio->cmd.sector_count = val; ataio->cmd.lba_low = val >> 8; ataio->cmd.lba_mid = val >> 16; ataio->cmd.lba_high = val >> 24; ataio->cmd.device = port & 0x0f; - ataio->cmd.lba_low_exp = val >> 40; - ataio->cmd.lba_mid_exp = val >> 48; - ataio->cmd.lba_high_exp = val >> 56; - ataio->cmd.features_exp = reg >> 8; - ataio->cmd.sector_count = val; - ataio->cmd.sector_count_exp = val >> 32; } void From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 16:37:13 2009 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 7EB03106566B; Wed, 4 Nov 2009 16:37:13 +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 6E0D38FC13; Wed, 4 Nov 2009 16:37: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 nA4GbDZi038524; Wed, 4 Nov 2009 16:37:13 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4GbDCk038522; Wed, 4 Nov 2009 16:37:13 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200911041637.nA4GbDCk038522@svn.freebsd.org> From: Alexander Motin Date: Wed, 4 Nov 2009 16:37: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: r198905 - head/sys/cam/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: Wed, 04 Nov 2009 16:37:13 -0000 Author: mav Date: Wed Nov 4 16:37:13 2009 New Revision: 198905 URL: http://svn.freebsd.org/changeset/base/198905 Log: Fix protype. Modified: head/sys/cam/ata/ata_all.h Modified: head/sys/cam/ata/ata_all.h ============================================================================== --- head/sys/cam/ata/ata_all.h Wed Nov 4 16:16:50 2009 (r198904) +++ head/sys/cam/ata/ata_all.h Wed Nov 4 16:37:13 2009 (r198905) @@ -103,7 +103,7 @@ void ata_ncq_cmd(struct ccb_ataio *ataio uint64_t lba, uint16_t sector_count); void ata_reset_cmd(struct ccb_ataio *ataio); void ata_pm_read_cmd(struct ccb_ataio *ataio, int reg, int port); -void ata_pm_write_cmd(struct ccb_ataio *ataio, int reg, int port, uint64_t val); +void ata_pm_write_cmd(struct ccb_ataio *ataio, int reg, int port, uint32_t val); void ata_bswap(int8_t *buf, int len); void ata_btrim(int8_t *buf, int len); From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 16:57:13 2009 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 40EF01065676; Wed, 4 Nov 2009 16:57: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 168EF8FC13; Wed, 4 Nov 2009 16:57: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 nA4GvCOI039096; Wed, 4 Nov 2009 16:57:12 GMT (envelope-from rdivacky@svn.freebsd.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4GvCT0039095; Wed, 4 Nov 2009 16:57:12 GMT (envelope-from rdivacky@svn.freebsd.org) Message-Id: <200911041657.nA4GvCT0039095@svn.freebsd.org> From: Roman Divacky Date: Wed, 4 Nov 2009 16:57: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: r198906 - vendor/llvm/dist/lib/Transforms/Utils 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, 04 Nov 2009 16:57:13 -0000 Author: rdivacky Date: Wed Nov 4 16:57:12 2009 New Revision: 198906 URL: http://svn.freebsd.org/changeset/base/198906 Log: Delete this file. Deleted: vendor/llvm/dist/lib/Transforms/Utils/LowerAllocations.cpp From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 16:58:26 2009 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 B234C106566B; Wed, 4 Nov 2009 16:58:26 +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 A0AF98FC0A; Wed, 4 Nov 2009 16:58: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 nA4GwQH6039186; Wed, 4 Nov 2009 16:58:26 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4GwQSB039184; Wed, 4 Nov 2009 16:58:26 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200911041658.nA4GwQSB039184@svn.freebsd.org> From: John Baldwin Date: Wed, 4 Nov 2009 16:58:26 +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: r198907 - stable/8/sys/dev/ppbus 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, 04 Nov 2009 16:58:26 -0000 Author: jhb Date: Wed Nov 4 16:58:26 2009 New Revision: 198907 URL: http://svn.freebsd.org/changeset/base/198907 Log: MFC 197772: When the timeout backoff hits the maximum value, leave it capped at the maximum value rather than setting it to the result of a boolean expression that is always true. Modified: stable/8/sys/dev/ppbus/lpt.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/ppbus/lpt.c ============================================================================== --- stable/8/sys/dev/ppbus/lpt.c Wed Nov 4 16:57:12 2009 (r198906) +++ stable/8/sys/dev/ppbus/lpt.c Wed Nov 4 16:58:26 2009 (r198907) @@ -456,7 +456,7 @@ lptout(void *arg) if (sc->sc_state & OPEN) { sc->sc_backoff++; if (sc->sc_backoff > hz/LPTOUTMAX) - sc->sc_backoff = sc->sc_backoff > hz/LPTOUTMAX; + sc->sc_backoff = hz/LPTOUTMAX; callout_reset(&sc->sc_timer, sc->sc_backoff, lptout, sc); } else sc->sc_state &= ~TOUT; From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 16:59:21 2009 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 9A93B1065693; Wed, 4 Nov 2009 16:59: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 891C58FC0C; Wed, 4 Nov 2009 16:59: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 nA4GxL8c039246; Wed, 4 Nov 2009 16:59:21 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4GxL7n039244; Wed, 4 Nov 2009 16:59:21 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200911041659.nA4GxL7n039244@svn.freebsd.org> From: John Baldwin Date: Wed, 4 Nov 2009 16:59:21 +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: r198908 - stable/7/sys/dev/ppbus 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, 04 Nov 2009 16:59:21 -0000 Author: jhb Date: Wed Nov 4 16:59:21 2009 New Revision: 198908 URL: http://svn.freebsd.org/changeset/base/198908 Log: MFC 197772: When the timeout backoff hits the maximum value, leave it capped at the maximum value rather than setting it to the result of a boolean expression that is always true. Modified: stable/7/sys/dev/ppbus/lpt.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/ppbus/lpt.c ============================================================================== --- stable/7/sys/dev/ppbus/lpt.c Wed Nov 4 16:58:26 2009 (r198907) +++ stable/7/sys/dev/ppbus/lpt.c Wed Nov 4 16:59:21 2009 (r198908) @@ -437,7 +437,7 @@ lptout(void *arg) if (sc->sc_state & OPEN) { sc->sc_backoff++; if (sc->sc_backoff > hz/LPTOUTMAX) - sc->sc_backoff = sc->sc_backoff > hz/LPTOUTMAX; + sc->sc_backoff = hz/LPTOUTMAX; timeout(lptout, (caddr_t)dev, sc->sc_backoff); } else sc->sc_state &= ~TOUT; From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 17:30:49 2009 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 392B71065696; Wed, 4 Nov 2009 17:30:49 +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 287E08FC0A; Wed, 4 Nov 2009 17:30: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 nA4HUn12040152; Wed, 4 Nov 2009 17:30:49 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4HUnjW040150; Wed, 4 Nov 2009 17:30:49 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <200911041730.nA4HUnjW040150@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 4 Nov 2009 17:30: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: r198911 - 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: Wed, 04 Nov 2009 17:30:49 -0000 Author: jkim Date: Wed Nov 4 17:30:48 2009 New Revision: 198911 URL: http://svn.freebsd.org/changeset/base/198911 Log: Do not probe video mode if we are not going to use it. Modified: head/sys/dev/fb/vesa.c Modified: head/sys/dev/fb/vesa.c ============================================================================== --- head/sys/dev/fb/vesa.c Wed Nov 4 17:00:24 2009 (r198910) +++ head/sys/dev/fb/vesa.c Wed Nov 4 17:30:48 2009 (r198911) @@ -1450,10 +1450,11 @@ vesa_load_state(video_adapter_t *adp, vo * If the current mode is not the same, probably it was powered down. * Try BIOS POST to restore a sane state. */ - mode = vesa_bios_get_current_mode(); - if (mode >= 0 && (mode & 0x1ff) != adp->va_mode && - VESA_MODE(adp->va_mode)) - (void)vesa_bios_post(); + if (VESA_MODE(adp->va_mode)) { + mode = vesa_bios_get_current_mode(); + if (mode >= 0 && (mode & 0x1ff) != adp->va_mode) + (void)vesa_bios_post(); + } ret = vesa_bios_save_restore(STATE_LOAD, ((adp_state_t *)p)->regs, vesa_state_buf_size); @@ -1461,9 +1462,10 @@ vesa_load_state(video_adapter_t *adp, vo /* * If the desired mode is not restored, force setting the mode. */ - mode = vesa_bios_get_current_mode(); - if (mode >= 0 && (mode & 0x1ff) != adp->va_mode && - VESA_MODE(adp->va_mode)) { + if (VESA_MODE(adp->va_mode)) { + mode = vesa_bios_get_current_mode(); + if (mode < 0 || (mode & 0x1ff) == adp->va_mode) + return (ret); mode = adp->va_mode; flags = adp->va_info.vi_flags; if ((flags & V_INFO_GRAPHICS) != 0 && From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 18:03:19 2009 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 B82791065670; Wed, 4 Nov 2009 18:03:19 +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 A5B5F8FC08; Wed, 4 Nov 2009 18:03: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 nA4I3J54041045; Wed, 4 Nov 2009 18:03:19 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4I3JuB041043; Wed, 4 Nov 2009 18:03:19 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200911041803.nA4I3JuB041043@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 4 Nov 2009 18:03:19 +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: r198912 - stable/7/sys/dev/fxp 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, 04 Nov 2009 18:03:19 -0000 Author: yongari Date: Wed Nov 4 18:03:19 2009 New Revision: 198912 URL: http://svn.freebsd.org/changeset/base/198912 Log: MFC r193875: Controller will dma SCB command status for a given command and driver should read updated status back after issuing a SCB command. To send a command to controller and read updated status back, driver should synchronize both memory read and write operations with device. Fix bus_dmamap_sync operation specifier used in fxp_dma_wait() by adding both memory read and memory write operations. Modified: stable/7/sys/dev/fxp/if_fxp.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/fxp/if_fxp.c ============================================================================== --- stable/7/sys/dev/fxp/if_fxp.c Wed Nov 4 17:30:48 2009 (r198911) +++ stable/7/sys/dev/fxp/if_fxp.c Wed Nov 4 18:03:19 2009 (r198912) @@ -348,12 +348,14 @@ static void fxp_dma_wait(struct fxp_softc *sc, volatile uint16_t *status, bus_dma_tag_t dmat, bus_dmamap_t map) { - int i = 10000; + int i; - bus_dmamap_sync(dmat, map, BUS_DMASYNC_POSTREAD); - while (!(le16toh(*status) & FXP_CB_STATUS_C) && --i) { + for (i = 10000; i > 0; i--) { DELAY(2); - bus_dmamap_sync(dmat, map, BUS_DMASYNC_POSTREAD); + bus_dmamap_sync(dmat, map, + BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); + if ((le16toh(*status) & FXP_CB_STATUS_C) != 0) + break; } if (i == 0) device_printf(sc->dev, "DMA timeout\n"); @@ -2222,13 +2224,12 @@ fxp_init_body(struct fxp_softc *sc) * Start the multicast setup command. */ fxp_scb_wait(sc); - bus_dmamap_sync(sc->mcs_tag, sc->mcs_map, BUS_DMASYNC_PREWRITE); + bus_dmamap_sync(sc->mcs_tag, sc->mcs_map, + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); CSR_WRITE_4(sc, FXP_CSR_SCB_GENERAL, sc->mcs_addr); fxp_scb_cmd(sc, FXP_SCB_COMMAND_CU_START); /* ...and wait for it to complete. */ fxp_dma_wait(sc, &mcsp->cb_status, sc->mcs_tag, sc->mcs_map); - bus_dmamap_sync(sc->mcs_tag, sc->mcs_map, - BUS_DMASYNC_POSTWRITE); } /* @@ -2336,12 +2337,12 @@ fxp_init_body(struct fxp_softc *sc) * Start the config command/DMA. */ fxp_scb_wait(sc); - bus_dmamap_sync(sc->cbl_tag, sc->cbl_map, BUS_DMASYNC_PREWRITE); + bus_dmamap_sync(sc->cbl_tag, sc->cbl_map, + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); CSR_WRITE_4(sc, FXP_CSR_SCB_GENERAL, sc->fxp_desc.cbl_addr); fxp_scb_cmd(sc, FXP_SCB_COMMAND_CU_START); /* ...and wait for it to complete. */ fxp_dma_wait(sc, &cbp->cb_status, sc->cbl_tag, sc->cbl_map); - bus_dmamap_sync(sc->cbl_tag, sc->cbl_map, BUS_DMASYNC_POSTWRITE); /* * Now initialize the station address. Temporarily use the TxCB @@ -2357,11 +2358,11 @@ fxp_init_body(struct fxp_softc *sc) * Start the IAS (Individual Address Setup) command/DMA. */ fxp_scb_wait(sc); - bus_dmamap_sync(sc->cbl_tag, sc->cbl_map, BUS_DMASYNC_PREWRITE); + bus_dmamap_sync(sc->cbl_tag, sc->cbl_map, + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); fxp_scb_cmd(sc, FXP_SCB_COMMAND_CU_START); /* ...and wait for it to complete. */ fxp_dma_wait(sc, &cb_ias->cb_status, sc->cbl_tag, sc->cbl_map); - bus_dmamap_sync(sc->cbl_tag, sc->cbl_map, BUS_DMASYNC_POSTWRITE); /* * Initialize transmit control block (TxCB) list. @@ -3006,12 +3007,12 @@ fxp_load_ucode(struct fxp_softc *sc) * Download the ucode to the chip. */ fxp_scb_wait(sc); - bus_dmamap_sync(sc->cbl_tag, sc->cbl_map, BUS_DMASYNC_PREWRITE); + bus_dmamap_sync(sc->cbl_tag, sc->cbl_map, + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); CSR_WRITE_4(sc, FXP_CSR_SCB_GENERAL, sc->fxp_desc.cbl_addr); fxp_scb_cmd(sc, FXP_SCB_COMMAND_CU_START); /* ...and wait for it to complete. */ fxp_dma_wait(sc, &cbp->cb_status, sc->cbl_tag, sc->cbl_map); - bus_dmamap_sync(sc->cbl_tag, sc->cbl_map, BUS_DMASYNC_POSTWRITE); device_printf(sc->dev, "Microcode loaded, int_delay: %d usec bundle_max: %d\n", sc->tunable_int_delay, From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 18:07:09 2009 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 D9CD61065672; Wed, 4 Nov 2009 18:07:09 +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 C6EA38FC16; Wed, 4 Nov 2009 18:07:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA4I79SU041182; Wed, 4 Nov 2009 18:07:09 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4I79MQ041179; Wed, 4 Nov 2009 18:07:09 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200911041807.nA4I79MQ041179@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 4 Nov 2009 18:07:09 +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: r198913 - stable/7/sys/dev/fxp 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, 04 Nov 2009 18:07:10 -0000 Author: yongari Date: Wed Nov 4 18:07:09 2009 New Revision: 198913 URL: http://svn.freebsd.org/changeset/base/198913 Log: MFC r194569: Introduce Rx mbuf dma tag and use it in Rx path. Previously it used common mbuf dma tag for both Tx and Rx path but Rx buffer should have single DMA segment and maximum buffer size of the segment should be less than MCLBYTES. fxp(4) also have to check Tx completion status which was updated by DMA so we need BUS_DMASYNC_PREREAD and BUS_DMASYNC_POSTWRITE synchronization in Tx path. Fix all misuse of bus_dmamap_sync(9) in fxp(4). I guess this change shall fix occasional driver breakage in PAE environments. While I'm here add error messages of dma tag/buffer creation and correct messages. Modified: stable/7/sys/dev/fxp/if_fxp.c stable/7/sys/dev/fxp/if_fxpvar.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/fxp/if_fxp.c ============================================================================== --- stable/7/sys/dev/fxp/if_fxp.c Wed Nov 4 18:03:19 2009 (r198912) +++ stable/7/sys/dev/fxp/if_fxp.c Wed Nov 4 18:07:09 2009 (r198913) @@ -643,9 +643,18 @@ fxp_attach(device_t dev) BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, sc->maxsegsize * sc->maxtxseg + sizeof(struct ether_vlan_header), sc->maxtxseg, sc->maxsegsize, 0, - busdma_lock_mutex, &Giant, &sc->fxp_mtag); + busdma_lock_mutex, &Giant, &sc->fxp_txmtag); if (error) { - device_printf(dev, "could not allocate dma tag\n"); + device_printf(dev, "could not create TX DMA tag\n"); + goto fail; + } + + error = bus_dma_tag_create(bus_get_dma_tag(dev), 2, 0, + BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, + MCLBYTES, 1, MCLBYTES, 0, + busdma_lock_mutex, &Giant, &sc->fxp_rxmtag); + if (error) { + device_printf(dev, "could not create RX DMA tag\n"); goto fail; } @@ -654,18 +663,20 @@ fxp_attach(device_t dev) sizeof(struct fxp_stats), 1, sizeof(struct fxp_stats), 0, busdma_lock_mutex, &Giant, &sc->fxp_stag); if (error) { - device_printf(dev, "could not allocate dma tag\n"); + device_printf(dev, "could not create stats DMA tag\n"); goto fail; } error = bus_dmamem_alloc(sc->fxp_stag, (void **)&sc->fxp_stats, BUS_DMA_NOWAIT | BUS_DMA_ZERO, &sc->fxp_smap); - if (error) + if (error) { + device_printf(dev, "could not allocate stats DMA memory\n"); goto fail; + } error = bus_dmamap_load(sc->fxp_stag, sc->fxp_smap, sc->fxp_stats, sizeof(struct fxp_stats), fxp_dma_map_addr, &sc->stats_addr, 0); if (error) { - device_printf(dev, "could not map the stats buffer\n"); + device_printf(dev, "could not load the stats DMA buffer\n"); goto fail; } @@ -674,20 +685,22 @@ fxp_attach(device_t dev) FXP_TXCB_SZ, 1, FXP_TXCB_SZ, 0, busdma_lock_mutex, &Giant, &sc->cbl_tag); if (error) { - device_printf(dev, "could not allocate dma tag\n"); + device_printf(dev, "could not create TxCB DMA tag\n"); goto fail; } error = bus_dmamem_alloc(sc->cbl_tag, (void **)&sc->fxp_desc.cbl_list, BUS_DMA_NOWAIT | BUS_DMA_ZERO, &sc->cbl_map); - if (error) + if (error) { + device_printf(dev, "could not allocate TxCB DMA memory\n"); goto fail; + } error = bus_dmamap_load(sc->cbl_tag, sc->cbl_map, sc->fxp_desc.cbl_list, FXP_TXCB_SZ, fxp_dma_map_addr, &sc->fxp_desc.cbl_addr, 0); if (error) { - device_printf(dev, "could not map DMA memory\n"); + device_printf(dev, "could not load TxCB DMA buffer\n"); goto fail; } @@ -696,18 +709,23 @@ fxp_attach(device_t dev) sizeof(struct fxp_cb_mcs), 1, sizeof(struct fxp_cb_mcs), 0, busdma_lock_mutex, &Giant, &sc->mcs_tag); if (error) { - device_printf(dev, "could not allocate dma tag\n"); + device_printf(dev, + "could not create multicast setup DMA tag\n"); goto fail; } error = bus_dmamem_alloc(sc->mcs_tag, (void **)&sc->mcsp, - BUS_DMA_NOWAIT, &sc->mcs_map); - if (error) + BUS_DMA_NOWAIT | BUS_DMA_ZERO, &sc->mcs_map); + if (error) { + device_printf(dev, + "could not allocate multicast setup DMA memory\n"); goto fail; + } error = bus_dmamap_load(sc->mcs_tag, sc->mcs_map, sc->mcsp, sizeof(struct fxp_cb_mcs), fxp_dma_map_addr, &sc->mcs_addr, 0); if (error) { - device_printf(dev, "can't map the multicast setup command\n"); + device_printf(dev, + "can't load the multicast setup DMA buffer\n"); goto fail; } @@ -719,13 +737,13 @@ fxp_attach(device_t dev) tcbp = sc->fxp_desc.cbl_list; for (i = 0; i < FXP_NTXCB; i++) { txp[i].tx_cb = tcbp + i; - error = bus_dmamap_create(sc->fxp_mtag, 0, &txp[i].tx_map); + error = bus_dmamap_create(sc->fxp_txmtag, 0, &txp[i].tx_map); if (error) { device_printf(dev, "can't create DMA map for TX\n"); goto fail; } } - error = bus_dmamap_create(sc->fxp_mtag, 0, &sc->spare_map); + error = bus_dmamap_create(sc->fxp_rxmtag, 0, &sc->spare_map); if (error) { device_printf(dev, "can't create spare DMA map\n"); goto fail; @@ -737,7 +755,7 @@ fxp_attach(device_t dev) sc->fxp_desc.rx_head = sc->fxp_desc.rx_tail = NULL; for (i = 0; i < FXP_NRFABUFS; i++) { rxp = &sc->fxp_desc.rx_list[i]; - error = bus_dmamap_create(sc->fxp_mtag, 0, &rxp->rx_map); + error = bus_dmamap_create(sc->fxp_rxmtag, 0, &rxp->rx_map); if (error) { device_printf(dev, "can't create DMA map for RX\n"); goto fail; @@ -911,29 +929,32 @@ fxp_release(struct fxp_softc *sc) bus_dmamem_free(sc->mcs_tag, sc->mcsp, sc->mcs_map); } bus_release_resources(sc->dev, sc->fxp_spec, sc->fxp_res); - if (sc->fxp_mtag) { + if (sc->fxp_rxmtag) { for (i = 0; i < FXP_NRFABUFS; i++) { rxp = &sc->fxp_desc.rx_list[i]; if (rxp->rx_mbuf != NULL) { - bus_dmamap_sync(sc->fxp_mtag, rxp->rx_map, + bus_dmamap_sync(sc->fxp_rxmtag, rxp->rx_map, BUS_DMASYNC_POSTREAD); - bus_dmamap_unload(sc->fxp_mtag, rxp->rx_map); + bus_dmamap_unload(sc->fxp_rxmtag, rxp->rx_map); m_freem(rxp->rx_mbuf); } - bus_dmamap_destroy(sc->fxp_mtag, rxp->rx_map); + bus_dmamap_destroy(sc->fxp_rxmtag, rxp->rx_map); } - bus_dmamap_destroy(sc->fxp_mtag, sc->spare_map); + bus_dmamap_destroy(sc->fxp_rxmtag, sc->spare_map); + bus_dma_tag_destroy(sc->fxp_rxmtag); + } + if (sc->fxp_txmtag) { for (i = 0; i < FXP_NTXCB; i++) { txp = &sc->fxp_desc.tx_list[i]; if (txp->tx_mbuf != NULL) { - bus_dmamap_sync(sc->fxp_mtag, txp->tx_map, + bus_dmamap_sync(sc->fxp_txmtag, txp->tx_map, BUS_DMASYNC_POSTWRITE); - bus_dmamap_unload(sc->fxp_mtag, txp->tx_map); + bus_dmamap_unload(sc->fxp_txmtag, txp->tx_map); m_freem(txp->tx_mbuf); } - bus_dmamap_destroy(sc->fxp_mtag, txp->tx_map); + bus_dmamap_destroy(sc->fxp_txmtag, txp->tx_map); } - bus_dma_tag_destroy(sc->fxp_mtag); + bus_dma_tag_destroy(sc->fxp_txmtag); } if (sc->fxp_stag) bus_dma_tag_destroy(sc->fxp_stag); @@ -1325,7 +1346,8 @@ fxp_start_body(struct ifnet *ifp) * going again if suspended. */ if (txqueued > 0) { - bus_dmamap_sync(sc->cbl_tag, sc->cbl_map, BUS_DMASYNC_PREWRITE); + bus_dmamap_sync(sc->cbl_tag, sc->cbl_map, + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); fxp_scb_wait(sc); fxp_scb_cmd(sc, FXP_SCB_COMMAND_CU_RESUME); /* @@ -1499,7 +1521,7 @@ fxp_encap(struct fxp_softc *sc, struct m *m_head = m; } - error = bus_dmamap_load_mbuf_sg(sc->fxp_mtag, txp->tx_map, *m_head, + error = bus_dmamap_load_mbuf_sg(sc->fxp_txmtag, txp->tx_map, *m_head, segs, &nseg, 0); if (error == EFBIG) { m = m_collapse(*m_head, M_DONTWAIT, sc->maxtxseg); @@ -1509,7 +1531,7 @@ fxp_encap(struct fxp_softc *sc, struct m return (ENOMEM); } *m_head = m; - error = bus_dmamap_load_mbuf_sg(sc->fxp_mtag, txp->tx_map, + error = bus_dmamap_load_mbuf_sg(sc->fxp_txmtag, txp->tx_map, *m_head, segs, &nseg, 0); if (error != 0) { m_freem(*m_head); @@ -1525,7 +1547,7 @@ fxp_encap(struct fxp_softc *sc, struct m } KASSERT(nseg <= sc->maxtxseg, ("too many DMA segments")); - bus_dmamap_sync(sc->fxp_mtag, txp->tx_map, BUS_DMASYNC_PREWRITE); + bus_dmamap_sync(sc->fxp_txmtag, txp->tx_map, BUS_DMASYNC_PREWRITE); cbp = txp->tx_cb; for (i = 0; i < nseg; i++) { @@ -1705,14 +1727,15 @@ fxp_txeof(struct fxp_softc *sc) struct fxp_tx *txp; ifp = sc->ifp; - bus_dmamap_sync(sc->cbl_tag, sc->cbl_map, BUS_DMASYNC_PREREAD); + bus_dmamap_sync(sc->cbl_tag, sc->cbl_map, + BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); for (txp = sc->fxp_desc.tx_first; sc->tx_queued && (le16toh(txp->tx_cb->cb_status) & FXP_CB_STATUS_C) != 0; txp = txp->tx_next) { if (txp->tx_mbuf != NULL) { - bus_dmamap_sync(sc->fxp_mtag, txp->tx_map, + bus_dmamap_sync(sc->fxp_txmtag, txp->tx_map, BUS_DMASYNC_POSTWRITE); - bus_dmamap_unload(sc->fxp_mtag, txp->tx_map); + bus_dmamap_unload(sc->fxp_txmtag, txp->tx_map); m_freem(txp->tx_mbuf); txp->tx_mbuf = NULL; /* clear this to reset csum offload bits */ @@ -1722,7 +1745,8 @@ fxp_txeof(struct fxp_softc *sc) ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; } sc->fxp_desc.tx_first = txp; - bus_dmamap_sync(sc->cbl_tag, sc->cbl_map, BUS_DMASYNC_PREWRITE); + bus_dmamap_sync(sc->cbl_tag, sc->cbl_map, + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); if (sc->tx_queued == 0) { sc->watchdog_timer = 0; if (sc->need_mcsetup) @@ -1874,7 +1898,7 @@ fxp_intr_body(struct fxp_softc *sc, stru m = rxp->rx_mbuf; rfa = (struct fxp_rfa *)(m->m_ext.ext_buf + RFA_ALIGNMENT_FUDGE); - bus_dmamap_sync(sc->fxp_mtag, rxp->rx_map, + bus_dmamap_sync(sc->fxp_rxmtag, rxp->rx_map, BUS_DMASYNC_POSTREAD); #ifdef DEVICE_POLLING /* loop at most count times if count >=0 */ @@ -2107,9 +2131,10 @@ fxp_stop(struct fxp_softc *sc) if (txp != NULL) { for (i = 0; i < FXP_NTXCB; i++) { if (txp[i].tx_mbuf != NULL) { - bus_dmamap_sync(sc->fxp_mtag, txp[i].tx_map, + bus_dmamap_sync(sc->fxp_txmtag, txp[i].tx_map, BUS_DMASYNC_POSTWRITE); - bus_dmamap_unload(sc->fxp_mtag, txp[i].tx_map); + bus_dmamap_unload(sc->fxp_txmtag, + txp[i].tx_map); m_freem(txp[i].tx_mbuf); txp[i].tx_mbuf = NULL; /* clear this to reset csum offload bits */ @@ -2117,7 +2142,8 @@ fxp_stop(struct fxp_softc *sc) } } } - bus_dmamap_sync(sc->cbl_tag, sc->cbl_map, BUS_DMASYNC_PREWRITE); + bus_dmamap_sync(sc->cbl_tag, sc->cbl_map, + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); sc->tx_queued = 0; } @@ -2389,7 +2415,8 @@ fxp_init_body(struct fxp_softc *sc) * unit. It will execute the NOP and then suspend. */ tcbp->cb_command = htole16(FXP_CB_COMMAND_NOP | FXP_CB_COMMAND_S); - bus_dmamap_sync(sc->cbl_tag, sc->cbl_map, BUS_DMASYNC_PREWRITE); + bus_dmamap_sync(sc->cbl_tag, sc->cbl_map, + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); sc->fxp_desc.tx_first = sc->fxp_desc.tx_last = txp; sc->tx_queued = 1; @@ -2539,7 +2566,7 @@ fxp_new_rfabuf(struct fxp_softc *sc, str le32enc(&rfa->rbd_addr, 0xffffffff); /* Map the RFA into DMA memory. */ - error = bus_dmamap_load(sc->fxp_mtag, sc->spare_map, rfa, + error = bus_dmamap_load(sc->fxp_rxmtag, sc->spare_map, rfa, MCLBYTES - RFA_ALIGNMENT_FUDGE, fxp_dma_map_addr, &rxp->rx_addr, 0); if (error) { @@ -2548,13 +2575,13 @@ fxp_new_rfabuf(struct fxp_softc *sc, str } if (rxp->rx_mbuf != NULL) - bus_dmamap_unload(sc->fxp_mtag, rxp->rx_map); + bus_dmamap_unload(sc->fxp_rxmtag, rxp->rx_map); tmp_map = sc->spare_map; sc->spare_map = rxp->rx_map; rxp->rx_map = tmp_map; rxp->rx_mbuf = m; - bus_dmamap_sync(sc->fxp_mtag, rxp->rx_map, + bus_dmamap_sync(sc->fxp_rxmtag, rxp->rx_map, BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); return (0); } @@ -2576,7 +2603,7 @@ fxp_add_rfabuf(struct fxp_softc *sc, str p_rx->rx_next = rxp; le32enc(&p_rfa->link_addr, rxp->rx_addr); p_rfa->rfa_control = 0; - bus_dmamap_sync(sc->fxp_mtag, p_rx->rx_map, + bus_dmamap_sync(sc->fxp_rxmtag, p_rx->rx_map, BUS_DMASYNC_PREWRITE); } else { rxp->rx_next = NULL; @@ -2620,7 +2647,7 @@ fxp_discard_rfabuf(struct fxp_softc *sc, le32enc(&rfa->link_addr, 0xffffffff); le32enc(&rfa->rbd_addr, 0xffffffff); - bus_dmamap_sync(sc->fxp_mtag, rxp->rx_map, + bus_dmamap_sync(sc->fxp_rxmtag, rxp->rx_map, BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); } @@ -2939,7 +2966,8 @@ fxp_mc_setup(struct fxp_softc *sc) * Start the multicast setup command. */ fxp_scb_wait(sc); - bus_dmamap_sync(sc->mcs_tag, sc->mcs_map, BUS_DMASYNC_PREWRITE); + bus_dmamap_sync(sc->mcs_tag, sc->mcs_map, + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); CSR_WRITE_4(sc, FXP_CSR_SCB_GENERAL, sc->mcs_addr); fxp_scb_cmd(sc, FXP_SCB_COMMAND_CU_START); Modified: stable/7/sys/dev/fxp/if_fxpvar.h ============================================================================== --- stable/7/sys/dev/fxp/if_fxpvar.h Wed Nov 4 18:03:19 2009 (r198912) +++ stable/7/sys/dev/fxp/if_fxpvar.h Wed Nov 4 18:07:09 2009 (r198913) @@ -152,7 +152,8 @@ struct fxp_softc { struct resource_spec *fxp_spec; /* the resource spec we used */ void *ih; /* interrupt handler cookie */ struct mtx sc_mtx; - bus_dma_tag_t fxp_mtag; /* bus DMA tag for mbufs */ + bus_dma_tag_t fxp_txmtag; /* bus DMA tag for Tx mbufs */ + bus_dma_tag_t fxp_rxmtag; /* bus DMA tag for Rx mbufs */ bus_dma_tag_t fxp_stag; /* bus DMA tag for stats */ bus_dmamap_t fxp_smap; /* bus DMA map for stats */ bus_dma_tag_t cbl_tag; /* DMA tag for the TxCB list */ From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 18:08:54 2009 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 1845C106568D; Wed, 4 Nov 2009 18:08:54 +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 06B008FC08; Wed, 4 Nov 2009 18:08:54 +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 nA4I8reu041267; Wed, 4 Nov 2009 18:08:53 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4I8raU041265; Wed, 4 Nov 2009 18:08:53 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200911041808.nA4I8raU041265@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 4 Nov 2009 18:08: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: r198914 - stable/7/sys/dev/fxp 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, 04 Nov 2009 18:08:54 -0000 Author: yongari Date: Wed Nov 4 18:08:53 2009 New Revision: 198914 URL: http://svn.freebsd.org/changeset/base/198914 Log: MFC r194570: Due to possible PCI bus lock-up issues fxp(4) didn't perform full hardware reset in attach phase. Selective reset does not clear configured parameters so I think full hardware reset is required. To prevent PCI bus lock-up, do selective reset first which will get off the controller from PCI bus and request software reset after selective reset. Software reset will unmask interrupts so disable it after the reset. Modified: stable/7/sys/dev/fxp/if_fxp.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/fxp/if_fxp.c ============================================================================== --- stable/7/sys/dev/fxp/if_fxp.c Wed Nov 4 18:07:09 2009 (r198913) +++ stable/7/sys/dev/fxp/if_fxp.c Wed Nov 4 18:08:53 2009 (r198914) @@ -467,10 +467,14 @@ fxp_attach(device_t dev) } /* - * Reset to a stable state. + * Put CU/RU idle state and prepare full reset. */ CSR_WRITE_4(sc, FXP_CSR_PORT, FXP_PORT_SELECTIVE_RESET); DELAY(10); + /* Full reset and disable interrupts. */ + CSR_WRITE_4(sc, FXP_CSR_PORT, FXP_PORT_SOFTWARE_RESET); + DELAY(10); + CSR_WRITE_1(sc, FXP_CSR_SCB_INTRCNTL, FXP_SCB_INTR_DISABLE); /* * Find out how large of an SEEPROM we have. From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 18:14:20 2009 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 284B01065670; Wed, 4 Nov 2009 18:14:20 +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 16A1F8FC15; Wed, 4 Nov 2009 18:14: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 nA4IEJGk041453; Wed, 4 Nov 2009 18:14:19 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4IEJoY041450; Wed, 4 Nov 2009 18:14:19 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200911041814.nA4IEJoY041450@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 4 Nov 2009 18:14:19 +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: r198915 - stable/7/sys/dev/fxp 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, 04 Nov 2009 18:14:20 -0000 Author: yongari Date: Wed Nov 4 18:14:19 2009 New Revision: 198915 URL: http://svn.freebsd.org/changeset/base/198915 Log: MFC r194571: Don't blindly enable Rx lock-up workaround. Newer chips do not need the Rx lock-up workaround. Obtained from: NetBSD Modified: stable/7/sys/dev/fxp/if_fxp.c stable/7/sys/dev/fxp/if_fxpvar.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/fxp/if_fxp.c ============================================================================== --- stable/7/sys/dev/fxp/if_fxp.c Wed Nov 4 18:08:53 2009 (r198914) +++ stable/7/sys/dev/fxp/if_fxp.c Wed Nov 4 18:14:19 2009 (r198915) @@ -501,6 +501,13 @@ fxp_attach(device_t dev) sc->flags |= FXP_FLAG_WOLCAP; } + /* Receiver lock-up workaround detection. */ + fxp_read_eeprom(sc, &data, 3, 1); + if ((data & 0x03) != 0x03) { + sc->flags |= FXP_FLAG_RXBUG; + device_printf(dev, "Enabling Rx lock-up workaround\n"); + } + /* * Determine whether we must use the 503 serial interface. */ @@ -2015,7 +2022,7 @@ fxp_tick(void *xsc) if (sp->rx_good) { ifp->if_ipackets += le32toh(sp->rx_good); sc->rx_idle_secs = 0; - } else { + } else if (sc->flags & FXP_FLAG_RXBUG) { /* * Receiver's been idle for another second. */ Modified: stable/7/sys/dev/fxp/if_fxpvar.h ============================================================================== --- stable/7/sys/dev/fxp/if_fxpvar.h Wed Nov 4 18:08:53 2009 (r198914) +++ stable/7/sys/dev/fxp/if_fxpvar.h Wed Nov 4 18:14:19 2009 (r198915) @@ -204,6 +204,7 @@ struct fxp_softc { #define FXP_FLAG_82559_RXCSUM 0x1000 /* 82559 compatible RX checksum */ #define FXP_FLAG_WOLCAP 0x2000 /* WOL capability */ #define FXP_FLAG_WOL 0x4000 /* WOL active */ +#define FXP_FLAG_RXBUG 0x8000 /* Rx lock-up bug */ /* Macros to ease CSR access. */ #define CSR_READ_1(sc, reg) bus_read_1(sc->fxp_res[0], reg) From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 18:16:13 2009 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 0B1F61065670; Wed, 4 Nov 2009 18:16:13 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mx1.wheel.pl (grom.wheel.pl [91.121.70.66]) by mx1.freebsd.org (Postfix) with ESMTP id 94E028FC22; Wed, 4 Nov 2009 18:16:12 +0000 (UTC) Received: from localhost (unknown [10.10.2.1]) by mx1.wheel.pl (Postfix) with ESMTP id D9833C314; Wed, 4 Nov 2009 19:00:46 +0100 (CET) X-Virus-Scanned: amavisd-new at mx1.wheel.pl Received: from mx1.wheel.pl ([10.10.2.1]) by localhost (mx1.wheel.pl [10.10.2.1]) (amavisd-new, port 10024) with ESMTP id LY3EAep3v02M; Wed, 4 Nov 2009 19:00:45 +0100 (CET) Received: from mail.wheel.pl (ghf58.internetdsl.tpnet.pl [83.12.187.58]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.wheel.pl (Postfix) with ESMTPS id 4298CC30E; Wed, 4 Nov 2009 19:00:45 +0100 (CET) Received: from localhost (unknown [10.0.2.3]) by mail.wheel.pl (Postfix) with ESMTP id 507B13E3FE; Wed, 4 Nov 2009 19:00:44 +0100 (CET) Received: from mail.wheel.pl ([10.0.2.3]) by localhost (mx2.wheel.pl [10.0.2.3]) (amavisd-new, port 10024) with ESMTP id e0YDNhoKu7RA; Wed, 4 Nov 2009 19:00:41 +0100 (CET) Received: from [192.168.1.100] (45.81.datacomsa.pl [195.34.81.45]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.wheel.pl (Postfix) with ESMTP id 717063E3F7; Wed, 4 Nov 2009 19:00:40 +0100 (CET) Mime-Version: 1.0 (Apple Message framework v1076) Content-Type: text/plain; charset=iso-8859-2; format=flowed; delsp=yes From: =?iso-8859-2?Q?Edward_Tomasz_Napiera=B3a?= In-Reply-To: <20091104070427.GE2073@garage.freebsd.pl> Date: Wed, 4 Nov 2009 19:00:38 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <32B76852-3EA3-4814-A8B8-954CC510DAA3@FreeBSD.org> References: <200911040648.nA46mYrb021862@svn.freebsd.org> <20091104070427.GE2073@garage.freebsd.pl> To: Pawel Jakub Dawidek X-Mailer: Apple Mail (2.1076) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r198874 - 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: Wed, 04 Nov 2009 18:16:13 -0000 Wiadomo=B6=E6 napisana przez Pawel Jakub Dawidek w dniu 2009-11-04, o =20= godz. 08:04: > On Wed, Nov 04, 2009 at 06:48:34AM +0000, Edward Tomasz Napierala =20 > wrote: >> Author: trasz >> Date: Wed Nov 4 06:48:34 2009 >> New Revision: 198874 >> URL: http://svn.freebsd.org/changeset/base/198874 >> >> Log: >> Make sure we don't end up with VAPPEND without VWRITE, if someone =20= >> calls open(2) >> like this: open(..., O_APPEND). >> >> Modified: >> head/sys/kern/vfs_vnops.c >> >> Modified: head/sys/kern/vfs_vnops.c >> =3D=20 >> =3D=20 >> =3D=20 >> =3D=20 >> =3D=20 >> =3D=20 >> =3D=20 >> =3D=20 >> =3D=20 >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> --- head/sys/kern/vfs_vnops.c Wed Nov 4 06:47:14 2009 = (r198873) >> +++ head/sys/kern/vfs_vnops.c Wed Nov 4 06:48:34 2009 = (r198874) >> @@ -213,7 +213,7 @@ restart: >> if (fmode & FEXEC) >> accmode |=3D VEXEC; >> if (fmode & O_APPEND) >> - accmode |=3D VAPPEND; >> + accmode |=3D VWRITE | VAPPEND; >> #ifdef MAC >> error =3D mac_vnode_check_open(cred, vp, accmode); >> if (error) > > Why? If someone does O_APPEND only we don't want to give him write > access... As it is now, VAPPEND is not a real V* flag - it's a kind of modifier =20= to VWRITE. Which means that it doesn't really make sense, from the conceptual =20 point of view, to have VAPPEND without VWRITE being set at the same time. This =20 doesn't break things right now - at least I don't know about any such breakage - but =20= in the future I'd like to have a few KASSERTs to verify that VAPPEND is never =20= specified without VWRITE, just to make sure something unexpected doesn't happen =20= somewhere. As it is now, doing open(..., O_APPEND) will result in a =20 filedescriptor open for... reading. So, the change above would change the behaviour. =20 What about something like this instead: Index: vfs_vnops.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- vfs_vnops.c (revision 198876) +++ vfs_vnops.c (working copy) @@ -212,7 +212,7 @@ accmode |=3D VREAD; if (fmode & FEXEC) accmode |=3D VEXEC; - if (fmode & O_APPEND) + if ((fmode & O_APPEND) && (fmode & FWRITE)) accmode |=3D VAPPEND; #ifdef MAC error =3D mac_vnode_check_open(cred, vp, accmode); -- If you cut off my head, what would I say? Me and my head, or me and =20 my body? From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 18:17:23 2009 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 999C11065672; Wed, 4 Nov 2009 18:17:23 +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 644E28FC15; Wed, 4 Nov 2009 18:17:23 +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 E0C1746B1A; Wed, 4 Nov 2009 13:17:22 -0500 (EST) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 0CAD18A01B; Wed, 4 Nov 2009 13:17:19 -0500 (EST) From: John Baldwin To: Attilio Rao Date: Wed, 4 Nov 2009 13:12:36 -0500 User-Agent: KMail/1.9.7 References: <200911040132.nA41WxtQ012750@svn.freebsd.org> <86y6mmff1a.fsf@ds4.des.no> <3bbf2fe10911040815u780ea5d5h8252b46ddf0c5de7@mail.gmail.com> In-Reply-To: <3bbf2fe10911040815u780ea5d5h8252b46ddf0c5de7@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200911041312.37676.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Wed, 04 Nov 2009 13:17:19 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no 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, Dag-Erling =?utf-8?q?Sm=C3=B8rgrav?= , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r198868 - in head/sys: amd64/amd64 i386/i386 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, 04 Nov 2009 18:17:23 -0000 On Wednesday 04 November 2009 11:15:28 am Attilio Rao wrote: > 2009/11/4, Dag-Erling Sm=C3=B8rgrav : > > Attilio Rao writes: > > > Dag-Erling Sm=C3=B8rgrav writes: > > > > According to the reference you gave, OpenSolaris has a workaround f= or > > > > this issue. Perhaps we should adopt it? > > > IIRC, based on what I readed on-line, it could be still a WARNING msg, > > > but I didn't double-check for it. > > > > Uh, apparently, it can be worked around with an additional lfence > > instruction... See the first couple of comments on that bugzilla page > > you linked to. If the cost is too high, we could make it conditional on > > "options BROKEN_OPTERON_E" or something. >=20 > Yeah but the lfence is completely impratical from the overhead POV -- > and actually I don't like the idea to add a compile time option based > on family/model. > We could maybe do a mixed approach: printout the WARNING msg only if > the BROKEN_OPTERON_E is not used otherwise be ok. > I still don't like it because it is going to dirty the atomic.h code a > bit, but it can be an acceptable compromise. We have had family/model specific hacks with an associated #ifdef in the pa= st,=20 see NO_F00F_HACK (though that is probably less invasive). Also, if it=20 affects atomic.h then you may need to leave it always enabled in userland t= o=20 be truly safe. =2D-=20 John Baldwin From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 18:18:10 2009 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 F39A41065670; Wed, 4 Nov 2009 18:18:09 +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 7537B8FC1B; Wed, 4 Nov 2009 18:18:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA4II9Iu041610; Wed, 4 Nov 2009 18:18:09 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4II9R2041608; Wed, 4 Nov 2009 18:18:09 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200911041818.nA4II9R2041608@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 4 Nov 2009 18:18:09 +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: r198916 - stable/7/sys/dev/fxp 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, 04 Nov 2009 18:18:10 -0000 Author: yongari Date: Wed Nov 4 18:18:09 2009 New Revision: 198916 URL: http://svn.freebsd.org/changeset/base/198916 Log: MFC r194572: Always check fxp(4) is running, see if it can accept frames from upper stack in fxp_start_body(). fxp(4) drops driver lock in Rx path so check the fxp(4) is still running after reacquiring driver lock in Rx path. Also don't invoke fxp_intr_body if fxp(4) is not running. With this change there is no need to set suspend bit in device attach phase. Modified: stable/7/sys/dev/fxp/if_fxp.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/fxp/if_fxp.c ============================================================================== --- stable/7/sys/dev/fxp/if_fxp.c Wed Nov 4 18:14:19 2009 (r198915) +++ stable/7/sys/dev/fxp/if_fxp.c Wed Nov 4 18:18:09 2009 (r198916) @@ -993,7 +993,6 @@ fxp_detach(device_t dev) #endif FXP_LOCK(sc); - sc->suspended = 1; /* Do same thing as we do for suspend */ /* * Stop DMA and drop transmit queue, but disable interrupts first. */ @@ -1320,6 +1319,10 @@ fxp_start_body(struct ifnet *ifp) if (sc->need_mcsetup) return; + if ((ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != + IFF_DRV_RUNNING) + return; + if (sc->tx_queued > FXP_NTXCB_HIWAT) fxp_txeof(sc); /* @@ -1726,7 +1729,8 @@ fxp_intr(void *xsc) * First ACK all the interrupts in this pass. */ CSR_WRITE_1(sc, FXP_CSR_SCB_STATACK, statack); - fxp_intr_body(sc, ifp, statack, -1); + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) + fxp_intr_body(sc, ifp, statack, -1); } FXP_UNLOCK(sc); } @@ -1982,6 +1986,8 @@ fxp_intr_body(struct fxp_softc *sc, stru FXP_UNLOCK(sc); (*ifp->if_input)(ifp, m); FXP_LOCK(sc); + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) + return; } else { /* Reuse RFA and loaded DMA map. */ ifp->if_iqdrops++; @@ -2064,7 +2070,8 @@ fxp_tick(void *xsc) */ if (sc->rx_idle_secs > FXP_MAX_RX_IDLE) { sc->rx_idle_secs = 0; - fxp_mc_setup(sc); + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) + fxp_mc_setup(sc); } /* * If there is no pending command, start another stats From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 18:20:32 2009 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 44A431065670; Wed, 4 Nov 2009 18:20:32 +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 31A9C8FC20; Wed, 4 Nov 2009 18:20: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 nA4IKWrr041714; Wed, 4 Nov 2009 18:20:32 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4IKWXA041711; Wed, 4 Nov 2009 18:20:32 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200911041820.nA4IKWXA041711@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 4 Nov 2009 18:20:32 +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: r198917 - stable/7/sys/dev/fxp 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, 04 Nov 2009 18:20:32 -0000 Author: yongari Date: Wed Nov 4 18:20:31 2009 New Revision: 198917 URL: http://svn.freebsd.org/changeset/base/198917 Log: MFC r194573: Overhaul fxp(4) multicast filter programming. fxp(4) hardwares do not allow multicast filter programming when controller is busy to send/receive frames. So it used to mark need_mcsetup bit and defer multicast filter programming until controller becomes idle state. To detect when the controller is idle fxp(4) relied on Tx completion interrupt with NOP command and fxp_start_body and fxp_intr_body had to see whether pending multicast filter programming was requested. This resulted in very complex logic and sometimes it did not work as expected. Since the controller should be in idle state before any multicast filter modifications I changed it to reinitialize the controller whenever multicast filter programming is required. This is the same way what OpenBSD and NetBSD does. Also I added IFF_DRV_RUNNING check in ioctl handler so controller would be reinitialized only if it is absolutely needed. With this change I guess we can remove fxp(4) DELAY hack in ifioctl for IPv6 case. Modified: stable/7/sys/dev/fxp/if_fxp.c stable/7/sys/dev/fxp/if_fxpvar.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/fxp/if_fxp.c ============================================================================== --- stable/7/sys/dev/fxp/if_fxp.c Wed Nov 4 18:18:09 2009 (r198916) +++ stable/7/sys/dev/fxp/if_fxp.c Wed Nov 4 18:20:31 2009 (r198917) @@ -1311,14 +1311,6 @@ fxp_start_body(struct ifnet *ifp) FXP_LOCK_ASSERT(sc, MA_OWNED); - /* - * See if we need to suspend xmit until the multicast filter - * has been reprogrammed (which can only be done at the head - * of the command chain). - */ - if (sc->need_mcsetup) - return; - if ((ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != IFF_DRV_RUNNING) return; @@ -1762,11 +1754,8 @@ fxp_txeof(struct fxp_softc *sc) sc->fxp_desc.tx_first = txp; bus_dmamap_sync(sc->cbl_tag, sc->cbl_map, BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); - if (sc->tx_queued == 0) { + if (sc->tx_queued == 0) sc->watchdog_timer = 0; - if (sc->need_mcsetup) - fxp_mc_setup(sc); - } } static void @@ -2071,7 +2060,8 @@ fxp_tick(void *xsc) if (sc->rx_idle_secs > FXP_MAX_RX_IDLE) { sc->rx_idle_secs = 0; if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) - fxp_mc_setup(sc); + fxp_init_body(sc); + return; } /* * If there is no pending command, start another stats @@ -2213,7 +2203,6 @@ fxp_init_body(struct fxp_softc *sc) struct fxp_cb_ias *cb_ias; struct fxp_cb_tx *tcbp; struct fxp_tx *txp; - struct fxp_cb_mcs *mcsp; int i, prm; FXP_LOCK_ASSERT(sc, MA_OWNED); @@ -2256,25 +2245,10 @@ fxp_init_body(struct fxp_softc *sc) fxp_load_ucode(sc); /* - * Initialize the multicast address list. + * Set IFF_ALLMULTI status. It's needed in configure action + * command. */ - if (fxp_mc_addrs(sc)) { - mcsp = sc->mcsp; - mcsp->cb_status = 0; - mcsp->cb_command = - htole16(FXP_CB_COMMAND_MCAS | FXP_CB_COMMAND_EL); - mcsp->link_addr = 0xffffffff; - /* - * Start the multicast setup command. - */ - fxp_scb_wait(sc); - bus_dmamap_sync(sc->mcs_tag, sc->mcs_map, - BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); - CSR_WRITE_4(sc, FXP_CSR_SCB_GENERAL, sc->mcs_addr); - fxp_scb_cmd(sc, FXP_SCB_COMMAND_CU_START); - /* ...and wait for it to complete. */ - fxp_dma_wait(sc, &mcsp->cb_status, sc->mcs_tag, sc->mcs_map); - } + fxp_mc_addrs(sc); /* * We temporarily use memory that contains the TxCB list to @@ -2348,7 +2322,7 @@ fxp_init_body(struct fxp_softc *sc) cbp->force_fdx = 0; /* (don't) force full duplex */ cbp->fdx_pin_en = 1; /* (enable) FDX# pin */ cbp->multi_ia = 0; /* (don't) accept multiple IAs */ - cbp->mc_all = sc->flags & FXP_FLAG_ALL_MCAST ? 1 : 0; + cbp->mc_all = ifp->if_flags & IFF_ALLMULTI ? 1 : 0; cbp->gamla_rx = sc->flags & FXP_FLAG_EXT_RFA ? 1 : 0; cbp->vlan_strip_en = ((sc->flags & FXP_FLAG_EXT_RFA) != 0 && (ifp->if_capenable & IFCAP_VLAN_HWTAGGING) != 0) ? 1 : 0; @@ -2404,11 +2378,17 @@ fxp_init_body(struct fxp_softc *sc) fxp_scb_wait(sc); bus_dmamap_sync(sc->cbl_tag, sc->cbl_map, BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); + CSR_WRITE_4(sc, FXP_CSR_SCB_GENERAL, sc->fxp_desc.cbl_addr); fxp_scb_cmd(sc, FXP_SCB_COMMAND_CU_START); /* ...and wait for it to complete. */ fxp_dma_wait(sc, &cb_ias->cb_status, sc->cbl_tag, sc->cbl_map); /* + * Initialize the multicast address list. + */ + fxp_mc_setup(sc); + + /* * Initialize transmit control block (TxCB) list. */ txp = sc->fxp_desc.tx_list; @@ -2439,6 +2419,7 @@ fxp_init_body(struct fxp_softc *sc) sc->tx_queued = 1; fxp_scb_wait(sc); + CSR_WRITE_4(sc, FXP_CSR_SCB_GENERAL, sc->fxp_desc.cbl_addr); fxp_scb_cmd(sc, FXP_SCB_COMMAND_CU_START); /* @@ -2718,11 +2699,6 @@ fxp_ioctl(struct ifnet *ifp, u_long comm switch (command) { case SIOCSIFFLAGS: FXP_LOCK(sc); - if (ifp->if_flags & IFF_ALLMULTI) - sc->flags |= FXP_FLAG_ALL_MCAST; - else - sc->flags &= ~FXP_FLAG_ALL_MCAST; - /* * If interface is marked up and not running, then start it. * If it is marked down and running, stop it. @@ -2730,35 +2706,24 @@ fxp_ioctl(struct ifnet *ifp, u_long comm * such as IFF_PROMISC are handled. */ if (ifp->if_flags & IFF_UP) { - fxp_init_body(sc); + if (((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) && + ((ifp->if_flags ^ sc->if_flags) & + (IFF_PROMISC | IFF_ALLMULTI | IFF_LINK0)) != 0) + fxp_init_body(sc); + else if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) + fxp_init_body(sc); } else { - if (ifp->if_drv_flags & IFF_DRV_RUNNING) + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) fxp_stop(sc); } + sc->if_flags = ifp->if_flags; FXP_UNLOCK(sc); break; case SIOCADDMULTI: case SIOCDELMULTI: - FXP_LOCK(sc); - if (ifp->if_flags & IFF_ALLMULTI) - sc->flags |= FXP_FLAG_ALL_MCAST; - else - sc->flags &= ~FXP_FLAG_ALL_MCAST; - /* - * Multicast list has changed; set the hardware filter - * accordingly. - */ - if ((sc->flags & FXP_FLAG_ALL_MCAST) == 0) - fxp_mc_setup(sc); - /* - * fxp_mc_setup() can set FXP_FLAG_ALL_MCAST, so check it - * again rather than else {}. - */ - if (sc->flags & FXP_FLAG_ALL_MCAST) - fxp_init_body(sc); - FXP_UNLOCK(sc); - error = 0; + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) + fxp_init(sc); break; case SIOCSIFMEDIA: @@ -2862,13 +2827,13 @@ fxp_mc_addrs(struct fxp_softc *sc) int nmcasts; nmcasts = 0; - if ((sc->flags & FXP_FLAG_ALL_MCAST) == 0) { + if ((ifp->if_flags & IFF_ALLMULTI) == 0) { IF_ADDR_LOCK(ifp); TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { if (ifma->ifma_addr->sa_family != AF_LINK) continue; if (nmcasts >= MAXMCADDR) { - sc->flags |= FXP_FLAG_ALL_MCAST; + ifp->if_flags |= IFF_ALLMULTI; nmcasts = 0; break; } @@ -2893,87 +2858,28 @@ fxp_mc_addrs(struct fxp_softc *sc) * points to the TxCB ring, but the mcsetup descriptor itself is not part * of it. We then can do 'CU_START' on the mcsetup descriptor and have it * lead into the regular TxCB ring when it completes. - * - * This function must be called at splimp. */ static void fxp_mc_setup(struct fxp_softc *sc) { - struct fxp_cb_mcs *mcsp = sc->mcsp; - struct fxp_tx *txp; + struct fxp_cb_mcs *mcsp; int count; FXP_LOCK_ASSERT(sc, MA_OWNED); - /* - * If there are queued commands, we must wait until they are all - * completed. If we are already waiting, then add a NOP command - * with interrupt option so that we're notified when all commands - * have been completed - fxp_start() ensures that no additional - * TX commands will be added when need_mcsetup is true. - */ - if (sc->tx_queued) { - /* - * need_mcsetup will be true if we are already waiting for the - * NOP command to be completed (see below). In this case, bail. - */ - if (sc->need_mcsetup) - return; - sc->need_mcsetup = 1; - - /* - * Add a NOP command with interrupt so that we are notified - * when all TX commands have been processed. - */ - txp = sc->fxp_desc.tx_last->tx_next; - txp->tx_mbuf = NULL; - txp->tx_cb->cb_status = 0; - txp->tx_cb->cb_command = htole16(FXP_CB_COMMAND_NOP | - FXP_CB_COMMAND_S | FXP_CB_COMMAND_I); - /* - * Advance the end of list forward. - */ - sc->fxp_desc.tx_last->tx_cb->cb_command &= - htole16(~FXP_CB_COMMAND_S); - bus_dmamap_sync(sc->cbl_tag, sc->cbl_map, BUS_DMASYNC_PREWRITE); - sc->fxp_desc.tx_last = txp; - sc->tx_queued++; - /* - * Issue a resume in case the CU has just suspended. - */ - fxp_scb_wait(sc); - fxp_scb_cmd(sc, FXP_SCB_COMMAND_CU_RESUME); - /* - * Set a 5 second timer just in case we don't hear from the - * card again. - */ - sc->watchdog_timer = 5; - - return; - } - sc->need_mcsetup = 0; - /* - * Initialize multicast setup descriptor. - */ + mcsp = sc->mcsp; mcsp->cb_status = 0; - mcsp->cb_command = htole16(FXP_CB_COMMAND_MCAS | - FXP_CB_COMMAND_S | FXP_CB_COMMAND_I); - mcsp->link_addr = htole32(sc->fxp_desc.cbl_addr); - txp = &sc->fxp_desc.mcs_tx; - txp->tx_mbuf = NULL; - txp->tx_cb = (struct fxp_cb_tx *)sc->mcsp; - txp->tx_next = sc->fxp_desc.tx_list; - (void) fxp_mc_addrs(sc); - sc->fxp_desc.tx_first = sc->fxp_desc.tx_last = txp; - sc->tx_queued = 1; + mcsp->cb_command = htole16(FXP_CB_COMMAND_MCAS | FXP_CB_COMMAND_EL); + mcsp->link_addr = 0xffffffff; + fxp_mc_addrs(sc); /* - * Wait until command unit is not active. This should never - * be the case when nothing is queued, but make sure anyway. + * Wait until command unit is idle. This should never be the + * case when nothing is queued, but make sure anyway. */ count = 100; - while ((CSR_READ_1(sc, FXP_CSR_SCB_RUSCUS) >> 6) == - FXP_SCB_CUS_ACTIVE && --count) + while ((CSR_READ_1(sc, FXP_CSR_SCB_RUSCUS) >> 6) != + FXP_SCB_CUS_IDLE && --count) DELAY(10); if (count == 0) { device_printf(sc->dev, "command queue timeout\n"); @@ -2988,9 +2894,8 @@ fxp_mc_setup(struct fxp_softc *sc) BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); CSR_WRITE_4(sc, FXP_CSR_SCB_GENERAL, sc->mcs_addr); fxp_scb_cmd(sc, FXP_SCB_COMMAND_CU_START); - - sc->watchdog_timer = 2; - return; + /* ...and wait for it to complete. */ + fxp_dma_wait(sc, &mcsp->cb_status, sc->mcs_tag, sc->mcs_map); } static uint32_t fxp_ucode_d101a[] = D101_A_RCVBUNDLE_UCODE; Modified: stable/7/sys/dev/fxp/if_fxpvar.h ============================================================================== --- stable/7/sys/dev/fxp/if_fxpvar.h Wed Nov 4 18:18:09 2009 (r198916) +++ stable/7/sys/dev/fxp/if_fxpvar.h Wed Nov 4 18:20:31 2009 (r198917) @@ -165,7 +165,6 @@ struct fxp_softc { int maxtxseg; /* maximum # of TX segments */ int maxsegsize; /* maximum size of a TX segment */ int tx_queued; /* # of active TxCB's */ - int need_mcsetup; /* multicast filter needs programming */ struct fxp_stats *fxp_stats; /* Pointer to interface stats */ uint32_t stats_addr; /* DMA address of the stats structure */ int rx_idle_secs; /* # of seconds RX has been idle */ @@ -185,6 +184,7 @@ struct fxp_softc { int cu_resume_bug; int revision; int flags; + int if_flags; uint8_t rfa_size; uint32_t tx_cmd; }; @@ -195,7 +195,6 @@ struct fxp_softc { #define FXP_FLAG_EXT_TXCB 0x0008 /* enable use of extended TXCB */ #define FXP_FLAG_SERIAL_MEDIA 0x0010 /* 10Mbps serial interface */ #define FXP_FLAG_LONG_PKT_EN 0x0020 /* enable long packet reception */ -#define FXP_FLAG_ALL_MCAST 0x0040 /* accept all multicast frames */ #define FXP_FLAG_CU_RESUME_BUG 0x0080 /* requires workaround for CU_RESUME */ #define FXP_FLAG_UCODE 0x0100 /* ucode is loaded */ #define FXP_FLAG_DEFERRED_RNR 0x0200 /* DEVICE_POLLING deferred RNR */ From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 18:22:59 2009 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 E099F106568B; Wed, 4 Nov 2009 18:22:59 +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 CDA1A8FC19; Wed, 4 Nov 2009 18: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 nA4IMxws041836; Wed, 4 Nov 2009 18:22:59 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4IMxkw041833; Wed, 4 Nov 2009 18:22:59 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200911041822.nA4IMxkw041833@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 4 Nov 2009 18:22:59 +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: r198918 - stable/7/sys/dev/fxp 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, 04 Nov 2009 18:23:00 -0000 Author: yongari Date: Wed Nov 4 18:22:59 2009 New Revision: 198918 URL: http://svn.freebsd.org/changeset/base/198918 Log: MFC r194574: For ICH based fxp(4) controllers treat them as 82559 compatibles. To detect which controller is ICH based one, add a new member variable ich to struct fxp_ident and move the struct to if_fxpvar.h. Since I've faked controller revision, don't allow microcode loading for ICH based controllers. With this change all ICH based controllers will have WOL and Rx checksum offload capability. PR: kern/135451 Tested by: Alexey Shuvaev ( shuvaev <> physik dot uni-wuerzburg dot de ), pluknet ( pluknet <> gmail dot com ), Gary Jennejohn ( gary.jennejohn <> freenet dot de ) Modified: stable/7/sys/dev/fxp/if_fxp.c stable/7/sys/dev/fxp/if_fxpvar.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/fxp/if_fxp.c ============================================================================== --- stable/7/sys/dev/fxp/if_fxp.c Wed Nov 4 18:20:31 2009 (r198917) +++ stable/7/sys/dev/fxp/if_fxp.c Wed Nov 4 18:22:59 2009 (r198918) @@ -140,12 +140,6 @@ static u_char fxp_cb_config_template[] = 0x5 /* 21 */ }; -struct fxp_ident { - uint16_t devid; - int16_t revid; /* -1 matches anything */ - char *name; -}; - /* * Claim various Intel PCI device identifiers for this driver. The * sub-vendor and sub-device field are extensively used to identify @@ -153,52 +147,52 @@ struct fxp_ident { * them. */ static struct fxp_ident fxp_ident_table[] = { - { 0x1029, -1, "Intel 82559 PCI/CardBus Pro/100" }, - { 0x1030, -1, "Intel 82559 Pro/100 Ethernet" }, - { 0x1031, -1, "Intel 82801CAM (ICH3) Pro/100 VE Ethernet" }, - { 0x1032, -1, "Intel 82801CAM (ICH3) Pro/100 VE Ethernet" }, - { 0x1033, -1, "Intel 82801CAM (ICH3) Pro/100 VM Ethernet" }, - { 0x1034, -1, "Intel 82801CAM (ICH3) Pro/100 VM Ethernet" }, - { 0x1035, -1, "Intel 82801CAM (ICH3) Pro/100 Ethernet" }, - { 0x1036, -1, "Intel 82801CAM (ICH3) Pro/100 Ethernet" }, - { 0x1037, -1, "Intel 82801CAM (ICH3) Pro/100 Ethernet" }, - { 0x1038, -1, "Intel 82801CAM (ICH3) Pro/100 VM Ethernet" }, - { 0x1039, -1, "Intel 82801DB (ICH4) Pro/100 VE Ethernet" }, - { 0x103A, -1, "Intel 82801DB (ICH4) Pro/100 Ethernet" }, - { 0x103B, -1, "Intel 82801DB (ICH4) Pro/100 VM Ethernet" }, - { 0x103C, -1, "Intel 82801DB (ICH4) Pro/100 Ethernet" }, - { 0x103D, -1, "Intel 82801DB (ICH4) Pro/100 VE Ethernet" }, - { 0x103E, -1, "Intel 82801DB (ICH4) Pro/100 VM Ethernet" }, - { 0x1050, -1, "Intel 82801BA (D865) Pro/100 VE Ethernet" }, - { 0x1051, -1, "Intel 82562ET (ICH5/ICH5R) Pro/100 VE Ethernet" }, - { 0x1059, -1, "Intel 82551QM Pro/100 M Mobile Connection" }, - { 0x1064, -1, "Intel 82562EZ (ICH6)" }, - { 0x1065, -1, "Intel 82562ET/EZ/GT/GZ PRO/100 VE Ethernet" }, - { 0x1068, -1, "Intel 82801FBM (ICH6-M) Pro/100 VE Ethernet" }, - { 0x1069, -1, "Intel 82562EM/EX/GX Pro/100 Ethernet" }, - { 0x1091, -1, "Intel 82562GX Pro/100 Ethernet" }, - { 0x1092, -1, "Intel Pro/100 VE Network Connection" }, - { 0x1093, -1, "Intel Pro/100 VM Network Connection" }, - { 0x1094, -1, "Intel Pro/100 946GZ (ICH7) Network Connection" }, - { 0x1209, -1, "Intel 82559ER Embedded 10/100 Ethernet" }, - { 0x1229, 0x01, "Intel 82557 Pro/100 Ethernet" }, - { 0x1229, 0x02, "Intel 82557 Pro/100 Ethernet" }, - { 0x1229, 0x03, "Intel 82557 Pro/100 Ethernet" }, - { 0x1229, 0x04, "Intel 82558 Pro/100 Ethernet" }, - { 0x1229, 0x05, "Intel 82558 Pro/100 Ethernet" }, - { 0x1229, 0x06, "Intel 82559 Pro/100 Ethernet" }, - { 0x1229, 0x07, "Intel 82559 Pro/100 Ethernet" }, - { 0x1229, 0x08, "Intel 82559 Pro/100 Ethernet" }, - { 0x1229, 0x09, "Intel 82559ER Pro/100 Ethernet" }, - { 0x1229, 0x0c, "Intel 82550 Pro/100 Ethernet" }, - { 0x1229, 0x0d, "Intel 82550 Pro/100 Ethernet" }, - { 0x1229, 0x0e, "Intel 82550 Pro/100 Ethernet" }, - { 0x1229, 0x0f, "Intel 82551 Pro/100 Ethernet" }, - { 0x1229, 0x10, "Intel 82551 Pro/100 Ethernet" }, - { 0x1229, -1, "Intel 82557/8/9 Pro/100 Ethernet" }, - { 0x2449, -1, "Intel 82801BA/CAM (ICH2/3) Pro/100 Ethernet" }, - { 0x27dc, -1, "Intel 82801GB (ICH7) 10/100 Ethernet" }, - { 0, -1, NULL }, + { 0x1029, -1, 0, "Intel 82559 PCI/CardBus Pro/100" }, + { 0x1030, -1, 0, "Intel 82559 Pro/100 Ethernet" }, + { 0x1031, -1, 3, "Intel 82801CAM (ICH3) Pro/100 VE Ethernet" }, + { 0x1032, -1, 3, "Intel 82801CAM (ICH3) Pro/100 VE Ethernet" }, + { 0x1033, -1, 3, "Intel 82801CAM (ICH3) Pro/100 VM Ethernet" }, + { 0x1034, -1, 3, "Intel 82801CAM (ICH3) Pro/100 VM Ethernet" }, + { 0x1035, -1, 3, "Intel 82801CAM (ICH3) Pro/100 Ethernet" }, + { 0x1036, -1, 3, "Intel 82801CAM (ICH3) Pro/100 Ethernet" }, + { 0x1037, -1, 3, "Intel 82801CAM (ICH3) Pro/100 Ethernet" }, + { 0x1038, -1, 3, "Intel 82801CAM (ICH3) Pro/100 VM Ethernet" }, + { 0x1039, -1, 4, "Intel 82801DB (ICH4) Pro/100 VE Ethernet" }, + { 0x103A, -1, 4, "Intel 82801DB (ICH4) Pro/100 Ethernet" }, + { 0x103B, -1, 4, "Intel 82801DB (ICH4) Pro/100 VM Ethernet" }, + { 0x103C, -1, 4, "Intel 82801DB (ICH4) Pro/100 Ethernet" }, + { 0x103D, -1, 4, "Intel 82801DB (ICH4) Pro/100 VE Ethernet" }, + { 0x103E, -1, 4, "Intel 82801DB (ICH4) Pro/100 VM Ethernet" }, + { 0x1050, -1, 5, "Intel 82801BA (D865) Pro/100 VE Ethernet" }, + { 0x1051, -1, 5, "Intel 82562ET (ICH5/ICH5R) Pro/100 VE Ethernet" }, + { 0x1059, -1, 0, "Intel 82551QM Pro/100 M Mobile Connection" }, + { 0x1064, -1, 6, "Intel 82562EZ (ICH6)" }, + { 0x1065, -1, 6, "Intel 82562ET/EZ/GT/GZ PRO/100 VE Ethernet" }, + { 0x1068, -1, 6, "Intel 82801FBM (ICH6-M) Pro/100 VE Ethernet" }, + { 0x1069, -1, 6, "Intel 82562EM/EX/GX Pro/100 Ethernet" }, + { 0x1091, -1, 7, "Intel 82562GX Pro/100 Ethernet" }, + { 0x1092, -1, 7, "Intel Pro/100 VE Network Connection" }, + { 0x1093, -1, 7, "Intel Pro/100 VM Network Connection" }, + { 0x1094, -1, 7, "Intel Pro/100 946GZ (ICH7) Network Connection" }, + { 0x1209, -1, 0, "Intel 82559ER Embedded 10/100 Ethernet" }, + { 0x1229, 0x01, 0, "Intel 82557 Pro/100 Ethernet" }, + { 0x1229, 0x02, 0, "Intel 82557 Pro/100 Ethernet" }, + { 0x1229, 0x03, 0, "Intel 82557 Pro/100 Ethernet" }, + { 0x1229, 0x04, 0, "Intel 82558 Pro/100 Ethernet" }, + { 0x1229, 0x05, 0, "Intel 82558 Pro/100 Ethernet" }, + { 0x1229, 0x06, 0, "Intel 82559 Pro/100 Ethernet" }, + { 0x1229, 0x07, 0, "Intel 82559 Pro/100 Ethernet" }, + { 0x1229, 0x08, 0, "Intel 82559 Pro/100 Ethernet" }, + { 0x1229, 0x09, 0, "Intel 82559ER Pro/100 Ethernet" }, + { 0x1229, 0x0c, 0, "Intel 82550 Pro/100 Ethernet" }, + { 0x1229, 0x0d, 0, "Intel 82550 Pro/100 Ethernet" }, + { 0x1229, 0x0e, 0, "Intel 82550 Pro/100 Ethernet" }, + { 0x1229, 0x0f, 0, "Intel 82551 Pro/100 Ethernet" }, + { 0x1229, 0x10, 0, "Intel 82551 Pro/100 Ethernet" }, + { 0x1229, -1, 0, "Intel 82557/8/9 Pro/100 Ethernet" }, + { 0x2449, -1, 2, "Intel 82801BA/CAM (ICH2/3) Pro/100 Ethernet" }, + { 0x27dc, -1, 7, "Intel 82801GB (ICH7) 10/100 Ethernet" }, + { 0, -1, 0, NULL }, }; #ifdef FXP_IP_CSUM_WAR @@ -214,6 +208,7 @@ static int fxp_shutdown(device_t dev); static int fxp_suspend(device_t dev); static int fxp_resume(device_t dev); +static struct fxp_ident *fxp_find_ident(device_t dev); static void fxp_intr(void *xsc); static void fxp_rxcsum(struct fxp_softc *sc, struct ifnet *ifp, struct mbuf *m, uint16_t status, int pos); @@ -361,11 +356,8 @@ fxp_dma_wait(struct fxp_softc *sc, volat device_printf(sc->dev, "DMA timeout\n"); } -/* - * Return identification string if this device is ours. - */ -static int -fxp_probe(device_t dev) +static struct fxp_ident * +fxp_find_ident(device_t dev) { uint16_t devid; uint8_t revid; @@ -377,11 +369,26 @@ fxp_probe(device_t dev) for (ident = fxp_ident_table; ident->name != NULL; ident++) { if (ident->devid == devid && (ident->revid == revid || ident->revid == -1)) { - device_set_desc(dev, ident->name); - return (BUS_PROBE_DEFAULT); + return (ident); } } } + return (NULL); +} + +/* + * Return identification string if this device is ours. + */ +static int +fxp_probe(device_t dev) +{ + struct fxp_ident *ident; + + ident = fxp_find_ident(dev); + if (ident != NULL) { + device_set_desc(dev, ident->name); + return (BUS_PROBE_DEFAULT); + } return (ENXIO); } @@ -484,11 +491,17 @@ fxp_attach(device_t dev) /* * Find out the chip revision; lump all 82557 revs together. */ - fxp_read_eeprom(sc, &data, 5, 1); - if ((data >> 8) == 1) - sc->revision = FXP_REV_82557; - else - sc->revision = pci_get_revid(dev); + sc->ident = fxp_find_ident(dev); + if (sc->ident->ich > 0) { + /* Assume ICH controllers are 82559. */ + sc->revision = FXP_REV_82559_A0; + } else { + fxp_read_eeprom(sc, &data, 5, 1); + if ((data >> 8) == 1) + sc->revision = FXP_REV_82557; + else + sc->revision = pci_get_revid(dev); + } /* * Check availability of WOL. 82559ER does not support WOL. @@ -561,9 +574,8 @@ fxp_attach(device_t dev) * * See Intel 82801BA/82801BAM Specification Update, Errata #30. */ - i = pci_get_device(dev); - if (i == 0x2449 || (i > 0x1030 && i < 0x1039) || - sc->revision >= FXP_REV_82559_A0) { + if ((sc->ident->ich >= 2 && sc->ident->ich <= 3) || + (sc->ident->ich == 0 && sc->revision >= FXP_REV_82559_A0)) { fxp_read_eeprom(sc, &data, 10, 1); if (data & 0x02) { /* STB enable */ uint16_t cksum; @@ -2240,9 +2252,13 @@ fxp_init_body(struct fxp_softc *sc) /* * Attempt to load microcode if requested. + * For ICH based controllers do not load microcode. */ - if (ifp->if_flags & IFF_LINK0 && (sc->flags & FXP_FLAG_UCODE) == 0) - fxp_load_ucode(sc); + if (sc->ident->ich == 0) { + if (ifp->if_flags & IFF_LINK0 && + (sc->flags & FXP_FLAG_UCODE) == 0) + fxp_load_ucode(sc); + } /* * Set IFF_ALLMULTI status. It's needed in configure action Modified: stable/7/sys/dev/fxp/if_fxpvar.h ============================================================================== --- stable/7/sys/dev/fxp/if_fxpvar.h Wed Nov 4 18:20:31 2009 (r198917) +++ stable/7/sys/dev/fxp/if_fxpvar.h Wed Nov 4 18:22:59 2009 (r198918) @@ -142,6 +142,13 @@ struct fxp_desc_list { bus_dma_tag_t rx_tag; }; +struct fxp_ident { + uint16_t devid; + int16_t revid; /* -1 matches anything */ + uint8_t ich; + char *name; +}; + /* * NOTE: Elements are ordered for optimal cacheline behavior, and NOT * for functional grouping. @@ -151,6 +158,7 @@ struct fxp_softc { struct resource *fxp_res[2]; /* I/O and IRQ resources */ struct resource_spec *fxp_spec; /* the resource spec we used */ void *ih; /* interrupt handler cookie */ + struct fxp_ident *ident; struct mtx sc_mtx; bus_dma_tag_t fxp_txmtag; /* bus DMA tag for Tx mbufs */ bus_dma_tag_t fxp_rxmtag; /* bus DMA tag for Rx mbufs */ From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 18:31:43 2009 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 87F46106566C; Wed, 4 Nov 2009 18:31:43 +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 761D98FC1B; Wed, 4 Nov 2009 18:31: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 nA4IVho1042110; Wed, 4 Nov 2009 18:31:43 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4IVh3W042108; Wed, 4 Nov 2009 18:31:43 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200911041831.nA4IVh3W042108@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 4 Nov 2009 18:31: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: r198919 - stable/8/sys/dev/fxp 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, 04 Nov 2009 18:31:43 -0000 Author: yongari Date: Wed Nov 4 18:31:43 2009 New Revision: 198919 URL: http://svn.freebsd.org/changeset/base/198919 Log: MFC r197586: It seems some 82559ER controllers do not support Rx checksum offloading. Datasheet said nothing about the limitation of 82559ER except WOL. Explicitly disable Rx checksum offloading for controllers that is known to lack the capability. PR: kern/138135 Tested by: Gooderum, Mark < mgooderum <> websense dot com > Modified: stable/8/sys/dev/fxp/if_fxp.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/fxp/if_fxp.c ============================================================================== --- stable/8/sys/dev/fxp/if_fxp.c Wed Nov 4 18:22:59 2009 (r198918) +++ stable/8/sys/dev/fxp/if_fxp.c Wed Nov 4 18:31:43 2009 (r198919) @@ -631,8 +631,11 @@ fxp_attach(device_t dev) } /* For 82559 or later chips, Rx checksum offload is supported. */ - if (sc->revision >= FXP_REV_82559_A0) - sc->flags |= FXP_FLAG_82559_RXCSUM; + if (sc->revision >= FXP_REV_82559_A0) { + /* 82559ER does not support Rx checksum offloading. */ + if (sc->ident->devid != 0x1209) + sc->flags |= FXP_FLAG_82559_RXCSUM; + } /* * Enable use of extended RFDs and TCBs for 82550 * and later chips. Note: we need extended TXCB support From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 18:34:15 2009 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 576771065670; Wed, 4 Nov 2009 18:34:15 +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 457928FC0C; Wed, 4 Nov 2009 18:34: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 nA4IYEKI042247; Wed, 4 Nov 2009 18:34:14 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4IYEkk042244; Wed, 4 Nov 2009 18:34:14 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200911041834.nA4IYEkk042244@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 4 Nov 2009 18:34:14 +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: r198920 - stable/7/sys/dev/fxp 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, 04 Nov 2009 18:34:15 -0000 Author: yongari Date: Wed Nov 4 18:34:14 2009 New Revision: 198920 URL: http://svn.freebsd.org/changeset/base/198920 Log: MFC r197586: It seems some 82559ER controllers do not support Rx checksum offloading. Datasheet said nothing about the limitation of 82559ER except WOL. Explicitly disable Rx checksum offloading for controllers that is known to lack the capability. PR: kern/138135 Tested by: Gooderum, Mark < mgooderum <> websense dot com > Modified: stable/7/sys/dev/fxp/if_fxp.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/fxp/if_fxp.c ============================================================================== --- stable/7/sys/dev/fxp/if_fxp.c Wed Nov 4 18:31:43 2009 (r198919) +++ stable/7/sys/dev/fxp/if_fxp.c Wed Nov 4 18:34:14 2009 (r198920) @@ -632,8 +632,11 @@ fxp_attach(device_t dev) } /* For 82559 or later chips, Rx checksum offload is supported. */ - if (sc->revision >= FXP_REV_82559_A0) - sc->flags |= FXP_FLAG_82559_RXCSUM; + if (sc->revision >= FXP_REV_82559_A0) { + /* 82559ER does not support Rx checksum offloading. */ + if (sc->ident->devid != 0x1209) + sc->flags |= FXP_FLAG_82559_RXCSUM; + } /* * Enable use of extended RFDs and TCBs for 82550 * and later chips. Note: we need extended TXCB support From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 18:40:07 2009 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 BDC87106566B; Wed, 4 Nov 2009 18:40:07 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ACC998FC14; Wed, 4 Nov 2009 18:40: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 nA4Ie7Al042433; Wed, 4 Nov 2009 18:40:07 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4Ie5o4042431; Wed, 4 Nov 2009 18:40:05 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200911041840.nA4Ie5o4042431@svn.freebsd.org> From: Doug Barton Date: Wed, 4 Nov 2009 18:40: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: r198921 - head/games/fortune/datfiles 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, 04 Nov 2009 18:40:07 -0000 Author: dougb Date: Wed Nov 4 18:40:05 2009 New Revision: 198921 URL: http://svn.freebsd.org/changeset/base/198921 Log: Fix not only the grammar, but also the formatting that makes the gag Modified: head/games/fortune/datfiles/fortunes Modified: head/games/fortune/datfiles/fortunes ============================================================================== --- head/games/fortune/datfiles/fortunes Wed Nov 4 18:34:14 2009 (r198920) +++ head/games/fortune/datfiles/fortunes Wed Nov 4 18:40:05 2009 (r198921) @@ -25228,7 +25228,8 @@ them scream. -- Sylvestre Matuschka, "the Hungarian Train Wreck Freak", escaped prison 1937, not heard from since % -Iam +I +am not very happy From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 19:01:36 2009 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 93FA41065676; Wed, 4 Nov 2009 19:01:36 +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 4BF428FC15; Wed, 4 Nov 2009 19: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 nA4J1ZRb043101; Wed, 4 Nov 2009 19:01:35 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4J1ZB2043098; Wed, 4 Nov 2009 19:01:35 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200911041901.nA4J1ZB2043098@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 4 Nov 2009 19:01:35 +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: r198922 - stable/7/sys/dev/de 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, 04 Nov 2009 19:01:36 -0000 Author: yongari Date: Wed Nov 4 19:01:35 2009 New Revision: 198922 URL: http://svn.freebsd.org/changeset/base/198922 Log: MFC r197461: Use __NO_STRICT_ALIGNMENT to determine whether de(4) have to apply alignment fixup code for received frames on strict alignment architectures. MFC r197463: Consistently use bus_addr_t. MFC r197464: Destroy dmamap in dma cleanup. MFC r197465: Align Tx/Rx descriptors on 32 bytes boundary instead of PAGE_SIZE. Also align setup descriptor on 32 bytes boundary. Tx buffer have no alignment limitation so create dmamap without alignment restriction[1]. Rx buffer still seems to require 4 bytes alignment limitation but we can simply use MCLBYTES for size to map the buffer instead of TULIP_DATA_PER_DESC as the buffer is allocated with m_getcl(9). de(4) supports up to TULIP_MAX_TXSEG segments for Tx buffers, increase maximum dma segment size to TULIP_MAX_TXSEG * MCLBYTES. While I'm here remove TULIP_DATA_PER_DESC as it is not used anymore. This should fix de(4) breakage introduced after r176206. Submitted by: jhb [1] Reported by: WATANABE Kazuhiro < CQG00620 <> nifty dot ne dot jp > Tested by: WATANABE Kazuhiro < CQG00620 <> nifty dot ne dot jp >, Takahashi Yoshihiro < nyan <> jp dot freebsd dot org > Modified: stable/7/sys/dev/de/if_de.c stable/7/sys/dev/de/if_devar.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/de/if_de.c ============================================================================== --- stable/7/sys/dev/de/if_de.c Wed Nov 4 18:40:05 2009 (r198921) +++ stable/7/sys/dev/de/if_de.c Wed Nov 4 19:01:35 2009 (r198922) @@ -160,7 +160,7 @@ static void tulip_dma_map_rxbuf(void *, static void tulip_dma_map_addr(void *arg, bus_dma_segment_t *segs, int nseg, int error) { - u_int32_t *paddr; + bus_addr_t *paddr; if (error) return; @@ -182,7 +182,7 @@ tulip_dma_map_rxbuf(void *arg, bus_dma_s KASSERT(nseg == 1, ("too many DMA segments")); KASSERT(segs[0].ds_len >= TULIP_RX_BUFLEN, ("receive buffer too small")); - desc->d_addr1 = segs[0].ds_addr; + desc->d_addr1 = segs[0].ds_addr & 0xffffffff; desc->d_length1 = TULIP_RX_BUFLEN; #ifdef not_needed /* These should already always be zero. */ @@ -3171,8 +3171,8 @@ tulip_reset(tulip_softc_t * const sc) sc->tulip_ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; } - TULIP_CSR_WRITE(sc, csr_txlist, sc->tulip_txinfo.ri_dma_addr); - TULIP_CSR_WRITE(sc, csr_rxlist, sc->tulip_rxinfo.ri_dma_addr); + TULIP_CSR_WRITE(sc, csr_txlist, sc->tulip_txinfo.ri_dma_addr & 0xffffffff); + TULIP_CSR_WRITE(sc, csr_rxlist, sc->tulip_rxinfo.ri_dma_addr & 0xffffffff); TULIP_CSR_WRITE(sc, csr_busmode, (1 << (3 /*pci_max_burst_len*/ + 8)) |TULIP_BUSMODE_CACHE_ALIGN8 @@ -3488,7 +3488,7 @@ tulip_rx_intr(tulip_softc_t * const sc) struct mbuf *m0; KASSERT(ms != NULL, ("no packet to accept")); -#if defined(TULIP_COPY_RXDATA) +#ifndef __NO_STRICT_ALIGNMENT /* * Copy the data into a new mbuf that is properly aligned. If * we fail to allocate a new mbuf, then drop the packet. We will @@ -3527,7 +3527,7 @@ tulip_rx_intr(tulip_softc_t * const sc) */ ms = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); -#if defined(TULIP_COPY_RXDATA) +#ifndef __NO_STRICT_ALIGNMENT skip_input: #endif if (ms == NULL) { @@ -4016,9 +4016,9 @@ tulip_txput(tulip_softc_t * const sc, st eop = nextout; eop->di_desc->d_flag &= TULIP_DFLAG_ENDRING|TULIP_DFLAG_CHAIN; eop->di_desc->d_status = d_status; - eop->di_desc->d_addr1 = segs[segcnt].ds_addr; + eop->di_desc->d_addr1 = segs[segcnt].ds_addr & 0xffffffff; eop->di_desc->d_length1 = segs[segcnt].ds_len; - eop->di_desc->d_addr2 = segs[segcnt+1].ds_addr; + eop->di_desc->d_addr2 = segs[segcnt+1].ds_addr & 0xffffffff; eop->di_desc->d_length2 = segs[segcnt+1].ds_len; d_status = TULIP_DSTS_OWNER; if (++nextout == ri->ri_last) @@ -4028,7 +4028,7 @@ tulip_txput(tulip_softc_t * const sc, st eop = nextout; eop->di_desc->d_flag &= TULIP_DFLAG_ENDRING|TULIP_DFLAG_CHAIN; eop->di_desc->d_status = d_status; - eop->di_desc->d_addr1 = segs[segcnt].ds_addr; + eop->di_desc->d_addr1 = segs[segcnt].ds_addr & 0xffffffff; eop->di_desc->d_length1 = segs[segcnt].ds_len; eop->di_desc->d_addr2 = 0; eop->di_desc->d_length2 = 0; @@ -4194,7 +4194,7 @@ tulip_txput_setup(tulip_softc_t * const nextout->d_length2 = 0; nextout->d_addr2 = 0; nextout->d_length1 = sizeof(sc->tulip_setupdata); - nextout->d_addr1 = sc->tulip_setup_dma_addr; + nextout->d_addr1 = sc->tulip_setup_dma_addr & 0xffffffff; bus_dmamap_sync(sc->tulip_setup_tag, sc->tulip_setup_map, BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE); TULIP_TXDESC_PRESYNC(ri); @@ -4491,7 +4491,7 @@ tulip_busdma_freering(tulip_ringinfo_t * /* Allocate memory for a single descriptor ring. */ static int tulip_busdma_allocring(device_t dev, tulip_softc_t * const sc, size_t count, - bus_size_t maxsize, int nsegs, tulip_ringinfo_t *ri, const char *name) + bus_size_t align, int nsegs, tulip_ringinfo_t *ri, const char *name) { size_t size; int error, i; @@ -4499,7 +4499,7 @@ tulip_busdma_allocring(device_t dev, tul /* First, setup a tag. */ ri->ri_max = count; size = count * sizeof(tulip_desc_t); - error = bus_dma_tag_create(NULL, PAGE_SIZE, 0, BUS_SPACE_MAXADDR_32BIT, + error = bus_dma_tag_create(NULL, 32, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, size, 1, size, 0, NULL, NULL, &ri->ri_ring_tag); if (error) { @@ -4527,9 +4527,9 @@ tulip_busdma_allocring(device_t dev, tul } /* Allocate a tag for the data buffers. */ - error = bus_dma_tag_create(NULL, 4, 0, + error = bus_dma_tag_create(NULL, align, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, - maxsize, nsegs, TULIP_DATA_PER_DESC, 0, NULL, NULL, &ri->ri_data_tag); + MCLBYTES * nsegs, nsegs, MCLBYTES, 0, NULL, NULL, &ri->ri_data_tag); if (error) { device_printf(dev, "failed to allocate %s buffer dma tag\n", name); return (error); @@ -4563,6 +4563,7 @@ tulip_busdma_cleanup(tulip_softc_t * con if (sc->tulip_setupbuf != NULL) { bus_dmamem_free(sc->tulip_setup_tag, sc->tulip_setupdata, sc->tulip_setup_map); + bus_dmamap_destroy(sc->tulip_setup_tag, sc->tulip_setup_map); sc->tulip_setup_map = NULL; sc->tulip_setupbuf = NULL; } @@ -4586,8 +4587,8 @@ tulip_busdma_init(device_t dev, tulip_so /* * Allocate space and dmamap for transmit ring. */ - error = tulip_busdma_allocring(dev, sc, TULIP_TXDESCS, TULIP_DATA_PER_DESC, - TULIP_MAX_TXSEG, &sc->tulip_txinfo, "transmit"); + error = tulip_busdma_allocring(dev, sc, TULIP_TXDESCS, 1, TULIP_MAX_TXSEG, + &sc->tulip_txinfo, "transmit"); if (error) return (error); @@ -4598,7 +4599,7 @@ tulip_busdma_init(device_t dev, tulip_so * a waste in practice though as an ethernet frame can easily fit * in TULIP_RX_BUFLEN bytes. */ - error = tulip_busdma_allocring(dev, sc, TULIP_RXDESCS, MCLBYTES, 1, + error = tulip_busdma_allocring(dev, sc, TULIP_RXDESCS, 4, 1, &sc->tulip_rxinfo, "receive"); if (error) return (error); @@ -4606,7 +4607,7 @@ tulip_busdma_init(device_t dev, tulip_so /* * Allocate a DMA tag, memory, and map for setup descriptor */ - error = bus_dma_tag_create(NULL, 4, 0, + error = bus_dma_tag_create(NULL, 32, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, sizeof(sc->tulip_setupdata), 1, sizeof(sc->tulip_setupdata), 0, NULL, NULL, &sc->tulip_setup_tag); Modified: stable/7/sys/dev/de/if_devar.h ============================================================================== --- stable/7/sys/dev/de/if_devar.h Wed Nov 4 18:40:05 2009 (r198921) +++ stable/7/sys/dev/de/if_devar.h Wed Nov 4 19:01:35 2009 (r198922) @@ -104,7 +104,7 @@ typedef struct { tulip_descinfo_t *ri_descinfo; bus_dma_tag_t ri_ring_tag; bus_dmamap_t ri_ring_map; - uint32_t ri_dma_addr; + bus_addr_t ri_dma_addr; bus_dma_tag_t ri_data_tag; bus_dmamap_t *ri_data_maps; } tulip_ringinfo_t; @@ -134,11 +134,7 @@ typedef struct { * architecture which can't handle unaligned accesses) because with * 100Mb/s cards the copying is just too much of a hit. */ -#if !defined(__i386__) -#define TULIP_COPY_RXDATA 1 -#endif -#define TULIP_DATA_PER_DESC 2032 #define TULIP_TXTIMER 4 #define TULIP_RXDESCS 48 #define TULIP_TXDESCS 128 @@ -560,7 +556,7 @@ struct tulip_softc { */ bus_dma_tag_t tulip_setup_tag; bus_dmamap_t tulip_setup_map; - uint32_t tulip_setup_dma_addr; + bus_addr_t tulip_setup_dma_addr; u_int32_t *tulip_setupbuf; u_int32_t tulip_setupdata[192 / sizeof(u_int32_t)]; char tulip_boardid[24]; From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 19:59:05 2009 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 43FF1106566C; Wed, 4 Nov 2009 19:59:05 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (skuns.zoral.com.ua [91.193.166.194]) by mx1.freebsd.org (Postfix) with ESMTP id A48568FC16; Wed, 4 Nov 2009 19:59:04 +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 nA4Jwvb2056757 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 4 Nov 2009 21:58:57 +0200 (EET) (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.3/8.14.3) with ESMTP id nA4JwvAH041225; Wed, 4 Nov 2009 21:58:57 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id nA4Jwvuf041224; Wed, 4 Nov 2009 21:58:57 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 4 Nov 2009 21:58:57 +0200 From: Kostik Belousov To: Attilio Rao Message-ID: <20091104195857.GJ2331@deviant.kiev.zoral.com.ua> References: <200911040132.nA41WxtQ012750@svn.freebsd.org> <20091104055811.GY1293@hoeg.nl> <3bbf2fe10911040449j5938ca7eqca5829ceced66f48@mail.gmail.com> <20091104144315.GH2331@deviant.kiev.zoral.com.ua> <3bbf2fe10911040806r37f00a8dq2aa3ccd1e5c7b241@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+Hr//EUsa8//ouuB" Content-Disposition: inline In-Reply-To: <3bbf2fe10911040806r37f00a8dq2aa3ccd1e5c7b241@mail.gmail.com> 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=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham 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, Ed Schouten , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r198868 - in head/sys: amd64/amd64 i386/i386 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, 04 Nov 2009 19:59:05 -0000 --+Hr//EUsa8//ouuB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 04, 2009 at 05:06:36PM +0100, Attilio Rao wrote: > 2009/11/4, Kostik Belousov : > > On Wed, Nov 04, 2009 at 01:49:41PM +0100, Attilio Rao wrote: > > > 2009/11/4 Ed Schouten : > > > > Hi Attilio, > > > > > > > > * Attilio Rao wrote: > > > >> Opteron rev E family of processor expose a bug where, in very rare > > > >> ocassions, memory barriers semantic is not honoured by the hardware > > > >> itself. As a result, some random breakage can happen in uninvestig= able > > > >> ways (for further explanation see at the content of the commit its= elf). > > > > > > > > Ooh. Sounds like an interesting bug. > > > > > > > > The bug doesn't manifest itself on UP, right? If so, maybe we shoul= d add > > > > some very short instructions to the warning on how to disable SMP. > > > > > > Due to the semantic of the bug, I think that it can manifest itself on > > > UP and a memory barrier failing on UP means that PREEMPTION can blow > > > up. Considering this I wouldn't suggest anything different between the > > > UP vs SMP case. > > > > CPU is always self-consistent, isn't it ? > > > > Also, I very much dislike idea of making our kernel a collection of > > references to the man pages and URLs, esp. when URL point to the > > resource not controlled by the project. >=20 > Ok, as long as you are in favor of stripping the URL, I'm fine with it. I like des' proposal to have kernel config option to enable compile-time workaround. This is how freebsd handled cyrix CPUs and Pentium f0 0f bug. --+Hr//EUsa8//ouuB Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkrx3QAACgkQC3+MBN1Mb4hrrQCgrqEgeU0rfaE5IKEsI982uVO3 p3sAnRUUTmmnXfoq/6iaVd7Mb73ntrda =0ujk -----END PGP SIGNATURE----- --+Hr//EUsa8//ouuB-- From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 20:19:21 2009 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 A2D4A1065676; Wed, 4 Nov 2009 20:19:21 +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 922D48FC20; Wed, 4 Nov 2009 20:19: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 nA4KJL5o045224; Wed, 4 Nov 2009 20:19:21 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4KJLYw045222; Wed, 4 Nov 2009 20:19:21 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200911042019.nA4KJLYw045222@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 4 Nov 2009 20:19: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: r198923 - 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: Wed, 04 Nov 2009 20:19:21 -0000 Author: yongari Date: Wed Nov 4 20:19:21 2009 New Revision: 198923 URL: http://svn.freebsd.org/changeset/base/198923 Log: Use correct dma tag for jumbo buffer. Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Wed Nov 4 19:01:35 2009 (r198922) +++ head/sys/dev/bge/if_bge.c Wed Nov 4 20:19:21 2009 (r198923) @@ -1031,7 +1031,7 @@ bge_newbuf_jumbo(struct bge_softc *sc, i panic("%s: %d segments\n", __func__, nsegs); } - bus_dmamap_sync(sc->bge_cdata.bge_mtag, + bus_dmamap_sync(sc->bge_cdata.bge_mtag_jumbo, sc->bge_cdata.bge_rx_jumbo_dmamap[i], BUS_DMASYNC_PREREAD); From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 20:40:38 2009 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 BD816106568D; Wed, 4 Nov 2009 20:40:38 +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 AC66F8FC08; Wed, 4 Nov 2009 20:40: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 nA4KecWr045812; Wed, 4 Nov 2009 20:40:38 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4KecVN045810; Wed, 4 Nov 2009 20:40:38 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200911042040.nA4KecVN045810@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 4 Nov 2009 20:40: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: r198924 - 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: Wed, 04 Nov 2009 20:40:38 -0000 Author: yongari Date: Wed Nov 4 20:40:38 2009 New Revision: 198924 URL: http://svn.freebsd.org/changeset/base/198924 Log: Covert bge_newbuf_std to use bus_dmamap_load_mbuf_sg(9). Note, bge_newbuf_std still has a bug for handling dma map load failure under high network load. Just reusing mbuf is not enough as driver already unloaded the dma map of the mbuf. Graceful recovery needs more work. Ideally we can just update dma address part of a Rx descriptor because the controller never overwrite the Rx descriptor. This requires some Rx initialization code changes and it would be done later after fixing other incorrect bus_dma(9) usages. Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Wed Nov 4 20:19:21 2009 (r198923) +++ head/sys/dev/bge/if_bge.c Wed Nov 4 20:40:38 2009 (r198924) @@ -916,8 +916,8 @@ bge_newbuf_std(struct bge_softc *sc, int { struct mbuf *m_new = NULL; struct bge_rx_bd *r; - struct bge_dmamap_arg ctx; - int error; + bus_dma_segment_t segs[1]; + int error, nsegs; if (m == NULL) { m_new = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); @@ -932,24 +932,21 @@ bge_newbuf_std(struct bge_softc *sc, int if ((sc->bge_flags & BGE_FLAG_RX_ALIGNBUG) == 0) m_adj(m_new, ETHER_ALIGN); - sc->bge_cdata.bge_rx_std_chain[i] = m_new; - r = &sc->bge_ldata.bge_rx_std_ring[i]; - ctx.bge_maxsegs = 1; - ctx.sc = sc; - error = bus_dmamap_load(sc->bge_cdata.bge_mtag, - sc->bge_cdata.bge_rx_std_dmamap[i], mtod(m_new, void *), - m_new->m_len, bge_dma_map_addr, &ctx, BUS_DMA_NOWAIT); - if (error || ctx.bge_maxsegs == 0) { + error = bus_dmamap_load_mbuf_sg(sc->bge_cdata.bge_mtag, + sc->bge_cdata.bge_rx_std_dmamap[i], m_new, segs, &nsegs, 0); + if (error != 0) { if (m == NULL) { sc->bge_cdata.bge_rx_std_chain[i] = NULL; m_freem(m_new); } - return (ENOMEM); + return (error); } - r->bge_addr.bge_addr_lo = BGE_ADDR_LO(ctx.bge_busaddr); - r->bge_addr.bge_addr_hi = BGE_ADDR_HI(ctx.bge_busaddr); + sc->bge_cdata.bge_rx_std_chain[i] = m_new; + r = &sc->bge_ldata.bge_rx_std_ring[i]; + r->bge_addr.bge_addr_lo = BGE_ADDR_LO(segs[0].ds_addr); + r->bge_addr.bge_addr_hi = BGE_ADDR_HI(segs[0].ds_addr); r->bge_flags = BGE_RXBDFLAG_END; - r->bge_len = m_new->m_len; + r->bge_len = segs[0].ds_len; r->bge_idx = i; bus_dmamap_sync(sc->bge_cdata.bge_mtag, From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 20:49:15 2009 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 24F2E106566B; Wed, 4 Nov 2009 20:49:15 +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 095EC8FC12; Wed, 4 Nov 2009 20:49: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 nA4KnEi9046119; Wed, 4 Nov 2009 20:49:14 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4KnEs9046116; Wed, 4 Nov 2009 20:49:14 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200911042049.nA4KnEs9046116@svn.freebsd.org> From: John Baldwin Date: Wed, 4 Nov 2009 20:49: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: r198925 - in stable/8/sys: amd64/linux32 i386/linux 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, 04 Nov 2009 20:49:15 -0000 Author: jhb Date: Wed Nov 4 20:49:14 2009 New Revision: 198925 URL: http://svn.freebsd.org/changeset/base/198925 Log: MFC 198554: Fix some problems with effective mmap() offsets > 32 bits. This was partially fixed on amd64 earlier. Rather than forcing linux_mmap_common() to use a 32-bit offset, have it accept a 64-bit file offset. This offset is then passed to the real mmap() call. Rather than inventing a structure to hold the normal linux_mmap args that has a 64-bit offset, just pass each of the arguments individually to linux_mmap_common() since that more closes matches the existing style of various kern_foo() functions. Modified: stable/8/sys/amd64/linux32/linux32_machdep.c stable/8/sys/i386/linux/linux_machdep.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/amd64/linux32/linux32_machdep.c ============================================================================== --- stable/8/sys/amd64/linux32/linux32_machdep.c Wed Nov 4 20:40:38 2009 (r198924) +++ stable/8/sys/amd64/linux32/linux32_machdep.c Wed Nov 4 20:49:14 2009 (r198925) @@ -91,6 +91,10 @@ linux_to_bsd_sigaltstack(int lsa) return (bsa); } +static int linux_mmap_common(struct thread *td, l_uintptr_t addr, + l_size_t len, l_int prot, l_int flags, l_int fd, + l_loff_t pos); + int bsd_to_linux_sigaltstack(int bsa) { @@ -759,12 +763,9 @@ linux_clone(struct thread *td, struct li #define STACK_SIZE (2 * 1024 * 1024) #define GUARD_SIZE (4 * PAGE_SIZE) -static int linux_mmap_common(struct thread *, struct l_mmap_argv *); - int linux_mmap2(struct thread *td, struct linux_mmap2_args *args) { - struct l_mmap_argv linux_args; #ifdef DEBUG if (ldebug(mmap2)) @@ -773,14 +774,9 @@ linux_mmap2(struct thread *td, struct li args->flags, args->fd, args->pgoff); #endif - linux_args.addr = PTROUT(args->addr); - linux_args.len = args->len; - linux_args.prot = args->prot; - linux_args.flags = args->flags; - linux_args.fd = args->fd; - linux_args.pgoff = args->pgoff; - - return (linux_mmap_common(td, &linux_args)); + return (linux_mmap_common(td, PTROUT(args->addr), args->len, args->prot, + args->flags, args->fd, (uint64_t)(uint32_t)args->pgoff * + PAGE_SIZE)); } int @@ -799,15 +795,15 @@ linux_mmap(struct thread *td, struct lin linux_args.addr, linux_args.len, linux_args.prot, linux_args.flags, linux_args.fd, linux_args.pgoff); #endif - if ((linux_args.pgoff % PAGE_SIZE) != 0) - return (EINVAL); - linux_args.pgoff /= PAGE_SIZE; - return (linux_mmap_common(td, &linux_args)); + return (linux_mmap_common(td, linux_args.addr, linux_args.len, + linux_args.prot, linux_args.flags, linux_args.fd, + (uint32_t)linux_args.pgoff)); } static int -linux_mmap_common(struct thread *td, struct l_mmap_argv *linux_args) +linux_mmap_common(struct thread *td, l_uintptr_t addr, l_size_t len, l_int prot, + l_int flags, l_int fd, l_loff_t pos) { struct proc *p = td->td_proc; struct mmap_args /* { @@ -830,21 +826,20 @@ linux_mmap_common(struct thread *td, str * Linux mmap(2): * You must specify exactly one of MAP_SHARED and MAP_PRIVATE */ - if (! ((linux_args->flags & LINUX_MAP_SHARED) ^ - (linux_args->flags & LINUX_MAP_PRIVATE))) + if (!((flags & LINUX_MAP_SHARED) ^ (flags & LINUX_MAP_PRIVATE))) return (EINVAL); - if (linux_args->flags & LINUX_MAP_SHARED) + if (flags & LINUX_MAP_SHARED) bsd_args.flags |= MAP_SHARED; - if (linux_args->flags & LINUX_MAP_PRIVATE) + if (flags & LINUX_MAP_PRIVATE) bsd_args.flags |= MAP_PRIVATE; - if (linux_args->flags & LINUX_MAP_FIXED) + if (flags & LINUX_MAP_FIXED) bsd_args.flags |= MAP_FIXED; - if (linux_args->flags & LINUX_MAP_ANON) + if (flags & LINUX_MAP_ANON) bsd_args.flags |= MAP_ANON; else bsd_args.flags |= MAP_NOSYNC; - if (linux_args->flags & LINUX_MAP_GROWSDOWN) + if (flags & LINUX_MAP_GROWSDOWN) bsd_args.flags |= MAP_STACK; /* @@ -852,12 +847,12 @@ linux_mmap_common(struct thread *td, str * on Linux/i386. We do this to ensure maximum compatibility. * Linux/ia64 does the same in i386 emulation mode. */ - bsd_args.prot = linux_args->prot; + bsd_args.prot = prot; if (bsd_args.prot & (PROT_READ | PROT_WRITE | PROT_EXEC)) bsd_args.prot |= PROT_READ | PROT_EXEC; /* Linux does not check file descriptor when MAP_ANONYMOUS is set. */ - bsd_args.fd = (bsd_args.flags & MAP_ANON) ? -1 : linux_args->fd; + bsd_args.fd = (bsd_args.flags & MAP_ANON) ? -1 : fd; if (bsd_args.fd != -1) { /* * Linux follows Solaris mmap(2) description: @@ -882,7 +877,7 @@ linux_mmap_common(struct thread *td, str fdrop(fp, td); } - if (linux_args->flags & LINUX_MAP_GROWSDOWN) { + if (flags & LINUX_MAP_GROWSDOWN) { /* * The Linux MAP_GROWSDOWN option does not limit auto * growth of the region. Linux mmap with this option @@ -905,8 +900,7 @@ linux_mmap_common(struct thread *td, str * fixed size of (STACK_SIZE - GUARD_SIZE). */ - if ((caddr_t)PTRIN(linux_args->addr) + linux_args->len > - p->p_vmspace->vm_maxsaddr) { + if ((caddr_t)PTRIN(addr) + len > p->p_vmspace->vm_maxsaddr) { /* * Some Linux apps will attempt to mmap * thread stacks near the top of their @@ -937,19 +931,19 @@ linux_mmap_common(struct thread *td, str * we map the full stack, since we don't have a way * to autogrow it. */ - if (linux_args->len > STACK_SIZE - GUARD_SIZE) { - bsd_args.addr = (caddr_t)PTRIN(linux_args->addr); - bsd_args.len = linux_args->len; + if (len > STACK_SIZE - GUARD_SIZE) { + bsd_args.addr = (caddr_t)PTRIN(addr); + bsd_args.len = len; } else { - bsd_args.addr = (caddr_t)PTRIN(linux_args->addr) - - (STACK_SIZE - GUARD_SIZE - linux_args->len); + bsd_args.addr = (caddr_t)PTRIN(addr) - + (STACK_SIZE - GUARD_SIZE - len); bsd_args.len = STACK_SIZE - GUARD_SIZE; } } else { - bsd_args.addr = (caddr_t)PTRIN(linux_args->addr); - bsd_args.len = linux_args->len; + bsd_args.addr = (caddr_t)PTRIN(addr); + bsd_args.len = len; } - bsd_args.pos = (off_t)linux_args->pgoff * PAGE_SIZE; + bsd_args.pos = pos; #ifdef DEBUG if (ldebug(mmap)) Modified: stable/8/sys/i386/linux/linux_machdep.c ============================================================================== --- stable/8/sys/i386/linux/linux_machdep.c Wed Nov 4 20:40:38 2009 (r198924) +++ stable/8/sys/i386/linux/linux_machdep.c Wed Nov 4 20:49:14 2009 (r198925) @@ -93,6 +93,10 @@ struct l_old_select_argv { struct l_timeval *timeout; }; +static int linux_mmap_common(struct thread *td, l_uintptr_t addr, + l_size_t len, l_int prot, l_int flags, l_int fd, + l_loff_t pos); + int linux_to_bsd_sigaltstack(int lsa) { @@ -591,12 +595,9 @@ linux_clone(struct thread *td, struct li #define STACK_SIZE (2 * 1024 * 1024) #define GUARD_SIZE (4 * PAGE_SIZE) -static int linux_mmap_common(struct thread *, struct l_mmap_argv *); - int linux_mmap2(struct thread *td, struct linux_mmap2_args *args) { - struct l_mmap_argv linux_args; #ifdef DEBUG if (ldebug(mmap2)) @@ -605,14 +606,9 @@ linux_mmap2(struct thread *td, struct li args->flags, args->fd, args->pgoff); #endif - linux_args.addr = args->addr; - linux_args.len = args->len; - linux_args.prot = args->prot; - linux_args.flags = args->flags; - linux_args.fd = args->fd; - linux_args.pgoff = args->pgoff * PAGE_SIZE; - - return (linux_mmap_common(td, &linux_args)); + return (linux_mmap_common(td, args->addr, args->len, args->prot, + args->flags, args->fd, (uint64_t)(uint32_t)args->pgoff * + PAGE_SIZE)); } int @@ -632,11 +628,14 @@ linux_mmap(struct thread *td, struct lin linux_args.flags, linux_args.fd, linux_args.pgoff); #endif - return (linux_mmap_common(td, &linux_args)); + return (linux_mmap_common(td, linux_args.addr, linux_args.len, + linux_args.prot, linux_args.flags, linux_args.fd, + (uint32_t)linux_args.pgoff)); } static int -linux_mmap_common(struct thread *td, struct l_mmap_argv *linux_args) +linux_mmap_common(struct thread *td, l_uintptr_t addr, l_size_t len, l_int prot, + l_int flags, l_int fd, l_loff_t pos) { struct proc *p = td->td_proc; struct mmap_args /* { @@ -659,21 +658,20 @@ linux_mmap_common(struct thread *td, str * Linux mmap(2): * You must specify exactly one of MAP_SHARED and MAP_PRIVATE */ - if (! ((linux_args->flags & LINUX_MAP_SHARED) ^ - (linux_args->flags & LINUX_MAP_PRIVATE))) + if (!((flags & LINUX_MAP_SHARED) ^ (flags & LINUX_MAP_PRIVATE))) return (EINVAL); - if (linux_args->flags & LINUX_MAP_SHARED) + if (flags & LINUX_MAP_SHARED) bsd_args.flags |= MAP_SHARED; - if (linux_args->flags & LINUX_MAP_PRIVATE) + if (flags & LINUX_MAP_PRIVATE) bsd_args.flags |= MAP_PRIVATE; - if (linux_args->flags & LINUX_MAP_FIXED) + if (flags & LINUX_MAP_FIXED) bsd_args.flags |= MAP_FIXED; - if (linux_args->flags & LINUX_MAP_ANON) + if (flags & LINUX_MAP_ANON) bsd_args.flags |= MAP_ANON; else bsd_args.flags |= MAP_NOSYNC; - if (linux_args->flags & LINUX_MAP_GROWSDOWN) + if (flags & LINUX_MAP_GROWSDOWN) bsd_args.flags |= MAP_STACK; /* @@ -681,12 +679,12 @@ linux_mmap_common(struct thread *td, str * on Linux/i386. We do this to ensure maximum compatibility. * Linux/ia64 does the same in i386 emulation mode. */ - bsd_args.prot = linux_args->prot; + bsd_args.prot = prot; if (bsd_args.prot & (PROT_READ | PROT_WRITE | PROT_EXEC)) bsd_args.prot |= PROT_READ | PROT_EXEC; /* Linux does not check file descriptor when MAP_ANONYMOUS is set. */ - bsd_args.fd = (bsd_args.flags & MAP_ANON) ? -1 : linux_args->fd; + bsd_args.fd = (bsd_args.flags & MAP_ANON) ? -1 : fd; if (bsd_args.fd != -1) { /* * Linux follows Solaris mmap(2) description: @@ -711,9 +709,9 @@ linux_mmap_common(struct thread *td, str fdrop(fp, td); } - if (linux_args->flags & LINUX_MAP_GROWSDOWN) { + if (flags & LINUX_MAP_GROWSDOWN) { /* - * The linux MAP_GROWSDOWN option does not limit auto + * The Linux MAP_GROWSDOWN option does not limit auto * growth of the region. Linux mmap with this option * takes as addr the inital BOS, and as len, the initial * region size. It can then grow down from addr without @@ -734,8 +732,7 @@ linux_mmap_common(struct thread *td, str * fixed size of (STACK_SIZE - GUARD_SIZE). */ - if ((caddr_t)PTRIN(linux_args->addr) + linux_args->len > - p->p_vmspace->vm_maxsaddr) { + if ((caddr_t)PTRIN(addr) + len > p->p_vmspace->vm_maxsaddr) { /* * Some linux apps will attempt to mmap * thread stacks near the top of their @@ -766,19 +763,19 @@ linux_mmap_common(struct thread *td, str * we map the full stack, since we don't have a way * to autogrow it. */ - if (linux_args->len > STACK_SIZE - GUARD_SIZE) { - bsd_args.addr = (caddr_t)PTRIN(linux_args->addr); - bsd_args.len = linux_args->len; + if (len > STACK_SIZE - GUARD_SIZE) { + bsd_args.addr = (caddr_t)PTRIN(addr); + bsd_args.len = len; } else { - bsd_args.addr = (caddr_t)PTRIN(linux_args->addr) - - (STACK_SIZE - GUARD_SIZE - linux_args->len); + bsd_args.addr = (caddr_t)PTRIN(addr) - + (STACK_SIZE - GUARD_SIZE - len); bsd_args.len = STACK_SIZE - GUARD_SIZE; } } else { - bsd_args.addr = (caddr_t)PTRIN(linux_args->addr); - bsd_args.len = linux_args->len; + bsd_args.addr = (caddr_t)PTRIN(addr); + bsd_args.len = len; } - bsd_args.pos = linux_args->pgoff; + bsd_args.pos = pos; #ifdef DEBUG if (ldebug(mmap)) From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 20:53:36 2009 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 500A8106566B; Wed, 4 Nov 2009 20:53:36 +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 3CEC08FC14; Wed, 4 Nov 2009 20:53: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 nA4KrZt6046267; Wed, 4 Nov 2009 20:53:35 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4KrZh8046264; Wed, 4 Nov 2009 20:53:35 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200911042053.nA4KrZh8046264@svn.freebsd.org> From: John Baldwin Date: Wed, 4 Nov 2009 20:53:35 +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: r198926 - in stable/7/sys: amd64/linux32 i386/linux 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, 04 Nov 2009 20:53:36 -0000 Author: jhb Date: Wed Nov 4 20:53:35 2009 New Revision: 198926 URL: http://svn.freebsd.org/changeset/base/198926 Log: MFC 198554: Fix some problems with effective mmap() offsets > 32 bits. This was partially fixed on amd64 earlier. Rather than forcing linux_mmap_common() to use a 32-bit offset, have it accept a 64-bit file offset. This offset is then passed to the real mmap() call. Rather than inventing a structure to hold the normal linux_mmap args that has a 64-bit offset, just pass each of the arguments individually to linux_mmap_common() since that more closes matches the existing style of various kern_foo() functions. Modified: stable/7/sys/amd64/linux32/linux32_machdep.c stable/7/sys/i386/linux/linux_machdep.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/amd64/linux32/linux32_machdep.c ============================================================================== --- stable/7/sys/amd64/linux32/linux32_machdep.c Wed Nov 4 20:49:14 2009 (r198925) +++ stable/7/sys/amd64/linux32/linux32_machdep.c Wed Nov 4 20:53:35 2009 (r198926) @@ -91,6 +91,10 @@ linux_to_bsd_sigaltstack(int lsa) return (bsa); } +static int linux_mmap_common(struct thread *td, l_uintptr_t addr, + l_size_t len, l_int prot, l_int flags, l_int fd, + l_loff_t pos); + int bsd_to_linux_sigaltstack(int bsa) { @@ -759,12 +763,9 @@ linux_clone(struct thread *td, struct li #define STACK_SIZE (2 * 1024 * 1024) #define GUARD_SIZE (4 * PAGE_SIZE) -static int linux_mmap_common(struct thread *, struct l_mmap_argv *); - int linux_mmap2(struct thread *td, struct linux_mmap2_args *args) { - struct l_mmap_argv linux_args; #ifdef DEBUG if (ldebug(mmap2)) @@ -773,14 +774,9 @@ linux_mmap2(struct thread *td, struct li args->flags, args->fd, args->pgoff); #endif - linux_args.addr = PTROUT(args->addr); - linux_args.len = args->len; - linux_args.prot = args->prot; - linux_args.flags = args->flags; - linux_args.fd = args->fd; - linux_args.pgoff = args->pgoff; - - return (linux_mmap_common(td, &linux_args)); + return (linux_mmap_common(td, PTROUT(args->addr), args->len, args->prot, + args->flags, args->fd, (uint64_t)(uint32_t)args->pgoff * + PAGE_SIZE)); } int @@ -799,15 +795,15 @@ linux_mmap(struct thread *td, struct lin linux_args.addr, linux_args.len, linux_args.prot, linux_args.flags, linux_args.fd, linux_args.pgoff); #endif - if ((linux_args.pgoff % PAGE_SIZE) != 0) - return (EINVAL); - linux_args.pgoff /= PAGE_SIZE; - return (linux_mmap_common(td, &linux_args)); + return (linux_mmap_common(td, linux_args.addr, linux_args.len, + linux_args.prot, linux_args.flags, linux_args.fd, + (uint32_t)linux_args.pgoff)); } static int -linux_mmap_common(struct thread *td, struct l_mmap_argv *linux_args) +linux_mmap_common(struct thread *td, l_uintptr_t addr, l_size_t len, l_int prot, + l_int flags, l_int fd, l_loff_t pos) { struct proc *p = td->td_proc; struct mmap_args /* { @@ -830,21 +826,20 @@ linux_mmap_common(struct thread *td, str * Linux mmap(2): * You must specify exactly one of MAP_SHARED and MAP_PRIVATE */ - if (! ((linux_args->flags & LINUX_MAP_SHARED) ^ - (linux_args->flags & LINUX_MAP_PRIVATE))) + if (!((flags & LINUX_MAP_SHARED) ^ (flags & LINUX_MAP_PRIVATE))) return (EINVAL); - if (linux_args->flags & LINUX_MAP_SHARED) + if (flags & LINUX_MAP_SHARED) bsd_args.flags |= MAP_SHARED; - if (linux_args->flags & LINUX_MAP_PRIVATE) + if (flags & LINUX_MAP_PRIVATE) bsd_args.flags |= MAP_PRIVATE; - if (linux_args->flags & LINUX_MAP_FIXED) + if (flags & LINUX_MAP_FIXED) bsd_args.flags |= MAP_FIXED; - if (linux_args->flags & LINUX_MAP_ANON) + if (flags & LINUX_MAP_ANON) bsd_args.flags |= MAP_ANON; else bsd_args.flags |= MAP_NOSYNC; - if (linux_args->flags & LINUX_MAP_GROWSDOWN) + if (flags & LINUX_MAP_GROWSDOWN) bsd_args.flags |= MAP_STACK; /* @@ -852,12 +847,12 @@ linux_mmap_common(struct thread *td, str * on Linux/i386. We do this to ensure maximum compatibility. * Linux/ia64 does the same in i386 emulation mode. */ - bsd_args.prot = linux_args->prot; + bsd_args.prot = prot; if (bsd_args.prot & (PROT_READ | PROT_WRITE | PROT_EXEC)) bsd_args.prot |= PROT_READ | PROT_EXEC; /* Linux does not check file descriptor when MAP_ANONYMOUS is set. */ - bsd_args.fd = (bsd_args.flags & MAP_ANON) ? -1 : linux_args->fd; + bsd_args.fd = (bsd_args.flags & MAP_ANON) ? -1 : fd; if (bsd_args.fd != -1) { /* * Linux follows Solaris mmap(2) description: @@ -882,7 +877,7 @@ linux_mmap_common(struct thread *td, str fdrop(fp, td); } - if (linux_args->flags & LINUX_MAP_GROWSDOWN) { + if (flags & LINUX_MAP_GROWSDOWN) { /* * The Linux MAP_GROWSDOWN option does not limit auto * growth of the region. Linux mmap with this option @@ -905,8 +900,7 @@ linux_mmap_common(struct thread *td, str * fixed size of (STACK_SIZE - GUARD_SIZE). */ - if ((caddr_t)PTRIN(linux_args->addr) + linux_args->len > - p->p_vmspace->vm_maxsaddr) { + if ((caddr_t)PTRIN(addr) + len > p->p_vmspace->vm_maxsaddr) { /* * Some Linux apps will attempt to mmap * thread stacks near the top of their @@ -937,19 +931,19 @@ linux_mmap_common(struct thread *td, str * we map the full stack, since we don't have a way * to autogrow it. */ - if (linux_args->len > STACK_SIZE - GUARD_SIZE) { - bsd_args.addr = (caddr_t)PTRIN(linux_args->addr); - bsd_args.len = linux_args->len; + if (len > STACK_SIZE - GUARD_SIZE) { + bsd_args.addr = (caddr_t)PTRIN(addr); + bsd_args.len = len; } else { - bsd_args.addr = (caddr_t)PTRIN(linux_args->addr) - - (STACK_SIZE - GUARD_SIZE - linux_args->len); + bsd_args.addr = (caddr_t)PTRIN(addr) - + (STACK_SIZE - GUARD_SIZE - len); bsd_args.len = STACK_SIZE - GUARD_SIZE; } } else { - bsd_args.addr = (caddr_t)PTRIN(linux_args->addr); - bsd_args.len = linux_args->len; + bsd_args.addr = (caddr_t)PTRIN(addr); + bsd_args.len = len; } - bsd_args.pos = (off_t)linux_args->pgoff * PAGE_SIZE; + bsd_args.pos = pos; #ifdef DEBUG if (ldebug(mmap)) Modified: stable/7/sys/i386/linux/linux_machdep.c ============================================================================== --- stable/7/sys/i386/linux/linux_machdep.c Wed Nov 4 20:49:14 2009 (r198925) +++ stable/7/sys/i386/linux/linux_machdep.c Wed Nov 4 20:53:35 2009 (r198926) @@ -93,6 +93,10 @@ struct l_old_select_argv { struct l_timeval *timeout; }; +static int linux_mmap_common(struct thread *td, l_uintptr_t addr, + l_size_t len, l_int prot, l_int flags, l_int fd, + l_loff_t pos); + int linux_to_bsd_sigaltstack(int lsa) { @@ -591,12 +595,9 @@ linux_clone(struct thread *td, struct li #define STACK_SIZE (2 * 1024 * 1024) #define GUARD_SIZE (4 * PAGE_SIZE) -static int linux_mmap_common(struct thread *, struct l_mmap_argv *); - int linux_mmap2(struct thread *td, struct linux_mmap2_args *args) { - struct l_mmap_argv linux_args; #ifdef DEBUG if (ldebug(mmap2)) @@ -605,14 +606,9 @@ linux_mmap2(struct thread *td, struct li args->flags, args->fd, args->pgoff); #endif - linux_args.addr = args->addr; - linux_args.len = args->len; - linux_args.prot = args->prot; - linux_args.flags = args->flags; - linux_args.fd = args->fd; - linux_args.pgoff = args->pgoff * PAGE_SIZE; - - return (linux_mmap_common(td, &linux_args)); + return (linux_mmap_common(td, args->addr, args->len, args->prot, + args->flags, args->fd, (uint64_t)(uint32_t)args->pgoff * + PAGE_SIZE)); } int @@ -632,11 +628,14 @@ linux_mmap(struct thread *td, struct lin linux_args.flags, linux_args.fd, linux_args.pgoff); #endif - return (linux_mmap_common(td, &linux_args)); + return (linux_mmap_common(td, linux_args.addr, linux_args.len, + linux_args.prot, linux_args.flags, linux_args.fd, + (uint32_t)linux_args.pgoff)); } static int -linux_mmap_common(struct thread *td, struct l_mmap_argv *linux_args) +linux_mmap_common(struct thread *td, l_uintptr_t addr, l_size_t len, l_int prot, + l_int flags, l_int fd, l_loff_t pos) { struct proc *p = td->td_proc; struct mmap_args /* { @@ -659,21 +658,20 @@ linux_mmap_common(struct thread *td, str * Linux mmap(2): * You must specify exactly one of MAP_SHARED and MAP_PRIVATE */ - if (! ((linux_args->flags & LINUX_MAP_SHARED) ^ - (linux_args->flags & LINUX_MAP_PRIVATE))) + if (!((flags & LINUX_MAP_SHARED) ^ (flags & LINUX_MAP_PRIVATE))) return (EINVAL); - if (linux_args->flags & LINUX_MAP_SHARED) + if (flags & LINUX_MAP_SHARED) bsd_args.flags |= MAP_SHARED; - if (linux_args->flags & LINUX_MAP_PRIVATE) + if (flags & LINUX_MAP_PRIVATE) bsd_args.flags |= MAP_PRIVATE; - if (linux_args->flags & LINUX_MAP_FIXED) + if (flags & LINUX_MAP_FIXED) bsd_args.flags |= MAP_FIXED; - if (linux_args->flags & LINUX_MAP_ANON) + if (flags & LINUX_MAP_ANON) bsd_args.flags |= MAP_ANON; else bsd_args.flags |= MAP_NOSYNC; - if (linux_args->flags & LINUX_MAP_GROWSDOWN) + if (flags & LINUX_MAP_GROWSDOWN) bsd_args.flags |= MAP_STACK; /* @@ -681,12 +679,12 @@ linux_mmap_common(struct thread *td, str * on Linux/i386. We do this to ensure maximum compatibility. * Linux/ia64 does the same in i386 emulation mode. */ - bsd_args.prot = linux_args->prot; + bsd_args.prot = prot; if (bsd_args.prot & (PROT_READ | PROT_WRITE | PROT_EXEC)) bsd_args.prot |= PROT_READ | PROT_EXEC; /* Linux does not check file descriptor when MAP_ANONYMOUS is set. */ - bsd_args.fd = (bsd_args.flags & MAP_ANON) ? -1 : linux_args->fd; + bsd_args.fd = (bsd_args.flags & MAP_ANON) ? -1 : fd; if (bsd_args.fd != -1) { /* * Linux follows Solaris mmap(2) description: @@ -711,9 +709,9 @@ linux_mmap_common(struct thread *td, str fdrop(fp, td); } - if (linux_args->flags & LINUX_MAP_GROWSDOWN) { + if (flags & LINUX_MAP_GROWSDOWN) { /* - * The linux MAP_GROWSDOWN option does not limit auto + * The Linux MAP_GROWSDOWN option does not limit auto * growth of the region. Linux mmap with this option * takes as addr the inital BOS, and as len, the initial * region size. It can then grow down from addr without @@ -734,8 +732,7 @@ linux_mmap_common(struct thread *td, str * fixed size of (STACK_SIZE - GUARD_SIZE). */ - if ((caddr_t)PTRIN(linux_args->addr) + linux_args->len > - p->p_vmspace->vm_maxsaddr) { + if ((caddr_t)PTRIN(addr) + len > p->p_vmspace->vm_maxsaddr) { /* * Some linux apps will attempt to mmap * thread stacks near the top of their @@ -766,19 +763,19 @@ linux_mmap_common(struct thread *td, str * we map the full stack, since we don't have a way * to autogrow it. */ - if (linux_args->len > STACK_SIZE - GUARD_SIZE) { - bsd_args.addr = (caddr_t)PTRIN(linux_args->addr); - bsd_args.len = linux_args->len; + if (len > STACK_SIZE - GUARD_SIZE) { + bsd_args.addr = (caddr_t)PTRIN(addr); + bsd_args.len = len; } else { - bsd_args.addr = (caddr_t)PTRIN(linux_args->addr) - - (STACK_SIZE - GUARD_SIZE - linux_args->len); + bsd_args.addr = (caddr_t)PTRIN(addr) - + (STACK_SIZE - GUARD_SIZE - len); bsd_args.len = STACK_SIZE - GUARD_SIZE; } } else { - bsd_args.addr = (caddr_t)PTRIN(linux_args->addr); - bsd_args.len = linux_args->len; + bsd_args.addr = (caddr_t)PTRIN(addr); + bsd_args.len = len; } - bsd_args.pos = linux_args->pgoff; + bsd_args.pos = pos; #ifdef DEBUG if (ldebug(mmap)) From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 20:57:52 2009 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 A562F1065676; Wed, 4 Nov 2009 20:57: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 936F48FC16; Wed, 4 Nov 2009 20: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 nA4KvqRU046417; Wed, 4 Nov 2009 20:57:52 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4KvqSo046414; Wed, 4 Nov 2009 20:57:52 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200911042057.nA4KvqSo046414@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 4 Nov 2009 20: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: r198927 - 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: Wed, 04 Nov 2009 20:57:52 -0000 Author: yongari Date: Wed Nov 4 20:57:52 2009 New Revision: 198927 URL: http://svn.freebsd.org/changeset/base/198927 Log: Remove common DMA tag used for TX/RX mbufs and create Tx DMA tag and Rx DMA tag separately. Previously it used a common mbuf DMA tag for both Tx and Rx path but Rx buffer(standard ring case) should have a single DMA segment and maximum buffer size of the segment should be less than or equal to MCLBYTES. This change also make it possible to add TSO with minor changes. 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 Wed Nov 4 20:53:35 2009 (r198926) +++ head/sys/dev/bge/if_bge.c Wed Nov 4 20:57:52 2009 (r198927) @@ -932,7 +932,7 @@ bge_newbuf_std(struct bge_softc *sc, int if ((sc->bge_flags & BGE_FLAG_RX_ALIGNBUG) == 0) m_adj(m_new, ETHER_ALIGN); - error = bus_dmamap_load_mbuf_sg(sc->bge_cdata.bge_mtag, + error = bus_dmamap_load_mbuf_sg(sc->bge_cdata.bge_rx_mtag, sc->bge_cdata.bge_rx_std_dmamap[i], m_new, segs, &nsegs, 0); if (error != 0) { if (m == NULL) { @@ -949,7 +949,7 @@ bge_newbuf_std(struct bge_softc *sc, int r->bge_len = segs[0].ds_len; r->bge_idx = i; - bus_dmamap_sync(sc->bge_cdata.bge_mtag, + bus_dmamap_sync(sc->bge_cdata.bge_rx_mtag, sc->bge_cdata.bge_rx_std_dmamap[i], BUS_DMASYNC_PREREAD); @@ -1068,10 +1068,10 @@ bge_free_rx_ring_std(struct bge_softc *s for (i = 0; i < BGE_STD_RX_RING_CNT; i++) { if (sc->bge_cdata.bge_rx_std_chain[i] != NULL) { - bus_dmamap_sync(sc->bge_cdata.bge_mtag, + bus_dmamap_sync(sc->bge_cdata.bge_rx_mtag, sc->bge_cdata.bge_rx_std_dmamap[i], BUS_DMASYNC_POSTREAD); - bus_dmamap_unload(sc->bge_cdata.bge_mtag, + bus_dmamap_unload(sc->bge_cdata.bge_rx_mtag, sc->bge_cdata.bge_rx_std_dmamap[i]); m_freem(sc->bge_cdata.bge_rx_std_chain[i]); sc->bge_cdata.bge_rx_std_chain[i] = NULL; @@ -1138,10 +1138,10 @@ bge_free_tx_ring(struct bge_softc *sc) for (i = 0; i < BGE_TX_RING_CNT; i++) { if (sc->bge_cdata.bge_tx_chain[i] != NULL) { - bus_dmamap_sync(sc->bge_cdata.bge_mtag, + bus_dmamap_sync(sc->bge_cdata.bge_tx_mtag, sc->bge_cdata.bge_tx_dmamap[i], BUS_DMASYNC_POSTWRITE); - bus_dmamap_unload(sc->bge_cdata.bge_mtag, + bus_dmamap_unload(sc->bge_cdata.bge_tx_mtag, sc->bge_cdata.bge_tx_dmamap[i]); m_freem(sc->bge_cdata.bge_tx_chain[i]); sc->bge_cdata.bge_tx_chain[i] = NULL; @@ -1976,7 +1976,7 @@ bge_dma_free(struct bge_softc *sc) /* Destroy DMA maps for RX buffers. */ for (i = 0; i < BGE_STD_RX_RING_CNT; i++) { if (sc->bge_cdata.bge_rx_std_dmamap[i]) - bus_dmamap_destroy(sc->bge_cdata.bge_mtag, + bus_dmamap_destroy(sc->bge_cdata.bge_rx_mtag, sc->bge_cdata.bge_rx_std_dmamap[i]); } @@ -1990,12 +1990,14 @@ bge_dma_free(struct bge_softc *sc) /* Destroy DMA maps for TX buffers. */ for (i = 0; i < BGE_TX_RING_CNT; i++) { if (sc->bge_cdata.bge_tx_dmamap[i]) - bus_dmamap_destroy(sc->bge_cdata.bge_mtag, + bus_dmamap_destroy(sc->bge_cdata.bge_tx_mtag, sc->bge_cdata.bge_tx_dmamap[i]); } - if (sc->bge_cdata.bge_mtag) - bus_dma_tag_destroy(sc->bge_cdata.bge_mtag); + if (sc->bge_cdata.bge_rx_mtag) + bus_dma_tag_destroy(sc->bge_cdata.bge_rx_mtag); + if (sc->bge_cdata.bge_tx_mtag) + bus_dma_tag_destroy(sc->bge_cdata.bge_tx_mtag); /* Destroy standard RX ring. */ @@ -2106,21 +2108,33 @@ bge_dma_alloc(device_t dev) } /* - * Create tag for mbufs. + * Create tag for Tx mbufs. */ error = bus_dma_tag_create(sc->bge_cdata.bge_parent_tag, 1, 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES * BGE_NSEG_NEW, BGE_NSEG_NEW, MCLBYTES, - BUS_DMA_ALLOCNOW, NULL, NULL, &sc->bge_cdata.bge_mtag); + BUS_DMA_ALLOCNOW, NULL, NULL, &sc->bge_cdata.bge_tx_mtag); if (error) { - device_printf(sc->bge_dev, "could not allocate dma tag\n"); + device_printf(sc->bge_dev, "could not allocate TX dma tag\n"); + return (ENOMEM); + } + + /* + * Create tag for Rx mbufs. + */ + error = bus_dma_tag_create(sc->bge_cdata.bge_parent_tag, 1, 0, + BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES, 1, + MCLBYTES, BUS_DMA_ALLOCNOW, NULL, NULL, &sc->bge_cdata.bge_rx_mtag); + + if (error) { + device_printf(sc->bge_dev, "could not allocate RX dma tag\n"); return (ENOMEM); } /* Create DMA maps for RX buffers. */ for (i = 0; i < BGE_STD_RX_RING_CNT; i++) { - error = bus_dmamap_create(sc->bge_cdata.bge_mtag, 0, + error = bus_dmamap_create(sc->bge_cdata.bge_rx_mtag, 0, &sc->bge_cdata.bge_rx_std_dmamap[i]); if (error) { device_printf(sc->bge_dev, @@ -2131,11 +2145,11 @@ bge_dma_alloc(device_t dev) /* Create DMA maps for TX buffers. */ for (i = 0; i < BGE_TX_RING_CNT; i++) { - error = bus_dmamap_create(sc->bge_cdata.bge_mtag, 0, + error = bus_dmamap_create(sc->bge_cdata.bge_tx_mtag, 0, &sc->bge_cdata.bge_tx_dmamap[i]); if (error) { device_printf(sc->bge_dev, - "can't create DMA map for RX\n"); + "can't create DMA map for TX\n"); return (ENOMEM); } } @@ -3173,10 +3187,10 @@ bge_rxeof(struct bge_softc *sc) } } else { BGE_INC(sc->bge_std, BGE_STD_RX_RING_CNT); - bus_dmamap_sync(sc->bge_cdata.bge_mtag, + bus_dmamap_sync(sc->bge_cdata.bge_rx_mtag, sc->bge_cdata.bge_rx_std_dmamap[rxidx], BUS_DMASYNC_POSTREAD); - bus_dmamap_unload(sc->bge_cdata.bge_mtag, + bus_dmamap_unload(sc->bge_cdata.bge_rx_mtag, sc->bge_cdata.bge_rx_std_dmamap[rxidx]); m = sc->bge_cdata.bge_rx_std_chain[rxidx]; sc->bge_cdata.bge_rx_std_chain[rxidx] = NULL; @@ -3306,10 +3320,10 @@ bge_txeof(struct bge_softc *sc) if (cur_tx->bge_flags & BGE_TXBDFLAG_END) ifp->if_opackets++; if (sc->bge_cdata.bge_tx_chain[idx] != NULL) { - bus_dmamap_sync(sc->bge_cdata.bge_mtag, + bus_dmamap_sync(sc->bge_cdata.bge_tx_mtag, sc->bge_cdata.bge_tx_dmamap[idx], BUS_DMASYNC_POSTWRITE); - bus_dmamap_unload(sc->bge_cdata.bge_mtag, + bus_dmamap_unload(sc->bge_cdata.bge_tx_mtag, sc->bge_cdata.bge_tx_dmamap[idx]); m_freem(sc->bge_cdata.bge_tx_chain[idx]); sc->bge_cdata.bge_tx_chain[idx] = NULL; @@ -3642,7 +3656,7 @@ bge_encap(struct bge_softc *sc, struct m } map = sc->bge_cdata.bge_tx_dmamap[idx]; - error = bus_dmamap_load_mbuf_sg(sc->bge_cdata.bge_mtag, map, m, segs, + error = bus_dmamap_load_mbuf_sg(sc->bge_cdata.bge_tx_mtag, map, m, segs, &nsegs, BUS_DMA_NOWAIT); if (error == EFBIG) { m = m_collapse(m, M_DONTWAIT, BGE_NSEG_NEW); @@ -3652,8 +3666,8 @@ bge_encap(struct bge_softc *sc, struct m return (ENOBUFS); } *m_head = m; - error = bus_dmamap_load_mbuf_sg(sc->bge_cdata.bge_mtag, map, m, - segs, &nsegs, BUS_DMA_NOWAIT); + error = bus_dmamap_load_mbuf_sg(sc->bge_cdata.bge_tx_mtag, map, + m, segs, &nsegs, BUS_DMA_NOWAIT); if (error) { m_freem(m); *m_head = NULL; @@ -3667,11 +3681,11 @@ bge_encap(struct bge_softc *sc, struct m * of the end of the ring. */ if (nsegs > (BGE_TX_RING_CNT - sc->bge_txcnt - 16)) { - bus_dmamap_unload(sc->bge_cdata.bge_mtag, map); + bus_dmamap_unload(sc->bge_cdata.bge_tx_mtag, map); return (ENOBUFS); } - bus_dmamap_sync(sc->bge_cdata.bge_mtag, map, BUS_DMASYNC_PREWRITE); + bus_dmamap_sync(sc->bge_cdata.bge_tx_mtag, map, BUS_DMASYNC_PREWRITE); for (i = 0; ; i++) { d = &sc->bge_ldata.bge_tx_ring[idx]; Modified: head/sys/dev/bge/if_bgereg.h ============================================================================== --- head/sys/dev/bge/if_bgereg.h Wed Nov 4 20:53:35 2009 (r198926) +++ head/sys/dev/bge/if_bgereg.h Wed Nov 4 20:57:52 2009 (r198927) @@ -2543,8 +2543,9 @@ struct bge_chain_data { bus_dma_tag_t bge_tx_ring_tag; bus_dma_tag_t bge_status_tag; bus_dma_tag_t bge_stats_tag; - bus_dma_tag_t bge_mtag; /* mbuf mapping tag */ - bus_dma_tag_t bge_mtag_jumbo; /* mbuf mapping tag */ + bus_dma_tag_t bge_rx_mtag; /* Rx mbuf mapping tag */ + bus_dma_tag_t bge_tx_mtag; /* Tx mbuf mapping tag */ + bus_dma_tag_t bge_mtag_jumbo; /* Jumbo mbuf mapping tag */ bus_dmamap_t bge_tx_dmamap[BGE_TX_RING_CNT]; bus_dmamap_t bge_rx_std_dmamap[BGE_STD_RX_RING_CNT]; bus_dmamap_t bge_rx_jumbo_dmamap[BGE_JUMBO_RX_RING_CNT]; From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 21:06:54 2009 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 C0F49106566C; Wed, 4 Nov 2009 21:06:54 +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 967D48FC0C; Wed, 4 Nov 2009 21:06:54 +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 nA4L6sZt046694; Wed, 4 Nov 2009 21:06:54 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4L6s43046692; Wed, 4 Nov 2009 21:06:54 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200911042106.nA4L6s43046692@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 4 Nov 2009 21:06:54 +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: r198928 - 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: Wed, 04 Nov 2009 21:06:54 -0000 Author: yongari Date: Wed Nov 4 21:06:54 2009 New Revision: 198928 URL: http://svn.freebsd.org/changeset/base/198928 Log: Make bge_newbuf_std()/bge_newbuf_jumbo() returns actual error code for buffer allocation. If driver know we are out of Rx buffers let controller stop. This should fix panic when interface is run even if it had no configured Rx buffers. Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Wed Nov 4 20:57:52 2009 (r198927) +++ head/sys/dev/bge/if_bge.c Wed Nov 4 21:06:54 2009 (r198928) @@ -1044,11 +1044,11 @@ bge_newbuf_jumbo(struct bge_softc *sc, i static int bge_init_rx_ring_std(struct bge_softc *sc) { - int i; + int error, i; for (i = 0; i < BGE_SSLOTS; i++) { - if (bge_newbuf_std(sc, i, NULL) == ENOBUFS) - return (ENOBUFS); + if ((error = bge_newbuf_std(sc, i, NULL)) != 0) + return (error); }; bus_dmamap_sync(sc->bge_cdata.bge_rx_std_ring_tag, @@ -1085,11 +1085,11 @@ static int bge_init_rx_ring_jumbo(struct bge_softc *sc) { struct bge_rcb *rcb; - int i; + int error, i; for (i = 0; i < BGE_JUMBO_RX_RING_CNT; i++) { - if (bge_newbuf_jumbo(sc, i, NULL) == ENOBUFS) - return (ENOBUFS); + if ((error = bge_newbuf_jumbo(sc, i, NULL)) != 0) + return (error); }; bus_dmamap_sync(sc->bge_cdata.bge_rx_jumbo_ring_tag, @@ -3179,8 +3179,7 @@ bge_rxeof(struct bge_softc *sc) bge_newbuf_jumbo(sc, sc->bge_jumbo, m); continue; } - if (bge_newbuf_jumbo(sc, - sc->bge_jumbo, NULL) == ENOBUFS) { + if (bge_newbuf_jumbo(sc, sc->bge_jumbo, NULL) != 0) { ifp->if_ierrors++; bge_newbuf_jumbo(sc, sc->bge_jumbo, m); continue; @@ -3200,8 +3199,7 @@ bge_rxeof(struct bge_softc *sc) bge_newbuf_std(sc, sc->bge_std, m); continue; } - if (bge_newbuf_std(sc, sc->bge_std, - NULL) == ENOBUFS) { + if (bge_newbuf_std(sc, sc->bge_std, NULL) != 0) { ifp->if_ierrors++; bge_newbuf_std(sc, sc->bge_std, m); continue; @@ -3897,7 +3895,11 @@ bge_init_locked(struct bge_softc *sc) bge_setvlan(sc); /* Init RX ring. */ - bge_init_rx_ring_std(sc); + if (bge_init_rx_ring_std(sc) != 0) { + device_printf(sc->bge_dev, "no memory for std Rx buffers.\n"); + bge_stop(sc); + return; + } /* * Workaround for a bug in 5705 ASIC rev A0. Poll the NIC's @@ -3918,8 +3920,13 @@ bge_init_locked(struct bge_softc *sc) } /* Init jumbo RX ring. */ - if (ifp->if_mtu > (ETHERMTU + ETHER_HDR_LEN + ETHER_CRC_LEN)) - bge_init_rx_ring_jumbo(sc); + if (ifp->if_mtu > (ETHERMTU + ETHER_HDR_LEN + ETHER_CRC_LEN)) { + if (bge_init_rx_ring_jumbo(sc) != 0) { + device_printf(sc->bge_dev, "no memory for std Rx buffers.\n"); + bge_stop(sc); + return; + } + } /* Init our RX return ring index. */ sc->bge_rx_saved_considx = 0; From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 21:12:34 2009 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 04C2F1065698; Wed, 4 Nov 2009 21:12:34 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E84518FC30; Wed, 4 Nov 2009 21:12: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 nA4LCXdR046883; Wed, 4 Nov 2009 21:12:33 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4LCXla046881; Wed, 4 Nov 2009 21:12:33 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <200911042112.nA4LCXla046881@svn.freebsd.org> From: Xin LI Date: Wed, 4 Nov 2009 21:12: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: r198929 - head/share/examples/ses/srcs 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, 04 Nov 2009 21:12:34 -0000 Author: delphij Date: Wed Nov 4 21:12:33 2009 New Revision: 198929 URL: http://svn.freebsd.org/changeset/base/198929 Log: Include string.h for prototype of strcmp(). Modified: head/share/examples/ses/srcs/getencstat.c Modified: head/share/examples/ses/srcs/getencstat.c ============================================================================== --- head/share/examples/ses/srcs/getencstat.c Wed Nov 4 21:06:54 2009 (r198928) +++ head/share/examples/ses/srcs/getencstat.c Wed Nov 4 21:12:33 2009 (r198929) @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include SESINC From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 21:28:50 2009 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 C4D971065670; Wed, 4 Nov 2009 21:28:50 +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 9A4238FC18; Wed, 4 Nov 2009 21:28: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 nA4LSotL047299; Wed, 4 Nov 2009 21:28:50 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4LSoCw047296; Wed, 4 Nov 2009 21:28:50 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200911042128.nA4LSoCw047296@svn.freebsd.org> From: Andrew Thompson Date: Wed, 4 Nov 2009 21:28:50 +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: r198930 - releng/8.0/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: Wed, 04 Nov 2009 21:28:50 -0000 Author: thompsa Date: Wed Nov 4 21:28:50 2009 New Revision: 198930 URL: http://svn.freebsd.org/changeset/base/198930 Log: MFC r198775 Fix a corner case where usbd_transfer_drain() can return too early if the callback has dropped the mutex, leading to a panic. Submitted by: HPS Approved by: re (kib) Modified: releng/8.0/sys/dev/usb/usb_core.h releng/8.0/sys/dev/usb/usb_transfer.c Directory Properties: releng/8.0/sys/ (props changed) releng/8.0/sys/amd64/include/xen/ (props changed) releng/8.0/sys/cddl/contrib/opensolaris/ (props changed) releng/8.0/sys/contrib/dev/acpica/ (props changed) releng/8.0/sys/contrib/pf/ (props changed) releng/8.0/sys/dev/xen/xenpci/ (props changed) Modified: releng/8.0/sys/dev/usb/usb_core.h ============================================================================== --- releng/8.0/sys/dev/usb/usb_core.h Wed Nov 4 21:12:33 2009 (r198929) +++ releng/8.0/sys/dev/usb/usb_core.h Wed Nov 4 21:28:50 2009 (r198930) @@ -112,6 +112,7 @@ struct usb_xfer_flags_int { uint8_t curr_dma_set:1; /* used by USB HC/DC driver */ uint8_t can_cancel_immed:1; /* set if USB transfer can be * cancelled immediately */ + uint8_t doing_callback:1; /* set if executing the callback */ }; /* Modified: releng/8.0/sys/dev/usb/usb_transfer.c ============================================================================== --- releng/8.0/sys/dev/usb/usb_transfer.c Wed Nov 4 21:12:33 2009 (r198929) +++ releng/8.0/sys/dev/usb/usb_transfer.c Wed Nov 4 21:28:50 2009 (r198930) @@ -1785,8 +1785,18 @@ usbd_transfer_drain(struct usb_xfer *xfe usbd_transfer_stop(xfer); - while (usbd_transfer_pending(xfer)) { + while (usbd_transfer_pending(xfer) || + xfer->flags_int.doing_callback) { + + /* + * It is allowed that the callback can drop its + * transfer mutex. In that case checking only + * "usbd_transfer_pending()" is not enough to tell if + * the USB transfer is fully drained. We also need to + * check the internal "doing_callback" flag. + */ xfer->flags_int.draining = 1; + /* * Wait until the current outstanding USB * transfer is complete ! @@ -2031,6 +2041,9 @@ usbd_callback_wrapper(struct usb_xfer_qu /* get next USB transfer in the queue */ info->done_q.curr = NULL; + /* set flag in case of drain */ + xfer->flags_int.doing_callback = 1; + USB_BUS_UNLOCK(info->bus); USB_BUS_LOCK_ASSERT(info->bus, MA_NOTOWNED); @@ -2083,12 +2096,17 @@ usbd_callback_wrapper(struct usb_xfer_qu if ((!xfer->flags_int.open) && (xfer->flags_int.started) && (xfer->usb_state == USB_ST_ERROR)) { + /* clear flag in case of drain */ + xfer->flags_int.doing_callback = 0; /* try to loop, but not recursivly */ usb_command_wrapper(&info->done_q, xfer); return; } done: + /* clear flag in case of drain */ + xfer->flags_int.doing_callback = 0; + /* * Check if we are draining. */ From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 22:39:18 2009 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 CE8DA1065676; Wed, 4 Nov 2009 22:39:18 +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 BD7938FC1F; Wed, 4 Nov 2009 22:39: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 nA4MdIXX049173; Wed, 4 Nov 2009 22:39:18 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4MdILx049170; Wed, 4 Nov 2009 22:39:18 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <200911042239.nA4MdILx049170@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 4 Nov 2009 22:39: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: r198931 - in head/sys/amd64: acpica 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: Wed, 04 Nov 2009 22:39:19 -0000 Author: jkim Date: Wed Nov 4 22:39:18 2009 New Revision: 198931 URL: http://svn.freebsd.org/changeset/base/198931 Log: Tweak memory allocation for amd64 suspend/resume CPU context. Modified: head/sys/amd64/acpica/acpi_wakeup.c head/sys/amd64/amd64/mp_machdep.c Modified: head/sys/amd64/acpica/acpi_wakeup.c ============================================================================== --- head/sys/amd64/acpica/acpi_wakeup.c Wed Nov 4 21:28:50 2009 (r198930) +++ head/sys/amd64/acpica/acpi_wakeup.c Wed Nov 4 22:39:18 2009 (r198931) @@ -65,9 +65,9 @@ extern int acpi_resume_beep; extern int acpi_reset_video; #ifdef SMP -extern struct xpcb *stopxpcbs; +extern struct xpcb **stopxpcbs; #else -static struct xpcb *stopxpcbs; +static struct xpcb **stopxpcbs; #endif int acpi_restorecpu(struct xpcb *, vm_offset_t); @@ -104,10 +104,10 @@ acpi_wakeup_ap(struct acpi_softc *sc, in int apic_id = cpu_apic_ids[cpu]; int ms; - WAKECODE_FIXUP(wakeup_xpcb, struct xpcb *, &stopxpcbs[cpu]); - WAKECODE_FIXUP(wakeup_gdt, uint16_t, stopxpcbs[cpu].xpcb_gdt.rd_limit); + WAKECODE_FIXUP(wakeup_xpcb, struct xpcb *, stopxpcbs[cpu]); + WAKECODE_FIXUP(wakeup_gdt, uint16_t, stopxpcbs[cpu]->xpcb_gdt.rd_limit); WAKECODE_FIXUP(wakeup_gdt + 2, uint64_t, - stopxpcbs[cpu].xpcb_gdt.rd_base); + stopxpcbs[cpu]->xpcb_gdt.rd_base); WAKECODE_FIXUP(wakeup_cpu, int, cpu); /* do an INIT IPI: assert RESET */ @@ -245,8 +245,8 @@ acpi_sleep_machdep(struct acpi_softc *sc cr3 = rcr3(); load_cr3(KPML4phys); - stopfpu = &stopxpcbs[0].xpcb_pcb.pcb_save; - if (acpi_savecpu(&stopxpcbs[0])) { + stopfpu = &stopxpcbs[0]->xpcb_pcb.pcb_save; + if (acpi_savecpu(stopxpcbs[0])) { fpugetregs(curthread, stopfpu); #ifdef SMP @@ -261,11 +261,11 @@ acpi_sleep_machdep(struct acpi_softc *sc WAKECODE_FIXUP(resume_beep, uint8_t, (acpi_resume_beep != 0)); WAKECODE_FIXUP(reset_video, uint8_t, (acpi_reset_video != 0)); - WAKECODE_FIXUP(wakeup_xpcb, struct xpcb *, &stopxpcbs[0]); + WAKECODE_FIXUP(wakeup_xpcb, struct xpcb *, stopxpcbs[0]); WAKECODE_FIXUP(wakeup_gdt, uint16_t, - stopxpcbs[0].xpcb_gdt.rd_limit); + stopxpcbs[0]->xpcb_gdt.rd_limit); WAKECODE_FIXUP(wakeup_gdt + 2, uint64_t, - stopxpcbs[0].xpcb_gdt.rd_base); + stopxpcbs[0]->xpcb_gdt.rd_base); WAKECODE_FIXUP(wakeup_cpu, int, 0); /* Call ACPICA to enter the desired sleep state */ @@ -320,6 +320,7 @@ static void * acpi_alloc_wakeup_handler(void) { void *wakeaddr; + int i; /* * Specify the region for our wakeup code. We want it in the low 1 MB @@ -334,12 +335,9 @@ acpi_alloc_wakeup_handler(void) printf("%s: can't alloc wake memory\n", __func__); return (NULL); } - stopxpcbs = malloc(mp_ncpus * sizeof(*stopxpcbs), M_DEVBUF, M_NOWAIT); - if (stopxpcbs == NULL) { - contigfree(wakeaddr, 4 * PAGE_SIZE, M_DEVBUF); - printf("%s: can't alloc CPU state memory\n", __func__); - return (NULL); - } + stopxpcbs = malloc(mp_ncpus * sizeof(*stopxpcbs), M_DEVBUF, M_WAITOK); + for (i = 0; i < mp_ncpus; i++) + stopxpcbs[i] = malloc(sizeof(**stopxpcbs), M_DEVBUF, M_WAITOK); return (wakeaddr); } Modified: head/sys/amd64/amd64/mp_machdep.c ============================================================================== --- head/sys/amd64/amd64/mp_machdep.c Wed Nov 4 21:28:50 2009 (r198930) +++ head/sys/amd64/amd64/mp_machdep.c Wed Nov 4 22:39:18 2009 (r198931) @@ -105,7 +105,7 @@ extern pt_entry_t *KPTphys; extern pt_entry_t *SMPpt; struct pcb stoppcbs[MAXCPU]; -struct xpcb *stopxpcbs = NULL; +struct xpcb **stopxpcbs = NULL; /* Variables needed for SMP tlb shootdown. */ vm_offset_t smp_tlb_addr1; @@ -1256,8 +1256,8 @@ cpususpend_handler(void) rf = intr_disable(); cr3 = rcr3(); - stopfpu = &stopxpcbs[cpu].xpcb_pcb.pcb_save; - if (savectx2(&stopxpcbs[cpu])) { + stopfpu = &stopxpcbs[cpu]->xpcb_pcb.pcb_save; + if (savectx2(stopxpcbs[cpu])) { fpugetregs(curthread, stopfpu); wbinvd(); atomic_set_int(&stopped_cpus, cpumask); From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 23:03:19 2009 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 71D8D106568B; Wed, 4 Nov 2009 23:03:19 +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 3156B8FC16; Wed, 4 Nov 2009 23:03:19 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id nA4MvxS7053033; Wed, 4 Nov 2009 15:57:59 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Wed, 04 Nov 2009 15:57:59 -0700 (MST) Message-Id: <20091104.155759.-545558145.imp@bsdimp.com> To: ed@80386.nl From: "M. Warner Losh" In-Reply-To: <20091104055811.GY1293@hoeg.nl> References: <200911040132.nA41WxtQ012750@svn.freebsd.org> <20091104055811.GY1293@hoeg.nl> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: attilio@FreeBSD.org, svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r198868 - in head/sys: amd64/amd64 i386/i386 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, 04 Nov 2009 23:03:19 -0000 In message: <20091104055811.GY1293@hoeg.nl> Ed Schouten writes: : Hi Attilio, : : * Attilio Rao wrote: : > Opteron rev E family of processor expose a bug where, in very rare : > ocassions, memory barriers semantic is not honoured by the hardware : > itself. As a result, some random breakage can happen in uninvestigable : > ways (for further explanation see at the content of the commit itself). : : Ooh. Sounds like an interesting bug. : : The bug doesn't manifest itself on UP, right? If so, maybe we should add : some very short instructions to the warning on how to disable SMP. Or better yet: disable it unless specifically enabled... Warner From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 23:36:23 2009 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 8E0D61065698; Wed, 4 Nov 2009 23:36:23 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7C3668FC18; Wed, 4 Nov 2009 23:36: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 nA4NaNnD050451; Wed, 4 Nov 2009 23:36:23 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4NaN8Q050439; Wed, 4 Nov 2009 23:36:23 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <200911042336.nA4NaN8Q050439@svn.freebsd.org> From: Xin LI Date: Wed, 4 Nov 2009 23:36: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: r198934 - head/share/examples/ses/srcs 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, 04 Nov 2009 23:36:23 -0000 Author: delphij Date: Wed Nov 4 23:36:23 2009 New Revision: 198934 URL: http://svn.freebsd.org/changeset/base/198934 Log: Cleanup code to make it WARNS=6 clean: - ANSIfy prototypes; - Add __unused for parameters that is not being currently used; - Add a header for subrountines being called from other modules. Reviewed by: mjacob Added: head/share/examples/ses/srcs/eltsub.h (contents, props changed) Modified: head/share/examples/ses/srcs/chpmon.c head/share/examples/ses/srcs/eltsub.c head/share/examples/ses/srcs/getencstat.c head/share/examples/ses/srcs/getnobj.c head/share/examples/ses/srcs/getobjmap.c head/share/examples/ses/srcs/getobjstat.c head/share/examples/ses/srcs/inienc.c head/share/examples/ses/srcs/sesd.c head/share/examples/ses/srcs/setencstat.c head/share/examples/ses/srcs/setobjstat.c Modified: head/share/examples/ses/srcs/chpmon.c ============================================================================== --- head/share/examples/ses/srcs/chpmon.c Wed Nov 4 23:34:58 2009 (r198933) +++ head/share/examples/ses/srcs/chpmon.c Wed Nov 4 23:36:23 2009 (r198934) @@ -47,9 +47,7 @@ #define BADSTAT \ (SES_ENCSTAT_UNRECOV|SES_ENCSTAT_CRITICAL|SES_ENCSTAT_NONCRITICAL) int -main(a, v) - int a; - char **v; +main(int a, char **v) { int fd, delay, dev; ses_encstat stat, *carray; Modified: head/share/examples/ses/srcs/eltsub.c ============================================================================== --- head/share/examples/ses/srcs/eltsub.c Wed Nov 4 23:34:58 2009 (r198933) +++ head/share/examples/ses/srcs/eltsub.c Wed Nov 4 23:36:23 2009 (r198934) @@ -38,9 +38,10 @@ #include #include SESINC +#include "eltsub.h" + char * -geteltnm(type) - int type; +geteltnm(int type) { static char rbuf[132]; @@ -116,8 +117,7 @@ geteltnm(type) } static char * -scode2ascii(code) - u_char code; +scode2ascii(u_char code) { static char rbuf[32]; switch (code & 0xf) { @@ -154,9 +154,7 @@ scode2ascii(code) char * -stat2ascii(eletype, cstat) - int eletype; - u_char *cstat; +stat2ascii(int eletype __unused, u_char *cstat) { static char ebuf[256], *scode; Added: head/share/examples/ses/srcs/eltsub.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/examples/ses/srcs/eltsub.h Wed Nov 4 23:36:23 2009 (r198934) @@ -0,0 +1,36 @@ +/* $FreeBSD$ */ +/* + * Copyright (c) 2000 by Matthew Jacob + * 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. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * the GNU Public License ("GPL"). + * + * 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. + * + * Matthew Jacob + * Feral Software + * mjacob@feral.com + */ + +char * geteltnm(int); +char * stat2ascii(int, u_char *); Modified: head/share/examples/ses/srcs/getencstat.c ============================================================================== --- head/share/examples/ses/srcs/getencstat.c Wed Nov 4 23:34:58 2009 (r198933) +++ head/share/examples/ses/srcs/getencstat.c Wed Nov 4 23:36:23 2009 (r198934) @@ -40,13 +40,10 @@ #include #include SESINC -extern char *geteltnm __P((int)); -extern char *stat2ascii __P((int, u_char *)); +#include "eltsub.h" int -main(a, v) - int a; - char **v; +main(int a, char **v) { ses_object *objp; ses_objstat ob; Modified: head/share/examples/ses/srcs/getnobj.c ============================================================================== --- head/share/examples/ses/srcs/getnobj.c Wed Nov 4 23:34:58 2009 (r198933) +++ head/share/examples/ses/srcs/getnobj.c Wed Nov 4 23:36:23 2009 (r198934) @@ -41,9 +41,7 @@ #include SESINC int -main(argc, argv) - int argc; - char **argv; +main(int argc, char **argv) { unsigned int nobj; int fd; Modified: head/share/examples/ses/srcs/getobjmap.c ============================================================================== --- head/share/examples/ses/srcs/getobjmap.c Wed Nov 4 23:34:58 2009 (r198933) +++ head/share/examples/ses/srcs/getobjmap.c Wed Nov 4 23:36:23 2009 (r198934) @@ -39,12 +39,10 @@ #include #include SESINC -extern char *geteltnm __P((int)); +#include "eltsub.h" int -main(a, v) - int a; - char **v; +main(int a, char **v) { ses_object *objp; int nobj, fd, i; Modified: head/share/examples/ses/srcs/getobjstat.c ============================================================================== --- head/share/examples/ses/srcs/getobjstat.c Wed Nov 4 23:34:58 2009 (r198933) +++ head/share/examples/ses/srcs/getobjstat.c Wed Nov 4 23:36:23 2009 (r198934) @@ -39,9 +39,7 @@ #include SESINC int -main(a, v) - int a; - char **v; +main(int a, char **v) { int fd; int i; Modified: head/share/examples/ses/srcs/inienc.c ============================================================================== --- head/share/examples/ses/srcs/inienc.c Wed Nov 4 23:34:58 2009 (r198933) +++ head/share/examples/ses/srcs/inienc.c Wed Nov 4 23:36:23 2009 (r198934) @@ -40,9 +40,7 @@ #include SESINC int -main(a, v) - int a; - char **v; +main(int a, char **v) { int fd; Modified: head/share/examples/ses/srcs/sesd.c ============================================================================== --- head/share/examples/ses/srcs/sesd.c Wed Nov 4 23:34:58 2009 (r198933) +++ head/share/examples/ses/srcs/sesd.c Wed Nov 4 23:36:23 2009 (r198934) @@ -49,13 +49,11 @@ */ int -main(a, v) - int a; - char **v; +main(int a, char **v) { - static char *usage = + static const char *usage = "usage: %s [ -d ] [ -t pollinterval ] device [ device ]\n"; - int fd, polltime, dev, devbase, nodaemon, bpri; + int fd, polltime, dev, devbase, nodaemon; ses_encstat stat, *carray; if (a < 2) { @@ -115,7 +113,6 @@ main(a, v) for (;;) { for (dev = devbase; dev < a; dev++) { - char buf[128]; fd = open(v[dev], O_RDWR); if (fd < 0) { syslog(LOG_ERR, "%s: %m", v[dev]); Modified: head/share/examples/ses/srcs/setencstat.c ============================================================================== --- head/share/examples/ses/srcs/setencstat.c Wed Nov 4 23:34:58 2009 (r198933) +++ head/share/examples/ses/srcs/setencstat.c Wed Nov 4 23:36:23 2009 (r198934) @@ -40,9 +40,7 @@ #include SESINC int -main(a, v) - int a; - char **v; +main(int a, char **v) { int fd; long val; Modified: head/share/examples/ses/srcs/setobjstat.c ============================================================================== --- head/share/examples/ses/srcs/setobjstat.c Wed Nov 4 23:34:58 2009 (r198933) +++ head/share/examples/ses/srcs/setobjstat.c Wed Nov 4 23:36:23 2009 (r198934) @@ -40,9 +40,7 @@ #include SESINC int -main(a, v) - int a; - char **v; +main(int a, char **v) { int fd; int i; From owner-svn-src-all@FreeBSD.ORG Thu Nov 5 02:27:57 2009 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 1E1F8106566C; Thu, 5 Nov 2009 02:27:57 +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 0C00F8FC0A; Thu, 5 Nov 2009 02:27: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 nA52RuHo054302; Thu, 5 Nov 2009 02:27:56 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA52RuFl054300; Thu, 5 Nov 2009 02:27:56 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <200911050227.nA52RuFl054300@svn.freebsd.org> From: Ed Maste Date: Thu, 5 Nov 2009 02:27:56 +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: r198935 - stable/8/usr.bin/gcore 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, 05 Nov 2009 02:27:57 -0000 Author: emaste Date: Thu Nov 5 02:27:56 2009 New Revision: 198935 URL: http://svn.freebsd.org/changeset/base/198935 Log: MFC r197437: Use %zu for size_t, not %zd. Modified: stable/8/usr.bin/gcore/elfcore.c Directory Properties: stable/8/usr.bin/gcore/ (props changed) Modified: stable/8/usr.bin/gcore/elfcore.c ============================================================================== --- stable/8/usr.bin/gcore/elfcore.c Wed Nov 4 23:36:23 2009 (r198934) +++ stable/8/usr.bin/gcore/elfcore.c Thu Nov 5 02:27:56 2009 (r198935) @@ -158,7 +158,7 @@ elf_coredump(int efd __unused, int fd, p err(1, "read from %s", memname); if ((size_t)ngot < nwant) errx(1, "short read from %s:" - " wanted %zd, got %zd", memname, + " wanted %zu, got %zd", memname, nwant, ngot); ngot = write(fd, buf, nwant); if (ngot == -1) @@ -414,7 +414,7 @@ readhdrinfo(pid_t pid, prstatus_t *statu if ((n = read(fd, &status->pr_reg, sizeof status->pr_reg)) == -1) err(1, "read error from %s", name); if ((size_t)n < sizeof(status->pr_reg)) - errx(1, "short read from %s: wanted %zd, got %d", name, + errx(1, "short read from %s: wanted %zu, got %d", name, sizeof status->pr_reg, n); close(fd); @@ -425,7 +425,7 @@ readhdrinfo(pid_t pid, prstatus_t *statu if ((n = read(fd, fpregset, sizeof *fpregset)) == -1) err(1, "read error from %s", name); if ((size_t)n < sizeof(*fpregset)) - errx(1, "short read from %s: wanted %zd, got %d", name, + errx(1, "short read from %s: wanted %zu, got %d", name, sizeof *fpregset, n); close(fd); From owner-svn-src-all@FreeBSD.ORG Thu Nov 5 02:29:46 2009 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 4463A1065670; Thu, 5 Nov 2009 02:29:46 +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 325D08FC1C; Thu, 5 Nov 2009 02:29: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 nA52Tkbs054387; Thu, 5 Nov 2009 02:29:46 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA52TkIr054385; Thu, 5 Nov 2009 02:29:46 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <200911050229.nA52TkIr054385@svn.freebsd.org> From: Ed Maste Date: Thu, 5 Nov 2009 02:29:46 +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: r198936 - stable/7/usr.bin/gcore 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, 05 Nov 2009 02:29:46 -0000 Author: emaste Date: Thu Nov 5 02:29:45 2009 New Revision: 198936 URL: http://svn.freebsd.org/changeset/base/198936 Log: MFC r197437: Use %zu for size_t, not %zd. Modified: stable/7/usr.bin/gcore/elfcore.c Directory Properties: stable/7/usr.bin/gcore/ (props changed) Modified: stable/7/usr.bin/gcore/elfcore.c ============================================================================== --- stable/7/usr.bin/gcore/elfcore.c Thu Nov 5 02:27:56 2009 (r198935) +++ stable/7/usr.bin/gcore/elfcore.c Thu Nov 5 02:29:45 2009 (r198936) @@ -158,7 +158,7 @@ elf_coredump(int efd __unused, int fd, p err(1, "read from %s", memname); if ((size_t)ngot < nwant) errx(1, "short read from %s:" - " wanted %zd, got %zd", memname, + " wanted %zu, got %zd", memname, nwant, ngot); ngot = write(fd, buf, nwant); if (ngot == -1) @@ -414,7 +414,7 @@ readhdrinfo(pid_t pid, prstatus_t *statu if ((n = read(fd, &status->pr_reg, sizeof status->pr_reg)) == -1) err(1, "read error from %s", name); if ((size_t)n < sizeof(status->pr_reg)) - errx(1, "short read from %s: wanted %zd, got %d", name, + errx(1, "short read from %s: wanted %zu, got %d", name, sizeof status->pr_reg, n); close(fd); @@ -425,7 +425,7 @@ readhdrinfo(pid_t pid, prstatus_t *statu if ((n = read(fd, fpregset, sizeof *fpregset)) == -1) err(1, "read error from %s", name); if ((size_t)n < sizeof(*fpregset)) - errx(1, "short read from %s: wanted %zd, got %d", name, + errx(1, "short read from %s: wanted %zu, got %d", name, sizeof *fpregset, n); close(fd); From owner-svn-src-all@FreeBSD.ORG Thu Nov 5 02:31:10 2009 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 E6E82106566C; Thu, 5 Nov 2009 02:31:10 +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 D500E8FC13; Thu, 5 Nov 2009 02:31: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 nA52VADW054482; Thu, 5 Nov 2009 02:31:10 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA52VAAW054480; Thu, 5 Nov 2009 02:31:10 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <200911050231.nA52VAAW054480@svn.freebsd.org> From: Ed Maste Date: Thu, 5 Nov 2009 02:31:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198937 - stable/6/usr.bin/gcore 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, 05 Nov 2009 02:31:11 -0000 Author: emaste Date: Thu Nov 5 02:31:10 2009 New Revision: 198937 URL: http://svn.freebsd.org/changeset/base/198937 Log: MFC r197437: Use %zu for size_t, not %zd. Modified: stable/6/usr.bin/gcore/elfcore.c Directory Properties: stable/6/usr.bin/gcore/ (props changed) Modified: stable/6/usr.bin/gcore/elfcore.c ============================================================================== --- stable/6/usr.bin/gcore/elfcore.c Thu Nov 5 02:29:45 2009 (r198936) +++ stable/6/usr.bin/gcore/elfcore.c Thu Nov 5 02:31:10 2009 (r198937) @@ -158,7 +158,7 @@ elf_coredump(int efd __unused, int fd, p err(1, "read from %s", memname); if ((size_t)ngot < nwant) errx(1, "short read from %s:" - " wanted %zd, got %zd", memname, + " wanted %zu, got %zd", memname, nwant, ngot); ngot = write(fd, buf, nwant); if (ngot == -1) @@ -414,7 +414,7 @@ readhdrinfo(pid_t pid, prstatus_t *statu if ((n = read(fd, &status->pr_reg, sizeof status->pr_reg)) == -1) err(1, "read error from %s", name); if ((size_t)n < sizeof(status->pr_reg)) - errx(1, "short read from %s: wanted %zd, got %d", name, + errx(1, "short read from %s: wanted %zu, got %d", name, sizeof status->pr_reg, n); close(fd); @@ -425,7 +425,7 @@ readhdrinfo(pid_t pid, prstatus_t *statu if ((n = read(fd, fpregset, sizeof *fpregset)) == -1) err(1, "read error from %s", name); if ((size_t)n < sizeof(*fpregset)) - errx(1, "short read from %s: wanted %zd, got %d", name, + errx(1, "short read from %s: wanted %zu, got %d", name, sizeof *fpregset, n); close(fd); From owner-svn-src-all@FreeBSD.ORG Thu Nov 5 04:51:39 2009 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 519BB1065670; Thu, 5 Nov 2009 04:51:39 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 277FF8FC12; Thu, 5 Nov 2009 04:51: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 nA54pdXQ058340; Thu, 5 Nov 2009 04:51:39 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA54pdgo058337; Thu, 5 Nov 2009 04:51:39 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <200911050451.nA54pdgo058337@svn.freebsd.org> From: Jaakko Heinonen Date: Thu, 5 Nov 2009 04:51: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: r198940 - head/sys/gnu/fs/ext2fs 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, 05 Nov 2009 04:51:39 -0000 Author: jh Date: Thu Nov 5 04:51:38 2009 New Revision: 198940 URL: http://svn.freebsd.org/changeset/base/198940 Log: File flags handling fixes for ext2fs: - Disallow setting of flags not supported by ext2fs. - Map EXT2_APPEND_FL to SF_APPEND. - Map EXT2_IMMUTABLE_FL to SF_IMMUTABLE. - Map EXT2_NODUMP_FL to UF_NODUMP. Note that ext2fs doesn't support user settable append and immutable flags. EXT2_NODUMP_FL is an user settable flag also on Linux. PR: kern/122047 Reported by: Ighighi Submitted by: Aditya Sarawgi (original version) Reviewed by: bde Approved by: trasz (mentor) Modified: head/sys/gnu/fs/ext2fs/ext2_inode_cnv.c head/sys/gnu/fs/ext2fs/ext2_vnops.c Modified: head/sys/gnu/fs/ext2fs/ext2_inode_cnv.c ============================================================================== --- head/sys/gnu/fs/ext2fs/ext2_inode_cnv.c Thu Nov 5 03:54:03 2009 (r198939) +++ head/sys/gnu/fs/ext2fs/ext2_inode_cnv.c Thu Nov 5 04:51:38 2009 (r198940) @@ -83,8 +83,9 @@ ext2_ei2i(ei, ip) ip->i_mtime = ei->i_mtime; ip->i_ctime = ei->i_ctime; ip->i_flags = 0; - ip->i_flags |= (ei->i_flags & EXT2_APPEND_FL) ? APPEND : 0; - ip->i_flags |= (ei->i_flags & EXT2_IMMUTABLE_FL) ? IMMUTABLE : 0; + ip->i_flags |= (ei->i_flags & EXT2_APPEND_FL) ? SF_APPEND : 0; + ip->i_flags |= (ei->i_flags & EXT2_IMMUTABLE_FL) ? SF_IMMUTABLE : 0; + ip->i_flags |= (ei->i_flags & EXT2_NODUMP_FL) ? UF_NODUMP : 0; ip->i_blocks = ei->i_blocks; ip->i_gen = ei->i_generation; ip->i_uid = ei->i_uid; @@ -121,8 +122,9 @@ ext2_i2ei(ip, ei) ei->i_ctime = ip->i_ctime; ei->i_flags = ip->i_flags; ei->i_flags = 0; - ei->i_flags |= (ip->i_flags & APPEND) ? EXT2_APPEND_FL: 0; - ei->i_flags |= (ip->i_flags & IMMUTABLE) ? EXT2_IMMUTABLE_FL: 0; + ei->i_flags |= (ip->i_flags & SF_APPEND) ? EXT2_APPEND_FL: 0; + ei->i_flags |= (ip->i_flags & SF_IMMUTABLE) ? EXT2_IMMUTABLE_FL: 0; + ei->i_flags |= (ip->i_flags & UF_NODUMP) ? EXT2_NODUMP_FL : 0; ei->i_blocks = ip->i_blocks; ei->i_generation = ip->i_gen; ei->i_uid = ip->i_uid; Modified: head/sys/gnu/fs/ext2fs/ext2_vnops.c ============================================================================== --- head/sys/gnu/fs/ext2fs/ext2_vnops.c Thu Nov 5 03:54:03 2009 (r198939) +++ head/sys/gnu/fs/ext2fs/ext2_vnops.c Thu Nov 5 04:51:38 2009 (r198940) @@ -391,6 +391,10 @@ ext2_setattr(ap) return (EINVAL); } if (vap->va_flags != VNOVAL) { + /* Disallow flags not supported by ext2fs. */ + if (vap->va_flags & ~(SF_APPEND | SF_IMMUTABLE | UF_NODUMP)) + return (EOPNOTSUPP); + if (vp->v_mount->mnt_flag & MNT_RDONLY) return (EROFS); /* From owner-svn-src-all@FreeBSD.ORG Thu Nov 5 06:08:05 2009 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 08D88106566B; Thu, 5 Nov 2009 06:08:05 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EC8F88FC08; Thu, 5 Nov 2009 06:08: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 nA56844s064366; Thu, 5 Nov 2009 06:08:04 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA5684TK064364; Thu, 5 Nov 2009 06:08:04 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <200911050608.nA5684TK064364@svn.freebsd.org> From: Marcel Moolenaar Date: Thu, 5 Nov 2009 06:08: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: r198941 - head/lib/libstand 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, 05 Nov 2009 06:08:05 -0000 Author: marcel Date: Thu Nov 5 06:08:04 2009 New Revision: 198941 URL: http://svn.freebsd.org/changeset/base/198941 Log: IP_TTL is an IP socket option, not a TTL value. Use IPDEFTTL instead. Modified: head/lib/libstand/udp.c Modified: head/lib/libstand/udp.c ============================================================================== --- head/lib/libstand/udp.c Thu Nov 5 04:51:38 2009 (r198940) +++ head/lib/libstand/udp.c Thu Nov 5 06:08:04 2009 (r198941) @@ -90,7 +90,7 @@ sendudp(d, pkt, len) ip->ip_hl = sizeof(*ip) >> 2; /* half-char */ ip->ip_len = htons(len); ip->ip_p = IPPROTO_UDP; /* char */ - ip->ip_ttl = IP_TTL; /* char */ + ip->ip_ttl = IPDEFTTL; /* char */ ip->ip_src = d->myip; ip->ip_dst = d->destip; ip->ip_sum = in_cksum(ip, sizeof(*ip)); /* short, but special */ From owner-svn-src-all@FreeBSD.ORG Thu Nov 5 06:23:02 2009 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 66DAF106566C; Thu, 5 Nov 2009 06:23:02 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 56BCC8FC19; Thu, 5 Nov 2009 06:23: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 nA56N2l7064768; Thu, 5 Nov 2009 06:23:02 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA56N2PU064766; Thu, 5 Nov 2009 06:23:02 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <200911050623.nA56N2PU064766@svn.freebsd.org> From: Marcel Moolenaar Date: Thu, 5 Nov 2009 06:23: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: r198942 - head/sys/arm/arm 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, 05 Nov 2009 06:23:02 -0000 Author: marcel Date: Thu Nov 5 06:23:02 2009 New Revision: 198942 URL: http://svn.freebsd.org/changeset/base/198942 Log: Implement db_trace_self() by calling db_stack_trace_cmd() and not db_trace_thread(). Modified: head/sys/arm/arm/db_trace.c Modified: head/sys/arm/arm/db_trace.c ============================================================================== --- head/sys/arm/arm/db_trace.c Thu Nov 5 06:08:04 2009 (r198941) +++ head/sys/arm/arm/db_trace.c Thu Nov 5 06:23:02 2009 (r198942) @@ -207,5 +207,8 @@ db_trace_thread(struct thread *thr, int void db_trace_self(void) { - db_trace_thread(curthread, -1); + db_addr_t addr; + + addr = (db_addr_t)__builtin_frame_address(1); + db_stack_trace_cmd(addr, -1); } From owner-svn-src-all@FreeBSD.ORG Thu Nov 5 06:27:46 2009 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 CEB341065670; Thu, 5 Nov 2009 06:27:46 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BE5A58FC1E; Thu, 5 Nov 2009 06:27: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 nA56Rk0E064909; Thu, 5 Nov 2009 06:27:46 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA56RkZP064907; Thu, 5 Nov 2009 06:27:46 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <200911050627.nA56RkZP064907@svn.freebsd.org> From: Marcel Moolenaar Date: Thu, 5 Nov 2009 06:27: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: r198943 - head/sys/arm/arm 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, 05 Nov 2009 06:27:46 -0000 Author: marcel Date: Thu Nov 5 06:27:46 2009 New Revision: 198943 URL: http://svn.freebsd.org/changeset/base/198943 Log: Implement db_trace_thread() by calling db_stack_trace_cmd() and passing a frame pointer that comes from the thread context. This fixes DDB backtraces by not unwinding debugger functions first. Modified: head/sys/arm/arm/db_trace.c Modified: head/sys/arm/arm/db_trace.c ============================================================================== --- head/sys/arm/arm/db_trace.c Thu Nov 5 06:23:02 2009 (r198942) +++ head/sys/arm/arm/db_trace.c Thu Nov 5 06:27:46 2009 (r198943) @@ -194,13 +194,10 @@ db_md_set_watchpoint(db_expr_t addr, db_ int db_trace_thread(struct thread *thr, int count) { - uint32_t addr; + struct pcb *ctx; - if (thr == curthread) - addr = (uint32_t)__builtin_frame_address(0); - else - addr = thr->td_pcb->un_32.pcb32_r11; - db_stack_trace_cmd(addr, -1); + ctx = kdb_thr_ctx(thr); + db_stack_trace_cmd(ctx->un_32.pcb32_r11, -1); return (0); } From owner-svn-src-all@FreeBSD.ORG Thu Nov 5 06:31:50 2009 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 E21B01065670; Thu, 5 Nov 2009 06:31:50 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D1EAF8FC13; Thu, 5 Nov 2009 06:31: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 nA56Vo7W065094; Thu, 5 Nov 2009 06:31:50 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA56VocI065092; Thu, 5 Nov 2009 06:31:50 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <200911050631.nA56VocI065092@svn.freebsd.org> From: Marcel Moolenaar Date: Thu, 5 Nov 2009 06:31: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: r198944 - head/sys/arm/arm 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, 05 Nov 2009 06:31:51 -0000 Author: marcel Date: Thu Nov 5 06:31:50 2009 New Revision: 198944 URL: http://svn.freebsd.org/changeset/base/198944 Log: Fix gdb_cpu_getreg() to actually match GDB's register definition. Modified: head/sys/arm/arm/gdb_machdep.c Modified: head/sys/arm/arm/gdb_machdep.c ============================================================================== --- head/sys/arm/arm/gdb_machdep.c Thu Nov 5 06:27:46 2009 (r198943) +++ head/sys/arm/arm/gdb_machdep.c Thu Nov 5 06:31:50 2009 (r198944) @@ -53,12 +53,15 @@ gdb_cpu_getreg(int regnum, size_t *regsz *regsz = gdb_cpu_regsz(regnum); - if (kdb_thread == curthread) { - if (regnum < 16) - return (&kdb_frame->tf_r0 + 4 * regnum); + if (kdb_thread == curthread) { + if (regnum < 15) + return (&kdb_frame->tf_r0 + regnum); + if (regnum == 15) + return (&kdb_frame->tf_pc); if (regnum == 25) return (&kdb_frame->tf_spsr); } + switch (regnum) { case 8: return (&kdb_thrctx->un_32.pcb32_r8); case 9: return (&kdb_thrctx->un_32.pcb32_r9); @@ -78,6 +81,7 @@ gdb_cpu_getreg(int regnum, size_t *regsz return (&kdb_thrctx->un_32.pcb32_pc); } } + return (NULL); } From owner-svn-src-all@FreeBSD.ORG Thu Nov 5 07:37:49 2009 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 91BD2106566C; Thu, 5 Nov 2009 07:37:49 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 80E128FC08; Thu, 5 Nov 2009 07:37: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 nA57bnpu066819; Thu, 5 Nov 2009 07:37:49 GMT (envelope-from netchild@svn.freebsd.org) Received: (from netchild@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA57bnpG066817; Thu, 5 Nov 2009 07:37:49 GMT (envelope-from netchild@svn.freebsd.org) Message-Id: <200911050737.nA57bnpG066817@svn.freebsd.org> From: Alexander Leidinger Date: Thu, 5 Nov 2009 07:37: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: r198945 - head/sys/compat/linux 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, 05 Nov 2009 07:37:49 -0000 Author: netchild Date: Thu Nov 5 07:37:48 2009 New Revision: 198945 URL: http://svn.freebsd.org/changeset/base/198945 Log: Fix typo in kernel message. The fix is based upon the patch in the PR. PR: kern/140279 Submitted by: Alexander Best MFC after: 1 week Modified: head/sys/compat/linux/linux_ipc.c Modified: head/sys/compat/linux/linux_ipc.c ============================================================================== --- head/sys/compat/linux/linux_ipc.c Thu Nov 5 06:31:50 2009 (r198944) +++ head/sys/compat/linux/linux_ipc.c Thu Nov 5 07:37:48 2009 (r198945) @@ -872,7 +872,7 @@ linux_shmctl(struct thread *td, struct l case LINUX_SHM_LOCK: case LINUX_SHM_UNLOCK: default: - linux_msg(td, "ipc typ=%d not implemented", args->cmd & ~LINUX_IPC_64); + linux_msg(td, "ipc type %d not implemented", args->cmd & ~LINUX_IPC_64); return EINVAL; } } From owner-svn-src-all@FreeBSD.ORG Thu Nov 5 08:31:42 2009 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 B4833106566C; Thu, 5 Nov 2009 08:31:42 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A15C68FC18; Thu, 5 Nov 2009 08:31: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 nA58Vgs7068307; Thu, 5 Nov 2009 08:31:42 GMT (envelope-from netchild@svn.freebsd.org) Received: (from netchild@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA58VgvF068287; Thu, 5 Nov 2009 08:31:42 GMT (envelope-from netchild@svn.freebsd.org) Message-Id: <200911050831.nA58VgvF068287@svn.freebsd.org> From: Alexander Leidinger Date: Thu, 5 Nov 2009 08:31:42 +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: r198946 - stable/8/tools/kerneldoc/subsys 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, 05 Nov 2009 08:31:42 -0000 Author: netchild Date: Thu Nov 5 08:31:42 2009 New Revision: 198946 URL: http://svn.freebsd.org/changeset/base/198946 Log: MFC r196511: - Update config to doxygen 1.5.2 (I use this with 1.5.9). - Add linprocfs and linsysfs to the linuxulator dox. - Take the generated includes from the .m files from a subdirectory instead of putting everything into $(.OBJDIR). This imporves the human readbility of the source directory contents a lot, if you do not create a separate OBJDIR. - Assume UTF-8 encoding for every input file. - Strip the source and dest path from the output, we are not interested in the absolute location on the machine where the docs are created, relative the the root of the FreeBSD source is what interests us. - Exclude .svn directories. - Switch to alphabetic index. - Use one line per INCLUDE_PATH member in the common dox-config. - Bump the __FreeBSD__ version to 9. [here in the MFC: to 8] - Switch from hardcoded .m files to an run-time generated one. Takes a little bit more time to get started with actual work, but at least is more future-proof. If you generate dox for all subsystems, the time to find all .m files in the source is magnitutes lower than producing the docs. - Make the *DEST_PATH overidable from the environment. This allows to produce the output directly in the docroot of a webserver. - Fix the path when telling the user where he can find the API docs. Modified: stable/8/tools/kerneldoc/subsys/Dependencies stable/8/tools/kerneldoc/subsys/Doxyfile-cam stable/8/tools/kerneldoc/subsys/Doxyfile-crypto stable/8/tools/kerneldoc/subsys/Doxyfile-dev_pci stable/8/tools/kerneldoc/subsys/Doxyfile-dev_sound stable/8/tools/kerneldoc/subsys/Doxyfile-dev_usb stable/8/tools/kerneldoc/subsys/Doxyfile-geom stable/8/tools/kerneldoc/subsys/Doxyfile-kern stable/8/tools/kerneldoc/subsys/Doxyfile-libkern stable/8/tools/kerneldoc/subsys/Doxyfile-linux stable/8/tools/kerneldoc/subsys/Doxyfile-net80211 stable/8/tools/kerneldoc/subsys/Doxyfile-netgraph stable/8/tools/kerneldoc/subsys/Doxyfile-netinet stable/8/tools/kerneldoc/subsys/Doxyfile-netinet6 stable/8/tools/kerneldoc/subsys/Doxyfile-netipsec stable/8/tools/kerneldoc/subsys/Doxyfile-opencrypto stable/8/tools/kerneldoc/subsys/Doxyfile-vm stable/8/tools/kerneldoc/subsys/Makefile stable/8/tools/kerneldoc/subsys/common-Doxyfile Directory Properties: stable/8/tools/kerneldoc/subsys/ (props changed) Modified: stable/8/tools/kerneldoc/subsys/Dependencies ============================================================================== --- stable/8/tools/kerneldoc/subsys/Dependencies Thu Nov 5 07:37:48 2009 (r198945) +++ stable/8/tools/kerneldoc/subsys/Dependencies Thu Nov 5 08:31:42 2009 (r198946) @@ -6,15 +6,15 @@ $(.OBJDIR)/dev_sound/dev_sound.tag: $(.OBJDIR)/dev_pci/dev_pci.tag \ $(.OBJDIR)/dev_usb/dev_usb.tag \ - $(.OBJDIR)/ac97_if.h \ - $(.OBJDIR)/channel_if.h \ - $(.OBJDIR)/feeder_if.h \ - $(.OBJDIR)/mixer_if.h + $(.OBJDIR)/include/ac97_if.h \ + $(.OBJDIR)/include/channel_if.h \ + $(.OBJDIR)/include/feeder_if.h \ + $(.OBJDIR)/include/mixer_if.h $(.OBJDIR)/dev_usb/dev_usb.tag: $(.OBJDIR)/dev_pci/dev_pci.tag \ - $(.OBJDIR)/usb_if.h + $(.OBJDIR)/include/usb_if.h -$(.OBJDIR)/dev_pci/dev_pci.tag: $(.OBJDIR)/pci_if.h \ - $(.OBJDIR)/pcib_if.h \ - $(.OBJDIR)/bus_if.h +$(.OBJDIR)/dev_pci/dev_pci.tag: $(.OBJDIR)/include/pci_if.h \ + $(.OBJDIR)/include/pcib_if.h \ + $(.OBJDIR)/include/bus_if.h Modified: stable/8/tools/kerneldoc/subsys/Doxyfile-cam ============================================================================== --- stable/8/tools/kerneldoc/subsys/Doxyfile-cam Thu Nov 5 07:37:48 2009 (r198945) +++ stable/8/tools/kerneldoc/subsys/Doxyfile-cam Thu Nov 5 08:31:42 2009 (r198946) @@ -1,4 +1,4 @@ -# Doxyfile 1.4.1 +# Doxyfile 1.5.2 # $FreeBSD$ Modified: stable/8/tools/kerneldoc/subsys/Doxyfile-crypto ============================================================================== --- stable/8/tools/kerneldoc/subsys/Doxyfile-crypto Thu Nov 5 07:37:48 2009 (r198945) +++ stable/8/tools/kerneldoc/subsys/Doxyfile-crypto Thu Nov 5 08:31:42 2009 (r198946) @@ -1,4 +1,4 @@ -# Doxyfile 1.4.1 +# Doxyfile 1.5.2 # $FreeBSD$ Modified: stable/8/tools/kerneldoc/subsys/Doxyfile-dev_pci ============================================================================== --- stable/8/tools/kerneldoc/subsys/Doxyfile-dev_pci Thu Nov 5 07:37:48 2009 (r198945) +++ stable/8/tools/kerneldoc/subsys/Doxyfile-dev_pci Thu Nov 5 08:31:42 2009 (r198946) @@ -1,4 +1,4 @@ -# Doxyfile 1.4.1 +# Doxyfile 1.5.2 # $FreeBSD$ Modified: stable/8/tools/kerneldoc/subsys/Doxyfile-dev_sound ============================================================================== --- stable/8/tools/kerneldoc/subsys/Doxyfile-dev_sound Thu Nov 5 07:37:48 2009 (r198945) +++ stable/8/tools/kerneldoc/subsys/Doxyfile-dev_sound Thu Nov 5 08:31:42 2009 (r198946) @@ -1,4 +1,4 @@ -# Doxyfile 1.4.1 +# Doxyfile 1.5.2 # $FreeBSD$ Modified: stable/8/tools/kerneldoc/subsys/Doxyfile-dev_usb ============================================================================== --- stable/8/tools/kerneldoc/subsys/Doxyfile-dev_usb Thu Nov 5 07:37:48 2009 (r198945) +++ stable/8/tools/kerneldoc/subsys/Doxyfile-dev_usb Thu Nov 5 08:31:42 2009 (r198946) @@ -1,4 +1,4 @@ -# Doxyfile 1.4.1 +# Doxyfile 1.5.2 # $FreeBSD$ Modified: stable/8/tools/kerneldoc/subsys/Doxyfile-geom ============================================================================== --- stable/8/tools/kerneldoc/subsys/Doxyfile-geom Thu Nov 5 07:37:48 2009 (r198945) +++ stable/8/tools/kerneldoc/subsys/Doxyfile-geom Thu Nov 5 08:31:42 2009 (r198946) @@ -1,4 +1,4 @@ -# Doxyfile 1.4.1 +# Doxyfile 1.5.2 # $FreeBSD$ Modified: stable/8/tools/kerneldoc/subsys/Doxyfile-kern ============================================================================== --- stable/8/tools/kerneldoc/subsys/Doxyfile-kern Thu Nov 5 07:37:48 2009 (r198945) +++ stable/8/tools/kerneldoc/subsys/Doxyfile-kern Thu Nov 5 08:31:42 2009 (r198946) @@ -1,4 +1,4 @@ -# Doxyfile 1.4.1 +# Doxyfile 1.5.2 # $FreeBSD$ Modified: stable/8/tools/kerneldoc/subsys/Doxyfile-libkern ============================================================================== --- stable/8/tools/kerneldoc/subsys/Doxyfile-libkern Thu Nov 5 07:37:48 2009 (r198945) +++ stable/8/tools/kerneldoc/subsys/Doxyfile-libkern Thu Nov 5 08:31:42 2009 (r198946) @@ -1,4 +1,4 @@ -# Doxyfile 1.4.1 +# Doxyfile 1.5.2 # $FreeBSD$ Modified: stable/8/tools/kerneldoc/subsys/Doxyfile-linux ============================================================================== --- stable/8/tools/kerneldoc/subsys/Doxyfile-linux Thu Nov 5 07:37:48 2009 (r198945) +++ stable/8/tools/kerneldoc/subsys/Doxyfile-linux Thu Nov 5 08:31:42 2009 (r198946) @@ -1,4 +1,4 @@ -# Doxyfile 1.4.1 +# Doxyfile 1.5.2 # $FreeBSD$ @@ -12,6 +12,8 @@ EXTRACT_ALL = YES # for un # configuration options related to the input files #--------------------------------------------------------------------------- INPUT = $(DOXYGEN_SRC_PATH)/compat/linux \ + $(DOXYGEN_SRC_PATH)/compat/linprocfs \ + $(DOXYGEN_SRC_PATH)/compat/linsysfs \ $(DOXYGEN_LINUX_PATH) $(NOTREVIEWED) GENERATE_TAGFILE = linux/linux.tag Modified: stable/8/tools/kerneldoc/subsys/Doxyfile-net80211 ============================================================================== --- stable/8/tools/kerneldoc/subsys/Doxyfile-net80211 Thu Nov 5 07:37:48 2009 (r198945) +++ stable/8/tools/kerneldoc/subsys/Doxyfile-net80211 Thu Nov 5 08:31:42 2009 (r198946) @@ -1,4 +1,4 @@ -# Doxyfile 1.4.1 +# Doxyfile 1.5.2 # $FreeBSD$ Modified: stable/8/tools/kerneldoc/subsys/Doxyfile-netgraph ============================================================================== --- stable/8/tools/kerneldoc/subsys/Doxyfile-netgraph Thu Nov 5 07:37:48 2009 (r198945) +++ stable/8/tools/kerneldoc/subsys/Doxyfile-netgraph Thu Nov 5 08:31:42 2009 (r198946) @@ -1,4 +1,4 @@ -# Doxyfile 1.4.1 +# Doxyfile 1.5.2 # $FreeBSD$ Modified: stable/8/tools/kerneldoc/subsys/Doxyfile-netinet ============================================================================== --- stable/8/tools/kerneldoc/subsys/Doxyfile-netinet Thu Nov 5 07:37:48 2009 (r198945) +++ stable/8/tools/kerneldoc/subsys/Doxyfile-netinet Thu Nov 5 08:31:42 2009 (r198946) @@ -1,4 +1,4 @@ -# Doxyfile 1.4.1 +# Doxyfile 1.5.2 # $FreeBSD$ Modified: stable/8/tools/kerneldoc/subsys/Doxyfile-netinet6 ============================================================================== --- stable/8/tools/kerneldoc/subsys/Doxyfile-netinet6 Thu Nov 5 07:37:48 2009 (r198945) +++ stable/8/tools/kerneldoc/subsys/Doxyfile-netinet6 Thu Nov 5 08:31:42 2009 (r198946) @@ -1,4 +1,4 @@ -# Doxyfile 1.4.1 +# Doxyfile 1.5.2 # $FreeBSD$ Modified: stable/8/tools/kerneldoc/subsys/Doxyfile-netipsec ============================================================================== --- stable/8/tools/kerneldoc/subsys/Doxyfile-netipsec Thu Nov 5 07:37:48 2009 (r198945) +++ stable/8/tools/kerneldoc/subsys/Doxyfile-netipsec Thu Nov 5 08:31:42 2009 (r198946) @@ -1,4 +1,4 @@ -# Doxyfile 1.4.1 +# Doxyfile 1.5.2 # $FreeBSD$ Modified: stable/8/tools/kerneldoc/subsys/Doxyfile-opencrypto ============================================================================== --- stable/8/tools/kerneldoc/subsys/Doxyfile-opencrypto Thu Nov 5 07:37:48 2009 (r198945) +++ stable/8/tools/kerneldoc/subsys/Doxyfile-opencrypto Thu Nov 5 08:31:42 2009 (r198946) @@ -1,4 +1,4 @@ -# Doxyfile 1.4.1 +# Doxyfile 1.5.2 # $FreeBSD$ Modified: stable/8/tools/kerneldoc/subsys/Doxyfile-vm ============================================================================== --- stable/8/tools/kerneldoc/subsys/Doxyfile-vm Thu Nov 5 07:37:48 2009 (r198945) +++ stable/8/tools/kerneldoc/subsys/Doxyfile-vm Thu Nov 5 08:31:42 2009 (r198946) @@ -1,4 +1,4 @@ -# Doxyfile 1.4.1 +# Doxyfile 1.5.2 # $FreeBSD$ Modified: stable/8/tools/kerneldoc/subsys/Makefile ============================================================================== --- stable/8/tools/kerneldoc/subsys/Makefile Thu Nov 5 07:37:48 2009 (r198945) +++ stable/8/tools/kerneldoc/subsys/Makefile Thu Nov 5 08:31:42 2009 (r198946) @@ -10,49 +10,7 @@ TARGET_ARCH?= ${MACHINE_ARCH} S?=/usr/src/sys LOCALBASE?=/usr/local -MFILES+=dev/acpica/acpi_if.m -MFILES+=dev/ata/ata_if.m -MFILES+=dev/eisa/eisa_if.m -MFILES+=dev/iicbus/iicbb_if.m -MFILES+=dev/iicbus/iicbus_if.m -MFILES+=dev/mii/miibus_if.m -MFILES+=dev/mmc/mmcbr_if.m -MFILES+=dev/mmc/mmcbus_if.m -MFILES+=dev/ofw/ofw_bus_if.m -MFILES+=dev/pccard/card_if.m -MFILES+=dev/pccard/power_if.m -MFILES+=dev/pci/pci_if.m -MFILES+=dev/pci/pcib_if.m -MFILES+=dev/ppbus/ppbus_if.m -MFILES+=dev/scc/scc_if.m -MFILES+=dev/smbus/smbus_if.m -MFILES+=dev/sound/midi/mpu_if.m -MFILES+=dev/sound/midi/mpufoi_if.m -MFILES+=dev/sound/midi/synth_if.m -MFILES+=dev/sound/pcm/ac97_if.m -MFILES+=dev/sound/pcm/channel_if.m -MFILES+=dev/sound/pcm/feeder_if.m -MFILES+=dev/sound/pcm/mixer_if.m -MFILES+=dev/spibus/spibus_if.m -MFILES+=dev/uart/uart_if.m -MFILES+=dev/usb/usb_if.m -MFILES+=geom/part/g_part_if.m -MFILES+=isa/isa_if.m -MFILES+=kern/bus_if.m -MFILES+=kern/clock_if.m -MFILES+=kern/cpufreq_if.m -MFILES+=kern/device_if.m -MFILES+=kern/linker_if.m -MFILES+=kern/serdev_if.m -MFILES+=libkern/iconv_converter_if.m -MFILES+=opencrypto/cryptodev_if.m -MFILES+=pc98/pc98/canbus_if.m -MFILES+=pci/agp_if.m -MFILES+=powerpc/powerpc/mmu_if.m -MFILES+=powerpc/powerpc/pic_if.m -MFILES+=sparc64/pci/ofw_pci_if.m -MFILES+=sun4v/mdesc/mdesc_bus_if.m - +MFILES!= find ${S} -name \*.m | sed -e 's:${S}/::g' HFILES= ${MFILES:T:S/.m$/.h/} AWK?= awk @@ -73,16 +31,16 @@ usage: all: ${ALL} pdf-all:${PDF_ALL} -mfiles: ${HFILES:S/^/${.OBJDIR}\//} +mfiles: ${HFILES:S/^/${.OBJDIR}\/include\//} -DOXYGEN_DEST_PATH= ${.OBJDIR} -DOXYGEN_LATEX_DEST_PATH=${.OBJDIR} -DOXYGEN_PDF_DEST_PATH= ${.OBJDIR} +DOXYGEN_DEST_PATH?= ${.OBJDIR} +DOXYGEN_LATEX_DEST_PATH?=${.OBJDIR} +DOXYGEN_PDF_DEST_PATH?= ${.OBJDIR} -.if exists{${S}/${TARGET_ARCH}/linux} +.if exists(${S}/${TARGET_ARCH}/linux) DOXYGEN_LINUX_PATH= ${S}/${TARGET_ARCH}/linux .endif -.if exists{${S}/${TARGET_ARCH}/linux32} +.if exists(${S}/${TARGET_ARCH}/linux32) DOXYGEN_LINUX_PATH+= ${S}/${TARGET_ARCH}/linux32 .endif @@ -98,13 +56,13 @@ ${.OBJDIR}/${target}/${target}.tag: env DOXYGEN_INCLUDE_PATH=${.CURDIR} \ DOXYGEN_SRC_PATH=${S} \ DOXYGEN_DEST_PATH=${DOXYGEN_DEST_PATH} \ - DOXYGEN_SRC_INCLUDE_PATH="${S}/sys ${S}/../include ${S}/${TARGET_ARCH}/include" \ + DOXYGEN_SRC_INCLUDE_PATH="${S}/sys ${S}/../include ${S}/${TARGET_ARCH}/include ${.OBJDIR}/include" \ DOXYGEN_TARGET_ARCH=${TARGET_ARCH} \ DOXYGEN_LINUX_PATH=${DOXYGEN_LINUX_PATH} \ NOTREVIEWED=${.CURDIR}/notreviewed.dox \ PATH=${LOCALBASE}/bin:${PATH} \ doxygen ${.CURDIR}/Doxyfile-${target} - @echo "API docs for ${target} are now available in ${.OBJDIR}/${target}/." | /usr/bin/fmt + @echo "API docs for ${target} are now available in ${DOXYGEN_DEST_PATH}/${target}/." | /usr/bin/fmt pdf-${target}: ${.OBJDIR}/${target}/${target}.tag @cd ${DOXYGEN_LATEX_DEST_PATH}/${target}/latex && ${MAKE} refman.pdf && cp refman.pdf ${DOXYGEN_PDF_DEST_PATH}/${target}.pdf @@ -117,10 +75,12 @@ clean-${target}: rm -rf ${DOXYGEN_DEST_PATH}/${target} ${.OBJDIR}/${target} .endfor +CLEANDIRS+= ${.OBJDIR}/include .for file in ${MFILES} -CLEANDIRS+= ${.OBJDIR}/${file:T:S/.m$/.h/} -${.OBJDIR}/${file:T:S/.m$/.h/}: ${S}/${file} - cd ${.OBJDIR}; ${AWK} -f $S/tools/makeobjops.awk ${S}/${file} -h +CLEANFILES+= ${.OBJDIR}/include/${file:T:S/.m$/.h/} +${.OBJDIR}/include/${file:T:S/.m$/.h/}: ${S}/${file} + @mkdir -p ${.OBJDIR}/include + cd ${.OBJDIR}/include && ${AWK} -f $S/tools/makeobjops.awk ${S}/${file} -h .endfor # Modified: stable/8/tools/kerneldoc/subsys/common-Doxyfile ============================================================================== --- stable/8/tools/kerneldoc/subsys/common-Doxyfile Thu Nov 5 07:37:48 2009 (r198945) +++ stable/8/tools/kerneldoc/subsys/common-Doxyfile Thu Nov 5 08:31:42 2009 (r198946) @@ -1,14 +1,14 @@ -# Doxyfile 1.4.1 +# Doxyfile 1.5.2 # $FreeBSD$ #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- +DOXYFILE_ENCODING = UTF-8 PROJECT_NUMBER = CREATE_SUBDIRS = YES OUTPUT_LANGUAGE = English -USE_WINDOWS_ENCODING = NO BRIEF_MEMBER_DESC = YES REPEAT_BRIEF = YES ABBREVIATE_BRIEF = "The $name class" \ @@ -25,18 +25,20 @@ ABBREVIATE_BRIEF = "The $name clas ALWAYS_DETAILED_SEC = NO INLINE_INHERITED_MEMB = NO FULL_PATH_NAMES = YES -STRIP_FROM_PATH = +STRIP_FROM_PATH = $(DOXYGEN_SRC_PATH) $(DOXYGEN_DEST_PATH) STRIP_FROM_INC_PATH = SHORT_NAMES = NO JAVADOC_AUTOBRIEF = NO MULTILINE_CPP_IS_BRIEF = NO -DETAILS_AT_TOP = NO INHERIT_DOCS = YES -DISTRIBUTE_GROUP_DOC = NO +SEPARATE_MEMBER_PAGES = NO TAB_SIZE = 8 ALIASES = OPTIMIZE_OUTPUT_FOR_C = YES OPTIMIZE_OUTPUT_JAVA = NO +BUILTIN_STL_SUPPORT = NO +CPP_CLI_SUPPORT = NO +DISTRIBUTE_GROUP_DOC = NO SUBGROUPING = YES #--------------------------------------------------------------------------- # Build related configuration options @@ -76,9 +78,11 @@ WARN_IF_DOC_ERROR = YES WARN_NO_PARAMDOC = NO WARN_FORMAT = "$file:$line: $text" WARN_LOGFILE = + #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- +INPUT_ENCODING = UTF-8 FILE_PATTERNS = *.c \ *.cc \ *.cxx \ @@ -120,7 +124,8 @@ FILE_PATTERNS = *.c \ RECURSIVE = YES EXCLUDE = EXCLUDE_SYMLINKS = NO -EXCLUDE_PATTERNS = */.\#* +EXCLUDE_PATTERNS = */.\#* */.svn/* +EXCLUDE_SYMBOLS = EXAMPLE_PATH = EXAMPLE_PATTERNS = * EXAMPLE_RECURSIVE = NO @@ -136,11 +141,13 @@ INLINE_SOURCES = NO STRIP_CODE_COMMENTS = YES REFERENCED_BY_RELATION = YES REFERENCES_RELATION = YES +REFERENCES_LINK_SOURCE = YES +USE_HTAGS = NO VERBATIM_HEADERS = YES #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- -ALPHABETICAL_INDEX = NO +ALPHABETICAL_INDEX = YES COLS_IN_ALPHA_INDEX = 5 IGNORE_PREFIX = #--------------------------------------------------------------------------- @@ -220,12 +227,13 @@ ENABLE_PREPROCESSING = YES MACRO_EXPANSION = YES EXPAND_ONLY_PREDEF = YES SEARCH_INCLUDES = YES -INCLUDE_PATH = $(DOXYGEN_SRC_INCLUDE_PATH) . +INCLUDE_PATH = $(DOXYGEN_SRC_INCLUDE_PATH) \ + . INCLUDE_FILE_PATTERNS = *.h -PREDEFINED = "_KERNEL" \ - "__FreeBSD__=7" \ - "__${TARGET_ARCH}__=1" \ - "__${TARGET_ARCH}=1" +PREDEFINED = _KERNEL \ + __FreeBSD__=8 \ + __${TARGET_ARCH}__=1 \ + __${TARGET_ARCH}=1 EXPAND_AS_DEFINED = SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- @@ -238,6 +246,7 @@ PERL_PATH = /usr/bin/perl # Configuration options related to the dot tool #--------------------------------------------------------------------------- CLASS_DIAGRAMS = NO +MSCGEN_PATH = HIDE_UNDOC_RELATIONS = YES HAVE_DOT = YES CLASS_GRAPH = YES @@ -248,14 +257,13 @@ TEMPLATE_RELATIONS = NO INCLUDE_GRAPH = YES INCLUDED_BY_GRAPH = YES CALL_GRAPH = YES +CALLER_GRAPH = YES GRAPHICAL_HIERARCHY = YES DIRECTORY_GRAPH = YES DOT_IMAGE_FORMAT = png DOT_PATH = DOTFILE_DIRS = -MAX_DOT_GRAPH_WIDTH = 1024 -MAX_DOT_GRAPH_HEIGHT = 1024 -MAX_DOT_GRAPH_DEPTH = 1000 +DOT_GRAPH_MAX_NODES = 50 DOT_TRANSPARENT = NO DOT_MULTI_TARGETS = YES GENERATE_LEGEND = YES From owner-svn-src-all@FreeBSD.ORG Thu Nov 5 08:55:24 2009 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 C83E01065692; Thu, 5 Nov 2009 08:55:24 +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 B74C08FC0C; Thu, 5 Nov 2009 08:55: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 nA58tOqI068936; Thu, 5 Nov 2009 08:55:24 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA58tO43068934; Thu, 5 Nov 2009 08:55:24 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200911050855.nA58tO43068934@svn.freebsd.org> From: Alexander Motin Date: Thu, 5 Nov 2009 08:55:24 +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: r198947 - head/sys/cam 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, 05 Nov 2009 08:55:24 -0000 Author: mav Date: Thu Nov 5 08:55:24 2009 New Revision: 198947 URL: http://svn.freebsd.org/changeset/base/198947 Log: MFp4: Implement device stats accounting for ATA commands. Modified: head/sys/cam/cam_periph.c Modified: head/sys/cam/cam_periph.c ============================================================================== --- head/sys/cam/cam_periph.c Thu Nov 5 08:31:42 2009 (r198946) +++ head/sys/cam/cam_periph.c Thu Nov 5 08:55:24 2009 (r198947) @@ -898,7 +898,8 @@ cam_periph_runccb(union ccb *ccb, * If the user has supplied a stats structure, and if we understand * this particular type of ccb, record the transaction start. */ - if ((ds != NULL) && (ccb->ccb_h.func_code == XPT_SCSI_IO)) + if ((ds != NULL) && (ccb->ccb_h.func_code == XPT_SCSI_IO || + ccb->ccb_h.func_code == XPT_ATA_IO)) devstat_start_transaction(ds, NULL); xpt_action(ccb); @@ -921,15 +922,27 @@ cam_periph_runccb(union ccb *ccb, /* timeout */0, /* getcount_only */ FALSE); - if ((ds != NULL) && (ccb->ccb_h.func_code == XPT_SCSI_IO)) - devstat_end_transaction(ds, + if (ds != NULL) { + if (ccb->ccb_h.func_code == XPT_SCSI_IO) { + devstat_end_transaction(ds, ccb->csio.dxfer_len, - ccb->csio.tag_action & 0xf, + ccb->csio.tag_action & 0x3, ((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_NONE) ? DEVSTAT_NO_DATA : (ccb->ccb_h.flags & CAM_DIR_OUT) ? DEVSTAT_WRITE : DEVSTAT_READ, NULL, NULL); + } else if (ccb->ccb_h.func_code == XPT_ATA_IO) { + devstat_end_transaction(ds, + ccb->ataio.dxfer_len, + ccb->ataio.tag_action & 0x3, + ((ccb->ccb_h.flags & CAM_DIR_MASK) == + CAM_DIR_NONE) ? DEVSTAT_NO_DATA : + (ccb->ccb_h.flags & CAM_DIR_OUT) ? + DEVSTAT_WRITE : + DEVSTAT_READ, NULL, NULL); + } + } return(error); } From owner-svn-src-all@FreeBSD.ORG Thu Nov 5 10:01:16 2009 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 8969C106566C; Thu, 5 Nov 2009 10:01:16 +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 783AE8FC22; Thu, 5 Nov 2009 10:01: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 nA5A1Gfv071242; Thu, 5 Nov 2009 10:01:16 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA5A1GSx071241; Thu, 5 Nov 2009 10:01:16 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <200911051001.nA5A1GSx071241@svn.freebsd.org> From: Ruslan Ermilov Date: Thu, 5 Nov 2009 10:01: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: r198948 - head/share/misc 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, 05 Nov 2009 10:01:16 -0000 Author: ru Date: Thu Nov 5 10:01:15 2009 New Revision: 198948 URL: http://svn.freebsd.org/changeset/base/198948 Log: Revert the spelling of Taiwan to be politically neutral in accordance with the policy published at http://www.freebsd.org/internal/i18n.html. Requested by: core (murray) Modified: head/share/misc/iso3166 Modified: head/share/misc/iso3166 ============================================================================== --- head/share/misc/iso3166 Thu Nov 5 08:55:24 2009 (r198947) +++ head/share/misc/iso3166 Thu Nov 5 10:01:15 2009 (r198948) @@ -1,5 +1,8 @@ # $FreeBSD$ # +# Please consult with http://www.FreeBSD.org/internal/i18n.html before +# making changes to this file. +# # ISO 3166 country codes # This includes many places that are not legally independent countries, # but which is it convenient to refer to separately from their @@ -230,7 +233,7 @@ SZ SWZ 748 Swaziland SE SWE 752 Sweden CH CHE 756 Switzerland SY SYR 760 Syrian Arab Republic -TW TWN 158 Taiwan, Province of China +TW TWN 158 Taiwan TJ TJK 762 Tajikistan TZ TZA 834 Tanzania, United Republic of TH THA 764 Thailand From owner-svn-src-all@FreeBSD.ORG Thu Nov 5 13:28:09 2009 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 3FE8D106566C; Thu, 5 Nov 2009 13:28:09 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from mail-bw0-f213.google.com (mail-bw0-f213.google.com [209.85.218.213]) by mx1.freebsd.org (Postfix) with ESMTP id 6E36E8FC0C; Thu, 5 Nov 2009 13:28:08 +0000 (UTC) Received: by bwz5 with SMTP id 5so860549bwz.3 for ; Thu, 05 Nov 2009 05:28:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:references:in-reply-to :mime-version:content-type:message-id:content-transfer-encoding:cc :from:subject:date:to:x-mailer; bh=2TIJ7rHDkaaExH7+rqKwlfYnTt9YPVQY9Mmlx/0/IRk=; b=CuUmhTYVTqKsswQxb8rwobzHinkwoCs13zzYr1WUYOeWr8u+0HQc5tvR2i4jRvIxyG gZvjt2J3j2ICPmWHp1a1/knJAX4XB0xQolWZh2f88bqyP4hWIa7Z90wxTYZVNlp2uEQZ cVqSdLPvQQ9WMRw7ZFph62gZpGtCaX3Y/JiaY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:references:in-reply-to:mime-version:content-type:message-id :content-transfer-encoding:cc:from:subject:date:to:x-mailer; b=JdN1EQIIl8SAZneKo3yHuZPnTfZQC9rksHKE/vGZ5MHymoYT8+liK7nFHF3PP4xVKU TAxwMiFipUB5a/v7UlnoydV8Gf3a5S7JywNuxsW3gmm4VdwEamDk/NCiL4W1wxj8tEXk 1nxPR9oYHgAGpA6S89AZh0KjSLtMeVUXcWE6E= Received: by 10.204.35.11 with SMTP id n11mr3051240bkd.40.1257427687306; Thu, 05 Nov 2009 05:28:07 -0800 (PST) Received: from rui-macbook.lan (bl7-119-248.dsl.telepac.pt [85.240.119.248]) by mx.google.com with ESMTPS id 16sm693763bwz.3.2009.11.05.05.28.05 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 05 Nov 2009 05:28:06 -0800 (PST) Sender: Rui Paulo References: <200911050627.nA56RkZP064907@svn.freebsd.org> In-Reply-To: <200911050627.nA56RkZP064907@svn.freebsd.org> Mime-Version: 1.0 (Apple Message framework v1076) Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes Message-Id: <253E61DA-2F55-4801-8C08-E5C95DEF94BC@FreeBSD.org> Content-Transfer-Encoding: 7bit From: Rui Paulo Date: Thu, 5 Nov 2009 13:28:04 +0000 To: Marcel Moolenaar X-Mailer: Apple Mail (2.1076) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r198943 - head/sys/arm/arm 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, 05 Nov 2009 13:28:09 -0000 On 5 Nov 2009, at 06:27, Marcel Moolenaar wrote: > Author: marcel > Date: Thu Nov 5 06:27:46 2009 > New Revision: 198943 > URL: http://svn.freebsd.org/changeset/base/198943 > > Log: > Implement db_trace_thread() by calling db_stack_trace_cmd() and > passing a frame pointer that comes from the thread context. This > fixes DDB backtraces by not unwinding debugger functions first. Woot! Nice :-) I've been wondering for ages why DDB bt would print wrong function names. -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Thu Nov 5 13:54:36 2009 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 24BDA106566C; Thu, 5 Nov 2009 13:54:36 +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 13AED8FC1D; Thu, 5 Nov 2009 13:54: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 nA5DsZmv079637; Thu, 5 Nov 2009 13:54:35 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA5DsZpb079635; Thu, 5 Nov 2009 13:54:35 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <200911051354.nA5DsZpb079635@svn.freebsd.org> From: Ed Maste Date: Thu, 5 Nov 2009 13:54:35 +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: r198949 - stable/8/share/man/man9 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, 05 Nov 2009 13:54:36 -0000 Author: emaste Date: Thu Nov 5 13:54:35 2009 New Revision: 198949 URL: http://svn.freebsd.org/changeset/base/198949 Log: MFC r198518: Add link for callout_schedule(9). Modified: stable/8/share/man/man9/Makefile Directory Properties: stable/8/share/man/man9/ (props changed) Modified: stable/8/share/man/man9/Makefile ============================================================================== --- stable/8/share/man/man9/Makefile Thu Nov 5 10:01:15 2009 (r198948) +++ stable/8/share/man/man9/Makefile Thu Nov 5 13:54:35 2009 (r198949) @@ -1215,6 +1215,7 @@ MLINKS+=timeout.9 callout.9 \ timeout.9 callout_init_rw.9 \ timeout.9 callout_pending.9 \ timeout.9 callout_reset.9 \ + timeout.9 callout_schedule.9 \ timeout.9 callout_stop.9 \ timeout.9 untimeout.9 MLINKS+=ucred.9 crcopy.9 \ From owner-svn-src-all@FreeBSD.ORG Thu Nov 5 14:34:40 2009 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 1093F1065670; Thu, 5 Nov 2009 14:34:40 +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 F3BB98FC13; Thu, 5 Nov 2009 14:34: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 nA5EYctQ080803; Thu, 5 Nov 2009 14:34:38 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA5EYcCV080800; Thu, 5 Nov 2009 14:34:38 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <200911051434.nA5EYcCV080800@svn.freebsd.org> From: Attilio Rao Date: Thu, 5 Nov 2009 14:34: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: r198950 - in head/sys: amd64/amd64 i386/i386 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, 05 Nov 2009 14:34:40 -0000 Author: attilio Date: Thu Nov 5 14:34:38 2009 New Revision: 198950 URL: http://svn.freebsd.org/changeset/base/198950 Log: Strip from messages for users external URLs the project cannot directly control. Requested by: kib, rwatson Modified: head/sys/amd64/amd64/identcpu.c head/sys/i386/i386/identcpu.c Modified: head/sys/amd64/amd64/identcpu.c ============================================================================== --- head/sys/amd64/amd64/identcpu.c Thu Nov 5 13:54:35 2009 (r198949) +++ head/sys/amd64/amd64/identcpu.c Thu Nov 5 14:34:38 2009 (r198950) @@ -619,12 +619,9 @@ print_AMD_info(void) * model and family are identified. */ if (CPUID_TO_FAMILY(cpu_id) == 0xf && CPUID_TO_MODEL(cpu_id) >= 0x20 && - CPUID_TO_MODEL(cpu_id) <= 0x3f) { + CPUID_TO_MODEL(cpu_id) <= 0x3f) printf("WARNING: This architecture revision has known SMP " "hardware bugs which may cause random instability\n"); - printf("WARNING: For details see: " - "http://bugzilla.kernel.org/show_bug.cgi?id=11305\n"); - } } static void Modified: head/sys/i386/i386/identcpu.c ============================================================================== --- head/sys/i386/i386/identcpu.c Thu Nov 5 13:54:35 2009 (r198949) +++ head/sys/i386/i386/identcpu.c Thu Nov 5 14:34:38 2009 (r198950) @@ -1315,12 +1315,9 @@ print_AMD_info(void) * model and family are identified. */ if (CPUID_TO_FAMILY(cpu_id) == 0xf && CPUID_TO_MODEL(cpu_id) >= 0x20 && - CPUID_TO_MODEL(cpu_id) <= 0x3f) { + CPUID_TO_MODEL(cpu_id) <= 0x3f) printf("WARNING: This architecture revision has known SMP " "hardware bugs which may cause random instability\n"); - printf("WARNING: For details see: " - "http://bugzilla.kernel.org/show_bug.cgi?id=11305\n"); - } } static void From owner-svn-src-all@FreeBSD.ORG Thu Nov 5 15:19:22 2009 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 634E5106566C; Thu, 5 Nov 2009 15:19:22 +0000 (UTC) (envelope-from vanilla@fatpipi.com) Received: from mail-pw0-f44.google.com (mail-pw0-f44.google.com [209.85.160.44]) by mx1.freebsd.org (Postfix) with ESMTP id 303328FC17; Thu, 5 Nov 2009 15:19:22 +0000 (UTC) Received: by pwj15 with SMTP id 15so45928pwj.3 for ; Thu, 05 Nov 2009 07:19:22 -0800 (PST) MIME-Version: 1.0 Received: by 10.114.86.2 with SMTP id j2mr4972163wab.159.1257432574734; Thu, 05 Nov 2009 06:49:34 -0800 (PST) In-Reply-To: <200911051001.nA5A1GSx071241@svn.freebsd.org> References: <200911051001.nA5A1GSx071241@svn.freebsd.org> Date: Thu, 5 Nov 2009 22:49:34 +0800 Message-ID: From: Vanilla Hsu To: Ruslan Ermilov Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r198948 - head/share/misc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: v@fatpipi.com 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, 05 Nov 2009 15:19:22 -0000 Thanks. -- I payed the tax to Taiwan's government, not China's government. 2009/11/5 Ruslan Ermilov > Author: ru > Date: Thu Nov 5 10:01:15 2009 > New Revision: 198948 > URL: http://svn.freebsd.org/changeset/base/198948 > > Log: > Revert the spelling of Taiwan to be politically neutral in accordance > with the policy published at http://www.freebsd.org/internal/i18n.html. > > Requested by: core (murray) > > Modified: > head/share/misc/iso3166 > > Modified: head/share/misc/iso3166 > > ============================================================================== > --- head/share/misc/iso3166 Thu Nov 5 08:55:24 2009 (r198947) > +++ head/share/misc/iso3166 Thu Nov 5 10:01:15 2009 (r198948) > @@ -1,5 +1,8 @@ > # $FreeBSD$ > # > +# Please consult with http://www.FreeBSD.org/internal/i18n.html before > +# making changes to this file. > +# > # ISO 3166 country codes > # This includes many places that are not legally independent countries, > # but which is it convenient to refer to separately from their > @@ -230,7 +233,7 @@ SZ SWZ 748 Swaziland > SE SWE 752 Sweden > CH CHE 756 Switzerland > SY SYR 760 Syrian Arab Republic > -TW TWN 158 Taiwan, Province of China > +TW TWN 158 Taiwan > TJ TJK 762 Tajikistan > TZ TZA 834 Tanzania, United Republic of > TH THA 764 Thailand > _______________________________________________ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" > From owner-svn-src-all@FreeBSD.ORG Thu Nov 5 16:16:56 2009 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 BEA971065672; Thu, 5 Nov 2009 16:16:56 +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 AC3258FC12; Thu, 5 Nov 2009 16:16:56 +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 nA5GGu68083281; Thu, 5 Nov 2009 16:16:56 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA5GGu3E083278; Thu, 5 Nov 2009 16:16:56 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200911051616.nA5GGu3E083278@svn.freebsd.org> From: John Baldwin Date: Thu, 5 Nov 2009 16:16:56 +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: r198951 - in releng/8.0/sys: amd64/linux32 i386/linux 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, 05 Nov 2009 16:16:56 -0000 Author: jhb Date: Thu Nov 5 16:16:56 2009 New Revision: 198951 URL: http://svn.freebsd.org/changeset/base/198951 Log: MFC 198554: Fix some problems with effective mmap() offsets > 32 bits. This was partially fixed on amd64 earlier. Rather than forcing linux_mmap_common() to use a 32-bit offset, have it accept a 64-bit file offset. This offset is then passed to the real mmap() call. Rather than inventing a structure to hold the normal linux_mmap args that has a 64-bit offset, just pass each of the arguments individually to linux_mmap_common() since that more closes matches the existing style of various kern_foo() functions. Approved by: re (kib) Modified: releng/8.0/sys/amd64/linux32/linux32_machdep.c releng/8.0/sys/i386/linux/linux_machdep.c Directory Properties: releng/8.0/sys/ (props changed) releng/8.0/sys/amd64/include/xen/ (props changed) releng/8.0/sys/cddl/contrib/opensolaris/ (props changed) releng/8.0/sys/contrib/dev/acpica/ (props changed) releng/8.0/sys/contrib/pf/ (props changed) releng/8.0/sys/dev/xen/xenpci/ (props changed) Modified: releng/8.0/sys/amd64/linux32/linux32_machdep.c ============================================================================== --- releng/8.0/sys/amd64/linux32/linux32_machdep.c Thu Nov 5 14:34:38 2009 (r198950) +++ releng/8.0/sys/amd64/linux32/linux32_machdep.c Thu Nov 5 16:16:56 2009 (r198951) @@ -91,6 +91,10 @@ linux_to_bsd_sigaltstack(int lsa) return (bsa); } +static int linux_mmap_common(struct thread *td, l_uintptr_t addr, + l_size_t len, l_int prot, l_int flags, l_int fd, + l_loff_t pos); + int bsd_to_linux_sigaltstack(int bsa) { @@ -759,12 +763,9 @@ linux_clone(struct thread *td, struct li #define STACK_SIZE (2 * 1024 * 1024) #define GUARD_SIZE (4 * PAGE_SIZE) -static int linux_mmap_common(struct thread *, struct l_mmap_argv *); - int linux_mmap2(struct thread *td, struct linux_mmap2_args *args) { - struct l_mmap_argv linux_args; #ifdef DEBUG if (ldebug(mmap2)) @@ -773,14 +774,9 @@ linux_mmap2(struct thread *td, struct li args->flags, args->fd, args->pgoff); #endif - linux_args.addr = PTROUT(args->addr); - linux_args.len = args->len; - linux_args.prot = args->prot; - linux_args.flags = args->flags; - linux_args.fd = args->fd; - linux_args.pgoff = args->pgoff; - - return (linux_mmap_common(td, &linux_args)); + return (linux_mmap_common(td, PTROUT(args->addr), args->len, args->prot, + args->flags, args->fd, (uint64_t)(uint32_t)args->pgoff * + PAGE_SIZE)); } int @@ -799,15 +795,15 @@ linux_mmap(struct thread *td, struct lin linux_args.addr, linux_args.len, linux_args.prot, linux_args.flags, linux_args.fd, linux_args.pgoff); #endif - if ((linux_args.pgoff % PAGE_SIZE) != 0) - return (EINVAL); - linux_args.pgoff /= PAGE_SIZE; - return (linux_mmap_common(td, &linux_args)); + return (linux_mmap_common(td, linux_args.addr, linux_args.len, + linux_args.prot, linux_args.flags, linux_args.fd, + (uint32_t)linux_args.pgoff)); } static int -linux_mmap_common(struct thread *td, struct l_mmap_argv *linux_args) +linux_mmap_common(struct thread *td, l_uintptr_t addr, l_size_t len, l_int prot, + l_int flags, l_int fd, l_loff_t pos) { struct proc *p = td->td_proc; struct mmap_args /* { @@ -830,21 +826,20 @@ linux_mmap_common(struct thread *td, str * Linux mmap(2): * You must specify exactly one of MAP_SHARED and MAP_PRIVATE */ - if (! ((linux_args->flags & LINUX_MAP_SHARED) ^ - (linux_args->flags & LINUX_MAP_PRIVATE))) + if (!((flags & LINUX_MAP_SHARED) ^ (flags & LINUX_MAP_PRIVATE))) return (EINVAL); - if (linux_args->flags & LINUX_MAP_SHARED) + if (flags & LINUX_MAP_SHARED) bsd_args.flags |= MAP_SHARED; - if (linux_args->flags & LINUX_MAP_PRIVATE) + if (flags & LINUX_MAP_PRIVATE) bsd_args.flags |= MAP_PRIVATE; - if (linux_args->flags & LINUX_MAP_FIXED) + if (flags & LINUX_MAP_FIXED) bsd_args.flags |= MAP_FIXED; - if (linux_args->flags & LINUX_MAP_ANON) + if (flags & LINUX_MAP_ANON) bsd_args.flags |= MAP_ANON; else bsd_args.flags |= MAP_NOSYNC; - if (linux_args->flags & LINUX_MAP_GROWSDOWN) + if (flags & LINUX_MAP_GROWSDOWN) bsd_args.flags |= MAP_STACK; /* @@ -852,12 +847,12 @@ linux_mmap_common(struct thread *td, str * on Linux/i386. We do this to ensure maximum compatibility. * Linux/ia64 does the same in i386 emulation mode. */ - bsd_args.prot = linux_args->prot; + bsd_args.prot = prot; if (bsd_args.prot & (PROT_READ | PROT_WRITE | PROT_EXEC)) bsd_args.prot |= PROT_READ | PROT_EXEC; /* Linux does not check file descriptor when MAP_ANONYMOUS is set. */ - bsd_args.fd = (bsd_args.flags & MAP_ANON) ? -1 : linux_args->fd; + bsd_args.fd = (bsd_args.flags & MAP_ANON) ? -1 : fd; if (bsd_args.fd != -1) { /* * Linux follows Solaris mmap(2) description: @@ -882,7 +877,7 @@ linux_mmap_common(struct thread *td, str fdrop(fp, td); } - if (linux_args->flags & LINUX_MAP_GROWSDOWN) { + if (flags & LINUX_MAP_GROWSDOWN) { /* * The Linux MAP_GROWSDOWN option does not limit auto * growth of the region. Linux mmap with this option @@ -905,8 +900,7 @@ linux_mmap_common(struct thread *td, str * fixed size of (STACK_SIZE - GUARD_SIZE). */ - if ((caddr_t)PTRIN(linux_args->addr) + linux_args->len > - p->p_vmspace->vm_maxsaddr) { + if ((caddr_t)PTRIN(addr) + len > p->p_vmspace->vm_maxsaddr) { /* * Some Linux apps will attempt to mmap * thread stacks near the top of their @@ -937,19 +931,19 @@ linux_mmap_common(struct thread *td, str * we map the full stack, since we don't have a way * to autogrow it. */ - if (linux_args->len > STACK_SIZE - GUARD_SIZE) { - bsd_args.addr = (caddr_t)PTRIN(linux_args->addr); - bsd_args.len = linux_args->len; + if (len > STACK_SIZE - GUARD_SIZE) { + bsd_args.addr = (caddr_t)PTRIN(addr); + bsd_args.len = len; } else { - bsd_args.addr = (caddr_t)PTRIN(linux_args->addr) - - (STACK_SIZE - GUARD_SIZE - linux_args->len); + bsd_args.addr = (caddr_t)PTRIN(addr) - + (STACK_SIZE - GUARD_SIZE - len); bsd_args.len = STACK_SIZE - GUARD_SIZE; } } else { - bsd_args.addr = (caddr_t)PTRIN(linux_args->addr); - bsd_args.len = linux_args->len; + bsd_args.addr = (caddr_t)PTRIN(addr); + bsd_args.len = len; } - bsd_args.pos = (off_t)linux_args->pgoff * PAGE_SIZE; + bsd_args.pos = pos; #ifdef DEBUG if (ldebug(mmap)) Modified: releng/8.0/sys/i386/linux/linux_machdep.c ============================================================================== --- releng/8.0/sys/i386/linux/linux_machdep.c Thu Nov 5 14:34:38 2009 (r198950) +++ releng/8.0/sys/i386/linux/linux_machdep.c Thu Nov 5 16:16:56 2009 (r198951) @@ -93,6 +93,10 @@ struct l_old_select_argv { struct l_timeval *timeout; }; +static int linux_mmap_common(struct thread *td, l_uintptr_t addr, + l_size_t len, l_int prot, l_int flags, l_int fd, + l_loff_t pos); + int linux_to_bsd_sigaltstack(int lsa) { @@ -591,12 +595,9 @@ linux_clone(struct thread *td, struct li #define STACK_SIZE (2 * 1024 * 1024) #define GUARD_SIZE (4 * PAGE_SIZE) -static int linux_mmap_common(struct thread *, struct l_mmap_argv *); - int linux_mmap2(struct thread *td, struct linux_mmap2_args *args) { - struct l_mmap_argv linux_args; #ifdef DEBUG if (ldebug(mmap2)) @@ -605,14 +606,9 @@ linux_mmap2(struct thread *td, struct li args->flags, args->fd, args->pgoff); #endif - linux_args.addr = args->addr; - linux_args.len = args->len; - linux_args.prot = args->prot; - linux_args.flags = args->flags; - linux_args.fd = args->fd; - linux_args.pgoff = args->pgoff * PAGE_SIZE; - - return (linux_mmap_common(td, &linux_args)); + return (linux_mmap_common(td, args->addr, args->len, args->prot, + args->flags, args->fd, (uint64_t)(uint32_t)args->pgoff * + PAGE_SIZE)); } int @@ -632,11 +628,14 @@ linux_mmap(struct thread *td, struct lin linux_args.flags, linux_args.fd, linux_args.pgoff); #endif - return (linux_mmap_common(td, &linux_args)); + return (linux_mmap_common(td, linux_args.addr, linux_args.len, + linux_args.prot, linux_args.flags, linux_args.fd, + (uint32_t)linux_args.pgoff)); } static int -linux_mmap_common(struct thread *td, struct l_mmap_argv *linux_args) +linux_mmap_common(struct thread *td, l_uintptr_t addr, l_size_t len, l_int prot, + l_int flags, l_int fd, l_loff_t pos) { struct proc *p = td->td_proc; struct mmap_args /* { @@ -659,21 +658,20 @@ linux_mmap_common(struct thread *td, str * Linux mmap(2): * You must specify exactly one of MAP_SHARED and MAP_PRIVATE */ - if (! ((linux_args->flags & LINUX_MAP_SHARED) ^ - (linux_args->flags & LINUX_MAP_PRIVATE))) + if (!((flags & LINUX_MAP_SHARED) ^ (flags & LINUX_MAP_PRIVATE))) return (EINVAL); - if (linux_args->flags & LINUX_MAP_SHARED) + if (flags & LINUX_MAP_SHARED) bsd_args.flags |= MAP_SHARED; - if (linux_args->flags & LINUX_MAP_PRIVATE) + if (flags & LINUX_MAP_PRIVATE) bsd_args.flags |= MAP_PRIVATE; - if (linux_args->flags & LINUX_MAP_FIXED) + if (flags & LINUX_MAP_FIXED) bsd_args.flags |= MAP_FIXED; - if (linux_args->flags & LINUX_MAP_ANON) + if (flags & LINUX_MAP_ANON) bsd_args.flags |= MAP_ANON; else bsd_args.flags |= MAP_NOSYNC; - if (linux_args->flags & LINUX_MAP_GROWSDOWN) + if (flags & LINUX_MAP_GROWSDOWN) bsd_args.flags |= MAP_STACK; /* @@ -681,12 +679,12 @@ linux_mmap_common(struct thread *td, str * on Linux/i386. We do this to ensure maximum compatibility. * Linux/ia64 does the same in i386 emulation mode. */ - bsd_args.prot = linux_args->prot; + bsd_args.prot = prot; if (bsd_args.prot & (PROT_READ | PROT_WRITE | PROT_EXEC)) bsd_args.prot |= PROT_READ | PROT_EXEC; /* Linux does not check file descriptor when MAP_ANONYMOUS is set. */ - bsd_args.fd = (bsd_args.flags & MAP_ANON) ? -1 : linux_args->fd; + bsd_args.fd = (bsd_args.flags & MAP_ANON) ? -1 : fd; if (bsd_args.fd != -1) { /* * Linux follows Solaris mmap(2) description: @@ -711,9 +709,9 @@ linux_mmap_common(struct thread *td, str fdrop(fp, td); } - if (linux_args->flags & LINUX_MAP_GROWSDOWN) { + if (flags & LINUX_MAP_GROWSDOWN) { /* - * The linux MAP_GROWSDOWN option does not limit auto + * The Linux MAP_GROWSDOWN option does not limit auto * growth of the region. Linux mmap with this option * takes as addr the inital BOS, and as len, the initial * region size. It can then grow down from addr without @@ -734,8 +732,7 @@ linux_mmap_common(struct thread *td, str * fixed size of (STACK_SIZE - GUARD_SIZE). */ - if ((caddr_t)PTRIN(linux_args->addr) + linux_args->len > - p->p_vmspace->vm_maxsaddr) { + if ((caddr_t)PTRIN(addr) + len > p->p_vmspace->vm_maxsaddr) { /* * Some linux apps will attempt to mmap * thread stacks near the top of their @@ -766,19 +763,19 @@ linux_mmap_common(struct thread *td, str * we map the full stack, since we don't have a way * to autogrow it. */ - if (linux_args->len > STACK_SIZE - GUARD_SIZE) { - bsd_args.addr = (caddr_t)PTRIN(linux_args->addr); - bsd_args.len = linux_args->len; + if (len > STACK_SIZE - GUARD_SIZE) { + bsd_args.addr = (caddr_t)PTRIN(addr); + bsd_args.len = len; } else { - bsd_args.addr = (caddr_t)PTRIN(linux_args->addr) - - (STACK_SIZE - GUARD_SIZE - linux_args->len); + bsd_args.addr = (caddr_t)PTRIN(addr) - + (STACK_SIZE - GUARD_SIZE - len); bsd_args.len = STACK_SIZE - GUARD_SIZE; } } else { - bsd_args.addr = (caddr_t)PTRIN(linux_args->addr); - bsd_args.len = linux_args->len; + bsd_args.addr = (caddr_t)PTRIN(addr); + bsd_args.len = len; } - bsd_args.pos = linux_args->pgoff; + bsd_args.pos = pos; #ifdef DEBUG if (ldebug(mmap)) From owner-svn-src-all@FreeBSD.ORG Thu Nov 5 16:30:16 2009 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 949301065692; Thu, 5 Nov 2009 16:30:16 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 836868FC2A; Thu, 5 Nov 2009 16:30: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 nA5GUGLp083625; Thu, 5 Nov 2009 16:30:16 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA5GUGui083623; Thu, 5 Nov 2009 16:30:16 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <200911051630.nA5GUGui083623@svn.freebsd.org> From: Christian Brueffer Date: Thu, 5 Nov 2009 16:30: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: r198952 - head/sys/contrib/altq/altq 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, 05 Nov 2009 16:30:16 -0000 Author: brueffer Date: Thu Nov 5 16:30:16 2009 New Revision: 198952 URL: http://svn.freebsd.org/changeset/base/198952 Log: Fix two memory leaks in error cases. PR: 138378 Submitted by: Patroklos Argyroudis Approved by: mlaier MFC after: 1 week Modified: head/sys/contrib/altq/altq/altq_hfsc.c Modified: head/sys/contrib/altq/altq/altq_hfsc.c ============================================================================== --- head/sys/contrib/altq/altq/altq_hfsc.c Thu Nov 5 16:16:56 2009 (r198951) +++ head/sys/contrib/altq/altq/altq_hfsc.c Thu Nov 5 16:30:16 2009 (r198952) @@ -1809,15 +1809,20 @@ hfsc_class_modify(cl, rsc, fsc, usc) cl->cl_fsc == NULL) { fsc_tmp = malloc(sizeof(struct internal_sc), M_DEVBUF, M_WAITOK); - if (fsc_tmp == NULL) + if (fsc_tmp == NULL) { + free(rsc_tmp); return (ENOMEM); + } } if (usc != NULL && (usc->m1 != 0 || usc->m2 != 0) && cl->cl_usc == NULL) { usc_tmp = malloc(sizeof(struct internal_sc), M_DEVBUF, M_WAITOK); - if (usc_tmp == NULL) + if (usc_tmp == NULL) { + free(rsc_tmp); + free(fsc_tmp); return (ENOMEM); + } } cur_time = read_machclk(); From owner-svn-src-all@FreeBSD.ORG Thu Nov 5 17:17:45 2009 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 CC2BA1065692; Thu, 5 Nov 2009 17:17:44 +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 B6A118FC08; Thu, 5 Nov 2009 17:17: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 nA5HHidZ084757; Thu, 5 Nov 2009 17:17:44 GMT (envelope-from rdivacky@svn.freebsd.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA5HHijb084729; Thu, 5 Nov 2009 17:17:44 GMT (envelope-from rdivacky@svn.freebsd.org) Message-Id: <200911051717.nA5HHijb084729@svn.freebsd.org> From: Roman Divacky Date: Thu, 5 Nov 2009 17:17:44 +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: r198953 - in vendor/llvm/dist: docs/CommandGuide examples/BrainF include/llvm include/llvm/Analysis include/llvm/CodeGen include/llvm/Support include/llvm/Target lib/Analysis lib/AsmPar... 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, 05 Nov 2009 17:17:45 -0000 Author: rdivacky Date: Thu Nov 5 17:17:44 2009 New Revision: 198953 URL: http://svn.freebsd.org/changeset/base/198953 Log: Update LLVM to r86140. Added: vendor/llvm/dist/test/CodeGen/ARM/indirectbr.ll vendor/llvm/dist/test/CodeGen/PowerPC/indirectbr.ll vendor/llvm/dist/test/Transforms/DeadStoreElimination/no-targetdata.ll Modified: vendor/llvm/dist/docs/CommandGuide/lit.pod vendor/llvm/dist/examples/BrainF/BrainF.cpp vendor/llvm/dist/include/llvm/Analysis/MemoryBuiltins.h vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h vendor/llvm/dist/include/llvm/CodeGen/SlotIndexes.h vendor/llvm/dist/include/llvm/Instructions.h vendor/llvm/dist/include/llvm/Support/ConstantFolder.h vendor/llvm/dist/include/llvm/Support/Format.h vendor/llvm/dist/include/llvm/Support/LeakDetector.h vendor/llvm/dist/include/llvm/Support/OutputBuffer.h vendor/llvm/dist/include/llvm/Support/PassNameParser.h vendor/llvm/dist/include/llvm/Support/RecyclingAllocator.h vendor/llvm/dist/include/llvm/Support/TargetFolder.h vendor/llvm/dist/include/llvm/Target/TargetIntrinsicInfo.h vendor/llvm/dist/lib/Analysis/DebugInfo.cpp vendor/llvm/dist/lib/Analysis/MemoryBuiltins.cpp vendor/llvm/dist/lib/AsmParser/LLParser.cpp vendor/llvm/dist/lib/AsmParser/LLParser.h vendor/llvm/dist/lib/Bitcode/Reader/BitcodeReader.cpp 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/DwarfDebug.cpp vendor/llvm/dist/lib/CodeGen/LLVMTargetMachine.cpp vendor/llvm/dist/lib/CodeGen/MachineLICM.cpp vendor/llvm/dist/lib/CodeGen/PostRASchedulerList.cpp vendor/llvm/dist/lib/CodeGen/ScheduleDAGInstrs.cpp vendor/llvm/dist/lib/CodeGen/SlotIndexes.cpp vendor/llvm/dist/lib/Support/MemoryBuffer.cpp vendor/llvm/dist/lib/System/Win32/Path.inc vendor/llvm/dist/lib/Target/ARM/ARMBaseRegisterInfo.cpp vendor/llvm/dist/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp vendor/llvm/dist/lib/Target/Blackfin/BlackfinIntrinsicInfo.cpp vendor/llvm/dist/lib/Target/Blackfin/BlackfinIntrinsicInfo.h vendor/llvm/dist/lib/Target/MSP430/AsmPrinter/MSP430AsmPrinter.cpp vendor/llvm/dist/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.h vendor/llvm/dist/lib/Target/PowerPC/PPCInstr64Bit.td vendor/llvm/dist/lib/Target/PowerPC/PPCInstrInfo.td vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp vendor/llvm/dist/lib/Transforms/IPO/GlobalOpt.cpp vendor/llvm/dist/lib/Transforms/Scalar/DeadStoreElimination.cpp vendor/llvm/dist/lib/Transforms/Scalar/JumpThreading.cpp vendor/llvm/dist/lib/Transforms/Scalar/SCCP.cpp vendor/llvm/dist/lib/VMCore/Core.cpp vendor/llvm/dist/lib/VMCore/Instructions.cpp vendor/llvm/dist/test/Analysis/PointerTracking/sizes.ll vendor/llvm/dist/test/Transforms/GlobalOpt/2009-06-01-RecursivePHI.ll vendor/llvm/dist/test/Transforms/GlobalOpt/heap-sra-1.ll vendor/llvm/dist/test/Transforms/GlobalOpt/heap-sra-2.ll vendor/llvm/dist/test/Transforms/GlobalOpt/heap-sra-3.ll vendor/llvm/dist/test/Transforms/GlobalOpt/heap-sra-4.ll vendor/llvm/dist/test/Transforms/GlobalOpt/heap-sra-phi.ll vendor/llvm/dist/test/Transforms/GlobalOpt/malloc-promote-1.ll vendor/llvm/dist/test/Transforms/GlobalOpt/malloc-promote-2.ll vendor/llvm/dist/test/Transforms/GlobalOpt/malloc-promote-3.ll vendor/llvm/dist/test/Transforms/JumpThreading/crash.ll vendor/llvm/dist/utils/lit/LitConfig.py vendor/llvm/dist/utils/lit/lit.py Modified: vendor/llvm/dist/docs/CommandGuide/lit.pod ============================================================================== --- vendor/llvm/dist/docs/CommandGuide/lit.pod Thu Nov 5 16:30:16 2009 (r198952) +++ vendor/llvm/dist/docs/CommandGuide/lit.pod Thu Nov 5 17:17:44 2009 (r198953) @@ -54,6 +54,12 @@ number of detected available CPUs. Search for I and I when searching for test suites, instead I and I. +=item B<--param> I, B<--param> I=I + +Add a user defined parameter I with the given I (or the empty +string if not given). The meaning and use of these parameters is test suite +dependent. + =back =head1 OUTPUT OPTIONS Modified: vendor/llvm/dist/examples/BrainF/BrainF.cpp ============================================================================== --- vendor/llvm/dist/examples/BrainF/BrainF.cpp Thu Nov 5 16:30:16 2009 (r198952) +++ vendor/llvm/dist/examples/BrainF/BrainF.cpp Thu Nov 5 17:17:44 2009 (r198953) @@ -81,8 +81,11 @@ void BrainF::header(LLVMContext& C) { ConstantInt *val_mem = ConstantInt::get(C, APInt(32, memtotal)); BasicBlock* BB = builder->GetInsertBlock(); const Type* IntPtrTy = IntegerType::getInt32Ty(C); - ptr_arr = CallInst::CreateMalloc(BB, IntPtrTy, IntegerType::getInt8Ty(C), - val_mem, NULL, "arr"); + const Type* Int8Ty = IntegerType::getInt8Ty(C); + Constant* allocsize = ConstantExpr::getSizeOf(Int8Ty); + allocsize = ConstantExpr::getTruncOrBitCast(allocsize, IntPtrTy); + ptr_arr = CallInst::CreateMalloc(BB, IntPtrTy, Int8Ty, allocsize, val_mem, + NULL, "arr"); BB->getInstList().push_back(cast(ptr_arr)); //call void @llvm.memset.i32(i8 *%arr, i8 0, i32 %d, i32 1) Modified: vendor/llvm/dist/include/llvm/Analysis/MemoryBuiltins.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/MemoryBuiltins.h Thu Nov 5 16:30:16 2009 (r198952) +++ vendor/llvm/dist/include/llvm/Analysis/MemoryBuiltins.h Thu Nov 5 17:17:44 2009 (r198953) @@ -50,13 +50,17 @@ const CallInst* isArrayMalloc(const Valu const TargetData* TD); /// getMallocType - Returns the PointerType resulting from the malloc call. -/// This PointerType is the result type of the call's only bitcast use. -/// If there is no unique bitcast use, then return NULL. +/// The PointerType depends on the number of bitcast uses of the malloc call: +/// 0: PointerType is the malloc calls' return type. +/// 1: PointerType is the bitcast's result type. +/// >1: Unique PointerType cannot be determined, return NULL. const PointerType* getMallocType(const CallInst* CI); -/// getMallocAllocatedType - Returns the Type allocated by malloc call. This -/// Type is the result type of the call's only bitcast use. If there is no -/// unique bitcast use, then return NULL. +/// getMallocAllocatedType - Returns the Type allocated by malloc call. +/// The Type depends on the number of bitcast uses of the malloc call: +/// 0: PointerType is the malloc calls' return type. +/// 1: PointerType is the bitcast's result type. +/// >1: Unique PointerType cannot be determined, return NULL. const Type* getMallocAllocatedType(const CallInst* CI); /// getMallocArraySize - Returns the array size of a malloc call. If the Modified: vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h Thu Nov 5 16:30:16 2009 (r198952) +++ vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h Thu Nov 5 17:17:44 2009 (r198953) @@ -374,8 +374,10 @@ namespace llvm { /// printImplicitDef - This method prints the specified machine instruction /// that is an implicit def. virtual void printImplicitDef(const MachineInstr *MI) const; - - + + /// printKill - This method prints the specified kill machine instruction. + virtual void printKill(const MachineInstr *MI) const; + /// printPICJumpTableSetLabel - This method prints a set label for the /// specified MachineBasicBlock for a jumptable entry. virtual void printPICJumpTableSetLabel(unsigned uid, Modified: vendor/llvm/dist/include/llvm/CodeGen/SlotIndexes.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/SlotIndexes.h Thu Nov 5 16:30:16 2009 (r198952) +++ vendor/llvm/dist/include/llvm/CodeGen/SlotIndexes.h Thu Nov 5 17:17:44 2009 (r198953) @@ -28,6 +28,7 @@ #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/CodeGen/MachineInstr.h" #include "llvm/Support/Allocator.h" +#include "llvm/Support/ErrorHandling.h" namespace llvm { @@ -38,14 +39,35 @@ namespace llvm { class IndexListEntry { private: + static std::auto_ptr emptyKeyEntry, + tombstoneKeyEntry; + typedef enum { EMPTY_KEY, TOMBSTONE_KEY } ReservedEntryType; + static const unsigned EMPTY_KEY_INDEX = ~0U & ~3U, + TOMBSTONE_KEY_INDEX = ~0U & ~7U; + IndexListEntry *next, *prev; MachineInstr *mi; unsigned index; + // This constructor is only to be used by getEmptyKeyEntry + // & getTombstoneKeyEntry. It sets index to the given + // value and mi to zero. + IndexListEntry(ReservedEntryType r) : mi(0) { + switch(r) { + case EMPTY_KEY: index = EMPTY_KEY_INDEX; break; + case TOMBSTONE_KEY: index = TOMBSTONE_KEY_INDEX; break; + default: assert(false && "Invalid value for constructor."); + } + } + public: - IndexListEntry(MachineInstr *mi, unsigned index) - : mi(mi), index(index) {} + IndexListEntry(MachineInstr *mi, unsigned index) : mi(mi), index(index) { + if (index == EMPTY_KEY_INDEX || index == TOMBSTONE_KEY_INDEX) { + llvm_report_error("Attempt to create invalid index. " + "Available indexes may have been exhausted?."); + } + } MachineInstr* getInstr() const { return mi; } void setInstr(MachineInstr *mi) { this->mi = mi; } @@ -60,6 +82,24 @@ namespace llvm { IndexListEntry* getPrev() { return prev; } const IndexListEntry* getPrev() const { return prev; } void setPrev(IndexListEntry *prev) { this->prev = prev; } + + // This function returns the index list entry that is to be used for empty + // SlotIndex keys. + static IndexListEntry* getEmptyKeyEntry() { + if (emptyKeyEntry.get() == 0) { + emptyKeyEntry.reset(new IndexListEntry(EMPTY_KEY)); + } + return emptyKeyEntry.get(); + } + + // This function returns the index list entry that is to be used for + // tombstone SlotIndex keys. + static IndexListEntry* getTombstoneKeyEntry() { + if (tombstoneKeyEntry.get() == 0) { + tombstoneKeyEntry.reset(new IndexListEntry(TOMBSTONE_KEY)); + } + return tombstoneKeyEntry.get(); + } }; // Specialize PointerLikeTypeTraits for IndexListEntry. @@ -81,10 +121,6 @@ namespace llvm { friend class DenseMapInfo; private: - - // FIXME: Is there any way to statically allocate these things and have - // them 8-byte aligned? - static std::auto_ptr emptyKeyPtr, tombstoneKeyPtr; static const unsigned PHI_BIT = 1 << 2; PointerIntPair lie; @@ -95,7 +131,6 @@ namespace llvm { } IndexListEntry& entry() const { - assert(lie.getPointer() != 0 && "Use of invalid index."); return *lie.getPointer(); } @@ -116,25 +151,15 @@ namespace llvm { enum Slot { LOAD, USE, DEF, STORE, NUM }; static inline SlotIndex getEmptyKey() { - // FIXME: How do we guarantee these numbers don't get allocated to - // legit indexes? - if (emptyKeyPtr.get() == 0) - emptyKeyPtr.reset(new IndexListEntry(0, ~0U & ~3U)); - - return SlotIndex(emptyKeyPtr.get(), 0); + return SlotIndex(IndexListEntry::getEmptyKeyEntry(), 0); } static inline SlotIndex getTombstoneKey() { - // FIXME: How do we guarantee these numbers don't get allocated to - // legit indexes? - if (tombstoneKeyPtr.get() == 0) - tombstoneKeyPtr.reset(new IndexListEntry(0, ~0U & ~7U)); - - return SlotIndex(tombstoneKeyPtr.get(), 0); + return SlotIndex(IndexListEntry::getTombstoneKeyEntry(), 0); } /// Construct an invalid index. - SlotIndex() : lie(&getEmptyKey().entry(), 0) {} + SlotIndex() : lie(IndexListEntry::getEmptyKeyEntry(), 0) {} // Construct a new slot index from the given one, set the phi flag on the // new index to the value of the phi parameter. Modified: vendor/llvm/dist/include/llvm/Instructions.h ============================================================================== --- vendor/llvm/dist/include/llvm/Instructions.h Thu Nov 5 16:30:16 2009 (r198952) +++ vendor/llvm/dist/include/llvm/Instructions.h Thu Nov 5 17:17:44 2009 (r198953) @@ -899,11 +899,12 @@ public: /// 3. Bitcast the result of the malloc call to the specified type. static Instruction *CreateMalloc(Instruction *InsertBefore, const Type *IntPtrTy, const Type *AllocTy, - Value *ArraySize = 0, + Value *AllocSize, Value *ArraySize = 0, const Twine &Name = ""); static Instruction *CreateMalloc(BasicBlock *InsertAtEnd, const Type *IntPtrTy, const Type *AllocTy, - Value *ArraySize = 0, Function* MallocF = 0, + Value *AllocSize, Value *ArraySize = 0, + Function* MallocF = 0, const Twine &Name = ""); /// CreateFree - Generate the IR for a call to the builtin free function. static void CreateFree(Value* Source, Instruction *InsertBefore); Modified: vendor/llvm/dist/include/llvm/Support/ConstantFolder.h ============================================================================== --- vendor/llvm/dist/include/llvm/Support/ConstantFolder.h Thu Nov 5 16:30:16 2009 (r198952) +++ vendor/llvm/dist/include/llvm/Support/ConstantFolder.h Thu Nov 5 17:17:44 2009 (r198953) @@ -18,6 +18,8 @@ #define LLVM_SUPPORT_CONSTANTFOLDER_H #include "llvm/Constants.h" +#include "llvm/Instruction.h" +#include "llvm/InstrTypes.h" namespace llvm { Modified: vendor/llvm/dist/include/llvm/Support/Format.h ============================================================================== --- vendor/llvm/dist/include/llvm/Support/Format.h Thu Nov 5 16:30:16 2009 (r198952) +++ vendor/llvm/dist/include/llvm/Support/Format.h Thu Nov 5 17:17:44 2009 (r198953) @@ -23,6 +23,7 @@ #ifndef LLVM_SUPPORT_FORMAT_H #define LLVM_SUPPORT_FORMAT_H +#include #include #ifdef WIN32 #define snprintf _snprintf Modified: vendor/llvm/dist/include/llvm/Support/LeakDetector.h ============================================================================== --- vendor/llvm/dist/include/llvm/Support/LeakDetector.h Thu Nov 5 16:30:16 2009 (r198952) +++ vendor/llvm/dist/include/llvm/Support/LeakDetector.h Thu Nov 5 17:17:44 2009 (r198953) @@ -26,6 +26,7 @@ namespace llvm { +class LLVMContext; class Value; struct LeakDetector { Modified: vendor/llvm/dist/include/llvm/Support/OutputBuffer.h ============================================================================== --- vendor/llvm/dist/include/llvm/Support/OutputBuffer.h Thu Nov 5 16:30:16 2009 (r198952) +++ vendor/llvm/dist/include/llvm/Support/OutputBuffer.h Thu Nov 5 17:17:44 2009 (r198953) @@ -14,6 +14,7 @@ #ifndef LLVM_SUPPORT_OUTPUTBUFFER_H #define LLVM_SUPPORT_OUTPUTBUFFER_H +#include #include #include Modified: vendor/llvm/dist/include/llvm/Support/PassNameParser.h ============================================================================== --- vendor/llvm/dist/include/llvm/Support/PassNameParser.h Thu Nov 5 16:30:16 2009 (r198952) +++ vendor/llvm/dist/include/llvm/Support/PassNameParser.h Thu Nov 5 17:17:44 2009 (r198953) @@ -25,6 +25,7 @@ #include "llvm/Support/CommandLine.h" #include "llvm/Support/ErrorHandling.h" +#include "llvm/Support/raw_ostream.h" #include "llvm/Pass.h" #include #include Modified: vendor/llvm/dist/include/llvm/Support/RecyclingAllocator.h ============================================================================== --- vendor/llvm/dist/include/llvm/Support/RecyclingAllocator.h Thu Nov 5 16:30:16 2009 (r198952) +++ vendor/llvm/dist/include/llvm/Support/RecyclingAllocator.h Thu Nov 5 17:17:44 2009 (r198953) @@ -41,7 +41,7 @@ public: /// SubClass. The storage may be either newly allocated or recycled. /// template - SubClass *Allocate() { return Base.Allocate(Allocator); } + SubClass *Allocate() { return Base.template Allocate(Allocator); } T *Allocate() { return Base.Allocate(Allocator); } Modified: vendor/llvm/dist/include/llvm/Support/TargetFolder.h ============================================================================== --- vendor/llvm/dist/include/llvm/Support/TargetFolder.h Thu Nov 5 16:30:16 2009 (r198952) +++ vendor/llvm/dist/include/llvm/Support/TargetFolder.h Thu Nov 5 17:17:44 2009 (r198953) @@ -20,6 +20,8 @@ #define LLVM_SUPPORT_TARGETFOLDER_H #include "llvm/Constants.h" +#include "llvm/Instruction.h" +#include "llvm/InstrTypes.h" #include "llvm/Analysis/ConstantFolding.h" namespace llvm { Modified: vendor/llvm/dist/include/llvm/Target/TargetIntrinsicInfo.h ============================================================================== --- vendor/llvm/dist/include/llvm/Target/TargetIntrinsicInfo.h Thu Nov 5 16:30:16 2009 (r198952) +++ vendor/llvm/dist/include/llvm/Target/TargetIntrinsicInfo.h Thu Nov 5 17:17:44 2009 (r198953) @@ -14,6 +14,8 @@ #ifndef LLVM_TARGET_TARGETINTRINSICINFO_H #define LLVM_TARGET_TARGETINTRINSICINFO_H +#include + namespace llvm { class Function; @@ -32,7 +34,13 @@ public: virtual ~TargetIntrinsicInfo(); /// Return the name of a target intrinsic, e.g. "llvm.bfin.ssync". - virtual const char *getName(unsigned IntrID) const =0; + /// The Tys and numTys parameters are for intrinsics with overloaded types + /// (e.g., those using iAny or fAny). For a declaration for an overloaded + /// intrinsic, Tys should point to an array of numTys pointers to Type, + /// and must provide exactly one type for each overloaded type in the + /// intrinsic. + virtual std::string getName(unsigned IID, const Type **Tys = 0, + unsigned numTys = 0) const = 0; /// Look up target intrinsic by name. Return intrinsic ID or 0 for unknown /// names. @@ -40,6 +48,15 @@ public: /// Return the target intrinsic ID of a function, or 0. virtual unsigned getIntrinsicID(Function *F) const; + + /// Returns true if the intrinsic can be overloaded. + virtual bool isOverloaded(unsigned IID) const = 0; + + /// Create or insert an LLVM Function declaration for an intrinsic, + /// and return it. The Tys and numTys are for intrinsics with overloaded + /// types. See above for more information. + virtual Function *getDeclaration(Module *M, unsigned ID, const Type **Tys = 0, + unsigned numTys = 0) const = 0; }; } // End llvm namespace Modified: vendor/llvm/dist/lib/Analysis/DebugInfo.cpp ============================================================================== --- vendor/llvm/dist/lib/Analysis/DebugInfo.cpp Thu Nov 5 16:30:16 2009 (r198952) +++ vendor/llvm/dist/lib/Analysis/DebugInfo.cpp Thu Nov 5 17:17:44 2009 (r198953) @@ -401,12 +401,18 @@ bool DIVariable::Verify() const { /// getOriginalTypeSize - If this type is derived from a base type then /// return base type size. uint64_t DIDerivedType::getOriginalTypeSize() const { - DIType BT = getTypeDerivedFrom(); - if (!BT.isNull() && BT.isDerivedType()) - return DIDerivedType(BT.getNode()).getOriginalTypeSize(); - if (BT.isNull()) - return getSizeInBits(); - return BT.getSizeInBits(); + unsigned Tag = getTag(); + if (Tag == dwarf::DW_TAG_member || Tag == dwarf::DW_TAG_typedef || + Tag == dwarf::DW_TAG_const_type || Tag == dwarf::DW_TAG_volatile_type || + Tag == dwarf::DW_TAG_restrict_type) { + DIType BaseType = getTypeDerivedFrom(); + if (BaseType.isDerivedType()) + return DIDerivedType(BaseType.getNode()).getOriginalTypeSize(); + else + return BaseType.getSizeInBits(); + } + + return getSizeInBits(); } /// describes - Return true if this subprogram provides debugging Modified: vendor/llvm/dist/lib/Analysis/MemoryBuiltins.cpp ============================================================================== --- vendor/llvm/dist/lib/Analysis/MemoryBuiltins.cpp Thu Nov 5 16:30:16 2009 (r198952) +++ vendor/llvm/dist/lib/Analysis/MemoryBuiltins.cpp Thu Nov 5 17:17:44 2009 (r198953) @@ -17,6 +17,7 @@ #include "llvm/Instructions.h" #include "llvm/Module.h" #include "llvm/Analysis/ConstantFolding.h" +#include "llvm/Target/TargetData.h" using namespace llvm; //===----------------------------------------------------------------------===// @@ -96,45 +97,47 @@ static Value *isArrayMallocHelper(const if (!CI) return NULL; - // Type must be known to determine array size. + // The size of the malloc's result type must be known to determine array size. const Type *T = getMallocAllocatedType(CI); - if (!T) + if (!T || !T->isSized() || !TD) return NULL; Value *MallocArg = CI->getOperand(1); + const Type *ArgType = MallocArg->getType(); ConstantExpr *CO = dyn_cast(MallocArg); BinaryOperator *BO = dyn_cast(MallocArg); - Constant *ElementSize = ConstantExpr::getSizeOf(T); - ElementSize = ConstantExpr::getTruncOrBitCast(ElementSize, - MallocArg->getType()); - Constant *FoldedElementSize = - ConstantFoldConstantExpression(cast(ElementSize), Context, TD); + unsigned ElementSizeInt = TD->getTypeAllocSize(T); + if (const StructType *ST = dyn_cast(T)) + ElementSizeInt = TD->getStructLayout(ST)->getSizeInBytes(); + Constant *ElementSize = ConstantInt::get(ArgType, ElementSizeInt); // First, check if CI is a non-array malloc. - if (CO && ((CO == ElementSize) || - (FoldedElementSize && (CO == FoldedElementSize)))) + if (CO && CO == ElementSize) // Match CreateMalloc's use of constant 1 array-size for non-array mallocs. - return ConstantInt::get(MallocArg->getType(), 1); + return ConstantInt::get(ArgType, 1); // Second, check if CI is an array malloc whose array size can be determined. - if (isConstantOne(ElementSize) || - (FoldedElementSize && isConstantOne(FoldedElementSize))) + if (isConstantOne(ElementSize)) return MallocArg; + if (ConstantInt *CInt = dyn_cast(MallocArg)) + if (CInt->getZExtValue() % ElementSizeInt == 0) + return ConstantInt::get(ArgType, CInt->getZExtValue() / ElementSizeInt); + if (!CO && !BO) return NULL; Value *Op0 = NULL; Value *Op1 = NULL; unsigned Opcode = 0; - if (CO && ((CO->getOpcode() == Instruction::Mul) || + if (CO && ((CO->getOpcode() == Instruction::Mul) || (CO->getOpcode() == Instruction::Shl))) { Op0 = CO->getOperand(0); Op1 = CO->getOperand(1); Opcode = CO->getOpcode(); } - if (BO && ((BO->getOpcode() == Instruction::Mul) || + if (BO && ((BO->getOpcode() == Instruction::Mul) || (BO->getOpcode() == Instruction::Shl))) { Op0 = BO->getOperand(0); Op1 = BO->getOperand(1); @@ -144,12 +147,10 @@ static Value *isArrayMallocHelper(const // Determine array size if malloc's argument is the product of a mul or shl. if (Op0) { if (Opcode == Instruction::Mul) { - if ((Op1 == ElementSize) || - (FoldedElementSize && (Op1 == FoldedElementSize))) + if (Op1 == ElementSize) // ArraySize * ElementSize return Op0; - if ((Op0 == ElementSize) || - (FoldedElementSize && (Op0 == FoldedElementSize))) + if (Op0 == ElementSize) // ElementSize * ArraySize return Op1; } @@ -161,11 +162,10 @@ static Value *isArrayMallocHelper(const uint64_t BitToSet = Op1Int.getLimitedValue(Op1Int.getBitWidth() - 1); Value *Op1Pow = ConstantInt::get(Context, APInt(Op1Int.getBitWidth(), 0).set(BitToSet)); - if (Op0 == ElementSize || (FoldedElementSize && Op0 == FoldedElementSize)) + if (Op0 == ElementSize) // ArraySize << log2(ElementSize) return Op1Pow; - if (Op1Pow == ElementSize || - (FoldedElementSize && Op1Pow == FoldedElementSize)) + if (Op1Pow == ElementSize) // ElementSize << log2(ArraySize) return Op0; } @@ -205,35 +205,41 @@ const CallInst *llvm::isArrayMalloc(cons } /// getMallocType - Returns the PointerType resulting from the malloc call. -/// This PointerType is the result type of the call's only bitcast use. -/// If there is no unique bitcast use, then return NULL. +/// The PointerType depends on the number of bitcast uses of the malloc call: +/// 0: PointerType is the calls' return type. +/// 1: PointerType is the bitcast's result type. +/// >1: Unique PointerType cannot be determined, return NULL. const PointerType *llvm::getMallocType(const CallInst *CI) { assert(isMalloc(CI) && "GetMallocType and not malloc call"); - const BitCastInst *BCI = NULL; - + const PointerType *MallocType = NULL; + unsigned NumOfBitCastUses = 0; + // Determine if CallInst has a bitcast use. for (Value::use_const_iterator UI = CI->use_begin(), E = CI->use_end(); UI != E; ) - if ((BCI = dyn_cast(cast(*UI++)))) - break; + if (const BitCastInst *BCI = dyn_cast(*UI++)) { + MallocType = cast(BCI->getDestTy()); + NumOfBitCastUses++; + } - // Malloc call has 1 bitcast use and no other uses, so type is the bitcast's - // destination type. - if (BCI && CI->hasOneUse()) - return cast(BCI->getDestTy()); + // Malloc call has 1 bitcast use, so type is the bitcast's destination type. + if (NumOfBitCastUses == 1) + return MallocType; // Malloc call was not bitcast, so type is the malloc function's return type. - if (!BCI) + if (NumOfBitCastUses == 0) return cast(CI->getType()); // Type could not be determined. return NULL; } -/// getMallocAllocatedType - Returns the Type allocated by malloc call. This -/// Type is the result type of the call's only bitcast use. If there is no -/// unique bitcast use, then return NULL. +/// getMallocAllocatedType - Returns the Type allocated by malloc call. +/// The Type depends on the number of bitcast uses of the malloc call: +/// 0: PointerType is the malloc calls' return type. +/// 1: PointerType is the bitcast's result type. +/// >1: Unique PointerType cannot be determined, return NULL. const Type *llvm::getMallocAllocatedType(const CallInst *CI) { const PointerType *PT = getMallocType(CI); return PT ? PT->getElementType() : NULL; Modified: vendor/llvm/dist/lib/AsmParser/LLParser.cpp ============================================================================== --- vendor/llvm/dist/lib/AsmParser/LLParser.cpp Thu Nov 5 16:30:16 2009 (r198952) +++ vendor/llvm/dist/lib/AsmParser/LLParser.cpp Thu Nov 5 17:17:44 2009 (r198953) @@ -480,17 +480,17 @@ bool LLParser::ParseMDNode(MetadataBase if (ParseUInt32(MID)) return true; // Check existing MDNode. - std::map::iterator I = MetadataCache.find(MID); + std::map::iterator I = MetadataCache.find(MID); if (I != MetadataCache.end()) { - Node = I->second; + Node = cast(I->second); return false; } // Check known forward references. - std::map >::iterator + std::map >::iterator FI = ForwardRefMDNodes.find(MID); if (FI != ForwardRefMDNodes.end()) { - Node = FI->second.first; + Node = cast(FI->second.first); return false; } @@ -570,7 +570,7 @@ bool LLParser::ParseStandaloneMetadata() MDNode *Init = MDNode::get(Context, Elts.data(), Elts.size()); MetadataCache[MetadataID] = Init; - std::map >::iterator + std::map >::iterator FI = ForwardRefMDNodes.find(MetadataID); if (FI != ForwardRefMDNodes.end()) { MDNode *FwdNode = cast(FI->second.first); @@ -3619,12 +3619,14 @@ bool LLParser::ParseAlloc(Instruction *& // Autoupgrade old malloc instruction to malloc call. // FIXME: Remove in LLVM 3.0. const Type *IntPtrTy = Type::getInt32Ty(Context); + Constant *AllocSize = ConstantExpr::getSizeOf(Ty); + AllocSize = ConstantExpr::getTruncOrBitCast(AllocSize, IntPtrTy); if (!MallocF) // Prototype malloc as "void *(int32)". // This function is renamed as "malloc" in ValidateEndOfModule(). MallocF = cast( M->getOrInsertFunction("", Type::getInt8PtrTy(Context), IntPtrTy, NULL)); - Inst = CallInst::CreateMalloc(BB, IntPtrTy, Ty, Size, MallocF); + Inst = CallInst::CreateMalloc(BB, IntPtrTy, Ty, AllocSize, Size, MallocF); return false; } Modified: vendor/llvm/dist/lib/AsmParser/LLParser.h ============================================================================== --- vendor/llvm/dist/lib/AsmParser/LLParser.h Thu Nov 5 16:30:16 2009 (r198952) +++ vendor/llvm/dist/lib/AsmParser/LLParser.h Thu Nov 5 17:17:44 2009 (r198953) @@ -79,8 +79,8 @@ namespace llvm { std::map > ForwardRefTypeIDs; std::vector NumberedTypes; /// MetadataCache - This map keeps track of parsed metadata constants. - std::map MetadataCache; - std::map > ForwardRefMDNodes; + std::map MetadataCache; + std::map > ForwardRefMDNodes; SmallVector, 2> MDsOnInst; struct UpRefRecord { /// Loc - This is the location of the upref. Modified: vendor/llvm/dist/lib/Bitcode/Reader/BitcodeReader.cpp ============================================================================== --- vendor/llvm/dist/lib/Bitcode/Reader/BitcodeReader.cpp Thu Nov 5 16:30:16 2009 (r198952) +++ vendor/llvm/dist/lib/Bitcode/Reader/BitcodeReader.cpp Thu Nov 5 17:17:44 2009 (r198953) @@ -2101,8 +2101,10 @@ bool BitcodeReader::ParseFunctionBody(Fu if (!Ty || !Size) return Error("Invalid MALLOC record"); if (!CurBB) return Error("Invalid malloc instruction with no BB"); const Type *Int32Ty = IntegerType::getInt32Ty(CurBB->getContext()); + Constant *AllocSize = ConstantExpr::getSizeOf(Ty->getElementType()); + AllocSize = ConstantExpr::getTruncOrBitCast(AllocSize, Int32Ty); I = CallInst::CreateMalloc(CurBB, Int32Ty, Ty->getElementType(), - Size, NULL); + AllocSize, Size, NULL); InstructionList.push_back(I); break; } Modified: vendor/llvm/dist/lib/CodeGen/AggressiveAntiDepBreaker.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/AggressiveAntiDepBreaker.cpp Thu Nov 5 16:30:16 2009 (r198952) +++ vendor/llvm/dist/lib/CodeGen/AggressiveAntiDepBreaker.cpp Thu Nov 5 17:17:44 2009 (r198953) @@ -491,8 +491,9 @@ BitVector AggressiveAntiDepBreaker::GetR } bool AggressiveAntiDepBreaker::FindSuitableFreeRegisters( - unsigned AntiDepGroupIndex, - std::map &RenameMap) { + unsigned AntiDepGroupIndex, + RenameOrderType& RenameOrder, + std::map &RenameMap) { unsigned *KillIndices = State->GetKillIndices(); unsigned *DefIndices = State->GetDefIndices(); std::multimap& @@ -547,22 +548,41 @@ bool AggressiveAntiDepBreaker::FindSuita if (Regs.size() > 1) return false; - // Check each possible rename register for SuperReg. If that register - // is available, and the corresponding registers are available for - // the other group subregisters, then we can use those registers to - // rename. - DEBUG(errs() << "\tFind Register:"); + // Check each possible rename register for SuperReg in round-robin + // order. If that register is available, and the corresponding + // registers are available for the other group subregisters, then we + // can use those registers to rename. BitVector SuperBV = RenameRegisterMap[SuperReg]; - for (int r = SuperBV.find_first(); r != -1; r = SuperBV.find_next(r)) { - const unsigned Reg = (unsigned)r; + const TargetRegisterClass *SuperRC = + TRI->getPhysicalRegisterRegClass(SuperReg, MVT::Other); + + const TargetRegisterClass::iterator RB = SuperRC->allocation_order_begin(MF); + const TargetRegisterClass::iterator RE = SuperRC->allocation_order_end(MF); + if (RB == RE) { + DEBUG(errs() << "\tEmpty Regclass!!\n"); + return false; + } + + if (RenameOrder.count(SuperRC) == 0) + RenameOrder.insert(RenameOrderType::value_type(SuperRC, RE)); + + DEBUG(errs() << "\tFind Register:"); + + const TargetRegisterClass::iterator OrigR = RenameOrder[SuperRC]; + const TargetRegisterClass::iterator EndR = ((OrigR == RE) ? RB : OrigR); + TargetRegisterClass::iterator R = OrigR; + do { + if (R == RB) R = RE; + --R; + const unsigned Reg = *R; // Don't replace a register with itself. if (Reg == SuperReg) continue; - + DEBUG(errs() << " " << TRI->getName(Reg)); - + // If Reg is dead and Reg's most recent def is not before - // SuperRegs's kill, it's safe to replace SuperReg with - // Reg. We must also check all subregisters of Reg. + // SuperRegs's kill, it's safe to replace SuperReg with Reg. We + // must also check all subregisters of Reg. if (State->IsLive(Reg) || (KillIndices[SuperReg] > DefIndices[Reg])) { DEBUG(errs() << "(live)"); continue; @@ -580,13 +600,15 @@ bool AggressiveAntiDepBreaker::FindSuita if (found) continue; } - + if (Reg != 0) { DEBUG(errs() << '\n'); + RenameOrder.erase(SuperRC); + RenameOrder.insert(RenameOrderType::value_type(SuperRC, R)); RenameMap.insert(std::pair(SuperReg, Reg)); return true; } - } + } while (R != EndR); DEBUG(errs() << '\n'); @@ -627,6 +649,9 @@ unsigned AggressiveAntiDepBreaker::Break State = new AggressiveAntiDepState(*SavedState); } } + + // For each regclass the next register to use for renaming. + RenameOrderType RenameOrder; // ...need a map from MI to SUnit. std::map MISUnitMap; @@ -738,7 +763,7 @@ unsigned AggressiveAntiDepBreaker::Break // Look for a suitable register to use to break the anti-dependence. std::map RenameMap; - if (FindSuitableFreeRegisters(GroupIndex, RenameMap)) { + if (FindSuitableFreeRegisters(GroupIndex, RenameOrder, RenameMap)) { DEBUG(errs() << "\tBreaking anti-dependence edge on " << TRI->getName(AntiDepReg) << ":"); Modified: vendor/llvm/dist/lib/CodeGen/AggressiveAntiDepBreaker.h ============================================================================== --- vendor/llvm/dist/lib/CodeGen/AggressiveAntiDepBreaker.h Thu Nov 5 16:30:16 2009 (r198952) +++ vendor/llvm/dist/lib/CodeGen/AggressiveAntiDepBreaker.h Thu Nov 5 17:17:44 2009 (r198953) @@ -155,6 +155,9 @@ namespace llvm { void FinishBlock(); private: + typedef std::map RenameOrderType; + /// IsImplicitDefUse - Return true if MO represents a register /// that is both implicitly used and defined in MI bool IsImplicitDefUse(MachineInstr *MI, MachineOperand& MO); @@ -169,6 +172,7 @@ namespace llvm { void ScanInstruction(MachineInstr *MI, unsigned Count); BitVector GetRenameRegisters(unsigned Reg); bool FindSuitableFreeRegisters(unsigned AntiDepGroupIndex, + RenameOrderType& RenameOrder, std::map &RenameMap); }; } Modified: vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinter.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Thu Nov 5 16:30:16 2009 (r198952) +++ vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Thu Nov 5 17:17:44 2009 (r198953) @@ -1590,6 +1590,17 @@ void AsmPrinter::printImplicitDef(const << TRI->getName(MI->getOperand(0).getReg()); } +void AsmPrinter::printKill(const MachineInstr *MI) const { + if (!VerboseAsm) return; + O.PadToColumn(MAI->getCommentColumn()); + O << MAI->getCommentString() << " kill:"; + for (unsigned n = 0, e = MI->getNumOperands(); n != e; ++n) { + const MachineOperand &op = MI->getOperand(n); + assert(op.isReg() && "KILL instruction must have only register operands"); + O << ' ' << TRI->getName(op.getReg()) << (op.isDef() ? "" : ""); + } +} + /// printLabel - This method prints a local label used by debug and /// exception handling tables. void AsmPrinter::printLabel(const MachineInstr *MI) const { Modified: vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Thu Nov 5 16:30:16 2009 (r198952) +++ vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Thu Nov 5 17:17:44 2009 (r198953) @@ -1137,6 +1137,9 @@ DIE *DwarfDebug::CreateMemberDIE(Compile AddSourceLine(MemberDie, &DT); + DIEBlock *MemLocationDie = new DIEBlock(); + AddUInt(MemLocationDie, 0, dwarf::DW_FORM_data1, dwarf::DW_OP_plus_uconst); + uint64_t Size = DT.getSizeInBits(); uint64_t FieldSize = DT.getOriginalTypeSize(); @@ -1155,12 +1158,16 @@ DIE *DwarfDebug::CreateMemberDIE(Compile // Maybe we need to work from the other end. if (TD->isLittleEndian()) Offset = FieldSize - (Offset + Size); AddUInt(MemberDie, dwarf::DW_AT_bit_offset, 0, Offset); - } - DIEBlock *Block = new DIEBlock(); - AddUInt(Block, 0, dwarf::DW_FORM_data1, dwarf::DW_OP_plus_uconst); - AddUInt(Block, 0, dwarf::DW_FORM_udata, DT.getOffsetInBits() >> 3); - AddBlock(MemberDie, dwarf::DW_AT_data_member_location, 0, Block); + // Here WD_AT_data_member_location points to the anonymous + // field that includes this bit field. + AddUInt(MemLocationDie, 0, dwarf::DW_FORM_udata, FieldOffset >> 3); + + } else + // This is not a bitfield. + AddUInt(MemLocationDie, 0, dwarf::DW_FORM_udata, DT.getOffsetInBits() >> 3); + + AddBlock(MemberDie, dwarf::DW_AT_data_member_location, 0, MemLocationDie); if (DT.isProtected()) AddUInt(MemberDie, dwarf::DW_AT_accessibility, 0, Modified: vendor/llvm/dist/lib/CodeGen/LLVMTargetMachine.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/LLVMTargetMachine.cpp Thu Nov 5 16:30:16 2009 (r198952) +++ vendor/llvm/dist/lib/CodeGen/LLVMTargetMachine.cpp Thu Nov 5 17:17:44 2009 (r198953) @@ -31,6 +31,22 @@ namespace llvm { bool EnableFastISel; } +static cl::opt DisablePostRA("disable-post-ra", cl::Hidden, + cl::desc("Disable Post Regalloc")); +static cl::opt DisableBranchFold("disable-branch-fold", cl::Hidden, + cl::desc("Disable branch folding")); +static cl::opt DisableCodePlace("disable-code-place", cl::Hidden, + cl::desc("Disable code placement")); +static cl::opt DisableSSC("disable-ssc", cl::Hidden, + cl::desc("Disable Stack Slot Coloring")); +static cl::opt DisableMachineLICM("disable-machine-licm", cl::Hidden, + cl::desc("Disable Machine LICM")); +static cl::opt DisableMachineSink("disable-machine-sink", cl::Hidden, + cl::desc("Disable Machine Sinking")); +static cl::opt DisableLSR("disable-lsr", cl::Hidden, + cl::desc("Disable Loop Strength Reduction Pass")); +static cl::opt DisableCGP("disable-cgp", cl::Hidden, + cl::desc("Disable Codegen Prepare")); static cl::opt PrintLSR("print-lsr-output", cl::Hidden, cl::desc("Print LLVM IR produced by the loop-reduce pass")); static cl::opt PrintISelInput("print-isel-input", cl::Hidden, @@ -208,7 +224,7 @@ bool LLVMTargetMachine::addCommonCodeGen // Standard LLVM-Level Passes. // Run loop strength reduction before anything else. - if (OptLevel != CodeGenOpt::None) { + if (OptLevel != CodeGenOpt::None && !DisableLSR) { PM.add(createLoopStrengthReducePass(getTargetLowering())); if (PrintLSR) PM.add(createPrintFunctionPass("\n\n*** Code after LSR ***\n", &errs())); @@ -236,7 +252,7 @@ bool LLVMTargetMachine::addCommonCodeGen // Make sure that no unreachable blocks are instruction selected. PM.add(createUnreachableBlockEliminationPass()); - if (OptLevel != CodeGenOpt::None) + if (OptLevel != CodeGenOpt::None && !DisableCGP) PM.add(createCodeGenPreparePass(getTargetLowering())); PM.add(createStackProtectorPass(getTargetLowering())); @@ -265,8 +281,10 @@ bool LLVMTargetMachine::addCommonCodeGen /* allowDoubleDefs= */ true); if (OptLevel != CodeGenOpt::None) { - PM.add(createMachineLICMPass()); - PM.add(createMachineSinkingPass()); + if (!DisableMachineLICM) + PM.add(createMachineLICMPass()); + if (!DisableMachineSink) + PM.add(createMachineSinkingPass()); printAndVerify(PM, "After MachineLICM and MachineSinking", /* allowDoubleDefs= */ true); } @@ -281,7 +299,7 @@ bool LLVMTargetMachine::addCommonCodeGen printAndVerify(PM, "After Register Allocation"); // Perform stack slot coloring. - if (OptLevel != CodeGenOpt::None) { + if (OptLevel != CodeGenOpt::None && !DisableSSC) { // FIXME: Re-enable coloring with register when it's capable of adding // kill markers. PM.add(createStackSlotColoringPass(false)); @@ -304,13 +322,13 @@ bool LLVMTargetMachine::addCommonCodeGen printAndVerify(PM, "After PreSched2 passes"); // Second pass scheduler. - if (OptLevel != CodeGenOpt::None) { + if (OptLevel != CodeGenOpt::None && !DisablePostRA) { PM.add(createPostRAScheduler(OptLevel)); printAndVerify(PM, "After PostRAScheduler"); } // Branch folding must be run after regalloc and prolog/epilog insertion. - if (OptLevel != CodeGenOpt::None) { + if (OptLevel != CodeGenOpt::None && !DisableBranchFold) { PM.add(createBranchFoldingPass(getEnableTailMergeDefault())); printAndVerify(PM, "After BranchFolding"); } @@ -324,13 +342,13 @@ bool LLVMTargetMachine::addCommonCodeGen PM.add(createDebugLabelFoldingPass()); printAndVerify(PM, "After DebugLabelFolding"); - if (addPreEmitPass(PM, OptLevel)) - printAndVerify(PM, "After PreEmit passes"); - - if (OptLevel != CodeGenOpt::None) { + if (OptLevel != CodeGenOpt::None && !DisableCodePlace) { PM.add(createCodePlacementOptPass()); printAndVerify(PM, "After CodePlacementOpt"); } + if (addPreEmitPass(PM, OptLevel)) + printAndVerify(PM, "After PreEmit passes"); + return false; } Modified: vendor/llvm/dist/lib/CodeGen/MachineLICM.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/MachineLICM.cpp Thu Nov 5 16:30:16 2009 (r198952) +++ vendor/llvm/dist/lib/CodeGen/MachineLICM.cpp Thu Nov 5 17:17:44 2009 (r198953) @@ -111,6 +111,13 @@ namespace { /// be hoistable. MachineInstr *ExtractHoistableLoad(MachineInstr *MI); + /// EliminateCSE - Given a LICM'ed instruction, look for an instruction on + /// the preheader that compute the same value. If it's found, do a RAU on + /// with the definition of the existing instruction rather than hoisting + /// the instruction to the preheader. + bool EliminateCSE(MachineInstr *MI, + DenseMap >::iterator &CI); + /// Hoist - When an instruction is found to only use loop invariant operands /// that is safe to hoist, this instruction is called to do the dirty work. /// @@ -349,37 +356,6 @@ bool MachineLICM::IsProfitableToHoist(Ma return true; } -static const MachineInstr *LookForDuplicate(const MachineInstr *MI, - std::vector &PrevMIs, - MachineRegisterInfo *RegInfo) { - unsigned NumOps = MI->getNumOperands(); - for (unsigned i = 0, e = PrevMIs.size(); i != e; ++i) { - const MachineInstr *PrevMI = PrevMIs[i]; - unsigned NumOps2 = PrevMI->getNumOperands(); - if (NumOps != NumOps2) - continue; - bool IsSame = true; - for (unsigned j = 0; j != NumOps; ++j) { - const MachineOperand &MO = MI->getOperand(j); - if (MO.isReg() && MO.isDef()) { - if (RegInfo->getRegClass(MO.getReg()) != - RegInfo->getRegClass(PrevMI->getOperand(j).getReg())) { - IsSame = false; - break; - } - continue; - } - if (!MO.isIdenticalTo(PrevMI->getOperand(j))) { - IsSame = false; - break; - } - } - if (IsSame) - return PrevMI; - } - return 0; -} - MachineInstr *MachineLICM::ExtractHoistableLoad(MachineInstr *MI) { // If not, we may be able to unfold a load and hoist that. // First test whether the instruction is loading from an amenable @@ -456,6 +432,55 @@ void MachineLICM::InitCSEMap(MachineBasi } } +static const MachineInstr *LookForDuplicate(const MachineInstr *MI, + std::vector &PrevMIs, + MachineRegisterInfo *RegInfo) { + unsigned NumOps = MI->getNumOperands(); + for (unsigned i = 0, e = PrevMIs.size(); i != e; ++i) { + const MachineInstr *PrevMI = PrevMIs[i]; + unsigned NumOps2 = PrevMI->getNumOperands(); + if (NumOps != NumOps2) + continue; + bool IsSame = true; + for (unsigned j = 0; j != NumOps; ++j) { + const MachineOperand &MO = MI->getOperand(j); + if (MO.isReg() && MO.isDef()) { + if (RegInfo->getRegClass(MO.getReg()) != + RegInfo->getRegClass(PrevMI->getOperand(j).getReg())) { + IsSame = false; + break; + } + continue; + } + if (!MO.isIdenticalTo(PrevMI->getOperand(j))) { + IsSame = false; + break; + } + } + if (IsSame) + return PrevMI; + } + return 0; +} + +bool MachineLICM::EliminateCSE(MachineInstr *MI, + DenseMap >::iterator &CI) { + if (CI != CSEMap.end()) { + if (const MachineInstr *Dup = LookForDuplicate(MI, CI->second, RegInfo)) { + DEBUG(errs() << "CSEing " << *MI << " with " << *Dup); + for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { + const MachineOperand &MO = MI->getOperand(i); + if (MO.isReg() && MO.isDef()) + RegInfo->replaceRegWith(MO.getReg(), Dup->getOperand(i).getReg()); + } + MI->eraseFromParent(); + ++NumCSEed; + return true; + } + } + return false; +} + /// Hoist - When an instruction is found to use only loop invariant operands /// that are safe to hoist, this instruction is called to do the dirty work. /// @@ -488,24 +513,8 @@ void MachineLICM::Hoist(MachineInstr *MI unsigned Opcode = MI->getOpcode(); DenseMap >::iterator CI = CSEMap.find(Opcode); - bool DoneCSE = false; - if (CI != CSEMap.end()) { - const MachineInstr *Dup = LookForDuplicate(MI, CI->second, RegInfo); - if (Dup) { - DEBUG(errs() << "CSEing " << *MI << " with " << *Dup); - for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { - const MachineOperand &MO = MI->getOperand(i); - if (MO.isReg() && MO.isDef()) - RegInfo->replaceRegWith(MO.getReg(), Dup->getOperand(i).getReg()); - } - MI->eraseFromParent(); - DoneCSE = true; - ++NumCSEed; - } - } - - // Otherwise, splice the instruction to the preheader. - if (!DoneCSE) { + if (!EliminateCSE(MI, CI)) { + // Otherwise, splice the instruction to the preheader. CurPreheader->splice(CurPreheader->getFirstTerminator(),MI->getParent(),MI); // Add to the CSE map. Modified: vendor/llvm/dist/lib/CodeGen/PostRASchedulerList.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/PostRASchedulerList.cpp Thu Nov 5 16:30:16 2009 (r198952) +++ vendor/llvm/dist/lib/CodeGen/PostRASchedulerList.cpp Thu Nov 5 17:17:44 2009 (r198953) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Nov 5 17:18:11 2009 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 DF0CD10656AC; Thu, 5 Nov 2009 17:18:10 +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 8D9848FC16; Thu, 5 Nov 2009 17: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 nA5HIAl7084832; Thu, 5 Nov 2009 17:18:10 GMT (envelope-from rdivacky@svn.freebsd.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA5HIAua084802; Thu, 5 Nov 2009 17:18:10 GMT (envelope-from rdivacky@svn.freebsd.org) Message-Id: <200911051718.nA5HIAua084802@svn.freebsd.org> From: Roman Divacky Date: Thu, 5 Nov 2009 17:18:10 +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: r198954 - in vendor/clang/dist: include/clang/AST include/clang/Analysis include/clang/Analysis/PathSensitive include/clang/Analysis/PathSensitive/Checkers include/clang/Basic include/c... 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, 05 Nov 2009 17:18:11 -0000 Author: rdivacky Date: Thu Nov 5 17:18:09 2009 New Revision: 198954 URL: http://svn.freebsd.org/changeset/base/198954 Log: Update clang to r86140. Added: vendor/clang/dist/test/SemaCXX/compare.cpp Modified: vendor/clang/dist/include/clang/AST/ASTConsumer.h vendor/clang/dist/include/clang/Analysis/PathDiagnostic.h vendor/clang/dist/include/clang/Analysis/PathSensitive/AnalysisManager.h vendor/clang/dist/include/clang/Analysis/PathSensitive/BugType.h vendor/clang/dist/include/clang/Analysis/PathSensitive/Checker.h vendor/clang/dist/include/clang/Analysis/PathSensitive/Checkers/UndefinedAssignmentChecker.h vendor/clang/dist/include/clang/Analysis/PathSensitive/GRExprEngine.h vendor/clang/dist/include/clang/Basic/Diagnostic.h vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td vendor/clang/dist/include/clang/Basic/DiagnosticParseKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td vendor/clang/dist/include/clang/Frontend/ASTConsumers.h vendor/clang/dist/include/clang/Frontend/AnalysisConsumer.h vendor/clang/dist/include/clang/Frontend/InitPreprocessor.h vendor/clang/dist/include/clang/Frontend/PathDiagnosticClients.h vendor/clang/dist/include/clang/Frontend/TextDiagnosticPrinter.h vendor/clang/dist/include/clang/Frontend/Utils.h vendor/clang/dist/include/clang/Lex/Preprocessor.h vendor/clang/dist/include/clang/Parse/Action.h vendor/clang/dist/include/clang/Parse/DeclSpec.h vendor/clang/dist/include/clang/Parse/Parser.h vendor/clang/dist/include/clang/Rewrite/HTMLRewrite.h vendor/clang/dist/lib/AST/ASTContext.cpp vendor/clang/dist/lib/AST/DeclarationName.cpp vendor/clang/dist/lib/AST/RecordLayoutBuilder.cpp vendor/clang/dist/lib/AST/RecordLayoutBuilder.h vendor/clang/dist/lib/AST/Type.cpp vendor/clang/dist/lib/Analysis/GRExprEngine.cpp vendor/clang/dist/lib/Analysis/UndefinedAssignmentChecker.cpp vendor/clang/dist/lib/Analysis/VLASizeChecker.cpp vendor/clang/dist/lib/CodeGen/CGCXX.cpp vendor/clang/dist/lib/CodeGen/CGDecl.cpp vendor/clang/dist/lib/CodeGen/CodeGenFunction.cpp vendor/clang/dist/lib/CodeGen/CodeGenFunction.h vendor/clang/dist/lib/Frontend/AnalysisConsumer.cpp vendor/clang/dist/lib/Frontend/HTMLDiagnostics.cpp vendor/clang/dist/lib/Frontend/HTMLPrint.cpp vendor/clang/dist/lib/Frontend/InitPreprocessor.cpp vendor/clang/dist/lib/Frontend/PlistDiagnostics.cpp vendor/clang/dist/lib/Frontend/TextDiagnosticPrinter.cpp vendor/clang/dist/lib/Headers/stdint.h vendor/clang/dist/lib/Lex/Preprocessor.cpp vendor/clang/dist/lib/Parse/DeclSpec.cpp vendor/clang/dist/lib/Parse/MinimalAction.cpp vendor/clang/dist/lib/Parse/ParseDecl.cpp vendor/clang/dist/lib/Parse/ParseDeclCXX.cpp vendor/clang/dist/lib/Parse/ParseExprCXX.cpp vendor/clang/dist/lib/Parse/ParseTemplate.cpp vendor/clang/dist/lib/Parse/ParseTentative.cpp vendor/clang/dist/lib/Rewrite/HTMLRewrite.cpp vendor/clang/dist/lib/Sema/Sema.h vendor/clang/dist/lib/Sema/SemaCXXCast.cpp vendor/clang/dist/lib/Sema/SemaCXXScopeSpec.cpp vendor/clang/dist/lib/Sema/SemaDeclCXX.cpp vendor/clang/dist/lib/Sema/SemaExpr.cpp vendor/clang/dist/lib/Sema/SemaExprCXX.cpp vendor/clang/dist/lib/Sema/SemaOverload.cpp vendor/clang/dist/lib/Sema/SemaTemplate.cpp vendor/clang/dist/lib/Sema/SemaType.cpp vendor/clang/dist/lib/Sema/TreeTransform.h vendor/clang/dist/test/Analysis/misc-ps.m vendor/clang/dist/test/CMakeLists.txt vendor/clang/dist/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p5-cxx0x.cpp vendor/clang/dist/test/CodeGenCXX/array-construction.cpp vendor/clang/dist/test/CodeGenCXX/ptr-to-datamember.cpp vendor/clang/dist/test/CodeGenCXX/ptr-to-member-function.cpp vendor/clang/dist/test/CodeGenCXX/virt.cpp vendor/clang/dist/test/Coverage/html-diagnostics.c vendor/clang/dist/test/Frontend/dependency-gen.c vendor/clang/dist/test/Makefile vendor/clang/dist/test/Parser/if-scope-c90.c vendor/clang/dist/test/Parser/if-scope-c99.c vendor/clang/dist/test/Preprocessor/stdint.c vendor/clang/dist/test/Sema/compare.c vendor/clang/dist/test/Sema/conditional-expr.c vendor/clang/dist/test/SemaCXX/conditional-expr.cpp vendor/clang/dist/test/SemaCXX/constructor-initializer.cpp vendor/clang/dist/test/SemaCXX/overload-member-call.cpp vendor/clang/dist/test/SemaCXX/overloaded-operator.cpp vendor/clang/dist/test/SemaCXX/primary-base.cpp vendor/clang/dist/test/SemaTemplate/example-dynarray.cpp vendor/clang/dist/test/SemaTemplate/instantiate-complete.cpp vendor/clang/dist/test/SemaTemplate/instantiate-deeply.cpp vendor/clang/dist/test/SemaTemplate/instantiate-expr-1.cpp vendor/clang/dist/test/SemaTemplate/member-access-expr.cpp vendor/clang/dist/test/SemaTemplate/member-template-access-expr.cpp vendor/clang/dist/test/SemaTemplate/temp_arg_nontype.cpp vendor/clang/dist/test/SemaTemplate/template-id-expr.cpp vendor/clang/dist/test/lit.cfg vendor/clang/dist/tools/clang-cc/clang-cc.cpp vendor/clang/dist/utils/C++Tests/LLVM-Syntax/lit.local.cfg vendor/clang/dist/www/analyzer/latest_checker.html.incl Modified: vendor/clang/dist/include/clang/AST/ASTConsumer.h ============================================================================== --- vendor/clang/dist/include/clang/AST/ASTConsumer.h Thu Nov 5 17:17:44 2009 (r198953) +++ vendor/clang/dist/include/clang/AST/ASTConsumer.h Thu Nov 5 17:18:09 2009 (r198954) @@ -38,17 +38,17 @@ public: virtual ~ASTConsumer() {} /// Initialize - This is called to initialize the consumer, providing the - /// ASTContext and the Action. + /// ASTContext. virtual void Initialize(ASTContext &Context) {} /// HandleTopLevelDecl - Handle the specified top-level declaration. This is - /// called by the parser to process every top-level Decl*. Note that D can - /// be the head of a chain of Decls (e.g. for `int a, b` the chain will have - /// two elements). Use Decl::getNextDeclarator() to walk the chain. + /// called by the parser to process every top-level Decl*. Note that D can be + /// the head of a chain of Decls (e.g. for `int a, b` the chain will have two + /// elements). Use Decl::getNextDeclarator() to walk the chain. virtual void HandleTopLevelDecl(DeclGroupRef D); /// HandleTranslationUnit - This method is called when the ASTs for entire - /// translation unit have been parsed. + /// translation unit have been parsed. virtual void HandleTranslationUnit(ASTContext &Ctx) {} /// HandleTagDeclDefinition - This callback is invoked each time a TagDecl @@ -57,9 +57,9 @@ public: /// can be defined in declspecs). virtual void HandleTagDeclDefinition(TagDecl *D) {} - /// \brief Callback invoked at the end of a translation unit to - /// notify the consumer that the given tentative definition should - /// be completed. + /// CompleteTentativeDefinition - Callback invoked at the end of a translation + /// unit to notify the consumer that the given tentative definition should be + /// completed. /// /// The variable declaration itself will be a tentative /// definition. If it had an incomplete array type, its type will @@ -69,8 +69,7 @@ public: virtual void CompleteTentativeDefinition(VarDecl *D) {} /// PrintStats - If desired, print any statistics. - virtual void PrintStats() { - } + virtual void PrintStats() {} // Support isa/cast/dyn_cast static bool classof(const ASTConsumer *) { return true; } Modified: vendor/clang/dist/include/clang/Analysis/PathDiagnostic.h ============================================================================== --- vendor/clang/dist/include/clang/Analysis/PathDiagnostic.h Thu Nov 5 17:17:44 2009 (r198953) +++ vendor/clang/dist/include/clang/Analysis/PathDiagnostic.h Thu Nov 5 17:18:09 2009 (r198954) @@ -43,8 +43,18 @@ class Preprocessor; class PathDiagnosticClient : public DiagnosticClient { public: PathDiagnosticClient() {} - virtual ~PathDiagnosticClient() {} - virtual void SetPreprocessor(Preprocessor *PP) {} + + virtual ~PathDiagnosticClient() {}; + + virtual void + FlushDiagnostics(llvm::SmallVectorImpl *FilesMade = 0) = 0; + + void FlushDiagnostics(llvm::SmallVectorImpl &FilesMade) { + FlushDiagnostics(&FilesMade); + } + + virtual llvm::StringRef getName() const = 0; + virtual void HandleDiagnostic(Diagnostic::Level DiagLevel, const DiagnosticInfo &Info); virtual void HandlePathDiagnostic(const PathDiagnostic* D) = 0; Modified: vendor/clang/dist/include/clang/Analysis/PathSensitive/AnalysisManager.h ============================================================================== --- vendor/clang/dist/include/clang/Analysis/PathSensitive/AnalysisManager.h Thu Nov 5 17:17:44 2009 (r198953) +++ vendor/clang/dist/include/clang/Analysis/PathSensitive/AnalysisManager.h Thu Nov 5 17:18:09 2009 (r198954) @@ -66,6 +66,8 @@ public: VisualizeEGDot(vizdot), VisualizeEGUbi(vizubi), PurgeDead(purge), EagerlyAssume(eager), TrimGraph(trim) {} + ~AnalysisManager() { FlushDiagnostics(); } + void ClearContexts() { LocCtxMgr.clear(); AnaCtxMgr.clear(); @@ -98,6 +100,11 @@ public: virtual PathDiagnosticClient *getPathDiagnosticClient() { return PD.get(); } + + void FlushDiagnostics() { + if (PD.get()) + PD->FlushDiagnostics(); + } bool shouldVisualizeGraphviz() const { return VisualizeEGDot; } Modified: vendor/clang/dist/include/clang/Analysis/PathSensitive/BugType.h ============================================================================== --- vendor/clang/dist/include/clang/Analysis/PathSensitive/BugType.h Thu Nov 5 17:17:44 2009 (r198953) +++ vendor/clang/dist/include/clang/Analysis/PathSensitive/BugType.h Thu Nov 5 17:18:09 2009 (r198954) @@ -64,10 +64,10 @@ protected: const std::string desc; public: BuiltinBug(GRExprEngine *eng, const char* n, const char* d) - : BugType(n, "Logic errors"), Eng(*eng), desc(d) {} + : BugType(n, "Logic error"), Eng(*eng), desc(d) {} BuiltinBug(GRExprEngine *eng, const char* n) - : BugType(n, "Logic errors"), Eng(*eng), desc(n) {} + : BugType(n, "Logic error"), Eng(*eng), desc(n) {} const std::string &getDescription() const { return desc; } Modified: vendor/clang/dist/include/clang/Analysis/PathSensitive/Checker.h ============================================================================== --- vendor/clang/dist/include/clang/Analysis/PathSensitive/Checker.h Thu Nov 5 17:17:44 2009 (r198953) +++ vendor/clang/dist/include/clang/Analysis/PathSensitive/Checker.h Thu Nov 5 17:18:09 2009 (r198954) @@ -116,12 +116,13 @@ private: void GR_VisitBind(ExplodedNodeSet &Dst, GRStmtNodeBuilder &Builder, GRExprEngine &Eng, - const Stmt *stmt, ExplodedNode *Pred, void *tag, + const Stmt *AssignE, + const Stmt *StoreE, ExplodedNode *Pred, void *tag, SVal location, SVal val, bool isPrevisit) { CheckerContext C(Dst, Builder, Eng, Pred, tag, isPrevisit); assert(isPrevisit && "Only previsit supported for now."); - PreVisitBind(C, stmt, location, val); + PreVisitBind(C, AssignE, StoreE, location, val); } public: @@ -135,7 +136,8 @@ public: return Pred; } - virtual void PreVisitBind(CheckerContext &C, const Stmt *ST, + virtual void PreVisitBind(CheckerContext &C, + const Stmt *AssignE, const Stmt *StoreE, SVal location, SVal val) {} virtual ExplodedNode *CheckType(QualType T, ExplodedNode *Pred, Modified: vendor/clang/dist/include/clang/Analysis/PathSensitive/Checkers/UndefinedAssignmentChecker.h ============================================================================== --- vendor/clang/dist/include/clang/Analysis/PathSensitive/Checkers/UndefinedAssignmentChecker.h Thu Nov 5 17:17:44 2009 (r198953) +++ vendor/clang/dist/include/clang/Analysis/PathSensitive/Checkers/UndefinedAssignmentChecker.h Thu Nov 5 17:18:09 2009 (r198954) @@ -24,7 +24,8 @@ class UndefinedAssignmentChecker public: UndefinedAssignmentChecker() : BT(0) {} static void *getTag(); - virtual void PreVisitBind(CheckerContext &C, const Stmt *S, SVal location, + virtual void PreVisitBind(CheckerContext &C, const Stmt *AssignE, + const Stmt *StoreE, SVal location, SVal val); }; } Modified: vendor/clang/dist/include/clang/Analysis/PathSensitive/GRExprEngine.h ============================================================================== --- vendor/clang/dist/include/clang/Analysis/PathSensitive/GRExprEngine.h Thu Nov 5 17:17:44 2009 (r198953) +++ vendor/clang/dist/include/clang/Analysis/PathSensitive/GRExprEngine.h Thu Nov 5 17:18:09 2009 (r198954) @@ -412,7 +412,8 @@ protected: void CheckerVisit(Stmt *S, ExplodedNodeSet &Dst, ExplodedNodeSet &Src, bool isPrevisit); - void CheckerVisitBind(Stmt *S, ExplodedNodeSet &Dst, ExplodedNodeSet &Src, + void CheckerVisitBind(const Stmt *AssignE, const Stmt *StoreE, + ExplodedNodeSet &Dst, ExplodedNodeSet &Src, SVal location, SVal val, bool isPrevisit); @@ -566,7 +567,8 @@ protected: /// EvalBind - Handle the semantics of binding a value to a specific location. /// This method is used by EvalStore, VisitDeclStmt, and others. - void EvalBind(ExplodedNodeSet& Dst, Stmt* Ex, ExplodedNode* Pred, + void EvalBind(ExplodedNodeSet& Dst, Stmt *AssignE, + Stmt* StoreE, ExplodedNode* Pred, const GRState* St, SVal location, SVal Val, bool atDeclInit = false); @@ -578,14 +580,10 @@ public: const GRState* St, SVal location, const void *tag = 0); - - void EvalStore(ExplodedNodeSet& Dst, Expr* E, ExplodedNode* Pred, const GRState* St, - SVal TargetLV, SVal Val, const void *tag = 0); - - void EvalStore(ExplodedNodeSet& Dst, Expr* E, Expr* StoreE, ExplodedNode* Pred, + void EvalStore(ExplodedNodeSet& Dst, Expr* AssignE, Expr* StoreE, + ExplodedNode* Pred, const GRState* St, SVal TargetLV, SVal Val, const void *tag = 0); - }; } // end clang namespace Modified: vendor/clang/dist/include/clang/Basic/Diagnostic.h ============================================================================== --- vendor/clang/dist/include/clang/Basic/Diagnostic.h Thu Nov 5 17:17:44 2009 (r198953) +++ vendor/clang/dist/include/clang/Basic/Diagnostic.h Thu Nov 5 17:18:09 2009 (r198954) @@ -769,17 +769,28 @@ class DiagnosticClient { public: virtual ~DiagnosticClient(); - /// setLangOptions - This is set by clients of diagnostics when they know the - /// language parameters of the diagnostics that may be sent through. Note - /// that this can change over time if a DiagClient has multiple languages sent - /// through it. It may also be set to null (e.g. when processing command line - /// options). - virtual void setLangOptions(const LangOptions *LO) {} + /// BeginSourceFile - Callback to inform the diagnostic client that processing + /// of a source file is beginning. + /// + /// Note that diagnostics may be emitted outside the processing of a source + /// file, for example during the parsing of command line options. However, + /// diagnostics with source range information are required to only be emitted + /// in between BeginSourceFile() and EndSourceFile(). + /// + /// \arg LO - The language options for the source file being processed. + /// \arg PP - The preprocessor object being used for the source; this optional + /// and may not be present, for example when processing AST source files. + virtual void BeginSourceFile(const LangOptions &LangOpts) {} + + /// EndSourceFile - Callback to inform the diagnostic client that processing + /// of a source file has ended. The diagnostic client should assume that any + /// objects made available via \see BeginSourceFile() are inaccessible. + virtual void EndSourceFile() {} /// IncludeInDiagnosticCounts - This method (whose default implementation - /// returns true) indicates whether the diagnostics handled by this - /// DiagnosticClient should be included in the number of diagnostics - /// reported by Diagnostic. + /// returns true) indicates whether the diagnostics handled by this + /// DiagnosticClient should be included in the number of diagnostics reported + /// by Diagnostic. virtual bool IncludeInDiagnosticCounts() const; /// HandleDiagnostic - Handle this diagnostic, reporting it to the user or Modified: vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td Thu Nov 5 17:17:44 2009 (r198953) +++ vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td Thu Nov 5 17:18:09 2009 (r198954) @@ -23,6 +23,7 @@ def : DiagGroup<"address">; def : DiagGroup<"aggregate-return">; def : DiagGroup<"attributes">; def : DiagGroup<"bad-function-cast">; +def : DiagGroup<"c++-compat">; def : DiagGroup<"cast-align">; def : DiagGroup<"cast-qual">; def : DiagGroup<"char-align">; @@ -47,6 +48,7 @@ def : DiagGroup<"invalid-pch">; def : DiagGroup<"missing-braces">; def : DiagGroup<"missing-declarations">; def : DiagGroup<"missing-format-attribute">; +def : DiagGroup<"missing-include-dirs">; def : DiagGroup<"missing-noreturn">; def MultiChar : DiagGroup<"multichar">; def : DiagGroup<"nested-externs">; Modified: vendor/clang/dist/include/clang/Basic/DiagnosticParseKinds.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/DiagnosticParseKinds.td Thu Nov 5 17:17:44 2009 (r198953) +++ vendor/clang/dist/include/clang/Basic/DiagnosticParseKinds.td Thu Nov 5 17:18:09 2009 (r198954) @@ -166,9 +166,6 @@ def err_use_of_tag_name_without_tag : Er "use of tagged type %0 without '%1' tag">; def err_expected_ident_in_using : Error< "expected an identifier in using directive">; -def err_using_decl_can_not_refer_to_template_spec : Error< - "using declaration can not refer to template specialization">; - /// Objective-C parser diagnostics def err_objc_no_attributes_on_category : Error< Modified: vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td Thu Nov 5 17:17:44 2009 (r198953) +++ vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td Thu Nov 5 17:18:09 2009 (r198954) @@ -107,8 +107,14 @@ def err_using_decl_nested_name_specifier "using declaration refers into '%0', which is not a base class of %1">; def err_using_decl_can_not_refer_to_class_member : Error< "using declaration can not refer to class member">; - def err_using_decl_can_not_refer_to_namespace : Error< +def err_using_decl_can_not_refer_to_namespace : Error< "using declaration can not refer to namespace">; +def err_using_decl_constructor : Error< + "using declaration can not refer to a constructor">; +def err_using_decl_destructor : Error< + "using declaration can not refer to a destructor">; +def err_using_decl_template_id : Error< + "using declaration can not refer to a template specialization">; def err_invalid_thread : Error< "'__thread' is only allowed on variable declarations">; @@ -512,6 +518,8 @@ def err_init_reference_member_uninitiali "reference member of type %0 uninitialized">; def note_uninit_reference_member : Note< "uninitialized reference member is here">; +def warn_field_is_uninit : Warning<"field is uninitialized when used here">, + InGroup>; // C++0x decltype def err_cannot_determine_declared_type_of_overloaded_function : Error< @@ -1529,6 +1537,12 @@ def err_typecheck_vector_comparison : Er def err_typecheck_assign_const : Error<"read-only variable is not assignable">; def err_stmtexpr_file_scope : Error< "statement expression not allowed at file scope">; +def warn_mixed_sign_comparison : Warning< + "comparison of integers of different signs: %0 and %1">, + InGroup>; +def warn_mixed_sign_conditional : Warning< + "operands of ? are integers of different signs: %0 and %1">, + InGroup>; def err_invalid_this_use : Error< "invalid use of 'this' outside of a nonstatic member function">; Modified: vendor/clang/dist/include/clang/Frontend/ASTConsumers.h ============================================================================== --- vendor/clang/dist/include/clang/Frontend/ASTConsumers.h Thu Nov 5 17:17:44 2009 (r198953) +++ vendor/clang/dist/include/clang/Frontend/ASTConsumers.h Thu Nov 5 17:18:09 2009 (r198954) @@ -28,7 +28,6 @@ class ASTConsumer; class Diagnostic; class FileManager; class Preprocessor; -class PreprocessorFactory; class CompileOptions; class LangOptions; @@ -86,10 +85,11 @@ ASTConsumer *CreateBackendConsumer(Backe llvm::raw_ostream *OS, llvm::LLVMContext& C); -// HTML printer: uses the rewriter to convert source code to HTML with -// syntax highlighting suitable for viewing in a web-browser. -ASTConsumer* CreateHTMLPrinter(llvm::raw_ostream *OS, Diagnostic &D, - Preprocessor *PP, PreprocessorFactory *PPF); +/// CreateHTMLPrinter - Create an AST consumer which rewrites source code to +/// HTML with syntax highlighting suitable for viewing in a web-browser. +ASTConsumer *CreateHTMLPrinter(llvm::raw_ostream *OS, Preprocessor &PP, + bool SyntaxHighlight = true, + bool HighlightMacros = true); // PCH generator: generates a precompiled header file; this file can be // used later with the PCHReader (clang-cc option -include-pch) Modified: vendor/clang/dist/include/clang/Frontend/AnalysisConsumer.h ============================================================================== --- vendor/clang/dist/include/clang/Frontend/AnalysisConsumer.h Thu Nov 5 17:17:44 2009 (r198953) +++ vendor/clang/dist/include/clang/Frontend/AnalysisConsumer.h Thu Nov 5 17:18:09 2009 (r198954) @@ -19,7 +19,6 @@ namespace clang { class ASTConsumer; class Diagnostic; class Preprocessor; -class PreprocessorFactory; class LangOptions; /// Analysis - Set of available source code analyses. @@ -69,9 +68,7 @@ struct AnalyzerOptions { /// CreateAnalysisConsumer - Creates an ASTConsumer to run various code /// analysis passes. (The set of analyses run is controlled by command-line /// options.) -ASTConsumer* CreateAnalysisConsumer(Diagnostic &diags, Preprocessor *pp, - PreprocessorFactory *ppf, - const LangOptions &lopts, +ASTConsumer* CreateAnalysisConsumer(const Preprocessor &pp, const std::string &output, const AnalyzerOptions& Opts); Modified: vendor/clang/dist/include/clang/Frontend/InitPreprocessor.h ============================================================================== --- vendor/clang/dist/include/clang/Frontend/InitPreprocessor.h Thu Nov 5 17:17:44 2009 (r198953) +++ vendor/clang/dist/include/clang/Frontend/InitPreprocessor.h Thu Nov 5 17:18:09 2009 (r198954) @@ -29,7 +29,16 @@ class PreprocessorInitOptions { std::vector > Includes; std::vector MacroIncludes; + unsigned UsePredefines : 1; /// Initialize the preprocessor with the compiler + /// and target specific predefines. + public: + PreprocessorInitOptions() : UsePredefines(true) {} + + bool getUsePredefines() const { return UsePredefines; } + void setUsePredefines(bool Value) { + UsePredefines = Value; + } void addMacroDef(const std::string &Name) { Macros.push_back(std::make_pair(Name, false)); @@ -60,11 +69,10 @@ public: }; /// InitializePreprocessor - Initialize the preprocessor getting it and the -/// environment ready to process a single file. This returns true on error. +/// environment ready to process a single file. /// -bool InitializePreprocessor(Preprocessor &PP, - const PreprocessorInitOptions& InitOptions, - bool undef_macros); +void InitializePreprocessor(Preprocessor &PP, + const PreprocessorInitOptions& InitOptions); } // end namespace clang Modified: vendor/clang/dist/include/clang/Frontend/PathDiagnosticClients.h ============================================================================== --- vendor/clang/dist/include/clang/Frontend/PathDiagnosticClients.h Thu Nov 5 17:17:44 2009 (r198953) +++ vendor/clang/dist/include/clang/Frontend/PathDiagnosticClients.h Thu Nov 5 17:18:09 2009 (r198954) @@ -22,33 +22,13 @@ namespace clang { class PathDiagnosticClient; class Preprocessor; -class PreprocessorFactory; - -class PathDiagnosticClientFactory { -public: - PathDiagnosticClientFactory() {} - virtual ~PathDiagnosticClientFactory() {} - - virtual const char *getName() const = 0; - - virtual PathDiagnosticClient* - createPathDiagnosticClient(llvm::SmallVectorImpl *FilesMade) = 0; -}; PathDiagnosticClient* -CreateHTMLDiagnosticClient(const std::string& prefix, Preprocessor* PP = 0, - PreprocessorFactory* PPF = 0, - llvm::SmallVectorImpl* FilesMade = 0); - -PathDiagnosticClientFactory* -CreateHTMLDiagnosticClientFactory(const std::string& prefix, - Preprocessor* PP = 0, - PreprocessorFactory* PPF = 0); +CreateHTMLDiagnosticClient(const std::string& prefix, const Preprocessor &PP); PathDiagnosticClient* -CreatePlistDiagnosticClient(const std::string& prefix, Preprocessor* PP, - PreprocessorFactory* PPF, - PathDiagnosticClientFactory *PF = 0); +CreatePlistDiagnosticClient(const std::string& prefix, const Preprocessor &PP, + PathDiagnosticClient *SubPD = 0); } // end clang namespace #endif Modified: vendor/clang/dist/include/clang/Frontend/TextDiagnosticPrinter.h ============================================================================== --- vendor/clang/dist/include/clang/Frontend/TextDiagnosticPrinter.h Thu Nov 5 17:17:44 2009 (r198953) +++ vendor/clang/dist/include/clang/Frontend/TextDiagnosticPrinter.h Thu Nov 5 17:18:09 2009 (r198954) @@ -39,8 +39,12 @@ class TextDiagnosticPrinter : public Dia public: TextDiagnosticPrinter(llvm::raw_ostream &os, const DiagnosticOptions &diags); - void setLangOptions(const LangOptions *LO) { - LangOpts = LO; + void BeginSourceFile(const LangOptions &LO) { + LangOpts = &LO; + } + + void EndSourceFile() { + LangOpts = 0; } void PrintIncludeStack(SourceLocation Loc, const SourceManager &SM); Modified: vendor/clang/dist/include/clang/Frontend/Utils.h ============================================================================== --- vendor/clang/dist/include/clang/Frontend/Utils.h Thu Nov 5 17:17:44 2009 (r198953) +++ vendor/clang/dist/include/clang/Frontend/Utils.h Thu Nov 5 17:18:09 2009 (r198954) @@ -30,7 +30,6 @@ class Diagnostic; class ASTConsumer; class IdentifierTable; class SourceManager; -class PreprocessorFactory; class LangOptions; class Decl; class Stmt; Modified: vendor/clang/dist/include/clang/Lex/Preprocessor.h ============================================================================== --- vendor/clang/dist/include/clang/Lex/Preprocessor.h Thu Nov 5 17:17:44 2009 (r198953) +++ vendor/clang/dist/include/clang/Lex/Preprocessor.h Thu Nov 5 17:18:09 2009 (r198954) @@ -96,7 +96,7 @@ class Preprocessor { /// Identifiers - This is mapping/lookup information for all identifiers in /// the program, including program keywords. - IdentifierTable Identifiers; + mutable IdentifierTable Identifiers; /// Selectors - This table contains all the selectors in the program. Unlike /// IdentifierTable above, this table *isn't* populated by the preprocessor. @@ -296,12 +296,8 @@ public: /// pointers is preferred unless the identifier is already available as a /// string (this avoids allocation and copying of memory to construct an /// std::string). - IdentifierInfo *getIdentifierInfo(const char *NameStart, - const char *NameEnd) { - return &Identifiers.get(NameStart, NameEnd); - } - IdentifierInfo *getIdentifierInfo(const char *NameStr) { - return getIdentifierInfo(NameStr, NameStr+strlen(NameStr)); + IdentifierInfo *getIdentifierInfo(llvm::StringRef Name) const { + return &Identifiers.get(Name); } /// AddPragmaHandler - Add the specified pragma handler to the preprocessor. @@ -583,7 +579,7 @@ public: /// LookUpIdentifierInfo - Given a tok::identifier token, look up the /// identifier information for the token and install it into the token. IdentifierInfo *LookUpIdentifierInfo(Token &Identifier, - const char *BufPtr = 0); + const char *BufPtr = 0) const; /// HandleIdentifier - This callback is invoked when the lexer reads an /// identifier and has filled in the tokens IdentifierInfo member. This @@ -831,14 +827,6 @@ public: void HandleComment(SourceRange Comment); }; -/// PreprocessorFactory - A generic factory interface for lazily creating -/// Preprocessor objects on-demand when they are needed. -class PreprocessorFactory { -public: - virtual ~PreprocessorFactory(); - virtual Preprocessor* CreatePreprocessor() = 0; -}; - /// \brief Abstract base class that describes a handler that will receive /// source ranges for each of the comments encountered in the source file. class CommentHandler { Modified: vendor/clang/dist/include/clang/Parse/Action.h ============================================================================== --- vendor/clang/dist/include/clang/Parse/Action.h Thu Nov 5 17:17:44 2009 (r198953) +++ vendor/clang/dist/include/clang/Parse/Action.h Thu Nov 5 17:18:09 2009 (r198954) @@ -1174,14 +1174,41 @@ public: return DeclPtrTy(); } - /// ActOnUsingDirective - This is called when using-directive is parsed. + /// \brief Parsed a C++ using-declaration. + /// + /// This callback will be invoked when the parser has parsed a C++ + /// using-declaration, e.g., + /// + /// \code + /// namespace std { + /// template class vector; + /// } + /// + /// using std::vector; // using-declaration here + /// \endcode + /// + /// \param CurScope the scope in which this using declaration was parsed. + /// + /// \param AS the currently-active access specifier. + /// + /// \param UsingLoc the location of the 'using' keyword. + /// + /// \param SS the nested-name-specifier that precedes the name. + /// + /// \param Name the name to which the using declaration refers. + /// + /// \param AttrList attributes applied to this using declaration, if any. + /// + /// \param IsTypeName whether this using declaration started with the + /// 'typename' keyword. FIXME: This will eventually be split into a + /// separate action. + /// + /// \returns a representation of the using declaration. virtual DeclPtrTy ActOnUsingDeclaration(Scope *CurScope, AccessSpecifier AS, SourceLocation UsingLoc, const CXXScopeSpec &SS, - SourceLocation IdentLoc, - IdentifierInfo *TargetName, - OverloadedOperatorKind Op, + UnqualifiedId &Name, AttributeList *AttrList, bool IsTypeName); Modified: vendor/clang/dist/include/clang/Parse/DeclSpec.h ============================================================================== --- vendor/clang/dist/include/clang/Parse/DeclSpec.h Thu Nov 5 17:17:44 2009 (r198953) +++ vendor/clang/dist/include/clang/Parse/DeclSpec.h Thu Nov 5 17:18:09 2009 (r198954) @@ -131,6 +131,9 @@ private: // friend-specifier bool Friend_specified : 1; + // constexpr-specifier + bool Constexpr_specified : 1; + /// TypeRep - This contains action-specific information about a specific TST. /// For example, for a typedef or struct, it might contain the declaration for /// these. @@ -155,7 +158,7 @@ private: SourceLocation TSWLoc, TSCLoc, TSSLoc, TSTLoc; SourceLocation TQ_constLoc, TQ_restrictLoc, TQ_volatileLoc; SourceLocation FS_inlineLoc, FS_virtualLoc, FS_explicitLoc; - SourceLocation FriendLoc; + SourceLocation FriendLoc, ConstexprLoc; DeclSpec(const DeclSpec&); // DO NOT IMPLEMENT void operator=(const DeclSpec&); // DO NOT IMPLEMENT @@ -174,6 +177,7 @@ public: FS_virtual_specified(false), FS_explicit_specified(false), Friend_specified(false), + Constexpr_specified(false), TypeRep(0), AttrList(0), ProtocolQualifiers(0), @@ -309,9 +313,15 @@ public: bool SetFriendSpec(SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID); + bool SetConstexprSpec(SourceLocation Loc, const char *&PrevSpec, + unsigned &DiagID); + bool isFriendSpecified() const { return Friend_specified; } SourceLocation getFriendSpecLoc() const { return FriendLoc; } + bool isConstexprSpecified() const { return Constexpr_specified; } + SourceLocation getConstexprSpecLoc() const { return ConstexprLoc; } + /// AddAttributes - contatenates two attribute lists. /// The GCC attribute syntax allows for the following: /// Modified: vendor/clang/dist/include/clang/Parse/Parser.h ============================================================================== --- vendor/clang/dist/include/clang/Parse/Parser.h Thu Nov 5 17:17:44 2009 (r198953) +++ vendor/clang/dist/include/clang/Parse/Parser.h Thu Nov 5 17:18:09 2009 (r198954) @@ -1321,13 +1321,6 @@ private: UnqualifiedId &Result); //===--------------------------------------------------------------------===// - // C++ 13.5: Overloaded operators [over.oper] - // EndLoc, if non-NULL, is filled with the location of the last token of - // the ID. - OverloadedOperatorKind TryParseOperatorFunctionId(SourceLocation *EndLoc = 0); - TypeTy *ParseConversionFunctionId(SourceLocation *EndLoc = 0); - - //===--------------------------------------------------------------------===// // C++ 14: Templates [temp] typedef llvm::SmallVector TemplateParameterList; Modified: vendor/clang/dist/include/clang/Rewrite/HTMLRewrite.h ============================================================================== --- vendor/clang/dist/include/clang/Rewrite/HTMLRewrite.h Thu Nov 5 17:17:44 2009 (r198953) +++ vendor/clang/dist/include/clang/Rewrite/HTMLRewrite.h Thu Nov 5 17:18:09 2009 (r198954) @@ -23,7 +23,6 @@ namespace clang { class Rewriter; class RewriteBuffer; class Preprocessor; -class PreprocessorFactory; namespace html { @@ -68,14 +67,14 @@ namespace html { /// SyntaxHighlight - Relex the specified FileID and annotate the HTML with /// information about keywords, comments, etc. - void SyntaxHighlight(Rewriter &R, FileID FID, Preprocessor &PP); + void SyntaxHighlight(Rewriter &R, FileID FID, const Preprocessor &PP); /// HighlightMacros - This uses the macro table state from the end of the /// file, to reexpand macros and insert (into the HTML) information about the /// macro expansions. This won't be perfectly perfect, but it will be /// reasonably close. - void HighlightMacros(Rewriter &R, FileID FID, Preprocessor &PP); - void HighlightMacros(Rewriter &R, FileID FID, PreprocessorFactory &PPF); + void HighlightMacros(Rewriter &R, FileID FID, const Preprocessor &PP); + } // end html namespace } // end clang namespace Modified: vendor/clang/dist/lib/AST/ASTContext.cpp ============================================================================== --- vendor/clang/dist/lib/AST/ASTContext.cpp Thu Nov 5 17:17:44 2009 (r198953) +++ vendor/clang/dist/lib/AST/ASTContext.cpp Thu Nov 5 17:18:09 2009 (r198954) @@ -1374,7 +1374,7 @@ QualType ASTContext::getMemberPointerTyp // If the pointee or class type isn't canonical, this won't be a canonical // type either, so fill in the canonical type field. QualType Canonical; - if (!T.isCanonical()) { + if (!T.isCanonical() || !Cls->isCanonicalUnqualified()) { Canonical = getMemberPointerType(getCanonicalType(T),getCanonicalType(Cls)); // Get the new insert position for the node we care about. @@ -1395,7 +1395,8 @@ QualType ASTContext::getConstantArrayTyp const llvm::APInt &ArySizeIn, ArrayType::ArraySizeModifier ASM, unsigned EltTypeQuals) { - assert((EltTy->isDependentType() || EltTy->isConstantSizeType()) && + assert((EltTy->isDependentType() || + EltTy->isIncompleteType() || EltTy->isConstantSizeType()) && "Constant array of VLAs is illegal!"); // Convert the array size into a canonical width matching the pointer size for Modified: vendor/clang/dist/lib/AST/DeclarationName.cpp ============================================================================== --- vendor/clang/dist/lib/AST/DeclarationName.cpp Thu Nov 5 17:17:44 2009 (r198953) +++ vendor/clang/dist/lib/AST/DeclarationName.cpp Thu Nov 5 17:18:09 2009 (r198954) @@ -13,6 +13,7 @@ //===----------------------------------------------------------------------===// #include "clang/AST/DeclarationName.h" #include "clang/AST/Type.h" +#include "clang/AST/TypeOrdering.h" #include "clang/AST/Decl.h" #include "clang/Basic/IdentifierTable.h" #include "llvm/ADT/DenseMap.h" @@ -49,11 +50,50 @@ public: }; bool operator<(DeclarationName LHS, DeclarationName RHS) { - if (IdentifierInfo *LhsId = LHS.getAsIdentifierInfo()) - if (IdentifierInfo *RhsId = RHS.getAsIdentifierInfo()) - return LhsId->getName() < RhsId->getName(); - - return LHS.getAsOpaqueInteger() < RHS.getAsOpaqueInteger(); + if (LHS.getNameKind() != RHS.getNameKind()) + return LHS.getNameKind() < RHS.getNameKind(); + + switch (LHS.getNameKind()) { + case DeclarationName::Identifier: + return LHS.getAsIdentifierInfo()->getName() < + RHS.getAsIdentifierInfo()->getName(); + + case DeclarationName::ObjCZeroArgSelector: + case DeclarationName::ObjCOneArgSelector: + case DeclarationName::ObjCMultiArgSelector: { + Selector LHSSelector = LHS.getObjCSelector(); + Selector RHSSelector = RHS.getObjCSelector(); + for (unsigned I = 0, + N = std::min(LHSSelector.getNumArgs(), RHSSelector.getNumArgs()); + I != N; ++I) { + IdentifierInfo *LHSId = LHSSelector.getIdentifierInfoForSlot(I); + IdentifierInfo *RHSId = RHSSelector.getIdentifierInfoForSlot(I); + if (!LHSId || !RHSId) + return LHSId && !RHSId; + + switch (LHSId->getName().compare(RHSId->getName())) { + case -1: return true; + case 1: return false; + default: break; + } + } + + return LHSSelector.getNumArgs() < RHSSelector.getNumArgs(); + } + + case DeclarationName::CXXConstructorName: + case DeclarationName::CXXDestructorName: + case DeclarationName::CXXConversionFunctionName: + return QualTypeOrdering()(LHS.getCXXNameType(), RHS.getCXXNameType()); + + case DeclarationName::CXXOperatorName: + return LHS.getCXXOverloadedOperator() < RHS.getCXXOverloadedOperator(); + + case DeclarationName::CXXUsingDirective: + return false; + } + + return false; } } // end namespace clang Modified: vendor/clang/dist/lib/AST/RecordLayoutBuilder.cpp ============================================================================== --- vendor/clang/dist/lib/AST/RecordLayoutBuilder.cpp Thu Nov 5 17:17:44 2009 (r198953) +++ vendor/clang/dist/lib/AST/RecordLayoutBuilder.cpp Thu Nov 5 17:18:09 2009 (r198954) @@ -174,9 +174,24 @@ void ASTRecordLayoutBuilder::LayoutVirtu LayoutBaseNonVirtually(RD, true); } -void ASTRecordLayoutBuilder::LayoutVirtualBases(const CXXRecordDecl *RD, +uint64_t ASTRecordLayoutBuilder::getBaseOffset(const CXXRecordDecl *Base) { + for (size_t i = 0; i < Bases.size(); ++i) { + if (Bases[i].first == Base) + return Bases[i].second; + } + for (size_t i = 0; i < VBases.size(); ++i) { + if (VBases[i].first == Base) + return VBases[i].second; + } + assert(0 && "missing base"); + return 0; +} + + +void ASTRecordLayoutBuilder::LayoutVirtualBases(const CXXRecordDecl *Class, + const CXXRecordDecl *RD, const CXXRecordDecl *PB, - int64_t Offset, + uint64_t Offset, llvm::SmallSet &mark, llvm::SmallSet &IndirectPrimary) { for (CXXRecordDecl::base_class_const_iterator i = RD->bases_begin(), @@ -185,20 +200,7 @@ void ASTRecordLayoutBuilder::LayoutVirtu "Cannot layout class with dependent bases."); const CXXRecordDecl *Base = cast(i->getType()->getAs()->getDecl()); -#if 0 - const ASTRecordLayout &L = Ctx.getASTRecordLayout(Base); - const CXXRecordDecl *PB = L.getPrimaryBase(); - if (PB && L.getPrimaryBaseWasVirtual() - && IndirectPrimary.count(PB)) { - int64_t BaseOffset; - // FIXME: calculate this. - BaseOffset = (1<<63) | (1<<31); - VBases.push_back(PB); - VBaseOffsets.push_back(BaseOffset); - } -#endif - int64_t BaseOffset = Offset;; - // FIXME: Calculate BaseOffset. + uint64_t BaseOffset = Offset; if (i->isVirtual()) { if (Base == PB) { // Only lay things out once. @@ -220,11 +222,20 @@ void ASTRecordLayoutBuilder::LayoutVirtu LayoutVirtualBase(Base); BaseOffset = VBases.back().second; } + } else { + if (RD == Class) + BaseOffset = getBaseOffset(Base); + else { + const ASTRecordLayout &Layout + = Ctx.getASTRecordLayout(RD); + BaseOffset = Offset + Layout.getBaseClassOffset(Base); + } } + if (Base->getNumVBases()) { const ASTRecordLayout &L = Ctx.getASTRecordLayout(Base); const CXXRecordDecl *PB = L.getPrimaryBase(); - LayoutVirtualBases(Base, PB, BaseOffset, mark, IndirectPrimary); + LayoutVirtualBases(Class, Base, PB, BaseOffset, mark, IndirectPrimary); } } } @@ -295,7 +306,7 @@ bool ASTRecordLayoutBuilder::canPlaceFie const ASTRecordLayout &Info = Ctx.getASTRecordLayout(RD); uint64_t NumElements = Ctx.getConstantArrayElementCount(AT); - unsigned ElementOffset = Offset; + uint64_t ElementOffset = Offset; for (uint64_t I = 0; I != NumElements; ++I) { if (!canPlaceRecordAtOffset(RD, ElementOffset)) return false; @@ -366,7 +377,7 @@ ASTRecordLayoutBuilder::UpdateEmptyClass const ASTRecordLayout &Info = Ctx.getASTRecordLayout(RD); uint64_t NumElements = Ctx.getConstantArrayElementCount(AT); - unsigned ElementOffset = Offset; + uint64_t ElementOffset = Offset; for (uint64_t I = 0; I != NumElements; ++I) { UpdateEmptyClassOffsets(RD, ElementOffset); @@ -419,29 +430,13 @@ uint64_t ASTRecordLayoutBuilder::LayoutB void ASTRecordLayoutBuilder::LayoutBaseNonVirtually(const CXXRecordDecl *RD, bool IsVirtualBase) { // Layout the base. - unsigned Offset = LayoutBase(RD); + uint64_t Offset = LayoutBase(RD); // Add base class offsets. if (IsVirtualBase) VBases.push_back(std::make_pair(RD, Offset)); else Bases.push_back(std::make_pair(RD, Offset)); - -#if 0 - // And now add offsets for all our primary virtual bases as well, so - // they all have offsets. - const ASTRecordLayout *L = &BaseInfo; - const CXXRecordDecl *PB = L->getPrimaryBase(); - while (PB) { - if (L->getPrimaryBaseWasVirtual()) { - VBases.push_back(PB); - VBaseOffsets.push_back(Size); - } - PB = L->getPrimaryBase(); - if (PB) - L = &Ctx.getASTRecordLayout(PB); - } -#endif } void ASTRecordLayoutBuilder::Layout(const RecordDecl *D) { @@ -476,7 +471,7 @@ void ASTRecordLayoutBuilder::Layout(cons if (RD) { llvm::SmallSet mark; - LayoutVirtualBases(RD, PrimaryBase, 0, mark, IndirectPrimaryBases); + LayoutVirtualBases(RD, RD, PrimaryBase, 0, mark, IndirectPrimaryBases); } // Finally, round the size of the total struct up to the alignment of the Modified: vendor/clang/dist/lib/AST/RecordLayoutBuilder.h ============================================================================== --- vendor/clang/dist/lib/AST/RecordLayoutBuilder.h Thu Nov 5 17:17:44 2009 (r198953) +++ vendor/clang/dist/lib/AST/RecordLayoutBuilder.h Thu Nov 5 17:18:09 2009 (r198954) @@ -99,9 +99,9 @@ class ASTRecordLayoutBuilder { void LayoutNonVirtualBases(const CXXRecordDecl *RD); void LayoutBaseNonVirtually(const CXXRecordDecl *RD, bool IsVBase); void LayoutVirtualBase(const CXXRecordDecl *RD); - void LayoutVirtualBases(const CXXRecordDecl *RD, const CXXRecordDecl *PB, - int64_t Offset, - llvm::SmallSet &mark, + void LayoutVirtualBases(const CXXRecordDecl *Class, const CXXRecordDecl *RD, + const CXXRecordDecl *PB, uint64_t Offset, + llvm::SmallSet &mark, llvm::SmallSet &IndirectPrimary); /// canPlaceRecordAtOffset - Return whether a record (either a base class @@ -124,6 +124,9 @@ class ASTRecordLayoutBuilder { /// given offset. void UpdateEmptyClassOffsets(const FieldDecl *FD, uint64_t Offset); + /// getBaseOffset - Get the offset of a direct base class. + uint64_t getBaseOffset(const CXXRecordDecl *Base); + /// FinishLayout - Finalize record layout. Adjust record size based on the /// alignment. void FinishLayout(); Modified: vendor/clang/dist/lib/AST/Type.cpp ============================================================================== --- vendor/clang/dist/lib/AST/Type.cpp Thu Nov 5 17:17:44 2009 (r198953) +++ vendor/clang/dist/lib/AST/Type.cpp Thu Nov 5 17:18:09 2009 (r198954) @@ -550,6 +550,12 @@ bool Type::isIncompleteType() const { // A tagged type (struct/union/enum/class) is incomplete if the decl is a // forward declaration, but not a full definition (C99 6.2.5p22). return !cast(CanonicalType)->getDecl()->isDefinition(); + case ConstantArray: + // An array is incomplete if its element type is incomplete + // (C++ [dcl.array]p1). + // We don't handle variable arrays (they're not allowed in C++) or + // dependent-sized arrays (dependent types are never treated as incomplete). + return cast(CanonicalType)->getElementType()->isIncompleteType(); case IncompleteArray: // An array of unknown size is an incomplete type (C99 6.2.5p22). return true; Modified: vendor/clang/dist/lib/Analysis/GRExprEngine.cpp ============================================================================== --- vendor/clang/dist/lib/Analysis/GRExprEngine.cpp Thu Nov 5 17:17:44 2009 (r198953) +++ vendor/clang/dist/lib/Analysis/GRExprEngine.cpp Thu Nov 5 17:18:09 2009 (r198954) @@ -141,7 +141,8 @@ void GRExprEngine::CheckerVisit(Stmt *S, // FIXME: This is largely copy-paste from CheckerVisit(). Need to // unify. -void GRExprEngine::CheckerVisitBind(Stmt *S, ExplodedNodeSet &Dst, +void GRExprEngine::CheckerVisitBind(const Stmt *AssignE, const Stmt *StoreE, + ExplodedNodeSet &Dst, ExplodedNodeSet &Src, SVal location, SVal val, bool isPrevisit) { @@ -164,8 +165,8 @@ void GRExprEngine::CheckerVisitBind(Stmt for (ExplodedNodeSet::iterator NI = PrevSet->begin(), NE = PrevSet->end(); NI != NE; ++NI) - checker->GR_VisitBind(*CurrSet, *Builder, *this, S, *NI, tag, location, - val, isPrevisit); + checker->GR_VisitBind(*CurrSet, *Builder, *this, AssignE, StoreE, + *NI, tag, location, val, isPrevisit); // Update which NodeSet is the current one. PrevSet = CurrSet; @@ -1125,7 +1126,8 @@ void GRExprEngine::VisitMemberExpr(Membe /// EvalBind - Handle the semantics of binding a value to a specific location. /// This method is used by EvalStore and (soon) VisitDeclStmt, and others. -void GRExprEngine::EvalBind(ExplodedNodeSet& Dst, Stmt* Ex, ExplodedNode* Pred, +void GRExprEngine::EvalBind(ExplodedNodeSet& Dst, Stmt *AssignE, + Stmt* StoreE, ExplodedNode* Pred, const GRState* state, SVal location, SVal Val, bool atDeclInit) { @@ -1133,7 +1135,7 @@ void GRExprEngine::EvalBind(ExplodedNode // Do a previsit of the bind. ExplodedNodeSet CheckedSet, Src; Src.Add(Pred); - CheckerVisitBind(Ex, CheckedSet, Src, location, Val, true); + CheckerVisitBind(AssignE, StoreE, CheckedSet, Src, location, Val, true); for (ExplodedNodeSet::iterator I = CheckedSet.begin(), E = CheckedSet.end(); I!=E; ++I) { @@ -1166,7 +1168,7 @@ void GRExprEngine::EvalBind(ExplodedNode // The next thing to do is check if the GRTransferFuncs object wants to // update the state based on the new binding. If the GRTransferFunc object // doesn't do anything, just auto-propagate the current state. - GRStmtNodeBuilderRef BuilderRef(Dst, *Builder, *this, *I, newState, Ex, + GRStmtNodeBuilderRef BuilderRef(Dst, *Builder, *this, *I, newState, StoreE, newState != state); getTF().EvalBind(BuilderRef, location, Val); @@ -1179,14 +1181,16 @@ void GRExprEngine::EvalBind(ExplodedNode /// @param state The current simulation state /// @param location The location to store the value /// @param Val The value to be stored -void GRExprEngine::EvalStore(ExplodedNodeSet& Dst, Expr* Ex, ExplodedNode* Pred, +void GRExprEngine::EvalStore(ExplodedNodeSet& Dst, Expr *AssignE, + Expr* StoreE, + ExplodedNode* Pred, const GRState* state, SVal location, SVal Val, const void *tag) { - assert (Builder && "GRStmtNodeBuilder must be defined."); + assert(Builder && "GRStmtNodeBuilder must be defined."); // Evaluate the location (checks for bad dereferences). - Pred = EvalLocation(Ex, Pred, state, location, tag); + Pred = EvalLocation(StoreE, Pred, state, location, tag); if (!Pred) return; @@ -1199,7 +1203,7 @@ void GRExprEngine::EvalStore(ExplodedNod SaveAndRestore OldTag(Builder->Tag); Builder->PointKind = ProgramPoint::PostStoreKind; Builder->Tag = tag; - EvalBind(Dst, Ex, Pred, state, location, Val); + EvalBind(Dst, AssignE, StoreE, Pred, state, location, Val); } void GRExprEngine::EvalLoad(ExplodedNodeSet& Dst, Expr* Ex, ExplodedNode* Pred, @@ -1231,17 +1235,6 @@ void GRExprEngine::EvalLoad(ExplodedNode } } -void GRExprEngine::EvalStore(ExplodedNodeSet& Dst, Expr* Ex, Expr* StoreE, - ExplodedNode* Pred, const GRState* state, - SVal location, SVal Val, const void *tag) { - - ExplodedNodeSet TmpDst; - EvalStore(TmpDst, StoreE, Pred, state, location, Val, tag); - - for (ExplodedNodeSet::iterator I=TmpDst.begin(), E=TmpDst.end(); I!=E; ++I) - MakeNode(Dst, Ex, *I, (*I)->getState(), ProgramPoint::PostStmtKind, tag); -} - ExplodedNode* GRExprEngine::EvalLocation(Stmt* Ex, ExplodedNode* Pred, const GRState* state, SVal location, const void *tag) { @@ -1402,7 +1395,7 @@ static bool EvalOSAtomicCompareAndSwap(E newValueExpr->getType()); } - Engine.EvalStore(TmpStore, theValueExpr, N, stateEqual, location, + Engine.EvalStore(TmpStore, NULL, theValueExpr, N, stateEqual, location, val, OSAtomicStoreTag); // Now bind the result of the comparison. @@ -2147,8 +2140,8 @@ void GRExprEngine::VisitDeclStmt(DeclStm Builder->getCurrentBlockCount()); } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Nov 5 18:25:27 2009 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 2F1111065672; Thu, 5 Nov 2009 18:25:27 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1CD458FC1B; Thu, 5 Nov 2009 18:25: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 nA5IPRYu086886; Thu, 5 Nov 2009 18:25:27 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA5IPQjv086884; Thu, 5 Nov 2009 18:25:27 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <200911051825.nA5IPQjv086884@svn.freebsd.org> From: Matt Jacob Date: Thu, 5 Nov 2009 18:25:26 +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: r198959 - stable/8/sys/dev/isp 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, 05 Nov 2009 18:25:27 -0000 Author: mjacob Date: Thu Nov 5 18:25:26 2009 New Revision: 198959 URL: http://svn.freebsd.org/changeset/base/198959 Log: Unbreak SBus cards which have been broken (apparently) for a while. Most of the pieces came from Marius- correct settings for channels and resource management. The one piece missing was that you cannot for SBus cards replace 32 bit operations with A64 operations- not supported. This is an MFC of r198822. Modified: stable/8/sys/dev/isp/isp_sbus.c Modified: stable/8/sys/dev/isp/isp_sbus.c ============================================================================== --- stable/8/sys/dev/isp/isp_sbus.c Thu Nov 5 18:15:47 2009 (r198958) +++ stable/8/sys/dev/isp/isp_sbus.c Thu Nov 5 18:25:26 2009 (r198959) @@ -193,6 +193,8 @@ isp_sbus_attach(device_t dev) isp->isp_param = &sbs->sbus_param; isp->isp_osinfo.pc.ptr = &sbs->sbus_spi; isp->isp_revision = 0; /* XXX */ + isp->isp_dev = dev; + isp->isp_nchan = 1; ISP_SET_PC(isp, 0, role, role); /* @@ -316,18 +318,16 @@ isp_sbus_attach(device_t dev) goto bad; } isp_init(isp); - if (role != ISP_ROLE_NONE && isp->isp_state != ISP_INITSTATE) { - isp_uninit(isp); - ISP_UNLOCK(isp); - goto bad; + if (isp->isp_state == ISP_INITSTATE) { + isp->isp_state = ISP_RUNSTATE; } - isp_attach(isp); - if (role != ISP_ROLE_NONE && isp->isp_state != ISP_RUNSTATE) { + ISP_UNLOCK(isp); + if (isp_attach(isp)) { + ISP_LOCK(isp); isp_uninit(isp); ISP_UNLOCK(isp); goto bad; } - ISP_UNLOCK(isp); return (0); bad: @@ -345,13 +345,10 @@ bad: } if (regs) { - (void) bus_release_resource(dev, 0, 0, regs); + (void) bus_release_resource(dev, SYS_RES_MEMORY, 0, regs); } if (sbs) { - if (sbs->sbus_isp.isp_param) { - free(sbs->sbus_isp.isp_param, M_DEVBUF); - } free(sbs, M_DEVBUF); } return (ENXIO); @@ -584,13 +581,6 @@ dma2(void *arg, bus_dma_segment_t *dm_se isp = mp->isp; rq = mp->rq; if (nseg) { - if (sizeof (bus_addr_t) > 4) { - if (rq->req_header.rqs_entry_type == RQSTYPE_T2RQS) { - rq->req_header.rqs_entry_type = RQSTYPE_T3RQS; - } else if (rq->req_header.rqs_entry_type == RQSTYPE_REQUEST) { - rq->req_header.rqs_entry_type = RQSTYPE_A64; - } - } if ((csio->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN) { bus_dmamap_sync(isp->isp_osinfo.dmat, PISP_PCMD(csio)->dmap, BUS_DMASYNC_PREREAD); ddir = ISP_FROM_DEVICE; From owner-svn-src-all@FreeBSD.ORG Thu Nov 5 18:34:02 2009 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 14BEE1065672; Thu, 5 Nov 2009 18:34:02 +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 027258FC16; Thu, 5 Nov 2009 18:34: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 nA5IY1me087154; Thu, 5 Nov 2009 18:34:01 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA5IY1wr087151; Thu, 5 Nov 2009 18:34:01 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <200911051834.nA5IY1wr087151@svn.freebsd.org> From: Ed Maste Date: Thu, 5 Nov 2009 18:34: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: r198960 - stable/8/sys/dev/aac 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, 05 Nov 2009 18:34:02 -0000 Author: emaste Date: Thu Nov 5 18:34:01 2009 New Revision: 198960 URL: http://svn.freebsd.org/changeset/base/198960 Log: MFC r198525: Whitespace fixup: 8 spaces -> tab Modified: stable/8/sys/dev/aac/aac.c stable/8/sys/dev/aac/aac_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/aac/aac.c ============================================================================== --- stable/8/sys/dev/aac/aac.c Thu Nov 5 18:25:26 2009 (r198959) +++ stable/8/sys/dev/aac/aac.c Thu Nov 5 18:34:01 2009 (r198960) @@ -229,7 +229,7 @@ static int aac_query_disk(struct aac_so static int aac_get_pci_info(struct aac_softc *sc, caddr_t uptr); static int aac_supported_features(struct aac_softc *sc, caddr_t uptr); static void aac_ioctl_event(struct aac_softc *sc, - struct aac_event *event, void *arg); + struct aac_event *event, void *arg); static struct aac_mntinforesp * aac_get_container_info(struct aac_softc *sc, struct aac_fib *fib, int cid); @@ -3618,7 +3618,7 @@ aac_query_disk(struct aac_softc *sc, cad query_disk.Lun = 0; query_disk.UnMapped = 0; sprintf(&query_disk.diskDeviceName[0], "%s%d", - disk->ad_disk->d_name, disk->ad_disk->d_unit); + disk->ad_disk->d_name, disk->ad_disk->d_unit); } mtx_unlock(&sc->aac_container_lock); Modified: stable/8/sys/dev/aac/aac_cam.c ============================================================================== --- stable/8/sys/dev/aac/aac_cam.c Thu Nov 5 18:25:26 2009 (r198959) +++ stable/8/sys/dev/aac/aac_cam.c Thu Nov 5 18:34:01 2009 (r198960) @@ -272,10 +272,10 @@ aac_cam_action(struct cam_sim *sim, unio strncpy(cpi->hba_vid, "Adaptec", HBA_IDLEN); strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); - cpi->transport = XPORT_SPI; - cpi->transport_version = 2; - cpi->protocol = PROTO_SCSI; - cpi->protocol_version = SCSI_REV_2; + cpi->transport = XPORT_SPI; + cpi->transport_version = 2; + cpi->protocol = PROTO_SCSI; + cpi->protocol_version = SCSI_REV_2; ccb->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); return; From owner-svn-src-all@FreeBSD.ORG Thu Nov 5 18:38:12 2009 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 D5FCD1065672; Thu, 5 Nov 2009 18:38:12 +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 AA6318FC18; Thu, 5 Nov 2009 18:38: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 nA5IcCWi087304; Thu, 5 Nov 2009 18:38:12 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA5IcCVD087301; Thu, 5 Nov 2009 18:38:12 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <200911051838.nA5IcCVD087301@svn.freebsd.org> From: Ed Maste Date: Thu, 5 Nov 2009 18:38:12 +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: r198961 - stable/7/sys/dev/aac 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, 05 Nov 2009 18:38:12 -0000 Author: emaste Date: Thu Nov 5 18:38:12 2009 New Revision: 198961 URL: http://svn.freebsd.org/changeset/base/198961 Log: MFC r198525: Whitespace fixup: 8 spaces -> tab Modified: stable/7/sys/dev/aac/aac.c stable/7/sys/dev/aac/aac_cam.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/aac/aac.c ============================================================================== --- stable/7/sys/dev/aac/aac.c Thu Nov 5 18:34:01 2009 (r198960) +++ stable/7/sys/dev/aac/aac.c Thu Nov 5 18:38:12 2009 (r198961) @@ -229,7 +229,7 @@ static int aac_query_disk(struct aac_so static int aac_get_pci_info(struct aac_softc *sc, caddr_t uptr); static int aac_supported_features(struct aac_softc *sc, caddr_t uptr); static void aac_ioctl_event(struct aac_softc *sc, - struct aac_event *event, void *arg); + struct aac_event *event, void *arg); static struct aac_mntinforesp * aac_get_container_info(struct aac_softc *sc, struct aac_fib *fib, int cid); @@ -3618,7 +3618,7 @@ aac_query_disk(struct aac_softc *sc, cad query_disk.Lun = 0; query_disk.UnMapped = 0; sprintf(&query_disk.diskDeviceName[0], "%s%d", - disk->ad_disk->d_name, disk->ad_disk->d_unit); + disk->ad_disk->d_name, disk->ad_disk->d_unit); } mtx_unlock(&sc->aac_container_lock); Modified: stable/7/sys/dev/aac/aac_cam.c ============================================================================== --- stable/7/sys/dev/aac/aac_cam.c Thu Nov 5 18:34:01 2009 (r198960) +++ stable/7/sys/dev/aac/aac_cam.c Thu Nov 5 18:38:12 2009 (r198961) @@ -272,10 +272,10 @@ aac_cam_action(struct cam_sim *sim, unio strncpy(cpi->hba_vid, "Adaptec", HBA_IDLEN); strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); - cpi->transport = XPORT_SPI; - cpi->transport_version = 2; - cpi->protocol = PROTO_SCSI; - cpi->protocol_version = SCSI_REV_2; + cpi->transport = XPORT_SPI; + cpi->transport_version = 2; + cpi->protocol = PROTO_SCSI; + cpi->protocol_version = SCSI_REV_2; ccb->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); return; From owner-svn-src-all@FreeBSD.ORG Thu Nov 5 19:55:43 2009 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 A66861065695; Thu, 5 Nov 2009 19:55:43 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7A5D38FC17; Thu, 5 Nov 2009 19:55: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 nA5JthO9089102; Thu, 5 Nov 2009 19:55:43 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA5JthPa089100; Thu, 5 Nov 2009 19:55:43 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <200911051955.nA5JthPa089100@svn.freebsd.org> From: Matt Jacob Date: Thu, 5 Nov 2009 19:55:43 +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: r198962 - releng/8.0/sys/dev/isp 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, 05 Nov 2009 19:55:43 -0000 Author: mjacob Date: Thu Nov 5 19:55:42 2009 New Revision: 198962 URL: http://svn.freebsd.org/changeset/base/198962 Log: Unbreak SBus cards which have been broken (apparently) for a while. Most of the pieces came from Marius- correct settings for channels and resource management. The one piece missing was that you cannot for SBus cards replace 32 bit operations with A64 operations- not supported. MFC of 198822. Approved by: re (ks) Modified: releng/8.0/sys/dev/isp/isp_sbus.c Modified: releng/8.0/sys/dev/isp/isp_sbus.c ============================================================================== --- releng/8.0/sys/dev/isp/isp_sbus.c Thu Nov 5 18:38:12 2009 (r198961) +++ releng/8.0/sys/dev/isp/isp_sbus.c Thu Nov 5 19:55:42 2009 (r198962) @@ -193,6 +193,8 @@ isp_sbus_attach(device_t dev) isp->isp_param = &sbs->sbus_param; isp->isp_osinfo.pc.ptr = &sbs->sbus_spi; isp->isp_revision = 0; /* XXX */ + isp->isp_dev = dev; + isp->isp_nchan = 1; ISP_SET_PC(isp, 0, role, role); /* @@ -316,18 +318,16 @@ isp_sbus_attach(device_t dev) goto bad; } isp_init(isp); - if (role != ISP_ROLE_NONE && isp->isp_state != ISP_INITSTATE) { - isp_uninit(isp); - ISP_UNLOCK(isp); - goto bad; + if (isp->isp_state == ISP_INITSTATE) { + isp->isp_state = ISP_RUNSTATE; } - isp_attach(isp); - if (role != ISP_ROLE_NONE && isp->isp_state != ISP_RUNSTATE) { + ISP_UNLOCK(isp); + if (isp_attach(isp)) { + ISP_LOCK(isp); isp_uninit(isp); ISP_UNLOCK(isp); goto bad; } - ISP_UNLOCK(isp); return (0); bad: @@ -345,13 +345,10 @@ bad: } if (regs) { - (void) bus_release_resource(dev, 0, 0, regs); + (void) bus_release_resource(dev, SYS_RES_MEMORY, 0, regs); } if (sbs) { - if (sbs->sbus_isp.isp_param) { - free(sbs->sbus_isp.isp_param, M_DEVBUF); - } free(sbs, M_DEVBUF); } return (ENXIO); @@ -584,13 +581,6 @@ dma2(void *arg, bus_dma_segment_t *dm_se isp = mp->isp; rq = mp->rq; if (nseg) { - if (sizeof (bus_addr_t) > 4) { - if (rq->req_header.rqs_entry_type == RQSTYPE_T2RQS) { - rq->req_header.rqs_entry_type = RQSTYPE_T3RQS; - } else if (rq->req_header.rqs_entry_type == RQSTYPE_REQUEST) { - rq->req_header.rqs_entry_type = RQSTYPE_A64; - } - } if ((csio->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN) { bus_dmamap_sync(isp->isp_osinfo.dmat, PISP_PCMD(csio)->dmap, BUS_DMASYNC_PREREAD); ddir = ISP_FROM_DEVICE; From owner-svn-src-all@FreeBSD.ORG Thu Nov 5 20:44:39 2009 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 64AEE106566B; Thu, 5 Nov 2009 20:44:39 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 535238FC1B; Thu, 5 Nov 2009 20:44: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 nA5KidqM090204; Thu, 5 Nov 2009 20:44:39 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA5KidiH090202; Thu, 5 Nov 2009 20:44:39 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <200911052044.nA5KidiH090202@svn.freebsd.org> From: Jilles Tjoelker Date: Thu, 5 Nov 2009 20:44: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: r198963 - head/bin/sh 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, 05 Nov 2009 20:44:39 -0000 Author: jilles Date: Thu Nov 5 20:44:39 2009 New Revision: 198963 URL: http://svn.freebsd.org/changeset/base/198963 Log: sh: Fix memory leak when using a variable in arithmetic like $((x)). MFC after: 3 weeks Modified: head/bin/sh/arith_lex.l Modified: head/bin/sh/arith_lex.l ============================================================================== --- head/bin/sh/arith_lex.l Thu Nov 5 19:55:42 2009 (r198962) +++ head/bin/sh/arith_lex.l Thu Nov 5 20:44:39 2009 (r198963) @@ -51,6 +51,13 @@ __FBSDID("$FreeBSD$"); int yylex(void); +struct varname +{ + struct varname *next; + char name[1]; +}; +static struct varname *varnames; + #undef YY_INPUT #define YY_INPUT(buf,result,max) \ result = (*buf = *arith_buf++) ? 1 : YY_NULL; @@ -80,11 +87,14 @@ int yylex(void); * If variable doesn't exist, we should initialize * it to zero. */ - char *temp; + struct varname *temp; if (lookupvar(yytext) == NULL) setvarsafe(yytext, "0", 0); - temp = (char *)ckmalloc(strlen(yytext) + 1); - yylval.s_value = strcpy(temp, yytext); + temp = ckmalloc(sizeof(struct varname) + + strlen(yytext)); + temp->next = varnames; + varnames = temp; + yylval.s_value = strcpy(temp->name, yytext); return ARITH_VAR; } @@ -130,5 +140,15 @@ int yylex(void); void arith_lex_reset(void) { + struct varname *name, *next; + YY_NEW_FILE; + + name = varnames; + while (name != NULL) { + next = name->next; + ckfree(name); + name = next; + } + varnames = NULL; } From owner-svn-src-all@FreeBSD.ORG Thu Nov 5 22:58:50 2009 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 B8249106566B; Thu, 5 Nov 2009 22:58: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 A5EFB8FC19; Thu, 5 Nov 2009 22:58: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 nA5MwoAc093650; Thu, 5 Nov 2009 22:58:50 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA5Mwo0S093646; Thu, 5 Nov 2009 22:58:50 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <200911052258.nA5Mwo0S093646@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 5 Nov 2009 22:58: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: r198964 - in head/sys: dev/fb dev/pci 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, 05 Nov 2009 22:58:50 -0000 Author: jkim Date: Thu Nov 5 22:58:50 2009 New Revision: 198964 URL: http://svn.freebsd.org/changeset/base/198964 Log: Save/restore VGA state from vga_pci.c instead of relying on vga_isa.c. It was not working because we were saving its state after the device was powered down. Simplify vesa_load_state() as the culprit is fixed now. Modified: head/sys/dev/fb/vesa.c head/sys/dev/pci/vga_pci.c head/sys/isa/vga_isa.c Modified: head/sys/dev/fb/vesa.c ============================================================================== --- head/sys/dev/fb/vesa.c Thu Nov 5 20:44:39 2009 (r198963) +++ head/sys/dev/fb/vesa.c Thu Nov 5 22:58:50 2009 (r198964) @@ -164,7 +164,6 @@ static char *vesa_revstr = NULL; static int int10_set_mode(int mode); static int vesa_bios_post(void); static int vesa_bios_get_mode(int mode, struct vesa_mode *vmode); -static int vesa_bios_get_current_mode(void); static int vesa_bios_set_mode(int mode); static int vesa_bios_get_dac(void); static int vesa_bios_set_dac(int bits); @@ -319,22 +318,6 @@ vesa_bios_get_mode(int mode, struct vesa } static int -vesa_bios_get_current_mode(void) -{ - x86regs_t regs; - - x86bios_init_regs(®s); - regs.R_AX = 0x4f03; - - x86bios_intr(®s, 0x10); - - if (regs.R_AX != 0x004f) - return (-1); - - return (regs.R_BX); -} - -static int vesa_bios_set_mode(int mode) { x86regs_t regs; @@ -1438,7 +1421,6 @@ vesa_save_state(video_adapter_t *adp, vo static int vesa_load_state(video_adapter_t *adp, void *p) { - int flags, mode, ret; if ((adp != vesa_adp) || (((adp_state_t *)p)->sig != V_STATE_SIG)) return ((*prevvidsw->load_state)(adp, p)); @@ -1446,38 +1428,12 @@ vesa_load_state(video_adapter_t *adp, vo if (vesa_state_buf_size <= 0) return (1); - /* - * If the current mode is not the same, probably it was powered down. - * Try BIOS POST to restore a sane state. - */ - if (VESA_MODE(adp->va_mode)) { - mode = vesa_bios_get_current_mode(); - if (mode >= 0 && (mode & 0x1ff) != adp->va_mode) - (void)vesa_bios_post(); - } - - ret = vesa_bios_save_restore(STATE_LOAD, ((adp_state_t *)p)->regs, - vesa_state_buf_size); + /* Try BIOS POST to restore a sane state. */ + (void)vesa_bios_post(); + (void)int10_set_mode(adp->va_initial_bios_mode); - /* - * If the desired mode is not restored, force setting the mode. - */ - if (VESA_MODE(adp->va_mode)) { - mode = vesa_bios_get_current_mode(); - if (mode < 0 || (mode & 0x1ff) == adp->va_mode) - return (ret); - mode = adp->va_mode; - flags = adp->va_info.vi_flags; - if ((flags & V_INFO_GRAPHICS) != 0 && - (flags & V_INFO_LINEAR) != 0) - mode |= 0x4000; - (void)vesa_bios_set_mode(mode); - if ((vesa_adp_info->v_flags & V_DAC8) != 0) - (void)vesa_bios_set_dac(8); - (void)(*vidsw[adp->va_index]->set_hw_cursor)(adp, -1, -1); - } - - return (ret); + return (vesa_bios_save_restore(STATE_LOAD, ((adp_state_t *)p)->regs, + vesa_state_buf_size)); } #if 0 Modified: head/sys/dev/pci/vga_pci.c ============================================================================== --- head/sys/dev/pci/vga_pci.c Thu Nov 5 20:44:39 2009 (r198963) +++ head/sys/dev/pci/vga_pci.c Thu Nov 5 22:58:50 2009 (r198964) @@ -40,12 +40,17 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include +#include #include #include #include #include +#include +#include + #include #include @@ -63,7 +68,7 @@ SYSCTL_DECL(_hw_pci); int vga_pci_default_unit = -1; TUNABLE_INT("hw.pci.default_vgapci_unit", &vga_pci_default_unit); -SYSCTL_INT(_hw_pci, OID_AUTO, default_vgapci_unit, CTLFLAG_RD, +SYSCTL_INT(_hw_pci, OID_AUTO, default_vgapci_unit, CTLFLAG_RDTUN, &vga_pci_default_unit, -1, "Default VGA-compatible display"); static int @@ -112,13 +117,86 @@ vga_pci_attach(device_t dev) static int vga_pci_suspend(device_t dev) { + vga_softc_t *sc; + devclass_t dc; + int err, nbytes; + + err = bus_generic_suspend(dev); + if (err) + return (err); + + sc = NULL; + if (device_get_unit(dev) == vga_pci_default_unit) { + dc = devclass_find(VGA_DRIVER_NAME); + if (dc != NULL) + sc = devclass_get_softc(dc, 0); + } + if (sc == NULL) + return (0); + + /* Save the video state across the suspend. */ + if (sc->state_buf != NULL) + goto save_palette; + nbytes = vidd_save_state(sc->adp, NULL, 0); + if (nbytes <= 0) + goto save_palette; + sc->state_buf = malloc(nbytes, M_TEMP, M_NOWAIT); + if (sc->state_buf == NULL) + goto save_palette; + if (bootverbose) + device_printf(dev, "saving %d bytes of video state\n", nbytes); + if (vidd_save_state(sc->adp, sc->state_buf, nbytes) != 0) { + device_printf(dev, "failed to save state (nbytes=%d)\n", + nbytes); + free(sc->state_buf, M_TEMP); + sc->state_buf = NULL; + } + +save_palette: + /* Save the color palette across the suspend. */ + if (sc->pal_buf != NULL) + return (0); + sc->pal_buf = malloc(256 * 3, M_TEMP, M_NOWAIT); + if (sc->pal_buf != NULL) { + if (bootverbose) + device_printf(dev, "saving color palette\n"); + if (vidd_save_palette(sc->adp, sc->pal_buf) != 0) { + device_printf(dev, "failed to save palette\n"); + free(sc->pal_buf, M_TEMP); + sc->pal_buf = NULL; + } + } - return (bus_generic_suspend(dev)); + return (0); } static int vga_pci_resume(device_t dev) { + vga_softc_t *sc; + devclass_t dc; + + sc = NULL; + if (device_get_unit(dev) == vga_pci_default_unit) { + dc = devclass_find(VGA_DRIVER_NAME); + if (dc != NULL) + sc = devclass_get_softc(dc, 0); + } + if (sc == NULL) + return (bus_generic_resume(dev)); + + if (sc->state_buf != NULL) { + if (vidd_load_state(sc->adp, sc->state_buf) != 0) + device_printf(dev, "failed to reload state\n"); + free(sc->state_buf, M_TEMP); + sc->state_buf = NULL; + } + if (sc->pal_buf != NULL) { + if (vidd_load_palette(sc->adp, sc->pal_buf) != 0) + device_printf(dev, "failed to reload palette\n"); + free(sc->pal_buf, M_TEMP); + sc->pal_buf = NULL; + } return (bus_generic_resume(dev)); } Modified: head/sys/isa/vga_isa.c ============================================================================== --- head/sys/isa/vga_isa.c Thu Nov 5 20:44:39 2009 (r198963) +++ head/sys/isa/vga_isa.c Thu Nov 5 22:58:50 2009 (r198964) @@ -166,35 +166,34 @@ isavga_suspend(device_t dev) vga_softc_t *sc; int err, nbytes; - sc = device_get_softc(dev); err = bus_generic_suspend(dev); if (err) return (err); + sc = device_get_softc(dev); + /* Save the video state across the suspend. */ - if (sc->state_buf != NULL) { - free(sc->state_buf, M_TEMP); - sc->state_buf = NULL; - } + if (sc->state_buf != NULL) + goto save_palette; nbytes = vidd_save_state(sc->adp, NULL, 0); if (nbytes <= 0) - return (0); + goto save_palette; sc->state_buf = malloc(nbytes, M_TEMP, M_NOWAIT); - if (sc->state_buf != NULL) { - if (bootverbose) - device_printf(dev, "saving %d bytes of video state\n", - nbytes); - if (vidd_save_state(sc->adp, sc->state_buf, nbytes) != 0) { - device_printf(dev, "failed to save state (nbytes=%d)\n", - nbytes); - free(sc->state_buf, M_TEMP); - sc->state_buf = NULL; - } + if (sc->state_buf == NULL) + goto save_palette; + if (bootverbose) + device_printf(dev, "saving %d bytes of video state\n", nbytes); + if (vidd_save_state(sc->adp, sc->state_buf, nbytes) != 0) { + device_printf(dev, "failed to save state (nbytes=%d)\n", + nbytes); + free(sc->state_buf, M_TEMP); + sc->state_buf = NULL; } +save_palette: /* Save the color palette across the suspend. */ if (sc->pal_buf != NULL) - free(sc->pal_buf, M_TEMP); + return (0); sc->pal_buf = malloc(256 * 3, M_TEMP, M_NOWAIT); if (sc->pal_buf != NULL) { if (bootverbose) @@ -215,6 +214,7 @@ isavga_resume(device_t dev) vga_softc_t *sc; sc = device_get_softc(dev); + if (sc->state_buf != NULL) { if (vidd_load_state(sc->adp, sc->state_buf) != 0) device_printf(dev, "failed to reload state\n"); @@ -228,8 +228,7 @@ isavga_resume(device_t dev) sc->pal_buf = NULL; } - bus_generic_resume(dev); - return 0; + return (bus_generic_resume(dev)); } #ifdef FB_INSTALL_CDEV From owner-svn-src-all@FreeBSD.ORG Fri Nov 6 01:12:01 2009 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 005BD1065679; Fri, 6 Nov 2009 01:12:00 +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 E428E8FC1E; Fri, 6 Nov 2009 01:12: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 nA61C0h2097046; Fri, 6 Nov 2009 01:12:00 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA61C067097045; Fri, 6 Nov 2009 01:12:00 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200911060112.nA61C067097045@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 6 Nov 2009 01:12: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: r198967 - 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: Fri, 06 Nov 2009 01:12:01 -0000 Author: yongari Date: Fri Nov 6 01:11:59 2009 New Revision: 198967 URL: http://svn.freebsd.org/changeset/base/198967 Log: Correct MSI mode register bits. Modified: head/sys/dev/bge/if_bgereg.h Modified: head/sys/dev/bge/if_bgereg.h ============================================================================== --- head/sys/dev/bge/if_bgereg.h Fri Nov 6 00:03:48 2009 (r198966) +++ head/sys/dev/bge/if_bgereg.h Fri Nov 6 01:11:59 2009 (r198967) @@ -1705,11 +1705,8 @@ /* MSI mode register */ #define BGE_MSIMODE_RESET 0x00000001 #define BGE_MSIMODE_ENABLE 0x00000002 -#define BGE_MSIMODE_PCI_TGT_ABRT_ATTN 0x00000004 -#define BGE_MSIMODE_PCI_MSTR_ABRT_ATTN 0x00000008 -#define BGE_MSIMODE_PCI_PERR_ATTN 0x00000010 -#define BGE_MSIMODE_MSI_FIFOUFLOW_ATTN 0x00000020 -#define BGE_MSIMODE_MSI_FIFOOFLOW_ATTN 0x00000040 +#define BGE_MSIMODE_ONE_SHOT_DISABLE 0x00000020 +#define BGE_MSIMODE_MULTIVEC_ENABLE 0x00000080 /* MSI status register */ #define BGE_MSISTAT_PCI_TGT_ABRT_ATTN 0x00000004 From owner-svn-src-all@FreeBSD.ORG Fri Nov 6 06:09:06 2009 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 6F053106566C; Fri, 6 Nov 2009 06:09:06 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5E0808FC08; Fri, 6 Nov 2009 06:09: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 nA66952K004667; Fri, 6 Nov 2009 06:09:05 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA6695t4004666; Fri, 6 Nov 2009 06:09:05 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <200911060609.nA6695t4004666@svn.freebsd.org> From: Marcel Moolenaar Date: Fri, 6 Nov 2009 06:09: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: r198968 - head/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: Fri, 06 Nov 2009 06:09:06 -0000 Author: marcel Date: Fri Nov 6 06:09:04 2009 New Revision: 198968 URL: http://svn.freebsd.org/changeset/base/198968 Log: Unbreak E500 builds. The inline assembly for the 970 CPUs is invalid when compiling for BookE. Modified: head/sys/powerpc/powerpc/cpu.c Modified: head/sys/powerpc/powerpc/cpu.c ============================================================================== --- head/sys/powerpc/powerpc/cpu.c Fri Nov 6 01:11:59 2009 (r198967) +++ head/sys/powerpc/powerpc/cpu.c Fri Nov 6 06:09:04 2009 (r198968) @@ -118,7 +118,9 @@ static void cpu_print_speed(void); static void cpu_6xx_setup(int cpuid, uint16_t vers); static void cpu_6xx_print_cacheinfo(u_int, uint16_t); static void cpu_e500_setup(int cpuid, uint16_t vers); +#ifndef E500 static void cpu_970_setup(int cpuid, uint16_t vers); +#endif void cpu_setup(u_int cpuid) @@ -195,12 +197,14 @@ cpu_setup(u_int cpuid) cpu_6xx_setup(cpuid, vers); break; +#ifndef E500 case IBM970: case IBM970FX: case IBM970GX: case IBM970MP: cpu_970_setup(cpuid, vers); break; +#endif case FSL_E500v1: case FSL_E500v2: @@ -429,6 +433,7 @@ cpu_e500_setup(int cpuid, uint16_t vers) printf("cpu%d: HID0 %b", cpuid, (int)hid0, HID0_E500_BITMASK); } +#ifndef E500 static void cpu_970_setup(int cpuid, uint16_t vers) { @@ -458,4 +463,4 @@ cpu_970_setup(int cpuid, uint16_t vers) : "=r" (hid0_hi) : "K" (SPR_HID0)); printf("cpu%d: HID0 %b", cpuid, (int)(hid0_hi), HID0_970_BITMASK); } - +#endif From owner-svn-src-all@FreeBSD.ORG Fri Nov 6 06:50:46 2009 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 823BA106566C; Fri, 6 Nov 2009 06:50:46 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6EF148FC16; Fri, 6 Nov 2009 06:50: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 nA66okoe005782; Fri, 6 Nov 2009 06:50:46 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA66okSP005779; Fri, 6 Nov 2009 06:50:46 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <200911060650.nA66okSP005779@svn.freebsd.org> From: Christian Brueffer Date: Fri, 6 Nov 2009 06:50: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: r198969 - stable/8/sys/dev/aic7xxx 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, 06 Nov 2009 06:50:46 -0000 Author: brueffer Date: Fri Nov 6 06:50:45 2009 New Revision: 198969 URL: http://svn.freebsd.org/changeset/base/198969 Log: MFC: r198684 Add support for Adaptec 39320LPE adapters. Modified: stable/8/sys/dev/aic7xxx/aic79xx_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/aic7xxx/aic79xx_pci.c ============================================================================== --- stable/8/sys/dev/aic7xxx/aic79xx_pci.c Fri Nov 6 06:09:04 2009 (r198968) +++ stable/8/sys/dev/aic7xxx/aic79xx_pci.c Fri Nov 6 06:50:45 2009 (r198969) @@ -89,6 +89,7 @@ ahd_compose_id(u_int device, u_int vendo #define ID_AHA_39320D_B 0x801C900500419005ull #define ID_AHA_39320D_HP 0x8011900500AC0E11ull #define ID_AHA_39320D_B_HP 0x801C900500AC0E11ull +#define ID_AHA_39320LPE 0x8017900500459005ull #define ID_AIC7902_PCI_REV_A4 0x3 #define ID_AIC7902_PCI_REV_B0 0x10 #define SUBID_HP 0x0E11 @@ -204,6 +205,12 @@ struct ahd_pci_identity ahd_pci_ident_ta "Adaptec (HP OEM) 39320D Ultra320 SCSI adapter", ahd_aic7902_setup }, + { + ID_AHA_39320LPE, + ID_ALL_MASK, + "Adaptec 39320LPE Ultra320 SCSI adapter", + ahd_aic7902_setup + }, /* Generic chip probes for devices we don't know 'exactly' */ { ID_AIC7901 & ID_9005_GENERIC_MASK, From owner-svn-src-all@FreeBSD.ORG Fri Nov 6 06:57:04 2009 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 17C35106566C; Fri, 6 Nov 2009 06:57:04 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 062438FC16; Fri, 6 Nov 2009 06:57: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 nA66v3mQ006001; Fri, 6 Nov 2009 06:57:03 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA66v3D2005999; Fri, 6 Nov 2009 06:57:03 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <200911060657.nA66v3D2005999@svn.freebsd.org> From: Christian Brueffer Date: Fri, 6 Nov 2009 06:57:03 +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: r198971 - stable/7/sys/dev/aic7xxx 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, 06 Nov 2009 06:57:04 -0000 Author: brueffer Date: Fri Nov 6 06:57:03 2009 New Revision: 198971 URL: http://svn.freebsd.org/changeset/base/198971 Log: MFC: r198684 Add support for Adaptec 39320LPE adapters. Modified: stable/7/sys/dev/aic7xxx/aic79xx_pci.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/aic7xxx/aic79xx_pci.c ============================================================================== --- stable/7/sys/dev/aic7xxx/aic79xx_pci.c Fri Nov 6 06:50:45 2009 (r198970) +++ stable/7/sys/dev/aic7xxx/aic79xx_pci.c Fri Nov 6 06:57:03 2009 (r198971) @@ -89,6 +89,7 @@ ahd_compose_id(u_int device, u_int vendo #define ID_AHA_39320D_B 0x801C900500419005ull #define ID_AHA_39320D_HP 0x8011900500AC0E11ull #define ID_AHA_39320D_B_HP 0x801C900500AC0E11ull +#define ID_AHA_39320LPE 0x8017900500459005ull #define ID_AIC7902_PCI_REV_A4 0x3 #define ID_AIC7902_PCI_REV_B0 0x10 #define SUBID_HP 0x0E11 @@ -204,6 +205,12 @@ struct ahd_pci_identity ahd_pci_ident_ta "Adaptec (HP OEM) 39320D Ultra320 SCSI adapter", ahd_aic7902_setup }, + { + ID_AHA_39320LPE, + ID_ALL_MASK, + "Adaptec 39320LPE Ultra320 SCSI adapter", + ahd_aic7902_setup + }, /* Generic chip probes for devices we don't know 'exactly' */ { ID_AIC7901 & ID_9005_GENERIC_MASK, From owner-svn-src-all@FreeBSD.ORG Fri Nov 6 07:02:16 2009 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 9E30A106568F; Fri, 6 Nov 2009 07:02:16 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8C5008FC17; Fri, 6 Nov 2009 07:02: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 nA672G7Z006192; Fri, 6 Nov 2009 07:02:16 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA672GFe006190; Fri, 6 Nov 2009 07:02:16 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <200911060702.nA672GFe006190@svn.freebsd.org> From: Christian Brueffer Date: Fri, 6 Nov 2009 07:02:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198972 - stable/6/sys/dev/aic7xxx 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, 06 Nov 2009 07:02:16 -0000 Author: brueffer Date: Fri Nov 6 07:02:16 2009 New Revision: 198972 URL: http://svn.freebsd.org/changeset/base/198972 Log: MFC: r198684 Add support for Adaptec 39320LPE adapters. Modified: stable/6/sys/dev/aic7xxx/aic79xx_pci.c Directory Properties: stable/6/sys/ (props changed) stable/6/sys/conf/ (props changed) stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/sys/dev/aic7xxx/aic79xx_pci.c ============================================================================== --- stable/6/sys/dev/aic7xxx/aic79xx_pci.c Fri Nov 6 06:57:03 2009 (r198971) +++ stable/6/sys/dev/aic7xxx/aic79xx_pci.c Fri Nov 6 07:02:16 2009 (r198972) @@ -89,6 +89,7 @@ ahd_compose_id(u_int device, u_int vendo #define ID_AHA_39320D_B 0x801C900500419005ull #define ID_AHA_39320D_HP 0x8011900500AC0E11ull #define ID_AHA_39320D_B_HP 0x801C900500AC0E11ull +#define ID_AHA_39320LPE 0x8017900500459005ull #define ID_AIC7902_PCI_REV_A4 0x3 #define ID_AIC7902_PCI_REV_B0 0x10 #define SUBID_HP 0x0E11 @@ -204,6 +205,12 @@ struct ahd_pci_identity ahd_pci_ident_ta "Adaptec (HP OEM) 39320D Ultra320 SCSI adapter", ahd_aic7902_setup }, + { + ID_AHA_39320LPE, + ID_ALL_MASK, + "Adaptec 39320LPE Ultra320 SCSI adapter", + ahd_aic7902_setup + }, /* Generic chip probes for devices we don't know 'exactly' */ { ID_AIC7901 & ID_9005_GENERIC_MASK, From owner-svn-src-all@FreeBSD.ORG Fri Nov 6 07:17:32 2009 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 280BE1065672; Fri, 6 Nov 2009 07:17:32 +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 173508FC0C; Fri, 6 Nov 2009 07:17: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 nA67HVga006553; Fri, 6 Nov 2009 07:17:31 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA67HVou006550; Fri, 6 Nov 2009 07:17:31 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200911060717.nA67HVou006550@svn.freebsd.org> From: Ed Schouten Date: Fri, 6 Nov 2009 07:17: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: r198973 - in head: lib/libc/sys 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: Fri, 06 Nov 2009 07:17:32 -0000 Author: ed Date: Fri Nov 6 07:17:31 2009 New Revision: 198973 URL: http://svn.freebsd.org/changeset/base/198973 Log: Add MAP_ANONYMOUS. Many operating systems also provide MAP_ANONYMOUS. It's not hard to support this ourselves, we'd better add it to make it more likely for applications to work out of the box. Reviewed by: alc (mman.h) Modified: head/lib/libc/sys/mmap.2 head/sys/sys/mman.h Modified: head/lib/libc/sys/mmap.2 ============================================================================== --- head/lib/libc/sys/mmap.2 Fri Nov 6 07:02:16 2009 (r198972) +++ head/lib/libc/sys/mmap.2 Fri Nov 6 07:17:31 2009 (r198973) @@ -28,7 +28,7 @@ .\" @(#)mmap.2 8.4 (Berkeley) 5/11/95 .\" $FreeBSD$ .\" -.Dd July 26, 2009 +.Dd November 6, 2009 .Dt MMAP 2 .Os .Sh NAME @@ -108,6 +108,10 @@ The argument is ignored. .\".It Dv MAP_FILE .\"Mapped from a regular file or character-special device memory. +.It Dv MAP_ANONYMOUS +This flag is identical to +.Dv MAP_ANON +and is provided for compatibility. .It Dv MAP_FIXED Do not permit the system to select a different address than the one specified. Modified: head/sys/sys/mman.h ============================================================================== --- head/sys/sys/mman.h Fri Nov 6 07:02:16 2009 (r198972) +++ head/sys/sys/mman.h Fri Nov 6 07:17:31 2009 (r198973) @@ -82,6 +82,9 @@ */ #define MAP_FILE 0x0000 /* map from file (default) */ #define MAP_ANON 0x1000 /* allocated from memory, swap space */ +#ifndef _KERNEL +#define MAP_ANONYMOUS MAP_ANON /* For compatibility. */ +#endif /* !_KERNEL */ /* * Extended flags From owner-svn-src-all@FreeBSD.ORG Fri Nov 6 08:08:48 2009 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 7F6C5106566B; Fri, 6 Nov 2009 08:08:48 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6DB228FC21; Fri, 6 Nov 2009 08:08: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 nA688mSP007840; Fri, 6 Nov 2009 08:08:48 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA688mq5007838; Fri, 6 Nov 2009 08:08:48 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <200911060808.nA688mq5007838@svn.freebsd.org> From: Christian Brueffer Date: Fri, 6 Nov 2009 08:08:48 +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: r198974 - stable/8/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: Fri, 06 Nov 2009 08:08:48 -0000 Author: brueffer Date: Fri Nov 6 08:08:47 2009 New Revision: 198974 URL: http://svn.freebsd.org/changeset/base/198974 Log: MFC: r198543 Fix date (1) and SEE ALSO section. Modified: stable/8/share/man/man5/regdomain.5 Directory Properties: stable/8/share/man/man5/ (props changed) Modified: stable/8/share/man/man5/regdomain.5 ============================================================================== --- stable/8/share/man/man5/regdomain.5 Fri Nov 6 07:17:31 2009 (r198973) +++ stable/8/share/man/man5/regdomain.5 Fri Nov 6 08:08:47 2009 (r198974) @@ -23,7 +23,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd Apri 13, 2008 +.Dd April 13, 2008 .Dt REGDOMAIN 5 .Os .Sh NAME @@ -44,5 +44,5 @@ This file should be changed only to refl XML database of 802.11 regulatory constraints .El .Sh SEE ALSO -.Xr wlan 4 -.Xr ifconfig 8 , +.Xr wlan 4 , +.Xr ifconfig 8 From owner-svn-src-all@FreeBSD.ORG Fri Nov 6 09:39:35 2009 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 93123106568F; Fri, 6 Nov 2009 09:39:35 +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 816BB8FC1C; Fri, 6 Nov 2009 09:39: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 nA69dZxr010233; Fri, 6 Nov 2009 09:39:35 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA69dZeV010231; Fri, 6 Nov 2009 09:39:35 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <200911060939.nA69dZeV010231@svn.freebsd.org> From: Edward Tomasz Napierala Date: Fri, 6 Nov 2009 09:39:35 +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: r198975 - 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, 06 Nov 2009 09:39:35 -0000 Author: trasz Date: Fri Nov 6 09:39:35 2009 New Revision: 198975 URL: http://svn.freebsd.org/changeset/base/198975 Log: MFC r197789: Fix ACL support on sparc64. Turns out that fuword(9) fetches 64 bits instead of sizeof(int), and on sparc64 that resulted in fetching wrong value for acl_maxcnt, which in turn caused __acl_get_link(2) to fail with EINVAL. PR: sparc64/139304 Submitted by: Dmitry Afanasiev Modified: stable/8/sys/kern/vfs_acl.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_acl.c ============================================================================== --- stable/8/sys/kern/vfs_acl.c Fri Nov 6 08:08:47 2009 (r198974) +++ stable/8/sys/kern/vfs_acl.c Fri Nov 6 09:39:35 2009 (r198975) @@ -161,7 +161,7 @@ acl_copyout(struct acl *kernel_acl, void break; default: - if (fuword((char *)user_acl + + if (fuword32((char *)user_acl + offsetof(struct acl, acl_maxcnt)) != ACL_MAX_ENTRIES) return (EINVAL); From owner-svn-src-all@FreeBSD.ORG Fri Nov 6 10:07:39 2009 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 34081106566B; Fri, 6 Nov 2009 10:07:39 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ACBEA8FC13; Fri, 6 Nov 2009 10:07: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 nA6A7cSh012627; Fri, 6 Nov 2009 10:07:38 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA6A7cLg012625; Fri, 6 Nov 2009 10:07:38 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <200911061007.nA6A7cLg012625@svn.freebsd.org> From: Hajimu UMEMOTO Date: Fri, 6 Nov 2009 10:07: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: r198976 - head/sys/netinet6 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, 06 Nov 2009 10:07:39 -0000 Author: ume Date: Fri Nov 6 10:07:38 2009 New Revision: 198976 URL: http://svn.freebsd.org/changeset/base/198976 Log: Don't call LLE_FREE() after nd6_free(). MFC after: 3 days Modified: head/sys/netinet6/nd6.c Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Fri Nov 6 09:39:35 2009 (r198975) +++ head/sys/netinet6/nd6.c Fri Nov 6 10:07:38 2009 (r198976) @@ -513,6 +513,7 @@ nd6_llinfo_timer(void *arg) if (ln->la_flags & LLE_DELETED) { (void)nd6_free(ln, 0); + ln = NULL; goto done; } From owner-svn-src-all@FreeBSD.ORG Fri Nov 6 10:15:16 2009 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 189BE106566B; Fri, 6 Nov 2009 10:15:16 +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 D81188FC15; Fri, 6 Nov 2009 10:15: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 nA6AFFYh012875; Fri, 6 Nov 2009 10:15:15 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA6AFFMK012872; Fri, 6 Nov 2009 10:15:15 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <200911061015.nA6AFFMK012872@svn.freebsd.org> From: Attilio Rao Date: Fri, 6 Nov 2009 10:15:15 +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: r198977 - in stable/8/sys: amd64/amd64 i386/i386 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, 06 Nov 2009 10:15:16 -0000 Author: attilio Date: Fri Nov 6 10:15:15 2009 New Revision: 198977 URL: http://svn.freebsd.org/changeset/base/198977 Log: MFC r198868, r198950: Opteron rev E family of processor expose a bug where acq memory barriers can be broken, resulting in random breakages. Printout a warning message if affecred family and model are found. Modified: stable/8/sys/amd64/amd64/identcpu.c stable/8/sys/i386/i386/identcpu.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/amd64/amd64/identcpu.c ============================================================================== --- stable/8/sys/amd64/amd64/identcpu.c Fri Nov 6 10:07:38 2009 (r198976) +++ stable/8/sys/amd64/amd64/identcpu.c Fri Nov 6 10:15:15 2009 (r198977) @@ -607,6 +607,21 @@ print_AMD_info(void) printf(", %d lines/tag", (regs[2] >> 8) & 0x0f); print_AMD_l2_assoc((regs[2] >> 12) & 0x0f); } + + /* + * Opteron Rev E shows a bug as in very rare occasions a read memory + * barrier is not performed as expected if it is followed by a + * non-atomic read-modify-write instruction. + * As long as that bug pops up very rarely (intensive machine usage + * on other operating systems generally generates one unexplainable + * crash any 2 months) and as long as a model specific fix would be + * impratical at this stage, print out a warning string if the broken + * model and family are identified. + */ + if (CPUID_TO_FAMILY(cpu_id) == 0xf && CPUID_TO_MODEL(cpu_id) >= 0x20 && + CPUID_TO_MODEL(cpu_id) <= 0x3f) + printf("WARNING: This architecture revision has known SMP " + "hardware bugs which may cause random instability\n"); } static void Modified: stable/8/sys/i386/i386/identcpu.c ============================================================================== --- stable/8/sys/i386/i386/identcpu.c Fri Nov 6 10:07:38 2009 (r198976) +++ stable/8/sys/i386/i386/identcpu.c Fri Nov 6 10:15:15 2009 (r198977) @@ -1303,6 +1303,21 @@ print_AMD_info(void) (amd_whcr & 0x0100) ? "Enable" : "Disable"); } } + + /* + * Opteron Rev E shows a bug as in very rare occasions a read memory + * barrier is not performed as expected if it is followed by a + * non-atomic read-modify-write instruction. + * As long as that bug pops up very rarely (intensive machine usage + * on other operating systems generally generates one unexplainable + * crash any 2 months) and as long as a model specific fix would be + * impratical at this stage, print out a warning string if the broken + * model and family are identified. + */ + if (CPUID_TO_FAMILY(cpu_id) == 0xf && CPUID_TO_MODEL(cpu_id) >= 0x20 && + CPUID_TO_MODEL(cpu_id) <= 0x3f) + printf("WARNING: This architecture revision has known SMP " + "hardware bugs which may cause random instability\n"); } static void From owner-svn-src-all@FreeBSD.ORG Fri Nov 6 10:17:08 2009 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 A8EEC106566C; Fri, 6 Nov 2009 10:17:08 +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 8CF018FC1E; Fri, 6 Nov 2009 10:17: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 nA6AH85p012954; Fri, 6 Nov 2009 10:17:08 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA6AH8mJ012951; Fri, 6 Nov 2009 10:17:08 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <200911061017.nA6AH8mJ012951@svn.freebsd.org> From: Attilio Rao Date: Fri, 6 Nov 2009 10:17:08 +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: r198978 - in releng/8.0/sys: amd64/amd64 i386/i386 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, 06 Nov 2009 10:17:08 -0000 Author: attilio Date: Fri Nov 6 10:17:08 2009 New Revision: 198978 URL: http://svn.freebsd.org/changeset/base/198978 Log: MFC r198868, r198950: Opteron rev E family of processor expose a bug where acq memory barriers can be broken, resulting in random breakages. Printout a warning message if affected family and model are found. Approved by: re (kib) Modified: releng/8.0/sys/amd64/amd64/identcpu.c releng/8.0/sys/i386/i386/identcpu.c Directory Properties: releng/8.0/sys/ (props changed) releng/8.0/sys/amd64/include/xen/ (props changed) releng/8.0/sys/cddl/contrib/opensolaris/ (props changed) releng/8.0/sys/contrib/dev/acpica/ (props changed) releng/8.0/sys/contrib/pf/ (props changed) releng/8.0/sys/dev/xen/xenpci/ (props changed) Modified: releng/8.0/sys/amd64/amd64/identcpu.c ============================================================================== --- releng/8.0/sys/amd64/amd64/identcpu.c Fri Nov 6 10:15:15 2009 (r198977) +++ releng/8.0/sys/amd64/amd64/identcpu.c Fri Nov 6 10:17:08 2009 (r198978) @@ -607,6 +607,21 @@ print_AMD_info(void) printf(", %d lines/tag", (regs[2] >> 8) & 0x0f); print_AMD_l2_assoc((regs[2] >> 12) & 0x0f); } + + /* + * Opteron Rev E shows a bug as in very rare occasions a read memory + * barrier is not performed as expected if it is followed by a + * non-atomic read-modify-write instruction. + * As long as that bug pops up very rarely (intensive machine usage + * on other operating systems generally generates one unexplainable + * crash any 2 months) and as long as a model specific fix would be + * impratical at this stage, print out a warning string if the broken + * model and family are identified. + */ + if (CPUID_TO_FAMILY(cpu_id) == 0xf && CPUID_TO_MODEL(cpu_id) >= 0x20 && + CPUID_TO_MODEL(cpu_id) <= 0x3f) + printf("WARNING: This architecture revision has known SMP " + "hardware bugs which may cause random instability\n"); } static void Modified: releng/8.0/sys/i386/i386/identcpu.c ============================================================================== --- releng/8.0/sys/i386/i386/identcpu.c Fri Nov 6 10:15:15 2009 (r198977) +++ releng/8.0/sys/i386/i386/identcpu.c Fri Nov 6 10:17:08 2009 (r198978) @@ -1303,6 +1303,21 @@ print_AMD_info(void) (amd_whcr & 0x0100) ? "Enable" : "Disable"); } } + + /* + * Opteron Rev E shows a bug as in very rare occasions a read memory + * barrier is not performed as expected if it is followed by a + * non-atomic read-modify-write instruction. + * As long as that bug pops up very rarely (intensive machine usage + * on other operating systems generally generates one unexplainable + * crash any 2 months) and as long as a model specific fix would be + * impratical at this stage, print out a warning string if the broken + * model and family are identified. + */ + if (CPUID_TO_FAMILY(cpu_id) == 0xf && CPUID_TO_MODEL(cpu_id) >= 0x20 && + CPUID_TO_MODEL(cpu_id) <= 0x3f) + printf("WARNING: This architecture revision has known SMP " + "hardware bugs which may cause random instability\n"); } static void From owner-svn-src-all@FreeBSD.ORG Fri Nov 6 10:38:33 2009 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 C7F68106566B; Fri, 6 Nov 2009 10:38:33 +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 9C73D8FC13; Fri, 6 Nov 2009 10:38: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 nA6AcXYq013648; Fri, 6 Nov 2009 10:38:33 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA6AcXgU013645; Fri, 6 Nov 2009 10:38:33 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <200911061038.nA6AcXgU013645@svn.freebsd.org> From: Attilio Rao Date: Fri, 6 Nov 2009 10:38:33 +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: r198979 - in stable/7/sys: amd64/amd64 i386/i386 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, 06 Nov 2009 10:38:33 -0000 Author: attilio Date: Fri Nov 6 10:38:33 2009 New Revision: 198979 URL: http://svn.freebsd.org/changeset/base/198979 Log: MFC r198868, r198950: Opteron rev E family of processor expose a bug where acq memory barriers can be broken, resulting in random breakages. Printout a warning message if affected family and model are found. Modified: stable/7/sys/amd64/amd64/identcpu.c stable/7/sys/i386/i386/identcpu.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/amd64/amd64/identcpu.c ============================================================================== --- stable/7/sys/amd64/amd64/identcpu.c Fri Nov 6 10:17:08 2009 (r198978) +++ stable/7/sys/amd64/amd64/identcpu.c Fri Nov 6 10:38:33 2009 (r198979) @@ -627,6 +627,21 @@ print_AMD_info(void) printf(", %d lines/tag", (regs[2] >> 8) & 0x0f); print_AMD_l2_assoc((regs[2] >> 12) & 0x0f); } + + /* + * Opteron Rev E shows a bug as in very rare occasions a read memory + * barrier is not performed as expected if it is followed by a + * non-atomic read-modify-write instruction. + * As long as that bug pops up very rarely (intensive machine usage + * on other operating systems generally generates one unexplainable + * crash any 2 months) and as long as a model specific fix would be + * impratical at this stage, print out a warning string if the broken + * model and family are identified. + */ + if (AMD64_CPU_FAMILY(cpu_id) == 0xf && + AMD64_CPU_MODEL(cpu_id) >= 0x20 && AMD64_CPU_MODEL(cpu_id) <= 0x3f) + printf("WARNING: This architecture revision has known SMP " + "hardware bugs which may cause random instability\n"); } static void Modified: stable/7/sys/i386/i386/identcpu.c ============================================================================== --- stable/7/sys/i386/i386/identcpu.c Fri Nov 6 10:17:08 2009 (r198978) +++ stable/7/sys/i386/i386/identcpu.c Fri Nov 6 10:38:33 2009 (r198979) @@ -1320,6 +1320,21 @@ print_AMD_info(void) (amd_whcr & 0x0100) ? "Enable" : "Disable"); } } + + /* + * Opteron Rev E shows a bug as in very rare occasions a read memory + * barrier is not performed as expected if it is followed by a + * non-atomic read-modify-write instruction. + * As long as that bug pops up very rarely (intensive machine usage + * on other operating systems generally generates one unexplainable + * crash any 2 months) and as long as a model specific fix would be + * impratical at this stage, print out a warning string if the broken + * model and family are identified. + */ + if (I386_CPU_FAMILY(cpu_id) == 0xf && I386_CPU_MODEL(cpu_id) >= 0x20 && + I386_CPU_MODEL(cpu_id) <= 0x3f) + printf("WARNING: This architecture revision has known SMP " + "hardware bugs which may cause random instability\n"); } static void From owner-svn-src-all@FreeBSD.ORG Fri Nov 6 10:45:38 2009 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 CBD4B106566C; Fri, 6 Nov 2009 10:45:38 +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 B99948FC08; Fri, 6 Nov 2009 10:45: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 nA6AjbgQ013890; Fri, 6 Nov 2009 10:45:37 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA6Ajbvr013888; Fri, 6 Nov 2009 10:45:37 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200911061045.nA6Ajbvr013888@svn.freebsd.org> From: Alexander Motin Date: Fri, 6 Nov 2009 10:45:37 +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: r198980 - 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, 06 Nov 2009 10:45:38 -0000 Author: mav Date: Fri Nov 6 10:45:37 2009 New Revision: 198980 URL: http://svn.freebsd.org/changeset/base/198980 Log: MFC r197783: - Revert r191568 partially. Forcing AHCI mode by changing device subclass and progif is evil. It doesn't work reliably[1] and we should honor BIOS configuration by the user. - If the SATA controller is enbled but combined mode is disabled, mask off the emulated IDE channel on the legacy IDE controller. Pointed out by: mav[1] Modified: stable/8/sys/dev/ata/chipsets/ata-ati.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-ati.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-ati.c Fri Nov 6 10:38:33 2009 (r198979) +++ stable/8/sys/dev/ata/chipsets/ata-ati.c Fri Nov 6 10:45:37 2009 (r198980) @@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -55,9 +54,6 @@ __FBSDID("$FreeBSD$"); /* local prototypes */ static int ata_ati_chipinit(device_t dev); static void ata_ati_setmode(device_t dev, int mode); -static void ata_ati_ahci_enable(device_t dev); -static int ata_ati_ahci_chipinit(device_t dev); -static int ata_ati_ahci_resume(device_t dev); /* misc defines */ #define ATI_PATA 0x01 @@ -66,13 +62,6 @@ static int ata_ati_ahci_resume(device_t #define SII_MEMIO 1 #define SII_BUG 0x04 -/* Misc Control Register */ -#define ATI_PCI_MISC_CTRL 0x40 -#define ATI_PCI_MISCCTRL_ENABLE_WR 0x00000001 - -/* Watchdog Control/Status Register */ -#define ATI_PCI_WD_CTRL 0x44 -#define ATI_PCI_WDCTRL_ENABLE 0x0001 /* * ATI chipset support functions @@ -121,19 +110,7 @@ ata_ati_probe(device_t dev) ctlr->chipinit = ata_sii_chipinit; break; case ATI_AHCI: - /* - * Force AHCI mode if IDE mode is set from BIOS. - */ - if ((ctlr->chip->chipid == ATA_ATI_IXP600_S1 || - ctlr->chip->chipid == ATA_ATI_IXP700_S1) && - pci_get_subclass(dev) == PCIS_STORAGE_IDE) { - struct pci_devinfo *dinfo = device_get_ivars(dev); - pcicfgregs *cfg = &dinfo->cfg; - cfg->subclass = PCIS_STORAGE_SATA; - cfg->progif = PCIP_STORAGE_SATA_AHCI_1_0; - ata_ati_ahci_enable(dev); - } - ctlr->chipinit = ata_ati_ahci_chipinit; + ctlr->chipinit = ata_ahci_chipinit; break; } return (BUS_PROBE_DEFAULT); @@ -143,13 +120,41 @@ static int ata_ati_chipinit(device_t dev) { struct ata_pci_controller *ctlr = device_get_softc(dev); + device_t smbdev; + int satacfg; if (ata_setup_interrupt(dev, ata_generic_intr)) return ENXIO; - /* IXP600 only has 1 PATA channel */ - if (ctlr->chip->chipid == ATA_ATI_IXP600) + switch (ctlr->chip->chipid) { + case ATA_ATI_IXP600: + /* IXP600 only has 1 PATA channel */ ctlr->channels = 1; + break; + case ATA_ATI_IXP700: + /* + * When "combined mode" is enabled, an additional PATA channel is + * emulated with two SATA ports and appears on this device. + * This mode can only be detected via SMB controller. + */ + smbdev = pci_find_device(ATA_ATI_ID, 0x4385); + if (smbdev != NULL) { + satacfg = pci_read_config(smbdev, 0xad, 1); + if (bootverbose) + device_printf(dev, "SATA controller %s (%s%s channel)\n", + (satacfg & 0x01) == 0 ? "disabled" : "enabled", + (satacfg & 0x08) == 0 ? "" : "combined mode, ", + (satacfg & 0x10) == 0 ? "primary" : "secondary"); + + /* + * If SATA controller is enabled but combined mode is disabled, + * we have only one PATA channel. Ignore a non-existent channel. + */ + if ((satacfg & 0x09) == 0x01) + ctlr->ichannels &= ~(1 << ((satacfg & 0x10) >> 4)); + } + break; + } ctlr->setmode = ata_ati_setmode; return 0; @@ -219,43 +224,6 @@ ata_ati_setmode(device_t dev, int mode) } } -static void -ata_ati_ahci_enable(device_t dev) -{ - struct pci_devinfo *dinfo = device_get_ivars(dev); - pcicfgregs *cfg = &dinfo->cfg; - uint32_t ctrl; - - ctrl = pci_read_config(dev, ATI_PCI_MISC_CTRL, 4); - pci_write_config(dev, ATI_PCI_MISC_CTRL, - ctrl | ATI_PCI_MISCCTRL_ENABLE_WR, 4); - pci_write_config(dev, PCIR_SUBCLASS, cfg->subclass, 1); - pci_write_config(dev, PCIR_PROGIF, cfg->progif, 1); - pci_write_config(dev, ATI_PCI_WD_CTRL, - pci_read_config(dev, ATI_PCI_WD_CTRL, 2) | ATI_PCI_WDCTRL_ENABLE, 2); - pci_write_config(dev, ATI_PCI_MISC_CTRL, - ctrl & ~ATI_PCI_MISCCTRL_ENABLE_WR, 4); -} - -static int -ata_ati_ahci_chipinit(device_t dev) -{ - struct ata_pci_controller *ctlr = device_get_softc(dev); - int error; - - error = ata_ahci_chipinit(dev); - ctlr->resume = ata_ati_ahci_resume; - return (error); -} - -static int -ata_ati_ahci_resume(device_t dev) -{ - - ata_ati_ahci_enable(dev); - return (ata_ahci_ctlr_reset(dev)); -} - ATA_DECLARE_DRIVER(ata_ati); MODULE_DEPEND(ata_ati, ata_ahci, 1, 1, 1); MODULE_DEPEND(ata_ati, ata_sii, 1, 1, 1); From owner-svn-src-all@FreeBSD.ORG Fri Nov 6 10:48:45 2009 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 47C0F106566B; Fri, 6 Nov 2009 10:48:45 +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 361938FC12; Fri, 6 Nov 2009 10:48: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 nA6AmjVI014022; Fri, 6 Nov 2009 10:48:45 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA6AmjMo014017; Fri, 6 Nov 2009 10:48:45 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200911061048.nA6AmjMo014017@svn.freebsd.org> From: Alexander Motin Date: Fri, 6 Nov 2009 10:48:45 +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: r198981 - 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, 06 Nov 2009 10:48:45 -0000 Author: mav Date: Fri Nov 6 10:48:44 2009 New Revision: 198981 URL: http://svn.freebsd.org/changeset/base/198981 Log: MFC r198407: Do not differentiate 12/16 bytes ATAPI CCB formats when it is not needed. Modified: stable/8/sys/dev/ata/ata-queue.c stable/8/sys/dev/ata/atapi-cd.c stable/8/sys/dev/ata/atapi-fd.c stable/8/sys/dev/ata/atapi-tape.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/ata-queue.c ============================================================================== --- stable/8/sys/dev/ata/ata-queue.c Fri Nov 6 10:45:37 2009 (r198980) +++ stable/8/sys/dev/ata/ata-queue.c Fri Nov 6 10:48:44 2009 (r198981) @@ -150,15 +150,11 @@ ata_atapicmd(device_t dev, u_int8_t *ccb int count, int flags, int timeout) { struct ata_request *request = ata_alloc_request(); - struct ata_device *atadev = device_get_softc(dev); int error = ENOMEM; if (request) { request->dev = dev; - if ((atadev->param.config & ATA_PROTO_MASK) == ATA_PROTO_ATAPI_12) - bcopy(ccb, request->u.atapi.ccb, 12); - else - bcopy(ccb, request->u.atapi.ccb, 16); + bcopy(ccb, request->u.atapi.ccb, 16); request->data = data; request->bytecount = count; request->transfersize = min(request->bytecount, 65534); Modified: stable/8/sys/dev/ata/atapi-cd.c ============================================================================== --- stable/8/sys/dev/ata/atapi-cd.c Fri Nov 6 10:45:37 2009 (r198980) +++ stable/8/sys/dev/ata/atapi-cd.c Fri Nov 6 10:48:44 2009 (r198981) @@ -863,9 +863,7 @@ acd_strategy(struct bio *bp) } request->dev = dev; request->bio = bp; - bcopy(ccb, request->u.atapi.ccb, - (atadev->param.config & ATA_PROTO_MASK) == - ATA_PROTO_ATAPI_12 ? 16 : 12); + bcopy(ccb, request->u.atapi.ccb, 16); request->data = bp->bio_data; request->bytecount = count * blocksize; request->transfersize = min(request->bytecount, 65534); Modified: stable/8/sys/dev/ata/atapi-fd.c ============================================================================== --- stable/8/sys/dev/ata/atapi-fd.c Fri Nov 6 10:45:37 2009 (r198980) +++ stable/8/sys/dev/ata/atapi-fd.c Fri Nov 6 10:48:44 2009 (r198981) @@ -240,9 +240,7 @@ afd_strategy(struct bio *bp) } request->dev = dev; request->bio = bp; - bcopy(ccb, request->u.atapi.ccb, - (atadev->param.config & ATA_PROTO_MASK) == - ATA_PROTO_ATAPI_12 ? 16 : 12); + bcopy(ccb, request->u.atapi.ccb, 16); request->data = bp->bio_data; request->bytecount = count * fdp->sectorsize; request->transfersize = min(request->bytecount, 65534); Modified: stable/8/sys/dev/ata/atapi-tape.c ============================================================================== --- stable/8/sys/dev/ata/atapi-tape.c Fri Nov 6 10:45:37 2009 (r198980) +++ stable/8/sys/dev/ata/atapi-tape.c Fri Nov 6 10:48:44 2009 (r198981) @@ -373,7 +373,6 @@ static void ast_strategy(struct bio *bp) { device_t dev = bp->bio_dev->si_drv1; - struct ata_device *atadev = device_get_softc(dev); struct ast_softc *stp = device_get_ivars(dev); struct ata_request *request; u_int32_t blkcount; @@ -426,9 +425,7 @@ ast_strategy(struct bio *bp) } request->dev = dev; request->driver = bp; - bcopy(ccb, request->u.atapi.ccb, - (atadev->param.config & ATA_PROTO_MASK) == - ATA_PROTO_ATAPI_12 ? 16 : 12); + bcopy(ccb, request->u.atapi.ccb, 16); request->data = bp->bio_data; request->bytecount = blkcount * stp->blksize; request->transfersize = min(request->bytecount, 65534); From owner-svn-src-all@FreeBSD.ORG Fri Nov 6 10:56:44 2009 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 505E6106566C; Fri, 6 Nov 2009 10:56: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 3DC578FC14; Fri, 6 Nov 2009 10:56: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 nA6AuhLx014279; Fri, 6 Nov 2009 10:56:43 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA6Auh5d014275; Fri, 6 Nov 2009 10:56:43 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200911061056.nA6Auh5d014275@svn.freebsd.org> From: Alexander Motin Date: Fri, 6 Nov 2009 10:56: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: r198982 - in 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, 06 Nov 2009 10:56:44 -0000 Author: mav Date: Fri Nov 6 10:56:43 2009 New Revision: 198982 URL: http://svn.freebsd.org/changeset/base/198982 Log: MFC r198700: Add support for different request block format used by Gen-IIe Marvell SATA. This adds support for Marvell 6042/7042 chips and Adaptec 1430SA controller. MFC r198718: Allow newly added controllers to use full I/O sizes. Modified: stable/8/sys/dev/ata/ata-pci.h stable/8/sys/dev/ata/chipsets/ata-adaptec.c stable/8/sys/dev/ata/chipsets/ata-marvell.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/ata-pci.h ============================================================================== --- stable/8/sys/dev/ata/ata-pci.h Fri Nov 6 10:48:44 2009 (r198981) +++ stable/8/sys/dev/ata/ata-pci.h Fri Nov 6 10:56:43 2009 (r198982) @@ -97,6 +97,7 @@ struct ata_pci_controller { #define ATA_ADAPTEC_ID 0x9005 #define ATA_ADAPTEC_1420 0x02419005 +#define ATA_ADAPTEC_1430 0x02439005 #define ATA_ATI_ID 0x1002 #define ATA_ATI_IXP200 0x43491002 @@ -216,7 +217,9 @@ struct ata_pci_controller { #define ATA_M88SX5080 0x508011ab #define ATA_M88SX5081 0x508111ab #define ATA_M88SX6041 0x604111ab +#define ATA_M88SX6042 0x604211ab #define ATA_M88SX6081 0x608111ab +#define ATA_M88SX7042 0x704211ab #define ATA_M88SX6101 0x610111ab #define ATA_M88SX6121 0x612111ab #define ATA_M88SX6145 0x614511ab Modified: stable/8/sys/dev/ata/chipsets/ata-adaptec.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-adaptec.c Fri Nov 6 10:48:44 2009 (r198981) +++ stable/8/sys/dev/ata/chipsets/ata-adaptec.c Fri Nov 6 10:56:43 2009 (r198982) @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); /* misc defines */ #define MV_60XX 60 //must match ata_marvell.c's definition +#define MV_7042 72 //must match ata_marvell.c's definition /* @@ -64,6 +65,7 @@ ata_adaptec_probe(device_t dev) struct ata_pci_controller *ctlr = device_get_softc(dev); static struct ata_chip_id ids[] = {{ ATA_ADAPTEC_1420, 0, 4, MV_60XX, ATA_SA300, "1420SA" }, + { ATA_ADAPTEC_1430, 0, 4, MV_7042, ATA_SA300, "1430SA" }, { 0, 0, 0, 0, 0, 0}}; if (pci_get_vendor(dev) != ATA_ADAPTEC_ID) Modified: stable/8/sys/dev/ata/chipsets/ata-marvell.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-marvell.c Fri Nov 6 10:48:44 2009 (r198981) +++ stable/8/sys/dev/ata/chipsets/ata-marvell.c Fri Nov 6 10:56:43 2009 (r198982) @@ -67,6 +67,8 @@ static void ata_marvell_edma_dmainit(dev /* misc defines */ #define MV_50XX 50 #define MV_60XX 60 +#define MV_6042 62 +#define MV_7042 72 #define MV_61XX 61 @@ -102,7 +104,9 @@ ata_marvell_probe(device_t dev) { ATA_M88SX5080, 0, 8, MV_50XX, ATA_SA150, "88SX5080" }, { ATA_M88SX5081, 0, 8, MV_50XX, ATA_SA150, "88SX5081" }, { ATA_M88SX6041, 0, 4, MV_60XX, ATA_SA300, "88SX6041" }, + { ATA_M88SX6042, 0, 4, MV_6042, ATA_SA300, "88SX6042" }, { ATA_M88SX6081, 0, 8, MV_60XX, ATA_SA300, "88SX6081" }, + { ATA_M88SX7042, 0, 4, MV_7042, ATA_SA300, "88SX7042" }, { ATA_M88SX6101, 0, 1, MV_61XX, ATA_UDMA6, "88SX6101" }, { ATA_M88SX6121, 0, 1, MV_61XX, ATA_UDMA6, "88SX6121" }, { ATA_M88SX6145, 0, 2, MV_61XX, ATA_UDMA6, "88SX6145" }, @@ -119,6 +123,8 @@ ata_marvell_probe(device_t dev) switch (ctlr->chip->cfg2) { case MV_50XX: case MV_60XX: + case MV_6042: + case MV_7042: ctlr->chipinit = ata_marvell_edma_chipinit; break; case MV_61XX: @@ -251,6 +257,8 @@ ata_marvell_edma_ch_attach(device_t dev) ch->r_io[ATA_SCONTROL].offset = 0x00108 + ATA_MV_HOST_BASE(ch); break; case MV_60XX: + case MV_6042: + case MV_7042: ch->r_io[ATA_SSTATUS].res = ctlr->r_res1; ch->r_io[ATA_SSTATUS].offset = 0x02300 + ATA_MV_EDMA_BASE(ch); ch->r_io[ATA_SERROR].res = ctlr->r_res1; @@ -384,35 +392,61 @@ ata_marvell_edma_begin_transaction(struc request->dma->sg_bus & 0xffffffff); le32enc(bytep + 1 * sizeof(u_int32_t), (u_int64_t)request->dma->sg_bus >> 32); - le16enc(bytep + 4 * sizeof(u_int16_t), - (request->flags & ATA_R_READ ? 0x01 : 0x00) | (request->tag << 1)); - - i = 10; - bytep[i++] = (request->u.ata.count >> 8) & 0xff; - bytep[i++] = 0x10 | ATA_COUNT; - bytep[i++] = request->u.ata.count & 0xff; - bytep[i++] = 0x10 | ATA_COUNT; - - bytep[i++] = (request->u.ata.lba >> 24) & 0xff; - bytep[i++] = 0x10 | ATA_SECTOR; - bytep[i++] = request->u.ata.lba & 0xff; - bytep[i++] = 0x10 | ATA_SECTOR; - - bytep[i++] = (request->u.ata.lba >> 32) & 0xff; - bytep[i++] = 0x10 | ATA_CYL_LSB; - bytep[i++] = (request->u.ata.lba >> 8) & 0xff; - bytep[i++] = 0x10 | ATA_CYL_LSB; - - bytep[i++] = (request->u.ata.lba >> 40) & 0xff; - bytep[i++] = 0x10 | ATA_CYL_MSB; - bytep[i++] = (request->u.ata.lba >> 16) & 0xff; - bytep[i++] = 0x10 | ATA_CYL_MSB; - - bytep[i++] = ATA_D_LBA | ATA_D_IBM | ((request->u.ata.lba >> 24) & 0xf); - bytep[i++] = 0x10 | ATA_DRIVE; - - bytep[i++] = request->u.ata.command; - bytep[i++] = 0x90 | ATA_COMMAND; + if (ctlr->chip->cfg2 != MV_6042 && ctlr->chip->cfg2 != MV_7042) { + le16enc(bytep + 4 * sizeof(u_int16_t), + (request->flags & ATA_R_READ ? 0x01 : 0x00) | (request->tag << 1)); + + i = 10; + bytep[i++] = (request->u.ata.count >> 8) & 0xff; + bytep[i++] = 0x10 | ATA_COUNT; + bytep[i++] = request->u.ata.count & 0xff; + bytep[i++] = 0x10 | ATA_COUNT; + + bytep[i++] = (request->u.ata.lba >> 24) & 0xff; + bytep[i++] = 0x10 | ATA_SECTOR; + bytep[i++] = request->u.ata.lba & 0xff; + bytep[i++] = 0x10 | ATA_SECTOR; + + bytep[i++] = (request->u.ata.lba >> 32) & 0xff; + bytep[i++] = 0x10 | ATA_CYL_LSB; + bytep[i++] = (request->u.ata.lba >> 8) & 0xff; + bytep[i++] = 0x10 | ATA_CYL_LSB; + + bytep[i++] = (request->u.ata.lba >> 40) & 0xff; + bytep[i++] = 0x10 | ATA_CYL_MSB; + bytep[i++] = (request->u.ata.lba >> 16) & 0xff; + bytep[i++] = 0x10 | ATA_CYL_MSB; + + bytep[i++] = ATA_D_LBA | ATA_D_IBM | ((request->u.ata.lba >> 24) & 0xf); + bytep[i++] = 0x10 | ATA_DRIVE; + + bytep[i++] = request->u.ata.command; + bytep[i++] = 0x90 | ATA_COMMAND; + } else { + le32enc(bytep + 2 * sizeof(u_int32_t), + (request->flags & ATA_R_READ ? 0x01 : 0x00) | (request->tag << 1)); + + i = 16; + bytep[i++] = 0; + bytep[i++] = 0; + bytep[i++] = request->u.ata.command; + bytep[i++] = request->u.ata.feature & 0xff; + + bytep[i++] = request->u.ata.lba & 0xff; + bytep[i++] = (request->u.ata.lba >> 8) & 0xff; + bytep[i++] = (request->u.ata.lba >> 16) & 0xff; + bytep[i++] = ATA_D_LBA | ATA_D_IBM | ((request->u.ata.lba >> 24) & 0x0f); + + bytep[i++] = (request->u.ata.lba >> 24) & 0xff; + bytep[i++] = (request->u.ata.lba >> 32) & 0xff; + bytep[i++] = (request->u.ata.lba >> 40) & 0xff; + bytep[i++] = (request->u.ata.feature >> 8) & 0xff; + + bytep[i++] = request->u.ata.count & 0xff; + bytep[i++] = (request->u.ata.count >> 8) & 0xff; + bytep[i++] = 0; + bytep[i++] = 0; + } bus_dmamap_sync(ch->dma.work_tag, ch->dma.work_map, BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); @@ -557,7 +591,10 @@ ata_marvell_edma_dmainit(device_t dev) ch->dma.max_address = BUS_SPACE_MAXADDR; /* chip does not reliably do 64K DMA transfers */ - ch->dma.max_iosize = 64 * DEV_BSIZE; + if (ctlr->chip->cfg2 == MV_50XX || ctlr->chip->cfg2 == MV_60XX) + ch->dma.max_iosize = 64 * DEV_BSIZE; + else + ch->dma.max_iosize = (ATA_DMA_ENTRIES - 1) * PAGE_SIZE; } ATA_DECLARE_DRIVER(ata_marvell); From owner-svn-src-all@FreeBSD.ORG Fri Nov 6 11:17:34 2009 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 38D4B106568B; Fri, 6 Nov 2009 11:17:34 +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 27D1F8FC0C; Fri, 6 Nov 2009 11:17: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 nA6BHYHd014923; Fri, 6 Nov 2009 11:17:34 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA6BHY9M014921; Fri, 6 Nov 2009 11:17:34 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200911061117.nA6BHY9M014921@svn.freebsd.org> From: Alexander Motin Date: Fri, 6 Nov 2009 11:17: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: r198983 - 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: Fri, 06 Nov 2009 11:17:34 -0000 Author: mav Date: Fri Nov 6 11:17:33 2009 New Revision: 198983 URL: http://svn.freebsd.org/changeset/base/198983 Log: Document support for more chips. Modified: head/share/man/man4/ata.4 Modified: head/share/man/man4/ata.4 ============================================================================== --- head/share/man/man4/ata.4 Fri Nov 6 10:56:43 2009 (r198982) +++ head/share/man/man4/ata.4 Fri Nov 6 11:17:33 2009 (r198983) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 24, 2009 +.Dd November 6, 2009 .Dt ATA 4 .Os .Sh NAME @@ -129,7 +129,7 @@ M5229, M5281, M5287, M5288, M5289. .It AMD: AMD756, AMD766, AMD768, AMD8111, CS5536. .It ATI: -IXP200, IXP300, IXP400. +IXP200, IXP300, IXP400, IXP600, IXP700, IXP800. .It CMD: CMD646, CMD646U2, CMD648, CMD649. .It Cypress: @@ -145,13 +145,15 @@ IT8211F, IT8212F, IT8213F. .It JMicron: JMB360, JMB361, JMB363, JMB365, JMB366, JMB368. .It Marvell -88SX5040, 88SX5041, 88SX5080, 88SX5081, 88SX6041, 88SX6081, 88SX6101, 88SX6141. +88SX5040, 88SX5041, 88SX5080, 88SX5081, 88SX6041, 88SX6042, 88SX6081, 88SX6101, +88SX6141, 88SX7042. .It National: SC1100. .It NetCell: NC3000, NC5000. .It nVidia: -nForce, nForce2, nForce2 MCP, nForce3, nForce3 MCP, nForce3 Pro, nForce4. +nForce, nForce2, nForce2 MCP, nForce3, nForce3 MCP, nForce3 Pro, nForce4, +MCP51, MCP55, MCP61, MCP65, MCP67, MCP73, MCP77, MCP79, MCP89. .It Promise: PDC20246, PDC20262, PDC20263, PDC20265, PDC20267, PDC20268, PDC20269, PDC20270, PDC20271, PDC20275, PDC20276, PDC20277, PDC20318, PDC20319, PDC20371, PDC20375, PDC20376, PDC20377, PDC20378, PDC20379, PDC20571, PDC20575, PDC20579, PDC20580, PDC20617, PDC20618, PDC20619, PDC20620, PDC20621, PDC20622, PDC40518, PDC40519, PDC40718, PDC40719. .It ServerWorks: From owner-svn-src-all@FreeBSD.ORG Fri Nov 6 11:29:10 2009 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 8DF0F106566B; Fri, 6 Nov 2009 11:29:10 +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 7CF5A8FC17; Fri, 6 Nov 2009 11:29: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 nA6BTAWf015231; Fri, 6 Nov 2009 11:29:10 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA6BTAMI015229; Fri, 6 Nov 2009 11:29:10 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <200911061129.nA6BTAMI015229@svn.freebsd.org> From: Edward Tomasz Napierala Date: Fri, 6 Nov 2009 11:29:10 +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: r198984 - releng/8.0/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, 06 Nov 2009 11:29:10 -0000 Author: trasz Date: Fri Nov 6 11:29:10 2009 New Revision: 198984 URL: http://svn.freebsd.org/changeset/base/198984 Log: MFC r197789: Fix ACL support on sparc64. Turns out that fuword(9) fetches 64 bits instead of sizeof(int), and on sparc64 that resulted in fetching wrong value for acl_maxcnt, which in turn caused __acl_get_link(2) to fail with EINVAL. PR: sparc64/139304 Submitted by: Dmitry Afanasiev Approved by: re (kib) Modified: releng/8.0/sys/kern/vfs_acl.c Directory Properties: releng/8.0/sys/ (props changed) releng/8.0/sys/amd64/include/xen/ (props changed) releng/8.0/sys/cddl/contrib/opensolaris/ (props changed) releng/8.0/sys/contrib/dev/acpica/ (props changed) releng/8.0/sys/contrib/pf/ (props changed) releng/8.0/sys/dev/xen/xenpci/ (props changed) Modified: releng/8.0/sys/kern/vfs_acl.c ============================================================================== --- releng/8.0/sys/kern/vfs_acl.c Fri Nov 6 11:17:33 2009 (r198983) +++ releng/8.0/sys/kern/vfs_acl.c Fri Nov 6 11:29:10 2009 (r198984) @@ -161,7 +161,7 @@ acl_copyout(struct acl *kernel_acl, void break; default: - if (fuword((char *)user_acl + + if (fuword32((char *)user_acl + offsetof(struct acl, acl_maxcnt)) != ACL_MAX_ENTRIES) return (EINVAL); From owner-svn-src-all@FreeBSD.ORG Fri Nov 6 13:10:12 2009 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 EFC69106566C; Fri, 6 Nov 2009 13:10:12 +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 DF3DC8FC21; Fri, 6 Nov 2009 13: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 nA6DACmD017668; Fri, 6 Nov 2009 13:10:12 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA6DACnm017666; Fri, 6 Nov 2009 13:10:12 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200911061310.nA6DACnm017666@svn.freebsd.org> From: John Baldwin Date: Fri, 6 Nov 2009 13:10: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: r198986 - head/lib/libkvm 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, 06 Nov 2009 13:10:13 -0000 Author: jhb Date: Fri Nov 6 13:10:12 2009 New Revision: 198986 URL: http://svn.freebsd.org/changeset/base/198986 Log: Fix a copy-paste bug when reading data from the last 3 (7 for PAE) bytes of a page mapped by a large page in the kernel. Submitted by: Dorr H. Clark dclark of engr.scu.edu MFC after: 1 week Modified: head/lib/libkvm/kvm_i386.c Modified: head/lib/libkvm/kvm_i386.c ============================================================================== --- head/lib/libkvm/kvm_i386.c Fri Nov 6 12:52:51 2009 (r198985) +++ head/lib/libkvm/kvm_i386.c Fri Nov 6 13:10:12 2009 (r198986) @@ -295,9 +295,9 @@ _kvm_vatop(kvm_t *kd, u_long va, off_t * #define PG_FRAME4M (~PAGE4M_MASK) pde_pa = ((u_long)pde & PG_FRAME4M) + (va & PAGE4M_MASK); s = _kvm_pa2off(kd, pde_pa, &ofs); - if (s < sizeof pde) { - _kvm_syserr(kd, kd->program, - "_kvm_vatop: pde_pa not found"); + if (s == 0) { + _kvm_err(kd, kd->program, + "_kvm_vatop: 4MB page address not in dump"); goto invalid; } *pa = ofs; @@ -391,9 +391,9 @@ _kvm_vatop_pae(kvm_t *kd, u_long va, off #define PG_FRAME2M (~PAGE2M_MASK) pde_pa = ((u_long)pde & PG_FRAME2M) + (va & PAGE2M_MASK); s = _kvm_pa2off(kd, pde_pa, &ofs); - if (s < sizeof pde) { - _kvm_syserr(kd, kd->program, - "_kvm_vatop_pae: pde_pa not found"); + if (s == 0) { + _kvm_err(kd, kd->program, + "_kvm_vatop: 2MB page address not in dump"); goto invalid; } *pa = ofs; From owner-svn-src-all@FreeBSD.ORG Fri Nov 6 14:52:37 2009 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 EFA651065676; Fri, 6 Nov 2009 14:52:37 +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 DC3488FC18; Fri, 6 Nov 2009 14:52: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 nA6EqbrT020079; Fri, 6 Nov 2009 14:52:37 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA6Eqbxm020072; Fri, 6 Nov 2009 14:52:37 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200911061452.nA6Eqbxm020072@svn.freebsd.org> From: John Baldwin Date: Fri, 6 Nov 2009 14:52: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: r198987 - in head/sys/dev: an ixgb vge 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, 06 Nov 2009 14:52:38 -0000 Author: jhb Date: Fri Nov 6 14:52:37 2009 New Revision: 198987 URL: http://svn.freebsd.org/changeset/base/198987 Log: Use device_printf() and if_printf() instead of printf() with an explicit unit number and remove 'unit' members from softc. Modified: head/sys/dev/an/if_an.c head/sys/dev/an/if_anreg.h head/sys/dev/ixgb/if_ixgb.c head/sys/dev/ixgb/if_ixgb.h head/sys/dev/vge/if_vge.c head/sys/dev/vge/if_vgevar.h Modified: head/sys/dev/an/if_an.c ============================================================================== --- head/sys/dev/an/if_an.c Fri Nov 6 13:10:12 2009 (r198986) +++ head/sys/dev/an/if_an.c Fri Nov 6 14:52:37 2009 (r198987) @@ -349,7 +349,6 @@ an_probe(device_t dev) */ sc->an_bhandle = rman_get_bushandle(sc->port_res); sc->an_btag = rman_get_bustag(sc->port_res); - sc->an_unit = device_get_unit(dev); ssid.an_len = sizeof(ssid); ssid.an_type = AN_RID_SSIDLIST; @@ -600,8 +599,7 @@ an_init_mpi350_desc(struct an_softc *sc) cmd_struct.an_parm1 = AN_RX_DESC_OFFSET; cmd_struct.an_parm2 = AN_MAX_RX_DESC; if (an_cmd_struct(sc, &cmd_struct, &reply)) { - printf("an%d: failed to allocate RX descriptor\n", - sc->an_unit); + if_printf(sc->an_ifp, "failed to allocate RX descriptor\n"); return(EIO); } @@ -629,8 +627,7 @@ an_init_mpi350_desc(struct an_softc *sc) cmd_struct.an_parm1 = AN_TX_DESC_OFFSET; cmd_struct.an_parm2 = AN_MAX_TX_DESC; if (an_cmd_struct(sc, &cmd_struct, &reply)) { - printf("an%d: failed to allocate TX descriptor\n", - sc->an_unit); + if_printf(sc->an_ifp, "failed to allocate TX descriptor\n"); return(EIO); } @@ -659,8 +656,7 @@ an_init_mpi350_desc(struct an_softc *sc) cmd_struct.an_parm1 = AN_HOST_DESC_OFFSET; cmd_struct.an_parm2 = 1; if (an_cmd_struct(sc, &cmd_struct, &reply)) { - printf("an%d: failed to allocate host descriptor\n", - sc->an_unit); + if_printf(sc->an_ifp, "failed to allocate host descriptor\n"); return(EIO); } @@ -687,7 +683,7 @@ an_attach(struct an_softc *sc, int unit, ifp = sc->an_ifp = if_alloc(IFT_ETHER); if (ifp == NULL) { - printf("an%d: can not if_alloc()\n", sc->an_unit); + device_printf(sc->an_dev, "can not if_alloc()\n"); goto fail; } @@ -708,7 +704,7 @@ an_attach(struct an_softc *sc, int unit, /* Load factory config */ if (an_cmd(sc, AN_CMD_READCFG, 0)) { - printf("an%d: failed to load config data\n", sc->an_unit); + device_printf(sc->an_dev, "failed to load config data\n"); goto fail; } @@ -716,7 +712,7 @@ an_attach(struct an_softc *sc, int unit, sc->an_config.an_type = AN_RID_GENCONFIG; sc->an_config.an_len = sizeof(struct an_ltv_genconfig); if (an_read_record(sc, (struct an_ltv_gen *)&sc->an_config)) { - printf("an%d: read record failed\n", sc->an_unit); + device_printf(sc->an_dev, "read record failed\n"); goto fail; } @@ -724,7 +720,7 @@ an_attach(struct an_softc *sc, int unit, sc->an_caps.an_type = AN_RID_CAPABILITIES; sc->an_caps.an_len = sizeof(struct an_ltv_caps); if (an_read_record(sc, (struct an_ltv_gen *)&sc->an_caps)) { - printf("an%d: read record failed\n", sc->an_unit); + device_printf(sc->an_dev, "read record failed\n"); goto fail; } @@ -732,7 +728,7 @@ an_attach(struct an_softc *sc, int unit, sc->an_ssidlist.an_type = AN_RID_SSIDLIST; sc->an_ssidlist.an_len = sizeof(struct an_ltv_ssidlist_new); if (an_read_record(sc, (struct an_ltv_gen *)&sc->an_ssidlist)) { - printf("an%d: read record failed\n", sc->an_unit); + device_printf(sc->an_dev, "read record failed\n"); goto fail; } @@ -740,7 +736,7 @@ an_attach(struct an_softc *sc, int unit, sc->an_aplist.an_type = AN_RID_APLIST; sc->an_aplist.an_len = sizeof(struct an_ltv_aplist); if (an_read_record(sc, (struct an_ltv_gen *)&sc->an_aplist)) { - printf("an%d: read record failed\n", sc->an_unit); + device_printf(sc->an_dev, "read record failed\n"); goto fail; } @@ -751,19 +747,19 @@ an_attach(struct an_softc *sc, int unit, sc->an_rssimap.an_type = AN_RID_RSSI_MAP; sc->an_rssimap.an_len = sizeof(struct an_ltv_rssi_map); if (an_read_record(sc, (struct an_ltv_gen *)&sc->an_rssimap)) { - printf("an%d: unable to get RSSI <-> dBM map\n", sc->an_unit); + device_printf(sc->an_dev, + "unable to get RSSI <-> dBM map\n"); } else { - printf("an%d: got RSSI <-> dBM map\n", sc->an_unit); + device_printf(sc->an_dev, "got RSSI <-> dBM map\n"); sc->an_have_rssimap = 1; } } else { - printf("an%d: no RSSI <-> dBM map\n", sc->an_unit); + device_printf(sc->an_dev, "no RSSI <-> dBM map\n"); } #endif AN_UNLOCK(sc); ifp->if_softc = sc; - sc->an_unit = unit; if_initname(ifp, device_get_name(sc->an_dev), device_get_unit(sc->an_dev)); ifp->if_mtu = ETHERMTU; @@ -907,9 +903,9 @@ an_rxeof(struct an_softc *sc) + sizeof(rx_frame); /* Check for insane frame length */ if (len > sizeof(sc->buf_802_11)) { - printf("an%d: oversized packet " + if_printf(ifp, "oversized packet " "received (%d, %d)\n", - sc->an_unit, len, MCLBYTES); + len, MCLBYTES); ifp->if_ierrors++; return; } @@ -933,9 +929,9 @@ an_rxeof(struct an_softc *sc) + ieee80211_header_len; /* Check for insane frame length */ if (len > sizeof(sc->buf_802_11)) { - printf("an%d: oversized packet " + if_printf(ifp, "oversized packet " "received (%d, %d)\n", - sc->an_unit, len, MCLBYTES); + len, MCLBYTES); ifp->if_ierrors++; return; } @@ -993,9 +989,9 @@ an_rxeof(struct an_softc *sc) len = rx_frame_802_3.an_rx_802_3_payload_len; if (len > sizeof(sc->buf_802_11)) { m_freem(m); - printf("an%d: oversized packet " + if_printf(ifp, "oversized packet " "received (%d, %d)\n", - sc->an_unit, len, MCLBYTES); + len, MCLBYTES); ifp->if_ierrors++; return; } @@ -1073,9 +1069,9 @@ an_rxeof(struct an_softc *sc) len = an_rx_desc.an_len + 12; if (len > MCLBYTES) { m_freem(m); - printf("an%d: oversized packet " + if_printf(ifp, "oversized packet " "received (%d, %d)\n", - sc->an_unit, len, MCLBYTES); + len, MCLBYTES); ifp->if_ierrors++; return; } @@ -1116,9 +1112,8 @@ an_rxeof(struct an_softc *sc) ((u_int32_t *)(void *)&an_rx_desc)[i]); } else { - printf("an%d: Didn't get valid RX packet " + if_printf(ifp, "Didn't get valid RX packet " "%x %x %d\n", - sc->an_unit, an_rx_desc.an_done, an_rx_desc.an_valid, an_rx_desc.an_len); } @@ -1393,7 +1388,7 @@ an_reset(struct an_softc *sc) an_cmd(sc, AN_CMD_NOOP2, 0); if (an_cmd(sc, AN_CMD_FORCE_SYNCLOSS, 0) == ETIMEDOUT) - printf("an%d: reset failed\n", sc->an_unit); + if_printf(sc->an_ifp, "reset failed\n"); an_cmd(sc, AN_CMD_DISABLE, 0); @@ -1410,6 +1405,7 @@ an_read_record(struct an_softc *sc, stru struct an_card_rid_desc an_rid_desc; struct an_command cmd; struct an_reply reply; + struct ifnet *ifp; u_int16_t *ptr; u_int8_t *ptr2; int i, len; @@ -1418,16 +1414,17 @@ an_read_record(struct an_softc *sc, stru if (ltv->an_len < 4 || ltv->an_type == 0) return(EINVAL); + ifp = sc->an_ifp; if (!sc->mpi350){ /* Tell the NIC to enter record read mode. */ if (an_cmd(sc, AN_CMD_ACCESS|AN_ACCESS_READ, ltv->an_type)) { - printf("an%d: RID access failed\n", sc->an_unit); + if_printf(ifp, "RID access failed\n"); return(EIO); } /* Seek to the record. */ if (an_seek(sc, ltv->an_type, 0, AN_BAP1)) { - printf("an%d: seek to record failed\n", sc->an_unit); + if_printf(ifp, "seek to record failed\n"); return(EIO); } @@ -1439,8 +1436,8 @@ an_read_record(struct an_softc *sc, stru */ len = CSR_READ_2(sc, AN_DATA1); if (len > (ltv->an_len - 2)) { - printf("an%d: record length mismatch -- expected %d, " - "got %d for Rid %x\n", sc->an_unit, + if_printf(ifp, "record length mismatch -- expected %d, " + "got %d for Rid %x\n", ltv->an_len - 2, len, ltv->an_type); len = ltv->an_len - 2; } else { @@ -1476,8 +1473,8 @@ an_read_record(struct an_softc *sc, stru if (an_cmd_struct(sc, &cmd, &reply) || reply.an_status & AN_CMD_QUAL_MASK) { - printf("an%d: failed to read RID %x %x %x %x %x, %d\n", - sc->an_unit, ltv->an_type, + if_printf(ifp, "failed to read RID %x %x %x %x %x, %d\n", + ltv->an_type, reply.an_status, reply.an_resp0, reply.an_resp1, @@ -1493,8 +1490,8 @@ an_read_record(struct an_softc *sc, stru len = an_rid_desc.an_len; if (len > (ltv->an_len - 2)) { - printf("an%d: record length mismatch -- expected %d, " - "got %d for Rid %x\n", sc->an_unit, + if_printf(ifp, "record length mismatch -- expected %d, " + "got %d for Rid %x\n", ltv->an_len - 2, len, ltv->an_type); len = ltv->an_len - 2; } else { @@ -1586,8 +1583,9 @@ an_write_record(struct an_softc *sc, str DELAY(100000); if ((i = an_cmd_struct(sc, &cmd, &reply))) { - printf("an%d: failed to write RID 1 %x %x %x %x %x, %d\n", - sc->an_unit, ltv->an_type, + if_printf(sc->an_ifp, + "failed to write RID 1 %x %x %x %x %x, %d\n", + ltv->an_type, reply.an_status, reply.an_resp0, reply.an_resp1, @@ -1598,8 +1596,9 @@ an_write_record(struct an_softc *sc, str if (reply.an_status & AN_CMD_QUAL_MASK) { - printf("an%d: failed to write RID 2 %x %x %x %x %x, %d\n", - sc->an_unit, ltv->an_type, + if_printf(sc->an_ifp, + "failed to write RID 2 %x %x %x %x %x, %d\n", + ltv->an_type, reply.an_status, reply.an_resp0, reply.an_resp1, @@ -1623,11 +1622,11 @@ an_dump_record(struct an_softc *sc, stru char buf[17], temp; len = ltv->an_len - 4; - printf("an%d: RID %4x, Length %4d, Mode %s\n", - sc->an_unit, ltv->an_type, ltv->an_len - 4, string); + if_printf(sc->an_ifp, "RID %4x, Length %4d, Mode %s\n", + ltv->an_type, ltv->an_len - 4, string); if (an_dump == 1 || (an_dump == ltv->an_type)) { - printf("an%d:\t", sc->an_unit); + if_printf(sc->an_ifp, "\t"); bzero(buf,sizeof(buf)); ptr2 = (u_int8_t *)<v->an_val; @@ -1642,7 +1641,7 @@ an_dump_record(struct an_softc *sc, stru if (++count == 16) { count = 0; printf("%s\n",buf); - printf("an%d:\t", sc->an_unit); + if_printf(sc->an_ifp, "\t"); bzero(buf,sizeof(buf)); } } @@ -1669,7 +1668,7 @@ an_seek(struct an_softc *sc, int id, int offreg = AN_OFF1; break; default: - printf("an%d: invalid data path: %x\n", sc->an_unit, chan); + if_printf(sc->an_ifp, "invalid data path: %x\n", chan); return(EIO); } @@ -1743,8 +1742,8 @@ an_alloc_nicmem(struct an_softc *sc, int int i; if (an_cmd(sc, AN_CMD_ALLOC_MEM, len)) { - printf("an%d: failed to allocate %d bytes on NIC\n", - sc->an_unit, len); + if_printf(sc->an_ifp, "failed to allocate %d bytes on NIC\n", + len); return(ENOMEM); } @@ -1863,7 +1862,7 @@ an_setdef(struct an_softc *sc, struct an } break; default: - printf("an%d: unknown RID: %x\n", sc->an_unit, areq->an_type); + if_printf(ifp, "unknown RID: %x\n", areq->an_type); return; } @@ -2653,8 +2652,7 @@ an_init(void *xsc) if (sc->mpi350) an_init_mpi350_desc(sc); if (an_init_tx_ring(sc)) { - printf("an%d: tx buffer allocation " - "failed\n", sc->an_unit); + if_printf(ifp, "tx buffer allocation failed\n"); AN_UNLOCK(sc); return; } @@ -2695,7 +2693,7 @@ an_init(void *xsc) sc->an_ssidlist.an_type = AN_RID_SSIDLIST; sc->an_ssidlist.an_len = sizeof(struct an_ltv_ssidlist_new); if (an_write_record(sc, (struct an_ltv_gen *)&sc->an_ssidlist)) { - printf("an%d: failed to set ssid list\n", sc->an_unit); + if_printf(ifp, "failed to set ssid list\n"); AN_UNLOCK(sc); return; } @@ -2704,7 +2702,7 @@ an_init(void *xsc) sc->an_aplist.an_type = AN_RID_APLIST; sc->an_aplist.an_len = sizeof(struct an_ltv_aplist); if (an_write_record(sc, (struct an_ltv_gen *)&sc->an_aplist)) { - printf("an%d: failed to set AP list\n", sc->an_unit); + if_printf(ifp, "failed to set AP list\n"); AN_UNLOCK(sc); return; } @@ -2713,14 +2711,14 @@ an_init(void *xsc) sc->an_config.an_len = sizeof(struct an_ltv_genconfig); sc->an_config.an_type = AN_RID_GENCONFIG; if (an_write_record(sc, (struct an_ltv_gen *)&sc->an_config)) { - printf("an%d: failed to set configuration\n", sc->an_unit); + if_printf(ifp, "failed to set configuration\n"); AN_UNLOCK(sc); return; } /* Enable the MAC */ if (an_cmd(sc, AN_CMD_ENABLE, 0)) { - printf("an%d: failed to enable MAC\n", sc->an_unit); + if_printf(ifp, "failed to enable MAC\n"); AN_UNLOCK(sc); return; } @@ -2827,7 +2825,7 @@ an_start(struct ifnet *ifp) sc->an_rdata.an_tx_ring[idx] = id; if (an_cmd(sc, AN_CMD_TX, id)) - printf("an%d: xmit failed\n", sc->an_unit); + if_printf(ifp, "xmit failed\n"); AN_INC(idx, AN_TX_RING_CNT); @@ -2976,7 +2974,7 @@ an_watchdog(struct ifnet *ifp) return; } - printf("an%d: device timeout\n", sc->an_unit); + if_printf(ifp, "device timeout\n"); an_reset(sc); if (sc->mpi350) @@ -3127,7 +3125,7 @@ an_cache_store(struct an_softc *sc, stru } #ifdef SIGDEBUG - printf("an: q value %x (MSB=0x%x, LSB=0x%x) \n", + if_printf(sc->an_ifp, "q value %x (MSB=0x%x, LSB=0x%x) \n", rx_rssi & 0xffff, rx_rssi >> 8, rx_rssi & 0xff); #endif @@ -3567,8 +3565,7 @@ cmdreset(struct ifnet *ifp) an_cmd(sc, AN_CMD_DISABLE, 0); if (!(status = WaitBusy(ifp, AN_TIMEOUT))) { - printf("an%d: Waitbusy hang b4 RESET =%d\n", - sc->an_unit, status); + if_printf(ifp, "Waitbusy hang b4 RESET =%d\n", status); AN_UNLOCK(sc); return -EBUSY; } @@ -3578,8 +3575,7 @@ cmdreset(struct ifnet *ifp) if (!(status = WaitBusy(ifp, 100))) { - printf("an%d: Waitbusy hang AFTER RESET =%d\n", - sc->an_unit, status); + if_printf(ifp, "Waitbusy hang AFTER RESET =%d\n", status); AN_UNLOCK(sc); return -EBUSY; } @@ -3687,8 +3683,7 @@ flashpchar(struct ifnet *ifp, int byte, /* timeout for busy clear wait */ if (waittime <= 0) { - printf("an%d: flash putchar busywait timeout! \n", - sc->an_unit); + if_printf(ifp, "flash putchar busywait timeout!\n"); return -1; } /* @@ -3774,8 +3769,7 @@ flashcard(struct ifnet *ifp, struct airo sc = ifp->if_softc; if (sc->mpi350) { - printf("an%d: flashing not supported on MPI 350 yet\n", - sc->an_unit); + if_printf(ifp, "flashing not supported on MPI 350 yet\n"); return(-1); } status = l_ioctl->command; @@ -3820,7 +3814,7 @@ flashcard(struct ifnet *ifp, struct airo break; case AIROFLPUTBUF: /* Send 32k to card */ if (l_ioctl->len > FLASH_SIZE) { - printf("an%d: Buffer to big, %x %x\n", sc->an_unit, + if_printf(ifp, "Buffer to big, %x %x\n", l_ioctl->len, FLASH_SIZE); return -EINVAL; } @@ -3837,8 +3831,7 @@ flashcard(struct ifnet *ifp, struct airo break; case AIRORESTART: if ((status = flashrestart(ifp)) != 0) { - printf("an%d: FLASHRESTART returned %d\n", - sc->an_unit, status); + if_printf(ifp, "FLASHRESTART returned %d\n", status); return -EIO; } else return 0; Modified: head/sys/dev/an/if_anreg.h ============================================================================== --- head/sys/dev/an/if_anreg.h Fri Nov 6 13:10:12 2009 (r198986) +++ head/sys/dev/an/if_anreg.h Fri Nov 6 14:52:37 2009 (r198987) @@ -442,8 +442,6 @@ struct an_tx_ring_data { struct an_softc { struct ifnet *an_ifp; - int an_unit; - int port_rid; /* resource id for port range */ struct resource* port_res; /* resource for port range */ int mem_rid; /* resource id for memory range */ Modified: head/sys/dev/ixgb/if_ixgb.c ============================================================================== --- head/sys/dev/ixgb/if_ixgb.c Fri Nov 6 13:10:12 2009 (r198986) +++ head/sys/dev/ixgb/if_ixgb.c Fri Nov 6 14:52:37 2009 (r198987) @@ -249,18 +249,17 @@ ixgb_attach(device_t dev) int tsize, rsize; int error = 0; - printf("ixgb%d: %s\n", device_get_unit(dev), ixgb_copyright); + device_printf(dev, "%s\n", ixgb_copyright); INIT_DEBUGOUT("ixgb_attach: begin"); /* Allocate, clear, and link in our adapter structure */ if (!(adapter = device_get_softc(dev))) { - printf("ixgb: adapter structure allocation failed\n"); + device_printf(dev, "adapter structure allocation failed\n"); return (ENOMEM); } bzero(adapter, sizeof(struct adapter)); adapter->dev = dev; adapter->osdep.dev = dev; - adapter->unit = device_get_unit(dev); IXGB_LOCK_INIT(adapter, device_get_nameunit(dev)); if (ixgb_adapter_list != NULL) @@ -299,8 +298,7 @@ ixgb_attach(device_t dev) ETHERMTU + ETHER_HDR_LEN + ETHER_CRC_LEN; if (ixgb_allocate_pci_resources(adapter)) { - printf("ixgb%d: Allocation of PCI resources failed\n", - adapter->unit); + device_printf(dev, "Allocation of PCI resources failed\n"); error = ENXIO; goto err_pci; } @@ -309,8 +307,7 @@ ixgb_attach(device_t dev) /* Allocate Transmit Descriptor ring */ if (ixgb_dma_malloc(adapter, tsize, &adapter->txdma, BUS_DMA_NOWAIT)) { - printf("ixgb%d: Unable to allocate TxDescriptor memory\n", - adapter->unit); + device_printf(dev, "Unable to allocate TxDescriptor memory\n"); error = ENOMEM; goto err_tx_desc; } @@ -321,8 +318,7 @@ ixgb_attach(device_t dev) /* Allocate Receive Descriptor ring */ if (ixgb_dma_malloc(adapter, rsize, &adapter->rxdma, BUS_DMA_NOWAIT)) { - printf("ixgb%d: Unable to allocate rx_desc memory\n", - adapter->unit); + device_printf(dev, "Unable to allocate rx_desc memory\n"); error = ENOMEM; goto err_rx_desc; } @@ -330,8 +326,7 @@ ixgb_attach(device_t dev) /* Initialize the hardware */ if (ixgb_hardware_init(adapter)) { - printf("ixgb%d: Unable to initialize the hardware\n", - adapter->unit); + device_printf(dev, "Unable to initialize the hardware\n"); error = EIO; goto err_hw_init; } @@ -628,7 +623,7 @@ ixgb_watchdog(struct ifnet * ifp) ifp->if_timer = IXGB_TX_TIMEOUT; return; } - printf("ixgb%d: watchdog timeout -- resetting\n", adapter->unit); + if_printf(ifp, "watchdog timeout -- resetting\n"); ifp->if_drv_flags &= ~IFF_DRV_RUNNING; @@ -663,23 +658,22 @@ ixgb_init_locked(struct adapter *adapter IXGB_LOCK_ASSERT(adapter); ixgb_stop(adapter); + ifp = adapter->ifp; /* Get the latest mac address, User can use a LAA */ - bcopy(IF_LLADDR(adapter->ifp), adapter->hw.curr_mac_addr, - IXGB_ETH_LENGTH_OF_ADDRESS); + bcopy(IF_LLADDR(ifp), adapter->hw.curr_mac_addr, + IXGB_ETH_LENGTH_OF_ADDRESS); /* Initialize the hardware */ if (ixgb_hardware_init(adapter)) { - printf("ixgb%d: Unable to initialize the hardware\n", - adapter->unit); + if_printf(ifp, "Unable to initialize the hardware\n"); return; } ixgb_enable_vlans(adapter); /* Prepare transmit descriptors and buffers */ if (ixgb_setup_transmit_structures(adapter)) { - printf("ixgb%d: Could not setup transmit structures\n", - adapter->unit); + if_printf(ifp, "Could not setup transmit structures\n"); ixgb_stop(adapter); return; } @@ -690,8 +684,7 @@ ixgb_init_locked(struct adapter *adapter /* Prepare receive descriptors and buffers */ if (ixgb_setup_receive_structures(adapter)) { - printf("ixgb%d: Could not setup receive structures\n", - adapter->unit); + if_printf(ifp, "Could not setup receive structures\n"); ixgb_stop(adapter); return; } @@ -959,8 +952,8 @@ ixgb_encap(struct adapter * adapter, str &nsegs, BUS_DMA_NOWAIT); if (error != 0) { adapter->no_tx_dma_setup++; - printf("ixgb%d: ixgb_encap: bus_dmamap_load_mbuf failed; " - "error %u\n", adapter->unit, error); + if_printf(ifp, "ixgb_encap: bus_dmamap_load_mbuf failed; " + "error %u\n", error); bus_dmamap_destroy(adapter->txtag, map); return (error); } @@ -1149,15 +1142,14 @@ ixgb_print_link_status(struct adapter * { if (adapter->hw.link_up) { if (!adapter->link_active) { - printf("ixgb%d: Link is up %d Mbps %s \n", - adapter->unit, + if_printf(adapter->ifp, "Link is up %d Mbps %s \n", 10000, "Full Duplex"); adapter->link_active = 1; } } else { if (adapter->link_active) { - printf("ixgb%d: Link is Down \n", adapter->unit); + if_printf(adapter->ifp, "Link is Down \n"); adapter->link_active = 0; } } @@ -1213,8 +1205,8 @@ ixgb_identify_hardware(struct adapter * adapter->hw.pci_cmd_word = pci_read_config(dev, PCIR_COMMAND, 2); if (!((adapter->hw.pci_cmd_word & PCIM_CMD_BUSMASTEREN) && (adapter->hw.pci_cmd_word & PCIM_CMD_MEMEN))) { - printf("ixgb%d: Memory Access and/or Bus Master bits were not set!\n", - adapter->unit); + device_printf(dev, + "Memory Access and/or Bus Master bits were not set!\n"); adapter->hw.pci_cmd_word |= (PCIM_CMD_BUSMASTEREN | PCIM_CMD_MEMEN); pci_write_config(dev, PCIR_COMMAND, adapter->hw.pci_cmd_word, 2); @@ -1234,7 +1226,8 @@ ixgb_identify_hardware(struct adapter * break; default: INIT_DEBUGOUT1("Unknown device if 0x%x", adapter->hw.device_id); - printf("ixgb%d: unsupported device id 0x%x\n", adapter->unit, adapter->hw.device_id); + device_printf(dev, "unsupported device id 0x%x\n", + adapter->hw.device_id); } return; @@ -1251,8 +1244,7 @@ ixgb_allocate_pci_resources(struct adapt &rid, 0, ~0, 1, RF_ACTIVE); if (!(adapter->res_memory)) { - printf("ixgb%d: Unable to allocate bus resource: memory\n", - adapter->unit); + device_printf(dev, "Unable to allocate bus resource: memory\n"); return (ENXIO); } adapter->osdep.mem_bus_space_tag = @@ -1266,16 +1258,15 @@ ixgb_allocate_pci_resources(struct adapt &rid, 0, ~0, 1, RF_SHAREABLE | RF_ACTIVE); if (!(adapter->res_interrupt)) { - printf("ixgb%d: Unable to allocate bus resource: interrupt\n", - adapter->unit); + device_printf(dev, + "Unable to allocate bus resource: interrupt\n"); return (ENXIO); } if (bus_setup_intr(dev, adapter->res_interrupt, INTR_TYPE_NET | INTR_MPSAFE, NULL, (void (*) (void *))ixgb_intr, adapter, &adapter->int_handler_tag)) { - printf("ixgb%d: Error registering interrupt handler!\n", - adapter->unit); + device_printf(dev, "Error registering interrupt handler!\n"); return (ENXIO); } adapter->hw.back = &adapter->osdep; @@ -1322,13 +1313,12 @@ ixgb_hardware_init(struct adapter * adap /* Make sure we have a good EEPROM before we read from it */ if (!ixgb_validate_eeprom_checksum(&adapter->hw)) { - printf("ixgb%d: The EEPROM Checksum Is Not Valid\n", - adapter->unit); + device_printf(adapter->dev, + "The EEPROM Checksum Is Not Valid\n"); return (EIO); } if (!ixgb_init_hw(&adapter->hw)) { - printf("ixgb%d: Hardware Initialization Failed", - adapter->unit); + device_printf(adapter->dev, "Hardware Initialization Failed"); return (EIO); } @@ -1352,7 +1342,7 @@ ixgb_setup_interface(device_t dev, struc #if __FreeBSD_version >= 502000 if_initname(ifp, device_get_name(dev), device_get_unit(dev)); #else - ifp->if_unit = adapter->unit; + ifp->if_unit = device_get_unit(dev); ifp->if_name = "ixgb"; #endif ifp->if_mtu = ETHERMTU; @@ -1420,8 +1410,10 @@ static int ixgb_dma_malloc(struct adapter * adapter, bus_size_t size, struct ixgb_dma_alloc * dma, int mapflags) { + device_t dev; int r; + dev = adapter->dev; r = bus_dma_tag_create(NULL, /* parent */ PAGE_SIZE, 0, /* alignment, bounds */ BUS_SPACE_MAXADDR, /* lowaddr */ @@ -1437,15 +1429,15 @@ ixgb_dma_malloc(struct adapter * adapter #endif &dma->dma_tag); if (r != 0) { - printf("ixgb%d: ixgb_dma_malloc: bus_dma_tag_create failed; " - "error %u\n", adapter->unit, r); + device_printf(dev, "ixgb_dma_malloc: bus_dma_tag_create failed; " + "error %u\n", r); goto fail_0; } r = bus_dmamem_alloc(dma->dma_tag, (void **)&dma->dma_vaddr, BUS_DMA_NOWAIT, &dma->dma_map); if (r != 0) { - printf("ixgb%d: ixgb_dma_malloc: bus_dmamem_alloc failed; " - "error %u\n", adapter->unit, r); + device_printf(dev, "ixgb_dma_malloc: bus_dmamem_alloc failed; " + "error %u\n", r); goto fail_1; } r = bus_dmamap_load(dma->dma_tag, dma->dma_map, dma->dma_vaddr, @@ -1454,8 +1446,8 @@ ixgb_dma_malloc(struct adapter * adapter &dma->dma_paddr, mapflags | BUS_DMA_NOWAIT); if (r != 0) { - printf("ixgb%d: ixgb_dma_malloc: bus_dmamap_load failed; " - "error %u\n", adapter->unit, r); + device_printf(dev, "ixgb_dma_malloc: bus_dmamap_load failed; " + "error %u\n", r); goto fail_2; } dma->dma_size = size; @@ -1493,8 +1485,8 @@ ixgb_allocate_transmit_structures(struct (struct ixgb_buffer *) malloc(sizeof(struct ixgb_buffer) * adapter->num_tx_desc, M_DEVBUF, M_NOWAIT | M_ZERO))) { - printf("ixgb%d: Unable to allocate tx_buffer memory\n", - adapter->unit); + device_printf(adapter->dev, + "Unable to allocate tx_buffer memory\n"); return ENOMEM; } bzero(adapter->tx_buffer_area, @@ -1528,7 +1520,7 @@ ixgb_setup_transmit_structures(struct ad NULL, /* lockfuncarg */ #endif &adapter->txtag)) { - printf("ixgb%d: Unable to allocate TX DMA tag\n", adapter->unit); + device_printf(adapter->dev, "Unable to allocate TX DMA tag\n"); return (ENOMEM); } if (ixgb_allocate_transmit_structures(adapter)) @@ -1845,8 +1837,8 @@ ixgb_allocate_receive_structures(struct (struct ixgb_buffer *) malloc(sizeof(struct ixgb_buffer) * adapter->num_rx_desc, M_DEVBUF, M_NOWAIT | M_ZERO))) { - printf("ixgb%d: Unable to allocate rx_buffer memory\n", - adapter->unit); + device_printf(adapter->dev, + "Unable to allocate rx_buffer memory\n"); return (ENOMEM); } bzero(adapter->rx_buffer_area, @@ -1867,9 +1859,9 @@ ixgb_allocate_receive_structures(struct #endif &adapter->rxtag); if (error != 0) { - printf("ixgb%d: ixgb_allocate_receive_structures: " + device_printf(adapter->dev, "ixgb_allocate_receive_structures: " "bus_dma_tag_create failed; error %u\n", - adapter->unit, error); + error); goto fail_0; } rx_buffer = adapter->rx_buffer_area; @@ -1877,9 +1869,10 @@ ixgb_allocate_receive_structures(struct error = bus_dmamap_create(adapter->rxtag, BUS_DMA_NOWAIT, &rx_buffer->map); if (error != 0) { - printf("ixgb%d: ixgb_allocate_receive_structures: " + device_printf(adapter->dev, + "ixgb_allocate_receive_structures: " "bus_dmamap_create failed; error %u\n", - adapter->unit, error); + error); goto fail_1; } } @@ -2431,20 +2424,21 @@ ixgb_print_hw_stats(struct adapter * ada char buf_speed[100], buf_type[100]; ixgb_bus_speed bus_speed; ixgb_bus_type bus_type; - int unit = adapter->unit; + device_t dev; + dev = adapter->dev; #ifdef _SV_ - printf("ixgb%d: Packets not Avail = %ld\n", unit, + device_printf(dev, "Packets not Avail = %ld\n", adapter->no_pkts_avail); - printf("ixgb%d: CleanTxInterrupts = %ld\n", unit, + device_printf(dev, "CleanTxInterrupts = %ld\n", adapter->clean_tx_interrupts); - printf("ixgb%d: ICR RXDMT0 = %lld\n", unit, + device_printf(dev, "ICR RXDMT0 = %lld\n", (long long)adapter->sv_stats.icr_rxdmt0); - printf("ixgb%d: ICR RXO = %lld\n", unit, + device_printf(dev, "ICR RXO = %lld\n", (long long)adapter->sv_stats.icr_rxo); - printf("ixgb%d: ICR RXT0 = %lld\n", unit, + device_printf(dev, "ICR RXT0 = %lld\n", (long long)adapter->sv_stats.icr_rxt0); - printf("ixgb%d: ICR TXDW = %lld\n", unit, + device_printf(dev, "ICR TXDW = %lld\n", (long long)adapter->sv_stats.icr_TXDW); #endif /* _SV_ */ @@ -2456,55 +2450,55 @@ ixgb_print_hw_stats(struct adapter * ada bus_speed == ixgb_bus_speed_100 ? "100MHz" : bus_speed == ixgb_bus_speed_133 ? "133MHz" : "UNKNOWN"); - printf("ixgb%d: PCI_Bus_Speed = %s\n", unit, + device_printf(dev, "PCI_Bus_Speed = %s\n", buf_speed); sprintf(buf_type, bus_type == ixgb_bus_type_pci ? "PCI" : bus_type == ixgb_bus_type_pcix ? "PCI-X" : "UNKNOWN"); - printf("ixgb%d: PCI_Bus_Type = %s\n", unit, + device_printf(dev, "PCI_Bus_Type = %s\n", buf_type); - printf("ixgb%d: Tx Descriptors not Avail1 = %ld\n", unit, + device_printf(dev, "Tx Descriptors not Avail1 = %ld\n", adapter->no_tx_desc_avail1); - printf("ixgb%d: Tx Descriptors not Avail2 = %ld\n", unit, + device_printf(dev, "Tx Descriptors not Avail2 = %ld\n", adapter->no_tx_desc_avail2); - printf("ixgb%d: Std Mbuf Failed = %ld\n", unit, + device_printf(dev, "Std Mbuf Failed = %ld\n", adapter->mbuf_alloc_failed); - printf("ixgb%d: Std Cluster Failed = %ld\n", unit, + device_printf(dev, "Std Cluster Failed = %ld\n", adapter->mbuf_cluster_failed); - printf("ixgb%d: Defer count = %lld\n", unit, + device_printf(dev, "Defer count = %lld\n", (long long)adapter->stats.dc); - printf("ixgb%d: Missed Packets = %lld\n", unit, + device_printf(dev, "Missed Packets = %lld\n", (long long)adapter->stats.mpc); - printf("ixgb%d: Receive No Buffers = %lld\n", unit, + device_printf(dev, "Receive No Buffers = %lld\n", (long long)adapter->stats.rnbc); - printf("ixgb%d: Receive length errors = %lld\n", unit, + device_printf(dev, "Receive length errors = %lld\n", (long long)adapter->stats.rlec); - printf("ixgb%d: Crc errors = %lld\n", unit, + device_printf(dev, "Crc errors = %lld\n", (long long)adapter->stats.crcerrs); - printf("ixgb%d: Driver dropped packets = %ld\n", unit, + device_printf(dev, "Driver dropped packets = %ld\n", adapter->dropped_pkts); - printf("ixgb%d: XON Rcvd = %lld\n", unit, + device_printf(dev, "XON Rcvd = %lld\n", (long long)adapter->stats.xonrxc); - printf("ixgb%d: XON Xmtd = %lld\n", unit, + device_printf(dev, "XON Xmtd = %lld\n", (long long)adapter->stats.xontxc); - printf("ixgb%d: XOFF Rcvd = %lld\n", unit, + device_printf(dev, "XOFF Rcvd = %lld\n", (long long)adapter->stats.xoffrxc); - printf("ixgb%d: XOFF Xmtd = %lld\n", unit, + device_printf(dev, "XOFF Xmtd = %lld\n", (long long)adapter->stats.xofftxc); - printf("ixgb%d: Good Packets Rcvd = %lld\n", unit, + device_printf(dev, "Good Packets Rcvd = %lld\n", (long long)adapter->stats.gprcl); - printf("ixgb%d: Good Packets Xmtd = %lld\n", unit, + device_printf(dev, "Good Packets Xmtd = %lld\n", (long long)adapter->stats.gptcl); - printf("ixgb%d: Jumbo frames recvd = %lld\n", unit, + device_printf(dev, "Jumbo frames recvd = %lld\n", (long long)adapter->stats.jprcl); - printf("ixgb%d: Jumbo frames Xmtd = %lld\n", unit, + device_printf(dev, "Jumbo frames Xmtd = %lld\n", (long long)adapter->stats.jptcl); return; Modified: head/sys/dev/ixgb/if_ixgb.h ============================================================================== --- head/sys/dev/ixgb/if_ixgb.h Fri Nov 6 13:10:12 2009 (r198986) +++ head/sys/dev/ixgb/if_ixgb.h Fri Nov 6 14:52:37 2009 (r198987) @@ -284,7 +284,6 @@ struct adapter { struct ifmedia media; struct callout timer; int io_rid; - u_int8_t unit; struct mtx mtx; /* Info about the board itself */ Modified: head/sys/dev/vge/if_vge.c ============================================================================== --- head/sys/dev/vge/if_vge.c Fri Nov 6 13:10:12 2009 (r198986) +++ head/sys/dev/vge/if_vge.c Fri Nov 6 14:52:37 2009 (r198987) @@ -967,8 +967,6 @@ vge_attach(dev) */ vge_read_eeprom(sc, (caddr_t)eaddr, VGE_EE_EADDR, 3, 0); - sc->vge_unit = unit; - /* * Allocate the parent bus DMA tag appropriate for PCI. */ @@ -993,7 +991,7 @@ vge_attach(dev) ifp = sc->vge_ifp = if_alloc(IFT_ETHER); if (ifp == NULL) { - printf("vge%d: can not if_alloc()\n", sc->vge_unit); + device_printf(dev, "can not if_alloc()\n"); error = ENOSPC; goto fail; } @@ -1001,7 +999,7 @@ vge_attach(dev) /* Do MII setup */ if (mii_phy_probe(dev, &sc->vge_miibus, vge_ifmedia_upd, vge_ifmedia_sts)) { - printf("vge%d: MII without any phy!\n", sc->vge_unit); + device_printf(dev, "MII without any phy!\n"); error = ENXIO; goto fail; } @@ -1736,8 +1734,7 @@ vge_encap(sc, m_head, idx) m_head, vge_dma_map_tx_desc, &arg, BUS_DMA_NOWAIT); if (error && error != EFBIG) { - printf("vge%d: can't map mbuf (error %d)\n", - sc->vge_unit, error); + if_printf(sc->vge_ifp, "can't map mbuf (error %d)\n", error); return (ENOBUFS); } @@ -1758,8 +1755,8 @@ vge_encap(sc, m_head, idx) error = bus_dmamap_load_mbuf(sc->vge_ldata.vge_mtag, map, m_head, vge_dma_map_tx_desc, &arg, BUS_DMA_NOWAIT); if (error) { - printf("vge%d: can't map mbuf (error %d)\n", - sc->vge_unit, error); + if_printf(sc->vge_ifp, "can't map mbuf (error %d)\n", + error); return (EFBIG); } } @@ -2254,7 +2251,7 @@ vge_watchdog(ifp) sc = ifp->if_softc; VGE_LOCK(sc); - printf("vge%d: watchdog timeout\n", sc->vge_unit); + if_printf(ifp, "watchdog timeout\n"); ifp->if_oerrors++; vge_txeof(sc); Modified: head/sys/dev/vge/if_vgevar.h ============================================================================== --- head/sys/dev/vge/if_vgevar.h Fri Nov 6 13:10:12 2009 (r198986) +++ head/sys/dev/vge/if_vgevar.h Fri Nov 6 14:52:37 2009 (r198987) @@ -108,7 +108,6 @@ struct vge_softc { device_t vge_miibus; bus_dma_tag_t vge_parent_tag; bus_dma_tag_t vge_tag; - u_int8_t vge_unit; /* interface number */ u_int8_t vge_type; int vge_if_flags; int vge_rx_consumed; From owner-svn-src-all@FreeBSD.ORG Fri Nov 6 14:55:02 2009 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 AB0791065670; Fri, 6 Nov 2009 14:55:02 +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 923838FC16; Fri, 6 Nov 2009 14:55: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 nA6Et28v020187; Fri, 6 Nov 2009 14:55:02 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA6Et1Pu020171; Fri, 6 Nov 2009 14:55:01 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200911061455.nA6Et1Pu020171@svn.freebsd.org> From: John Baldwin Date: Fri, 6 Nov 2009 14:55: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: r198988 - in head/sys: dev/ath dev/cxgb dev/hatm dev/ixgbe dev/nfe dev/patm dev/sk dev/stge net net80211 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: Fri, 06 Nov 2009 14:55:02 -0000 Author: jhb Date: Fri Nov 6 14:55:01 2009 New Revision: 198988 URL: http://svn.freebsd.org/changeset/base/198988 Log: Take a step towards removing if_watchdog/if_timer. Don't explicitly set if_watchdog/if_timer to NULL/0 when initializing an ifnet. if_alloc() sets those members to NULL/0 already. Modified: head/sys/dev/ath/if_ath.c head/sys/dev/cxgb/cxgb_main.c head/sys/dev/hatm/if_hatm.c head/sys/dev/ixgbe/ixgbe.c head/sys/dev/nfe/if_nfe.c head/sys/dev/patm/if_patm_attach.c head/sys/dev/sk/if_sk.c head/sys/dev/stge/if_stge.c head/sys/net/if_ef.c head/sys/net80211/ieee80211.c head/sys/netgraph/ng_eiface.c head/sys/netgraph/ng_fec.c head/sys/netgraph/ng_iface.c head/sys/netgraph/ng_sppp.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Fri Nov 6 14:52:37 2009 (r198987) +++ head/sys/dev/ath/if_ath.c Fri Nov 6 14:55:01 2009 (r198988) @@ -560,7 +560,6 @@ ath_attach(u_int16_t devid, struct ath_s ifp->if_softc = sc; ifp->if_flags = IFF_SIMPLEX | IFF_BROADCAST | IFF_MULTICAST; ifp->if_start = ath_start; - ifp->if_watchdog = NULL; ifp->if_ioctl = ath_ioctl; ifp->if_init = ath_init; IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); Modified: head/sys/dev/cxgb/cxgb_main.c ============================================================================== --- head/sys/dev/cxgb/cxgb_main.c Fri Nov 6 14:52:37 2009 (r198987) +++ head/sys/dev/cxgb/cxgb_main.c Fri Nov 6 14:55:01 2009 (r198988) @@ -1054,10 +1054,6 @@ cxgb_port_attach(device_t dev) ifp->if_ioctl = cxgb_ioctl; ifp->if_start = cxgb_start; - - ifp->if_timer = 0; /* Disable ifnet watchdog */ - ifp->if_watchdog = NULL; - ifp->if_snd.ifq_drv_maxlen = cxgb_snd_queue_len; IFQ_SET_MAXLEN(&ifp->if_snd, ifp->if_snd.ifq_drv_maxlen); IFQ_SET_READY(&ifp->if_snd); Modified: head/sys/dev/hatm/if_hatm.c ============================================================================== --- head/sys/dev/hatm/if_hatm.c Fri Nov 6 14:52:37 2009 (r198987) +++ head/sys/dev/hatm/if_hatm.c Fri Nov 6 14:55:01 2009 (r198988) @@ -1928,7 +1928,6 @@ hatm_attach(device_t dev) ifp->if_flags = IFF_SIMPLEX; ifp->if_ioctl = hatm_ioctl; ifp->if_start = hatm_start; - ifp->if_watchdog = NULL; ifp->if_init = hatm_init; utopia_attach(&sc->utopia, IFP2IFATM(sc->ifp), &sc->media, &sc->mtx, Modified: head/sys/dev/ixgbe/ixgbe.c ============================================================================== --- head/sys/dev/ixgbe/ixgbe.c Fri Nov 6 14:52:37 2009 (r198987) +++ head/sys/dev/ixgbe/ixgbe.c Fri Nov 6 14:55:01 2009 (r198988) @@ -2508,8 +2508,6 @@ ixgbe_setup_interface(device_t dev, stru ifp->if_transmit = ixgbe_mq_start; ifp->if_qflush = ixgbe_qflush; #endif - ifp->if_timer = 0; - ifp->if_watchdog = NULL; ifp->if_snd.ifq_maxlen = adapter->num_tx_desc - 2; ether_ifattach(ifp, adapter->hw.mac.addr); Modified: head/sys/dev/nfe/if_nfe.c ============================================================================== --- head/sys/dev/nfe/if_nfe.c Fri Nov 6 14:52:37 2009 (r198987) +++ head/sys/dev/nfe/if_nfe.c Fri Nov 6 14:55:01 2009 (r198988) @@ -567,7 +567,6 @@ nfe_attach(device_t dev) ifp->if_start = nfe_start; ifp->if_hwassist = 0; ifp->if_capabilities = 0; - ifp->if_watchdog = NULL; ifp->if_init = nfe_init; IFQ_SET_MAXLEN(&ifp->if_snd, NFE_TX_RING_COUNT - 1); ifp->if_snd.ifq_drv_maxlen = NFE_TX_RING_COUNT - 1; Modified: head/sys/dev/patm/if_patm_attach.c ============================================================================== --- head/sys/dev/patm/if_patm_attach.c Fri Nov 6 14:52:37 2009 (r198987) +++ head/sys/dev/patm/if_patm_attach.c Fri Nov 6 14:55:01 2009 (r198988) @@ -197,11 +197,9 @@ patm_attach(device_t dev) ifp->if_softc = sc; if_initname(ifp, device_get_name(dev), device_get_unit(dev)); ifp->if_flags = IFF_SIMPLEX; - ifp->if_watchdog = NULL; ifp->if_init = patm_init; ifp->if_ioctl = patm_ioctl; ifp->if_start = patm_start; - ifp->if_watchdog = NULL; /* do this early so we can destroy unconditionally */ mtx_init(&sc->mtx, device_get_nameunit(dev), Modified: head/sys/dev/sk/if_sk.c ============================================================================== --- head/sys/dev/sk/if_sk.c Fri Nov 6 14:52:37 2009 (r198987) +++ head/sys/dev/sk/if_sk.c Fri Nov 6 14:55:01 2009 (r198988) @@ -1372,8 +1372,6 @@ sk_attach(dev) ifp->if_capenable = ifp->if_capabilities; ifp->if_ioctl = sk_ioctl; ifp->if_start = sk_start; - ifp->if_timer = 0; - ifp->if_watchdog = NULL; ifp->if_init = sk_init; IFQ_SET_MAXLEN(&ifp->if_snd, SK_TX_RING_CNT - 1); ifp->if_snd.ifq_drv_maxlen = SK_TX_RING_CNT - 1; Modified: head/sys/dev/stge/if_stge.c ============================================================================== --- head/sys/dev/stge/if_stge.c Fri Nov 6 14:52:37 2009 (r198987) +++ head/sys/dev/stge/if_stge.c Fri Nov 6 14:55:01 2009 (r198988) @@ -722,8 +722,6 @@ stge_attach(device_t dev) ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_ioctl = stge_ioctl; ifp->if_start = stge_start; - ifp->if_timer = 0; - ifp->if_watchdog = NULL; ifp->if_init = stge_init; ifp->if_mtu = ETHERMTU; ifp->if_snd.ifq_drv_maxlen = STGE_TX_RING_CNT - 1; Modified: head/sys/net/if_ef.c ============================================================================== --- head/sys/net/if_ef.c Fri Nov 6 14:52:37 2009 (r198987) +++ head/sys/net/if_ef.c Fri Nov 6 14:55:01 2009 (r198988) @@ -128,7 +128,6 @@ ef_attach(struct efnet *sc) struct ifnet *ifp = sc->ef_ifp; ifp->if_start = ef_start; - ifp->if_watchdog = NULL; ifp->if_init = ef_init; ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; ifp->if_flags = (IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST); Modified: head/sys/net80211/ieee80211.c ============================================================================== --- head/sys/net80211/ieee80211.c Fri Nov 6 14:52:37 2009 (r198987) +++ head/sys/net80211/ieee80211.c Fri Nov 6 14:55:01 2009 (r198988) @@ -391,7 +391,6 @@ ieee80211_vap_setup(struct ieee80211com ifp->if_flags = IFF_SIMPLEX | IFF_BROADCAST | IFF_MULTICAST; ifp->if_start = ieee80211_start; ifp->if_ioctl = ieee80211_ioctl; - ifp->if_watchdog = NULL; /* NB: no watchdog routine */ ifp->if_init = ieee80211_init; /* NB: input+output filled in by ether_ifattach */ IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); Modified: head/sys/netgraph/ng_eiface.c ============================================================================== --- head/sys/netgraph/ng_eiface.c Fri Nov 6 14:52:37 2009 (r198987) +++ head/sys/netgraph/ng_eiface.c Fri Nov 6 14:55:01 2009 (r198988) @@ -369,7 +369,6 @@ ng_eiface_constructor(node_p node) ifp->if_output = ether_output; ifp->if_start = ng_eiface_start; ifp->if_ioctl = ng_eiface_ioctl; - ifp->if_watchdog = NULL; ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; ifp->if_flags = (IFF_SIMPLEX | IFF_BROADCAST | IFF_MULTICAST); Modified: head/sys/netgraph/ng_fec.c ============================================================================== --- head/sys/netgraph/ng_fec.c Fri Nov 6 14:52:37 2009 (r198987) +++ head/sys/netgraph/ng_fec.c Fri Nov 6 14:55:01 2009 (r198988) @@ -1226,7 +1226,6 @@ ng_fec_constructor(node_p node) ifp->if_start = ng_fec_start; ifp->if_ioctl = ng_fec_ioctl; ifp->if_init = ng_fec_init; - ifp->if_watchdog = NULL; ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; ifp->if_mtu = NG_FEC_MTU_DEFAULT; ifp->if_flags = (IFF_SIMPLEX|IFF_BROADCAST|IFF_MULTICAST); Modified: head/sys/netgraph/ng_iface.c ============================================================================== --- head/sys/netgraph/ng_iface.c Fri Nov 6 14:52:37 2009 (r198987) +++ head/sys/netgraph/ng_iface.c Fri Nov 6 14:55:01 2009 (r198988) @@ -558,7 +558,6 @@ ng_iface_constructor(node_p node) ifp->if_output = ng_iface_output; ifp->if_start = ng_iface_start; ifp->if_ioctl = ng_iface_ioctl; - ifp->if_watchdog = NULL; ifp->if_mtu = NG_IFACE_MTU_DEFAULT; ifp->if_flags = (IFF_SIMPLEX|IFF_POINTOPOINT|IFF_NOARP|IFF_MULTICAST); ifp->if_type = IFT_PROPVIRTUAL; /* XXX */ Modified: head/sys/netgraph/ng_sppp.c ============================================================================== --- head/sys/netgraph/ng_sppp.c Fri Nov 6 14:52:37 2009 (r198987) +++ head/sys/netgraph/ng_sppp.c Fri Nov 6 14:55:01 2009 (r198988) @@ -279,7 +279,6 @@ ng_sppp_constructor (node_p node) if_initname (SP2IFP(pp), NG_SPPP_IFACE_NAME, priv->unit); ifp->if_start = ng_sppp_start; ifp->if_ioctl = ng_sppp_ioctl; - ifp->if_watchdog = NULL; ifp->if_flags = (IFF_POINTOPOINT|IFF_MULTICAST); /* Give this node the same name as the interface (if possible) */ From owner-svn-src-all@FreeBSD.ORG Fri Nov 6 15:00:02 2009 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 7AD9A106566C; Fri, 6 Nov 2009 15:00:02 +0000 (UTC) (envelope-from artis.caune@gmail.com) Received: from mail-fx0-f227.google.com (mail-fx0-f227.google.com [209.85.220.227]) by mx1.freebsd.org (Postfix) with ESMTP id 611CA8FC18; Fri, 6 Nov 2009 15:00:01 +0000 (UTC) Received: by fxm27 with SMTP id 27so256413fxm.3 for ; Fri, 06 Nov 2009 07:00:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=ULk6Pr5EaXslJg7qqYg1iphzcy6S/WTx4MXwyrtMhUk=; b=BgiwZjnNEm8Aubi+vHRahZZmoDdi4MsPRUNmhdXrOGYJVpXPVb/XoyQKHPo63o0uYJ qUM/pNEuEqy8JKvtFBvDn+jo/GJ4qJp5iGLiLUSWAcs49cjNNwESR2k/AgNCLoVBZEn5 gpAqZ9hgzLdAIbAg98CZB7Sv0tCRS0hqW7v3g= 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=wc5Cqqeqvt64Xn3f5m7ChNpbsC/dHCocdvlBjRvJDD1MEG5RjLvtujh+m1ZnByWzpb sl1c/UPs0svprPgoiuByQQX11RFM2NCggU8uyW5tA+BBThUvjvi9pvD5lBdt0iRPOCo4 tXkOMyquOGzGGYwE8Rfa/7ydmghTcgQJgtd7w= MIME-Version: 1.0 Received: by 10.204.3.19 with SMTP id 19mr4633230bkl.151.1257519600273; Fri, 06 Nov 2009 07:00:00 -0800 (PST) In-Reply-To: <200911061015.nA6AFFMK012872@svn.freebsd.org> References: <200911061015.nA6AFFMK012872@svn.freebsd.org> Date: Fri, 6 Nov 2009 17:00:00 +0200 Message-ID: <9e20d71e0911060700m26365f0eqafc418af097c83a8@mail.gmail.com> From: Artis Caune To: Attilio Rao Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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: r198977 - in stable/8/sys: amd64/amd64 i386/i386 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, 06 Nov 2009 15:00:02 -0000 2009/11/6 Attilio Rao : > Author: attilio > Date: Fri Nov =C2=A06 10:15:15 2009 > New Revision: 198977 > URL: http://svn.freebsd.org/changeset/base/198977 > > Log: > =C2=A0MFC r198868, r198950: > =C2=A0Opteron rev E family of processor expose a bug where acq memory bar= riers > =C2=A0can be broken, resulting in random breakages. > =C2=A0Printout a warning message if affecred family and model are found. Hi, I can not compile kernel anymore: cc1: warnings being treated as errors /usr/src/sys/amd64/amd64/identcpu.c: In function 'print_AMD_info': /usr/src/sys/amd64/amd64/identcpu.c:621: warning: implicit declaration of function 'CPUID_TO_FAMILY' /usr/src/sys/amd64/amd64/identcpu.c:621: warning: nested extern declaration of 'CPUID_TO_FAMILY' /usr/src/sys/amd64/amd64/identcpu.c:621: warning: implicit declaration of function 'CPUID_TO_MODEL' /usr/src/sys/amd64/amd64/identcpu.c:621: warning: nested extern declaration of 'CPUID_TO_MODEL' *** Error code 1 --=20 Artis Caune Everything should be made as simple as possible, but not simpler. From owner-svn-src-all@FreeBSD.ORG Fri Nov 6 15:24:49 2009 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 26B41106566B; Fri, 6 Nov 2009 15:24:49 +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 1333A8FC13; Fri, 6 Nov 2009 15:24: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 nA6FOm6n021062; Fri, 6 Nov 2009 15:24:48 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA6FOmAJ021052; Fri, 6 Nov 2009 15:24:48 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <200911061524.nA6FOmAJ021052@svn.freebsd.org> From: Attilio Rao Date: Fri, 6 Nov 2009 15:24:48 +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: r198989 - in stable/8/sys: amd64/amd64 amd64/include i386/cpufreq i386/i386 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: Fri, 06 Nov 2009 15:24:49 -0000 Author: attilio Date: Fri Nov 6 15:24:48 2009 New Revision: 198989 URL: http://svn.freebsd.org/changeset/base/198989 Log: MFC r197070: Consolidate CPUID to CPU family/model macros for amd64 and i386 to reduce unnecessary #ifdef's for shared code between them. This MFC should unbreak the kernel build breakage introduced by r198977. Reported by: kib Pointy hat to: me Modified: stable/8/sys/amd64/amd64/identcpu.c stable/8/sys/amd64/amd64/initcpu.c stable/8/sys/amd64/amd64/msi.c stable/8/sys/amd64/include/specialreg.h stable/8/sys/i386/cpufreq/hwpstate.c stable/8/sys/i386/i386/identcpu.c stable/8/sys/i386/i386/msi.c stable/8/sys/i386/i386/pmap.c stable/8/sys/i386/include/specialreg.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/amd64/amd64/identcpu.c ============================================================================== --- stable/8/sys/amd64/amd64/identcpu.c Fri Nov 6 14:55:01 2009 (r198988) +++ stable/8/sys/amd64/amd64/identcpu.c Fri Nov 6 15:24:48 2009 (r198989) @@ -371,21 +371,21 @@ printcpuinfo(void) switch (cpu_vendor_id) { case CPU_VENDOR_AMD: if ((amd_pminfo & AMDPM_TSC_INVARIANT) || - AMD64_CPU_FAMILY(cpu_id) >= 0x10 || + CPUID_TO_FAMILY(cpu_id) >= 0x10 || cpu_id == 0x60fb2) tsc_is_invariant = 1; break; case CPU_VENDOR_INTEL: if ((amd_pminfo & AMDPM_TSC_INVARIANT) || - (AMD64_CPU_FAMILY(cpu_id) == 0x6 && - AMD64_CPU_MODEL(cpu_id) >= 0xe) || - (AMD64_CPU_FAMILY(cpu_id) == 0xf && - AMD64_CPU_MODEL(cpu_id) >= 0x3)) + (CPUID_TO_FAMILY(cpu_id) == 0x6 && + CPUID_TO_MODEL(cpu_id) >= 0xe) || + (CPUID_TO_FAMILY(cpu_id) == 0xf && + CPUID_TO_MODEL(cpu_id) >= 0x3)) tsc_is_invariant = 1; break; case CPU_VENDOR_CENTAUR: - if (AMD64_CPU_FAMILY(cpu_id) == 0x6 && - AMD64_CPU_MODEL(cpu_id) >= 0xf && + if (CPUID_TO_FAMILY(cpu_id) == 0x6 && + CPUID_TO_MODEL(cpu_id) >= 0xf && (rdmsr(0x1203) & 0x100000000ULL) == 0) tsc_is_invariant = 1; break; Modified: stable/8/sys/amd64/amd64/initcpu.c ============================================================================== --- stable/8/sys/amd64/amd64/initcpu.c Fri Nov 6 14:55:01 2009 (r198988) +++ stable/8/sys/amd64/amd64/initcpu.c Fri Nov 6 15:24:48 2009 (r198989) @@ -154,8 +154,8 @@ initializecpu(void) pg_nx = PG_NX; } if (cpu_vendor_id == CPU_VENDOR_CENTAUR && - AMD64_CPU_FAMILY(cpu_id) == 0x6 && - AMD64_CPU_MODEL(cpu_id) >= 0xf) + CPUID_TO_FAMILY(cpu_id) == 0x6 && + CPUID_TO_MODEL(cpu_id) >= 0xf) init_via(); /* Modified: stable/8/sys/amd64/amd64/msi.c ============================================================================== --- stable/8/sys/amd64/amd64/msi.c Fri Nov 6 14:55:01 2009 (r198988) +++ stable/8/sys/amd64/amd64/msi.c Fri Nov 6 15:24:48 2009 (r198989) @@ -275,8 +275,8 @@ msi_init(void) case CPU_VENDOR_AMD: break; case CPU_VENDOR_CENTAUR: - if (AMD64_CPU_FAMILY(cpu_id) == 0x6 && - AMD64_CPU_MODEL(cpu_id) >= 0xf) + if (CPUID_TO_FAMILY(cpu_id) == 0x6 && + CPUID_TO_MODEL(cpu_id) >= 0xf) break; /* FALLTHROUGH */ default: Modified: stable/8/sys/amd64/include/specialreg.h ============================================================================== --- stable/8/sys/amd64/include/specialreg.h Fri Nov 6 14:55:01 2009 (r198988) +++ stable/8/sys/amd64/include/specialreg.h Fri Nov 6 15:24:48 2009 (r198989) @@ -168,10 +168,10 @@ #define CPUID_FAMILY 0x00000f00 #define CPUID_EXT_MODEL 0x000f0000 #define CPUID_EXT_FAMILY 0x0ff00000 -#define AMD64_CPU_MODEL(id) \ +#define CPUID_TO_MODEL(id) \ ((((id) & CPUID_MODEL) >> 4) | \ (((id) & CPUID_EXT_MODEL) >> 12)) -#define AMD64_CPU_FAMILY(id) \ +#define CPUID_TO_FAMILY(id) \ ((((id) & CPUID_FAMILY) >> 8) + \ (((id) & CPUID_EXT_FAMILY) >> 20)) Modified: stable/8/sys/i386/cpufreq/hwpstate.c ============================================================================== --- stable/8/sys/i386/cpufreq/hwpstate.c Fri Nov 6 14:55:01 2009 (r198988) +++ stable/8/sys/i386/cpufreq/hwpstate.c Fri Nov 6 15:24:48 2009 (r198989) @@ -83,12 +83,6 @@ __FBSDID("$FreeBSD$"); #define AMD_10H_11H_CUR_DID(msr) (((msr) >> 6) & 0x07) #define AMD_10H_11H_CUR_FID(msr) ((msr) & 0x3F) -#if defined(__amd64__) -#define CPU_FAMILY(id) AMD64_CPU_FAMILY(id) -#elif defined(__i386__) -#define CPU_FAMILY(id) I386_CPU_FAMILY(id) -#endif - #define HWPSTATE_DEBUG(dev, msg...) \ do{ \ if(hwpstate_verbose) \ @@ -302,7 +296,7 @@ hwpstate_identify(driver_t *driver, devi if (device_find_child(parent, "hwpstate", -1) != NULL) return; - if (cpu_vendor_id != CPU_VENDOR_AMD || CPU_FAMILY(cpu_id) < 0x10) + if (cpu_vendor_id != CPU_VENDOR_AMD || CPUID_TO_FAMILY(cpu_id) < 0x10) return; /* @@ -405,7 +399,7 @@ hwpstate_get_info_from_msr(device_t dev) uint64_t msr; int family, i, fid, did; - family = CPU_FAMILY(cpu_id); + family = CPUID_TO_FAMILY(cpu_id); sc = device_get_softc(dev); /* Get pstate count */ msr = rdmsr(MSR_AMD_10H_11H_LIMIT); Modified: stable/8/sys/i386/i386/identcpu.c ============================================================================== --- stable/8/sys/i386/i386/identcpu.c Fri Nov 6 14:55:01 2009 (r198988) +++ stable/8/sys/i386/i386/identcpu.c Fri Nov 6 15:24:48 2009 (r198989) @@ -858,21 +858,21 @@ printcpuinfo(void) switch (cpu_vendor_id) { case CPU_VENDOR_AMD: if ((amd_pminfo & AMDPM_TSC_INVARIANT) || - I386_CPU_FAMILY(cpu_id) >= 0x10 || + CPUID_TO_FAMILY(cpu_id) >= 0x10 || cpu_id == 0x60fb2) tsc_is_invariant = 1; break; case CPU_VENDOR_INTEL: if ((amd_pminfo & AMDPM_TSC_INVARIANT) || - (I386_CPU_FAMILY(cpu_id) == 0x6 && - I386_CPU_MODEL(cpu_id) >= 0xe) || - (I386_CPU_FAMILY(cpu_id) == 0xf && - I386_CPU_MODEL(cpu_id) >= 0x3)) + (CPUID_TO_FAMILY(cpu_id) == 0x6 && + CPUID_TO_MODEL(cpu_id) >= 0xe) || + (CPUID_TO_FAMILY(cpu_id) == 0xf && + CPUID_TO_MODEL(cpu_id) >= 0x3)) tsc_is_invariant = 1; break; case CPU_VENDOR_CENTAUR: - if (I386_CPU_FAMILY(cpu_id) == 0x6 && - I386_CPU_MODEL(cpu_id) >= 0xf && + if (CPUID_TO_FAMILY(cpu_id) == 0x6 && + CPUID_TO_MODEL(cpu_id) >= 0xf && (rdmsr(0x1203) & 0x100000000ULL) == 0) tsc_is_invariant = 1; break; @@ -1106,8 +1106,8 @@ finishidentcpu(void) * XXX This is only done on the BSP package. */ if (cpu_vendor_id == CPU_VENDOR_INTEL && cpu_high > 0 && cpu_high < 4 && - ((I386_CPU_FAMILY(cpu_id) == 0xf && I386_CPU_MODEL(cpu_id) >= 0x3) || - (I386_CPU_FAMILY(cpu_id) == 0x6 && I386_CPU_MODEL(cpu_id) >= 0xe))) { + ((CPUID_TO_FAMILY(cpu_id) == 0xf && CPUID_TO_MODEL(cpu_id) >= 0x3) || + (CPUID_TO_FAMILY(cpu_id) == 0x6 && CPUID_TO_MODEL(cpu_id) >= 0xe))) { uint64_t msr; msr = rdmsr(MSR_IA32_MISC_ENABLE); if ((msr & 0x400000ULL) != 0) { Modified: stable/8/sys/i386/i386/msi.c ============================================================================== --- stable/8/sys/i386/i386/msi.c Fri Nov 6 14:55:01 2009 (r198988) +++ stable/8/sys/i386/i386/msi.c Fri Nov 6 15:24:48 2009 (r198989) @@ -275,8 +275,8 @@ msi_init(void) case CPU_VENDOR_AMD: break; case CPU_VENDOR_CENTAUR: - if (I386_CPU_FAMILY(cpu_id) == 0x6 && - I386_CPU_MODEL(cpu_id) >= 0xf) + if (CPUID_TO_FAMILY(cpu_id) == 0x6 && + CPUID_TO_MODEL(cpu_id) >= 0xf) break; /* FALLTHROUGH */ default: Modified: stable/8/sys/i386/i386/pmap.c ============================================================================== --- stable/8/sys/i386/i386/pmap.c Fri Nov 6 14:55:01 2009 (r198988) +++ stable/8/sys/i386/i386/pmap.c Fri Nov 6 15:24:48 2009 (r198989) @@ -484,7 +484,7 @@ pmap_init_pat(void) return; if (cpu_vendor_id != CPU_VENDOR_INTEL || - (I386_CPU_FAMILY(cpu_id) == 6 && I386_CPU_MODEL(cpu_id) >= 0xe)) { + (CPUID_TO_FAMILY(cpu_id) == 6 && CPUID_TO_MODEL(cpu_id) >= 0xe)) { /* * Leave the indices 0-3 at the default of WB, WT, UC, and UC-. * Program 4 and 5 as WP and WC. Modified: stable/8/sys/i386/include/specialreg.h ============================================================================== --- stable/8/sys/i386/include/specialreg.h Fri Nov 6 14:55:01 2009 (r198988) +++ stable/8/sys/i386/include/specialreg.h Fri Nov 6 15:24:48 2009 (r198989) @@ -165,11 +165,11 @@ #define CPUID_FAMILY 0x00000f00 #define CPUID_EXT_MODEL 0x000f0000 #define CPUID_EXT_FAMILY 0x0ff00000 -#define I386_CPU_MODEL(id) \ +#define CPUID_TO_MODEL(id) \ ((((id) & CPUID_MODEL) >> 4) | \ ((((id) & CPUID_FAMILY) >= 0x600) ? \ (((id) & CPUID_EXT_MODEL) >> 12) : 0)) -#define I386_CPU_FAMILY(id) \ +#define CPUID_TO_FAMILY(id) \ ((((id) & CPUID_FAMILY) >> 8) + \ ((((id) & CPUID_FAMILY) == 0xf00) ? \ (((id) & CPUID_EXT_FAMILY) >> 20) : 0)) From owner-svn-src-all@FreeBSD.ORG Fri Nov 6 15:25:37 2009 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 F16BC106568D; Fri, 6 Nov 2009 15:25:37 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-fx0-f227.google.com (mail-fx0-f227.google.com [209.85.220.227]) by mx1.freebsd.org (Postfix) with ESMTP id 12C358FC1A; Fri, 6 Nov 2009 15:25:36 +0000 (UTC) Received: by fxm27 with SMTP id 27so265639fxm.3 for ; Fri, 06 Nov 2009 07:25:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type; bh=7lfVhf0pi9Xw0T2WLj2OCLWk1mHmvRXUYu+jz2V8Ues=; b=qTsvsL443CKzD5Fye8NNUakUxWUJrhJppTGIIAAnRt269gSqk7cevVCuZa2a2O8ZVi 5h0WENQFqE26GJ6rMKyJUyGDCKkoCSUU3hSIwk3YqvtxrNwNXfP4N4guazUKRHBjlpRi 5Ont5jAVq8/H0PCQpC42Ei9owF7OFapWiwGAY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=noMSM+k0kGl09+zopdiRrc9k+rd2bpOxBiURXOJtt3JR/9sgRH0+fYQIu2SKfH/CLl y8Wi4qvjnISpv/oi11nJFXO4Em55hR+4Q67OfrmuKiFhTBSubYClCdQQnPgH625IyAh+ hSf0IHzoSWHNxoyd9Oj31dY9qJkJftnLT1NOc= MIME-Version: 1.0 Sender: asmrookie@gmail.com Received: by 10.223.14.140 with SMTP id g12mr650812faa.50.1257521136050; Fri, 06 Nov 2009 07:25:36 -0800 (PST) In-Reply-To: <9e20d71e0911060700m26365f0eqafc418af097c83a8@mail.gmail.com> References: <200911061015.nA6AFFMK012872@svn.freebsd.org> <9e20d71e0911060700m26365f0eqafc418af097c83a8@mail.gmail.com> Date: Fri, 6 Nov 2009 16:25:35 +0100 X-Google-Sender-Auth: 6c3b90fdba6a43c1 Message-ID: <3bbf2fe10911060725i5e444dbane2cbc059aa57fb87@mail.gmail.com> From: Attilio Rao To: Artis Caune Content-Type: text/plain; charset=UTF-8 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: r198977 - in stable/8/sys: amd64/amd64 i386/i386 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, 06 Nov 2009 15:25:38 -0000 2009/11/6 Artis Caune : > 2009/11/6 Attilio Rao : >> Author: attilio >> Date: Fri Nov 6 10:15:15 2009 >> New Revision: 198977 >> URL: http://svn.freebsd.org/changeset/base/198977 >> >> Log: >> MFC r198868, r198950: >> Opteron rev E family of processor expose a bug where acq memory barriers >> can be broken, resulting in random breakages. >> Printout a warning message if affecred family and model are found. > > Hi, > > I can not compile kernel anymore: Fixed with r198989. Sorry for the mis-service. Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-svn-src-all@FreeBSD.ORG Fri Nov 6 16:34:42 2009 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 77414106566B for ; Fri, 6 Nov 2009 16:34:42 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from mail-gw1.york.ac.uk (mail-gw1.york.ac.uk [144.32.128.246]) by mx1.freebsd.org (Postfix) with ESMTP id 0A96F8FC1A for ; Fri, 6 Nov 2009 16:34:41 +0000 (UTC) Received: from mail-gw6.york.ac.uk (mail-gw6.york.ac.uk [144.32.129.26]) by mail-gw1.york.ac.uk (8.13.6/8.13.6) with ESMTP id nA6GYc57023942; Fri, 6 Nov 2009 16:34:38 GMT Received: from buffy-128.york.ac.uk ([144.32.128.160] helo=buffy.york.ac.uk) by mail-gw6.york.ac.uk with esmtps (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1N6Rlm-0004c6-S3; Fri, 06 Nov 2009 16:34:38 +0000 Received: from buffy.york.ac.uk (localhost [127.0.0.1]) by buffy.york.ac.uk (8.14.3/8.14.3) with ESMTP id nA6GYcjC066390; Fri, 6 Nov 2009 16:34:38 GMT (envelope-from gavin@FreeBSD.org) Received: (from ga9@localhost) by buffy.york.ac.uk (8.14.3/8.14.3/Submit) id nA6GYc2w066389; Fri, 6 Nov 2009 16:34:38 GMT (envelope-from gavin@FreeBSD.org) X-Authentication-Warning: buffy.york.ac.uk: ga9 set sender to gavin@FreeBSD.org using -f From: Gavin Atkinson To: John Baldwin In-Reply-To: <200911061452.nA6Eqbxm020072@svn.freebsd.org> References: <200911061452.nA6Eqbxm020072@svn.freebsd.org> Content-Type: text/plain Content-Transfer-Encoding: 7bit Date: Fri, 06 Nov 2009 16:34:37 +0000 Message-Id: <1257525277.64262.5.camel@buffy.york.ac.uk> Mime-Version: 1.0 X-Mailer: Evolution 2.26.3 FreeBSD GNOME Team Port X-York-MailScanner: Found to be clean X-York-MailScanner-From: gavin@freebsd.org Cc: svn-src-all@FreeBSD.org Subject: Re: svn commit: r198987 - in head/sys/dev: an ixgb vge 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, 06 Nov 2009 16:34:42 -0000 On Fri, 2009-11-06 at 14:52 +0000, John Baldwin wrote: > Author: jhb > Date: Fri Nov 6 14:52:37 2009 > New Revision: 198987 > URL: http://svn.freebsd.org/changeset/base/198987 > > Log: > Use device_printf() and if_printf() instead of printf() with an explicit > unit number and remove 'unit' members from softc. > > Modified: > head/sys/dev/an/if_an.c [snip] This covers most, but not all of my PR 126924 - is there any chance you could look at the rest of it? (I can create a new patch if you wish). Thanks, Gavin From owner-svn-src-all@FreeBSD.ORG Fri Nov 6 16:55:05 2009 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 F16C11065670; Fri, 6 Nov 2009 16:55:05 +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 E09588FC24; Fri, 6 Nov 2009 16:55: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 nA6Gt5Hd022832; Fri, 6 Nov 2009 16:55:05 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA6Gt5HW022830; Fri, 6 Nov 2009 16:55:05 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200911061655.nA6Gt5HW022830@svn.freebsd.org> From: John Baldwin Date: Fri, 6 Nov 2009 16:55: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: r198990 - 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: Fri, 06 Nov 2009 16:55:06 -0000 Author: jhb Date: Fri Nov 6 16:55:05 2009 New Revision: 198990 URL: http://svn.freebsd.org/changeset/base/198990 Log: Several years ago a feature was added to TCP that casued soreceive() to send an ACK right away if data was drained from a TCP socket that had previously advertised a zero-sized window. The current code requires the receive window to be exactly zero for this to kick in. If window scaling is enabled and the window is smaller than the scale, then the effective window that is advertised is zero. However, in that case the zero-sized window handling is not enabled because the window is not exactly zero. The fix changes the code to check the raw window value against zero. Reviewed by: bz MFC after: 1 week Modified: head/sys/netinet/tcp_output.c Modified: head/sys/netinet/tcp_output.c ============================================================================== --- head/sys/netinet/tcp_output.c Fri Nov 6 15:24:48 2009 (r198989) +++ head/sys/netinet/tcp_output.c Fri Nov 6 16:55:05 2009 (r198990) @@ -992,7 +992,7 @@ send: * to read more data than can be buffered prior to transmitting on * the connection. */ - if (recwin == 0) + if (th->th_win == 0) tp->t_flags |= TF_RXWIN0SENT; else tp->t_flags &= ~TF_RXWIN0SENT; From owner-svn-src-all@FreeBSD.ORG Fri Nov 6 17:09:05 2009 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 205E4106566C; Fri, 6 Nov 2009 17:09:05 +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 0D97F8FC08; Fri, 6 Nov 2009 17:09: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 nA6H941J023157; Fri, 6 Nov 2009 17:09:04 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA6H94eh023147; Fri, 6 Nov 2009 17:09:04 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <200911061709.nA6H94eh023147@svn.freebsd.org> From: Attilio Rao Date: Fri, 6 Nov 2009 17:09:04 +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: r198991 - in releng/8.0/sys: amd64/amd64 amd64/include i386/cpufreq i386/i386 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: Fri, 06 Nov 2009 17:09:05 -0000 Author: attilio Date: Fri Nov 6 17:09:04 2009 New Revision: 198991 URL: http://svn.freebsd.org/changeset/base/198991 Log: MFC r197070: Consolidate CPUID to CPU family/model macros for amd64 and i386 to reduce unnecessary #ifdef's for shared code between them. This MFC should unbreak the kernel build breakage introduced by r198978. Reported by: kib Pointy hat to: me Approved by: re (kib) Modified: releng/8.0/sys/amd64/amd64/identcpu.c releng/8.0/sys/amd64/amd64/initcpu.c releng/8.0/sys/amd64/amd64/msi.c releng/8.0/sys/amd64/include/specialreg.h releng/8.0/sys/i386/cpufreq/hwpstate.c releng/8.0/sys/i386/i386/identcpu.c releng/8.0/sys/i386/i386/msi.c releng/8.0/sys/i386/i386/pmap.c releng/8.0/sys/i386/include/specialreg.h Directory Properties: releng/8.0/sys/ (props changed) releng/8.0/sys/amd64/include/xen/ (props changed) releng/8.0/sys/cddl/contrib/opensolaris/ (props changed) releng/8.0/sys/contrib/dev/acpica/ (props changed) releng/8.0/sys/contrib/pf/ (props changed) releng/8.0/sys/dev/xen/xenpci/ (props changed) Modified: releng/8.0/sys/amd64/amd64/identcpu.c ============================================================================== --- releng/8.0/sys/amd64/amd64/identcpu.c Fri Nov 6 16:55:05 2009 (r198990) +++ releng/8.0/sys/amd64/amd64/identcpu.c Fri Nov 6 17:09:04 2009 (r198991) @@ -371,21 +371,21 @@ printcpuinfo(void) switch (cpu_vendor_id) { case CPU_VENDOR_AMD: if ((amd_pminfo & AMDPM_TSC_INVARIANT) || - AMD64_CPU_FAMILY(cpu_id) >= 0x10 || + CPUID_TO_FAMILY(cpu_id) >= 0x10 || cpu_id == 0x60fb2) tsc_is_invariant = 1; break; case CPU_VENDOR_INTEL: if ((amd_pminfo & AMDPM_TSC_INVARIANT) || - (AMD64_CPU_FAMILY(cpu_id) == 0x6 && - AMD64_CPU_MODEL(cpu_id) >= 0xe) || - (AMD64_CPU_FAMILY(cpu_id) == 0xf && - AMD64_CPU_MODEL(cpu_id) >= 0x3)) + (CPUID_TO_FAMILY(cpu_id) == 0x6 && + CPUID_TO_MODEL(cpu_id) >= 0xe) || + (CPUID_TO_FAMILY(cpu_id) == 0xf && + CPUID_TO_MODEL(cpu_id) >= 0x3)) tsc_is_invariant = 1; break; case CPU_VENDOR_CENTAUR: - if (AMD64_CPU_FAMILY(cpu_id) == 0x6 && - AMD64_CPU_MODEL(cpu_id) >= 0xf && + if (CPUID_TO_FAMILY(cpu_id) == 0x6 && + CPUID_TO_MODEL(cpu_id) >= 0xf && (rdmsr(0x1203) & 0x100000000ULL) == 0) tsc_is_invariant = 1; break; Modified: releng/8.0/sys/amd64/amd64/initcpu.c ============================================================================== --- releng/8.0/sys/amd64/amd64/initcpu.c Fri Nov 6 16:55:05 2009 (r198990) +++ releng/8.0/sys/amd64/amd64/initcpu.c Fri Nov 6 17:09:04 2009 (r198991) @@ -154,8 +154,8 @@ initializecpu(void) pg_nx = PG_NX; } if (cpu_vendor_id == CPU_VENDOR_CENTAUR && - AMD64_CPU_FAMILY(cpu_id) == 0x6 && - AMD64_CPU_MODEL(cpu_id) >= 0xf) + CPUID_TO_FAMILY(cpu_id) == 0x6 && + CPUID_TO_MODEL(cpu_id) >= 0xf) init_via(); /* Modified: releng/8.0/sys/amd64/amd64/msi.c ============================================================================== --- releng/8.0/sys/amd64/amd64/msi.c Fri Nov 6 16:55:05 2009 (r198990) +++ releng/8.0/sys/amd64/amd64/msi.c Fri Nov 6 17:09:04 2009 (r198991) @@ -275,8 +275,8 @@ msi_init(void) case CPU_VENDOR_AMD: break; case CPU_VENDOR_CENTAUR: - if (AMD64_CPU_FAMILY(cpu_id) == 0x6 && - AMD64_CPU_MODEL(cpu_id) >= 0xf) + if (CPUID_TO_FAMILY(cpu_id) == 0x6 && + CPUID_TO_MODEL(cpu_id) >= 0xf) break; /* FALLTHROUGH */ default: Modified: releng/8.0/sys/amd64/include/specialreg.h ============================================================================== --- releng/8.0/sys/amd64/include/specialreg.h Fri Nov 6 16:55:05 2009 (r198990) +++ releng/8.0/sys/amd64/include/specialreg.h Fri Nov 6 17:09:04 2009 (r198991) @@ -168,10 +168,10 @@ #define CPUID_FAMILY 0x00000f00 #define CPUID_EXT_MODEL 0x000f0000 #define CPUID_EXT_FAMILY 0x0ff00000 -#define AMD64_CPU_MODEL(id) \ +#define CPUID_TO_MODEL(id) \ ((((id) & CPUID_MODEL) >> 4) | \ (((id) & CPUID_EXT_MODEL) >> 12)) -#define AMD64_CPU_FAMILY(id) \ +#define CPUID_TO_FAMILY(id) \ ((((id) & CPUID_FAMILY) >> 8) + \ (((id) & CPUID_EXT_FAMILY) >> 20)) Modified: releng/8.0/sys/i386/cpufreq/hwpstate.c ============================================================================== --- releng/8.0/sys/i386/cpufreq/hwpstate.c Fri Nov 6 16:55:05 2009 (r198990) +++ releng/8.0/sys/i386/cpufreq/hwpstate.c Fri Nov 6 17:09:04 2009 (r198991) @@ -83,12 +83,6 @@ __FBSDID("$FreeBSD$"); #define AMD_10H_11H_CUR_DID(msr) (((msr) >> 6) & 0x07) #define AMD_10H_11H_CUR_FID(msr) ((msr) & 0x3F) -#if defined(__amd64__) -#define CPU_FAMILY(id) AMD64_CPU_FAMILY(id) -#elif defined(__i386__) -#define CPU_FAMILY(id) I386_CPU_FAMILY(id) -#endif - #define HWPSTATE_DEBUG(dev, msg...) \ do{ \ if(hwpstate_verbose) \ @@ -302,7 +296,7 @@ hwpstate_identify(driver_t *driver, devi if (device_find_child(parent, "hwpstate", -1) != NULL) return; - if (cpu_vendor_id != CPU_VENDOR_AMD || CPU_FAMILY(cpu_id) < 0x10) + if (cpu_vendor_id != CPU_VENDOR_AMD || CPUID_TO_FAMILY(cpu_id) < 0x10) return; /* @@ -405,7 +399,7 @@ hwpstate_get_info_from_msr(device_t dev) uint64_t msr; int family, i, fid, did; - family = CPU_FAMILY(cpu_id); + family = CPUID_TO_FAMILY(cpu_id); sc = device_get_softc(dev); /* Get pstate count */ msr = rdmsr(MSR_AMD_10H_11H_LIMIT); Modified: releng/8.0/sys/i386/i386/identcpu.c ============================================================================== --- releng/8.0/sys/i386/i386/identcpu.c Fri Nov 6 16:55:05 2009 (r198990) +++ releng/8.0/sys/i386/i386/identcpu.c Fri Nov 6 17:09:04 2009 (r198991) @@ -858,21 +858,21 @@ printcpuinfo(void) switch (cpu_vendor_id) { case CPU_VENDOR_AMD: if ((amd_pminfo & AMDPM_TSC_INVARIANT) || - I386_CPU_FAMILY(cpu_id) >= 0x10 || + CPUID_TO_FAMILY(cpu_id) >= 0x10 || cpu_id == 0x60fb2) tsc_is_invariant = 1; break; case CPU_VENDOR_INTEL: if ((amd_pminfo & AMDPM_TSC_INVARIANT) || - (I386_CPU_FAMILY(cpu_id) == 0x6 && - I386_CPU_MODEL(cpu_id) >= 0xe) || - (I386_CPU_FAMILY(cpu_id) == 0xf && - I386_CPU_MODEL(cpu_id) >= 0x3)) + (CPUID_TO_FAMILY(cpu_id) == 0x6 && + CPUID_TO_MODEL(cpu_id) >= 0xe) || + (CPUID_TO_FAMILY(cpu_id) == 0xf && + CPUID_TO_MODEL(cpu_id) >= 0x3)) tsc_is_invariant = 1; break; case CPU_VENDOR_CENTAUR: - if (I386_CPU_FAMILY(cpu_id) == 0x6 && - I386_CPU_MODEL(cpu_id) >= 0xf && + if (CPUID_TO_FAMILY(cpu_id) == 0x6 && + CPUID_TO_MODEL(cpu_id) >= 0xf && (rdmsr(0x1203) & 0x100000000ULL) == 0) tsc_is_invariant = 1; break; @@ -1106,8 +1106,8 @@ finishidentcpu(void) * XXX This is only done on the BSP package. */ if (cpu_vendor_id == CPU_VENDOR_INTEL && cpu_high > 0 && cpu_high < 4 && - ((I386_CPU_FAMILY(cpu_id) == 0xf && I386_CPU_MODEL(cpu_id) >= 0x3) || - (I386_CPU_FAMILY(cpu_id) == 0x6 && I386_CPU_MODEL(cpu_id) >= 0xe))) { + ((CPUID_TO_FAMILY(cpu_id) == 0xf && CPUID_TO_MODEL(cpu_id) >= 0x3) || + (CPUID_TO_FAMILY(cpu_id) == 0x6 && CPUID_TO_MODEL(cpu_id) >= 0xe))) { uint64_t msr; msr = rdmsr(MSR_IA32_MISC_ENABLE); if ((msr & 0x400000ULL) != 0) { Modified: releng/8.0/sys/i386/i386/msi.c ============================================================================== --- releng/8.0/sys/i386/i386/msi.c Fri Nov 6 16:55:05 2009 (r198990) +++ releng/8.0/sys/i386/i386/msi.c Fri Nov 6 17:09:04 2009 (r198991) @@ -275,8 +275,8 @@ msi_init(void) case CPU_VENDOR_AMD: break; case CPU_VENDOR_CENTAUR: - if (I386_CPU_FAMILY(cpu_id) == 0x6 && - I386_CPU_MODEL(cpu_id) >= 0xf) + if (CPUID_TO_FAMILY(cpu_id) == 0x6 && + CPUID_TO_MODEL(cpu_id) >= 0xf) break; /* FALLTHROUGH */ default: Modified: releng/8.0/sys/i386/i386/pmap.c ============================================================================== --- releng/8.0/sys/i386/i386/pmap.c Fri Nov 6 16:55:05 2009 (r198990) +++ releng/8.0/sys/i386/i386/pmap.c Fri Nov 6 17:09:04 2009 (r198991) @@ -484,7 +484,7 @@ pmap_init_pat(void) return; if (cpu_vendor_id != CPU_VENDOR_INTEL || - (I386_CPU_FAMILY(cpu_id) == 6 && I386_CPU_MODEL(cpu_id) >= 0xe)) { + (CPUID_TO_FAMILY(cpu_id) == 6 && CPUID_TO_MODEL(cpu_id) >= 0xe)) { /* * Leave the indices 0-3 at the default of WB, WT, UC, and UC-. * Program 4 and 5 as WP and WC. Modified: releng/8.0/sys/i386/include/specialreg.h ============================================================================== --- releng/8.0/sys/i386/include/specialreg.h Fri Nov 6 16:55:05 2009 (r198990) +++ releng/8.0/sys/i386/include/specialreg.h Fri Nov 6 17:09:04 2009 (r198991) @@ -165,11 +165,11 @@ #define CPUID_FAMILY 0x00000f00 #define CPUID_EXT_MODEL 0x000f0000 #define CPUID_EXT_FAMILY 0x0ff00000 -#define I386_CPU_MODEL(id) \ +#define CPUID_TO_MODEL(id) \ ((((id) & CPUID_MODEL) >> 4) | \ ((((id) & CPUID_FAMILY) >= 0x600) ? \ (((id) & CPUID_EXT_MODEL) >> 12) : 0)) -#define I386_CPU_FAMILY(id) \ +#define CPUID_TO_FAMILY(id) \ ((((id) & CPUID_FAMILY) >> 8) + \ ((((id) & CPUID_FAMILY) == 0xf00) ? \ (((id) & CPUID_EXT_FAMILY) >> 20) : 0)) From owner-svn-src-all@FreeBSD.ORG Fri Nov 6 17:11:58 2009 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 B9E17106568F; Fri, 6 Nov 2009 17:11:58 +0000 (UTC) (envelope-from ambrisko@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A715A8FC14; Fri, 6 Nov 2009 17:11: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 nA6HBwHR023274; Fri, 6 Nov 2009 17:11:58 GMT (envelope-from ambrisko@svn.freebsd.org) Received: (from ambrisko@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA6HBwJv023271; Fri, 6 Nov 2009 17:11:58 GMT (envelope-from ambrisko@svn.freebsd.org) Message-Id: <200911061711.nA6HBwJv023271@svn.freebsd.org> From: Doug Ambrisko Date: Fri, 6 Nov 2009 17:11:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198992 - in stable/6/sys: amd64/amd64 i386/i386 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, 06 Nov 2009 17:11:58 -0000 Author: ambrisko Date: Fri Nov 6 17:11:58 2009 New Revision: 198992 URL: http://svn.freebsd.org/changeset/base/198992 Log: MFC: Adjust the way we number CPUs on x86 so that we attempt to "group" all logical CPUs in a package. Merged by: Subra @ Cisco Reviewed by: jhb Modified: stable/6/sys/amd64/amd64/mp_machdep.c stable/6/sys/i386/i386/mp_machdep.c Directory Properties: stable/6/sys/ (props changed) Modified: stable/6/sys/amd64/amd64/mp_machdep.c ============================================================================== --- stable/6/sys/amd64/amd64/mp_machdep.c Fri Nov 6 17:09:04 2009 (r198991) +++ stable/6/sys/amd64/amd64/mp_machdep.c Fri Nov 6 17:11:58 2009 (r198992) @@ -341,7 +341,6 @@ cpu_mp_start(void) } else KASSERT(boot_cpu_id == PCPU_GET(apic_id), ("BSP's APIC ID doesn't match boot_cpu_id")); - cpu_apic_ids[0] = boot_cpu_id; assign_cpu_ids(); @@ -405,20 +404,29 @@ cpu_mp_start(void) void cpu_mp_announce(void) { - int i, x; + int i; - /* List CPUs */ + /* List active CPUs first. */ printf(" cpu0 (BSP): APIC ID: %2d\n", boot_cpu_id); - for (i = 1, x = 0; x <= MAX_APIC_ID; x++) { - if (!cpu_info[x].cpu_present || cpu_info[x].cpu_bsp) + for (i = 1; i < mp_ncpus; i++) { + if (cpu_info[cpu_apic_ids[i]].cpu_hyperthread) + hyperthread = "/HT"; + else + hyperthread = ""; + printf(" cpu%d (AP%s): APIC ID: %2d\n", i, hyperthread, + cpu_apic_ids[i]); + } + + /* List disabled CPUs last. */ + for (i = 0; i <= MAX_APIC_ID; i++) { + if (!cpu_info[i].cpu_present || !cpu_info[i].cpu_disabled) continue; - if (cpu_info[x].cpu_disabled) - printf(" cpu (AP): APIC ID: %2d (disabled)\n", x); - else { - KASSERT(i < mp_ncpus, - ("mp_ncpus and actual cpus are out of whack")); - printf(" cpu%d (AP): APIC ID: %2d\n", i++, x); - } + if (cpu_info[i].cpu_hyperthread) + hyperthread = "/HT"; + else + hyperthread = ""; + printf(" cpu (AP%s): APIC ID: %2d (disabled)\n", hyperthread, + i); } } @@ -646,11 +654,19 @@ assign_cpu_ids(void) /* * Assign CPU IDs to local APIC IDs and disable any CPUs - * beyond MAXCPU. CPU 0 has already been assigned to the BSP, - * so we only have to assign IDs for APs. + * beyond MAXCPU. CPU 0 is always assigned to the BSP. + * + * To minimize confusion for userland, we attempt to number + * CPUs such that all threads and cores in a package are + * grouped together. For now we assume that the BSP is always + * the first thread in a package and just start adding APs + * starting with the BSP's APIC ID. */ mp_ncpus = 1; - for (i = 0; i <= MAX_APIC_ID; i++) { + cpu_apic_ids[0] = boot_cpu_id; + apic_cpuids[boot_cpu_id] = 0; + for (i = boot_cpu_id + 1; i != boot_cpu_id; + i == MAX_APIC_ID ? i = 0 : i++) { if (!cpu_info[i].cpu_present || cpu_info[i].cpu_bsp || cpu_info[i].cpu_disabled) continue; Modified: stable/6/sys/i386/i386/mp_machdep.c ============================================================================== --- stable/6/sys/i386/i386/mp_machdep.c Fri Nov 6 17:09:04 2009 (r198991) +++ stable/6/sys/i386/i386/mp_machdep.c Fri Nov 6 17:11:58 2009 (r198992) @@ -417,7 +417,6 @@ cpu_mp_start(void) } else KASSERT(boot_cpu_id == PCPU_GET(apic_id), ("BSP's APIC ID doesn't match boot_cpu_id")); - cpu_apic_ids[0] = boot_cpu_id; assign_cpu_ids(); @@ -481,22 +480,31 @@ cpu_mp_start(void) void cpu_mp_announce(void) { - int i, x; + int i; POSTCODE(MP_ANNOUNCE_POST); - /* List CPUs */ + /* List active CPUs first. */ printf(" cpu0 (BSP): APIC ID: %2d\n", boot_cpu_id); - for (i = 1, x = 0; x <= MAX_APIC_ID; x++) { - if (!cpu_info[x].cpu_present || cpu_info[x].cpu_bsp) + for (i = 1; i < mp_ncpus; i++) { + if (cpu_info[cpu_apic_ids[i]].cpu_hyperthread) + hyperthread = "/HT"; + else + hyperthread = ""; + printf(" cpu%d (AP%s): APIC ID: %2d\n", i, hyperthread, + cpu_apic_ids[i]); + } + + /* List disabled CPUs last. */ + for (i = 0; i <= MAX_APIC_ID; i++) { + if (!cpu_info[i].cpu_present || !cpu_info[i].cpu_disabled) continue; - if (cpu_info[x].cpu_disabled) - printf(" cpu (AP): APIC ID: %2d (disabled)\n", x); - else { - KASSERT(i < mp_ncpus, - ("mp_ncpus and actual cpus are out of whack")); - printf(" cpu%d (AP): APIC ID: %2d\n", i++, x); - } + if (cpu_info[i].cpu_hyperthread) + hyperthread = "/HT"; + else + hyperthread = ""; + printf(" cpu (AP%s): APIC ID: %2d (disabled)\n", hyperthread, + i); } } @@ -724,11 +732,19 @@ assign_cpu_ids(void) /* * Assign CPU IDs to local APIC IDs and disable any CPUs - * beyond MAXCPU. CPU 0 has already been assigned to the BSP, - * so we only have to assign IDs for APs. + * beyond MAXCPU. CPU 0 is always assigned to the BSP. + * + * To minimize confusion for userland, we attempt to number + * CPUs such that all threads and cores in a package are + * grouped together. For now we assume that the BSP is always + * the first thread in a package and just start adding APs + * starting with the BSP's APIC ID. */ mp_ncpus = 1; - for (i = 0; i <= MAX_APIC_ID; i++) { + cpu_apic_ids[0] = boot_cpu_id; + apic_cpuids[boot_cpu_id] = 0; + for (i = boot_cpu_id + 1; i != boot_cpu_id; + i == MAX_APIC_ID ? i = 0 : i++) { if (!cpu_info[i].cpu_present || cpu_info[i].cpu_bsp || cpu_info[i].cpu_disabled) continue; From owner-svn-src-all@FreeBSD.ORG Fri Nov 6 17:34:27 2009 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 18443106566B; Fri, 6 Nov 2009 17:34:27 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 075B98FC15; Fri, 6 Nov 2009 17:34: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 nA6HYQR4023826; Fri, 6 Nov 2009 17:34:26 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA6HYQsZ023824; Fri, 6 Nov 2009 17:34:26 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <200911061734.nA6HYQsZ023824@svn.freebsd.org> From: Hajimu UMEMOTO Date: Fri, 6 Nov 2009 17:34: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: r198993 - head/sys/netinet6 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, 06 Nov 2009 17:34:27 -0000 Author: ume Date: Fri Nov 6 17:34:26 2009 New Revision: 198993 URL: http://svn.freebsd.org/changeset/base/198993 Log: Make nd6_llinfo_timer() does its job, again. ln->la_expire was greater than time_second, in most cases. MFC after: 3 days Modified: head/sys/netinet6/nd6.c Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Fri Nov 6 17:11:58 2009 (r198992) +++ head/sys/netinet6/nd6.c Fri Nov 6 17:34:26 2009 (r198993) @@ -507,7 +507,7 @@ nd6_llinfo_timer(void *arg) ndi = ND_IFINFO(ifp); dst = &L3_ADDR_SIN6(ln)->sin6_addr; - if ((ln->la_flags & LLE_STATIC) || (ln->la_expire > time_second)) { + if (ln->la_flags & LLE_STATIC) { goto done; } From owner-svn-src-all@FreeBSD.ORG Fri Nov 6 17:58:44 2009 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 E2CD91065695; Fri, 6 Nov 2009 17:58:44 +0000 (UTC) (envelope-from ambrisko@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CEFA38FC1D; Fri, 6 Nov 2009 17:58: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 nA6HwikF024310; Fri, 6 Nov 2009 17:58:44 GMT (envelope-from ambrisko@svn.freebsd.org) Received: (from ambrisko@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA6Hwic2024307; Fri, 6 Nov 2009 17:58:44 GMT (envelope-from ambrisko@svn.freebsd.org) Message-Id: <200911061758.nA6Hwic2024307@svn.freebsd.org> From: Doug Ambrisko Date: Fri, 6 Nov 2009 17:58:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198994 - in stable/6/sys/dev: bce mii 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, 06 Nov 2009 17:58:45 -0000 Author: ambrisko Date: Fri Nov 6 17:58:44 2009 New Revision: 198994 URL: http://svn.freebsd.org/changeset/base/198994 Log: MFC: Merge in minimal 5709/5716 support into 6.X extracted from current. This is not a direct merge since I tried to only extra the changes to support the 5709 from all of the other changes that have happened in head. This should not introduce any issues that the other changes may have caused. We have been running this code for months on Dell r710's. It has been lightly tested on systems with 5716's. This is to allow people to run newer hardware on 6.X. Modified: stable/6/sys/dev/bce/if_bce.c stable/6/sys/dev/bce/if_bcefw.h stable/6/sys/dev/bce/if_bcereg.h stable/6/sys/dev/mii/brgphy.c stable/6/sys/dev/mii/miidevs Modified: stable/6/sys/dev/bce/if_bce.c ============================================================================== --- stable/6/sys/dev/bce/if_bce.c Fri Nov 6 17:34:26 2009 (r198993) +++ stable/6/sys/dev/bce/if_bce.c Fri Nov 6 17:58:44 2009 (r198994) @@ -110,6 +110,19 @@ static struct bce_type bce_devs[] = { /* BCM5708S controllers and OEM boards. */ { BRCM_VENDORID, BRCM_DEVICEID_BCM5708S, PCI_ANY_ID, PCI_ANY_ID, "Broadcom NetXtreme II BCM5708 1000Base-SX" }, + + /* BCM5709C controllers and OEM boards. */ + { BRCM_VENDORID, BRCM_DEVICEID_BCM5709, PCI_ANY_ID, PCI_ANY_ID, + "Broadcom NetXtreme II BCM5709 1000Base-T" }, + + /* BCM5709S controllers and OEM boards. */ + { BRCM_VENDORID, BRCM_DEVICEID_BCM5709S, PCI_ANY_ID, PCI_ANY_ID, + "Broadcom NetXtreme II BCM5709 1000Base-SX" }, + + /* BCM5716 controllers and OEM boards. */ + { BRCM_VENDORID, BRCM_DEVICEID_BCM5716, PCI_ANY_ID, PCI_ANY_ID, + "Broadcom NetXtreme II BCM5716 1000Base-T" }, + { 0, 0, 0, 0, NULL } }; @@ -119,91 +132,109 @@ static struct bce_type bce_devs[] = { /****************************************************************************/ static struct flash_spec flash_table[] = { +#define BUFFERED_FLAGS (BCE_NV_BUFFERED | BCE_NV_TRANSLATE) +#define NONBUFFERED_FLAGS (BCE_NV_WREN) + /* Slow EEPROM */ {0x00000000, 0x40830380, 0x009f0081, 0xa184a053, 0xaf000400, - 1, SEEPROM_PAGE_BITS, SEEPROM_PAGE_SIZE, + BUFFERED_FLAGS, SEEPROM_PAGE_BITS, SEEPROM_PAGE_SIZE, SEEPROM_BYTE_ADDR_MASK, SEEPROM_TOTAL_SIZE, "EEPROM - slow"}, /* Expansion entry 0001 */ {0x08000002, 0x4b808201, 0x00050081, 0x03840253, 0xaf020406, - 0, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, + NONBUFFERED_FLAGS, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, SAIFUN_FLASH_BYTE_ADDR_MASK, 0, "Entry 0001"}, /* Saifun SA25F010 (non-buffered flash) */ /* strap, cfg1, & write1 need updates */ {0x04000001, 0x47808201, 0x00050081, 0x03840253, 0xaf020406, - 0, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, + NONBUFFERED_FLAGS, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, SAIFUN_FLASH_BYTE_ADDR_MASK, SAIFUN_FLASH_BASE_TOTAL_SIZE*2, "Non-buffered flash (128kB)"}, /* Saifun SA25F020 (non-buffered flash) */ /* strap, cfg1, & write1 need updates */ {0x0c000003, 0x4f808201, 0x00050081, 0x03840253, 0xaf020406, - 0, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, + NONBUFFERED_FLAGS, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, SAIFUN_FLASH_BYTE_ADDR_MASK, SAIFUN_FLASH_BASE_TOTAL_SIZE*4, "Non-buffered flash (256kB)"}, /* Expansion entry 0100 */ {0x11000000, 0x53808201, 0x00050081, 0x03840253, 0xaf020406, - 0, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, + NONBUFFERED_FLAGS, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, SAIFUN_FLASH_BYTE_ADDR_MASK, 0, "Entry 0100"}, /* Entry 0101: ST M45PE10 (non-buffered flash, TetonII B0) */ {0x19000002, 0x5b808201, 0x000500db, 0x03840253, 0xaf020406, - 0, ST_MICRO_FLASH_PAGE_BITS, ST_MICRO_FLASH_PAGE_SIZE, + NONBUFFERED_FLAGS, ST_MICRO_FLASH_PAGE_BITS, ST_MICRO_FLASH_PAGE_SIZE, ST_MICRO_FLASH_BYTE_ADDR_MASK, ST_MICRO_FLASH_BASE_TOTAL_SIZE*2, "Entry 0101: ST M45PE10 (128kB non-bufferred)"}, /* Entry 0110: ST M45PE20 (non-buffered flash)*/ {0x15000001, 0x57808201, 0x000500db, 0x03840253, 0xaf020406, - 0, ST_MICRO_FLASH_PAGE_BITS, ST_MICRO_FLASH_PAGE_SIZE, + NONBUFFERED_FLAGS, ST_MICRO_FLASH_PAGE_BITS, ST_MICRO_FLASH_PAGE_SIZE, ST_MICRO_FLASH_BYTE_ADDR_MASK, ST_MICRO_FLASH_BASE_TOTAL_SIZE*4, "Entry 0110: ST M45PE20 (256kB non-bufferred)"}, /* Saifun SA25F005 (non-buffered flash) */ /* strap, cfg1, & write1 need updates */ {0x1d000003, 0x5f808201, 0x00050081, 0x03840253, 0xaf020406, - 0, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, + NONBUFFERED_FLAGS, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, SAIFUN_FLASH_BYTE_ADDR_MASK, SAIFUN_FLASH_BASE_TOTAL_SIZE, "Non-buffered flash (64kB)"}, /* Fast EEPROM */ {0x22000000, 0x62808380, 0x009f0081, 0xa184a053, 0xaf000400, - 1, SEEPROM_PAGE_BITS, SEEPROM_PAGE_SIZE, + BUFFERED_FLAGS, SEEPROM_PAGE_BITS, SEEPROM_PAGE_SIZE, SEEPROM_BYTE_ADDR_MASK, SEEPROM_TOTAL_SIZE, "EEPROM - fast"}, /* Expansion entry 1001 */ {0x2a000002, 0x6b808201, 0x00050081, 0x03840253, 0xaf020406, - 0, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, + NONBUFFERED_FLAGS, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, SAIFUN_FLASH_BYTE_ADDR_MASK, 0, "Entry 1001"}, /* Expansion entry 1010 */ {0x26000001, 0x67808201, 0x00050081, 0x03840253, 0xaf020406, - 0, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, + NONBUFFERED_FLAGS, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, SAIFUN_FLASH_BYTE_ADDR_MASK, 0, "Entry 1010"}, /* ATMEL AT45DB011B (buffered flash) */ {0x2e000003, 0x6e808273, 0x00570081, 0x68848353, 0xaf000400, - 1, BUFFERED_FLASH_PAGE_BITS, BUFFERED_FLASH_PAGE_SIZE, + BUFFERED_FLAGS, BUFFERED_FLASH_PAGE_BITS, BUFFERED_FLASH_PAGE_SIZE, BUFFERED_FLASH_BYTE_ADDR_MASK, BUFFERED_FLASH_TOTAL_SIZE, "Buffered flash (128kB)"}, /* Expansion entry 1100 */ {0x33000000, 0x73808201, 0x00050081, 0x03840253, 0xaf020406, - 0, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, + NONBUFFERED_FLAGS, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, SAIFUN_FLASH_BYTE_ADDR_MASK, 0, "Entry 1100"}, /* Expansion entry 1101 */ {0x3b000002, 0x7b808201, 0x00050081, 0x03840253, 0xaf020406, - 0, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, + NONBUFFERED_FLAGS, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, SAIFUN_FLASH_BYTE_ADDR_MASK, 0, "Entry 1101"}, /* Ateml Expansion entry 1110 */ {0x37000001, 0x76808273, 0x00570081, 0x68848353, 0xaf000400, - 1, BUFFERED_FLASH_PAGE_BITS, BUFFERED_FLASH_PAGE_SIZE, + BUFFERED_FLAGS, BUFFERED_FLASH_PAGE_BITS, BUFFERED_FLASH_PAGE_SIZE, BUFFERED_FLASH_BYTE_ADDR_MASK, 0, "Entry 1110 (Atmel)"}, /* ATMEL AT45DB021B (buffered flash) */ {0x3f000003, 0x7e808273, 0x00570081, 0x68848353, 0xaf000400, - 1, BUFFERED_FLASH_PAGE_BITS, BUFFERED_FLASH_PAGE_SIZE, + BUFFERED_FLAGS, BUFFERED_FLASH_PAGE_BITS, BUFFERED_FLASH_PAGE_SIZE, BUFFERED_FLASH_BYTE_ADDR_MASK, BUFFERED_FLASH_TOTAL_SIZE*2, "Buffered flash (256kB)"}, }; +/* + * The BCM5709 controllers transparently handle the + * differences between Atmel 264 byte pages and all + * flash devices which use 256 byte pages, so no + * logical-to-physical mapping is required in the + * driver. + */ +static struct flash_spec flash_5709 = { + .flags = BCE_NV_BUFFERED, + .page_bits = BCM5709_FLASH_PAGE_BITS, + .page_size = BCM5709_FLASH_PAGE_SIZE, + .addr_mask = BCM5709_FLASH_BYTE_ADDR_MASK, + .total_size = BUFFERED_FLASH_TOTAL_SIZE * 2, + .name = "5709 buffered flash (256kB)", +}; /****************************************************************************/ /* FreeBSD device entry points. */ @@ -268,6 +299,7 @@ static int bce_nvram_write (struct bc /****************************************************************************/ /* */ /****************************************************************************/ +static void bce_get_media (struct bce_softc *); static void bce_dma_map_addr (void *, bus_dma_segment_t *, int, int); static int bce_dma_alloc (device_t); static void bce_dma_free (struct bce_softc *); @@ -279,19 +311,28 @@ static void bce_release_resources (struc static int bce_fw_sync (struct bce_softc *, u32); static void bce_load_rv2p_fw (struct bce_softc *, u32 *, u32, u32); static void bce_load_cpu_fw (struct bce_softc *, struct cpu_reg *, struct fw_info *); +static void bce_init_rxp_cpu (struct bce_softc *); +static void bce_init_txp_cpu (struct bce_softc *); +static void bce_init_tpat_cpu (struct bce_softc *); +static void bce_init_cp_cpu (struct bce_softc *); +static void bce_init_com_cpu (struct bce_softc *); static void bce_init_cpus (struct bce_softc *); +static void bce_print_adapter_info (struct bce_softc *); +static void bce_probe_pci_caps (device_t, struct bce_softc *); static void bce_stop (struct bce_softc *); static int bce_reset (struct bce_softc *, u32); static int bce_chipinit (struct bce_softc *); static int bce_blockinit (struct bce_softc *); -static int bce_get_buf (struct bce_softc *, struct mbuf *, u16 *, u16 *, u32 *); static int bce_init_tx_chain (struct bce_softc *); -static void bce_fill_rx_chain (struct bce_softc *); +static void bce_free_tx_chain (struct bce_softc *); + +static int bce_get_buf (struct bce_softc *, struct mbuf *, u16 *, u16 *, u32 *); static int bce_init_rx_chain (struct bce_softc *); +static void bce_fill_rx_chain (struct bce_softc *); static void bce_free_rx_chain (struct bce_softc *); -static void bce_free_tx_chain (struct bce_softc *); +static void bce_init_rx_context (struct bce_softc *); static int bce_tx_encap (struct bce_softc *, struct mbuf **); static void bce_start_locked (struct ifnet *); @@ -437,6 +478,90 @@ bce_probe(device_t dev) return(ENXIO); } +static void +bce_print_adapter_info(struct bce_softc *sc) +{ + BCE_PRINTF("ASIC (0x%08X); ", sc->bce_chipid); + printf("Rev (%c%d); ", ((BCE_CHIP_ID(sc) & 0xf000) >> 12) + 'A', + ((BCE_CHIP_ID(sc) & 0x0ff0) >> 4)); + + /* Bus info. */ + if (sc->bce_flags & BCE_PCIE_FLAG) { + printf("Bus (PCIe x%d, ", sc->link_width); + switch (sc->link_speed) { + case 1: printf("2.5Gbps); "); break; + case 2: printf("5Gbps); "); break; + default: printf("Unknown link speed); "); + } + } else { + printf("Bus (PCI%s, %s, %dMHz); ", + ((sc->bce_flags & BCE_PCIX_FLAG) ? "-X" : ""), + ((sc->bce_flags & BCE_PCI_32BIT_FLAG) ? "32-bit" : "64-bit"), + sc->bus_speed_mhz); + } + + /* Firmware version and device features. */ + printf("F/W (0x%08X); Flags( ", sc->bce_fw_ver); +#ifdef BCE_USE_SPLIT_HEADER + printf("SPLT "); +#endif + if (sc->bce_flags & BCE_MFW_ENABLE_FLAG) + printf("MFW "); + if (sc->bce_flags & BCE_USING_MSI_FLAG) + printf("MSI "); + if (sc->bce_flags & BCE_USING_MSIX_FLAG) + printf("MSI-X "); + if (sc->bce_phy_flags & BCE_PHY_2_5G_CAPABLE_FLAG) + printf("2.5G "); + printf(")\n"); +} + +/****************************************************************************/ +/* PCI Capabilities Probe Function. */ +/* */ +/* Walks the PCI capabiites list for the device to find what features are */ +/* supported. */ +/* */ +/* Returns: */ +/* None. */ +/****************************************************************************/ +static void +bce_probe_pci_caps(device_t dev, struct bce_softc *sc) +{ + u32 reg; + + /* Check if PCI-X capability is enabled. */ + if (pci_find_extcap(dev, PCIY_PCIX, ®) == 0) { + if (reg != 0) + sc->bce_cap_flags |= BCE_PCIX_CAPABLE_FLAG; + } + + /* Check if PCIe capability is enabled. */ + if (pci_find_extcap(dev, PCIY_EXPRESS, ®) == 0) { + if (reg != 0) { + u16 link_status = pci_read_config(dev, reg + 0x12, 2); + DBPRINT(sc, BCE_INFO_LOAD, "PCIe link_status = 0x%08X\n", + link_status); + sc->link_speed = link_status & 0xf; + sc->link_width = (link_status >> 4) & 0x3f; + sc->bce_cap_flags |= BCE_PCIE_CAPABLE_FLAG; + sc->bce_flags |= BCE_PCIE_FLAG; + } + } + + /* Check if MSI capability is enabled. */ + if (pci_find_extcap(dev, PCIY_MSI, ®) == 0) { + if (reg != 0) + sc->bce_cap_flags |= BCE_MSI_CAPABLE_FLAG; + } + + /* Check if MSI-X capability is enabled. */ + if (pci_find_extcap(dev, PCIY_MSIX, ®) == 0) { + if (reg != 0) + sc->bce_cap_flags |= BCE_MSIX_CAPABLE_FLAG; + } + +} /****************************************************************************/ /* Device attach function. */ @@ -488,6 +613,7 @@ bce_attach(device_t dev) sc->bce_bhandle = rman_get_bushandle(sc->bce_res_mem); sc->bce_vhandle = (vm_offset_t) rman_get_virtual(sc->bce_res_mem); + bce_probe_pci_caps(dev, sc); /* If MSI is enabled in the driver, get the vector count. */ count = bce_msi_enable ? pci_msi_count(dev) : 0; @@ -534,6 +660,10 @@ bce_attach(device_t dev) case BCE_CHIP_ID_5706_A1: case BCE_CHIP_ID_5708_A0: case BCE_CHIP_ID_5708_B0: + case BCE_CHIP_ID_5709_A0: + case BCE_CHIP_ID_5709_B0: + case BCE_CHIP_ID_5709_B1: + case BCE_CHIP_ID_5709_B2: BCE_PRINTF("%s(%d): Unsupported controller revision (%c%d)!\n", __FILE__, __LINE__, (((pci_read_config(dev, PCIR_REVID, 4) & 0xf0) >> 4) + 'A'), @@ -559,7 +689,9 @@ bce_attach(device_t dev) */ val = REG_RD_IND(sc, BCE_SHM_HDR_SIGNATURE); if ((val & BCE_SHM_HDR_SIGNATURE_SIG_MASK) == BCE_SHM_HDR_SIGNATURE_SIG) - sc->bce_shmem_base = REG_RD_IND(sc, BCE_SHM_HDR_ADDR_0); + /* Multi-port devices use different offsets in shared memory. */ + sc->bce_shmem_base = REG_RD_IND(sc, BCE_SHM_HDR_ADDR_0 + + (pci_get_function(sc->bce_dev) << 2)); else sc->bce_shmem_base = HOST_VIEW_SHMEM_BASE; @@ -687,33 +819,14 @@ bce_attach(device_t dev) /* Update statistics once every second. */ sc->bce_stats_ticks = 1000000 & 0xffff00; - /* - * The SerDes based NetXtreme II controllers - * that support 2.5Gb operation (currently - * 5708S) use a PHY at address 2, otherwise - * the PHY is present at address 1. - */ - sc->bce_phy_addr = 1; - - if (BCE_CHIP_BOND_ID(sc) & BCE_CHIP_BOND_ID_SERDES_BIT) { - sc->bce_phy_flags |= BCE_PHY_SERDES_FLAG; - sc->bce_flags |= BCE_NO_WOL_FLAG; - if (BCE_CHIP_NUM(sc) != BCE_CHIP_NUM_5706) { - sc->bce_phy_addr = 2; - val = REG_RD_IND(sc, sc->bce_shmem_base + - BCE_SHARED_HW_CFG_CONFIG); - if (val & BCE_SHARED_HW_CFG_PHY_2_5G) { - sc->bce_phy_flags |= BCE_PHY_2_5G_CAPABLE_FLAG; - DBPRINT(sc, BCE_INFO_LOAD, "Found 2.5Gb capable adapter\n"); - } - } - } + /* Find the media type for the adapter. */ + bce_get_media(sc); /* Store data needed by PHY driver for backplane applications */ sc->bce_shared_hw_cfg = REG_RD_IND(sc, sc->bce_shmem_base + BCE_SHARED_HW_CFG_CONFIG); sc->bce_port_hw_cfg = REG_RD_IND(sc, sc->bce_shmem_base + - BCE_SHARED_HW_CFG_CONFIG); + BCE_PORT_HW_CFG_CONFIG); /* Allocate DMA memory resources. */ if (bce_dma_alloc(dev)) { @@ -820,21 +933,7 @@ bce_attach(device_t dev) BCE_UNLOCK(sc); /* Finally, print some useful adapter info */ - BCE_PRINTF("ASIC (0x%08X); ", sc->bce_chipid); - printf("Rev (%c%d); ", ((BCE_CHIP_ID(sc) & 0xf000) >> 12) + 'A', - ((BCE_CHIP_ID(sc) & 0x0ff0) >> 4)); - printf("Bus (PCI%s, %s, %dMHz); ", - ((sc->bce_flags & BCE_PCIX_FLAG) ? "-X" : ""), - ((sc->bce_flags & BCE_PCI_32BIT_FLAG) ? "32-bit" : "64-bit"), - sc->bus_speed_mhz); - printf("F/W (0x%08X); Flags( ", sc->bce_fw_ver); - if (sc->bce_flags & BCE_MFW_ENABLE_FLAG) - printf("MFW "); - if (sc->bce_flags & BCE_USING_MSI_FLAG) - printf("MSI "); - if (sc->bce_phy_flags & BCE_PHY_2_5G_CAPABLE_FLAG) - printf("2.5G "); - printf(")\n"); + bce_print_adapter_info(sc); goto bce_attach_exit; @@ -995,15 +1094,39 @@ bce_reg_wr_ind(struct bce_softc *sc, u32 /* Nothing. */ /****************************************************************************/ static void -bce_ctx_wr(struct bce_softc *sc, u32 cid_addr, u32 offset, u32 val) +bce_ctx_wr(struct bce_softc *sc, u32 cid_addr, u32 ctx_offset, u32 ctx_val) { + u32 idx, offset = ctx_offset + cid_addr; + u32 val = 0, retry_cnt = 5; + + DBPRINT(sc, BCE_EXTREME_CTX, "%s(); cid_addr = 0x%08X, offset = 0x%08X, " + "val = 0x%08X\n", __FUNCTION__, cid_addr, ctx_offset, ctx_val); + + DBRUNIF((cid_addr > MAX_CID_ADDR || ctx_offset & 0x3 || cid_addr & CTX_MASK), + BCE_PRINTF("%s(): Invalid CID address: 0x%08X.\n", + __FUNCTION__, cid_addr)); + + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { + + REG_WR(sc, BCE_CTX_CTX_DATA, ctx_val); + REG_WR(sc, BCE_CTX_CTX_CTRL, (offset | BCE_CTX_CTX_CTRL_WRITE_REQ)); - DBPRINT(sc, BCE_EXCESSIVE, "%s(); cid_addr = 0x%08X, offset = 0x%08X, " - "val = 0x%08X\n", __FUNCTION__, cid_addr, offset, val); + for (idx = 0; idx < retry_cnt; idx++) { + val = REG_RD(sc, BCE_CTX_CTX_CTRL); + if ((val & BCE_CTX_CTX_CTRL_WRITE_REQ) == 0) + break; + DELAY(5); + } - offset += cid_addr; - REG_WR(sc, BCE_CTX_DATA_ADR, offset); - REG_WR(sc, BCE_CTX_DATA, val); + if (val & BCE_CTX_CTX_CTRL_WRITE_REQ) + BCE_PRINTF("%s(%d); Unable to write CTX memory: " + "cid_addr = 0x%08X, offset = 0x%08X!\n", + __FILE__, __LINE__, cid_addr, ctx_offset); + + } else { + REG_WR(sc, BCE_CTX_DATA_ADR, offset); + REG_WR(sc, BCE_CTX_DATA, ctx_val); + } } @@ -1323,7 +1446,7 @@ bce_enable_nvram_write(struct bce_softc val = REG_RD(sc, BCE_MISC_CFG); REG_WR(sc, BCE_MISC_CFG, val | BCE_MISC_CFG_NVM_WR_EN_PCI); - if (!sc->bce_flash_info->buffered) { + if (!(sc->bce_flash_info->flags & BCE_NV_BUFFERED)) { int j; REG_WR(sc, BCE_NVM_COMMAND, BCE_NVM_COMMAND_DONE); @@ -1339,9 +1462,11 @@ bce_enable_nvram_write(struct bce_softc if (j >= NVRAM_TIMEOUT_COUNT) { DBPRINT(sc, BCE_WARN, "Timeout writing NVRAM!\n"); - return EBUSY; + rc = EBUSY; } } + + return 0; } @@ -1412,6 +1537,7 @@ bce_disable_nvram_access(struct bce_soft REG_WR(sc, BCE_NVM_ACCESS_ENABLE, val & ~(BCE_NVM_ACCESS_ENABLE_EN | BCE_NVM_ACCESS_ENABLE_WR_EN)); + } @@ -1429,13 +1555,11 @@ static int bce_nvram_erase_page(struct bce_softc *sc, u32 offset) { u32 cmd; - int j; + int j, rc = 0; /* Buffered flash doesn't require an erase. */ - if (sc->bce_flash_info->buffered) - return 0; - - DBPRINT(sc, BCE_VERBOSE_NVRAM, "Erasing NVRAM page.\n"); + if (sc->bce_flash_info->flags & BCE_NV_BUFFERED) + goto bce_nvram_erase_page_exit; /* Build an erase command. */ cmd = BCE_NVM_COMMAND_ERASE | BCE_NVM_COMMAND_WR | @@ -1462,10 +1586,12 @@ bce_nvram_erase_page(struct bce_softc *s if (j >= NVRAM_TIMEOUT_COUNT) { DBPRINT(sc, BCE_WARN, "Timeout erasing NVRAM.\n"); - return EBUSY; + rc = EBUSY; } - return 0; +bce_nvram_erase_page_exit: + + return rc; } #endif /* BCE_NVRAM_WRITE_SUPPORT */ @@ -1486,11 +1612,12 @@ bce_nvram_read_dword(struct bce_softc *s u32 cmd; int i, rc = 0; + /* Build the command word. */ cmd = BCE_NVM_COMMAND_DOIT | cmd_flags; - /* Calculate the offset for buffered flash. */ - if (sc->bce_flash_info->buffered) { + /* Calculate the offset for buffered flash if translation is used. */ + if (sc->bce_flash_info->flags & BCE_NV_TRANSLATE) { offset = ((offset / sc->bce_flash_info->page_size) << sc->bce_flash_info->page_bits) + (offset % sc->bce_flash_info->page_size); @@ -1547,13 +1674,14 @@ bce_nvram_write_dword(struct bce_softc * u32 cmd_flags) { u32 cmd, val32; - int j; + int j, rc = 0; + /* Build the command word. */ cmd = BCE_NVM_COMMAND_DOIT | BCE_NVM_COMMAND_WR | cmd_flags; - /* Calculate the offset for buffered flash. */ - if (sc->bce_flash_info->buffered) { + /* Calculate the offset for buffered flash if translation is used. */ + if (sc->bce_flash_info->flags & BCE_NV_TRANSLATE) { offset = ((offset / sc->bce_flash_info->page_size) << sc->bce_flash_info->page_bits) + (offset % sc->bce_flash_info->page_size); @@ -1580,10 +1708,10 @@ bce_nvram_write_dword(struct bce_softc * if (j >= NVRAM_TIMEOUT_COUNT) { BCE_PRINTF("%s(%d): Timeout error writing NVRAM at offset 0x%08X\n", __FILE__, __LINE__, offset); - return EBUSY; + rc = EBUSY; } - return 0; + return (rc); } #endif /* BCE_NVRAM_WRITE_SUPPORT */ @@ -1601,18 +1729,20 @@ static int bce_init_nvram(struct bce_softc *sc) { u32 val; - int j, entry_count, rc; + int j, entry_count, rc = 0; struct flash_spec *flash; - DBPRINT(sc, BCE_VERBOSE_NVRAM, "Entering %s()\n", __FUNCTION__); + + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { + sc->bce_flash_info = &flash_5709; + goto bce_init_nvram_get_flash_size; + } /* Determine the selected interface. */ val = REG_RD(sc, BCE_NVM_CFG1); entry_count = sizeof(flash_table) / sizeof(struct flash_spec); - rc = 0; - /* * Flash reconfiguration is required to support additional * NVRAM devices not directly supported in hardware. @@ -1623,7 +1753,7 @@ bce_init_nvram(struct bce_softc *sc) if (val & 0x40000000) { /* Flash interface reconfigured by bootcode. */ - DBPRINT(sc,BCE_INFO_LOAD, + DBPRINT(sc,BCE_INFO_LOAD, "bce_init_nvram(): Flash WAS reconfigured.\n"); for (j = 0, flash = &flash_table[0]; j < entry_count; @@ -1638,8 +1768,8 @@ bce_init_nvram(struct bce_softc *sc) /* Flash interface not yet reconfigured. */ u32 mask; - DBPRINT(sc,BCE_INFO_LOAD, - "bce_init_nvram(): Flash was NOT reconfigured.\n"); + DBPRINT(sc, BCE_INFO_LOAD, "%s(): Flash was NOT reconfigured.\n", + __FUNCTION__); if (val & (1 << 23)) mask = FLASH_BACKUP_STRAP_MASK; @@ -1675,11 +1805,12 @@ bce_init_nvram(struct bce_softc *sc) /* Check if a matching device was found. */ if (j == entry_count) { sc->bce_flash_info = NULL; - BCE_PRINTF("%s(%d): Unknown Flash NVRAM found!\n", + BCE_PRINTF("%s(%d): Unknown Flash NVRAM found!\n", __FILE__, __LINE__); rc = ENODEV; } +bce_init_nvram_get_flash_size: /* Write the flash config data to the shared memory interface. */ val = REG_RD_IND(sc, sc->bce_shmem_base + BCE_SHARED_HW_CFG_CONFIG2); val &= BCE_SHARED_HW_CFG2_NVM_SIZE_MASK; @@ -1688,11 +1819,10 @@ bce_init_nvram(struct bce_softc *sc) else sc->bce_flash_size = sc->bce_flash_info->total_size; - DBPRINT(sc, BCE_INFO_LOAD, "bce_init_nvram() flash->total_size = 0x%08X\n", + DBPRINT(sc, BCE_INFO_LOAD, "%s(): Found %s, size = 0x%08X\n", + __FUNCTION__, sc->bce_flash_info->name, sc->bce_flash_info->total_size); - DBPRINT(sc, BCE_VERBOSE_NVRAM, "Exiting %s()\n", __FUNCTION__); - return rc; } @@ -1713,12 +1843,13 @@ bce_nvram_read(struct bce_softc *sc, u32 int rc = 0; u32 cmd_flags, offset32, len32, extra; + if (buf_size == 0) - return 0; + goto bce_nvram_read_exit; /* Request access to the flash interface. */ if ((rc = bce_acquire_nvram_lock(sc)) != 0) - return rc; + goto bce_nvram_read_exit; /* Enable access to flash interface */ bce_enable_nvram_access(sc); @@ -1800,7 +1931,7 @@ bce_nvram_read(struct bce_softc *sc, u32 } if (rc) - return rc; + goto bce_nvram_read_locked_exit; cmd_flags = BCE_NVM_COMMAND_LAST; rc = bce_nvram_read_dword(sc, offset32, buf, cmd_flags); @@ -1808,10 +1939,12 @@ bce_nvram_read(struct bce_softc *sc, u32 memcpy(ret_buf, buf, 4 - extra); } +bce_nvram_read_locked_exit: /* Disable access to flash interface and release the lock. */ bce_disable_nvram_access(sc); bce_release_nvram_lock(sc); +bce_nvram_read_exit: return rc; } @@ -1836,6 +1969,7 @@ bce_nvram_write(struct bce_softc *sc, u3 int rc = 0; int align_start, align_end; + buf = data_buf; offset32 = offset; len32 = buf_size; @@ -1845,7 +1979,7 @@ bce_nvram_write(struct bce_softc *sc, u3 offset32 &= ~3; len32 += align_start; if ((rc = bce_nvram_read(sc, offset32, start, 4))) - return rc; + goto bce_nvram_write_exit; } if (len32 & 3) { @@ -1854,18 +1988,22 @@ bce_nvram_write(struct bce_softc *sc, u3 len32 += align_end; if ((rc = bce_nvram_read(sc, offset32 + len32 - 4, end, 4))) { - return rc; + goto bce_nvram_write_exit; } } } if (align_start || align_end) { buf = malloc(len32, M_DEVBUF, M_NOWAIT); - if (buf == 0) - return ENOMEM; + if (buf == 0) { + rc = ENOMEM; + goto bce_nvram_write_exit; + } + if (align_start) { memcpy(buf, start, 4); } + if (align_end) { memcpy(buf + len32 - 4, end, 4); } @@ -1892,13 +2030,13 @@ bce_nvram_write(struct bce_softc *sc, u3 /* Request access to the flash interface. */ if ((rc = bce_acquire_nvram_lock(sc)) != 0) - goto nvram_write_end; + goto bce_nvram_write_exit; /* Enable access to flash interface */ bce_enable_nvram_access(sc); cmd_flags = BCE_NVM_COMMAND_FIRST; - if (sc->bce_flash_info->buffered == 0) { + if (!(sc->bce_flash_info->flags & BCE_NV_BUFFERED)) { int j; /* Read the whole page into the buffer @@ -1913,7 +2051,7 @@ bce_nvram_write(struct bce_softc *sc, u3 cmd_flags); if (rc) - goto nvram_write_end; + goto bce_nvram_write_locked_exit; cmd_flags = 0; } @@ -1921,11 +2059,11 @@ bce_nvram_write(struct bce_softc *sc, u3 /* Enable writes to flash interface (unlock write-protect) */ if ((rc = bce_enable_nvram_write(sc)) != 0) - goto nvram_write_end; + goto bce_nvram_write_locked_exit; /* Erase the page */ if ((rc = bce_nvram_erase_page(sc, page_start)) != 0) - goto nvram_write_end; + goto bce_nvram_write_locked_exit; /* Re-enable the write again for the actual write */ bce_enable_nvram_write(sc); @@ -1933,7 +2071,7 @@ bce_nvram_write(struct bce_softc *sc, u3 /* Loop to write back the buffer data from page_start to * data_start */ i = 0; - if (sc->bce_flash_info->buffered == 0) { + if (!(sc->bce_flash_info->flags & BCE_NV_BUFFERED)) { for (addr = page_start; addr < data_start; addr += 4, i += 4) { @@ -1941,7 +2079,7 @@ bce_nvram_write(struct bce_softc *sc, u3 &flash_buffer[i], cmd_flags); if (rc != 0) - goto nvram_write_end; + goto bce_nvram_write_locked_exit; cmd_flags = 0; } @@ -1950,8 +2088,8 @@ bce_nvram_write(struct bce_softc *sc, u3 /* Loop to write the new data from data_start to data_end */ for (addr = data_start; addr < data_end; addr += 4, i++) { if ((addr == page_end - 4) || - ((sc->bce_flash_info->buffered) && - (addr == data_end - 4))) { + ((sc->bce_flash_info->flags & BCE_NV_BUFFERED) && + (addr == data_end - 4))) { cmd_flags |= BCE_NVM_COMMAND_LAST; } @@ -1959,7 +2097,7 @@ bce_nvram_write(struct bce_softc *sc, u3 cmd_flags); if (rc != 0) - goto nvram_write_end; + goto bce_nvram_write_locked_exit; cmd_flags = 0; buf += 4; @@ -1967,7 +2105,7 @@ bce_nvram_write(struct bce_softc *sc, u3 /* Loop to write back the buffer data from data_end * to page_end */ - if (sc->bce_flash_info->buffered == 0) { + if (!(sc->bce_flash_info->flags & BCE_NV_BUFFERED)) { for (addr = data_end; addr < page_end; addr += 4, i += 4) { @@ -1978,7 +2116,7 @@ bce_nvram_write(struct bce_softc *sc, u3 &flash_buffer[i], cmd_flags); if (rc != 0) - goto nvram_write_end; + goto bce_nvram_write_locked_exit; cmd_flags = 0; } @@ -1995,11 +2133,18 @@ bce_nvram_write(struct bce_softc *sc, u3 written += data_end - data_start; } -nvram_write_end: + goto bce_nvram_write_exit; + +bce_nvram_write_locked_exit: + bce_disable_nvram_write(sc); + bce_disable_nvram_access(sc); + bce_release_nvram_lock(sc); + +bce_nvram_write_exit: if (align_start || align_end) free(buf, M_DEVBUF); - return rc; + return (rc); } #endif /* BCE_NVRAM_WRITE_SUPPORT */ @@ -2026,25 +2171,33 @@ bce_nvram_test(struct bce_softc *sc) * Check that the device NVRAM is valid by reading * the magic value at offset 0. */ - if ((rc = bce_nvram_read(sc, 0, data, 4)) != 0) - goto bce_nvram_test_done; - + if ((rc = bce_nvram_read(sc, 0, data, 4)) != 0) { + BCE_PRINTF("%s(%d): Unable to read NVRAM!\n", __FILE__, __LINE__); + goto bce_nvram_test_exit; + } + /* + * Verify that offset 0 of the NVRAM contains + * a valid magic number. + */ magic = bce_be32toh(buf[0]); if (magic != BCE_NVRAM_MAGIC) { rc = ENODEV; BCE_PRINTF("%s(%d): Invalid NVRAM magic value! Expected: 0x%08X, " "Found: 0x%08X\n", __FILE__, __LINE__, BCE_NVRAM_MAGIC, magic); - goto bce_nvram_test_done; + goto bce_nvram_test_exit; } /* * Verify that the device NVRAM includes valid * configuration data. */ - if ((rc = bce_nvram_read(sc, 0x100, data, BCE_NVRAM_SIZE)) != 0) - goto bce_nvram_test_done; + if ((rc = bce_nvram_read(sc, 0x100, data, BCE_NVRAM_SIZE)) != 0) { + BCE_PRINTF("%s(%d): Unable to read Manufacturing Information from " + "NVRAM!\n", __FILE__, __LINE__); + goto bce_nvram_test_exit; + } csum = ether_crc32_le(data, 0x100); if (csum != BCE_CRC32_RESIDUAL) { @@ -2052,21 +2205,106 @@ bce_nvram_test(struct bce_softc *sc) BCE_PRINTF("%s(%d): Invalid Manufacturing Information NVRAM CRC! " "Expected: 0x%08X, Found: 0x%08X\n", __FILE__, __LINE__, BCE_CRC32_RESIDUAL, csum); - goto bce_nvram_test_done; + goto bce_nvram_test_exit; } csum = ether_crc32_le(data + 0x100, 0x100); if (csum != BCE_CRC32_RESIDUAL) { + rc = ENODEV; BCE_PRINTF("%s(%d): Invalid Feature Configuration Information " "NVRAM CRC! Expected: 0x%08X, Found: 08%08X\n", __FILE__, __LINE__, BCE_CRC32_RESIDUAL, csum); - rc = ENODEV; } -bce_nvram_test_done: +bce_nvram_test_exit: return rc; } +/****************************************************************************/ +/* Identifies the current media type of the controller and sets the PHY */ +/* address. */ +/* */ +/* Returns: */ +/* Nothing. */ +/****************************************************************************/ +static void +bce_get_media(struct bce_softc *sc) +{ + u32 val; + + sc->bce_phy_addr = 1; + + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { + u32 val = REG_RD(sc, BCE_MISC_DUAL_MEDIA_CTRL); + u32 bond_id = val & BCE_MISC_DUAL_MEDIA_CTRL_BOND_ID; + u32 strap; + + /* + * The BCM5709S is software configurable + * for Copper or SerDes operation. + */ + if (bond_id == BCE_MISC_DUAL_MEDIA_CTRL_BOND_ID_C) { + DBPRINT(sc, BCE_INFO_LOAD, "5709 bonded for copper.\n"); + goto bce_get_media_exit; + } else if (bond_id == BCE_MISC_DUAL_MEDIA_CTRL_BOND_ID_S) { + DBPRINT(sc, BCE_INFO_LOAD, "5709 bonded for dual media.\n"); + sc->bce_phy_flags |= BCE_PHY_SERDES_FLAG; + goto bce_get_media_exit; + } + + if (val & BCE_MISC_DUAL_MEDIA_CTRL_STRAP_OVERRIDE) + strap = (val & BCE_MISC_DUAL_MEDIA_CTRL_PHY_CTRL) >> 21; + else + strap = (val & BCE_MISC_DUAL_MEDIA_CTRL_PHY_CTRL_STRAP) >> 8; + + if (pci_get_function(sc->bce_dev) == 0) { + switch (strap) { + case 0x4: + case 0x5: + case 0x6: + DBPRINT(sc, BCE_INFO_LOAD, + "BCM5709 s/w configured for SerDes.\n"); + sc->bce_phy_flags |= BCE_PHY_SERDES_FLAG; + default: + DBPRINT(sc, BCE_INFO_LOAD, + "BCM5709 s/w configured for Copper.\n"); + } + } else { + switch (strap) { + case 0x1: + case 0x2: + case 0x4: + DBPRINT(sc, BCE_INFO_LOAD, + "BCM5709 s/w configured for SerDes.\n"); + sc->bce_phy_flags |= BCE_PHY_SERDES_FLAG; + default: + DBPRINT(sc, BCE_INFO_LOAD, + "BCM5709 s/w configured for Copper.\n"); + } + } + + } else if (BCE_CHIP_BOND_ID(sc) & BCE_CHIP_BOND_ID_SERDES_BIT) + sc->bce_phy_flags |= BCE_PHY_SERDES_FLAG; + + if (sc->bce_phy_flags && BCE_PHY_SERDES_FLAG) { + sc->bce_flags |= BCE_NO_WOL_FLAG; + if (BCE_CHIP_NUM(sc) != BCE_CHIP_NUM_5706) { + sc->bce_phy_addr = 2; + val = REG_RD_IND(sc, sc->bce_shmem_base + + BCE_SHARED_HW_CFG_CONFIG); + if (val & BCE_SHARED_HW_CFG_PHY_2_5G) { + sc->bce_phy_flags |= BCE_PHY_2_5G_CAPABLE_FLAG; + DBPRINT(sc, BCE_INFO_LOAD, "Found 2.5Gb capable adapter\n"); + } + } + } else if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5706) || + (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5708)) + sc->bce_phy_flags |= BCE_PHY_CRC_FIX_FLAG; + +bce_get_media_exit: + DBPRINT(sc, (BCE_INFO_LOAD | BCE_INFO_PHY), + "Using PHY address %d.\n", sc->bce_phy_addr); +} /****************************************************************************/ /* Free any DMA memory owned by the driver. */ @@ -2121,6 +2359,34 @@ bce_dma_free(struct bce_softc *sc) if (sc->stats_tag != NULL) bus_dma_tag_destroy(sc->stats_tag); + /* Free, unmap and destroy all context memory pages. */ + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { + for (i = 0; i < sc->ctx_pages; i++ ) { + if (sc->ctx_block[i] != NULL) { + bus_dmamem_free( + sc->ctx_tag, + sc->ctx_block[i], + sc->ctx_map[i]); + sc->ctx_block[i] = NULL; + } + + if (sc->ctx_map[i] != NULL) { + bus_dmamap_unload( + sc->ctx_tag, + sc->ctx_map[i]); + bus_dmamap_destroy( + sc->ctx_tag, + sc->ctx_map[i]); + sc->ctx_map[i] = NULL; + } + } + + /* Destroy the context memory tag. */ + if (sc->ctx_tag != NULL) { + bus_dma_tag_destroy(sc->ctx_tag); + sc->ctx_tag = NULL; + } + } /* Free, unmap and destroy all TX buffer descriptor chain pages. */ for (i = 0; i < TX_PAGES; i++ ) { @@ -2250,6 +2516,21 @@ bce_dma_map_addr(void *arg, bus_dma_segm /* Allocates DMA memory needed for the various global structures needed by */ /* hardware. */ /* */ +/* */ +/* Memory alignment requirements: */ +/* -----------------+----------+----------+ */ +/* | 5706 | 5708 | 5709 | 5716 | */ +/* -----------------+----------+----------+----------+----------+ */ +/* Status Block | 8 bytes | 8 bytes | 16 bytes | 16 bytes | */ +/* Statistics Block | 8 bytes | 8 bytes | 16 bytes | 16 bytes | */ +/* RX Buffers | 16 bytes | 16 bytes | 16 bytes | 16 bytes | */ +/* PG Buffers | none | none | none | none | */ +/* TX Buffers | none | none | none | none | */ +/* Chain Pages(1) | 4KiB | 4KiB | 4KiB | 4KiB | */ +/* -----------------+----------+----------+----------+----------+ */ +/* */ +/* (1) Must align with CPU page size (BCM_PAGE_SZIE). */ +/* */ /* Returns: */ /* 0 for success, positive value for failure. */ /****************************************************************************/ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Nov 6 18:28:14 2009 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 605E7106566C; Fri, 6 Nov 2009 18:28:14 +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 4EF3B8FC0C; Fri, 6 Nov 2009 18:28: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 nA6ISDkL025104; Fri, 6 Nov 2009 18:28:14 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA6ISD8a025098; Fri, 6 Nov 2009 18:28:13 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200911061828.nA6ISD8a025098@svn.freebsd.org> From: John Baldwin Date: Fri, 6 Nov 2009 18:28: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: r198995 - head/sys/dev/an 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, 06 Nov 2009 18:28:14 -0000 Author: jhb Date: Fri Nov 6 18:28:13 2009 New Revision: 198995 URL: http://svn.freebsd.org/changeset/base/198995 Log: - Use device_printf() instead of printf() with an explicit unit number in the PCI attach routine. - Simplify PCI probe. - Remove no-longer-used 'unit' from an_attach() parameters. PR: kern/126924 Submitted by: gavin Modified: head/sys/dev/an/if_an.c head/sys/dev/an/if_an_isa.c head/sys/dev/an/if_an_pccard.c head/sys/dev/an/if_an_pci.c head/sys/dev/an/if_anreg.h Modified: head/sys/dev/an/if_an.c ============================================================================== --- head/sys/dev/an/if_an.c Fri Nov 6 17:58:44 2009 (r198994) +++ head/sys/dev/an/if_an.c Fri Nov 6 18:28:13 2009 (r198995) @@ -674,7 +674,7 @@ an_init_mpi350_desc(struct an_softc *sc) } int -an_attach(struct an_softc *sc, int unit, int flags) +an_attach(struct an_softc *sc, int flags) { struct ifnet *ifp; int error = EIO; Modified: head/sys/dev/an/if_an_isa.c ============================================================================== --- head/sys/dev/an/if_an_isa.c Fri Nov 6 17:58:44 2009 (r198994) +++ head/sys/dev/an/if_an_isa.c Fri Nov 6 18:28:13 2009 (r198995) @@ -115,7 +115,7 @@ an_attach_isa(device_t dev) sc->an_btag = rman_get_bustag(sc->port_res); sc->an_dev = dev; - error = an_attach(sc, device_get_unit(dev), flags); + error = an_attach(sc, flags); if (error) { an_release_resources(dev); return (error); Modified: head/sys/dev/an/if_an_pccard.c ============================================================================== --- head/sys/dev/an/if_an_pccard.c Fri Nov 6 17:58:44 2009 (r198994) +++ head/sys/dev/an/if_an_pccard.c Fri Nov 6 18:28:13 2009 (r198995) @@ -145,7 +145,7 @@ an_pccard_attach(device_t dev) sc->an_btag = rman_get_bustag(sc->port_res); sc->an_dev = dev; - error = an_attach(sc, device_get_unit(dev), flags); + error = an_attach(sc, flags); if (error) goto fail; Modified: head/sys/dev/an/if_an_pci.c ============================================================================== --- head/sys/dev/an/if_an_pci.c Fri Nov 6 17:58:44 2009 (r198994) +++ head/sys/dev/an/if_an_pci.c Fri Nov 6 18:28:13 2009 (r198995) @@ -103,6 +103,7 @@ struct an_type { static struct an_type an_devs[] = { { AIRONET_VENDORID, AIRONET_DEVICEID_35x, "Cisco Aironet 350 Series" }, + { AIRONET_VENDORID, AIRONET_DEVICEID_MPI350, "Cisco Aironet MPI350" }, { AIRONET_VENDORID, AIRONET_DEVICEID_4500, "Aironet PCI4500" }, { AIRONET_VENDORID, AIRONET_DEVICEID_4800, "Aironet PCI4800" }, { AIRONET_VENDORID, AIRONET_DEVICEID_4xxx, "Aironet PCI4500/PCI4800" }, @@ -133,13 +134,6 @@ an_probe_pci(device_t dev) t++; } - if (pci_get_vendor(dev) == AIRONET_VENDORID && - pci_get_device(dev) == AIRONET_DEVICEID_MPI350) { - device_set_desc(dev, "Cisco Aironet MPI350"); - an_pci_probe(dev); - return(BUS_PROBE_DEFAULT); - } - return(ENXIO); } @@ -149,10 +143,9 @@ an_attach_pci(dev) { u_int32_t command; struct an_softc *sc; - int unit, flags, error = 0; + int flags, error = 0; sc = device_get_softc(dev); - unit = device_get_unit(dev); flags = device_get_flags(dev); if (pci_get_vendor(dev) == AIRONET_VENDORID && @@ -169,7 +162,7 @@ an_attach_pci(dev) command = pci_read_config(dev, PCIR_COMMAND, 4); if (!(command & PCIM_CMD_PORTEN)) { - printf("an%d: failed to enable I/O ports!\n", unit); + device_printf(dev, "failed to enable I/O ports!\n"); error = ENXIO; goto fail; } @@ -178,7 +171,7 @@ an_attach_pci(dev) error = an_alloc_port(dev, sc->port_rid, 1); if (error) { - printf("an%d: couldn't map ports\n", unit); + device_printf(dev, "couldn't map ports\n"); goto fail; } @@ -191,7 +184,7 @@ an_attach_pci(dev) sc->mem_rid = PCIR_BAR(1); error = an_alloc_memory(dev, sc->mem_rid, 1); if (error) { - printf("an%d: couldn't map memory\n", unit); + device_printf(dev, "couldn't map memory\n"); goto fail; } sc->an_mem_btag = rman_get_bustag(sc->mem_res); @@ -202,7 +195,7 @@ an_attach_pci(dev) error = an_alloc_aux_memory(dev, sc->mem_aux_rid, AN_AUX_MEM_SIZE); if (error) { - printf("an%d: couldn't map aux memory\n", unit); + device_printf(dev, "couldn't map aux memory\n"); goto fail; } sc->an_mem_aux_btag = rman_get_bustag(sc->mem_aux_res); @@ -222,7 +215,7 @@ an_attach_pci(dev) NULL, /* lockarg */ &sc->an_dtag); if (error) { - printf("an%d: couldn't get DMA region\n", unit); + device_printf(dev, "couldn't get DMA region\n"); goto fail; } } @@ -230,12 +223,14 @@ an_attach_pci(dev) /* Allocate interrupt */ error = an_alloc_irq(dev, 0, RF_SHAREABLE); if (error) { + device_printf(dev, "couldn't get interrupt\n"); goto fail; } sc->an_dev = dev; - error = an_attach(sc, device_get_unit(dev), flags); + error = an_attach(sc, flags); if (error) { + device_printf(dev, "couldn't attach\n"); goto fail; } @@ -244,6 +239,8 @@ an_attach_pci(dev) */ error = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_NET, NULL, an_intr, sc, &sc->irq_handle); + if (error) + device_printf(dev, "couldn't setup interrupt\n"); fail: if (error) Modified: head/sys/dev/an/if_anreg.h ============================================================================== --- head/sys/dev/an/if_anreg.h Fri Nov 6 17:58:44 2009 (r198994) +++ head/sys/dev/an/if_anreg.h Fri Nov 6 18:28:13 2009 (r198995) @@ -511,7 +511,7 @@ int an_pci_probe (device_t); int an_probe (device_t); int an_shutdown (device_t); void an_resume (device_t); -int an_attach (struct an_softc *, int, int); +int an_attach (struct an_softc *, int); int an_detach (device_t); void an_stop (struct an_softc *); From owner-svn-src-all@FreeBSD.ORG Fri Nov 6 18:28:32 2009 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 7193C10656C0; Fri, 6 Nov 2009 18:28:32 +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 42FA28FC14; Fri, 6 Nov 2009 18:28:32 +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 E8F5946B46; Fri, 6 Nov 2009 13:28:31 -0500 (EST) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 111938A01D; Fri, 6 Nov 2009 13:28:31 -0500 (EST) From: John Baldwin To: Gavin Atkinson Date: Fri, 6 Nov 2009 13:22:02 -0500 User-Agent: KMail/1.9.7 References: <200911061452.nA6Eqbxm020072@svn.freebsd.org> <1257525277.64262.5.camel@buffy.york.ac.uk> In-Reply-To: <1257525277.64262.5.camel@buffy.york.ac.uk> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200911061322.02504.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Fri, 06 Nov 2009 13:28:31 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-all@freebsd.org Subject: Re: svn commit: r198987 - in head/sys/dev: an ixgb vge 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, 06 Nov 2009 18:28:32 -0000 On Friday 06 November 2009 11:34:37 am Gavin Atkinson wrote: > On Fri, 2009-11-06 at 14:52 +0000, John Baldwin wrote: > > Author: jhb > > Date: Fri Nov 6 14:52:37 2009 > > New Revision: 198987 > > URL: http://svn.freebsd.org/changeset/base/198987 > > > > Log: > > Use device_printf() and if_printf() instead of printf() with an explicit > > unit number and remove 'unit' members from softc. > > > > Modified: > > head/sys/dev/an/if_an.c > [snip] > > This covers most, but not all of my PR 126924 - is there any chance you > could look at the rest of it? (I can create a new patch if you wish). Actually, I didn't touch if_an_pci.c, so I think the patch in the PR still applies. The PR patch looks good to me. I can commit it in a second. Do you still have the an(4) card? If so, would you be able to test the patch at http://www.FreeBSD.org/~jhb/patches/cleanup.patch? For an(4) specifically it fixes several issues in the locking as well as changing the watchdog handling to not use the deprecated if_watchdog interface. Thanks. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Fri Nov 6 18:36:10 2009 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 4F19D1065693; Fri, 6 Nov 2009 18:36:10 +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 EFCCE8FC1A; Fri, 6 Nov 2009 18:36:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA6Ia9oS025389; Fri, 6 Nov 2009 18:36:09 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA6Ia98Z025387; Fri, 6 Nov 2009 18:36:09 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200911061836.nA6Ia98Z025387@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 6 Nov 2009 18:36: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: r198996 - head/sys/dev/msk 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, 06 Nov 2009 18:36:10 -0000 Author: yongari Date: Fri Nov 6 18:36:09 2009 New Revision: 198996 URL: http://svn.freebsd.org/changeset/base/198996 Log: Remove unnecessary header file. Modified: head/sys/dev/msk/if_msk.c Modified: head/sys/dev/msk/if_msk.c ============================================================================== --- head/sys/dev/msk/if_msk.c Fri Nov 6 18:28:13 2009 (r198995) +++ head/sys/dev/msk/if_msk.c Fri Nov 6 18:36:09 2009 (r198996) @@ -137,7 +137,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include From owner-svn-src-all@FreeBSD.ORG Fri Nov 6 18:51:06 2009 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 25F0A106566B; Fri, 6 Nov 2009 18:51:06 +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 14DD28FC0C; Fri, 6 Nov 2009 18:51: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 nA6Ip5nl025692; Fri, 6 Nov 2009 18:51:05 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA6Ip5XF025690; Fri, 6 Nov 2009 18:51:05 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200911061851.nA6Ip5XF025690@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 6 Nov 2009 18:51: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: r198997 - head/sys/dev/msk 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, 06 Nov 2009 18:51:06 -0000 Author: yongari Date: Fri Nov 6 18:51:05 2009 New Revision: 198997 URL: http://svn.freebsd.org/changeset/base/198997 Log: It's normal to see Rx FIFO overruns under high network load and showing the message creates other side-effects. Remove the Rx FIFO overrun message in interrupt handler. msk(4) should recover from the FIFO overruns without any user intervention. Users can still check the Rx FIFO overrun counter from MAC MIB statistics maintained in driver(dev.msk.0.stats.rx.overflows). Modified: head/sys/dev/msk/if_msk.c Modified: head/sys/dev/msk/if_msk.c ============================================================================== --- head/sys/dev/msk/if_msk.c Fri Nov 6 18:36:09 2009 (r198996) +++ head/sys/dev/msk/if_msk.c Fri Nov 6 18:51:05 2009 (r198997) @@ -3217,11 +3217,9 @@ msk_intr_gmac(struct msk_if_softc *sc_if status = CSR_READ_1(sc, MR_ADDR(sc_if->msk_port, GMAC_IRQ_SRC)); /* GMAC Rx FIFO overrun. */ - if ((status & GM_IS_RX_FF_OR) != 0) { + if ((status & GM_IS_RX_FF_OR) != 0) CSR_WRITE_4(sc, MR_ADDR(sc_if->msk_port, RX_GMF_CTRL_T), GMF_CLI_RX_FO); - device_printf(sc_if->msk_if_dev, "Rx FIFO overrun!\n"); - } /* GMAC Tx FIFO underrun. */ if ((status & GM_IS_TX_FF_UR) != 0) { CSR_WRITE_4(sc, MR_ADDR(sc_if->msk_port, TX_GMF_CTRL_T), From owner-svn-src-all@FreeBSD.ORG Fri Nov 6 19:16:34 2009 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 4B599106566C; Fri, 6 Nov 2009 19:16:34 +0000 (UTC) (envelope-from ambrisko@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 38E328FC0C; Fri, 6 Nov 2009 19:16: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 nA6JGYYX026356; Fri, 6 Nov 2009 19:16:34 GMT (envelope-from ambrisko@svn.freebsd.org) Received: (from ambrisko@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA6JGYrm026353; Fri, 6 Nov 2009 19:16:34 GMT (envelope-from ambrisko@svn.freebsd.org) Message-Id: <200911061916.nA6JGYrm026353@svn.freebsd.org> From: Doug Ambrisko Date: Fri, 6 Nov 2009 19:16:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198998 - in stable/6/sys: amd64/amd64 i386/i386 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, 06 Nov 2009 19:16:34 -0000 Author: ambrisko Date: Fri Nov 6 19:16:33 2009 New Revision: 198998 URL: http://svn.freebsd.org/changeset/base/198998 Log: Fix botched merge. This was in an old repo. that I thought was current. Check in the real working code. Pointy hat to: ambrisko Modified: stable/6/sys/amd64/amd64/mp_machdep.c stable/6/sys/i386/i386/mp_machdep.c Modified: stable/6/sys/amd64/amd64/mp_machdep.c ============================================================================== --- stable/6/sys/amd64/amd64/mp_machdep.c Fri Nov 6 18:51:05 2009 (r198997) +++ stable/6/sys/amd64/amd64/mp_machdep.c Fri Nov 6 19:16:33 2009 (r198998) @@ -133,6 +133,7 @@ struct cpu_info { int cpu_present:1; int cpu_bsp:1; int cpu_disabled:1; + int cpu_hyperthread:1; } static cpu_info[MAX_APIC_ID + 1]; static int cpu_apic_ids[MAXCPU]; @@ -342,11 +343,6 @@ cpu_mp_start(void) KASSERT(boot_cpu_id == PCPU_GET(apic_id), ("BSP's APIC ID doesn't match boot_cpu_id")); - assign_cpu_ids(); - - /* Start each Application Processor */ - start_all_aps(); - /* Setup the initial logical CPUs info. */ logical_cpus = logical_cpus_mask = 0; if (cpu_feature & CPUID_HTT) @@ -394,6 +390,12 @@ cpu_mp_start(void) hyperthreading_cpus = logical_cpus; } + assign_cpu_ids(); + + /* Start each Application Processor */ + start_all_aps(); + + set_interrupt_apic_ids(); } @@ -404,9 +406,10 @@ cpu_mp_start(void) void cpu_mp_announce(void) { + const char *hyperthread; int i; - /* List active CPUs first. */ + /* List Active CPUs first. */ printf(" cpu0 (BSP): APIC ID: %2d\n", boot_cpu_id); for (i = 1; i < mp_ncpus; i++) { if (cpu_info[cpu_apic_ids[i]].cpu_hyperthread) @@ -414,7 +417,7 @@ cpu_mp_announce(void) else hyperthread = ""; printf(" cpu%d (AP%s): APIC ID: %2d\n", i, hyperthread, - cpu_apic_ids[i]); + cpu_apic_ids[i]); } /* List disabled CPUs last. */ @@ -426,7 +429,7 @@ cpu_mp_announce(void) else hyperthread = ""; printf(" cpu (AP%s): APIC ID: %2d (disabled)\n", hyperthread, - i); + i); } } @@ -645,6 +648,9 @@ assign_cpu_ids(void) if (!cpu_info[i].cpu_present || cpu_info[i].cpu_bsp) continue; + if (hyperthreading_cpus > 1 && i % hyperthreading_cpus != 0) + cpu_info[i].cpu_hyperthread = 1; + /* Don't use this CPU if it has been disabled by a tunable. */ if (resource_disabled("lapic", i)) { cpu_info[i].cpu_disabled = 1; @@ -655,18 +661,17 @@ assign_cpu_ids(void) /* * Assign CPU IDs to local APIC IDs and disable any CPUs * beyond MAXCPU. CPU 0 is always assigned to the BSP. - * + * * To minimize confusion for userland, we attempt to number - * CPUs such that all threads and cores in a package are - * grouped together. For now we assume that the BSP is always + * CPUs such that all the threads and cores in a package are + * grouped together. For now we assume that the BSP is always * the first thread in a package and just start adding APs * starting with the BSP's APIC ID. */ mp_ncpus = 1; cpu_apic_ids[0] = boot_cpu_id; - apic_cpuids[boot_cpu_id] = 0; - for (i = boot_cpu_id + 1; i != boot_cpu_id; - i == MAX_APIC_ID ? i = 0 : i++) { + for (i = boot_cpu_id + 1; i != boot_cpu_id; + i == MAX_APIC_ID ? i = 0 : i++) { if (!cpu_info[i].cpu_present || cpu_info[i].cpu_bsp || cpu_info[i].cpu_disabled) continue; Modified: stable/6/sys/i386/i386/mp_machdep.c ============================================================================== --- stable/6/sys/i386/i386/mp_machdep.c Fri Nov 6 18:51:05 2009 (r198997) +++ stable/6/sys/i386/i386/mp_machdep.c Fri Nov 6 19:16:33 2009 (r198998) @@ -217,6 +217,7 @@ struct cpu_info { int cpu_present:1; int cpu_bsp:1; int cpu_disabled:1; + int cpu_hyperthread:1; } static cpu_info[MAX_APIC_ID + 1]; static int cpu_apic_ids[MAXCPU]; @@ -418,11 +419,6 @@ cpu_mp_start(void) KASSERT(boot_cpu_id == PCPU_GET(apic_id), ("BSP's APIC ID doesn't match boot_cpu_id")); - assign_cpu_ids(); - - /* Start each Application Processor */ - start_all_aps(); - /* Setup the initial logical CPUs info. */ logical_cpus = logical_cpus_mask = 0; if (cpu_feature & CPUID_HTT) @@ -470,6 +466,11 @@ cpu_mp_start(void) hyperthreading_cpus = logical_cpus; } + assign_cpu_ids(); + + /* Start each Application Processor */ + start_all_aps(); + set_interrupt_apic_ids(); } @@ -480,11 +481,12 @@ cpu_mp_start(void) void cpu_mp_announce(void) { + const char *hyperthread; int i; POSTCODE(MP_ANNOUNCE_POST); - /* List active CPUs first. */ + /* List Active CPUs first. */ printf(" cpu0 (BSP): APIC ID: %2d\n", boot_cpu_id); for (i = 1; i < mp_ncpus; i++) { if (cpu_info[cpu_apic_ids[i]].cpu_hyperthread) @@ -492,11 +494,11 @@ cpu_mp_announce(void) else hyperthread = ""; printf(" cpu%d (AP%s): APIC ID: %2d\n", i, hyperthread, - cpu_apic_ids[i]); + cpu_apic_ids[i]); } /* List disabled CPUs last. */ - for (i = 0; i <= MAX_APIC_ID; i++) { + for (i=0 ; i<= MAX_APIC_ID; i++ ) { if (!cpu_info[i].cpu_present || !cpu_info[i].cpu_disabled) continue; if (cpu_info[i].cpu_hyperthread) @@ -504,7 +506,7 @@ cpu_mp_announce(void) else hyperthread = ""; printf(" cpu (AP%s): APIC ID: %2d (disabled)\n", hyperthread, - i); + i); } } @@ -723,6 +725,9 @@ assign_cpu_ids(void) if (!cpu_info[i].cpu_present || cpu_info[i].cpu_bsp) continue; + if (hyperthreading_cpus > 1 && i % hyperthreading_cpus != 0) + cpu_info[i].cpu_hyperthread = 1; + /* Don't use this CPU if it has been disabled by a tunable. */ if (resource_disabled("lapic", i)) { cpu_info[i].cpu_disabled = 1; @@ -735,16 +740,15 @@ assign_cpu_ids(void) * beyond MAXCPU. CPU 0 is always assigned to the BSP. * * To minimize confusion for userland, we attempt to number - * CPUs such that all threads and cores in a package are - * grouped together. For now we assume that the BSP is always + * CPUs such that all the threads and cores in a package are + * grouped together. For now we assume that the BSP is always * the first thread in a package and just start adding APs * starting with the BSP's APIC ID. */ mp_ncpus = 1; cpu_apic_ids[0] = boot_cpu_id; - apic_cpuids[boot_cpu_id] = 0; for (i = boot_cpu_id + 1; i != boot_cpu_id; - i == MAX_APIC_ID ? i = 0 : i++) { + i == MAX_APIC_ID ? i = 0 : i++) { if (!cpu_info[i].cpu_present || cpu_info[i].cpu_bsp || cpu_info[i].cpu_disabled) continue; From owner-svn-src-all@FreeBSD.ORG Fri Nov 6 20:07:16 2009 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 96D9A1065679; Fri, 6 Nov 2009 20:07:16 +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 866F48FC13; Fri, 6 Nov 2009 20:07: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 nA6K7G4d027263; Fri, 6 Nov 2009 20:07:16 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA6K7GJ1027261; Fri, 6 Nov 2009 20:07:16 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200911062007.nA6K7GJ1027261@svn.freebsd.org> From: John Baldwin Date: Fri, 6 Nov 2009 20:07: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: r198999 - head/sys/dev/msk 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, 06 Nov 2009 20:07:16 -0000 Author: jhb Date: Fri Nov 6 20:07:16 2009 New Revision: 198999 URL: http://svn.freebsd.org/changeset/base/198999 Log: Take a step towards removing if_watchdog/if_timer. Don't explicitly set if_watchdog/if_timer to NULL/0 when initializing an ifnet. if_alloc() sets those members to NULL/0 already. (Missed this driver in the earlier commit.) Modified: head/sys/dev/msk/if_msk.c Modified: head/sys/dev/msk/if_msk.c ============================================================================== --- head/sys/dev/msk/if_msk.c Fri Nov 6 19:16:33 2009 (r198998) +++ head/sys/dev/msk/if_msk.c Fri Nov 6 20:07:16 2009 (r198999) @@ -1518,8 +1518,6 @@ msk_attach(device_t dev) ifp->if_capenable = ifp->if_capabilities; ifp->if_ioctl = msk_ioctl; ifp->if_start = msk_start; - ifp->if_timer = 0; - ifp->if_watchdog = NULL; ifp->if_init = msk_init; IFQ_SET_MAXLEN(&ifp->if_snd, MSK_TX_RING_CNT - 1); ifp->if_snd.ifq_drv_maxlen = MSK_TX_RING_CNT - 1; From owner-svn-src-all@FreeBSD.ORG Fri Nov 6 20:23:17 2009 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 0EDF7106568F; Fri, 6 Nov 2009 20:23:17 +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 D84EB8FC0C; Fri, 6 Nov 2009 20:23: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 nA6KNGeR027617; Fri, 6 Nov 2009 20:23:16 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA6KNGfE027615; Fri, 6 Nov 2009 20:23:16 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200911062023.nA6KNGfE027615@svn.freebsd.org> From: John Baldwin Date: Fri, 6 Nov 2009 20:23: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: r199000 - 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, 06 Nov 2009 20:23:17 -0000 Author: jhb Date: Fri Nov 6 20:23:16 2009 New Revision: 199000 URL: http://svn.freebsd.org/changeset/base/199000 Log: MFC 198367: Set the devclass_t pointer specified in the DRIVER_MODULE() macro sooner so it is always valid when a driver's identify routine is called. Modified: stable/8/sys/kern/subr_bus.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/subr_bus.c ============================================================================== --- stable/8/sys/kern/subr_bus.c Fri Nov 6 20:07:16 2009 (r198999) +++ stable/8/sys/kern/subr_bus.c Fri Nov 6 20:23:16 2009 (r199000) @@ -1049,9 +1049,10 @@ devclass_driver_added(devclass_t dc, dri * @param driver the driver to register */ static int -devclass_add_driver(devclass_t dc, driver_t *driver, int pass) +devclass_add_driver(devclass_t dc, driver_t *driver, int pass, devclass_t *dcp) { driverlink_t dl; + const char *parentname; PDEBUG(("%s", DRIVERNAME(driver))); @@ -1072,9 +1073,17 @@ devclass_add_driver(devclass_t dc, drive kobj_class_compile((kobj_class_t) driver); /* - * Make sure the devclass which the driver is implementing exists. + * If the driver has any base classes, make the + * devclass inherit from the devclass of the driver's + * first base class. This will allow the system to + * search for drivers in both devclasses for children + * of a device using this driver. */ - devclass_find_internal(driver->name, NULL, TRUE); + if (driver->baseclasses) + parentname = driver->baseclasses[0]->name; + else + parentname = NULL; + *dcp = devclass_find_internal(driver->name, parentname, TRUE); dl->driver = driver; TAILQ_INSERT_TAIL(&dc->drivers, dl, link); @@ -4117,27 +4126,8 @@ driver_module_handler(module_t mod, int driver = dmd->dmd_driver; PDEBUG(("Loading module: driver %s on bus %s (pass %d)", DRIVERNAME(driver), dmd->dmd_busname, pass)); - error = devclass_add_driver(bus_devclass, driver, pass); - if (error) - break; - - /* - * If the driver has any base classes, make the - * devclass inherit from the devclass of the driver's - * first base class. This will allow the system to - * search for drivers in both devclasses for children - * of a device using this driver. - */ - if (driver->baseclasses) { - const char *parentname; - parentname = driver->baseclasses[0]->name; - *dmd->dmd_devclass = - devclass_find_internal(driver->name, - parentname, TRUE); - } else { - *dmd->dmd_devclass = - devclass_find_internal(driver->name, NULL, TRUE); - } + error = devclass_add_driver(bus_devclass, driver, pass, + dmd->dmd_devclass); break; case MOD_UNLOAD: From owner-svn-src-all@FreeBSD.ORG Fri Nov 6 20:23:43 2009 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 315FD1065695; Fri, 6 Nov 2009 20:23:43 +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 15FB68FC16; Fri, 6 Nov 2009 20:23: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 nA6KNgMx027662; Fri, 6 Nov 2009 20:23:42 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA6KNgLt027659; Fri, 6 Nov 2009 20:23:42 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200911062023.nA6KNgLt027659@svn.freebsd.org> From: John Baldwin Date: Fri, 6 Nov 2009 20:23:42 +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: r199001 - in stable/7/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, 06 Nov 2009 20:23:43 -0000 Author: jhb Date: Fri Nov 6 20:23:42 2009 New Revision: 199001 URL: http://svn.freebsd.org/changeset/base/199001 Log: MFC 198367: Set the devclass_t pointer specified in the DRIVER_MODULE() macro sooner so it is always valid when a driver's identify routine is called. Modified: stable/7/sys/kern/subr_bus.c stable/7/sys/sys/bus.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/kern/subr_bus.c ============================================================================== --- stable/7/sys/kern/subr_bus.c Fri Nov 6 20:23:16 2009 (r199000) +++ stable/7/sys/kern/subr_bus.c Fri Nov 6 20:23:42 2009 (r199001) @@ -858,9 +858,10 @@ devclass_find(const char *classname) * @param driver the driver to register */ int -devclass_add_driver(devclass_t dc, driver_t *driver) +devclass_add_driver(devclass_t dc, driver_t *driver, devclass_t *dcp) { driverlink_t dl; + const char *parentname; int i; PDEBUG(("%s", DRIVERNAME(driver))); @@ -878,9 +879,17 @@ devclass_add_driver(devclass_t dc, drive kobj_class_compile((kobj_class_t) driver); /* - * Make sure the devclass which the driver is implementing exists. + * If the driver has any base classes, make the + * devclass inherit from the devclass of the driver's + * first base class. This will allow the system to + * search for drivers in both devclasses for children + * of a device using this driver. */ - devclass_find_internal(driver->name, NULL, TRUE); + if (driver->baseclasses) + parentname = driver->baseclasses[0]->name; + else + parentname = NULL; + *dcp = devclass_find_internal(driver->name, parentname, TRUE); dl->driver = driver; TAILQ_INSERT_TAIL(&dc->drivers, dl, link); @@ -3853,27 +3862,8 @@ driver_module_handler(module_t mod, int driver = dmd->dmd_driver; PDEBUG(("Loading module: driver %s on bus %s", DRIVERNAME(driver), dmd->dmd_busname)); - error = devclass_add_driver(bus_devclass, driver); - if (error) - break; - - /* - * If the driver has any base classes, make the - * devclass inherit from the devclass of the driver's - * first base class. This will allow the system to - * search for drivers in both devclasses for children - * of a device using this driver. - */ - if (driver->baseclasses) { - const char *parentname; - parentname = driver->baseclasses[0]->name; - *dmd->dmd_devclass = - devclass_find_internal(driver->name, - parentname, TRUE); - } else { - *dmd->dmd_devclass = - devclass_find_internal(driver->name, NULL, TRUE); - } + error = devclass_add_driver(bus_devclass, driver, + dmd->dmd_devclass); break; case MOD_UNLOAD: Modified: stable/7/sys/sys/bus.h ============================================================================== --- stable/7/sys/sys/bus.h Fri Nov 6 20:23:16 2009 (r199000) +++ stable/7/sys/sys/bus.h Fri Nov 6 20:23:42 2009 (r199001) @@ -432,7 +432,8 @@ void device_verbose(device_t dev); /* * Access functions for devclass. */ -int devclass_add_driver(devclass_t dc, kobj_class_t driver); +int devclass_add_driver(devclass_t dc, kobj_class_t driver, + devclass_t *dcp); int devclass_delete_driver(devclass_t dc, kobj_class_t driver); devclass_t devclass_create(const char *classname); devclass_t devclass_find(const char *classname); From owner-svn-src-all@FreeBSD.ORG Fri Nov 6 20:32:27 2009 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 7225D10656A6; Fri, 6 Nov 2009 20:32:27 +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 608A38FC25; Fri, 6 Nov 2009 20:32: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 nA6KWRCE027880; Fri, 6 Nov 2009 20:32:27 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA6KWRXb027876; Fri, 6 Nov 2009 20:32:27 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <200911062032.nA6KWRXb027876@svn.freebsd.org> From: Jung-uk Kim Date: Fri, 6 Nov 2009 20:32: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: r199002 - in head/sys: dev/fb dev/pci 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: Fri, 06 Nov 2009 20:32:27 -0000 Author: jkim Date: Fri Nov 6 20:32:26 2009 New Revision: 199002 URL: http://svn.freebsd.org/changeset/base/199002 Log: Remove duplicate suspend/resume code from vga_pci.c and let vga(4) register itself to an associated PCI device if it exists. It is little bit hackish but it should fix build without frame buffer driver since r198964. Fix some style(9) nits in vga_isa.c while we are here. Modified: head/sys/dev/fb/vgareg.h head/sys/dev/pci/vga_pci.c head/sys/isa/vga_isa.c Modified: head/sys/dev/fb/vgareg.h ============================================================================== --- head/sys/dev/fb/vgareg.h Fri Nov 6 20:23:42 2009 (r199001) +++ head/sys/dev/fb/vgareg.h Fri Nov 6 20:32:26 2009 (r199002) @@ -69,6 +69,7 @@ struct video_adapter; typedef struct vga_softc { struct video_adapter *adp; + device_t pci_dev; void *state_buf; void *pal_buf; #ifdef FB_INSTALL_CDEV Modified: head/sys/dev/pci/vga_pci.c ============================================================================== --- head/sys/dev/pci/vga_pci.c Fri Nov 6 20:23:42 2009 (r199001) +++ head/sys/dev/pci/vga_pci.c Fri Nov 6 20:32:26 2009 (r199002) @@ -40,15 +40,12 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include -#include #include #include #include #include -#include #include #include @@ -60,6 +57,7 @@ struct vga_resource { }; struct vga_pci_softc { + device_t vga_isa_dev; /* Sister isavga driver. */ device_t vga_msi_child; /* Child driver using MSI. */ struct vga_resource vga_res[PCIR_MAX_BAR_0 + 1]; }; @@ -117,86 +115,23 @@ vga_pci_attach(device_t dev) static int vga_pci_suspend(device_t dev) { - vga_softc_t *sc; - devclass_t dc; - int err, nbytes; - - err = bus_generic_suspend(dev); - if (err) - return (err); - - sc = NULL; - if (device_get_unit(dev) == vga_pci_default_unit) { - dc = devclass_find(VGA_DRIVER_NAME); - if (dc != NULL) - sc = devclass_get_softc(dc, 0); - } - if (sc == NULL) - return (0); - - /* Save the video state across the suspend. */ - if (sc->state_buf != NULL) - goto save_palette; - nbytes = vidd_save_state(sc->adp, NULL, 0); - if (nbytes <= 0) - goto save_palette; - sc->state_buf = malloc(nbytes, M_TEMP, M_NOWAIT); - if (sc->state_buf == NULL) - goto save_palette; - if (bootverbose) - device_printf(dev, "saving %d bytes of video state\n", nbytes); - if (vidd_save_state(sc->adp, sc->state_buf, nbytes) != 0) { - device_printf(dev, "failed to save state (nbytes=%d)\n", - nbytes); - free(sc->state_buf, M_TEMP); - sc->state_buf = NULL; - } + struct vga_pci_softc *sc; -save_palette: - /* Save the color palette across the suspend. */ - if (sc->pal_buf != NULL) - return (0); - sc->pal_buf = malloc(256 * 3, M_TEMP, M_NOWAIT); - if (sc->pal_buf != NULL) { - if (bootverbose) - device_printf(dev, "saving color palette\n"); - if (vidd_save_palette(sc->adp, sc->pal_buf) != 0) { - device_printf(dev, "failed to save palette\n"); - free(sc->pal_buf, M_TEMP); - sc->pal_buf = NULL; - } - } + sc = device_get_softc(dev); + if (sc->vga_isa_dev != NULL) + (void)DEVICE_SUSPEND(sc->vga_isa_dev); - return (0); + return (bus_generic_suspend(dev)); } static int vga_pci_resume(device_t dev) { - vga_softc_t *sc; - devclass_t dc; - - sc = NULL; - if (device_get_unit(dev) == vga_pci_default_unit) { - dc = devclass_find(VGA_DRIVER_NAME); - if (dc != NULL) - sc = devclass_get_softc(dc, 0); - } - if (sc == NULL) - return (bus_generic_resume(dev)); + struct vga_pci_softc *sc; - if (sc->state_buf != NULL) { - if (vidd_load_state(sc->adp, sc->state_buf) != 0) - device_printf(dev, "failed to reload state\n"); - free(sc->state_buf, M_TEMP); - sc->state_buf = NULL; - } - if (sc->pal_buf != NULL) { - if (vidd_load_palette(sc->adp, sc->pal_buf) != 0) - device_printf(dev, "failed to reload palette\n"); - free(sc->pal_buf, M_TEMP); - sc->pal_buf = NULL; - } + sc = device_get_softc(dev); + if (sc->vga_isa_dev != NULL) + (void)DEVICE_RESUME(sc->vga_isa_dev); return (bus_generic_resume(dev)); } Modified: head/sys/isa/vga_isa.c ============================================================================== --- head/sys/isa/vga_isa.c Fri Nov 6 20:23:42 2009 (r199001) +++ head/sys/isa/vga_isa.c Fri Nov 6 20:32:26 2009 (r199002) @@ -117,13 +117,17 @@ isavga_probe(device_t dev) isa_set_msize(dev, adp.va_mem_size); #endif } - return error; + return (error); } static int isavga_attach(device_t dev) { vga_softc_t *sc; + devclass_t dc; + device_t *devs; + void *vgapci_sc; + int count, i; int unit; int rid; int error; @@ -140,13 +144,13 @@ isavga_attach(device_t dev) error = vga_attach_unit(unit, sc, device_get_flags(dev)); if (error) - return error; + return (error); #ifdef FB_INSTALL_CDEV /* attach a virtual frame buffer device */ error = fb_attach(VGA_MKMINOR(unit), sc->adp, &isavga_cdevsw); if (error) - return error; + return (error); #endif /* FB_INSTALL_CDEV */ if (0 && bootverbose) @@ -157,20 +161,43 @@ isavga_attach(device_t dev) bus_generic_attach(dev); #endif - return 0; + /* Find the matching PCI video controller. */ + if (unit == 0) { + dc = devclass_find("vgapci"); + if (dc != NULL && + devclass_get_devices(dc, &devs, &count) == 0) { + for (i = 0; i < count; i++) + if (device_get_flags(devs[i]) != 0) { + sc->pci_dev = devs[i]; + break; + } + free(devs, M_TEMP); + } + if (sc->pci_dev != NULL) { + vgapci_sc = device_get_softc(sc->pci_dev); + *(device_t *)vgapci_sc = dev; + device_printf(dev, "associated with %s\n", + device_get_nameunit(sc->pci_dev)); + } + } + + return (0); } static int isavga_suspend(device_t dev) { vga_softc_t *sc; + device_t isa_dev; int err, nbytes; - err = bus_generic_suspend(dev); - if (err) - return (err); - - sc = device_get_softc(dev); + err = 0; + isa_dev = dev; + sc = device_get_softc(isa_dev); + if (sc->pci_dev != NULL) + dev = sc->pci_dev; + else + err = bus_generic_suspend(isa_dev); /* Save the video state across the suspend. */ if (sc->state_buf != NULL) @@ -193,7 +220,7 @@ isavga_suspend(device_t dev) save_palette: /* Save the color palette across the suspend. */ if (sc->pal_buf != NULL) - return (0); + return (err); sc->pal_buf = malloc(256 * 3, M_TEMP, M_NOWAIT); if (sc->pal_buf != NULL) { if (bootverbose) @@ -205,15 +232,19 @@ save_palette: } } - return (0); + return (err); } static int isavga_resume(device_t dev) { vga_softc_t *sc; + device_t isa_dev; - sc = device_get_softc(dev); + isa_dev = dev; + sc = device_get_softc(isa_dev); + if (sc->pci_dev != NULL) + dev = sc->pci_dev; if (sc->state_buf != NULL) { if (vidd_load_state(sc->adp, sc->state_buf) != 0) @@ -228,7 +259,10 @@ isavga_resume(device_t dev) sc->pal_buf = NULL; } - return (bus_generic_resume(dev)); + if (isa_dev != dev) + return (0); + + return (bus_generic_resume(isa_dev)); } #ifdef FB_INSTALL_CDEV @@ -236,37 +270,37 @@ isavga_resume(device_t dev) static int isavga_open(struct cdev *dev, int flag, int mode, struct thread *td) { - return vga_open(dev, VGA_SOFTC(VGA_UNIT(dev)), flag, mode, td); + return (vga_open(dev, VGA_SOFTC(VGA_UNIT(dev)), flag, mode, td)); } static int isavga_close(struct cdev *dev, int flag, int mode, struct thread *td) { - return vga_close(dev, VGA_SOFTC(VGA_UNIT(dev)), flag, mode, td); + return (vga_close(dev, VGA_SOFTC(VGA_UNIT(dev)), flag, mode, td)); } static int isavga_read(struct cdev *dev, struct uio *uio, int flag) { - return vga_read(dev, VGA_SOFTC(VGA_UNIT(dev)), uio, flag); + return (vga_read(dev, VGA_SOFTC(VGA_UNIT(dev)), uio, flag)); } static int isavga_write(struct cdev *dev, struct uio *uio, int flag) { - return vga_write(dev, VGA_SOFTC(VGA_UNIT(dev)), uio, flag); + return (vga_write(dev, VGA_SOFTC(VGA_UNIT(dev)), uio, flag)); } static int isavga_ioctl(struct cdev *dev, u_long cmd, caddr_t arg, int flag, struct thread *td) { - return vga_ioctl(dev, VGA_SOFTC(VGA_UNIT(dev)), cmd, arg, flag, td); + return (vga_ioctl(dev, VGA_SOFTC(VGA_UNIT(dev)), cmd, arg, flag, td)); } static int isavga_mmap(struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr, int prot) { - return vga_mmap(dev, VGA_SOFTC(VGA_UNIT(dev)), offset, paddr, prot); + return (vga_mmap(dev, VGA_SOFTC(VGA_UNIT(dev)), offset, paddr, prot)); } #endif /* FB_INSTALL_CDEV */ From owner-svn-src-all@FreeBSD.ORG Fri Nov 6 20:33:40 2009 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 A5D6C1065670; Fri, 6 Nov 2009 20:33:40 +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 7ABC98FC21; Fri, 6 Nov 2009 20:33: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 nA6KXe8t027962; Fri, 6 Nov 2009 20:33:40 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA6KXePD027960; Fri, 6 Nov 2009 20:33:40 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200911062033.nA6KXePD027960@svn.freebsd.org> From: John Baldwin Date: Fri, 6 Nov 2009 20:33: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: r199003 - stable/8/usr.bin/vmstat 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, 06 Nov 2009 20:33:40 -0000 Author: jhb Date: Fri Nov 6 20:33:40 2009 New Revision: 199003 URL: http://svn.freebsd.org/changeset/base/199003 Log: MFC 198620: When fetching sum stats (vmstat -s) from a crash dump, fetch per-CPU counts and sum them to form the total counts. Modified: stable/8/usr.bin/vmstat/vmstat.c Directory Properties: stable/8/usr.bin/vmstat/ (props changed) Modified: stable/8/usr.bin/vmstat/vmstat.c ============================================================================== --- stable/8/usr.bin/vmstat/vmstat.c Fri Nov 6 20:32:26 2009 (r199002) +++ stable/8/usr.bin/vmstat/vmstat.c Fri Nov 6 20:33:40 2009 (r199003) @@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include @@ -418,10 +419,90 @@ getuptime(void) } static void +fill_pcpu(struct pcpu ***pcpup, int* maxcpup) +{ + struct pcpu **pcpu; + + int maxcpu, size, i; + + *pcpup = NULL; + + if (kd == NULL) + return; + + maxcpu = kvm_getmaxcpu(kd); + if (maxcpu < 0) + errx(1, "kvm_getmaxcpu: %s", kvm_geterr(kd)); + + pcpu = calloc(maxcpu, sizeof(struct pcpu *)); + if (pcpu == NULL) + err(1, "calloc"); + + for (i = 0; i < maxcpu; i++) { + pcpu[i] = kvm_getpcpu(kd, i); + if (pcpu[i] == (struct pcpu *)-1) + errx(1, "kvm_getpcpu: %s", kvm_geterr(kd)); + } + + *maxcpup = maxcpu; + *pcpup = pcpu; +} + +static void +free_pcpu(struct pcpu **pcpu, int maxcpu) +{ + int i; + + for (i = 0; i < maxcpu; i++) + free(pcpu[i]); + free(pcpu); +} + +static void fill_vmmeter(struct vmmeter *vmmp) { + struct pcpu **pcpu; + int maxcpu, i; + if (kd != NULL) { kread(X_SUM, vmmp, sizeof(*vmmp)); + fill_pcpu(&pcpu, &maxcpu); + for (i = 0; i < maxcpu; i++) { + if (pcpu[i] == NULL) + continue; +#define ADD_FROM_PCPU(i, name) \ + vmmp->name += pcpu[i]->pc_cnt.name + ADD_FROM_PCPU(i, v_swtch); + ADD_FROM_PCPU(i, v_trap); + ADD_FROM_PCPU(i, v_syscall); + ADD_FROM_PCPU(i, v_intr); + ADD_FROM_PCPU(i, v_soft); + ADD_FROM_PCPU(i, v_vm_faults); + ADD_FROM_PCPU(i, v_cow_faults); + ADD_FROM_PCPU(i, v_cow_optim); + ADD_FROM_PCPU(i, v_zfod); + ADD_FROM_PCPU(i, v_ozfod); + ADD_FROM_PCPU(i, v_swapin); + ADD_FROM_PCPU(i, v_swapout); + ADD_FROM_PCPU(i, v_swappgsin); + ADD_FROM_PCPU(i, v_swappgsout); + ADD_FROM_PCPU(i, v_vnodein); + ADD_FROM_PCPU(i, v_vnodeout); + ADD_FROM_PCPU(i, v_vnodepgsin); + ADD_FROM_PCPU(i, v_vnodepgsout); + ADD_FROM_PCPU(i, v_intrans); + ADD_FROM_PCPU(i, v_tfree); + ADD_FROM_PCPU(i, v_forks); + ADD_FROM_PCPU(i, v_vforks); + ADD_FROM_PCPU(i, v_rforks); + ADD_FROM_PCPU(i, v_kthreads); + ADD_FROM_PCPU(i, v_forkpages); + ADD_FROM_PCPU(i, v_vforkpages); + ADD_FROM_PCPU(i, v_rforkpages); + ADD_FROM_PCPU(i, v_kthreadpages); +#undef ADD_FROM_PCPU + } + free_pcpu(pcpu, maxcpu); } else { size_t size = sizeof(unsigned int); #define GET_VM_STATS(cat, name) \ From owner-svn-src-all@FreeBSD.ORG Fri Nov 6 20:33:54 2009 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 1A50F10656AE; Fri, 6 Nov 2009 20:33:54 +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 C291D8FC17; Fri, 6 Nov 2009 20:33: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 nA6KXrpO028003; Fri, 6 Nov 2009 20:33:53 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA6KXr20028001; Fri, 6 Nov 2009 20:33:53 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200911062033.nA6KXr20028001@svn.freebsd.org> From: John Baldwin Date: Fri, 6 Nov 2009 20:33: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: r199004 - stable/7/usr.bin/vmstat 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, 06 Nov 2009 20:33:54 -0000 Author: jhb Date: Fri Nov 6 20:33:53 2009 New Revision: 199004 URL: http://svn.freebsd.org/changeset/base/199004 Log: MFC 198620: When fetching sum stats (vmstat -s) from a crash dump, fetch per-CPU counts and sum them to form the total counts. Modified: stable/7/usr.bin/vmstat/vmstat.c Directory Properties: stable/7/usr.bin/vmstat/ (props changed) Modified: stable/7/usr.bin/vmstat/vmstat.c ============================================================================== --- stable/7/usr.bin/vmstat/vmstat.c Fri Nov 6 20:33:40 2009 (r199003) +++ stable/7/usr.bin/vmstat/vmstat.c Fri Nov 6 20:33:53 2009 (r199004) @@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include @@ -420,10 +421,90 @@ getuptime(void) } static void +fill_pcpu(struct pcpu ***pcpup, int* maxcpup) +{ + struct pcpu **pcpu; + + int maxcpu, size, i; + + *pcpup = NULL; + + if (kd == NULL) + return; + + maxcpu = kvm_getmaxcpu(kd); + if (maxcpu < 0) + errx(1, "kvm_getmaxcpu: %s", kvm_geterr(kd)); + + pcpu = calloc(maxcpu, sizeof(struct pcpu *)); + if (pcpu == NULL) + err(1, "calloc"); + + for (i = 0; i < maxcpu; i++) { + pcpu[i] = kvm_getpcpu(kd, i); + if (pcpu[i] == (struct pcpu *)-1) + errx(1, "kvm_getpcpu: %s", kvm_geterr(kd)); + } + + *maxcpup = maxcpu; + *pcpup = pcpu; +} + +static void +free_pcpu(struct pcpu **pcpu, int maxcpu) +{ + int i; + + for (i = 0; i < maxcpu; i++) + free(pcpu[i]); + free(pcpu); +} + +static void fill_vmmeter(struct vmmeter *vmmp) { + struct pcpu **pcpu; + int maxcpu, i; + if (kd != NULL) { kread(X_SUM, vmmp, sizeof(*vmmp)); + fill_pcpu(&pcpu, &maxcpu); + for (i = 0; i < maxcpu; i++) { + if (pcpu[i] == NULL) + continue; +#define ADD_FROM_PCPU(i, name) \ + vmmp->name += pcpu[i]->pc_cnt.name + ADD_FROM_PCPU(i, v_swtch); + ADD_FROM_PCPU(i, v_trap); + ADD_FROM_PCPU(i, v_syscall); + ADD_FROM_PCPU(i, v_intr); + ADD_FROM_PCPU(i, v_soft); + ADD_FROM_PCPU(i, v_vm_faults); + ADD_FROM_PCPU(i, v_cow_faults); + ADD_FROM_PCPU(i, v_cow_optim); + ADD_FROM_PCPU(i, v_zfod); + ADD_FROM_PCPU(i, v_ozfod); + ADD_FROM_PCPU(i, v_swapin); + ADD_FROM_PCPU(i, v_swapout); + ADD_FROM_PCPU(i, v_swappgsin); + ADD_FROM_PCPU(i, v_swappgsout); + ADD_FROM_PCPU(i, v_vnodein); + ADD_FROM_PCPU(i, v_vnodeout); + ADD_FROM_PCPU(i, v_vnodepgsin); + ADD_FROM_PCPU(i, v_vnodepgsout); + ADD_FROM_PCPU(i, v_intrans); + ADD_FROM_PCPU(i, v_tfree); + ADD_FROM_PCPU(i, v_forks); + ADD_FROM_PCPU(i, v_vforks); + ADD_FROM_PCPU(i, v_rforks); + ADD_FROM_PCPU(i, v_kthreads); + ADD_FROM_PCPU(i, v_forkpages); + ADD_FROM_PCPU(i, v_vforkpages); + ADD_FROM_PCPU(i, v_rforkpages); + ADD_FROM_PCPU(i, v_kthreadpages); +#undef ADD_FROM_PCPU + } + free_pcpu(pcpu, maxcpu); } else { size_t size = sizeof(unsigned int); #define GET_VM_STATS(cat, name) \ From owner-svn-src-all@FreeBSD.ORG Fri Nov 6 21:50:56 2009 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 1375C1065670; Fri, 6 Nov 2009 21:50:56 +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 C67DF8FC16; Fri, 6 Nov 2009 21:50:55 +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 488AB46B03; Fri, 6 Nov 2009 16:50:55 -0500 (EST) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 7D0D68A01F; Fri, 6 Nov 2009 16:50:54 -0500 (EST) From: John Baldwin To: Jung-uk Kim Date: Fri, 6 Nov 2009 16:47:00 -0500 User-Agent: KMail/1.9.7 References: <200911062032.nA6KWRXb027876@svn.freebsd.org> In-Reply-To: <200911062032.nA6KWRXb027876@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200911061647.00983.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Fri, 06 Nov 2009 16:50:54 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no 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: r199002 - in head/sys: dev/fb dev/pci 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: Fri, 06 Nov 2009 21:50:56 -0000 On Friday 06 November 2009 3:32:26 pm Jung-uk Kim wrote: > Author: jkim > Date: Fri Nov 6 20:32:26 2009 > New Revision: 199002 > URL: http://svn.freebsd.org/changeset/base/199002 > > Log: > Remove duplicate suspend/resume code from vga_pci.c and let vga(4) register > itself to an associated PCI device if it exists. It is little bit hackish > but it should fix build without frame buffer driver since r198964. > Fix some style(9) nits in vga_isa.c while we are here. Hmm, did you consider having vga_isa use an identify routine to attach itself as a child of vgapci0? The hack of knowing the first thing in the softc is a pointer is really gross and I'd rather avoid it. Just creating a child of vgapci0 will automatically cause suspend and resume to work w/o vgapci having to have any special knowledge about vga_isa. > Modified: > head/sys/dev/fb/vgareg.h > head/sys/dev/pci/vga_pci.c > head/sys/isa/vga_isa.c > > Modified: head/sys/dev/fb/vgareg.h > ============================================================================== > --- head/sys/dev/fb/vgareg.h Fri Nov 6 20:23:42 2009 (r199001) > +++ head/sys/dev/fb/vgareg.h Fri Nov 6 20:32:26 2009 (r199002) > @@ -69,6 +69,7 @@ > struct video_adapter; > typedef struct vga_softc { > struct video_adapter *adp; > + device_t pci_dev; > void *state_buf; > void *pal_buf; > #ifdef FB_INSTALL_CDEV > > Modified: head/sys/dev/pci/vga_pci.c > ============================================================================== > --- head/sys/dev/pci/vga_pci.c Fri Nov 6 20:23:42 2009 (r199001) > +++ head/sys/dev/pci/vga_pci.c Fri Nov 6 20:32:26 2009 (r199002) > @@ -40,15 +40,12 @@ __FBSDID("$FreeBSD$"); > > #include > #include > -#include > #include > -#include > #include > #include > #include > #include > > -#include > #include > > #include > @@ -60,6 +57,7 @@ struct vga_resource { > }; > > struct vga_pci_softc { > + device_t vga_isa_dev; /* Sister isavga driver. */ > device_t vga_msi_child; /* Child driver using MSI. */ > struct vga_resource vga_res[PCIR_MAX_BAR_0 + 1]; > }; > @@ -117,86 +115,23 @@ vga_pci_attach(device_t dev) > static int > vga_pci_suspend(device_t dev) > { > - vga_softc_t *sc; > - devclass_t dc; > - int err, nbytes; > - > - err = bus_generic_suspend(dev); > - if (err) > - return (err); > - > - sc = NULL; > - if (device_get_unit(dev) == vga_pci_default_unit) { > - dc = devclass_find(VGA_DRIVER_NAME); > - if (dc != NULL) > - sc = devclass_get_softc(dc, 0); > - } > - if (sc == NULL) > - return (0); > - > - /* Save the video state across the suspend. */ > - if (sc->state_buf != NULL) > - goto save_palette; > - nbytes = vidd_save_state(sc->adp, NULL, 0); > - if (nbytes <= 0) > - goto save_palette; > - sc->state_buf = malloc(nbytes, M_TEMP, M_NOWAIT); > - if (sc->state_buf == NULL) > - goto save_palette; > - if (bootverbose) > - device_printf(dev, "saving %d bytes of video state\n", nbytes); > - if (vidd_save_state(sc->adp, sc->state_buf, nbytes) != 0) { > - device_printf(dev, "failed to save state (nbytes=%d)\n", > - nbytes); > - free(sc->state_buf, M_TEMP); > - sc->state_buf = NULL; > - } > + struct vga_pci_softc *sc; > > -save_palette: > - /* Save the color palette across the suspend. */ > - if (sc->pal_buf != NULL) > - return (0); > - sc->pal_buf = malloc(256 * 3, M_TEMP, M_NOWAIT); > - if (sc->pal_buf != NULL) { > - if (bootverbose) > - device_printf(dev, "saving color palette\n"); > - if (vidd_save_palette(sc->adp, sc->pal_buf) != 0) { > - device_printf(dev, "failed to save palette\n"); > - free(sc->pal_buf, M_TEMP); > - sc->pal_buf = NULL; > - } > - } > + sc = device_get_softc(dev); > + if (sc->vga_isa_dev != NULL) > + (void)DEVICE_SUSPEND(sc->vga_isa_dev); > > - return (0); > + return (bus_generic_suspend(dev)); > } > > static int > vga_pci_resume(device_t dev) > { > - vga_softc_t *sc; > - devclass_t dc; > - > - sc = NULL; > - if (device_get_unit(dev) == vga_pci_default_unit) { > - dc = devclass_find(VGA_DRIVER_NAME); > - if (dc != NULL) > - sc = devclass_get_softc(dc, 0); > - } > - if (sc == NULL) > - return (bus_generic_resume(dev)); > + struct vga_pci_softc *sc; > > - if (sc->state_buf != NULL) { > - if (vidd_load_state(sc->adp, sc->state_buf) != 0) > - device_printf(dev, "failed to reload state\n"); > - free(sc->state_buf, M_TEMP); > - sc->state_buf = NULL; > - } > - if (sc->pal_buf != NULL) { > - if (vidd_load_palette(sc->adp, sc->pal_buf) != 0) > - device_printf(dev, "failed to reload palette\n"); > - free(sc->pal_buf, M_TEMP); > - sc->pal_buf = NULL; > - } > + sc = device_get_softc(dev); > + if (sc->vga_isa_dev != NULL) > + (void)DEVICE_RESUME(sc->vga_isa_dev); > > return (bus_generic_resume(dev)); > } > > Modified: head/sys/isa/vga_isa.c > ============================================================================== > --- head/sys/isa/vga_isa.c Fri Nov 6 20:23:42 2009 (r199001) > +++ head/sys/isa/vga_isa.c Fri Nov 6 20:32:26 2009 (r199002) > @@ -117,13 +117,17 @@ isavga_probe(device_t dev) > isa_set_msize(dev, adp.va_mem_size); > #endif > } > - return error; > + return (error); > } > > static int > isavga_attach(device_t dev) > { > vga_softc_t *sc; > + devclass_t dc; > + device_t *devs; > + void *vgapci_sc; > + int count, i; > int unit; > int rid; > int error; > @@ -140,13 +144,13 @@ isavga_attach(device_t dev) > > error = vga_attach_unit(unit, sc, device_get_flags(dev)); > if (error) > - return error; > + return (error); > > #ifdef FB_INSTALL_CDEV > /* attach a virtual frame buffer device */ > error = fb_attach(VGA_MKMINOR(unit), sc->adp, &isavga_cdevsw); > if (error) > - return error; > + return (error); > #endif /* FB_INSTALL_CDEV */ > > if (0 && bootverbose) > @@ -157,20 +161,43 @@ isavga_attach(device_t dev) > bus_generic_attach(dev); > #endif > > - return 0; > + /* Find the matching PCI video controller. */ > + if (unit == 0) { > + dc = devclass_find("vgapci"); > + if (dc != NULL && > + devclass_get_devices(dc, &devs, &count) == 0) { > + for (i = 0; i < count; i++) > + if (device_get_flags(devs[i]) != 0) { > + sc->pci_dev = devs[i]; > + break; > + } > + free(devs, M_TEMP); > + } > + if (sc->pci_dev != NULL) { > + vgapci_sc = device_get_softc(sc->pci_dev); > + *(device_t *)vgapci_sc = dev; > + device_printf(dev, "associated with %s\n", > + device_get_nameunit(sc->pci_dev)); > + } > + } > + > + return (0); > } > > static int > isavga_suspend(device_t dev) > { > vga_softc_t *sc; > + device_t isa_dev; > int err, nbytes; > > - err = bus_generic_suspend(dev); > - if (err) > - return (err); > - > - sc = device_get_softc(dev); > + err = 0; > + isa_dev = dev; > + sc = device_get_softc(isa_dev); > + if (sc->pci_dev != NULL) > + dev = sc->pci_dev; > + else > + err = bus_generic_suspend(isa_dev); > > /* Save the video state across the suspend. */ > if (sc->state_buf != NULL) > @@ -193,7 +220,7 @@ isavga_suspend(device_t dev) > save_palette: > /* Save the color palette across the suspend. */ > if (sc->pal_buf != NULL) > - return (0); > + return (err); > sc->pal_buf = malloc(256 * 3, M_TEMP, M_NOWAIT); > if (sc->pal_buf != NULL) { > if (bootverbose) > @@ -205,15 +232,19 @@ save_palette: > } > } > > - return (0); > + return (err); > } > > static int > isavga_resume(device_t dev) > { > vga_softc_t *sc; > + device_t isa_dev; > > - sc = device_get_softc(dev); > + isa_dev = dev; > + sc = device_get_softc(isa_dev); > + if (sc->pci_dev != NULL) > + dev = sc->pci_dev; > > if (sc->state_buf != NULL) { > if (vidd_load_state(sc->adp, sc->state_buf) != 0) > @@ -228,7 +259,10 @@ isavga_resume(device_t dev) > sc->pal_buf = NULL; > } > > - return (bus_generic_resume(dev)); > + if (isa_dev != dev) > + return (0); > + > + return (bus_generic_resume(isa_dev)); > } > > #ifdef FB_INSTALL_CDEV > @@ -236,37 +270,37 @@ isavga_resume(device_t dev) > static int > isavga_open(struct cdev *dev, int flag, int mode, struct thread *td) > { > - return vga_open(dev, VGA_SOFTC(VGA_UNIT(dev)), flag, mode, td); > + return (vga_open(dev, VGA_SOFTC(VGA_UNIT(dev)), flag, mode, td)); > } > > static int > isavga_close(struct cdev *dev, int flag, int mode, struct thread *td) > { > - return vga_close(dev, VGA_SOFTC(VGA_UNIT(dev)), flag, mode, td); > + return (vga_close(dev, VGA_SOFTC(VGA_UNIT(dev)), flag, mode, td)); > } > > static int > isavga_read(struct cdev *dev, struct uio *uio, int flag) > { > - return vga_read(dev, VGA_SOFTC(VGA_UNIT(dev)), uio, flag); > + return (vga_read(dev, VGA_SOFTC(VGA_UNIT(dev)), uio, flag)); > } > > static int > isavga_write(struct cdev *dev, struct uio *uio, int flag) > { > - return vga_write(dev, VGA_SOFTC(VGA_UNIT(dev)), uio, flag); > + return (vga_write(dev, VGA_SOFTC(VGA_UNIT(dev)), uio, flag)); > } > > static int > isavga_ioctl(struct cdev *dev, u_long cmd, caddr_t arg, int flag, struct thread *td) > { > - return vga_ioctl(dev, VGA_SOFTC(VGA_UNIT(dev)), cmd, arg, flag, td); > + return (vga_ioctl(dev, VGA_SOFTC(VGA_UNIT(dev)), cmd, arg, flag, td)); > } > > static int > isavga_mmap(struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr, int prot) > { > - return vga_mmap(dev, VGA_SOFTC(VGA_UNIT(dev)), offset, paddr, prot); > + return (vga_mmap(dev, VGA_SOFTC(VGA_UNIT(dev)), offset, paddr, prot)); > } > > #endif /* FB_INSTALL_CDEV */ > -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Fri Nov 6 22:29:47 2009 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 2E0881065694; Fri, 6 Nov 2009 22:29:47 +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 1D5948FC1A; Fri, 6 Nov 2009 22:29: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 nA6MTlK8030250; Fri, 6 Nov 2009 22:29:47 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA6MTld2030248; Fri, 6 Nov 2009 22:29:47 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <200911062229.nA6MTld2030248@svn.freebsd.org> From: Attilio Rao Date: Fri, 6 Nov 2009 22:29: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: r199007 - head/sys/fs/fifofs 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, 06 Nov 2009 22:29:47 -0000 Author: attilio Date: Fri Nov 6 22:29:46 2009 New Revision: 199007 URL: http://svn.freebsd.org/changeset/base/199007 Log: - Improve comments about locking of the "struct fifoinfo" which is a bit unclear. - Fix a memory leak [0] [0] Diagnosed by: Dorr H. Clark MFC: 1 week Modified: head/sys/fs/fifofs/fifo_vnops.c Modified: head/sys/fs/fifofs/fifo_vnops.c ============================================================================== --- head/sys/fs/fifofs/fifo_vnops.c Fri Nov 6 22:13:39 2009 (r199006) +++ head/sys/fs/fifofs/fifo_vnops.c Fri Nov 6 22:29:46 2009 (r199007) @@ -78,6 +78,10 @@ struct fileops fifo_ops_f = { /* * This structure is associated with the FIFO vnode and stores * the state associated with the FIFO. + * Notes about locking: + * - fi_readsock and fi_writesock are invariant since init time. + * - fi_readers and fi_writers are vnode lock protected. + * - fi_wgen is fif_mtx lock protected. */ struct fifoinfo { struct socket *fi_readsock; @@ -223,14 +227,9 @@ fail1: } /* - * General access to fi_readers and fi_writers is protected using - * the vnode lock. - * - * Protect the increment of fi_readers and fi_writers and the - * associated calls to wakeup() with the fifo mutex in addition - * to the vnode lock. This allows the vnode lock to be dropped - * for the msleep() calls below, and using the fifo mutex with - * msleep() prevents the wakeup from being missed. + * Use the fifo_mtx lock here, in addition to the vnode lock, + * in order to allow vnode lock dropping before msleep() calls + * and still avoiding missed wakeups. */ mtx_lock(&fifo_mtx); if (ap->a_mode & FREAD) { @@ -249,6 +248,8 @@ fail1: if (ap->a_mode & FWRITE) { if ((ap->a_mode & O_NONBLOCK) && fip->fi_readers == 0) { mtx_unlock(&fifo_mtx); + if (fip->fi_writers == 0) + fifo_cleanup(vp); return (ENXIO); } fip->fi_writers++; From owner-svn-src-all@FreeBSD.ORG Fri Nov 6 22:33:04 2009 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 7BCE0106566B; Fri, 6 Nov 2009 22:33:04 +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 6B1C08FC12; Fri, 6 Nov 2009 22:33: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 nA6MX4Wg030366; Fri, 6 Nov 2009 22:33:04 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA6MX4v1030364; Fri, 6 Nov 2009 22:33:04 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <200911062233.nA6MX4v1030364@svn.freebsd.org> From: Attilio Rao Date: Fri, 6 Nov 2009 22:33: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: r199008 - 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: Fri, 06 Nov 2009 22:33:04 -0000 Author: attilio Date: Fri Nov 6 22:33:03 2009 New Revision: 199008 URL: http://svn.freebsd.org/changeset/base/199008 Log: Save the sack when doing a lockmgr_disown() call. Requested by: kib MFC: 3 days Modified: head/sys/kern/kern_lock.c Modified: head/sys/kern/kern_lock.c ============================================================================== --- head/sys/kern/kern_lock.c Fri Nov 6 22:29:46 2009 (r199007) +++ head/sys/kern/kern_lock.c Fri Nov 6 22:33:03 2009 (r199008) @@ -1086,6 +1086,7 @@ _lockmgr_disown(struct lock *lk, const c LOCK_LOG_LOCK("XDISOWN", &lk->lock_object, 0, 0, file, line); WITNESS_UNLOCK(&lk->lock_object, LOP_EXCLUSIVE, file, line); TD_LOCKS_DEC(curthread); + STACK_SAVE(lk); /* * In order to preserve waiters flags, just spin. From owner-svn-src-all@FreeBSD.ORG Fri Nov 6 22:37:29 2009 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 65FDD106566B; Fri, 6 Nov 2009 22:37:29 +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 556B88FC08; Fri, 6 Nov 2009 22:37: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 nA6MbTB3030498; Fri, 6 Nov 2009 22:37:29 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA6MbTvk030496; Fri, 6 Nov 2009 22:37:29 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200911062237.nA6MbTvk030496@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 6 Nov 2009 22:37: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: r199009 - 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: Fri, 06 Nov 2009 22:37:29 -0000 Author: yongari Date: Fri Nov 6 22:37:29 2009 New Revision: 199009 URL: http://svn.freebsd.org/changeset/base/199009 Log: bge(4) already switched to use UMA backed page allocator and local memory allocator for jumbo frame was removed long time ago. Remove no more used macros. Modified: head/sys/dev/bge/if_bgereg.h Modified: head/sys/dev/bge/if_bgereg.h ============================================================================== --- head/sys/dev/bge/if_bgereg.h Fri Nov 6 22:33:03 2009 (r199008) +++ head/sys/dev/bge/if_bgereg.h Fri Nov 6 22:37:29 2009 (r199009) @@ -2481,13 +2481,6 @@ struct bge_gib { #define BGE_MSLOTS 256 #define BGE_JSLOTS 384 -#define BGE_JRAWLEN (BGE_JUMBO_FRAMELEN + ETHER_ALIGN) -#define BGE_JLEN (BGE_JRAWLEN + (sizeof(uint64_t) - \ - (BGE_JRAWLEN % sizeof(uint64_t)))) -#define BGE_JPAGESZ PAGE_SIZE -#define BGE_RESID (BGE_JPAGESZ - (BGE_JLEN * BGE_JSLOTS) % BGE_JPAGESZ) -#define BGE_JMEM ((BGE_JLEN * BGE_JSLOTS) + BGE_RESID) - #define BGE_NSEG_JUMBO 4 #define BGE_NSEG_NEW 32 From owner-svn-src-all@FreeBSD.ORG Fri Nov 6 23:49:20 2009 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 EC93F1065676; Fri, 6 Nov 2009 23:49:20 +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 DBAFE8FC1E; Fri, 6 Nov 2009 23:49: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 nA6NnKeq032017; Fri, 6 Nov 2009 23:49:20 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA6NnKMM032015; Fri, 6 Nov 2009 23:49:20 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200911062349.nA6NnKMM032015@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 6 Nov 2009 23:49: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: r199010 - 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: Fri, 06 Nov 2009 23:49:21 -0000 Author: yongari Date: Fri Nov 6 23:49:20 2009 New Revision: 199010 URL: http://svn.freebsd.org/changeset/base/199010 Log: Do bus_dmamap_sync call only if frame size is greater than standard buffer size. If controller is not capable of handling jumbo frame, interface MTU couldn't be larger than standard MTU which in turn the received should be fit in standard buffer. This fixes bus_dmamap_sync call for jumbo ring is called even if interface is configured to use standard MTU. Also if total frame size could be fit into standard buffer don't use jumbo buffers. Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Fri Nov 6 22:37:29 2009 (r199009) +++ head/sys/dev/bge/if_bge.c Fri Nov 6 23:49:20 2009 (r199010) @@ -3134,7 +3134,8 @@ bge_rxeof(struct bge_softc *sc) sc->bge_cdata.bge_rx_return_ring_map, BUS_DMASYNC_POSTREAD); bus_dmamap_sync(sc->bge_cdata.bge_rx_std_ring_tag, sc->bge_cdata.bge_rx_std_ring_map, BUS_DMASYNC_POSTWRITE); - if (BGE_IS_JUMBO_CAPABLE(sc)) + if (ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN + ETHER_VLAN_ENCAP_LEN > + (MCLBYTES - ETHER_ALIGN)) bus_dmamap_sync(sc->bge_cdata.bge_rx_jumbo_ring_tag, sc->bge_cdata.bge_rx_jumbo_ring_map, BUS_DMASYNC_POSTWRITE); @@ -3266,7 +3267,7 @@ bge_rxeof(struct bge_softc *sc) bus_dmamap_sync(sc->bge_cdata.bge_rx_std_ring_tag, sc->bge_cdata.bge_rx_std_ring_map, BUS_DMASYNC_PREWRITE); - if (BGE_IS_JUMBO_CAPABLE(sc) && jumbocnt > 0) + if (jumbocnt > 0) bus_dmamap_sync(sc->bge_cdata.bge_rx_jumbo_ring_tag, sc->bge_cdata.bge_rx_jumbo_ring_map, BUS_DMASYNC_PREWRITE); @@ -3920,7 +3921,8 @@ bge_init_locked(struct bge_softc *sc) } /* Init jumbo RX ring. */ - if (ifp->if_mtu > (ETHERMTU + ETHER_HDR_LEN + ETHER_CRC_LEN)) { + 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"); bge_stop(sc); From owner-svn-src-all@FreeBSD.ORG Fri Nov 6 23:52:38 2009 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 C2F881065676; Fri, 6 Nov 2009 23:52:38 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (delphij-pt.tunnel.tserv2.fmt.ipv6.he.net [IPv6:2001:470:1f03:2c9::2]) by mx1.freebsd.org (Postfix) with ESMTP id 7D96E8FC16; Fri, 6 Nov 2009 23:52:36 +0000 (UTC) Received: from localhost (tarsier.geekcn.org [211.166.10.233]) by tarsier.geekcn.org (Postfix) with ESMTP id EE39D55CD6A1; Sat, 7 Nov 2009 07:52:32 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([211.166.10.233]) by localhost (mail.geekcn.org [211.166.10.233]) (amavisd-new, port 10024) with ESMTP id NYgym4a96Lvf; Sat, 7 Nov 2009 07:52:25 +0800 (CST) Received: from delta.delphij.net (unknown [206.40.55.131]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTPSA id F39EF55CD4D1; Sat, 7 Nov 2009 07:52:22 +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; b=iVzDQRmId8y2my54txdG5HEFoGWTIn9iUUvwXgaJpdaVmgO7W3Kf6k81nPytmt2gf CRrBiKnKMyKRzSovHmcIw== Message-ID: <4AF4B6B2.3090706@delphij.net> Date: Fri, 06 Nov 2009 15:52:18 -0800 From: Xin LI Organization: The Geek China Organization User-Agent: Thunderbird 2.0.0.23 (X11/20091022) MIME-Version: 1.0 To: Bruce Evans References: <200911030928.nA39SjLx085597@svn.freebsd.org> <20091103214231.H23957@delplex.bde.org> In-Reply-To: <20091103214231.H23957@delplex.bde.org> X-Enigmail-Version: 0.95.7 OpenPGP: id=18EDEBA0; url=http://www.delphij.net/delphij.asc Content-Type: multipart/mixed; boundary="------------000600040007090308040408" Cc: svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG, Xin LI Subject: Re: svn commit: r198848 - head/bin/ps 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: Fri, 06 Nov 2009 23:52:38 -0000 This is a multi-part message in MIME format. --------------000600040007090308040408 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Bruce Evans wrote: > On Tue, 3 Nov 2009, Xin LI wrote: > >> Log: >> Increase width for %CPU, RSS and VSZ columns for now. Modern systems >> tend to have larger memory, larger process, and more CPU. > > This uses space that is not available. Command names(+args) are now > truncated to 9 columns in "ps l" output :-(. They used to be truncated to > 11 columns recently (down from 12 columns in FreeBSD-5.2). I think we may have to live with this, even if we can cut down CPU percentage part, the memory column's width is still too narrow for modern systems. I have actually thought about having the numbers humanized but I'm afraid it would break some existing scripts :( [...] > There seems to be no better fix than to further granulate and dehumanize > the numbers so that they fit in the available space. E.g., a %CPU of >> = 100 and < 9999 should be displayed in %4.0f format; this only > involvues granulation, but above 9999 it needs to be dehumanized as > well and displayed in k or M or larger granularity (it can be > 9999 > with 100 CPUs and > 999k with 10000 CPUs). A VSZ of >= 10000 (k > implicit) needs to be displayed in M or larger granularity (M explicit). Will it sound reasonable to divide pcpu by ncpu and cap the number at 100? Cheers, - -- Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.13 (FreeBSD) iEYEARECAAYFAkr0trIACgkQi+vbBBjt66CxkwCeLjSGhfB438LAsqFcK6vCgdmY 0OIAn2OmQLRttIhvMYVjqQvYviLzgVBc =C87q -----END PGP SIGNATURE----- --------------000600040007090308040408 Content-Type: text/plain; name="ps.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="ps.diff" Index: keyword.c =================================================================== --- keyword.c (revision 199006) +++ keyword.c (working copy) @@ -70,7 +70,7 @@ /* PLEASE KEEP THE TABLE BELOW SORTED ALPHABETICALLY!!! */ static VAR var[] = { - {"%cpu", "%CPU", NULL, 0, pcpu, NULL, 5, 0, CHAR, NULL, 0}, + {"%cpu", "%CPU", NULL, 0, pcpu, NULL, 4, 0, CHAR, NULL, 0}, {"%mem", "%MEM", NULL, 0, pmem, NULL, 4, 0, CHAR, NULL, 0}, {"acflag", "ACFLG", NULL, 0, kvar, NULL, 3, KOFF(ki_acflag), USHORT, "x", 0}, Index: nlist.c =================================================================== --- nlist.c (revision 199006) +++ nlist.c (working copy) @@ -47,6 +47,7 @@ int nlistread; /* if nlist already read. */ unsigned long mempages; /* number of pages of phys. memory */ int fscale; /* kernel _fscale variable */ +int ncpu; /* number of cpus */ int donlist(void) @@ -62,6 +63,9 @@ oldlen = sizeof(mempages); if (sysctlbyname("hw.availpages", &mempages, &oldlen, NULL, 0) == -1) return (1); + oldlen = sizeof(ncpu); + if (sysctlbyname("hw.ncpu", &ncpu, &oldlen, NULL, 0) == -1) + return (1); nlistread = 1; return (0); } Index: extern.h =================================================================== --- extern.h (revision 199006) +++ extern.h (working copy) @@ -36,7 +36,7 @@ struct varent; extern fixpt_t ccpu; -extern int cflag, eval, fscale, nlistread, rawcpu; +extern int cflag, eval, fscale, ncpu, nlistread, rawcpu; extern unsigned long mempages; extern time_t now; extern int showthreads, sumrusage, termwidth, totwidth; Index: print.c =================================================================== --- print.c (revision 199006) +++ print.c (working copy) @@ -642,10 +642,13 @@ void pcpu(KINFO *k, VARENT *ve) { - VAR *v; + VAR *v = ve->var; + double pctcpu = getpcpu(k); - v = ve->var; - (void)printf("%*.1f", v->width, getpcpu(k)); + if (pctcpu / ncpu >= 100.0) + (void)printf(" 100"); + else + (void)printf("%*.1f", v->width, pctcpu / ncpu); } static double --------------000600040007090308040408-- From owner-svn-src-all@FreeBSD.ORG Sat Nov 7 01:01:34 2009 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 19B2E1065679; Sat, 7 Nov 2009 01:01:34 +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 074D08FC0A; Sat, 7 Nov 2009 01:01: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 nA711XF8033385; Sat, 7 Nov 2009 01:01:33 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA711Xnh033382; Sat, 7 Nov 2009 01:01:33 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200911070101.nA711Xnh033382@svn.freebsd.org> From: Pyun YongHyeon Date: Sat, 7 Nov 2009 01:01: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: r199011 - 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: Sat, 07 Nov 2009 01:01:34 -0000 Author: yongari Date: Sat Nov 7 01:01:33 2009 New Revision: 199011 URL: http://svn.freebsd.org/changeset/base/199011 Log: Reimplement Rx buffer allocation to handle dma map load failure. Introduce two spare dma maps for standard buffer and jumbo buffer respectively. If loading a dma map failed reuse previously loaded dma map. This should fix unloaded dma map is used in case of dma map load failure. Also don't blindly unload dma map and defer dma map sync and unloading operation until we know dma map for new buffer is successfully loaded. This change saves unnecessary dma load/unload operation. Previously bge(4) tried to reuse mbuf with unloaded dma map which is really bad thing in bus_dma(9) perspective. While I'm here update if_iqdrops if we can't allocate Rx buffers. 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 Fri Nov 6 23:49:20 2009 (r199010) +++ head/sys/dev/bge/if_bge.c Sat Nov 7 01:01:33 2009 (r199011) @@ -393,8 +393,8 @@ static void bge_setpromisc(struct bge_so static void bge_setmulti(struct bge_softc *); static void bge_setvlan(struct bge_softc *); -static int bge_newbuf_std(struct bge_softc *, int, struct mbuf *); -static int bge_newbuf_jumbo(struct bge_softc *, int, struct mbuf *); +static int bge_newbuf_std(struct bge_softc *, int); +static int bge_newbuf_jumbo(struct bge_softc *, int); static int bge_init_rx_ring_std(struct bge_softc *); static void bge_free_rx_ring_std(struct bge_softc *); static int bge_init_rx_ring_jumbo(struct bge_softc *); @@ -912,37 +912,38 @@ bge_miibus_statchg(device_t dev) * Intialize a standard receive ring descriptor. */ static int -bge_newbuf_std(struct bge_softc *sc, int i, struct mbuf *m) +bge_newbuf_std(struct bge_softc *sc, int i) { - struct mbuf *m_new = NULL; + struct mbuf *m; struct bge_rx_bd *r; bus_dma_segment_t segs[1]; + bus_dmamap_t map; int error, nsegs; - if (m == NULL) { - m_new = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); - if (m_new == NULL) - return (ENOBUFS); - m_new->m_len = m_new->m_pkthdr.len = MCLBYTES; - } else { - m_new = m; - m_new->m_len = m_new->m_pkthdr.len = MCLBYTES; - m_new->m_data = m_new->m_ext.ext_buf; - } - + m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + if (m == NULL) + return (ENOBUFS); + m->m_len = m->m_pkthdr.len = MCLBYTES; if ((sc->bge_flags & BGE_FLAG_RX_ALIGNBUG) == 0) - m_adj(m_new, ETHER_ALIGN); + m_adj(m, ETHER_ALIGN); + error = bus_dmamap_load_mbuf_sg(sc->bge_cdata.bge_rx_mtag, - sc->bge_cdata.bge_rx_std_dmamap[i], m_new, segs, &nsegs, 0); + sc->bge_cdata.bge_rx_std_sparemap, m, segs, &nsegs, 0); if (error != 0) { - if (m == NULL) { - sc->bge_cdata.bge_rx_std_chain[i] = NULL; - m_freem(m_new); - } + m_freem(m); return (error); } - sc->bge_cdata.bge_rx_std_chain[i] = m_new; - r = &sc->bge_ldata.bge_rx_std_ring[i]; + if (sc->bge_cdata.bge_rx_std_chain[i] != NULL) { + bus_dmamap_sync(sc->bge_cdata.bge_rx_mtag, + sc->bge_cdata.bge_rx_std_dmamap[i], BUS_DMASYNC_POSTREAD); + bus_dmamap_unload(sc->bge_cdata.bge_rx_mtag, + sc->bge_cdata.bge_rx_std_dmamap[i]); + } + map = sc->bge_cdata.bge_rx_std_dmamap[i]; + sc->bge_cdata.bge_rx_std_dmamap[i] = sc->bge_cdata.bge_rx_std_sparemap; + sc->bge_cdata.bge_rx_std_sparemap = map; + sc->bge_cdata.bge_rx_std_chain[i] = m; + r = &sc->bge_ldata.bge_rx_std_ring[sc->bge_std]; r->bge_addr.bge_addr_lo = BGE_ADDR_LO(segs[0].ds_addr); r->bge_addr.bge_addr_hi = BGE_ADDR_HI(segs[0].ds_addr); r->bge_flags = BGE_RXBDFLAG_END; @@ -950,8 +951,7 @@ bge_newbuf_std(struct bge_softc *sc, int r->bge_idx = i; bus_dmamap_sync(sc->bge_cdata.bge_rx_mtag, - sc->bge_cdata.bge_rx_std_dmamap[i], - BUS_DMASYNC_PREREAD); + sc->bge_cdata.bge_rx_std_dmamap[i], BUS_DMASYNC_PREREAD); return (0); } @@ -961,48 +961,49 @@ bge_newbuf_std(struct bge_softc *sc, int * a jumbo buffer from the pool managed internally by the driver. */ static int -bge_newbuf_jumbo(struct bge_softc *sc, int i, struct mbuf *m) +bge_newbuf_jumbo(struct bge_softc *sc, int i) { bus_dma_segment_t segs[BGE_NSEG_JUMBO]; + bus_dmamap_t map; struct bge_extrx_bd *r; - struct mbuf *m_new = NULL; - int nsegs; - int error; + struct mbuf *m; + int error, nsegs; - if (m == NULL) { - MGETHDR(m_new, M_DONTWAIT, MT_DATA); - if (m_new == NULL) - return (ENOBUFS); + MGETHDR(m, M_DONTWAIT, MT_DATA); + if (m == NULL) + return (ENOBUFS); - m_cljget(m_new, M_DONTWAIT, MJUM9BYTES); - if (!(m_new->m_flags & M_EXT)) { - m_freem(m_new); - return (ENOBUFS); - } - m_new->m_len = m_new->m_pkthdr.len = MJUM9BYTES; - } else { - m_new = m; - m_new->m_len = m_new->m_pkthdr.len = MJUM9BYTES; - m_new->m_data = m_new->m_ext.ext_buf; + m_cljget(m, M_DONTWAIT, MJUM9BYTES); + if (!(m->m_flags & M_EXT)) { + m_freem(m); + return (ENOBUFS); } - + m->m_len = m->m_pkthdr.len = MJUM9BYTES; if ((sc->bge_flags & BGE_FLAG_RX_ALIGNBUG) == 0) - m_adj(m_new, ETHER_ALIGN); + m_adj(m, ETHER_ALIGN); error = bus_dmamap_load_mbuf_sg(sc->bge_cdata.bge_mtag_jumbo, - sc->bge_cdata.bge_rx_jumbo_dmamap[i], - m_new, segs, &nsegs, BUS_DMA_NOWAIT); - if (error) { - if (m == NULL) - m_freem(m_new); + sc->bge_cdata.bge_rx_jumbo_sparemap, m, segs, &nsegs, 0); + if (error != 0) { + m_freem(m); return (error); } - sc->bge_cdata.bge_rx_jumbo_chain[i] = m_new; + if (sc->bge_cdata.bge_rx_jumbo_chain[i] == NULL) { + bus_dmamap_sync(sc->bge_cdata.bge_mtag_jumbo, + sc->bge_cdata.bge_rx_jumbo_dmamap[i], BUS_DMASYNC_POSTREAD); + bus_dmamap_unload(sc->bge_cdata.bge_mtag_jumbo, + sc->bge_cdata.bge_rx_jumbo_dmamap[i]); + } + map = sc->bge_cdata.bge_rx_jumbo_dmamap[i]; + sc->bge_cdata.bge_rx_jumbo_dmamap[i] = + sc->bge_cdata.bge_rx_jumbo_sparemap; + sc->bge_cdata.bge_rx_jumbo_sparemap = map; + sc->bge_cdata.bge_rx_jumbo_chain[i] = m; /* * Fill in the extended RX buffer descriptor. */ - r = &sc->bge_ldata.bge_rx_jumbo_ring[i]; + r = &sc->bge_ldata.bge_rx_jumbo_ring[sc->bge_jumbo]; r->bge_flags = BGE_RXBDFLAG_JUMBO_RING | BGE_RXBDFLAG_END; r->bge_idx = i; r->bge_len3 = r->bge_len2 = r->bge_len1 = 0; @@ -1029,8 +1030,7 @@ bge_newbuf_jumbo(struct bge_softc *sc, i } bus_dmamap_sync(sc->bge_cdata.bge_mtag_jumbo, - sc->bge_cdata.bge_rx_jumbo_dmamap[i], - BUS_DMASYNC_PREREAD); + sc->bge_cdata.bge_rx_jumbo_dmamap[i], BUS_DMASYNC_PREREAD); return (0); } @@ -1047,7 +1047,7 @@ bge_init_rx_ring_std(struct bge_softc *s int error, i; for (i = 0; i < BGE_SSLOTS; i++) { - if ((error = bge_newbuf_std(sc, i, NULL)) != 0) + if ((error = bge_newbuf_std(sc, i)) != 0) return (error); }; @@ -1088,7 +1088,7 @@ bge_init_rx_ring_jumbo(struct bge_softc int error, i; for (i = 0; i < BGE_JUMBO_RX_RING_CNT; i++) { - if ((error = bge_newbuf_jumbo(sc, i, NULL)) != 0) + if ((error = bge_newbuf_jumbo(sc, i)) != 0) return (error); }; @@ -1979,6 +1979,9 @@ bge_dma_free(struct bge_softc *sc) bus_dmamap_destroy(sc->bge_cdata.bge_rx_mtag, sc->bge_cdata.bge_rx_std_dmamap[i]); } + if (sc->bge_cdata.bge_rx_std_sparemap) + bus_dmamap_destroy(sc->bge_cdata.bge_rx_mtag, + sc->bge_cdata.bge_rx_std_sparemap); /* Destroy DMA maps for jumbo RX buffers. */ for (i = 0; i < BGE_JUMBO_RX_RING_CNT; i++) { @@ -1986,6 +1989,9 @@ bge_dma_free(struct bge_softc *sc) bus_dmamap_destroy(sc->bge_cdata.bge_mtag_jumbo, sc->bge_cdata.bge_rx_jumbo_dmamap[i]); } + if (sc->bge_cdata.bge_rx_jumbo_sparemap) + bus_dmamap_destroy(sc->bge_cdata.bge_mtag_jumbo, + sc->bge_cdata.bge_rx_jumbo_sparemap); /* Destroy DMA maps for TX buffers. */ for (i = 0; i < BGE_TX_RING_CNT; i++) { @@ -2133,6 +2139,13 @@ bge_dma_alloc(device_t dev) } /* Create DMA maps for RX buffers. */ + error = bus_dmamap_create(sc->bge_cdata.bge_rx_mtag, 0, + &sc->bge_cdata.bge_rx_std_sparemap); + if (error) { + device_printf(sc->bge_dev, + "can't create spare DMA map for RX\n"); + return (ENOMEM); + } for (i = 0; i < BGE_STD_RX_RING_CNT; i++) { error = bus_dmamap_create(sc->bge_cdata.bge_rx_mtag, 0, &sc->bge_cdata.bge_rx_std_dmamap[i]); @@ -2234,6 +2247,13 @@ bge_dma_alloc(device_t dev) sc->bge_ldata.bge_rx_jumbo_ring_paddr = ctx.bge_busaddr; /* Create DMA maps for jumbo RX buffers. */ + error = bus_dmamap_create(sc->bge_cdata.bge_mtag_jumbo, + 0, &sc->bge_cdata.bge_rx_jumbo_sparemap); + if (error) { + device_printf(sc->bge_dev, + "can't create sapre DMA map for jumbo RX\n"); + return (ENOMEM); + } for (i = 0; i < BGE_JUMBO_RX_RING_CNT; i++) { error = bus_dmamap_create(sc->bge_cdata.bge_mtag_jumbo, 0, &sc->bge_cdata.bge_rx_jumbo_dmamap[i]); @@ -3166,43 +3186,29 @@ bge_rxeof(struct bge_softc *sc) } if (cur_rx->bge_flags & BGE_RXBDFLAG_JUMBO_RING) { - BGE_INC(sc->bge_jumbo, BGE_JUMBO_RX_RING_CNT); - bus_dmamap_sync(sc->bge_cdata.bge_mtag_jumbo, - sc->bge_cdata.bge_rx_jumbo_dmamap[rxidx], - BUS_DMASYNC_POSTREAD); - bus_dmamap_unload(sc->bge_cdata.bge_mtag_jumbo, - sc->bge_cdata.bge_rx_jumbo_dmamap[rxidx]); - m = sc->bge_cdata.bge_rx_jumbo_chain[rxidx]; - sc->bge_cdata.bge_rx_jumbo_chain[rxidx] = NULL; jumbocnt++; + m = sc->bge_cdata.bge_rx_jumbo_chain[rxidx]; if (cur_rx->bge_flags & BGE_RXBDFLAG_ERROR) { + BGE_INC(sc->bge_jumbo, BGE_JUMBO_RX_RING_CNT); ifp->if_ierrors++; - bge_newbuf_jumbo(sc, sc->bge_jumbo, m); continue; } - if (bge_newbuf_jumbo(sc, sc->bge_jumbo, NULL) != 0) { - ifp->if_ierrors++; - bge_newbuf_jumbo(sc, sc->bge_jumbo, m); + if (bge_newbuf_jumbo(sc, rxidx) != 0) { + BGE_INC(sc->bge_jumbo, BGE_JUMBO_RX_RING_CNT); + ifp->if_iqdrops++; continue; } } else { - BGE_INC(sc->bge_std, BGE_STD_RX_RING_CNT); - bus_dmamap_sync(sc->bge_cdata.bge_rx_mtag, - sc->bge_cdata.bge_rx_std_dmamap[rxidx], - BUS_DMASYNC_POSTREAD); - bus_dmamap_unload(sc->bge_cdata.bge_rx_mtag, - sc->bge_cdata.bge_rx_std_dmamap[rxidx]); - m = sc->bge_cdata.bge_rx_std_chain[rxidx]; - sc->bge_cdata.bge_rx_std_chain[rxidx] = NULL; stdcnt++; if (cur_rx->bge_flags & BGE_RXBDFLAG_ERROR) { + BGE_INC(sc->bge_std, BGE_STD_RX_RING_CNT); ifp->if_ierrors++; - bge_newbuf_std(sc, sc->bge_std, m); continue; } - if (bge_newbuf_std(sc, sc->bge_std, NULL) != 0) { - ifp->if_ierrors++; - bge_newbuf_std(sc, sc->bge_std, m); + m = sc->bge_cdata.bge_rx_std_chain[rxidx]; + if (bge_newbuf_std(sc, rxidx) != 0) { + BGE_INC(sc->bge_std, BGE_STD_RX_RING_CNT); + ifp->if_iqdrops++; continue; } } Modified: head/sys/dev/bge/if_bgereg.h ============================================================================== --- head/sys/dev/bge/if_bgereg.h Fri Nov 6 23:49:20 2009 (r199010) +++ head/sys/dev/bge/if_bgereg.h Sat Nov 7 01:01:33 2009 (r199011) @@ -2537,7 +2537,9 @@ struct bge_chain_data { bus_dma_tag_t bge_tx_mtag; /* Tx mbuf mapping tag */ bus_dma_tag_t bge_mtag_jumbo; /* Jumbo mbuf mapping tag */ bus_dmamap_t bge_tx_dmamap[BGE_TX_RING_CNT]; + bus_dmamap_t bge_rx_std_sparemap; bus_dmamap_t bge_rx_std_dmamap[BGE_STD_RX_RING_CNT]; + bus_dmamap_t bge_rx_jumbo_sparemap; bus_dmamap_t bge_rx_jumbo_dmamap[BGE_JUMBO_RX_RING_CNT]; bus_dmamap_t bge_rx_std_ring_map; bus_dmamap_t bge_rx_jumbo_ring_map; From owner-svn-src-all@FreeBSD.ORG Sat Nov 7 01:14:10 2009 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 5C1541065670; Sat, 7 Nov 2009 01:14:10 +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 40A208FC13; Sat, 7 Nov 2009 01:14: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 nA71E9gM033627; Sat, 7 Nov 2009 01:14:09 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA71E9e5033624; Sat, 7 Nov 2009 01:14:09 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200911070114.nA71E9e5033624@svn.freebsd.org> From: Pyun YongHyeon Date: Sat, 7 Nov 2009 01:14: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: r199012 - head/sys/dev/msk 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, 07 Nov 2009 01:14:10 -0000 Author: yongari Date: Sat Nov 7 01:14:09 2009 New Revision: 199012 URL: http://svn.freebsd.org/changeset/base/199012 Log: Add preliminary Yukon Ultra 2 support(88E8057). The controller looks very similar to Yukon EC Ultra. Tested by: kalin m ( kalin <> el dot net ) Modified: head/sys/dev/msk/if_msk.c head/sys/dev/msk/if_mskreg.h Modified: head/sys/dev/msk/if_msk.c ============================================================================== --- head/sys/dev/msk/if_msk.c Sat Nov 7 01:01:33 2009 (r199011) +++ head/sys/dev/msk/if_msk.c Sat Nov 7 01:14:09 2009 (r199012) @@ -222,6 +222,8 @@ static struct msk_product { "Marvell Yukon 88E8071 Gigabit Ethernet" }, { VENDORID_MARVELL, DEVICEID_MRVL_436C, "Marvell Yukon 88E8072 Gigabit Ethernet" }, + { VENDORID_MARVELL, DEVICEID_MRVL_4380, + "Marvell Yukon 88E8057 Gigabit Ethernet" }, { VENDORID_DLINK, DEVICEID_DLINK_DGE550SX, "D-Link 550SX Gigabit Ethernet" }, { VENDORID_DLINK, DEVICEID_DLINK_DGE560SX, @@ -236,7 +238,9 @@ static const char *model_name[] = { "Yukon EX", "Yukon EC", "Yukon FE", - "Yukon FE+" + "Yukon FE+", + "Yukon Supreme", + "Yukon Ultra 2" }; static int mskc_probe(device_t); @@ -1143,6 +1147,7 @@ msk_phy_power(struct msk_softc *sc, int case CHIP_ID_YUKON_EC_U: case CHIP_ID_YUKON_EX: case CHIP_ID_YUKON_FE_P: + case CHIP_ID_YUKON_UL_2: CSR_WRITE_2(sc, B0_CTST, Y2_HW_WOL_OFF); /* Enable all clocks. */ @@ -1644,7 +1649,8 @@ mskc_attach(device_t dev) sc->msk_hw_rev = (CSR_READ_1(sc, B2_MAC_CFG) >> 4) & 0x0f; /* Bail out if chip is not recognized. */ if (sc->msk_hw_id < CHIP_ID_YUKON_XL || - sc->msk_hw_id > CHIP_ID_YUKON_FE_P) { + sc->msk_hw_id > CHIP_ID_YUKON_UL_2 || + sc->msk_hw_id == CHIP_ID_YUKON_SUPR) { device_printf(dev, "unknown device: id=0x%02x, rev=0x%02x\n", sc->msk_hw_id, sc->msk_hw_rev); mtx_destroy(&sc->msk_mtx); @@ -1743,6 +1749,10 @@ mskc_attach(device_t dev) sc->msk_clock = 156; /* 156 Mhz */ sc->msk_pflags |= MSK_FLAG_JUMBO; break; + case CHIP_ID_YUKON_UL_2: + sc->msk_clock = 156; /* 156 Mhz */ + sc->msk_pflags |= MSK_FLAG_JUMBO; + break; default: sc->msk_clock = 156; /* 156 Mhz */ break; Modified: head/sys/dev/msk/if_mskreg.h ============================================================================== --- head/sys/dev/msk/if_mskreg.h Sat Nov 7 01:01:33 2009 (r199011) +++ head/sys/dev/msk/if_mskreg.h Sat Nov 7 01:14:09 2009 (r199012) @@ -144,6 +144,7 @@ #define DEVICEID_MRVL_436A 0x436A #define DEVICEID_MRVL_436B 0x436B #define DEVICEID_MRVL_436C 0x436C +#define DEVICEID_MRVL_4380 0x4380 /* * D-Link gigabit ethernet device ID @@ -891,6 +892,8 @@ #define CHIP_ID_YUKON_EC 0xb6 /* Chip ID for YUKON-2 EC */ #define CHIP_ID_YUKON_FE 0xb7 /* Chip ID for YUKON-2 FE */ #define CHIP_ID_YUKON_FE_P 0xb8 /* Chip ID for YUKON-2 FE+ */ +#define CHIP_ID_YUKON_SUPR 0xb9 /* Chip ID for YUKON-2 Supreme */ +#define CHIP_ID_YUKON_UL_2 0xba /* Chip ID for YUKON-2 Ultra 2 */ #define CHIP_REV_YU_XL_A0 0 /* Chip Rev. for Yukon-2 A0 */ #define CHIP_REV_YU_XL_A1 1 /* Chip Rev. for Yukon-2 A1 */ From owner-svn-src-all@FreeBSD.ORG Sat Nov 7 01:18:03 2009 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 6ED9C1065679; Sat, 7 Nov 2009 01:18:03 +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 5E2DC8FC19; Sat, 7 Nov 2009 01:18: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 nA71I3mh033746; Sat, 7 Nov 2009 01:18:03 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA71I33M033744; Sat, 7 Nov 2009 01:18:03 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200911070118.nA71I33M033744@svn.freebsd.org> From: Pyun YongHyeon Date: Sat, 7 Nov 2009 01:18: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: r199013 - 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, 07 Nov 2009 01:18:03 -0000 Author: yongari Date: Sat Nov 7 01:18:03 2009 New Revision: 199013 URL: http://svn.freebsd.org/changeset/base/199013 Log: 88E8057(Ultra 2) is now supported. Modified: head/share/man/man4/msk.4 Modified: head/share/man/man4/msk.4 ============================================================================== --- head/share/man/man4/msk.4 Sat Nov 7 01:14:09 2009 (r199012) +++ head/share/man/man4/msk.4 Sat Nov 7 01:18:03 2009 (r199013) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 28, 2009 +.Dd November 6, 2009 .Dt MSK 4 .Os .Sh NAME @@ -204,6 +204,8 @@ Marvell Yukon 88E8055 Gigabit Ethernet .It Marvell Yukon 88E8056 Gigabit Ethernet .It +Marvell Yukon 88E8057 Gigabit Ethernet +.It Marvell Yukon 88E8058 Gigabit Ethernet .It Marvell Yukon 88E8070 Gigabit Ethernet From owner-svn-src-all@FreeBSD.ORG Sat Nov 7 02:10:59 2009 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 6AA4C1065676; Sat, 7 Nov 2009 02:10:59 +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 59B848FC28; Sat, 7 Nov 2009 02:10: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 nA72AxId034703; Sat, 7 Nov 2009 02:10:59 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA72AxTm034701; Sat, 7 Nov 2009 02:10:59 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200911070210.nA72AxTm034701@svn.freebsd.org> From: Pyun YongHyeon Date: Sat, 7 Nov 2009 02:10: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: r199014 - 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: Sat, 07 Nov 2009 02:10:59 -0000 Author: yongari Date: Sat Nov 7 02:10:59 2009 New Revision: 199014 URL: http://svn.freebsd.org/changeset/base/199014 Log: Fix I mssied in r199011. Rx ring index also should be updated. If we fill Rx ring full instead of half we can simplify this logic but this requires more experimentation. Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Sat Nov 7 01:18:03 2009 (r199013) +++ head/sys/dev/bge/if_bge.c Sat Nov 7 02:10:59 2009 (r199014) @@ -1046,9 +1046,11 @@ bge_init_rx_ring_std(struct bge_softc *s { int error, i; + sc->bge_std = 0; for (i = 0; i < BGE_SSLOTS; i++) { if ((error = bge_newbuf_std(sc, i)) != 0) return (error); + BGE_INC(sc->bge_std, BGE_STD_RX_RING_CNT); }; bus_dmamap_sync(sc->bge_cdata.bge_rx_std_ring_tag, @@ -1087,9 +1089,11 @@ bge_init_rx_ring_jumbo(struct bge_softc struct bge_rcb *rcb; int error, i; + sc->bge_jumbo = 0; for (i = 0; i < BGE_JUMBO_RX_RING_CNT; i++) { if ((error = bge_newbuf_jumbo(sc, i)) != 0) return (error); + BGE_INC(sc->bge_jumbo, BGE_JUMBO_RX_RING_CNT); }; bus_dmamap_sync(sc->bge_cdata.bge_rx_jumbo_ring_tag, @@ -3198,6 +3202,7 @@ bge_rxeof(struct bge_softc *sc) ifp->if_iqdrops++; continue; } + BGE_INC(sc->bge_jumbo, BGE_JUMBO_RX_RING_CNT); } else { stdcnt++; if (cur_rx->bge_flags & BGE_RXBDFLAG_ERROR) { @@ -3211,6 +3216,7 @@ bge_rxeof(struct bge_softc *sc) ifp->if_iqdrops++; continue; } + BGE_INC(sc->bge_std, BGE_STD_RX_RING_CNT); } ifp->if_ipackets++; From owner-svn-src-all@FreeBSD.ORG Sat Nov 7 10:44:46 2009 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 99AFD106566B; Sat, 7 Nov 2009 10:44:46 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 55E038FC0C; Sat, 7 Nov 2009 10:44:46 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id CC18646B23; Sat, 7 Nov 2009 05:44:45 -0500 (EST) Date: Sat, 7 Nov 2009 10:44:45 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: John Baldwin In-Reply-To: <200911062033.nA6KXr20028001@svn.freebsd.org> Message-ID: References: <200911062033.nA6KXr20028001@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org Subject: Re: svn commit: r199004 - stable/7/usr.bin/vmstat 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, 07 Nov 2009 10:44:46 -0000 On Fri, 6 Nov 2009, John Baldwin wrote: > MFC 198620: > When fetching sum stats (vmstat -s) from a crash dump, fetch per-CPU counts > and sum them to form the total counts. At some point, we need to complete the migration to per-CPU stats for most of our statistics counters, as well as a migration to DPCPU to store them. Among other things, this will reduce the endemic problem we have with per-CPU stats from different CPUs being packed into the same cache line. Once we do that, we'll probably want a libkvm utility routine for managing DPCPU retrievals. Robert N M Watson Computer Laboratory University of Cambridge > > Modified: > stable/7/usr.bin/vmstat/vmstat.c > Directory Properties: > stable/7/usr.bin/vmstat/ (props changed) > > Modified: stable/7/usr.bin/vmstat/vmstat.c > ============================================================================== > --- stable/7/usr.bin/vmstat/vmstat.c Fri Nov 6 20:33:40 2009 (r199003) > +++ stable/7/usr.bin/vmstat/vmstat.c Fri Nov 6 20:33:53 2009 (r199004) > @@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > > #include > > @@ -420,10 +421,90 @@ getuptime(void) > } > > static void > +fill_pcpu(struct pcpu ***pcpup, int* maxcpup) > +{ > + struct pcpu **pcpu; > + > + int maxcpu, size, i; > + > + *pcpup = NULL; > + > + if (kd == NULL) > + return; > + > + maxcpu = kvm_getmaxcpu(kd); > + if (maxcpu < 0) > + errx(1, "kvm_getmaxcpu: %s", kvm_geterr(kd)); > + > + pcpu = calloc(maxcpu, sizeof(struct pcpu *)); > + if (pcpu == NULL) > + err(1, "calloc"); > + > + for (i = 0; i < maxcpu; i++) { > + pcpu[i] = kvm_getpcpu(kd, i); > + if (pcpu[i] == (struct pcpu *)-1) > + errx(1, "kvm_getpcpu: %s", kvm_geterr(kd)); > + } > + > + *maxcpup = maxcpu; > + *pcpup = pcpu; > +} > + > +static void > +free_pcpu(struct pcpu **pcpu, int maxcpu) > +{ > + int i; > + > + for (i = 0; i < maxcpu; i++) > + free(pcpu[i]); > + free(pcpu); > +} > + > +static void > fill_vmmeter(struct vmmeter *vmmp) > { > + struct pcpu **pcpu; > + int maxcpu, i; > + > if (kd != NULL) { > kread(X_SUM, vmmp, sizeof(*vmmp)); > + fill_pcpu(&pcpu, &maxcpu); > + for (i = 0; i < maxcpu; i++) { > + if (pcpu[i] == NULL) > + continue; > +#define ADD_FROM_PCPU(i, name) \ > + vmmp->name += pcpu[i]->pc_cnt.name > + ADD_FROM_PCPU(i, v_swtch); > + ADD_FROM_PCPU(i, v_trap); > + ADD_FROM_PCPU(i, v_syscall); > + ADD_FROM_PCPU(i, v_intr); > + ADD_FROM_PCPU(i, v_soft); > + ADD_FROM_PCPU(i, v_vm_faults); > + ADD_FROM_PCPU(i, v_cow_faults); > + ADD_FROM_PCPU(i, v_cow_optim); > + ADD_FROM_PCPU(i, v_zfod); > + ADD_FROM_PCPU(i, v_ozfod); > + ADD_FROM_PCPU(i, v_swapin); > + ADD_FROM_PCPU(i, v_swapout); > + ADD_FROM_PCPU(i, v_swappgsin); > + ADD_FROM_PCPU(i, v_swappgsout); > + ADD_FROM_PCPU(i, v_vnodein); > + ADD_FROM_PCPU(i, v_vnodeout); > + ADD_FROM_PCPU(i, v_vnodepgsin); > + ADD_FROM_PCPU(i, v_vnodepgsout); > + ADD_FROM_PCPU(i, v_intrans); > + ADD_FROM_PCPU(i, v_tfree); > + ADD_FROM_PCPU(i, v_forks); > + ADD_FROM_PCPU(i, v_vforks); > + ADD_FROM_PCPU(i, v_rforks); > + ADD_FROM_PCPU(i, v_kthreads); > + ADD_FROM_PCPU(i, v_forkpages); > + ADD_FROM_PCPU(i, v_vforkpages); > + ADD_FROM_PCPU(i, v_rforkpages); > + ADD_FROM_PCPU(i, v_kthreadpages); > +#undef ADD_FROM_PCPU > + } > + free_pcpu(pcpu, maxcpu); > } else { > size_t size = sizeof(unsigned int); > #define GET_VM_STATS(cat, name) \ > From owner-svn-src-all@FreeBSD.ORG Sat Nov 7 11:41:23 2009 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 D50B41065670; Sat, 7 Nov 2009 11:41:23 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C41208FC1B; Sat, 7 Nov 2009 11: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 nA7BfN3n046820; Sat, 7 Nov 2009 11:41:23 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA7BfNXX046817; Sat, 7 Nov 2009 11:41:23 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <200911071141.nA7BfNXX046817@svn.freebsd.org> From: Andriy Gapon Date: Sat, 7 Nov 2009 11: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: r199015 - in head/sys: dev/ichwd modules/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: Sat, 07 Nov 2009 11:41:23 -0000 Author: avg Date: Sat Nov 7 11:41:23 2009 New Revision: 199015 URL: http://svn.freebsd.org/changeset/base/199015 Log: ichwd: don't attach to isa pnp device(s) by accident Reviewed by: imp, des MFC after: 1 week Modified: head/sys/dev/ichwd/ichwd.c head/sys/modules/ichwd/Makefile Modified: head/sys/dev/ichwd/ichwd.c ============================================================================== --- head/sys/dev/ichwd/ichwd.c Sat Nov 7 02:10:59 2009 (r199014) +++ head/sys/dev/ichwd/ichwd.c Sat Nov 7 11:41:23 2009 (r199015) @@ -68,6 +68,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -393,7 +394,9 @@ static int ichwd_probe(device_t dev) { - (void)dev; + /* Do not claim some ISA PnP device by accident. */ + if (isa_get_logicalid(dev) != 0) + return (ENXIO); return (0); } Modified: head/sys/modules/ichwd/Makefile ============================================================================== --- head/sys/modules/ichwd/Makefile Sat Nov 7 02:10:59 2009 (r199014) +++ head/sys/modules/ichwd/Makefile Sat Nov 7 11:41:23 2009 (r199015) @@ -3,6 +3,6 @@ .PATH: ${.CURDIR}/../../dev/ichwd KMOD= ichwd -SRCS= ichwd.c device_if.h bus_if.h pci_if.h +SRCS= ichwd.c device_if.h bus_if.h pci_if.h isa_if.h .include From owner-svn-src-all@FreeBSD.ORG Sat Nov 7 11:46:41 2009 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 E96B7106566C; Sat, 7 Nov 2009 11:46:39 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F2F228FC14; Sat, 7 Nov 2009 11:46: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 nA7BkcxX046963; Sat, 7 Nov 2009 11:46:38 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA7BkcJn046957; Sat, 7 Nov 2009 11:46:38 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <200911071146.nA7BkcJn046957@svn.freebsd.org> From: Andriy Gapon Date: Sat, 7 Nov 2009 11:46: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: r199016 - 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: Sat, 07 Nov 2009 11:46:41 -0000 Author: avg Date: Sat Nov 7 11:46:38 2009 New Revision: 199016 URL: http://svn.freebsd.org/changeset/base/199016 Log: acpi: remove 'magic' ivar o acpi_hpet: auto-added 'wildcard' devices can be identified by non-NULL handle attribute. o acpi_ec: auto-add 'wildcard' devices can be identified by unset (NULL) private attribute. o acpi_cpu: use private instead of magic to store cpu id. Reviewed by: jhb Silence from: acpi@ MFC after: 2 weeks X-MFC-Note: perhaps the ivar should stay for ABI stability Modified: head/sys/dev/acpica/acpi.c head/sys/dev/acpica/acpi_cpu.c head/sys/dev/acpica/acpi_ec.c head/sys/dev/acpica/acpi_hpet.c head/sys/dev/acpica/acpivar.h Modified: head/sys/dev/acpica/acpi.c ============================================================================== --- head/sys/dev/acpica/acpi.c Sat Nov 7 11:41:23 2009 (r199015) +++ head/sys/dev/acpica/acpi.c Sat Nov 7 11:46:38 2009 (r199016) @@ -900,9 +900,6 @@ acpi_read_ivar(device_t dev, device_t ch case ACPI_IVAR_HANDLE: *(ACPI_HANDLE *)result = ad->ad_handle; break; - case ACPI_IVAR_MAGIC: - *(uintptr_t *)result = ad->ad_magic; - break; case ACPI_IVAR_PRIVATE: *(void **)result = ad->ad_private; break; @@ -938,9 +935,6 @@ acpi_write_ivar(device_t dev, device_t c case ACPI_IVAR_HANDLE: ad->ad_handle = (ACPI_HANDLE)value; break; - case ACPI_IVAR_MAGIC: - ad->ad_magic = (uintptr_t)value; - break; case ACPI_IVAR_PRIVATE: ad->ad_private = (void *)value; break; Modified: head/sys/dev/acpica/acpi_cpu.c ============================================================================== --- head/sys/dev/acpica/acpi_cpu.c Sat Nov 7 11:41:23 2009 (r199015) +++ head/sys/dev/acpica/acpi_cpu.c Sat Nov 7 11:46:38 2009 (r199016) @@ -255,7 +255,7 @@ acpi_cpu_probe(device_t dev) /* Mark this processor as in-use and save our derived id for attach. */ cpu_softc[cpu_id] = (void *)1; - acpi_set_magic(dev, cpu_id); + acpi_set_private(dev, (void*)(intptr_t)cpu_id); device_set_desc(dev, "ACPI CPU"); return (0); @@ -286,7 +286,7 @@ acpi_cpu_attach(device_t dev) sc = device_get_softc(dev); sc->cpu_dev = dev; sc->cpu_handle = acpi_get_handle(dev); - cpu_id = acpi_get_magic(dev); + cpu_id = (int)(intptr_t)acpi_get_private(dev); cpu_softc[cpu_id] = sc; pcpu_data = pcpu_find(cpu_id); pcpu_data->pc_device = dev; Modified: head/sys/dev/acpica/acpi_ec.c ============================================================================== --- head/sys/dev/acpica/acpi_ec.c Sat Nov 7 11:41:23 2009 (r199015) +++ head/sys/dev/acpica/acpi_ec.c Sat Nov 7 11:46:38 2009 (r199016) @@ -129,9 +129,6 @@ struct acpi_ec_params { int uid; }; -/* Indicate that this device has already been probed via ECDT. */ -#define DEV_ECDT(x) (acpi_get_magic(x) == (uintptr_t)&acpi_ec_devclass) - /* * Driver softc. */ @@ -332,7 +329,6 @@ acpi_ec_ecdt_probe(device_t parent) params->uid = ecdt->Uid; acpi_GetInteger(h, "_GLK", ¶ms->glk); acpi_set_private(child, params); - acpi_set_magic(child, (uintptr_t)&acpi_ec_devclass); /* Finish the attach process. */ if (device_probe_and_attach(child) != 0) @@ -348,6 +344,7 @@ acpi_ec_probe(device_t dev) ACPI_STATUS status; device_t peer; char desc[64]; + int ecdt; int ret; struct acpi_ec_params *params; static char *ec_ids[] = { "PNP0C09", NULL }; @@ -362,11 +359,12 @@ acpi_ec_probe(device_t dev) * duplicate probe. */ ret = ENXIO; - params = NULL; + ecdt = 0; buf.Pointer = NULL; buf.Length = ACPI_ALLOCATE_BUFFER; - if (DEV_ECDT(dev)) { - params = acpi_get_private(dev); + params = acpi_get_private(dev); + if (params != NULL) { + ecdt = 1; ret = 0; } else if (!acpi_disabled("ec") && ACPI_ID_PROBE(device_get_parent(dev), dev, ec_ids)) { @@ -439,7 +437,7 @@ out: if (ret == 0) { snprintf(desc, sizeof(desc), "Embedded Controller: GPE %#x%s%s", params->gpe_bit, (params->glk) ? ", GLK" : "", - DEV_ECDT(dev) ? ", ECDT" : ""); + ecdt ? ", ECDT" : ""); device_set_desc_copy(dev, desc); } Modified: head/sys/dev/acpica/acpi_hpet.c ============================================================================== --- head/sys/dev/acpica/acpi_hpet.c Sat Nov 7 11:41:23 2009 (r199015) +++ head/sys/dev/acpica/acpi_hpet.c Sat Nov 7 11:46:38 2009 (r199016) @@ -61,8 +61,6 @@ static void acpi_hpet_test(struct acpi_h static char *hpet_ids[] = { "PNP0103", NULL }; -#define DEV_HPET(x) (acpi_get_magic(x) == (uintptr_t)&acpi_hpet_devclass) - struct timecounter hpet_timecounter = { .tc_get_timecount = hpet_get_timecount, .tc_counter_mask = ~0u, @@ -133,8 +131,6 @@ acpi_hpet_identify(driver_t *driver, dev return; } - /* Record a magic value so we can detect this device later. */ - acpi_set_magic(child, (uintptr_t)&acpi_hpet_devclass); bus_set_resource(child, SYS_RES_MEMORY, 0, hpet->Address.Address, HPET_MEM_WIDTH); } @@ -146,7 +142,7 @@ acpi_hpet_probe(device_t dev) if (acpi_disabled("hpet")) return (ENXIO); - if (!DEV_HPET(dev) && + if (acpi_get_handle(dev) != NULL && (ACPI_ID_PROBE(device_get_parent(dev), dev, hpet_ids) == NULL || device_get_unit(dev) != 0)) return (ENXIO); Modified: head/sys/dev/acpica/acpivar.h ============================================================================== --- head/sys/dev/acpica/acpivar.h Sat Nov 7 11:41:23 2009 (r199015) +++ head/sys/dev/acpica/acpivar.h Sat Nov 7 11:46:38 2009 (r199016) @@ -88,7 +88,6 @@ struct acpi_softc { struct acpi_device { /* ACPI ivars */ ACPI_HANDLE ad_handle; - uintptr_t ad_magic; void *ad_private; int ad_flags; @@ -224,7 +223,7 @@ extern int acpi_quirks; * attach to ACPI. */ #define ACPI_IVAR_HANDLE 0x100 -#define ACPI_IVAR_MAGIC 0x101 +#define ACPI_IVAR_UNUSED 0x101 /* Unused/reserved. */ #define ACPI_IVAR_PRIVATE 0x102 #define ACPI_IVAR_FLAGS 0x103 @@ -250,7 +249,6 @@ static __inline void varp ## _set_ ## va } __ACPI_BUS_ACCESSOR(acpi, handle, ACPI, HANDLE, ACPI_HANDLE) -__ACPI_BUS_ACCESSOR(acpi, magic, ACPI, MAGIC, uintptr_t) __ACPI_BUS_ACCESSOR(acpi, private, ACPI, PRIVATE, void *) __ACPI_BUS_ACCESSOR(acpi, flags, ACPI, FLAGS, int) From owner-svn-src-all@FreeBSD.ORG Sat Nov 7 17:29:03 2009 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 C314D1065679; Sat, 7 Nov 2009 17:29:03 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A62BA8FC15; Sat, 7 Nov 2009 17:29: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 nA7HT3vu059028; Sat, 7 Nov 2009 17:29:03 GMT (envelope-from rnoland@svn.freebsd.org) Received: (from rnoland@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA7HT3Gn059027; Sat, 7 Nov 2009 17:29:03 GMT (envelope-from rnoland@svn.freebsd.org) Message-Id: <200911071729.nA7HT3Gn059027@svn.freebsd.org> From: Robert Noland Date: Sat, 7 Nov 2009 17:29: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: r199017 - head/sys/geom/part 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, 07 Nov 2009 17:29:03 -0000 Author: rnoland Date: Sat Nov 7 17:29:03 2009 New Revision: 199017 URL: http://svn.freebsd.org/changeset/base/199017 Log: Fix handling of GPT headers when size is > 92 bytes. It is valid for an on-disk GPT header to report a header size which is greater than 92 bytes. Previously, we would read in the sector and copy only the 92 bytes that we know how to deal with before calculating the checksum for comparison. This meant that when we did the checksum, we overshot the buffer and took in random memory, so the checksum would fail. We now determine the size of the header and allocate enough space to preserve the entire on-disk contents. This allows us to be correctly calculate the checksum and be able to modify and write the header back to the disk, while preserving data that we might not understand. Reported by: Kris Weston Approved by: marcel@ MFC after: 2 weeks Modified: head/sys/geom/part/g_part_gpt.c Modified: head/sys/geom/part/g_part_gpt.c ============================================================================== --- head/sys/geom/part/g_part_gpt.c Sat Nov 7 11:46:38 2009 (r199016) +++ head/sys/geom/part/g_part_gpt.c Sat Nov 7 17:29:03 2009 (r199017) @@ -73,7 +73,7 @@ enum gpt_state { struct g_part_gpt_table { struct g_part_table base; u_char mbr[MBRSIZE]; - struct gpt_hdr hdr; + struct gpt_hdr *hdr; quad_t lba[GPT_ELT_COUNT]; enum gpt_state state[GPT_ELT_COUNT]; }; @@ -143,13 +143,12 @@ static struct uuid gpt_uuid_linux_swap = static struct uuid gpt_uuid_mbr = GPT_ENT_TYPE_MBR; static struct uuid gpt_uuid_unused = GPT_ENT_TYPE_UNUSED; -static void +static struct gpt_hdr * gpt_read_hdr(struct g_part_gpt_table *table, struct g_consumer *cp, - enum gpt_elt elt, struct gpt_hdr *hdr) + enum gpt_elt elt) { - struct uuid uuid; + struct gpt_hdr *buf, *hdr; struct g_provider *pp; - char *buf; quad_t lba, last; int error; uint32_t crc, sz; @@ -161,63 +160,75 @@ gpt_read_hdr(struct g_part_gpt_table *ta buf = g_read_data(cp, table->lba[elt] * pp->sectorsize, pp->sectorsize, &error); if (buf == NULL) - return; - bcopy(buf, hdr, sizeof(*hdr)); - if (memcmp(hdr->hdr_sig, GPT_HDR_SIG, sizeof(hdr->hdr_sig)) != 0) - return; + return (NULL); + hdr = NULL; + if (memcmp(buf->hdr_sig, GPT_HDR_SIG, sizeof(buf->hdr_sig)) != 0) + goto fail; table->state[elt] = GPT_STATE_CORRUPT; - sz = le32toh(hdr->hdr_size); + sz = le32toh(buf->hdr_size); if (sz < 92 || sz > pp->sectorsize) - return; - crc = le32toh(hdr->hdr_crc_self); - hdr->hdr_crc_self = 0; - if (crc32(hdr, sz) != crc) - return; + goto fail; + + hdr = g_malloc(sz, M_WAITOK | M_ZERO); + bcopy(buf, hdr, sz); hdr->hdr_size = sz; + + crc = le32toh(buf->hdr_crc_self); + buf->hdr_crc_self = 0; + if (crc32(buf, sz) != crc) + goto fail; hdr->hdr_crc_self = crc; table->state[elt] = GPT_STATE_INVALID; - hdr->hdr_revision = le32toh(hdr->hdr_revision); + hdr->hdr_revision = le32toh(buf->hdr_revision); if (hdr->hdr_revision < 0x00010000) - return; - hdr->hdr_lba_self = le64toh(hdr->hdr_lba_self); + goto fail; + hdr->hdr_lba_self = le64toh(buf->hdr_lba_self); if (hdr->hdr_lba_self != table->lba[elt]) - return; - hdr->hdr_lba_alt = le64toh(hdr->hdr_lba_alt); + goto fail; + hdr->hdr_lba_alt = le64toh(buf->hdr_lba_alt); /* Check the managed area. */ - hdr->hdr_lba_start = le64toh(hdr->hdr_lba_start); + hdr->hdr_lba_start = le64toh(buf->hdr_lba_start); if (hdr->hdr_lba_start < 2 || hdr->hdr_lba_start >= last) - return; - hdr->hdr_lba_end = le64toh(hdr->hdr_lba_end); + goto fail; + hdr->hdr_lba_end = le64toh(buf->hdr_lba_end); if (hdr->hdr_lba_end < hdr->hdr_lba_start || hdr->hdr_lba_end >= last) - return; + goto fail; /* Check the table location and size of the table. */ - hdr->hdr_entries = le32toh(hdr->hdr_entries); - hdr->hdr_entsz = le32toh(hdr->hdr_entsz); + hdr->hdr_entries = le32toh(buf->hdr_entries); + hdr->hdr_entsz = le32toh(buf->hdr_entsz); if (hdr->hdr_entries == 0 || hdr->hdr_entsz < 128 || (hdr->hdr_entsz & 7) != 0) - return; - hdr->hdr_lba_table = le64toh(hdr->hdr_lba_table); + goto fail; + hdr->hdr_lba_table = le64toh(buf->hdr_lba_table); if (hdr->hdr_lba_table < 2 || hdr->hdr_lba_table >= last) - return; + goto fail; if (hdr->hdr_lba_table >= hdr->hdr_lba_start && hdr->hdr_lba_table <= hdr->hdr_lba_end) - return; + goto fail; lba = hdr->hdr_lba_table + (hdr->hdr_entries * hdr->hdr_entsz + pp->sectorsize - 1) / pp->sectorsize - 1; if (lba >= last) - return; + goto fail; if (lba >= hdr->hdr_lba_start && lba <= hdr->hdr_lba_end) - return; + goto fail; table->state[elt] = GPT_STATE_OK; - le_uuid_dec(&hdr->hdr_uuid, &uuid); - hdr->hdr_uuid = uuid; - hdr->hdr_crc_table = le32toh(hdr->hdr_crc_table); + le_uuid_dec(&buf->hdr_uuid, &hdr->hdr_uuid); + hdr->hdr_crc_table = le32toh(buf->hdr_crc_table); + + g_free(buf); + return (hdr); + + fail: + if (hdr != NULL) + g_free(hdr); + g_free(buf); + return (NULL); } static struct gpt_ent * @@ -230,6 +241,9 @@ gpt_read_tbl(struct g_part_gpt_table *ta unsigned int idx, sectors, tblsz; int error; + if (hdr == NULL) + return (NULL); + pp = cp->provider; table->lba[elt] = hdr->hdr_lba_table; @@ -271,6 +285,9 @@ static int gpt_matched_hdrs(struct gpt_hdr *pri, struct gpt_hdr *sec) { + if (pri == NULL || sec == NULL) + return (0); + if (!EQUUID(&pri->hdr_uuid, &sec->hdr_uuid)) return (0); return ((pri->hdr_revision == sec->hdr_revision && @@ -427,17 +444,17 @@ g_part_gpt_create(struct g_part_table *b table->lba[GPT_ELT_SECHDR] = last; table->lba[GPT_ELT_SECTBL] = last - tblsz; - bcopy(GPT_HDR_SIG, table->hdr.hdr_sig, sizeof(table->hdr.hdr_sig)); - table->hdr.hdr_revision = GPT_HDR_REVISION; - table->hdr.hdr_size = offsetof(struct gpt_hdr, padding); - table->hdr.hdr_lba_start = 2 + tblsz; - table->hdr.hdr_lba_end = last - tblsz - 1; - kern_uuidgen(&table->hdr.hdr_uuid, 1); - table->hdr.hdr_entries = basetable->gpt_entries; - table->hdr.hdr_entsz = sizeof(struct gpt_ent); + bcopy(GPT_HDR_SIG, table->hdr->hdr_sig, sizeof(table->hdr->hdr_sig)); + table->hdr->hdr_revision = GPT_HDR_REVISION; + table->hdr->hdr_size = offsetof(struct gpt_hdr, padding); + table->hdr->hdr_lba_start = 2 + tblsz; + table->hdr->hdr_lba_end = last - tblsz - 1; + kern_uuidgen(&table->hdr->hdr_uuid, 1); + table->hdr->hdr_entries = basetable->gpt_entries; + table->hdr->hdr_entsz = sizeof(struct gpt_ent); - basetable->gpt_first = table->hdr.hdr_lba_start; - basetable->gpt_last = table->hdr.hdr_lba_end; + basetable->gpt_first = table->hdr->hdr_lba_start; + basetable->gpt_last = table->hdr->hdr_lba_end; return (0); } @@ -582,7 +599,7 @@ g_part_gpt_probe(struct g_part_table *ta static int g_part_gpt_read(struct g_part_table *basetable, struct g_consumer *cp) { - struct gpt_hdr prihdr, sechdr; + struct gpt_hdr *prihdr, *sechdr; struct gpt_ent *tbl, *pritbl, *sectbl; struct g_provider *pp; struct g_part_gpt_table *table; @@ -601,18 +618,18 @@ g_part_gpt_read(struct g_part_table *bas g_free(buf); /* Read the primary header and table. */ - gpt_read_hdr(table, cp, GPT_ELT_PRIHDR, &prihdr); + prihdr = gpt_read_hdr(table, cp, GPT_ELT_PRIHDR); if (table->state[GPT_ELT_PRIHDR] == GPT_STATE_OK) { - pritbl = gpt_read_tbl(table, cp, GPT_ELT_PRITBL, &prihdr); + pritbl = gpt_read_tbl(table, cp, GPT_ELT_PRITBL, prihdr); } else { table->state[GPT_ELT_PRITBL] = GPT_STATE_MISSING; pritbl = NULL; } /* Read the secondary header and table. */ - gpt_read_hdr(table, cp, GPT_ELT_SECHDR, &sechdr); + sechdr = gpt_read_hdr(table, cp, GPT_ELT_SECHDR); if (table->state[GPT_ELT_SECHDR] == GPT_STATE_OK) { - sectbl = gpt_read_tbl(table, cp, GPT_ELT_SECTBL, &sechdr); + sectbl = gpt_read_tbl(table, cp, GPT_ELT_SECTBL, sechdr); } else { table->state[GPT_ELT_SECTBL] = GPT_STATE_MISSING; sectbl = NULL; @@ -635,13 +652,17 @@ g_part_gpt_read(struct g_part_table *bas */ if (table->state[GPT_ELT_PRIHDR] == GPT_STATE_OK && table->state[GPT_ELT_SECHDR] == GPT_STATE_OK && - !gpt_matched_hdrs(&prihdr, &sechdr)) { + !gpt_matched_hdrs(prihdr, sechdr)) { if (table->state[GPT_ELT_PRITBL] == GPT_STATE_OK) { table->state[GPT_ELT_SECHDR] = GPT_STATE_INVALID; table->state[GPT_ELT_SECTBL] = GPT_STATE_MISSING; + g_free(sechdr); + sechdr = NULL; } else { table->state[GPT_ELT_PRIHDR] = GPT_STATE_INVALID; table->state[GPT_ELT_PRITBL] = GPT_STATE_MISSING; + g_free(prihdr); + prihdr = NULL; } } @@ -651,6 +672,8 @@ g_part_gpt_read(struct g_part_table *bas printf("GEOM: %s: using the secondary instead -- recovery " "strongly advised.\n", pp->name); table->hdr = sechdr; + if (prihdr != NULL) + g_free(prihdr); tbl = sectbl; if (pritbl != NULL) g_free(pritbl); @@ -662,14 +685,16 @@ g_part_gpt_read(struct g_part_table *bas "suggested.\n", pp->name); } table->hdr = prihdr; + if (sechdr != NULL) + g_free(sechdr); tbl = pritbl; if (sectbl != NULL) g_free(sectbl); } - basetable->gpt_first = table->hdr.hdr_lba_start; - basetable->gpt_last = table->hdr.hdr_lba_end; - basetable->gpt_entries = table->hdr.hdr_entries; + basetable->gpt_first = table->hdr->hdr_lba_start; + basetable->gpt_last = table->hdr->hdr_lba_end; + basetable->gpt_entries = table->hdr->hdr_entries; for (index = basetable->gpt_entries - 1; index >= 0; index--) { if (EQUUID(&tbl[index].ent_type, &gpt_uuid_unused)) @@ -727,7 +752,7 @@ g_part_gpt_write(struct g_part_table *ba pp = cp->provider; table = (struct g_part_gpt_table *)basetable; - tlbsz = (table->hdr.hdr_entries * table->hdr.hdr_entsz + + tlbsz = (table->hdr->hdr_entries * table->hdr->hdr_entsz + pp->sectorsize - 1) / pp->sectorsize; /* Write the PMBR */ @@ -741,21 +766,21 @@ g_part_gpt_write(struct g_part_table *ba /* Allocate space for the header and entries. */ buf = g_malloc((tlbsz + 1) * pp->sectorsize, M_WAITOK | M_ZERO); - memcpy(buf, table->hdr.hdr_sig, sizeof(table->hdr.hdr_sig)); - le32enc(buf + 8, table->hdr.hdr_revision); - le32enc(buf + 12, table->hdr.hdr_size); - le64enc(buf + 40, table->hdr.hdr_lba_start); - le64enc(buf + 48, table->hdr.hdr_lba_end); - le_uuid_enc(buf + 56, &table->hdr.hdr_uuid); - le32enc(buf + 80, table->hdr.hdr_entries); - le32enc(buf + 84, table->hdr.hdr_entsz); + memcpy(buf, table->hdr->hdr_sig, sizeof(table->hdr->hdr_sig)); + le32enc(buf + 8, table->hdr->hdr_revision); + le32enc(buf + 12, table->hdr->hdr_size); + le64enc(buf + 40, table->hdr->hdr_lba_start); + le64enc(buf + 48, table->hdr->hdr_lba_end); + le_uuid_enc(buf + 56, &table->hdr->hdr_uuid); + le32enc(buf + 80, table->hdr->hdr_entries); + le32enc(buf + 84, table->hdr->hdr_entsz); LIST_FOREACH(baseentry, &basetable->gpt_entry, gpe_entry) { if (baseentry->gpe_deleted) continue; entry = (struct g_part_gpt_entry *)baseentry; index = baseentry->gpe_index - 1; - bp = buf + pp->sectorsize + table->hdr.hdr_entsz * index; + bp = buf + pp->sectorsize + table->hdr->hdr_entsz * index; le_uuid_enc(bp, &entry->ent.ent_type); le_uuid_enc(bp + 16, &entry->ent.ent_uuid); le64enc(bp + 32, entry->ent.ent_lba_start); @@ -766,7 +791,7 @@ g_part_gpt_write(struct g_part_table *ba } crc = crc32(buf + pp->sectorsize, - table->hdr.hdr_entries * table->hdr.hdr_entsz); + table->hdr->hdr_entries * table->hdr->hdr_entsz); le32enc(buf + 88, crc); /* Write primary meta-data. */ @@ -774,7 +799,7 @@ g_part_gpt_write(struct g_part_table *ba le64enc(buf + 24, table->lba[GPT_ELT_PRIHDR]); /* hdr_lba_self. */ le64enc(buf + 32, table->lba[GPT_ELT_SECHDR]); /* hdr_lba_alt. */ le64enc(buf + 72, table->lba[GPT_ELT_PRITBL]); /* hdr_lba_table. */ - crc = crc32(buf, table->hdr.hdr_size); + crc = crc32(buf, table->hdr->hdr_size); le32enc(buf + 16, crc); error = g_write_data(cp, table->lba[GPT_ELT_PRITBL] * pp->sectorsize, @@ -791,7 +816,7 @@ g_part_gpt_write(struct g_part_table *ba le64enc(buf + 24, table->lba[GPT_ELT_SECHDR]); /* hdr_lba_self. */ le64enc(buf + 32, table->lba[GPT_ELT_PRIHDR]); /* hdr_lba_alt. */ le64enc(buf + 72, table->lba[GPT_ELT_SECTBL]); /* hdr_lba_table. */ - crc = crc32(buf, table->hdr.hdr_size); + crc = crc32(buf, table->hdr->hdr_size); le32enc(buf + 16, crc); error = g_write_data(cp, table->lba[GPT_ELT_SECTBL] * pp->sectorsize, From owner-svn-src-all@FreeBSD.ORG Sat Nov 7 18:25:38 2009 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 8EA99106566B; Sat, 7 Nov 2009 18:25:38 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout030.mac.com (asmtpout030.mac.com [17.148.16.105]) by mx1.freebsd.org (Postfix) with ESMTP id 74A198FC13; Sat, 7 Nov 2009 18:25:38 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=us-ascii; format=flowed Received: from macbook-pro.lan.xcllnt.net (mail.xcllnt.net [75.101.29.67]) by asmtp030.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0KSR004234HT7A00@asmtp030.mac.com>; Sat, 07 Nov 2009 10:25:08 -0800 (PST) From: Marcel Moolenaar In-reply-to: <200911071729.nA7HT3Gn059027@svn.freebsd.org> Date: Sat, 07 Nov 2009 10:25:05 -0800 Message-id: <537B322D-426E-4876-94FF-902EE9E3826D@mac.com> References: <200911071729.nA7HT3Gn059027@svn.freebsd.org> To: Robert Noland X-Mailer: Apple Mail (2.1076) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r199017 - head/sys/geom/part 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, 07 Nov 2009 18:25:38 -0000 On Nov 7, 2009, at 9:29 AM, Robert Noland wrote: > Author: rnoland > Date: Sat Nov 7 17:29:03 2009 > New Revision: 199017 > URL: http://svn.freebsd.org/changeset/base/199017 > > Log: > Fix handling of GPT headers when size is > 92 bytes. Thanks! -- Marcel Moolenaar xcllnt@mac.com From owner-svn-src-all@FreeBSD.ORG Sat Nov 7 18:42:54 2009 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 876EA1065670; Sat, 7 Nov 2009 18:42:54 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 76D328FC08; Sat, 7 Nov 2009 18:42:54 +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 nA7Igsp0060382; Sat, 7 Nov 2009 18:42:54 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA7IgsNn060380; Sat, 7 Nov 2009 18:42:54 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200911071842.nA7IgsNn060380@svn.freebsd.org> From: Doug Barton Date: Sat, 7 Nov 2009 18:42:54 +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: r199018 - head/sys/dev/wpi 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, 07 Nov 2009 18:42:54 -0000 Author: dougb Date: Sat Nov 7 18:42:53 2009 New Revision: 199018 URL: http://svn.freebsd.org/changeset/base/199018 Log: Turn off WPI_DEBUG by default as the driver seems sufficiently stable at this point. Reviewed by: benjsc, thompsa Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sat Nov 7 17:29:03 2009 (r199017) +++ head/sys/dev/wpi/if_wpi.c Sat Nov 7 18:42:53 2009 (r199018) @@ -103,8 +103,6 @@ __FBSDID("$FreeBSD$"); #include #include -#define WPI_DEBUG - #ifdef WPI_DEBUG #define DPRINTF(x) do { if (wpi_debug != 0) printf x; } while (0) #define DPRINTFN(n, x) do { if (wpi_debug & n) printf x; } while (0) From owner-svn-src-all@FreeBSD.ORG Sat Nov 7 18:55:40 2009 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 1121E106568D; Sat, 7 Nov 2009 18:55:40 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0031D8FC12; Sat, 7 Nov 2009 18: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 nA7ItdH0060746; Sat, 7 Nov 2009 18:55:39 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA7Itd9b060744; Sat, 7 Nov 2009 18:55:39 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200911071855.nA7Itd9b060744@svn.freebsd.org> From: Doug Barton Date: Sat, 7 Nov 2009 18: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: r199019 - head/contrib/bind9/bin/dig 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, 07 Nov 2009 18:55:40 -0000 Author: dougb Date: Sat Nov 7 18:55:39 2009 New Revision: 199019 URL: http://svn.freebsd.org/changeset/base/199019 Log: Wrap some socket handling code in a !NULL bow This patch or something similar will likely be included in a future BIND release. PR: bin/138061 Submitted by: Michael Baker Original patch submitted by: Volker Patch reviewed and tweaked by: ISC Modified: head/contrib/bind9/bin/dig/dighost.c Modified: head/contrib/bind9/bin/dig/dighost.c ============================================================================== --- head/contrib/bind9/bin/dig/dighost.c Sat Nov 7 18:42:53 2009 (r199018) +++ head/contrib/bind9/bin/dig/dighost.c Sat Nov 7 18:55:39 2009 (r199019) @@ -2604,10 +2604,12 @@ connect_done(isc_task_t *task, isc_event if (sevent->result == ISC_R_CANCELED) { debug("in cancel handler"); - isc_socket_detach(&query->sock); - sockcount--; - INSIST(sockcount >= 0); - debug("sockcount=%d", sockcount); + if (query->sock != NULL) { + isc_socket_detach(&query->sock); + sockcount--; + INSIST(sockcount >= 0); + debug("sockcount=%d", sockcount); + } query->waiting_connect = ISC_FALSE; isc_event_free(&event); l = query->lookup; From owner-svn-src-all@FreeBSD.ORG Sat Nov 7 19:00:24 2009 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 136A8106568F; Sat, 7 Nov 2009 19:00:24 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id DCEE08FC15; Sat, 7 Nov 2009 19:00:23 +0000 (UTC) Received: from Macintosh-4.local ([10.0.0.198]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id nA7J0NPg087853 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 7 Nov 2009 11:00:23 -0800 (PST) (envelope-from sam@freebsd.org) Message-ID: <4AF5C3C7.1020806@freebsd.org> Date: Sat, 07 Nov 2009 11:00:23 -0800 From: Sam Leffler Organization: FreeBSD Project User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) MIME-Version: 1.0 To: Doug Barton References: <200911071842.nA7IgsNn060380@svn.freebsd.org> In-Reply-To: <200911071842.nA7IgsNn060380@svn.freebsd.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-DCC-x.dcc-servers-Metrics: ebb.errno.com; whitelist Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r199018 - head/sys/dev/wpi 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, 07 Nov 2009 19:00:24 -0000 Doug Barton wrote: > Author: dougb > Date: Sat Nov 7 18:42:53 2009 > New Revision: 199018 > URL: http://svn.freebsd.org/changeset/base/199018 > > Log: > Turn off WPI_DEBUG by default as the driver seems sufficiently stable > at this point. > > Reviewed by: benjsc, thompsa > > Modified: > head/sys/dev/wpi/if_wpi.c > > Modified: head/sys/dev/wpi/if_wpi.c > ============================================================================== > --- head/sys/dev/wpi/if_wpi.c Sat Nov 7 17:29:03 2009 (r199017) > +++ head/sys/dev/wpi/if_wpi.c Sat Nov 7 18:42:53 2009 (r199018) > @@ -103,8 +103,6 @@ __FBSDID("$FreeBSD$"); > #include > #include > > -#define WPI_DEBUG > - > #ifdef WPI_DEBUG > #define DPRINTF(x) do { if (wpi_debug != 0) printf x; } while (0) > #define DPRINTFN(n, x) do { if (wpi_debug & n) printf x; } while (0) > > The right thing to do is to set wpi_debug to 0 and leave the messages compiled in. Sam From owner-svn-src-all@FreeBSD.ORG Sat Nov 7 20:37:39 2009 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 5CD121065670; Sat, 7 Nov 2009 20:37:39 +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 4BE678FC18; Sat, 7 Nov 2009 20:37: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 nA7KbcP0062582; Sat, 7 Nov 2009 20:37:38 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA7KbcWH062580; Sat, 7 Nov 2009 20:37:38 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200911072037.nA7KbcWH062580@svn.freebsd.org> From: Pyun YongHyeon Date: Sat, 7 Nov 2009 20:37: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: r199020 - 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: Sat, 07 Nov 2009 20:37:39 -0000 Author: yongari Date: Sat Nov 7 20:37:38 2009 New Revision: 199020 URL: http://svn.freebsd.org/changeset/base/199020 Log: Tell upper layer we support long frames. ether_ifattach() initializes it to ETHER_HDR_LEN so we have to override it after calling ether_ifattch(). While I'm here remove setting if_mtu value, it's initialized in ether_ifattach(). Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Sat Nov 7 18:55:39 2009 (r199019) +++ head/sys/dev/bge/if_bge.c Sat Nov 7 20:37:38 2009 (r199020) @@ -2723,7 +2723,6 @@ bge_attach(device_t dev) ifp->if_ioctl = bge_ioctl; ifp->if_start = bge_start; ifp->if_init = bge_init; - ifp->if_mtu = ETHERMTU; ifp->if_snd.ifq_drv_maxlen = BGE_TX_RING_CNT - 1; IFQ_SET_MAXLEN(&ifp->if_snd, ifp->if_snd.ifq_drv_maxlen); IFQ_SET_READY(&ifp->if_snd); @@ -2838,6 +2837,9 @@ again: ether_ifattach(ifp, eaddr); callout_init_mtx(&sc->bge_stat_ch, &sc->bge_mtx, 0); + /* Tell upper layer we support long frames. */ + ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header); + /* * Hookup IRQ last. */ From owner-svn-src-all@FreeBSD.ORG Sat Nov 7 20:52:06 2009 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 6FA1A1065697 for ; Sat, 7 Nov 2009 20:52:06 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id F12228FC29 for ; Sat, 7 Nov 2009 20:52:05 +0000 (UTC) Received: (qmail 9658 invoked by uid 399); 7 Nov 2009 20:52:04 -0000 Received: from localhost (HELO foreign.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 7 Nov 2009 20:52:04 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4AF5DDFB.10107@FreeBSD.org> Date: Sat, 07 Nov 2009 12:52:11 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Thunderbird 2.0.0.23 (X11/20090822) MIME-Version: 1.0 To: Sam Leffler References: <200911071842.nA7IgsNn060380@svn.freebsd.org> <4AF5C3C7.1020806@freebsd.org> In-Reply-To: <4AF5C3C7.1020806@freebsd.org> X-Enigmail-Version: 0.96.0 OpenPGP: id=D5B2F0FB 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: r199018 - head/sys/dev/wpi 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, 07 Nov 2009 20:52:06 -0000 Sam Leffler wrote: > The right thing to do is to set wpi_debug to 0 and leave the messages > compiled in. Well as you can see from the diff I did leave the messages in the source so that anyone who wants to enable debugging again can just define WPI_DEBUG at build time to get it. However defining WPI_DEBUG to 0 resulted in the debug messages being printed on the console again so if I'm understanding what you're suggesting correctly it seems that it would require a lot more changes in the code to accomplish. (I did see other examples of what I think you're suggesting in sys/ but this driver doesn't seem to have that support.) If I'm not understanding something or you have a better solution feel free to implement it. My goal was just to get a less noisy console at boot time. Doug -- Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Sat Nov 7 21:02:41 2009 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 360BD106566B; Sat, 7 Nov 2009 21:02:41 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0BFDE8FC0C; Sat, 7 Nov 2009 21:02: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 nA7L2ebF063174; Sat, 7 Nov 2009 21:02:40 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA7L2e6H063173; Sat, 7 Nov 2009 21:02:40 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200911072102.nA7L2e6H063173@svn.freebsd.org> From: Doug Barton Date: Sat, 7 Nov 2009 21:02: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: r199021 - head/games/fortune/datfiles 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, 07 Nov 2009 21:02:41 -0000 Author: dougb Date: Sat Nov 7 21:02:40 2009 New Revision: 199021 URL: http://svn.freebsd.org/changeset/base/199021 Log: Remove the svn:executable property from this file Modified: Directory Properties: head/games/fortune/datfiles/gerrold.limerick (props changed) From owner-svn-src-all@FreeBSD.ORG Sat Nov 7 21:10:50 2009 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 1E41B106568B; Sat, 7 Nov 2009 21:10:50 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0C7488FC18; Sat, 7 Nov 2009 21:10: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 nA7LAnnD063413; Sat, 7 Nov 2009 21:10:49 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA7LAmwD063409; Sat, 7 Nov 2009 21:10:48 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200911072110.nA7LAmwD063409@svn.freebsd.org> From: Doug Barton Date: Sat, 7 Nov 2009 21:10:48 +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: r199022 - stable/8/games/fortune/datfiles 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, 07 Nov 2009 21:10:50 -0000 Author: dougb Date: Sat Nov 7 21:10:48 2009 New Revision: 199022 URL: http://svn.freebsd.org/changeset/base/199022 Log: MFC r197797: s/Putluck Pogo/Potluck Pogo/ MFC r198921: Grammar/formatting fix MFC 199021: Remove svn:executable from datfiles/gerrold.limerick Modified: stable/8/games/fortune/datfiles/fortunes stable/8/games/fortune/datfiles/fortunes.sp.ok Directory Properties: stable/8/games/fortune/ (props changed) stable/8/games/fortune/datfiles/ (props changed) stable/8/games/fortune/datfiles/gerrold.limerick (props changed) Modified: stable/8/games/fortune/datfiles/fortunes ============================================================================== --- stable/8/games/fortune/datfiles/fortunes Sat Nov 7 21:02:40 2009 (r199021) +++ stable/8/games/fortune/datfiles/fortunes Sat Nov 7 21:10:48 2009 (r199022) @@ -18126,7 +18126,7 @@ tail on me, go ahead. They'd be very bo commenting on rumors of womanizing. % Food for thought is no substitute for the real thing. - -- Walt Kelly, "Putluck Pogo" + -- Walt Kelly, "Potluck Pogo" % Foolproof Operation: No provision for adjustment. @@ -25228,7 +25228,8 @@ them scream. -- Sylvestre Matuschka, "the Hungarian Train Wreck Freak", escaped prison 1937, not heard from since % -Iam +I +am not very happy Modified: stable/8/games/fortune/datfiles/fortunes.sp.ok ============================================================================== --- stable/8/games/fortune/datfiles/fortunes.sp.ok Sat Nov 7 21:02:40 2009 (r199021) +++ stable/8/games/fortune/datfiles/fortunes.sp.ok Sat Nov 7 21:10:48 2009 (r199022) @@ -3300,6 +3300,7 @@ postjudice Postnews Postpetroleum potholes +Potluck potty Poul Pournelle @@ -3376,7 +3377,6 @@ Purshottam PUSHes pushy pussycats -Putluck Putt's PVLC PxP From owner-svn-src-all@FreeBSD.ORG Sat Nov 7 21:21:33 2009 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 6603B106566C; Sat, 7 Nov 2009 21:21:33 +0000 (UTC) (envelope-from cvs-src@yandex.ru) Received: from forward11.yandex.ru (forward11.yandex.ru [95.108.130.93]) by mx1.freebsd.org (Postfix) with ESMTP id 096148FC0A; Sat, 7 Nov 2009 21:21:32 +0000 (UTC) Received: from smtp13.yandex.ru (smtp13.yandex.ru [95.108.130.68]) by forward11.yandex.ru (Yandex) with ESMTP id F2FD8F48787; Sun, 8 Nov 2009 00:05:54 +0300 (MSK) Received: from smeshariki.local (unknown [77.66.147.84]) by smtp13.yandex.ru (Yandex) with ESMTPSA id C811B322007D; Sun, 8 Nov 2009 00:05:54 +0300 (MSK) Message-ID: <4AF5E0DE.2020403@yandex.ru> Date: Sun, 08 Nov 2009 00:04:30 +0300 From: "R.Mahmatkhanov" User-Agent: Thunderbird 2.0.0.23 (X11/20090908) MIME-Version: 1.0 To: John Baldwin References: <200911062007.nA6K7GJ1027261@svn.freebsd.org> In-Reply-To: <200911062007.nA6K7GJ1027261@svn.freebsd.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Yandex-TimeMark: 1257627954 X-Yandex-Spam: 1 X-Yandex-Front: smtp13.yandex.ru Cc: svn-src-all@freebsd.org Subject: Re: svn commit: r198999 - head/sys/dev/msk 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, 07 Nov 2009 21:21:33 -0000 John Baldwin пишет: > Author: jhb > Date: Fri Nov 6 20:07:16 2009 > New Revision: 198999 > URL: http://svn.freebsd.org/changeset/base/198999 > > Log: > Take a step towards removing if_watchdog/if_timer. Don't explicitly set > if_watchdog/if_timer to NULL/0 when initializing an ifnet. if_alloc() > sets those members to NULL/0 already. > How about if_bfe? I've getting warnings "...using obsoleted watchdog interface". From owner-svn-src-all@FreeBSD.ORG Sat Nov 7 21:28:23 2009 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 AA740106566B; Sat, 7 Nov 2009 21:28:23 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7F9388FC1B; Sat, 7 Nov 2009 21:28: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 nA7LSN1L063803; Sat, 7 Nov 2009 21:28:23 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA7LSLYX063800; Sat, 7 Nov 2009 21:28:21 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200911072128.nA7LSLYX063800@svn.freebsd.org> From: Doug Barton Date: Sat, 7 Nov 2009 21:28: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: r199023 - head/games/fortune/datfiles 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, 07 Nov 2009 21:28:23 -0000 Author: dougb Date: Sat Nov 7 21:28:21 2009 New Revision: 199023 URL: http://svn.freebsd.org/changeset/base/199023 Log: Move Warner's very funny comparison of VCS to anal sex into fortunes-o Modified: head/games/fortune/datfiles/fortunes head/games/fortune/datfiles/fortunes-o.real Modified: head/games/fortune/datfiles/fortunes ============================================================================== --- head/games/fortune/datfiles/fortunes Sat Nov 7 21:10:48 2009 (r199022) +++ head/games/fortune/datfiles/fortunes Sat Nov 7 21:28:21 2009 (r199023) @@ -2516,12 +2516,6 @@ other people to screw things up when you yourself for far less money. This article can help you. -- Dave Barry, "The Taming of the Screw" % - I'd say that VCS is more like the anal sex of the software -world: Everybody talks about it, some people do it, some people enjoy -it, but typically only vague implications about the best techniques -are ever voiced in public. - -- Warner Losh, on Version Control Systems -% "I'll tell you what I know, then," he decided. "The pin I'm wearing means I'm a member of the IA. That's Inamorati Anonymous. An inamorato is somebody in love. That's the worst addiction of all." Modified: head/games/fortune/datfiles/fortunes-o.real ============================================================================== --- head/games/fortune/datfiles/fortunes-o.real Sat Nov 7 21:10:48 2009 (r199022) +++ head/games/fortune/datfiles/fortunes-o.real Sat Nov 7 21:28:21 2009 (r199023) @@ -1153,6 +1153,12 @@ and stuck it in my back." "Gabriel's trumpet will produce you from the ass of a pig." -- Al Swearingen, E. B. Farnum, _Deadwood_ % + I'd say that VCS is more like the anal sex of the software +world: Everybody talks about it, some people do it, some people enjoy +it, but typically only vague implications about the best techniques +are ever voiced in public. + -- Warner Losh, on Version Control Systems +% "I'll tell ya, Jeb," Wilbur said to his friend, "the tractor business ain't doin' too well. I ain't sold one all month. "You think you've got problems?" Jeb replied. "The other day, I went From owner-svn-src-all@FreeBSD.ORG Sat Nov 7 21:46:34 2009 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 913DD1065670; Sat, 7 Nov 2009 21:46:34 +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 7FF338FC0C; Sat, 7 Nov 2009 21:46: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 nA7LkYR3064302; Sat, 7 Nov 2009 21:46:34 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA7LkYAr064300; Sat, 7 Nov 2009 21:46:34 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <200911072146.nA7LkYAr064300@svn.freebsd.org> From: Attilio Rao Date: Sat, 7 Nov 2009 21:46: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: r199024 - head/usr.bin/kdump 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, 07 Nov 2009 21:46:34 -0000 Author: attilio Date: Sat Nov 7 21:46:34 2009 New Revision: 199024 URL: http://svn.freebsd.org/changeset/base/199024 Log: Use a safety belt for cases where corrupted narg can be passed to the ktrsyscall(). print_number() does decrement the number of arguments, leading to infinite loops for negative values. Reported by: Patrick Lamaiziere , Jonathan Pascal Submitted by: jh PR: bin/120055, kern/119564 MFC: 1 week Modified: head/usr.bin/kdump/kdump.c Modified: head/usr.bin/kdump/kdump.c ============================================================================== --- head/usr.bin/kdump/kdump.c Sat Nov 7 21:28:21 2009 (r199023) +++ head/usr.bin/kdump/kdump.c Sat Nov 7 21:46:34 2009 (r199024) @@ -799,7 +799,7 @@ ktrsyscall(struct ktr_syscall *ktr) narg--; } } - while (narg) { + while (narg > 0) { print_number(ip,narg,c); } (void)putchar(')'); From owner-svn-src-all@FreeBSD.ORG Sat Nov 7 22:13:32 2009 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 04EA71065679; Sat, 7 Nov 2009 22:13:32 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DD2A48FC0C; Sat, 7 Nov 2009 22: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 nA7MDV9c064991; Sat, 7 Nov 2009 22:13:31 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA7MDU4W064988; Sat, 7 Nov 2009 22:13:30 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200911072213.nA7MDU4W064988@svn.freebsd.org> From: Doug Barton Date: Sat, 7 Nov 2009 22:13: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: r199025 - head/games/fortune/datfiles 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, 07 Nov 2009 22:13:32 -0000 Author: dougb Date: Sat Nov 7 22:13:29 2009 New Revision: 199025 URL: http://svn.freebsd.org/changeset/base/199025 Log: Properly sort a math fortune after the changes in r193486 Properly sort fortunes added in r174879 and r174959 Modified: head/games/fortune/datfiles/fortunes Modified: head/games/fortune/datfiles/fortunes ============================================================================== --- head/games/fortune/datfiles/fortunes Sat Nov 7 21:46:34 2009 (r199024) +++ head/games/fortune/datfiles/fortunes Sat Nov 7 22:13:29 2009 (r199025) @@ -69,6 +69,17 @@ either. If you need some help, give us -- CommUNIXque 1:1, ASCAR Business Systems % + 1/2 + 12 + 144 + 20 + 3*4 2 + ---------------------- + 5 * 11 = 9 + 0 + 7 + +A dozen, a gross and a score, +Plus three times the square root of four, + Divided by seven, + Plus five times eleven, +Equals nine squared plus zero, no more! +% -- Gifts for Children -- This is easy. You never have to figure out what to get for children, @@ -674,17 +685,6 @@ Liza Minnelli. % ... with liberty and justice for all who can afford it. % - 1/2 - 12 + 144 + 20 + 3*4 2 - ---------------------- + 5 * 11 = 9 + 0 - 7 - -A dozen, a gross and a score, -Plus three times the square root of four, - Divided by seven, - Plus five times eleven, -Equals nine squared plus zero, no more! -% 7,140 pounds on the Sun 97 pounds on Mercury or Mars 255 pounds on Earth @@ -33065,6 +33065,10 @@ versions of songs from The Wizard of Oz. % May a Misguided Platypus lay its Eggs in your Jockey Shorts % +May all your Emus lay soft boiled eggs, and may all your +Kangaroos be born with iPods already fitted. + -- Aussie New Years wish, found on hasselbladinfo.com +% May all your PUSHes be POPped. % May Euell Gibbons eat your only copy of the manual! @@ -59764,6 +59768,17 @@ You've been telling me to relax all the and now you're telling me just to be myself? -- The Return of the Secaucus Seven % +You've decked the halls with a dozen miles' length of electric lights. +Your front lawn is a gleaming testament of incandescent wonder. The neighbors +wear sunglasses 24/7, and orbiting satellites have officially picked up +and pinpointed your house as the brightest spot on earth. + +You've finally put together the Christmas wonderland of your dreams... now +if only you could get a good picture of it. + +Photographing holiday lights is no easy task. + -- from an email sent by photojojo.com +% You've got to have a gimmick if your band sucks. -- Gary Giddens % @@ -59804,18 +59819,3 @@ since I first called my brother's father Zymurgy's Law of Volunteer Labor: People are always available for work in the past tense. % -You've decked the halls with a dozen miles' length of electric lights. -Your front lawn is a gleaming testament of incandescent wonder. The neighbors -wear sunglasses 24/7, and orbiting satellites have officially picked up -and pinpointed your house as the brightest spot on earth. - -You've finally put together the Christmas wonderland of your dreams... now -if only you could get a good picture of it. - -Photographing holiday lights is no easy task. - -- from an email sent by photojojo.com -% -May all your Emus lay soft boiled eggs, and may all your -Kangaroos be born with iPods already fitted. - -- Aussie New Years wish, found on hasselbladinfo.com -% From owner-svn-src-all@FreeBSD.ORG Sat Nov 7 22:27:36 2009 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 00EC31065670; Sat, 7 Nov 2009 22:27:36 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E28CD8FC17; Sat, 7 Nov 2009 22:27: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 nA7MRZ60065431; Sat, 7 Nov 2009 22:27:35 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA7MRYpK065428; Sat, 7 Nov 2009 22:27:34 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200911072227.nA7MRYpK065428@svn.freebsd.org> From: Doug Barton Date: Sat, 7 Nov 2009 22:27: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: r199026 - stable/8/games/fortune/datfiles 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, 07 Nov 2009 22:27:36 -0000 Author: dougb Date: Sat Nov 7 22:27:34 2009 New Revision: 199026 URL: http://svn.freebsd.org/changeset/base/199026 Log: MFC r199023: Move VCS fortune to fortunes-o MFC 199025: Sort fortune Modified: stable/8/games/fortune/datfiles/fortunes stable/8/games/fortune/datfiles/fortunes-o.real Directory Properties: stable/8/games/fortune/ (props changed) stable/8/games/fortune/datfiles/ (props changed) Modified: stable/8/games/fortune/datfiles/fortunes ============================================================================== --- stable/8/games/fortune/datfiles/fortunes Sat Nov 7 22:13:29 2009 (r199025) +++ stable/8/games/fortune/datfiles/fortunes Sat Nov 7 22:27:34 2009 (r199026) @@ -69,6 +69,17 @@ either. If you need some help, give us -- CommUNIXque 1:1, ASCAR Business Systems % + 1/2 + 12 + 144 + 20 + 3*4 2 + ---------------------- + 5 * 11 = 9 + 0 + 7 + +A dozen, a gross and a score, +Plus three times the square root of four, + Divided by seven, + Plus five times eleven, +Equals nine squared plus zero, no more! +% -- Gifts for Children -- This is easy. You never have to figure out what to get for children, @@ -674,17 +685,6 @@ Liza Minnelli. % ... with liberty and justice for all who can afford it. % - 1/2 - 12 + 144 + 20 + 3*4 2 - ---------------------- + 5 * 11 = 9 + 0 - 7 - -A dozen, a gross and a score, -Plus three times the square root of four, - Divided by seven, - Plus five times eleven, -Equals nine squared plus zero, no more! -% 7,140 pounds on the Sun 97 pounds on Mercury or Mars 255 pounds on Earth @@ -2516,12 +2516,6 @@ other people to screw things up when you yourself for far less money. This article can help you. -- Dave Barry, "The Taming of the Screw" % - I'd say that VCS is more like the anal sex of the software -world: Everybody talks about it, some people do it, some people enjoy -it, but typically only vague implications about the best techniques -are ever voiced in public. - -- Warner Losh, on Version Control Systems -% "I'll tell you what I know, then," he decided. "The pin I'm wearing means I'm a member of the IA. That's Inamorati Anonymous. An inamorato is somebody in love. That's the worst addiction of all." @@ -33071,6 +33065,10 @@ versions of songs from The Wizard of Oz. % May a Misguided Platypus lay its Eggs in your Jockey Shorts % +May all your Emus lay soft boiled eggs, and may all your +Kangaroos be born with iPods already fitted. + -- Aussie New Years wish, found on hasselbladinfo.com +% May all your PUSHes be POPped. % May Euell Gibbons eat your only copy of the manual! @@ -59770,6 +59768,17 @@ You've been telling me to relax all the and now you're telling me just to be myself? -- The Return of the Secaucus Seven % +You've decked the halls with a dozen miles' length of electric lights. +Your front lawn is a gleaming testament of incandescent wonder. The neighbors +wear sunglasses 24/7, and orbiting satellites have officially picked up +and pinpointed your house as the brightest spot on earth. + +You've finally put together the Christmas wonderland of your dreams... now +if only you could get a good picture of it. + +Photographing holiday lights is no easy task. + -- from an email sent by photojojo.com +% You've got to have a gimmick if your band sucks. -- Gary Giddens % @@ -59810,18 +59819,3 @@ since I first called my brother's father Zymurgy's Law of Volunteer Labor: People are always available for work in the past tense. % -You've decked the halls with a dozen miles' length of electric lights. -Your front lawn is a gleaming testament of incandescent wonder. The neighbors -wear sunglasses 24/7, and orbiting satellites have officially picked up -and pinpointed your house as the brightest spot on earth. - -You've finally put together the Christmas wonderland of your dreams... now -if only you could get a good picture of it. - -Photographing holiday lights is no easy task. - -- from an email sent by photojojo.com -% -May all your Emus lay soft boiled eggs, and may all your -Kangaroos be born with iPods already fitted. - -- Aussie New Years wish, found on hasselbladinfo.com -% Modified: stable/8/games/fortune/datfiles/fortunes-o.real ============================================================================== --- stable/8/games/fortune/datfiles/fortunes-o.real Sat Nov 7 22:13:29 2009 (r199025) +++ stable/8/games/fortune/datfiles/fortunes-o.real Sat Nov 7 22:27:34 2009 (r199026) @@ -1153,6 +1153,12 @@ and stuck it in my back." "Gabriel's trumpet will produce you from the ass of a pig." -- Al Swearingen, E. B. Farnum, _Deadwood_ % + I'd say that VCS is more like the anal sex of the software +world: Everybody talks about it, some people do it, some people enjoy +it, but typically only vague implications about the best techniques +are ever voiced in public. + -- Warner Losh, on Version Control Systems +% "I'll tell ya, Jeb," Wilbur said to his friend, "the tractor business ain't doin' too well. I ain't sold one all month. "You think you've got problems?" Jeb replied. "The other day, I went From owner-svn-src-all@FreeBSD.ORG Sat Nov 7 22:40:15 2009 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 49EDA106566B; Sat, 7 Nov 2009 22:40:15 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3607A8FC13; Sat, 7 Nov 2009 22:40: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 nA7MeErM065694; Sat, 7 Nov 2009 22:40:14 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA7MeDDU065687; Sat, 7 Nov 2009 22:40:13 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200911072240.nA7MeDDU065687@svn.freebsd.org> From: Doug Barton Date: Sat, 7 Nov 2009 22:40:13 +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: r199027 - stable/7/games/fortune/datfiles 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, 07 Nov 2009 22:40:15 -0000 Author: dougb Date: Sat Nov 7 22:40:13 2009 New Revision: 199027 URL: http://svn.freebsd.org/changeset/base/199027 Log: Mass MFC of older commits to bring these files up to date with HEAD: r174581, r174597, r174897, r175017, r175129, r175213, r176638, r176639, r176764, r177781, r177879, r178604, r178605, r178662, r179960, r179987, r180286, r180341, r181207, r183691, r183707, r189448 MFC r197797: s/Putluck Pogo/Potluck Pogo/ MFC r198921: Grammar/formatting fix MFC 199021: Remove svn:executable from datfiles/gerrold.limerick MFC r199023: Move VCS fortune to fortunes-o MFC 199025: Sort fortune Modified: stable/7/games/fortune/datfiles/fortunes stable/7/games/fortune/datfiles/fortunes-o.real stable/7/games/fortune/datfiles/fortunes.sp.ok stable/7/games/fortune/datfiles/gerrold.limerick (contents, props changed) stable/7/games/fortune/datfiles/limerick Directory Properties: stable/7/games/fortune/ (props changed) stable/7/games/fortune/datfiles/ (props changed) stable/7/games/fortune/datfiles/freebsd-tips (props changed) Modified: stable/7/games/fortune/datfiles/fortunes ============================================================================== --- stable/7/games/fortune/datfiles/fortunes Sat Nov 7 22:27:34 2009 (r199026) +++ stable/7/games/fortune/datfiles/fortunes Sat Nov 7 22:40:13 2009 (r199027) @@ -69,6 +69,17 @@ either. If you need some help, give us -- CommUNIXque 1:1, ASCAR Business Systems % + 1/2 + 12 + 144 + 20 + 3*4 2 + ---------------------- + 5 * 11 = 9 + 0 + 7 + +A dozen, a gross and a score, +Plus three times the square root of four, + Divided by seven, + Plus five times eleven, +Equals nine squared plus zero, no more! +% -- Gifts for Children -- This is easy. You never have to figure out what to get for children, @@ -674,17 +685,6 @@ Liza Minnelli. % ... with liberty and justice for all who can afford it. % - 1/2 - 12 + 144 + 20 + 3*4 2 - ---------------------- + 5 * 11 = 9 + 0 - 7 - -A dozen, a gross and a score, -Plus three times the square root of four, - Divided by seven, - Plus five times eleven, -Equals nine squared plus zero, no more! -% 7,140 pounds on the Sun 97 pounds on Mercury or Mars 255 pounds on Earth @@ -2605,7 +2605,7 @@ man. Mud-as-man alone could speak. "Certainly," said man. "Then I leave it to you to think of one for all of this," said God. And He went away. - -- Kurt Vonnegut, Between Time and Timbuktu" + -- Kurt Vonnegut, "Between Time and Timbuktu" % In the beginning there was data. The data was without form and null, and darkness was upon the face of the console; and the Spirit of @@ -10544,6 +10544,10 @@ Another day, another dollar. upon Hinckley's acquittal for shooting President Ronald Reagan. % +Another flaw in the human character is that everybody wants to build +and nobody wants to do maintenance. + -- Kurt Vonnegut, "Hocus Pocus" +% Another good night not to sleep in a eucalyptus tree. % Another megabytes the dust. @@ -11478,6 +11482,14 @@ As you will see, I told them, in no unce % As Zeus said to Narcissus, "Watch yourself." % +Ascend to the high mountain pass, +Cross the shallow side of the wide ocean. +Do not give up to the great distance: +It's by going that you will reach your aim. +Be not discouraged by human frailty: +You will overcome it if you try to. + -- Chinggis (Genghis) Khan +% ASCII: The control code for all beginning programmers and those who would become computer literate. Etymologically, the term has come down as @@ -13301,6 +13313,10 @@ were not hard, and money not scarce? Can anything be sadder than work left unfinished? Yes, work never begun. % +"Can you be more stupid than aggravating the judge AND your lawyer? +No? Oh yes you can: You can aggravate the whole kernel community." + -- Alexander Lyamin (about Hans Reisers murder trial) +% Can you buy friendship? You not only can, you must. It's the only way to obtain friends. Everything worthwhile has a price. -- Robert J. Ringer @@ -14234,6 +14250,12 @@ Computers are useless. They can only gi Computers can figure out all kinds of problems, except the things in the world that just don't add up. % +Computers can't cruise. Meandering is a foreign concept to them. +The computer assumes that all behavior is in pursuit of an ultimate +goal. Whenever a motorist changes his or her mind and veers off +course, the GPS lady issues that snippy announcement: "Recalculating!" + -- Joel Achenbach (www.slate.com, 20 Jun 2008) +% Computers don't actually think. You just think they think. (We think.) @@ -15974,6 +15996,9 @@ Don't marry for money; you can borrow it % Don't mind him; politicians always sound like that. % +Don't patch bad code -- rewrite it. + -- "The Elements of Programming Style", Kernighan and Plauger +% Don't plan any hasty moves. You'll be evicted soon anyway. % @@ -18095,7 +18120,7 @@ tail on me, go ahead. They'd be very bo commenting on rumors of womanizing. % Food for thought is no substitute for the real thing. - -- Walt Kelly, "Putluck Pogo" + -- Walt Kelly, "Potluck Pogo" % Foolproof Operation: No provision for adjustment. @@ -19475,20 +19500,6 @@ engaging a suitable stereotype protagoni president, political party, etc.) to consummate the act of social schizophrenia in mass genocide. % -From dusk till dawn -I gathered people and their crown -Conquered the hearts of -Not too few -United the heads of -Now too humble. -When weaken your mind -Don?t get weakened -When tired of thinking -Don?t get tired -My sons and descendants -Don?t get exhausted in mind and thought and but get experienced. - -- Chinggis (Genghis) Khan -% From Italian tourist guide: "Non stop trains to Roma Termini Station leave from 7.38 @@ -22722,6 +22733,10 @@ steer clear of me at parties. Often, as they don't even invite me. -- Dave Barry % +I asked a teacher what the opposite of a miracle was and she, without +thinking, I assume, said it was an act of God. + -- Terry Prachett (Daily Mail 21 june 2008) +% I asked the engineer who designed the communication terminal's keyboards why these were not manufactured in a central facility, in view of the small number needed [1 per month] in his factory. He explained that this @@ -23934,6 +23949,9 @@ I like myself, but I won't say I'm as ha that kidnaped Europa. -- Marcus Tullius Cicero % +I like paying taxes. With them I buy civilization. + -- Oliver Wendell Holmes +% I like to believe that people in the long run are going to do more to promote peace than our governments. Indeed, I think that people want peace so much that one of these days governments had better get out of @@ -25207,7 +25225,8 @@ them scream. -- Sylvestre Matuschka, "the Hungarian Train Wreck Freak", escaped prison 1937, not heard from since % -Iam +I +am not very happy @@ -26017,16 +26036,6 @@ If Karl, instead of writing a lot about had made a lot of Capital, it would have been much better. -- Karl Marx's Mother % -If Khaan behaves as serfs -Lose entire states and all estates. -If serfs behave as Khaan -He will regret for his head. -In time of friendship and harmony -Befriend as closely -In time of conflict with enemies -Be falcon of advance and attacks - -- Chinggis (Genghis) Khan -% If life gives you lemons, make lemonade. % If life is a stage, I want some better lighting. @@ -26576,6 +26585,9 @@ theirs, then you clearly don't understan % If you can lead it to water and force it to drink, it isn't a horse. % +If you can not say it, you can not whistle it, either. + -- Wittgenstein +% If you can read this, you're too close. % If you can survive death, you can probably survive anything. @@ -27145,6 +27157,15 @@ I guess you do have a problem. % If your life was a horse, you'd have to shoot it. % +If your mind grows weak, +Don't yield to the weakness. +Even if tired of thought, +Never stop thinking. +My sons and descendants, +Don't get exhausted in reason-- +But become experienced. + -- Chinggis (Genghis) Khan +% If your mother knew what you're doing, she'd probably hang her head and cry. % @@ -28096,6 +28117,10 @@ _s_e_e the high-water mark -- the pla rolled back. -- Hunter S. Thompson, "Fear and Loathing in Las Vegas" % +"In the age of the internet attaching a famous name to your personal +opinion to give more weight to it is a very valid strategy." + -- Benjamin Franklin +% In the beginning there was nothing. And the Lord said "Let There Be Light!" And still there was nothing, but at least now you could see it. % @@ -28245,6 +28270,12 @@ different kinds of weather inside of 24 % In the stairway of life, you'd best take the elevator. % +In the time of peace and harmony +Be a kind-hearted friend. +In the time of conflict with enemies +Be a falcon of advance and attack. + -- Chinggis (Genghis) Khan +% In the Top 40, half the songs are secret messages to the teen world to drop out, turn on, and groove with the chemicals and light shows at discotheques. -- Art Linkletter @@ -29420,15 +29451,6 @@ they'll come out for it. -- Red Skelton, surveying the funeral of Hollywood mogul Harry Cohn % - -It ruins mind -It exhausts wealth -When it reaches to the tongue -It is like a mosquito -When it relives from tongue -It is like an elephant. - -- Boorchi (first of 9 knights of Chinggis (Genghis) Khan) -% It runs like _x, where _x is something unsavory. -- Prof. Romas Aleliunas, CS 435 % @@ -31219,11 +31241,10 @@ for Loeb, George came back to the fold, around his neck. -- Dave Barry % - -Let my petty body exhausted, -But not my state nature. -Let my whole body exhausted -But not my entire state +Let my own body be exhausted, +But not the wealth of my state. +Let my mortal body vanish, +But not the power of my state. -- Chinggis (Genghis) Khan % Let no guilty man escape. @@ -31238,7 +31259,7 @@ Let sleeping dogs lie. -- Charles Dickens % Let the machine do the dirty work. - -- "Elements of Programming Style", Kernighan and Ritchie + -- "The Elements of Programming Style", Kernighan and Plauger % Let the meek inherit the earth -- they have it coming to them. -- James Thurber @@ -33047,6 +33068,10 @@ versions of songs from The Wizard of Oz. % May a Misguided Platypus lay its Eggs in your Jockey Shorts % +May all your Emus lay soft boiled eggs, and may all your +Kangaroos be born with iPods already fitted. + -- Aussie New Years wish, found on hasselbladinfo.com +% May all your PUSHes be POPped. % May Euell Gibbons eat your only copy of the manual! @@ -34277,6 +34302,11 @@ My own dear love, he is all my world -- And I wish I'd never met him. -- Dorothy Parker, part 1 % +My own feelings are perhaps best described by saying that I am +perfectly aware that there is no Royal Road to Mathematics, in other +words, that I have only a very small head and must live with it. + -- Edsger W. Dijkstra +% My own life has been spent chronicling the rise and fall of human systems, and I am convinced that we are terribly vulnerable. ... We should be reluctant to turn back upon the frontier of this epoch. Space is indifferent @@ -43297,14 +43327,6 @@ the "Gaslight" treatment, the "Are you t implication. Advance to manipulation and humiliation. Above all, relax and have a nice day. % -Strive to the pass of high mountain -Cross in the shallow side of the wide ocean -Do not give up because of distance -Will certainly reach if walks -Do not discourage of human -Shall overcome if you try - -- Chinggis (Genghis) Khan -% Stuckness shouldn't be avoided. It's the psychic predecessor of all real understanding. An egoless acceptance of stuckness is a key to an understanding of all Quality, in mechanical work as in other endeavors. @@ -43827,10 +43849,10 @@ Technological progress has merely provid with more efficient means for going backwards. -- Aldous Huxley % -Teeth for meat is in mouth -Teeth for human is in soul. -Win one with your body strength -Win many with your mind strength +Teeth for meat are in the mouth -- +Teeth for humans are in the soul. +A strong body defeats one, +A strong soul conquers many. -- Chinggis (Genghis) Khan % Tehee quod she, and clapte the wyndow to. @@ -45337,6 +45359,9 @@ endow them with any special qualities of compassion. -- Saul Alinsky % +The fall of the USSR proves you wrong. + -- Aryeh M. Friedman +% The famous politician was trying to save both his faces. % The farther you go, the less you know. @@ -49231,7 +49256,7 @@ round in the worst cars available," he s admit it, I tell him, `Forget it'. If they bring a car back late we overlook it. If they've had a crash and it doesn't involve another vehicle we might overlook that too." - "Where's the ashtray?" asked on Los Angeles wife, as she settled + "Where's the ashtray?" asked one Los Angeles wife, as she settled into the ripped interior. "Honey," said her husband, "the whole car's the ash tray." -- Stephen Pile, "The Book of Heroic Failures" @@ -50777,6 +50802,14 @@ Things are more like they used to be tha Things are not always what they seem. -- Phaedrus % +Things Charles Darwin did not say: + +Finches, eh ? Seen one, seem 'em all. +% +Things Charles Darwin did not say: + +Nah, it's only a theory - I don't think it should be taught in schools. +% Things equal to nothing else are equal to each other. % Things fall apart; the centre cannot hold. @@ -52167,6 +52200,9 @@ the Thanksgiving festivities of that cit the affair," and of course be sadly disappointed thereby. -- Sacramento Daily Union, November 29, 1861 % +Too many of his [Mozart's] works sound like interoffice memos. + -- Glenn Gould +% Too many people are thinking of security instead of opportunity. They seem more afraid of life than death. -- James F. Byrnes @@ -53841,7 +53877,7 @@ but we always respect their good judgmen ...we must be wary of granting too much power to natural selection by viewing all basic capacities of our brain as direct adaptations. I do not doubt that natural selection acted in building our oversized -brains -- and I am equally confidant that our brains became large as +brains -- and I am equally confident that our brains became large as an adaptation for definite roles (probably a complex set of interacting functions). But these assumptions do not lead to the notion, often uncritically embraced by strict Darwinians, that all major capacities @@ -53858,7 +53894,7 @@ We must die because we have known them. We must finish once and for all with the neutrality of chess. We must condemn once and for all the formula 'chess for the sake of chess,' like the formula 'art for art's sake.' We must organize shock-brigades of -chess-play ers, and begin the immediate realization of a Five-Year Plan +chess-players, and begin the immediate realization of a Five-Year Plan for chess. -- Nikolai V. Krylenko, People's Commissar for Justice (of RFSFR, later of USSR), speaking at a 1932 Congress @@ -55469,6 +55505,12 @@ winter with slightly over half that quan % When I kill, the only thing I feel is recoil. % +When I look at the horse heads and men's faces, the immense +live torrent once raised by my will and now whirling to +nowhere through the red sunset desert, I often wonder where +I am in this torrent. + -- Chinggis (Genghis) Khan +% When I said "we", officer, I was referring to myself, the four young ladies, and, of course, the goat. % @@ -56260,6 +56302,9 @@ and perhaps weigh 1 1/2 tons. % Where am I? Who am I? Am I? I % +Where am I, and what am I doing in this handbasket? + -- Mark A. Matthews, to Wes Peters, circa 1996 +% Where are the calculations that go with a calculated risk? % WHERE CAN THE MATTER BE @@ -59726,6 +59771,17 @@ You've been telling me to relax all the and now you're telling me just to be myself? -- The Return of the Secaucus Seven % +You've decked the halls with a dozen miles' length of electric lights. +Your front lawn is a gleaming testament of incandescent wonder. The neighbors +wear sunglasses 24/7, and orbiting satellites have officially picked up +and pinpointed your house as the brightest spot on earth. + +You've finally put together the Christmas wonderland of your dreams... now +if only you could get a good picture of it. + +Photographing holiday lights is no easy task. + -- from an email sent by photojojo.com +% You've got to have a gimmick if your band sucks. -- Gary Giddens % Modified: stable/7/games/fortune/datfiles/fortunes-o.real ============================================================================== --- stable/7/games/fortune/datfiles/fortunes-o.real Sat Nov 7 22:27:34 2009 (r199026) +++ stable/7/games/fortune/datfiles/fortunes-o.real Sat Nov 7 22:40:13 2009 (r199027) @@ -755,7 +755,7 @@ see Sir Lancelot riding hard to catch up "What is amiss, my friend?" asked the king. "My lord," gasped Lancelot, "you have given me the wrong key!" % - "Before we get married," said the young woman to her fiancee, + "Before we get married," said the young woman to her fiance, "I want to confess some affairs that I've had in the past." "But you told me all about those a few weeks ago," her young man replied. @@ -1153,6 +1153,12 @@ and stuck it in my back." "Gabriel's trumpet will produce you from the ass of a pig." -- Al Swearingen, E. B. Farnum, _Deadwood_ % + I'd say that VCS is more like the anal sex of the software +world: Everybody talks about it, some people do it, some people enjoy +it, but typically only vague implications about the best techniques +are ever voiced in public. + -- Warner Losh, on Version Control Systems +% "I'll tell ya, Jeb," Wilbur said to his friend, "the tractor business ain't doin' too well. I ain't sold one all month. "You think you've got problems?" Jeb replied. "The other day, I went Modified: stable/7/games/fortune/datfiles/fortunes.sp.ok ============================================================================== --- stable/7/games/fortune/datfiles/fortunes.sp.ok Sat Nov 7 22:27:34 2009 (r199026) +++ stable/7/games/fortune/datfiles/fortunes.sp.ok Sat Nov 7 22:40:13 2009 (r199027) @@ -3300,6 +3300,7 @@ postjudice Postnews Postpetroleum potholes +Potluck potty Poul Pournelle @@ -3376,7 +3377,6 @@ Purshottam PUSHes pushy pussycats -Putluck Putt's PVLC PxP Modified: stable/7/games/fortune/datfiles/gerrold.limerick ============================================================================== --- stable/7/games/fortune/datfiles/gerrold.limerick Sat Nov 7 22:27:34 2009 (r199026) +++ stable/7/games/fortune/datfiles/gerrold.limerick Sat Nov 7 22:40:13 2009 (r199027) @@ -39,7 +39,7 @@ rights reserved, used with permission of I have written some limericks quite fateful, malicious and vicious and hateful; but I've torn up the jokes - that will sicken most folks, + that would sicken most folks, and humanity ought to be grateful. From The War Against The Chtorr, (c) David Gerrold, 1984-2000, all @@ -215,7 +215,7 @@ rights reserved, used with permission of % There was a young lady quite tearful. Of sucking a cock, she was fearful. - In a moment of dreard, + In a moment of dread, she just turned her head. And, boy! Did she get an earful! @@ -499,7 +499,7 @@ Rick promised to gently deflower a maiden who lived on South Gower, (The truth is, he spread her legs wide on the bed, -and finsihed her off in an hour.) +and finished her off in an hour.) From The War Against The Chtorr, (c) David Gerrold, 1984-2000, all rights reserved, used with permission of the author. @@ -531,15 +531,6 @@ and left her all dried up and squinty. From The War Against The Chtorr, (c) David Gerrold, 1984-2000, all rights reserved, used with permission of the author. % -I have written some limericks quite fateful, -malicious and vicious and hateful; - but I've torn up the jokes - that would sicken most folks, -and humanity ought ot be grateful; - -From The War Against The Chtorr, (c) David Gerrold, 1984-2000, all -rights reserved, used with permission of the author. -% Here's the tale of Benjamin Sneed: Where others were two'd he was three'd and when they unmasked it, @@ -552,7 +543,7 @@ rights reserved, used with permission of A maiden who had a third breast always kept her hand close to her chest, and I promised her well - that I never woudl tell. + that I never would tell. (Write me privately. Name on request.) From The War Against The Chtorr, (c) David Gerrold, 1984-2000, all @@ -741,7 +732,7 @@ tie me up in some chains that are clinky Just get the straps and the slings and a shipment of high-grade Vaseline, and a strong trampoline, -and allof the other equipment!" +and all of the other equipment!" "Now, when we get all the bedsprings a-drummin', that's when I'll start in a-hummin', @@ -769,7 +760,7 @@ rights reserved, used with permission of % The speed of Ed's seed is unclocked whenever a lady's unfrocked. - Tho' his spirit is willin, + Tho' his spirit is willin', when a pussy needs fillin', he's a man who goes off half-cocked. @@ -815,7 +806,7 @@ rights reserved, used with permission of A king who was mad at the time, decreed limerick writing a crime. but late in the night - all the poets woudl write + all the poets would write verses without any rhyme or meter. From The War Against The Chtorr, (c) David Gerrold, 1984-2000, all Modified: stable/7/games/fortune/datfiles/limerick ============================================================================== --- stable/7/games/fortune/datfiles/limerick Sat Nov 7 22:27:34 2009 (r199026) +++ stable/7/games/fortune/datfiles/limerick Sat Nov 7 22:40:13 2009 (r199027) @@ -4421,7 +4421,7 @@ And secretly finger his dong. There was an old man of St. Bees, Who was stung in the arm by a wasp. When asked, "Does it hurt?" - He relied, "No, it doesn't. + He replied, "No, it doesn't. I'm so glad that it wasn't a hornet." -- W.S. Gilbert % From owner-svn-src-all@FreeBSD.ORG Sat Nov 7 22:47:14 2009 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 7F290106568F; Sat, 7 Nov 2009 22:47:14 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6D8888FC0A; Sat, 7 Nov 2009 22:47: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 nA7MlEWb065876; Sat, 7 Nov 2009 22:47:14 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA7MlCDT065874; Sat, 7 Nov 2009 22:47:12 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200911072247.nA7MlCDT065874@svn.freebsd.org> From: Doug Barton Date: Sat, 7 Nov 2009 22:47:12 +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: r199028 - stable/7/games/fortune/datfiles 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, 07 Nov 2009 22:47:14 -0000 Author: dougb Date: Sat Nov 7 22:47:12 2009 New Revision: 199028 URL: http://svn.freebsd.org/changeset/base/199028 Log: Manually remove a duplicate fortune that I cannot find the commit log for Modified: stable/7/games/fortune/datfiles/fortunes Modified: stable/7/games/fortune/datfiles/fortunes ============================================================================== --- stable/7/games/fortune/datfiles/fortunes Sat Nov 7 22:40:13 2009 (r199027) +++ stable/7/games/fortune/datfiles/fortunes Sat Nov 7 22:47:12 2009 (r199028) @@ -23567,9 +23567,6 @@ but I can't prove it. I have a very firm grasp on reality! I can reach out and strangle it any time! % -I have a very small mind and must live with it. - -- Edsger W. Dijkstra -% I have a very strange feeling about this... -- Luke Skywalker % From owner-svn-src-all@FreeBSD.ORG Sat Nov 7 22:55:08 2009 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 B33221065676; Sat, 7 Nov 2009 22:55:08 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [195.88.108.3]) by mx1.freebsd.org (Postfix) with ESMTP id 623548FC0C; Sat, 7 Nov 2009 22:55:08 +0000 (UTC) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 0237641C711; Sat, 7 Nov 2009 23:55:07 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([195.88.108.3]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id ON1JVvPpEZTE; Sat, 7 Nov 2009 23:55:06 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id 508A741C710; Sat, 7 Nov 2009 23:55:06 +0100 (CET) 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 545634448E6; Sat, 7 Nov 2009 22:51:06 +0000 (UTC) Date: Sat, 7 Nov 2009 22:51:06 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Doug Barton In-Reply-To: <200911072227.nA7MRYpK065428@svn.freebsd.org> Message-ID: <20091107225012.T37440@maildrop.int.zabbadoz.net> References: <200911072227.nA7MRYpK065428@svn.freebsd.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed 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: r199026 - stable/8/games/fortune/datfiles 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, 07 Nov 2009 22:55:08 -0000 On Sat, 7 Nov 2009, Doug Barton wrote: > Author: dougb > Date: Sat Nov 7 22:27:34 2009 > New Revision: 199026 > URL: http://svn.freebsd.org/changeset/base/199026 > > Log: > MFC r199023: > Move VCS fortune to fortunes-o > > MFC 199025: > Sort fortune Even for things like fortune files we usually do not do insta-MFCs; is there any reason this needed to be done? -- Bjoern A. Zeeb It will not break if you know what you are doing. From owner-svn-src-all@FreeBSD.ORG Sat Nov 7 22:59:04 2009 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 D6FCE106568D; Sat, 7 Nov 2009 22:59:04 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C5C4D8FC08; Sat, 7 Nov 2009 22:59: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 nA7Mx446066170; Sat, 7 Nov 2009 22:59:04 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA7Mx4wY066168; Sat, 7 Nov 2009 22:59:04 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200911072259.nA7Mx4wY066168@svn.freebsd.org> From: Doug Barton Date: Sat, 7 Nov 2009 22:59:04 +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: r199029 - stable/8/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: Sat, 07 Nov 2009 22:59:04 -0000 Author: dougb Date: Sat Nov 7 22:59:04 2009 New Revision: 199029 URL: http://svn.freebsd.org/changeset/base/199029 Log: MFC r198162: Allow $name_program to override $command in a more robust way that will not cause the value to be null if $command is not set. Modified: stable/8/etc/rc.subr Directory Properties: stable/8/etc/ (props changed) Modified: stable/8/etc/rc.subr ============================================================================== --- stable/8/etc/rc.subr Sat Nov 7 22:47:12 2009 (r199028) +++ stable/8/etc/rc.subr Sat Nov 7 22:59:04 2009 (r199029) @@ -588,7 +588,7 @@ run_rc_command() esac eval _override_command=\$${name}_program - command=${command:+${_override_command:-$command}} + command=${_override_command:-$command} _keywords="start stop restart rcvar $extra_commands" rc_pid= From owner-svn-src-all@FreeBSD.ORG Sat Nov 7 23:19:37 2009 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 98590106568F; Sat, 7 Nov 2009 23:19:37 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6D51D8FC13; Sat, 7 Nov 2009 23:19: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 nA7NJb2I066695; Sat, 7 Nov 2009 23:19:37 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA7NJbU7066694; Sat, 7 Nov 2009 23:19:37 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200911072319.nA7NJbU7066694@svn.freebsd.org> From: Doug Barton Date: Sat, 7 Nov 2009 23:19:37 +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: r199030 - stable/7/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: Sat, 07 Nov 2009 23:19:37 -0000 Author: dougb Date: Sat Nov 7 23:19:36 2009 New Revision: 199030 URL: http://svn.freebsd.org/changeset/base/199030 Log: Pull mergeinfo for r194088 and r194107 up from termcap.small into etc/ Modified: Directory Properties: stable/7/etc/ (props changed) From owner-svn-src-all@FreeBSD.ORG Sat Nov 7 23:24:18 2009 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 2C256106566B; Sat, 7 Nov 2009 23:24:18 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 00BB68FC17; Sat, 7 Nov 2009 23:24: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 nA7NOH9s066844; Sat, 7 Nov 2009 23:24:17 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA7NOHeX066843; Sat, 7 Nov 2009 23:24:17 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200911072324.nA7NOHeX066843@svn.freebsd.org> From: Doug Barton Date: Sat, 7 Nov 2009 23:24: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: r199031 - stable/7/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: Sat, 07 Nov 2009 23:24:18 -0000 Author: dougb Date: Sat Nov 7 23:24:17 2009 New Revision: 199031 URL: http://svn.freebsd.org/changeset/base/199031 Log: Forcibly remove the svn:mergeinfo on this file now that it's been pulled up into etc/ Modified: Directory Properties: stable/7/etc/termcap.small (props changed) From owner-svn-src-all@FreeBSD.ORG Sat Nov 7 23:37:29 2009 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 C5749106566B; Sat, 7 Nov 2009 23:37:29 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B40A68FC0C; Sat, 7 Nov 2009 23:37: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 nA7NbT25067124; Sat, 7 Nov 2009 23:37:29 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA7NbTE0067122; Sat, 7 Nov 2009 23:37:29 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200911072337.nA7NbTE0067122@svn.freebsd.org> From: Doug Barton Date: Sat, 7 Nov 2009 23:37: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: r199032 - stable/7/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: Sat, 07 Nov 2009 23:37:29 -0000 Author: dougb Date: Sat Nov 7 23:37:29 2009 New Revision: 199032 URL: http://svn.freebsd.org/changeset/base/199032 Log: MFC r198162: Allow $name_program to override $command in a more robust way that will not cause the value to be null if $command is not set. Modified: stable/7/etc/rc.subr Directory Properties: stable/7/etc/ (props changed) Modified: stable/7/etc/rc.subr ============================================================================== --- stable/7/etc/rc.subr Sat Nov 7 23:24:17 2009 (r199031) +++ stable/7/etc/rc.subr Sat Nov 7 23:37:29 2009 (r199032) @@ -565,7 +565,7 @@ run_rc_command() esac eval _override_command=\$${name}_program - command=${command:+${_override_command:-$command}} + command=${_override_command:-$command} _keywords="start stop restart rcvar $extra_commands" rc_pid=