From owner-svn-src-all@FreeBSD.ORG Sun Mar 28 00:10:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EDA62106566B; Sun, 28 Mar 2010 00:10:09 +0000 (UTC) (envelope-from gibbs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DCDFE8FC08; Sun, 28 Mar 2010 00:10: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 o2S0A9KI041573; Sun, 28 Mar 2010 00:10:09 GMT (envelope-from gibbs@svn.freebsd.org) Received: (from gibbs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2S0A9fX041570; Sun, 28 Mar 2010 00:10:09 GMT (envelope-from gibbs@svn.freebsd.org) Message-Id: <201003280010.o2S0A9fX041570@svn.freebsd.org> From: "Justin T. Gibbs" Date: Sun, 28 Mar 2010 00:10: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: r205781 - head/sys/dev/bktr X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Mar 2010 00:10:10 -0000 Author: gibbs Date: Sun Mar 28 00:10:09 2010 New Revision: 205781 URL: http://svn.freebsd.org/changeset/base/205781 Log: Use standard types in preference to BSD types so that these header files can be used in applications compiled with only POSIX types visible. MFC after: 2 weeks Modified: head/sys/dev/bktr/ioctl_bt848.h head/sys/dev/bktr/ioctl_meteor.h Modified: head/sys/dev/bktr/ioctl_bt848.h ============================================================================== --- head/sys/dev/bktr/ioctl_bt848.h Sat Mar 27 23:58:53 2010 (r205780) +++ head/sys/dev/bktr/ioctl_bt848.h Sun Mar 28 00:10:09 2010 (r205781) @@ -89,9 +89,9 @@ * EEProm stuff */ struct eeProm { - short offset; - short count; - u_char bytes[ 256 ]; + short offset; + short count; + unsigned char bytes[ 256 ]; }; @@ -147,7 +147,7 @@ struct eeProm { * b23-b16: i2c addr (write) * b31-b24: 1 = write, 0 = read */ -#define BT848_I2CWR _IOWR('x', 57, u_long) /* i2c read-write */ +#define BT848_I2CWR _IOWR('x', 57, unsigned long) /* i2c read-write */ struct bktr_msp_control { unsigned char function; @@ -192,10 +192,10 @@ typedef enum { METEOR_PIXTYPE_RGB, METEO struct meteor_pixfmt { - u_int index; /* Index in supported pixfmt list */ + unsigned int index; /* Index in supported pixfmt list */ METEOR_PIXTYPE type; /* What's the board gonna feed us */ - u_int Bpp; /* Bytes per pixel */ - u_long masks[3]; /* R,G,B or Y,U,V masks, respectively */ + unsigned int Bpp; /* Bytes per pixel */ + unsigned long masks[3]; /* R,G,B or Y,U,V masks, respectively */ unsigned swap_bytes :1; /* Bytes swapped within shorts */ unsigned swap_shorts:1; /* Shorts swapped within longs */ }; Modified: head/sys/dev/bktr/ioctl_meteor.h ============================================================================== --- head/sys/dev/bktr/ioctl_meteor.h Sat Mar 27 23:58:53 2010 (r205780) +++ head/sys/dev/bktr/ioctl_meteor.h Sun Mar 28 00:10:09 2010 (r205781) @@ -50,27 +50,27 @@ struct meteor_capframe { /* structure for METEOR[GS]ETGEO - get/set geometry */ struct meteor_geomet { - u_short rows; - u_short columns; - u_short frames; - u_long oformat; + unsigned short rows; + unsigned short columns; + unsigned short frames; + unsigned long oformat; } ; /* structure for METEORGCOUNT-get count of frames, fifo errors and dma errors */ struct meteor_counts { - u_long fifo_errors; /* count of fifo errors since open */ - u_long dma_errors; /* count of dma errors since open */ - u_long frames_captured; /* count of frames captured since open */ - u_long even_fields_captured; /* count of even fields captured */ - u_long odd_fields_captured; /* count of odd fields captured */ + unsigned long fifo_errors; /* count of fifo errors since open */ + unsigned long dma_errors; /* count of dma errors since open */ + unsigned long frames_captured; /* count of frames captured since open */ + unsigned long even_fields_captured; /* count of even fields captured */ + unsigned long odd_fields_captured; /* count of odd fields captured */ } ; /* structure for getting and setting direct transfers to vram */ struct meteor_video { - u_long addr; /* Address of location to dma to */ - u_long width; /* Width of memory area */ - u_long banksize; /* Size of Vram bank */ - u_long ramsize; /* Size of Vram */ + unsigned long addr; /* Address of location to dma to */ + unsigned long width; /* Width of memory area */ + unsigned long banksize; /* Size of Vram bank */ + unsigned long ramsize; /* Size of Vram */ }; #define METEORCAPTUR _IOW('x', 1, int) /* capture a frame */ From owner-svn-src-all@FreeBSD.ORG Sun Mar 28 06:51:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2128F1065672; Sun, 28 Mar 2010 06:51:51 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0FF0B8FC0A; Sun, 28 Mar 2010 06:51: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 o2S6poRP030063; Sun, 28 Mar 2010 06:51:50 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2S6po7B030061; Sun, 28 Mar 2010 06:51:50 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201003280651.o2S6po7B030061@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 28 Mar 2010 06:51: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: r205789 - head/sys/netipsec X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 28 Mar 2010 06:51:51 -0000 Author: bz Date: Sun Mar 28 06:51:50 2010 New Revision: 205789 URL: http://svn.freebsd.org/changeset/base/205789 Log: When tearing down IPsec as part of a (virtual) network stack, do not try to free the same list twice but free both the acquiring list and the security policy acquiring list. Reviewed by: anchie MFC after: 3 days Modified: head/sys/netipsec/key.c Modified: head/sys/netipsec/key.c ============================================================================== --- head/sys/netipsec/key.c Sun Mar 28 03:00:18 2010 (r205788) +++ head/sys/netipsec/key.c Sun Mar 28 06:51:50 2010 (r205789) @@ -7779,7 +7779,8 @@ void key_destroy(void) { struct secpolicy *sp, *nextsp; - struct secspacq *acq, *nextacq; + struct secacq *acq, *nextacq; + struct secspacq *spacq, *nextspacq; struct secashead *sah, *nextsah; struct secreg *reg; int i; @@ -7820,7 +7821,7 @@ key_destroy(void) REGTREE_UNLOCK(); ACQ_LOCK(); - for (acq = LIST_FIRST(&V_spacqtree); acq != NULL; acq = nextacq) { + for (acq = LIST_FIRST(&V_acqtree); acq != NULL; acq = nextacq) { nextacq = LIST_NEXT(acq, chain); if (__LIST_CHAINED(acq)) { LIST_REMOVE(acq, chain); @@ -7830,11 +7831,12 @@ key_destroy(void) ACQ_UNLOCK(); SPACQ_LOCK(); - for (acq = LIST_FIRST(&V_spacqtree); acq != NULL; acq = nextacq) { - nextacq = LIST_NEXT(acq, chain); - if (__LIST_CHAINED(acq)) { - LIST_REMOVE(acq, chain); - free(acq, M_IPSEC_SAQ); + for (spacq = LIST_FIRST(&V_spacqtree); spacq != NULL; + spacq = nextspacq) { + nextspacq = LIST_NEXT(spacq, chain); + if (__LIST_CHAINED(spacq)) { + LIST_REMOVE(spacq, chain); + free(spacq, M_IPSEC_SAQ); } } SPACQ_UNLOCK(); From owner-svn-src-all@FreeBSD.ORG Sun Mar 28 11:22:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3F389106566B; Sun, 28 Mar 2010 11:22: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 2E2B48FC18; Sun, 28 Mar 2010 11:22: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 o2SBMdws006807; Sun, 28 Mar 2010 11:22:39 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2SBMduE006805; Sun, 28 Mar 2010 11:22:39 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201003281122.o2SBMduE006805@svn.freebsd.org> From: Jaakko Heinonen Date: Sun, 28 Mar 2010 11:22: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: r205790 - stable/8/usr.bin/touch X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 28 Mar 2010 11:22:39 -0000 Author: jh Date: Sun Mar 28 11:22:38 2010 New Revision: 205790 URL: http://svn.freebsd.org/changeset/base/205790 Log: MFC r198175: - If lstat()/stat() fails with an error other than ENOENT, don't ignore the error and assume that the file doesn't exist. Touch could return success with -c option even if the file existed and time was not set. - If the first utimes_f() call fails with -A option, give up and don't continue trying to set times to current time. [1] - Set exit status to 1 when setting of timestamps fails for a directory or symbolic link even though lstat()/stat() would succeed. - Don't print bogus error message when rw() succeeds. PR: bin/112213 Modified: stable/8/usr.bin/touch/touch.c Directory Properties: stable/8/usr.bin/touch/ (props changed) Modified: stable/8/usr.bin/touch/touch.c ============================================================================== --- stable/8/usr.bin/touch/touch.c Sun Mar 28 06:51:50 2010 (r205789) +++ stable/8/usr.bin/touch/touch.c Sun Mar 28 11:22:38 2010 (r205790) @@ -164,6 +164,11 @@ main(int argc, char *argv[]) for (rval = 0; *argv; ++argv) { /* See if the file exists. */ if (stat_f(*argv, &sb) != 0) { + if (errno != ENOENT) { + rval = 1; + warn("%s", *argv); + continue; + } if (!cflag) { /* Create the file. */ fd = open(*argv, @@ -206,7 +211,7 @@ main(int argc, char *argv[]) continue; /* If the user specified a time, nothing else we can do. */ - if (timeset) { + if (timeset || Aflag) { rval = 1; warn("%s", *argv); continue; @@ -222,11 +227,13 @@ main(int argc, char *argv[]) continue; /* Try reading/writing. */ - if (!S_ISLNK(sb.st_mode) && !S_ISDIR(sb.st_mode) && - rw(*argv, &sb, fflag)) + if (!S_ISLNK(sb.st_mode) && !S_ISDIR(sb.st_mode)) { + if (rw(*argv, &sb, fflag)) + rval = 1; + } else { rval = 1; - else warn("%s", *argv); + } } exit(rval); } From owner-svn-src-all@FreeBSD.ORG Sun Mar 28 12:55:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EC372106566C; Sun, 28 Mar 2010 12:55:31 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DC2AB8FC15; Sun, 28 Mar 2010 12:55: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 o2SCtVDt027466; Sun, 28 Mar 2010 12:55:31 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2SCtVeQ027464; Sun, 28 Mar 2010 12:55:31 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201003281255.o2SCtVeQ027464@svn.freebsd.org> From: Rui Paulo Date: Sun, 28 Mar 2010 12:55: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: r205791 - head/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: Sun, 28 Mar 2010 12:55:32 -0000 Author: rpaulo Date: Sun Mar 28 12:55:31 2010 New Revision: 205791 URL: http://svn.freebsd.org/changeset/base/205791 Log: Add a comment explaining the previous commit. Submitted by: sam > Description of fields to fill in above: 76 columns --| > PR: If a GNATS PR is affected by the change. > Submitted by: If someone else sent in the change. > Reviewed by: If someone else reviewed your modification. > Approved by: If you needed approval for this commit. > Obtained from: If the change is from a third party. > MFC after: N [day[s]|week[s]|month[s]]. Request a reminder email. > Security: Vulnerability reference (one per line) or description. > Empty fields above will be automatically removed. M ieee80211_hostap.c Modified: head/sys/net80211/ieee80211_hostap.c Modified: head/sys/net80211/ieee80211_hostap.c ============================================================================== --- head/sys/net80211/ieee80211_hostap.c Sun Mar 28 11:22:38 2010 (r205790) +++ head/sys/net80211/ieee80211_hostap.c Sun Mar 28 12:55:31 2010 (r205791) @@ -883,6 +883,11 @@ hostap_input(struct ieee80211_node *ni, wh = mtod(m, struct ieee80211_frame *); wh->i_fc[1] &= ~IEEE80211_FC1_WEP; } + /* + * Pass the packet to radiotap before calling iv_recv_mgmt(). + * Otherwise iv_recv_mgmt() might pass another packet to + * radiotap, resulting in out of order packet captures. + */ if (ieee80211_radiotap_active_vap(vap)) ieee80211_radiotap_rx(vap, m); need_tap = 0; From owner-svn-src-all@FreeBSD.ORG Sun Mar 28 13:13:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 21B961065670; Sun, 28 Mar 2010 13:13:23 +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 0EA2A8FC17; Sun, 28 Mar 2010 13:13: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 o2SDDNmT031427; Sun, 28 Mar 2010 13:13:23 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2SDDMh4031408; Sun, 28 Mar 2010 13:13:22 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201003281313.o2SDDMh4031408@svn.freebsd.org> From: Ed Schouten Date: Sun, 28 Mar 2010 13:13:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205792 - in head: lib/libc/sys sys/amd64/linux32 sys/compat/freebsd32 sys/compat/linux sys/compat/svr4 sys/i386/ibcs2 sys/i386/linux sys/kern 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, 28 Mar 2010 13:13:23 -0000 Author: ed Date: Sun Mar 28 13:13:22 2010 New Revision: 205792 URL: http://svn.freebsd.org/changeset/base/205792 Log: Rename st_*timespec fields to st_*tim for POSIX 2008 compliance. A nice thing about POSIX 2008 is that it finally standardizes a way to obtain file access/modification/change times in sub-second precision, namely using struct timespec, which we already have for a very long time. Unfortunately POSIX uses different names. This commit adds compatibility macros, so existing code should still build properly. Also change all source code in the kernel to work without any of the compatibility macros. This makes it all a less ambiguous. I am also renaming st_birthtime to st_birthtim, even though it was a local extension anyway. It seems Cygwin also has a st_birthtim. Modified: head/lib/libc/sys/stat.2 head/sys/amd64/linux32/linux.h head/sys/compat/freebsd32/freebsd32.h head/sys/compat/freebsd32/freebsd32_misc.c head/sys/compat/linux/linux_stats.c head/sys/compat/svr4/svr4_stat.c head/sys/i386/ibcs2/ibcs2_stat.c head/sys/i386/linux/linux.h head/sys/kern/sys_pipe.c head/sys/kern/tty_pts.c head/sys/kern/uipc_mqueue.c head/sys/kern/uipc_sem.c head/sys/kern/uipc_shm.c head/sys/kern/vfs_syscalls.c head/sys/kern/vfs_vnops.c head/sys/sys/_timespec.h head/sys/sys/stat.h head/sys/sys/timespec.h Modified: head/lib/libc/sys/stat.2 ============================================================================== --- head/lib/libc/sys/stat.2 Sun Mar 28 12:55:31 2010 (r205791) +++ head/lib/libc/sys/stat.2 Sun Mar 28 13:13:22 2010 (r205792) @@ -149,8 +149,8 @@ fields together identify the file unique The time-related fields of .Vt "struct stat" are as follows: -.Bl -tag -width ".Va st_birthtime" -.It Va st_atime +.Bl -tag -width ".Va st_birthtim" +.It Va st_atim Time when file data last accessed. Changed by the .Xr mknod 2 , @@ -159,7 +159,7 @@ Changed by the and .Xr readv 2 system calls. -.It Va st_mtime +.It Va st_mtim Time when file data last modified. Changed by the .Xr mkdir 2 , @@ -170,7 +170,7 @@ Changed by the and .Xr writev 2 system calls. -.It Va st_ctime +.It Va st_ctim Time when file status was last changed (inode data modification). Changed by the .Xr chflags 2 , @@ -191,18 +191,24 @@ Changed by the and .Xr writev 2 system calls. -.It Va st_birthtime +.It Va st_birthtim Time when the inode was created. .El .Pp -If -.Dv _POSIX_SOURCE -is not defined, the time-related fields are defined as: +The following time-related macros are defined for compatibility: .Bd -literal +#define st_atime st_atim.tv_sec +#define st_mtime st_mtim.tv_sec +#define st_ctime st_ctim.tv_sec #ifndef _POSIX_SOURCE -#define st_atime st_atimespec.tv_sec -#define st_mtime st_mtimespec.tv_sec -#define st_ctime st_ctimespec.tv_sec +#define st_birthtime st_birthtim.tv_sec +#endif + +#ifndef _POSIX_SOURCE +#define st_atimespec st_atim +#define st_mtimespec st_mtim +#define st_ctimespec st_ctim +#define st_birthtimespec st_birthtim #endif .Ed .Pp Modified: head/sys/amd64/linux32/linux.h ============================================================================== --- head/sys/amd64/linux32/linux.h Sun Mar 28 12:55:31 2010 (r205791) +++ head/sys/amd64/linux32/linux.h Sun Mar 28 13:13:22 2010 (r205792) @@ -203,9 +203,9 @@ struct l_newstat { l_ulong st_size; l_ulong st_blksize; l_ulong st_blocks; - struct l_timespec st_atimespec; - struct l_timespec st_mtimespec; - struct l_timespec st_ctimespec; + struct l_timespec st_atim; + struct l_timespec st_mtim; + struct l_timespec st_ctim; l_ulong __unused4; l_ulong __unused5; } __packed; @@ -219,9 +219,9 @@ struct l_stat { l_ushort st_gid; l_ushort st_rdev; l_long st_size; - struct l_timespec st_atimespec; - struct l_timespec st_mtimespec; - struct l_timespec st_ctimespec; + struct l_timespec st_atim; + struct l_timespec st_mtim; + struct l_timespec st_ctim; l_long st_blksize; l_long st_blocks; l_ulong st_flags; @@ -242,9 +242,9 @@ struct l_stat64 { l_ulong st_blksize; l_ulong st_blocks; l_ulong __pad4; - struct l_timespec st_atimespec; - struct l_timespec st_mtimespec; - struct l_timespec st_ctimespec; + struct l_timespec st_atim; + struct l_timespec st_mtim; + struct l_timespec st_ctim; l_ulonglong st_ino; } __packed; Modified: head/sys/compat/freebsd32/freebsd32.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32.h Sun Mar 28 12:55:31 2010 (r205791) +++ head/sys/compat/freebsd32/freebsd32.h Sun Mar 28 13:13:22 2010 (r205792) @@ -143,15 +143,15 @@ struct stat32 { uid_t st_uid; gid_t st_gid; dev_t st_rdev; - struct timespec32 st_atimespec; - struct timespec32 st_mtimespec; - struct timespec32 st_ctimespec; + struct timespec32 st_atim; + struct timespec32 st_mtim; + struct timespec32 st_ctim; off_t st_size; int64_t st_blocks; u_int32_t st_blksize; u_int32_t st_flags; u_int32_t st_gen; - struct timespec32 st_birthtimespec; + struct timespec32 st_birthtim; unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec32)); unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec32)); }; Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Sun Mar 28 12:55:31 2010 (r205791) +++ head/sys/compat/freebsd32/freebsd32_misc.c Sun Mar 28 13:13:22 2010 (r205792) @@ -1634,9 +1634,9 @@ copy_stat( struct stat *in, struct stat3 CP(*in, *out, st_uid); CP(*in, *out, st_gid); CP(*in, *out, st_rdev); - TS_CP(*in, *out, st_atimespec); - TS_CP(*in, *out, st_mtimespec); - TS_CP(*in, *out, st_ctimespec); + TS_CP(*in, *out, st_atim); + TS_CP(*in, *out, st_mtim); + TS_CP(*in, *out, st_ctim); CP(*in, *out, st_size); CP(*in, *out, st_blocks); CP(*in, *out, st_blksize); Modified: head/sys/compat/linux/linux_stats.c ============================================================================== --- head/sys/compat/linux/linux_stats.c Sun Mar 28 12:55:31 2010 (r205791) +++ head/sys/compat/linux/linux_stats.c Sun Mar 28 13:13:22 2010 (r205792) @@ -173,9 +173,12 @@ newstat_copyout(struct stat *buf, void * tbuf.st_gid = buf->st_gid; tbuf.st_rdev = buf->st_rdev; tbuf.st_size = buf->st_size; - tbuf.st_atime = buf->st_atime; - tbuf.st_mtime = buf->st_mtime; - tbuf.st_ctime = buf->st_ctime; + tbuf.st_atim.tv_sec = buf->st_atim.tv_sec; + tbuf.st_atim.tv_nsec = buf->st_atim.tv_nsec; + tbuf.st_mtim.tv_sec = buf->st_mtim.tv_sec; + tbuf.st_mtim.tv_nsec = buf->st_mtim.tv_nsec; + tbuf.st_ctim.tv_sec = buf->st_ctim.tv_sec; + tbuf.st_ctim.tv_nsec = buf->st_ctim.tv_nsec; tbuf.st_blksize = buf->st_blksize; tbuf.st_blocks = buf->st_blocks; @@ -260,9 +263,12 @@ stat_copyout(struct stat *buf, void *ubu lbuf.st_size = buf->st_size; else lbuf.st_size = -2; - lbuf.st_atime = buf->st_atime; - lbuf.st_mtime = buf->st_mtime; - lbuf.st_ctime = buf->st_ctime; + lbuf.st_atim.tv_sec = buf->st_atim.tv_sec; + lbuf.st_atim.tv_nsec = buf->st_atim.tv_nsec; + lbuf.st_mtim.tv_sec = buf->st_mtim.tv_sec; + lbuf.st_mtim.tv_nsec = buf->st_mtim.tv_nsec; + lbuf.st_ctim.tv_sec = buf->st_ctim.tv_sec; + lbuf.st_ctim.tv_nsec = buf->st_ctim.tv_nsec; lbuf.st_blksize = buf->st_blksize; lbuf.st_blocks = buf->st_blocks; lbuf.st_flags = buf->st_flags; @@ -498,9 +504,12 @@ stat64_copyout(struct stat *buf, void *u lbuf.st_gid = buf->st_gid; lbuf.st_rdev = buf->st_rdev; lbuf.st_size = buf->st_size; - lbuf.st_atime = buf->st_atime; - lbuf.st_mtime = buf->st_mtime; - lbuf.st_ctime = buf->st_ctime; + lbuf.st_atim.tv_sec = buf->st_atim.tv_sec; + lbuf.st_atim.tv_nsec = buf->st_atim.tv_nsec; + lbuf.st_mtim.tv_sec = buf->st_mtim.tv_sec; + lbuf.st_mtim.tv_nsec = buf->st_mtim.tv_nsec; + lbuf.st_ctim.tv_sec = buf->st_ctim.tv_sec; + lbuf.st_ctim.tv_nsec = buf->st_ctim.tv_nsec; lbuf.st_blksize = buf->st_blksize; lbuf.st_blocks = buf->st_blocks; Modified: head/sys/compat/svr4/svr4_stat.c ============================================================================== --- head/sys/compat/svr4/svr4_stat.c Sun Mar 28 12:55:31 2010 (r205791) +++ head/sys/compat/svr4/svr4_stat.c Sun Mar 28 13:13:22 2010 (r205792) @@ -106,9 +106,9 @@ bsd_to_svr4_stat(st, st4) st4->st_gid = st->st_gid; st4->st_rdev = bsd_to_svr4_odev_t(st->st_rdev); st4->st_size = st->st_size; - st4->st_atim = st->st_atimespec.tv_sec; - st4->st_mtim = st->st_mtimespec.tv_sec; - st4->st_ctim = st->st_ctimespec.tv_sec; + st4->st_atim = st->st_atim.tv_sec; + st4->st_mtim = st->st_mtim.tv_sec; + st4->st_ctim = st->st_ctim.tv_sec; } #endif @@ -127,9 +127,9 @@ bsd_to_svr4_xstat(st, st4) st4->st_gid = st->st_gid; st4->st_rdev = bsd_to_svr4_dev_t(st->st_rdev); st4->st_size = st->st_size; - st4->st_atim = st->st_atimespec; - st4->st_mtim = st->st_mtimespec; - st4->st_ctim = st->st_ctimespec; + st4->st_atim = st->st_atim; + st4->st_mtim = st->st_mtim; + st4->st_ctim = st->st_ctim; st4->st_blksize = st->st_blksize; st4->st_blocks = st->st_blocks; strcpy(st4->st_fstype, "unknown"); @@ -150,9 +150,9 @@ bsd_to_svr4_stat64(st, st4) st4->st_gid = st->st_gid; st4->st_rdev = bsd_to_svr4_dev_t(st->st_rdev); st4->st_size = st->st_size; - st4->st_atim = st->st_atimespec; - st4->st_mtim = st->st_mtimespec; - st4->st_ctim = st->st_ctimespec; + st4->st_atim = st->st_atim; + st4->st_mtim = st->st_mtim; + st4->st_ctim = st->st_ctim; st4->st_blksize = st->st_blksize; st4->st_blocks = st->st_blocks; strcpy(st4->st_fstype, "unknown"); Modified: head/sys/i386/ibcs2/ibcs2_stat.c ============================================================================== --- head/sys/i386/ibcs2/ibcs2_stat.c Sun Mar 28 12:55:31 2010 (r205791) +++ head/sys/i386/ibcs2/ibcs2_stat.c Sun Mar 28 13:13:22 2010 (r205792) @@ -72,9 +72,9 @@ bsd_stat2ibcs_stat(st, st4) st4->st_size = (ibcs2_off_t)st->st_size; else st4->st_size = -2; - st4->st_atim = (ibcs2_time_t)st->st_atime; - st4->st_mtim = (ibcs2_time_t)st->st_mtime; - st4->st_ctim = (ibcs2_time_t)st->st_ctime; + st4->st_atim = (ibcs2_time_t)st->st_atim.tv_sec; + st4->st_mtim = (ibcs2_time_t)st->st_mtim.tv_sec; + st4->st_ctim = (ibcs2_time_t)st->st_ctim.tv_sec; } static int Modified: head/sys/i386/linux/linux.h ============================================================================== --- head/sys/i386/linux/linux.h Sun Mar 28 12:55:31 2010 (r205791) +++ head/sys/i386/linux/linux.h Sun Mar 28 13:13:22 2010 (r205792) @@ -178,9 +178,9 @@ struct l_newstat { l_ulong st_size; l_ulong st_blksize; l_ulong st_blocks; - struct l_timespec st_atimespec; - struct l_timespec st_mtimespec; - struct l_timespec st_ctimespec; + struct l_timespec st_atim; + struct l_timespec st_mtim; + struct l_timespec st_ctim; l_ulong __unused4; l_ulong __unused5; }; @@ -194,9 +194,9 @@ struct l_stat { l_ushort st_gid; l_ushort st_rdev; l_long st_size; - struct l_timespec st_atimespec; - struct l_timespec st_mtimespec; - struct l_timespec st_ctimespec; + struct l_timespec st_atim; + struct l_timespec st_mtim; + struct l_timespec st_ctim; l_long st_blksize; l_long st_blocks; l_ulong st_flags; @@ -217,9 +217,9 @@ struct l_stat64 { l_ulong st_blksize; l_ulong st_blocks; l_ulong __pad4; - struct l_timespec st_atimespec; - struct l_timespec st_mtimespec; - struct l_timespec st_ctimespec; + struct l_timespec st_atim; + struct l_timespec st_mtim; + struct l_timespec st_ctim; l_ulonglong st_ino; }; Modified: head/sys/kern/sys_pipe.c ============================================================================== --- head/sys/kern/sys_pipe.c Sun Mar 28 12:55:31 2010 (r205791) +++ head/sys/kern/sys_pipe.c Sun Mar 28 13:13:22 2010 (r205792) @@ -1428,9 +1428,9 @@ pipe_stat(fp, ub, active_cred, td) else ub->st_size = pipe->pipe_buffer.cnt; ub->st_blocks = (ub->st_size + ub->st_blksize - 1) / ub->st_blksize; - ub->st_atimespec = pipe->pipe_atime; - ub->st_mtimespec = pipe->pipe_mtime; - ub->st_ctimespec = pipe->pipe_ctime; + ub->st_atim = pipe->pipe_atime; + ub->st_mtim = pipe->pipe_mtime; + ub->st_ctim = pipe->pipe_ctime; ub->st_uid = fp->f_cred->cr_uid; ub->st_gid = fp->f_cred->cr_gid; /* Modified: head/sys/kern/tty_pts.c ============================================================================== --- head/sys/kern/tty_pts.c Sun Mar 28 12:55:31 2010 (r205791) +++ head/sys/kern/tty_pts.c Sun Mar 28 13:13:22 2010 (r205792) @@ -556,9 +556,9 @@ ptsdev_stat(struct file *fp, struct stat #endif /* PTS_EXTERNAL */ sb->st_ino = sb->st_rdev = tty_udev(tp); - sb->st_atimespec = dev->si_atime; - sb->st_ctimespec = dev->si_ctime; - sb->st_mtimespec = dev->si_mtime; + sb->st_atim = dev->si_atime; + sb->st_ctim = dev->si_ctime; + sb->st_mtim = dev->si_mtime; sb->st_uid = dev->si_uid; sb->st_gid = dev->si_gid; sb->st_mode = dev->si_mode | S_IFCHR; Modified: head/sys/kern/uipc_mqueue.c ============================================================================== --- head/sys/kern/uipc_mqueue.c Sun Mar 28 12:55:31 2010 (r205791) +++ head/sys/kern/uipc_mqueue.c Sun Mar 28 13:13:22 2010 (r205792) @@ -2447,10 +2447,10 @@ mqf_stat(struct file *fp, struct stat *s struct mqfs_node *pn = fp->f_data; bzero(st, sizeof *st); - st->st_atimespec = pn->mn_atime; - st->st_mtimespec = pn->mn_mtime; - st->st_ctimespec = pn->mn_ctime; - st->st_birthtimespec = pn->mn_birth; + st->st_atim = pn->mn_atime; + st->st_mtim = pn->mn_mtime; + st->st_ctim = pn->mn_ctime; + st->st_birthtim = pn->mn_birth; st->st_uid = pn->mn_uid; st->st_gid = pn->mn_gid; st->st_mode = S_IFIFO | pn->mn_mode; Modified: head/sys/kern/uipc_sem.c ============================================================================== --- head/sys/kern/uipc_sem.c Sun Mar 28 12:55:31 2010 (r205791) +++ head/sys/kern/uipc_sem.c Sun Mar 28 13:13:22 2010 (r205792) @@ -219,10 +219,10 @@ ksem_stat(struct file *fp, struct stat * bzero(sb, sizeof(*sb)); sb->st_mode = S_IFREG | ks->ks_mode; /* XXX */ - sb->st_atimespec = ks->ks_atime; - sb->st_ctimespec = ks->ks_ctime; - sb->st_mtimespec = ks->ks_mtime; - sb->st_birthtimespec = ks->ks_birthtime; + sb->st_atim = ks->ks_atime; + sb->st_ctim = ks->ks_ctime; + sb->st_mtim = ks->ks_mtime; + sb->st_birthtim = ks->ks_birthtime; sb->st_uid = ks->ks_uid; sb->st_gid = ks->ks_gid; Modified: head/sys/kern/uipc_shm.c ============================================================================== --- head/sys/kern/uipc_shm.c Sun Mar 28 12:55:31 2010 (r205791) +++ head/sys/kern/uipc_shm.c Sun Mar 28 13:13:22 2010 (r205792) @@ -219,10 +219,10 @@ shm_stat(struct file *fp, struct stat *s sb->st_blksize = PAGE_SIZE; sb->st_size = shmfd->shm_size; sb->st_blocks = (sb->st_size + sb->st_blksize - 1) / sb->st_blksize; - sb->st_atimespec = shmfd->shm_atime; - sb->st_ctimespec = shmfd->shm_ctime; - sb->st_mtimespec = shmfd->shm_mtime; - sb->st_birthtimespec = shmfd->shm_birthtime; + sb->st_atim = shmfd->shm_atime; + sb->st_ctim = shmfd->shm_ctime; + sb->st_mtim = shmfd->shm_mtime; + sb->st_birthtim = shmfd->shm_birthtime; sb->st_uid = shmfd->shm_uid; sb->st_gid = shmfd->shm_gid; Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Sun Mar 28 12:55:31 2010 (r205791) +++ head/sys/kern/vfs_syscalls.c Sun Mar 28 13:13:22 2010 (r205792) @@ -2269,9 +2269,9 @@ cvtstat(st, ost) ost->st_size = st->st_size; else ost->st_size = -2; - ost->st_atime = st->st_atime; - ost->st_mtime = st->st_mtime; - ost->st_ctime = st->st_ctime; + ost->st_atim = st->st_atim; + ost->st_mtim = st->st_mtim; + ost->st_ctim = st->st_ctim; ost->st_blksize = st->st_blksize; ost->st_blocks = st->st_blocks; ost->st_flags = st->st_flags; @@ -2431,15 +2431,15 @@ cvtnstat(sb, nsb) nsb->st_uid = sb->st_uid; nsb->st_gid = sb->st_gid; nsb->st_rdev = sb->st_rdev; - nsb->st_atimespec = sb->st_atimespec; - nsb->st_mtimespec = sb->st_mtimespec; - nsb->st_ctimespec = sb->st_ctimespec; + nsb->st_atim = sb->st_atim; + nsb->st_mtim = sb->st_mtim; + nsb->st_ctim = sb->st_ctim; nsb->st_size = sb->st_size; nsb->st_blocks = sb->st_blocks; nsb->st_blksize = sb->st_blksize; nsb->st_flags = sb->st_flags; nsb->st_gen = sb->st_gen; - nsb->st_birthtimespec = sb->st_birthtimespec; + nsb->st_birthtim = sb->st_birthtim; } #ifndef _SYS_SYSPROTO_H_ Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Sun Mar 28 12:55:31 2010 (r205791) +++ head/sys/kern/vfs_vnops.c Sun Mar 28 13:13:22 2010 (r205792) @@ -782,10 +782,10 @@ vn_stat(vp, sb, active_cred, file_cred, if (vap->va_size > OFF_MAX) return (EOVERFLOW); sb->st_size = vap->va_size; - sb->st_atimespec = vap->va_atime; - sb->st_mtimespec = vap->va_mtime; - sb->st_ctimespec = vap->va_ctime; - sb->st_birthtimespec = vap->va_birthtime; + sb->st_atim = vap->va_atime; + sb->st_mtim = vap->va_mtime; + sb->st_ctim = vap->va_ctime; + sb->st_birthtim = vap->va_birthtime; /* * According to www.opengroup.org, the meaning of st_blksize is Modified: head/sys/sys/_timespec.h ============================================================================== --- head/sys/sys/_timespec.h Sun Mar 28 12:55:31 2010 (r205791) +++ head/sys/sys/_timespec.h Sun Mar 28 13:13:22 2010 (r205792) @@ -31,26 +31,18 @@ * $FreeBSD$ */ -/* - * Prerequisite: - * - * This file must be kept synchronized with . - * It defines a structure which must be a type pun for - * `struct timespec'; this structure is used in header files where - * the ABI uses a `struct timespec' but standards prohibit its - * definition. (Currently only .) - * - * XXX should just declare struct __timespec as necessary. It's simple, - * so is easy to keep synchronized, and hopefully not needed in as many - * places as struct timespec, so we don't need this extra header. - * Perhaps we don't need timespec.h either. - */ - #ifndef _SYS__TIMESPEC_H_ #define _SYS__TIMESPEC_H_ -struct __timespec { - __time_t tv_sec; /* seconds */ +#include + +#ifndef _TIME_T_DECLARED +typedef __time_t time_t; +#define _TIME_T_DECLARED +#endif + +struct timespec { + time_t tv_sec; /* seconds */ long tv_nsec; /* and nanoseconds */ }; Modified: head/sys/sys/stat.h ============================================================================== --- head/sys/sys/stat.h Sun Mar 28 12:55:31 2010 (r205791) +++ head/sys/sys/stat.h Sun Mar 28 13:13:22 2010 (r205792) @@ -39,6 +39,7 @@ #define _SYS_STAT_H_ #include +#include #include #ifndef _BLKSIZE_T_DECLARED @@ -86,11 +87,6 @@ typedef __off_t off_t; #define _OFF_T_DECLARED #endif -#ifndef _TIME_T_DECLARED -typedef __time_t time_t; -#define _TIME_T_DECLARED -#endif - #ifndef _UID_T_DECLARED typedef __uid_t uid_t; #define _UID_T_DECLARED @@ -98,16 +94,11 @@ typedef __uid_t uid_t; #if !defined(_KERNEL) && __BSD_VISIBLE /* - * XXX we need this for struct timespec. We get miscellaneous namespace - * pollution with it. + * XXX We get miscellaneous namespace pollution with this. */ #include #endif -#if !__BSD_VISIBLE -#include -#endif - #if __BSD_VISIBLE struct ostat { __uint16_t st_dev; /* inode's device */ @@ -118,9 +109,9 @@ struct ostat { __uint16_t st_gid; /* group ID of the file's group */ __uint16_t st_rdev; /* device type */ __int32_t st_size; /* file size, in bytes */ - struct timespec st_atimespec; /* time of last access */ - struct timespec st_mtimespec; /* time of last data modification */ - struct timespec st_ctimespec; /* time of last file status change */ + struct timespec st_atim; /* time of last access */ + struct timespec st_mtim; /* time of last data modification */ + struct timespec st_ctim; /* time of last file status change */ __int32_t st_blksize; /* optimal blocksize for I/O */ __int32_t st_blocks; /* blocks allocated for file */ fflags_t st_flags; /* user defined flags for file */ @@ -136,28 +127,18 @@ struct stat { uid_t st_uid; /* user ID of the file's owner */ gid_t st_gid; /* group ID of the file's group */ __dev_t st_rdev; /* device type */ -#if __BSD_VISIBLE - struct timespec st_atimespec; /* time of last access */ - struct timespec st_mtimespec; /* time of last data modification */ - struct timespec st_ctimespec; /* time of last file status change */ -#else - time_t st_atime; /* time of last access */ - long __st_atimensec; /* nsec of last access */ - time_t st_mtime; /* time of last data modification */ - long __st_mtimensec; /* nsec of last data modification */ - time_t st_ctime; /* time of last file status change */ - long __st_ctimensec; /* nsec of last file status change */ -#endif + struct timespec st_atim; /* time of last access */ + struct timespec st_mtim; /* time of last data modification */ + struct timespec st_ctim; /* time of last file status change */ off_t st_size; /* file size, in bytes */ blkcnt_t st_blocks; /* blocks allocated for file */ blksize_t st_blksize; /* optimal blocksize for I/O */ fflags_t st_flags; /* user defined flags for file */ __uint32_t st_gen; /* file generation number */ __int32_t st_lspare; -#if __BSD_VISIBLE - struct timespec st_birthtimespec; /* time of file creation */ + struct timespec st_birthtim; /* time of file creation */ /* - * Explicitly pad st_birthtimespec to 16 bytes so that the size of + * Explicitly pad st_birthtim to 16 bytes so that the size of * struct stat is backwards compatible. We use bitfields instead * of an array of chars so that this doesn't require a C99 compiler * to compile if the size of the padding is 0. We use 2 bitfields @@ -166,12 +147,6 @@ struct stat { */ unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec)); unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec)); -#else - time_t st_birthtime; /* time of file creation */ - long st_birthtimensec; /* nsec of file creation */ - unsigned int :(8 / 2) * (16 - (int)sizeof(struct __timespec)); - unsigned int :(8 / 2) * (16 - (int)sizeof(struct __timespec)); -#endif }; #if __BSD_VISIBLE @@ -183,15 +158,15 @@ struct nstat { uid_t st_uid; /* user ID of the file's owner */ gid_t st_gid; /* group ID of the file's group */ __dev_t st_rdev; /* device type */ - struct timespec st_atimespec; /* time of last access */ - struct timespec st_mtimespec; /* time of last data modification */ - struct timespec st_ctimespec; /* time of last file status change */ + struct timespec st_atim; /* time of last access */ + struct timespec st_mtim; /* time of last data modification */ + struct timespec st_ctim; /* time of last file status change */ off_t st_size; /* file size, in bytes */ blkcnt_t st_blocks; /* blocks allocated for file */ blksize_t st_blksize; /* optimal blocksize for I/O */ fflags_t st_flags; /* user defined flags for file */ __uint32_t st_gen; /* file generation number */ - struct timespec st_birthtimespec; /* time of file creation */ + struct timespec st_birthtim; /* time of file creation */ /* * See above about the following padding. */ @@ -200,13 +175,23 @@ struct nstat { }; #endif +#ifndef _KERNEL +#define st_atime st_atim.tv_sec +#define st_mtime st_mtim.tv_sec +#define st_ctime st_ctim.tv_sec #if __BSD_VISIBLE -#define st_atime st_atimespec.tv_sec -#define st_mtime st_mtimespec.tv_sec -#define st_ctime st_ctimespec.tv_sec -#define st_birthtime st_birthtimespec.tv_sec +#define st_birthtime st_birthtim.tv_sec #endif +/* For compatibility. */ +#if __BSD_VISIBLE +#define st_atimespec st_atim +#define st_mtimespec st_mtim +#define st_ctimespec st_ctim +#define st_birthtimespec st_birthtim +#endif +#endif /* !_KERNEL */ + #define S_ISUID 0004000 /* set user id on execution */ #define S_ISGID 0002000 /* set group id on execution */ #if __BSD_VISIBLE Modified: head/sys/sys/timespec.h ============================================================================== --- head/sys/sys/timespec.h Sun Mar 28 12:55:31 2010 (r205791) +++ head/sys/sys/timespec.h Sun Mar 28 13:13:22 2010 (r205792) @@ -31,22 +31,11 @@ * $FreeBSD$ */ -/* - * Prerequisites: , - */ - #ifndef _SYS_TIMESPEC_H_ #define _SYS_TIMESPEC_H_ -#ifndef _TIME_T_DECLARED -typedef __time_t time_t; -#define _TIME_T_DECLARED -#endif - -struct timespec { - time_t tv_sec; /* seconds */ - long tv_nsec; /* and nanoseconds */ -}; +#include +#include #if __BSD_VISIBLE #define TIMEVAL_TO_TIMESPEC(tv, ts) \ From owner-svn-src-all@FreeBSD.ORG Sun Mar 28 13:16:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E3047106566C; Sun, 28 Mar 2010 13:16:08 +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 CF6278FC0C; Sun, 28 Mar 2010 13:16: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 o2SDG889032057; Sun, 28 Mar 2010 13:16:08 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2SDG8oo032043; Sun, 28 Mar 2010 13:16:08 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201003281316.o2SDG8oo032043@svn.freebsd.org> From: Ed Schouten Date: Sun, 28 Mar 2010 13:16: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: r205793 - in head: bin/cp bin/ls bin/rcp bin/test gnu/usr.bin/diff usr.bin/compress usr.bin/gzip usr.bin/kdump usr.bin/mail usr.bin/touch usr.sbin/mtree X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 28 Mar 2010 13:16:09 -0000 Author: ed Date: Sun Mar 28 13:16:08 2010 New Revision: 205793 URL: http://svn.freebsd.org/changeset/base/205793 Log: Change all our own code to use st_*tim instead of st_*timespec. Also remove some local patches to diff(1) which are now unneeded. Modified: head/bin/cp/utils.c head/bin/ls/cmp.c head/bin/rcp/rcp.c head/bin/test/test.c head/gnu/usr.bin/diff/context.c.diff head/gnu/usr.bin/diff/diff.c.diff head/usr.bin/compress/compress.c head/usr.bin/gzip/gzip.c head/usr.bin/kdump/kdump.c head/usr.bin/mail/util.c head/usr.bin/touch/touch.c head/usr.sbin/mtree/compare.c head/usr.sbin/mtree/create.c Modified: head/bin/cp/utils.c ============================================================================== --- head/bin/cp/utils.c Sun Mar 28 13:13:22 2010 (r205792) +++ head/bin/cp/utils.c Sun Mar 28 13:16:08 2010 (r205793) @@ -323,8 +323,8 @@ setfile(struct stat *fs, int fd) fs->st_mode &= S_ISUID | S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO; - TIMESPEC_TO_TIMEVAL(&tv[0], &fs->st_atimespec); - TIMESPEC_TO_TIMEVAL(&tv[1], &fs->st_mtimespec); + TIMESPEC_TO_TIMEVAL(&tv[0], &fs->st_atim); + TIMESPEC_TO_TIMEVAL(&tv[1], &fs->st_mtim); if (islink ? lutimes(to.p_path, tv) : utimes(to.p_path, tv)) { warn("%sutimes: %s", islink ? "l" : "", to.p_path); rval = 1; Modified: head/bin/ls/cmp.c ============================================================================== --- head/bin/ls/cmp.c Sun Mar 28 13:13:22 2010 (r205792) +++ head/bin/ls/cmp.c Sun Mar 28 13:16:08 2010 (r205793) @@ -66,17 +66,17 @@ int modcmp(const FTSENT *a, const FTSENT *b) { - if (b->fts_statp->st_mtimespec.tv_sec > - a->fts_statp->st_mtimespec.tv_sec) + if (b->fts_statp->st_mtim.tv_sec > + a->fts_statp->st_mtim.tv_sec) return (1); - if (b->fts_statp->st_mtimespec.tv_sec < - a->fts_statp->st_mtimespec.tv_sec) + if (b->fts_statp->st_mtim.tv_sec < + a->fts_statp->st_mtim.tv_sec) return (-1); - if (b->fts_statp->st_mtimespec.tv_nsec > - a->fts_statp->st_mtimespec.tv_nsec) + if (b->fts_statp->st_mtim.tv_nsec > + a->fts_statp->st_mtim.tv_nsec) return (1); - if (b->fts_statp->st_mtimespec.tv_nsec < - a->fts_statp->st_mtimespec.tv_nsec) + if (b->fts_statp->st_mtim.tv_nsec < + a->fts_statp->st_mtim.tv_nsec) return (-1); return (strcoll(a->fts_name, b->fts_name)); } @@ -92,17 +92,17 @@ int acccmp(const FTSENT *a, const FTSENT *b) { - if (b->fts_statp->st_atimespec.tv_sec > - a->fts_statp->st_atimespec.tv_sec) + if (b->fts_statp->st_atim.tv_sec > + a->fts_statp->st_atim.tv_sec) return (1); - if (b->fts_statp->st_atimespec.tv_sec < - a->fts_statp->st_atimespec.tv_sec) + if (b->fts_statp->st_atim.tv_sec < + a->fts_statp->st_atim.tv_sec) return (-1); - if (b->fts_statp->st_atimespec.tv_nsec > - a->fts_statp->st_atimespec.tv_nsec) + if (b->fts_statp->st_atim.tv_nsec > + a->fts_statp->st_atim.tv_nsec) return (1); - if (b->fts_statp->st_atimespec.tv_nsec < - a->fts_statp->st_atimespec.tv_nsec) + if (b->fts_statp->st_atim.tv_nsec < + a->fts_statp->st_atim.tv_nsec) return (-1); return (strcoll(a->fts_name, b->fts_name)); } @@ -118,17 +118,17 @@ int birthcmp(const FTSENT *a, const FTSENT *b) { - if (b->fts_statp->st_birthtimespec.tv_sec > - a->fts_statp->st_birthtimespec.tv_sec) + if (b->fts_statp->st_birthtim.tv_sec > + a->fts_statp->st_birthtim.tv_sec) return (1); - if (b->fts_statp->st_birthtimespec.tv_sec < - a->fts_statp->st_birthtimespec.tv_sec) + if (b->fts_statp->st_birthtim.tv_sec < + a->fts_statp->st_birthtim.tv_sec) return (-1); - if (b->fts_statp->st_birthtimespec.tv_nsec > - a->fts_statp->st_birthtimespec.tv_nsec) + if (b->fts_statp->st_birthtim.tv_nsec > + a->fts_statp->st_birthtim.tv_nsec) return (1); - if (b->fts_statp->st_birthtimespec.tv_nsec < - a->fts_statp->st_birthtimespec.tv_nsec) + if (b->fts_statp->st_birthtim.tv_nsec < + a->fts_statp->st_birthtim.tv_nsec) return (-1); return (strcoll(a->fts_name, b->fts_name)); } @@ -144,17 +144,17 @@ int statcmp(const FTSENT *a, const FTSENT *b) { - if (b->fts_statp->st_ctimespec.tv_sec > - a->fts_statp->st_ctimespec.tv_sec) + if (b->fts_statp->st_ctim.tv_sec > + a->fts_statp->st_ctim.tv_sec) return (1); - if (b->fts_statp->st_ctimespec.tv_sec < - a->fts_statp->st_ctimespec.tv_sec) + if (b->fts_statp->st_ctim.tv_sec < + a->fts_statp->st_ctim.tv_sec) return (-1); - if (b->fts_statp->st_ctimespec.tv_nsec > - a->fts_statp->st_ctimespec.tv_nsec) + if (b->fts_statp->st_ctim.tv_nsec > + a->fts_statp->st_ctim.tv_nsec) return (1); - if (b->fts_statp->st_ctimespec.tv_nsec < - a->fts_statp->st_ctimespec.tv_nsec) + if (b->fts_statp->st_ctim.tv_nsec < + a->fts_statp->st_ctim.tv_nsec) return (-1); return (strcoll(a->fts_name, b->fts_name)); } Modified: head/bin/rcp/rcp.c ============================================================================== --- head/bin/rcp/rcp.c Sun Mar 28 13:13:22 2010 (r205792) +++ head/bin/rcp/rcp.c Sun Mar 28 13:16:08 2010 (r205793) @@ -390,8 +390,8 @@ syserr: run_err("%s: %s", name, strerr * versions expecting microseconds. */ (void)snprintf(buf, sizeof(buf), "T%ld 0 %ld 0\n", - (long)stb.st_mtimespec.tv_sec, - (long)stb.st_atimespec.tv_sec); + (long)stb.st_mtim.tv_sec, + (long)stb.st_atim.tv_sec); (void)write(rem, buf, strlen(buf)); if (response() < 0) goto next; @@ -454,8 +454,8 @@ rsource(char *name, struct stat *statp) last++; if (pflag) { (void)snprintf(path, sizeof(path), "T%ld 0 %ld 0\n", - (long)statp->st_mtimespec.tv_sec, - (long)statp->st_atimespec.tv_sec); + (long)statp->st_mtim.tv_sec, + (long)statp->st_atim.tv_sec); (void)write(rem, path, strlen(path)); if (response() < 0) { closedir(dirp); Modified: head/bin/test/test.c ============================================================================== --- head/bin/test/test.c Sun Mar 28 13:13:22 2010 (r205792) +++ head/bin/test/test.c Sun Mar 28 13:16:08 2010 (r205793) @@ -572,12 +572,12 @@ newerf (const char *f1, const char *f2) if (stat(f1, &b1) != 0 || stat(f2, &b2) != 0) return 0; - if (b1.st_mtimespec.tv_sec > b2.st_mtimespec.tv_sec) + if (b1.st_mtim.tv_sec > b2.st_mtim.tv_sec) return 1; - if (b1.st_mtimespec.tv_sec < b2.st_mtimespec.tv_sec) + if (b1.st_mtim.tv_sec < b2.st_mtim.tv_sec) return 0; - return (b1.st_mtimespec.tv_nsec > b2.st_mtimespec.tv_nsec); + return (b1.st_mtim.tv_nsec > b2.st_mtim.tv_nsec); } static int Modified: head/gnu/usr.bin/diff/context.c.diff ============================================================================== --- head/gnu/usr.bin/diff/context.c.diff Sun Mar 28 13:13:22 2010 (r205792) +++ head/gnu/usr.bin/diff/context.c.diff Sun Mar 28 13:16:08 2010 (r205793) @@ -15,7 +15,7 @@ $FreeBSD$ INT_STRLEN_BOUND (time_t) + 11)]; struct tm const *tm = localtime (&inf->stat.st_mtime); - int nsec = TIMESPEC_NS (inf->stat.st_mtim); -+ long nsec = TIMESPEC_NS (inf->stat.st_mtimespec); ++ long nsec = TIMESPEC_NS (inf->stat.st_mtim); if (! (tm && nstrftime (buf, sizeof buf, time_format, tm, 0, nsec))) { - long int sec = inf->stat.st_mtime; Modified: head/gnu/usr.bin/diff/diff.c.diff ============================================================================== --- head/gnu/usr.bin/diff/diff.c.diff Sun Mar 28 13:13:22 2010 (r205792) +++ head/gnu/usr.bin/diff/diff.c.diff Sun Mar 28 13:16:08 2010 (r205793) @@ -49,21 +49,3 @@ $FreeBSD$ output_style = style; } } -@@ -997,7 +1001,7 @@ - #ifdef ST_MTIM_NSEC - - # if HAVE_CLOCK_GETTIME && defined CLOCK_REALTIME -- if (clock_gettime (CLOCK_REALTIME, &st->st_mtim) == 0) -+ if (clock_gettime (CLOCK_REALTIME, &st->st_mtimespec) == 0) - return; - # endif - -@@ -1007,7 +1011,7 @@ - if (gettimeofday (&timeval, 0) == 0) - { - st->st_mtime = timeval.tv_sec; -- st->st_mtim.ST_MTIM_NSEC = timeval.tv_usec * 1000; -+ st->st_mtimespec.ST_MTIM_NSEC = timeval.tv_usec * 1000; - return; - } - } Modified: head/usr.bin/compress/compress.c ============================================================================== --- head/usr.bin/compress/compress.c Sun Mar 28 13:13:22 2010 (r205792) +++ head/usr.bin/compress/compress.c Sun Mar 28 13:16:08 2010 (r205793) @@ -368,8 +368,8 @@ setfile(const char *name, struct stat *f fs->st_mode &= S_ISUID|S_ISGID|S_IRWXU|S_IRWXG|S_IRWXO; - TIMESPEC_TO_TIMEVAL(&tv[0], &fs->st_atimespec); - TIMESPEC_TO_TIMEVAL(&tv[1], &fs->st_mtimespec); + TIMESPEC_TO_TIMEVAL(&tv[0], &fs->st_atim); + TIMESPEC_TO_TIMEVAL(&tv[1], &fs->st_mtim); if (utimes(name, tv)) cwarn("utimes: %s", name); Modified: head/usr.bin/gzip/gzip.c ============================================================================== --- head/usr.bin/gzip/gzip.c Sun Mar 28 13:13:22 2010 (r205792) +++ head/usr.bin/gzip/gzip.c Sun Mar 28 13:16:08 2010 (r205793) @@ -1088,8 +1088,8 @@ copymodes(int fd, const struct stat *sbp if (fchmod(fd, sb.st_mode) < 0) maybe_warn("couldn't fchmod: %s", file); - TIMESPEC_TO_TIMEVAL(×[0], &sb.st_atimespec); - TIMESPEC_TO_TIMEVAL(×[1], &sb.st_mtimespec); + TIMESPEC_TO_TIMEVAL(×[0], &sb.st_atim); + TIMESPEC_TO_TIMEVAL(×[1], &sb.st_mtim); if (futimes(fd, times) < 0) maybe_warn("couldn't utimes: %s", file); Modified: head/usr.bin/kdump/kdump.c ============================================================================== --- head/usr.bin/kdump/kdump.c Sun Mar 28 13:13:22 2010 (r205792) +++ head/usr.bin/kdump/kdump.c Sun Mar 28 13:16:08 2010 (r205793) @@ -1270,50 +1270,50 @@ ktrstat(struct stat *statp) printf("rdev=%ju, ", (uintmax_t)statp->st_rdev); printf("atime="); if (resolv == 0) - printf("%jd", (intmax_t)statp->st_atimespec.tv_sec); + printf("%jd", (intmax_t)statp->st_atim.tv_sec); else { - tm = localtime(&statp->st_atimespec.tv_sec); + tm = localtime(&statp->st_atim.tv_sec); (void)strftime(timestr, sizeof(timestr), TIME_FORMAT, tm); printf("\"%s\"", timestr); } - if (statp->st_atimespec.tv_nsec != 0) - printf(".%09ld, ", statp->st_atimespec.tv_nsec); + if (statp->st_atim.tv_nsec != 0) + printf(".%09ld, ", statp->st_atim.tv_nsec); else printf(", "); printf("stime="); if (resolv == 0) - printf("%jd", (intmax_t)statp->st_mtimespec.tv_sec); + printf("%jd", (intmax_t)statp->st_mtim.tv_sec); else { - tm = localtime(&statp->st_mtimespec.tv_sec); + tm = localtime(&statp->st_mtim.tv_sec); (void)strftime(timestr, sizeof(timestr), TIME_FORMAT, tm); printf("\"%s\"", timestr); } - if (statp->st_mtimespec.tv_nsec != 0) - printf(".%09ld, ", statp->st_mtimespec.tv_nsec); + if (statp->st_mtim.tv_nsec != 0) + printf(".%09ld, ", statp->st_mtim.tv_nsec); else printf(", "); printf("ctime="); if (resolv == 0) - printf("%jd", (intmax_t)statp->st_ctimespec.tv_sec); + printf("%jd", (intmax_t)statp->st_ctim.tv_sec); else { - tm = localtime(&statp->st_ctimespec.tv_sec); + tm = localtime(&statp->st_ctim.tv_sec); (void)strftime(timestr, sizeof(timestr), TIME_FORMAT, tm); printf("\"%s\"", timestr); } - if (statp->st_ctimespec.tv_nsec != 0) - printf(".%09ld, ", statp->st_ctimespec.tv_nsec); + if (statp->st_ctim.tv_nsec != 0) + printf(".%09ld, ", statp->st_ctim.tv_nsec); else printf(", "); printf("birthtime="); if (resolv == 0) - printf("%jd", (intmax_t)statp->st_birthtimespec.tv_sec); + printf("%jd", (intmax_t)statp->st_birthtim.tv_sec); else { - tm = localtime(&statp->st_birthtimespec.tv_sec); + tm = localtime(&statp->st_birthtim.tv_sec); (void)strftime(timestr, sizeof(timestr), TIME_FORMAT, tm); printf("\"%s\"", timestr); } - if (statp->st_birthtimespec.tv_nsec != 0) - printf(".%09ld, ", statp->st_birthtimespec.tv_nsec); + if (statp->st_birthtim.tv_nsec != 0) + printf(".%09ld, ", statp->st_birthtim.tv_nsec); else printf(", "); printf("size=%jd, blksize=%ju, blocks=%jd, flags=0x%x", Modified: head/usr.bin/mail/util.c ============================================================================== --- head/usr.bin/mail/util.c Sun Mar 28 13:13:22 2010 (r205792) +++ head/usr.bin/mail/util.c Sun Mar 28 13:16:08 2010 (r205793) @@ -349,7 +349,7 @@ alter(name) return; (void)gettimeofday(&tv[0], (struct timezone *)NULL); tv[0].tv_sec++; - TIMESPEC_TO_TIMEVAL(&tv[1], &sb.st_mtimespec); + TIMESPEC_TO_TIMEVAL(&tv[1], &sb.st_mtim); (void)utimes(name, tv); } Modified: head/usr.bin/touch/touch.c ============================================================================== --- head/usr.bin/touch/touch.c Sun Mar 28 13:13:22 2010 (r205792) +++ head/usr.bin/touch/touch.c Sun Mar 28 13:16:08 2010 (r205793) @@ -187,9 +187,9 @@ main(int argc, char *argv[]) } if (!aflag) - TIMESPEC_TO_TIMEVAL(&tv[0], &sb.st_atimespec); + TIMESPEC_TO_TIMEVAL(&tv[0], &sb.st_atim); if (!mflag) - TIMESPEC_TO_TIMEVAL(&tv[1], &sb.st_mtimespec); + TIMESPEC_TO_TIMEVAL(&tv[1], &sb.st_mtim); /* * We're adjusting the times based on the file times, not a @@ -197,11 +197,11 @@ main(int argc, char *argv[]) */ if (Aflag) { if (aflag) { - TIMESPEC_TO_TIMEVAL(&tv[0], &sb.st_atimespec); + TIMESPEC_TO_TIMEVAL(&tv[0], &sb.st_atim); tv[0].tv_sec += Aflag; } if (mflag) { - TIMESPEC_TO_TIMEVAL(&tv[1], &sb.st_mtimespec); + TIMESPEC_TO_TIMEVAL(&tv[1], &sb.st_mtim); tv[1].tv_sec += Aflag; } } @@ -368,8 +368,8 @@ stime_file(char *fname, struct timeval * if (stat(fname, &sb)) err(1, "%s", fname); - TIMESPEC_TO_TIMEVAL(tvp, &sb.st_atimespec); - TIMESPEC_TO_TIMEVAL(tvp + 1, &sb.st_mtimespec); + TIMESPEC_TO_TIMEVAL(tvp, &sb.st_atim); + TIMESPEC_TO_TIMEVAL(tvp + 1, &sb.st_mtim); } int Modified: head/usr.sbin/mtree/compare.c ============================================================================== --- head/usr.sbin/mtree/compare.c Sun Mar 28 13:13:22 2010 (r205792) +++ head/usr.sbin/mtree/compare.c Sun Mar 28 13:16:08 2010 (r205793) @@ -181,13 +181,13 @@ typeerr: LABEL; * Catches nano-second differences, but doesn't display them. */ if ((s->flags & F_TIME) && - ((s->st_mtimespec.tv_sec != p->fts_statp->st_mtimespec.tv_sec) || - (s->st_mtimespec.tv_nsec != p->fts_statp->st_mtimespec.tv_nsec))) { + ((s->st_mtimespec.tv_sec != p->fts_statp->st_mtim.tv_sec) || + (s->st_mtimespec.tv_nsec != p->fts_statp->st_mtim.tv_nsec))) { LABEL; (void)printf("%smodification time expected %.24s ", tab, ctime(&s->st_mtimespec.tv_sec)); (void)printf("found %.24s", - ctime(&p->fts_statp->st_mtimespec.tv_sec)); + ctime(&p->fts_statp->st_mtim.tv_sec)); if (uflag) { tv[0].tv_sec = s->st_mtimespec.tv_sec; tv[0].tv_usec = s->st_mtimespec.tv_nsec / 1000; Modified: head/usr.sbin/mtree/create.c ============================================================================== --- head/usr.sbin/mtree/create.c Sun Mar 28 13:13:22 2010 (r205792) +++ head/usr.sbin/mtree/create.c Sun Mar 28 13:16:08 2010 (r205793) @@ -213,8 +213,8 @@ statf(int indent, FTSENT *p) (intmax_t)p->fts_statp->st_size); if (keys & F_TIME) output(indent, &offset, "time=%ld.%09ld", - (long)p->fts_statp->st_mtimespec.tv_sec, - p->fts_statp->st_mtimespec.tv_nsec); + (long)p->fts_statp->st_mtim.tv_sec, + p->fts_statp->st_mtim.tv_nsec); if (keys & F_CKSUM && S_ISREG(p->fts_statp->st_mode)) { if ((fd = open(p->fts_accpath, O_RDONLY, 0)) < 0 || crc(fd, &val, &len)) From owner-svn-src-all@FreeBSD.ORG Sun Mar 28 13:40:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 21DF91065676; Sun, 28 Mar 2010 13:40:16 +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 EA7018FC1E; Sun, 28 Mar 2010 13: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 o2SDeFCn037426; Sun, 28 Mar 2010 13:40:15 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2SDeFXD037424; Sun, 28 Mar 2010 13:40:15 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201003281340.o2SDeFXD037424@svn.freebsd.org> From: Ed Schouten Date: Sun, 28 Mar 2010 13:40: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: r205794 - 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: Sun, 28 Mar 2010 13:40:16 -0000 Author: ed Date: Sun Mar 28 13:40:13 2010 New Revision: 205794 URL: http://svn.freebsd.org/changeset/base/205794 Log: Don't forget to bump the date in the man page. Modified: head/lib/libc/sys/stat.2 Modified: head/lib/libc/sys/stat.2 ============================================================================== --- head/lib/libc/sys/stat.2 Sun Mar 28 13:16:08 2010 (r205793) +++ head/lib/libc/sys/stat.2 Sun Mar 28 13:40:13 2010 (r205794) @@ -28,7 +28,7 @@ .\" @(#)stat.2 8.4 (Berkeley) 5/1/95 .\" $FreeBSD$ .\" -.Dd April 10, 2008 +.Dd March 28, 2010 .Dt STAT 2 .Os .Sh NAME From owner-svn-src-all@FreeBSD.ORG Sun Mar 28 17:17:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D7F5106564A; Sun, 28 Mar 2010 17:17:33 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0BC378FC26; Sun, 28 Mar 2010 17:17: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 o2SHHWP3085203; Sun, 28 Mar 2010 17:17:32 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2SHHW4f085202; Sun, 28 Mar 2010 17:17:32 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201003281717.o2SHHW4f085202@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 28 Mar 2010 17:17: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: r205795 - head/sys/powerpc/ofw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 28 Mar 2010 17:17:33 -0000 Author: nwhitehorn Date: Sun Mar 28 17:17:32 2010 New Revision: 205795 URL: http://svn.freebsd.org/changeset/base/205795 Log: Set hw.ofwfb.relax_mmap=1 by default. While these checks may be a good idea in principle, X does not work without them on basically any hardware, and this is probably the most frequent problem people run into on PowerPC. Prodded by: rnoland MFC after: 1 week Modified: head/sys/powerpc/ofw/ofw_syscons.c Modified: head/sys/powerpc/ofw/ofw_syscons.c ============================================================================== --- head/sys/powerpc/ofw/ofw_syscons.c Sun Mar 28 13:40:13 2010 (r205794) +++ head/sys/powerpc/ofw/ofw_syscons.c Sun Mar 28 17:17:32 2010 (r205795) @@ -55,10 +55,10 @@ __FBSDID("$FreeBSD$"); #include #include -static int ofwfb_ignore_mmap_checks; +static int ofwfb_ignore_mmap_checks = 1; SYSCTL_NODE(_hw, OID_AUTO, ofwfb, CTLFLAG_RD, 0, "ofwfb"); SYSCTL_INT(_hw_ofwfb, OID_AUTO, relax_mmap, CTLFLAG_RW, - &ofwfb_ignore_mmap_checks, 0, "relax mmap bounds checking"); + &ofwfb_ignore_mmap_checks, 0, "relaxed mmap bounds checking"); extern u_char dflt_font_16[]; extern u_char dflt_font_14[]; From owner-svn-src-all@FreeBSD.ORG Sun Mar 28 17:29:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DFBE7106566C; Sun, 28 Mar 2010 17:29:15 +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 CE20F8FC13; Sun, 28 Mar 2010 17:29: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 o2SHTF3m087816; Sun, 28 Mar 2010 17:29:15 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2SHTFg3087814; Sun, 28 Mar 2010 17:29:15 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201003281729.o2SHTFg3087814@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sun, 28 Mar 2010 17:29: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: r205796 - head/lib/libc/posix1e X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 28 Mar 2010 17:29:16 -0000 Author: trasz Date: Sun Mar 28 17:29:15 2010 New Revision: 205796 URL: http://svn.freebsd.org/changeset/base/205796 Log: Make acl_to_text_np(3) not crash on long group or user names in NFSv4 ACLs. PR: amd64/145091 MFC after: 2 weeks Modified: head/lib/libc/posix1e/acl_to_text_nfs4.c Modified: head/lib/libc/posix1e/acl_to_text_nfs4.c ============================================================================== --- head/lib/libc/posix1e/acl_to_text_nfs4.c Sun Mar 28 17:17:32 2010 (r205795) +++ head/lib/libc/posix1e/acl_to_text_nfs4.c Sun Mar 28 17:29:15 2010 (r205796) @@ -167,7 +167,7 @@ format_additional_id(char *str, size_t s static int format_entry(char *str, size_t size, const acl_entry_t entry, int flags) { - size_t off = 0, padding_length, maximum_who_field_length = 18; + size_t off = 0, min_who_field_length = 18; acl_permset_t permset; acl_flagset_t flagset; int error, len; @@ -188,12 +188,9 @@ format_entry(char *str, size_t size, con if (error) return (error); len = strlen(buf); - padding_length = maximum_who_field_length - len; - if (padding_length > 0) { - memset(str, ' ', padding_length); - off += padding_length; - } - off += snprintf(str + off, size - off, "%s:", buf); + if (len < min_who_field_length) + len = min_who_field_length; + off += snprintf(str + off, size - off, "%*s:", len, buf); error = _nfs4_format_access_mask(buf, sizeof(buf), *permset, flags & ACL_TEXT_VERBOSE); From owner-svn-src-all@FreeBSD.ORG Sun Mar 28 18:43:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E54131065676; Sun, 28 Mar 2010 18:43:04 +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 D3BFE8FC13; Sun, 28 Mar 2010 18:43: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 o2SIh4sB007117; Sun, 28 Mar 2010 18:43:04 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2SIh4oa007115; Sun, 28 Mar 2010 18:43:04 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201003281843.o2SIh4oa007115@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sun, 28 Mar 2010 18:43: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: r205797 - 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: Sun, 28 Mar 2010 18:43:05 -0000 Author: trasz Date: Sun Mar 28 18:43:04 2010 New Revision: 205797 URL: http://svn.freebsd.org/changeset/base/205797 Log: MFC r203549: Add missing coma. Modified: stable/8/share/man/man9/mtx_pool.9 Directory Properties: stable/8/share/man/man9/ (props changed) Modified: stable/8/share/man/man9/mtx_pool.9 ============================================================================== --- stable/8/share/man/man9/mtx_pool.9 Sun Mar 28 17:29:15 2010 (r205796) +++ stable/8/share/man/man9/mtx_pool.9 Sun Mar 28 18:43:04 2010 (r205797) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 25, 2002 +.Dd February 6, 2010 .Dt MTX_POOL 9 .Os .Sh NAME @@ -177,7 +177,7 @@ on each mutex in the specified pool, deallocates the memory associated with the pool, and assigns NULL to the pool pointer. .Sh SEE ALSO -.Xr locking 9 +.Xr locking 9 , .Xr mutex 9 .Sh HISTORY These routines first appeared in From owner-svn-src-all@FreeBSD.ORG Sun Mar 28 18:44:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2CC38106566B; Sun, 28 Mar 2010 18:44:55 +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 1B33E8FC1A; Sun, 28 Mar 2010 18:44: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 o2SIitnM007944; Sun, 28 Mar 2010 18:44:55 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2SIis4N007942; Sun, 28 Mar 2010 18:44:54 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201003281844.o2SIis4N007942@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sun, 28 Mar 2010 18:44:54 +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: r205798 - 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: Sun, 28 Mar 2010 18:44:55 -0000 Author: trasz Date: Sun Mar 28 18:44:54 2010 New Revision: 205798 URL: http://svn.freebsd.org/changeset/base/205798 Log: MFC r203721: Add references to VOP_* man pages to vnode(9). Modified: stable/8/share/man/man9/vnode.9 Directory Properties: stable/8/share/man/man9/ (props changed) Modified: stable/8/share/man/man9/vnode.9 ============================================================================== --- stable/8/share/man/man9/vnode.9 Sun Mar 28 18:43:04 2010 (r205797) +++ stable/8/share/man/man9/vnode.9 Sun Mar 28 18:44:54 2010 (r205798) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 20, 2003 +.Dd February 9, 2010 .Os .Dt VNODE 9 .Sh NAME @@ -161,6 +161,38 @@ interlock, will cause a LOR (Lock Order intertwining of VM Objects and Vnodes. .Sh SEE ALSO .Xr malloc 9 , +.Xr VOP_ACCESS 9 , +.Xr VOP_ACLCHECK 9 , +.Xr VOP_ADVLOCK 9 , +.Xr VOP_ATTRIB 9 , +.Xr VOP_BWRITE 9 , +.Xr VOP_CREATE 9 , +.Xr VOP_FSYNC 9 , +.Xr VOP_GETACL 9 , +.Xr VOP_GETEXTATTR 9 , +.Xr VOP_GETPAGES 9 , +.Xr VOP_GETVOBJECT 9 , +.Xr VOP_INACTIVE 9 , +.Xr VOP_IOCTL 9 , +.Xr VOP_LINK 9 , +.Xr VOP_LISTEXTATTR 9 , +.Xr VOP_LOCK 9 , +.Xr VOP_LOOKUP 9 , +.Xr VOP_OPENCLOSE 9 , +.Xr VOP_PATHCONF 9 , +.Xr VOP_PRINT 9 , +.Xr VOP_RDWR 9 , +.Xr VOP_READDIR 9 , +.Xr VOP_READLINK 9 , +.Xr VOP_REALLOCBLKS 9 , +.Xr VOP_REMOVE 9 , +.Xr VOP_RENAME 9 , +.Xr VOP_REVOKE 9 , +.Xr VOP_SETACL 9 , +.Xr VOP_SETEXTATTR 9 , +.Xr VOP_STRATEGY 9 , +.Xr VOP_VPTOCNP 9 , +.Xr VOP_VPTOFH 9 , .Xr VFS 9 .Sh AUTHORS This manual page was written by From owner-svn-src-all@FreeBSD.ORG Sun Mar 28 18:46:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 861FE106564A; Sun, 28 Mar 2010 18:46:01 +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 74E808FC0C; Sun, 28 Mar 2010 18:46: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 o2SIk1sG008422; Sun, 28 Mar 2010 18:46:01 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2SIk1uQ008420; Sun, 28 Mar 2010 18:46:01 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201003281846.o2SIk1uQ008420@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sun, 28 Mar 2010 18:46: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: r205799 - 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: Sun, 28 Mar 2010 18:46:01 -0000 Author: trasz Date: Sun Mar 28 18:46:01 2010 New Revision: 205799 URL: http://svn.freebsd.org/changeset/base/205799 Log: MFC r203824: Fix VBAD description. Modified: stable/8/share/man/man9/vnode.9 Directory Properties: stable/8/share/man/man9/ (props changed) Modified: stable/8/share/man/man9/vnode.9 ============================================================================== --- stable/8/share/man/man9/vnode.9 Sun Mar 28 18:44:54 2010 (r205798) +++ stable/8/share/man/man9/vnode.9 Sun Mar 28 18:46:01 2010 (r205799) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 9, 2010 +.Dd February 13, 2010 .Os .Dt VNODE 9 .Sh NAME @@ -137,7 +137,7 @@ Advisory locking will not work on this. A FIFO (named pipe). Advisory locking will not work on this. .It Dv VBAD -An old style bad sector map +Indicates that the vnode has been reclaimed. .El .Sh IMPLEMENTATION NOTES VFIFO uses the "struct fileops" from From owner-svn-src-all@FreeBSD.ORG Sun Mar 28 19:34:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE7C3106566B; Sun, 28 Mar 2010 19:34:57 +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 DB5A68FC0A; Sun, 28 Mar 2010 19:34: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 o2SJYvrs022900; Sun, 28 Mar 2010 19:34:57 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2SJYvSq022890; Sun, 28 Mar 2010 19:34:57 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201003281934.o2SJYvSq022890@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 28 Mar 2010 19:34:57 +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: r205800 - in stable/8/tools/regression/bin/sh: builtins errors expansion parser X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 28 Mar 2010 19:34:58 -0000 Author: jilles Date: Sun Mar 28 19:34:57 2010 New Revision: 205800 URL: http://svn.freebsd.org/changeset/base/205800 Log: MFC r196607,r198453,r204016,r204017,r204836,r204842,r205105,r205153 Various testcases that work correctly with stable/8 sh. Note: this creates some gaps in the numbering due to lower-numbered tests for new functionality which is not or not yet MFC'ed. Added: stable/8/tools/regression/bin/sh/builtins/eval3.0 - copied unchanged from r196607, head/tools/regression/bin/sh/builtins/eval3.0 stable/8/tools/regression/bin/sh/errors/redirection-error5.0 - copied unchanged from r205153, head/tools/regression/bin/sh/errors/redirection-error5.0 stable/8/tools/regression/bin/sh/expansion/arith3.0 - copied unchanged from r204017, head/tools/regression/bin/sh/expansion/arith3.0 stable/8/tools/regression/bin/sh/expansion/assign1.0 - copied unchanged from r204842, head/tools/regression/bin/sh/expansion/assign1.0 stable/8/tools/regression/bin/sh/expansion/cmdsubst2.0 - copied unchanged from r205105, head/tools/regression/bin/sh/expansion/cmdsubst2.0 stable/8/tools/regression/bin/sh/expansion/plus-minus1.0 - copied unchanged from r204842, head/tools/regression/bin/sh/expansion/plus-minus1.0 stable/8/tools/regression/bin/sh/expansion/question1.0 - copied unchanged from r198453, head/tools/regression/bin/sh/expansion/question1.0 stable/8/tools/regression/bin/sh/expansion/set-u1.0 - copied unchanged from r198453, head/tools/regression/bin/sh/expansion/set-u1.0 stable/8/tools/regression/bin/sh/parser/heredoc1.0 - copied unchanged from r204836, head/tools/regression/bin/sh/parser/heredoc1.0 Modified: stable/8/tools/regression/bin/sh/expansion/arith2.0 Directory Properties: stable/8/tools/regression/bin/sh/ (props changed) Copied: stable/8/tools/regression/bin/sh/builtins/eval3.0 (from r196607, head/tools/regression/bin/sh/builtins/eval3.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/bin/sh/builtins/eval3.0 Sun Mar 28 19:34:57 2010 (r205800, copy of r196607, head/tools/regression/bin/sh/builtins/eval3.0) @@ -0,0 +1,9 @@ +# $FreeBSD$ + +eval 'false;' && exit 1 +eval 'true;' || exit 1 +eval 'false; +' && exit 1 +eval 'true; +' || exit 1 +exit 0 Copied: stable/8/tools/regression/bin/sh/errors/redirection-error5.0 (from r205153, head/tools/regression/bin/sh/errors/redirection-error5.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/bin/sh/errors/redirection-error5.0 Sun Mar 28 19:34:57 2010 (r205800, copy of r205153, head/tools/regression/bin/sh/errors/redirection-error5.0) @@ -0,0 +1,5 @@ +# $FreeBSD$ +# A redirection error on a subshell should not abort the shell. +exec 2>/dev/null +( echo bad ) 0)) Copied: stable/8/tools/regression/bin/sh/expansion/plus-minus1.0 (from r204842, head/tools/regression/bin/sh/expansion/plus-minus1.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/bin/sh/expansion/plus-minus1.0 Sun Mar 28 19:34:57 2010 (r205800, copy of r204842, head/tools/regression/bin/sh/expansion/plus-minus1.0) @@ -0,0 +1,81 @@ +# $FreeBSD$ + +e= q='?' a='*' t=texttext s='ast*que?non' p='/et[c]/' w='a b c' b='{{(#)}}' +h='##' +failures='' +ok='' + +testcase() { + code="$1" + expected="$2" + oIFS="$IFS" + eval "$code" + IFS='|' + result="$#|$*" + IFS="$oIFS" + if [ "x$result" = "x$expected" ]; then + ok=x$ok + else + failures=x$failures + echo "For $code, expected $expected actual $result" + fi +} + +testcase 'set -- a b' '2|a|b' +testcase 'set --' '0|' +testcase 'set -- ${e}' '0|' +testcase 'set -- "${e}"' '1|' + +testcase 'set -- $p' '1|/etc/' +testcase 'set -- "$p"' '1|/et[c]/' +testcase 'set -- ${s+$p}' '1|/etc/' +testcase 'set -- "${s+$p}"' '1|/et[c]/' +testcase 'set -- ${s+"$p"}' '1|/et[c]/' +# Dquotes in dquotes is undefined for Bourne shell operators +#testcase 'set -- "${s+"$p"}"' '1|/et[c]/' +testcase 'set -- ${e:-$p}' '1|/etc/' +testcase 'set -- "${e:-$p}"' '1|/et[c]/' +testcase 'set -- ${e:-"$p"}' '1|/et[c]/' +# Dquotes in dquotes is undefined for Bourne shell operators +#testcase 'set -- "${e:-"$p"}"' '1|/et[c]/' +testcase 'set -- ${e:+"$e"}' '0|' +testcase 'set -- ${e:+$w"$e"}' '0|' +testcase 'set -- ${w:+"$w"}' '1|a b c' +testcase 'set -- ${w:+$w"$w"}' '3|a|b|ca b c' + +# These two are known broken in FreeBSD /bin/sh +#testcase 'set -- ${s+a b}' '2|a|b' +#testcase 'set -- ${e:-a b}' '2|a|b' +testcase 'set -- "${s+a b}"' '1|a b' +testcase 'set -- "${e:-a b}"' '1|a b' +testcase 'set -- ${e:-\}}' '1|}' +# Currently broken in FreeBSD /bin/sh +#testcase 'set -- "${e:-\}}"' '1|}' +testcase 'set -- ${e:+{}}' '1|}' +testcase 'set -- "${e:+{}}"' '1|}' + +testcase 'set -- ${e+x}${e+x}' '1|xx' +testcase 'set -- "${e+x}"${e+x}' '1|xx' +testcase 'set -- ${e+x}"${e+x}"' '1|xx' +testcase 'set -- "${e+x}${e+x}"' '1|xx' +testcase 'set -- "${e+x}""${e+x}"' '1|xx' + +testcase 'set -- ${e:-${e:-$p}}' '1|/etc/' +testcase 'set -- "${e:-${e:-$p}}"' '1|/et[c]/' +testcase 'set -- ${e:-"${e:-$p}"}' '1|/et[c]/' +testcase 'set -- ${e:-${e:-"$p"}}' '1|/et[c]/' +testcase 'set -- ${e:-${e:-${e:-$w}}}' '3|a|b|c' +testcase 'set -- ${e:-${e:-${e:-"$w"}}}' '1|a b c' +testcase 'set -- ${e:-${e:-"${e:-$w}"}}' '1|a b c' +testcase 'set -- ${e:-"${e:-${e:-$w}}"}' '1|a b c' +testcase 'set -- "${e:-${e:-${e:-$w}}}"' '1|a b c' + +testcase 'shift $#; set -- ${1+"$@"}' '0|' +testcase 'set -- ""; set -- ${1+"$@"}' '1|' +testcase 'set -- "" a; set -- ${1+"$@"}' '2||a' +testcase 'set -- a ""; set -- ${1+"$@"}' '2|a|' +testcase 'set -- a b; set -- ${1+"$@"}' '2|a|b' +testcase 'set -- a\ b; set -- ${1+"$@"}' '1|a b' +testcase 'set -- " " ""; set -- ${1+"$@"}' '2| |' + +test "x$failures" = x Copied: stable/8/tools/regression/bin/sh/expansion/question1.0 (from r198453, head/tools/regression/bin/sh/expansion/question1.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/bin/sh/expansion/question1.0 Sun Mar 28 19:34:57 2010 (r205800, copy of r198453, head/tools/regression/bin/sh/expansion/question1.0) @@ -0,0 +1,22 @@ +# $FreeBSD$ + +x=a\ b +[ "$x" = "${x?}" ] || exit 1 +set -- ${x?} +{ [ "$#" = 2 ] && [ "$1" = a ] && [ "$2" = b ]; } || exit 1 +unset x +(echo ${x?abcdefg}) 2>&1 | grep -q abcdefg || exit 1 +sh -c 'unset foo; echo ${foo?}' 2>/dev/null && exit 1 +sh -c 'foo=; echo ${foo:?}' 2>/dev/null && exit 1 +sh -c 'foo=; echo ${foo?}' >/dev/null || exit 1 +sh -c 'foo=1; echo ${foo:?}' >/dev/null || exit 1 +sh -c 'echo ${!?}' 2>/dev/null && exit 1 +sh -c ':& echo ${!?}' >/dev/null || exit 1 +sh -c 'echo ${#?}' >/dev/null || exit 1 +sh -c 'echo ${*?}' 2>/dev/null && exit 1 +sh -c 'echo ${*?}' sh x >/dev/null || exit 1 +sh -c 'echo ${1?}' 2>/dev/null && exit 1 +sh -c 'echo ${1?}' sh x >/dev/null || exit 1 +sh -c 'echo ${2?}' sh x 2>/dev/null && exit 1 +sh -c 'echo ${2?}' sh x y >/dev/null || exit 1 +exit 0 Copied: stable/8/tools/regression/bin/sh/expansion/set-u1.0 (from r198453, head/tools/regression/bin/sh/expansion/set-u1.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/bin/sh/expansion/set-u1.0 Sun Mar 28 19:34:57 2010 (r205800, copy of r198453, head/tools/regression/bin/sh/expansion/set-u1.0) @@ -0,0 +1,29 @@ +# $FreeBSD$ + +sh -uc 'unset foo; echo $foo' 2>/dev/null && exit 1 +sh -uc 'foo=; echo $foo' >/dev/null || exit 1 +sh -uc 'foo=1; echo $foo' >/dev/null || exit 1 +# -/+/= are unaffected by set -u +sh -uc 'unset foo; echo ${foo-}' >/dev/null || exit 1 +sh -uc 'unset foo; echo ${foo+}' >/dev/null || exit 1 +sh -uc 'unset foo; echo ${foo=}' >/dev/null || exit 1 +# length/trimming are affected +sh -uc 'unset foo; echo ${#foo}' 2>/dev/null && exit 1 +sh -uc 'foo=; echo ${#foo}' >/dev/null || exit 1 +sh -uc 'unset foo; echo ${foo#?}' 2>/dev/null && exit 1 +sh -uc 'foo=1; echo ${foo#?}' >/dev/null || exit 1 +sh -uc 'unset foo; echo ${foo##?}' 2>/dev/null && exit 1 +sh -uc 'foo=1; echo ${foo##?}' >/dev/null || exit 1 +sh -uc 'unset foo; echo ${foo%?}' 2>/dev/null && exit 1 +sh -uc 'foo=1; echo ${foo%?}' >/dev/null || exit 1 +sh -uc 'unset foo; echo ${foo%%?}' 2>/dev/null && exit 1 +sh -uc 'foo=1; echo ${foo%%?}' >/dev/null || exit 1 + +sh -uc 'echo $!' 2>/dev/null && exit 1 +sh -uc ':& echo $!' >/dev/null || exit 1 +sh -uc 'echo $#' >/dev/null || exit 1 +sh -uc 'echo $1' 2>/dev/null && exit 1 +sh -uc 'echo $1' sh x >/dev/null || exit 1 +sh -uc 'echo $2' sh x 2>/dev/null && exit 1 +sh -uc 'echo $2' sh x y >/dev/null || exit 1 +exit 0 Copied: stable/8/tools/regression/bin/sh/parser/heredoc1.0 (from r204836, head/tools/regression/bin/sh/parser/heredoc1.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/bin/sh/parser/heredoc1.0 Sun Mar 28 19:34:57 2010 (r205800, copy of r204836, head/tools/regression/bin/sh/parser/heredoc1.0) @@ -0,0 +1,85 @@ +# $FreeBSD$ + +failures=0 + +check() { + if ! eval "[ $* ]"; then + echo "Failed: $*" + : $((failures += 1)) + fi +} + +check '"$(cat < Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 01534106566B; Sun, 28 Mar 2010 20:02:14 +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 E5B1F8FC14; Sun, 28 Mar 2010 20:02: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 o2SK2DLf029785; Sun, 28 Mar 2010 20:02:13 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2SK2DMo029783; Sun, 28 Mar 2010 20:02:13 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201003282002.o2SK2DMo029783@svn.freebsd.org> From: Andrew Thompson Date: Sun, 28 Mar 2010 20:02: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: r205801 - 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, 28 Mar 2010 20:02:14 -0000 Author: thompsa Date: Sun Mar 28 20:02:13 2010 New Revision: 205801 URL: http://svn.freebsd.org/changeset/base/205801 Log: Add a couple of usb product IDs. Submitted by: Dmitry Luhtionov @ gmail.com Modified: head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Sun Mar 28 19:34:57 2010 (r205800) +++ head/sys/dev/usb/usbdevs Sun Mar 28 20:02:13 2010 (r205801) @@ -2516,12 +2516,14 @@ product QUALCOMMINC E2003 0x2003 3G mode /* Quanta products */ /* Quanta products */ +product QUANTA RW6815_1 0x00ce HP iPAQ rw6815 product QUANTA RT3070 0x0304 RT3070 product QUANTA Q101 0xea02 HSDPA modem product QUANTA Q111 0xea03 HSDPA modem product QUANTA GLX 0xea04 HSDPA modem product QUANTA GKE 0xea05 HSDPA modem product QUANTA GLE 0xea06 HSDPA modem +product QUANTA RW6815_2 0xf003 HP iPAQ rw6815 /* Qtronix products */ product QTRONIX 980N 0x2011 Scorpion-980N keyboard @@ -2729,6 +2731,7 @@ product SIERRA AIRCARD875 0x6820 Aircard product SIERRA TRUINSTALL 0x0fff Aircard Tru Installer /* Sigmatel products */ +product SIGMATEL WBT_3052 0x4200 WBT-3052 IrDA/USB Bridge product SIGMATEL I_BEAD100 0x8008 i-Bead 100 MP3 Player /* SIIG products */ From owner-svn-src-all@FreeBSD.ORG Sun Mar 28 20:02:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 92A1B106564A; Sun, 28 Mar 2010 20:02: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 82C568FC0A; Sun, 28 Mar 2010 20:02: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 o2SK2obv029952; Sun, 28 Mar 2010 20:02:50 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2SK2oG2029949; Sun, 28 Mar 2010 20:02:50 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201003282002.o2SK2oG2029949@svn.freebsd.org> From: Andrew Thompson Date: Sun, 28 Mar 2010 20:02: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: r205802 - head/sys/dev/usb/controller X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 28 Mar 2010 20:02:50 -0000 Author: thompsa Date: Sun Mar 28 20:02:50 2010 New Revision: 205802 URL: http://svn.freebsd.org/changeset/base/205802 Log: Add PCI IDs for two more nForce controllers. Submitted by: Dmitry Luhtionov @ gmail.com Modified: head/sys/dev/usb/controller/ehci_pci.c head/sys/dev/usb/controller/ohci_pci.c Modified: head/sys/dev/usb/controller/ehci_pci.c ============================================================================== --- head/sys/dev/usb/controller/ehci_pci.c Sun Mar 28 20:02:13 2010 (r205801) +++ head/sys/dev/usb/controller/ehci_pci.c Sun Mar 28 20:02:50 2010 (r205802) @@ -208,6 +208,8 @@ ehci_pci_match(device_t self) return "NVIDIA nForce3 250 USB 2.0 controller"; case 0x005b10de: return "NVIDIA nForce4 USB 2.0 controller"; + case 0x036d10de: + return "NVIDIA nForce MCP55 USB 2.0 controller"; case 0x03f210de: return "NVIDIA nForce MCP61 USB 2.0 controller"; case 0x0aa610de: Modified: head/sys/dev/usb/controller/ohci_pci.c ============================================================================== --- head/sys/dev/usb/controller/ohci_pci.c Sun Mar 28 20:02:13 2010 (r205801) +++ head/sys/dev/usb/controller/ohci_pci.c Sun Mar 28 20:02:50 2010 (r205802) @@ -166,6 +166,8 @@ ohci_pci_match(device_t self) case 0x00d710de: return ("nVidia nForce3 USB Controller"); + case 0x036c10de: + return ("nVidia nForce MCP55 USB Controller"); case 0x03f110de: return ("nVidia nForce MCP61 USB Controller"); case 0x0aa510de: From owner-svn-src-all@FreeBSD.ORG Sun Mar 28 20:04:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C66CC106564A; Sun, 28 Mar 2010 20:04:03 +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 B70428FC14; Sun, 28 Mar 2010 20:04: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 o2SK43xe030258; Sun, 28 Mar 2010 20:04:03 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2SK43TN030256; Sun, 28 Mar 2010 20:04:03 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201003282004.o2SK43TN030256@svn.freebsd.org> From: Andrew Thompson Date: Sun, 28 Mar 2010 20:04: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: r205803 - 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, 28 Mar 2010 20:04:03 -0000 Author: thompsa Date: Sun Mar 28 20:04:03 2010 New Revision: 205803 URL: http://svn.freebsd.org/changeset/base/205803 Log: Make sure the bsd_urb_list gets initialised and that new URB's are queued at the end of the list. Submitted by: Hans Petter Selasky Modified: head/sys/dev/usb/usb_compat_linux.c Modified: head/sys/dev/usb/usb_compat_linux.c ============================================================================== --- head/sys/dev/usb/usb_compat_linux.c Sun Mar 28 20:02:50 2010 (r205802) +++ head/sys/dev/usb/usb_compat_linux.c Sun Mar 28 20:04:03 2010 (r205803) @@ -435,7 +435,7 @@ usb_submit_urb(struct urb *urb, uint16_t uhe->bsd_xfer[1]) { /* we are ready! */ - TAILQ_INSERT_HEAD(&uhe->bsd_urb_list, urb, bsd_urb_list); + TAILQ_INSERT_TAIL(&uhe->bsd_urb_list, urb, bsd_urb_list); urb->status = -EINPROGRESS; @@ -908,6 +908,7 @@ usb_linux_create_usb_device(struct usb_d if (p_uhe) { bcopy(ed, &p_uhe->desc, sizeof(p_uhe->desc)); p_uhe->bsd_iface_index = iface_index - 1; + TAILQ_INIT(&p_uhe->bsd_urb_list); p_uhe++; } if (p_uhi) { From owner-svn-src-all@FreeBSD.ORG Sun Mar 28 20:07:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 34333106564A; Sun, 28 Mar 2010 20:07:09 +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 249128FC0C; Sun, 28 Mar 2010 20: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 o2SK79TJ030972; Sun, 28 Mar 2010 20:07:09 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2SK79h2030970; Sun, 28 Mar 2010 20:07:09 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201003282007.o2SK79h2030970@svn.freebsd.org> From: Andrew Thompson Date: Sun, 28 Mar 2010 20:07: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: r205804 - head/sys/dev/usb/input X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 28 Mar 2010 20:07:09 -0000 Author: thompsa Date: Sun Mar 28 20:07:08 2010 New Revision: 205804 URL: http://svn.freebsd.org/changeset/base/205804 Log: Do not swap Apple keys when detecting Apple-FN keyboards. Reported by: Steven Noonan Submitted by: Hans Petter Selasky Modified: head/sys/dev/usb/input/ukbd.c Modified: head/sys/dev/usb/input/ukbd.c ============================================================================== --- head/sys/dev/usb/input/ukbd.c Sun Mar 28 20:04:03 2010 (r205803) +++ head/sys/dev/usb/input/ukbd.c Sun Mar 28 20:07:08 2010 (r205804) @@ -896,8 +896,7 @@ ukbd_attach(device_t dev) hid_input, 0, &sc->sc_loc_apple_fn, &flags, &temp_id)) { if (flags & HIO_VARIABLE) - sc->sc_flags |= UKBD_FLAG_APPLE_FN | - UKBD_FLAG_APPLE_SWAP; + sc->sc_flags |= UKBD_FLAG_APPLE_FN; DPRINTFN(1, "Found Apple FN-key\n"); apple_keys = 1; sc->sc_kbd_id = temp_id; From owner-svn-src-all@FreeBSD.ORG Sun Mar 28 20:09:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28752106566C; Sun, 28 Mar 2010 20:09:05 +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 18BF08FC08; Sun, 28 Mar 2010 20: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 o2SK94jd031410; Sun, 28 Mar 2010 20:09:04 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2SK94ZR031407; Sun, 28 Mar 2010 20:09:04 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201003282009.o2SK94ZR031407@svn.freebsd.org> From: Andrew Thompson Date: Sun, 28 Mar 2010 20: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: r205805 - in head/sys/dev/usb: . quirk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 28 Mar 2010 20:09:05 -0000 Author: thompsa Date: Sun Mar 28 20:09:04 2010 New Revision: 205805 URL: http://svn.freebsd.org/changeset/base/205805 Log: Do not sync cache for the PL2506 PR: usb/144915 Submitted by: Monty Hall Modified: head/sys/dev/usb/quirk/usb_quirk.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- head/sys/dev/usb/quirk/usb_quirk.c Sun Mar 28 20:07:08 2010 (r205804) +++ head/sys/dev/usb/quirk/usb_quirk.c Sun Mar 28 20:09:04 2010 (r205805) @@ -318,6 +318,8 @@ static struct usb_quirk_entry usb_quirks USB_QUIRK(PNY, ATTACHE2, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_IGNORE_RESIDUE, UQ_MSC_NO_START_STOP), + USB_QUIRK(PROLIFIC, PL2506, 0x0000, 0xffff, + UQ_MSC_NO_SYNC_CACHE), USB_QUIRK_VP(USB_VENDOR_SAMSUNG_TECHWIN, USB_PRODUCT_SAMSUNG_TECHWIN_DIGIMAX_410, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY), Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Sun Mar 28 20:07:08 2010 (r205804) +++ head/sys/dev/usb/usbdevs Sun Mar 28 20:09:04 2010 (r205805) @@ -2416,6 +2416,7 @@ product PROLIFIC PL2303 0x2303 PL2303 S product PROLIFIC PL2305 0x2305 Parallel printer product PROLIFIC ATAPI4 0x2307 ATAPI-4 Controller product PROLIFIC PL2501 0x2501 PL2501 Host-Host interface +product PROLIFIC PL2506 0x2506 PL2506 USB to IDE Bridge product PROLIFIC PHAROS 0xaaa0 Prolific Pharos product PROLIFIC RSAQ3 0xaaa2 PL2303 Serial Adapter (IODATA USB-RSAQ3) product PROLIFIC2 WSIM 0x2001 Willcom WSIM From owner-svn-src-all@FreeBSD.ORG Sun Mar 28 20:19:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7FADB1065678; Sun, 28 Mar 2010 20:19:41 +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 6F9F48FC23; Sun, 28 Mar 2010 20:19: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 o2SKJfdQ033859; Sun, 28 Mar 2010 20:19:41 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2SKJfPg033857; Sun, 28 Mar 2010 20:19:41 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201003282019.o2SKJfPg033857@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 28 Mar 2010 20:19:41 +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: r205806 - 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: Sun, 28 Mar 2010 20:19:41 -0000 Author: jilles Date: Sun Mar 28 20:19:41 2010 New Revision: 205806 URL: http://svn.freebsd.org/changeset/base/205806 Log: MFC r200818: rc.subr: Use pwait in wait_for_pids. This waits for the requested process(es) to terminate, rather than polling with an interval of 2 seconds. If pwait is not available, the old method is used. PR: conf/132766 Modified: stable/8/etc/rc.subr Directory Properties: stable/8/etc/ (props changed) Modified: stable/8/etc/rc.subr ============================================================================== --- stable/8/etc/rc.subr Sun Mar 28 20:09:04 2010 (r205805) +++ stable/8/etc/rc.subr Sun Mar 28 20:19:41 2010 (r205806) @@ -390,7 +390,7 @@ wait_for_pids() _list=$_nlist echo -n ${_prefix:-"Waiting for PIDS: "}$_list _prefix=", " - sleep 2 + pwait $_list 2>/dev/null || sleep 2 done if [ -n "$_prefix" ]; then echo "." From owner-svn-src-all@FreeBSD.ORG Sun Mar 28 20:28:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D115E1065672 for ; Sun, 28 Mar 2010 20:28:45 +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 60F2F8FC14 for ; Sun, 28 Mar 2010 20:28:44 +0000 (UTC) Received: (qmail 26274 invoked by uid 399); 28 Mar 2010 20:28:43 -0000 Received: from localhost (HELO foreign.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 28 Mar 2010 20:28:43 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4BAFBBFA.7020701@FreeBSD.org> Date: Sun, 28 Mar 2010 13:28:42 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.7) Gecko/20100218 Thunderbird/3.0.1 MIME-Version: 1.0 To: Jilles Tjoelker References: <201003282019.o2SKJfPg033857@svn.freebsd.org> In-Reply-To: <201003282019.o2SKJfPg033857@svn.freebsd.org> X-Enigmail-Version: 1.0.1 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r205806 - 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: Sun, 28 Mar 2010 20:28:45 -0000 Probably my fault for not saying something sooner, but there is a problem with the code in head that sometimes causes it to loop repeatedly even though pwait exits successfully. I am trying to track it down, but since it only happens about once every 10 shutdowns it's been difficult. Please don't mfc this to any of the other branches till we've had a chance to discuss it further. Thanks, Doug From owner-svn-src-all@FreeBSD.ORG Sun Mar 28 21:06:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F4DC1065670; Sun, 28 Mar 2010 21:06:31 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104]) by mx1.freebsd.org (Postfix) with ESMTP id 458988FC0A; Sun, 28 Mar 2010 21:06:31 +0000 (UTC) Received: from turtle.stack.nl (turtle.stack.nl [IPv6:2001:610:1108:5010::132]) by mx1.stack.nl (Postfix) with ESMTP id 4E2B035A855; Sun, 28 Mar 2010 23:06:30 +0200 (CEST) Received: by turtle.stack.nl (Postfix, from userid 1677) id 3B8B61735E; Sun, 28 Mar 2010 23:06:30 +0200 (CEST) Date: Sun, 28 Mar 2010 23:06:30 +0200 From: Jilles Tjoelker To: Doug Barton Message-ID: <20100328210630.GA2086@stack.nl> References: <201003282019.o2SKJfPg033857@svn.freebsd.org> <4BAFBBFA.7020701@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4BAFBBFA.7020701@FreeBSD.org> 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: r205806 - 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: Sun, 28 Mar 2010 21:06:31 -0000 On Sun, Mar 28, 2010 at 01:28:42PM -0700, Doug Barton wrote: > Probably my fault for not saying something sooner, but there is a > problem with the code in head that sometimes causes it to loop > repeatedly even though pwait exits successfully. I am trying to track it > down, but since it only happens about once every 10 shutdowns it's been > difficult. There is a difference between the two methods in what is waited for exactly. pwait(1) will wait for the process to terminate; if it is applied to a zombie it will return immediately (printing the exit status if -v was given). On the other hand, kill(1) will continue to return success until the process has been waited for by its parent. An obvious fix is to trust pwait if it returns successfully, e.g. like if pwait $_list 2>/dev/null; then break; else sleep 2; fi -- Jilles Tjoelker From owner-svn-src-all@FreeBSD.ORG Sun Mar 28 22:46:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32D181065672; Sun, 28 Mar 2010 22:46:57 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 22D858FC13; Sun, 28 Mar 2010 22:46: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 o2SMkuxj069307; Sun, 28 Mar 2010 22:46:56 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2SMkuJw069305; Sun, 28 Mar 2010 22:46:56 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201003282246.o2SMkuJw069305@svn.freebsd.org> From: Fabien Thomas Date: Sun, 28 Mar 2010 22:46: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: r205809 - head/usr.sbin/pmcstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 28 Mar 2010 22:46:57 -0000 Author: fabient Date: Sun Mar 28 22:46:56 2010 New Revision: 205809 URL: http://svn.freebsd.org/changeset/base/205809 Log: Wait for pmc name in the log before displaying data. This will solve an abort in case of low throughput PMCs. MFC after: 3days Modified: head/usr.sbin/pmcstat/pmcstat_log.c Modified: head/usr.sbin/pmcstat/pmcstat_log.c ============================================================================== --- head/usr.sbin/pmcstat/pmcstat_log.c Sun Mar 28 22:30:14 2010 (r205808) +++ head/usr.sbin/pmcstat/pmcstat_log.c Sun Mar 28 22:46:56 2010 (r205809) @@ -1049,7 +1049,6 @@ pmcstat_pmcindex_to_name(int pmcin) if (pr->pr_pmcin == pmcin) return pmcstat_string_unintern(pr->pr_pmcname); - err(EX_SOFTWARE, "ERROR: cannot find pmcid name"); return NULL; } @@ -1789,19 +1788,23 @@ static void pmcstat_refresh_top(void) { char pmcname[40]; + const char *s; /* If in pause mode do not refresh display. */ if (pmcstat_pause) return; + /* Wait until PMC pop in the log. */ + s = pmcstat_pmcindex_to_name(pmcstat_pmcinfilter); + if (s == NULL) + return; + /* Format PMC name. */ if (pmcstat_mergepmc) - snprintf(pmcname, sizeof(pmcname), "[%s]", - pmcstat_pmcindex_to_name(pmcstat_pmcinfilter)); + snprintf(pmcname, sizeof(pmcname), "[%s]", s); else snprintf(pmcname, sizeof(pmcname), "%s.%d", - pmcstat_pmcindex_to_name(pmcstat_pmcinfilter), - pmcstat_pmcinfilter); + s, pmcstat_pmcinfilter); PMCSTAT_PRINTBEGIN(); PMCSTAT_PRINTW("PMC: %s Samples: %u processed, %u invalid\n\n", From owner-svn-src-all@FreeBSD.ORG Sun Mar 28 22:52:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 799FD106564A; Sun, 28 Mar 2010 22:52:24 +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 543778FC1E; Sun, 28 Mar 2010 22:52:24 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 05D3C46B46; Sun, 28 Mar 2010 18:52:24 -0400 (EDT) Date: Sun, 28 Mar 2010 23:52:23 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Jilles Tjoelker In-Reply-To: <20100328210630.GA2086@stack.nl> Message-ID: References: <201003282019.o2SKJfPg033857@svn.freebsd.org> <4BAFBBFA.7020701@FreeBSD.org> <20100328210630.GA2086@stack.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, Doug Barton , src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r205806 - 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: Sun, 28 Mar 2010 22:52:24 -0000 On Sun, 28 Mar 2010, Jilles Tjoelker wrote: > On Sun, Mar 28, 2010 at 01:28:42PM -0700, Doug Barton wrote: >> Probably my fault for not saying something sooner, but there is a problem >> with the code in head that sometimes causes it to loop repeatedly even >> though pwait exits successfully. I am trying to track it down, but since it >> only happens about once every 10 shutdowns it's been difficult. > > There is a difference between the two methods in what is waited for exactly. > pwait(1) will wait for the process to terminate; if it is applied to a > zombie it will return immediately (printing the exit status if -v was > given). On the other hand, kill(1) will continue to return success until the > process has been waited for by its parent. > > An obvious fix is to trust pwait if it returns successfully, e.g. like if > pwait $_list 2>/dev/null; then break; else sleep 2; fi I noticed last year that Apple has implemented a separate PROC_REAP event in kqueue -- it would be easy for us to implement that as well, and add a flag to pwait to allow the user to decide to use that semantic instead (if desired). Robert N M Watson Computer Laboratory University of Cambridge From owner-svn-src-all@FreeBSD.ORG Sun Mar 28 23:03:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B88431065670 for ; Sun, 28 Mar 2010 23:03:40 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.171]) by mx1.freebsd.org (Postfix) with ESMTP id 641118FC13 for ; Sun, 28 Mar 2010 23:03:40 +0000 (UTC) Received: from vampire.homelinux.org (dslb-088-066-054-138.pools.arcor-ip.net [88.66.54.138]) by mrelayeu.kundenserver.de (node=mreu0) with ESMTP (Nemesis) id 0M9tPw-1Nkzy62ysq-00BZzs; Mon, 29 Mar 2010 01:03:38 +0200 Received: (qmail 72763 invoked from network); 28 Mar 2010 23:03:38 -0000 Received: from f8x64.laiers.local (192.168.4.188) by mx.laiers.local with SMTP; 28 Mar 2010 23:03:38 -0000 From: Max Laier Organization: FreeBSD To: Jack F Vogel Date: Mon, 29 Mar 2010 01:03:37 +0200 User-Agent: KMail/1.12.4 (FreeBSD/8.0-RELEASE-p2; KDE/4.3.5; amd64; ; ) References: <201003270021.o2R0LebO003969@svn.freebsd.org> In-Reply-To: <201003270021.o2R0LebO003969@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201003290103.37621.max@love2party.net> X-Provags-ID: V01U2FsdGVkX18cZ7O/XibI94erlaGpzJTbgCn4RKwmPHRu5VJ 9plFLK/JwQ4nDKONnzwU2zGdK5rKH5bTB70tT+BEu8HCvQzjr0 h9LJHxgq11sfrVk/40jgg== Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r205720 - in head/sys: dev/ixgbe modules/ixgbe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 28 Mar 2010 23:03:40 -0000 On Saturday 27 March 2010 01:21:40 Jack F Vogel wrote: > Author: jfv > Date: Sat Mar 27 00:21:40 2010 > New Revision: 205720 > URL: http://svn.freebsd.org/changeset/base/205720 > > Log: > Update the driver to Intel version 2.1.6 > - add some new hardware support for 82599 > - Big change to interrupt architecture, it now > uses a queue which contains an RX/TX pair as > the recipient of the interrupt. This will reduce > overall system interrupts/msix usage. > - Improved RX mbuf handling: the old get_buf routine > is no longer synchronized with rxeof, this allows > the elimination of packet discards due to mbuf > allocation failure. > - Much simplified and improved AIM code, it now > happens in the queue interrupt context and takes > into account both the traffic on the RX AND TX > side. > - variety of small tweaks, like ring size, that have > been seen as performance improvements. > - Thanks to those that provided feedback or suggested > changes, I hope I've caught all of them. This seems to introduce the same error in drbr handling that I just fixed for e1000 & friend - c.f. r203834. This results in ALTQ not working on these interfaces. Let me know if you have any questions, more details in-line. > Modified: head/sys/dev/ixgbe/ixgbe.c > =========================================================================== > === --- head/sys/dev/ixgbe/ixgbe.c Fri Mar 26 23:44:51 2010 (r205719) > +++ head/sys/dev/ixgbe/ixgbe.c Sat Mar 27 00:21:40 2010 (r205720) ... > @@ -849,59 +817,43 @@ ixgbe_mq_start_locked(struct ifnet *ifp, > { > struct adapter *adapter = txr->adapter; > struct mbuf *next; > - int err = 0; > + int enqueued, err = 0; > > - if (((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) || > - (!adapter->link_active)) { > - err = drbr_enqueue(ifp, txr->br, m); > + if ((ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != > + IFF_DRV_RUNNING || adapter->link_active == 0) { > + if (m != NULL) > + err = drbr_enqueue(ifp, txr->br, m); > return (err); > } > > - if (m == NULL) /* Called by tasklet */ > - goto process; > - > - /* If nothing queued go right to xmit */ > - if (!drbr_needs_enqueue(ifp, txr->br)) { > - if ((err = ixgbe_xmit(txr, &m)) != 0) { > - if (m != NULL) > - err = drbr_enqueue(ifp, txr->br, m); > - return (err); > - } else { > - /* Success, update stats */ > - drbr_stats_update(ifp, m->m_pkthdr.len, m->m_flags); > - /* Send a copy of the frame to the BPF listener */ > - ETHER_BPF_MTAP(ifp, m); > - /* Set the watchdog */ > - txr->watchdog_check = TRUE; > - } > - > - } else if ((err = drbr_enqueue(ifp, txr->br, m)) != 0) > - return (err); > - > -process: > - if (drbr_empty(ifp, txr->br)) > - return (err); > + enqueued = 0; > + if (m == NULL) > + next = drbr_dequeue(ifp, txr->br); > + else > + next = m; The new start_locked logic looks like the old igb. An adaption of my diff: http://svn.freebsd.org/viewvc/base/head/sys/dev/e1000/if_igb.c?r1=203834&r2=203833&pathrev=203834 should make things work. > /* Process the queue */ > - while (TRUE) { > - if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) > - break; > - next = drbr_dequeue(ifp, txr->br); > - if (next == NULL) > - break; > + while (next != NULL) { > if ((err = ixgbe_xmit(txr, &next)) != 0) { > if (next != NULL) > err = drbr_enqueue(ifp, txr->br, next); > break; > } > + enqueued++; > drbr_stats_update(ifp, next->m_pkthdr.len, next->m_flags); > + /* Send a copy of the frame to the BPF listener */ > ETHER_BPF_MTAP(ifp, next); > - /* Set the watchdog */ > - txr->watchdog_check = TRUE; > + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) > + break; > + if (txr->tx_avail <= IXGBE_TX_OP_THRESHOLD) { > + ifp->if_drv_flags |= IFF_DRV_OACTIVE; > + break; > + } > + next = drbr_dequeue(ifp, txr->br); > } > - > - if (txr->tx_avail <= IXGBE_TX_OP_THRESHOLD) > - ifp->if_drv_flags |= IFF_DRV_OACTIVE; > + > + if (enqueued > 0) > + txr->watchdog_check = TRUE; > > return (err); > } Regards, Max From owner-svn-src-all@FreeBSD.ORG Sun Mar 28 23:10:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D439F1065676 for ; Sun, 28 Mar 2010 23:10:41 +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 3E13F8FC1F for ; Sun, 28 Mar 2010 23:10:40 +0000 (UTC) Received: (qmail 19358 invoked by uid 399); 28 Mar 2010 23:10:40 -0000 Received: from localhost (HELO foreign.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 28 Mar 2010 23:10:40 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4BAFE1EE.9040908@FreeBSD.org> Date: Sun, 28 Mar 2010 16:10:38 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.7) Gecko/20100218 Thunderbird/3.0.1 MIME-Version: 1.0 To: Jilles Tjoelker References: <201003282019.o2SKJfPg033857@svn.freebsd.org> <4BAFBBFA.7020701@FreeBSD.org> <20100328210630.GA2086@stack.nl> In-Reply-To: <20100328210630.GA2086@stack.nl> X-Enigmail-Version: 1.0.1 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r205806 - 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: Sun, 28 Mar 2010 23:10:41 -0000 On 03/28/10 14:06, Jilles Tjoelker wrote: > On Sun, Mar 28, 2010 at 01:28:42PM -0700, Doug Barton wrote: >> Probably my fault for not saying something sooner, but there is a >> problem with the code in head that sometimes causes it to loop >> repeatedly even though pwait exits successfully. I am trying to track it >> down, but since it only happens about once every 10 shutdowns it's been >> difficult. > > There is a difference between the two methods in what is waited for > exactly. pwait(1) will wait for the process to terminate; if it is > applied to a zombie it will return immediately (printing the exit status > if -v was given). On the other hand, kill(1) will continue to return > success until the process has been waited for by its parent. The process that I see this with most often is devd, does that fit the model you're describing? What are the implications of moving on after a successful pwait even though there is still a zombie process? > An obvious fix is to trust pwait if it returns successfully, e.g. like > if pwait $_list 2>/dev/null; then break; else sleep 2; fi It can't be break, the point of the loop is that wait_for_pids() takes a list. We may be able to use continue however. Doug -- ... and that's just a little bit of history repeating. -- Propellerheads Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Mon Mar 29 00:08:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8423106566B; Mon, 29 Mar 2010 00:08:58 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C74D68FC08; Mon, 29 Mar 2010 00:08: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 o2T08wA1087340; Mon, 29 Mar 2010 00:08:58 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2T08wOT087338; Mon, 29 Mar 2010 00:08:58 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201003290008.o2T08wOT087338@svn.freebsd.org> From: Ed Maste Date: Mon, 29 Mar 2010 00:08:58 +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: r205810 - stable/8/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2010 00:08:59 -0000 Author: emaste Date: Mon Mar 29 00:08:58 2010 New Revision: 205810 URL: http://svn.freebsd.org/changeset/base/205810 Log: MFC r205411: Avoid holding the VLAN_LOCK() over the parent interface SIOCGIFMEDIA ioctl call, as it may sleep. Reviewed by: rwatson Modified: stable/8/sys/net/if_vlan.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/net/if_vlan.c ============================================================================== --- stable/8/sys/net/if_vlan.c Sun Mar 28 22:46:56 2010 (r205809) +++ stable/8/sys/net/if_vlan.c Mon Mar 29 00:08:58 2010 (r205810) @@ -1335,9 +1335,9 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd case SIOCGIFMEDIA: VLAN_LOCK(); if (TRUNK(ifv) != NULL) { - error = (*PARENT(ifv)->if_ioctl)(PARENT(ifv), - SIOCGIFMEDIA, data); + p = PARENT(ifv); VLAN_UNLOCK(); + error = (*p->if_ioctl)(p, SIOCGIFMEDIA, data); /* Limit the result to the parent's current config. */ if (error == 0) { struct ifmediareq *ifmr; From owner-svn-src-all@FreeBSD.ORG Mon Mar 29 00:09:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E1CD10656DF; Mon, 29 Mar 2010 00:09: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 493CE8FC54; Mon, 29 Mar 2010 00:09: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 o2T09uZu087603; Mon, 29 Mar 2010 00:09:56 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2T09uvO087600; Mon, 29 Mar 2010 00:09:56 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201003290009.o2T09uvO087600@svn.freebsd.org> From: Ed Maste Date: Mon, 29 Mar 2010 00:09:56 +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: r205811 - 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: Mon, 29 Mar 2010 00:09:57 -0000 Author: emaste Date: Mon Mar 29 00:09:56 2010 New Revision: 205811 URL: http://svn.freebsd.org/changeset/base/205811 Log: MFC r204264: Minor diff reduction with Adaptec's driver: in aac_release_command() set cm_queue to AAC_ADAP_NORM_CMD_QUEUE by default. In every place it was set, it was set to AAC_ADAP_NORM_CMD_QUEUE anyhow. 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/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/aac/aac.c ============================================================================== --- stable/7/sys/dev/aac/aac.c Mon Mar 29 00:08:58 2010 (r205810) +++ stable/7/sys/dev/aac/aac.c Mon Mar 29 00:09:56 2010 (r205811) @@ -1215,7 +1215,6 @@ aac_bio_command(struct aac_softc *sc, st cm->cm_complete = aac_bio_complete; cm->cm_private = bp; cm->cm_timestamp = time_uptime; - cm->cm_queue = AAC_ADAP_NORM_CMD_QUEUE; /* build the FIB */ fib = cm->cm_fib; @@ -1370,7 +1369,6 @@ aac_wait_command(struct aac_command *cm) fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); /* Put the command on the ready queue and get things going */ - cm->cm_queue = AAC_ADAP_NORM_CMD_QUEUE; aac_enqueue_ready(cm); aac_startio(sc); error = msleep(cm, &sc->aac_io_lock, PRIBIO, "aacwait", 0); @@ -1420,6 +1418,7 @@ aac_release_command(struct aac_command * cm->cm_flags = 0; cm->cm_complete = NULL; cm->cm_private = NULL; + cm->cm_queue = AAC_ADAP_NORM_CMD_QUEUE; cm->cm_fib->Header.XferState = AAC_FIBSTATE_EMPTY; cm->cm_fib->Header.StructType = AAC_FIBTYPE_TFIB; cm->cm_fib->Header.Flags = 0; Modified: stable/7/sys/dev/aac/aac_cam.c ============================================================================== --- stable/7/sys/dev/aac/aac_cam.c Mon Mar 29 00:08:58 2010 (r205810) +++ stable/7/sys/dev/aac/aac_cam.c Mon Mar 29 00:09:56 2010 (r205811) @@ -453,7 +453,6 @@ aac_cam_action(struct cam_sim *sim, unio cm->cm_complete = aac_cam_complete; cm->cm_private = ccb; cm->cm_timestamp = time_uptime; - cm->cm_queue = AAC_ADAP_NORM_CMD_QUEUE; fib->Header.XferState = AAC_FIBSTATE_HOSTOWNED | From owner-svn-src-all@FreeBSD.ORG Mon Mar 29 00:14:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6342810656A7; Mon, 29 Mar 2010 00:14:47 +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 78F018FDD1; Mon, 29 Mar 2010 00:13: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 o2T0DGTU088399; Mon, 29 Mar 2010 00:13:16 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2T0DGIp088397; Mon, 29 Mar 2010 00:13:16 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201003290013.o2T0DGIp088397@svn.freebsd.org> From: Ed Maste Date: Mon, 29 Mar 2010 00:13:16 +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: r205812 - stable/7/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2010 00:14:50 -0000 Author: emaste Date: Mon Mar 29 00:13:16 2010 New Revision: 205812 URL: http://svn.freebsd.org/changeset/base/205812 Log: MFC r205411: Avoid holding the VLAN_LOCK() over the parent interface SIOCGIFMEDIA ioctl call, as it may sleep. Reviewed by: rwatson Modified: stable/7/sys/net/if_vlan.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/net/if_vlan.c ============================================================================== --- stable/7/sys/net/if_vlan.c Mon Mar 29 00:09:56 2010 (r205811) +++ stable/7/sys/net/if_vlan.c Mon Mar 29 00:13:16 2010 (r205812) @@ -1331,9 +1331,9 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd case SIOCGIFMEDIA: VLAN_LOCK(); if (TRUNK(ifv) != NULL) { - error = (*PARENT(ifv)->if_ioctl)(PARENT(ifv), - SIOCGIFMEDIA, data); + p = PARENT(ifv); VLAN_UNLOCK(); + error = (*p->if_ioctl)(p, SIOCGIFMEDIA, data); /* Limit the result to the parent's current config. */ if (error == 0) { struct ifmediareq *ifmr; From owner-svn-src-all@FreeBSD.ORG Mon Mar 29 00:14:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C7F59106570F; Mon, 29 Mar 2010 00:14:52 +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 CEFDC8FF43; Mon, 29 Mar 2010 00:14: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 o2T0EYS5088729; Mon, 29 Mar 2010 00:14:34 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2T0EYgg088726; Mon, 29 Mar 2010 00:14:34 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201003290014.o2T0EYgg088726@svn.freebsd.org> From: Ed Maste Date: Mon, 29 Mar 2010 00:14: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: r205813 - 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: Mon, 29 Mar 2010 00:14:58 -0000 Author: emaste Date: Mon Mar 29 00:14:34 2010 New Revision: 205813 URL: http://svn.freebsd.org/changeset/base/205813 Log: MFC r204264: Minor diff reduction with Adaptec's driver: in aac_release_command() set cm_queue to AAC_ADAP_NORM_CMD_QUEUE by default. In every place it was set, it was set to AAC_ADAP_NORM_CMD_QUEUE anyhow. 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 Mon Mar 29 00:13:16 2010 (r205812) +++ stable/8/sys/dev/aac/aac.c Mon Mar 29 00:14:34 2010 (r205813) @@ -1218,7 +1218,6 @@ aac_bio_command(struct aac_softc *sc, st cm->cm_complete = aac_bio_complete; cm->cm_private = bp; cm->cm_timestamp = time_uptime; - cm->cm_queue = AAC_ADAP_NORM_CMD_QUEUE; /* build the FIB */ fib = cm->cm_fib; @@ -1373,7 +1372,6 @@ aac_wait_command(struct aac_command *cm) fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); /* Put the command on the ready queue and get things going */ - cm->cm_queue = AAC_ADAP_NORM_CMD_QUEUE; aac_enqueue_ready(cm); aac_startio(sc); error = msleep(cm, &sc->aac_io_lock, PRIBIO, "aacwait", 0); @@ -1423,6 +1421,7 @@ aac_release_command(struct aac_command * cm->cm_flags = 0; cm->cm_complete = NULL; cm->cm_private = NULL; + cm->cm_queue = AAC_ADAP_NORM_CMD_QUEUE; cm->cm_fib->Header.XferState = AAC_FIBSTATE_EMPTY; cm->cm_fib->Header.StructType = AAC_FIBTYPE_TFIB; cm->cm_fib->Header.Flags = 0; Modified: stable/8/sys/dev/aac/aac_cam.c ============================================================================== --- stable/8/sys/dev/aac/aac_cam.c Mon Mar 29 00:13:16 2010 (r205812) +++ stable/8/sys/dev/aac/aac_cam.c Mon Mar 29 00:14:34 2010 (r205813) @@ -453,7 +453,6 @@ aac_cam_action(struct cam_sim *sim, unio cm->cm_complete = aac_cam_complete; cm->cm_private = ccb; cm->cm_timestamp = time_uptime; - cm->cm_queue = AAC_ADAP_NORM_CMD_QUEUE; fib->Header.XferState = AAC_FIBSTATE_HOSTOWNED | From owner-svn-src-all@FreeBSD.ORG Mon Mar 29 00:30:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2C81A1065679; Mon, 29 Mar 2010 00:30:45 +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 19A788FC17; Mon, 29 Mar 2010 00:30: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 o2T0UjHM092373; Mon, 29 Mar 2010 00:30:45 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2T0Uiq9092367; Mon, 29 Mar 2010 00:30:44 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201003290030.o2T0Uiq9092367@svn.freebsd.org> From: Ed Maste Date: Mon, 29 Mar 2010 00:30:44 +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: r205815 - 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: Mon, 29 Mar 2010 00:30:45 -0000 Author: emaste Date: Mon Mar 29 00:30:44 2010 New Revision: 205815 URL: http://svn.freebsd.org/changeset/base/205815 Log: MFC aac(4) driver changes r204019: Include command type in COMMAND TIMEOUT messages to aid in debugging. r203885: Diff reduction with Adaptec's vendor driver. Driver version 2.1.9 chosen as that Adaptec version roughly corresponds with the current feature set merged to the in-tree driver. r203801: Garbage collect Falcon/PPC support that has not been used in released products, based on discussion with Adaptec. r198617: Rename aac_srb32 to aac_srb, to match Adaptec's vendor driver. Modified: stable/8/sys/dev/aac/aac.c stable/8/sys/dev/aac/aac_cam.c stable/8/sys/dev/aac/aac_pci.c stable/8/sys/dev/aac/aacreg.h stable/8/sys/dev/aac/aacvar.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/aac/aac.c ============================================================================== --- stable/8/sys/dev/aac/aac.c Mon Mar 29 00:23:46 2010 (r205814) +++ stable/8/sys/dev/aac/aac.c Mon Mar 29 00:30:44 2010 (r205815) @@ -33,7 +33,6 @@ __FBSDID("$FreeBSD$"); /* * Driver for the Adaptec 'FSA' family of PCI/SCSI RAID adapters. */ -#define AAC_DRIVER_VERSION 0x02000000 #define AAC_DRIVERNAME "aac" #include "opt_aac.h" @@ -107,28 +106,6 @@ static int aac_dequeue_fib(struct aac_so static int aac_enqueue_response(struct aac_softc *sc, int queue, struct aac_fib *fib); -/* Falcon/PPC interface */ -static int aac_fa_get_fwstatus(struct aac_softc *sc); -static void aac_fa_qnotify(struct aac_softc *sc, int qbit); -static int aac_fa_get_istatus(struct aac_softc *sc); -static void aac_fa_clear_istatus(struct aac_softc *sc, int mask); -static void aac_fa_set_mailbox(struct aac_softc *sc, u_int32_t command, - u_int32_t arg0, u_int32_t arg1, - u_int32_t arg2, u_int32_t arg3); -static int aac_fa_get_mailbox(struct aac_softc *sc, int mb); -static void aac_fa_set_interrupts(struct aac_softc *sc, int enable); - -struct aac_interface aac_fa_interface = { - aac_fa_get_fwstatus, - aac_fa_qnotify, - aac_fa_get_istatus, - aac_fa_clear_istatus, - aac_fa_set_mailbox, - aac_fa_get_mailbox, - aac_fa_set_interrupts, - NULL, NULL, NULL -}; - /* StrongARM interface */ static int aac_sa_get_fwstatus(struct aac_softc *sc); static void aac_sa_qnotify(struct aac_softc *sc, int qbit); @@ -2374,8 +2351,9 @@ aac_timeout(struct aac_softc *sc) /* && !(cm->cm_flags & AAC_CMD_TIMEDOUT) */) { cm->cm_flags |= AAC_CMD_TIMEDOUT; device_printf(sc->aac_dev, - "COMMAND %p TIMEOUT AFTER %d SECONDS\n", - cm, (int)(time_uptime-cm->cm_timestamp)); + "COMMAND %p (TYPE %d) TIMEOUT AFTER %d SECONDS\n", + cm, cm->cm_fib->Header.Command, + (int)(time_uptime-cm->cm_timestamp)); AAC_PRINT_FIB(sc, cm->cm_fib); timedout++; } @@ -2416,17 +2394,6 @@ aac_rx_get_fwstatus(struct aac_softc *sc } static int -aac_fa_get_fwstatus(struct aac_softc *sc) -{ - int val; - - fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - - val = AAC_MEM0_GETREG4(sc, AAC_FA_FWSTATUS); - return (val); -} - -static int aac_rkt_get_fwstatus(struct aac_softc *sc) { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); @@ -2456,15 +2423,6 @@ aac_rx_qnotify(struct aac_softc *sc, int } static void -aac_fa_qnotify(struct aac_softc *sc, int qbit) -{ - fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - - AAC_MEM0_SETREG2(sc, AAC_FA_DOORBELL1, qbit); - AAC_FA_HACK(sc); -} - -static void aac_rkt_qnotify(struct aac_softc *sc, int qbit) { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); @@ -2492,17 +2450,6 @@ aac_rx_get_istatus(struct aac_softc *sc) } static int -aac_fa_get_istatus(struct aac_softc *sc) -{ - int val; - - fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - - val = AAC_MEM0_GETREG2(sc, AAC_FA_DOORBELL0); - return (val); -} - -static int aac_rkt_get_istatus(struct aac_softc *sc) { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); @@ -2530,15 +2477,6 @@ aac_rx_clear_istatus(struct aac_softc *s } static void -aac_fa_clear_istatus(struct aac_softc *sc, int mask) -{ - fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - - AAC_MEM0_SETREG2(sc, AAC_FA_DOORBELL0_CLEAR, mask); - AAC_FA_HACK(sc); -} - -static void aac_rkt_clear_istatus(struct aac_softc *sc, int mask) { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); @@ -2576,24 +2514,6 @@ aac_rx_set_mailbox(struct aac_softc *sc, } static void -aac_fa_set_mailbox(struct aac_softc *sc, u_int32_t command, - u_int32_t arg0, u_int32_t arg1, u_int32_t arg2, u_int32_t arg3) -{ - fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - - AAC_MEM1_SETREG4(sc, AAC_FA_MAILBOX, command); - AAC_FA_HACK(sc); - AAC_MEM1_SETREG4(sc, AAC_FA_MAILBOX + 4, arg0); - AAC_FA_HACK(sc); - AAC_MEM1_SETREG4(sc, AAC_FA_MAILBOX + 8, arg1); - AAC_FA_HACK(sc); - AAC_MEM1_SETREG4(sc, AAC_FA_MAILBOX + 12, arg2); - AAC_FA_HACK(sc); - AAC_MEM1_SETREG4(sc, AAC_FA_MAILBOX + 16, arg3); - AAC_FA_HACK(sc); -} - -static void aac_rkt_set_mailbox(struct aac_softc *sc, u_int32_t command, u_int32_t arg0, u_int32_t arg1, u_int32_t arg2, u_int32_t arg3) { @@ -2626,17 +2546,6 @@ aac_rx_get_mailbox(struct aac_softc *sc, } static int -aac_fa_get_mailbox(struct aac_softc *sc, int mb) -{ - int val; - - fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - - val = AAC_MEM1_GETREG4(sc, AAC_FA_MAILBOX + (mb * 4)); - return (val); -} - -static int aac_rkt_get_mailbox(struct aac_softc *sc, int mb) { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); @@ -2675,20 +2584,6 @@ aac_rx_set_interrupts(struct aac_softc * } static void -aac_fa_set_interrupts(struct aac_softc *sc, int enable) -{ - fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, "%sable interrupts", enable ? "en" : "dis"); - - if (enable) { - AAC_MEM0_SETREG2((sc), AAC_FA_MASK0_CLEAR, AAC_DB_INTERRUPTS); - AAC_FA_HACK(sc); - } else { - AAC_MEM0_SETREG2((sc), AAC_FA_MASK0, ~0); - AAC_FA_HACK(sc); - } -} - -static void aac_rkt_set_interrupts(struct aac_softc *sc, int enable) { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, "%sable interrupts", enable ? "en" : "dis"); @@ -2871,10 +2766,8 @@ aac_describe_controller(struct aac_softc } device_printf(sc->aac_dev, "%s, aac driver %d.%d.%d-%d\n", adapter_type, - AAC_DRIVER_VERSION >> 24, - (AAC_DRIVER_VERSION >> 16) & 0xFF, - AAC_DRIVER_VERSION & 0xFF, - AAC_DRIVER_BUILD); + AAC_DRIVER_MAJOR_VERSION, AAC_DRIVER_MINOR_VERSION, + AAC_DRIVER_BUGFIX_LEVEL, AAC_DRIVER_BUILD); aac_release_sync_fib(sc); mtx_unlock(&sc->aac_io_lock); @@ -3359,10 +3252,16 @@ aac_rev_check(struct aac_softc *sc, cadd * Doctor up the response struct. */ rev_check_resp.possiblyCompatible = 1; - rev_check_resp.adapterSWRevision.external.ul = - sc->aac_revision.external.ul; + rev_check_resp.adapterSWRevision.external.comp.major = + AAC_DRIVER_MAJOR_VERSION; + rev_check_resp.adapterSWRevision.external.comp.minor = + AAC_DRIVER_MINOR_VERSION; + rev_check_resp.adapterSWRevision.external.comp.type = + AAC_DRIVER_TYPE; + rev_check_resp.adapterSWRevision.external.comp.dash = + AAC_DRIVER_BUGFIX_LEVEL; rev_check_resp.adapterSWRevision.buildNumber = - sc->aac_revision.buildNumber; + AAC_DRIVER_BUILD; return(copyout((caddr_t)&rev_check_resp, udata, sizeof(struct aac_rev_check_resp))); Modified: stable/8/sys/dev/aac/aac_cam.c ============================================================================== --- stable/8/sys/dev/aac/aac_cam.c Mon Mar 29 00:23:46 2010 (r205814) +++ stable/8/sys/dev/aac/aac_cam.c Mon Mar 29 00:30:44 2010 (r205815) @@ -211,7 +211,7 @@ aac_cam_action(struct cam_sim *sim, unio { struct aac_cam *camsc; struct aac_softc *sc; - struct aac_srb32 *srb; + struct aac_srb *srb; struct aac_fib *fib; struct aac_command *cm; @@ -354,7 +354,7 @@ aac_cam_action(struct cam_sim *sim, unio } fib = cm->cm_fib; - srb = (struct aac_srb32 *)&fib->data[0]; + srb = (struct aac_srb *)&fib->data[0]; cm->cm_datalen = 0; switch (ccb->ccb_h.flags & CAM_DIR_MASK) { @@ -405,10 +405,10 @@ aac_cam_action(struct cam_sim *sim, unio if (ccb->ccb_h.flags & CAM_DATA_PHYS) { /* Send a 32bit command */ fib->Header.Command = ScsiPortCommand; - srb->sg_map32.SgCount = 1; - srb->sg_map32.SgEntry[0].SgAddress = + srb->sg_map.SgCount = 1; + srb->sg_map.SgEntry[0].SgAddress = (uint32_t)(uintptr_t)csio->data_ptr; - srb->sg_map32.SgEntry[0].SgByteCount = + srb->sg_map.SgEntry[0].SgByteCount = csio->dxfer_len; } else { /* @@ -417,15 +417,15 @@ aac_cam_action(struct cam_sim *sim, unio */ cm->cm_data = (void *)csio->data_ptr; cm->cm_datalen = csio->dxfer_len; - cm->cm_sgtable = &srb->sg_map32; + cm->cm_sgtable = &srb->sg_map; } } else { /* XXX Need to handle multiple s/g elements */ panic("aac_cam: multiple s/g elements"); } } else { - srb->sg_map32.SgCount = 0; - srb->sg_map32.SgEntry[0].SgByteCount = 0; + srb->sg_map.SgCount = 0; + srb->sg_map.SgEntry[0].SgByteCount = 0; srb->data_len = 0; } @@ -461,7 +461,7 @@ aac_cam_action(struct cam_sim *sim, unio AAC_FIBSTATE_REXPECTED | AAC_FIBSTATE_NORM; fib->Header.Size = sizeof(struct aac_fib_header) + - sizeof(struct aac_srb32); + sizeof(struct aac_srb); aac_enqueue_ready(cm); aac_startio(cm->cm_sc); Modified: stable/8/sys/dev/aac/aac_pci.c ============================================================================== --- stable/8/sys/dev/aac/aac_pci.c Mon Mar 29 00:23:46 2010 (r205814) +++ stable/8/sys/dev/aac/aac_pci.c Mon Mar 29 00:30:44 2010 (r205815) @@ -435,10 +435,6 @@ aac_pci_attach(device_t dev) fwprintf(sc, HBA_FLAGS_DBG_INIT_B, "set hardware up for StrongARM"); sc->aac_if = aac_sa_interface; break; - case AAC_HWIF_FALCON: - fwprintf(sc, HBA_FLAGS_DBG_INIT_B, "set hardware up for Falcon/PPC"); - sc->aac_if = aac_fa_interface; - break; case AAC_HWIF_RKT: fwprintf(sc, HBA_FLAGS_DBG_INIT_B, "set hardware up for Rocket/MIPS"); sc->aac_if = aac_rkt_interface; Modified: stable/8/sys/dev/aac/aacreg.h ============================================================================== --- stable/8/sys/dev/aac/aacreg.h Mon Mar 29 00:23:46 2010 (r205814) +++ stable/8/sys/dev/aac/aacreg.h Mon Mar 29 00:30:44 2010 (r205815) @@ -1363,7 +1363,7 @@ struct aac_close_command { /* * SCSI Passthrough structures */ -struct aac_srb32 { +struct aac_srb { u_int32_t function; u_int32_t bus; u_int32_t target; @@ -1374,7 +1374,7 @@ struct aac_srb32 { u_int32_t retry_limit; u_int32_t cdb_len; u_int8_t cdb[16]; - struct aac_sg_table sg_map32; + struct aac_sg_table sg_map; }; enum { @@ -1453,24 +1453,6 @@ enum { }; /* - * Register set for adapters based on the Falcon bridge and PPC core - */ - -#define AAC_FA_DOORBELL0_CLEAR 0x00 -#define AAC_FA_DOORBELL1_CLEAR 0x02 -#define AAC_FA_DOORBELL0 0x04 -#define AAC_FA_DOORBELL1 0x06 -#define AAC_FA_MASK0_CLEAR 0x08 -#define AAC_FA_MASK1_CLEAR 0x0a -#define AAC_FA_MASK0 0x0c -#define AAC_FA_MASK1 0x0e -#define AAC_FA_MAILBOX 0x10 -#define AAC_FA_FWSTATUS 0x2c /* Mailbox 7 */ -#define AAC_FA_INTSRC 0x900 - -#define AAC_FA_HACK(sc) (void)AAC_MEM0_GETREG4(sc, AAC_FA_INTSRC) - -/* * Register definitions for the Adaptec AAC-364 'Jalapeno I/II' adapters, based * on the SA110 'StrongArm'. */ Modified: stable/8/sys/dev/aac/aacvar.h ============================================================================== --- stable/8/sys/dev/aac/aacvar.h Mon Mar 29 00:23:46 2010 (r205814) +++ stable/8/sys/dev/aac/aacvar.h Mon Mar 29 00:30:44 2010 (r205815) @@ -37,6 +37,16 @@ #include #include +#define AAC_TYPE_DEVO 1 +#define AAC_TYPE_ALPHA 2 +#define AAC_TYPE_BETA 3 +#define AAC_TYPE_RELEASE 4 + +#define AAC_DRIVER_MAJOR_VERSION 2 +#define AAC_DRIVER_MINOR_VERSION 1 +#define AAC_DRIVER_BUGFIX_LEVEL 9 +#define AAC_DRIVER_TYPE AAC_TYPE_RELEASE + #ifndef AAC_DRIVER_BUILD # define AAC_DRIVER_BUILD 1 #endif @@ -319,7 +329,6 @@ struct aac_softc int aac_hwif; #define AAC_HWIF_I960RX 0 #define AAC_HWIF_STRONGARM 1 -#define AAC_HWIF_FALCON 2 #define AAC_HWIF_RKT 3 #define AAC_HWIF_NARK 4 #define AAC_HWIF_UNKNOWN -1 From owner-svn-src-all@FreeBSD.ORG Mon Mar 29 00:39:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF8081065674; Mon, 29 Mar 2010 00:39:09 +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 DC9198FC19; Mon, 29 Mar 2010 00:39: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 o2T0d9eC094293; Mon, 29 Mar 2010 00:39:09 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2T0d9jt094287; Mon, 29 Mar 2010 00:39:09 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201003290039.o2T0d9jt094287@svn.freebsd.org> From: Ed Maste Date: Mon, 29 Mar 2010 00:39: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: r205816 - 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: Mon, 29 Mar 2010 00:39:10 -0000 Author: emaste Date: Mon Mar 29 00:39:09 2010 New Revision: 205816 URL: http://svn.freebsd.org/changeset/base/205816 Log: MFC aac(4) driver changes r204019: Include command type in COMMAND TIMEOUT messages to aid in debugging. r203885: Diff reduction with Adaptec's vendor driver. Driver version 2.1.9 chosen as that Adaptec version roughly corresponds with the current feature set merged to the in-tree driver. r203801: Garbage collect Falcon/PPC support that has not been used in released products, based on discussion with Adaptec. r198617: Rename aac_srb32 to aac_srb, to match Adaptec's vendor driver. Modified: stable/7/sys/dev/aac/aac.c stable/7/sys/dev/aac/aac_cam.c stable/7/sys/dev/aac/aac_pci.c stable/7/sys/dev/aac/aacreg.h stable/7/sys/dev/aac/aacvar.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/aac/aac.c ============================================================================== --- stable/7/sys/dev/aac/aac.c Mon Mar 29 00:30:44 2010 (r205815) +++ stable/7/sys/dev/aac/aac.c Mon Mar 29 00:39:09 2010 (r205816) @@ -33,7 +33,6 @@ __FBSDID("$FreeBSD$"); /* * Driver for the Adaptec 'FSA' family of PCI/SCSI RAID adapters. */ -#define AAC_DRIVER_VERSION 0x02000000 #define AAC_DRIVERNAME "aac" #include "opt_aac.h" @@ -107,28 +106,6 @@ static int aac_dequeue_fib(struct aac_so static int aac_enqueue_response(struct aac_softc *sc, int queue, struct aac_fib *fib); -/* Falcon/PPC interface */ -static int aac_fa_get_fwstatus(struct aac_softc *sc); -static void aac_fa_qnotify(struct aac_softc *sc, int qbit); -static int aac_fa_get_istatus(struct aac_softc *sc); -static void aac_fa_clear_istatus(struct aac_softc *sc, int mask); -static void aac_fa_set_mailbox(struct aac_softc *sc, u_int32_t command, - u_int32_t arg0, u_int32_t arg1, - u_int32_t arg2, u_int32_t arg3); -static int aac_fa_get_mailbox(struct aac_softc *sc, int mb); -static void aac_fa_set_interrupts(struct aac_softc *sc, int enable); - -struct aac_interface aac_fa_interface = { - aac_fa_get_fwstatus, - aac_fa_qnotify, - aac_fa_get_istatus, - aac_fa_clear_istatus, - aac_fa_set_mailbox, - aac_fa_get_mailbox, - aac_fa_set_interrupts, - NULL, NULL, NULL -}; - /* StrongARM interface */ static int aac_sa_get_fwstatus(struct aac_softc *sc); static void aac_sa_qnotify(struct aac_softc *sc, int qbit); @@ -2378,8 +2355,9 @@ aac_timeout(struct aac_softc *sc) /* && !(cm->cm_flags & AAC_CMD_TIMEDOUT) */) { cm->cm_flags |= AAC_CMD_TIMEDOUT; device_printf(sc->aac_dev, - "COMMAND %p TIMEOUT AFTER %d SECONDS\n", - cm, (int)(time_uptime-cm->cm_timestamp)); + "COMMAND %p (TYPE %d) TIMEOUT AFTER %d SECONDS\n", + cm, cm->cm_fib->Header.Command, + (int)(time_uptime-cm->cm_timestamp)); AAC_PRINT_FIB(sc, cm->cm_fib); timedout++; } @@ -2420,17 +2398,6 @@ aac_rx_get_fwstatus(struct aac_softc *sc } static int -aac_fa_get_fwstatus(struct aac_softc *sc) -{ - int val; - - fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - - val = AAC_MEM0_GETREG4(sc, AAC_FA_FWSTATUS); - return (val); -} - -static int aac_rkt_get_fwstatus(struct aac_softc *sc) { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); @@ -2460,15 +2427,6 @@ aac_rx_qnotify(struct aac_softc *sc, int } static void -aac_fa_qnotify(struct aac_softc *sc, int qbit) -{ - fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - - AAC_MEM0_SETREG2(sc, AAC_FA_DOORBELL1, qbit); - AAC_FA_HACK(sc); -} - -static void aac_rkt_qnotify(struct aac_softc *sc, int qbit) { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); @@ -2496,17 +2454,6 @@ aac_rx_get_istatus(struct aac_softc *sc) } static int -aac_fa_get_istatus(struct aac_softc *sc) -{ - int val; - - fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - - val = AAC_MEM0_GETREG2(sc, AAC_FA_DOORBELL0); - return (val); -} - -static int aac_rkt_get_istatus(struct aac_softc *sc) { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); @@ -2534,15 +2481,6 @@ aac_rx_clear_istatus(struct aac_softc *s } static void -aac_fa_clear_istatus(struct aac_softc *sc, int mask) -{ - fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - - AAC_MEM0_SETREG2(sc, AAC_FA_DOORBELL0_CLEAR, mask); - AAC_FA_HACK(sc); -} - -static void aac_rkt_clear_istatus(struct aac_softc *sc, int mask) { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); @@ -2580,24 +2518,6 @@ aac_rx_set_mailbox(struct aac_softc *sc, } static void -aac_fa_set_mailbox(struct aac_softc *sc, u_int32_t command, - u_int32_t arg0, u_int32_t arg1, u_int32_t arg2, u_int32_t arg3) -{ - fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - - AAC_MEM1_SETREG4(sc, AAC_FA_MAILBOX, command); - AAC_FA_HACK(sc); - AAC_MEM1_SETREG4(sc, AAC_FA_MAILBOX + 4, arg0); - AAC_FA_HACK(sc); - AAC_MEM1_SETREG4(sc, AAC_FA_MAILBOX + 8, arg1); - AAC_FA_HACK(sc); - AAC_MEM1_SETREG4(sc, AAC_FA_MAILBOX + 12, arg2); - AAC_FA_HACK(sc); - AAC_MEM1_SETREG4(sc, AAC_FA_MAILBOX + 16, arg3); - AAC_FA_HACK(sc); -} - -static void aac_rkt_set_mailbox(struct aac_softc *sc, u_int32_t command, u_int32_t arg0, u_int32_t arg1, u_int32_t arg2, u_int32_t arg3) { @@ -2630,17 +2550,6 @@ aac_rx_get_mailbox(struct aac_softc *sc, } static int -aac_fa_get_mailbox(struct aac_softc *sc, int mb) -{ - int val; - - fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - - val = AAC_MEM1_GETREG4(sc, AAC_FA_MAILBOX + (mb * 4)); - return (val); -} - -static int aac_rkt_get_mailbox(struct aac_softc *sc, int mb) { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); @@ -2679,20 +2588,6 @@ aac_rx_set_interrupts(struct aac_softc * } static void -aac_fa_set_interrupts(struct aac_softc *sc, int enable) -{ - fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, "%sable interrupts", enable ? "en" : "dis"); - - if (enable) { - AAC_MEM0_SETREG2((sc), AAC_FA_MASK0_CLEAR, AAC_DB_INTERRUPTS); - AAC_FA_HACK(sc); - } else { - AAC_MEM0_SETREG2((sc), AAC_FA_MASK0, ~0); - AAC_FA_HACK(sc); - } -} - -static void aac_rkt_set_interrupts(struct aac_softc *sc, int enable) { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, "%sable interrupts", enable ? "en" : "dis"); @@ -2875,10 +2770,8 @@ aac_describe_controller(struct aac_softc } device_printf(sc->aac_dev, "%s, aac driver %d.%d.%d-%d\n", adapter_type, - AAC_DRIVER_VERSION >> 24, - (AAC_DRIVER_VERSION >> 16) & 0xFF, - AAC_DRIVER_VERSION & 0xFF, - AAC_DRIVER_BUILD); + AAC_DRIVER_MAJOR_VERSION, AAC_DRIVER_MINOR_VERSION, + AAC_DRIVER_BUGFIX_LEVEL, AAC_DRIVER_BUILD); aac_release_sync_fib(sc); mtx_unlock(&sc->aac_io_lock); @@ -3363,10 +3256,16 @@ aac_rev_check(struct aac_softc *sc, cadd * Doctor up the response struct. */ rev_check_resp.possiblyCompatible = 1; - rev_check_resp.adapterSWRevision.external.ul = - sc->aac_revision.external.ul; + rev_check_resp.adapterSWRevision.external.comp.major = + AAC_DRIVER_MAJOR_VERSION; + rev_check_resp.adapterSWRevision.external.comp.minor = + AAC_DRIVER_MINOR_VERSION; + rev_check_resp.adapterSWRevision.external.comp.type = + AAC_DRIVER_TYPE; + rev_check_resp.adapterSWRevision.external.comp.dash = + AAC_DRIVER_BUGFIX_LEVEL; rev_check_resp.adapterSWRevision.buildNumber = - sc->aac_revision.buildNumber; + AAC_DRIVER_BUILD; return(copyout((caddr_t)&rev_check_resp, udata, sizeof(struct aac_rev_check_resp))); Modified: stable/7/sys/dev/aac/aac_cam.c ============================================================================== --- stable/7/sys/dev/aac/aac_cam.c Mon Mar 29 00:30:44 2010 (r205815) +++ stable/7/sys/dev/aac/aac_cam.c Mon Mar 29 00:39:09 2010 (r205816) @@ -211,7 +211,7 @@ aac_cam_action(struct cam_sim *sim, unio { struct aac_cam *camsc; struct aac_softc *sc; - struct aac_srb32 *srb; + struct aac_srb *srb; struct aac_fib *fib; struct aac_command *cm; @@ -354,7 +354,7 @@ aac_cam_action(struct cam_sim *sim, unio } fib = cm->cm_fib; - srb = (struct aac_srb32 *)&fib->data[0]; + srb = (struct aac_srb *)&fib->data[0]; cm->cm_datalen = 0; switch (ccb->ccb_h.flags & CAM_DIR_MASK) { @@ -405,10 +405,10 @@ aac_cam_action(struct cam_sim *sim, unio if (ccb->ccb_h.flags & CAM_DATA_PHYS) { /* Send a 32bit command */ fib->Header.Command = ScsiPortCommand; - srb->sg_map32.SgCount = 1; - srb->sg_map32.SgEntry[0].SgAddress = + srb->sg_map.SgCount = 1; + srb->sg_map.SgEntry[0].SgAddress = (uint32_t)(uintptr_t)csio->data_ptr; - srb->sg_map32.SgEntry[0].SgByteCount = + srb->sg_map.SgEntry[0].SgByteCount = csio->dxfer_len; } else { /* @@ -417,15 +417,15 @@ aac_cam_action(struct cam_sim *sim, unio */ cm->cm_data = (void *)csio->data_ptr; cm->cm_datalen = csio->dxfer_len; - cm->cm_sgtable = &srb->sg_map32; + cm->cm_sgtable = &srb->sg_map; } } else { /* XXX Need to handle multiple s/g elements */ panic("aac_cam: multiple s/g elements"); } } else { - srb->sg_map32.SgCount = 0; - srb->sg_map32.SgEntry[0].SgByteCount = 0; + srb->sg_map.SgCount = 0; + srb->sg_map.SgEntry[0].SgByteCount = 0; srb->data_len = 0; } @@ -461,7 +461,7 @@ aac_cam_action(struct cam_sim *sim, unio AAC_FIBSTATE_REXPECTED | AAC_FIBSTATE_NORM; fib->Header.Size = sizeof(struct aac_fib_header) + - sizeof(struct aac_srb32); + sizeof(struct aac_srb); aac_enqueue_ready(cm); aac_startio(cm->cm_sc); Modified: stable/7/sys/dev/aac/aac_pci.c ============================================================================== --- stable/7/sys/dev/aac/aac_pci.c Mon Mar 29 00:30:44 2010 (r205815) +++ stable/7/sys/dev/aac/aac_pci.c Mon Mar 29 00:39:09 2010 (r205816) @@ -435,10 +435,6 @@ aac_pci_attach(device_t dev) fwprintf(sc, HBA_FLAGS_DBG_INIT_B, "set hardware up for StrongARM"); sc->aac_if = aac_sa_interface; break; - case AAC_HWIF_FALCON: - fwprintf(sc, HBA_FLAGS_DBG_INIT_B, "set hardware up for Falcon/PPC"); - sc->aac_if = aac_fa_interface; - break; case AAC_HWIF_RKT: fwprintf(sc, HBA_FLAGS_DBG_INIT_B, "set hardware up for Rocket/MIPS"); sc->aac_if = aac_rkt_interface; Modified: stable/7/sys/dev/aac/aacreg.h ============================================================================== --- stable/7/sys/dev/aac/aacreg.h Mon Mar 29 00:30:44 2010 (r205815) +++ stable/7/sys/dev/aac/aacreg.h Mon Mar 29 00:39:09 2010 (r205816) @@ -1363,7 +1363,7 @@ struct aac_close_command { /* * SCSI Passthrough structures */ -struct aac_srb32 { +struct aac_srb { u_int32_t function; u_int32_t bus; u_int32_t target; @@ -1374,7 +1374,7 @@ struct aac_srb32 { u_int32_t retry_limit; u_int32_t cdb_len; u_int8_t cdb[16]; - struct aac_sg_table sg_map32; + struct aac_sg_table sg_map; }; enum { @@ -1453,24 +1453,6 @@ enum { }; /* - * Register set for adapters based on the Falcon bridge and PPC core - */ - -#define AAC_FA_DOORBELL0_CLEAR 0x00 -#define AAC_FA_DOORBELL1_CLEAR 0x02 -#define AAC_FA_DOORBELL0 0x04 -#define AAC_FA_DOORBELL1 0x06 -#define AAC_FA_MASK0_CLEAR 0x08 -#define AAC_FA_MASK1_CLEAR 0x0a -#define AAC_FA_MASK0 0x0c -#define AAC_FA_MASK1 0x0e -#define AAC_FA_MAILBOX 0x10 -#define AAC_FA_FWSTATUS 0x2c /* Mailbox 7 */ -#define AAC_FA_INTSRC 0x900 - -#define AAC_FA_HACK(sc) (void)AAC_MEM0_GETREG4(sc, AAC_FA_INTSRC) - -/* * Register definitions for the Adaptec AAC-364 'Jalapeno I/II' adapters, based * on the SA110 'StrongArm'. */ Modified: stable/7/sys/dev/aac/aacvar.h ============================================================================== --- stable/7/sys/dev/aac/aacvar.h Mon Mar 29 00:30:44 2010 (r205815) +++ stable/7/sys/dev/aac/aacvar.h Mon Mar 29 00:39:09 2010 (r205816) @@ -37,6 +37,16 @@ #include #include +#define AAC_TYPE_DEVO 1 +#define AAC_TYPE_ALPHA 2 +#define AAC_TYPE_BETA 3 +#define AAC_TYPE_RELEASE 4 + +#define AAC_DRIVER_MAJOR_VERSION 2 +#define AAC_DRIVER_MINOR_VERSION 1 +#define AAC_DRIVER_BUGFIX_LEVEL 9 +#define AAC_DRIVER_TYPE AAC_TYPE_RELEASE + #ifndef AAC_DRIVER_BUILD # define AAC_DRIVER_BUILD 1 #endif @@ -319,7 +329,6 @@ struct aac_softc int aac_hwif; #define AAC_HWIF_I960RX 0 #define AAC_HWIF_STRONGARM 1 -#define AAC_HWIF_FALCON 2 #define AAC_HWIF_RKT 3 #define AAC_HWIF_NARK 4 #define AAC_HWIF_UNKNOWN -1 From owner-svn-src-all@FreeBSD.ORG Mon Mar 29 01:24:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 675321065674; Mon, 29 Mar 2010 01:24:22 +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 557638FC08; Mon, 29 Mar 2010 01:24:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2T1OKP2004387; Mon, 29 Mar 2010 01:24:20 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2T1OK0m004385; Mon, 29 Mar 2010 01:24:20 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201003290124.o2T1OK0m004385@svn.freebsd.org> From: Doug Barton Date: Mon, 29 Mar 2010 01:24:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205817 - stable/8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2010 01:24:22 -0000 Author: dougb Date: Mon Mar 29 01:24:20 2010 New Revision: 205817 URL: http://svn.freebsd.org/changeset/base/205817 Log: MFC r205290: MAKE_JUST_WORLDS Modified: stable/8/Makefile (contents, props changed) Modified: stable/8/Makefile ============================================================================== --- stable/8/Makefile Mon Mar 29 00:39:09 2010 (r205816) +++ stable/8/Makefile Mon Mar 29 01:24:20 2010 (r205817) @@ -310,6 +310,7 @@ universe_${target}: "check _.${target}.buildworld for details" | ${MAKEFAIL})) @echo ">> ${target} buildworld completed on `LC_ALL=C date`" .endif +.if !defined(MAKE_JUST_WORLDS) .if exists(${.CURDIR}/sys/${target}/conf/NOTES) @(cd ${.CURDIR}/sys/${target}/conf && env __MAKE_CONF=/dev/null \ ${MAKE} LINT > ${.CURDIR}/_.${target}.makeLINT 2>&1 || \ @@ -318,6 +319,7 @@ universe_${target}: .endif @cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} TARGET=${target} \ universe_kernels +.endif @echo ">> ${target} completed on `LC_ALL=C date`" .endfor universe_kernels: universe_kernconfs From owner-svn-src-all@FreeBSD.ORG Mon Mar 29 06:31:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D28671065673; Mon, 29 Mar 2010 06:31:58 +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 BC4A18FC13; Mon, 29 Mar 2010 06:31: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 o2T6VwLX072099; Mon, 29 Mar 2010 06:31:58 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2T6VwEB072088; Mon, 29 Mar 2010 06:31:58 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201003290631.o2T6VwEB072088@svn.freebsd.org> From: Doug Barton Date: Mon, 29 Mar 2010 06:31:58 +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: r205820 - in stable/8: contrib/bind9 contrib/bind9/bin/check contrib/bind9/bin/dig contrib/bind9/bin/dnssec contrib/bind9/bin/named contrib/bind9/bin/named/include/named contrib/bind9/b... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Mar 2010 06:31:59 -0000 Author: dougb Date: Mon Mar 29 06:31:58 2010 New Revision: 205820 URL: http://svn.freebsd.org/changeset/base/205820 Log: Update to 9.6.2-P1, the latest patchfix release which deals with the problems related to the handling of broken DNSSEC trust chains. This fix is only relevant for those who have DNSSEC validation enabled and configure trust anchors from third parties, either manually, or through a system like DLV. Modified: stable/8/contrib/bind9/CHANGES stable/8/contrib/bind9/COPYRIGHT stable/8/contrib/bind9/FAQ stable/8/contrib/bind9/FAQ.xml stable/8/contrib/bind9/NSEC3-NOTES stable/8/contrib/bind9/README stable/8/contrib/bind9/bin/check/named-checkconf.8 stable/8/contrib/bind9/bin/check/named-checkconf.html stable/8/contrib/bind9/bin/check/named-checkzone.8 stable/8/contrib/bind9/bin/check/named-checkzone.c stable/8/contrib/bind9/bin/check/named-checkzone.docbook stable/8/contrib/bind9/bin/check/named-checkzone.html stable/8/contrib/bind9/bin/dig/dig.1 stable/8/contrib/bind9/bin/dig/dig.html stable/8/contrib/bind9/bin/dig/dighost.c stable/8/contrib/bind9/bin/dig/host.1 stable/8/contrib/bind9/bin/dig/host.c stable/8/contrib/bind9/bin/dig/host.html stable/8/contrib/bind9/bin/dig/nslookup.1 stable/8/contrib/bind9/bin/dig/nslookup.c stable/8/contrib/bind9/bin/dig/nslookup.html stable/8/contrib/bind9/bin/dnssec/dnssec-dsfromkey.c stable/8/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.8 stable/8/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.c stable/8/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.docbook stable/8/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.html stable/8/contrib/bind9/bin/dnssec/dnssec-keygen.8 stable/8/contrib/bind9/bin/dnssec/dnssec-keygen.c stable/8/contrib/bind9/bin/dnssec/dnssec-keygen.docbook stable/8/contrib/bind9/bin/dnssec/dnssec-keygen.html stable/8/contrib/bind9/bin/dnssec/dnssec-signzone.8 stable/8/contrib/bind9/bin/dnssec/dnssec-signzone.c stable/8/contrib/bind9/bin/dnssec/dnssec-signzone.docbook stable/8/contrib/bind9/bin/dnssec/dnssec-signzone.html stable/8/contrib/bind9/bin/dnssec/dnssectool.c stable/8/contrib/bind9/bin/dnssec/dnssectool.h stable/8/contrib/bind9/bin/named/control.c stable/8/contrib/bind9/bin/named/include/named/server.h stable/8/contrib/bind9/bin/named/lwresd.8 stable/8/contrib/bind9/bin/named/lwresd.html stable/8/contrib/bind9/bin/named/named.8 stable/8/contrib/bind9/bin/named/named.conf.5 stable/8/contrib/bind9/bin/named/named.conf.html stable/8/contrib/bind9/bin/named/named.docbook stable/8/contrib/bind9/bin/named/named.html stable/8/contrib/bind9/bin/named/query.c stable/8/contrib/bind9/bin/named/server.c stable/8/contrib/bind9/bin/named/statschannel.c stable/8/contrib/bind9/bin/named/update.c stable/8/contrib/bind9/bin/nsupdate/nsupdate.1 stable/8/contrib/bind9/bin/nsupdate/nsupdate.html stable/8/contrib/bind9/bin/rndc/rndc-confgen.8 stable/8/contrib/bind9/bin/rndc/rndc-confgen.html stable/8/contrib/bind9/bin/rndc/rndc.8 stable/8/contrib/bind9/bin/rndc/rndc.conf.5 stable/8/contrib/bind9/bin/rndc/rndc.conf.html stable/8/contrib/bind9/bin/rndc/rndc.html stable/8/contrib/bind9/config.h.in stable/8/contrib/bind9/configure.in stable/8/contrib/bind9/doc/arm/Bv9ARM-book.xml stable/8/contrib/bind9/doc/arm/Bv9ARM.ch01.html stable/8/contrib/bind9/doc/arm/Bv9ARM.ch02.html stable/8/contrib/bind9/doc/arm/Bv9ARM.ch03.html stable/8/contrib/bind9/doc/arm/Bv9ARM.ch04.html stable/8/contrib/bind9/doc/arm/Bv9ARM.ch05.html stable/8/contrib/bind9/doc/arm/Bv9ARM.ch06.html stable/8/contrib/bind9/doc/arm/Bv9ARM.ch07.html stable/8/contrib/bind9/doc/arm/Bv9ARM.ch08.html stable/8/contrib/bind9/doc/arm/Bv9ARM.ch09.html stable/8/contrib/bind9/doc/arm/Bv9ARM.ch10.html stable/8/contrib/bind9/doc/arm/Bv9ARM.html stable/8/contrib/bind9/doc/arm/Bv9ARM.pdf stable/8/contrib/bind9/doc/arm/man.dig.html stable/8/contrib/bind9/doc/arm/man.dnssec-dsfromkey.html stable/8/contrib/bind9/doc/arm/man.dnssec-keyfromlabel.html stable/8/contrib/bind9/doc/arm/man.dnssec-keygen.html stable/8/contrib/bind9/doc/arm/man.dnssec-signzone.html stable/8/contrib/bind9/doc/arm/man.host.html stable/8/contrib/bind9/doc/arm/man.named-checkconf.html stable/8/contrib/bind9/doc/arm/man.named-checkzone.html stable/8/contrib/bind9/doc/arm/man.named.html stable/8/contrib/bind9/doc/arm/man.nsupdate.html stable/8/contrib/bind9/doc/arm/man.rndc-confgen.html stable/8/contrib/bind9/doc/arm/man.rndc.conf.html stable/8/contrib/bind9/doc/arm/man.rndc.html stable/8/contrib/bind9/doc/misc/Makefile.in stable/8/contrib/bind9/lib/dns/api stable/8/contrib/bind9/lib/dns/db.c stable/8/contrib/bind9/lib/dns/dispatch.c stable/8/contrib/bind9/lib/dns/dnssec.c stable/8/contrib/bind9/lib/dns/dst_api.c stable/8/contrib/bind9/lib/dns/dst_internal.h stable/8/contrib/bind9/lib/dns/dst_parse.c stable/8/contrib/bind9/lib/dns/include/dns/db.h stable/8/contrib/bind9/lib/dns/include/dns/dnssec.h stable/8/contrib/bind9/lib/dns/include/dns/journal.h stable/8/contrib/bind9/lib/dns/include/dns/keyvalues.h stable/8/contrib/bind9/lib/dns/include/dns/name.h stable/8/contrib/bind9/lib/dns/include/dns/ncache.h stable/8/contrib/bind9/lib/dns/include/dns/nsec3.h stable/8/contrib/bind9/lib/dns/include/dns/rbt.h stable/8/contrib/bind9/lib/dns/include/dns/rdataset.h stable/8/contrib/bind9/lib/dns/include/dns/resolver.h stable/8/contrib/bind9/lib/dns/include/dns/result.h stable/8/contrib/bind9/lib/dns/include/dns/types.h stable/8/contrib/bind9/lib/dns/include/dns/validator.h stable/8/contrib/bind9/lib/dns/include/dns/zone.h stable/8/contrib/bind9/lib/dns/include/dst/dst.h stable/8/contrib/bind9/lib/dns/journal.c stable/8/contrib/bind9/lib/dns/masterdump.c stable/8/contrib/bind9/lib/dns/message.c stable/8/contrib/bind9/lib/dns/ncache.c stable/8/contrib/bind9/lib/dns/nsec3.c stable/8/contrib/bind9/lib/dns/opensslrsa_link.c stable/8/contrib/bind9/lib/dns/rbt.c stable/8/contrib/bind9/lib/dns/rbtdb.c stable/8/contrib/bind9/lib/dns/rcode.c stable/8/contrib/bind9/lib/dns/rdata/generic/ipseckey_45.c stable/8/contrib/bind9/lib/dns/rdatalist.c stable/8/contrib/bind9/lib/dns/rdataset.c stable/8/contrib/bind9/lib/dns/rdataslab.c stable/8/contrib/bind9/lib/dns/resolver.c stable/8/contrib/bind9/lib/dns/result.c stable/8/contrib/bind9/lib/dns/sdb.c stable/8/contrib/bind9/lib/dns/sdlz.c stable/8/contrib/bind9/lib/dns/spnego.c stable/8/contrib/bind9/lib/dns/validator.c stable/8/contrib/bind9/lib/dns/view.c stable/8/contrib/bind9/lib/dns/zone.c stable/8/contrib/bind9/lib/isc/api stable/8/contrib/bind9/lib/isc/base32.c stable/8/contrib/bind9/lib/isc/base64.c stable/8/contrib/bind9/lib/isc/heap.c stable/8/contrib/bind9/lib/isc/httpd.c stable/8/contrib/bind9/lib/isc/ia64/include/isc/atomic.h stable/8/contrib/bind9/lib/isc/include/isc/entropy.h stable/8/contrib/bind9/lib/isc/include/isc/netscope.h stable/8/contrib/bind9/lib/isc/include/isc/portset.h stable/8/contrib/bind9/lib/isc/include/isc/sha2.h stable/8/contrib/bind9/lib/isc/include/isc/util.h stable/8/contrib/bind9/lib/isc/inet_ntop.c stable/8/contrib/bind9/lib/isc/powerpc/include/isc/atomic.h stable/8/contrib/bind9/lib/isc/random.c stable/8/contrib/bind9/lib/isc/sha2.c stable/8/contrib/bind9/lib/isc/unix/ifiter_getifaddrs.c stable/8/contrib/bind9/lib/isc/unix/socket.c stable/8/contrib/bind9/lib/isccc/api stable/8/contrib/bind9/lib/isccfg/aclconf.c stable/8/contrib/bind9/lib/isccfg/api stable/8/contrib/bind9/lib/isccfg/include/isccfg/namedconf.h stable/8/contrib/bind9/lib/lwres/api stable/8/contrib/bind9/lib/lwres/context.c stable/8/contrib/bind9/lib/lwres/getipnode.c stable/8/contrib/bind9/lib/lwres/man/lwres.3 stable/8/contrib/bind9/lib/lwres/man/lwres.html stable/8/contrib/bind9/lib/lwres/man/lwres_buffer.3 stable/8/contrib/bind9/lib/lwres/man/lwres_buffer.html stable/8/contrib/bind9/lib/lwres/man/lwres_config.3 stable/8/contrib/bind9/lib/lwres/man/lwres_config.html stable/8/contrib/bind9/lib/lwres/man/lwres_context.3 stable/8/contrib/bind9/lib/lwres/man/lwres_context.html stable/8/contrib/bind9/lib/lwres/man/lwres_gabn.3 stable/8/contrib/bind9/lib/lwres/man/lwres_gabn.html stable/8/contrib/bind9/lib/lwres/man/lwres_gai_strerror.3 stable/8/contrib/bind9/lib/lwres/man/lwres_gai_strerror.html stable/8/contrib/bind9/lib/lwres/man/lwres_getaddrinfo.3 stable/8/contrib/bind9/lib/lwres/man/lwres_getaddrinfo.html stable/8/contrib/bind9/lib/lwres/man/lwres_gethostent.3 stable/8/contrib/bind9/lib/lwres/man/lwres_gethostent.html stable/8/contrib/bind9/lib/lwres/man/lwres_getipnode.3 stable/8/contrib/bind9/lib/lwres/man/lwres_getipnode.html stable/8/contrib/bind9/lib/lwres/man/lwres_getnameinfo.3 stable/8/contrib/bind9/lib/lwres/man/lwres_getnameinfo.html stable/8/contrib/bind9/lib/lwres/man/lwres_getrrsetbyname.3 stable/8/contrib/bind9/lib/lwres/man/lwres_getrrsetbyname.html stable/8/contrib/bind9/lib/lwres/man/lwres_gnba.3 stable/8/contrib/bind9/lib/lwres/man/lwres_gnba.html stable/8/contrib/bind9/lib/lwres/man/lwres_hstrerror.3 stable/8/contrib/bind9/lib/lwres/man/lwres_hstrerror.html stable/8/contrib/bind9/lib/lwres/man/lwres_inetntop.3 stable/8/contrib/bind9/lib/lwres/man/lwres_inetntop.html stable/8/contrib/bind9/lib/lwres/man/lwres_noop.3 stable/8/contrib/bind9/lib/lwres/man/lwres_noop.html stable/8/contrib/bind9/lib/lwres/man/lwres_packet.3 stable/8/contrib/bind9/lib/lwres/man/lwres_packet.html stable/8/contrib/bind9/lib/lwres/man/lwres_resutil.3 stable/8/contrib/bind9/lib/lwres/man/lwres_resutil.html stable/8/contrib/bind9/version stable/8/lib/bind/config.h Directory Properties: stable/8/contrib/bind9/ (props changed) stable/8/lib/bind/ (props changed) Modified: stable/8/contrib/bind9/CHANGES ============================================================================== --- stable/8/contrib/bind9/CHANGES Mon Mar 29 04:01:02 2010 (r205819) +++ stable/8/contrib/bind9/CHANGES Mon Mar 29 06:31:58 2010 (r205820) @@ -1,4 +1,30 @@ - --- 9.6.1-P3 released --- + --- 9.6.2-P1 released --- + +2852. [bug] Handle broken DNSSEC trust chains better. [RT #15619] + + --- 9.6.2 released --- + +2850. [bug] If isc_heap_insert() failed due to memory shortage + the heap would have corrupted entries. [RT #20951] + +2849. [bug] Don't treat errors from the xml2 library as fatal. + [RT #20945] + +2846. [bug] EOF on unix domain sockets was not being handled + correctly. [RT #20731] + +2844. [doc] notify-delay default in ARM was wrong. It should have + been five (5) seconds. + + --- 9.6.2rc1 released --- + +2838. [func] Backport support for SHA-2 DNSSEC algorithms, + RSASHA256 and RSASHA512, from BIND 9.7. (This + incorporates changes 2726 and 2738 from that + release branch.) [RT #20871] + +2837. [port] Prevent Linux spurious warnings about fwrite(). + [RT #20812] 2831. [security] Do not attempt to validate or cache out-of-bailiwick data returned with a secure @@ -10,21 +36,286 @@ 2827. [security] Bogus NXDOMAIN could be cached as if valid. [RT #20712] - --- 9.6.1-P2 released --- +2825. [bug] Changing the setting of OPTOUT in a NSEC3 chain that + was in the process of being created was not properly + recorded in the zone. [RT #20786] + +2823. [bug] rbtdb.c:getsigningtime() was missing locks. [RT #20781] + +2819. [cleanup] Removed unnecessary DNS_POINTER_MAXHOPS define + [RT #20771] + +2818. [cleanup] rndc could return an incorrect error code + when a zone was not found. [RT #20767] + +2815. [bug] Exclusively lock the task when freezing a zone. + [RT #19838] + +2814. [func] Provide a definitive error message when a master + zone is not loaded. [RT #20757] + + --- 9.6.2b1 released --- + +2797. [bug] Don't decrement the dispatch manager's maxbuffers. + [RT #20613] + +2790. [bug] Handle DS queries to stub zones. [RT #20440] + +2789. [bug] Fixed an INSIST in dispatch.c [RT #20576] + +2786. [bug] Additional could be promoted to answer. [RT #20663] + +2784. [bug] TC was not always being set when required glue was + dropped. [RT #20655] + +2783. [func] Return minimal responses to EDNS/UDP queries with a UDP + buffer size of 512 or less. [RT #20654] + +2782. [port] win32: use getaddrinfo() for hostname lookups. + [RT #20650] + +2777. [contrib] DLZ MYSQL auto reconnect support discovery was wrong. 2772. [security] When validating, track whether pending data was from the additional section or not and only return it if validates as secure. [RT #20438] - --- 9.6.1-P1 released --- +2765. [bug] Skip masters for which the TSIG key cannot be found. + [RT #20595] + +2760. [cleanup] Corrected named-compilezone usage summary. [RT #20533] + +2759. [doc] Add information about .jbk/.jnw files to + the ARM. [RT #20303] + +2758. [bug] win32: Added a workaround for a windows 2008 bug + that could cause the UDP client handler to shut + down. [RT #19176] + +2757. [bug] dig: assertion failure could occur in connect + timeout. [RT #20599] + +2755. [doc] Clarify documentation of keyset- files in + dnssec-signzone man page. [RT #19810] + +2754. [bug] Secure-to-insecure transitions failed when zone + was signed with NSEC3. [RT #20587] + +2750. [bug] dig: assertion failure could occur when a server + didn't have an address. [RT #20579] + +2749. [bug] ixfr-from-differences generated a non-minimal ixfr + for NSEC3 signed zones. [RT #20452] + +2747. [bug] Journal roll forwards failed to set the re-signing + time of RRSIGs correctly. [RT #20541] + +2743. [bug] RRSIG could be incorrectly set in the NSEC3 record + for a insecure delegation. + +2729. [func] When constructing a CNAME from a DNAME use the DNAME + TTL. [RT #20451] + +2723. [bug] isc_base32_totext(), isc_base32hex_totext(), and + isc_base64_totext(), didn't always mark regions of + memory as fully consumed after conversion. [RT #20445] + +2722. [bug] Ensure that the memory associated with the name of + a node in a rbt tree is not altered during the life + of the node. [RT #20431] + +2721. [port] Have dst__entropy_status() prime the random number + generator. [RT #20369] + +2718. [bug] The space calculations in opensslrsa_todns() were + incorrect. [RT #20394] + +2716. [bug] nslookup debug mode didn't return the ttl. [RT #20414] + +2715. [bug] Require OpenSSL support to be explicitly disabled. + [RT #20288] + +2714. [port] aix/powerpc: 'asm("ics");' needs non standard assembler + flags. + +2713. [bug] powerpc: atomic operations missing asm("ics") / + __isync() calls. + +2706. [bug] Loading a zone with a very large NSEC3 salt could + trigger an assert. [RT #20368] + +2705. [bug] Reconcile the XML stats version number with a later + BIND9 release, by adding a "name" attribute to + "cache" elements and increasing the version number + to 2.2. (This is a minor version change, but may + affect XML parsers if they assume the cache element + doesn't take an attribute.) + +2704. [bug] Serial of dynamic and stub zones could be inconsistent + with their SOA serial. [RT #19387] + +2701. [doc] Correction to ARM: hmac-md5 is no longer the only + supported TSIG key algorithm. [RT #18046] + +2700. [doc] The match-mapped-addresses option is discouraged. + [RT #12252] + +2699. [bug] Missing lock in rbtdb.c. [RT #20037] + +2697. [port] win32: ensure that S_IFMT, S_IFDIR, S_IFCHR and + S_IFREG are defined after including . + [RT #20309] + +2696. [bug] named failed to successfully process some valid + acl constructs. [RT #20308] + +2692. [port] win32: 32/64 bit cleanups. [RT #20335] + +2690. [bug] win32: fix isc_thread_key_getspecific() prototype. + [RT #20315] + +2689. [bug] Correctly handle snprintf result. [RT #20306] + +2688. [bug] Use INTERFACE_F_POINTTOPOINT, not IFF_POINTOPOINT, + to decide to fetch the destination address. [RT #20305] + +2686. [bug] dnssec-signzone should clean the old NSEC chain when + signing with NSEC3 and vice versa. [RT #20301] + +2683. [bug] dnssec-signzone should clean out old NSEC3 chains when + the NSEC3 parameters used to sign the zone change. + [RT #20246] + +2681. [bug] IPSECKEY RR of gateway type 3 was not correctly + decoded. [RT #20269] + +2678. [func] Treat DS queries as if "minimal-response yes;" + was set. [RT #20258] + +2672. [bug] Don't enable searching in 'host' when doing reverse + lookups. [RT #20218] + +2670. [bug] Unexpected connect failures failed to log enough + information to be useful. [RT #20205] + +2663. [func] win32: allow named to run as a service using + "NT AUTHORITY\LocalService" as the account. [RT #19977] + +2662. [bug] lwres_getipnodebyname() and lwres_getipnodebyaddr() + returned a misleading error code when lwresd was + down. [RT #20028] + +2661. [bug] Check whether socket fd exceeds FD_SETSIZE when + creating lwres context. [RT #20029] + +2659. [doc] Clarify dnssec-keygen doc: key name must match zone + name for DNSSEC keys. [RT #19938] + +2656. [func] win32: add a "tools only" check box to the installer + which causes it to only install dig, host, nslookup, + nsupdate and relevant DLLs. [RT #19998] + +2655. [doc] Document that key-directory does not affect + rndc.key. [RT #20155] + +2653. [bug] Treat ENGINE_load_private_key() failures as key + not found rather than out of memory. [RT #18033] + +2649. [bug] Set the domain for forward only zones. [RT #19944] + +2648. [port] win32: isc_time_seconds() was broken. [RT #19900] + +2647. [bug] Remove unnecessary SOA updates when a new KSK is + added. [RT #19913] + +2646. [bug] Incorrect cleanup on error in socket.c. [RT #19987] + +2645. [port] "gcc -m32" didn't work on amd64 and x86_64 platforms + which default to 64 bits. [RT #19927] + +2643. [bug] Stub zones interacted badly with NSEC3 support. + [RT #19777] + +2642. [bug] nsupdate could dump core on solaris when reading + improperly formatted key files. [RT #20015] 2640. [security] A specially crafted update packet will cause named to exit. [RT #20000] +2639. [bug] Silence compiler warnings in gssapi code. [RT #19954] + +2637. [func] Rationalize dnssec-signzone's signwithkey() calling. + [RT #19959] + +2635. [bug] isc_inet_ntop() incorrectly handled 0.0/16 addresses. + [RT #19716] + +2633. [bug] Handle 15 bit rand() functions. [RT #19783] + +2632. [func] util/kit.sh: warn if documentation appears to be out of + date. [RT #19922] + +2625. [bug] Missing UNLOCK in rbtdb.c. [RT #19865] + +2623. [bug] Named started seaches for DS non-optimally. [RT #19915] + +2621. [doc] Made copyright boilterplate consistent. [RT #19833] + +2920. [bug] Delay thawing the zone until the reload of it has + completed successfully. [RT #19750] + +2618. [bug] The sdb and sdlz db_interator_seek() methods could + loop infinitely. [RT #19847] + +2617. [bug] ifconfig.sh failed to emit an error message when + run from the wrong location. [RT #19375] + +2616. [bug] 'host' used the nameservers from resolv.conf even + when a explicit nameserver was specified. [RT #19852] + +2615. [bug] "__attribute__((unused))" was in the wrong place + for ia64 gcc builds. [RT #19854] + +2614. [port] win32: 'named -v' should automatically be executed + in the foreground. [RT #19844] + +2613. [bug] Option argument validation was missing for + dnssec-dsfromkey. [RT #19828] + +2610. [port] sunos: Change #2363 was not complete. [RT #19796] + +2608. [func] Perform post signing verification checks in + dnssec-signzone. These can be disabled with -P. + + The post sign verification test ensures that for each + algorithm in use there is at least one non revoked + self signed KSK key. That all revoked KSK keys are + self signed. That all records in the zone are signed + by the algorithm. [RT #19653] + +2601. [doc] Mention file creation mode mask in the + named manual page. + +2593. [bug] Improve a corner source of SERVFAILs [RT #19632] + +2589. [bug] dns_db_unregister() failed to clear '*dbimp'. + [RT #19626] + +2581. [contrib] dlz/mysql set MYSQL_OPT_RECONNECT option on connection. + Requires MySQL 5.0.19 or later. [RT #19084] + +2580. [bug] UpdateRej statistics counter could be incremented twice + for one rejection. [RT #19476] + +2533. [doc] ARM: document @ (at-sign). [RT #17144] + +2500. [contrib] contrib/sdb/pgsql/zonetodb.c called non-existent + function. [RT #18582] + --- 9.6.1 released --- 2607. [bug] named could incorrectly delete NSEC3 records for - empty nodes when processing a update request. + empty nodes when processing a update request. [RT #19749] 2606. [bug] "delegation-only" was not being accepted in @@ -78,7 +369,7 @@ date to the version string, -DNO_VERSION_DATE. 2582. [bug] Don't emit warning log message when we attempt to - remove non-existant journal. [RT #19516] + remove non-existent journal. [RT #19516] 2579. [bug] DNSSEC lookaside validation failed to handle unknown algorithms. [RT #19479] @@ -136,7 +427,7 @@ 2556. [port] Solaris: mkdir(2) on tmpfs filesystems does not do the error checks in the correct order resulting in the wrong error code sometimes being returned. [RT #19249] - + 2554. [bug] Validation of uppercase queries from NSEC3 zones could fail. [RT #19297] @@ -185,7 +476,7 @@ 2536. [cleanup] Silence some warnings when -Werror=format-security is specified. [RT #19083] -2535. [bug] dig +showsearh and +trace interacted badly. [RT #19091] +2535. [bug] dig +showsearch and +trace interacted badly. [RT #19091] 2532. [bug] dig: check the question section of the response to see if it matches the asked question. [RT #18495] @@ -198,8 +489,8 @@ 2529. [cleanup] Upgrade libtool to silence complaints from recent version of autoconf. [RT #18657] -2528. [cleanup] Silence spurious configure warning about - --datarootdir [RT #19096] +2528. [cleanup] Silence spurious configure warning about + --datarootdir [RT #19096] 2527. [bug] named could reuse cache on reload with enabling/disabling validation. [RT #19119] @@ -222,7 +513,7 @@ preceded in resolv.conf. [RT #19081] 2517. [bug] dig +trace with -4 or -6 failed when it chose a - nameserver address of the excluded address. + nameserver address of the excluded address type. [RT #18843] 2516. [bug] glue sort for responses was performed even when not @@ -235,7 +526,7 @@ 2511. [cleanup] dns_rdata_tofmttext() add const to linebreak. [RT #18885] -2506. [port] solaris: Check at configure time if +2506. [port] solaris: Check at configure time if hack_shutup_pthreadonceinit is needed. [RT #19037] 2505. [port] Treat amd64 similarly to x86_64 when determining @@ -258,7 +549,7 @@ 2515. [port] win32: build dnssec-dsfromkey and dnssec-keyfromlabel. [RT #19063] -2513 [bug] Fix windows cli build. [RT #19062] +2513. [bug] Fix windows cli build. [RT #19062] 2510. [bug] "dig +sigchase" could trigger REQUIRE failures. [RT #19033] @@ -343,7 +634,7 @@ 2478. [bug] 'addresses' could be used uninitialized in configure_forward(). [RT #18800] - + 2477. [bug] dig: the global option to print the command line is +cmd not print_cmd. Update the output to reflect this. [RT #17008] @@ -359,7 +650,7 @@ 2473. [port] linux: raise the limit on open files to the possible maximum value before spawning threads; 'files' - specified in named.conf doesn't seem to work with + specified in named.conf doesn't seem to work with threads as expected. [RT #18784] 2472. [port] linux: check the number of available cpu's before @@ -388,7 +679,7 @@ 2464. [port] linux: check that a capability is present before trying to set it. [RT #18135] -2463. [port] linux: POSIX doesn't include the IPv6 Advanced Socket +2463. [port] linux: POSIX doesn't include the IPv6 Advanced Socket API and glibc hides parts of the IPv6 Advanced Socket API as a result. This is stupid as it breaks how the two halves (Basic and Advanced) of the IPv6 Socket API @@ -418,7 +709,7 @@ 2456. [bug] In ACLs, ::/0 and 0.0.0.0/0 would both match any address, regardless of family. They now correctly distinguish IPv4 from IPv6. [RT #18559] - + 2455. [bug] Stop metadata being transferred via axfr/ixfr. [RT #18639] @@ -458,7 +749,7 @@ 2442. [bug] A lock could be destroyed twice. [RT# 18626] -2441. [bug] isc_radix_insert() could copy radix tree nodes +2441. [bug] isc_radix_insert() could copy radix tree nodes incompletely. [RT #18573] 2440. [bug] named-checkconf used an incorrect test to determine @@ -515,7 +806,7 @@ implementation. Allow the use of kqueue, epoll and /dev/poll to be selected at compile time. [RT #18277] - + 2423. [security] Randomize server selection on queries, so as to make forgery a little more difficult. Instead of always preferring the server with the lowest RTT, @@ -583,9 +874,9 @@ 2406. [placeholder] -2405. [cleanup] The default value for dnssec-validation was changed to - "yes" in 9.5.0-P1 and all subsequent releases; this - was inadvertently omitted from CHANGES at the time. +2405. [cleanup] The default value for dnssec-validation was changed to + "yes" in 9.5.0-P1 and all subsequent releases; this + was inadvertently omitted from CHANGES at the time. 2404. [port] hpux: files unlimited support. @@ -661,7 +952,7 @@ 2380. [bug] dns_view_find() was not returning NXDOMAIN/NXRRSET proofs which, in turn, caused validation failures for insecure zones immediately below a secure zone - the server was authoritative for. [RT #18112] + the server was authoritative for. [RT #18112] 2379. [contrib] queryperf/gen-data-queryperf.py: removed redundant TLDs and supported RRs with TTLs [RT #17972] @@ -709,7 +1000,7 @@ 2363. [port] sunos: pre-set "lt_cv_sys_max_cmd_len=4096;". [RT #17513] -2362. [cleanup] Make "rrset-order fixed" a compile-time option. +2362. [cleanup] Make "rrset-order fixed" a compile-time option. settable by "./configure --enable-fixed-rrset". Disabled by default. [RT #17977] @@ -792,12 +1083,12 @@ interfaces if there are not listen-on-v6 clauses in named.conf. [RT #17581] -2335. [port] sunos: libbind and *printf() support for long long. +2335. [port] sunos: libbind and *printf() support for long long. [RT #17513] 2334. [bug] Bad REQUIRES in fromstruct_in_naptr(), off by one bug in fromstruct_txt(). [RT #17609] - + 2333. [bug] Fix off by one error in isc_time_nowplusinterval(). [RT #17608] @@ -842,7 +1133,7 @@ 2320. [func] Make statistics counters thread-safe for platforms that support certain atomic operations. [RT #17466] -2319. [bug] Silence Coverity warnings in +2319. [bug] Silence Coverity warnings in lib/dns/rdata/in_1/apl_42.c. [RT #17469] 2318. [port] sunos fixes for libbind. [RT #17514] @@ -894,7 +1185,7 @@ 2301. [bug] Remove resource leak and fix error messages in bin/tests/system/lwresd/lwtest.c. [RT #17474] -2300. [bug] Fixed failure to close open file in +2300. [bug] Fixed failure to close open file in bin/tests/names/t_names.c. [RT #17473] 2299. [bug] Remove unnecessary NULL check in @@ -1017,7 +1308,7 @@ 2261. [bug] Fix memory leak with "any" and "none" ACLs [RT #17272] 2260. [bug] Reported wrong clients-per-query when increasing the - value. [RT #17236] + value. [RT #17236] 2259. [placeholder] @@ -1039,10 +1330,10 @@ intermediate values as timer->idle was reset by isc_timer_touch(). [RT #17243] -2253. [func] "max-cache-size" defaults to 32M. +2253. [func] "max-cache-size" defaults to 32M. "max-acache-size" defaults to 16M. -2252. [bug] Fixed errors in sortlist code [RT #17216] +2252. [bug] Fixed errors in sortlist code [RT #17216] 2251. [placeholder] @@ -1050,11 +1341,11 @@ memory statistics file should be written or not. Additionally named's -m option will cause the statistics file to be written. [RT #17113] - -2249. [bug] Only set Authentic Data bit if client requested - DNSSEC, per RFC 3655 [RT #17175] -2248. [cleanup] Fix several errors reported by Coverity. [RT #17160] +2249. [bug] Only set Authentic Data bit if client requested + DNSSEC, per RFC 3655 [RT #17175] + +2248. [cleanup] Fix several errors reported by Coverity. [RT #17160] 2247. [doc] Sort doc/misc/options. [RT #17067] @@ -1095,11 +1386,11 @@ 2235. [bug] was not being installed. [RT #17135] -2234. [port] Correct some compiler warnings on SCO OSr5 [RT #17134] - -2233. [func] Add support for O(1) ACL processing, based on - radix tree code originally written by Kevin - Brintnall. [RT #16288] +2234. [port] Correct some compiler warnings on SCO OSr5 [RT #17134] + +2233. [func] Add support for O(1) ACL processing, based on + radix tree code originally written by Kevin + Brintnall. [RT #16288] 2232. [bug] dns_adb_findaddrinfo() could fail and return ISC_R_SUCCESS. [RT #17137] @@ -1120,7 +1411,7 @@ 2226. [placeholder] 2225. [bug] More support for systems with no IPv4 addresses. - [RT #17111] + [RT #17111] 2224. [bug] Defer journal compaction if a xfrin is in progress. [RT #17119] @@ -1128,7 +1419,7 @@ 2223. [bug] Make a new journal when compacting. [RT #17119] 2222. [func] named-checkconf now checks server key references. - [RT #17097] + [RT #17097] 2221. [bug] Set the event result code to reflect the actual record turned to caller when a cache update is @@ -1137,7 +1428,7 @@ 2220. [bug] win32: Address a race condition in final shutdown of the Windows socket code. [RT #17028] - + 2219. [bug] Apply zone consistency checks to additions, not removals, when updating. [RT #17049] @@ -1147,7 +1438,7 @@ 2217. [func] Adjust update log levels. [RT #17092] 2216. [cleanup] Fix a number of errors reported by Coverity. - [RT #17094] + [RT #17094] 2215. [bug] Bad REQUIRE check isc_hmacsha1_verify(). [RT #17094] @@ -1193,7 +1484,7 @@ localhost;) is used. [RT #16987] - + 2205. [bug] libbind: change #2119 broke thread support. [RT #16982] 2204. [bug] "rndc flushanme name unknown-view" caused named @@ -1332,7 +1623,7 @@ allow-query-on, allow-recursion-on and allow-query-cache-on. [RT #16291] -2164. [bug] The code to determine how named-checkzone / +2164. [bug] The code to determine how named-checkzone / named-compilezone was called failed under windows. [RT #16764] @@ -1539,14 +1830,14 @@ 2095. [port] libbind: alway prototype inet_cidr_ntop_ipv6() and net_cidr_ntop_ipv6(). [RT #16388] - + 2094. [contrib] Update named-bootconf. [RT# 16404] 2093. [bug] named-checkzone -s was broken. 2092. [bug] win32: dig, host, nslookup. Use registry config if resolv.conf does not exist or no nameservers - listed. [RT #15877] + listed. [RT #15877] 2091. [port] dighost.c: race condition on cleanup. [RT #16417] @@ -1950,7 +2241,7 @@ 1964. [func] Separate out MX and SRV to CNAME checks. [RT #15723] -1963. [port] Tru64 4.0E doesn't support send() and recv(). +1963. [port] Tru64 4.0E doesn't support send() and recv(). [RT #15586] 1962. [bug] Named failed to clear old update-policy when it @@ -1993,7 +2284,7 @@ 1951. [security] Drop queries from particular well known ports. Don't return FORMERR to queries from particular well known ports. [RT #15636] - + 1950. [port] Solaris 2.5.1 and earlier cannot bind() then connect() a TCP socket. This prevents the source address being set for TCP connections. [RT #15628] @@ -2015,7 +2306,7 @@ 1945. [cleanup] dnssec-keygen: RSA (RSAMD5) is no longer recommended. To generate a RSAMD5 key you must explicitly request RSAMD5. [RT #13780] - + 1944. [cleanup] isc_hash_create() does not need a read/write lock. [RT #15522] @@ -2127,7 +2418,7 @@ [RT #15034] 1905. [bug] Strings returned from cfg_obj_asstring() should be - treated as read-only. The prototype for + treated as read-only. The prototype for cfg_obj_asstring() has been updated to reflect this. [RT #15256] @@ -2259,10 +2550,10 @@ 1863. [bug] rrset-order "fixed" error messages not complete. 1862. [func] Add additional zone data constancy checks. - named-checkzone has extended checking of NS, MX and + named-checkzone has extended checking of NS, MX and SRV record and the hosts they reference. named has extended post zone load checks. - New zone options: check-mx and integrity-check. + New zone options: check-mx and integrity-check. [RT #4940] 1861. [bug] dig could trigger a INSIST on certain malformed @@ -2305,9 +2596,9 @@ 1848. [bug] Improve SMF integration. [RT #13238] 1847. [bug] isc_ondestroy_init() is called too late in - dns_rbtdb_create()/dns_rbtdb64_create(). + dns_rbtdb_create()/dns_rbtdb64_create(). [RT #13661] - + 1846. [contrib] query-loc-0.3.0 from Stephane Bortzmeyer . @@ -2599,7 +2890,7 @@ [RT #12866] 1748. [func] dig now returns the byte count for axfr/ixfr. - + 1747. [bug] BIND 8 compatibility: named/named-checkconf failed to parse "host-statistics-max" in named.conf. @@ -2617,7 +2908,7 @@ requested number of worker threads then destruction of the manager would trigger an INSIST() failure. [RT #12790] - + 1742. [bug] Deleting all records at a node then adding a previously existing record, in a single UPDATE transaction, failed to leave / regenerate the @@ -2628,7 +2919,7 @@ 1740. [bug] Replace rbt's hash algorithm as it performed badly with certain zones. [RT #12729] - + NOTE: a hash context now needs to be established via isc_hash_create() if the application was not already doing this. @@ -2643,7 +2934,7 @@ 1736. [bug] dst_key_fromnamedfile() could fail to read a public key. [RT #12687] - + 1735. [bug] 'dig +sigtrace' could die with a REQUIRE failure. [RE #12688] @@ -2820,7 +3111,7 @@ 1675. [bug] named would sometimes add extra NSEC records to the authority section. - + 1674. [port] linux: increase buffer size used to scan /proc/net/if_inet6. @@ -2894,7 +3185,7 @@ 1648. [func] Update dnssec-lookaside named.conf syntax to support multiple dnssec-lookaside namespaces (not yet - implemented). + implemented). 1647. [bug] It was possible trigger a INSIST when chasing a DS record that required walking back over a empty node. @@ -2924,7 +3215,7 @@ 1638. [bug] "ixfr-from-differences" could generate a REQUIRE failure if the journal open failed. [RT #11347] - + 1637. [bug] Node reference leak on error in addnoqname(). 1636. [bug] The dump done callback could get ISC_R_SUCCESS even if @@ -3018,21 +3309,21 @@ 1607. [bug] dig, host and nslookup were still using random() to generate query ids. [RT# 11013] -1606. [bug] DLV insecurity proof was failing. +1606. [bug] DLV insecurity proof was failing. 1605. [func] New dns_db_find() option DNS_DBFIND_COVERINGNSEC. 1604. [bug] A xfrout_ctx_create() failure would result in xfrout_ctx_destroy() being called with a partially initialized structure. - + 1603. [bug] nsupdate: set interactive based on isatty(). [RT# 10929] 1602. [bug] Logging to a file failed unless a size was specified. [RT# 10925] -1601. [bug] Silence spurious warning 'both "recursion no;" and +1601. [bug] Silence spurious warning 'both "recursion no;" and "allow-recursion" active' warning from view "_bind". [RT# 10920] Modified: stable/8/contrib/bind9/COPYRIGHT ============================================================================== --- stable/8/contrib/bind9/COPYRIGHT Mon Mar 29 04:01:02 2010 (r205819) +++ stable/8/contrib/bind9/COPYRIGHT Mon Mar 29 06:31:58 2010 (r205820) @@ -1,4 +1,4 @@ -Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC") +Copyright (C) 2004-2010 Internet Systems Consortium, Inc. ("ISC") Copyright (C) 1996-2003 Internet Software Consortium. Permission to use, copy, modify, and/or distribute this software for any @@ -13,7 +13,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -$Id: COPYRIGHT,v 1.14.176.1 2009/01/05 23:47:22 tbox Exp $ +$Id: COPYRIGHT,v 1.14.176.2 2010/01/07 23:47:36 tbox Exp $ Portions Copyright (C) 1996-2001 Nominum, Inc. Modified: stable/8/contrib/bind9/FAQ ============================================================================== --- stable/8/contrib/bind9/FAQ Mon Mar 29 04:01:02 2010 (r205819) +++ stable/8/contrib/bind9/FAQ Mon Mar 29 06:31:58 2010 (r205820) @@ -1,6 +1,6 @@ Frequently Asked Questions about BIND 9 -Copyright © 2004-2009 Internet Systems Consortium, Inc. ("ISC") +Copyright © 2004-2010 Internet Systems Consortium, Inc. ("ISC") Copyright © 2000-2003 Internet Software Consortium. @@ -784,6 +784,22 @@ A: Red Hat Security Enhanced Linux (SELi See these man-pages for more information : selinux(8), named_selinux (8), chcon(1), setsebool(8) +Q: I'm running BIND on Ubuntu - + + Why can't named update slave zone database files? + + Why can't named create DDNS journal files or update the master zones + from journals? + + Why can't named create custom log files? + +A: Ubuntu uses AppArmor in + addition to normal file system permissions to protect the system. + + Adjust the paths to use those specified in /etc/apparmor.d/ + usr.sbin.named or adjust /etc/apparmor.d/usr.sbin.named to allow named + to write at the location specified in named.conf. + Q: Listening on individual IPv6 interfaces does not work. A: This is usually due to "/proc/net/if_inet6" not being available in the Modified: stable/8/contrib/bind9/FAQ.xml ============================================================================== --- stable/8/contrib/bind9/FAQ.xml Mon Mar 29 04:01:02 2010 (r205819) +++ stable/8/contrib/bind9/FAQ.xml Mon Mar 29 06:31:58 2010 (r205820) @@ -1,7 +1,7 @@ - +
Frequently Asked Questions about BIND 9 @@ -29,6 +29,7 @@ 2007 2008 2009 + 2010 Internet Systems Consortium, Inc. ("ISC") @@ -1385,6 +1386,36 @@ named_cache_t: for files modifiable by n + I'm running BIND on Ubuntu - + + + Why can't named update slave zone database files? + + + Why can't named create DDNS journal files or update + the master zones from journals? + + + Why can't named create custom log files? + + + + + Ubuntu uses AppArmor + <http://en.wikipedia.org/wiki/AppArmor> in + addition to normal file system permissions to protect the system. + + + Adjust the paths to use those specified in /etc/apparmor.d/usr.sbin.named + or adjust /etc/apparmor.d/usr.sbin.named to allow named to write at the + location specified in named.conf. + + + + + + + Listening on individual IPv6 interfaces does not work. Modified: stable/8/contrib/bind9/NSEC3-NOTES ============================================================================== --- stable/8/contrib/bind9/NSEC3-NOTES Mon Mar 29 04:01:02 2010 (r205819) +++ stable/8/contrib/bind9/NSEC3-NOTES Mon Mar 29 06:31:58 2010 (r205820) @@ -35,7 +35,7 @@ will not be completely signed until name zone and generate the NSEC and RRSIG records. Initially the NSEC record at the zone apex will have the OPT bit set. When the NSEC chain is complete the OPT bit will be cleared. Additionally when -the zone is fully signed the private type (default TYPE65535) records +the zone is fully signed the private type (default TYPE65534) records will have a non zero value for the final octet. The private type record has 5 octets. @@ -45,7 +45,7 @@ The private type record has 5 octets. complete flag (octet 5) If you wish to go straight to a secure zone using NSEC3 you should -also add a NSECPARAM record to the update request with the flags +also add a NSEC3PARAM record to the update request with the flags field set to indicate whether the NSEC3 chain will have the OPTOUT bit set or not. Modified: stable/8/contrib/bind9/README ============================================================================== --- stable/8/contrib/bind9/README Mon Mar 29 04:01:02 2010 (r205819) +++ stable/8/contrib/bind9/README Mon Mar 29 06:31:58 2010 (r205820) @@ -42,6 +42,29 @@ BIND 9 Stichting NLnet - NLnet Foundation Nominum, Inc. +BIND 9.6.2 + + BIND 9.6.2 is a maintenance release, fixing bugs in 9.6.1. + It also introduces support for the SHA-2 DNSSEC algorithms, + RSASHA256 and RSASHA512. + + Known issues in this release: + + - A validating resolver that has been incorrectly configured with + an invalid trust anchor will be unable to resolve names covered + by that trust anchor. In all current versions of BIND 9, such a + resolver will also generate significant unnecessary DNS traffic + while trying to validate. The latter problem will be addressed + in future BIND 9 releases. In the meantime, to avoid these + problems, exercise caution when configuring "trusted-keys": + make sure all keys are correct and current when you add them, + and update your configuration in a timely manner when keys + roll over. + +BIND 9.6.1 + + BIND 9.6.1 is a maintenance release, fixing bugs in 9.6.0. + BIND 9.6.0 BIND 9.6.0 includes a number of changes from BIND 9.5 and earlier Modified: stable/8/contrib/bind9/bin/check/named-checkconf.8 ============================================================================== --- stable/8/contrib/bind9/bin/check/named-checkconf.8 Mon Mar 29 04:01:02 2010 (r205819) +++ stable/8/contrib/bind9/bin/check/named-checkconf.8 Mon Mar 29 06:31:58 2010 (r205820) @@ -1,7 +1,7 @@ .\" Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC") .\" Copyright (C) 2000-2002 Internet Software Consortium. .\" -.\" Permission to use, copy, modify, and distribute this software for any +.\" Permission to use, copy, modify, and/or distribute this software for any .\" purpose with or without fee is hereby granted, provided that the above .\" copyright notice and this permission notice appear in all copies. .\" @@ -13,7 +13,7 @@ .\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR .\" PERFORMANCE OF THIS SOFTWARE. .\" -.\" $Id: named-checkconf.8,v 1.30 2007/06/20 02:27:32 marka Exp $ +.\" $Id: named-checkconf.8,v 1.30.334.1 2009/07/11 01:55:20 tbox Exp $ .\" .hy 0 .ad l Modified: stable/8/contrib/bind9/bin/check/named-checkconf.html ============================================================================== --- stable/8/contrib/bind9/bin/check/named-checkconf.html Mon Mar 29 04:01:02 2010 (r205819) +++ stable/8/contrib/bind9/bin/check/named-checkconf.html Mon Mar 29 06:31:58 2010 (r205820) @@ -2,7 +2,7 @@ - Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC") - Copyright (C) 2000-2002 Internet Software Consortium. - - - Permission to use, copy, modify, and distribute this software for any + - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - @@ -14,7 +14,7 @@ - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. --> - + Modified: stable/8/contrib/bind9/bin/check/named-checkzone.8 ============================================================================== --- stable/8/contrib/bind9/bin/check/named-checkzone.8 Mon Mar 29 04:01:02 2010 (r205819) +++ stable/8/contrib/bind9/bin/check/named-checkzone.8 Mon Mar 29 06:31:58 2010 (r205820) @@ -1,7 +1,7 @@ .\" Copyright (C) 2004-2007, 2009 Internet Systems Consortium, Inc. ("ISC") .\" Copyright (C) 2000-2002 Internet Software Consortium. .\" -.\" Permission to use, copy, modify, and distribute this software for any +.\" Permission to use, copy, modify, and/or distribute this software for any .\" purpose with or without fee is hereby granted, provided that the above .\" copyright notice and this permission notice appear in all copies. .\" *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Mar 29 06:49:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA0CD1065670; Mon, 29 Mar 2010 06:49:20 +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 97B8D8FC0C; Mon, 29 Mar 2010 06: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 o2T6nK02075973; Mon, 29 Mar 2010 06:49:20 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2T6nKbH075965; Mon, 29 Mar 2010 06:49:20 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201003290649.o2T6nKbH075965@svn.freebsd.org> From: Edwin Groothuis Date: Mon, 29 Mar 2010 06: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: r205821 - head/usr.bin/calendar X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Mar 2010 06:49:20 -0000 Author: edwin Date: Mon Mar 29 06:49:20 2010 New Revision: 205821 URL: http://svn.freebsd.org/changeset/base/205821 Log: Long awaited update to the calendar system: - Repeating events which span multiple years (because of -A, -B or just the three days before the end of the year). - Support for lunar events (full moon, new moon) and solar events (equinox and solstice, chinese new year). Because of this, the options -U (UTC offset) and -l (longitude) are available to compensate if reality doesn't match the calculated values. MFC after: 1 month Added: head/usr.bin/calendar/dates.c (contents, props changed) head/usr.bin/calendar/events.c (contents, props changed) head/usr.bin/calendar/locale.c (contents, props changed) head/usr.bin/calendar/parsedata.c (contents, props changed) head/usr.bin/calendar/pom.c (contents, props changed) head/usr.bin/calendar/sunpos.c (contents, props changed) Modified: head/usr.bin/calendar/Makefile head/usr.bin/calendar/calendar.1 head/usr.bin/calendar/calendar.c head/usr.bin/calendar/calendar.h head/usr.bin/calendar/day.c head/usr.bin/calendar/io.c head/usr.bin/calendar/ostern.c head/usr.bin/calendar/paskha.c head/usr.bin/calendar/pathnames.h Modified: head/usr.bin/calendar/Makefile ============================================================================== --- head/usr.bin/calendar/Makefile Mon Mar 29 06:31:58 2010 (r205820) +++ head/usr.bin/calendar/Makefile Mon Mar 29 06:49:20 2010 (r205821) @@ -2,7 +2,9 @@ # $FreeBSD$ PROG= calendar -SRCS= calendar.c io.c day.c ostern.c paskha.c +SRCS= calendar.c locale.c events.c dates.c parsedata.c io.c day.c \ + ostern.c paskha.c pom.c sunpos.c +LDADD= -lm INTER= de_AT.ISO_8859-15 de_DE.ISO8859-1 fr_FR.ISO8859-1 \ hr_HR.ISO8859-2 hu_HU.ISO8859-2 ru_RU.KOI8-R uk_UA.KOI8-U DE_LINKS= de_DE.ISO8859-15 Modified: head/usr.bin/calendar/calendar.1 ============================================================================== --- head/usr.bin/calendar/calendar.1 Mon Mar 29 06:31:58 2010 (r205820) +++ head/usr.bin/calendar/calendar.1 Mon Mar 29 06:49:20 2010 (r205821) @@ -54,6 +54,8 @@ .Ek .Oc .Op Fl W Ar num +.Op Fl U Ar UTC-offset +.Op Fl l Ar longitude .Sh DESCRIPTION The .Nm @@ -93,6 +95,12 @@ as the default calendar file. .Sm on .Xc For test purposes only: set date directly to argument values. +.It Fl l Ar longitude , Fl U Ar UTC-offset +Only one is needed: +Perform lunar and solar calculations from this longitude or from +this UTC offset. +If neither is specified, the calculations will be based on the +difference between UTC time and localtime. .It Fl W Ar num Print lines from today and the next .Ar num @@ -103,12 +111,36 @@ Ignore weekends when calculating the num To handle calendars in your national code table you can specify .Dq LANG= in the calendar file as early as possible. -To handle national Easter -names in the calendars -.Dq Easter= -(for Catholic Easter) or -.Dq Paskha= -(for Orthodox Easter) can be used. +.Pp +To handle the local name of sequences, you can specify them as: +.Dq SEQUENCE= +in the calendar file as early as possible. +.Pp +The names of the following special days are recognized: +.Bl -tag -width 123456789012345 -compact +.It Easter +Catholic Easter. +.It Paskha +Orthodox Easter. +.It NewMoon +The lunar New Moon. +.It FullMoon +The lunar Full Moon. +.It MarEquinox +The solar equinox in March. +.It JunSolstice +The solar solstice in June. +.It SepEquinox +The solar equinox in March. +.It DecSolstice +The solar solstice in December. +.It ChineseNewYear +The first day of the Chinese year. +.El +These names may be reassigned to their local names via an assignment +like +.Dq Easter=Pasen +in the calendar file. .Pp Other lines should begin with a month and day. They may be entered in almost any format, either numeric or as character @@ -122,11 +154,11 @@ Two numbers default to the month followe Lines with leading tabs default to the last entered date, allowing multiple line specifications for a single date. .Pp -``Easter'', is Easter for this year, and may be followed by a positive -or negative integer. -.Pp -``Paskha'', is Orthodox Easter for this year, and may be followed by a -positive or negative integer. +The names of the recognized special days may be followed by a +positive or negative integer, like: +.Dq Easter+3 +or +.Dq Pashka-4 . .Pp Weekdays may be followed by ``-4'' ...\& ``+5'' (aliases for last, first, second, third, fourth) for moving events like @@ -191,7 +223,8 @@ calendar file to use if no calendar file do not send mail if this file exists. .El .Pp -The following default calendar files are provided: +The following default calendar files are provided in +.Pa /usr/share/calendars: .Pp .Bl -tag -width calendar.southafrica -compact .It Pa calendar.all @@ -208,6 +241,8 @@ so that roving holidays are set correctl Days of special significance to computer people. .It Pa calendar.croatian Calendar of events in Croatia. +.It Pa calendar.dutch +Calendar of events in the Netherlands. .It Pa calendar.freebsd Birthdays of .Fx @@ -259,7 +294,28 @@ A .Nm command appeared in .At v7 . +.Sh NOTES +Chinese New Year is calculated at 120 degrees east of Greenwich, +which roughly corresponds with the east coast of China. +For people west of China, this might result that the start of Chinese +New Year and the day of the related new moon might differ. +.Pp +The phases of the moon and the longitude of the sun are calculated +against the local position which corresponds with 30 degrees times +the time-difference towards Greenwich. +.Pp +The new and full moons are happening on the day indicated: They +might happen in the time period in the early night or in the late +evening. +It doesn't indicate that they are starting in the night on that date. +.Pp +Because of minor differences between the output of the formulas +used and other sources on the Internet, Druids and Werewolves should +double-check the start and end time of solar and lunar events. .Sh BUGS The .Nm -utility does not handle Jewish holidays and moon phases. +utility does not handle Jewish holidays. +.Pp +There is no possibility to properly specify the local position +needed for solar and lunar calculations. Modified: head/usr.bin/calendar/calendar.c ============================================================================== --- head/usr.bin/calendar/calendar.c Mon Mar 29 06:31:58 2010 (r205820) +++ head/usr.bin/calendar/calendar.c Mon Mar 29 06:49:20 2010 (r205821) @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1989, 1993, 1994 * The Regents of the University of California. All rights reserved. * @@ -52,29 +52,38 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include "calendar.h" +#define UTCOFFSET_NOTSET 100 /* Expected between -24 and +24 */ +#define LONGITUDE_NOTSET 1000 /* Expected between -360 and +360 */ + struct passwd *pw; int doall = 0; +int debug = 0; +char *DEBUG = NULL; time_t f_time = 0; - -int f_dayAfter = 0; /* days after current date */ -int f_dayBefore = 0; /* days before current date */ -int Friday = 5; /* day before weekend */ +double UTCOffset = UTCOFFSET_NOTSET; +int EastLongitude = LONGITUDE_NOTSET; static void usage(void) __dead2; int main(int argc, char *argv[]) { + int f_dayAfter = 0; /* days after current date */ + int f_dayBefore = 0; /* days before current date */ + int Friday = 5; /* day before weekend */ + int ch; + struct tm tp1, tp2; (void)setlocale(LC_ALL, ""); - while ((ch = getopt(argc, argv, "-A:aB:F:f:t:W:")) != -1) + while ((ch = getopt(argc, argv, "-A:aB:dD:F:f:l:t:U:W:")) != -1) switch (ch) { case '-': /* backward contemptible */ case 'a': @@ -89,14 +98,10 @@ main(int argc, char *argv[]) calendarFile = optarg; break; - case 't': /* other date, undocumented, for tests */ - f_time = Mktime(optarg); - break; - case 'W': /* we don't need no steenking Fridays */ Friday = -1; - /* FALLTHROUGH */ + case 'A': /* days after current date */ f_dayAfter = atoi(optarg); break; @@ -105,9 +110,25 @@ main(int argc, char *argv[]) f_dayBefore = atoi(optarg); break; - case 'F': + case 'F': /* Change the time: When does weekend start? */ Friday = atoi(optarg); break; + case 'l': /* Change longitudal position */ + EastLongitude = strtol(optarg, NULL, 10); + break; + case 'U': /* Change UTC offset */ + UTCOffset = strtod(optarg, NULL); + break; + + case 'd': + debug = 1; + break; + case 'D': + DEBUG = optarg; + break; + case 't': /* other date, undocumented, for tests */ + f_time = Mktime(optarg); + break; case '?': default: @@ -124,7 +145,60 @@ main(int argc, char *argv[]) if (f_time <= 0) (void)time(&f_time); - settime(f_time); + /* if not set, determine where I could be */ + { + if (UTCOffset == UTCOFFSET_NOTSET && + EastLongitude == LONGITUDE_NOTSET) { + /* Calculate on difference between here and UTC */ + time_t t; + struct tm tm; + long utcoffset, hh, mm, ss; + double uo; + + time(&t); + localtime_r(&t, &tm); + utcoffset = tm.tm_gmtoff; + /* seconds -> hh:mm:ss */ + hh = utcoffset / SECSPERHOUR; + utcoffset %= SECSPERHOUR; + mm = utcoffset / SECSPERMINUTE; + utcoffset %= SECSPERMINUTE; + ss = utcoffset; + + /* hh:mm:ss -> hh.mmss */ + uo = mm + (100.0 * (ss / 60.0)); + uo /= 60.0 / 100.0; + uo = hh + uo / 100; + + UTCOffset = uo; + EastLongitude = UTCOffset * 15; + } else if (UTCOffset == UTCOFFSET_NOTSET) { + /* Base on information given */ + UTCOffset = EastLongitude / 15; + } else if (EastLongitude == LONGITUDE_NOTSET) { + /* Base on information given */ + EastLongitude = UTCOffset * 15; + } + } + + settimes(f_time, f_dayBefore, f_dayAfter, Friday, &tp1, &tp2); + generatedates(&tp1, &tp2); + + /* + * FROM now on, we are working in UTC. + * This will only affect moon and sun related events anyway. + */ + if (setenv("TZ", "UTC", 1) != 0) + errx(1, "setenv: %s", strerror(errno)); + tzset(); + + if (debug) + dumpdates(); + + if (DEBUG != NULL) { + dodebug(DEBUG); + exit(0); + } if (doall) while ((pw = getpwent()) != NULL) { @@ -145,9 +219,11 @@ static void __dead2 usage(void) { - fprintf(stderr, "%s\n%s\n", + fprintf(stderr, "%s\n%s\n%s\n", "usage: calendar [-a] [-A days] [-B days] [-F friday] " "[-f calendarfile]", - " [-t dd[.mm[.year]]] [-W days]"); + " [-d] [-t dd[.mm[.year]]] [-W days]", + " [-U utcoffset] [-l longitude]" + ); exit(1); } Modified: head/usr.bin/calendar/calendar.h ============================================================================== --- head/usr.bin/calendar/calendar.h Mon Mar 29 06:31:58 2010 (r205820) +++ head/usr.bin/calendar/calendar.h Mon Mar 29 06:49:20 2010 (r205821) @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1989, 1993, 1994 * The Regents of the University of California. All rights reserved. * @@ -36,43 +36,163 @@ #include #include +#define SECSPERDAY (24 * 60 * 60) +#define SECSPERHOUR (60 * 60) +#define SECSPERMINUTE (60) +#define MINSPERHOUR (60) +#define HOURSPERDAY (24) +#define FSECSPERDAY (24.0 * 60.0 * 60.0) +#define FSECSPERHOUR (60.0 * 60.0) +#define FSECSPERMINUTE (60.0) +#define FMINSPERHOUR (60.0) +#define FHOURSPERDAY (24.0) + +#define DAYSPERYEAR 365 +#define DAYSPERLEAPYEAR 366 + +/* Not yet categorized */ + extern struct passwd *pw; extern int doall; -extern struct iovec header[]; -extern struct tm *tp; +extern time_t t1, t2; extern const char *calendarFile; -extern int *cumdays; extern int yrdays; -extern struct fixs neaster, npaskha; - -void cal(void); -void closecal(FILE *); -int getday(char *); -int getdayvar(char *); -int getfield(char *, char **, int *); -int getmonth(char *); -int geteaster(char *, int); -int getpaskha(char *, int); -int easter(int); -int isnow(char *, int *, int *, int *); -FILE *opencal(void); -void settime(time_t); -time_t Mktime(char *); -void setnnames(void); +extern struct fixs neaster, npaskha, ncny, nfullmoon, nnewmoon; +extern struct fixs nmarequinox, nsepequinox, njunsolstice, ndecsolstice; +extern double UTCOffset; +extern int EastLongitude; #define isleap(y) ((((y) % 4) == 0 && ((y) % 100) != 0) || ((y) % 400) == 0) -/* some flags */ -#define F_ISMONTH 0x01 /* month (January ...) */ -#define F_ISDAY 0x02 /* day of week (Sun, Mon, ...) */ -#define F_ISDAYVAR 0x04 /* variables day of week, like SundayLast */ -#define F_EASTER 0x08 /* Easter or easter depending days */ - -extern int f_dayAfter; /* days after current date */ -extern int f_dayBefore; /* days before current date */ -extern int Friday; /* day before weekend */ +/* Flags to determine the returned values by determinestyle() in parsedata.c */ +#define F_NONE 0x00000 +#define F_MONTH 0x00001 +#define F_DAYOFWEEK 0x00002 +#define F_DAYOFMONTH 0x00004 +#define F_MODIFIERINDEX 0x00008 +#define F_MODIFIEROFFSET 0x00010 +#define F_SPECIALDAY 0x00020 +#define F_ALLMONTH 0x00040 +#define F_ALLDAY 0x00080 +#define F_VARIABLE 0x00100 +#define F_EASTER 0x00200 +#define F_CNY 0x00400 +#define F_PASKHA 0x00800 +#define F_NEWMOON 0x01000 +#define F_FULLMOON 0x02000 +#define F_MAREQUINOX 0x04000 +#define F_SEPEQUINOX 0x08000 +#define F_JUNSOLSTICE 0x10000 +#define F_DECSOLSTICE 0x20000 + +#define STRING_EASTER "Easter" +#define STRING_PASKHA "Paskha" +#define STRING_CNY "ChineseNewYear" +#define STRING_NEWMOON "NewMoon" +#define STRING_FULLMOON "FullMoon" +#define STRING_MAREQUINOX "MarEquinox" +#define STRING_SEPEQUINOX "SepEquinox" +#define STRING_JUNSOLSTICE "JunSolstice" +#define STRING_DECSOLSTICE "DecSolstice" + +#define MAXCOUNT 125 /* Random number of maximum number of + * repeats of an event. Should be 52 + * (number of weeks per year), if you + * want to show two years then it + * should be 104. If you are seeing + * more than this you are using this + * program wrong. + */ + +/* + * All the astronomical calculations are carried out for the meridian 120 + * degrees east of Greenwich. + */ +#define UTCOFFSET_CNY 8.0 + +extern int debug; /* show parsing of the input */ +extern int year1, year2; + +/* events.c */ +/* + * Event sorting related functions: + * - Use event_add() to create a new event + * - Use event_continue() to add more text to the last added event + * - Use event_print_all() to display them in time chronological order + */ +struct event *event_add(int, int, int, char *, int, char *, char *); +void event_continue(struct event *events, char *txt); +void event_print_all(FILE *fp); +struct event { + int year; + int month; + int day; + int var; + char *date; + char *text; + char *extra; + struct event *next; +}; + +/* locale.c */ struct fixs { char *name; - int len; + size_t len; }; + +extern const char *days[]; +extern const char *fdays[]; +extern const char *fmonths[]; +extern const char *months[]; +extern const char *sequences[]; +extern struct fixs fndays[8]; /* full national days names */ +extern struct fixs fnmonths[13]; /* full national months names */ +extern struct fixs ndays[8]; /* short national days names */ +extern struct fixs nmonths[13]; /* short national month names */ +extern struct fixs nsequences[10]; + +void setnnames(void); +void setnsequences(char *); + +/* day.c */ +extern const struct tm tm0; +extern char dayname[]; +void settimes(time_t,int before, int after, int friday, struct tm *tp1, struct tm *tp2); +time_t Mktime(char *); + +/* parsedata.c */ +int parsedaymonth(char *, int *, int *, int *, int *, char **); +void dodebug(char *type); + +/* io.c */ +void cal(void); +void closecal(FILE *); +FILE *opencal(void); + +/* ostern.c / pashka.c */ +int paskha(int); +int easter(int); + +/* dates.c */ +extern int cumdaytab[][14]; +extern int mondaytab[][14]; +extern int debug_remember; +void generatedates(struct tm *tp1, struct tm *tp2); +void dumpdates(void); +int remember_ymd(int y, int m, int d); +int remember_yd(int y, int d, int *rm, int *rd); +int first_dayofweek_of_year(int y); +int first_dayofweek_of_month(int y, int m); +int walkthrough_dates(struct event **e); +void addtodate(struct event *e, int year, int month, int day); + +/* pom.c */ +#define MAXMOONS 18 +void pom(int year, double UTCoffset, int *fms, int *nms); +void fpom(int year, double utcoffset, double *ffms, double *fnms); + +/* sunpos.c */ +void equinoxsolstice(int year, double UTCoffset, int *equinoxdays, int *solsticedays); +void fequinoxsolstice(int year, double UTCoffset, double *equinoxdays, double *solsticedays); +int calculatesunlongitude30(int year, int degreeGMToffset, int *ichinesemonths); Added: head/usr.bin/calendar/dates.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/calendar/dates.c Mon Mar 29 06:49:20 2010 (r205821) @@ -0,0 +1,451 @@ +/*- + * Copyright (c) 1992-2009 Edwin Groothuis. 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 + +#include "calendar.h" + +struct cal_year { + int year; /* 19xx, 20xx, 21xx */ + int easter; /* Julian day */ + int paskha; /* Julian day */ + int cny; /* Julian day */ + int firstdayofweek; /* 0 .. 6 */ + struct cal_month *months; + struct cal_year *nextyear; +} cal_year; + +struct cal_month { + int month; /* 01 .. 12 */ + int firstdayjulian; /* 000 .. 366 */ + int firstdayofweek; /* 0 .. 6 */ + struct cal_year *year; /* points back */ + struct cal_day *days; + struct cal_month *nextmonth; +} cal_month; + +struct cal_day { + int dayofmonth; /* 01 .. 31 */ + int julianday; /* 000 .. 366 */ + int dayofweek; /* 0 .. 6 */ + struct cal_day *nextday; + struct cal_month *month; /* points back */ + struct cal_year *year; /* points back */ + struct event *events; +} cal_day; + +int debug_remember = 0; +struct cal_year *hyear = NULL; + +/* 1-based month, 0-based days, cumulative */ +int *cumdays; +int cumdaytab[][14] = { + {0, -1, 30, 58, 89, 119, 150, 180, 211, 242, 272, 303, 333, 364}, + {0, -1, 30, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365}, +}; +/* 1-based month, individual */ +int *mondays; +int mondaytab[][14] = { + {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, 30}, + {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, 30}, +}; + +static struct cal_day * find_day(int yy, int mm, int dd); + +static void +createdate(int y, int m, int d) +{ + struct cal_year *py, *pyp; + struct cal_month *pm, *pmp; + struct cal_day *pd, *pdp; + int *cumday; + + pyp = NULL; + py = hyear; + while (py != NULL) { + if (py->year == y + 1900) + break; + pyp = py; + py = py->nextyear; + } + + if (py == NULL) { + struct tm td; + time_t t; + py = (struct cal_year *)calloc(1, sizeof(struct cal_year)); + py->year = y + 1900; + py->easter = easter(y); + py->paskha = paskha(y); + + td = tm0; + td.tm_year = y; + td.tm_mday = 1; + t = mktime(&td); + localtime_r(&t, &td); + py->firstdayofweek = td.tm_wday; + + if (pyp != NULL) + pyp->nextyear = py; + } + if (pyp == NULL) { + /* The very very very first one */ + hyear = py; + } + + pmp = NULL; + pm = py->months; + while (pm != NULL) { + if (pm->month == m) + break; + pmp = pm; + pm = pm->nextmonth; + } + + if (pm == NULL) { + pm = (struct cal_month *)calloc(1, sizeof(struct cal_month)); + pm->year = py; + pm->month = m; + cumday = cumdaytab[isleap(y)]; + pm->firstdayjulian = cumday[m] + 2; + pm->firstdayofweek = + (py->firstdayofweek + pm->firstdayjulian -1) % 7; + if (pmp != NULL) + pmp->nextmonth = pm; + } + if (pmp == NULL) + py->months = pm; + + pdp = NULL; + pd = pm->days; + while (pd != NULL) { + pdp = pd; + pd = pd->nextday; + } + + if (pd == NULL) { /* Always true */ + pd = (struct cal_day *)calloc(1, sizeof(struct cal_day)); + pd->month = pm; + pd->year = py; + pd->dayofmonth = d; + pd->julianday = pm->firstdayjulian + d - 1; + pd->dayofweek = (pm->firstdayofweek + d - 1) % 7; + if (pdp != NULL) + pdp->nextday = pd; + } + if (pdp == NULL) + pm->days = pd; +} + +void +generatedates(struct tm *tp1, struct tm *tp2) +{ + int y1, m1, d1; + int y2, m2, d2; + int y, m, d; + + y1 = tp1->tm_year; + m1 = tp1->tm_mon + 1; + d1 = tp1->tm_mday; + y2 = tp2->tm_year; + m2 = tp2->tm_mon + 1; + d2 = tp2->tm_mday; + + if (y1 == y2) { + if (m1 == m2) { + /* Same year, same month. Easy! */ + for (d = d1; d <= d2; d++) + createdate(y1, m1, d); + return; + } + /* + * Same year, different month. + * - Take the leftover days from m1 + * - Take all days from + * - Take the first days from m2 + */ + mondays = mondaytab[isleap(y1)]; + for (d = d1; d <= mondays[m1]; d++) + createdate(y1, m1, d); + for (m = m1 + 1; m < m2; m++) + for (d = 1; d <= mondays[m]; d++) + createdate(y1, m, d); + for (d = 1; d <= d2; d++) + createdate(y1, m2, d); + return; + } + /* + * Different year, different month. + * - Take the leftover days from y1-m1 + * - Take all days from y1- + * - Take all days from y2-[1 .. m2> + * - Take the first days of y2-m2 + */ + mondays = mondaytab[isleap(y1)]; + for (d = d1; d <= mondays[m1]; d++) + createdate(y1, m1, d); + for (m = m1 + 1; m <= 12; m++) + for (d = 1; d <= mondays[m]; d++) + createdate(y1, m, d); + for (y = y1 + 1; y < y2; y++) { + mondays = mondaytab[isleap(y)]; + for (m = 1; m <= 12; m++) + for (d = 1; d <= mondays[m]; d++) + createdate(y, m, d); + } + mondays = mondaytab[isleap(y2)]; + for (m = 1; m < m2; m++) + for (d = 1; d <= mondays[m]; d++) + createdate(y2, m, d); + for (d = 1; d <= d2; d++) + createdate(y2, m2, d); +} + +void +dumpdates(void) +{ + struct cal_year *y; + struct cal_month *m; + struct cal_day *d; + + y = hyear; + while (y != NULL) { + printf("%-5d (wday:%d)\n", y->year, y->firstdayofweek); + m = y->months; + while (m != NULL) { + printf("-- %-5d (julian:%d, dow:%d)\n", m->month, + m->firstdayjulian, m->firstdayofweek); + d = m->days; + while (d != NULL) { + printf(" -- %-5d (julian:%d, dow:%d)\n", + d->dayofmonth, d->julianday, d->dayofweek); + d = d->nextday; + } + m = m->nextmonth; + } + y = y->nextyear; + } +} + +int +remember_ymd(int yy, int mm, int dd) +{ + struct cal_year *y; + struct cal_month *m; + struct cal_day *d; + + if (debug_remember) + printf("remember_ymd: %d - %d - %d\n", yy, mm, dd); + + y = hyear; + while (y != NULL) { + if (y->year != yy) { + y = y->nextyear; + continue; + } + m = y->months; + while (m != NULL) { + if (m->month != mm) { + m = m->nextmonth; + continue; + } + d = m->days; + while (d != NULL) { + if (d->dayofmonth == dd) + return (1); + d = d->nextday; + continue; + } + return (0); + } + return (0); + } + return (0); +} + +int +remember_yd(int yy, int dd, int *rm, int *rd) +{ + struct cal_year *y; + struct cal_month *m; + struct cal_day *d; + + if (debug_remember) + printf("remember_yd: %d - %d\n", yy, dd); + + y = hyear; + while (y != NULL) { + if (y->year != yy) { + y = y->nextyear; + continue; + } + m = y->months; + while (m != NULL) { + d = m->days; + while (d != NULL) { + if (d->julianday == dd) { + *rm = m->month; + *rd = d->dayofmonth; + return (1); + } + d = d->nextday; + } + m = m->nextmonth; + } + return (0); + } + return (0); +} + +int +first_dayofweek_of_year(int yy) +{ + struct cal_year *y; + + y = hyear; + while (y != NULL) { + if (y->year == yy) + return (y->firstdayofweek); + y = y->nextyear; + } + + /* Should not happen */ + return (-1); +} + +int +first_dayofweek_of_month(int yy, int mm) +{ + struct cal_year *y; + struct cal_month *m; + + y = hyear; + while (y != NULL) { + if (y->year != yy) { + y = y->nextyear; + continue; + } + m = y->months; + while (m != NULL) { + if (m->month == mm) + return (m->firstdayofweek); + m = m->nextmonth; + } + /* Should not happen */ + return (-1); + } + + /* Should not happen */ + return (-1); +} + +int +walkthrough_dates(struct event **e) +{ + static struct cal_year *y = NULL; + static struct cal_month *m = NULL; + static struct cal_day *d = NULL; + + if (y == NULL) { + y = hyear; + m = y->months; + d = m->days; + *e = d->events; + return (1); + }; + if (d->nextday != NULL) { + d = d->nextday; + *e = d->events; + return (1); + } + if (m->nextmonth != NULL) { + m = m->nextmonth; + d = m->days; + *e = d->events; + return (1); + } + if (y->nextyear != NULL) { + y = y->nextyear; + m = y->months; + d = m->days; + *e = d->events; + return (1); + } + + return (0); +} + +static struct cal_day * +find_day(int yy, int mm, int dd) +{ + struct cal_year *y; + struct cal_month *m; + struct cal_day *d; + + if (debug_remember) + printf("remember_ymd: %d - %d - %d\n", yy, mm, dd); + + y = hyear; + while (y != NULL) { + if (y->year != yy) { + y = y->nextyear; + continue; + } + m = y->months; + while (m != NULL) { + if (m->month != mm) { + m = m->nextmonth; + continue; + } + d = m->days; + while (d != NULL) { + if (d->dayofmonth == dd) + return (d); + d = d->nextday; + continue; + } + return (NULL); + } + return (NULL); + } + return (NULL); +} + +void +addtodate(struct event *e, int year, int month, int day) +{ + struct cal_day *d; + + d = find_day(year, month, day); + e->next = d->events; + d->events = e; +} Modified: head/usr.bin/calendar/day.c ============================================================================== --- head/usr.bin/calendar/day.c Mon Mar 29 06:31:58 2010 (r205820) +++ head/usr.bin/calendar/day.c Mon Mar 29 06:49:20 2010 (r205821) @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1989, 1993, 1994 * The Regents of the University of California. All rights reserved. * @@ -34,9 +34,6 @@ #include __FBSDID("$FreeBSD$"); -#include -#include -#include #include #include #include @@ -46,120 +43,38 @@ __FBSDID("$FreeBSD$"); #include "calendar.h" -struct tm *tp; -static const struct tm tm0; -int *cumdays, yrdays; -char dayname[10]; - - *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Mar 29 06:55:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD828106564A; Mon, 29 Mar 2010 06:55:38 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CC0F88FC08; Mon, 29 Mar 2010 06:55: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 o2T6tcKE077450; Mon, 29 Mar 2010 06:55:38 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2T6tcqA077448; Mon, 29 Mar 2010 06:55:38 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201003290655.o2T6tcqA077448@svn.freebsd.org> From: Fabien Thomas Date: Mon, 29 Mar 2010 06:55: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: r205823 - stable/8/sys/dev/hwpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2010 06:55:39 -0000 Author: fabient Date: Mon Mar 29 06:55:38 2010 New Revision: 205823 URL: http://svn.freebsd.org/changeset/base/205823 Log: MFC r205694: Handling SIGPIPE will cause deadlock/crash. Return an error immediatly in case of hard shutdown. Modified: stable/8/sys/dev/hwpmc/hwpmc_logging.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/hwpmc/hwpmc_logging.c ============================================================================== --- stable/8/sys/dev/hwpmc/hwpmc_logging.c Mon Mar 29 06:54:30 2010 (r205822) +++ stable/8/sys/dev/hwpmc/hwpmc_logging.c Mon Mar 29 06:55:38 2010 (r205823) @@ -298,7 +298,6 @@ pmclog_loop(void *arg) mtx_unlock(&pmc_kthread_mtx); -sigpipe_retry: /* process the request */ PMCDBG(LOG,WRI,2, "po=%p base=%p ptr=%p", po, lb->plb_base, lb->plb_ptr); @@ -322,9 +321,6 @@ sigpipe_retry: if (error) { /* XXX some errors are recoverable */ - if (error == EPIPE) - goto sigpipe_retry; - /* send a SIGIO to the owner and exit */ PROC_LOCK(p); psignal(p, SIGIO); From owner-svn-src-all@FreeBSD.ORG Mon Mar 29 06:56:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 19E1A106566B; Mon, 29 Mar 2010 06:56:18 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 08B108FC15; Mon, 29 Mar 2010 06:56: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 o2T6uHAv077648; Mon, 29 Mar 2010 06:56:17 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2T6uH3r077646; Mon, 29 Mar 2010 06:56:17 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201003290656.o2T6uH3r077646@svn.freebsd.org> From: Fabien Thomas Date: Mon, 29 Mar 2010 06:56: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: r205824 - stable/7/sys/dev/hwpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2010 06:56:18 -0000 Author: fabient Date: Mon Mar 29 06:56:17 2010 New Revision: 205824 URL: http://svn.freebsd.org/changeset/base/205824 Log: MFC r205694: Handling SIGPIPE will cause deadlock/crash. Return an error immediatly in case of hard shutdown. Modified: stable/7/sys/dev/hwpmc/hwpmc_logging.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/hwpmc/hwpmc_logging.c ============================================================================== --- stable/7/sys/dev/hwpmc/hwpmc_logging.c Mon Mar 29 06:55:38 2010 (r205823) +++ stable/7/sys/dev/hwpmc/hwpmc_logging.c Mon Mar 29 06:56:17 2010 (r205824) @@ -298,7 +298,6 @@ pmclog_loop(void *arg) mtx_unlock(&pmc_kthread_mtx); -sigpipe_retry: /* process the request */ PMCDBG(LOG,WRI,2, "po=%p base=%p ptr=%p", po, lb->plb_base, lb->plb_ptr); @@ -322,9 +321,6 @@ sigpipe_retry: if (error) { /* XXX some errors are recoverable */ - if (error == EPIPE) - goto sigpipe_retry; - /* send a SIGIO to the owner and exit */ PROC_LOCK(p); psignal(p, SIGIO); From owner-svn-src-all@FreeBSD.ORG Mon Mar 29 06:57:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 70ADF106564A; Mon, 29 Mar 2010 06:57:44 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 44EFC8FC17; Mon, 29 Mar 2010 06:57: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 o2T6vie5077991; Mon, 29 Mar 2010 06:57:44 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2T6vi8s077989; Mon, 29 Mar 2010 06:57:44 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201003290657.o2T6vi8s077989@svn.freebsd.org> From: Fabien Thomas Date: Mon, 29 Mar 2010 06:57:44 +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: r205825 - stable/8/usr.sbin/pmcstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Mar 2010 06:57:44 -0000 Author: fabient Date: Mon Mar 29 06:57:43 2010 New Revision: 205825 URL: http://svn.freebsd.org/changeset/base/205825 Log: MFC r205693: Do not overflow the term in the case of multi-line display. Modified: stable/8/usr.sbin/pmcstat/pmcpl_calltree.c Directory Properties: stable/8/usr.sbin/pmcstat/ (props changed) Modified: stable/8/usr.sbin/pmcstat/pmcpl_calltree.c ============================================================================== --- stable/8/usr.sbin/pmcstat/pmcpl_calltree.c Mon Mar 29 06:56:17 2010 (r205824) +++ stable/8/usr.sbin/pmcstat/pmcpl_calltree.c Mon Mar 29 06:57:43 2010 (r205825) @@ -366,7 +366,7 @@ pmcpl_ct_node_cleartag(void) static int pmcpl_ct_node_dumptop(int pmcin, struct pmcpl_ct_node *ct, - struct pmcpl_ct_sample *rsamples, int x, int *y) + struct pmcpl_ct_sample *rsamples, int x, int *y, int maxy) { int i; @@ -387,7 +387,7 @@ pmcpl_ct_node_dumptop(int pmcin, struct if (ct->pct_narc == 0) { pmcpl_ct_topscreen[x+1][*y] = NULL; if (*y >= PMCPL_CT_MAXLINE || - *y >= pmcstat_displayheight) + *y >= maxy) return 1; *y = *y + 1; for (i=0; i < x; i++) @@ -407,7 +407,7 @@ pmcpl_ct_node_dumptop(int pmcin, struct &ct->pct_arc[i].pcta_samples) > pmcstat_threshold) { if (pmcpl_ct_node_dumptop(pmcin, ct->pct_arc[i].pcta_child, - rsamples, x+1, y)) + rsamples, x+1, y, maxy)) return 1; } } @@ -472,6 +472,9 @@ pmcpl_ct_node_printtop(struct pmcpl_ct_s /* Check for line wrap. */ width += ns_len + is_len + vs_len + 1; if (width >= pmcstat_displaywidth) { + maxy--; + if (y >= maxy) + break; PMCSTAT_PRINTW("\n%*s", indentwidth, space); width = indentwidth + ns_len + is_len + vs_len; } @@ -515,7 +518,7 @@ pmcpl_ct_topdisplay(void) for (i = 0; i < pmcpl_ct_root->pct_narc; i++) { if (pmcpl_ct_node_dumptop(pmcin, pmcpl_ct_root->pct_arc[i].pcta_child, - &rsamples, x, &y)) { + &rsamples, x, &y, pmcstat_displayheight - 2)) { break; } } From owner-svn-src-all@FreeBSD.ORG Mon Mar 29 06:59:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D94C41065670; Mon, 29 Mar 2010 06:59:08 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ADA308FC0C; Mon, 29 Mar 2010 06:59: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 o2T6x80H078337; Mon, 29 Mar 2010 06:59:08 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2T6x84s078335; Mon, 29 Mar 2010 06:59:08 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201003290659.o2T6x84s078335@svn.freebsd.org> From: Fabien Thomas Date: Mon, 29 Mar 2010 06:59:08 +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: r205826 - stable/7/usr.sbin/pmcstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Mar 2010 06:59:09 -0000 Author: fabient Date: Mon Mar 29 06:59:08 2010 New Revision: 205826 URL: http://svn.freebsd.org/changeset/base/205826 Log: MFC r205693: Do not overflow the term in the case of multi-line display. Modified: stable/7/usr.sbin/pmcstat/pmcpl_calltree.c Directory Properties: stable/7/usr.sbin/pmcstat/ (props changed) Modified: stable/7/usr.sbin/pmcstat/pmcpl_calltree.c ============================================================================== --- stable/7/usr.sbin/pmcstat/pmcpl_calltree.c Mon Mar 29 06:57:43 2010 (r205825) +++ stable/7/usr.sbin/pmcstat/pmcpl_calltree.c Mon Mar 29 06:59:08 2010 (r205826) @@ -366,7 +366,7 @@ pmcpl_ct_node_cleartag(void) static int pmcpl_ct_node_dumptop(int pmcin, struct pmcpl_ct_node *ct, - struct pmcpl_ct_sample *rsamples, int x, int *y) + struct pmcpl_ct_sample *rsamples, int x, int *y, int maxy) { int i; @@ -387,7 +387,7 @@ pmcpl_ct_node_dumptop(int pmcin, struct if (ct->pct_narc == 0) { pmcpl_ct_topscreen[x+1][*y] = NULL; if (*y >= PMCPL_CT_MAXLINE || - *y >= pmcstat_displayheight) + *y >= maxy) return 1; *y = *y + 1; for (i=0; i < x; i++) @@ -407,7 +407,7 @@ pmcpl_ct_node_dumptop(int pmcin, struct &ct->pct_arc[i].pcta_samples) > pmcstat_threshold) { if (pmcpl_ct_node_dumptop(pmcin, ct->pct_arc[i].pcta_child, - rsamples, x+1, y)) + rsamples, x+1, y, maxy)) return 1; } } @@ -472,6 +472,9 @@ pmcpl_ct_node_printtop(struct pmcpl_ct_s /* Check for line wrap. */ width += ns_len + is_len + vs_len + 1; if (width >= pmcstat_displaywidth) { + maxy--; + if (y >= maxy) + break; PMCSTAT_PRINTW("\n%*s", indentwidth, space); width = indentwidth + ns_len + is_len + vs_len; } @@ -515,7 +518,7 @@ pmcpl_ct_topdisplay(void) for (i = 0; i < pmcpl_ct_root->pct_narc; i++) { if (pmcpl_ct_node_dumptop(pmcin, pmcpl_ct_root->pct_arc[i].pcta_child, - &rsamples, x, &y)) { + &rsamples, x, &y, pmcstat_displayheight - 2)) { break; } } From owner-svn-src-all@FreeBSD.ORG Mon Mar 29 07:08:48 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D4CD1065670; Mon, 29 Mar 2010 07:08:48 +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 F0FDC8FC24; Mon, 29 Mar 2010 07:08: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 o2T78lkB080509; Mon, 29 Mar 2010 07:08:47 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2T78lrw080507; Mon, 29 Mar 2010 07:08:47 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201003290708.o2T78lrw080507@svn.freebsd.org> From: Edwin Groothuis Date: Mon, 29 Mar 2010 07:08:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205827 - head/usr.bin/calendar X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Mar 2010 07:08:48 -0000 Author: edwin Date: Mon Mar 29 07:08:47 2010 New Revision: 205827 URL: http://svn.freebsd.org/changeset/base/205827 Log: Bump WARNS to 7 Modified: head/usr.bin/calendar/Makefile Modified: head/usr.bin/calendar/Makefile ============================================================================== --- head/usr.bin/calendar/Makefile Mon Mar 29 06:59:08 2010 (r205826) +++ head/usr.bin/calendar/Makefile Mon Mar 29 07:08:47 2010 (r205827) @@ -11,7 +11,7 @@ DE_LINKS= de_DE.ISO8859-15 FR_LINKS= fr_FR.ISO8859-15 TEXTMODE?= 444 -WARNS?= 3 +WARNS?= 7 beforeinstall: ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${TEXTMODE} \ From owner-svn-src-all@FreeBSD.ORG Mon Mar 29 07:09:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 42F60106566C; Mon, 29 Mar 2010 07:09:28 +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 3258F8FC2F; Mon, 29 Mar 2010 07:09: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 o2T79SKD080677; Mon, 29 Mar 2010 07:09:28 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2T79Sr4080675; Mon, 29 Mar 2010 07:09:28 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201003290709.o2T79Sr4080675@svn.freebsd.org> From: Edwin Groothuis Date: Mon, 29 Mar 2010 07:09: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: r205828 - head/usr.bin/calendar/calendars X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2010 07:09:28 -0000 Author: edwin Date: Mon Mar 29 07:09:27 2010 New Revision: 205828 URL: http://svn.freebsd.org/changeset/base/205828 Log: Use new syntax for the dutch calendar: Use local month names instead of english ones. Modified: head/usr.bin/calendar/calendars/calendar.dutch Modified: head/usr.bin/calendar/calendars/calendar.dutch ============================================================================== --- head/usr.bin/calendar/calendars/calendar.dutch Mon Mar 29 07:08:47 2010 (r205827) +++ head/usr.bin/calendar/calendars/calendar.dutch Mon Mar 29 07:09:27 2010 (r205828) @@ -10,25 +10,25 @@ Easter=Pasen /* * Feestdagen */ -01/01 Nieuwjaar -01/06 Driekoningen -04/01 Een April -04/30 Koninginendag -05/01 Dag van de Arbeid -05/04 Dodenherdenking -05/05 Bevrijdingsdag -10/04 Dierendag -11/01 Allerheilingen -11/02 Allerzielen -11/11 Sint Maarten -11/11 Elfde-van-de-elfde -12/05 Sinterklaas avond -12/15 Koninkrijksdag -12/24 Kerstavond -12/25 Eerste kerstdag -12/26 Tweede kerstdag -12/28 Feest der Onnozele Kinderen -12/31 Oudjaar +jan/01 Nieuwjaar +jan/06 Driekoningen +apr/01 1 april +apr/30 Koninginnedag +mei/01 Dag van de Arbeid +mei/04 Dodenherdenking +mei/05 Bevrijdingsdag +okt/04 Dierendag +nov/01 Allerheilingen +nov/02 Allerzielen +nov/11 Sint Maarten +nov/11 Elfde-van-de-elfde +dec/05 Sinterklaas avond +dec/15 Koninkrijksdag +dec/24 Kerstavond +dec/25 Eerste kerstdag +dec/26 Tweede kerstdag +dec/28 Feest der Onnozele Kinderen +dec/31 Oudjaar /* * Pasen gerelateerd @@ -38,12 +38,12 @@ Pasen-49 Carnaval Pasen-48 Carnaval Pasen-47 Carnaval (Vastenavond) Pasen-46 Aswoensdag -Pasen-7 Palmzondag -Pasen-3 Witte Donderdag -Pasen-2 Goede vrijdag -Pasen-1 Stille zaterdag +Pasen-7 Palmzondag +Pasen-3 Witte Donderdag +Pasen-2 Goede vrijdag +Pasen-1 Stille zaterdag Pasen Eerste paasdag -Pasen+1 Tweede paasdag +Pasen+1 Tweede paasdag Pasen+39 Hemelvaartsdag Pasen+49 Eerste Pinksterdag Pasen+50 Tweede Pinksterdag @@ -52,28 +52,28 @@ Pasen+56 Trinitatis /* * Misc */ -05/SunSecond Moederdag -06/SunThird Vaderdag -09/TueThird Prinsjesdag +mei/SunSecond Moederdag +jun/SunThird Vaderdag +sep/TueThird Prinsjesdag /* * Het koningshuis */ -01/19 Prinses Margriet (1943) -01/31 Koningin Beatrix (1938) -02/17 Prins Willem III (1817 - 1890) -02/18 Prinses Christina (1947) -04/10 Prinses Ariane (2007) -04/19 Prins Hendrik (1876 - 1934) -04/27 Kroonprins Willem Alexander (1967) -04/30 Koningin Juliana (1909 - 2004) -04/30 Mr. Pieter van Vollenhoven (1939) -05/17 Prinses Maxima (1971) -06/26 Prinses Alexia (2005) -06/29 Prins Bernhard (1911 - 2004) -08/05 Prinses Irene (1939) -08/31 Prinses Wilhelmina (1880 - 1962) -09/06 Prins Claus (1925 - 2002) -09/25 Prins Johan Friso (1968) -10/11 Prins Constantijn (1969) -12/07 Prinses Catharina-Amalia (2003) +jan/19 Prinses Margriet (1943) +jan/31 Koningin Beatrix (1938) +feb/17 Prins Willem III (1817 - 1890) +feb/18 Prinses Christina (1947) +apr/10 Prinses Ariane (2007) +apr/19 Prins Hendrik (1876 - 1934) +apr/27 Kroonprins Willem Alexander (1967) +apr/30 Koningin Juliana (1909 - 2004) +apr/30 Mr. Pieter van Vollenhoven (1939) +mei/17 Prinses Maxima (1971) +jun/26 Prinses Alexia (2005) +jun/29 Prins Bernhard (1911 - 2004) +aug/05 Prinses Irene (1939) +aug/31 Prinses Wilhelmina (1880 - 1962) +sep/06 Prins Claus (1925 - 2002) +sep/25 Prins Johan Friso (1968) +okt/11 Prins Constantijn (1969) +dec/07 Prinses Catharina-Amalia (2003) From owner-svn-src-all@FreeBSD.ORG Mon Mar 29 12:19:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 834ED106566B; Mon, 29 Mar 2010 12:19:23 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 720E08FC25; Mon, 29 Mar 2010 12:19:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2TCJNi3052721; Mon, 29 Mar 2010 12:19:23 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2TCJNE6052719; Mon, 29 Mar 2010 12:19:23 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201003291219.o2TCJNE6052719@svn.freebsd.org> From: Luigi Rizzo Date: Mon, 29 Mar 2010 12:19:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205830 - 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: Mon, 29 Mar 2010 12:19:23 -0000 Author: luigi Date: Mon Mar 29 12:19:23 2010 New Revision: 205830 URL: http://svn.freebsd.org/changeset/base/205830 Log: Fix handling of set manipulations. This patch has two fixes for potential kernel panics (one wrong index, one access to the wrong lock) and two fixes to wrong logic in a conditional. The potential panics are also on stable/8, so I am going to MFC the fix quickly. Modified: head/sys/netinet/ipfw/ip_fw_sockopt.c Modified: head/sys/netinet/ipfw/ip_fw_sockopt.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw_sockopt.c Mon Mar 29 07:54:20 2010 (r205829) +++ head/sys/netinet/ipfw/ip_fw_sockopt.c Mon Mar 29 12:19:23 2010 (r205830) @@ -270,23 +270,24 @@ del_entry(struct ip_fw_chain *chain, u_i return EINVAL; } - IPFW_UH_WLOCK(chain); /* prevent conflicts among the writers */ + IPFW_UH_WLOCK(chain); /* arbitrate writers */ chain->reap = NULL; /* prepare for deletions */ switch (cmd) { - case 0: /* delete rules with given number (0 is special means all) */ - case 1: /* delete all rules with given set number, rule->set == rulenum */ - case 5: /* delete rules with given number and with given set number. - * rulenum - given rule number; - * new_set - given set number. - */ - /* locate first rule to delete (start), the one after the - * last one (end), and count how many rules to delete (n) + case 0: /* delete rules number N (N == 0 means all) */ + case 1: /* delete all rules in set N */ + case 5: /* delete rules with number N and set "new_set". */ + + /* + * Locate first rule to delete (start), the rule after + * the last one to delete (end), and count how many + * rules to delete (n) */ n = 0; if (cmd == 1) { /* look for a specific set, must scan all */ + new_set = rulenum; for (start = -1, i = 0; i < chain->n_rules; i++) { - if (chain->map[start]->set != rulenum) + if (chain->map[i]->set != rulenum) continue; if (start < 0) start = i; @@ -314,32 +315,42 @@ del_entry(struct ip_fw_chain *chain, u_i error = EINVAL; break; } - /* copy the initial part of the map */ + /* + * bcopy the initial part of the map, then individually + * copy all matching entries between start and end, + * and then bcopy the final part. + * Once we are done we can swap maps and clean up the + * deleted rules (unfortunately we need to repeat a + * convoluted test). + */ if (start > 0) bcopy(chain->map, map, start * sizeof(struct ip_fw *)); - /* copy active rules between start and end */ for (i = ofs = start; i < end; i++) { rule = chain->map[i]; - if (!(rule->set != RESVD_SET && - (cmd == 0 || rule->set == new_set) )) + if (rule->set == RESVD_SET || cmd == 0 || + (rule->set == new_set && + (cmd == 1 || rule->rulenum == rulenum))) map[ofs++] = chain->map[i]; } - /* finally the tail */ bcopy(chain->map + end, map + ofs, (chain->n_rules - end) * sizeof(struct ip_fw *)); + map = swap_map(chain, map, chain->n_rules - n); /* now remove the rules deleted */ for (i = start; i < end; i++) { + int l; rule = map[i]; - if (rule->set != RESVD_SET && - (cmd == 0 || rule->set == new_set) ) { - int l = RULESIZE(rule); - - chain->static_len -= l; - ipfw_remove_dyn_children(rule); - rule->x_next = chain->reap; - chain->reap = rule; - } + /* same test as above */ + if (rule->set == RESVD_SET || cmd == 0 || + (rule->set == new_set && + (cmd == 1 || rule->rulenum == rulenum))) + continue; + + l = RULESIZE(rule); + chain->static_len -= l; + ipfw_remove_dyn_children(rule); + rule->x_next = chain->reap; + chain->reap = rule; } break; @@ -446,7 +457,7 @@ zero_entry(struct ip_fw_chain *chain, u_ break; } if (!cleared) { /* we did not find any matching rules */ - IPFW_WUNLOCK(chain); + IPFW_UH_RUNLOCK(chain); return (EINVAL); } msg = log_only ? "logging count reset" : "cleared"; From owner-svn-src-all@FreeBSD.ORG Mon Mar 29 12:27:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C0881106566B; Mon, 29 Mar 2010 12:27:49 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AF6A08FC08; Mon, 29 Mar 2010 12:27: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 o2TCRndh054630; Mon, 29 Mar 2010 12:27:49 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2TCRn9i054628; Mon, 29 Mar 2010 12:27:49 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201003291227.o2TCRn9i054628@svn.freebsd.org> From: Luigi Rizzo Date: Mon, 29 Mar 2010 12:27:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205831 - 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: Mon, 29 Mar 2010 12:27:49 -0000 Author: luigi Date: Mon Mar 29 12:27:49 2010 New Revision: 205831 URL: http://svn.freebsd.org/changeset/base/205831 Log: remove a leftover debugging message Modified: head/sys/netinet/ipfw/ip_dn_io.c Modified: head/sys/netinet/ipfw/ip_dn_io.c ============================================================================== --- head/sys/netinet/ipfw/ip_dn_io.c Mon Mar 29 12:19:23 2010 (r205830) +++ head/sys/netinet/ipfw/ip_dn_io.c Mon Mar 29 12:27:49 2010 (r205831) @@ -731,7 +731,6 @@ dummynet_io(struct mbuf **m0, int dir, s goto dropit; } if (fs->sched->fp->enqueue(si, q, m)) { - printf("%s dropped by enqueue\n", __FUNCTION__); /* packet was dropped by enqueue() */ m = *m0 = NULL; goto dropit; From owner-svn-src-all@FreeBSD.ORG Mon Mar 29 12:29:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5AEA5106566C; Mon, 29 Mar 2010 12:29:35 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4947A8FC19; Mon, 29 Mar 2010 12:29: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 o2TCTZN4055057; Mon, 29 Mar 2010 12:29:35 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2TCTZe6055055; Mon, 29 Mar 2010 12:29:35 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201003291229.o2TCTZe6055055@svn.freebsd.org> From: Luigi Rizzo Date: Mon, 29 Mar 2010 12:29: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: r205832 - stable/8/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: Mon, 29 Mar 2010 12:29:35 -0000 Author: luigi Date: Mon Mar 29 12:29:34 2010 New Revision: 205832 URL: http://svn.freebsd.org/changeset/base/205832 Log: remove a leftover debugging message Modified: stable/8/sys/netinet/ipfw/ip_dn_io.c Modified: stable/8/sys/netinet/ipfw/ip_dn_io.c ============================================================================== --- stable/8/sys/netinet/ipfw/ip_dn_io.c Mon Mar 29 12:27:49 2010 (r205831) +++ stable/8/sys/netinet/ipfw/ip_dn_io.c Mon Mar 29 12:29:34 2010 (r205832) @@ -731,7 +731,6 @@ dummynet_io(struct mbuf **m0, int dir, s goto dropit; } if (fs->sched->fp->enqueue(si, q, m)) { - printf("%s dropped by enqueue\n", __FUNCTION__); /* packet was dropped by enqueue() */ m = *m0 = NULL; goto dropit; From owner-svn-src-all@FreeBSD.ORG Mon Mar 29 12:32:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 691C1106564A; Mon, 29 Mar 2010 12:32:16 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 573668FC0A; Mon, 29 Mar 2010 12:32: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 o2TCWGFY055697; Mon, 29 Mar 2010 12:32:16 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2TCWGvU055695; Mon, 29 Mar 2010 12:32:16 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201003291232.o2TCWGvU055695@svn.freebsd.org> From: Luigi Rizzo Date: Mon, 29 Mar 2010 12:32: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: r205833 - stable/8/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: Mon, 29 Mar 2010 12:32:16 -0000 Author: luigi Date: Mon Mar 29 12:32:16 2010 New Revision: 205833 URL: http://svn.freebsd.org/changeset/base/205833 Log: mfc 205830: fixes to rule set handling (including potential kernel panics) Modified: stable/8/sys/netinet/ipfw/ip_fw_sockopt.c Modified: stable/8/sys/netinet/ipfw/ip_fw_sockopt.c ============================================================================== --- stable/8/sys/netinet/ipfw/ip_fw_sockopt.c Mon Mar 29 12:29:34 2010 (r205832) +++ stable/8/sys/netinet/ipfw/ip_fw_sockopt.c Mon Mar 29 12:32:16 2010 (r205833) @@ -270,23 +270,24 @@ del_entry(struct ip_fw_chain *chain, u_i return EINVAL; } - IPFW_UH_WLOCK(chain); /* prevent conflicts among the writers */ + IPFW_UH_WLOCK(chain); /* arbitrate writers */ chain->reap = NULL; /* prepare for deletions */ switch (cmd) { - case 0: /* delete rules with given number (0 is special means all) */ - case 1: /* delete all rules with given set number, rule->set == rulenum */ - case 5: /* delete rules with given number and with given set number. - * rulenum - given rule number; - * new_set - given set number. - */ - /* locate first rule to delete (start), the one after the - * last one (end), and count how many rules to delete (n) + case 0: /* delete rules number N (N == 0 means all) */ + case 1: /* delete all rules in set N */ + case 5: /* delete rules with number N and set "new_set". */ + + /* + * Locate first rule to delete (start), the rule after + * the last one to delete (end), and count how many + * rules to delete (n) */ n = 0; if (cmd == 1) { /* look for a specific set, must scan all */ + new_set = rulenum; for (start = -1, i = 0; i < chain->n_rules; i++) { - if (chain->map[start]->set != rulenum) + if (chain->map[i]->set != rulenum) continue; if (start < 0) start = i; @@ -314,32 +315,42 @@ del_entry(struct ip_fw_chain *chain, u_i error = EINVAL; break; } - /* copy the initial part of the map */ + /* + * bcopy the initial part of the map, then individually + * copy all matching entries between start and end, + * and then bcopy the final part. + * Once we are done we can swap maps and clean up the + * deleted rules (unfortunately we need to repeat a + * convoluted test). + */ if (start > 0) bcopy(chain->map, map, start * sizeof(struct ip_fw *)); - /* copy active rules between start and end */ for (i = ofs = start; i < end; i++) { rule = chain->map[i]; - if (!(rule->set != RESVD_SET && - (cmd == 0 || rule->set == new_set) )) + if (rule->set == RESVD_SET || cmd == 0 || + (rule->set == new_set && + (cmd == 1 || rule->rulenum == rulenum))) map[ofs++] = chain->map[i]; } - /* finally the tail */ bcopy(chain->map + end, map + ofs, (chain->n_rules - end) * sizeof(struct ip_fw *)); + map = swap_map(chain, map, chain->n_rules - n); /* now remove the rules deleted */ for (i = start; i < end; i++) { + int l; rule = map[i]; - if (rule->set != RESVD_SET && - (cmd == 0 || rule->set == new_set) ) { - int l = RULESIZE(rule); - - chain->static_len -= l; - ipfw_remove_dyn_children(rule); - rule->x_next = chain->reap; - chain->reap = rule; - } + /* same test as above */ + if (rule->set == RESVD_SET || cmd == 0 || + (rule->set == new_set && + (cmd == 1 || rule->rulenum == rulenum))) + continue; + + l = RULESIZE(rule); + chain->static_len -= l; + ipfw_remove_dyn_children(rule); + rule->x_next = chain->reap; + chain->reap = rule; } break; @@ -446,7 +457,7 @@ zero_entry(struct ip_fw_chain *chain, u_ break; } if (!cleared) { /* we did not find any matching rules */ - IPFW_WUNLOCK(chain); + IPFW_UH_RUNLOCK(chain); return (EINVAL); } msg = log_only ? "logging count reset" : "cleared"; From owner-svn-src-all@FreeBSD.ORG Mon Mar 29 13:20:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 01D37106564A; Mon, 29 Mar 2010 13:20:53 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E494A8FC15; Mon, 29 Mar 2010 13:20: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 o2TDKqJA066478; Mon, 29 Mar 2010 13:20:52 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2TDKqfe066476; Mon, 29 Mar 2010 13:20:52 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201003291320.o2TDKqfe066476@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Mon, 29 Mar 2010 13:20: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: r205834 - head/usr.bin/calendar X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Mar 2010 13:20:53 -0000 Author: des Date: Mon Mar 29 13:20:52 2010 New Revision: 205834 URL: http://svn.freebsd.org/changeset/base/205834 Log: size_t is not equivalent to int on 64-bit platforms. Pointy hat to: edwin@ Modified: head/usr.bin/calendar/parsedata.c Modified: head/usr.bin/calendar/parsedata.c ============================================================================== --- head/usr.bin/calendar/parsedata.c Mon Mar 29 12:32:16 2010 (r205833) +++ head/usr.bin/calendar/parsedata.c Mon Mar 29 13:20:52 2010 (r205834) @@ -39,9 +39,9 @@ __FBSDID("$FreeBSD$"); static char *showflags(int flags); static int isonlydigits(char *s, int nostar); static const char *getmonthname(int i); -static int checkmonth(char *s, int *len, int *offset, const char **month); +static int checkmonth(char *s, size_t *len, size_t *offset, const char **month); static const char *getdayofweekname(int i); -static int checkdayofweek(char *s, int *len, int *offset, const char **dow); +static int checkdayofweek(char *s, size_t *len, size_t *offset, const char **dow); static int indextooffset(char *s); static int parseoffset(char *s); static char *floattoday(int year, double f); @@ -771,7 +771,7 @@ getmonthname(int i) } static int -checkmonth(char *s, int *len, int *offset, const char **month) +checkmonth(char *s, size_t *len, size_t *offset, const char **month) { struct fixs *n; int i; @@ -822,7 +822,7 @@ getdayofweekname(int i) } static int -checkdayofweek(char *s, int *len, int *offset, const char **dow) +checkdayofweek(char *s, size_t *len, size_t *offset, const char **dow) { struct fixs *n; int i; From owner-svn-src-all@FreeBSD.ORG Mon Mar 29 15:29:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 752BA106564A; Mon, 29 Mar 2010 15:29:07 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 630108FC1C; Mon, 29 Mar 2010 15:29: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 o2TFT7D2094805; Mon, 29 Mar 2010 15:29:07 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2TFT77W094804; Mon, 29 Mar 2010 15:29:07 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201003291529.o2TFT77W094804@svn.freebsd.org> From: Warner Losh Date: Mon, 29 Mar 2010 15:29: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: r205835 - stable/7/sys/dev/flash X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2010 15:29:07 -0000 Author: imp Date: Mon Mar 29 15:29:06 2010 New Revision: 205835 URL: http://svn.freebsd.org/changeset/base/205835 Log: MFC: r192058 - Remove nonexistent header file from includes list Modified: stable/7/sys/dev/flash/at45d.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/flash/at45d.c ============================================================================== --- stable/7/sys/dev/flash/at45d.c Mon Mar 29 13:20:52 2010 (r205834) +++ stable/7/sys/dev/flash/at45d.c Mon Mar 29 15:29:06 2010 (r205835) @@ -30,7 +30,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include From owner-svn-src-all@FreeBSD.ORG Mon Mar 29 15:39:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 59475106564A; Mon, 29 Mar 2010 15:39:18 +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 44A1A8FC1B; Mon, 29 Mar 2010 15: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 o2TFdI62097096; Mon, 29 Mar 2010 15:39:18 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2TFdHV1097083; Mon, 29 Mar 2010 15:39:17 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201003291539.o2TFdHV1097083@svn.freebsd.org> From: Attilio Rao Date: Mon, 29 Mar 2010 15:39: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: r205836 - in stable/8/sys: amd64/amd64 amd64/include amd64/isa conf i386/i386 i386/include i386/isa i386/xen pc98/cbus pc98/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: Mon, 29 Mar 2010 15:39:18 -0000 Author: attilio Date: Mon Mar 29 15:39:17 2010 New Revision: 205836 URL: http://svn.freebsd.org/changeset/base/205836 Log: MFC r199852, r202387, r202441, r202534: Handling all the three clocks with the LAPIC may lead to aliasing for softclock and profclock. Revert the change when the LAPIC started taking charge of all three of them. Sponsored by: Sandvine Incorporated Modified: stable/8/sys/amd64/amd64/local_apic.c stable/8/sys/amd64/include/apicvar.h stable/8/sys/amd64/isa/clock.c stable/8/sys/conf/files.pc98 stable/8/sys/conf/options.i386 stable/8/sys/conf/options.pc98 stable/8/sys/i386/i386/local_apic.c stable/8/sys/i386/include/apicvar.h stable/8/sys/i386/isa/clock.c stable/8/sys/i386/xen/exception.s stable/8/sys/pc98/cbus/clock.c stable/8/sys/pc98/conf/DEFAULTS 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/local_apic.c ============================================================================== --- stable/8/sys/amd64/amd64/local_apic.c Mon Mar 29 15:29:06 2010 (r205835) +++ stable/8/sys/amd64/amd64/local_apic.c Mon Mar 29 15:39:17 2010 (r205836) @@ -160,6 +160,9 @@ static uint32_t lvt_mode(struct lapic *l struct pic lapic_pic = { .pic_resume = lapic_resume }; +static int lapic_allclocks; +TUNABLE_INT("machdep.lapic_allclocks", &lapic_allclocks); + static uint32_t lvt_mode(struct lapic *la, u_int pin, uint32_t value) { @@ -415,10 +418,11 @@ lapic_disable_pmc(void) /* * Called by cpu_initclocks() on the BSP to setup the local APIC timer so * that it can drive hardclock, statclock, and profclock. This function - * returns true if it is able to use the local APIC timer to drive the - * clocks and false if it is not able. + * returns a positive integer if it is convenient to use the local APIC + * for all the clocks, a negative integer if it is convenient to use the + * local APIC only for the hardclock and 0 if none of them can be handled. */ -int +enum lapic_clock lapic_setup_clock(void) { u_long value; @@ -426,10 +430,10 @@ lapic_setup_clock(void) /* Can't drive the timer without a local APIC. */ if (lapic == NULL) - return (0); + return (LAPIC_CLOCK_NONE); if (resource_int_value("apic", 0, "clock", &i) == 0 && i == 0) - return (0); + return (LAPIC_CLOCK_NONE); /* Start off with a divisor of 2 (power on reset default). */ lapic_timer_divisor = 2; @@ -461,19 +465,27 @@ lapic_setup_clock(void) * (and profhz) run at hz. If 'hz' is below 1500 but above * 750, then we let the lapic timer run at 2 * 'hz'. If 'hz' * is below 750 then we let the lapic timer run at 4 * 'hz'. + * + * Please note that stathz and profhz are set only if all the + * clocks are handled through the local APIC. */ - if (hz >= 1500) + if (lapic_allclocks != 0) { + if (hz >= 1500) + lapic_timer_hz = hz; + else if (hz >= 750) + lapic_timer_hz = hz * 2; + else + lapic_timer_hz = hz * 4; + } else lapic_timer_hz = hz; - else if (hz >= 750) - lapic_timer_hz = hz * 2; - else - lapic_timer_hz = hz * 4; - if (lapic_timer_hz < 128) - stathz = lapic_timer_hz; - else - stathz = lapic_timer_hz / (lapic_timer_hz / 128); - profhz = lapic_timer_hz; lapic_timer_period = value / lapic_timer_hz; + if (lapic_allclocks != 0) { + if (lapic_timer_hz < 128) + stathz = lapic_timer_hz; + else + stathz = lapic_timer_hz / (lapic_timer_hz / 128); + profhz = lapic_timer_hz; + } /* * Start up the timer on the BSP. The APs will kick off their @@ -481,7 +493,7 @@ lapic_setup_clock(void) */ lapic_timer_periodic(lapic_timer_period); lapic_timer_enable_intr(); - return (1); + return (lapic_allclocks == 0 ? LAPIC_CLOCK_HARDCLOCK : LAPIC_CLOCK_ALL); } void @@ -784,20 +796,23 @@ lapic_handle_timer(struct trapframe *fra else hardclock_cpu(TRAPF_USERMODE(frame)); } + if (lapic_allclocks != 0) { - /* Fire statclock at stathz. */ - la->la_stat_ticks += stathz; - if (la->la_stat_ticks >= lapic_timer_hz) { - la->la_stat_ticks -= lapic_timer_hz; - statclock(TRAPF_USERMODE(frame)); - } + /* Fire statclock at stathz. */ + la->la_stat_ticks += stathz; + if (la->la_stat_ticks >= lapic_timer_hz) { + la->la_stat_ticks -= lapic_timer_hz; + statclock(TRAPF_USERMODE(frame)); + } - /* Fire profclock at profhz, but only when needed. */ - la->la_prof_ticks += profhz; - if (la->la_prof_ticks >= lapic_timer_hz) { - la->la_prof_ticks -= lapic_timer_hz; - if (profprocs != 0) - profclock(TRAPF_USERMODE(frame), TRAPF_PC(frame)); + /* Fire profclock at profhz, but only when needed. */ + la->la_prof_ticks += profhz; + if (la->la_prof_ticks >= lapic_timer_hz) { + la->la_prof_ticks -= lapic_timer_hz; + if (profprocs != 0) + profclock(TRAPF_USERMODE(frame), + TRAPF_PC(frame)); + } } critical_exit(); } Modified: stable/8/sys/amd64/include/apicvar.h ============================================================================== --- stable/8/sys/amd64/include/apicvar.h Mon Mar 29 15:29:06 2010 (r205835) +++ stable/8/sys/amd64/include/apicvar.h Mon Mar 29 15:39:17 2010 (r205836) @@ -157,6 +157,12 @@ #define APIC_BUS_PCI 2 #define APIC_BUS_MAX APIC_BUS_PCI +enum lapic_clock { + LAPIC_CLOCK_NONE, + LAPIC_CLOCK_HARDCLOCK, + LAPIC_CLOCK_ALL +}; + /* * An APIC enumerator is a psuedo bus driver that enumerates APIC's including * CPU's and I/O APIC's. @@ -224,7 +230,7 @@ int lapic_set_lvt_triggermode(u_int apic enum intr_trigger trigger); void lapic_set_tpr(u_int vector); void lapic_setup(int boot); -int lapic_setup_clock(void); +enum lapic_clock lapic_setup_clock(void); #endif /* !LOCORE */ #endif /* _MACHINE_APICVAR_H_ */ Modified: stable/8/sys/amd64/isa/clock.c ============================================================================== --- stable/8/sys/amd64/isa/clock.c Mon Mar 29 15:29:06 2010 (r205835) +++ stable/8/sys/amd64/isa/clock.c Mon Mar 29 15:39:17 2010 (r205836) @@ -91,7 +91,7 @@ static u_int32_t i8254_offset; static int (*i8254_pending)(struct intsrc *); static int i8254_ticked; static int using_atrtc_timer; -static int using_lapic_timer; +static enum lapic_clock using_lapic_timer = LAPIC_CLOCK_NONE; /* Values for timerX_state: */ #define RELEASED 0 @@ -160,7 +160,8 @@ clkintr(struct trapframe *frame) clkintr_pending = 0; mtx_unlock_spin(&clock_lock); } - KASSERT(!using_lapic_timer, ("clk interrupt enabled with lapic timer")); + KASSERT(using_lapic_timer == LAPIC_CLOCK_NONE, + ("clk interrupt enabled with lapic timer")); if (using_atrtc_timer) { #ifdef SMP @@ -422,7 +423,7 @@ set_i8254_freq(u_int freq, int intr_freq i8254_timecounter.tc_frequency = freq; mtx_lock_spin(&clock_lock); i8254_freq = freq; - if (using_lapic_timer) + if (using_lapic_timer != LAPIC_CLOCK_NONE) new_i8254_real_max_count = 0x10000; else new_i8254_real_max_count = TIMER_DIV(intr_freq); @@ -485,7 +486,7 @@ cpu_initclocks() * that it can drive hardclock(). Otherwise, change the 8254 * timecounter to user a simpler algorithm. */ - if (!using_lapic_timer) { + if (using_lapic_timer == LAPIC_CLOCK_NONE) { intr_add_handler("clk", 0, (driver_filter_t *)clkintr, NULL, NULL, INTR_TYPE_CLK, NULL); i8254_intsrc = intr_lookup_source(0); @@ -508,7 +509,7 @@ cpu_initclocks() * kernel clocks, then setup the RTC to periodically interrupt to * drive statclock() and profclock(). */ - if (!using_lapic_timer) { + if (using_lapic_timer != LAPIC_CLOCK_ALL) { using_atrtc_timer = atrtc_setup_clock(); if (using_atrtc_timer) { /* Enable periodic interrupts from the RTC. */ @@ -532,7 +533,7 @@ void cpu_startprofclock(void) { - if (using_lapic_timer || !using_atrtc_timer) + if (using_lapic_timer == LAPIC_CLOCK_ALL || !using_atrtc_timer) return; atrtc_rate(RTCSA_PROF); psdiv = pscnt = psratio; @@ -542,7 +543,7 @@ void cpu_stopprofclock(void) { - if (using_lapic_timer || !using_atrtc_timer) + if (using_lapic_timer == LAPIC_CLOCK_ALL || !using_atrtc_timer) return; atrtc_rate(RTCSA_NOPROF); psdiv = pscnt = 1; Modified: stable/8/sys/conf/files.pc98 ============================================================================== --- stable/8/sys/conf/files.pc98 Mon Mar 29 15:29:06 2010 (r205835) +++ stable/8/sys/conf/files.pc98 Mon Mar 29 15:39:17 2010 (r205836) @@ -194,7 +194,7 @@ i386/ibcs2/ibcs2_util.c optional ibcs2 i386/ibcs2/ibcs2_xenix.c optional ibcs2 i386/ibcs2/ibcs2_xenix_sysent.c optional ibcs2 i386/ibcs2/imgact_coff.c optional ibcs2 -i386/isa/atpic.c standard +i386/isa/atpic.c optional atpic #i386/isa/atpic_vector.s standard i386/isa/elink.c optional ep | ie i386/isa/isa.c optional isa @@ -240,7 +240,7 @@ pc98/cbus/gdc.c optional gdc pc98/cbus/nmi.c standard pc98/cbus/olpt.c optional olpt pc98/cbus/pckbd.c optional pckbd -pc98/cbus/pcrtc.c standard +pc98/cbus/pcrtc.c optional atpic pc98/cbus/pmc.c optional pmc pc98/cbus/scgdcrndr.c optional sc gdc pc98/cbus/scterm-sck.c optional sc Modified: stable/8/sys/conf/options.i386 ============================================================================== --- stable/8/sys/conf/options.i386 Mon Mar 29 15:29:06 2010 (r205835) +++ stable/8/sys/conf/options.i386 Mon Mar 29 15:39:17 2010 (r205836) @@ -106,6 +106,7 @@ NETGRAPH_CRONYX opt_ng_cronyx.h # Device options DEV_APIC opt_apic.h +DEV_ATPIC opt_atpic.h DEV_NPX opt_npx.h ASR_COMPAT opt_asr.h Modified: stable/8/sys/conf/options.pc98 ============================================================================== --- stable/8/sys/conf/options.pc98 Mon Mar 29 15:29:06 2010 (r205835) +++ stable/8/sys/conf/options.pc98 Mon Mar 29 15:39:17 2010 (r205836) @@ -90,6 +90,7 @@ PC98 opt_global.h # Device options DEV_APIC opt_apic.h +DEV_ATPIC opt_atpic.h DEV_MECIA opt_mecia.h DEV_NPX opt_npx.h Modified: stable/8/sys/i386/i386/local_apic.c ============================================================================== --- stable/8/sys/i386/i386/local_apic.c Mon Mar 29 15:29:06 2010 (r205835) +++ stable/8/sys/i386/i386/local_apic.c Mon Mar 29 15:39:17 2010 (r205836) @@ -34,6 +34,7 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_atpic.h" #include "opt_hwpmc_hooks.h" #include "opt_kdtrace.h" @@ -160,6 +161,17 @@ static uint32_t lvt_mode(struct lapic *l struct pic lapic_pic = { .pic_resume = lapic_resume }; +/* + * The atrtc device is compiled in only if atpic is present. + * If it is not, force lapic to take care of all the clocks. + */ +#ifdef DEV_ATPIC +static int lapic_allclocks; +TUNABLE_INT("machdep.lapic_allclocks", &lapic_allclocks); +#else +static int lapic_allclocks = 1; +#endif + static uint32_t lvt_mode(struct lapic *la, u_int pin, uint32_t value) { @@ -416,11 +428,9 @@ lapic_disable_pmc(void) /* * Called by cpu_initclocks() on the BSP to setup the local APIC timer so - * that it can drive hardclock, statclock, and profclock. This function - * returns true if it is able to use the local APIC timer to drive the - * clocks and false if it is not able. + * that it can drive hardclock, statclock, and profclock. */ -int +enum lapic_clock lapic_setup_clock(void) { u_long value; @@ -428,10 +438,10 @@ lapic_setup_clock(void) /* Can't drive the timer without a local APIC. */ if (lapic == NULL) - return (0); + return (LAPIC_CLOCK_NONE); if (resource_int_value("apic", 0, "clock", &i) == 0 && i == 0) - return (0); + return (LAPIC_CLOCK_NONE); /* Start off with a divisor of 2 (power on reset default). */ lapic_timer_divisor = 2; @@ -463,19 +473,27 @@ lapic_setup_clock(void) * (and profhz) run at hz. If 'hz' is below 1500 but above * 750, then we let the lapic timer run at 2 * 'hz'. If 'hz' * is below 750 then we let the lapic timer run at 4 * 'hz'. + * + * Please note that stathz and profhz are set only if all the + * clocks are handled through the local APIC. */ - if (hz >= 1500) + if (lapic_allclocks != 0) { + if (hz >= 1500) + lapic_timer_hz = hz; + else if (hz >= 750) + lapic_timer_hz = hz * 2; + else + lapic_timer_hz = hz * 4; + } else lapic_timer_hz = hz; - else if (hz >= 750) - lapic_timer_hz = hz * 2; - else - lapic_timer_hz = hz * 4; - if (lapic_timer_hz < 128) - stathz = lapic_timer_hz; - else - stathz = lapic_timer_hz / (lapic_timer_hz / 128); - profhz = lapic_timer_hz; lapic_timer_period = value / lapic_timer_hz; + if (lapic_allclocks != 0) { + if (lapic_timer_hz < 128) + stathz = lapic_timer_hz; + else + stathz = lapic_timer_hz / (lapic_timer_hz / 128); + profhz = lapic_timer_hz; + } /* * Start up the timer on the BSP. The APs will kick off their @@ -483,7 +501,7 @@ lapic_setup_clock(void) */ lapic_timer_periodic(lapic_timer_period); lapic_timer_enable_intr(); - return (1); + return (lapic_allclocks == 0 ? LAPIC_CLOCK_HARDCLOCK : LAPIC_CLOCK_ALL); } void @@ -786,20 +804,23 @@ lapic_handle_timer(struct trapframe *fra else hardclock_cpu(TRAPF_USERMODE(frame)); } + if (lapic_allclocks != 0) { - /* Fire statclock at stathz. */ - la->la_stat_ticks += stathz; - if (la->la_stat_ticks >= lapic_timer_hz) { - la->la_stat_ticks -= lapic_timer_hz; - statclock(TRAPF_USERMODE(frame)); - } + /* Fire statclock at stathz. */ + la->la_stat_ticks += stathz; + if (la->la_stat_ticks >= lapic_timer_hz) { + la->la_stat_ticks -= lapic_timer_hz; + statclock(TRAPF_USERMODE(frame)); + } - /* Fire profclock at profhz, but only when needed. */ - la->la_prof_ticks += profhz; - if (la->la_prof_ticks >= lapic_timer_hz) { - la->la_prof_ticks -= lapic_timer_hz; - if (profprocs != 0) - profclock(TRAPF_USERMODE(frame), TRAPF_PC(frame)); + /* Fire profclock at profhz, but only when needed. */ + la->la_prof_ticks += profhz; + if (la->la_prof_ticks >= lapic_timer_hz) { + la->la_prof_ticks -= lapic_timer_hz; + if (profprocs != 0) + profclock(TRAPF_USERMODE(frame), + TRAPF_PC(frame)); + } } critical_exit(); } Modified: stable/8/sys/i386/include/apicvar.h ============================================================================== --- stable/8/sys/i386/include/apicvar.h Mon Mar 29 15:29:06 2010 (r205835) +++ stable/8/sys/i386/include/apicvar.h Mon Mar 29 15:39:17 2010 (r205836) @@ -186,6 +186,12 @@ #define APIC_BUS_PCI 2 #define APIC_BUS_MAX APIC_BUS_PCI +enum lapic_clock { + LAPIC_CLOCK_NONE, + LAPIC_CLOCK_HARDCLOCK, + LAPIC_CLOCK_ALL +}; + /* * An APIC enumerator is a psuedo bus driver that enumerates APIC's including * CPU's and I/O APIC's. @@ -253,7 +259,7 @@ int lapic_set_lvt_triggermode(u_int apic enum intr_trigger trigger); void lapic_set_tpr(u_int vector); void lapic_setup(int boot); -int lapic_setup_clock(void); +enum lapic_clock lapic_setup_clock(void); #endif /* !LOCORE */ #endif /* _MACHINE_APICVAR_H_ */ Modified: stable/8/sys/i386/isa/clock.c ============================================================================== --- stable/8/sys/i386/isa/clock.c Mon Mar 29 15:29:06 2010 (r205835) +++ stable/8/sys/i386/isa/clock.c Mon Mar 29 15:39:17 2010 (r205836) @@ -65,9 +65,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#ifdef DEV_APIC #include -#endif #include #include #include @@ -106,7 +104,7 @@ static u_int32_t i8254_offset; static int (*i8254_pending)(struct intsrc *); static int i8254_ticked; static int using_atrtc_timer; -static int using_lapic_timer; +static enum lapic_clock using_lapic_timer = LAPIC_CLOCK_NONE; /* Values for timerX_state: */ #define RELEASED 0 @@ -175,7 +173,8 @@ clkintr(struct trapframe *frame) clkintr_pending = 0; mtx_unlock_spin(&clock_lock); } - KASSERT(!using_lapic_timer, ("clk interrupt enabled with lapic timer")); + KASSERT(using_lapic_timer == LAPIC_CLOCK_NONE, + ("clk interrupt enabled with lapic timer")); #ifdef KDTRACE_HOOKS /* @@ -453,7 +452,7 @@ set_i8254_freq(u_int freq, int intr_freq i8254_timecounter.tc_frequency = freq; mtx_lock_spin(&clock_lock); i8254_freq = freq; - if (using_lapic_timer) + if (using_lapic_timer != LAPIC_CLOCK_NONE) new_i8254_real_max_count = 0x10000; else new_i8254_real_max_count = TIMER_DIV(intr_freq); @@ -533,7 +532,7 @@ cpu_initclocks() * that it can drive hardclock(). Otherwise, change the 8254 * timecounter to user a simpler algorithm. */ - if (!using_lapic_timer) { + if (using_lapic_timer == LAPIC_CLOCK_NONE) { intr_add_handler("clk", 0, (driver_filter_t *)clkintr, NULL, NULL, INTR_TYPE_CLK, NULL); i8254_intsrc = intr_lookup_source(0); @@ -556,7 +555,7 @@ cpu_initclocks() * kernel clocks, then setup the RTC to periodically interrupt to * drive statclock() and profclock(). */ - if (!using_lapic_timer) { + if (using_lapic_timer != LAPIC_CLOCK_ALL) { using_atrtc_timer = atrtc_setup_clock(); if (using_atrtc_timer) { /* Enable periodic interrupts from the RTC. */ @@ -580,7 +579,7 @@ void cpu_startprofclock(void) { - if (using_lapic_timer || !using_atrtc_timer) + if (using_lapic_timer == LAPIC_CLOCK_ALL || !using_atrtc_timer) return; atrtc_rate(RTCSA_PROF); psdiv = pscnt = psratio; @@ -590,7 +589,7 @@ void cpu_stopprofclock(void) { - if (using_lapic_timer || !using_atrtc_timer) + if (using_lapic_timer == LAPIC_CLOCK_ALL || !using_atrtc_timer) return; atrtc_rate(RTCSA_NOPROF); psdiv = pscnt = 1; Modified: stable/8/sys/i386/xen/exception.s ============================================================================== --- stable/8/sys/i386/xen/exception.s Mon Mar 29 15:29:06 2010 (r205835) +++ stable/8/sys/i386/xen/exception.s Mon Mar 29 15:39:17 2010 (r205836) @@ -295,10 +295,6 @@ ENTRY(fork_trampoline) SUPERALIGN_TEXT MCOUNT_LABEL(bintr) -#ifdef DEV_ATPIC -#include -#endif - #ifdef DEV_APIC .data .p2align 4 Modified: stable/8/sys/pc98/cbus/clock.c ============================================================================== --- stable/8/sys/pc98/cbus/clock.c Mon Mar 29 15:29:06 2010 (r205835) +++ stable/8/sys/pc98/cbus/clock.c Mon Mar 29 15:39:17 2010 (r205836) @@ -67,9 +67,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#ifdef DEV_APIC #include -#endif #include #include #include @@ -101,7 +99,7 @@ static u_int32_t i8254_lastcount; static u_int32_t i8254_offset; static int (*i8254_pending)(struct intsrc *); static int i8254_ticked; -static int using_lapic_timer; +static enum lapic_clock using_lapic_timer = LAPIC_CLOCK_NONE; /* Values for timerX_state: */ #define RELEASED 0 @@ -164,7 +162,8 @@ clkintr(struct trapframe *frame) clkintr_pending = 0; mtx_unlock_spin(&clock_lock); } - KASSERT(!using_lapic_timer, ("clk interrupt enabled with lapic timer")); + KASSERT(using_lapic_timer == LAPIC_CLOCK_NONE, + ("clk interrupt enabled with lapic timer")); #ifdef KDTRACE_HOOKS /* @@ -360,7 +359,7 @@ set_i8254_freq(u_int freq, int intr_freq i8254_timecounter.tc_frequency = freq; mtx_lock_spin(&clock_lock); i8254_freq = freq; - if (using_lapic_timer) + if (using_lapic_timer != LAPIC_CLOCK_NONE) new_i8254_real_max_count = 0x10000; else new_i8254_real_max_count = TIMER_DIV(intr_freq); @@ -443,7 +442,7 @@ cpu_initclocks() * that it can drive hardclock(). Otherwise, change the 8254 * timecounter to user a simpler algorithm. */ - if (!using_lapic_timer) { + if (using_lapic_timer == LAPIC_CLOCK_NONE) { intr_add_handler("clk", 0, (driver_filter_t *)clkintr, NULL, NULL, INTR_TYPE_CLK, NULL); i8254_intsrc = intr_lookup_source(0); Modified: stable/8/sys/pc98/conf/DEFAULTS ============================================================================== --- stable/8/sys/pc98/conf/DEFAULTS Mon Mar 29 15:29:06 2010 (r205835) +++ stable/8/sys/pc98/conf/DEFAULTS Mon Mar 29 15:39:17 2010 (r205836) @@ -24,3 +24,6 @@ device uart_ns8250 # Default partitioning schemes options GEOM_PART_BSD options GEOM_PART_PC98 + +# enable support for native hardware +device atpic From owner-svn-src-all@FreeBSD.ORG Mon Mar 29 15:59:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E59AF1065675; Mon, 29 Mar 2010 15:59:37 +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 D39A28FC1A; Mon, 29 Mar 2010 15:59: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 o2TFxbIt001876; Mon, 29 Mar 2010 15:59:37 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2TFxbE4001874; Mon, 29 Mar 2010 15:59:37 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201003291559.o2TFxbE4001874@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 29 Mar 2010 15:59: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: r205837 - stable/8/sys/compat/x86bios X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Mar 2010 15:59:38 -0000 Author: jkim Date: Mon Mar 29 15:59:37 2010 New Revision: 205837 URL: http://svn.freebsd.org/changeset/base/205837 Log: MFC: r205647 Fix stupid typos. Some VESA BIOSes directly call BIOS interrupt handlers within the VBE interrupt handler. Unfortunately it was causing real mode page faults because we were fetching instructions from bogus addresses. PR: kern/144654 Modified: stable/8/sys/compat/x86bios/x86bios.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/compat/x86bios/x86bios.c ============================================================================== --- stable/8/sys/compat/x86bios/x86bios.c Mon Mar 29 15:39:17 2010 (r205836) +++ stable/8/sys/compat/x86bios/x86bios.c Mon Mar 29 15:59:37 2010 (r205837) @@ -267,8 +267,8 @@ x86bios_emu_get_intr(struct x86emu *emu, sp[2] = htole16(emu->x86.R_FLG); iv = x86bios_get_intr(intno); - emu->x86.R_IP = iv & 0x000f; - emu->x86.R_CS = (iv >> 12) & 0xffff; + emu->x86.R_IP = iv & 0xffff; + emu->x86.R_CS = (iv >> 16) & 0xffff; emu->x86.R_FLG &= ~(F_IF | F_TF); } From owner-svn-src-all@FreeBSD.ORG Mon Mar 29 15:59:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 86FF5106580F; Mon, 29 Mar 2010 15:59:45 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 185EF8FC1E; Mon, 29 Mar 2010 15:59: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 o2TFxiN3001945; Mon, 29 Mar 2010 15:59:44 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2TFxii5001943; Mon, 29 Mar 2010 15:59:44 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201003291559.o2TFxii5001943@svn.freebsd.org> From: Warner Losh Date: Mon, 29 Mar 2010 15:59: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: r205838 - 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, 29 Mar 2010 15:59:46 -0000 Author: imp Date: Mon Mar 29 15:59:44 2010 New Revision: 205838 URL: http://svn.freebsd.org/changeset/base/205838 Log: Mark the vtoc.h structure as packed so that it is the right size and layout on arm. MFC after: 7 days Modified: head/sys/sys/vtoc.h Modified: head/sys/sys/vtoc.h ============================================================================== --- head/sys/sys/vtoc.h Mon Mar 29 15:59:37 2010 (r205837) +++ head/sys/sys/vtoc.h Mon Mar 29 15:59:44 2010 (r205838) @@ -97,7 +97,7 @@ struct vtoc8 { } map[VTOC8_NPARTS]; uint16_t magic; uint16_t cksum; -}; +} __packed; #ifdef CTASSERT CTASSERT(sizeof(struct vtoc8) == 512); From owner-svn-src-all@FreeBSD.ORG Mon Mar 29 17:09:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D2ED106566B; Mon, 29 Mar 2010 17:09:05 +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 3C6568FC08; Mon, 29 Mar 2010 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 o2TH95b1018083; Mon, 29 Mar 2010 17:09:05 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2TH95LL018081; Mon, 29 Mar 2010 17:09:05 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201003291709.o2TH95LL018081@svn.freebsd.org> From: Rui Paulo Date: Mon, 29 Mar 2010 17:09: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: r205841 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2010 17:09:05 -0000 Author: rpaulo Date: Mon Mar 29 17:09:04 2010 New Revision: 205841 URL: http://svn.freebsd.org/changeset/base/205841 Log: Add AR9285. Sponsored by: iXsystems, inc Modified: head/sys/conf/NOTES Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Mon Mar 29 16:22:09 2010 (r205840) +++ head/sys/conf/NOTES Mon Mar 29 17:09:04 2010 (r205841) @@ -2091,6 +2091,7 @@ device ath_hal # pci/cardbus chip supp options AH_SUPPORT_AR5416 # enable AR5416 tx/rx descriptors #device ath_ar9160 # AR9160 chips #device ath_ar9280 # AR9280 chips +#device ath_ar9285 # AR9285 chips device ath_rate_sample # SampleRate tx rate control for ath device bwi # Broadcom BCM430* BCM431* device bwn # Broadcom BCM43xx From owner-svn-src-all@FreeBSD.ORG Mon Mar 29 17:24:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F4A610656A8; Mon, 29 Mar 2010 17:24:23 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5D1858FC1F; Mon, 29 Mar 2010 17:24: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 o2THONmM021473; Mon, 29 Mar 2010 17:24:23 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2THONbX021471; Mon, 29 Mar 2010 17:24:23 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201003291724.o2THONbX021471@svn.freebsd.org> From: Warner Losh Date: Mon, 29 Mar 2010 17:24: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: r205842 - head/sys/dev/firewire X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Mar 2010 17:24:23 -0000 Author: imp Date: Mon Mar 29 17:24:23 2010 New Revision: 205842 URL: http://svn.freebsd.org/changeset/base/205842 Log: Cast a bus_size_t to a (size_t) to use %zd specifier. Not quite the right thing to do, but it is in compat code I don't want to sort out at the moment. Modified: head/sys/dev/firewire/sbp.c Modified: head/sys/dev/firewire/sbp.c ============================================================================== --- head/sys/dev/firewire/sbp.c Mon Mar 29 17:09:04 2010 (r205841) +++ head/sys/dev/firewire/sbp.c Mon Mar 29 17:24:23 2010 (r205842) @@ -2698,7 +2698,7 @@ SBP_DEBUG(0) #else "segment length(%zd) is less than 16." #endif - "(seg=%d/%d)\n", s->ds_len, i+1, seg); + "(seg=%d/%d)\n", (size_t)s->ds_len, i+1, seg); END_DEBUG if (s->ds_len > SBP_SEG_MAX) panic("ds_len > SBP_SEG_MAX, fix busdma code"); From owner-svn-src-all@FreeBSD.ORG Mon Mar 29 17:25:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 902CD106566C; Mon, 29 Mar 2010 17:25:06 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7FC708FC15; Mon, 29 Mar 2010 17:25: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 o2THP6pd021680; Mon, 29 Mar 2010 17:25:06 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2THP6a4021678; Mon, 29 Mar 2010 17:25:06 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201003291725.o2THP6a4021678@svn.freebsd.org> From: Warner Losh Date: Mon, 29 Mar 2010 17:25: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: r205843 - head/sys/dev/malo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Mar 2010 17:25:06 -0000 Author: imp Date: Mon Mar 29 17:25:06 2010 New Revision: 205843 URL: http://svn.freebsd.org/changeset/base/205843 Log: Cast bus_space_t to a intmax_t and use %j to print it instead of assuming it is size_t sized and using %z. Modified: head/sys/dev/malo/if_malo.c Modified: head/sys/dev/malo/if_malo.c ============================================================================== --- head/sys/dev/malo/if_malo.c Mon Mar 29 17:24:23 2010 (r205842) +++ head/sys/dev/malo/if_malo.c Mon Mar 29 17:25:06 2010 (r205843) @@ -168,8 +168,8 @@ malo_bar0_read4(struct malo_softc *sc, b static void malo_bar0_write4(struct malo_softc *sc, bus_size_t off, uint32_t val) { - DPRINTF(sc, MALO_DEBUG_FW, "%s: off 0x%zx val 0x%x\n", - __func__, off, val); + DPRINTF(sc, MALO_DEBUG_FW, "%s: off 0x%jx val 0x%x\n", + __func__, (intmax_t)off, val); bus_space_write_4(sc->malo_io0t, sc->malo_io0h, off, val); } From owner-svn-src-all@FreeBSD.ORG Mon Mar 29 17:26:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AAB981065676; Mon, 29 Mar 2010 17:26:24 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9A3ED8FC18; Mon, 29 Mar 2010 17:26: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 o2THQOHD022005; Mon, 29 Mar 2010 17:26:24 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2THQOvI022003; Mon, 29 Mar 2010 17:26:24 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201003291726.o2THQOvI022003@svn.freebsd.org> From: Warner Losh Date: Mon, 29 Mar 2010 17:26: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: r205844 - head/sys/dev/ubsec X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Mar 2010 17:26:24 -0000 Author: imp Date: Mon Mar 29 17:26:24 2010 New Revision: 205844 URL: http://svn.freebsd.org/changeset/base/205844 Log: Cast the bus_size_t to a intmax_t rather than assuming type-punning to a size_t. Switch from %z to %j. Modified: head/sys/dev/ubsec/ubsec.c Modified: head/sys/dev/ubsec/ubsec.c ============================================================================== --- head/sys/dev/ubsec/ubsec.c Mon Mar 29 17:25:06 2010 (r205843) +++ head/sys/dev/ubsec/ubsec.c Mon Mar 29 17:26:24 2010 (r205844) @@ -1886,8 +1886,8 @@ ubsec_dma_malloc( BUS_DMA_NOWAIT, &dma->dma_map); if (r != 0) { device_printf(sc->sc_dev, "ubsec_dma_malloc: " - "bus_dmammem_alloc failed; size %zu, error %u\n", - size, r); + "bus_dmammem_alloc failed; size %ju, error %u\n", + (intmax_t)size, r); goto fail_2; } From owner-svn-src-all@FreeBSD.ORG Mon Mar 29 17:31:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DDE11106566C; Mon, 29 Mar 2010 17:31:55 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B25808FC0C; Mon, 29 Mar 2010 17:31: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 o2THVtDO023214; Mon, 29 Mar 2010 17:31:55 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2THVtlV023212; Mon, 29 Mar 2010 17:31:55 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201003291731.o2THVtlV023212@svn.freebsd.org> From: Warner Losh Date: Mon, 29 Mar 2010 17:31:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205845 - head/sys/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: Mon, 29 Mar 2010 17:31:56 -0000 Author: imp Date: Mon Mar 29 17:31:55 2010 New Revision: 205845 URL: http://svn.freebsd.org/changeset/base/205845 Log: Make all the modules build on arm (modulo ipfilter, which I'm looking into): o Don't build vpo and syscons on mips or arm either o Add a section for mips and arm breakages, and document why. This is easier than opting in on all the other architectures: # no BUS_SPACE_UNSPECIFIED: bce, bwi, bwn, mfi, mpt, siba_bwn # No barrier instruction support (specific to this driver): sym # no uart_cpu_$MACHINE_ARCH: uart (mips has, by inspection, the same issues as arm, so ditto for it) MFC after: 7 days Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Mon Mar 29 17:26:24 2010 (r205844) +++ head/sys/modules/Makefile Mon Mar 29 17:31:55 2010 (r205845) @@ -34,15 +34,15 @@ SUBDIR= ${_3dfx} \ ata \ ath \ ${_auxio} \ - bce \ + ${_bce} \ bfe \ bge \ ${_bios} \ ${_bktr} \ ${_bm} \ bridgestp \ - bwi \ - bwn \ + ${_bwi} \ + ${_bwn} \ cam \ ${_canbepm} \ ${_canbus} \ @@ -66,7 +66,7 @@ SUBDIR= ${_3dfx} \ ${_cryptodev} \ ${_cs} \ ${_ctau} \ - cxgb \ + ${_cxgb} \ ${_cyclic} \ dc \ dcons \ @@ -175,13 +175,13 @@ SUBDIR= ${_3dfx} \ mcd \ md \ mem \ - mfi \ + ${_mfi} \ mii \ mlx \ ${_mly} \ mmc \ mmcsd \ - mpt \ + ${_mpt} \ mqueue \ msdosfs \ msdosfs_iconv \ @@ -251,7 +251,7 @@ SUBDIR= ${_3dfx} \ sdhci \ sem \ sf \ - siba_bwn \ + ${_siba_bwn} \ siis \ sis \ sk \ @@ -268,7 +268,7 @@ SUBDIR= ${_3dfx} \ stge \ ${_streams} \ ${_svr4} \ - sym \ + ${_sym} \ ${_syscons} \ sysvipc \ ti \ @@ -279,7 +279,7 @@ SUBDIR= ${_3dfx} \ twe \ tx \ txp \ - uart \ + ${_uart} \ ubsec \ udf \ udf_iconv \ @@ -312,11 +312,26 @@ SUBDIR= ${_3dfx} \ ${_zfs} \ zlib \ -.if ${MACHINE_ARCH} != "powerpc" +.if ${MACHINE_ARCH} != "powerpc" && ${MACHINE_ARCH} != "arm" && \ + ${MACHINE_ARCH} != "mips" _syscons= syscons _vpo= vpo .endif +.if ${MACHINE_ARCH} != "arm" && ${MACHINE_ARCH} != "mips" +# no BUS_SPACE_UNSPECIFIED +_bce= bce +_bwi= bwi +_bwn= bwn +_mfi= mfi +_mpt= mpt +_siba_bwn= siba_bwn +# No barrier instruction support (specific to this driver) +_sym= sym +# no uart_cpu_$MACHINE_ARCH +_uart= uart +.endif + .if ${MK_CRYPT} != "no" || defined(ALL_MODULES) .if exists(${.CURDIR}/../opencrypto) _crypto= crypto From owner-svn-src-all@FreeBSD.ORG Mon Mar 29 17:32:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 19A5F1065679; Mon, 29 Mar 2010 17:32:17 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay04.stack.nl [IPv6:2001:610:1108:5010::107]) by mx1.freebsd.org (Postfix) with ESMTP id D0BD38FC16; Mon, 29 Mar 2010 17:32:16 +0000 (UTC) Received: from turtle.stack.nl (turtle.stack.nl [IPv6:2001:610:1108:5010::132]) by mx1.stack.nl (Postfix) with ESMTP id E2D871DD770; Mon, 29 Mar 2010 19:32:14 +0200 (CEST) Received: by turtle.stack.nl (Postfix, from userid 1677) id D944B17204; Mon, 29 Mar 2010 19:32:14 +0200 (CEST) Date: Mon, 29 Mar 2010 19:32:14 +0200 From: Jilles Tjoelker To: Doug Barton Message-ID: <20100329173214.GA17249@stack.nl> References: <201003282019.o2SKJfPg033857@svn.freebsd.org> <4BAFBBFA.7020701@FreeBSD.org> <20100328210630.GA2086@stack.nl> <4BAFE1EE.9040908@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4BAFE1EE.9040908@FreeBSD.org> 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: r205806 - 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: Mon, 29 Mar 2010 17:32:17 -0000 On Sun, Mar 28, 2010 at 04:10:38PM -0700, Doug Barton wrote: > On 03/28/10 14:06, Jilles Tjoelker wrote: > > On Sun, Mar 28, 2010 at 01:28:42PM -0700, Doug Barton wrote: > >> Probably my fault for not saying something sooner, but there is a > >> problem with the code in head that sometimes causes it to loop > >> repeatedly even though pwait exits successfully. I am trying to track it > >> down, but since it only happens about once every 10 shutdowns it's been > >> difficult. > > There is a difference between the two methods in what is waited for > > exactly. pwait(1) will wait for the process to terminate; if it is > > applied to a zombie it will return immediately (printing the exit status > > if -v was given). On the other hand, kill(1) will continue to return > > success until the process has been waited for by its parent. > The process that I see this with most often is devd, does that fit the > model you're describing? Possibly. This would mainly happen because init has been busy, I think (or if the parent isn't init). > What are the implications of moving on after a > successful pwait even though there is still a zombie process? For shutdown/stop, nothing. For restart, there may be problems if a restarted daemon checks the validity of the pid in the pidfile using kill(). > > An obvious fix is to trust pwait if it returns successfully, e.g. like > > if pwait $_list 2>/dev/null; then break; else sleep 2; fi > It can't be break, the point of the loop is that wait_for_pids() takes a > list. We may be able to use continue however. pwait with a list waits until all of the processes have terminated. -- Jilles Tjoelker From owner-svn-src-all@FreeBSD.ORG Mon Mar 29 17:39:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 02FC1106564A; Mon, 29 Mar 2010 17:39:39 +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 E5BCE8FC15; Mon, 29 Mar 2010 17:39: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 o2THdcZ2024951; Mon, 29 Mar 2010 17:39:38 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2THdcOs024945; Mon, 29 Mar 2010 17:39:38 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201003291739.o2THdcOs024945@svn.freebsd.org> From: Edward Tomasz Napierala Date: Mon, 29 Mar 2010 17:39: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: r205846 - head/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: Mon, 29 Mar 2010 17:39:39 -0000 Author: trasz Date: Mon Mar 29 17:39:38 2010 New Revision: 205846 URL: http://svn.freebsd.org/changeset/base/205846 Log: Fix references. Modified: head/share/man/man9/ieee80211.9 head/share/man/man9/ieee80211_crypto.9 head/share/man/man9/ieee80211_node.9 head/share/man/man9/ieee80211_output.9 head/share/man/man9/ieee80211_scan.9 Modified: head/share/man/man9/ieee80211.9 ============================================================================== --- head/share/man/man9/ieee80211.9 Mon Mar 29 17:31:55 2010 (r205845) +++ head/share/man/man9/ieee80211.9 Mon Mar 29 17:39:38 2010 (r205846) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 4, 2009 +.Dd March 29, 2010 .Dt NET80211 9 .Os .Sh NAME @@ -551,11 +551,18 @@ Device supports Reduced Inter Frame Spac .Sh SEE ALSO .Xr ioctl 2 , .Xr ndis 4 , +.Xr ieee80211_amrr 9 , +.Xr ieee80211_beacon 9 , +.Xr ieee80211_bmiss 9 , +.Xr ieee80211_crypto 9 , +.Xr ieee80211_ddb 9 , .Xr ieee80211_input 9 , -.Xr ieee80211_input_all 9 , -.Xr ieee80211_scan_next 9 , -.Xr ieee80211_recv_action 9 , -.Xr ieee80211_send_action 9 , -.Xr ieee80211_radiotap_attach 9 , +.Xr ieee80211_node 9 , +.Xr ieee80211_output 9 , +.Xr ieee80211_proto 9 , +.Xr ieee80211_radiotap 9 , +.Xr ieee80211_regdomain 9 , +.Xr ieee80211_scan 9 , +.Xr ieee80211_vap 9 , .Xr ifnet 9 , .Xr malloc 9 Modified: head/share/man/man9/ieee80211_crypto.9 ============================================================================== --- head/share/man/man9/ieee80211_crypto.9 Mon Mar 29 17:31:55 2010 (r205845) +++ head/share/man/man9/ieee80211_crypto.9 Mon Mar 29 17:39:38 2010 (r205846) @@ -27,7 +27,7 @@ .\" $FreeBSD$ .\" $Id: ieee80211_crypto.9,v 1.3 2004/03/04 10:42:56 bruce Exp $ .\" -.Dd August 4, 2009 +.Dd March 29, 2010 .Dt IEEE80211_CRYPTO 9 .Os .Sh NAME @@ -253,6 +253,7 @@ and These calls also synchronize hardware key state update when receive traffic is active. .Sh SEE ALSO +.Xr ieee80211 9 , .Xr ioctl 2 , .Xr wlan_ccmp 4 , .Xr wlan_tkip 4 , Modified: head/share/man/man9/ieee80211_node.9 ============================================================================== --- head/share/man/man9/ieee80211_node.9 Mon Mar 29 17:31:55 2010 (r205845) +++ head/share/man/man9/ieee80211_node.9 Mon Mar 29 17:39:38 2010 (r205846) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 4, 2009 +.Dd March 29, 2010 .Dt IEEE80211_NODE 9 .Os .Sh NAME @@ -246,6 +246,6 @@ If the specified index is .Dv IEEE80211_KEYIX_NONE then a normal lookup is done without a table update. .Sh SEE ALSO -.Xr ddb 9 +.Xr ddb 9 , .Xr ieee80211 9 , .Xr ieee80211_proto 9 Modified: head/share/man/man9/ieee80211_output.9 ============================================================================== --- head/share/man/man9/ieee80211_output.9 Mon Mar 29 17:31:55 2010 (r205845) +++ head/share/man/man9/ieee80211_output.9 Mon Mar 29 17:39:38 2010 (r205846) @@ -27,7 +27,7 @@ .\" $FreeBSD$ .\" $Id: ieee80211_output.9,v 1.5 2004/03/04 12:31:18 bruce Exp $ .\" -.Dd August 4, 2009 +.Dd March 29, 2010 .Dt IEEE80211_OUTPUT 9 .Os .Sh NAME @@ -189,6 +189,6 @@ a device may not report if an ACK frame transmit requests in its hardware and only report status on whether the frame was successfully queued. .Sh SEE ALSO -.Xr bpf 4 +.Xr bpf 4 , .Xr ieee80211 9 , .Xr ifnet 9 Modified: head/share/man/man9/ieee80211_scan.9 ============================================================================== --- head/share/man/man9/ieee80211_scan.9 Mon Mar 29 17:31:55 2010 (r205845) +++ head/share/man/man9/ieee80211_scan.9 Mon Mar 29 17:39:38 2010 (r205846) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 20, 2010 +.Dd March 29, 2010 .Dt IEEE80211_SCAN 9 .Os .Sh NAME @@ -346,5 +346,5 @@ applications through the request. .Sh SEE ALSO .Xr ioctl 2 , -.Xr ieee80211 9 . +.Xr ieee80211 9 , .Xr ieee80211_proto 9 From owner-svn-src-all@FreeBSD.ORG Mon Mar 29 18:04:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D59001065672; Mon, 29 Mar 2010 18:04:06 +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 C2F0E8FC18; Mon, 29 Mar 2010 18:04: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 o2TI46Ah030436; Mon, 29 Mar 2010 18:04:06 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2TI46uN030433; Mon, 29 Mar 2010 18:04:06 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201003291804.o2TI46uN030433@svn.freebsd.org> From: Matt Jacob Date: Mon, 29 Mar 2010 18:04: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: r205847 - in head: sbin/geom/class/multipath sys/geom/multipath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Mar 2010 18:04:06 -0000 Author: mjacob Date: Mon Mar 29 18:04:06 2010 New Revision: 205847 URL: http://svn.freebsd.org/changeset/base/205847 Log: Change how multipath labels are created and managed. This makes it easier to support various storage boxes which really aren't active-active. We only write the label on the *first* provider. For all other providers we just "add" the disk. This also allows for an "add" verb. A usage implication is that you should specificy the currently active storage path as the first provider. Note that this does not add RDAC-like functionality, but better allows for autovolumefailover configurations (additional checkins elsewhere will support this). Sponsored by: Panasas MFC after: 1 month Modified: head/sbin/geom/class/multipath/geom_multipath.c head/sys/geom/multipath/g_multipath.c Modified: head/sbin/geom/class/multipath/geom_multipath.c ============================================================================== --- head/sbin/geom/class/multipath/geom_multipath.c Mon Mar 29 17:39:38 2010 (r205846) +++ head/sbin/geom/class/multipath/geom_multipath.c Mon Mar 29 18:04:06 2010 (r205847) @@ -48,6 +48,7 @@ uint32_t version = G_MULTIPATH_VERSION; static void mp_main(struct gctl_req *, unsigned int); static void mp_label(struct gctl_req *); static void mp_clear(struct gctl_req *); +static void mp_add(struct gctl_req *); struct g_command class_commands[] = { { @@ -55,6 +56,10 @@ struct g_command class_commands[] = { NULL, "[-v] name prov ..." }, { + "add", G_FLAG_VERBOSE | G_FLAG_LOADKLD, mp_main, G_NULL_OPTS, + NULL, "[-v] name prov ..." + }, + { "destroy", G_FLAG_VERBOSE, NULL, G_NULL_OPTS, NULL, "[-v] prov ..." }, @@ -85,6 +90,8 @@ mp_main(struct gctl_req *req, unsigned i } if (strcmp(name, "label") == 0) { mp_label(req); + } else if (strcmp(name, "add") == 0) { + mp_add(req); } else if (strcmp(name, "clear") == 0) { mp_clear(req); } else { @@ -101,7 +108,7 @@ mp_label(struct gctl_req *req) char *ptr; uuid_t uuid; uint32_t secsize = 0, ssize, status; - const char *name; + const char *name, *mpname; int error, i, nargs; nargs = gctl_get_int(req, "nargs"); @@ -156,8 +163,8 @@ mp_label(struct gctl_req *req) */ strlcpy(md.md_magic, G_MULTIPATH_MAGIC, sizeof(md.md_magic)); md.md_version = G_MULTIPATH_VERSION; - name = gctl_get_ascii(req, "arg0"); - strlcpy(md.md_name, name, sizeof(md.md_name)); + mpname = gctl_get_ascii(req, "arg0"); + strlcpy(md.md_name, mpname, sizeof(md.md_name)); md.md_size = disksiz; md.md_sectorsize = secsize; uuid_create(&uuid, &status); @@ -174,46 +181,44 @@ mp_label(struct gctl_req *req) free(ptr); /* - * Clear last sector first for each provider to spoil anything extant + * Clear metadata on initial provider first. */ - for (i = 1; i < nargs; i++) { - name = gctl_get_ascii(req, "arg%d", i); - error = g_metadata_clear(name, NULL); - if (error != 0) { - gctl_error(req, "cannot clear metadata on %s: %s.", - name, strerror(error)); - return; - } + name = gctl_get_ascii(req, "arg1"); + error = g_metadata_clear(name, NULL); + if (error != 0) { + gctl_error(req, "cannot clear metadata on %s: %s.", name, strerror(error)); + return; } + /* + * encode the metadata + */ multipath_metadata_encode(&md, sector); /* - * Ok, store metadata. + * Store metadata on the initial provider. */ - for (i = 1; i < nargs; i++) { - name = gctl_get_ascii(req, "arg%d", i); - error = g_metadata_store(name, sector, secsize); - if (error != 0) { - fprintf(stderr, "Can't store metadata on %s: %s.\n", - name, strerror(error)); - goto fail; - } + error = g_metadata_store(name, sector, secsize); + if (error != 0) { + gctl_error(req, "cannot store metadata on %s: %s.", name, strerror(error)); + return; } - return; -fail: /* - * Clear last sector first for each provider to spoil anything extant + * Now add the rest of the providers. */ - for (i = 1; i < nargs; i++) { - name = gctl_get_ascii(req, "arg%d", i); - error = g_metadata_clear(name, NULL); - if (error != 0) { - gctl_error(req, "cannot clear metadata on %s: %s.", - name, strerror(error)); + error = gctl_change_param(req, "verb", -1, "add"); + if (error) { + gctl_error(req, "unable to change verb to \"add\": %s.", strerror(error)); + return; + } + for (i = 2; i < nargs; i++) { + error = gctl_change_param(req, "arg1", -1, gctl_get_ascii(req, "arg%d", i)); + if (error) { + gctl_error(req, "unable to add %s to %s: %s.", gctl_get_ascii(req, "arg%d", i), mpname, strerror(error)); continue; } + mp_add(req); } } @@ -221,22 +226,23 @@ static void mp_clear(struct gctl_req *req) { const char *name; - int error, i, nargs; + int error; - nargs = gctl_get_int(req, "nargs"); - if (nargs < 1) { - gctl_error(req, "Too few arguments."); - return; + name = gctl_get_ascii(req, "arg1"); + error = g_metadata_clear(name, G_MULTIPATH_MAGIC); + if (error != 0) { + fprintf(stderr, "Can't clear metadata on %s: %s.\n", name, strerror(error)); + gctl_error(req, "Not fully done."); } +} - for (i = 0; i < nargs; i++) { - name = gctl_get_ascii(req, "arg%d", i); - error = g_metadata_clear(name, G_MULTIPATH_MAGIC); - if (error != 0) { - fprintf(stderr, "Can't clear metadata on %s: %s.\n", - name, strerror(error)); - gctl_error(req, "Not fully done."); - continue; - } - } +static void +mp_add(struct gctl_req *req) +{ + const char *errstr; + + errstr = gctl_issue(req); + if (errstr != NULL && errstr[0] != '\0') { + gctl_error(req, "%s", errstr); + } } Modified: head/sys/geom/multipath/g_multipath.c ============================================================================== --- head/sys/geom/multipath/g_multipath.c Mon Mar 29 17:39:38 2010 (r205846) +++ head/sys/geom/multipath/g_multipath.c Mon Mar 29 18:04:06 2010 (r205847) @@ -70,6 +70,7 @@ static int g_multipath_destroy(struct g_ static int g_multipath_destroy_geom(struct gctl_req *, struct g_class *, struct g_geom *); +static struct g_geom *g_multipath_find_geom(struct g_class *, const char *); static int g_multipath_rotate(struct g_geom *); static g_taste_t g_multipath_taste; @@ -602,14 +603,13 @@ g_multipath_taste(struct g_class *mp, st } static void -g_multipath_ctl_create(struct gctl_req *req, struct g_class *mp) +g_multipath_ctl_add(struct gctl_req *req, struct g_class *mp) { struct g_geom *gp; - struct g_provider *pp0, *pp1; - struct g_multipath_metadata md; - const char *name, *mpname, *uuid; + struct g_consumer *cp; + struct g_provider *pp, *pp0; + const char *name, *mpname; static const char devpf[6] = "/dev/"; - int *nargs, error; g_topology_assert(); @@ -618,14 +618,9 @@ g_multipath_ctl_create(struct gctl_req * gctl_error(req, "No 'arg0' argument"); return; } - - nargs = gctl_get_paraml(req, "nargs", sizeof(*nargs)); - if (nargs == NULL) { - gctl_error(req, "No 'nargs' argument"); - return; - } - if (*nargs != 4) { - gctl_error(req, "missing device or uuid arguments"); + gp = g_multipath_find_geom(mp, mpname); + if (gp == NULL) { + gctl_error(req, "Device %s is invalid", mpname); return; } @@ -636,78 +631,45 @@ g_multipath_ctl_create(struct gctl_req * } if (strncmp(name, devpf, 5) == 0) name += 5; - pp0 = g_provider_by_name(name); - if (pp0 == NULL) { - gctl_error(req, "Provider %s is invalid", name); - return; - } - - name = gctl_get_asciiparam(req, "arg2"); - if (name == NULL) { - gctl_error(req, "No 'arg2' argument"); - return; - } - if (strncmp(name, devpf, 5) == 0) - name += 5; - pp1 = g_provider_by_name(name); - if (pp1 == NULL) { + pp = g_provider_by_name(name); + if (pp == NULL) { gctl_error(req, "Provider %s is invalid", name); return; } - uuid = gctl_get_asciiparam(req, "arg3"); - if (uuid == NULL) { - gctl_error(req, "No uuid argument"); - return; - } - if (strlen(uuid) != 36) { - gctl_error(req, "Malformed uuid argument"); - return; - } - /* - * Check to make sure parameters from the two providers are the same + * Check to make sure parameters match, if we already have one. */ - if (pp0 == pp1) { - gctl_error(req, "providers %s and %s are the same", - pp0->name, pp1->name); - return; - } - if (pp0->mediasize != pp1->mediasize) { - gctl_error(req, "Provider %s is %jd; Provider %s is %jd", - pp0->name, (intmax_t) pp0->mediasize, - pp1->name, (intmax_t) pp1->mediasize); - return; + cp = LIST_FIRST(&gp->consumer); + if (cp) { + pp0 = cp->provider; + } else { + pp0 = NULL; } - if (pp0->sectorsize != pp1->sectorsize) { - gctl_error(req, "Provider %s has sectorsize %u; Provider %s " - "has sectorsize %u", pp0->name, pp0->sectorsize, - pp1->name, pp1->sectorsize); - return; + if (pp0) { + if (pp0 == pp) { + gctl_error(req, "providers %s and %s are the same", + pp0->name, pp->name); + return; + } + if (pp0->mediasize != pp->mediasize) { + gctl_error(req, "Provider %s is %jd; Provider %s is %jd", + pp0->name, (intmax_t) pp0->mediasize, + pp->name, (intmax_t) pp->mediasize); + return; + } + if (pp0->sectorsize != pp->sectorsize) { + gctl_error(req, "Provider %s has sectorsize %u; Provider %s " + "has sectorsize %u", pp0->name, pp0->sectorsize, + pp->name, pp->sectorsize); + return; + } } /* - * cons up enough of a metadata structure to use. + * Now add.... */ - memset(&md, 0, sizeof(md)); - md.md_size = pp0->mediasize; - md.md_sectorsize = pp0->sectorsize; - strlcpy(md.md_name, mpname, sizeof(md.md_name)); - strlcpy(md.md_uuid, uuid, sizeof(md.md_uuid)); - - gp = g_multipath_create(mp, &md); - if (gp == NULL) - return; - error = g_multipath_add_disk(gp, pp0); - if (error) { - g_multipath_destroy(gp); - return; - } - error = g_multipath_add_disk(gp, pp1); - if (error) { - g_multipath_destroy(gp); - return; - } + (void) g_multipath_add_disk(gp, pp); } static struct g_geom * @@ -815,8 +777,8 @@ g_multipath_config(struct gctl_req *req, gctl_error(req, "No 'version' argument"); } else if (*version != G_MULTIPATH_VERSION) { gctl_error(req, "Userland and kernel parts are out of sync"); - } else if (strcmp(verb, "create") == 0) { - g_multipath_ctl_create(req, mp); + } else if (strcmp(verb, "add") == 0) { + g_multipath_ctl_add(req, mp); } else if (strcmp(verb, "destroy") == 0) { g_multipath_ctl_destroy(req, mp); } else if (strcmp(verb, "rotate") == 0) { From owner-svn-src-all@FreeBSD.ORG Mon Mar 29 18:18:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ADAED106564A; Mon, 29 Mar 2010 18:18:41 +0000 (UTC) (envelope-from nparhar@gmail.com) Received: from mail-pw0-f54.google.com (mail-pw0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 6C3AC8FC19; Mon, 29 Mar 2010 18:18:41 +0000 (UTC) Received: by pwj4 with SMTP id 4so8693725pwj.13 for ; Mon, 29 Mar 2010 11:18:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:mail-followup-to:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=mrGIBlIhzNSyBlzuLGQ7xUK0IGBo3iJqdxp0z+ckXsY=; b=na9ezlPjLGdYyN9414M0ShhyrAgH3oEmc4+In2nelZLdNrqt/x4oIby1XpROfymMRb e3eh83A2JWzIB1643CTsD+UcW+z/PBnTzL6OF8PmLRLtBOvGgqzBHGrHXonDBkxLfaBu azvRYrAYjmE96Fiqdqj5W2BWftHiD7zkv/olM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; b=PhxmJuXb+HP1F/7iMjygl1cWeLPTsMhDK+FjEslnKObQoo9tT/Tj1RWQNDISFcnULR xs1sdXbC+7zM6x2otMKsmler7tYPN9lJw0pzG39kE7NeaB1Bd2kz9Hc+lmHixwUPQg/N jT1oscq8sUoX8p9ro2DwhYEa0U/dWf2Ov6k3I= Received: by 10.141.105.10 with SMTP id h10mr1298748rvm.45.1269886720462; Mon, 29 Mar 2010 11:18:40 -0700 (PDT) Received: from gypsy (c-67-161-10-127.hsd1.ca.comcast.net [67.161.10.127]) by mx.google.com with ESMTPS id r27sm1474878rvq.17.2010.03.29.11.18.37 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 29 Mar 2010 11:18:39 -0700 (PDT) Date: Mon, 29 Mar 2010 11:18:31 -0700 From: Navdeep Parhar To: Warner Losh Message-ID: <20100329181831.GA14698@gypsy> Mail-Followup-To: Warner Losh , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201003291731.o2THVtlV023212@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201003291731.o2THVtlV023212@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: r205845 - head/sys/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: Mon, 29 Mar 2010 18:18:41 -0000 This commit has unplugged cxgb from the build, even for the (!arm && !mips) case. Please fix. Regards, Navdeep On Mon, Mar 29, 2010 at 05:31:55PM +0000, Warner Losh wrote: > Author: imp > Date: Mon Mar 29 17:31:55 2010 > New Revision: 205845 > URL: http://svn.freebsd.org/changeset/base/205845 > > Log: > Make all the modules build on arm (modulo ipfilter, which I'm looking > into): > > o Don't build vpo and syscons on mips or arm either > o Add a section for mips and arm breakages, and document why. > This is easier than opting in on all the other architectures: > # no BUS_SPACE_UNSPECIFIED: bce, bwi, bwn, mfi, mpt, siba_bwn > # No barrier instruction support (specific to this driver): sym > # no uart_cpu_$MACHINE_ARCH: uart > > (mips has, by inspection, the same issues as arm, so ditto for it) > > MFC after: 7 days > > Modified: > head/sys/modules/Makefile > > Modified: head/sys/modules/Makefile > ============================================================================== > --- head/sys/modules/Makefile Mon Mar 29 17:26:24 2010 (r205844) > +++ head/sys/modules/Makefile Mon Mar 29 17:31:55 2010 (r205845) > @@ -34,15 +34,15 @@ SUBDIR= ${_3dfx} \ > ata \ > ath \ > ${_auxio} \ > - bce \ > + ${_bce} \ > bfe \ > bge \ > ${_bios} \ > ${_bktr} \ > ${_bm} \ > bridgestp \ > - bwi \ > - bwn \ > + ${_bwi} \ > + ${_bwn} \ > cam \ > ${_canbepm} \ > ${_canbus} \ > @@ -66,7 +66,7 @@ SUBDIR= ${_3dfx} \ > ${_cryptodev} \ > ${_cs} \ > ${_ctau} \ > - cxgb \ > + ${_cxgb} \ > ${_cyclic} \ > dc \ > dcons \ > @@ -175,13 +175,13 @@ SUBDIR= ${_3dfx} \ > mcd \ > md \ > mem \ > - mfi \ > + ${_mfi} \ > mii \ > mlx \ > ${_mly} \ > mmc \ > mmcsd \ > - mpt \ > + ${_mpt} \ > mqueue \ > msdosfs \ > msdosfs_iconv \ > @@ -251,7 +251,7 @@ SUBDIR= ${_3dfx} \ > sdhci \ > sem \ > sf \ > - siba_bwn \ > + ${_siba_bwn} \ > siis \ > sis \ > sk \ > @@ -268,7 +268,7 @@ SUBDIR= ${_3dfx} \ > stge \ > ${_streams} \ > ${_svr4} \ > - sym \ > + ${_sym} \ > ${_syscons} \ > sysvipc \ > ti \ > @@ -279,7 +279,7 @@ SUBDIR= ${_3dfx} \ > twe \ > tx \ > txp \ > - uart \ > + ${_uart} \ > ubsec \ > udf \ > udf_iconv \ > @@ -312,11 +312,26 @@ SUBDIR= ${_3dfx} \ > ${_zfs} \ > zlib \ > > -.if ${MACHINE_ARCH} != "powerpc" > +.if ${MACHINE_ARCH} != "powerpc" && ${MACHINE_ARCH} != "arm" && \ > + ${MACHINE_ARCH} != "mips" > _syscons= syscons > _vpo= vpo > .endif > > +.if ${MACHINE_ARCH} != "arm" && ${MACHINE_ARCH} != "mips" > +# no BUS_SPACE_UNSPECIFIED > +_bce= bce > +_bwi= bwi > +_bwn= bwn > +_mfi= mfi > +_mpt= mpt > +_siba_bwn= siba_bwn > +# No barrier instruction support (specific to this driver) > +_sym= sym > +# no uart_cpu_$MACHINE_ARCH > +_uart= uart > +.endif > + > .if ${MK_CRYPT} != "no" || defined(ALL_MODULES) > .if exists(${.CURDIR}/../opencrypto) > _crypto= crypto > _______________________________________________ > 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 Mon Mar 29 18:24:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B5F55106566B; Mon, 29 Mar 2010 18:24: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 A25438FC15; Mon, 29 Mar 2010 18:24:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2TIO8Ov035008; Mon, 29 Mar 2010 18:24:08 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2TIO8fF035001; Mon, 29 Mar 2010 18:24:08 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201003291824.o2TIO8fF035001@svn.freebsd.org> From: Xin LI Date: Mon, 29 Mar 2010 18:24: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: r205848 - in stable/8: . contrib/cpio gnu/usr.bin gnu/usr.bin/cpio share/man/man5 share/mk tools/build/mk tools/build/options usr.bin/cpio X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Mar 2010 18:24:08 -0000 Author: delphij Date: Mon Mar 29 18:24:08 2010 New Revision: 205848 URL: http://svn.freebsd.org/changeset/base/205848 Log: MFC r205702: Remove GNU cpio after fix of CVE-2010-0624. Note that this is actually a no-op for most users, as this GNU cpio was broken on -HEAD and 8-STABLE since last March until the recent fix. FreeBSD 8.0+ uses BSD cpio by default and the code is being actively maintained. Deleted: stable/8/contrib/cpio/ stable/8/gnu/usr.bin/cpio/ stable/8/tools/build/options/WITH_GNU_CPIO Modified: stable/8/ObsoleteFiles.inc (contents, props changed) stable/8/gnu/usr.bin/Makefile (contents, props changed) stable/8/share/man/man5/src.conf.5 stable/8/share/mk/bsd.own.mk stable/8/tools/build/mk/OptionalObsoleteFiles.inc stable/8/usr.bin/cpio/Makefile Directory Properties: stable/8/contrib/ (props changed) stable/8/share/man/man5/ (props changed) stable/8/share/mk/ (props changed) stable/8/tools/build/mk/ (props changed) stable/8/tools/build/options/ (props changed) stable/8/usr.bin/cpio/ (props changed) Modified: stable/8/ObsoleteFiles.inc ============================================================================== --- stable/8/ObsoleteFiles.inc Mon Mar 29 18:04:06 2010 (r205847) +++ stable/8/ObsoleteFiles.inc Mon Mar 29 18:24:08 2010 (r205848) @@ -14,6 +14,10 @@ # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last. # +# 20100329: gcpio removal +OLD_FILES+=usr/bin/gcpio +OLD_FILES+=usr/share/info/cpio.info.gz +OLD_FILES+=usr/share/man/man1/gcpio.1.gz # 20100301: vesa and dpms promoted to be i386/amd64 common OLD_FILES+=usr/include/machine/pc/vesa.h OLD_FILES+=usr/share/man/man4/i386/dpms.4.gz Modified: stable/8/gnu/usr.bin/Makefile ============================================================================== --- stable/8/gnu/usr.bin/Makefile Mon Mar 29 18:04:06 2010 (r205847) +++ stable/8/gnu/usr.bin/Makefile Mon Mar 29 18:24:08 2010 (r205848) @@ -5,7 +5,6 @@ SUBDIR= bc \ ${_binutils} \ ${_cc} \ - ${_cpio} \ ${_cvs} \ dc \ dialog \ @@ -34,10 +33,6 @@ _groff= groff .endif .endif -.if ${MK_GNU_CPIO} == "yes" -_cpio= cpio -.endif - .if ${MK_CVS} != "no" _cvs= cvs .endif Modified: stable/8/share/man/man5/src.conf.5 ============================================================================== --- stable/8/share/man/man5/src.conf.5 Mon Mar 29 18:04:06 2010 (r205847) +++ stable/8/share/man/man5/src.conf.5 Mon Mar 29 18:24:08 2010 (r205848) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: stable/8/tools/build/options/makeman 188848 2009-02-20 11:09:55Z mtm .\" $FreeBSD$ -.Dd January 30, 2010 +.Dd March 29, 2010 .Dt SRC.CONF 5 .Os .Sh NAME @@ -339,13 +339,6 @@ When set, it also enforces the following .It .Va WITHOUT_GNU_SUPPORT .El -.It Va WITH_GNU_CPIO -.\" from FreeBSD: stable/8/tools/build/options/WITH_GNU_CPIO 179813 2008-06-16 05:48:15Z dougb -Set to build GNU cpio as a part of the base system, -and symlink -.Pa /usr/bin/cpio -to this version. -(This will override the symlink to the BSD version.) .It Va WITHOUT_GNU_GREP .\" from FreeBSD: stable/8/tools/build/options/WITHOUT_GNU_GREP 179813 2008-06-16 05:48:15Z dougb Set to not build GNU grep as a part of the base system. Modified: stable/8/share/mk/bsd.own.mk ============================================================================== --- stable/8/share/mk/bsd.own.mk Mon Mar 29 18:04:06 2010 (r205847) +++ stable/8/share/mk/bsd.own.mk Mon Mar 29 18:24:08 2010 (r205848) @@ -407,7 +407,6 @@ MK_${var}:= yes BIND_LIBS \ BIND_SIGCHASE \ BIND_XML \ - GNU_CPIO \ HESIOD \ IDEA .if defined(WITH_${var}) && defined(WITHOUT_${var}) Modified: stable/8/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/8/tools/build/mk/OptionalObsoleteFiles.inc Mon Mar 29 18:04:06 2010 (r205847) +++ stable/8/tools/build/mk/OptionalObsoleteFiles.inc Mon Mar 29 18:24:08 2010 (r205848) @@ -394,12 +394,6 @@ OLD_FILES+=usr/share/man/man1/gcov.1.gz # to be filled in #.endif -.if ${MK_GNU_CPIO} == no -OLD_FILES+=usr/bin/gcpio -OLD_FILES+=usr/share/info/cpio.info.gz -OLD_FILES+=usr/share/man/man1/gcpio.1.gz -.endif - #.if ${MK_GPIB} == no # none #.endif Modified: stable/8/usr.bin/cpio/Makefile ============================================================================== --- stable/8/usr.bin/cpio/Makefile Mon Mar 29 18:04:06 2010 (r205847) +++ stable/8/usr.bin/cpio/Makefile Mon Mar 29 18:24:08 2010 (r205848) @@ -19,10 +19,8 @@ LDADD+= -larchive -lz -lbz2 -lmd LDADD+= -lcrypto .endif -.if ${MK_GNU_CPIO} != "yes" SYMLINKS=bsdcpio ${BINDIR}/cpio MLINKS= bsdcpio.1 cpio.1 -.endif .PHONY: check test From owner-svn-src-all@FreeBSD.ORG Mon Mar 29 18:47:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE2E1106566B; Mon, 29 Mar 2010 18:47:04 +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 9DF588FC08; Mon, 29 Mar 2010 18:47: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 o2TIl4I8040188; Mon, 29 Mar 2010 18:47:04 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2TIl4Pa040186; Mon, 29 Mar 2010 18:47:04 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201003291847.o2TIl4Pa040186@svn.freebsd.org> From: John Baldwin Date: Mon, 29 Mar 2010 18:47: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: r205850 - head/sys/amd64/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2010 18:47:04 -0000 Author: jhb Date: Mon Mar 29 18:47:04 2010 New Revision: 205850 URL: http://svn.freebsd.org/changeset/base/205850 Log: Cosmetic tweak to use a type suffix instead of a cast to force a constant to be a long. Modified: head/sys/amd64/include/reg.h Modified: head/sys/amd64/include/reg.h ============================================================================== --- head/sys/amd64/include/reg.h Mon Mar 29 18:35:55 2010 (r205849) +++ head/sys/amd64/include/reg.h Mon Mar 29 18:47:04 2010 (r205850) @@ -109,7 +109,7 @@ struct dbreg { #define DBREG_DR7_EXEC 0x00 /* break on execute */ #define DBREG_DR7_WRONLY 0x01 /* break on write */ #define DBREG_DR7_RDWR 0x03 /* break on read or write */ -#define DBREG_DR7_MASK(i) ((u_long)0xf << ((i) * 4 + 16) | 0x3 << (i) * 2) +#define DBREG_DR7_MASK(i) (0xful << ((i) * 4 + 16) | 0x3 << (i) * 2) #define DBREG_DR7_SET(i, len, access, enable) \ ((u_long)((len) << 2 | (access)) << ((i) * 4 + 16) | (enable) << (i) * 2) #define DBREG_DR7_GD 0x2000 From owner-svn-src-all@FreeBSD.ORG Mon Mar 29 19:13:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8696B1065675; Mon, 29 Mar 2010 19:13:35 +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 746A18FC15; Mon, 29 Mar 2010 19:13: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 o2TJDZAq046157; Mon, 29 Mar 2010 19:13:35 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2TJDZmU046152; Mon, 29 Mar 2010 19:13:35 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201003291913.o2TJDZmU046152@svn.freebsd.org> From: John Baldwin Date: Mon, 29 Mar 2010 19:13: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: r205851 - in head/sys: amd64/amd64 amd64/include 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: Mon, 29 Mar 2010 19:13:35 -0000 Author: jhb Date: Mon Mar 29 19:13:34 2010 New Revision: 205851 URL: http://svn.freebsd.org/changeset/base/205851 Log: Add a handler for the local APIC error interrupt. For now it just prints out the current value of the local APIC error register when the interrupt fires. MFC after: 1 week Modified: head/sys/amd64/amd64/apic_vector.S head/sys/amd64/amd64/local_apic.c head/sys/amd64/include/apicvar.h head/sys/i386/i386/apic_vector.s head/sys/i386/i386/local_apic.c head/sys/i386/include/apicvar.h Modified: head/sys/amd64/amd64/apic_vector.S ============================================================================== --- head/sys/amd64/amd64/apic_vector.S Mon Mar 29 18:47:04 2010 (r205850) +++ head/sys/amd64/amd64/apic_vector.S Mon Mar 29 19:13:34 2010 (r205851) @@ -104,6 +104,18 @@ IDTVEC(timerint) MEXITCOUNT jmp doreti +/* + * Local APIC error interrupt handler. + */ + .text + SUPERALIGN_TEXT +IDTVEC(errorint) + PUSH_FRAME + FAKE_MCOUNT(TF_RIP(%rsp)) + call lapic_handle_error + MEXITCOUNT + jmp doreti + #ifdef SMP /* * Global address space TLB shootdown. Modified: head/sys/amd64/amd64/local_apic.c ============================================================================== --- head/sys/amd64/amd64/local_apic.c Mon Mar 29 18:47:04 2010 (r205850) +++ head/sys/amd64/amd64/local_apic.c Mon Mar 29 19:13:34 2010 (r205851) @@ -115,14 +115,12 @@ struct lapic { int la_ioint_irqs[APIC_NUM_IOINTS + 1]; } static lapics[MAX_APIC_ID + 1]; -/* XXX: should thermal be an NMI? */ - /* Global defaults for local APIC LVT entries. */ static struct lvt lvts[LVT_MAX + 1] = { { 1, 1, 1, 1, APIC_LVT_DM_EXTINT, 0 }, /* LINT0: masked ExtINT */ { 1, 1, 0, 1, APIC_LVT_DM_NMI, 0 }, /* LINT1: NMI */ { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_TIMER_INT }, /* Timer */ - { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_ERROR_INT }, /* Error */ + { 1, 1, 0, 1, APIC_LVT_DM_FIXED, APIC_ERROR_INT }, /* Error */ { 1, 1, 1, 1, APIC_LVT_DM_NMI, 0 }, /* PMC */ { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_THERMAL_INT }, /* Thermal */ }; @@ -225,7 +223,10 @@ lapic_init(vm_paddr_t addr) /* Local APIC timer interrupt. */ setidt(APIC_TIMER_INT, IDTVEC(timerint), SDT_SYSIGT, SEL_KPL, 0); - /* XXX: error/thermal interrupts */ + /* Local APIC error interrupt. */ + setidt(APIC_ERROR_INT, IDTVEC(errorint), SDT_SYSIGT, SEL_KPL, 0); + + /* XXX: Thermal interrupt */ } /* @@ -278,7 +279,7 @@ lapic_dump(const char* str) lapic->id, lapic->version, lapic->ldr, lapic->dfr); printf(" lint0: 0x%08x lint1: 0x%08x TPR: 0x%08x SVR: 0x%08x\n", lapic->lvt_lint0, lapic->lvt_lint1, lapic->tpr, lapic->svr); - printf(" timer: 0x%08x therm: 0x%08x err: 0x%08x pcm: 0x%08x\n", + printf(" timer: 0x%08x therm: 0x%08x err: 0x%08x pmc: 0x%08x\n", lapic->lvt_timer, lapic->lvt_thermal, lapic->lvt_error, lapic->lvt_pcint); } @@ -326,7 +327,11 @@ lapic_setup(int boot) lapic_timer_enable_intr(); } - /* XXX: Error and thermal LVTs */ + /* Program error LVT and clear any existing errors. */ + lapic->lvt_error = lvt_mode(la, LVT_ERROR, lapic->lvt_error); + lapic->esr = 0; + + /* XXX: Thermal LVT */ intr_restore(eflags); } @@ -725,18 +730,6 @@ lapic_eoi(void) lapic->eoi = 0; } -/* - * Read the contents of the error status register. We have to write - * to the register first before reading from it. - */ -u_int -lapic_error(void) -{ - - lapic->esr = 0; - return (lapic->esr); -} - void lapic_handle_intr(int vector, struct trapframe *frame) { @@ -863,6 +856,24 @@ lapic_timer_enable_intr(void) lapic->lvt_timer = value; } +void +lapic_handle_error(void) +{ + u_int32_t esr; + + /* + * Read the contents of the error status register. Write to + * the register first before reading from it to force the APIC + * to update its value to indicate any errors that have + * occurred since the previous write to the register. + */ + lapic->esr = 0; + esr = lapic->esr; + + printf("CPU%d: local APIC error 0x%x\n", PCPU_GET(cpuid), esr); + lapic_eoi(); +} + u_int apic_cpuid(u_int apic_id) { Modified: head/sys/amd64/include/apicvar.h ============================================================================== --- head/sys/amd64/include/apicvar.h Mon Mar 29 18:47:04 2010 (r205850) +++ head/sys/amd64/include/apicvar.h Mon Mar 29 19:13:34 2010 (r205851) @@ -179,7 +179,8 @@ struct apic_enumerator { inthand_t IDTVEC(apic_isr1), IDTVEC(apic_isr2), IDTVEC(apic_isr3), IDTVEC(apic_isr4), IDTVEC(apic_isr5), IDTVEC(apic_isr6), - IDTVEC(apic_isr7), IDTVEC(spuriousint), IDTVEC(timerint); + IDTVEC(apic_isr7), IDTVEC(errorint), IDTVEC(spuriousint), + IDTVEC(timerint); extern vm_paddr_t lapic_paddr; extern int apic_cpuids[]; @@ -211,13 +212,13 @@ void lapic_disable_pmc(void); void lapic_dump(const char *str); int lapic_enable_pmc(void); void lapic_eoi(void); -u_int lapic_error(void); int lapic_id(void); void lapic_init(vm_paddr_t addr); int lapic_intr_pending(u_int vector); void lapic_ipi_raw(register_t icrlo, u_int dest); void lapic_ipi_vectored(u_int vector, int dest); int lapic_ipi_wait(int delay); +void lapic_handle_error(void); void lapic_handle_intr(int vector, struct trapframe *frame); void lapic_handle_timer(struct trapframe *frame); void lapic_reenable_pmc(void); Modified: head/sys/i386/i386/apic_vector.s ============================================================================== --- head/sys/i386/i386/apic_vector.s Mon Mar 29 18:47:04 2010 (r205850) +++ head/sys/i386/i386/apic_vector.s Mon Mar 29 19:13:34 2010 (r205851) @@ -110,6 +110,19 @@ IDTVEC(timerint) MEXITCOUNT jmp doreti +/* + * Local APIC error interrupt handler. + */ + .text + SUPERALIGN_TEXT +IDTVEC(errorint) + PUSH_FRAME + SET_KERNEL_SREGS + FAKE_MCOUNT(TF_EIP(%esp)) + call lapic_handle_error + MEXITCOUNT + jmp doreti + #ifdef SMP /* * Global address space TLB shootdown. Modified: head/sys/i386/i386/local_apic.c ============================================================================== --- head/sys/i386/i386/local_apic.c Mon Mar 29 18:47:04 2010 (r205850) +++ head/sys/i386/i386/local_apic.c Mon Mar 29 19:13:34 2010 (r205851) @@ -116,14 +116,12 @@ struct lapic { int la_ioint_irqs[APIC_NUM_IOINTS + 1]; } static lapics[MAX_APIC_ID + 1]; -/* XXX: should thermal be an NMI? */ - /* Global defaults for local APIC LVT entries. */ static struct lvt lvts[LVT_MAX + 1] = { { 1, 1, 1, 1, APIC_LVT_DM_EXTINT, 0 }, /* LINT0: masked ExtINT */ { 1, 1, 0, 1, APIC_LVT_DM_NMI, 0 }, /* LINT1: NMI */ { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_TIMER_INT }, /* Timer */ - { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_ERROR_INT }, /* Error */ + { 1, 1, 0, 1, APIC_LVT_DM_FIXED, APIC_ERROR_INT }, /* Error */ { 1, 1, 1, 1, APIC_LVT_DM_NMI, 0 }, /* PMC */ { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_THERMAL_INT }, /* Thermal */ }; @@ -228,7 +226,11 @@ lapic_init(vm_paddr_t addr) setidt(APIC_TIMER_INT, IDTVEC(timerint), SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); - /* XXX: error/thermal interrupts */ + /* Local APIC error interrupt. */ + setidt(APIC_ERROR_INT, IDTVEC(errorint), SDT_SYS386IGT, SEL_KPL, + GSEL(GCODE_SEL, SEL_KPL)); + + /* XXX: Thermal interrupt */ } /* @@ -281,7 +283,7 @@ lapic_dump(const char* str) lapic->id, lapic->version, lapic->ldr, lapic->dfr); printf(" lint0: 0x%08x lint1: 0x%08x TPR: 0x%08x SVR: 0x%08x\n", lapic->lvt_lint0, lapic->lvt_lint1, lapic->tpr, lapic->svr); - printf(" timer: 0x%08x therm: 0x%08x err: 0x%08x pcm: 0x%08x\n", + printf(" timer: 0x%08x therm: 0x%08x err: 0x%08x pmc: 0x%08x\n", lapic->lvt_timer, lapic->lvt_thermal, lapic->lvt_error, lapic->lvt_pcint); } @@ -329,7 +331,11 @@ lapic_setup(int boot) lapic_timer_enable_intr(); } - /* XXX: Error and thermal LVTs */ + /* Program error LVT and clear any existing errors. */ + lapic->lvt_error = lvt_mode(la, LVT_ERROR, lapic->lvt_error); + lapic->esr = 0; + + /* XXX: Thermal LVT */ intr_restore(eflags); } @@ -725,18 +731,6 @@ lapic_eoi(void) lapic->eoi = 0; } -/* - * Read the contents of the error status register. We have to write - * to the register first before reading from it. - */ -u_int -lapic_error(void) -{ - - lapic->esr = 0; - return (lapic->esr); -} - void lapic_handle_intr(int vector, struct trapframe *frame) { @@ -863,6 +857,24 @@ lapic_timer_enable_intr(void) lapic->lvt_timer = value; } +void +lapic_handle_error(void) +{ + u_int32_t esr; + + /* + * Read the contents of the error status register. Write to + * the register first before reading from it to force the APIC + * to update its value to indicate any errors that have + * occurred since the previous write to the register. + */ + lapic->esr = 0; + esr = lapic->esr; + + printf("CPU%d: local APIC error 0x%x\n", PCPU_GET(cpuid), esr); + lapic_eoi(); +} + u_int apic_cpuid(u_int apic_id) { Modified: head/sys/i386/include/apicvar.h ============================================================================== --- head/sys/i386/include/apicvar.h Mon Mar 29 18:47:04 2010 (r205850) +++ head/sys/i386/include/apicvar.h Mon Mar 29 19:13:34 2010 (r205851) @@ -208,7 +208,8 @@ struct apic_enumerator { inthand_t IDTVEC(apic_isr1), IDTVEC(apic_isr2), IDTVEC(apic_isr3), IDTVEC(apic_isr4), IDTVEC(apic_isr5), IDTVEC(apic_isr6), - IDTVEC(apic_isr7), IDTVEC(spuriousint), IDTVEC(timerint); + IDTVEC(apic_isr7), IDTVEC(errorint), IDTVEC(spuriousint), + IDTVEC(timerint); extern vm_paddr_t lapic_paddr; extern int apic_cpuids[]; @@ -240,13 +241,13 @@ void lapic_disable_pmc(void); void lapic_dump(const char *str); int lapic_enable_pmc(void); void lapic_eoi(void); -u_int lapic_error(void); int lapic_id(void); void lapic_init(vm_paddr_t addr); int lapic_intr_pending(u_int vector); void lapic_ipi_raw(register_t icrlo, u_int dest); void lapic_ipi_vectored(u_int vector, int dest); int lapic_ipi_wait(int delay); +void lapic_handle_error(void); void lapic_handle_intr(int vector, struct trapframe *frame); void lapic_handle_timer(struct trapframe *frame); void lapic_reenable_pmc(void); From owner-svn-src-all@FreeBSD.ORG Mon Mar 29 19:36:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11783106566B; Mon, 29 Mar 2010 19:36:38 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 011BE8FC16; Mon, 29 Mar 2010 19:36: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 o2TJabPK051296; Mon, 29 Mar 2010 19:36:37 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2TJabtY051294; Mon, 29 Mar 2010 19:36:37 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201003291936.o2TJabtY051294@svn.freebsd.org> From: Warner Losh Date: Mon, 29 Mar 2010 19:36: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: r205852 - head/sys/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: Mon, 29 Mar 2010 19:36:38 -0000 Author: imp Date: Mon Mar 29 19:36:37 2010 New Revision: 205852 URL: http://svn.freebsd.org/changeset/base/205852 Log: Arm defines intr_disable() as a macro, which causes problems for cxgb. Rather than remove it for all architectures (which was a botch in r205845), remove it only for arm and mips until that can be sorted out. Pointy Hat: imp Submitted by: Navdeep Parhar MFC after: 7 days Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Mon Mar 29 19:13:34 2010 (r205851) +++ head/sys/modules/Makefile Mon Mar 29 19:36:37 2010 (r205852) @@ -330,6 +330,8 @@ _siba_bwn= siba_bwn _sym= sym # no uart_cpu_$MACHINE_ARCH _uart= uart +# intr_disable() is a macro, causes problems +_cxgb= cxgb .endif .if ${MK_CRYPT} != "no" || defined(ALL_MODULES) From owner-svn-src-all@FreeBSD.ORG Mon Mar 29 19:40:35 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D94FE1065672; Mon, 29 Mar 2010 19:40:35 +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 820828FC22; Mon, 29 Mar 2010 19:40:35 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o2TJVwsu068470; Mon, 29 Mar 2010 13:31:59 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 29 Mar 2010 13:32:03 -0600 (MDT) Message-Id: <20100329.133203.951491966289476190.imp@bsdimp.com> To: nparhar@gmail.com From: "M. Warner Losh" In-Reply-To: <20100329181831.GA14698@gypsy> References: <201003291731.o2THVtlV023212@svn.freebsd.org> <20100329181831.GA14698@gypsy> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r205845 - head/sys/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: Mon, 29 Mar 2010 19:40:35 -0000 In message: <20100329181831.GA14698@gypsy> Navdeep Parhar writes: : This commit has unplugged cxgb from the build, even for the : (!arm && !mips) case. Please fix. Doh! Will do ASAP. Thanks! Warner From owner-svn-src-all@FreeBSD.ORG Mon Mar 29 19:41:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4ED96106566B; Mon, 29 Mar 2010 19:41:45 +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 208218FC1A; Mon, 29 Mar 2010 19:41:45 +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 B30D946B37; Mon, 29 Mar 2010 15:41:44 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 00E238A01F; Mon, 29 Mar 2010 15:41:44 -0400 (EDT) From: John Baldwin To: src-committers@freebsd.org Date: Mon, 29 Mar 2010 15:41:14 -0400 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: <201003291913.o2TJDZmU046152@svn.freebsd.org> In-Reply-To: <201003291913.o2TJDZmU046152@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201003291541.14485.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 29 Mar 2010 15:41:44 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.7 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r205851 - in head/sys: amd64/amd64 amd64/include 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: Mon, 29 Mar 2010 19:41:45 -0000 On Monday 29 March 2010 3:13:34 pm John Baldwin wrote: > Author: jhb > Date: Mon Mar 29 19:13:34 2010 > New Revision: 205851 > URL: http://svn.freebsd.org/changeset/base/205851 > > Log: > Add a handler for the local APIC error interrupt. For now it just prints > out the current value of the local APIC error register when the interrupt > fires. In practice I don't expect this to ever fire. Doing so probably indicates a bug. It is nice to have an extra warning fire to help detect future bugs though. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Mar 29 19:52:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 387FE1065677; Mon, 29 Mar 2010 19:52:37 +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 2798D8FC0C; Mon, 29 Mar 2010 19: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 o2TJqbOE054803; Mon, 29 Mar 2010 19:52:37 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2TJqbTp054801; Mon, 29 Mar 2010 19:52:37 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201003291952.o2TJqbTp054801@svn.freebsd.org> From: Edward Tomasz Napierala Date: Mon, 29 Mar 2010 19: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: r205853 - head/usr.bin/calendar/calendars X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2010 19:52:37 -0000 Author: trasz Date: Mon Mar 29 19:52:36 2010 New Revision: 205853 URL: http://svn.freebsd.org/changeset/base/205853 Log: Add myself. MFC after: 2 weeks Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Mon Mar 29 19:36:37 2010 (r205852) +++ head/usr.bin/calendar/calendars/calendar.freebsd Mon Mar 29 19:52:36 2010 (r205853) @@ -107,6 +107,7 @@ 04/03 Tong Liu born in Beijing, People's Republic of China, 1981 04/03 Gabor Pali born in Kunhegyes, Hungary, 1982 04/05 Stacey Son born in Burley, Idaho, United States. 1967 +04/07 Edward Tomasz Napierala born in Wolsztyn, Poland, 1981 04/08 Jordan K. Hubbard born in Honolulu, Hawaii, United States, 1963 04/09 Ceri Davies born in Haverfordwest, Pembrokeshire, United Kingdom, 1976 04/11 Bruce A. Mah born in Fresno, California, United States, 1969 From owner-svn-src-all@FreeBSD.ORG Mon Mar 29 20:04:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2C45B1065674; Mon, 29 Mar 2010 20:04:02 +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 1B65A8FC1D; Mon, 29 Mar 2010 20:04: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 o2TK41Ln057413; Mon, 29 Mar 2010 20:04:01 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2TK41WO057411; Mon, 29 Mar 2010 20:04:01 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201003292004.o2TK41WO057411@svn.freebsd.org> From: Andriy Gapon Date: Mon, 29 Mar 2010 20:04: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: r205854 - head/usr.bin/calendar/calendars X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2010 20:04:02 -0000 Author: avg Date: Mon Mar 29 20:04:01 2010 New Revision: 205854 URL: http://svn.freebsd.org/changeset/base/205854 Log: calendar.freebsd: add my entry MFC after: 4 days Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Mon Mar 29 19:52:36 2010 (r205853) +++ head/usr.bin/calendar/calendars/calendar.freebsd Mon Mar 29 20:04:01 2010 (r205854) @@ -207,6 +207,7 @@ 07/23 Sergey A. Osokin born in Krasnogorsky, Stepnogorsk, Akmolinskaya region, Kazakhstan, 1972 07/24 Alexander Nedotsukov born in Ulyanovsk, Russian Federation, 1974 07/24 Alberto Villa born in Vercelli, Italy, 1987 +07/27 Andriy Gapon born in Kyrykivka, Sumy region, Ukraine, 1976 07/28 Jim Mock born in Bethlehem, Pennsylvania, United States, 1974 07/28 Tom Hukins born in Manchester, United Kingdom, 1976 07/29 Dirk Meyer born in Kassel, Hessen, Germany, 1965 From owner-svn-src-all@FreeBSD.ORG Mon Mar 29 20:12:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B0101065740; Mon, 29 Mar 2010 20:12:44 +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 8A2478FC1D; Mon, 29 Mar 2010 20:12: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 o2TKCi5P059385; Mon, 29 Mar 2010 20:12:44 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2TKCiEa059383; Mon, 29 Mar 2010 20:12:44 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201003292012.o2TKCiEa059383@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 29 Mar 2010 20:12: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: r205855 - head/usr.sbin/vidcontrol X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Mar 2010 20:12:44 -0000 Author: jkim Date: Mon Mar 29 20:12:44 2010 New Revision: 205855 URL: http://svn.freebsd.org/changeset/base/205855 Log: Print memory model of the video mode except for planar memory model. 'P', 'D', 'C', 'H', 'V' mean packed pixel, direct color, CGA, Hercules, VGA X memory models respectively where they have fixed number of planes. Modified: head/usr.sbin/vidcontrol/vidcontrol.c Modified: head/usr.sbin/vidcontrol/vidcontrol.c ============================================================================== --- head/usr.sbin/vidcontrol/vidcontrol.c Mon Mar 29 20:04:01 2010 (r205854) +++ head/usr.sbin/vidcontrol/vidcontrol.c Mon Mar 29 20:12:44 2010 (r205855) @@ -950,10 +950,11 @@ show_adapter_info(void) static void show_mode_info(void) { - struct video_info _info; char buf[80]; - int mode; + struct video_info _info; int c; + int mm; + int mode; printf(" mode# flags type size " "font window linear buffer\n"); @@ -972,9 +973,35 @@ show_mode_info(void) if (_info.vi_flags & V_INFO_GRAPHICS) { c = 'G'; - snprintf(buf, sizeof(buf), "%dx%dx%d %d", - _info.vi_width, _info.vi_height, - _info.vi_depth, _info.vi_planes); + if (_info.vi_mem_model == V_INFO_MM_PLANAR) + snprintf(buf, sizeof(buf), "%dx%dx%d %d", + _info.vi_width, _info.vi_height, + _info.vi_depth, _info.vi_planes); + else { + switch (_info.vi_mem_model) { + case V_INFO_MM_PACKED: + mm = 'P'; + break; + case V_INFO_MM_DIRECT: + mm = 'D'; + break; + case V_INFO_MM_CGA: + mm = 'C'; + break; + case V_INFO_MM_HGC: + mm = 'H'; + break; + case V_INFO_MM_VGAX: + mm = 'V'; + break; + default: + mm = ' '; + break; + } + snprintf(buf, sizeof(buf), "%dx%dx%d %c", + _info.vi_width, _info.vi_height, + _info.vi_depth, mm); + } } else { c = 'T'; From owner-svn-src-all@FreeBSD.ORG Mon Mar 29 20:15:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD9DB1065672; Mon, 29 Mar 2010 20:15: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 B95538FC20; Mon, 29 Mar 2010 20:15: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 o2TKFWOW060053; Mon, 29 Mar 2010 20:15:32 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2TKFWjB060042; Mon, 29 Mar 2010 20:15:32 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201003292015.o2TKFWjB060042@svn.freebsd.org> From: Doug Barton Date: Mon, 29 Mar 2010 20:15:32 +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: r205856 - in vendor/bind9/dist-9.4: . bin/named doc/arm doc/draft lib/dns lib/dns/include/dns X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Mar 2010 20:15:32 -0000 Author: dougb Date: Mon Mar 29 20:15:32 2010 New Revision: 205856 URL: http://svn.freebsd.org/changeset/base/205856 Log: Vendor import of BIND 9.4-ESV-R1 Added: vendor/bind9/dist-9.4/doc/draft/draft-ietf-6man-text-addr-representation-07.txt (contents, props changed) vendor/bind9/dist-9.4/doc/draft/draft-ietf-behave-dns64-06.txt (contents, props changed) vendor/bind9/dist-9.4/doc/draft/draft-ietf-dnsext-axfr-clarify-13.txt (contents, props changed) vendor/bind9/dist-9.4/doc/draft/draft-ietf-dnsext-dnssec-gost-06.txt (contents, props changed) vendor/bind9/dist-9.4/doc/draft/draft-ietf-dnsext-rfc3597-bis-02.txt (contents, props changed) vendor/bind9/dist-9.4/doc/draft/draft-ietf-dnsop-dnssec-trust-history-01.txt (contents, props changed) vendor/bind9/dist-9.4/doc/draft/draft-kerr-ixfr-only-01.txt (contents, props changed) Deleted: vendor/bind9/dist-9.4/doc/draft/draft-ietf-6man-text-addr-representation-01.txt vendor/bind9/dist-9.4/doc/draft/draft-ietf-behave-dns64-01.txt vendor/bind9/dist-9.4/doc/draft/draft-ietf-dnsext-axfr-clarify-12.txt vendor/bind9/dist-9.4/doc/draft/draft-ietf-dnsext-dnssec-gost-05.txt vendor/bind9/dist-9.4/doc/draft/draft-ietf-dnsext-rfc3597-bis-00.txt Modified: vendor/bind9/dist-9.4/CHANGES vendor/bind9/dist-9.4/bin/named/server.c vendor/bind9/dist-9.4/doc/arm/Bv9ARM-book.xml vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch01.html vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch02.html vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch03.html vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch04.html vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch05.html vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch06.html vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch07.html vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch08.html vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch09.html vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch10.html vendor/bind9/dist-9.4/doc/arm/Bv9ARM.html vendor/bind9/dist-9.4/doc/arm/Bv9ARM.pdf vendor/bind9/dist-9.4/doc/arm/man.dig.html vendor/bind9/dist-9.4/doc/arm/man.dnssec-keygen.html vendor/bind9/dist-9.4/doc/arm/man.dnssec-signzone.html vendor/bind9/dist-9.4/doc/arm/man.host.html vendor/bind9/dist-9.4/doc/arm/man.named-checkconf.html vendor/bind9/dist-9.4/doc/arm/man.named-checkzone.html vendor/bind9/dist-9.4/doc/arm/man.named.html vendor/bind9/dist-9.4/doc/arm/man.rndc-confgen.html vendor/bind9/dist-9.4/doc/arm/man.rndc.conf.html vendor/bind9/dist-9.4/doc/arm/man.rndc.html vendor/bind9/dist-9.4/lib/dns/include/dns/rdataset.h vendor/bind9/dist-9.4/lib/dns/include/dns/resolver.h vendor/bind9/dist-9.4/lib/dns/include/dns/result.h vendor/bind9/dist-9.4/lib/dns/include/dns/validator.h vendor/bind9/dist-9.4/lib/dns/ncache.c vendor/bind9/dist-9.4/lib/dns/rbtdb.c vendor/bind9/dist-9.4/lib/dns/rdatalist.c vendor/bind9/dist-9.4/lib/dns/rdataset.c vendor/bind9/dist-9.4/lib/dns/rdataslab.c vendor/bind9/dist-9.4/lib/dns/resolver.c vendor/bind9/dist-9.4/lib/dns/result.c vendor/bind9/dist-9.4/lib/dns/sdb.c vendor/bind9/dist-9.4/lib/dns/sdlz.c vendor/bind9/dist-9.4/lib/dns/validator.c vendor/bind9/dist-9.4/lib/dns/view.c vendor/bind9/dist-9.4/version Modified: vendor/bind9/dist-9.4/CHANGES ============================================================================== --- vendor/bind9/dist-9.4/CHANGES Mon Mar 29 20:12:44 2010 (r205855) +++ vendor/bind9/dist-9.4/CHANGES Mon Mar 29 20:15:32 2010 (r205856) @@ -1,3 +1,7 @@ + --- 9.4-ESV-R1 released --- + +2852. [bug] Handle broken DNSSEC trust chains better. [RT #15619] + --- 9.4-ESV released --- 2831. [security] Do not attempt to validate or cache Modified: vendor/bind9/dist-9.4/bin/named/server.c ============================================================================== --- vendor/bind9/dist-9.4/bin/named/server.c Mon Mar 29 20:12:44 2010 (r205855) +++ vendor/bind9/dist-9.4/bin/named/server.c Mon Mar 29 20:15:32 2010 (r205856) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2010 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1999-2003 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: server.c,v 1.419.18.75 2009/07/11 04:30:49 marka Exp $ */ +/* $Id: server.c,v 1.419.18.77 2010/02/26 23:46:32 tbox Exp $ */ /*! \file */ @@ -4563,6 +4563,8 @@ dumpdone(void *arg, isc_result_t result) } if (dctx->cache != NULL) { dns_adb_dump(dctx->view->view->adb, dctx->fp); + dns_resolver_printbadcache(dctx->view->view->resolver, + dctx->fp); dns_db_detach(&dctx->cache); } if (dctx->dumpzones) { Modified: vendor/bind9/dist-9.4/doc/arm/Bv9ARM-book.xml ============================================================================== --- vendor/bind9/dist-9.4/doc/arm/Bv9ARM-book.xml Mon Mar 29 20:12:44 2010 (r205855) +++ vendor/bind9/dist-9.4/doc/arm/Bv9ARM-book.xml Mon Mar 29 20:15:32 2010 (r205856) @@ -2,7 +2,7 @@ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" []> - + BIND 9 Administrator Reference Manual @@ -30,6 +30,7 @@ 2007 2008 2009 + 2010 Internet Systems Consortium, Inc. ("ISC") @@ -7422,6 +7423,13 @@ avoid-v6-udp-ports { 40000; range 50000 1800 (30 minutes). + + Lame-ttl also controls the amount of time DNSSEC + validation failures are cached. There is a minimum + of 30 seconds applied to bad cache entries if the + lame-ttl is set to less than 30 seconds. + + Modified: vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch01.html ============================================================================== --- vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch01.html Mon Mar 29 20:12:44 2010 (r205855) +++ vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch01.html Mon Mar 29 20:15:32 2010 (r205856) @@ -1,5 +1,5 @@ - + @@ -45,17 +45,17 @@ @@ -71,7 +71,7 @@

-Scope of Document

+Scope of Document

The Berkeley Internet Name Domain (BIND) implements a @@ -87,7 +87,7 @@

-Organization of This Document

+Organization of This Document

In this document, Chapter 1 introduces the basic DNS and BIND concepts. Chapter 2 @@ -116,7 +116,7 @@

-Conventions Used in This Document

+Conventions Used in This Document

In this document, we use the following general typographic conventions: @@ -243,7 +243,7 @@

-The Domain Name System (DNS)

+The Domain Name System (DNS)

The purpose of this document is to explain the installation and upkeep of the BIND (Berkeley Internet @@ -253,7 +253,7 @@

-DNS Fundamentals

+DNS Fundamentals

The Domain Name System (DNS) is a hierarchical, distributed database. It stores information for mapping Internet host names to @@ -273,7 +273,7 @@

-Domains and Domain Names

+Domains and Domain Names

The data stored in the DNS is identified by domain names that are organized as a tree according to organizational or administrative boundaries. Each node of the tree, @@ -319,7 +319,7 @@

-Zones

+Zones

To properly operate a name server, it is important to understand the difference between a zone @@ -372,7 +372,7 @@

-Authoritative Name Servers

+Authoritative Name Servers

Each zone is served by at least one authoritative name server, @@ -389,7 +389,7 @@

-The Primary Master

+The Primary Master

The authoritative server where the master copy of the zone data is maintained is called the @@ -409,7 +409,7 @@

-Slave Servers

+Slave Servers

The other authoritative servers, the slave servers (also known as secondary servers) @@ -425,7 +425,7 @@

-Stealth Servers

+Stealth Servers

Usually all of the zone's authoritative servers are listed in NS records in the parent zone. These NS records constitute @@ -460,7 +460,7 @@

-Caching Name Servers

+Caching Name Servers

The resolver libraries provided by most operating systems are stub resolvers, meaning that they are not @@ -487,7 +487,7 @@

-Forwarding

+Forwarding

Even a caching name server does not necessarily perform the complete recursive lookup itself. Instead, it can @@ -514,7 +514,7 @@

-Name Servers in Multiple Roles

+Name Servers in Multiple Roles

The BIND name server can simultaneously act as Modified: vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch02.html ============================================================================== --- vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch02.html Mon Mar 29 20:12:44 2010 (r205855) +++ vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch02.html Mon Mar 29 20:15:32 2010 (r205856) @@ -1,5 +1,5 @@ - + @@ -45,16 +45,16 @@

-Hardware requirements

+Hardware requirements

DNS hardware requirements have traditionally been quite modest. @@ -73,7 +73,7 @@

-CPU Requirements

+CPU Requirements

CPU requirements for BIND 9 range from i486-class machines @@ -84,7 +84,7 @@

-Memory Requirements

+Memory Requirements

The memory of the server has to be large enough to fit the cache and zones loaded off disk. The max-cache-size @@ -107,7 +107,7 @@

-Name Server Intensive Environment Issues

+Name Server Intensive Environment Issues

For name server intensive environments, there are two alternative configurations that may be used. The first is where clients and @@ -124,7 +124,7 @@

-Supported Operating Systems

+Supported Operating Systems

ISC BIND 9 compiles and runs on a large number of Unix-like operating systems, and on some versions of Modified: vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch03.html ============================================================================== --- vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch03.html Mon Mar 29 20:12:44 2010 (r205855) +++ vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch03.html Mon Mar 29 20:15:32 2010 (r205856) @@ -1,5 +1,5 @@ - + @@ -47,14 +47,14 @@

Sample Configurations
-
A Caching-only Name Server
-
An Authoritative-only Name Server
+
A Caching-only Name Server
+
An Authoritative-only Name Server
-
Load Balancing
-
Name Server Operations
+
Load Balancing
+
Name Server Operations
-
Tools for Use With the Name Server Daemon
-
Signals
+
Tools for Use With the Name Server Daemon
+
Signals
@@ -68,7 +68,7 @@ Sample Configurations

-A Caching-only Name Server

+A Caching-only Name Server

The following sample configuration is appropriate for a caching-only name server for use by clients internal to a corporation. All @@ -95,7 +95,7 @@ zone "0.0.127.in-addr.arpa" {

-An Authoritative-only Name Server

+An Authoritative-only Name Server

This sample configuration is for an authoritative-only server that is the master server for "example.com" @@ -137,7 +137,7 @@ zone "eng.example.com" {

-Load Balancing

+Load Balancing

A primitive form of load balancing can be achieved in the DNS by using multiple records @@ -280,10 +280,10 @@ zone "eng.example.com" {

-Name Server Operations

+Name Server Operations

-Tools for Use With the Name Server Daemon

+Tools for Use With the Name Server Daemon

This section describes several indispensable diagnostic, administrative and monitoring tools available to the system @@ -739,7 +739,7 @@ controls {

-Signals

+Signals

Certain UNIX signals cause the name server to take specific actions, as described in the following table. These signals can Modified: vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch04.html ============================================================================== --- vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch04.html Mon Mar 29 20:12:44 2010 (r205855) +++ vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch04.html Mon Mar 29 20:15:32 2010 (r205856) @@ -1,5 +1,5 @@ - + @@ -49,29 +49,29 @@

Dynamic Update
The journal file
Incremental Zone Transfers (IXFR)
-
Split DNS
-
Example split DNS setup
+
Split DNS
+
Example split DNS setup
TSIG
-
Generate Shared Keys for Each Pair of Hosts
-
Copying the Shared Secret to Both Machines
-
Informing the Servers of the Key's Existence
-
Instructing the Server to Use the Key
-
TSIG Key Based Access Control
-
Errors
+
Generate Shared Keys for Each Pair of Hosts
+
Copying the Shared Secret to Both Machines
+
Informing the Servers of the Key's Existence
+
Instructing the Server to Use the Key
+
TSIG Key Based Access Control
+
Errors
-
TKEY
-
SIG(0)
+
TKEY
+
SIG(0)
DNSSEC
-
Generating Keys
-
Signing the Zone
-
Configuring Servers
+
Generating Keys
+
Signing the Zone
+
Configuring Servers
-
IPv6 Support in BIND 9
+
IPv6 Support in BIND 9
-
Address Lookups Using AAAA Records
-
Address to Name Lookups Using Nibble Format
+
Address Lookups Using AAAA Records
+
Address to Name Lookups Using Nibble Format
@@ -205,7 +205,7 @@

-Split DNS

+Split DNS

Setting up different views, or visibility, of the DNS space to internal and external resolvers is usually referred to as a @@ -235,7 +235,7 @@

-Example split DNS setup

+Example split DNS setup

Let's say a company named Example, Inc. (example.com) @@ -481,7 +481,7 @@ nameserver 172.16.72.4

-Generate Shared Keys for Each Pair of Hosts

+Generate Shared Keys for Each Pair of Hosts

A shared secret is generated to be shared between host1 and host2. An arbitrary key name is chosen: "host1-host2.". The key name must @@ -489,7 +489,7 @@ nameserver 172.16.72.4

-Automatic Generation

+Automatic Generation

The following command will generate a 128-bit (16 byte) HMAC-MD5 key as described above. Longer keys are better, but shorter keys @@ -514,7 +514,7 @@ nameserver 172.16.72.4

-Manual Generation

+Manual Generation

The shared secret is simply a random sequence of bits, encoded in base-64. Most ASCII strings are valid base-64 strings (assuming @@ -529,7 +529,7 @@ nameserver 172.16.72.4

-Copying the Shared Secret to Both Machines

+Copying the Shared Secret to Both Machines

This is beyond the scope of DNS. A secure transport mechanism should be used. This could be secure FTP, ssh, telephone, etc. @@ -537,7 +537,7 @@ nameserver 172.16.72.4

-Informing the Servers of the Key's Existence

+Informing the Servers of the Key's Existence

Imagine host1 and host 2 are @@ -566,7 +566,7 @@ key host1-host2. {

-Instructing the Server to Use the Key

+Instructing the Server to Use the Key

Since keys are shared between two hosts only, the server must be told when keys are to be used. The following is added to the named.conf file @@ -598,7 +598,7 @@ server 10.1.2.3 {

-TSIG Key Based Access Control

+TSIG Key Based Access Control

BIND allows IP addresses and ranges to be specified in ACL @@ -626,7 +626,7 @@ allow-update { key host1-host2. ;};

-Errors

+Errors

The processing of TSIG signed messages can result in several errors. If a signed message is sent to a non-TSIG aware @@ -652,7 +652,7 @@ allow-update { key host1-host2. ;};

-TKEY

+TKEY

TKEY is a mechanism for automatically generating a shared secret between two hosts. There are several "modes" of @@ -688,7 +688,7 @@ allow-update { key host1-host2. ;};

-SIG(0)

+SIG(0)

BIND 9 partially supports DNSSEC SIG(0) transaction signatures as specified in RFC 2535 and RFC 2931. @@ -749,7 +749,7 @@ allow-update { key host1-host2. ;};

-Generating Keys

+Generating Keys

The dnssec-keygen program is used to generate keys. @@ -800,7 +800,7 @@ allow-update { key host1-host2. ;};

-Signing the Zone

+Signing the Zone

The dnssec-signzone program is used to @@ -844,7 +844,7 @@ allow-update { key host1-host2. ;};

-Configuring Servers

+Configuring Servers

To enable named to respond appropriately to DNS requests from DNSSEC aware clients, @@ -932,7 +932,7 @@ options {

-IPv6 Support in BIND 9

+IPv6 Support in BIND 9

BIND 9 fully supports all currently defined forms of IPv6 @@ -971,7 +971,7 @@ options {

-Address Lookups Using AAAA Records

+Address Lookups Using AAAA Records

The IPv6 AAAA record is a parallel to the IPv4 A record, and, unlike the deprecated A6 record, specifies the entire @@ -990,7 +990,7 @@ host 3600 IN AAAA

-Address to Name Lookups Using Nibble Format

+Address to Name Lookups Using Nibble Format

When looking up an address in nibble format, the address components are simply reversed, just as in IPv4, and Modified: vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch05.html ============================================================================== --- vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch05.html Mon Mar 29 20:12:44 2010 (r205855) +++ vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch05.html Mon Mar 29 20:15:32 2010 (r205856) @@ -1,5 +1,5 @@ - + @@ -45,13 +45,13 @@

-The Lightweight Resolver Library

+The Lightweight Resolver Library

Traditionally applications have been linked with a stub resolver library that sends recursive DNS queries to a local caching name Modified: vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch06.html ============================================================================== --- vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch06.html Mon Mar 29 20:12:44 2010 (r205855) +++ vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch06.html Mon Mar 29 20:15:32 2010 (r205856) @@ -1,5 +1,5 @@ - + @@ -48,52 +48,52 @@

Configuration File Elements
Address Match Lists
-
Comment Syntax
+
Comment Syntax
Configuration File Grammar
-
acl Statement Grammar
+
acl Statement Grammar
acl Statement Definition and Usage
-
controls Statement Grammar
+
controls Statement Grammar
controls Statement Definition and Usage
-
include Statement Grammar
-
include Statement Definition and +
include Statement Grammar
+
include Statement Definition and Usage
-
key Statement Grammar
-
key Statement Definition and Usage
-
logging Statement Grammar
-
logging Statement Definition and +
key Statement Grammar
+
key Statement Definition and Usage
+
logging Statement Grammar
+
logging Statement Definition and Usage
-
lwres Statement Grammar
-
lwres Statement Definition and Usage
-
masters Statement Grammar
-
masters Statement Definition and +
lwres Statement Grammar
+
lwres Statement Definition and Usage
+
masters Statement Grammar
+
masters Statement Definition and Usage
-
options Statement Grammar
+
options Statement Grammar
options Statement Definition and Usage
server Statement Grammar
server Statement Definition and Usage
-
trusted-keys Statement Grammar
-
trusted-keys Statement Definition +
trusted-keys Statement Grammar
+
trusted-keys Statement Definition and Usage
view Statement Grammar
-
view Statement Definition and Usage
+
view Statement Definition and Usage
zone Statement Grammar
-
zone Statement Definition and Usage
+
zone Statement Definition and Usage
-
Zone File
+
Zone File
Types of Resource Records and When to Use Them
-
Discussion of MX Records
+
Discussion of MX Records
Setting TTLs
-
Inverse Mapping in IPv4
-
Other Zone File Directives
-
BIND Master File Extension: the $GENERATE Directive
+
Inverse Mapping in IPv4
+
Other Zone File Directives
+
BIND Master File Extension: the $GENERATE Directive
Additional File Formats
@@ -455,7 +455,7 @@ Address Match Lists

-Syntax

+Syntax
address_match_list = address_match_list_element ;
   [ address_match_list_element; ... ]
 address_match_list_element = [ ! ] (ip_address [/length] |
@@ -464,7 +464,7 @@
 
 

-Definition and Usage

+Definition and Usage

Address match lists are primarily used to determine access control for various server operations. They are also used in @@ -542,7 +542,7 @@

-Comment Syntax

+Comment Syntax

The BIND 9 comment syntax allows for comments to appear @@ -552,7 +552,7 @@

-Syntax

+Syntax

/* This is a BIND comment as in C */
@@ -567,7 +567,7 @@

-Definition and Usage

+Definition and Usage

Comments may appear anywhere that whitespace may appear in a BIND configuration file. @@ -797,7 +797,7 @@

-acl Statement Grammar

+acl Statement Grammar
acl acl-name {
     address_match_list
 };
@@ -880,7 +880,7 @@
 
 

-controls Statement Grammar

+controls Statement Grammar
controls {
    [ inet ( ip_addr | * ) [ port ip_port ] allow {  address_match_list  }
                 keys { key_list }; ]
@@ -1002,12 +1002,12 @@
 
 

-include Statement Grammar

+include Statement Grammar
include filename;

-include Statement Definition and +include Statement Definition and Usage

The include statement inserts the @@ -1022,7 +1022,7 @@

-key Statement Grammar

+key Statement Grammar
key key_id {
     algorithm string;
     secret string;
@@ -1031,7 +1031,7 @@
 
 

-key Statement Definition and Usage

+key Statement Definition and Usage

The key statement defines a shared secret key for use with TSIG (see the section called “TSIG”) @@ -1078,7 +1078,7 @@

-logging Statement Grammar

+logging Statement Grammar
logging {
    [ channel channel_name {
      ( file path_name
@@ -1102,7 +1102,7 @@
 
 

-logging Statement Definition and +logging Statement Definition and Usage

The logging statement configures a @@ -1136,7 +1136,7 @@

-The channel Phrase

+The channel Phrase

All log output goes to one or more channels; you can make as many of them as you want. @@ -1665,7 +1665,7 @@ category notify { null; };

-The query-errors Category

+The query-errors Category

The query-errors category is specifically intended for debugging purposes: To identify @@ -1893,7 +1893,7 @@ badresp:1,adberr:0,findfail:0,valfail:0]

-lwres Statement Grammar

+lwres Statement Grammar

This is the grammar of the lwres statement in the named.conf file: @@ -1908,7 +1908,7 @@ badresp:1,adberr:0,findfail:0,valfail:0]

-lwres Statement Definition and Usage

+lwres Statement Definition and Usage

The lwres statement configures the name @@ -1959,14 +1959,14 @@ badresp:1,adberr:0,findfail:0,valfail:0]

-masters Statement Grammar

+masters Statement Grammar
 masters name [port ip_port] { ( masters_list | ip_addr [port ip_port] [key key] ) ; [...] };
 

-masters Statement Definition and +masters Statement Definition and Usage

masters lists allow for a common set of masters to be easily used by @@ -1975,7 +1975,7 @@ badresp:1,adberr:0,findfail:0,valfail:0]

-options Statement Grammar

+options Statement Grammar

This is the grammar of the options statement in the named.conf file: @@ -3086,7 +3086,7 @@ options {

-Forwarding

+Forwarding

The forwarding facility can be used to create a large site-wide cache on a few servers, reducing traffic over links to external @@ -3130,7 +3130,7 @@ options {

-Dual-stack Servers

+Dual-stack Servers

Dual-stack servers are used as servers of last resort to work around @@ -3286,7 +3286,7 @@ options {

-Interfaces

+Interfaces

The interfaces and ports that the server will answer queries from may be specified using the listen-on option. listen-on takes @@ -3719,7 +3719,7 @@ avoid-v6-udp-ports {};

-UDP Port Lists

+UDP Port Lists

use-v4-udp-ports, avoid-v4-udp-ports, @@ -3761,7 +3761,7 @@ avoid-v6-udp-ports { 40000; range 50000

-Operating System Resource Limits

+Operating System Resource Limits

The server's usage of many system resources can be limited. Scaled values are allowed when specifying resource limits. For @@ -3922,7 +3922,7 @@ avoid-v6-udp-ports { 40000; range 50000

-Periodic Task Intervals

+Periodic Task Intervals
cleaning-interval

*** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Mar 29 20:16:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D0B41065670; Mon, 29 Mar 2010 20:16:05 +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 D64798FC24; Mon, 29 Mar 2010 20:16: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 o2TKG4rr060227; Mon, 29 Mar 2010 20:16:04 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2TKG4X5060226; Mon, 29 Mar 2010 20:16:04 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201003292016.o2TKG4X5060226@svn.freebsd.org> From: Doug Barton Date: Mon, 29 Mar 2010 20:16: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: r205857 - vendor/bind9/9.4-ESV-R1 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Mar 2010 20:16:05 -0000 Author: dougb Date: Mon Mar 29 20:16:04 2010 New Revision: 205857 URL: http://svn.freebsd.org/changeset/base/205857 Log: Tag the 9.4-ESV-R1 release Added: vendor/bind9/9.4-ESV-R1/ - copied from r205856, vendor/bind9/dist-9.4/ From owner-svn-src-all@FreeBSD.ORG Mon Mar 29 20:24:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14B51106566B; Mon, 29 Mar 2010 20:24:04 +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 043E08FC15; Mon, 29 Mar 2010 20:24:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2TKO3BV062019; Mon, 29 Mar 2010 20:24:03 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2TKO3Er062017; Mon, 29 Mar 2010 20:24:03 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201003292024.o2TKO3Er062017@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 29 Mar 2010 20:24: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: r205858 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2010 20:24:04 -0000 Author: jkim Date: Mon Mar 29 20:24:03 2010 New Revision: 205858 URL: http://svn.freebsd.org/changeset/base/205858 Log: Check the pointer to JIT binary filter before its de-allocation. Submitted by: Alexander Sack (asack at niksun dot com) MFC after: 3 days Modified: head/sys/net/bpf.c Modified: head/sys/net/bpf.c ============================================================================== --- head/sys/net/bpf.c Mon Mar 29 20:16:04 2010 (r205857) +++ head/sys/net/bpf.c Mon Mar 29 20:24:03 2010 (r205858) @@ -1867,13 +1867,14 @@ bpf_freed(struct bpf_d *d) * free. */ bpf_free(d); - if (d->bd_rfilter) { + if (d->bd_rfilter != NULL) { free((caddr_t)d->bd_rfilter, M_BPF); #ifdef BPF_JITTER - bpf_destroy_jit_filter(d->bd_bfilter); + if (d->bd_bfilter != NULL) + bpf_destroy_jit_filter(d->bd_bfilter); #endif } - if (d->bd_wfilter) + if (d->bd_wfilter != NULL) free((caddr_t)d->bd_wfilter, M_BPF); mtx_destroy(&d->bd_mtx); } From owner-svn-src-all@FreeBSD.ORG Mon Mar 29 20:27:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF1C51065675; Mon, 29 Mar 2010 20:27:17 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9E3858FC17; Mon, 29 Mar 2010 20:27: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 o2TKRHIh062807; Mon, 29 Mar 2010 20:27:17 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2TKRHwD062800; Mon, 29 Mar 2010 20:27:17 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201003292027.o2TKRHwD062800@svn.freebsd.org> From: Joel Dahl Date: Mon, 29 Mar 2010 20:27:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205859 - head/sys/dev/sound/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: Mon, 29 Mar 2010 20:27:17 -0000 Author: joel (doc committer) Date: Mon Mar 29 20:27:17 2010 New Revision: 205859 URL: http://svn.freebsd.org/changeset/base/205859 Log: Start copyright notices with /*- Modified: head/sys/dev/sound/pci/envy24.c head/sys/dev/sound/pci/envy24.h head/sys/dev/sound/pci/envy24ht.c head/sys/dev/sound/pci/envy24ht.h head/sys/dev/sound/pci/spicds.c head/sys/dev/sound/pci/spicds.h Modified: head/sys/dev/sound/pci/envy24.c ============================================================================== --- head/sys/dev/sound/pci/envy24.c Mon Mar 29 20:24:03 2010 (r205858) +++ head/sys/dev/sound/pci/envy24.c Mon Mar 29 20:27:17 2010 (r205859) @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2001 Katsurajima Naoto * All rights reserved. * Modified: head/sys/dev/sound/pci/envy24.h ============================================================================== --- head/sys/dev/sound/pci/envy24.h Mon Mar 29 20:24:03 2010 (r205858) +++ head/sys/dev/sound/pci/envy24.h Mon Mar 29 20:27:17 2010 (r205859) @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2001 Katsurajima Naoto * All rights reserved. * Modified: head/sys/dev/sound/pci/envy24ht.c ============================================================================== --- head/sys/dev/sound/pci/envy24ht.c Mon Mar 29 20:24:03 2010 (r205858) +++ head/sys/dev/sound/pci/envy24ht.c Mon Mar 29 20:27:17 2010 (r205859) @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2006 Konstantin Dimitrov * Copyright (c) 2001 Katsurajima Naoto * All rights reserved. Modified: head/sys/dev/sound/pci/envy24ht.h ============================================================================== --- head/sys/dev/sound/pci/envy24ht.h Mon Mar 29 20:24:03 2010 (r205858) +++ head/sys/dev/sound/pci/envy24ht.h Mon Mar 29 20:27:17 2010 (r205859) @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2006 Konstantin Dimitrov * Copyright (c) 2001 Katsurajima Naoto * All rights reserved. Modified: head/sys/dev/sound/pci/spicds.c ============================================================================== --- head/sys/dev/sound/pci/spicds.c Mon Mar 29 20:24:03 2010 (r205858) +++ head/sys/dev/sound/pci/spicds.c Mon Mar 29 20:27:17 2010 (r205859) @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2006 Konstantin Dimitrov * Copyright (c) 2001 Katsurajima Naoto * All rights reserved. Modified: head/sys/dev/sound/pci/spicds.h ============================================================================== --- head/sys/dev/sound/pci/spicds.h Mon Mar 29 20:24:03 2010 (r205858) +++ head/sys/dev/sound/pci/spicds.h Mon Mar 29 20:27:17 2010 (r205859) @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2006 Konstantin Dimitrov * Copyright (c) 2001 Katsurajima Naoto * All rights reserved. From owner-svn-src-all@FreeBSD.ORG Mon Mar 29 20:34:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 701AD106566C; Mon, 29 Mar 2010 20:34:25 +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 5F61D8FC12; Mon, 29 Mar 2010 20:34: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 o2TKYPlb064441; Mon, 29 Mar 2010 20:34:25 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2TKYPVI064439; Mon, 29 Mar 2010 20:34:25 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201003292034.o2TKYPVI064439@svn.freebsd.org> From: Andriy Gapon Date: Mon, 29 Mar 2010 20:34:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205860 - head/sys/geom X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Mar 2010 20:34:25 -0000 Author: avg Date: Mon Mar 29 20:34:25 2010 New Revision: 205860 URL: http://svn.freebsd.org/changeset/base/205860 Log: g_vfs_open: correctly set devvp.v_bufobj.bo_bsize to DEV_BSIZE Because of how breadn -> bufstrategy -> g_vfs_strategy are currently implemented, bread on devvp always expects DEV_BSIZE block size. Thus, devvp bo_bsize must always be DEV_BSIZE irrespective of media properties or filesystem implementation details. Reviewed by: mckusick MFC after: 2 weeks Modified: head/sys/geom/geom_vfs.c Modified: head/sys/geom/geom_vfs.c ============================================================================== --- head/sys/geom/geom_vfs.c Mon Mar 29 20:27:17 2010 (r205859) +++ head/sys/geom/geom_vfs.c Mon Mar 29 20:34:25 2010 (r205860) @@ -179,7 +179,7 @@ g_vfs_open(struct vnode *vp, struct g_co bo = &vp->v_bufobj; bo->bo_ops = g_vfs_bufops; bo->bo_private = cp; - bo->bo_bsize = pp->sectorsize; + bo->bo_bsize = DEV_BSIZE; gp->softc = bo; return (error); From owner-svn-src-all@FreeBSD.ORG Mon Mar 29 21:12:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 94157106564A; Mon, 29 Mar 2010 21:12: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 830FB8FC1B; Mon, 29 Mar 2010 21:12: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 o2TLCNfQ072767; Mon, 29 Mar 2010 21:12:23 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2TLCN94072765; Mon, 29 Mar 2010 21:12:23 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201003292112.o2TLCN94072765@svn.freebsd.org> From: Doug Barton Date: Mon, 29 Mar 2010 21:12:23 +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: r205861 - vendor/bind9/dist-9.4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Mar 2010 21:12:23 -0000 Author: dougb Date: Mon Mar 29 21:12:23 2010 New Revision: 205861 URL: http://svn.freebsd.org/changeset/base/205861 Log: Minor updates to the configure procedure Modified: vendor/bind9/dist-9.4/FREEBSD-Upgrade Modified: vendor/bind9/dist-9.4/FREEBSD-Upgrade ============================================================================== --- vendor/bind9/dist-9.4/FREEBSD-Upgrade Mon Mar 29 20:34:25 2010 (r205860) +++ vendor/bind9/dist-9.4/FREEBSD-Upgrade Mon Mar 29 21:12:23 2010 (r205861) @@ -54,15 +54,15 @@ directories from the configure and Makefile templates: $ sed -i.orig -e '/\/tests/d; /docutil/d; /\/xsl/d;' \ - configure.in Makefile.in */Makefile.in + configure.in Makefile.in */Makefile.in \ + lib/bind/configure.in lib/bind/Makefile.in Please do not commit this change. You only need this to generate config.h. 10) Generate and run configure: aclocal ; autoheader ; autoconf - cd lib/bind - aclocal ; autoheader ; autoconf + cd lib/bind && aclocal ; autoheader ; autoconf cd ../.. $ ./configure --prefix=/usr \ --infodir=/usr/share/info --mandir=/usr/share/man \ From owner-svn-src-all@FreeBSD.ORG Mon Mar 29 21:17:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3DFE1106566B; Mon, 29 Mar 2010 21:17: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 128108FC0A; Mon, 29 Mar 2010 21:17: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 o2TLH3wR073830; Mon, 29 Mar 2010 21:17:03 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2TLH3KB073828; Mon, 29 Mar 2010 21:17:03 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201003292117.o2TLH3KB073828@svn.freebsd.org> From: Edwin Groothuis Date: Mon, 29 Mar 2010 21:17: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: r205862 - head/usr.bin/calendar/calendars X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2010 21:17:04 -0000 Author: edwin Date: Mon Mar 29 21:17:03 2010 New Revision: 205862 URL: http://svn.freebsd.org/changeset/base/205862 Log: Update the Australian calendar WRT DST. Layout changes. Modified: head/usr.bin/calendar/calendars/calendar.australia Modified: head/usr.bin/calendar/calendars/calendar.australia ============================================================================== --- head/usr.bin/calendar/calendars/calendar.australia Mon Mar 29 21:12:23 2010 (r205861) +++ head/usr.bin/calendar/calendars/calendar.australia Mon Mar 29 21:17:03 2010 (r205862) @@ -10,49 +10,49 @@ LANG=en_AU.ISO8859-1 /* Australia */ -Jan 26 Australia Day -Mar/SunLast Daylight Savings Time ends in ACT, NSW, SA, TAS and VIC. -Apr 25 Anzac Day +Jan 26 Australia Day +Apr/SunFirst Daylight Savings Time ends in ACT, NSW, SA, TAS and VIC. +Apr 25 Anzac Day Jun/MonSecond Queen's Birthday Holiday (Australia, except WA) -Oct/SunLast Daylight Savings Time starts in ACT, NSW, SA and VIC. +Oct/SunFirst Daylight Savings Time starts in ACT, NSW, SA and VIC. /* ACT, NSW, common */ -Mar 18 Canberra Day (ACT) -8/MonFirst Bank Holiday (ACT, NSW) -10/MonFirst Labour Day (ACT, NSW, SA) +Mar 18 Canberra Day (ACT) +Sep/MonLast Family & Community Day (ACT) +Aug/MonFirst Bank Holiday (ACT, NSW) +Oct/MonFirst Labour Day (ACT, NSW, SA) /* Victoria */ -3/MonSecond Labour Day (Vic) -Nov/TueFirst Melbourne Cup (Vic) +Mar/MonSecond Labour Day (VIC) +Nov/TueFirst Melbourne Cup (VIC) /* Tasmania */ -Feb 11 Regatta Day (Tas) -Feb 27 Launceston Cup (Tas) -Mar 11 Eight Hours Day (Tas) -Oct/SunFirst Daylight Savings Time starts in TAS. -Oct 10 Launceston Show Day (Tas) -Oct 24 Hobart Show Day (Tas) -Nov 04 Recreation Day (N Tas) +Feb 11 Regatta Day (TAS) +Feb 27 Launceston Cup (TAS) +Mar 11 Eight Hours Day (TAS) +Oct 10 Launceston Show Day (TAS) +Oct 24 Hobart Show Day (TAS) +Nov 04 Recreation Day (N TAS) /* South Australia */ May/MonThird Adelaide Cup (SA) -Dec 26 Proclamation Day holiday (SA) +Dec 26 Proclamation Day holiday (SA) /* Western Australia */ -3/MonFirst Labour Day (WA) -6/MonFirst Foundation Day (WA) -Sep 30 Queen's Birthday (WA) +Mar/MonFirst Labour Day (WA) +Jun/MonFirst Foundation Day (WA) +Sep 30 Queen's Birthday (WA) /* Northern Territory */ -5/MonFirst May Day (NT) -7/FriFirst Alice Springs Show Day (NT) -7/FriSecond Tennant Creek Show Day (NT) -7/FriThird Katherine Show Day (NT) -7/FriLast Darwin Show Day (NT) -8/MonFirst Picnic Day (NT) +May/MonFirst May Day (NT) +Jul/FriFirst Alice Springs Show Day (NT) +Jul/FriSecond Tennant Creek Show Day (NT) +Jul/FriThird Katherine Show Day (NT) +Jul/FriLast Darwin Show Day (NT) +Aug/MonFirst Picnic Day (NT) /* Queensland */ -5/MonFirst Labour Day (Qld) -Aug 14 RNA Show Day (Brisbane metro) +May/MonFirst Labour Day (QLD) +Aug 14 RNA Show Day (Brisbane metro) #endif From owner-svn-src-all@FreeBSD.ORG Mon Mar 29 22:03:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D581106566C; Mon, 29 Mar 2010 22:03:55 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4C4EB8FC14; Mon, 29 Mar 2010 22:03: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 o2TM3tuX084188; Mon, 29 Mar 2010 22:03:55 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2TM3tAI084186; Mon, 29 Mar 2010 22:03:55 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201003292203.o2TM3tAI084186@svn.freebsd.org> From: Warner Losh Date: Mon, 29 Mar 2010 22:03:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205863 - head/sys/mips/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2010 22:03:55 -0000 Author: imp Date: Mon Mar 29 22:03:55 2010 New Revision: 205863 URL: http://svn.freebsd.org/changeset/base/205863 Log: Enable module builds now that the build completes for them. This should get them into the universe rotation. Modified: head/sys/mips/conf/AR71XX Modified: head/sys/mips/conf/AR71XX ============================================================================== --- head/sys/mips/conf/AR71XX Mon Mar 29 21:17:03 2010 (r205862) +++ head/sys/mips/conf/AR71XX Mon Mar 29 22:03:55 2010 (r205863) @@ -15,7 +15,7 @@ files "../atheros/files.ar71xx" hints "AR71XX.hints" makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols -makeoptions MODULES_OVERRIDE="" +#makeoptions MODULES_OVERRIDE="" options DDB options KDB From owner-svn-src-all@FreeBSD.ORG Mon Mar 29 22:29:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B518A106564A; Mon, 29 Mar 2010 22:29:42 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A41008FC0C; Mon, 29 Mar 2010 22:29: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 o2TMTgv0090003; Mon, 29 Mar 2010 22:29:42 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2TMTgZR090002; Mon, 29 Mar 2010 22:29:42 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201003292229.o2TMTgZR090002@svn.freebsd.org> From: Warner Losh Date: Mon, 29 Mar 2010 22:29: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: r205864 - head/sys/arm/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: Mon, 29 Mar 2010 22:29:42 -0000 Author: imp Date: Mon Mar 29 22:29:41 2010 New Revision: 205864 URL: http://svn.freebsd.org/changeset/base/205864 Log: Build modules for this config to make sure they stay buildable... Modified: head/sys/arm/conf/KB920X Modified: head/sys/arm/conf/KB920X ============================================================================== --- head/sys/arm/conf/KB920X Mon Mar 29 22:03:55 2010 (r205863) +++ head/sys/arm/conf/KB920X Mon Mar 29 22:29:41 2010 (r205864) @@ -24,7 +24,7 @@ include "../at91/std.kb920x" # The AT91 platform doesn't use /boot/loader, so we have to statically wire # hints. hints "KB920X.hints" -makeoptions MODULES_OVERRIDE="" +#makeoptions MODULES_OVERRIDE="" makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols options DDB From owner-svn-src-all@FreeBSD.ORG Mon Mar 29 22:41:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32051106564A; Mon, 29 Mar 2010 22:41:31 +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 20A1C8FC08; Mon, 29 Mar 2010 22:41: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 o2TMfV3T092643; Mon, 29 Mar 2010 22:41:31 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2TMfUVu092640; Mon, 29 Mar 2010 22:41:30 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201003292241.o2TMfUVu092640@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 29 Mar 2010 22:41: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: r205865 - head/sys/dev/syscons X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Mar 2010 22:41:31 -0000 Author: jkim Date: Mon Mar 29 22:41:30 2010 New Revision: 205865 URL: http://svn.freebsd.org/changeset/base/205865 Log: Refine r204265. We want the standard VGA palette for packed pixel mode. Modified: head/sys/dev/syscons/scvidctl.c head/sys/dev/syscons/syscons.c Modified: head/sys/dev/syscons/scvidctl.c ============================================================================== --- head/sys/dev/syscons/scvidctl.c Mon Mar 29 22:29:41 2010 (r205864) +++ head/sys/dev/syscons/scvidctl.c Mon Mar 29 22:41:30 2010 (r205865) @@ -741,7 +741,7 @@ sc_vid_ioctl(struct tty *tp, u_long cmd, #ifndef SC_NO_PALETTE_LOADING #ifdef SC_PIXEL_MODE - if ((adp->va_flags & V_ADP_DAC8) != 0) + if (adp->va_info.vi_mem_model == V_INFO_MM_DIRECT) vidd_load_palette(adp, scp->sc->palette2); else #endif @@ -802,7 +802,7 @@ sc_vid_ioctl(struct tty *tp, u_long cmd, if (scp == scp->sc->cur_scp) { set_mode(scp); #ifndef SC_NO_PALETTE_LOADING - if ((adp->va_flags & V_ADP_DAC8) != 0) + if (adp->va_info.vi_mem_model == V_INFO_MM_DIRECT) vidd_load_palette(adp, scp->sc->palette2); else vidd_load_palette(adp, scp->sc->palette); Modified: head/sys/dev/syscons/syscons.c ============================================================================== --- head/sys/dev/syscons/syscons.c Mon Mar 29 22:29:41 2010 (r205864) +++ head/sys/dev/syscons/syscons.c Mon Mar 29 22:41:30 2010 (r205865) @@ -2131,7 +2131,7 @@ restore_scrn_saver_mode(scr_stat *scp, i if (set_mode(scp) == 0) { #ifndef SC_NO_PALETTE_LOADING #ifdef SC_PIXEL_MODE - if ((scp->sc->adp->va_flags & V_ADP_DAC8) != 0) + if (scp->sc->adp->va_info.vi_mem_model == V_INFO_MM_DIRECT) vidd_load_palette(scp->sc->adp, scp->sc->palette2); else #endif @@ -2540,7 +2540,7 @@ exchange_scr(sc_softc_t *sc) #ifndef SC_NO_PALETTE_LOADING if (ISGRAPHSC(sc->old_scp)) { #ifdef SC_PIXEL_MODE - if ((sc->adp->va_flags & V_ADP_DAC8) != 0) + if (sc->adp->va_info.vi_mem_model == V_INFO_MM_DIRECT) vidd_load_palette(sc->adp, sc->palette2); else #endif From owner-svn-src-all@FreeBSD.ORG Mon Mar 29 22:52:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E338B1065674; Mon, 29 Mar 2010 22:52:51 +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 B67158FC1A; Mon, 29 Mar 2010 22:52: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 o2TMqp9Z095215; Mon, 29 Mar 2010 22:52:51 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2TMqpXI095209; Mon, 29 Mar 2010 22:52:51 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201003292252.o2TMqpXI095209@svn.freebsd.org> From: Xin LI Date: Mon, 29 Mar 2010 22:52:51 +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: r205866 - 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: Mon, 29 Mar 2010 22:52:52 -0000 Author: delphij Date: Mon Mar 29 22:52:51 2010 New Revision: 205866 URL: http://svn.freebsd.org/changeset/base/205866 Log: MFC r204383: Add several necessary .El's Modified: stable/8/share/man/man9/BUF_ISLOCKED.9 stable/8/share/man/man9/BUF_RECURSED.9 stable/8/share/man/man9/DEVICE_PROBE.9 stable/8/share/man/man9/VOP_LOCK.9 stable/8/share/man/man9/devfs_set_cdevpriv.9 Directory Properties: stable/8/share/man/man9/ (props changed) Modified: stable/8/share/man/man9/BUF_ISLOCKED.9 ============================================================================== --- stable/8/share/man/man9/BUF_ISLOCKED.9 Mon Mar 29 22:41:30 2010 (r205865) +++ stable/8/share/man/man9/BUF_ISLOCKED.9 Mon Mar 29 22:52:51 2010 (r205866) @@ -57,6 +57,7 @@ An exclusive lock is held by someone oth A shared lock is held. .It Li 0 The lock is not held by anyone. +.El .Sh SEE ALSO .Xr lockstatus 9 , .Xr buf 9 , Modified: stable/8/share/man/man9/BUF_RECURSED.9 ============================================================================== --- stable/8/share/man/man9/BUF_RECURSED.9 Mon Mar 29 22:41:30 2010 (r205865) +++ stable/8/share/man/man9/BUF_RECURSED.9 Mon Mar 29 22:52:51 2010 (r205866) @@ -54,6 +54,7 @@ The buffer linked to the lock. See .Xr lockmgr_recursed 9 for details. +.El .Sh SEE ALSO .Xr buf 9 , .Xr BUF_LOCK 9 , Modified: stable/8/share/man/man9/DEVICE_PROBE.9 ============================================================================== --- stable/8/share/man/man9/DEVICE_PROBE.9 Mon Mar 29 22:41:30 2010 (r205865) +++ stable/8/share/man/man9/DEVICE_PROBE.9 Mon Mar 29 22:52:51 2010 (r205866) @@ -127,6 +127,7 @@ The driver expects its parent to tell it and no probing is really done. The device only matches if its parent bus specifically said to use this driver. +.El .Sh SEE ALSO .Xr device 9 , .Xr DEVICE_ATTACH 9 , Modified: stable/8/share/man/man9/VOP_LOCK.9 ============================================================================== --- stable/8/share/man/man9/VOP_LOCK.9 Mon Mar 29 22:41:30 2010 (r205865) +++ stable/8/share/man/man9/VOP_LOCK.9 Mon Mar 29 22:52:51 2010 (r205866) @@ -114,6 +114,7 @@ directly. .Fn vn_lock also does not want a thread specified as argument but it assumes curthread to be used. +.El .Sh RETURN VALUES Zero is returned on success, otherwise an error is returned. .Sh SEE ALSO Modified: stable/8/share/man/man9/devfs_set_cdevpriv.9 ============================================================================== --- stable/8/share/man/man9/devfs_set_cdevpriv.9 Mon Mar 29 22:41:30 2010 (r205865) +++ stable/8/share/man/man9/devfs_set_cdevpriv.9 Mon Mar 29 22:52:51 2010 (r205866) @@ -108,7 +108,7 @@ The private driver data was not associat filedescriptor, or .Fn devfs_clear_cdevpriv was called. -.Pp +.El .Sh SEE ALSO .Xr open 2 , .Xr close 2 , From owner-svn-src-all@FreeBSD.ORG Mon Mar 29 22:59:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D528106564A; Mon, 29 Mar 2010 22:59: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 2B58D8FC17; Mon, 29 Mar 2010 22:59: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 o2TMxa32096738; Mon, 29 Mar 2010 22:59:36 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2TMxa3S096736; Mon, 29 Mar 2010 22:59:36 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201003292259.o2TMxa3S096736@svn.freebsd.org> From: Doug Barton Date: Mon, 29 Mar 2010 22:59: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: r205867 - stable/7 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Mar 2010 22:59:36 -0000 Author: dougb Date: Mon Mar 29 22:59:35 2010 New Revision: 205867 URL: http://svn.freebsd.org/changeset/base/205867 Log: MFC r205290: MAKE_JUST_WORLDS Modified: stable/7/Makefile (contents, props changed) Modified: stable/7/Makefile ============================================================================== --- stable/7/Makefile Mon Mar 29 22:52:51 2010 (r205866) +++ stable/7/Makefile Mon Mar 29 22:59:35 2010 (r205867) @@ -295,6 +295,7 @@ universe_${target}: "check _.${target}.buildworld for details") @echo ">> ${target} buildworld completed on `LC_ALL=C date`" .endif +.if !defined(MAKE_JUST_WORLDS) .if exists(${.CURDIR}/sys/${target}/conf/NOTES) @(cd ${.CURDIR}/sys/${target}/conf && env __MAKE_CONF=/dev/null \ ${MAKE} LINT > ${.CURDIR}/_.${target}.makeLINT 2>&1 || \ @@ -310,6 +311,7 @@ universe_${target}: echo "${target} ${kernel} kernel failed," \ "check _.${target}.${kernel} for details") .endfor +.endif @echo ">> ${target} completed on `LC_ALL=C date`" .endfor universe: universe_epilogue From owner-svn-src-all@FreeBSD.ORG Mon Mar 29 23:00:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09152106564A; Mon, 29 Mar 2010 23:00:46 +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 E70278FC08; Mon, 29 Mar 2010 23:00: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 o2TN0jMO097070; Mon, 29 Mar 2010 23:00:45 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2TN0jdo097059; Mon, 29 Mar 2010 23:00:45 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201003292300.o2TN0jdo097059@svn.freebsd.org> From: Doug Barton Date: Mon, 29 Mar 2010 23:00:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205868 - in stable/7: contrib/bind9 contrib/bind9/bin/named contrib/bind9/doc/arm contrib/bind9/doc/draft contrib/bind9/lib/dns contrib/bind9/lib/dns/include/dns lib/bind X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Mar 2010 23:00:46 -0000 Author: dougb Date: Mon Mar 29 23:00:45 2010 New Revision: 205868 URL: http://svn.freebsd.org/changeset/base/205868 Log: Update to 9.4-ESV-R1, the latest patchfix release which deals with the problems related to the handling of broken DNSSEC trust chains. This fix is only relevant for those who have DNSSEC validation enabled and configure trust anchors from third parties, either manually, or through a system like DLV. Added: stable/7/contrib/bind9/doc/draft/draft-ietf-6man-text-addr-representation-07.txt - copied unchanged from r205860, vendor/bind9/dist-9.4/doc/draft/draft-ietf-6man-text-addr-representation-07.txt stable/7/contrib/bind9/doc/draft/draft-ietf-behave-dns64-06.txt - copied unchanged from r205860, vendor/bind9/dist-9.4/doc/draft/draft-ietf-behave-dns64-06.txt stable/7/contrib/bind9/doc/draft/draft-ietf-dnsext-axfr-clarify-13.txt - copied unchanged from r205860, vendor/bind9/dist-9.4/doc/draft/draft-ietf-dnsext-axfr-clarify-13.txt stable/7/contrib/bind9/doc/draft/draft-ietf-dnsext-dnssec-gost-06.txt - copied unchanged from r205860, vendor/bind9/dist-9.4/doc/draft/draft-ietf-dnsext-dnssec-gost-06.txt stable/7/contrib/bind9/doc/draft/draft-ietf-dnsext-rfc3597-bis-02.txt - copied unchanged from r205860, vendor/bind9/dist-9.4/doc/draft/draft-ietf-dnsext-rfc3597-bis-02.txt stable/7/contrib/bind9/doc/draft/draft-ietf-dnsop-dnssec-trust-history-01.txt - copied unchanged from r205860, vendor/bind9/dist-9.4/doc/draft/draft-ietf-dnsop-dnssec-trust-history-01.txt stable/7/contrib/bind9/doc/draft/draft-kerr-ixfr-only-01.txt - copied unchanged from r205860, vendor/bind9/dist-9.4/doc/draft/draft-kerr-ixfr-only-01.txt Deleted: stable/7/contrib/bind9/doc/draft/draft-ietf-6man-text-addr-representation-01.txt stable/7/contrib/bind9/doc/draft/draft-ietf-behave-dns64-01.txt stable/7/contrib/bind9/doc/draft/draft-ietf-dnsext-axfr-clarify-12.txt stable/7/contrib/bind9/doc/draft/draft-ietf-dnsext-dnssec-gost-05.txt stable/7/contrib/bind9/doc/draft/draft-ietf-dnsext-rfc3597-bis-00.txt Modified: stable/7/contrib/bind9/CHANGES stable/7/contrib/bind9/bin/named/server.c stable/7/contrib/bind9/doc/arm/Bv9ARM-book.xml stable/7/contrib/bind9/doc/arm/Bv9ARM.ch01.html stable/7/contrib/bind9/doc/arm/Bv9ARM.ch02.html stable/7/contrib/bind9/doc/arm/Bv9ARM.ch03.html stable/7/contrib/bind9/doc/arm/Bv9ARM.ch04.html stable/7/contrib/bind9/doc/arm/Bv9ARM.ch05.html stable/7/contrib/bind9/doc/arm/Bv9ARM.ch06.html stable/7/contrib/bind9/doc/arm/Bv9ARM.ch07.html stable/7/contrib/bind9/doc/arm/Bv9ARM.ch08.html stable/7/contrib/bind9/doc/arm/Bv9ARM.ch09.html stable/7/contrib/bind9/doc/arm/Bv9ARM.ch10.html stable/7/contrib/bind9/doc/arm/Bv9ARM.html stable/7/contrib/bind9/doc/arm/Bv9ARM.pdf stable/7/contrib/bind9/doc/arm/man.dig.html stable/7/contrib/bind9/doc/arm/man.dnssec-keygen.html stable/7/contrib/bind9/doc/arm/man.dnssec-signzone.html stable/7/contrib/bind9/doc/arm/man.host.html stable/7/contrib/bind9/doc/arm/man.named-checkconf.html stable/7/contrib/bind9/doc/arm/man.named-checkzone.html stable/7/contrib/bind9/doc/arm/man.named.html stable/7/contrib/bind9/doc/arm/man.rndc-confgen.html stable/7/contrib/bind9/doc/arm/man.rndc.conf.html stable/7/contrib/bind9/doc/arm/man.rndc.html stable/7/contrib/bind9/lib/dns/include/dns/rdataset.h stable/7/contrib/bind9/lib/dns/include/dns/resolver.h stable/7/contrib/bind9/lib/dns/include/dns/result.h stable/7/contrib/bind9/lib/dns/include/dns/validator.h stable/7/contrib/bind9/lib/dns/ncache.c stable/7/contrib/bind9/lib/dns/rbtdb.c stable/7/contrib/bind9/lib/dns/rdatalist.c stable/7/contrib/bind9/lib/dns/rdataset.c stable/7/contrib/bind9/lib/dns/rdataslab.c stable/7/contrib/bind9/lib/dns/resolver.c stable/7/contrib/bind9/lib/dns/result.c stable/7/contrib/bind9/lib/dns/sdb.c stable/7/contrib/bind9/lib/dns/sdlz.c stable/7/contrib/bind9/lib/dns/validator.c stable/7/contrib/bind9/lib/dns/view.c stable/7/contrib/bind9/version stable/7/lib/bind/config.h Directory Properties: stable/7/contrib/bind9/ (props changed) stable/7/lib/bind/ (props changed) Modified: stable/7/contrib/bind9/CHANGES ============================================================================== --- stable/7/contrib/bind9/CHANGES Mon Mar 29 22:59:35 2010 (r205867) +++ stable/7/contrib/bind9/CHANGES Mon Mar 29 23:00:45 2010 (r205868) @@ -1,3 +1,7 @@ + --- 9.4-ESV-R1 released --- + +2852. [bug] Handle broken DNSSEC trust chains better. [RT #15619] + --- 9.4-ESV released --- 2831. [security] Do not attempt to validate or cache Modified: stable/7/contrib/bind9/bin/named/server.c ============================================================================== --- stable/7/contrib/bind9/bin/named/server.c Mon Mar 29 22:59:35 2010 (r205867) +++ stable/7/contrib/bind9/bin/named/server.c Mon Mar 29 23:00:45 2010 (r205868) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2010 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1999-2003 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: server.c,v 1.419.18.75 2009/07/11 04:30:49 marka Exp $ */ +/* $Id: server.c,v 1.419.18.77 2010/02/26 23:46:32 tbox Exp $ */ /*! \file */ @@ -4563,6 +4563,8 @@ dumpdone(void *arg, isc_result_t result) } if (dctx->cache != NULL) { dns_adb_dump(dctx->view->view->adb, dctx->fp); + dns_resolver_printbadcache(dctx->view->view->resolver, + dctx->fp); dns_db_detach(&dctx->cache); } if (dctx->dumpzones) { Modified: stable/7/contrib/bind9/doc/arm/Bv9ARM-book.xml ============================================================================== --- stable/7/contrib/bind9/doc/arm/Bv9ARM-book.xml Mon Mar 29 22:59:35 2010 (r205867) +++ stable/7/contrib/bind9/doc/arm/Bv9ARM-book.xml Mon Mar 29 23:00:45 2010 (r205868) @@ -2,7 +2,7 @@ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" []> - + BIND 9 Administrator Reference Manual @@ -30,6 +30,7 @@ 2007 2008 2009 + 2010 Internet Systems Consortium, Inc. ("ISC") @@ -7422,6 +7423,13 @@ avoid-v6-udp-ports { 40000; range 50000 1800 (30 minutes). + + Lame-ttl also controls the amount of time DNSSEC + validation failures are cached. There is a minimum + of 30 seconds applied to bad cache entries if the + lame-ttl is set to less than 30 seconds. + + Modified: stable/7/contrib/bind9/doc/arm/Bv9ARM.ch01.html ============================================================================== --- stable/7/contrib/bind9/doc/arm/Bv9ARM.ch01.html Mon Mar 29 22:59:35 2010 (r205867) +++ stable/7/contrib/bind9/doc/arm/Bv9ARM.ch01.html Mon Mar 29 23:00:45 2010 (r205868) @@ -1,5 +1,5 @@ - + @@ -45,17 +45,17 @@

@@ -71,7 +71,7 @@

-Scope of Document

+Scope of Document

The Berkeley Internet Name Domain (BIND) implements a @@ -87,7 +87,7 @@

-Organization of This Document

+Organization of This Document

In this document, Chapter 1 introduces the basic DNS and BIND concepts. Chapter 2 @@ -116,7 +116,7 @@

-Conventions Used in This Document

+Conventions Used in This Document

In this document, we use the following general typographic conventions: @@ -243,7 +243,7 @@

-The Domain Name System (DNS)

+The Domain Name System (DNS)

The purpose of this document is to explain the installation and upkeep of the BIND (Berkeley Internet @@ -253,7 +253,7 @@

-DNS Fundamentals

+DNS Fundamentals

The Domain Name System (DNS) is a hierarchical, distributed database. It stores information for mapping Internet host names to @@ -273,7 +273,7 @@

-Domains and Domain Names

+Domains and Domain Names

The data stored in the DNS is identified by domain names that are organized as a tree according to organizational or administrative boundaries. Each node of the tree, @@ -319,7 +319,7 @@

-Zones

+Zones

To properly operate a name server, it is important to understand the difference between a zone @@ -372,7 +372,7 @@

-Authoritative Name Servers

+Authoritative Name Servers

Each zone is served by at least one authoritative name server, @@ -389,7 +389,7 @@

-The Primary Master

+The Primary Master

The authoritative server where the master copy of the zone data is maintained is called the @@ -409,7 +409,7 @@

-Slave Servers

+Slave Servers

The other authoritative servers, the slave servers (also known as secondary servers) @@ -425,7 +425,7 @@

-Stealth Servers

+Stealth Servers

Usually all of the zone's authoritative servers are listed in NS records in the parent zone. These NS records constitute @@ -460,7 +460,7 @@

-Caching Name Servers

+Caching Name Servers

The resolver libraries provided by most operating systems are stub resolvers, meaning that they are not @@ -487,7 +487,7 @@

-Forwarding

+Forwarding

Even a caching name server does not necessarily perform the complete recursive lookup itself. Instead, it can @@ -514,7 +514,7 @@

-Name Servers in Multiple Roles

+Name Servers in Multiple Roles

The BIND name server can simultaneously act as Modified: stable/7/contrib/bind9/doc/arm/Bv9ARM.ch02.html ============================================================================== --- stable/7/contrib/bind9/doc/arm/Bv9ARM.ch02.html Mon Mar 29 22:59:35 2010 (r205867) +++ stable/7/contrib/bind9/doc/arm/Bv9ARM.ch02.html Mon Mar 29 23:00:45 2010 (r205868) @@ -1,5 +1,5 @@ - + @@ -45,16 +45,16 @@

-Hardware requirements

+Hardware requirements

DNS hardware requirements have traditionally been quite modest. @@ -73,7 +73,7 @@

-CPU Requirements

+CPU Requirements

CPU requirements for BIND 9 range from i486-class machines @@ -84,7 +84,7 @@

-Memory Requirements

+Memory Requirements

The memory of the server has to be large enough to fit the cache and zones loaded off disk. The max-cache-size @@ -107,7 +107,7 @@

-Name Server Intensive Environment Issues

+Name Server Intensive Environment Issues

For name server intensive environments, there are two alternative configurations that may be used. The first is where clients and @@ -124,7 +124,7 @@

-Supported Operating Systems

+Supported Operating Systems

ISC BIND 9 compiles and runs on a large number of Unix-like operating systems, and on some versions of Modified: stable/7/contrib/bind9/doc/arm/Bv9ARM.ch03.html ============================================================================== --- stable/7/contrib/bind9/doc/arm/Bv9ARM.ch03.html Mon Mar 29 22:59:35 2010 (r205867) +++ stable/7/contrib/bind9/doc/arm/Bv9ARM.ch03.html Mon Mar 29 23:00:45 2010 (r205868) @@ -1,5 +1,5 @@ - + @@ -47,14 +47,14 @@

Sample Configurations
-
A Caching-only Name Server
-
An Authoritative-only Name Server
+
A Caching-only Name Server
+
An Authoritative-only Name Server
-
Load Balancing
-
Name Server Operations
+
Load Balancing
+
Name Server Operations
-
Tools for Use With the Name Server Daemon
-
Signals
+
Tools for Use With the Name Server Daemon
+
Signals
@@ -68,7 +68,7 @@ Sample Configurations

-A Caching-only Name Server

+A Caching-only Name Server

The following sample configuration is appropriate for a caching-only name server for use by clients internal to a corporation. All @@ -95,7 +95,7 @@ zone "0.0.127.in-addr.arpa" {

-An Authoritative-only Name Server

+An Authoritative-only Name Server

This sample configuration is for an authoritative-only server that is the master server for "example.com" @@ -137,7 +137,7 @@ zone "eng.example.com" {

-Load Balancing

+Load Balancing

A primitive form of load balancing can be achieved in the DNS by using multiple records @@ -280,10 +280,10 @@ zone "eng.example.com" {

-Name Server Operations

+Name Server Operations

-Tools for Use With the Name Server Daemon

+Tools for Use With the Name Server Daemon

This section describes several indispensable diagnostic, administrative and monitoring tools available to the system @@ -739,7 +739,7 @@ controls {

-Signals

+Signals

Certain UNIX signals cause the name server to take specific actions, as described in the following table. These signals can Modified: stable/7/contrib/bind9/doc/arm/Bv9ARM.ch04.html ============================================================================== --- stable/7/contrib/bind9/doc/arm/Bv9ARM.ch04.html Mon Mar 29 22:59:35 2010 (r205867) +++ stable/7/contrib/bind9/doc/arm/Bv9ARM.ch04.html Mon Mar 29 23:00:45 2010 (r205868) @@ -1,5 +1,5 @@ - + @@ -49,29 +49,29 @@

Dynamic Update
The journal file
Incremental Zone Transfers (IXFR)
-
Split DNS
-
Example split DNS setup
+
Split DNS
+
Example split DNS setup
TSIG
-
Generate Shared Keys for Each Pair of Hosts
-
Copying the Shared Secret to Both Machines
-
Informing the Servers of the Key's Existence
-
Instructing the Server to Use the Key
-
TSIG Key Based Access Control
-
Errors
+
Generate Shared Keys for Each Pair of Hosts
+
Copying the Shared Secret to Both Machines
+
Informing the Servers of the Key's Existence
+
Instructing the Server to Use the Key
+
TSIG Key Based Access Control
+
Errors
-
TKEY
-
SIG(0)
+
TKEY
+
SIG(0)
DNSSEC
-
Generating Keys
-
Signing the Zone
-
Configuring Servers
+
Generating Keys
+
Signing the Zone
+
Configuring Servers
-
IPv6 Support in BIND 9
+
IPv6 Support in BIND 9
-
Address Lookups Using AAAA Records
-
Address to Name Lookups Using Nibble Format
+
Address Lookups Using AAAA Records
+
Address to Name Lookups Using Nibble Format
@@ -205,7 +205,7 @@

-Split DNS

+Split DNS

Setting up different views, or visibility, of the DNS space to internal and external resolvers is usually referred to as a @@ -235,7 +235,7 @@

-Example split DNS setup

+Example split DNS setup

Let's say a company named Example, Inc. (example.com) @@ -481,7 +481,7 @@ nameserver 172.16.72.4

-Generate Shared Keys for Each Pair of Hosts

+Generate Shared Keys for Each Pair of Hosts

A shared secret is generated to be shared between host1 and host2. An arbitrary key name is chosen: "host1-host2.". The key name must @@ -489,7 +489,7 @@ nameserver 172.16.72.4

-Automatic Generation

+Automatic Generation

The following command will generate a 128-bit (16 byte) HMAC-MD5 key as described above. Longer keys are better, but shorter keys @@ -514,7 +514,7 @@ nameserver 172.16.72.4

-Manual Generation

+Manual Generation

The shared secret is simply a random sequence of bits, encoded in base-64. Most ASCII strings are valid base-64 strings (assuming @@ -529,7 +529,7 @@ nameserver 172.16.72.4

-Copying the Shared Secret to Both Machines

+Copying the Shared Secret to Both Machines

This is beyond the scope of DNS. A secure transport mechanism should be used. This could be secure FTP, ssh, telephone, etc. @@ -537,7 +537,7 @@ nameserver 172.16.72.4

-Informing the Servers of the Key's Existence

+Informing the Servers of the Key's Existence

Imagine host1 and host 2 are @@ -566,7 +566,7 @@ key host1-host2. {

-Instructing the Server to Use the Key

+Instructing the Server to Use the Key

Since keys are shared between two hosts only, the server must be told when keys are to be used. The following is added to the named.conf file @@ -598,7 +598,7 @@ server 10.1.2.3 {

-TSIG Key Based Access Control

+TSIG Key Based Access Control

BIND allows IP addresses and ranges to be specified in ACL @@ -626,7 +626,7 @@ allow-update { key host1-host2. ;};

-Errors

+Errors

The processing of TSIG signed messages can result in several errors. If a signed message is sent to a non-TSIG aware @@ -652,7 +652,7 @@ allow-update { key host1-host2. ;};

-TKEY

+TKEY

TKEY is a mechanism for automatically generating a shared secret between two hosts. There are several "modes" of @@ -688,7 +688,7 @@ allow-update { key host1-host2. ;};

-SIG(0)

+SIG(0)

BIND 9 partially supports DNSSEC SIG(0) transaction signatures as specified in RFC 2535 and RFC 2931. @@ -749,7 +749,7 @@ allow-update { key host1-host2. ;};

-Generating Keys

+Generating Keys

The dnssec-keygen program is used to generate keys. @@ -800,7 +800,7 @@ allow-update { key host1-host2. ;};

-Signing the Zone

+Signing the Zone

The dnssec-signzone program is used to @@ -844,7 +844,7 @@ allow-update { key host1-host2. ;};

-Configuring Servers

+Configuring Servers

To enable named to respond appropriately to DNS requests from DNSSEC aware clients, @@ -932,7 +932,7 @@ options {

-IPv6 Support in BIND 9

+IPv6 Support in BIND 9

BIND 9 fully supports all currently defined forms of IPv6 @@ -971,7 +971,7 @@ options {

-Address Lookups Using AAAA Records

+Address Lookups Using AAAA Records

The IPv6 AAAA record is a parallel to the IPv4 A record, and, unlike the deprecated A6 record, specifies the entire @@ -990,7 +990,7 @@ host 3600 IN AAAA

-Address to Name Lookups Using Nibble Format

+Address to Name Lookups Using Nibble Format

When looking up an address in nibble format, the address components are simply reversed, just as in IPv4, and Modified: stable/7/contrib/bind9/doc/arm/Bv9ARM.ch05.html ============================================================================== --- stable/7/contrib/bind9/doc/arm/Bv9ARM.ch05.html Mon Mar 29 22:59:35 2010 (r205867) +++ stable/7/contrib/bind9/doc/arm/Bv9ARM.ch05.html Mon Mar 29 23:00:45 2010 (r205868) @@ -1,5 +1,5 @@ - + @@ -45,13 +45,13 @@

-The Lightweight Resolver Library

+The Lightweight Resolver Library

Traditionally applications have been linked with a stub resolver library that sends recursive DNS queries to a local caching name Modified: stable/7/contrib/bind9/doc/arm/Bv9ARM.ch06.html ============================================================================== --- stable/7/contrib/bind9/doc/arm/Bv9ARM.ch06.html Mon Mar 29 22:59:35 2010 (r205867) +++ stable/7/contrib/bind9/doc/arm/Bv9ARM.ch06.html Mon Mar 29 23:00:45 2010 (r205868) @@ -1,5 +1,5 @@ - + @@ -48,52 +48,52 @@

Configuration File Elements
Address Match Lists
-
Comment Syntax
+
Comment Syntax
Configuration File Grammar
-
acl Statement Grammar
+
acl Statement Grammar
acl Statement Definition and Usage
-
controls Statement Grammar
+
controls Statement Grammar
controls Statement Definition and Usage
-
include Statement Grammar
-
include Statement Definition and +
include Statement Grammar
+
include Statement Definition and Usage
-
key Statement Grammar
-
key Statement Definition and Usage
-
logging Statement Grammar
-
logging Statement Definition and +
key Statement Grammar
+
key Statement Definition and Usage
+
logging Statement Grammar
+
logging Statement Definition and Usage
-
lwres Statement Grammar
-
lwres Statement Definition and Usage
-
masters Statement Grammar
-
masters Statement Definition and +
lwres Statement Grammar
+
lwres Statement Definition and Usage
+
masters Statement Grammar
+
masters Statement Definition and Usage
-
options Statement Grammar
+
options Statement Grammar
options Statement Definition and Usage
server Statement Grammar
server Statement Definition and Usage
-
trusted-keys Statement Grammar
-
trusted-keys Statement Definition +
trusted-keys Statement Grammar
+
trusted-keys Statement Definition and Usage
view Statement Grammar
-
view Statement Definition and Usage
+
view Statement Definition and Usage
zone Statement Grammar
-
zone Statement Definition and Usage
+
zone Statement Definition and Usage
-
Zone File
+
Zone File
Types of Resource Records and When to Use Them
-
Discussion of MX Records
+
Discussion of MX Records
Setting TTLs
-
Inverse Mapping in IPv4
-
Other Zone File Directives
-
BIND Master File Extension: the $GENERATE Directive
+
Inverse Mapping in IPv4
+
Other Zone File Directives
+
BIND Master File Extension: the $GENERATE Directive
Additional File Formats
@@ -455,7 +455,7 @@ Address Match Lists

-Syntax

+Syntax
address_match_list = address_match_list_element ;
   [ address_match_list_element; ... ]
 address_match_list_element = [ ! ] (ip_address [/length] |
@@ -464,7 +464,7 @@
 
 

-Definition and Usage

+Definition and Usage

Address match lists are primarily used to determine access control for various server operations. They are also used in @@ -542,7 +542,7 @@

-Comment Syntax

+Comment Syntax

The BIND 9 comment syntax allows for comments to appear @@ -552,7 +552,7 @@

-Syntax

+Syntax

/* This is a BIND comment as in C */
@@ -567,7 +567,7 @@

-Definition and Usage

+Definition and Usage

Comments may appear anywhere that whitespace may appear in a BIND configuration file. @@ -797,7 +797,7 @@

-acl Statement Grammar

+acl Statement Grammar
acl acl-name {
     address_match_list
 };
@@ -880,7 +880,7 @@
 
 

-controls Statement Grammar

+controls Statement Grammar
controls {
    [ inet ( ip_addr | * ) [ port ip_port ] allow {  address_match_list  }
                 keys { key_list }; ]
@@ -1002,12 +1002,12 @@
 
 

-include Statement Grammar

+include Statement Grammar
include filename;

-include Statement Definition and +include Statement Definition and Usage

The include statement inserts the @@ -1022,7 +1022,7 @@

-key Statement Grammar

+key Statement Grammar
key key_id {
     algorithm string;
     secret string;
@@ -1031,7 +1031,7 @@
 
 

-key Statement Definition and Usage

+key Statement Definition and Usage

The key statement defines a shared secret key for use with TSIG (see the section called “TSIG”) @@ -1078,7 +1078,7 @@

-logging Statement Grammar

+logging Statement Grammar
logging {
    [ channel channel_name {
      ( file path_name
@@ -1102,7 +1102,7 @@
 
 

-logging Statement Definition and +logging Statement Definition and Usage

The logging statement configures a @@ -1136,7 +1136,7 @@

-The channel Phrase

+The channel Phrase

All log output goes to one or more channels; you can make as many of them as you want. @@ -1665,7 +1665,7 @@ category notify { null; };

-The query-errors Category

+The query-errors Category

The query-errors category is specifically intended for debugging purposes: To identify @@ -1893,7 +1893,7 @@ badresp:1,adberr:0,findfail:0,valfail:0]

-lwres Statement Grammar

+lwres Statement Grammar

This is the grammar of the lwres statement in the named.conf file: @@ -1908,7 +1908,7 @@ badresp:1,adberr:0,findfail:0,valfail:0]

-lwres Statement Definition and Usage

+lwres Statement Definition and Usage

The lwres statement configures the name @@ -1959,14 +1959,14 @@ badresp:1,adberr:0,findfail:0,valfail:0]

-masters Statement Grammar

+masters Statement Grammar
 masters name [port ip_port] { ( masters_list | ip_addr [port ip_port] [key key] ) ; [...] };
 

-masters Statement Definition and +masters Statement Definition and Usage

masters lists allow for a common set of masters to be easily used by @@ -1975,7 +1975,7 @@ badresp:1,adberr:0,findfail:0,valfail:0]

-options Statement Grammar

+options Statement Grammar

This is the grammar of the options statement in the named.conf file: @@ -3086,7 +3086,7 @@ options {

-Forwarding

+Forwarding

The forwarding facility can be used to create a large site-wide cache on a few servers, reducing traffic over links to external @@ -3130,7 +3130,7 @@ options {

-Dual-stack Servers

+Dual-stack Servers

Dual-stack servers are used as servers of last resort to work around @@ -3286,7 +3286,7 @@ options {

-Interfaces

+Interfaces

The interfaces and ports that the server will answer queries from may be specified using the listen-on option. listen-on takes @@ -3719,7 +3719,7 @@ avoid-v6-udp-ports {};

-UDP Port Lists

+UDP Port Lists

use-v4-udp-ports, avoid-v4-udp-ports, @@ -3761,7 +3761,7 @@ avoid-v6-udp-ports { 40000; range 50000

-Operating System Resource Limits

+Operating System Resource Limits

The server's usage of many system resources can be limited. Scaled values are allowed when specifying resource limits. For @@ -3922,7 +3922,7 @@ avoid-v6-udp-ports { 40000; range 50000

-Periodic Task Intervals

+Periodic Task Intervals
cleaning-interval

*** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Mar 29 23:36:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7DEF1065672; Mon, 29 Mar 2010 23:36:34 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C4C348FC15; Mon, 29 Mar 2010 23:36: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 o2TNaYWd005016; Mon, 29 Mar 2010 23:36:34 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2TNaYvB005000; Mon, 29 Mar 2010 23:36:34 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201003292336.o2TNaYvB005000@svn.freebsd.org> From: Jack F Vogel Date: Mon, 29 Mar 2010 23:36: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: r205869 - in head/sys: conf dev/e1000 modules/em X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Mar 2010 23:36:35 -0000 Author: jfv Date: Mon Mar 29 23:36:34 2010 New Revision: 205869 URL: http://svn.freebsd.org/changeset/base/205869 Log: Update to igb and em: em revision 7.0.0: - Using driver devclass, seperate legacy (pre-pcie) code into a seperate source file. This will at least help protect against regression issues. It compiles along with em, and is transparent to end use, devices in each appear to be 'emX'. When using em in a modular form this also allows the legacy stuff to be defined out. - Add tx and rx rings as in igb, in the 82574 this becomes actual multiqueue for the first time (2 queues) while in other PCIE adapters its just make code cleaner. - Add RX mbuf handling logic that matches igb, this will eliminate packet drops due to temporary mbuf shortage. igb revision 1.9.3: - Following the ixgbe code, use a new approach in what was called 'get_buf', the routine now has been made independent of rxeof, it now does the update to the engine TDT register, this design allows temporary mbuf resources to become non-critical, not requiring a packet to be discarded, instead it just returns and does not increment the tail pointer. - With the above change it was also unnecessary to keep 'spare' maps around, since we do not have the discard issue. - Performance tweaks and improvements to the code also. MFC in a week Added: head/sys/dev/e1000/if_lem.c (contents, props changed) head/sys/dev/e1000/if_lem.h (contents, props changed) Modified: head/sys/conf/files head/sys/dev/e1000/e1000_80003es2lan.c head/sys/dev/e1000/e1000_82571.c head/sys/dev/e1000/e1000_82575.c head/sys/dev/e1000/e1000_82575.h head/sys/dev/e1000/e1000_defines.h head/sys/dev/e1000/e1000_hw.h head/sys/dev/e1000/e1000_ich8lan.c head/sys/dev/e1000/e1000_ich8lan.h head/sys/dev/e1000/e1000_mac.c head/sys/dev/e1000/e1000_manage.c head/sys/dev/e1000/e1000_phy.c head/sys/dev/e1000/e1000_regs.h head/sys/dev/e1000/if_em.c head/sys/dev/e1000/if_em.h head/sys/dev/e1000/if_igb.c head/sys/dev/e1000/if_igb.h head/sys/modules/em/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Mon Mar 29 23:00:45 2010 (r205868) +++ head/sys/conf/files Mon Mar 29 23:36:34 2010 (r205869) @@ -912,6 +912,8 @@ dev/eisa/eisa_if.m standard dev/eisa/eisaconf.c optional eisa dev/e1000/if_em.c optional em inet \ compile-with "${NORMAL_C} -I$S/dev/e1000" +dev/e1000/if_lem.c optional em inet \ + compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/if_igb.c optional igb inet \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_80003es2lan.c optional em | igb \ Modified: head/sys/dev/e1000/e1000_80003es2lan.c ============================================================================== --- head/sys/dev/e1000/e1000_80003es2lan.c Mon Mar 29 23:00:45 2010 (r205868) +++ head/sys/dev/e1000/e1000_80003es2lan.c Mon Mar 29 23:36:34 2010 (r205869) @@ -231,7 +231,9 @@ static s32 e1000_init_mac_params_80003es mac->rar_entry_count = E1000_RAR_ENTRIES; /* Set if part includes ASF firmware */ mac->asf_firmware_present = TRUE; - /* Set if manageability features are enabled. */ + /* FWSM register */ + mac->has_fwsm = TRUE; + /* ARC supported; valid only if manageability features are enabled. */ mac->arc_subsystem_valid = (E1000_READ_REG(hw, E1000_FWSM) & E1000_FWSM_MODE_MASK) ? TRUE : FALSE; Modified: head/sys/dev/e1000/e1000_82571.c ============================================================================== --- head/sys/dev/e1000/e1000_82571.c Mon Mar 29 23:00:45 2010 (r205868) +++ head/sys/dev/e1000/e1000_82571.c Mon Mar 29 23:36:34 2010 (r205869) @@ -313,10 +313,6 @@ static s32 e1000_init_mac_params_82571(s mac->rar_entry_count = E1000_RAR_ENTRIES; /* Set if part includes ASF firmware */ mac->asf_firmware_present = TRUE; - /* Set if manageability features are enabled. */ - mac->arc_subsystem_valid = - (E1000_READ_REG(hw, E1000_FWSM) & E1000_FWSM_MODE_MASK) - ? TRUE : FALSE; /* Adaptive IFS supported */ mac->adaptive_ifs = TRUE; @@ -357,6 +353,16 @@ static s32 e1000_init_mac_params_82571(s mac->ops.set_lan_id = e1000_set_lan_id_single_port; mac->ops.check_mng_mode = e1000_check_mng_mode_generic; mac->ops.led_on = e1000_led_on_generic; + + /* FWSM register */ + mac->has_fwsm = TRUE; + /* + * ARC supported; valid only if manageability features are + * enabled. + */ + mac->arc_subsystem_valid = + (E1000_READ_REG(hw, E1000_FWSM) & E1000_FWSM_MODE_MASK) + ? TRUE : FALSE; break; case e1000_82574: case e1000_82583: @@ -367,6 +373,9 @@ static s32 e1000_init_mac_params_82571(s default: mac->ops.check_mng_mode = e1000_check_mng_mode_generic; mac->ops.led_on = e1000_led_on_generic; + + /* FWSM register */ + mac->has_fwsm = TRUE; break; } @@ -1076,9 +1085,10 @@ static s32 e1000_init_hw_82571(struct e1 /* ...for both queues. */ switch (mac->type) { case e1000_82573: + e1000_enable_tx_pkt_filtering_generic(hw); + /* fall through */ case e1000_82574: case e1000_82583: - e1000_enable_tx_pkt_filtering_generic(hw); reg_data = E1000_READ_REG(hw, E1000_GCR); reg_data |= E1000_GCR_L1_ACT_WITHOUT_L0S_RX; E1000_WRITE_REG(hw, E1000_GCR, reg_data); @@ -1364,7 +1374,7 @@ static s32 e1000_setup_link_82571(struct static s32 e1000_setup_copper_link_82571(struct e1000_hw *hw) { u32 ctrl; - s32 ret_val; + s32 ret_val; DEBUGFUNC("e1000_setup_copper_link_82571"); Modified: head/sys/dev/e1000/e1000_82575.c ============================================================================== --- head/sys/dev/e1000/e1000_82575.c Mon Mar 29 23:00:45 2010 (r205868) +++ head/sys/dev/e1000/e1000_82575.c Mon Mar 29 23:36:34 2010 (r205869) @@ -289,7 +289,9 @@ static s32 e1000_init_mac_params_82575(s mac->rar_entry_count = E1000_RAR_ENTRIES_82580; /* Set if part includes ASF firmware */ mac->asf_firmware_present = TRUE; - /* Set if manageability features are enabled. */ + /* FWSM register */ + mac->has_fwsm = TRUE; + /* ARC supported; valid only if manageability features are enabled. */ mac->arc_subsystem_valid = (E1000_READ_REG(hw, E1000_FWSM) & E1000_FWSM_MODE_MASK) ? TRUE : FALSE; @@ -1435,13 +1437,12 @@ static void e1000_config_collision_dist_ static void e1000_power_down_phy_copper_82575(struct e1000_hw *hw) { struct e1000_phy_info *phy = &hw->phy; - struct e1000_mac_info *mac = &hw->mac; if (!(phy->ops.check_reset_block)) return; /* If the management interface is not enabled, then power down */ - if (!(mac->ops.check_mng_mode(hw) || phy->ops.check_reset_block(hw))) + if (!(e1000_enable_mng_pass_thru(hw) || phy->ops.check_reset_block(hw))) e1000_power_down_phy_copper(hw); return; @@ -1646,14 +1647,23 @@ out: **/ void e1000_vmdq_set_loopback_pf(struct e1000_hw *hw, bool enable) { - u32 dtxswc = E1000_READ_REG(hw, E1000_DTXSWC); + u32 dtxswc; + + switch (hw->mac.type) { + case e1000_82576: + dtxswc = E1000_READ_REG(hw, E1000_DTXSWC); + if (enable) + dtxswc |= E1000_DTXSWC_VMDQ_LOOPBACK_EN; + else + dtxswc &= ~E1000_DTXSWC_VMDQ_LOOPBACK_EN; + E1000_WRITE_REG(hw, E1000_DTXSWC, dtxswc); + break; + default: + /* Currently no other hardware supports loopback */ + break; + } - if (enable) - dtxswc |= E1000_DTXSWC_VMDQ_LOOPBACK_EN; - else - dtxswc &= ~E1000_DTXSWC_VMDQ_LOOPBACK_EN; - E1000_WRITE_REG(hw, E1000_DTXSWC, dtxswc); } /** Modified: head/sys/dev/e1000/e1000_82575.h ============================================================================== --- head/sys/dev/e1000/e1000_82575.h Mon Mar 29 23:00:45 2010 (r205868) +++ head/sys/dev/e1000/e1000_82575.h Mon Mar 29 23:36:34 2010 (r205869) @@ -49,8 +49,8 @@ * For 82576, there are an additional set of RARs that begin at an offset * separate from the first set of RARs. */ -#define E1000_RAR_ENTRIES_82575 16 -#define E1000_RAR_ENTRIES_82576 24 +#define E1000_RAR_ENTRIES_82575 16 +#define E1000_RAR_ENTRIES_82576 24 #define E1000_RAR_ENTRIES_82580 24 #define E1000_SW_SYNCH_MB 0x00000100 #define E1000_STAT_DEV_RST_SET 0x00100000 @@ -425,6 +425,7 @@ struct e1000_adv_tx_context_desc { #define E1000_VMOLR_STRVLAN 0x40000000 /* Vlan stripping enable */ #define E1000_VMOLR_STRCRC 0x80000000 /* CRC stripping enable */ + #define E1000_VLVF_ARRAY_SIZE 32 #define E1000_VLVF_VLANID_MASK 0x00000FFF #define E1000_VLVF_POOLSEL_SHIFT 12 Modified: head/sys/dev/e1000/e1000_defines.h ============================================================================== --- head/sys/dev/e1000/e1000_defines.h Mon Mar 29 23:00:45 2010 (r205868) +++ head/sys/dev/e1000/e1000_defines.h Mon Mar 29 23:36:34 2010 (r205869) @@ -314,6 +314,11 @@ #define E1000_MANC_SMB_DATA_OUT_SHIFT 28 /* SMBus Data Out Shift */ #define E1000_MANC_SMB_CLK_OUT_SHIFT 29 /* SMBus Clock Out Shift */ +#define E1000_MANC2H_PORT_623 0x00000020 /* Port 0x26f */ +#define E1000_MANC2H_PORT_664 0x00000040 /* Port 0x298 */ +#define E1000_MDEF_PORT_623 0x00000800 /* Port 0x26f */ +#define E1000_MDEF_PORT_664 0x00000400 /* Port 0x298 */ + /* Receive Control */ #define E1000_RCTL_RST 0x00000001 /* Software reset */ #define E1000_RCTL_EN 0x00000002 /* enable */ @@ -418,6 +423,8 @@ * PHYRST_N pin */ #define E1000_CTRL_EXT_LINK_EN 0x00010000 /* enable link status from external * LINK_0 and LINK_1 pins */ +#define E1000_CTRL_LANPHYPC_OVERRIDE 0x00010000 /* SW control of LANPHYPC */ +#define E1000_CTRL_LANPHYPC_VALUE 0x00020000 /* SW value of LANPHYPC */ #define E1000_CTRL_SWDPIN0 0x00040000 /* SWDPIN 0 value */ #define E1000_CTRL_SWDPIN1 0x00080000 /* SWDPIN 1 value */ #define E1000_CTRL_SWDPIN2 0x00100000 /* SWDPIN 2 value */ @@ -953,6 +960,8 @@ #define E1000_EICS_OTHER E1000_EICR_OTHER /* Interrupt Cause Active */ #define E1000_EITR_ITR_INT_MASK 0x0000FFFF +/* E1000_EITR_CNT_IGNR is only for 82576 and newer */ +#define E1000_EITR_CNT_IGNR 0x80000000 /* Don't reset counters on write */ /* Transmit Descriptor Control */ #define E1000_TXDCTL_PTHRESH 0x0000003F /* TXDCTL Prefetch Threshold */ @@ -1380,6 +1389,9 @@ #define PCI_HEADER_TYPE_MULTIFUNC 0x80 #define PCIE_LINK_WIDTH_MASK 0x3F0 #define PCIE_LINK_WIDTH_SHIFT 4 +#define PCIE_LINK_SPEED_MASK 0x0F +#define PCIE_LINK_SPEED_2500 0x01 +#define PCIE_LINK_SPEED_5000 0x02 #define PCIE_DEVICE_CONTROL2_16ms 0x0005 #ifndef ETH_ADDR_LEN @@ -1410,7 +1422,7 @@ #define BME1000_E_PHY_ID_R2 0x01410CB1 #define I82577_E_PHY_ID 0x01540050 #define I82578_E_PHY_ID 0x004DD040 -#define I82580_I_PHY_ID 0x015403A0 +#define I82580_I_PHY_ID 0x015403A0 #define IGP04E1000_E_PHY_ID 0x02A80391 #define M88_VENDOR 0x0141 @@ -1507,6 +1519,7 @@ #define M88E1000_EPSCR_TX_CLK_25 0x0070 /* 25 MHz TX_CLK */ #define M88E1000_EPSCR_TX_CLK_0 0x0000 /* NO TX_CLK */ + /* M88EC018 Rev 2 specific DownShift settings */ #define M88EC018_EPSCR_DOWNSHIFT_COUNTER_MASK 0x0E00 #define M88EC018_EPSCR_DOWNSHIFT_COUNTER_1X 0x0000 Modified: head/sys/dev/e1000/e1000_hw.h ============================================================================== --- head/sys/dev/e1000/e1000_hw.h Mon Mar 29 23:00:45 2010 (r205868) +++ head/sys/dev/e1000/e1000_hw.h Mon Mar 29 23:36:34 2010 (r205869) @@ -122,6 +122,7 @@ struct e1000_hw; #define E1000_DEV_ID_ICH10_R_BM_V 0x10CE #define E1000_DEV_ID_ICH10_D_BM_LM 0x10DE #define E1000_DEV_ID_ICH10_D_BM_LF 0x10DF + #define E1000_DEV_ID_PCH_M_HV_LM 0x10EA #define E1000_DEV_ID_PCH_M_HV_LC 0x10EB #define E1000_DEV_ID_PCH_D_HV_DM 0x10EF @@ -682,6 +683,7 @@ struct e1000_mac_info { u8 forced_speed_duplex; bool adaptive_ifs; + bool has_fwsm; bool arc_subsystem_valid; bool asf_firmware_present; bool autoneg; Modified: head/sys/dev/e1000/e1000_ich8lan.c ============================================================================== --- head/sys/dev/e1000/e1000_ich8lan.c Mon Mar 29 23:00:45 2010 (r205868) +++ head/sys/dev/e1000/e1000_ich8lan.c Mon Mar 29 23:36:34 2010 (r205869) @@ -177,6 +177,7 @@ union ich8_hws_flash_regacc { static s32 e1000_init_phy_params_pchlan(struct e1000_hw *hw) { struct e1000_phy_info *phy = &hw->phy; + u32 ctrl; s32 ret_val = E1000_SUCCESS; DEBUGFUNC("e1000_init_phy_params_pchlan"); @@ -199,6 +200,35 @@ static s32 e1000_init_phy_params_pchlan( phy->ops.power_down = e1000_power_down_phy_copper_ich8lan; phy->autoneg_mask = AUTONEG_ADVERTISE_SPEED_DEFAULT; + if ((hw->mac.type == e1000_pchlan) && + (!(E1000_READ_REG(hw, E1000_FWSM) & E1000_ICH_FWSM_FW_VALID))) { + + /* + * The MAC-PHY interconnect may still be in SMBus mode + * after Sx->S0. Toggle the LANPHYPC Value bit to force + * the interconnect to PCIe mode, but only if there is no + * firmware present otherwise firmware will have done it. + */ + ctrl = E1000_READ_REG(hw, E1000_CTRL); + ctrl |= E1000_CTRL_LANPHYPC_OVERRIDE; + ctrl &= ~E1000_CTRL_LANPHYPC_VALUE; + E1000_WRITE_REG(hw, E1000_CTRL, ctrl); + usec_delay(10); + ctrl &= ~E1000_CTRL_LANPHYPC_OVERRIDE; + E1000_WRITE_REG(hw, E1000_CTRL, ctrl); + msec_delay(50); + } + + /* + * Reset the PHY before any acccess to it. Doing so, ensures that + * the PHY is in a known good state before we read/write PHY registers. + * The generic reset is sufficient here, because we haven't determined + * the PHY type yet. + */ + ret_val = e1000_phy_hw_reset_generic(hw); + if (ret_val) + goto out; + phy->id = e1000_phy_unknown; ret_val = e1000_get_phy_id(hw); if (ret_val) @@ -225,6 +255,7 @@ static s32 e1000_init_phy_params_pchlan( phy->ops.get_cable_length = e1000_get_cable_length_82577; phy->ops.get_info = e1000_get_phy_info_82577; phy->ops.commit = e1000_phy_sw_reset_generic; + break; case e1000_phy_82578: phy->ops.check_polarity = e1000_check_polarity_m88; phy->ops.force_speed_duplex = e1000_phy_force_speed_duplex_m88; @@ -431,8 +462,10 @@ static s32 e1000_init_mac_params_ich8lan mac->rar_entry_count--; /* Set if part includes ASF firmware */ mac->asf_firmware_present = TRUE; - /* Set if manageability features are enabled. */ - mac->arc_subsystem_valid = TRUE; + /* FWSM register */ + mac->has_fwsm = TRUE; + /* ARC subsystem not supported */ + mac->arc_subsystem_valid = FALSE; /* Adaptive IFS supported */ mac->adaptive_ifs = TRUE; @@ -764,6 +797,9 @@ static s32 e1000_check_reset_block_ich8l DEBUGFUNC("e1000_check_reset_block_ich8lan"); + if (hw->phy.reset_disable) + return E1000_BLK_PHY_RESET; + fwsm = E1000_READ_REG(hw, E1000_FWSM); return (fwsm & E1000_ICH_FWSM_RSPCIPHY) ? E1000_SUCCESS @@ -2684,6 +2720,7 @@ static s32 e1000_reset_hw_ich8lan(struct DEBUGOUT("Auto Read Done did not complete\n"); } } + /* Dummy read to clear the phy wakeup bit after lcd reset */ if (hw->mac.type == e1000_pchlan) hw->phy.ops.read_reg(hw, BM_WUC, ®); @@ -2857,6 +2894,14 @@ static void e1000_initialize_hw_bits_ich E1000_WRITE_REG(hw, E1000_STATUS, reg); } + /* + * work-around descriptor data corruption issue during nfs v2 udp + * traffic, just disable the nfs filtering capability + */ + reg = E1000_READ_REG(hw, E1000_RFCTL); + reg |= (E1000_RFCTL_NFSW_DIS | E1000_RFCTL_NFSR_DIS); + E1000_WRITE_REG(hw, E1000_RFCTL, reg); + return; } Modified: head/sys/dev/e1000/e1000_ich8lan.h ============================================================================== --- head/sys/dev/e1000/e1000_ich8lan.h Mon Mar 29 23:00:45 2010 (r205868) +++ head/sys/dev/e1000/e1000_ich8lan.h Mon Mar 29 23:36:34 2010 (r205869) @@ -167,6 +167,9 @@ #define HV_KMRN_MODE_CTRL PHY_REG(769, 16) #define HV_KMRN_MDIO_SLOW 0x0400 +/* PHY Power Management Control */ +#define HV_PM_CTRL PHY_REG(770, 17) + #define SW_FLAG_TIMEOUT 1000 /* SW Semaphore flag timeout in milliseconds */ /* @@ -192,7 +195,6 @@ #define E1000_RXDEXT_LINKSEC_ERROR_REPLAY_ERROR 0x40000000 #define E1000_RXDEXT_LINKSEC_ERROR_BAD_SIG 0x60000000 - void e1000_set_kmrn_lock_loss_workaround_ich8lan(struct e1000_hw *hw, bool state); void e1000_igp3_phy_powerdown_workaround_ich8lan(struct e1000_hw *hw); Modified: head/sys/dev/e1000/e1000_mac.c ============================================================================== --- head/sys/dev/e1000/e1000_mac.c Mon Mar 29 23:00:45 2010 (r205868) +++ head/sys/dev/e1000/e1000_mac.c Mon Mar 29 23:36:34 2010 (r205869) @@ -225,17 +225,30 @@ s32 e1000_get_bus_info_pcie_generic(stru DEBUGFUNC("e1000_get_bus_info_pcie_generic"); bus->type = e1000_bus_type_pci_express; - bus->speed = e1000_bus_speed_2500; ret_val = e1000_read_pcie_cap_reg(hw, PCIE_LINK_STATUS, &pcie_link_status); - if (ret_val) + if (ret_val) { bus->width = e1000_bus_width_unknown; - else + bus->speed = e1000_bus_speed_unknown; + } else { + switch (pcie_link_status & PCIE_LINK_SPEED_MASK) { + case PCIE_LINK_SPEED_2500: + bus->speed = e1000_bus_speed_2500; + break; + case PCIE_LINK_SPEED_5000: + bus->speed = e1000_bus_speed_5000; + break; + default: + bus->speed = e1000_bus_speed_unknown; + break; + } + bus->width = (enum e1000_bus_width)((pcie_link_status & PCIE_LINK_WIDTH_MASK) >> PCIE_LINK_WIDTH_SHIFT); + } mac->ops.set_lan_id(hw); Modified: head/sys/dev/e1000/e1000_manage.c ============================================================================== --- head/sys/dev/e1000/e1000_manage.c Mon Mar 29 23:00:45 2010 (r205868) +++ head/sys/dev/e1000/e1000_manage.c Mon Mar 29 23:36:34 2010 (r205869) @@ -78,6 +78,12 @@ s32 e1000_mng_enable_host_if_generic(str DEBUGFUNC("e1000_mng_enable_host_if_generic"); + if (!(hw->mac.arc_subsystem_valid)) { + DEBUGOUT("ARC subsystem not valid.\n"); + ret_val = -E1000_ERR_HOST_INTERFACE_COMMAND; + goto out; + } + /* Check that the host interface is enabled. */ hicr = E1000_READ_REG(hw, E1000_HICR); if ((hicr & E1000_HICR_EN) == 0) { @@ -365,7 +371,7 @@ bool e1000_enable_mng_pass_thru(struct e if (!(manc & E1000_MANC_RCV_TCO_EN)) goto out; - if (hw->mac.arc_subsystem_valid) { + if (hw->mac.has_fwsm) { fwsm = E1000_READ_REG(hw, E1000_FWSM); factps = E1000_READ_REG(hw, E1000_FACTPS); @@ -375,12 +381,23 @@ bool e1000_enable_mng_pass_thru(struct e ret_val = TRUE; goto out; } - } else { - if ((manc & E1000_MANC_SMBUS_EN) && - !(manc & E1000_MANC_ASF_EN)) { + } else if ((hw->mac.type == e1000_82574) || + (hw->mac.type == e1000_82583)) { + u16 data; + + factps = E1000_READ_REG(hw, E1000_FACTPS); + e1000_read_nvm(hw, NVM_INIT_CONTROL2_REG, 1, &data); + + if (!(factps & E1000_FACTPS_MNGCG) && + ((data & E1000_NVM_INIT_CTRL2_MNGM) == + (e1000_mng_mode_pt << 13))) { ret_val = TRUE; goto out; } + } else if ((manc & E1000_MANC_SMBUS_EN) && + !(manc & E1000_MANC_ASF_EN)) { + ret_val = TRUE; + goto out; } out: Modified: head/sys/dev/e1000/e1000_phy.c ============================================================================== --- head/sys/dev/e1000/e1000_phy.c Mon Mar 29 23:00:45 2010 (r205868) +++ head/sys/dev/e1000/e1000_phy.c Mon Mar 29 23:36:34 2010 (r205869) @@ -3402,9 +3402,7 @@ s32 e1000_check_polarity_82577(struct e1 * e1000_phy_force_speed_duplex_82577 - Force speed/duplex for I82577 PHY * @hw: pointer to the HW structure * - * Calls the PHY setup function to force speed and duplex. Clears the - * auto-crossover to force MDI manually. Waits for link and returns - * successful if link up is successful, else -E1000_ERR_PHY (-2). + * Calls the PHY setup function to force speed and duplex. **/ s32 e1000_phy_force_speed_duplex_82577(struct e1000_hw *hw) { @@ -3425,23 +3423,6 @@ s32 e1000_phy_force_speed_duplex_82577(s if (ret_val) goto out; - /* - * Clear Auto-Crossover to force MDI manually. 82577 requires MDI - * forced whenever speed and duplex are forced. - */ - ret_val = phy->ops.read_reg(hw, I82577_PHY_CTRL_2, &phy_data); - if (ret_val) - goto out; - - phy_data &= ~I82577_PHY_CTRL2_AUTO_MDIX; - phy_data &= ~I82577_PHY_CTRL2_FORCE_MDI_MDIX; - - ret_val = phy->ops.write_reg(hw, I82577_PHY_CTRL_2, phy_data); - if (ret_val) - goto out; - - DEBUGOUT1("I82577_PHY_CTRL_2: %X\n", phy_data); - usec_delay(1); if (phy->autoneg_wait_to_complete) { Modified: head/sys/dev/e1000/e1000_regs.h ============================================================================== --- head/sys/dev/e1000/e1000_regs.h Mon Mar 29 23:00:45 2010 (r205868) +++ head/sys/dev/e1000/e1000_regs.h Mon Mar 29 23:36:34 2010 (r205869) @@ -65,7 +65,7 @@ #define E1000_IAM 0x000E0 /* Interrupt Acknowledge Auto Mask */ #define E1000_IVAR 0x000E4 /* Interrupt Vector Allocation Register - RW */ #define E1000_SVCR 0x000F0 -#define E1000_SVT 0x000F4 +#define E1000_SVT 0x000F4 #define E1000_RCTL 0x00100 /* Rx Control - RW */ #define E1000_FCTTV 0x00170 /* Flow Control Transmit Timer Value - RW */ #define E1000_TXCW 0x00178 /* Tx Configuration Word - RW */ @@ -282,6 +282,17 @@ #define E1000_ICRXOC 0x04124 /* Interrupt Cause Receiver Overrun Count */ #define E1000_CRC_OFFSET 0x05F50 /* CRC Offset register */ +/* Virtualization statistical counters */ +#define E1000_PFVFGPRC(_n) (0x010010 + (0x100 * (_n))) +#define E1000_PFVFGPTC(_n) (0x010014 + (0x100 * (_n))) +#define E1000_PFVFGORC(_n) (0x010018 + (0x100 * (_n))) +#define E1000_PFVFGOTC(_n) (0x010034 + (0x100 * (_n))) +#define E1000_PFVFMPRC(_n) (0x010038 + (0x100 * (_n))) +#define E1000_PFVFGPRLBC(_n) (0x010040 + (0x100 * (_n))) +#define E1000_PFVFGPTLBC(_n) (0x010044 + (0x100 * (_n))) +#define E1000_PFVFGORLBC(_n) (0x010048 + (0x100 * (_n))) +#define E1000_PFVFGOTLBC(_n) (0x010050 + (0x100 * (_n))) + #define E1000_LSECTXUT 0x04300 /* LinkSec Tx Untagged Packet Count - OutPktsUntagged */ #define E1000_LSECTXPKTE 0x04304 /* LinkSec Encrypted Tx Packets Count - OutPktsEncrypted */ #define E1000_LSECTXPKTP 0x04308 /* LinkSec Protected Tx Packet Count - OutPktsProtected */ @@ -386,6 +397,7 @@ #define E1000_KMRNCTRLSTA 0x00034 /* MAC-PHY interface - RW */ #define E1000_MDPHYA 0x0003C /* PHY address - RW */ #define E1000_MANC2H 0x05860 /* Management Control To Host - RW */ +#define E1000_MDEF(_n) (0x05890 + (4 * (_n))) /* Mngmt Decision Filters */ #define E1000_SW_FW_SYNC 0x05B5C /* Software-Firmware Synchronization - RW */ #define E1000_CCMCTL 0x05B48 /* CCM Control Register */ #define E1000_GIOCTL 0x05B44 /* GIO Analog Control Register */ Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Mon Mar 29 23:00:45 2010 (r205868) +++ head/sys/dev/e1000/if_em.c Mon Mar 29 23:36:34 2010 (r205869) @@ -35,7 +35,6 @@ #ifdef HAVE_KERNEL_OPTION_HEADERS #include "opt_device_polling.h" #include "opt_inet.h" -#include "opt_altq.h" #endif #include @@ -55,9 +54,7 @@ #include #include #include -#if __FreeBSD_version >= 700029 #include -#endif #include #include @@ -95,7 +92,7 @@ int em_display_debug_stats = 0; /********************************************************************* * Driver version: *********************************************************************/ -char em_driver_version[] = "6.9.25"; +char em_driver_version[] = "7.0.0"; /********************************************************************* @@ -111,51 +108,6 @@ char em_driver_version[] = "6.9.25"; static em_vendor_info_t em_vendor_info_array[] = { /* Intel(R) PRO/1000 Network Connection */ - { 0x8086, E1000_DEV_ID_82540EM, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82540EM_LOM, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82540EP, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82540EP_LOM, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82540EP_LP, PCI_ANY_ID, PCI_ANY_ID, 0}, - - { 0x8086, E1000_DEV_ID_82541EI, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82541ER, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82541ER_LOM, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82541EI_MOBILE, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82541GI, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82541GI_LF, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82541GI_MOBILE, PCI_ANY_ID, PCI_ANY_ID, 0}, - - { 0x8086, E1000_DEV_ID_82542, PCI_ANY_ID, PCI_ANY_ID, 0}, - - { 0x8086, E1000_DEV_ID_82543GC_FIBER, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82543GC_COPPER, PCI_ANY_ID, PCI_ANY_ID, 0}, - - { 0x8086, E1000_DEV_ID_82544EI_COPPER, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82544EI_FIBER, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82544GC_COPPER, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82544GC_LOM, PCI_ANY_ID, PCI_ANY_ID, 0}, - - { 0x8086, E1000_DEV_ID_82545EM_COPPER, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82545EM_FIBER, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82545GM_COPPER, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82545GM_FIBER, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82545GM_SERDES, PCI_ANY_ID, PCI_ANY_ID, 0}, - - { 0x8086, E1000_DEV_ID_82546EB_COPPER, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82546EB_FIBER, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82546EB_QUAD_COPPER, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82546GB_COPPER, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82546GB_FIBER, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82546GB_SERDES, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82546GB_PCIE, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82546GB_QUAD_COPPER, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3, - PCI_ANY_ID, PCI_ANY_ID, 0}, - - { 0x8086, E1000_DEV_ID_82547EI, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82547EI_MOBILE, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82547GI, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82571EB_COPPER, PCI_ANY_ID, PCI_ANY_ID, 0}, { 0x8086, E1000_DEV_ID_82571EB_FIBER, PCI_ANY_ID, PCI_ANY_ID, 0}, { 0x8086, E1000_DEV_ID_82571EB_SERDES, PCI_ANY_ID, PCI_ANY_ID, 0}, @@ -238,10 +190,11 @@ static int em_shutdown(device_t); static int em_suspend(device_t); static int em_resume(device_t); static void em_start(struct ifnet *); -static void em_start_locked(struct ifnet *ifp); +static void em_start_locked(struct ifnet *, struct tx_ring *); #if __FreeBSD_version >= 800000 static int em_mq_start(struct ifnet *, struct mbuf *); -static int em_mq_start_locked(struct ifnet *, struct mbuf *); +static int em_mq_start_locked(struct ifnet *, + struct tx_ring *, struct mbuf *); static void em_qflush(struct ifnet *); #endif static int em_ioctl(struct ifnet *, u_long, caddr_t); @@ -252,55 +205,49 @@ static void em_media_status(struct ifnet static int em_media_change(struct ifnet *); static void em_identify_hardware(struct adapter *); static int em_allocate_pci_resources(struct adapter *); -static int em_allocate_legacy(struct adapter *adapter); -static int em_allocate_msix(struct adapter *adapter); +static int em_allocate_legacy(struct adapter *); +static int em_allocate_msix(struct adapter *); +static int em_allocate_queues(struct adapter *); static int em_setup_msix(struct adapter *); static void em_free_pci_resources(struct adapter *); static void em_local_timer(void *); -static int em_hardware_init(struct adapter *); +static void em_reset(struct adapter *); static void em_setup_interface(device_t, struct adapter *); + static void em_setup_transmit_structures(struct adapter *); static void em_initialize_transmit_unit(struct adapter *); +static int em_allocate_transmit_buffers(struct tx_ring *); +static void em_free_transmit_structures(struct adapter *); +static void em_free_transmit_buffers(struct tx_ring *); + static int em_setup_receive_structures(struct adapter *); +static int em_allocate_receive_buffers(struct rx_ring *); static void em_initialize_receive_unit(struct adapter *); +static void em_free_receive_structures(struct adapter *); +static void em_free_receive_buffers(struct rx_ring *); + static void em_enable_intr(struct adapter *); static void em_disable_intr(struct adapter *); -static void em_free_transmit_structures(struct adapter *); -static void em_free_receive_structures(struct adapter *); static void em_update_stats_counters(struct adapter *); -static void em_txeof(struct adapter *); -static void em_tx_purge(struct adapter *); -static int em_allocate_receive_structures(struct adapter *); -static int em_allocate_transmit_structures(struct adapter *); -static int em_rxeof(struct adapter *, int); +static bool em_txeof(struct tx_ring *); +static int em_rxeof(struct rx_ring *, int); #ifndef __NO_STRICT_ALIGNMENT -static int em_fixup_rx(struct adapter *); +static int em_fixup_rx(struct rx_ring *); #endif -static void em_receive_checksum(struct adapter *, struct e1000_rx_desc *, - struct mbuf *); -static void em_transmit_checksum_setup(struct adapter *, struct mbuf *, - u32 *, u32 *); -#if __FreeBSD_version >= 700000 -static bool em_tso_setup(struct adapter *, struct mbuf *, +static void em_receive_checksum(struct e1000_rx_desc *, struct mbuf *); +static void em_transmit_checksum_setup(struct tx_ring *, struct mbuf *, u32 *, u32 *); -#endif /* FreeBSD_version >= 700000 */ +static bool em_tso_setup(struct tx_ring *, struct mbuf *, u32 *, u32 *); static void em_set_promisc(struct adapter *); static void em_disable_promisc(struct adapter *); static void em_set_multi(struct adapter *); static void em_print_hw_stats(struct adapter *); static void em_update_link_status(struct adapter *); -static int em_get_buf(struct adapter *, int); -#if __FreeBSD_version >= 700029 +static void em_refresh_mbufs(struct rx_ring *, int); static void em_register_vlan(void *, struct ifnet *, u16); static void em_unregister_vlan(void *, struct ifnet *, u16); static void em_setup_vlan_hw_support(struct adapter *); -#endif -static int em_xmit(struct adapter *, struct mbuf **); -static void em_smartspeed(struct adapter *); -static int em_82547_fifo_workaround(struct adapter *, int); -static void em_82547_update_fifo_head(struct adapter *, int); -static int em_82547_tx_fifo_reset(struct adapter *); -static void em_82547_move_tail(void *); +static int em_xmit(struct tx_ring *, struct mbuf **); static int em_dma_malloc(struct adapter *, bus_size_t, struct em_dma_alloc *, int); static void em_dma_free(struct adapter *, struct em_dma_alloc *); @@ -309,8 +256,6 @@ static void em_print_nvm_info(struct ada static int em_is_valid_ether_addr(u8 *); static int em_sysctl_stats(SYSCTL_HANDLER_ARGS); static int em_sysctl_debug_info(SYSCTL_HANDLER_ARGS); -static u32 em_fill_descriptors (bus_addr_t address, u32 length, - PDESC_ARRAY desc_array); static int em_sysctl_int_delay(SYSCTL_HANDLER_ARGS); static void em_add_int_delay_sysctl(struct adapter *, const char *, const char *, struct em_int_delay_info *, int, int); @@ -323,27 +268,18 @@ static void em_get_wakeup(device_t); static void em_enable_wakeup(device_t); static int em_enable_phy_wakeup(struct adapter *); -#ifdef EM_LEGACY_IRQ -static void em_intr(void *); -#else /* FAST IRQ */ -#if __FreeBSD_version < 700000 -static void em_irq_fast(void *); -#else static int em_irq_fast(void *); -#endif /* MSIX handlers */ static void em_msix_tx(void *); static void em_msix_rx(void *); static void em_msix_link(void *); -static void em_handle_rx(void *context, int pending); static void em_handle_tx(void *context, int pending); - -static void em_handle_rxtx(void *context, int pending); +static void em_handle_rx(void *context, int pending); static void em_handle_link(void *context, int pending); + static void em_add_rx_process_limit(struct adapter *, const char *, const char *, int *, int); -#endif /* ~EM_LEGACY_IRQ */ #ifdef DEVICE_POLLING static poll_handler_t em_poll; @@ -368,7 +304,7 @@ static driver_t em_driver = { "em", em_methods, sizeof(struct adapter), }; -static devclass_t em_devclass; +devclass_t em_devclass; DRIVER_MODULE(em, pci, em_driver, em_devclass, 0, 0); MODULE_DEPEND(em, pci, 1, 1, 1); MODULE_DEPEND(em, ether, 1, 1, 1); @@ -388,31 +324,35 @@ MODULE_DEPEND(em, ether, 1, 1, 1); static int em_tx_int_delay_dflt = EM_TICKS_TO_USECS(EM_TIDV); static int em_rx_int_delay_dflt = EM_TICKS_TO_USECS(EM_RDTR); -static int em_tx_abs_int_delay_dflt = EM_TICKS_TO_USECS(EM_TADV); -static int em_rx_abs_int_delay_dflt = EM_TICKS_TO_USECS(EM_RADV); -static int em_rxd = EM_DEFAULT_RXD; -static int em_txd = EM_DEFAULT_TXD; -static int em_smart_pwr_down = FALSE; -/* Controls whether promiscuous also shows bad packets */ -static int em_debug_sbp = FALSE; -/* Local switch for MSI/MSIX */ -static int em_enable_msi = TRUE; - TUNABLE_INT("hw.em.tx_int_delay", &em_tx_int_delay_dflt); TUNABLE_INT("hw.em.rx_int_delay", &em_rx_int_delay_dflt); + +static int em_tx_abs_int_delay_dflt = EM_TICKS_TO_USECS(EM_TADV); +static int em_rx_abs_int_delay_dflt = EM_TICKS_TO_USECS(EM_RADV); TUNABLE_INT("hw.em.tx_abs_int_delay", &em_tx_abs_int_delay_dflt); TUNABLE_INT("hw.em.rx_abs_int_delay", &em_rx_abs_int_delay_dflt); + +static int em_rxd = EM_DEFAULT_RXD; +static int em_txd = EM_DEFAULT_TXD; TUNABLE_INT("hw.em.rxd", &em_rxd); TUNABLE_INT("hw.em.txd", &em_txd); + +static int em_smart_pwr_down = FALSE; TUNABLE_INT("hw.em.smart_pwr_down", &em_smart_pwr_down); + +/* Controls whether promiscuous also shows bad packets */ +static int em_debug_sbp = FALSE; TUNABLE_INT("hw.em.sbp", &em_debug_sbp); -TUNABLE_INT("hw.em.enable_msi", &em_enable_msi); -#ifndef EM_LEGACY_IRQ +/* Local controls for MSI/MSIX */ +static int em_enable_msix = TRUE; +static int em_msix_queues = 2; /* for 82574, can be 1 or 2 */ +TUNABLE_INT("hw.em.enable_msix", &em_enable_msix); +TUNABLE_INT("hw.em.msix_queues", &em_msix_queues); + /* How many packets rxeof tries to clean at a time */ static int em_rx_process_limit = 100; TUNABLE_INT("hw.em.rx_process_limit", &em_rx_process_limit); -#endif /* Flow control setting - default to FULL */ static int em_fc_setting = e1000_fc_full; @@ -494,7 +434,6 @@ static int em_attach(device_t dev) { struct adapter *adapter; - int tsize, rsize; int error = 0; INIT_DEBUGOUT("em_attach: begin"); @@ -502,8 +441,6 @@ em_attach(device_t dev) adapter = device_get_softc(dev); adapter->dev = adapter->osdep.dev = dev; EM_CORE_LOCK_INIT(adapter, device_get_nameunit(dev)); - EM_TX_LOCK_INIT(adapter, device_get_nameunit(dev)); - EM_RX_LOCK_INIT(adapter, device_get_nameunit(dev)); /* SYSCTL stuff */ SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), @@ -517,7 +454,6 @@ em_attach(device_t dev) em_sysctl_stats, "I", "Statistics"); callout_init_mtx(&adapter->timer, &adapter->core_mtx, 0); - callout_init_mtx(&adapter->tx_fifo_timer, &adapter->tx_mtx, 0); /* Determine hardware and mac info */ em_identify_hardware(adapter); @@ -571,25 +507,21 @@ em_attach(device_t dev) em_add_int_delay_sysctl(adapter, "tx_int_delay", "transmit interrupt delay in usecs", &adapter->tx_int_delay, E1000_REGISTER(&adapter->hw, E1000_TIDV), em_tx_int_delay_dflt); - if (adapter->hw.mac.type >= e1000_82540) { - em_add_int_delay_sysctl(adapter, "rx_abs_int_delay", - "receive interrupt delay limit in usecs", - &adapter->rx_abs_int_delay, - E1000_REGISTER(&adapter->hw, E1000_RADV), - em_rx_abs_int_delay_dflt); - em_add_int_delay_sysctl(adapter, "tx_abs_int_delay", - "transmit interrupt delay limit in usecs", - &adapter->tx_abs_int_delay, - E1000_REGISTER(&adapter->hw, E1000_TADV), - em_tx_abs_int_delay_dflt); - } + em_add_int_delay_sysctl(adapter, "rx_abs_int_delay", + "receive interrupt delay limit in usecs", + &adapter->rx_abs_int_delay, + E1000_REGISTER(&adapter->hw, E1000_RADV), + em_rx_abs_int_delay_dflt); + em_add_int_delay_sysctl(adapter, "tx_abs_int_delay", + "transmit interrupt delay limit in usecs", + &adapter->tx_abs_int_delay, + E1000_REGISTER(&adapter->hw, E1000_TADV), + em_tx_abs_int_delay_dflt); -#ifndef EM_LEGACY_IRQ /* Sysctls for limiting the amount of work done in the taskqueue */ em_add_rx_process_limit(adapter, "rx_processing_limit", "max number of rx packets to process", &adapter->rx_process_limit, em_rx_process_limit); -#endif /* * Validate number of transmit and receive descriptors. It @@ -597,18 +529,15 @@ em_attach(device_t dev) * of E1000_DBA_ALIGN. */ if (((em_txd * sizeof(struct e1000_tx_desc)) % EM_DBA_ALIGN) != 0 || - (adapter->hw.mac.type >= e1000_82544 && em_txd > EM_MAX_TXD) || - (adapter->hw.mac.type < e1000_82544 && em_txd > EM_MAX_TXD_82543) || - (em_txd < EM_MIN_TXD)) { + (em_txd > EM_MAX_TXD) || (em_txd < EM_MIN_TXD)) { device_printf(dev, "Using %d TX descriptors instead of %d!\n", EM_DEFAULT_TXD, em_txd); adapter->num_tx_desc = EM_DEFAULT_TXD; } else adapter->num_tx_desc = em_txd; + if (((em_rxd * sizeof(struct e1000_rx_desc)) % EM_DBA_ALIGN) != 0 || - (adapter->hw.mac.type >= e1000_82544 && em_rxd > EM_MAX_RXD) || - (adapter->hw.mac.type < e1000_82544 && em_rxd > EM_MAX_RXD_82543) || - (em_rxd < EM_MIN_RXD)) { + (em_rxd > EM_MAX_RXD) || (em_rxd < EM_MIN_RXD)) { device_printf(dev, "Using %d RX descriptors instead of %d!\n", EM_DEFAULT_RXD, em_rxd); adapter->num_rx_desc = EM_DEFAULT_RXD; @@ -618,10 +547,6 @@ em_attach(device_t dev) adapter->hw.mac.autoneg = DO_AUTO_NEG; adapter->hw.phy.autoneg_wait_to_complete = FALSE; adapter->hw.phy.autoneg_advertised = AUTONEG_ADV_DEFAULT; - adapter->rx_buffer_len = 2048; - - e1000_init_script_state_82541(&adapter->hw, TRUE); - e1000_set_tbi_compatibility_82543(&adapter->hw, TRUE); /* Copper options */ if (adapter->hw.phy.media_type == e1000_media_type_copper) { @@ -643,29 +568,13 @@ em_attach(device_t dev) */ adapter->hw.mac.report_tx_early = 1; - tsize = roundup2(adapter->num_tx_desc * sizeof(struct e1000_tx_desc), - EM_DBA_ALIGN); - - /* Allocate Transmit Descriptor ring */ - if (em_dma_malloc(adapter, tsize, &adapter->txdma, BUS_DMA_NOWAIT)) { - device_printf(dev, "Unable to allocate tx_desc memory\n"); - error = ENOMEM; - goto err_tx_desc; - } - adapter->tx_desc_base = - (struct e1000_tx_desc *)adapter->txdma.dma_vaddr; - - rsize = roundup2(adapter->num_rx_desc * sizeof(struct e1000_rx_desc), - EM_DBA_ALIGN); - - /* Allocate Receive Descriptor ring */ - if (em_dma_malloc(adapter, rsize, &adapter->rxdma, BUS_DMA_NOWAIT)) { - device_printf(dev, "Unable to allocate rx_desc memory\n"); + /* + ** Get queue/ring memory + */ + if (em_allocate_queues(adapter)) { error = ENOMEM; - goto err_rx_desc; + goto err_pci; } - adapter->rx_desc_base = - (struct e1000_rx_desc *)adapter->rxdma.dma_vaddr; /* ** Start from a known state, this is @@ -685,7 +594,7 @@ em_attach(device_t dev) device_printf(dev, "The EEPROM Checksum Is Not Valid\n"); error = EIO; - goto err_hw_init; + goto err_late; } } @@ -694,45 +603,24 @@ em_attach(device_t dev) device_printf(dev, "EEPROM read error while reading MAC" " address\n"); error = EIO; - goto err_hw_init; + goto err_late; } if (!em_is_valid_ether_addr(adapter->hw.mac.addr)) { device_printf(dev, "Invalid MAC address\n"); error = EIO; - goto err_hw_init; - } - - /* Initialize the hardware */ - if (em_hardware_init(adapter)) { - device_printf(dev, "Unable to initialize the hardware\n"); - error = EIO; - goto err_hw_init; - } - - /* Allocate transmit descriptors and buffers */ - if (em_allocate_transmit_structures(adapter)) { - device_printf(dev, "Could not setup transmit structures\n"); - error = ENOMEM; - goto err_tx_struct; - } - - /* Allocate receive descriptors and buffers */ - if (em_allocate_receive_structures(adapter)) { - device_printf(dev, "Could not setup receive structures\n"); - error = ENOMEM; - goto err_rx_struct; + goto err_late; } /* ** Do interrupt configuration */ - if (adapter->msi > 1) /* Do MSI/X */ + if (adapter->msix > 1) /* Do MSIX */ error = em_allocate_msix(adapter); else /* MSI or Legacy */ error = em_allocate_legacy(adapter); if (error) - goto err_rx_struct; + goto err_late; /* * Get Wake-on-Lan and Management info for later use @@ -742,6 +630,8 @@ em_attach(device_t dev) /* Setup OS specific network interface */ em_setup_interface(dev, adapter); + em_reset(adapter); + /* Initialize statistics */ em_update_stats_counters(adapter); @@ -753,20 +643,11 @@ em_attach(device_t dev) device_printf(dev, "PHY reset is blocked due to SOL/IDER session.\n"); - /* Do we need workaround for 82544 PCI-X adapter? */ - if (adapter->hw.bus.type == e1000_bus_type_pcix && - adapter->hw.mac.type == e1000_82544) - adapter->pcix_82544 = TRUE; - else - adapter->pcix_82544 = FALSE; - -#if __FreeBSD_version >= 700029 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 03:01:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A697106564A; Tue, 30 Mar 2010 03:01:27 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail09.syd.optusnet.com.au (mail09.syd.optusnet.com.au [211.29.132.190]) by mx1.freebsd.org (Postfix) with ESMTP id 59B678FC17; Tue, 30 Mar 2010 03:01:26 +0000 (UTC) Received: from c122-106-158-90.carlnfd1.nsw.optusnet.com.au (c122-106-158-90.carlnfd1.nsw.optusnet.com.au [122.106.158.90]) by mail09.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o2U31FfW002391 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 30 Mar 2010 14:01:18 +1100 Date: Tue, 30 Mar 2010 14:01:15 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Ed Schouten In-Reply-To: <201003281313.o2SDDMh4031408@svn.freebsd.org> Message-ID: <20100330114503.Y5269@delplex.bde.org> References: <201003281313.o2SDDMh4031408@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: r205792 - in head: lib/libc/sys sys/amd64/linux32 sys/compat/freebsd32 sys/compat/linux sys/compat/svr4 sys/i386/ibcs2 sys/i386/linux sys/kern 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, 30 Mar 2010 03:01:27 -0000 On Sun, 28 Mar 2010, Ed Schouten wrote: > Log: > Rename st_*timespec fields to st_*tim for POSIX 2008 compliance. > > A nice thing about POSIX 2008 is that it finally standardizes a way to > obtain file access/modification/change times in sub-second precision, > namely using struct timespec, which we already have for a very long > time. Unfortunately POSIX uses different names. > > This commit adds compatibility macros, so existing code should still > build properly. Also change all source code in the kernel to work > without any of the compatibility macros. This makes it all a less > ambiguous. > > I am also renaming st_birthtime to st_birthtim, even though it was a > local extension anyway. It seems Cygwin also has a st_birthtim. st_birthtime should have been st_btime (for the seconds part). Now st_btim for the timespec. Presumably POSIX chose to abbreviate "time" instead of expanding st_xtime when providing the new names so as to keep the names short, so a name like st_birthtim which is abbreviated but not short is especially bogus. > Modified: head/sys/kern/tty_pts.c > ============================================================================== > --- head/sys/kern/tty_pts.c Sun Mar 28 12:55:31 2010 (r205791) > +++ head/sys/kern/tty_pts.c Sun Mar 28 13:13:22 2010 (r205792) > @@ -556,9 +556,9 @@ ptsdev_stat(struct file *fp, struct stat > #endif /* PTS_EXTERNAL */ > sb->st_ino = sb->st_rdev = tty_udev(tp); > > - sb->st_atimespec = dev->si_atime; > - sb->st_ctimespec = dev->si_ctime; > - sb->st_mtimespec = dev->si_mtime; > + sb->st_atim = dev->si_atime; > + sb->st_ctim = dev->si_ctime; > + sb->st_mtim = dev->si_mtime; > sb->st_uid = dev->si_uid; > sb->st_gid = dev->si_gid; > sb->st_mode = dev->si_mode | S_IFCHR; > Should probably rename other xx_ytime's. But I don't like renaming. devfs is still missing support for st_btim, and this cannot be fixed here. > Modified: head/sys/kern/uipc_mqueue.c > ============================================================================== > --- head/sys/kern/uipc_mqueue.c Sun Mar 28 12:55:31 2010 (r205791) > +++ head/sys/kern/uipc_mqueue.c Sun Mar 28 13:13:22 2010 (r205792) > @@ -2447,10 +2447,10 @@ mqf_stat(struct file *fp, struct stat *s > struct mqfs_node *pn = fp->f_data; > > bzero(st, sizeof *st); > - st->st_atimespec = pn->mn_atime; > - st->st_mtimespec = pn->mn_mtime; > - st->st_ctimespec = pn->mn_ctime; > - st->st_birthtimespec = pn->mn_birth; > + st->st_atim = pn->mn_atime; > + st->st_mtim = pn->mn_mtime; > + st->st_ctim = pn->mn_ctime; > + st->st_birthtim = pn->mn_birth; > st->st_uid = pn->mn_uid; > st->st_gid = pn->mn_gid; > st->st_mode = S_IFIFO | pn->mn_mode; > As for si_ytime's, but not missing support for st_btim and different (more) bogus name for mn_btim. Similarly for some other xx_ytime's. > Modified: head/sys/sys/_timespec.h > ============================================================================== > --- head/sys/sys/_timespec.h Sun Mar 28 12:55:31 2010 (r205791) > +++ head/sys/sys/_timespec.h Sun Mar 28 13:13:22 2010 (r205792) > @@ -31,26 +31,18 @@ > * $FreeBSD$ > */ > > -/* > - * Prerequisite: > - * > - * This file must be kept synchronized with . > - * It defines a structure which must be a type pun for > - * `struct timespec'; this structure is used in header files where > - * the ABI uses a `struct timespec' but standards prohibit its > - * definition. (Currently only .) > - * > - * XXX should just declare struct __timespec as necessary. It's simple, > - * so is easy to keep synchronized, and hopefully not needed in as many > - * places as struct timespec, so we don't need this extra header. > - * Perhaps we don't need timespec.h either. > - */ The second paragraph still applies, even more than before. This file is more bogus than before. If the first comment (about "Currently only") was still correct, then this file is now completely bogus. In fact, the first comment was still correct -- this file is only included by . Thus this file is now bogus -- struct timespec is now standard pollution in . > - > #ifndef _SYS__TIMESPEC_H_ > #define _SYS__TIMESPEC_H_ > > -struct __timespec { > - __time_t tv_sec; /* seconds */ > +#include > + > +#ifndef _TIME_T_DECLARED > +typedef __time_t time_t; > +#define _TIME_T_DECLARED > +#endif > + > +struct timespec { > + time_t tv_sec; /* seconds */ > long tv_nsec; /* and nanoseconds */ > }; > As also mentioned in the deleted but still relevant comment, there yet another timespec file -- sys/timespec.h. It also declares struct timespec, and in the current organization it is the file that is supposed to be included to get the declaration of struct timespec when this declararation is not pollution. However, this file also declares struct itimerspec, and maybe that pollution is not yet permitted in by POSIX. POSIX's man page for sys/stat.h doesn't mention struct itimerspec. In fact, struct itimerspec seems to be just recent breakage (by pollution) of sys/timespec.h. There are currently only 3 other headers that include sys/timespec.h: time.h, sys/select.h and sys/time.h. None of these use struct itimerspec. struct itimerspec is only used in sys/timers.h, which pollutes itself by including sys/time.h (which itself is massively polluted by including ). OTOH, is non-polluted to a fault. In POSIX, struct itimerspec is supposed to be declared in , and so are the functions that use it. FreeBSD's and don't seem to be mentioned in POSIX, and 's lack of fault includes not including either of these, so the POSIX interfaces involving struct itimerspec can't be accessed in the normal way under FreeBSD. Bugs in this area used to be limited to the decomposition of and being almost perfectly backwards, with holding almost all time interfaces in POSIX and holding (via nested pollution) almost all time interfaces in FreeBSD. The first steps to untangle this would be: - move the declaration of struct itimerspec from sys/timespec.h to sys/timers.h, thus unpolluting the former - remove sys/_timespec.h, and use sys/timespec.h instead of it in the place where it is used (sys/stat.h). Although I was responsible for many of them, I don't like most of the little sys/_foo.h headers. They just avoid a few ifdefs and a few duplicates of struct declarations, at a cost of 10 times as much code consisting mainly of copyright comments and silly compile-time costs for many more includes and parsing of copyright comments... struct timespec is so simple that repeating its declaration is better. Ifdefs still tend to be needed for things like the time_t typedef and avoiding 1 ifdef for the struct doesn't provide much avoidance of duplication. > Modified: head/sys/sys/stat.h > ============================================================================== > --- head/sys/sys/stat.h Sun Mar 28 12:55:31 2010 (r205791) > +++ head/sys/sys/stat.h Sun Mar 28 13:13:22 2010 (r205792) > @@ -39,6 +39,7 @@ > #define _SYS_STAT_H_ > > #include > +#include Can include sys/timespec.h after fixing it. > #include > > #ifndef _BLKSIZE_T_DECLARED > @@ -86,11 +87,6 @@ typedef __off_t off_t; > #define _OFF_T_DECLARED > #endif > > -#ifndef _TIME_T_DECLARED > -typedef __time_t time_t; > -#define _TIME_T_DECLARED > -#endif > - Also not needed when sys/timespec.h is used. > #ifndef _UID_T_DECLARED > typedef __uid_t uid_t; > #define _UID_T_DECLARED > @@ -98,16 +94,11 @@ typedef __uid_t uid_t; > > #if !defined(_KERNEL) && __BSD_VISIBLE > /* > - * XXX we need this for struct timespec. We get miscellaneous namespace > - * pollution with it. > + * XXX We get miscellaneous namespace pollution with this. > */ > #include > #endif > > -#if !__BSD_VISIBLE > -#include > -#endif > - But this can't be fixed so simply. We now get namespace pollution from . struct timespec is only permitted here in recent versions of POSIX. There needs to be messy _POSIX_C_SOURCE >= 2008mumble ifdefs somewhere... > #if __BSD_VISIBLE > struct ostat { > __uint16_t st_dev; /* inode's device */ > @@ -118,9 +109,9 @@ struct ostat { > __uint16_t st_gid; /* group ID of the file's group */ > __uint16_t st_rdev; /* device type */ > __int32_t st_size; /* file size, in bytes */ > - struct timespec st_atimespec; /* time of last access */ > - struct timespec st_mtimespec; /* time of last data modification */ > - struct timespec st_ctimespec; /* time of last file status change */ > + struct timespec st_atim; /* time of last access */ > + struct timespec st_mtim; /* time of last data modification */ > + struct timespec st_ctim; /* time of last file status change */ > __int32_t st_blksize; /* optimal blocksize for I/O */ > __int32_t st_blocks; /* blocks allocated for file */ > fflags_t st_flags; /* user defined flags for file */ > @@ -136,28 +127,18 @@ struct stat { > uid_t st_uid; /* user ID of the file's owner */ > gid_t st_gid; /* group ID of the file's group */ > __dev_t st_rdev; /* device type */ > -#if __BSD_VISIBLE > - struct timespec st_atimespec; /* time of last access */ > - struct timespec st_mtimespec; /* time of last data modification */ > - struct timespec st_ctimespec; /* time of last file status change */ > -#else > - time_t st_atime; /* time of last access */ > - long __st_atimensec; /* nsec of last access */ > - time_t st_mtime; /* time of last data modification */ > - long __st_mtimensec; /* nsec of last data modification */ > - time_t st_ctime; /* time of last file status change */ > - long __st_ctimensec; /* nsec of last file status change */ > -#endif > + struct timespec st_atim; /* time of last access */ > + struct timespec st_mtim; /* time of last data modification */ > + struct timespec st_ctim; /* time of last file status change */ ... and the mess of ifdefs and compatibility cruft needs to become even larger here: - pre-POSIX-2008: something like the old code - post-POSIX-2008: something like the new code Since we only want to support old POSIX applications and not old FreeBSD applications, not quite such a large mess is needed -- struct timespec must not be visible for old POSIX, but there is no need to expose the nanoseconds parts for old POSIX/FreeBSD. Hmm, this was already quite broken, and sys/_timespec.h was already almost completely bogus, since the struct __timespec carefully declared in it was almost completely unused. The old code should have used __timespec instead of timespec in the above and then it wouldn't need visibility ifdefs, provided compilers aren't super-sensitive to the spelling of the struct tag. The new code can do something similar to avoid ifdefs. But don't have a sys/_timespec.h just to declare struct __timespec which is only used in this file. Note that we got the declaration of struct timespec via the massive namespace pollution in sys/time.h. My version fixed the pollution long ago, except it included sys/timespec.h to directly get the much smaller amount of pollution depended on by the above (sys.stat.h never didn't depend on any other pollution): % Index: stat.h % =================================================================== % RCS file: /home/ncvs/src/sys/sys/stat.h,v % retrieving revision 1.40 % diff -u -2 -r1.40 stat.h % --- stat.h 17 Jun 2004 17:16:52 -0000 1.40 % +++ stat.h 20 Jun 2004 02:09:28 -0000 % @@ -89,13 +89,7 @@ % #endif % % -#if !defined(_KERNEL) && __BSD_VISIBLE % -/* % - * XXX we need this for struct timespec. We get miscellaneous namespace % - * pollution with it. % - */ % -#include % -#endif % - % -#if !__BSD_VISIBLE % +#if __BSD_VISIBLE % +#include % +#else % #include % #endif Apparently I never tested the !__BSD_VISIBLE case. Since struct __timespec is mostly unused, the above won't actually compile when only sys/_timespec.h is included. > @@ -166,12 +147,6 @@ struct stat { > */ > unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec)); > unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec)); > -#else > - time_t st_birthtime; /* time of file creation */ > - long st_birthtimensec; /* nsec of file creation */ > - unsigned int :(8 / 2) * (16 - (int)sizeof(struct __timespec)); > - unsigned int :(8 / 2) * (16 - (int)sizeof(struct __timespec)); > -#endif > }; > > #if __BSD_VISIBLE For some reason, this actually used struct __timespec. This was the only use of struct __timespec in any version of this file. The reason seems to have been that sys/_timespec was never used as intended, except I used it for the above 2 lines because I didn't notice its full lack of use when I wrote these lines. > @@ -200,13 +175,23 @@ struct nstat { > }; > #endif > > +#ifndef _KERNEL > +#define st_atime st_atim.tv_sec > +#define st_mtime st_mtim.tv_sec > +#define st_ctime st_ctim.tv_sec Excessive horizontal whitespace in new code. > #if __BSD_VISIBLE > -#define st_atime st_atimespec.tv_sec > -#define st_mtime st_mtimespec.tv_sec > -#define st_ctime st_ctimespec.tv_sec > -#define st_birthtime st_birthtimespec.tv_sec Subexcessive horizontal whitespace including missing tabs in old code. I wonder why we didn't use the struct for the !__BSD_VISIBLE case. It might have been due to compilers being super-sensitive to the types, or the macros being technically invalid. If so, the new macros would be technically invalid for both old-FreeBSD and old-POSIX. (In new-FreeBSD and new-POSIX, they are standard so applications are not allowed to #undef them, etc., though this is mostly undocumented.) The !__BSD_VISIBLE case was fragile since the compiler might pad the structs differently to the scalars, but I think the layout was always the same in practice. > Modified: head/sys/sys/timespec.h > ============================================================================== > --- head/sys/sys/timespec.h Sun Mar 28 12:55:31 2010 (r205791) > +++ head/sys/sys/timespec.h Sun Mar 28 13:13:22 2010 (r205792) > @@ -31,22 +31,11 @@ > * $FreeBSD$ > */ > > -/* > - * Prerequisites: , > - */ > - These should still be prerequisites. Their includes were intentionally left out, partly to inhibit direct includes of this header. > #ifndef _SYS_TIMESPEC_H_ > #define _SYS_TIMESPEC_H_ > > -#ifndef _TIME_T_DECLARED > -typedef __time_t time_t; > -#define _TIME_T_DECLARED > -#endif > - > -struct timespec { > - time_t tv_sec; /* seconds */ > - long tv_nsec; /* and nanoseconds */ > -}; > +#include > +#include It's disgusting to include sys/_timespec.h (which shouldn't exist) several layers deep just to uniquize the declaration of struct timespec. > > #if __BSD_VISIBLE > #define TIMEVAL_TO_TIMESPEC(tv, ts) \ > Here is yet more pollution in the primary timespec header. Not too bad since it is ifdefed. But this belongs near timevals, not near timespecs, since it is bogus compatibility cruft for the former. It can't even be used unless the header which declares the former is included. It should only be declared in that header, only in the kernel. That header is sys/time.h which already declares timespecs and might still do so when its pollution is removed. Bruce From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 03:29:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BBBB9106566C; Tue, 30 Mar 2010 03:29:12 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail05.syd.optusnet.com.au (mail05.syd.optusnet.com.au [211.29.132.186]) by mx1.freebsd.org (Postfix) with ESMTP id 38B388FC16; Tue, 30 Mar 2010 03:29:11 +0000 (UTC) Received: from c122-106-158-90.carlnfd1.nsw.optusnet.com.au (c122-106-158-90.carlnfd1.nsw.optusnet.com.au [122.106.158.90]) by mail05.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o2U3T5cZ020977 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 30 Mar 2010 14:29:10 +1100 Date: Tue, 30 Mar 2010 14:29:05 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Dag-Erling Smorgrav In-Reply-To: <201003291320.o2TDKqfe066476@svn.freebsd.org> Message-ID: <20100330142351.C5481@delplex.bde.org> References: <201003291320.o2TDKqfe066476@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: r205834 - head/usr.bin/calendar X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2010 03:29:12 -0000 On Mon, 29 Mar 2010, Dag-Erling Smorgrav wrote: > Log: > size_t is not equivalent to int on 64-bit platforms. Neither is it on 16-63 or 65-infinity bit platforms, since it is not signed. > Modified: head/usr.bin/calendar/parsedata.c > ============================================================================== > --- head/usr.bin/calendar/parsedata.c Mon Mar 29 12:32:16 2010 (r205833) > +++ head/usr.bin/calendar/parsedata.c Mon Mar 29 13:20:52 2010 (r205834) > @@ -39,9 +39,9 @@ __FBSDID("$FreeBSD$"); > static char *showflags(int flags); > static int isonlydigits(char *s, int nostar); > static const char *getmonthname(int i); > -static int checkmonth(char *s, int *len, int *offset, const char **month); > +static int checkmonth(char *s, size_t *len, size_t *offset, const char **month); > static const char *getdayofweekname(int i); > -static int checkdayofweek(char *s, int *len, int *offset, const char **dow); > +static int checkdayofweek(char *s, size_t *len, size_t *offset, const char **dow); len("size_t") is not equivalent to len("int") so s/size_t/int/g gives ugly formatting on some platforms. Bruce From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 06:42:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E9CE7106566B; Tue, 30 Mar 2010 06:42:01 +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 D8A7B8FC20; Tue, 30 Mar 2010 06:42: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 o2U6g1YC098574; Tue, 30 Mar 2010 06:42:01 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2U6g1Bu098561; Tue, 30 Mar 2010 06:42:01 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201003300642.o2U6g1Bu098561@svn.freebsd.org> From: Edwin Groothuis Date: Tue, 30 Mar 2010 06:42: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: r205872 - head/usr.bin/calendar X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2010 06:42:02 -0000 Author: edwin Date: Tue Mar 30 06:42:01 2010 New Revision: 205872 URL: http://svn.freebsd.org/changeset/base/205872 Log: On request of joel@: - Remove the 3rd clause of the UC Berkeley copyrighted files. - For the files added copyrighted by me, move the "All rights reserved" to the next line. Modified: head/usr.bin/calendar/calendar.1 head/usr.bin/calendar/calendar.c head/usr.bin/calendar/calendar.h head/usr.bin/calendar/dates.c head/usr.bin/calendar/day.c head/usr.bin/calendar/events.c head/usr.bin/calendar/io.c head/usr.bin/calendar/locale.c head/usr.bin/calendar/parsedata.c head/usr.bin/calendar/pathnames.h head/usr.bin/calendar/pom.c head/usr.bin/calendar/sunpos.c Modified: head/usr.bin/calendar/calendar.1 ============================================================================== --- head/usr.bin/calendar/calendar.1 Tue Mar 30 05:48:16 2010 (r205871) +++ head/usr.bin/calendar/calendar.1 Tue Mar 30 06:42:01 2010 (r205872) @@ -9,10 +9,6 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. .\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. Modified: head/usr.bin/calendar/calendar.c ============================================================================== --- head/usr.bin/calendar/calendar.c Tue Mar 30 05:48:16 2010 (r205871) +++ head/usr.bin/calendar/calendar.c Tue Mar 30 06:42:01 2010 (r205872) @@ -10,10 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. Modified: head/usr.bin/calendar/calendar.h ============================================================================== --- head/usr.bin/calendar/calendar.h Tue Mar 30 05:48:16 2010 (r205871) +++ head/usr.bin/calendar/calendar.h Tue Mar 30 06:42:01 2010 (r205872) @@ -10,10 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. Modified: head/usr.bin/calendar/dates.c ============================================================================== --- head/usr.bin/calendar/dates.c Tue Mar 30 05:48:16 2010 (r205871) +++ head/usr.bin/calendar/dates.c Tue Mar 30 06:42:01 2010 (r205872) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 1992-2009 Edwin Groothuis. All rights reserved. + * Copyright (c) 1992-2009 Edwin Groothuis . + * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/usr.bin/calendar/day.c ============================================================================== --- head/usr.bin/calendar/day.c Tue Mar 30 05:48:16 2010 (r205871) +++ head/usr.bin/calendar/day.c Tue Mar 30 06:42:01 2010 (r205872) @@ -10,10 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. Modified: head/usr.bin/calendar/events.c ============================================================================== --- head/usr.bin/calendar/events.c Tue Mar 30 05:48:16 2010 (r205871) +++ head/usr.bin/calendar/events.c Tue Mar 30 06:42:01 2010 (r205872) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 1992-2009 Edwin Groothuis. All rights reserved. + * Copyright (c) 1992-2009 Edwin Groothuis . + * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/usr.bin/calendar/io.c ============================================================================== --- head/usr.bin/calendar/io.c Tue Mar 30 05:48:16 2010 (r205871) +++ head/usr.bin/calendar/io.c Tue Mar 30 06:42:01 2010 (r205872) @@ -10,10 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. Modified: head/usr.bin/calendar/locale.c ============================================================================== --- head/usr.bin/calendar/locale.c Tue Mar 30 05:48:16 2010 (r205871) +++ head/usr.bin/calendar/locale.c Tue Mar 30 06:42:01 2010 (r205872) @@ -10,10 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. Modified: head/usr.bin/calendar/parsedata.c ============================================================================== --- head/usr.bin/calendar/parsedata.c Tue Mar 30 05:48:16 2010 (r205871) +++ head/usr.bin/calendar/parsedata.c Tue Mar 30 06:42:01 2010 (r205872) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 1992-2009 Edwin Groothuis. All rights reserved. + * Copyright (c) 1992-2009 Edwin Groothuis . + * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/usr.bin/calendar/pathnames.h ============================================================================== --- head/usr.bin/calendar/pathnames.h Tue Mar 30 05:48:16 2010 (r205871) +++ head/usr.bin/calendar/pathnames.h Tue Mar 30 06:42:01 2010 (r205872) @@ -10,10 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. Modified: head/usr.bin/calendar/pom.c ============================================================================== --- head/usr.bin/calendar/pom.c Tue Mar 30 05:48:16 2010 (r205871) +++ head/usr.bin/calendar/pom.c Tue Mar 30 06:42:01 2010 (r205872) @@ -12,10 +12,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. Modified: head/usr.bin/calendar/sunpos.c ============================================================================== --- head/usr.bin/calendar/sunpos.c Tue Mar 30 05:48:16 2010 (r205871) +++ head/usr.bin/calendar/sunpos.c Tue Mar 30 06:42:01 2010 (r205872) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2009-2010 Edwin Groothuis. All rights reserved. + * Copyright (c) 2009-2010 Edwin Groothuis . + * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 09:22:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4FCF5106564A; Tue, 30 Mar 2010 09:22:34 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3FD318FC15; Tue, 30 Mar 2010 09:22: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 o2U9MYCj034114; Tue, 30 Mar 2010 09:22:34 GMT (envelope-from maxim@svn.freebsd.org) Received: (from maxim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2U9MYFe034112; Tue, 30 Mar 2010 09:22:34 GMT (envelope-from maxim@svn.freebsd.org) Message-Id: <201003300922.o2U9MYFe034112@svn.freebsd.org> From: Maxim Konovalov Date: Tue, 30 Mar 2010 09:22: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: r205873 - head/usr.sbin/mtree X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2010 09:22:34 -0000 Author: maxim Date: Tue Mar 30 09:22:33 2010 New Revision: 205873 URL: http://svn.freebsd.org/changeset/base/205873 Log: o Remove a duplicate reference to -f flag in the SYNOPSYS section. o Improve wording. PR: docs/144407 Submitted by: gcooper MFC after: 1 week Modified: head/usr.sbin/mtree/mtree.8 Modified: head/usr.sbin/mtree/mtree.8 ============================================================================== --- head/usr.sbin/mtree/mtree.8 Tue Mar 30 06:42:01 2010 (r205872) +++ head/usr.sbin/mtree/mtree.8 Tue Mar 30 09:22:33 2010 (r205873) @@ -41,9 +41,6 @@ .Op Fl f Ar spec .Ek .Bk -words -.Op Fl f Ar spec -.Ek -.Bk -words .Op Fl K Ar keywords .Ek .Bk -words @@ -119,7 +116,7 @@ Same as except a status of 2 is returned if the file hierarchy did not match the specification. .It Fl w -Make some errorconditions non-fatal warnings. +Make some errors non-fatal warnings. .It Fl x Do not descend below mount points in the file hierarchy. .It Fl f Ar file From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 09:58:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 554921065670; Tue, 30 Mar 2010 09:58:22 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 452488FC1A; Tue, 30 Mar 2010 09:58:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2U9wMIV042086; Tue, 30 Mar 2010 09:58:22 GMT (envelope-from maxim@svn.freebsd.org) Received: (from maxim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2U9wMKX042084; Tue, 30 Mar 2010 09:58:22 GMT (envelope-from maxim@svn.freebsd.org) Message-Id: <201003300958.o2U9wMKX042084@svn.freebsd.org> From: Maxim Konovalov Date: Tue, 30 Mar 2010 09:58:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205874 - head/usr.bin/sockstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2010 09:58:22 -0000 Author: maxim Date: Tue Mar 30 09:58:21 2010 New Revision: 205874 URL: http://svn.freebsd.org/changeset/base/205874 Log: o Make sockstat -6 output more readable for long ipv6 addresses (most of them apart from ::1): put a whitespace between local and remote address:port pairs. PR: bin/145194 Submitted by: Fedor Dikarev MFC after: 2 weeks Modified: head/usr.bin/sockstat/sockstat.c Modified: head/usr.bin/sockstat/sockstat.c ============================================================================== --- head/usr.bin/sockstat/sockstat.c Tue Mar 30 09:22:33 2010 (r205873) +++ head/usr.bin/sockstat/sockstat.c Tue Mar 30 09:58:21 2010 (r205874) @@ -621,6 +621,8 @@ display(void) case AF_INET: case AF_INET6: pos += printaddr(s->family, &s->laddr); + if (s->family == AF_INET6 && pos >= 58) + pos += xprintf(" "); while (pos < 58) pos += xprintf(" "); pos += printaddr(s->family, &s->faddr); From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 11:19:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82AA8106566C; Tue, 30 Mar 2010 11:19:30 +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 6EBC78FC12; Tue, 30 Mar 2010 11:19: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 o2UBJU9L063189; Tue, 30 Mar 2010 11:19:30 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UBJUAr063181; Tue, 30 Mar 2010 11:19:30 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201003301119.o2UBJUAr063181@svn.freebsd.org> From: Attilio Rao Date: Tue, 30 Mar 2010 11:19:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205875 - in stable/8/sys: amd64/amd64 amd64/include amd64/isa i386/i386 i386/include i386/isa pc98/cbus X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2010 11:19:31 -0000 Author: attilio Date: Tue Mar 30 11:19:29 2010 New Revision: 205875 URL: http://svn.freebsd.org/changeset/base/205875 Log: MFC r204641, r204753: Improving the clocks auto-tunning by firstly checking if the atrtc may be correctly initialized and just then assign to softclock/profclock. Sponsored by: Sandvine Incorporated Modified: stable/8/sys/amd64/amd64/local_apic.c stable/8/sys/amd64/include/apicvar.h stable/8/sys/amd64/isa/clock.c stable/8/sys/i386/i386/local_apic.c stable/8/sys/i386/include/apicvar.h stable/8/sys/i386/isa/clock.c stable/8/sys/pc98/cbus/clock.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/amd64/amd64/local_apic.c ============================================================================== --- stable/8/sys/amd64/amd64/local_apic.c Tue Mar 30 09:58:21 2010 (r205874) +++ stable/8/sys/amd64/amd64/local_apic.c Tue Mar 30 11:19:29 2010 (r205875) @@ -149,6 +149,7 @@ extern inthand_t IDTVEC(rsvd); volatile lapic_t *lapic; vm_paddr_t lapic_paddr; static u_long lapic_timer_divisor, lapic_timer_period, lapic_timer_hz; +static enum lapic_clock clockcoverage; static void lapic_enable(void); static void lapic_resume(struct pic *pic); @@ -160,9 +161,6 @@ static uint32_t lvt_mode(struct lapic *l struct pic lapic_pic = { .pic_resume = lapic_resume }; -static int lapic_allclocks; -TUNABLE_INT("machdep.lapic_allclocks", &lapic_allclocks); - static uint32_t lvt_mode(struct lapic *la, u_int pin, uint32_t value) { @@ -423,17 +421,20 @@ lapic_disable_pmc(void) * local APIC only for the hardclock and 0 if none of them can be handled. */ enum lapic_clock -lapic_setup_clock(void) +lapic_setup_clock(enum lapic_clock srcsdes) { u_long value; int i; - /* Can't drive the timer without a local APIC. */ - if (lapic == NULL) - return (LAPIC_CLOCK_NONE); + /* lapic_setup_clock() should not be called with LAPIC_CLOCK_NONE. */ + MPASS(srcsdes != LAPIC_CLOCK_NONE); - if (resource_int_value("apic", 0, "clock", &i) == 0 && i == 0) - return (LAPIC_CLOCK_NONE); + /* Can't drive the timer without a local APIC. */ + if (lapic == NULL || + (resource_int_value("apic", 0, "clock", &i) == 0 && i == 0)) { + clockcoverage = LAPIC_CLOCK_NONE; + return (clockcoverage); + } /* Start off with a divisor of 2 (power on reset default). */ lapic_timer_divisor = 2; @@ -469,7 +470,7 @@ lapic_setup_clock(void) * Please note that stathz and profhz are set only if all the * clocks are handled through the local APIC. */ - if (lapic_allclocks != 0) { + if (srcsdes == LAPIC_CLOCK_ALL) { if (hz >= 1500) lapic_timer_hz = hz; else if (hz >= 750) @@ -479,7 +480,7 @@ lapic_setup_clock(void) } else lapic_timer_hz = hz; lapic_timer_period = value / lapic_timer_hz; - if (lapic_allclocks != 0) { + if (srcsdes == LAPIC_CLOCK_ALL) { if (lapic_timer_hz < 128) stathz = lapic_timer_hz; else @@ -493,7 +494,8 @@ lapic_setup_clock(void) */ lapic_timer_periodic(lapic_timer_period); lapic_timer_enable_intr(); - return (lapic_allclocks == 0 ? LAPIC_CLOCK_HARDCLOCK : LAPIC_CLOCK_ALL); + clockcoverage = srcsdes; + return (srcsdes); } void @@ -796,7 +798,7 @@ lapic_handle_timer(struct trapframe *fra else hardclock_cpu(TRAPF_USERMODE(frame)); } - if (lapic_allclocks != 0) { + if (clockcoverage == LAPIC_CLOCK_ALL) { /* Fire statclock at stathz. */ la->la_stat_ticks += stathz; Modified: stable/8/sys/amd64/include/apicvar.h ============================================================================== --- stable/8/sys/amd64/include/apicvar.h Tue Mar 30 09:58:21 2010 (r205874) +++ stable/8/sys/amd64/include/apicvar.h Tue Mar 30 11:19:29 2010 (r205875) @@ -230,7 +230,7 @@ int lapic_set_lvt_triggermode(u_int apic enum intr_trigger trigger); void lapic_set_tpr(u_int vector); void lapic_setup(int boot); -enum lapic_clock lapic_setup_clock(void); +enum lapic_clock lapic_setup_clock(enum lapic_clock srcsdes); #endif /* !LOCORE */ #endif /* _MACHINE_APICVAR_H_ */ Modified: stable/8/sys/amd64/isa/clock.c ============================================================================== --- stable/8/sys/amd64/isa/clock.c Tue Mar 30 09:58:21 2010 (r205874) +++ stable/8/sys/amd64/isa/clock.c Tue Mar 30 11:19:29 2010 (r205875) @@ -84,6 +84,9 @@ TUNABLE_INT("hw.i8254.freq", &i8254_freq int i8254_max_count; static int i8254_real_max_count; +static int lapic_allclocks; +TUNABLE_INT("machdep.lapic_allclocks", &lapic_allclocks); + struct mtx clock_lock; static struct intsrc *i8254_intsrc; static u_int32_t i8254_lastcount; @@ -478,8 +481,22 @@ startrtclock() void cpu_initclocks() { + enum lapic_clock tlsca; + int tasc; + + /* Initialize RTC. */ + atrtc_start(); + tasc = atrtc_setup_clock(); + + /* + * If the atrtc successfully initialized and the users didn't force + * otherwise use the LAPIC in order to cater hardclock only, otherwise + * take in charge all the clock sources. + */ + tlsca = (lapic_allclocks == 0 && tasc != 0) ? LAPIC_CLOCK_HARDCLOCK : + LAPIC_CLOCK_ALL; + using_lapic_timer = lapic_setup_clock(tlsca); - using_lapic_timer = lapic_setup_clock(); /* * If we aren't using the local APIC timer to drive the kernel * clocks, setup the interrupt handler for the 8254 timer 0 so @@ -500,9 +517,6 @@ cpu_initclocks() set_i8254_freq(i8254_freq, hz); } - /* Initialize RTC. */ - atrtc_start(); - /* * If the separate statistics clock hasn't been explicility disabled * and we aren't already using the local APIC timer to drive the @@ -510,7 +524,7 @@ cpu_initclocks() * drive statclock() and profclock(). */ if (using_lapic_timer != LAPIC_CLOCK_ALL) { - using_atrtc_timer = atrtc_setup_clock(); + using_atrtc_timer = tasc; if (using_atrtc_timer) { /* Enable periodic interrupts from the RTC. */ intr_add_handler("rtc", 8, Modified: stable/8/sys/i386/i386/local_apic.c ============================================================================== --- stable/8/sys/i386/i386/local_apic.c Tue Mar 30 09:58:21 2010 (r205874) +++ stable/8/sys/i386/i386/local_apic.c Tue Mar 30 11:19:29 2010 (r205875) @@ -150,6 +150,7 @@ extern inthand_t IDTVEC(rsvd); volatile lapic_t *lapic; vm_paddr_t lapic_paddr; static u_long lapic_timer_divisor, lapic_timer_period, lapic_timer_hz; +static enum lapic_clock clockcoverage; static void lapic_enable(void); static void lapic_resume(struct pic *pic); @@ -161,17 +162,6 @@ static uint32_t lvt_mode(struct lapic *l struct pic lapic_pic = { .pic_resume = lapic_resume }; -/* - * The atrtc device is compiled in only if atpic is present. - * If it is not, force lapic to take care of all the clocks. - */ -#ifdef DEV_ATPIC -static int lapic_allclocks; -TUNABLE_INT("machdep.lapic_allclocks", &lapic_allclocks); -#else -static int lapic_allclocks = 1; -#endif - static uint32_t lvt_mode(struct lapic *la, u_int pin, uint32_t value) { @@ -431,17 +421,20 @@ lapic_disable_pmc(void) * that it can drive hardclock, statclock, and profclock. */ enum lapic_clock -lapic_setup_clock(void) +lapic_setup_clock(enum lapic_clock srcsdes) { u_long value; int i; - /* Can't drive the timer without a local APIC. */ - if (lapic == NULL) - return (LAPIC_CLOCK_NONE); + /* lapic_setup_clock() should not be called with LAPIC_CLOCK_NONE. */ + MPASS(srcsdes != LAPIC_CLOCK_NONE); - if (resource_int_value("apic", 0, "clock", &i) == 0 && i == 0) - return (LAPIC_CLOCK_NONE); + /* Can't drive the timer without a local APIC. */ + if (lapic == NULL || + (resource_int_value("apic", 0, "clock", &i) == 0 && i == 0)) { + clockcoverage = LAPIC_CLOCK_NONE; + return (clockcoverage); + } /* Start off with a divisor of 2 (power on reset default). */ lapic_timer_divisor = 2; @@ -477,7 +470,7 @@ lapic_setup_clock(void) * Please note that stathz and profhz are set only if all the * clocks are handled through the local APIC. */ - if (lapic_allclocks != 0) { + if (srcsdes == LAPIC_CLOCK_ALL) { if (hz >= 1500) lapic_timer_hz = hz; else if (hz >= 750) @@ -487,7 +480,7 @@ lapic_setup_clock(void) } else lapic_timer_hz = hz; lapic_timer_period = value / lapic_timer_hz; - if (lapic_allclocks != 0) { + if (srcsdes == LAPIC_CLOCK_ALL) { if (lapic_timer_hz < 128) stathz = lapic_timer_hz; else @@ -501,7 +494,8 @@ lapic_setup_clock(void) */ lapic_timer_periodic(lapic_timer_period); lapic_timer_enable_intr(); - return (lapic_allclocks == 0 ? LAPIC_CLOCK_HARDCLOCK : LAPIC_CLOCK_ALL); + clockcoverage = srcsdes; + return (srcsdes); } void @@ -804,7 +798,7 @@ lapic_handle_timer(struct trapframe *fra else hardclock_cpu(TRAPF_USERMODE(frame)); } - if (lapic_allclocks != 0) { + if (clockcoverage == LAPIC_CLOCK_ALL) { /* Fire statclock at stathz. */ la->la_stat_ticks += stathz; Modified: stable/8/sys/i386/include/apicvar.h ============================================================================== --- stable/8/sys/i386/include/apicvar.h Tue Mar 30 09:58:21 2010 (r205874) +++ stable/8/sys/i386/include/apicvar.h Tue Mar 30 11:19:29 2010 (r205875) @@ -259,7 +259,7 @@ int lapic_set_lvt_triggermode(u_int apic enum intr_trigger trigger); void lapic_set_tpr(u_int vector); void lapic_setup(int boot); -enum lapic_clock lapic_setup_clock(void); +enum lapic_clock lapic_setup_clock(enum lapic_clock srcsdes); #endif /* !LOCORE */ #endif /* _MACHINE_APICVAR_H_ */ Modified: stable/8/sys/i386/isa/clock.c ============================================================================== --- stable/8/sys/i386/isa/clock.c Tue Mar 30 09:58:21 2010 (r205874) +++ stable/8/sys/i386/isa/clock.c Tue Mar 30 11:19:29 2010 (r205875) @@ -97,6 +97,9 @@ TUNABLE_INT("hw.i8254.freq", &i8254_freq int i8254_max_count; static int i8254_real_max_count; +static int lapic_allclocks; +TUNABLE_INT("machdep.lapic_allclocks", &lapic_allclocks); + struct mtx clock_lock; static struct intsrc *i8254_intsrc; static u_int32_t i8254_lastcount; @@ -522,9 +525,24 @@ startrtclock() void cpu_initclocks() { +#ifdef DEV_APIC + enum lapic_clock tlsca; +#endif + int tasc; + + /* Initialize RTC. */ + atrtc_start(); + tasc = atrtc_setup_clock(); + /* + * If the atrtc successfully initialized and the users didn't force + * otherwise use the LAPIC in order to cater hardclock only, otherwise + * take in charge all the clock sources. + */ #ifdef DEV_APIC - using_lapic_timer = lapic_setup_clock(); + tlsca = (lapic_allclocks == 0 && tasc != 0) ? LAPIC_CLOCK_HARDCLOCK : + LAPIC_CLOCK_ALL; + using_lapic_timer = lapic_setup_clock(tlsca); #endif /* * If we aren't using the local APIC timer to drive the kernel @@ -546,9 +564,6 @@ cpu_initclocks() set_i8254_freq(i8254_freq, hz); } - /* Initialize RTC. */ - atrtc_start(); - /* * If the separate statistics clock hasn't been explicility disabled * and we aren't already using the local APIC timer to drive the @@ -556,7 +571,7 @@ cpu_initclocks() * drive statclock() and profclock(). */ if (using_lapic_timer != LAPIC_CLOCK_ALL) { - using_atrtc_timer = atrtc_setup_clock(); + using_atrtc_timer = tasc; if (using_atrtc_timer) { /* Enable periodic interrupts from the RTC. */ intr_add_handler("rtc", 8, Modified: stable/8/sys/pc98/cbus/clock.c ============================================================================== --- stable/8/sys/pc98/cbus/clock.c Tue Mar 30 09:58:21 2010 (r205874) +++ stable/8/sys/pc98/cbus/clock.c Tue Mar 30 11:19:29 2010 (r205875) @@ -93,6 +93,9 @@ TUNABLE_INT("hw.i8254.freq", &i8254_freq int i8254_max_count; static int i8254_real_max_count; +static int lapic_allclocks; +TUNABLE_INT("machdep.lapic_allclocks", &lapic_allclocks); + static struct mtx clock_lock; static struct intsrc *i8254_intsrc; static u_int32_t i8254_lastcount; @@ -432,9 +435,11 @@ startrtclock() void cpu_initclocks() { +#if defined(DEV_APIC) + enum lapic_clock tlsca; -#ifdef DEV_APIC - using_lapic_timer = lapic_setup_clock(); + tlsca = lapic_allclocks == 0 ? LAPIC_CLOCK_HARDCLOCK : LAPIC_CLOCK_ALL; + using_lapic_timer = lapic_setup_clock(tlsca); #endif /* * If we aren't using the local APIC timer to drive the kernel From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 11:46:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3AD5D106566C; Tue, 30 Mar 2010 11:46:44 +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 28B188FC13; Tue, 30 Mar 2010 11:46: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 o2UBkiTK069162; Tue, 30 Mar 2010 11:46:44 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UBkiqH069160; Tue, 30 Mar 2010 11:46:44 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201003301146.o2UBkiqH069160@svn.freebsd.org> From: Attilio Rao Date: Tue, 30 Mar 2010 11:46:44 +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: r205876 - 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: Tue, 30 Mar 2010 11:46:44 -0000 Author: attilio Date: Tue Mar 30 11:46:43 2010 New Revision: 205876 URL: http://svn.freebsd.org/changeset/base/205876 Log: MFC r205160: Checkin a facility for specifying a passthrough FIB from userland. arcconf tool by Adaptec already seems to use for identifying the Serial Number of the devices. Sponsored by: Sandvine Incorporated Modified: stable/8/sys/dev/aac/aac.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 Tue Mar 30 11:19:29 2010 (r205875) +++ stable/8/sys/dev/aac/aac.c Tue Mar 30 11:46:43 2010 (r205876) @@ -3063,7 +3063,147 @@ out: static int aac_ioctl_send_raw_srb(struct aac_softc *sc, caddr_t arg) { - return (EINVAL); + struct aac_command *cm; + struct aac_event *event; + struct aac_fib *fib; + struct aac_srb *srbcmd, *user_srb; + struct aac_sg_entry *sge; + struct aac_sg_entry64 *sge64; + void *srb_sg_address, *ureply; + uint32_t fibsize, srb_sg_bytecount; + int error, transfer_data; + + fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); + + cm = NULL; + transfer_data = 0; + fibsize = 0; + user_srb = (struct aac_srb *)arg; + + mtx_lock(&sc->aac_io_lock); + if (aac_alloc_command(sc, &cm)) { + event = malloc(sizeof(struct aac_event), M_AACBUF, + M_NOWAIT | M_ZERO); + if (event == NULL) { + error = EBUSY; + mtx_unlock(&sc->aac_io_lock); + goto out; + } + event->ev_type = AAC_EVENT_CMFREE; + event->ev_callback = aac_ioctl_event; + event->ev_arg = &cm; + aac_add_event(sc, event); + msleep(cm, &sc->aac_io_lock, 0, "aacraw", 0); + } + mtx_unlock(&sc->aac_io_lock); + + cm->cm_data = NULL; + fib = cm->cm_fib; + srbcmd = (struct aac_srb *)fib->data; + error = copyin(&user_srb->data_len, &fibsize, sizeof(uint32_t)); + if (error != 0) + goto out; + if (fibsize > (sc->aac_max_fib_size - sizeof(struct aac_fib_header))) { + error = EINVAL; + goto out; + } + error = copyin(user_srb, srbcmd, fibsize); + if (error != 0) + goto out; + srbcmd->function = 0; + srbcmd->retry_limit = 0; + if (srbcmd->sg_map.SgCount > 1) { + error = EINVAL; + goto out; + } + + /* Retrieve correct SG entries. */ + if (fibsize == (sizeof(struct aac_srb) + + srbcmd->sg_map.SgCount * sizeof(struct aac_sg_entry))) { + sge = srbcmd->sg_map.SgEntry; + sge64 = NULL; + srb_sg_bytecount = sge->SgByteCount; +#ifdef __amd64__ + srb_sg_address = (void *)(uint64_t)sge->SgAddress; +#else + srb_sg_address = (void *)sge->SgAddress; +#endif + } +#ifdef __amd64__ + else if (fibsize == (sizeof(struct aac_srb) + + srbcmd->sg_map.SgCount * sizeof(struct aac_sg_entry64))) { + sge = NULL; + sge64 = (struct aac_sg_entry64 *)srbcmd->sg_map.SgEntry; + srb_sg_bytecount = sge64->SgByteCount; + srb_sg_address = (void *)sge64->SgAddress; + if (sge64->SgAddress > 0xffffffffull && + (sc->flags & AAC_FLAGS_SG_64BIT) == 0) { + error = EINVAL; + goto out; + } + } +#endif + else { + error = EINVAL; + goto out; + } + ureply = (char *)arg + fibsize; + srbcmd->data_len = srb_sg_bytecount; + if (srbcmd->sg_map.SgCount == 1) + transfer_data = 1; + + cm->cm_sgtable = (struct aac_sg_table *)&srbcmd->sg_map; + if (transfer_data) { + cm->cm_datalen = srb_sg_bytecount; + cm->cm_data = malloc(cm->cm_datalen, M_AACBUF, M_NOWAIT); + if (cm->cm_data == NULL) { + error = ENOMEM; + goto out; + } + if (srbcmd->flags & AAC_SRB_FLAGS_DATA_IN) + cm->cm_flags |= AAC_CMD_DATAIN; + if (srbcmd->flags & AAC_SRB_FLAGS_DATA_OUT) { + cm->cm_flags |= AAC_CMD_DATAOUT; + error = copyin(srb_sg_address, cm->cm_data, + cm->cm_datalen); + if (error != 0) + goto out; + } + } + + fib->Header.Size = sizeof(struct aac_fib_header) + + sizeof(struct aac_srb); + fib->Header.XferState = + AAC_FIBSTATE_HOSTOWNED | + AAC_FIBSTATE_INITIALISED | + AAC_FIBSTATE_EMPTY | + AAC_FIBSTATE_FROMHOST | + AAC_FIBSTATE_REXPECTED | + AAC_FIBSTATE_NORM | + AAC_FIBSTATE_ASYNC | + AAC_FIBSTATE_FAST_RESPONSE; + fib->Header.Command = (sc->flags & AAC_FLAGS_SG_64BIT) != 0 ? + ScsiPortCommandU64 : ScsiPortCommand; + + mtx_lock(&sc->aac_io_lock); + aac_wait_command(cm); + mtx_unlock(&sc->aac_io_lock); + + if (transfer_data && (srbcmd->flags & AAC_SRB_FLAGS_DATA_IN) != 0) { + error = copyout(cm->cm_data, srb_sg_address, cm->cm_datalen); + if (error != 0) + goto out; + } + error = copyout(fib->data, ureply, sizeof(struct aac_srb_response)); +out: + if (cm != NULL) { + if (cm->cm_data != NULL) + free(cm->cm_data, M_AACBUF); + mtx_lock(&sc->aac_io_lock); + aac_release_command(cm); + mtx_unlock(&sc->aac_io_lock); + } + return(error); } /* From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 12:01:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A1A61106567D; Tue, 30 Mar 2010 12:01:35 +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 8F9F48FC29; Tue, 30 Mar 2010 12:01: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 o2UC1Zi9072522; Tue, 30 Mar 2010 12:01:35 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UC1ZbX072520; Tue, 30 Mar 2010 12:01:35 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201003301201.o2UC1ZbX072520@svn.freebsd.org> From: Attilio Rao Date: Tue, 30 Mar 2010 12: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: r205877 - 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: Tue, 30 Mar 2010 12:01:35 -0000 Author: attilio Date: Tue Mar 30 12:01:35 2010 New Revision: 205877 URL: http://svn.freebsd.org/changeset/base/205877 Log: MFC r205160: Checkin a facility for specifying a passthrough FIB from userland. arcconf tool by Adaptec already seems to use for identifying the Serial Number of the devices. Sponsored by: Sandvine Incorporated Modified: stable/7/sys/dev/aac/aac.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/aac/aac.c ============================================================================== --- stable/7/sys/dev/aac/aac.c Tue Mar 30 11:46:43 2010 (r205876) +++ stable/7/sys/dev/aac/aac.c Tue Mar 30 12:01:35 2010 (r205877) @@ -3067,7 +3067,147 @@ out: static int aac_ioctl_send_raw_srb(struct aac_softc *sc, caddr_t arg) { - return (EINVAL); + struct aac_command *cm; + struct aac_event *event; + struct aac_fib *fib; + struct aac_srb *srbcmd, *user_srb; + struct aac_sg_entry *sge; + struct aac_sg_entry64 *sge64; + void *srb_sg_address, *ureply; + uint32_t fibsize, srb_sg_bytecount; + int error, transfer_data; + + fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); + + cm = NULL; + transfer_data = 0; + fibsize = 0; + user_srb = (struct aac_srb *)arg; + + mtx_lock(&sc->aac_io_lock); + if (aac_alloc_command(sc, &cm)) { + event = malloc(sizeof(struct aac_event), M_AACBUF, + M_NOWAIT | M_ZERO); + if (event == NULL) { + error = EBUSY; + mtx_unlock(&sc->aac_io_lock); + goto out; + } + event->ev_type = AAC_EVENT_CMFREE; + event->ev_callback = aac_ioctl_event; + event->ev_arg = &cm; + aac_add_event(sc, event); + msleep(cm, &sc->aac_io_lock, 0, "aacraw", 0); + } + mtx_unlock(&sc->aac_io_lock); + + cm->cm_data = NULL; + fib = cm->cm_fib; + srbcmd = (struct aac_srb *)fib->data; + error = copyin(&user_srb->data_len, &fibsize, sizeof(uint32_t)); + if (error != 0) + goto out; + if (fibsize > (sc->aac_max_fib_size - sizeof(struct aac_fib_header))) { + error = EINVAL; + goto out; + } + error = copyin(user_srb, srbcmd, fibsize); + if (error != 0) + goto out; + srbcmd->function = 0; + srbcmd->retry_limit = 0; + if (srbcmd->sg_map.SgCount > 1) { + error = EINVAL; + goto out; + } + + /* Retrieve correct SG entries. */ + if (fibsize == (sizeof(struct aac_srb) + + srbcmd->sg_map.SgCount * sizeof(struct aac_sg_entry))) { + sge = srbcmd->sg_map.SgEntry; + sge64 = NULL; + srb_sg_bytecount = sge->SgByteCount; +#ifdef __amd64__ + srb_sg_address = (void *)(uint64_t)sge->SgAddress; +#else + srb_sg_address = (void *)sge->SgAddress; +#endif + } +#ifdef __amd64__ + else if (fibsize == (sizeof(struct aac_srb) + + srbcmd->sg_map.SgCount * sizeof(struct aac_sg_entry64))) { + sge = NULL; + sge64 = (struct aac_sg_entry64 *)srbcmd->sg_map.SgEntry; + srb_sg_bytecount = sge64->SgByteCount; + srb_sg_address = (void *)sge64->SgAddress; + if (sge64->SgAddress > 0xffffffffull && + (sc->flags & AAC_FLAGS_SG_64BIT) == 0) { + error = EINVAL; + goto out; + } + } +#endif + else { + error = EINVAL; + goto out; + } + ureply = (char *)arg + fibsize; + srbcmd->data_len = srb_sg_bytecount; + if (srbcmd->sg_map.SgCount == 1) + transfer_data = 1; + + cm->cm_sgtable = (struct aac_sg_table *)&srbcmd->sg_map; + if (transfer_data) { + cm->cm_datalen = srb_sg_bytecount; + cm->cm_data = malloc(cm->cm_datalen, M_AACBUF, M_NOWAIT); + if (cm->cm_data == NULL) { + error = ENOMEM; + goto out; + } + if (srbcmd->flags & AAC_SRB_FLAGS_DATA_IN) + cm->cm_flags |= AAC_CMD_DATAIN; + if (srbcmd->flags & AAC_SRB_FLAGS_DATA_OUT) { + cm->cm_flags |= AAC_CMD_DATAOUT; + error = copyin(srb_sg_address, cm->cm_data, + cm->cm_datalen); + if (error != 0) + goto out; + } + } + + fib->Header.Size = sizeof(struct aac_fib_header) + + sizeof(struct aac_srb); + fib->Header.XferState = + AAC_FIBSTATE_HOSTOWNED | + AAC_FIBSTATE_INITIALISED | + AAC_FIBSTATE_EMPTY | + AAC_FIBSTATE_FROMHOST | + AAC_FIBSTATE_REXPECTED | + AAC_FIBSTATE_NORM | + AAC_FIBSTATE_ASYNC | + AAC_FIBSTATE_FAST_RESPONSE; + fib->Header.Command = (sc->flags & AAC_FLAGS_SG_64BIT) != 0 ? + ScsiPortCommandU64 : ScsiPortCommand; + + mtx_lock(&sc->aac_io_lock); + aac_wait_command(cm); + mtx_unlock(&sc->aac_io_lock); + + if (transfer_data && (srbcmd->flags & AAC_SRB_FLAGS_DATA_IN) != 0) { + error = copyout(cm->cm_data, srb_sg_address, cm->cm_datalen); + if (error != 0) + goto out; + } + error = copyout(fib->data, ureply, sizeof(struct aac_srb_response)); +out: + if (cm != NULL) { + if (cm->cm_data != NULL) + free(cm->cm_data, M_AACBUF); + mtx_lock(&sc->aac_io_lock); + aac_release_command(cm); + mtx_unlock(&sc->aac_io_lock); + } + return(error); } /* From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 12:06:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6675A106566B; Tue, 30 Mar 2010 12:06:19 +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 54B7B8FC16; Tue, 30 Mar 2010 12: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 o2UC6JRT073605; Tue, 30 Mar 2010 12:06:19 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UC6JTM073603; Tue, 30 Mar 2010 12:06:19 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201003301206.o2UC6JTM073603@svn.freebsd.org> From: Attilio Rao Date: Tue, 30 Mar 2010 12:06:18 +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: r205878 - 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: Tue, 30 Mar 2010 12:06:19 -0000 Author: attilio Date: Tue Mar 30 12:06:18 2010 New Revision: 205878 URL: http://svn.freebsd.org/changeset/base/205878 Log: MFC r205167: Make the code more readable and compiling on 64-bits arch different than amd64. Sponsored by: Sandvine Incorporated Modified: stable/8/sys/dev/aac/aac.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 Tue Mar 30 12:01:35 2010 (r205877) +++ stable/8/sys/dev/aac/aac.c Tue Mar 30 12:06:18 2010 (r205878) @@ -3123,11 +3123,7 @@ aac_ioctl_send_raw_srb(struct aac_softc sge = srbcmd->sg_map.SgEntry; sge64 = NULL; srb_sg_bytecount = sge->SgByteCount; -#ifdef __amd64__ - srb_sg_address = (void *)(uint64_t)sge->SgAddress; -#else - srb_sg_address = (void *)sge->SgAddress; -#endif + srb_sg_address = (void *)(uintptr_t)sge->SgAddress; } #ifdef __amd64__ else if (fibsize == (sizeof(struct aac_srb) + From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 12:08:00 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 842DB106566C; Tue, 30 Mar 2010 12:08: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 7264D8FC17; Tue, 30 Mar 2010 12:08: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 o2UC80eC074019; Tue, 30 Mar 2010 12:08:00 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UC80hI074017; Tue, 30 Mar 2010 12:08:00 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201003301208.o2UC80hI074017@svn.freebsd.org> From: Attilio Rao Date: Tue, 30 Mar 2010 12:08: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: r205879 - 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: Tue, 30 Mar 2010 12:08:00 -0000 Author: attilio Date: Tue Mar 30 12:08:00 2010 New Revision: 205879 URL: http://svn.freebsd.org/changeset/base/205879 Log: MFC r205167: Make the code more readable and compiling on 64-bits arch different than amd64. Sponsored by: Sandvine Incorporated Modified: stable/7/sys/dev/aac/aac.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/aac/aac.c ============================================================================== --- stable/7/sys/dev/aac/aac.c Tue Mar 30 12:06:18 2010 (r205878) +++ stable/7/sys/dev/aac/aac.c Tue Mar 30 12:08:00 2010 (r205879) @@ -3127,11 +3127,7 @@ aac_ioctl_send_raw_srb(struct aac_softc sge = srbcmd->sg_map.SgEntry; sge64 = NULL; srb_sg_bytecount = sge->SgByteCount; -#ifdef __amd64__ - srb_sg_address = (void *)(uint64_t)sge->SgAddress; -#else - srb_sg_address = (void *)sge->SgAddress; -#endif + srb_sg_address = (void *)(uintptr_t)sge->SgAddress; } #ifdef __amd64__ else if (fibsize == (sizeof(struct aac_srb) + From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 13:46:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8764C106564A; Tue, 30 Mar 2010 13:46:41 +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 7520C8FC21; Tue, 30 Mar 2010 13:46: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 o2UDkf9T095693; Tue, 30 Mar 2010 13:46:41 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UDkePk095687; Tue, 30 Mar 2010 13:46:40 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201003301346.o2UDkePk095687@svn.freebsd.org> From: Ruslan Ermilov Date: Tue, 30 Mar 2010 13:46: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: r205880 - head/usr.sbin/config X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2010 13:46:41 -0000 Author: ru Date: Tue Mar 30 13:46:40 2010 New Revision: 205880 URL: http://svn.freebsd.org/changeset/base/205880 Log: - Handle calloc() allocation failures. - Fixed a comment. - 2 -> EXIT_FAILURE in some places. - errx() -> err() where appropriate. PR: 144644 Submitted by: Garrett Cooper Modified: head/usr.sbin/config/config.y head/usr.sbin/config/lang.l head/usr.sbin/config/main.c head/usr.sbin/config/mkmakefile.c head/usr.sbin/config/mkoptions.c Modified: head/usr.sbin/config/config.y ============================================================================== --- head/usr.sbin/config/config.y Tue Mar 30 12:08:00 2010 (r205879) +++ head/usr.sbin/config/config.y Tue Mar 30 13:46:40 2010 (r205880) @@ -166,6 +166,8 @@ Config_spec: CPU Save_id { struct cputype *cp = (struct cputype *)calloc(1, sizeof (struct cputype)); + if (cp == NULL) + err(EXIT_FAILURE, "calloc"); cp->cpu_name = $2; SLIST_INSERT_HEAD(&cputype, cp, cpu_next); } | @@ -197,6 +199,8 @@ Config_spec: struct hint *hint; hint = (struct hint *)calloc(1, sizeof (struct hint)); + if (hint == NULL) + err(EXIT_FAILURE, "calloc"); hint->hint_name = $2; STAILQ_INSERT_TAIL(&hints, hint, hint_next); hintmode = 1; @@ -331,6 +335,8 @@ newfile(char *name) struct files_name *nl; nl = (struct files_name *) calloc(1, sizeof *nl); + if (nl == NULL) + err(EXIT_FAILURE, "calloc"); nl->f_name = name; STAILQ_INSERT_TAIL(&fntab, nl, f_next); } @@ -364,6 +370,8 @@ newdev(char *name) } np = (struct device *) calloc(1, sizeof *np); + if (np == NULL) + err(EXIT_FAILURE, "calloc"); np->d_name = name; STAILQ_INSERT_TAIL(&dtab, np, d_next); } @@ -422,6 +430,8 @@ newopt(struct opt_head *list, char *name } op = (struct opt *)calloc(1, sizeof (struct opt)); + if (op == NULL) + err(EXIT_FAILURE, "calloc"); op->op_name = name; op->op_ownfile = 0; op->op_value = value; Modified: head/usr.sbin/config/lang.l ============================================================================== --- head/usr.sbin/config/lang.l Tue Mar 30 12:08:00 2010 (r205879) +++ head/usr.sbin/config/lang.l Tue Mar 30 13:46:40 2010 (r205880) @@ -33,6 +33,7 @@ #include #include +#include #include #include "y.tab.h" #include "config.h" @@ -220,6 +221,8 @@ cfgfile_add(const char *fname) struct cfgfile *cf; cf = calloc(1, sizeof(*cf)); + if (cf == NULL) + err(EXIT_FAILURE, "calloc"); assert(cf != NULL); asprintf(&cf->cfg_path, "%s", fname); STAILQ_INSERT_TAIL(&cfgfiles, cf, cfg_next); Modified: head/usr.sbin/config/main.c ============================================================================== --- head/usr.sbin/config/main.c Tue Mar 30 12:08:00 2010 (r205879) +++ head/usr.sbin/config/main.c Tue Mar 30 13:46:40 2010 (r205880) @@ -120,7 +120,7 @@ main(int argc, char **argv) if (*destdir == '\0') strlcpy(destdir, optarg, sizeof(destdir)); else - errx(2, "directory already set"); + errx(EXIT_FAILURE, "directory already set"); break; case 'g': debugging++; @@ -175,7 +175,7 @@ main(int argc, char **argv) if (mkdir(p, 0777)) err(2, "%s", p); } else if (!S_ISDIR(buf.st_mode)) - errx(2, "%s isn't a directory", p); + errx(EXIT_FAILURE, "%s isn't a directory", p); SLIST_INIT(&cputype); SLIST_INIT(&mkopt); @@ -256,7 +256,7 @@ get_srcdir(void) int i; if (realpath("../..", srcdir) == NULL) - errx(2, "Unable to find root of source tree"); + err(EXIT_FAILURE, "Unable to find root of source tree"); if ((pwd = getenv("PWD")) != NULL && *pwd == '/' && (pwd = strdup(pwd)) != NULL) { /* Remove the last two path components. */ @@ -513,7 +513,7 @@ configfile(void) } sbuf_finish(sb); /* - * We print first part of the tamplate, replace our tag with + * We print first part of the template, replace our tag with * configuration files content and later continue writing our * template. */ @@ -650,6 +650,8 @@ remember(const char *file) } } hl = calloc(1, sizeof(*hl)); + if (hl == NULL) + err(EXIT_FAILURE, "calloc"); hl->h_name = s; hl->h_next = htab; htab = hl; @@ -671,19 +673,19 @@ kernconfdump(const char *file) r = open(file, O_RDONLY); if (r == -1) - errx(EXIT_FAILURE, "Couldn't open file '%s'", file); + err(EXIT_FAILURE, "Couldn't open file '%s'", file); error = fstat(r, &st); if (error == -1) - errx(EXIT_FAILURE, "fstat() failed"); + err(EXIT_FAILURE, "fstat() failed"); if (S_ISDIR(st.st_mode)) errx(EXIT_FAILURE, "'%s' is a directory", file); fp = fdopen(r, "r"); if (fp == NULL) - errx(EXIT_FAILURE, "fdopen() failed"); + err(EXIT_FAILURE, "fdopen() failed"); osz = 1024; o = calloc(1, osz); if (o == NULL) - errx(EXIT_FAILURE, "Couldn't allocate memory"); + err(EXIT_FAILURE, "Couldn't allocate memory"); /* ELF note section header. */ asprintf(&cmd, "/usr/bin/elfdump -c %s | grep -A 5 kern_conf" "| tail -2 | cut -d ' ' -f 2 | paste - - -", file); @@ -703,7 +705,7 @@ kernconfdump(const char *file) "INCLUDE_CONFIG_FILE", file); r = fseek(fp, off, SEEK_CUR); if (r != 0) - errx(EXIT_FAILURE, "fseek() failed"); + err(EXIT_FAILURE, "fseek() failed"); for (i = 0; i < size - 1; i++) { r = fgetc(fp); if (r == EOF) Modified: head/usr.sbin/config/mkmakefile.c ============================================================================== --- head/usr.sbin/config/mkmakefile.c Tue Mar 30 12:08:00 2010 (r205879) +++ head/usr.sbin/config/mkmakefile.c Tue Mar 30 13:46:40 2010 (r205880) @@ -98,6 +98,8 @@ new_fent(void) struct file_list *fp; fp = (struct file_list *) calloc(1, sizeof *fp); + if (fp == NULL) + err(EXIT_FAILURE, "calloc"); STAILQ_INSERT_TAIL(&ftab, fp, f_next); return (fp); } Modified: head/usr.sbin/config/mkoptions.c ============================================================================== --- head/usr.sbin/config/mkoptions.c Tue Mar 30 12:08:00 2010 (r205879) +++ head/usr.sbin/config/mkoptions.c Tue Mar 30 13:46:40 2010 (r205880) @@ -70,6 +70,8 @@ options(void) /* Fake the cpu types as options. */ SLIST_FOREACH(cp, &cputype, cpu_next) { op = (struct opt *)calloc(1, sizeof(*op)); + if (op == NULL) + err(EXIT_FAILURE, "calloc"); op->op_name = ns(cp->cpu_name); SLIST_INSERT_HEAD(&opt, op, op_next); } @@ -84,6 +86,8 @@ options(void) /* Fake MAXUSERS as an option. */ op = (struct opt *)calloc(1, sizeof(*op)); + if (op == NULL) + err(EXIT_FAILURE, "calloc"); op->op_name = ns("MAXUSERS"); snprintf(buf, sizeof(buf), "%d", maxusers); op->op_value = ns(buf); @@ -199,6 +203,8 @@ do_option(char *name) tidy++; } else { op = (struct opt *) calloc(1, sizeof *op); + if (op == NULL) + err(EXIT_FAILURE, "calloc"); op->op_name = inw; op->op_value = invalue; SLIST_INSERT_HEAD(&op_head, op, op_next); @@ -225,6 +231,8 @@ do_option(char *name) if (value && !seen) { /* New option appears */ op = (struct opt *) calloc(1, sizeof *op); + if (op == NULL) + err(EXIT_FAILURE, "calloc"); op->op_name = ns(name); op->op_value = value ? ns(value) : NULL; SLIST_INSERT_HEAD(&op_head, op, op_next); @@ -336,6 +344,8 @@ next: } po = (struct opt_list *) calloc(1, sizeof *po); + if (po == NULL) + err(EXIT_FAILURE, "calloc"); po->o_name = this; po->o_file = val; SLIST_INSERT_HEAD(&otab, po, o_next); From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 13:55:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5503B106564A; Tue, 30 Mar 2010 13:55:16 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 43A6F8FC08; Tue, 30 Mar 2010 13:55: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 o2UDtGpi097611; Tue, 30 Mar 2010 13:55:16 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UDtGG5097607; Tue, 30 Mar 2010 13:55:16 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <201003301355.o2UDtGG5097607@svn.freebsd.org> From: Ken Smith Date: Tue, 30 Mar 2010 13:55:16 +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: r205881 - 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: Tue, 30 Mar 2010 13:55:16 -0000 Author: kensmith Date: Tue Mar 30 13:55:15 2010 New Revision: 205881 URL: http://svn.freebsd.org/changeset/base/205881 Log: Turn over releng/7.3 to secteam. Approved by: core (implicit) Modified: svnadmin/conf/approvers Modified: svnadmin/conf/approvers ============================================================================== --- svnadmin/conf/approvers Tue Mar 30 13:46:40 2010 (r205880) +++ svnadmin/conf/approvers Tue Mar 30 13:55:15 2010 (r205881) @@ -19,9 +19,8 @@ #^head/ re #^stable/8/ re #^stable/7/ re -^releng/7.3/ re ^releng/8.0/ (security-officer|so) -^releng/7.[0-2]/ (security-officer|so) +^releng/7.[0-3]/ (security-officer|so) ^releng/6.[0-4]/ (security-officer|so) ^releng/5.[0-5]/ (security-officer|so) ^releng/4.[3-9]/ (security-officer|so) From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 15:25:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 845D31065670; Tue, 30 Mar 2010 15:25:16 +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 7306B8FC15; Tue, 30 Mar 2010 15:25: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 o2UFPGls017626; Tue, 30 Mar 2010 15:25:16 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UFPGtZ017624; Tue, 30 Mar 2010 15:25:16 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201003301525.o2UFPGtZ017624@svn.freebsd.org> From: Jaakko Heinonen Date: Tue, 30 Mar 2010 15:25:16 +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: r205882 - stable/7/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: Tue, 30 Mar 2010 15:25:16 -0000 Author: jh Date: Tue Mar 30 15:25:16 2010 New Revision: 205882 URL: http://svn.freebsd.org/changeset/base/205882 Log: MFC r205121: Use an unique directory name instead of hardcoded /tmp/.diskless. A malicious user could create a file named /tmp/.diskless and cause the script to misbehave. PR: conf/141258 Modified: stable/7/etc/rc.d/tmp Directory Properties: stable/7/etc/ (props changed) Modified: stable/7/etc/rc.d/tmp ============================================================================== --- stable/7/etc/rc.d/tmp Tue Mar 30 13:55:15 2010 (r205881) +++ stable/7/etc/rc.d/tmp Tue Mar 30 15:25:16 2010 (r205882) @@ -49,8 +49,8 @@ case "${tmpmfs}" in [Nn][Oo]) ;; *) - if /bin/mkdir -p /tmp/.diskless 2> /dev/null; then - rmdir /tmp/.diskless + if _tmpdir=$(mktemp -d -q /tmp/.diskless.XXXXXX); then + rmdir ${_tmpdir} else if [ -h /tmp ]; then echo "*** /tmp is a symlink to a non-writable area!" From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 15:26:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DDB1E1065677; Tue, 30 Mar 2010 15:26:12 +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 CC9648FC19; Tue, 30 Mar 2010 15:26: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 o2UFQC0k017892; Tue, 30 Mar 2010 15:26:12 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UFQCYl017890; Tue, 30 Mar 2010 15:26:12 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201003301526.o2UFQCYl017890@svn.freebsd.org> From: Jaakko Heinonen Date: Tue, 30 Mar 2010 15:26:12 +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: r205883 - stable/6/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: Tue, 30 Mar 2010 15:26:13 -0000 Author: jh Date: Tue Mar 30 15:26:12 2010 New Revision: 205883 URL: http://svn.freebsd.org/changeset/base/205883 Log: MFC r205121: Use an unique directory name instead of hardcoded /tmp/.diskless. A malicious user could create a file named /tmp/.diskless and cause the script to misbehave. PR: conf/141258 Modified: stable/6/etc/rc.d/tmp Directory Properties: stable/6/etc/ (props changed) Modified: stable/6/etc/rc.d/tmp ============================================================================== --- stable/6/etc/rc.d/tmp Tue Mar 30 15:25:16 2010 (r205882) +++ stable/6/etc/rc.d/tmp Tue Mar 30 15:26:12 2010 (r205883) @@ -49,8 +49,8 @@ case "${tmpmfs}" in [Nn][Oo]) ;; *) - if /bin/mkdir -p /tmp/.diskless 2> /dev/null; then - rmdir /tmp/.diskless + if _tmpdir=$(mktemp -d -q /tmp/.diskless.XXXXXX); then + rmdir ${_tmpdir} else if [ -h /tmp ]; then echo "*** /tmp is a symlink to a non-writable area!" From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 15:34:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B0571065674; Tue, 30 Mar 2010 15:34:04 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-fx0-f225.google.com (mail-fx0-f225.google.com [209.85.220.225]) by mx1.freebsd.org (Postfix) with ESMTP id C912B8FC20; Tue, 30 Mar 2010 15:34:02 +0000 (UTC) Received: by fxm25 with SMTP id 25so14503fxm.3 for ; Tue, 30 Mar 2010 08:34:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=ME3YYJpuldxHq0AqIV2ecNDZVS1QeFJLuslHlT2s2Qg=; b=REfQLw0PkbmaBhIZR25T/tVQ3zGnNaC/M/XfU3HPvti5b6SkfTr9NO+IHtSUfyeBQQ G79z3GjLIhz7we0EOWJVyP495NNp1BUPi1ITH/cSsIxezMC3k5pXeYjzaTP8WwYpKvhs 1RCItuEZ/l3ZfyniyLk091m3D/V07Ax+MYW2s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=iCS8ZLpFlWXuwQANza5BwAJOChFTVPTVfqnssatXevBOlu0CUtVMEYOM/jWpwpDl+b m9NDkwtkBpk+ryzyJ2XgsBbzImOKqd2cJ8mtpk6mfyxywX0yoEW7rZxqWcH96EuZrZXG GgZ81DgteJiqCkND7GBAMDfbCVyGG5bO4EI8s= Received: by 10.223.7.91 with SMTP id c27mr7165354fac.19.1269962799070; Tue, 30 Mar 2010 08:26:39 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id 14sm4021922fxm.1.2010.03.30.08.26.37 (version=SSLv3 cipher=RC4-MD5); Tue, 30 Mar 2010 08:26:38 -0700 (PDT) Sender: Alexander Motin Message-ID: <4BB2182C.4080203@FreeBSD.org> Date: Tue, 30 Mar 2010 18:26:36 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: Bruce Cran References: <201003131117.o2DBHek2003410@svn.freebsd.org> In-Reply-To: <201003131117.o2DBHek2003410@svn.freebsd.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r205119 - head/contrib/top X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2010 15:34:04 -0000 Bruce Cran wrote: > Author: brucec > Date: Sat Mar 13 11:17:39 2010 > New Revision: 205119 > URL: http://svn.freebsd.org/changeset/base/205119 > > Log: > Change the 'amt' parameter in format_k2 from int to unsigned long long > to match the values passed in and prevent the SIZE field being corrupted > when more than 2TB is allocated. This change seems broke top on ARM, as declaration in util.h doesn't specifies argument type, and caller assumes int there. To make it work correctly, second part should be done: --- top.prev/utils.h 2009-10-14 15:23:42.000000000 +0300 +++ top/utils.h 2010-03-30 18:14:11.000000000 +0300 @@ -21,4 +21,4 @@ long percentages(); char *errmsg(); char *format_time(); char *format_k(); -char *format_k2(); +char *format_k2(unsigned long long); -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 16:09:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C12E9106566C; Tue, 30 Mar 2010 16:09:42 +0000 (UTC) (envelope-from giovanni.trematerra@gmail.com) Received: from mail-fx0-f225.google.com (mail-fx0-f225.google.com [209.85.220.225]) by mx1.freebsd.org (Postfix) with ESMTP id CAC358FC18; Tue, 30 Mar 2010 16:09:41 +0000 (UTC) Received: by fxm25 with SMTP id 25so48285fxm.3 for ; Tue, 30 Mar 2010 09:09:40 -0700 (PDT) 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:received:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=Ks1PTWOLsvY+mWW970hDxsH4YMGHNmrJnACPCWMSZyo=; b=Giyft7kwh3qoc2J+MawJsX1BOvYmZrFWtbjdFlRg2JZ243jYs01dNrRyQdhlCz/2i+ +Pu5+lgAj4bnOZq0SmHlU6ks55TT6C122PlohKs4orWFgKvlG8RNh+nebGWO9CsgYKwc LqCaEuj4wsXJlWiBuLZJB3QGpsf2/c8wr2hKc= 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=ERZb9s1pOX8KXJwG5OS9azZS3aHmx4AhWr8hcEjzhDpXFksz0ML1MfJ6rj+Km3Ha5G wcrQI7Ij0BfQ9ZWrocLapsYdmtrm1ts4PRQZzAd3UI3kXjcS20rReXQrIZc4rV1rACcf n2a6HHj0b3pe9bxLPCCpDaJ0LEWLc7af7XO3c= MIME-Version: 1.0 Received: by 10.223.110.201 with HTTP; Tue, 30 Mar 2010 08:39:09 -0700 (PDT) In-Reply-To: <201003131117.o2DBHek2003410@svn.freebsd.org> References: <201003131117.o2DBHek2003410@svn.freebsd.org> Date: Tue, 30 Mar 2010 17:39:09 +0200 Received: by 10.223.33.219 with SMTP id i27mr5042075fad.62.1269963550198; Tue, 30 Mar 2010 08:39:10 -0700 (PDT) Message-ID: <4e6cba831003300839u5eac26d2n142ecb69502a64b0@mail.gmail.com> From: Giovanni Trematerra To: Bruce Cran 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, Randall Stewart Subject: Re: svn commit: r205119 - head/contrib/top X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2010 16:09:42 -0000 On Sat, Mar 13, 2010 at 1:17 PM, Bruce Cran wrote: > Author: brucec > Date: Sat Mar 13 11:17:39 2010 > New Revision: 205119 > URL: http://svn.freebsd.org/changeset/base/205119 > > Log: > =A0Change the 'amt' parameter in format_k2 from int to unsigned long long > =A0to match the values passed in and prevent the SIZE field being corrupt= ed > =A0when more than 2TB is allocated. > > =A0PR: =A0 =A0 =A0 =A0 =A0 bin/129706 > =A0Approved by: =A0rrs (mentor) > =A0MFC after: =A0 =A01 week > > Modified: > =A0head/contrib/top/utils.c > > Modified: head/contrib/top/utils.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/contrib/top/utils.c =A0 =A0Sat Mar 13 11:08:57 2010 =A0 =A0 =A0 = =A0(r205118) > +++ head/contrib/top/utils.c =A0 =A0Sat Mar 13 11:17:39 2010 =A0 =A0 =A0 = =A0(r205119) > @@ -476,7 +476,7 @@ int amt; > > =A0char *format_k2(amt) > > -int amt; > +unsigned long long amt; > > =A0{ > =A0 =A0 static char retarray[NUM_STRINGS][16]; While here wouldn't be good thing to ansify the function? From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 17:05:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0FBD5106566B; Tue, 30 Mar 2010 17:05:25 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D91DB8FC1F; Tue, 30 Mar 2010 17:05: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 o2UH5O28039558; Tue, 30 Mar 2010 17:05:24 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UH5O5r039555; Tue, 30 Mar 2010 17:05:24 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201003301705.o2UH5O5r039555@svn.freebsd.org> From: Jack F Vogel Date: Tue, 30 Mar 2010 17:05: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: r205884 - head/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2010 17:05:25 -0000 Author: jfv Date: Tue Mar 30 17:05:24 2010 New Revision: 205884 URL: http://svn.freebsd.org/changeset/base/205884 Log: Fix lint build problem. Modified: head/sys/dev/e1000/if_em.c head/sys/dev/e1000/if_em.h Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Tue Mar 30 15:26:12 2010 (r205883) +++ head/sys/dev/e1000/if_em.c Tue Mar 30 17:05:24 2010 (r205884) @@ -4823,16 +4823,18 @@ em_print_debug_info(struct adapter *adap device_printf(dev, "Queue(%d) tdh = %d, tdt = %d\n", i, E1000_READ_REG(&adapter->hw, E1000_TDH(i)), E1000_READ_REG(&adapter->hw, E1000_TDT(i))); - device_printf(dev, "TX(%d) no descriptors avail event = %lld\n", - txr->me, (long long)txr->no_desc_avail); - device_printf(dev, "TX(%d) MSIX IRQ Handled = %lld\n", txr->me, - (long long)txr->tx_irq); + device_printf(dev, "TX(%d) no descriptors avail event = %ld\n", + txr->me, txr->no_desc_avail); + device_printf(dev, "TX(%d) MSIX IRQ Handled = %ld\n", + txr->me, txr->tx_irq); device_printf(dev, "Num Tx descriptors avail = %d\n", txr->tx_avail); device_printf(dev, "Tx Descriptors not avail1 = %ld\n", txr->no_desc_avail); } for (int i = 0; i < adapter->num_queues; i++, rxr++) { + device_printf(dev, "RX(%d) MSIX IRQ Handled = %ld\n", + rxr->me, rxr->rx_irq); device_printf(dev, "hw rdh = %d, hw rdt = %d\n", E1000_READ_REG(&adapter->hw, E1000_RDH(i)), E1000_READ_REG(&adapter->hw, E1000_RDT(i))); Modified: head/sys/dev/e1000/if_em.h ============================================================================== --- head/sys/dev/e1000/if_em.h Tue Mar 30 15:26:12 2010 (r205883) +++ head/sys/dev/e1000/if_em.h Tue Mar 30 17:05:24 2010 (r205884) @@ -291,8 +291,8 @@ struct tx_ring { bus_dma_tag_t txtag; void *tag; struct resource *res; - u64 tx_irq; - u64 no_desc_avail; + unsigned long tx_irq; + unsigned long no_desc_avail; }; /* @@ -310,8 +310,8 @@ struct rx_ring { struct taskqueue *tq; struct e1000_rx_desc *rx_base; struct em_dma_alloc rxdma; - unsigned int next_to_refresh; - unsigned int next_to_check; + u32 next_to_refresh; + u32 next_to_check; struct em_buffer *rx_buffers; struct mbuf *fmp; struct mbuf *lmp; @@ -323,9 +323,9 @@ struct rx_ring { bus_dmamap_t rx_sparemap; /* Soft stats */ - u64 rx_irq; - u64 rx_packets; - u64 rx_bytes; + unsigned long rx_irq; + unsigned long rx_packets; + unsigned long rx_bytes; }; From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 18:29:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 99CDE1065670; Tue, 30 Mar 2010 18:29:20 +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 3DFA88FC1C; Tue, 30 Mar 2010 18:29: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 o2UITKfl057903; Tue, 30 Mar 2010 18:29:20 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UITKwm057901; Tue, 30 Mar 2010 18:29:20 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201003301829.o2UITKwm057901@svn.freebsd.org> From: John Baldwin Date: Tue, 30 Mar 2010 18:29: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: r205885 - 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, 30 Mar 2010 18:29:20 -0000 Author: jhb Date: Tue Mar 30 18:29:19 2010 New Revision: 205885 URL: http://svn.freebsd.org/changeset/base/205885 Log: Various and sundry style, whitespace, and comment fixes. Submitted by: bde (mostly) Modified: head/sys/sys/pcpu.h Modified: head/sys/sys/pcpu.h ============================================================================== --- head/sys/sys/pcpu.h Tue Mar 30 17:05:24 2010 (r205884) +++ head/sys/sys/pcpu.h Tue Mar 30 18:29:19 2010 (r205885) @@ -42,22 +42,19 @@ #include #include -struct pcb; -struct thread; - /* * Define a set for pcpu data. * * We don't use SET_DECLARE because it defines the set as 'a' when we - * want 'aw'. GCC considers uninitialized data in a seperate section - * writable and there is no generic zero initializer that works for + * want 'aw'. gcc considers uninitialized data in a separate section + * writable, and there is no generic zero initializer that works for * structs and scalars. */ extern uintptr_t *__start_set_pcpu; extern uintptr_t *__stop_set_pcpu; __asm__( -#if defined(__arm__) +#ifdef __arm__ ".section set_pcpu, \"aw\", %progbits\n" #else ".section set_pcpu, \"aw\", @progbits\n" @@ -73,8 +70,8 @@ extern uintptr_t dpcpu_off[]; /* * Convenience defines. */ -#define DPCPU_START (uintptr_t)&__start_set_pcpu -#define DPCPU_STOP (uintptr_t)&__stop_set_pcpu +#define DPCPU_START ((uintptr_t)&__start_set_pcpu) +#define DPCPU_STOP ((uintptr_t)&__stop_set_pcpu) #define DPCPU_BYTES (DPCPU_STOP - DPCPU_START) #define DPCPU_MODMIN 2048 #define DPCPU_SIZE roundup2(DPCPU_BYTES, PAGE_SIZE) @@ -111,8 +108,8 @@ extern uintptr_t dpcpu_off[]; /* * XXXUPS remove as soon as we have per cpu variable - * linker sets and can define rm_queue in _rm_lock.h -*/ + * linker sets and can define rm_queue in _rm_lock.h + */ struct rm_queue { struct rm_queue* volatile rmq_next; struct rm_queue* volatile rmq_prev; @@ -120,7 +117,6 @@ struct rm_queue { #define PCPU_NAME_LEN (sizeof("CPU ") + sizeof(__XSTRING(MAXCPU) + 1)) - /* * This structure maps out the global data that needs to be kept on a * per-cpu basis. The members are accessed via the PCPU_GET/SET/PTR @@ -133,43 +129,40 @@ struct pcpu { struct thread *pc_fpcurthread; /* Fp state owner */ struct thread *pc_deadthread; /* Zombie thread or NULL */ struct pcb *pc_curpcb; /* Current pcb */ - uint64_t pc_switchtime; - int pc_switchticks; + uint64_t pc_switchtime; /* cpu_ticks() at last csw */ + int pc_switchticks; /* `ticks' at last csw */ u_int pc_cpuid; /* This cpu number */ cpumask_t pc_cpumask; /* This cpu mask */ cpumask_t pc_other_cpus; /* Mask of all other cpus */ SLIST_ENTRY(pcpu) pc_allcpu; struct lock_list_entry *pc_spinlocks; #ifdef KTR - char pc_name[PCPU_NAME_LEN]; /* String name for KTR. */ + char pc_name[PCPU_NAME_LEN]; /* String name for KTR */ #endif struct vmmeter pc_cnt; /* VM stats counters */ long pc_cp_time[CPUSTATES]; /* statclock ticks */ struct device *pc_device; - void *pc_netisr; /* netisr SWI cookie. */ + void *pc_netisr; /* netisr SWI cookie */ - /* + /* * Stuff for read mostly lock - * + * * XXXUPS remove as soon as we have per cpu variable * linker sets. */ - struct rm_queue pc_rm_queue; + struct rm_queue pc_rm_queue; - /* - * Dynamic per-cpu data area. - */ - uintptr_t pc_dynamic; + uintptr_t pc_dynamic; /* Dynamic per-cpu data area */ /* * Keep MD fields last, so that CPU-specific variations on a * single architecture don't result in offset variations of - * the machine-independent fields of the pcpu. Even though + * the machine-independent fields of the pcpu. Even though * the pcpu structure is private to the kernel, some ports - * (e.g. lsof, part of gtop) define _KERNEL and include this - * header. While strictly speaking this is wrong, there's no - * reason not to keep the offsets of the MI fields constant. - * If only to make kernel debugging easier... + * (e.g., lsof, part of gtop) define _KERNEL and include this + * header. While strictly speaking this is wrong, there's no + * reason not to keep the offsets of the MI fields constant + * if only to make kernel debugging easier. */ PCPU_MD_FIELDS; } __aligned(128); @@ -179,6 +172,7 @@ struct pcpu { SLIST_HEAD(cpuhead, pcpu); extern struct cpuhead cpuhead; +extern struct pcpu *cpuid_to_pcpu[MAXCPU]; #define curcpu PCPU_GET(cpuid) #define curproc (curthread->td_proc) @@ -193,21 +187,17 @@ extern struct cpuhead cpuhead; * db_show_mdpcpu() is responsible for handling machine dependent * fields for the DDB 'show pcpu' command. */ - -extern struct pcpu *cpuid_to_pcpu[MAXCPU]; - - void cpu_pcpu_init(struct pcpu *pcpu, int cpuid, size_t size); void db_show_mdpcpu(struct pcpu *pcpu); -void pcpu_destroy(struct pcpu *pcpu); -struct pcpu *pcpu_find(u_int cpuid); -void pcpu_init(struct pcpu *pcpu, int cpuid, size_t size); void *dpcpu_alloc(int size); void dpcpu_copy(void *s, int size); void dpcpu_free(void *s, int size); void dpcpu_init(void *dpcpu, int cpuid); +void pcpu_destroy(struct pcpu *pcpu); +struct pcpu *pcpu_find(u_int cpuid); +void pcpu_init(struct pcpu *pcpu, int cpuid, size_t size); -#endif /* _KERNEL */ +#endif /* _KERNEL */ #endif /* !_SYS_PCPU_H_ */ From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 18:31:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CAB3A1065795; Tue, 30 Mar 2010 18:31:55 +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 BAEBD8FC15; Tue, 30 Mar 2010 18:31: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 o2UIVtCH058529; Tue, 30 Mar 2010 18:31:55 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UIVtYC058527; Tue, 30 Mar 2010 18:31:55 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201003301831.o2UIVtYC058527@svn.freebsd.org> From: John Baldwin Date: Tue, 30 Mar 2010 18:31:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205886 - 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, 30 Mar 2010 18:31:55 -0000 Author: jhb Date: Tue Mar 30 18:31:55 2010 New Revision: 205886 URL: http://svn.freebsd.org/changeset/base/205886 Log: Defer freeing a kevent list until after dropping kqueue locks. LOR: 185 Submitted by: Matthew Fleming @ Isilon MFC after: 1 week Modified: head/sys/kern/kern_event.c Modified: head/sys/kern/kern_event.c ============================================================================== --- head/sys/kern/kern_event.c Tue Mar 30 18:29:19 2010 (r205885) +++ head/sys/kern/kern_event.c Tue Mar 30 18:31:55 2010 (r205886) @@ -1218,7 +1218,7 @@ static int kqueue_expand(struct kqueue *kq, struct filterops *fops, uintptr_t ident, int waitok) { - struct klist *list, *tmp_knhash; + struct klist *list, *tmp_knhash, *to_free; u_long tmp_knhashmask; int size; int fd; @@ -1226,6 +1226,7 @@ kqueue_expand(struct kqueue *kq, struct KQ_NOTOWNED(kq); + to_free = NULL; if (fops->f_isfd) { fd = ident; if (kq->kq_knlistsize <= fd) { @@ -1237,13 +1238,13 @@ kqueue_expand(struct kqueue *kq, struct return ENOMEM; KQ_LOCK(kq); if (kq->kq_knlistsize > fd) { - free(list, M_KQUEUE); + to_free = list; list = NULL; } else { if (kq->kq_knlist != NULL) { bcopy(kq->kq_knlist, list, kq->kq_knlistsize * sizeof(*list)); - free(kq->kq_knlist, M_KQUEUE); + to_free = kq->kq_knlist; kq->kq_knlist = NULL; } bzero((caddr_t)list + @@ -1265,11 +1266,12 @@ kqueue_expand(struct kqueue *kq, struct kq->kq_knhash = tmp_knhash; kq->kq_knhashmask = tmp_knhashmask; } else { - free(tmp_knhash, M_KQUEUE); + to_free = tmp_knhash; } KQ_UNLOCK(kq); } } + free(to_free, M_KQUEUE); KQ_NOTOWNED(kq); return 0; From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 18:58:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF40A106564A; Tue, 30 Mar 2010 18:58:08 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A2B348FC18; Tue, 30 Mar 2010 18:58:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2UIw8Kp064537; Tue, 30 Mar 2010 18:58:08 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UIw7Hs064524; Tue, 30 Mar 2010 18:58:07 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003301858.o2UIw7Hs064524@svn.freebsd.org> From: Marius Strobl Date: Tue, 30 Mar 2010 18:58: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: r205887 - stable/8/lib/libc/sparc64/fpu X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2010 18:58:08 -0000 Author: marius Date: Tue Mar 30 18:58:07 2010 New Revision: 205887 URL: http://svn.freebsd.org/changeset/base/205887 Log: MFC: r205393 - Remove a bogus forward declaration. - Fix whitespace. Modified: stable/8/lib/libc/sparc64/fpu/fpu_extern.h stable/8/lib/libc/sparc64/fpu/fpu_implode.c Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/8/lib/libc/sparc64/fpu/fpu_extern.h ============================================================================== --- stable/8/lib/libc/sparc64/fpu/fpu_extern.h Tue Mar 30 18:31:55 2010 (r205886) +++ stable/8/lib/libc/sparc64/fpu/fpu_extern.h Tue Mar 30 18:58:07 2010 (r205887) @@ -41,7 +41,6 @@ #define _SPARC64_FPU_FPU_EXTERN_H_ struct utrapframe; -union instr; struct fpemu; struct fpn; @@ -61,9 +60,9 @@ struct fpn *__fpu_div(struct fpemu *); int __fpu_itof(struct fpn *, u_int); int __fpu_xtof(struct fpn *, u_int64_t); int __fpu_stof(struct fpn *, u_int); -int __fpu_dtof(struct fpn *, u_int, u_int ); -int __fpu_qtof(struct fpn *, u_int, u_int , u_int , u_int ); -void __fpu_explode(struct fpemu *, struct fpn *, int, int ); +int __fpu_dtof(struct fpn *, u_int, u_int); +int __fpu_qtof(struct fpn *, u_int, u_int, u_int, u_int); +void __fpu_explode(struct fpemu *, struct fpn *, int, int); /* fpu_implode.c */ u_int __fpu_ftoi(struct fpemu *, struct fpn *); Modified: stable/8/lib/libc/sparc64/fpu/fpu_implode.c ============================================================================== --- stable/8/lib/libc/sparc64/fpu/fpu_implode.c Tue Mar 30 18:31:55 2010 (r205886) +++ stable/8/lib/libc/sparc64/fpu/fpu_implode.c Tue Mar 30 18:58:07 2010 (r205887) @@ -198,7 +198,6 @@ __fpu_ftoi(fe, fp) sign = fp->fp_sign; switch (fp->fp_class) { - case FPC_ZERO: return (0); @@ -248,7 +247,6 @@ __fpu_ftox(fe, fp, res) sign = fp->fp_sign; switch (fp->fp_class) { - case FPC_ZERO: res[1] = 0; return (0); @@ -504,7 +502,6 @@ __fpu_implode(fe, fp, type, space) { switch (type) { - case FTYPE_LNG: space[0] = __fpu_ftox(fe, fp, space); break; From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 18:58:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 06AEA106566B; Tue, 30 Mar 2010 18:58:09 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CF5868FC19; Tue, 30 Mar 2010 18:58:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2UIw8FG064561; Tue, 30 Mar 2010 18:58:08 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UIw8Sc064556; Tue, 30 Mar 2010 18:58:08 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003301858.o2UIw8Sc064556@svn.freebsd.org> From: Marius Strobl Date: Tue, 30 Mar 2010 18:58:08 +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: r205888 - stable/6/lib/libc/sparc64/fpu X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2010 18:58:09 -0000 Author: marius Date: Tue Mar 30 18:58:08 2010 New Revision: 205888 URL: http://svn.freebsd.org/changeset/base/205888 Log: MFC: r205393 - Remove a bogus forward declaration. - Fix whitespace. Modified: stable/6/lib/libc/sparc64/fpu/fpu_extern.h stable/6/lib/libc/sparc64/fpu/fpu_implode.c Directory Properties: stable/6/lib/libc/ (props changed) Modified: stable/6/lib/libc/sparc64/fpu/fpu_extern.h ============================================================================== --- stable/6/lib/libc/sparc64/fpu/fpu_extern.h Tue Mar 30 18:58:07 2010 (r205887) +++ stable/6/lib/libc/sparc64/fpu/fpu_extern.h Tue Mar 30 18:58:08 2010 (r205888) @@ -41,7 +41,6 @@ #define _SPARC64_FPU_FPU_EXTERN_H_ struct utrapframe; -union instr; struct fpemu; struct fpn; @@ -61,9 +60,9 @@ struct fpn *__fpu_div(struct fpemu *); int __fpu_itof(struct fpn *, u_int); int __fpu_xtof(struct fpn *, u_int64_t); int __fpu_stof(struct fpn *, u_int); -int __fpu_dtof(struct fpn *, u_int, u_int ); -int __fpu_qtof(struct fpn *, u_int, u_int , u_int , u_int ); -void __fpu_explode(struct fpemu *, struct fpn *, int, int ); +int __fpu_dtof(struct fpn *, u_int, u_int); +int __fpu_qtof(struct fpn *, u_int, u_int, u_int, u_int); +void __fpu_explode(struct fpemu *, struct fpn *, int, int); /* fpu_implode.c */ u_int __fpu_ftoi(struct fpemu *, struct fpn *); Modified: stable/6/lib/libc/sparc64/fpu/fpu_implode.c ============================================================================== --- stable/6/lib/libc/sparc64/fpu/fpu_implode.c Tue Mar 30 18:58:07 2010 (r205887) +++ stable/6/lib/libc/sparc64/fpu/fpu_implode.c Tue Mar 30 18:58:08 2010 (r205888) @@ -202,7 +202,6 @@ __fpu_ftoi(fe, fp) sign = fp->fp_sign; switch (fp->fp_class) { - case FPC_ZERO: return (0); @@ -252,7 +251,6 @@ __fpu_ftox(fe, fp, res) sign = fp->fp_sign; switch (fp->fp_class) { - case FPC_ZERO: res[1] = 0; return (0); @@ -508,7 +506,6 @@ __fpu_implode(fe, fp, type, space) { switch (type) { - case FTYPE_LNG: space[0] = __fpu_ftox(fe, fp, space); break; From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 18:58:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CBAD71065674; Tue, 30 Mar 2010 18:58:10 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A01808FC1A; Tue, 30 Mar 2010 18:58: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 o2UIwArh064597; Tue, 30 Mar 2010 18:58:10 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UIwATh064594; Tue, 30 Mar 2010 18:58:10 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003301858.o2UIwATh064594@svn.freebsd.org> From: Marius Strobl Date: Tue, 30 Mar 2010 18:58:10 +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: r205889 - stable/7/lib/libc/sparc64/fpu X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2010 18:58:10 -0000 Author: marius Date: Tue Mar 30 18:58:10 2010 New Revision: 205889 URL: http://svn.freebsd.org/changeset/base/205889 Log: MFC: r205393 - Remove a bogus forward declaration. - Fix whitespace. Modified: stable/7/lib/libc/sparc64/fpu/fpu_extern.h stable/7/lib/libc/sparc64/fpu/fpu_implode.c Directory Properties: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdtime/ (props changed) Modified: stable/7/lib/libc/sparc64/fpu/fpu_extern.h ============================================================================== --- stable/7/lib/libc/sparc64/fpu/fpu_extern.h Tue Mar 30 18:58:08 2010 (r205888) +++ stable/7/lib/libc/sparc64/fpu/fpu_extern.h Tue Mar 30 18:58:10 2010 (r205889) @@ -41,7 +41,6 @@ #define _SPARC64_FPU_FPU_EXTERN_H_ struct utrapframe; -union instr; struct fpemu; struct fpn; @@ -61,9 +60,9 @@ struct fpn *__fpu_div(struct fpemu *); int __fpu_itof(struct fpn *, u_int); int __fpu_xtof(struct fpn *, u_int64_t); int __fpu_stof(struct fpn *, u_int); -int __fpu_dtof(struct fpn *, u_int, u_int ); -int __fpu_qtof(struct fpn *, u_int, u_int , u_int , u_int ); -void __fpu_explode(struct fpemu *, struct fpn *, int, int ); +int __fpu_dtof(struct fpn *, u_int, u_int); +int __fpu_qtof(struct fpn *, u_int, u_int, u_int, u_int); +void __fpu_explode(struct fpemu *, struct fpn *, int, int); /* fpu_implode.c */ u_int __fpu_ftoi(struct fpemu *, struct fpn *); Modified: stable/7/lib/libc/sparc64/fpu/fpu_implode.c ============================================================================== --- stable/7/lib/libc/sparc64/fpu/fpu_implode.c Tue Mar 30 18:58:08 2010 (r205888) +++ stable/7/lib/libc/sparc64/fpu/fpu_implode.c Tue Mar 30 18:58:10 2010 (r205889) @@ -198,7 +198,6 @@ __fpu_ftoi(fe, fp) sign = fp->fp_sign; switch (fp->fp_class) { - case FPC_ZERO: return (0); @@ -248,7 +247,6 @@ __fpu_ftox(fe, fp, res) sign = fp->fp_sign; switch (fp->fp_class) { - case FPC_ZERO: res[1] = 0; return (0); @@ -504,7 +502,6 @@ __fpu_implode(fe, fp, type, space) { switch (type) { - case FTYPE_LNG: space[0] = __fpu_ftox(fe, fp, space); break; From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 19:03:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF626106564A; Tue, 30 Mar 2010 19:03:26 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BD5B68FC13; Tue, 30 Mar 2010 19:03: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 o2UJ3Q5A065864; Tue, 30 Mar 2010 19:03:26 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UJ3QIS065863; Tue, 30 Mar 2010 19:03:26 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003301903.o2UJ3QIS065863@svn.freebsd.org> From: Marius Strobl Date: Tue, 30 Mar 2010 19:03: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: r205890 - stable/8/lib/libc/sparc64/fpu X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2010 19:03:26 -0000 Author: marius Date: Tue Mar 30 19:03:26 2010 New Revision: 205890 URL: http://svn.freebsd.org/changeset/base/205890 Log: MFC: r205394 Ensure that __fpu_ftox() both returns the high bits and res[1] contains the low bits also in the default case. PR: 144900 Obtained from: OpenBSD Modified: stable/8/lib/libc/sparc64/fpu/fpu_implode.c Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/8/lib/libc/sparc64/fpu/fpu_implode.c ============================================================================== --- stable/8/lib/libc/sparc64/fpu/fpu_implode.c Tue Mar 30 18:58:10 2010 (r205889) +++ stable/8/lib/libc/sparc64/fpu/fpu_implode.c Tue Mar 30 19:03:26 2010 (r205890) @@ -248,8 +248,8 @@ __fpu_ftox(fe, fp, res) sign = fp->fp_sign; switch (fp->fp_class) { case FPC_ZERO: - res[1] = 0; - return (0); + i = 0; + goto done; case FPC_NUM: /* @@ -273,15 +273,17 @@ __fpu_ftox(fe, fp, res) break; if (sign) i = -i; - res[1] = (int)i; - return (i >> 32); + goto done; default: /* Inf, qNaN, sNaN */ break; } /* overflow: replace any inexact exception with invalid */ fe->fe_cx = (fe->fe_cx & ~FSR_NX) | FSR_NV; - return (0x7fffffffffffffffLL + sign); + i = 0x7fffffffffffffffLL + sign; +done: + res[1] = i & 0xffffffff; + return (i >> 32); } /* From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 19:03:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE27D106566B; Tue, 30 Mar 2010 19:03:27 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DD4F88FC16; Tue, 30 Mar 2010 19:03: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 o2UJ3RBo065898; Tue, 30 Mar 2010 19:03:27 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UJ3Rpr065896; Tue, 30 Mar 2010 19:03:27 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003301903.o2UJ3Rpr065896@svn.freebsd.org> From: Marius Strobl Date: Tue, 30 Mar 2010 19:03:27 +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: r205891 - stable/7/lib/libc/sparc64/fpu X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2010 19:03:28 -0000 Author: marius Date: Tue Mar 30 19:03:27 2010 New Revision: 205891 URL: http://svn.freebsd.org/changeset/base/205891 Log: MFC: r205394 Ensure that __fpu_ftox() both returns the high bits and res[1] contains the low bits also in the default case. PR: 144900 Obtained from: OpenBSD Modified: stable/7/lib/libc/sparc64/fpu/fpu_implode.c Directory Properties: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdtime/ (props changed) Modified: stable/7/lib/libc/sparc64/fpu/fpu_implode.c ============================================================================== --- stable/7/lib/libc/sparc64/fpu/fpu_implode.c Tue Mar 30 19:03:26 2010 (r205890) +++ stable/7/lib/libc/sparc64/fpu/fpu_implode.c Tue Mar 30 19:03:27 2010 (r205891) @@ -248,8 +248,8 @@ __fpu_ftox(fe, fp, res) sign = fp->fp_sign; switch (fp->fp_class) { case FPC_ZERO: - res[1] = 0; - return (0); + i = 0; + goto done; case FPC_NUM: /* @@ -273,15 +273,17 @@ __fpu_ftox(fe, fp, res) break; if (sign) i = -i; - res[1] = (int)i; - return (i >> 32); + goto done; default: /* Inf, qNaN, sNaN */ break; } /* overflow: replace any inexact exception with invalid */ fe->fe_cx = (fe->fe_cx & ~FSR_NX) | FSR_NV; - return (0x7fffffffffffffffLL + sign); + i = 0x7fffffffffffffffLL + sign; +done: + res[1] = i & 0xffffffff; + return (i >> 32); } /* From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 19:03:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B2FE51065673; Tue, 30 Mar 2010 19:03:29 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A212A8FC1B; Tue, 30 Mar 2010 19:03: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 o2UJ3Taa065932; Tue, 30 Mar 2010 19:03:29 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UJ3Tpe065930; Tue, 30 Mar 2010 19:03:29 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003301903.o2UJ3Tpe065930@svn.freebsd.org> From: Marius Strobl Date: Tue, 30 Mar 2010 19:03:29 +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: r205892 - stable/6/lib/libc/sparc64/fpu X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2010 19:03:29 -0000 Author: marius Date: Tue Mar 30 19:03:29 2010 New Revision: 205892 URL: http://svn.freebsd.org/changeset/base/205892 Log: MFC: r205394 Ensure that __fpu_ftox() both returns the high bits and res[1] contains the low bits also in the default case. PR:i 144900 Obtained from: OpenBSD Modified: stable/6/lib/libc/sparc64/fpu/fpu_implode.c Directory Properties: stable/6/lib/libc/ (props changed) Modified: stable/6/lib/libc/sparc64/fpu/fpu_implode.c ============================================================================== --- stable/6/lib/libc/sparc64/fpu/fpu_implode.c Tue Mar 30 19:03:27 2010 (r205891) +++ stable/6/lib/libc/sparc64/fpu/fpu_implode.c Tue Mar 30 19:03:29 2010 (r205892) @@ -252,8 +252,8 @@ __fpu_ftox(fe, fp, res) sign = fp->fp_sign; switch (fp->fp_class) { case FPC_ZERO: - res[1] = 0; - return (0); + i = 0; + goto done; case FPC_NUM: /* @@ -277,15 +277,17 @@ __fpu_ftox(fe, fp, res) break; if (sign) i = -i; - res[1] = (int)i; - return (i >> 32); + goto done; default: /* Inf, qNaN, sNaN */ break; } /* overflow: replace any inexact exception with invalid */ fe->fe_cx = (fe->fe_cx & ~FSR_NX) | FSR_NV; - return (0x7fffffffffffffffLL + sign); + i = 0x7fffffffffffffffLL + sign; +done: + res[1] = i & 0xffffffff; + return (i >> 32); } /* From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 19:05:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F637106564A; Tue, 30 Mar 2010 19:05:09 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E7F738FC18; Tue, 30 Mar 2010 19:05: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 o2UJ588d066373; Tue, 30 Mar 2010 19:05:08 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UJ58J0066369; Tue, 30 Mar 2010 19:05:08 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003301905.o2UJ58J0066369@svn.freebsd.org> From: Marius Strobl Date: Tue, 30 Mar 2010 19:05: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: r205893 - stable/8/lib/libc/sparc64/fpu X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2010 19:05:09 -0000 Author: marius Date: Tue Mar 30 19:05:08 2010 New Revision: 205893 URL: http://svn.freebsd.org/changeset/base/205893 Log: MFC: r205395 FPU_DEBUG requires . PR: 144900 Submitted by: Peter Jeremy Modified: stable/8/lib/libc/sparc64/fpu/fpu.c stable/8/lib/libc/sparc64/fpu/fpu_explode.c stable/8/lib/libc/sparc64/fpu/fpu_implode.c Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/8/lib/libc/sparc64/fpu/fpu.c ============================================================================== --- stable/8/lib/libc/sparc64/fpu/fpu.c Tue Mar 30 19:03:29 2010 (r205892) +++ stable/8/lib/libc/sparc64/fpu/fpu.c Tue Mar 30 19:05:08 2010 (r205893) @@ -69,9 +69,12 @@ __FBSDID("$FreeBSD$"); #include "namespace.h" #include -#include #include +#ifdef FPU_DEBUG +#include +#endif #include +#include #include "un-namespace.h" #include "libc_private.h" Modified: stable/8/lib/libc/sparc64/fpu/fpu_explode.c ============================================================================== --- stable/8/lib/libc/sparc64/fpu/fpu_explode.c Tue Mar 30 19:03:29 2010 (r205892) +++ stable/8/lib/libc/sparc64/fpu/fpu_explode.c Tue Mar 30 19:05:08 2010 (r205893) @@ -49,6 +49,10 @@ __FBSDID("$FreeBSD$"); #include +#ifdef FPU_DEBUG +#include +#endif + #include #include #include Modified: stable/8/lib/libc/sparc64/fpu/fpu_implode.c ============================================================================== --- stable/8/lib/libc/sparc64/fpu/fpu_implode.c Tue Mar 30 19:03:29 2010 (r205892) +++ stable/8/lib/libc/sparc64/fpu/fpu_implode.c Tue Mar 30 19:05:08 2010 (r205893) @@ -49,6 +49,10 @@ __FBSDID("$FreeBSD$"); #include +#ifdef FPU_DEBUG +#include +#endif + #include #include #include From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 19:05:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 33468106566B; Tue, 30 Mar 2010 19:05:12 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0826F8FC08; Tue, 30 Mar 2010 19:05: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 o2UJ5B7H066441; Tue, 30 Mar 2010 19:05:11 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UJ5Bjr066437; Tue, 30 Mar 2010 19:05:11 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003301905.o2UJ5Bjr066437@svn.freebsd.org> From: Marius Strobl Date: Tue, 30 Mar 2010 19:05:11 +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: r205894 - stable/7/lib/libc/sparc64/fpu X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2010 19:05:12 -0000 Author: marius Date: Tue Mar 30 19:05:11 2010 New Revision: 205894 URL: http://svn.freebsd.org/changeset/base/205894 Log: MFC: r205395 FPU_DEBUG requires . PR: 144900 Submitted by: Peter Jeremy Modified: stable/7/lib/libc/sparc64/fpu/fpu.c stable/7/lib/libc/sparc64/fpu/fpu_explode.c stable/7/lib/libc/sparc64/fpu/fpu_implode.c Directory Properties: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdtime/ (props changed) Modified: stable/7/lib/libc/sparc64/fpu/fpu.c ============================================================================== --- stable/7/lib/libc/sparc64/fpu/fpu.c Tue Mar 30 19:05:08 2010 (r205893) +++ stable/7/lib/libc/sparc64/fpu/fpu.c Tue Mar 30 19:05:11 2010 (r205894) @@ -69,9 +69,12 @@ __FBSDID("$FreeBSD$"); #include "namespace.h" #include -#include #include +#ifdef FPU_DEBUG +#include +#endif #include +#include #include "un-namespace.h" #include "libc_private.h" Modified: stable/7/lib/libc/sparc64/fpu/fpu_explode.c ============================================================================== --- stable/7/lib/libc/sparc64/fpu/fpu_explode.c Tue Mar 30 19:05:08 2010 (r205893) +++ stable/7/lib/libc/sparc64/fpu/fpu_explode.c Tue Mar 30 19:05:11 2010 (r205894) @@ -49,6 +49,10 @@ __FBSDID("$FreeBSD$"); #include +#ifdef FPU_DEBUG +#include +#endif + #include #include #include Modified: stable/7/lib/libc/sparc64/fpu/fpu_implode.c ============================================================================== --- stable/7/lib/libc/sparc64/fpu/fpu_implode.c Tue Mar 30 19:05:08 2010 (r205893) +++ stable/7/lib/libc/sparc64/fpu/fpu_implode.c Tue Mar 30 19:05:11 2010 (r205894) @@ -49,6 +49,10 @@ __FBSDID("$FreeBSD$"); #include +#ifdef FPU_DEBUG +#include +#endif + #include #include #include From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 19:05:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28E971065841; Tue, 30 Mar 2010 19:05:21 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 179E58FC19; Tue, 30 Mar 2010 19:05: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 o2UJ5KPU066513; Tue, 30 Mar 2010 19:05:20 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UJ5KVL066509; Tue, 30 Mar 2010 19:05:20 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003301905.o2UJ5KVL066509@svn.freebsd.org> From: Marius Strobl Date: Tue, 30 Mar 2010 19:05: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: r205895 - stable/6/lib/libc/sparc64/fpu X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2010 19:05:21 -0000 Author: marius Date: Tue Mar 30 19:05:20 2010 New Revision: 205895 URL: http://svn.freebsd.org/changeset/base/205895 Log: MFC: r205395 FPU_DEBUG requires . PR: 144900 Submitted by: Peter Jeremy Modified: stable/6/lib/libc/sparc64/fpu/fpu.c stable/6/lib/libc/sparc64/fpu/fpu_explode.c stable/6/lib/libc/sparc64/fpu/fpu_implode.c Directory Properties: stable/6/lib/libc/ (props changed) Modified: stable/6/lib/libc/sparc64/fpu/fpu.c ============================================================================== --- stable/6/lib/libc/sparc64/fpu/fpu.c Tue Mar 30 19:05:11 2010 (r205894) +++ stable/6/lib/libc/sparc64/fpu/fpu.c Tue Mar 30 19:05:20 2010 (r205895) @@ -73,9 +73,12 @@ __FBSDID("$FreeBSD$"); #include "namespace.h" #include -#include #include +#ifdef FPU_DEBUG +#include +#endif #include +#include #include "un-namespace.h" #include "libc_private.h" Modified: stable/6/lib/libc/sparc64/fpu/fpu_explode.c ============================================================================== --- stable/6/lib/libc/sparc64/fpu/fpu_explode.c Tue Mar 30 19:05:11 2010 (r205894) +++ stable/6/lib/libc/sparc64/fpu/fpu_explode.c Tue Mar 30 19:05:20 2010 (r205895) @@ -53,6 +53,10 @@ __FBSDID("$FreeBSD$"); #include +#ifdef FPU_DEBUG +#include +#endif + #include #include #include Modified: stable/6/lib/libc/sparc64/fpu/fpu_implode.c ============================================================================== --- stable/6/lib/libc/sparc64/fpu/fpu_implode.c Tue Mar 30 19:05:11 2010 (r205894) +++ stable/6/lib/libc/sparc64/fpu/fpu_implode.c Tue Mar 30 19:05:20 2010 (r205895) @@ -53,6 +53,10 @@ __FBSDID("$FreeBSD$"); #include +#ifdef FPU_DEBUG +#include +#endif + #include #include #include From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 19:06:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9108E106566C; Tue, 30 Mar 2010 19:06:31 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 801888FC25; Tue, 30 Mar 2010 19:06: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 o2UJ6VGt066836; Tue, 30 Mar 2010 19:06:31 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UJ6VZf066834; Tue, 30 Mar 2010 19:06:31 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003301906.o2UJ6VZf066834@svn.freebsd.org> From: Marius Strobl Date: Tue, 30 Mar 2010 19:06: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: r205896 - stable/8/lib/libc/sparc64/fpu X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2010 19:06:31 -0000 Author: marius Date: Tue Mar 30 19:06:31 2010 New Revision: 205896 URL: http://svn.freebsd.org/changeset/base/205896 Log: MFC: r205396 Division should take both arguments' signs into account when the the dividend is infinity or zero and the divisor is not the same. PR: 144900 Submitted by: Peter Jeremy Modified: stable/8/lib/libc/sparc64/fpu/fpu_div.c Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/8/lib/libc/sparc64/fpu/fpu_div.c ============================================================================== --- stable/8/lib/libc/sparc64/fpu/fpu_div.c Tue Mar 30 19:05:20 2010 (r205895) +++ stable/8/lib/libc/sparc64/fpu/fpu_div.c Tue Mar 30 19:06:31 2010 (r205896) @@ -167,14 +167,16 @@ __fpu_div(fe) * return it. Otherwise we have the following cases: * * Inf / Inf = NaN, plus NV exception - * Inf / num = Inf [i.e., return x] - * Inf / 0 = Inf [i.e., return x] - * 0 / Inf = 0 [i.e., return x] - * 0 / num = 0 [i.e., return x] + * Inf / num = Inf [i.e., return x #] + * Inf / 0 = Inf [i.e., return x #] + * 0 / Inf = 0 [i.e., return x #] + * 0 / num = 0 [i.e., return x #] * 0 / 0 = NaN, plus NV exception - * num / Inf = 0 + * num / Inf = 0 # * num / num = num (do the divide) - * num / 0 = Inf, plus DZ exception + * num / 0 = Inf #, plus DZ exception + * + * # Sign of result is XOR of operand signs. */ if (ISNAN(x) || ISNAN(y)) { ORDER(x, y); @@ -183,10 +185,10 @@ __fpu_div(fe) if (ISINF(x) || ISZERO(x)) { if (x->fp_class == y->fp_class) return (__fpu_newnan(fe)); + x->fp_sign ^= y->fp_sign; return (x); } - /* all results at this point use XOR of operand signs */ x->fp_sign ^= y->fp_sign; if (ISINF(y)) { x->fp_class = FPC_ZERO; From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 19:06:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 386CF1065672; Tue, 30 Mar 2010 19:06:34 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 274738FC26; Tue, 30 Mar 2010 19:06: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 o2UJ6YPm066901; Tue, 30 Mar 2010 19:06:34 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UJ6Ymw066899; Tue, 30 Mar 2010 19:06:34 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003301906.o2UJ6Ymw066899@svn.freebsd.org> From: Marius Strobl Date: Tue, 30 Mar 2010 19:06: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: r205897 - stable/7/lib/libc/sparc64/fpu X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2010 19:06:34 -0000 Author: marius Date: Tue Mar 30 19:06:33 2010 New Revision: 205897 URL: http://svn.freebsd.org/changeset/base/205897 Log: MFC: r205396 Division should take both arguments' signs into account when the the dividend is infinity or zero and the divisor is not the same. PR: 144900 Submitted by: Peter Jeremy Modified: stable/7/lib/libc/sparc64/fpu/fpu_div.c Directory Properties: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdtime/ (props changed) Modified: stable/7/lib/libc/sparc64/fpu/fpu_div.c ============================================================================== --- stable/7/lib/libc/sparc64/fpu/fpu_div.c Tue Mar 30 19:06:31 2010 (r205896) +++ stable/7/lib/libc/sparc64/fpu/fpu_div.c Tue Mar 30 19:06:33 2010 (r205897) @@ -167,14 +167,16 @@ __fpu_div(fe) * return it. Otherwise we have the following cases: * * Inf / Inf = NaN, plus NV exception - * Inf / num = Inf [i.e., return x] - * Inf / 0 = Inf [i.e., return x] - * 0 / Inf = 0 [i.e., return x] - * 0 / num = 0 [i.e., return x] + * Inf / num = Inf [i.e., return x #] + * Inf / 0 = Inf [i.e., return x #] + * 0 / Inf = 0 [i.e., return x #] + * 0 / num = 0 [i.e., return x #] * 0 / 0 = NaN, plus NV exception - * num / Inf = 0 + * num / Inf = 0 # * num / num = num (do the divide) - * num / 0 = Inf, plus DZ exception + * num / 0 = Inf #, plus DZ exception + * + * # Sign of result is XOR of operand signs. */ if (ISNAN(x) || ISNAN(y)) { ORDER(x, y); @@ -183,10 +185,10 @@ __fpu_div(fe) if (ISINF(x) || ISZERO(x)) { if (x->fp_class == y->fp_class) return (__fpu_newnan(fe)); + x->fp_sign ^= y->fp_sign; return (x); } - /* all results at this point use XOR of operand signs */ x->fp_sign ^= y->fp_sign; if (ISINF(y)) { x->fp_class = FPC_ZERO; From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 19:06:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2AA7F1065764; Tue, 30 Mar 2010 19:06:37 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6C8398FC08; Tue, 30 Mar 2010 19:06: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 o2UJ6bgF066937; Tue, 30 Mar 2010 19:06:37 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UJ6brN066935; Tue, 30 Mar 2010 19:06:37 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003301906.o2UJ6brN066935@svn.freebsd.org> From: Marius Strobl Date: Tue, 30 Mar 2010 19:06:37 +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: r205898 - stable/6/lib/libc/sparc64/fpu X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2010 19:06:39 -0000 Author: marius Date: Tue Mar 30 19:06:37 2010 New Revision: 205898 URL: http://svn.freebsd.org/changeset/base/205898 Log: MFC: r205396 Division should take both arguments' signs into account when the the dividend is infinity or zero and the divisor is not the same. PR: 144900 Submitted by: Peter Jeremy Modified: stable/6/lib/libc/sparc64/fpu/fpu_div.c Directory Properties: stable/6/lib/libc/ (props changed) Modified: stable/6/lib/libc/sparc64/fpu/fpu_div.c ============================================================================== --- stable/6/lib/libc/sparc64/fpu/fpu_div.c Tue Mar 30 19:06:33 2010 (r205897) +++ stable/6/lib/libc/sparc64/fpu/fpu_div.c Tue Mar 30 19:06:37 2010 (r205898) @@ -171,14 +171,16 @@ __fpu_div(fe) * return it. Otherwise we have the following cases: * * Inf / Inf = NaN, plus NV exception - * Inf / num = Inf [i.e., return x] - * Inf / 0 = Inf [i.e., return x] - * 0 / Inf = 0 [i.e., return x] - * 0 / num = 0 [i.e., return x] + * Inf / num = Inf [i.e., return x #] + * Inf / 0 = Inf [i.e., return x #] + * 0 / Inf = 0 [i.e., return x #] + * 0 / num = 0 [i.e., return x #] * 0 / 0 = NaN, plus NV exception - * num / Inf = 0 + * num / Inf = 0 # * num / num = num (do the divide) - * num / 0 = Inf, plus DZ exception + * num / 0 = Inf #, plus DZ exception + * + * # Sign of result is XOR of operand signs. */ if (ISNAN(x) || ISNAN(y)) { ORDER(x, y); @@ -187,10 +189,10 @@ __fpu_div(fe) if (ISINF(x) || ISZERO(x)) { if (x->fp_class == y->fp_class) return (__fpu_newnan(fe)); + x->fp_sign ^= y->fp_sign; return (x); } - /* all results at this point use XOR of operand signs */ x->fp_sign ^= y->fp_sign; if (ISINF(y)) { x->fp_class = FPC_ZERO; From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 19:07:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 489F1106566B; Tue, 30 Mar 2010 19:07: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 38AB58FC22; Tue, 30 Mar 2010 19: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 o2UJ7gLK067301; Tue, 30 Mar 2010 19:07:42 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UJ7g7W067299; Tue, 30 Mar 2010 19:07:42 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201003301907.o2UJ7g7W067299@svn.freebsd.org> From: John Baldwin Date: Tue, 30 Mar 2010 19: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: r205900 - 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: Tue, 30 Mar 2010 19:07:42 -0000 Author: jhb Date: Tue Mar 30 19:07:41 2010 New Revision: 205900 URL: http://svn.freebsd.org/changeset/base/205900 Log: Use panic() (which the environment is required to provide to libstand) to implement assert() instead of relying on a non-required exit(). The exit() invocation also did not match the semantics of the exit() routine that current boot environments happen to require. PR: kern/144749 Discussed with: bde MFC after: 1 week Modified: head/lib/libstand/assert.c Modified: head/lib/libstand/assert.c ============================================================================== --- head/lib/libstand/assert.c Tue Mar 30 19:06:54 2010 (r205899) +++ head/lib/libstand/assert.c Tue Mar 30 19:07:41 2010 (r205900) @@ -35,10 +35,10 @@ void __assert(const char *func, const char *file, int line, const char *expression) { if (func == NULL) - printf("Assertion failed: (%s), file %s, line %d.\n", + panic("Assertion failed: (%s), file %s, line %d.\n", expression, file, line); else - printf("Assertion failed: (%s), function %s, file %s, line " - "%d.\n", expression, func, file, line); - exit(); + panic( + "Assertion failed: (%s), function %s, file %s, line %d.\n", + expression, func, file, line); } From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 19:08:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7FB41065694; Tue, 30 Mar 2010 19:08:01 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BA5DC8FC1A; Tue, 30 Mar 2010 19:08: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 o2UJ811T067411; Tue, 30 Mar 2010 19:08:01 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UJ81j2067409; Tue, 30 Mar 2010 19:08:01 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003301908.o2UJ81j2067409@svn.freebsd.org> From: Marius Strobl Date: Tue, 30 Mar 2010 19:08: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: r205901 - stable/7/lib/libc/sparc64/fpu X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2010 19:08:02 -0000 Author: marius Date: Tue Mar 30 19:08:01 2010 New Revision: 205901 URL: http://svn.freebsd.org/changeset/base/205901 Log: MFC: r205397 - While SPARC V9 allows tininess to be detected either before or after rounding (impl. dep. #55), the SPARC JPS1 responsible for SPARC64 and UltraSPARC processors defines that in all cases tinyness is detected before rounding, therefore rounding up to the smallest normalised number should set the underflow flag. - If an infinite result is rounded down, the result should have an exponent 1 less than the value for infinity. PR: 144900 Submitted by: Peter Jeremy Modified: stable/7/lib/libc/sparc64/fpu/fpu_implode.c Directory Properties: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdtime/ (props changed) Modified: stable/7/lib/libc/sparc64/fpu/fpu_implode.c ============================================================================== --- stable/7/lib/libc/sparc64/fpu/fpu_implode.c Tue Mar 30 19:07:41 2010 (r205900) +++ stable/7/lib/libc/sparc64/fpu/fpu_implode.c Tue Mar 30 19:08:01 2010 (r205901) @@ -329,8 +329,9 @@ __fpu_ftos(fe, fp) * right to introduce leading zeroes. Rounding then acts * differently for normals and subnormals: the largest subnormal * may round to the smallest normal (1.0 x 2^minexp), or may - * remain subnormal. In the latter case, signal an underflow - * if the result was inexact or if underflow traps are enabled. + * remain subnormal. A number that is subnormal before rounding + * will signal an underflow if the result is inexact or if underflow + * traps are enabled. * * Rounding a normal, on the other hand, always produces another * normal (although either way the result might be too big for @@ -345,8 +346,10 @@ __fpu_ftos(fe, fp) if ((exp = fp->fp_exp + SNG_EXP_BIAS) <= 0) { /* subnormal */ /* -NG for g,r; -SNG_FRACBITS-exp for fraction */ (void) __fpu_shr(fp, FP_NMANT - FP_NG - SNG_FRACBITS - exp); - if (fpround(fe, fp) && fp->fp_mant[3] == SNG_EXP(1)) + if (fpround(fe, fp) && fp->fp_mant[3] == SNG_EXP(1)) { + fe->fe_cx |= FSR_UF; return (sign | SNG_EXP(1) | 0); + } if ((fe->fe_cx & FSR_NX) || (fe->fe_fsr & (FSR_UF << FSR_TEM_SHIFT))) fe->fe_cx |= FSR_UF; @@ -407,6 +410,7 @@ zero: res[1] = 0; if ((exp = fp->fp_exp + DBL_EXP_BIAS) <= 0) { (void) __fpu_shr(fp, FP_NMANT - FP_NG - DBL_FRACBITS - exp); if (fpround(fe, fp) && fp->fp_mant[2] == DBL_EXP(1)) { + fe->fe_cx |= FSR_UF; res[1] = 0; return (sign | DBL_EXP(1) | 0); } @@ -426,7 +430,7 @@ zero: res[1] = 0; return (sign | DBL_EXP(DBL_EXP_INFNAN) | 0); } res[1] = ~0; - return (sign | DBL_EXP(DBL_EXP_INFNAN) | DBL_MASK); + return (sign | DBL_EXP(DBL_EXP_INFNAN - 1) | DBL_MASK); } done: res[1] = fp->fp_mant[3]; @@ -468,6 +472,7 @@ zero: res[1] = res[2] = res[3] = 0; if ((exp = fp->fp_exp + EXT_EXP_BIAS) <= 0) { (void) __fpu_shr(fp, FP_NMANT - FP_NG - EXT_FRACBITS - exp); if (fpround(fe, fp) && fp->fp_mant[0] == EXT_EXP(1)) { + fe->fe_cx |= FSR_UF; res[1] = res[2] = res[3] = 0; return (sign | EXT_EXP(1) | 0); } @@ -487,7 +492,7 @@ zero: res[1] = res[2] = res[3] = 0; return (sign | EXT_EXP(EXT_EXP_INFNAN) | 0); } res[1] = res[2] = res[3] = ~0; - return (sign | EXT_EXP(EXT_EXP_INFNAN) | EXT_MASK); + return (sign | EXT_EXP(EXT_EXP_INFNAN - 1) | EXT_MASK); } done: res[1] = fp->fp_mant[1]; From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 19:08:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 477841065674; Tue, 30 Mar 2010 19:08:03 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 26C8C8FC16; Tue, 30 Mar 2010 19:08: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 o2UJ83Xf067466; Tue, 30 Mar 2010 19:08:03 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UJ83qF067464; Tue, 30 Mar 2010 19:08:03 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003301908.o2UJ83qF067464@svn.freebsd.org> From: Marius Strobl Date: Tue, 30 Mar 2010 19:08: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: r205902 - stable/8/lib/libc/sparc64/fpu X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2010 19:08:03 -0000 Author: marius Date: Tue Mar 30 19:08:02 2010 New Revision: 205902 URL: http://svn.freebsd.org/changeset/base/205902 Log: MFC: r205397 - While SPARC V9 allows tininess to be detected either before or after rounding (impl. dep. #55), the SPARC JPS1 responsible for SPARC64 and UltraSPARC processors defines that in all cases tinyness is detected before rounding, therefore rounding up to the smallest normalised number should set the underflow flag. - If an infinite result is rounded down, the result should have an exponent 1 less than the value for infinity. PR: 144900 Submitted by: Peter Jeremy Modified: stable/8/lib/libc/sparc64/fpu/fpu_implode.c Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/8/lib/libc/sparc64/fpu/fpu_implode.c ============================================================================== --- stable/8/lib/libc/sparc64/fpu/fpu_implode.c Tue Mar 30 19:08:01 2010 (r205901) +++ stable/8/lib/libc/sparc64/fpu/fpu_implode.c Tue Mar 30 19:08:02 2010 (r205902) @@ -329,8 +329,9 @@ __fpu_ftos(fe, fp) * right to introduce leading zeroes. Rounding then acts * differently for normals and subnormals: the largest subnormal * may round to the smallest normal (1.0 x 2^minexp), or may - * remain subnormal. In the latter case, signal an underflow - * if the result was inexact or if underflow traps are enabled. + * remain subnormal. A number that is subnormal before rounding + * will signal an underflow if the result is inexact or if underflow + * traps are enabled. * * Rounding a normal, on the other hand, always produces another * normal (although either way the result might be too big for @@ -345,8 +346,10 @@ __fpu_ftos(fe, fp) if ((exp = fp->fp_exp + SNG_EXP_BIAS) <= 0) { /* subnormal */ /* -NG for g,r; -SNG_FRACBITS-exp for fraction */ (void) __fpu_shr(fp, FP_NMANT - FP_NG - SNG_FRACBITS - exp); - if (fpround(fe, fp) && fp->fp_mant[3] == SNG_EXP(1)) + if (fpround(fe, fp) && fp->fp_mant[3] == SNG_EXP(1)) { + fe->fe_cx |= FSR_UF; return (sign | SNG_EXP(1) | 0); + } if ((fe->fe_cx & FSR_NX) || (fe->fe_fsr & (FSR_UF << FSR_TEM_SHIFT))) fe->fe_cx |= FSR_UF; @@ -407,6 +410,7 @@ zero: res[1] = 0; if ((exp = fp->fp_exp + DBL_EXP_BIAS) <= 0) { (void) __fpu_shr(fp, FP_NMANT - FP_NG - DBL_FRACBITS - exp); if (fpround(fe, fp) && fp->fp_mant[2] == DBL_EXP(1)) { + fe->fe_cx |= FSR_UF; res[1] = 0; return (sign | DBL_EXP(1) | 0); } @@ -426,7 +430,7 @@ zero: res[1] = 0; return (sign | DBL_EXP(DBL_EXP_INFNAN) | 0); } res[1] = ~0; - return (sign | DBL_EXP(DBL_EXP_INFNAN) | DBL_MASK); + return (sign | DBL_EXP(DBL_EXP_INFNAN - 1) | DBL_MASK); } done: res[1] = fp->fp_mant[3]; @@ -468,6 +472,7 @@ zero: res[1] = res[2] = res[3] = 0; if ((exp = fp->fp_exp + EXT_EXP_BIAS) <= 0) { (void) __fpu_shr(fp, FP_NMANT - FP_NG - EXT_FRACBITS - exp); if (fpround(fe, fp) && fp->fp_mant[0] == EXT_EXP(1)) { + fe->fe_cx |= FSR_UF; res[1] = res[2] = res[3] = 0; return (sign | EXT_EXP(1) | 0); } @@ -487,7 +492,7 @@ zero: res[1] = res[2] = res[3] = 0; return (sign | EXT_EXP(EXT_EXP_INFNAN) | 0); } res[1] = res[2] = res[3] = ~0; - return (sign | EXT_EXP(EXT_EXP_INFNAN) | EXT_MASK); + return (sign | EXT_EXP(EXT_EXP_INFNAN - 1) | EXT_MASK); } done: res[1] = fp->fp_mant[1]; From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 19:08:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 753A9106566C; Tue, 30 Mar 2010 19:08:05 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 641998FC0A; Tue, 30 Mar 2010 19:08: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 o2UJ85Jw067511; Tue, 30 Mar 2010 19:08:05 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UJ85XU067509; Tue, 30 Mar 2010 19:08:05 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003301908.o2UJ85XU067509@svn.freebsd.org> From: Marius Strobl Date: Tue, 30 Mar 2010 19:08:05 +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: r205903 - stable/6/lib/libc/sparc64/fpu X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2010 19:08:05 -0000 Author: marius Date: Tue Mar 30 19:08:05 2010 New Revision: 205903 URL: http://svn.freebsd.org/changeset/base/205903 Log: MFC: r205397 - While SPARC V9 allows tininess to be detected either before or after rounding (impl. dep. #55), the SPARC JPS1 responsible for SPARC64 and UltraSPARC processors defines that in all cases tinyness is detected before rounding, therefore rounding up to the smallest normalised number should set the underflow flag. - If an infinite result is rounded down, the result should have an exponent 1 less than the value for infinity. PR: 144900 Submitted by: Peter Jeremy Modified: stable/6/lib/libc/sparc64/fpu/fpu_implode.c Directory Properties: stable/6/lib/libc/ (props changed) Modified: stable/6/lib/libc/sparc64/fpu/fpu_implode.c ============================================================================== --- stable/6/lib/libc/sparc64/fpu/fpu_implode.c Tue Mar 30 19:08:02 2010 (r205902) +++ stable/6/lib/libc/sparc64/fpu/fpu_implode.c Tue Mar 30 19:08:05 2010 (r205903) @@ -333,8 +333,9 @@ __fpu_ftos(fe, fp) * right to introduce leading zeroes. Rounding then acts * differently for normals and subnormals: the largest subnormal * may round to the smallest normal (1.0 x 2^minexp), or may - * remain subnormal. In the latter case, signal an underflow - * if the result was inexact or if underflow traps are enabled. + * remain subnormal. A number that is subnormal before rounding + * will signal an underflow if the result is inexact or if underflow + * traps are enabled. * * Rounding a normal, on the other hand, always produces another * normal (although either way the result might be too big for @@ -349,8 +350,10 @@ __fpu_ftos(fe, fp) if ((exp = fp->fp_exp + SNG_EXP_BIAS) <= 0) { /* subnormal */ /* -NG for g,r; -SNG_FRACBITS-exp for fraction */ (void) __fpu_shr(fp, FP_NMANT - FP_NG - SNG_FRACBITS - exp); - if (fpround(fe, fp) && fp->fp_mant[3] == SNG_EXP(1)) + if (fpround(fe, fp) && fp->fp_mant[3] == SNG_EXP(1)) { + fe->fe_cx |= FSR_UF; return (sign | SNG_EXP(1) | 0); + } if ((fe->fe_cx & FSR_NX) || (fe->fe_fsr & (FSR_UF << FSR_TEM_SHIFT))) fe->fe_cx |= FSR_UF; @@ -411,6 +414,7 @@ zero: res[1] = 0; if ((exp = fp->fp_exp + DBL_EXP_BIAS) <= 0) { (void) __fpu_shr(fp, FP_NMANT - FP_NG - DBL_FRACBITS - exp); if (fpround(fe, fp) && fp->fp_mant[2] == DBL_EXP(1)) { + fe->fe_cx |= FSR_UF; res[1] = 0; return (sign | DBL_EXP(1) | 0); } @@ -430,7 +434,7 @@ zero: res[1] = 0; return (sign | DBL_EXP(DBL_EXP_INFNAN) | 0); } res[1] = ~0; - return (sign | DBL_EXP(DBL_EXP_INFNAN) | DBL_MASK); + return (sign | DBL_EXP(DBL_EXP_INFNAN - 1) | DBL_MASK); } done: res[1] = fp->fp_mant[3]; @@ -472,6 +476,7 @@ zero: res[1] = res[2] = res[3] = 0; if ((exp = fp->fp_exp + EXT_EXP_BIAS) <= 0) { (void) __fpu_shr(fp, FP_NMANT - FP_NG - EXT_FRACBITS - exp); if (fpround(fe, fp) && fp->fp_mant[0] == EXT_EXP(1)) { + fe->fe_cx |= FSR_UF; res[1] = res[2] = res[3] = 0; return (sign | EXT_EXP(1) | 0); } @@ -491,7 +496,7 @@ zero: res[1] = res[2] = res[3] = 0; return (sign | EXT_EXP(EXT_EXP_INFNAN) | 0); } res[1] = res[2] = res[3] = ~0; - return (sign | EXT_EXP(EXT_EXP_INFNAN) | EXT_MASK); + return (sign | EXT_EXP(EXT_EXP_INFNAN - 1) | EXT_MASK); } done: res[1] = fp->fp_mant[1]; From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 19:09:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F0721065676; Tue, 30 Mar 2010 19:09:19 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0E3AC8FC22; Tue, 30 Mar 2010 19:09: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 o2UJ9I5q067823; Tue, 30 Mar 2010 19:09:18 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UJ9IKn067820; Tue, 30 Mar 2010 19:09:18 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201003301909.o2UJ9IKn067820@svn.freebsd.org> From: Jack F Vogel Date: Tue, 30 Mar 2010 19:09:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205904 - head/sys/dev/ixgbe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2010 19:09:19 -0000 Author: jfv Date: Tue Mar 30 19:09:18 2010 New Revision: 205904 URL: http://svn.freebsd.org/changeset/base/205904 Log: Thanks to Michael Tuexen for adding SCTP support for 82599, also for finding a one character bug that kept TSO from working. Sometimes with direct attach cables a failure can occur in init, the old method of calling detach was broken, there is no way to return an error to the system from init, so I have changed it to return failure thru the ioctl. And, have fixed the ALTQ code changes of Max Laier, sorry Max :) Modified: head/sys/dev/ixgbe/ixgbe.c head/sys/dev/ixgbe/ixgbe.h Modified: head/sys/dev/ixgbe/ixgbe.c ============================================================================== --- head/sys/dev/ixgbe/ixgbe.c Tue Mar 30 19:08:05 2010 (r205903) +++ head/sys/dev/ixgbe/ixgbe.c Tue Mar 30 19:09:18 2010 (r205904) @@ -1,6 +1,6 @@ /****************************************************************************** - Copyright (c) 2001-2010, Intel Corporation + Copyright (c) 2001-2009, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -46,7 +46,7 @@ int ixgbe_display_debug_stat /********************************************************************* * Driver version *********************************************************************/ -char ixgbe_driver_version[] = "2.1.6"; +char ixgbe_driver_version[] = "2.1.7"; /********************************************************************* * PCI Device ID Table @@ -106,8 +106,8 @@ static int ixgbe_mq_start_locked(struct static void ixgbe_qflush(struct ifnet *); #endif static int ixgbe_ioctl(struct ifnet *, u_long, caddr_t); -static void ixgbe_init(void *); -static void ixgbe_init_locked(struct adapter *); +static void ixgbe_init(void *); +static int ixgbe_init_locked(struct adapter *); static void ixgbe_stop(void *); static void ixgbe_media_status(struct ifnet *, struct ifmediareq *); static int ixgbe_media_change(struct ifnet *); @@ -142,7 +142,7 @@ static void ixgbe_disable_intr(struc static void ixgbe_update_stats_counters(struct adapter *); static bool ixgbe_txeof(struct tx_ring *); static bool ixgbe_rxeof(struct ix_queue *, int); -static void ixgbe_rx_checksum(u32, struct mbuf *); +static void ixgbe_rx_checksum(u32, struct mbuf *, u32); static void ixgbe_set_promisc(struct adapter *); static void ixgbe_disable_promisc(struct adapter *); static void ixgbe_set_multi(struct adapter *); @@ -827,9 +827,13 @@ ixgbe_mq_start_locked(struct ifnet *ifp, } enqueued = 0; - if (m == NULL) + if (m == NULL) { next = drbr_dequeue(ifp, txr->br); - else + } else if (drbr_needs_enqueue(ifp, txr->br)) { + if ((err = drbr_enqueue(ifp, txr->br, m)) != 0) + return (err); + next = drbr_dequeue(ifp, txr->br); + } else next = m; /* Process the queue */ @@ -905,7 +909,7 @@ ixgbe_ioctl(struct ifnet * ifp, u_long c ifp->if_mtu = ifr->ifr_mtu; adapter->max_frame_size = ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN; - ixgbe_init_locked(adapter); + error = ixgbe_init_locked(adapter); IXGBE_CORE_UNLOCK(adapter); } break; @@ -920,7 +924,7 @@ ixgbe_ioctl(struct ifnet * ifp, u_long c ixgbe_set_promisc(adapter); } } else - ixgbe_init_locked(adapter); + error = ixgbe_init_locked(adapter); } else if (ifp->if_drv_flags & IFF_DRV_RUNNING) ixgbe_stop(adapter); @@ -955,8 +959,11 @@ ixgbe_ioctl(struct ifnet * ifp, u_long c ifp->if_capenable ^= IFCAP_LRO; if (mask & IFCAP_VLAN_HWTAGGING) ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING; - if (ifp->if_drv_flags & IFF_DRV_RUNNING) - ixgbe_init(adapter); + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + IXGBE_CORE_LOCK(adapter); + error = ixgbe_init_locked(adapter); + IXGBE_CORE_UNLOCK(adapter); + } VLAN_CAPABILITIES(ifp); break; } @@ -982,7 +989,7 @@ ixgbe_ioctl(struct ifnet * ifp, u_long c **********************************************************************/ #define IXGBE_MHADD_MFS_SHIFT 16 -static void +static int ixgbe_init_locked(struct adapter *adapter) { struct ifnet *ifp = adapter->ifp; @@ -990,7 +997,6 @@ ixgbe_init_locked(struct adapter *adapte struct ixgbe_hw *hw = &adapter->hw; u32 k, txdctl, mhadd, gpie; u32 rxdctl, rxctrl; - int err; mtx_assert(&adapter->core_mtx, MA_OWNED); INIT_DEBUGOUT("ixgbe_init: begin"); @@ -1012,7 +1018,7 @@ ixgbe_init_locked(struct adapter *adapte if (ixgbe_setup_transmit_structures(adapter)) { device_printf(dev,"Could not setup transmit structures\n"); ixgbe_stop(adapter); - return; + return (ENOMEM); } ixgbe_init_hw(hw); @@ -1034,7 +1040,7 @@ ixgbe_init_locked(struct adapter *adapte if (ixgbe_setup_receive_structures(adapter)) { device_printf(dev,"Could not setup receive structures\n"); ixgbe_stop(adapter); - return; + return (ENOMEM); } /* Configure RX settings */ @@ -1064,8 +1070,11 @@ ixgbe_init_locked(struct adapter *adapte if (ifp->if_capenable & IFCAP_TSO4) ifp->if_hwassist |= CSUM_TSO; if (ifp->if_capenable & IFCAP_TXCSUM) - ifp->if_hwassist = (CSUM_TCP | CSUM_UDP); - + ifp->if_hwassist |= (CSUM_TCP | CSUM_UDP); +#if __FreeBSD_version >= 800000 + if (hw->mac.type == ixgbe_mac_82599EB) + ifp->if_hwassist |= CSUM_SCTP; +#endif /* Set MTU size */ if (ifp->if_mtu > ETHERMTU) { mhadd = IXGBE_READ_REG(hw, IXGBE_MHADD); @@ -1130,7 +1139,7 @@ ixgbe_init_locked(struct adapter *adapte #ifdef IXGBE_FDIR /* Init Flow director */ - if (adapter->hw.mac.type == ixgbe_mac_82599EB) + if (hw->mac.type == ixgbe_mac_82599EB) ixgbe_init_fdir_signature_82599(&adapter->hw, fdir_pballoc); #endif @@ -1138,13 +1147,14 @@ ixgbe_init_locked(struct adapter *adapte ** Check on any SFP devices that ** need to be kick-started */ - err = hw->phy.ops.identify(hw); - if (err == IXGBE_ERR_SFP_NOT_SUPPORTED) { - device_printf(dev, - "Unsupported SFP+ module type was detected.\n"); - ixgbe_detach(dev); - return; - } + if (hw->phy.type == ixgbe_phy_none) { + int err = hw->phy.ops.identify(hw); + if (err == IXGBE_ERR_SFP_NOT_SUPPORTED) { + device_printf(dev, + "Unsupported SFP+ module type was detected.\n"); + return (EIO); + } + } /* Config/Enable Link */ ixgbe_config_link(adapter); @@ -1156,7 +1166,7 @@ ixgbe_init_locked(struct adapter *adapte ifp->if_drv_flags |= IFF_DRV_RUNNING; ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; - return; + return (0); } static void @@ -3003,6 +3013,12 @@ ixgbe_tx_ctx_setup(struct tx_ring *txr, type_tucmd_mlhl |= IXGBE_ADVTXD_TUCMD_L4T_UDP; break; +#if __FreeBSD_version >= 800000 + case IPPROTO_SCTP: + if (mp->m_pkthdr.csum_flags & CSUM_SCTP) + type_tucmd_mlhl |= IXGBE_ADVTXD_TUCMD_L4T_SCTP; + break; +#endif default: offload = FALSE; break; @@ -3956,16 +3972,16 @@ ixgbe_rxeof(struct ix_queue *que, int co IXGBE_RX_LOCK(rxr); + /* Sync the ring. */ + bus_dmamap_sync(rxr->rxdma.dma_tag, rxr->rxdma.dma_map, + BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); + for (i = rxr->next_to_check; count != 0;) { struct mbuf *sendmp, *mh, *mp; u32 rsc, ptype; u16 hlen, plen, hdr, vtag; bool eop; - /* Sync the ring. */ - bus_dmamap_sync(rxr->rxdma.dma_tag, rxr->rxdma.dma_map, - BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); - cur = &rxr->rx_base[i]; staterr = le32toh(cur->wb.upper.status_error); @@ -4138,7 +4154,7 @@ ixgbe_rxeof(struct ix_queue *que, int co rxr->bytes += sendmp->m_pkthdr.len; rxr->rx_bytes += sendmp->m_pkthdr.len; if ((ifp->if_capenable & IFCAP_RXCSUM) != 0) - ixgbe_rx_checksum(staterr, sendmp); + ixgbe_rx_checksum(staterr, sendmp, ptype); #if __FreeBSD_version >= 800000 sendmp->m_pkthdr.flowid = que->msix; sendmp->m_flags |= M_FLOWID; @@ -4202,10 +4218,15 @@ next_desc: * *********************************************************************/ static void -ixgbe_rx_checksum(u32 staterr, struct mbuf * mp) +ixgbe_rx_checksum(u32 staterr, struct mbuf * mp, u32 ptype) { - u16 status = (u16) staterr; - u8 errors = (u8) (staterr >> 24); + u16 status = (u16) staterr; + u8 errors = (u8) (staterr >> 24); + bool sctp = FALSE; + + if ((ptype & IXGBE_RXDADV_PKTTYPE_ETQF) == 0 && + (ptype & IXGBE_RXDADV_PKTTYPE_SCTP) != 0) + sctp = TRUE; if (status & IXGBE_RXD_STAT_IPCS) { if (!(errors & IXGBE_RXD_ERR_IPE)) { @@ -4217,10 +4238,15 @@ ixgbe_rx_checksum(u32 staterr, struct mb mp->m_pkthdr.csum_flags = 0; } if (status & IXGBE_RXD_STAT_L4CS) { + u16 type = (CSUM_DATA_VALID | CSUM_PSEUDO_HDR); +#if __FreeBSD_version >= 800000 + if (sctp) + type = CSUM_SCTP_VALID; +#endif if (!(errors & IXGBE_RXD_ERR_TCPE)) { - mp->m_pkthdr.csum_flags |= - (CSUM_DATA_VALID | CSUM_PSEUDO_HDR); - mp->m_pkthdr.csum_data = htons(0xffff); + mp->m_pkthdr.csum_flags |= type; + if (!sctp) + mp->m_pkthdr.csum_data = htons(0xffff); } } return; Modified: head/sys/dev/ixgbe/ixgbe.h ============================================================================== --- head/sys/dev/ixgbe/ixgbe.h Tue Mar 30 19:08:05 2010 (r205903) +++ head/sys/dev/ixgbe/ixgbe.h Tue Mar 30 19:09:18 2010 (r205904) @@ -179,7 +179,13 @@ #define IXGBE_RX_HDR 128 #define IXGBE_VFTA_SIZE 128 #define IXGBE_BR_SIZE 4096 -#define CSUM_OFFLOAD 7 /* Bits in csum flags */ + +/* Offload bits in mbuf flag */ +#if __FreeBSD_version >= 800000 +#define CSUM_OFFLOAD (CSUM_IP|CSUM_TCP|CSUM_UDP|CSUM_SCTP) +#else +#define CSUM_OFFLOAD (CSUM_IP|CSUM_TCP|CSUM_UDP) +#endif /* For 6.X code compatibility */ #if !defined(ETHER_BPF_MTAP) From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 19:13:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E034106564A; Tue, 30 Mar 2010 19:13:38 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D72118FC13; Tue, 30 Mar 2010 19:13: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 o2UJDbEd068862; Tue, 30 Mar 2010 19:13:37 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UJDbI5068860; Tue, 30 Mar 2010 19:13:37 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003301913.o2UJDbI5068860@svn.freebsd.org> From: Marius Strobl Date: Tue, 30 Mar 2010 19:13: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: r205905 - stable/8/lib/libc/sparc64/fpu X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2010 19:13:38 -0000 Author: marius Date: Tue Mar 30 19:13:37 2010 New Revision: 205905 URL: http://svn.freebsd.org/changeset/base/205905 Log: MFC: r205410 Avoid aliasing which leads to incorrect results when compiling with the default strict aliasing rules. PR: 144900 Submitted by: Peter Jeremy Modified: stable/8/lib/libc/sparc64/fpu/fpu_explode.c Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/8/lib/libc/sparc64/fpu/fpu_explode.c ============================================================================== --- stable/8/lib/libc/sparc64/fpu/fpu_explode.c Tue Mar 30 19:09:18 2010 (r205904) +++ stable/8/lib/libc/sparc64/fpu/fpu_explode.c Tue Mar 30 19:13:37 2010 (r205905) @@ -139,9 +139,9 @@ __fpu_xtof(fp, i) * a signed or unsigned entity. */ if (fp->fp_sign && (int64_t)i < 0) - *((int64_t*)fp->fp_mant) = -i; + *((int64_t *)fp->fp_mant) = -i; else - *((int64_t*)fp->fp_mant) = i; + *((int64_t *)fp->fp_mant) = i; fp->fp_mant[2] = 0; fp->fp_mant[3] = 0; __fpu_norm(fp); @@ -262,14 +262,12 @@ __fpu_explode(fe, fp, type, reg) struct fpn *fp; int type, reg; { - u_int32_t s, *sp; - u_int64_t l[2]; - void *vl = l; + u_int64_t l0, l1; + u_int32_t s; if (type == FTYPE_LNG || type == FTYPE_DBL || type == FTYPE_EXT) { - l[0] = __fpu_getreg64(reg & ~1); - sp = vl; - fp->fp_sign = sp[0] >> 31; + l0 = __fpu_getreg64(reg & ~1); + fp->fp_sign = l0 >> 63; } else { s = __fpu_getreg(reg); fp->fp_sign = s >> 31; @@ -277,7 +275,7 @@ __fpu_explode(fe, fp, type, reg) fp->fp_sticky = 0; switch (type) { case FTYPE_LNG: - s = __fpu_xtof(fp, l[0]); + s = __fpu_xtof(fp, l0); break; case FTYPE_INT: @@ -289,12 +287,13 @@ __fpu_explode(fe, fp, type, reg) break; case FTYPE_DBL: - s = __fpu_dtof(fp, sp[0], sp[1]); + s = __fpu_dtof(fp, l0 >> 32, l0 & 0xffffffff); break; case FTYPE_EXT: - l[1] = __fpu_getreg64((reg & ~1) + 2); - s = __fpu_qtof(fp, sp[0], sp[1], sp[2], sp[3]); + l1 = __fpu_getreg64((reg & ~1) + 2); + s = __fpu_qtof(fp, l0 >> 32, l0 & 0xffffffff, l1 >> 32, + l1 & 0xffffffff); break; default: From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 19:15:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 35CF4106566B; Tue, 30 Mar 2010 19:15:58 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0A8828FC12; Tue, 30 Mar 2010 19:15: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 o2UJFvTJ069449; Tue, 30 Mar 2010 19:15:57 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UJFvrr069447; Tue, 30 Mar 2010 19:15:57 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003301915.o2UJFvrr069447@svn.freebsd.org> From: Marius Strobl Date: Tue, 30 Mar 2010 19:15: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: r205906 - stable/7/lib/libc/sparc64/fpu X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2010 19:15:58 -0000 Author: marius Date: Tue Mar 30 19:15:57 2010 New Revision: 205906 URL: http://svn.freebsd.org/changeset/base/205906 Log: MFC: r173859, r205410 Avoid aliasing which leads to incorrect results when compiling with the default strict aliasing rules. PR: 144900 Submitted by: Peter Jeremy Modified: stable/7/lib/libc/sparc64/fpu/fpu_explode.c Directory Properties: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdtime/ (props changed) Modified: stable/7/lib/libc/sparc64/fpu/fpu_explode.c ============================================================================== --- stable/7/lib/libc/sparc64/fpu/fpu_explode.c Tue Mar 30 19:13:37 2010 (r205905) +++ stable/7/lib/libc/sparc64/fpu/fpu_explode.c Tue Mar 30 19:15:57 2010 (r205906) @@ -139,9 +139,9 @@ __fpu_xtof(fp, i) * a signed or unsigned entity. */ if (fp->fp_sign && (int64_t)i < 0) - *((int64_t*)fp->fp_mant) = -i; + *((int64_t *)fp->fp_mant) = -i; else - *((int64_t*)fp->fp_mant) = i; + *((int64_t *)fp->fp_mant) = i; fp->fp_mant[2] = 0; fp->fp_mant[3] = 0; __fpu_norm(fp); @@ -262,13 +262,12 @@ __fpu_explode(fe, fp, type, reg) struct fpn *fp; int type, reg; { - u_int32_t s, *sp; - u_int64_t l[2]; + u_int64_t l0, l1; + u_int32_t s; if (type == FTYPE_LNG || type == FTYPE_DBL || type == FTYPE_EXT) { - l[0] = __fpu_getreg64(reg & ~1); - sp = (u_int32_t *)l; - fp->fp_sign = sp[0] >> 31; + l0 = __fpu_getreg64(reg & ~1); + fp->fp_sign = l0 >> 63; } else { s = __fpu_getreg(reg); fp->fp_sign = s >> 31; @@ -276,7 +275,7 @@ __fpu_explode(fe, fp, type, reg) fp->fp_sticky = 0; switch (type) { case FTYPE_LNG: - s = __fpu_xtof(fp, l[0]); + s = __fpu_xtof(fp, l0); break; case FTYPE_INT: @@ -288,12 +287,13 @@ __fpu_explode(fe, fp, type, reg) break; case FTYPE_DBL: - s = __fpu_dtof(fp, sp[0], sp[1]); + s = __fpu_dtof(fp, l0 >> 32, l0 & 0xffffffff); break; case FTYPE_EXT: - l[1] = __fpu_getreg64((reg & ~1) + 2); - s = __fpu_qtof(fp, sp[0], sp[1], sp[2], sp[3]); + l1 = __fpu_getreg64((reg & ~1) + 2); + s = __fpu_qtof(fp, l0 >> 32, l0 & 0xffffffff, l1 >> 32, + l1 & 0xffffffff); break; default: From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 19:16:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E28D106566C; Tue, 30 Mar 2010 19:16:01 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 12D258FC13; Tue, 30 Mar 2010 19:16: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 o2UJG0ZD069486; Tue, 30 Mar 2010 19:16:00 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UJG02N069484; Tue, 30 Mar 2010 19:16:00 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003301916.o2UJG02N069484@svn.freebsd.org> From: Marius Strobl Date: Tue, 30 Mar 2010 19:16:00 +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: r205907 - stable/6/lib/libc/sparc64/fpu X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2010 19:16:01 -0000 Author: marius Date: Tue Mar 30 19:16:00 2010 New Revision: 205907 URL: http://svn.freebsd.org/changeset/base/205907 Log: MFC: r173859, r205410 Avoid aliasing which leads to incorrect results when compiling with the default strict aliasing rules. PR: 144900 Submitted by: Peter Jeremy Modified: stable/6/lib/libc/sparc64/fpu/fpu_explode.c Directory Properties: stable/6/lib/libc/ (props changed) Modified: stable/6/lib/libc/sparc64/fpu/fpu_explode.c ============================================================================== --- stable/6/lib/libc/sparc64/fpu/fpu_explode.c Tue Mar 30 19:15:57 2010 (r205906) +++ stable/6/lib/libc/sparc64/fpu/fpu_explode.c Tue Mar 30 19:16:00 2010 (r205907) @@ -143,9 +143,9 @@ __fpu_xtof(fp, i) * a signed or unsigned entity. */ if (fp->fp_sign && (int64_t)i < 0) - *((int64_t*)fp->fp_mant) = -i; + *((int64_t *)fp->fp_mant) = -i; else - *((int64_t*)fp->fp_mant) = i; + *((int64_t *)fp->fp_mant) = i; fp->fp_mant[2] = 0; fp->fp_mant[3] = 0; __fpu_norm(fp); @@ -266,13 +266,12 @@ __fpu_explode(fe, fp, type, reg) struct fpn *fp; int type, reg; { - u_int32_t s, *sp; - u_int64_t l[2]; + u_int64_t l0, l1; + u_int32_t s; if (type == FTYPE_LNG || type == FTYPE_DBL || type == FTYPE_EXT) { - l[0] = __fpu_getreg64(reg & ~1); - sp = (u_int32_t *)l; - fp->fp_sign = sp[0] >> 31; + l0 = __fpu_getreg64(reg & ~1); + fp->fp_sign = l0 >> 63; } else { s = __fpu_getreg(reg); fp->fp_sign = s >> 31; @@ -280,7 +279,7 @@ __fpu_explode(fe, fp, type, reg) fp->fp_sticky = 0; switch (type) { case FTYPE_LNG: - s = __fpu_xtof(fp, l[0]); + s = __fpu_xtof(fp, l0); break; case FTYPE_INT: @@ -292,12 +291,13 @@ __fpu_explode(fe, fp, type, reg) break; case FTYPE_DBL: - s = __fpu_dtof(fp, sp[0], sp[1]); + s = __fpu_dtof(fp, l0 >> 32, l0 & 0xffffffff); break; case FTYPE_EXT: - l[1] = __fpu_getreg64((reg & ~1) + 2); - s = __fpu_qtof(fp, sp[0], sp[1], sp[2], sp[3]); + l1 = __fpu_getreg64((reg & ~1) + 2); + s = __fpu_qtof(fp, l0 >> 32, l0 & 0xffffffff, l1 >> 32, + l1 & 0xffffffff); break; default: From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 19:31:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1AF25106564A; Tue, 30 Mar 2010 19:31:59 +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 09A008FC0A; Tue, 30 Mar 2010 19:31: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 o2UJVwwm073012; Tue, 30 Mar 2010 19:31:58 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UJVwSP073010; Tue, 30 Mar 2010 19:31:58 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201003301931.o2UJVwSP073010@svn.freebsd.org> From: Hiroki Sato Date: Tue, 30 Mar 2010 19:31: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: r205908 - stable/7/release/doc/en_US.ISO8859-1/errata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2010 19:31:59 -0000 Author: hrs Date: Tue Mar 30 19:31:58 2010 New Revision: 205908 URL: http://svn.freebsd.org/changeset/base/205908 Log: Document zfsloader issue on 7.3R. Modified: stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml Modified: stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml ============================================================================== --- stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml Tue Mar 30 19:16:00 2010 (r205907) +++ stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml Tue Mar 30 19:31:58 2010 (r205908) @@ -167,6 +167,14 @@ Late-Breaking News and Corrections + [20100330] It turns out that the + zfsloader in 7.3-RELEASE, a new boot loader + similar to &man.loader.8; but it supports ZFS, does not work + properly. This problem has been fixed in r205539 + (RELENG_7). An Errata Notice for 7.3-RELEASE is + planned. + [20100323] The &os; 7.3-RELEASE Release Notes incorrectly mentioned that the hwpmc(4) driver has been added though this driver has already been added in 7.0-RELEASE. The changes in From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 19:33:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C4FD1065680; Tue, 30 Mar 2010 19:33:10 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EFB618FC16; Tue, 30 Mar 2010 19:33: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 o2UJX9um073350; Tue, 30 Mar 2010 19:33:09 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UJX90Z073348; Tue, 30 Mar 2010 19:33:09 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003301933.o2UJX90Z073348@svn.freebsd.org> From: Marius Strobl Date: Tue, 30 Mar 2010 19:33: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: r205909 - stable/7/sys/sun4v/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2010 19:33:10 -0000 Author: marius Date: Tue Mar 30 19:33:09 2010 New Revision: 205909 URL: http://svn.freebsd.org/changeset/base/205909 Log: MFC: r203334 Sync with the other archs and declare the memory location referenced by the address argument of the bus_space_write_multi_*() familiy as const. Modified: stable/7/sys/sun4v/include/bus.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sun4v/include/bus.h ============================================================================== --- stable/7/sys/sun4v/include/bus.h Tue Mar 30 19:31:58 2010 (r205908) +++ stable/7/sys/sun4v/include/bus.h Tue Mar 30 19:33:09 2010 (r205909) @@ -316,7 +316,7 @@ bus_space_write_8(bus_space_tag_t t, bus static __inline void bus_space_write_multi_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, - uint8_t *a, size_t c) + const uint8_t *a, size_t c) { while (c-- > 0) @@ -325,7 +325,7 @@ bus_space_write_multi_1(bus_space_tag_t static __inline void bus_space_write_multi_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, - uint16_t *a, size_t c) + const uint16_t *a, size_t c) { while (c-- > 0) @@ -334,7 +334,7 @@ bus_space_write_multi_2(bus_space_tag_t static __inline void bus_space_write_multi_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, - uint32_t *a, size_t c) + const uint32_t *a, size_t c) { while (c-- > 0) @@ -343,7 +343,7 @@ bus_space_write_multi_4(bus_space_tag_t static __inline void bus_space_write_multi_8(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, - uint64_t *a, size_t c) + const uint64_t *a, size_t c) { while (c-- > 0) From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 19:33:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2B06F1065689; Tue, 30 Mar 2010 19:33:10 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 19C848FC27; Tue, 30 Mar 2010 19:33: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 o2UJX9FP073356; Tue, 30 Mar 2010 19:33:09 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UJX96l073353; Tue, 30 Mar 2010 19:33:09 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003301933.o2UJX96l073353@svn.freebsd.org> From: Marius Strobl Date: Tue, 30 Mar 2010 19:33: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: r205910 - stable/8/sys/sun4v/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2010 19:33:10 -0000 Author: marius Date: Tue Mar 30 19:33:09 2010 New Revision: 205910 URL: http://svn.freebsd.org/changeset/base/205910 Log: MFC: r203334 Sync with the other archs and declare the memory location referenced by the address argument of the bus_space_write_multi_*() familiy as const. Modified: stable/8/sys/sun4v/include/bus.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/sun4v/include/bus.h ============================================================================== --- stable/8/sys/sun4v/include/bus.h Tue Mar 30 19:33:09 2010 (r205909) +++ stable/8/sys/sun4v/include/bus.h Tue Mar 30 19:33:09 2010 (r205910) @@ -316,7 +316,7 @@ bus_space_write_8(bus_space_tag_t t, bus static __inline void bus_space_write_multi_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, - uint8_t *a, size_t c) + const uint8_t *a, size_t c) { while (c-- > 0) @@ -325,7 +325,7 @@ bus_space_write_multi_1(bus_space_tag_t static __inline void bus_space_write_multi_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, - uint16_t *a, size_t c) + const uint16_t *a, size_t c) { while (c-- > 0) @@ -334,7 +334,7 @@ bus_space_write_multi_2(bus_space_tag_t static __inline void bus_space_write_multi_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, - uint32_t *a, size_t c) + const uint32_t *a, size_t c) { while (c-- > 0) @@ -343,7 +343,7 @@ bus_space_write_multi_4(bus_space_tag_t static __inline void bus_space_write_multi_8(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, - uint64_t *a, size_t c) + const uint64_t *a, size_t c) { while (c-- > 0) From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 19:35:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6ACA21065673; Tue, 30 Mar 2010 19:35:26 +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 3DBC38FC19; Tue, 30 Mar 2010 19:35:26 +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 E2AFF46BC3; Tue, 30 Mar 2010 15:35:25 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 1B6EF8A01F; Tue, 30 Mar 2010 15:35:25 -0400 (EDT) From: John Baldwin To: src-committers@freebsd.org Date: Tue, 30 Mar 2010 15:22:17 -0400 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: <201003301907.o2UJ7g7W067299@svn.freebsd.org> In-Reply-To: <201003301907.o2UJ7g7W067299@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201003301522.17316.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Tue, 30 Mar 2010 15:35:25 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.8 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r205900 - 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: Tue, 30 Mar 2010 19:35:26 -0000 On Tuesday 30 March 2010 3:07:42 pm John Baldwin wrote: > Author: jhb > Date: Tue Mar 30 19:07:41 2010 > New Revision: 205900 > URL: http://svn.freebsd.org/changeset/base/205900 > > Log: > Use panic() (which the environment is required to provide to libstand) to > implement assert() instead of relying on a non-required exit(). The exit() > invocation also did not match the semantics of the exit() routine that > current boot environments happen to require. s/require/provide/ at the end. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 19:36:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 524491065670; Tue, 30 Mar 2010 19:36:01 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 40F0D8FC1C; Tue, 30 Mar 2010 19:36: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 o2UJa18H074048; Tue, 30 Mar 2010 19:36:01 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UJa1ER074045; Tue, 30 Mar 2010 19:36:01 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003301936.o2UJa1ER074045@svn.freebsd.org> From: Marius Strobl Date: Tue, 30 Mar 2010 19:36: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: r205911 - in stable/8/sys/sun4v: include sun4v X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2010 19:36:01 -0000 Author: marius Date: Tue Mar 30 19:36:00 2010 New Revision: 205911 URL: http://svn.freebsd.org/changeset/base/205911 Log: MFC: r203335 - Const'ify the bus_stream_asi and bus_type_asi arrays. - Replace hard-coded functions names missed in bus_machdep.c with __func__. - Break some long lines. Modified: stable/8/sys/sun4v/include/bus.h stable/8/sys/sun4v/sun4v/bus_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/sun4v/include/bus.h ============================================================================== --- stable/8/sys/sun4v/include/bus.h Tue Mar 30 19:33:09 2010 (r205910) +++ stable/8/sys/sun4v/include/bus.h Tue Mar 30 19:36:00 2010 (r205911) @@ -96,8 +96,8 @@ #define PCI_MEMORY_BUS_SPACE 4 #define LAST_BUS_SPACE 5 -extern int bus_type_asi[]; -extern int bus_stream_asi[]; +extern const int bus_type_asi[]; +extern const int bus_stream_asi[]; #define __BUS_SPACE_HAS_STREAM_METHODS 1 Modified: stable/8/sys/sun4v/sun4v/bus_machdep.c ============================================================================== --- stable/8/sys/sun4v/sun4v/bus_machdep.c Tue Mar 30 19:33:09 2010 (r205910) +++ stable/8/sys/sun4v/sun4v/bus_machdep.c Tue Mar 30 19:36:00 2010 (r205911) @@ -95,7 +95,7 @@ * from: @(#)machdep.c 8.6 (Berkeley) 1/14/94 * from: NetBSD: machdep.c,v 1.111 2001/09/15 07:13:40 eeh Exp * and - * from: FreeBSD: src/sys/i386/i386/busdma_machdep.c,v 1.24 2001/08/15 + * from: FreeBSD: src/sys/i386/i386/busdma_machdep.c,v 1.24 2001/08/15 */ #include @@ -129,8 +129,8 @@ __FBSDID("$FreeBSD$"); static void nexus_bus_barrier(bus_space_tag_t, bus_space_handle_t, bus_size_t, bus_size_t, int); -/* ASI's for bus access. */ -int bus_type_asi[] = { +/* ASIs for bus access */ +const int bus_type_asi[] = { ASI_REAL_IO, /* nexus */ ASI_REAL_IO, /* SBus */ ASI_REAL_IO_L, /* PCI configuration space */ @@ -139,7 +139,7 @@ int bus_type_asi[] = { 0 }; -int bus_stream_asi[] = { +const int bus_stream_asi[] = { ASI_REAL_IO, /* nexus */ ASI_REAL_IO, /* SBus */ ASI_REAL_IO, /* PCI configuration space */ @@ -249,7 +249,7 @@ bus_dma_tag_create(bus_dma_tag_t parent, newtag->dt_segments = NULL; - /* Take into account any restrictions imposed by our parent tag */ + /* Take into account any restrictions imposed by our parent tag. */ if (parent != NULL) { newtag->dt_lowaddr = ulmin(parent->dt_lowaddr, newtag->dt_lowaddr); @@ -551,8 +551,7 @@ nexus_dmamap_load_uio(bus_dma_tag_t dmat if (uio->uio_segflg == UIO_USERSPACE) { td = uio->uio_td; - KASSERT(td != NULL, - ("nexus_dmamap_load_uio: USERSPACE but no proc")); + KASSERT(td != NULL, ("%s: USERSPACE but no proc", __func__)); } nsegs = 0; @@ -652,9 +651,9 @@ nexus_dmamem_alloc(bus_dma_tag_t dmat, v *vaddr = malloc(dmat->dt_maxsize, M_DEVBUF, mflags); } else { /* - * XXX: Use contigmalloc until it is merged into this facility - * and handles multi-seg allocations. Nobody is doing multi-seg - * allocations yet though. + * XXX use contigmalloc until it is merged into this + * facility and handles multi-seg allocations. Nobody + * is doing multi-seg allocations yet though. */ *vaddr = contigmalloc(dmat->dt_maxsize, M_DEVBUF, mflags, 0ul, dmat->dt_lowaddr, @@ -795,8 +794,8 @@ sparc64_bus_mem_unmap(void *bh, bus_size } /* - * Fake up a bus tag, for use by console drivers in early boot when the regular - * means to allocate resources are not yet available. + * Fake up a bus tag, for use by console drivers in early boot when the + * regular means to allocate resources are not yet available. * Addr is the physical address of the desired start of the handle. */ bus_space_handle_t From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 19:36:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ACE541065675; Tue, 30 Mar 2010 19:36:03 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9B3918FC25; Tue, 30 Mar 2010 19:36: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 o2UJa3YO074112; Tue, 30 Mar 2010 19:36:03 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UJa3Zj074109; Tue, 30 Mar 2010 19:36:03 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003301936.o2UJa3Zj074109@svn.freebsd.org> From: Marius Strobl Date: Tue, 30 Mar 2010 19:36: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: r205912 - in stable/7/sys/sun4v: include sun4v X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2010 19:36:03 -0000 Author: marius Date: Tue Mar 30 19:36:03 2010 New Revision: 205912 URL: http://svn.freebsd.org/changeset/base/205912 Log: MFC: r203335 - Const'ify the bus_stream_asi and bus_type_asi arrays. - Replace hard-coded functions names missed in bus_machdep.c with __func__. - Break some long lines. Modified: stable/7/sys/sun4v/include/bus.h stable/7/sys/sun4v/sun4v/bus_machdep.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sun4v/include/bus.h ============================================================================== --- stable/7/sys/sun4v/include/bus.h Tue Mar 30 19:36:00 2010 (r205911) +++ stable/7/sys/sun4v/include/bus.h Tue Mar 30 19:36:03 2010 (r205912) @@ -96,8 +96,8 @@ #define PCI_MEMORY_BUS_SPACE 4 #define LAST_BUS_SPACE 5 -extern int bus_type_asi[]; -extern int bus_stream_asi[]; +extern const int bus_type_asi[]; +extern const int bus_stream_asi[]; #define __BUS_SPACE_HAS_STREAM_METHODS 1 Modified: stable/7/sys/sun4v/sun4v/bus_machdep.c ============================================================================== --- stable/7/sys/sun4v/sun4v/bus_machdep.c Tue Mar 30 19:36:00 2010 (r205911) +++ stable/7/sys/sun4v/sun4v/bus_machdep.c Tue Mar 30 19:36:03 2010 (r205912) @@ -95,7 +95,7 @@ * from: @(#)machdep.c 8.6 (Berkeley) 1/14/94 * from: NetBSD: machdep.c,v 1.111 2001/09/15 07:13:40 eeh Exp * and - * from: FreeBSD: src/sys/i386/i386/busdma_machdep.c,v 1.24 2001/08/15 + * from: FreeBSD: src/sys/i386/i386/busdma_machdep.c,v 1.24 2001/08/15 */ #include @@ -129,8 +129,8 @@ __FBSDID("$FreeBSD$"); static void nexus_bus_barrier(bus_space_tag_t, bus_space_handle_t, bus_size_t, bus_size_t, int); -/* ASI's for bus access. */ -int bus_type_asi[] = { +/* ASIs for bus access */ +const int bus_type_asi[] = { ASI_REAL_IO, /* nexus */ ASI_REAL_IO, /* SBus */ ASI_REAL_IO_L, /* PCI configuration space */ @@ -139,7 +139,7 @@ int bus_type_asi[] = { 0 }; -int bus_stream_asi[] = { +const int bus_stream_asi[] = { ASI_REAL_IO, /* nexus */ ASI_REAL_IO, /* SBus */ ASI_REAL_IO, /* PCI configuration space */ @@ -249,7 +249,7 @@ bus_dma_tag_create(bus_dma_tag_t parent, newtag->dt_segments = NULL; - /* Take into account any restrictions imposed by our parent tag */ + /* Take into account any restrictions imposed by our parent tag. */ if (parent != NULL) { newtag->dt_lowaddr = ulmin(parent->dt_lowaddr, newtag->dt_lowaddr); @@ -551,8 +551,7 @@ nexus_dmamap_load_uio(bus_dma_tag_t dmat if (uio->uio_segflg == UIO_USERSPACE) { td = uio->uio_td; - KASSERT(td != NULL, - ("nexus_dmamap_load_uio: USERSPACE but no proc")); + KASSERT(td != NULL, ("%s: USERSPACE but no proc", __func__)); } nsegs = 0; @@ -652,9 +651,9 @@ nexus_dmamem_alloc(bus_dma_tag_t dmat, v *vaddr = malloc(dmat->dt_maxsize, M_DEVBUF, mflags); } else { /* - * XXX: Use contigmalloc until it is merged into this facility - * and handles multi-seg allocations. Nobody is doing multi-seg - * allocations yet though. + * XXX use contigmalloc until it is merged into this + * facility and handles multi-seg allocations. Nobody + * is doing multi-seg allocations yet though. */ *vaddr = contigmalloc(dmat->dt_maxsize, M_DEVBUF, mflags, 0ul, dmat->dt_lowaddr, @@ -795,8 +794,8 @@ sparc64_bus_mem_unmap(void *bh, bus_size } /* - * Fake up a bus tag, for use by console drivers in early boot when the regular - * means to allocate resources are not yet available. + * Fake up a bus tag, for use by console drivers in early boot when the + * regular means to allocate resources are not yet available. * Addr is the physical address of the desired start of the handle. */ bus_space_handle_t From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 19:37:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D514106567C; Tue, 30 Mar 2010 19:37:47 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6B0848FC1C; Tue, 30 Mar 2010 19:37: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 o2UJblnB074540; Tue, 30 Mar 2010 19:37:47 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UJblmt074538; Tue, 30 Mar 2010 19:37:47 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003301937.o2UJblmt074538@svn.freebsd.org> From: Marius Strobl Date: Tue, 30 Mar 2010 19:37: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: r205913 - stable/8/sys/sun4v/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2010 19:37:47 -0000 Author: marius Date: Tue Mar 30 19:37:47 2010 New Revision: 205913 URL: http://svn.freebsd.org/changeset/base/205913 Log: MFC: r203341 - Remove the BUS_HANDLE_MIN checking in the __BUS_DEBUG_ACCESS macro; for UPA it should have fulfilled its purpose by now and Fireplane- and JBus-based machines are way to messy in organization to implement something equivalent. - Fix a bunch of style(9) bugs. Modified: stable/8/sys/sun4v/include/bus.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/sun4v/include/bus.h ============================================================================== --- stable/8/sys/sun4v/include/bus.h Tue Mar 30 19:36:03 2010 (r205912) +++ stable/8/sys/sun4v/include/bus.h Tue Mar 30 19:37:47 2010 (r205913) @@ -81,7 +81,6 @@ #include #include -#include /* * Nexus and SBus spaces are non-cached and big endian @@ -99,27 +98,24 @@ extern const int bus_type_asi[]; extern const int bus_stream_asi[]; -#define __BUS_SPACE_HAS_STREAM_METHODS 1 +#define __BUS_SPACE_HAS_STREAM_METHODS 1 -#define BUS_SPACE_MAXSIZE_24BIT 0xFFFFFF -#define BUS_SPACE_MAXSIZE_32BIT 0xFFFFFFFF -#define BUS_SPACE_MAXSIZE 0xFFFFFFFFFFFFFFFF -#define BUS_SPACE_MAXADDR_24BIT 0xFFFFFF -#define BUS_SPACE_MAXADDR_32BIT 0xFFFFFFFF -#define BUS_SPACE_MAXADDR 0xFFFFFFFF +#define BUS_SPACE_MAXSIZE_24BIT 0xFFFFFF +#define BUS_SPACE_MAXSIZE_32BIT 0xFFFFFFFF +#define BUS_SPACE_MAXSIZE 0xFFFFFFFFFFFFFFFF +#define BUS_SPACE_MAXADDR_24BIT 0xFFFFFF +#define BUS_SPACE_MAXADDR_32BIT 0xFFFFFFFF +#define BUS_SPACE_MAXADDR 0xFFFFFFFF -#define BUS_SPACE_UNRESTRICTED (~0) +#define BUS_SPACE_UNRESTRICTED (~0) -/* - * Access methods for bus resources and address space. - */ struct bus_space_tag { void *bst_cookie; bus_space_tag_t bst_parent; int bst_type; void (*bst_bus_barrier)(bus_space_tag_t, bus_space_handle_t, - bus_size_t, bus_size_t, int); + bus_size_t, bus_size_t, int); }; /* @@ -135,13 +131,11 @@ static int bus_space_subregion(bus_space */ static __inline int bus_space_map(bus_space_tag_t t, bus_addr_t addr, - bus_size_t size, int flags, - bus_space_handle_t *bshp); + bus_size_t size, int flags, bus_space_handle_t *bshp); static __inline int bus_space_map(bus_space_tag_t t __unused, bus_addr_t addr, - bus_size_t size __unused, int flags __unused, - bus_space_handle_t *bshp) + bus_size_t size __unused, int flags __unused, bus_space_handle_t *bshp) { *bshp = addr; @@ -152,24 +146,26 @@ bus_space_map(bus_space_tag_t t __unused * Unmap a region of device bus space. */ static __inline void bus_space_unmap(bus_space_tag_t t, bus_space_handle_t bsh, - bus_size_t size); + bus_size_t size); static __inline void bus_space_unmap(bus_space_tag_t t __unused, bus_space_handle_t bsh __unused, - bus_size_t size __unused) + bus_size_t size __unused) { + } /* This macro finds the first "upstream" implementation of method `f' */ -#define _BS_CALL(t,f) \ +#define _BS_CALL(t,f) \ while (t->f == NULL) \ - t = t->bst_parent; \ + t = t->bst_parent; \ return (*(t)->f) static __inline void bus_space_barrier(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, bus_size_t s, int f) { + _BS_CALL(t, bst_bus_barrier)(t, h, o, s, f); } @@ -177,20 +173,21 @@ static __inline int bus_space_subregion(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, bus_size_t s, bus_space_handle_t *hp) { + *hp = h + o; return (0); } /* flags for bus space map functions */ -#define BUS_SPACE_MAP_CACHEABLE 0x0001 -#define BUS_SPACE_MAP_LINEAR 0x0002 -#define BUS_SPACE_MAP_READONLY 0x0004 -#define BUS_SPACE_MAP_PREFETCHABLE 0x0008 +#define BUS_SPACE_MAP_CACHEABLE 0x0001 +#define BUS_SPACE_MAP_LINEAR 0x0002 +#define BUS_SPACE_MAP_READONLY 0x0004 +#define BUS_SPACE_MAP_PREFETCHABLE 0x0008 /* placeholders for bus functions... */ -#define BUS_SPACE_MAP_BUS1 0x0100 -#define BUS_SPACE_MAP_BUS2 0x0200 -#define BUS_SPACE_MAP_BUS3 0x0400 -#define BUS_SPACE_MAP_BUS4 0x0800 +#define BUS_SPACE_MAP_BUS1 0x0100 +#define BUS_SPACE_MAP_BUS2 0x0200 +#define BUS_SPACE_MAP_BUS3 0x0400 +#define BUS_SPACE_MAP_BUS4 0x0800 /* flags for bus_space_barrier() */ #define BUS_SPACE_BARRIER_READ 0x01 /* force read barrier */ @@ -198,13 +195,9 @@ bus_space_subregion(bus_space_tag_t t, b #ifdef BUS_SPACE_DEBUG #define KTR_BUS KTR_CT2 -#define BUS_HANDLE_MIN UPA_MEMSTART #define __BUS_DEBUG_ACCESS(h, o, desc, sz) do { \ CTR4(KTR_BUS, "bus space: %s %d: handle %#lx, offset %#lx", \ (desc), (sz), (h), (o)); \ - if ((h) + (o) < BUS_HANDLE_MIN) \ - panic("bus space access at %#lx out of range", \ - (h) + (o)); \ } while (0) #else #define __BUS_DEBUG_ACCESS(h, o, desc, sz) @@ -388,97 +381,109 @@ bus_space_set_multi_8(bus_space_tag_t t, static __inline void bus_space_read_region_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, - u_int8_t *a, bus_size_t c) + uint8_t *a, bus_size_t c) { + for (; c; a++, c--, o++) *a = bus_space_read_1(t, h, o); } static __inline void bus_space_read_region_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, - u_int16_t *a, bus_size_t c) + uint16_t *a, bus_size_t c) { - for (; c; a++, c--, o+=2) + + for (; c; a++, c--, o += 2) *a = bus_space_read_2(t, h, o); } static __inline void bus_space_read_region_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, - u_int32_t *a, bus_size_t c) + uint32_t *a, bus_size_t c) { - for (; c; a++, c--, o+=4) + + for (; c; a++, c--, o += 4) *a = bus_space_read_4(t, h, o); } static __inline void bus_space_read_region_8(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, - u_int64_t *a, bus_size_t c) + uint64_t *a, bus_size_t c) { - for (; c; a++, c--, o+=8) + + for (; c; a++, c--, o += 8) *a = bus_space_read_8(t, h, o); } static __inline void bus_space_write_region_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, - const u_int8_t *a, bus_size_t c) + const uint8_t *a, bus_size_t c) { + for (; c; a++, c--, o++) bus_space_write_1(t, h, o, *a); } static __inline void bus_space_write_region_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, - const u_int16_t *a, bus_size_t c) + const uint16_t *a, bus_size_t c) { - for (; c; a++, c--, o+=2) + + for (; c; a++, c--, o += 2) bus_space_write_2(t, h, o, *a); } static __inline void bus_space_write_region_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, - const u_int32_t *a, bus_size_t c) + const uint32_t *a, bus_size_t c) { - for (; c; a++, c--, o+=4) + + for (; c; a++, c--, o += 4) bus_space_write_4(t, h, o, *a); } static __inline void bus_space_write_region_8(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, - const u_int64_t *a, bus_size_t c) + const uint64_t *a, bus_size_t c) { - for (; c; a++, c--, o+=8) + + for (; c; a++, c--, o += 8) bus_space_write_8(t, h, o, *a); } static __inline void bus_space_set_region_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, - const u_int8_t v, bus_size_t c) + const uint8_t v, bus_size_t c) { + for (; c; c--, o++) bus_space_write_1(t, h, o, v); } static __inline void bus_space_set_region_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, - const u_int16_t v, bus_size_t c) + const uint16_t v, bus_size_t c) { - for (; c; c--, o+=2) + + for (; c; c--, o += 2) bus_space_write_2(t, h, o, v); } static __inline void bus_space_set_region_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, - const u_int32_t v, bus_size_t c) + const uint32_t v, bus_size_t c) { - for (; c; c--, o+=4) + + for (; c; c--, o += 4) bus_space_write_4(t, h, o, v); } static __inline void bus_space_set_region_8(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, - const u_int64_t v, bus_size_t c) + const uint64_t v, bus_size_t c) { - for (; c; c--, o+=8) + + for (; c; c--, o += 8) bus_space_write_8(t, h, o, v); } @@ -486,6 +491,7 @@ static __inline void bus_space_copy_region_1(bus_space_tag_t t, bus_space_handle_t h1, bus_size_t o1, bus_space_handle_t h2, bus_size_t o2, bus_size_t c) { + for (; c; c--, o1++, o2++) bus_space_write_1(t, h1, o1, bus_space_read_1(t, h2, o2)); } @@ -494,7 +500,8 @@ static __inline void bus_space_copy_region_2(bus_space_tag_t t, bus_space_handle_t h1, bus_size_t o1, bus_space_handle_t h2, bus_size_t o2, bus_size_t c) { - for (; c; c--, o1+=2, o2+=2) + + for (; c; c--, o1 += 2, o2 += 2) bus_space_write_2(t, h1, o1, bus_space_read_2(t, h2, o2)); } @@ -502,7 +509,8 @@ static __inline void bus_space_copy_region_4(bus_space_tag_t t, bus_space_handle_t h1, bus_size_t o1, bus_space_handle_t h2, bus_size_t o2, bus_size_t c) { - for (; c; c--, o1+=4, o2+=4) + + for (; c; c--, o1 += 4, o2 += 4) bus_space_write_4(t, h1, o1, bus_space_read_4(t, h2, o2)); } @@ -510,7 +518,8 @@ static __inline void bus_space_copy_region_8(bus_space_tag_t t, bus_space_handle_t h1, bus_size_t o1, bus_space_handle_t h2, bus_size_t o2, bus_size_t c) { - for (; c; c--, o1+=8, o2+=8) + + for (; c; c--, o1 += 8, o2 += 8) bus_space_write_8(t, h1, o1, bus_space_read_8(t, h2, o2)); } @@ -692,7 +701,7 @@ bus_space_set_multi_stream_8(bus_space_t static __inline void bus_space_read_region_stream_1(bus_space_tag_t t, bus_space_handle_t h, - bus_size_t o, u_int8_t *a, bus_size_t c) + bus_size_t o, uint8_t *a, bus_size_t c) { for (; c; a++, c--, o++) @@ -701,34 +710,34 @@ bus_space_read_region_stream_1(bus_space static __inline void bus_space_read_region_stream_2(bus_space_tag_t t, bus_space_handle_t h, - bus_size_t o, u_int16_t *a, bus_size_t c) + bus_size_t o, uint16_t *a, bus_size_t c) { - for (; c; a++, c--, o+=2) + for (; c; a++, c--, o += 2) *a = bus_space_read_stream_2(t, h, o); } static __inline void bus_space_read_region_stream_4(bus_space_tag_t t, bus_space_handle_t h, - bus_size_t o, u_int32_t *a, bus_size_t c) + bus_size_t o, uint32_t *a, bus_size_t c) { - for (; c; a++, c--, o+=4) + for (; c; a++, c--, o += 4) *a = bus_space_read_stream_4(t, h, o); } static __inline void bus_space_read_region_stream_8(bus_space_tag_t t, bus_space_handle_t h, - bus_size_t o, u_int64_t *a, bus_size_t c) + bus_size_t o, uint64_t *a, bus_size_t c) { - for (; c; a++, c--, o+=8) + for (; c; a++, c--, o += 8) *a = bus_space_read_stream_8(t, h, o); } static __inline void bus_space_write_region_stream_1(bus_space_tag_t t, bus_space_handle_t h, - bus_size_t o, const u_int8_t *a, bus_size_t c) + bus_size_t o, const uint8_t *a, bus_size_t c) { for (; c; a++, c--, o++) @@ -737,34 +746,34 @@ bus_space_write_region_stream_1(bus_spac static __inline void bus_space_write_region_stream_2(bus_space_tag_t t, bus_space_handle_t h, - bus_size_t o, const u_int16_t *a, bus_size_t c) + bus_size_t o, const uint16_t *a, bus_size_t c) { - for (; c; a++, c--, o+=2) + for (; c; a++, c--, o += 2) bus_space_write_stream_2(t, h, o, *a); } static __inline void bus_space_write_region_stream_4(bus_space_tag_t t, bus_space_handle_t h, - bus_size_t o, const u_int32_t *a, bus_size_t c) + bus_size_t o, const uint32_t *a, bus_size_t c) { - for (; c; a++, c--, o+=4) + for (; c; a++, c--, o += 4) bus_space_write_stream_4(t, h, o, *a); } static __inline void bus_space_write_region_stream_8(bus_space_tag_t t, bus_space_handle_t h, - bus_size_t o, const u_int64_t *a, bus_size_t c) + bus_size_t o, const uint64_t *a, bus_size_t c) { - for (; c; a++, c--, o+=8) + for (; c; a++, c--, o += 8) bus_space_write_stream_8(t, h, o, *a); } static __inline void bus_space_set_region_stream_1(bus_space_tag_t t, bus_space_handle_t h, - bus_size_t o, const u_int8_t v, bus_size_t c) + bus_size_t o, const uint8_t v, bus_size_t c) { for (; c; c--, o++) @@ -773,28 +782,28 @@ bus_space_set_region_stream_1(bus_space_ static __inline void bus_space_set_region_stream_2(bus_space_tag_t t, bus_space_handle_t h, - bus_size_t o, const u_int16_t v, bus_size_t c) + bus_size_t o, const uint16_t v, bus_size_t c) { - for (; c; c--, o+=2) + for (; c; c--, o += 2) bus_space_write_stream_2(t, h, o, v); } static __inline void bus_space_set_region_stream_4(bus_space_tag_t t, bus_space_handle_t h, - bus_size_t o, const u_int32_t v, bus_size_t c) + bus_size_t o, const uint32_t v, bus_size_t c) { - for (; c; c--, o+=4) + for (; c; c--, o += 4) bus_space_write_stream_4(t, h, o, v); } static __inline void bus_space_set_region_stream_8(bus_space_tag_t t, bus_space_handle_t h, - bus_size_t o, const u_int64_t v, bus_size_t c) + bus_size_t o, const uint64_t v, bus_size_t c) { - for (; c; c--, o+=8) + for (; c; c--, o += 8) bus_space_write_stream_8(t, h, o, v); } @@ -813,7 +822,7 @@ bus_space_copy_region_stream_2(bus_space bus_size_t o1, bus_space_handle_t h2, bus_size_t o2, bus_size_t c) { - for (; c; c--, o1+=2, o2+=2) + for (; c; c--, o1 += 2, o2 += 2) bus_space_write_stream_2(t, h1, o1, bus_space_read_stream_2(t, h2, o2)); } @@ -823,7 +832,7 @@ bus_space_copy_region_stream_4(bus_space bus_size_t o1, bus_space_handle_t h2, bus_size_t o2, bus_size_t c) { - for (; c; c--, o1+=4, o2+=4) + for (; c; c--, o1 += 4, o2 += 4) bus_space_write_stream_4(t, h1, o1, bus_space_read_stream_4(t, h2, o2)); } @@ -833,7 +842,7 @@ bus_space_copy_region_stream_8(bus_space bus_size_t o1, bus_space_handle_t h2, bus_size_t o2, bus_size_t c) { - for (; c; c--, o1+=8, o2+=8) + for (; c; c--, o1 += 8, o2 += 8) bus_space_write_stream_8(t, h1, o1, bus_space_read_8(t, h2, o2)); } From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 19:37:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B52010656B3; Tue, 30 Mar 2010 19:37:55 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DD45A8FC1C; Tue, 30 Mar 2010 19:37: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 o2UJbt94074608; Tue, 30 Mar 2010 19:37:55 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UJbtNu074606; Tue, 30 Mar 2010 19:37:55 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003301937.o2UJbtNu074606@svn.freebsd.org> From: Marius Strobl Date: Tue, 30 Mar 2010 19:37:55 +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: r205914 - stable/7/sys/sun4v/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2010 19:37:56 -0000 Author: marius Date: Tue Mar 30 19:37:55 2010 New Revision: 205914 URL: http://svn.freebsd.org/changeset/base/205914 Log: MFC: r203341 - Remove the BUS_HANDLE_MIN checking in the __BUS_DEBUG_ACCESS macro; for UPA it should have fulfilled its purpose by now and Fireplane- and JBus-based machines are way to messy in organization to implement something equivalent. - Fix a bunch of style(9) bugs. Modified: stable/7/sys/sun4v/include/bus.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sun4v/include/bus.h ============================================================================== --- stable/7/sys/sun4v/include/bus.h Tue Mar 30 19:37:47 2010 (r205913) +++ stable/7/sys/sun4v/include/bus.h Tue Mar 30 19:37:55 2010 (r205914) @@ -81,7 +81,6 @@ #include #include -#include /* * Nexus and SBus spaces are non-cached and big endian @@ -99,27 +98,24 @@ extern const int bus_type_asi[]; extern const int bus_stream_asi[]; -#define __BUS_SPACE_HAS_STREAM_METHODS 1 +#define __BUS_SPACE_HAS_STREAM_METHODS 1 -#define BUS_SPACE_MAXSIZE_24BIT 0xFFFFFF -#define BUS_SPACE_MAXSIZE_32BIT 0xFFFFFFFF -#define BUS_SPACE_MAXSIZE 0xFFFFFFFFFFFFFFFF -#define BUS_SPACE_MAXADDR_24BIT 0xFFFFFF -#define BUS_SPACE_MAXADDR_32BIT 0xFFFFFFFF -#define BUS_SPACE_MAXADDR 0xFFFFFFFF +#define BUS_SPACE_MAXSIZE_24BIT 0xFFFFFF +#define BUS_SPACE_MAXSIZE_32BIT 0xFFFFFFFF +#define BUS_SPACE_MAXSIZE 0xFFFFFFFFFFFFFFFF +#define BUS_SPACE_MAXADDR_24BIT 0xFFFFFF +#define BUS_SPACE_MAXADDR_32BIT 0xFFFFFFFF +#define BUS_SPACE_MAXADDR 0xFFFFFFFF -#define BUS_SPACE_UNRESTRICTED (~0) +#define BUS_SPACE_UNRESTRICTED (~0) -/* - * Access methods for bus resources and address space. - */ struct bus_space_tag { void *bst_cookie; bus_space_tag_t bst_parent; int bst_type; void (*bst_bus_barrier)(bus_space_tag_t, bus_space_handle_t, - bus_size_t, bus_size_t, int); + bus_size_t, bus_size_t, int); }; /* @@ -135,13 +131,11 @@ static int bus_space_subregion(bus_space */ static __inline int bus_space_map(bus_space_tag_t t, bus_addr_t addr, - bus_size_t size, int flags, - bus_space_handle_t *bshp); + bus_size_t size, int flags, bus_space_handle_t *bshp); static __inline int bus_space_map(bus_space_tag_t t __unused, bus_addr_t addr, - bus_size_t size __unused, int flags __unused, - bus_space_handle_t *bshp) + bus_size_t size __unused, int flags __unused, bus_space_handle_t *bshp) { *bshp = addr; @@ -152,24 +146,26 @@ bus_space_map(bus_space_tag_t t __unused * Unmap a region of device bus space. */ static __inline void bus_space_unmap(bus_space_tag_t t, bus_space_handle_t bsh, - bus_size_t size); + bus_size_t size); static __inline void bus_space_unmap(bus_space_tag_t t __unused, bus_space_handle_t bsh __unused, - bus_size_t size __unused) + bus_size_t size __unused) { + } /* This macro finds the first "upstream" implementation of method `f' */ -#define _BS_CALL(t,f) \ +#define _BS_CALL(t,f) \ while (t->f == NULL) \ - t = t->bst_parent; \ + t = t->bst_parent; \ return (*(t)->f) static __inline void bus_space_barrier(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, bus_size_t s, int f) { + _BS_CALL(t, bst_bus_barrier)(t, h, o, s, f); } @@ -177,20 +173,21 @@ static __inline int bus_space_subregion(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, bus_size_t s, bus_space_handle_t *hp) { + *hp = h + o; return (0); } /* flags for bus space map functions */ -#define BUS_SPACE_MAP_CACHEABLE 0x0001 -#define BUS_SPACE_MAP_LINEAR 0x0002 -#define BUS_SPACE_MAP_READONLY 0x0004 -#define BUS_SPACE_MAP_PREFETCHABLE 0x0008 +#define BUS_SPACE_MAP_CACHEABLE 0x0001 +#define BUS_SPACE_MAP_LINEAR 0x0002 +#define BUS_SPACE_MAP_READONLY 0x0004 +#define BUS_SPACE_MAP_PREFETCHABLE 0x0008 /* placeholders for bus functions... */ -#define BUS_SPACE_MAP_BUS1 0x0100 -#define BUS_SPACE_MAP_BUS2 0x0200 -#define BUS_SPACE_MAP_BUS3 0x0400 -#define BUS_SPACE_MAP_BUS4 0x0800 +#define BUS_SPACE_MAP_BUS1 0x0100 +#define BUS_SPACE_MAP_BUS2 0x0200 +#define BUS_SPACE_MAP_BUS3 0x0400 +#define BUS_SPACE_MAP_BUS4 0x0800 /* flags for bus_space_barrier() */ #define BUS_SPACE_BARRIER_READ 0x01 /* force read barrier */ @@ -198,13 +195,9 @@ bus_space_subregion(bus_space_tag_t t, b #ifdef BUS_SPACE_DEBUG #define KTR_BUS KTR_CT2 -#define BUS_HANDLE_MIN UPA_MEMSTART #define __BUS_DEBUG_ACCESS(h, o, desc, sz) do { \ CTR4(KTR_BUS, "bus space: %s %d: handle %#lx, offset %#lx", \ (desc), (sz), (h), (o)); \ - if ((h) + (o) < BUS_HANDLE_MIN) \ - panic("bus space access at %#lx out of range", \ - (h) + (o)); \ } while (0) #else #define __BUS_DEBUG_ACCESS(h, o, desc, sz) @@ -388,97 +381,109 @@ bus_space_set_multi_8(bus_space_tag_t t, static __inline void bus_space_read_region_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, - u_int8_t *a, bus_size_t c) + uint8_t *a, bus_size_t c) { + for (; c; a++, c--, o++) *a = bus_space_read_1(t, h, o); } static __inline void bus_space_read_region_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, - u_int16_t *a, bus_size_t c) + uint16_t *a, bus_size_t c) { - for (; c; a++, c--, o+=2) + + for (; c; a++, c--, o += 2) *a = bus_space_read_2(t, h, o); } static __inline void bus_space_read_region_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, - u_int32_t *a, bus_size_t c) + uint32_t *a, bus_size_t c) { - for (; c; a++, c--, o+=4) + + for (; c; a++, c--, o += 4) *a = bus_space_read_4(t, h, o); } static __inline void bus_space_read_region_8(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, - u_int64_t *a, bus_size_t c) + uint64_t *a, bus_size_t c) { - for (; c; a++, c--, o+=8) + + for (; c; a++, c--, o += 8) *a = bus_space_read_8(t, h, o); } static __inline void bus_space_write_region_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, - const u_int8_t *a, bus_size_t c) + const uint8_t *a, bus_size_t c) { + for (; c; a++, c--, o++) bus_space_write_1(t, h, o, *a); } static __inline void bus_space_write_region_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, - const u_int16_t *a, bus_size_t c) + const uint16_t *a, bus_size_t c) { - for (; c; a++, c--, o+=2) + + for (; c; a++, c--, o += 2) bus_space_write_2(t, h, o, *a); } static __inline void bus_space_write_region_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, - const u_int32_t *a, bus_size_t c) + const uint32_t *a, bus_size_t c) { - for (; c; a++, c--, o+=4) + + for (; c; a++, c--, o += 4) bus_space_write_4(t, h, o, *a); } static __inline void bus_space_write_region_8(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, - const u_int64_t *a, bus_size_t c) + const uint64_t *a, bus_size_t c) { - for (; c; a++, c--, o+=8) + + for (; c; a++, c--, o += 8) bus_space_write_8(t, h, o, *a); } static __inline void bus_space_set_region_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, - const u_int8_t v, bus_size_t c) + const uint8_t v, bus_size_t c) { + for (; c; c--, o++) bus_space_write_1(t, h, o, v); } static __inline void bus_space_set_region_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, - const u_int16_t v, bus_size_t c) + const uint16_t v, bus_size_t c) { - for (; c; c--, o+=2) + + for (; c; c--, o += 2) bus_space_write_2(t, h, o, v); } static __inline void bus_space_set_region_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, - const u_int32_t v, bus_size_t c) + const uint32_t v, bus_size_t c) { - for (; c; c--, o+=4) + + for (; c; c--, o += 4) bus_space_write_4(t, h, o, v); } static __inline void bus_space_set_region_8(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, - const u_int64_t v, bus_size_t c) + const uint64_t v, bus_size_t c) { - for (; c; c--, o+=8) + + for (; c; c--, o += 8) bus_space_write_8(t, h, o, v); } @@ -486,6 +491,7 @@ static __inline void bus_space_copy_region_1(bus_space_tag_t t, bus_space_handle_t h1, bus_size_t o1, bus_space_handle_t h2, bus_size_t o2, bus_size_t c) { + for (; c; c--, o1++, o2++) bus_space_write_1(t, h1, o1, bus_space_read_1(t, h2, o2)); } @@ -494,7 +500,8 @@ static __inline void bus_space_copy_region_2(bus_space_tag_t t, bus_space_handle_t h1, bus_size_t o1, bus_space_handle_t h2, bus_size_t o2, bus_size_t c) { - for (; c; c--, o1+=2, o2+=2) + + for (; c; c--, o1 += 2, o2 += 2) bus_space_write_2(t, h1, o1, bus_space_read_2(t, h2, o2)); } @@ -502,7 +509,8 @@ static __inline void bus_space_copy_region_4(bus_space_tag_t t, bus_space_handle_t h1, bus_size_t o1, bus_space_handle_t h2, bus_size_t o2, bus_size_t c) { - for (; c; c--, o1+=4, o2+=4) + + for (; c; c--, o1 += 4, o2 += 4) bus_space_write_4(t, h1, o1, bus_space_read_4(t, h2, o2)); } @@ -510,7 +518,8 @@ static __inline void bus_space_copy_region_8(bus_space_tag_t t, bus_space_handle_t h1, bus_size_t o1, bus_space_handle_t h2, bus_size_t o2, bus_size_t c) { - for (; c; c--, o1+=8, o2+=8) + + for (; c; c--, o1 += 8, o2 += 8) bus_space_write_8(t, h1, o1, bus_space_read_8(t, h2, o2)); } @@ -692,7 +701,7 @@ bus_space_set_multi_stream_8(bus_space_t static __inline void bus_space_read_region_stream_1(bus_space_tag_t t, bus_space_handle_t h, - bus_size_t o, u_int8_t *a, bus_size_t c) + bus_size_t o, uint8_t *a, bus_size_t c) { for (; c; a++, c--, o++) @@ -701,34 +710,34 @@ bus_space_read_region_stream_1(bus_space static __inline void bus_space_read_region_stream_2(bus_space_tag_t t, bus_space_handle_t h, - bus_size_t o, u_int16_t *a, bus_size_t c) + bus_size_t o, uint16_t *a, bus_size_t c) { - for (; c; a++, c--, o+=2) + for (; c; a++, c--, o += 2) *a = bus_space_read_stream_2(t, h, o); } static __inline void bus_space_read_region_stream_4(bus_space_tag_t t, bus_space_handle_t h, - bus_size_t o, u_int32_t *a, bus_size_t c) + bus_size_t o, uint32_t *a, bus_size_t c) { - for (; c; a++, c--, o+=4) + for (; c; a++, c--, o += 4) *a = bus_space_read_stream_4(t, h, o); } static __inline void bus_space_read_region_stream_8(bus_space_tag_t t, bus_space_handle_t h, - bus_size_t o, u_int64_t *a, bus_size_t c) + bus_size_t o, uint64_t *a, bus_size_t c) { - for (; c; a++, c--, o+=8) + for (; c; a++, c--, o += 8) *a = bus_space_read_stream_8(t, h, o); } static __inline void bus_space_write_region_stream_1(bus_space_tag_t t, bus_space_handle_t h, - bus_size_t o, const u_int8_t *a, bus_size_t c) + bus_size_t o, const uint8_t *a, bus_size_t c) { for (; c; a++, c--, o++) @@ -737,34 +746,34 @@ bus_space_write_region_stream_1(bus_spac static __inline void bus_space_write_region_stream_2(bus_space_tag_t t, bus_space_handle_t h, - bus_size_t o, const u_int16_t *a, bus_size_t c) + bus_size_t o, const uint16_t *a, bus_size_t c) { - for (; c; a++, c--, o+=2) + for (; c; a++, c--, o += 2) bus_space_write_stream_2(t, h, o, *a); } static __inline void bus_space_write_region_stream_4(bus_space_tag_t t, bus_space_handle_t h, - bus_size_t o, const u_int32_t *a, bus_size_t c) + bus_size_t o, const uint32_t *a, bus_size_t c) { - for (; c; a++, c--, o+=4) + for (; c; a++, c--, o += 4) bus_space_write_stream_4(t, h, o, *a); } static __inline void bus_space_write_region_stream_8(bus_space_tag_t t, bus_space_handle_t h, - bus_size_t o, const u_int64_t *a, bus_size_t c) + bus_size_t o, const uint64_t *a, bus_size_t c) { - for (; c; a++, c--, o+=8) + for (; c; a++, c--, o += 8) bus_space_write_stream_8(t, h, o, *a); } static __inline void bus_space_set_region_stream_1(bus_space_tag_t t, bus_space_handle_t h, - bus_size_t o, const u_int8_t v, bus_size_t c) + bus_size_t o, const uint8_t v, bus_size_t c) { for (; c; c--, o++) @@ -773,28 +782,28 @@ bus_space_set_region_stream_1(bus_space_ static __inline void bus_space_set_region_stream_2(bus_space_tag_t t, bus_space_handle_t h, - bus_size_t o, const u_int16_t v, bus_size_t c) + bus_size_t o, const uint16_t v, bus_size_t c) { - for (; c; c--, o+=2) + for (; c; c--, o += 2) bus_space_write_stream_2(t, h, o, v); } static __inline void bus_space_set_region_stream_4(bus_space_tag_t t, bus_space_handle_t h, - bus_size_t o, const u_int32_t v, bus_size_t c) + bus_size_t o, const uint32_t v, bus_size_t c) { - for (; c; c--, o+=4) + for (; c; c--, o += 4) bus_space_write_stream_4(t, h, o, v); } static __inline void bus_space_set_region_stream_8(bus_space_tag_t t, bus_space_handle_t h, - bus_size_t o, const u_int64_t v, bus_size_t c) + bus_size_t o, const uint64_t v, bus_size_t c) { - for (; c; c--, o+=8) + for (; c; c--, o += 8) bus_space_write_stream_8(t, h, o, v); } @@ -813,7 +822,7 @@ bus_space_copy_region_stream_2(bus_space bus_size_t o1, bus_space_handle_t h2, bus_size_t o2, bus_size_t c) { - for (; c; c--, o1+=2, o2+=2) + for (; c; c--, o1 += 2, o2 += 2) bus_space_write_stream_2(t, h1, o1, bus_space_read_stream_2(t, h2, o2)); } @@ -823,7 +832,7 @@ bus_space_copy_region_stream_4(bus_space bus_size_t o1, bus_space_handle_t h2, bus_size_t o2, bus_size_t c) { - for (; c; c--, o1+=4, o2+=4) + for (; c; c--, o1 += 4, o2 += 4) bus_space_write_stream_4(t, h1, o1, bus_space_read_stream_4(t, h2, o2)); } @@ -833,7 +842,7 @@ bus_space_copy_region_stream_8(bus_space bus_size_t o1, bus_space_handle_t h2, bus_size_t o2, bus_size_t c) { - for (; c; c--, o1+=8, o2+=8) + for (; c; c--, o1 += 8, o2 += 8) bus_space_write_stream_8(t, h1, o1, bus_space_read_8(t, h2, o2)); } From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 19:41:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3FEF4106566B; Tue, 30 Mar 2010 19:41:39 +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 303C58FC16; Tue, 30 Mar 2010 19:41: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 o2UJfdaW075502; Tue, 30 Mar 2010 19:41:39 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UJfdfB075500; Tue, 30 Mar 2010 19:41:39 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201003301941.o2UJfdfB075500@svn.freebsd.org> From: John Baldwin Date: Tue, 30 Mar 2010 19:41: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: r205915 - 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, 30 Mar 2010 19:41:39 -0000 Author: jhb Date: Tue Mar 30 19:41:38 2010 New Revision: 205915 URL: http://svn.freebsd.org/changeset/base/205915 Log: Use CACHE_LINE_SIZE alignment for 'struct pcpu' rather than hardcoding 128. Reviewed by: jeff Modified: head/sys/sys/pcpu.h Modified: head/sys/sys/pcpu.h ============================================================================== --- head/sys/sys/pcpu.h Tue Mar 30 19:37:55 2010 (r205914) +++ head/sys/sys/pcpu.h Tue Mar 30 19:41:38 2010 (r205915) @@ -165,7 +165,7 @@ struct pcpu { * if only to make kernel debugging easier. */ PCPU_MD_FIELDS; -} __aligned(128); +} __aligned(CACHE_LINE_SIZE); #ifdef _KERNEL From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 19:41:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 589B71065672; Tue, 30 Mar 2010 19:41:43 +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 475BB8FC12; Tue, 30 Mar 2010 19: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 o2UJfhGo075540; Tue, 30 Mar 2010 19:41:43 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UJfhMI075538; Tue, 30 Mar 2010 19:41:43 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201003301941.o2UJfhMI075538@svn.freebsd.org> From: Hiroki Sato Date: Tue, 30 Mar 2010 19:41:43 +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: r205916 - stable/7/release/doc/en_US.ISO8859-1/errata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2010 19:41:43 -0000 Author: hrs Date: Tue Mar 30 19:41:43 2010 New Revision: 205916 URL: http://svn.freebsd.org/changeset/base/205916 Log: Document fdopendir(3) missing prototype issue. Submitted by: delphij Modified: stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml Modified: stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml ============================================================================== --- stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml Tue Mar 30 19:41:38 2010 (r205915) +++ stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml Tue Mar 30 19:41:43 2010 (r205916) @@ -167,6 +167,18 @@ Late-Breaking News and Corrections + [20100330] The libc of &os; 7.3-RELEASE + has the &man.fdopendir.3; function but + <dirent.h> header file does not + contain the function prototype. This could cause programs + compiled on the system to crash on platforms such as + &os;/&arch.amd64;, where sizeof(void *) is + greater than sizeof(int). This problem has + been fixed in r205265 + (RELENG_7). An Errata Notice for 7.3-RELEASE is + planned. + [20100330] It turns out that the zfsloader in 7.3-RELEASE, a new boot loader similar to &man.loader.8; but it supports ZFS, does not work From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 19:51:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2467E1065670; Tue, 30 Mar 2010 19:51:35 +0000 (UTC) (envelope-from kwm@freebsd.org) Received: from viefep14-int.chello.at (viefep14-int.chello.at [62.179.121.34]) by mx1.freebsd.org (Postfix) with ESMTP id C87B78FC14; Tue, 30 Mar 2010 19:51:33 +0000 (UTC) Received: from edge02.upcmail.net ([192.168.13.237]) by viefep19-int.chello.at (InterMail vM.8.01.02.02 201-2260-120-106-20100312) with ESMTP id <20100330193400.CRGE23953.viefep19-int.chello.at@edge02.upcmail.net>; Tue, 30 Mar 2010 21:34:00 +0200 Received: from [192.168.1.64] ([77.250.185.191]) by edge02.upcmail.net with edge id zXZx1d07m48Bq8D02XZzb2; Tue, 30 Mar 2010 21:34:00 +0200 X-SourceIP: 77.250.185.191 From: Koop Mast To: Jack F Vogel In-Reply-To: <201003301909.o2UJ9IKn067820@svn.freebsd.org> References: <201003301909.o2UJ9IKn067820@svn.freebsd.org> Content-Type: text/plain; charset="us-ascii" Date: Tue, 30 Mar 2010 21:34:22 +0200 Message-ID: <1269977662.15736.43.camel@headache.rainbow-runner.nl> Mime-Version: 1.0 X-Mailer: Evolution 2.29.92.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Cloudmark-Analysis: v=1.1 cv=EFR1pENkxzhdjTnRVAuI+iHrp5zsYr2ENPL4njVhkqM= c=1 sm=0 a=Mxz3xaAkkHoA:10 a=kj9zAlcOel0A:10 a=LW_60RwewtKi_uPO57QA:9 a=ey_9usnqZrZZK8HdeIya_Uonz3cA:4 a=CjuIK1q_8ugA:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r205904 - head/sys/dev/ixgbe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2010 19:51:35 -0000 On Tue, 2010-03-30 at 19:09 +0000, Jack F Vogel wrote: > Modified: > head/sys/dev/ixgbe/ixgbe.c > head/sys/dev/ixgbe/ixgbe.h > > Modified: head/sys/dev/ixgbe/ixgbe.c > ============================================================================== > --- head/sys/dev/ixgbe/ixgbe.c Tue Mar 30 19:08:05 2010 (r205903) > +++ head/sys/dev/ixgbe/ixgbe.c Tue Mar 30 19:09:18 2010 (r205904) > @@ -1,6 +1,6 @@ > /****************************************************************************** > > - Copyright (c) 2001-2010, Intel Corporation > + Copyright (c) 2001-2009, Intel Corporation ^^ Going back in time... > All rights reserved. > > Redistribution and use in source and binary forms, with or without > @@ -46,7 +46,7 @@ int ixgbe_display_debug_stat > /********************************************************************* > * Driver version > *********************************************************************/ > -char ixgbe_driver_version[] = "2.1.6"; > +char ixgbe_driver_version[] = "2.1.7"; > ^^ with a newer version? Curious :) -Koop From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 19:52:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E46B1106566B; Tue, 30 Mar 2010 19:52:45 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D31FA8FC0C; Tue, 30 Mar 2010 19:52: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 o2UJqj7D078034; Tue, 30 Mar 2010 19:52:45 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UJqjQ3078031; Tue, 30 Mar 2010 19:52:45 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003301952.o2UJqjQ3078031@svn.freebsd.org> From: Marius Strobl Date: Tue, 30 Mar 2010 19:52:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205917 - stable/7/sys/nfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2010 19:52:46 -0000 Author: marius Date: Tue Mar 30 19:52:45 2010 New Revision: 205917 URL: http://svn.freebsd.org/changeset/base/205917 Log: MFC: r203731 Some style(9) fixes Modified: stable/7/sys/nfs/nfs_common.c stable/7/sys/nfs/nfs_common.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/nfs/nfs_common.c ============================================================================== --- stable/7/sys/nfs/nfs_common.c Tue Mar 30 19:41:43 2010 (r205916) +++ stable/7/sys/nfs/nfs_common.c Tue Mar 30 19:52:45 2010 (r205917) @@ -37,7 +37,7 @@ __FBSDID("$FreeBSD$"); /* * These functions support the macros and help fiddle mbuf chains for - * the nfs op functions. They do things like create the rpc header and + * the nfs op functions. They do things like create the rpc header and * copy data between mbuf chains and uio lists. */ @@ -76,10 +76,11 @@ nfstype nfsv3_type[9] = { NFNON, NFREG, NFDIR, NFBLK, NFCHR, NFLNK, NFSOCK, NFFIFO, NFNON }; -static void *nfsm_dissect_xx_sub(int s, struct mbuf **md, caddr_t *dpos, int how); +static void *nfsm_dissect_xx_sub(int s, struct mbuf **md, caddr_t *dpos, + int how); u_quad_t -nfs_curusec(void) +nfs_curusec(void) { struct timeval tv; @@ -177,7 +178,7 @@ nfsm_disct(struct mbuf **mdp, caddr_t *d while (left == 0) { *mdp = mp = mp->m_next; if (mp == NULL) - return NULL; + return (NULL); left = mp->m_len; *dposp = mtod(mp, caddr_t); } @@ -185,13 +186,13 @@ nfsm_disct(struct mbuf **mdp, caddr_t *d ret = *dposp; *dposp += siz; } else if (mp->m_next == NULL) { - return NULL; + return (NULL); } else if (siz > MHLEN) { panic("nfs S too big"); } else { MGET(mp2, how, MT_DATA); if (mp2 == NULL) - return NULL; + return (NULL); mp2->m_len = siz; mp2->m_next = mp->m_next; mp->m_next = mp2; @@ -207,7 +208,7 @@ nfsm_disct(struct mbuf **mdp, caddr_t *d /* Loop around copying up the siz2 bytes */ while (siz2 > 0) { if (mp2 == NULL) - return NULL; + return (NULL); xfer = (siz2 > mp2->m_len) ? mp2->m_len : siz2; if (xfer > 0) { bcopy(mtod(mp2, caddr_t), ptr, xfer); @@ -230,7 +231,7 @@ nfsm_disct(struct mbuf **mdp, caddr_t *d *dposp = npos; } } - return ret; + return (ret); } /* @@ -274,19 +275,21 @@ nfsm_build_xx(int s, struct mbuf **mb, c ret = *bpos; (*mb)->m_len += s; *bpos += s; - return ret; + return (ret); } void * nfsm_dissect_xx(int s, struct mbuf **md, caddr_t *dpos) { - return nfsm_dissect_xx_sub(s, md, dpos, M_TRYWAIT); + + return (nfsm_dissect_xx_sub(s, md, dpos, M_TRYWAIT)); } void * nfsm_dissect_xx_nonblock(int s, struct mbuf **md, caddr_t *dpos) { - return nfsm_dissect_xx_sub(s, md, dpos, M_DONTWAIT); + + return (nfsm_dissect_xx_sub(s, md, dpos, M_DONTWAIT)); } static void * @@ -300,10 +303,10 @@ nfsm_dissect_xx_sub(int s, struct mbuf * if (t1 >= s) { ret = *dpos; *dpos += s; - return ret; + return (ret); } - cp2 = nfsm_disct(md, dpos, s, t1, how); - return cp2; + cp2 = nfsm_disct(md, dpos, s, t1, how); + return (cp2); } int @@ -313,11 +316,11 @@ nfsm_strsiz_xx(int *s, int m, struct mbu tl = nfsm_dissect_xx(NFSX_UNSIGNED, mb, bpos); if (tl == NULL) - return EBADRPC; + return (EBADRPC); *s = fxdr_unsigned(int32_t, *tl); if (*s > m) - return EBADRPC; - return 0; + return (EBADRPC); + return (0); } int @@ -328,10 +331,10 @@ nfsm_adv_xx(int s, struct mbuf **md, cad t1 = mtod(*md, caddr_t) + (*md)->m_len - *dpos; if (t1 >= s) { *dpos += s; - return 0; + return (0); } t1 = nfs_adv(md, dpos, s, t1); if (t1) - return t1; - return 0; + return (t1); + return (0); } Modified: stable/7/sys/nfs/nfs_common.h ============================================================================== --- stable/7/sys/nfs/nfs_common.h Tue Mar 30 19:41:43 2010 (r205916) +++ stable/7/sys/nfs/nfs_common.h Tue Mar 30 19:52:45 2010 (r205917) @@ -33,7 +33,6 @@ * $FreeBSD$ */ - #ifndef _NFS_NFS_COMMON_H_ #define _NFS_NFS_COMMON_H_ @@ -86,7 +85,7 @@ do { \ goto nfsmout; \ } \ } while (0) - + #define nfsm_dissect(c, s) \ ({ \ void *ret; \ From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 19:52:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 480C91065670; Tue, 30 Mar 2010 19:52:46 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 35CFD8FC0A; Tue, 30 Mar 2010 19:52: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 o2UJqkhG078088; Tue, 30 Mar 2010 19:52:46 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UJqkWL078084; Tue, 30 Mar 2010 19:52:46 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003301952.o2UJqkWL078084@svn.freebsd.org> From: Marius Strobl Date: Tue, 30 Mar 2010 19:52: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: r205918 - in stable/8/sys: nfs nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2010 19:52:46 -0000 Author: marius Date: Tue Mar 30 19:52:45 2010 New Revision: 205918 URL: http://svn.freebsd.org/changeset/base/205918 Log: MFC: r203731 Some style(9) fixes Modified: stable/8/sys/nfs/nfs_common.c stable/8/sys/nfs/nfs_common.h stable/8/sys/nfsclient/nfs_krpc.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/nfs/nfs_common.c ============================================================================== --- stable/8/sys/nfs/nfs_common.c Tue Mar 30 19:52:45 2010 (r205917) +++ stable/8/sys/nfs/nfs_common.c Tue Mar 30 19:52:45 2010 (r205918) @@ -37,7 +37,7 @@ __FBSDID("$FreeBSD$"); /* * These functions support the macros and help fiddle mbuf chains for - * the nfs op functions. They do things like create the rpc header and + * the nfs op functions. They do things like create the rpc header and * copy data between mbuf chains and uio lists. */ @@ -77,7 +77,8 @@ nfstype nfsv3_type[9] = { NFNON, NFREG, NFDIR, NFBLK, NFCHR, NFLNK, NFSOCK, NFFIFO, NFNON }; -static void *nfsm_dissect_xx_sub(int s, struct mbuf **md, caddr_t *dpos, int how); +static void *nfsm_dissect_xx_sub(int s, struct mbuf **md, caddr_t *dpos, + int how); SYSCTL_NODE(_vfs, OID_AUTO, nfs_common, CTLFLAG_RD, 0, "NFS common support"); @@ -90,7 +91,7 @@ SYSCTL_INT(_vfs_nfs_common, OID_AUTO, re &nfs_realign_count, 0, "Number of mbuf realignments done"); u_quad_t -nfs_curusec(void) +nfs_curusec(void) { struct timeval tv; @@ -188,7 +189,7 @@ nfsm_disct(struct mbuf **mdp, caddr_t *d while (left == 0) { *mdp = mp = mp->m_next; if (mp == NULL) - return NULL; + return (NULL); left = mp->m_len; *dposp = mtod(mp, caddr_t); } @@ -196,13 +197,13 @@ nfsm_disct(struct mbuf **mdp, caddr_t *d ret = *dposp; *dposp += siz; } else if (mp->m_next == NULL) { - return NULL; + return (NULL); } else if (siz > MHLEN) { panic("nfs S too big"); } else { MGET(mp2, how, MT_DATA); if (mp2 == NULL) - return NULL; + return (NULL); mp2->m_len = siz; mp2->m_next = mp->m_next; mp->m_next = mp2; @@ -218,7 +219,7 @@ nfsm_disct(struct mbuf **mdp, caddr_t *d /* Loop around copying up the siz2 bytes */ while (siz2 > 0) { if (mp2 == NULL) - return NULL; + return (NULL); xfer = (siz2 > mp2->m_len) ? mp2->m_len : siz2; if (xfer > 0) { bcopy(mtod(mp2, caddr_t), ptr, xfer); @@ -241,7 +242,7 @@ nfsm_disct(struct mbuf **mdp, caddr_t *d *dposp = npos; } } - return ret; + return (ret); } /* @@ -285,19 +286,21 @@ nfsm_build_xx(int s, struct mbuf **mb, c ret = *bpos; (*mb)->m_len += s; *bpos += s; - return ret; + return (ret); } void * nfsm_dissect_xx(int s, struct mbuf **md, caddr_t *dpos) { - return nfsm_dissect_xx_sub(s, md, dpos, M_WAIT); + + return (nfsm_dissect_xx_sub(s, md, dpos, M_WAIT)); } void * nfsm_dissect_xx_nonblock(int s, struct mbuf **md, caddr_t *dpos) { - return nfsm_dissect_xx_sub(s, md, dpos, M_DONTWAIT); + + return (nfsm_dissect_xx_sub(s, md, dpos, M_DONTWAIT)); } static void * @@ -311,10 +314,10 @@ nfsm_dissect_xx_sub(int s, struct mbuf * if (t1 >= s) { ret = *dpos; *dpos += s; - return ret; + return (ret); } - cp2 = nfsm_disct(md, dpos, s, t1, how); - return cp2; + cp2 = nfsm_disct(md, dpos, s, t1, how); + return (cp2); } int @@ -324,11 +327,11 @@ nfsm_strsiz_xx(int *s, int m, struct mbu tl = nfsm_dissect_xx(NFSX_UNSIGNED, mb, bpos); if (tl == NULL) - return EBADRPC; + return (EBADRPC); *s = fxdr_unsigned(int32_t, *tl); if (*s > m) - return EBADRPC; - return 0; + return (EBADRPC); + return (0); } int @@ -339,12 +342,12 @@ nfsm_adv_xx(int s, struct mbuf **md, cad t1 = mtod(*md, caddr_t) + (*md)->m_len - *dpos; if (t1 >= s) { *dpos += s; - return 0; + return (0); } t1 = nfs_adv(md, dpos, s, t1); if (t1) - return t1; - return 0; + return (t1); + return (0); } /* Modified: stable/8/sys/nfs/nfs_common.h ============================================================================== --- stable/8/sys/nfs/nfs_common.h Tue Mar 30 19:52:45 2010 (r205917) +++ stable/8/sys/nfs/nfs_common.h Tue Mar 30 19:52:45 2010 (r205918) @@ -33,7 +33,6 @@ * $FreeBSD$ */ - #ifndef _NFS_NFS_COMMON_H_ #define _NFS_NFS_COMMON_H_ @@ -87,7 +86,7 @@ do { \ goto nfsmout; \ } \ } while (0) - + #define nfsm_dissect(c, s) \ ({ \ void *ret; \ Modified: stable/8/sys/nfsclient/nfs_krpc.c ============================================================================== --- stable/8/sys/nfsclient/nfs_krpc.c Tue Mar 30 19:52:45 2010 (r205917) +++ stable/8/sys/nfsclient/nfs_krpc.c Tue Mar 30 19:52:45 2010 (r205918) @@ -99,9 +99,11 @@ SYSCTL_INT(_vfs_nfs, OID_AUTO, bufpacket "Buffer reservation size 2 < x < 64"); SYSCTL_INT(_vfs_nfs, OID_AUTO, reconnects, CTLFLAG_RD, &nfs_reconnects, 0, "Number of times the nfs client has had to reconnect"); -SYSCTL_INT(_vfs_nfs, OID_AUTO, nfs3_jukebox_delay, CTLFLAG_RW, &nfs3_jukebox_delay, 0, +SYSCTL_INT(_vfs_nfs, OID_AUTO, nfs3_jukebox_delay, CTLFLAG_RW, + &nfs3_jukebox_delay, 0, "Number of seconds to delay a retry after receiving EJUKEBOX"); -SYSCTL_INT(_vfs_nfs, OID_AUTO, skip_wcc_data_onerr, CTLFLAG_RW, &nfs_skip_wcc_data_onerr, 0, +SYSCTL_INT(_vfs_nfs, OID_AUTO, skip_wcc_data_onerr, CTLFLAG_RW, + &nfs_skip_wcc_data_onerr, 0, "Disable weak cache consistency checking when server returns an error"); static void nfs_down(struct nfsmount *, struct thread *, const char *, @@ -154,7 +156,8 @@ static enum nfs_rto_timer_t nfs_proct[NF static inline enum nfs_rto_timer_t nfs_rto_timer(u_int32_t procnum) { - return nfs_proct[procnum]; + + return (nfs_proct[procnum]); } /* @@ -219,7 +222,7 @@ nfs_connect(struct nfsmount *nmp) nconf = getnetconfigent("udp6"); else nconf = getnetconfigent("tcp6"); - + /* * Get buffer reservation size from sysctl, but impose reasonable * limits. @@ -267,9 +270,8 @@ nfs_connect(struct nfsmount *nmp) * Someone else already connected. */ CLNT_RELEASE(client); - } else { + } else nmp->nm_client = client; - } /* * Protocols that do not require connections may be optionally left @@ -278,22 +280,21 @@ nfs_connect(struct nfsmount *nmp) if (!(nmp->nm_flag & NFSMNT_NOCONN)) { mtx_unlock(&nmp->nm_mtx); CLNT_CONTROL(client, CLSET_CONNECT, &one); - } else { + } else mtx_unlock(&nmp->nm_mtx); - } /* Restore current thread's credentials. */ td->td_ucred = origcred; mtx_lock(&nmp->nm_mtx); - /* Initialize other non-zero congestion variables */ + /* Initialize other non-zero congestion variables. */ nfs_init_rtt(nmp); mtx_unlock(&nmp->nm_mtx); return (0); } /* - * NFS disconnect. Clean up and unlink. + * NFS disconnect. Clean up and unlink. */ void nfs_disconnect(struct nfsmount *nmp) @@ -310,9 +311,8 @@ nfs_disconnect(struct nfsmount *nmp) #endif CLNT_CLOSE(client); CLNT_RELEASE(client); - } else { + } else mtx_unlock(&nmp->nm_mtx); - } } void @@ -335,11 +335,10 @@ nfs_getauth(struct nfsmount *nmp, struct case RPCSEC_GSS_KRB5: case RPCSEC_GSS_KRB5I: case RPCSEC_GSS_KRB5P: - if (!nmp->nm_mech_oid) { + if (!nmp->nm_mech_oid) if (!rpc_gss_mech_to_oid("kerberosv5", - &nmp->nm_mech_oid)) + &nmp->nm_mech_oid)) return (NULL); - } if (nmp->nm_secflavor == RPCSEC_GSS_KRB5) svc = rpc_gss_svc_none; else if (nmp->nm_secflavor == RPCSEC_GSS_KRB5I) @@ -438,10 +437,10 @@ nfs_request(struct vnode *vp, struct mbu nf.nf_td = td; getmicrouptime(&now); nf.nf_lastmsg = now.tv_sec - - ((nmp->nm_tprintf_delay) - (nmp->nm_tprintf_initial_delay)); + ((nmp->nm_tprintf_delay) - (nmp->nm_tprintf_initial_delay)); /* - * XXX if not already connected call nfs_connect now. Longer + * XXX if not already connected call nfs_connect now. Longer * term, change nfs_mount to call nfs_connect unconditionally * and let clnt_reconnect_create handle reconnects. */ @@ -461,18 +460,17 @@ nfs_request(struct vnode *vp, struct mbu /* * Use a conservative timeout for RPCs other than getattr, - * lookup, read or write. The justification for doing "other" + * lookup, read or write. The justification for doing "other" * this way is that these RPCs happen so infrequently that * timer est. would probably be stale. Also, since many of * these RPCs are non-idempotent, a conservative timeout is * desired. */ timer = nfs_rto_timer(procnum); - if (timer != NFS_DEFAULT_TIMER) { + if (timer != NFS_DEFAULT_TIMER) ext.rc_timers = &nmp->nm_timers[timer - 1]; - } else { + else ext.rc_timers = NULL; - } #ifdef KDTRACE_HOOKS if (dtrace_nfsclient_nfs23_start_probe != NULL) { @@ -505,17 +503,16 @@ tryagain: * If there was a successful reply and a tprintf msg. * tprintf a response. */ - if (stat == RPC_SUCCESS) { + if (stat == RPC_SUCCESS) error = 0; - } else if (stat == RPC_TIMEDOUT) { + else if (stat == RPC_TIMEDOUT) error = ETIMEDOUT; - } else if (stat == RPC_VERSMISMATCH) { + else if (stat == RPC_VERSMISMATCH) error = EOPNOTSUPP; - } else if (stat == RPC_PROGVERSMISMATCH) { + else if (stat == RPC_PROGVERSMISMATCH) error = EPROTONOSUPPORT; - } else { + else error = EACCES; - } if (error) goto nfsmout; @@ -544,9 +541,9 @@ tryagain: m_freem(mrep); error = 0; waituntil = time_second + nfs3_jukebox_delay; - while (time_second < waituntil) { - (void) tsleep(&fake_wchan, PSOCK, "nqnfstry", hz); - } + while (time_second < waituntil) + (void)tsleep(&fake_wchan, PSOCK, "nqnfstry", + hz); goto tryagain; } @@ -557,12 +554,13 @@ tryagain: if (error == ESTALE) nfs_purgecache(vp); /* - * Skip wcc data on NFS errors for now. NetApp filers + * Skip wcc data on NFS errors for now. NetApp filers * return corrupt postop attrs in the wcc data for NFS - * err EROFS. Not sure if they could return corrupt + * err EROFS. Not sure if they could return corrupt * postop attrs for others errors. */ - if ((nmp->nm_flag & NFSMNT_NFSV3) && !nfs_skip_wcc_data_onerr) { + if ((nmp->nm_flag & NFSMNT_NFSV3) && + !nfs_skip_wcc_data_onerr) { *mrp = mrep; *mdp = md; *dposp = dpos; @@ -624,7 +622,7 @@ nfsmout: /* * Mark all of an nfs mount's outstanding requests with R_SOFTTERM and - * wait for all requests to complete. This is used by forced unmounts + * wait for all requests to complete. This is used by forced unmounts * to terminate any outstanding RPCs. */ int @@ -638,7 +636,7 @@ nfs_nmcancelreqs(struct nfsmount *nmp) /* * Any signal that can interrupt an NFS operation in an intr mount - * should be added to this set. SIGSTOP and SIGKILL cannot be masked. + * should be added to this set. SIGSTOP and SIGKILL cannot be masked. */ int nfs_sig_set[] = { SIGINT, @@ -657,16 +655,16 @@ static int nfs_sig_pending(sigset_t set) { int i; - + for (i = 0 ; i < sizeof(nfs_sig_set)/sizeof(int) ; i++) if (SIGISMEMBER(set, nfs_sig_set[i])) return (1); return (0); } - + /* * The set/restore sigmask functions are used to (temporarily) overwrite - * the process p_sigmask during an RPC call (for example). These are also + * the process p_sigmask during an RPC call (for example). These are also * used in other places in the NFS client that might tsleep(). */ void @@ -675,18 +673,18 @@ nfs_set_sigmask(struct thread *td, sigse sigset_t newset; int i; struct proc *p; - + SIGFILLSET(newset); if (td == NULL) td = curthread; /* XXX */ p = td->td_proc; - /* Remove the NFS set of signals from newset */ + /* Remove the NFS set of signals from newset. */ PROC_LOCK(p); mtx_lock(&p->p_sigacts->ps_mtx); for (i = 0 ; i < sizeof(nfs_sig_set)/sizeof(int) ; i++) { /* * But make sure we leave the ones already masked - * by the process, ie. remove the signal from the + * by the process, i.e. remove the signal from the * temporary signalmask only if it wasn't already * in p_sigmask. */ @@ -712,12 +710,13 @@ nfs_restore_sigmask(struct thread *td, s * old one after msleep() returns. */ int -nfs_msleep(struct thread *td, void *ident, struct mtx *mtx, int priority, char *wmesg, int timo) +nfs_msleep(struct thread *td, void *ident, struct mtx *mtx, int priority, + char *wmesg, int timo) { sigset_t oldset; int error; struct proc *p; - + if ((priority & PCATCH) == 0) return msleep(ident, mtx, priority, wmesg, timo); if (td == NULL) @@ -738,7 +737,7 @@ nfs_sigintr(struct nfsmount *nmp, struct { struct proc *p; sigset_t tmpset; - + /* Terminate all requests while attempting a forced unmount. */ if (nmp->nm_mountp->mnt_kern_flag & MNTK_UNMOUNTF) return (EIO); @@ -769,12 +768,11 @@ nfs_msg(struct thread *td, const char *s struct proc *p; p = td ? td->td_proc : NULL; - if (error) { + if (error) tprintf(p, LOG_INFO, "nfs server %s: %s, error %d\n", server, msg, error); - } else { + else tprintf(p, LOG_INFO, "nfs server %s: %s\n", server, msg); - } return (0); } @@ -793,7 +791,8 @@ nfs_down(struct nfsmount *nmp, struct th } else mtx_unlock(&nmp->nm_mtx); mtx_lock(&nmp->nm_mtx); - if ((flags & NFSSTA_LOCKTIMEO) && !(nmp->nm_state & NFSSTA_LOCKTIMEO)) { + if ((flags & NFSSTA_LOCKTIMEO) && + !(nmp->nm_state & NFSSTA_LOCKTIMEO)) { nmp->nm_state |= NFSSTA_LOCKTIMEO; mtx_unlock(&nmp->nm_mtx); vfs_event_signal(&nmp->nm_mountp->mnt_stat.f_fsid, @@ -809,9 +808,8 @@ nfs_up(struct nfsmount *nmp, struct thre { if (nmp == NULL) return; - if (tprintfmsg) { + if (tprintfmsg) nfs_msg(td, nmp->nm_mountp->mnt_stat.f_mntfromname, msg, 0); - } mtx_lock(&nmp->nm_mtx); if ((flags & NFSSTA_TIMEO) && (nmp->nm_state & NFSSTA_TIMEO)) { @@ -821,9 +819,10 @@ nfs_up(struct nfsmount *nmp, struct thre VQ_NOTRESP, 1); } else mtx_unlock(&nmp->nm_mtx); - + mtx_lock(&nmp->nm_mtx); - if ((flags & NFSSTA_LOCKTIMEO) && (nmp->nm_state & NFSSTA_LOCKTIMEO)) { + if ((flags & NFSSTA_LOCKTIMEO) && + (nmp->nm_state & NFSSTA_LOCKTIMEO)) { nmp->nm_state &= ~NFSSTA_LOCKTIMEO; mtx_unlock(&nmp->nm_mtx); vfs_event_signal(&nmp->nm_mountp->mnt_stat.f_fsid, From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 19:54:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F2ED1065670; Tue, 30 Mar 2010 19:54:29 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8F5F48FC18; Tue, 30 Mar 2010 19:54: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 o2UJsTW7078491; Tue, 30 Mar 2010 19:54:29 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UJsT4K078489; Tue, 30 Mar 2010 19:54:29 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201003301954.o2UJsT4K078489@svn.freebsd.org> From: Jack F Vogel Date: Tue, 30 Mar 2010 19:54: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: r205919 - head/sys/dev/ixgbe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2010 19:54:29 -0000 Author: jfv Date: Tue Mar 30 19:54:29 2010 New Revision: 205919 URL: http://svn.freebsd.org/changeset/base/205919 Log: fix my clobber of the copyright date :) Modified: head/sys/dev/ixgbe/ixgbe.c Modified: head/sys/dev/ixgbe/ixgbe.c ============================================================================== --- head/sys/dev/ixgbe/ixgbe.c Tue Mar 30 19:52:45 2010 (r205918) +++ head/sys/dev/ixgbe/ixgbe.c Tue Mar 30 19:54:29 2010 (r205919) @@ -1,6 +1,6 @@ /****************************************************************************** - Copyright (c) 2001-2009, Intel Corporation + Copyright (c) 2001-2010, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 19:55:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B9276106568A; Tue, 30 Mar 2010 19:55:09 +0000 (UTC) (envelope-from jfvogel@gmail.com) Received: from mail-ew0-f224.google.com (mail-ew0-f224.google.com [209.85.219.224]) by mx1.freebsd.org (Postfix) with ESMTP id 938408FC25; Tue, 30 Mar 2010 19:55:08 +0000 (UTC) Received: by ewy24 with SMTP id 24so2199641ewy.33 for ; Tue, 30 Mar 2010 12:55:07 -0700 (PDT) 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:received:message-id:subject:from:to:cc:content-type; bh=ueVODyE/0ILsg/AyFO4uKGv7ZmiHRq8Wsxz81AlKonU=; b=IxAajxdNu0h9tS6YRMH7PPkiOg6dV8Oz2XgIA5prHfzWASTSut0BVPqJ3OE5HxTDcW Goeo0Qj4mf2xEYl8kYAG6AKFD2d2DetdXmPSmim0U/Q/Dg8qwaqMK85KzKDl/tlnR8xy LCatpnocQgfkYxP80QU43pKkTvTki8eRvSJz0= 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; b=axhaX2ewEbdU3AtRPcQHuKN7spD8nESZvnyWN0Bsi2qZglTN67+evcorox/C8Rlv/s sj7wlI/RxrWxWBT+fBbnYKihMgBqDlA+WcxTBez3frWm9hEDCQiMEpYJEkButFOrCadS POUE75yKV2ZVtkMsPDDi5GiJSgIH8NNAH5gmM= MIME-Version: 1.0 Received: by 10.216.7.146 with HTTP; Tue, 30 Mar 2010 12:55:07 -0700 (PDT) In-Reply-To: <1269977662.15736.43.camel@headache.rainbow-runner.nl> References: <201003301909.o2UJ9IKn067820@svn.freebsd.org> <1269977662.15736.43.camel@headache.rainbow-runner.nl> Date: Tue, 30 Mar 2010 12:55:07 -0700 Received: by 10.216.155.208 with SMTP id j58mr178032wek.228.1269978907275; Tue, 30 Mar 2010 12:55:07 -0700 (PDT) Message-ID: <2a41acea1003301255w1c6928che5b6ecf67daeb750@mail.gmail.com> From: Jack Vogel To: Koop Mast Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Jack F Vogel , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r205904 - head/sys/dev/ixgbe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2010 19:55:10 -0000 Mad dash fixes always are a bad idea, lol. Thanks, correcting it. Jack On Tue, Mar 30, 2010 at 12:34 PM, Koop Mast wrote: > On Tue, 2010-03-30 at 19:09 +0000, Jack F Vogel wrote: > > > Modified: > > head/sys/dev/ixgbe/ixgbe.c > > head/sys/dev/ixgbe/ixgbe.h > > > > Modified: head/sys/dev/ixgbe/ixgbe.c > > > ============================================================================== > > --- head/sys/dev/ixgbe/ixgbe.c Tue Mar 30 19:08:05 2010 > (r205903) > > +++ head/sys/dev/ixgbe/ixgbe.c Tue Mar 30 19:09:18 2010 > (r205904) > > @@ -1,6 +1,6 @@ > > > /****************************************************************************** > > > > - Copyright (c) 2001-2010, Intel Corporation > > + Copyright (c) 2001-2009, Intel Corporation > ^^ > Going back in time... > > > All rights reserved. > > > > Redistribution and use in source and binary forms, with or without > > @@ -46,7 +46,7 @@ int ixgbe_display_debug_stat > > /********************************************************************* > > * Driver version > > *********************************************************************/ > > -char ixgbe_driver_version[] = "2.1.6"; > > +char ixgbe_driver_version[] = "2.1.7"; > > > ^^ > with a newer version? Curious :) > > -Koop > > From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 20:02:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 579CC1065670; Tue, 30 Mar 2010 20:02:27 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 447CE8FC1B; Tue, 30 Mar 2010 20:02: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 o2UK2R0v080362; Tue, 30 Mar 2010 20:02:27 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UK2R8e080352; Tue, 30 Mar 2010 20:02:27 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003302002.o2UK2R8e080352@svn.freebsd.org> From: Marius Strobl Date: Tue, 30 Mar 2010 20:02:27 +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: r205920 - in stable/8/sys: boot/sparc64/loader sparc64/include sun4v/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2010 20:02:27 -0000 Author: marius Date: Tue Mar 30 20:02:26 2010 New Revision: 205920 URL: http://svn.freebsd.org/changeset/base/205920 Log: MFC: r203829 - Assert that HEAPSZ is a multiple of PAGE_SIZE as at least the firmware of Sun Fire V1280 doesn't round up the size itself but instead lets claiming of non page-sized amounts of memory fail. - Change parameters and variables related to the TLB slots to unsigned which is more appropriate. - Search the whole OFW device tree instead of only the children of the root nexus device for the BSP as starting with UltraSPARC IV the 'cpu' nodes hang off of from 'cmp' (chip multi-threading processor) or 'core' or combinations thereof. Also in large UltraSPARC III based machines the 'cpu' nodes hang off of 'ssm' (scalable shared memory) nodes which group snooping-coherency domains together instead of directly from the nexus. - Add support for UltraSPARC IV and IV+ BSPs. Due to the fact that these are multi-core each CPU has two Fireplane config registers and thus the module/target ID has to be determined differently so the one specific to a certain core is used. Similarly, starting with UltraSPARC IV the individual cores use a different property in the OFW device tree to indicate the CPU/core ID as it no longer is in coincidence with the shared slot/socket ID. While at it additionally distinguish between CPUs with Fireplane and JBus interconnects as these also use slightly different sizes for the JBus/agent/module/target IDs. - Check the return value of init_heap(). This requires moving it after cons_probe() so we can panic when appropriate. This should be fine as the PowerPC OFW loader uses that order for quite some time now. Added: stable/8/sys/sparc64/include/cmt.h - copied unchanged from r203829, head/sys/sparc64/include/cmt.h stable/8/sys/sparc64/include/fireplane.h - copied unchanged from r203829, head/sys/sparc64/include/fireplane.h stable/8/sys/sparc64/include/jbus.h - copied unchanged from r203829, head/sys/sparc64/include/jbus.h stable/8/sys/sun4v/include/cmt.h - copied unchanged from r203829, head/sys/sun4v/include/cmt.h stable/8/sys/sun4v/include/fireplane.h - copied unchanged from r203829, head/sys/sun4v/include/fireplane.h stable/8/sys/sun4v/include/jbus.h - copied unchanged from r203829, head/sys/sun4v/include/jbus.h Modified: stable/8/sys/boot/sparc64/loader/main.c stable/8/sys/sparc64/include/asi.h stable/8/sys/sun4v/include/asi.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/boot/sparc64/loader/main.c ============================================================================== --- stable/8/sys/boot/sparc64/loader/main.c Tue Mar 30 19:54:29 2010 (r205919) +++ stable/8/sys/boot/sparc64/loader/main.c Tue Mar 30 20:02:26 2010 (r205920) @@ -46,16 +46,19 @@ __FBSDID("$FreeBSD$"); */ #include -#include #include -#include +#include #include +#include #include #include #include +#include #include #include +#include +#include #include #include #include @@ -68,6 +71,12 @@ __FBSDID("$FreeBSD$"); #include "libofw.h" #include "dev_net.h" +#ifndef CTASSERT +#define CTASSERT(x) _CTASSERT(x, __LINE__) +#define _CTASSERT(x, y) __CTASSERT(x, y) +#define __CTASSERT(x, y) typedef char __assert ## y[(x) ? 1 : -1] +#endif + extern char bootprog_name[], bootprog_rev[], bootprog_date[], bootprog_maker[]; enum { @@ -76,6 +85,9 @@ enum { LOADSZ = 0x1000000 /* for kernel and modules */ }; +/* At least Sun Fire V1280 require page sized allocations to be claimed. */ +CTASSERT(HEAPSZ % PAGE_SIZE == 0); + static struct mmu_ops { void (*tlb_init)(void); int (*mmu_mapin)(vm_offset_t va, vm_size_t len); @@ -84,11 +96,11 @@ static struct mmu_ops { typedef void kernel_entry_t(vm_offset_t mdp, u_long o1, u_long o2, u_long o3, void *openfirmware); -static inline u_long dtlb_get_data_sun4u(int slot); -static void dtlb_enter_sun4u(u_long vpn, u_long data); +static inline u_long dtlb_get_data_sun4u(u_int); +static void dtlb_enter_sun4u(u_long, u_long); static vm_offset_t dtlb_va_to_pa_sun4u(vm_offset_t); -static inline u_long itlb_get_data_sun4u(int slot); -static void itlb_enter_sun4u(u_long vpn, u_long data); +static inline u_long itlb_get_data_sun4u(u_int); +static void itlb_enter_sun4u(u_long, u_long); static vm_offset_t itlb_va_to_pa_sun4u(vm_offset_t); static void itlb_relocate_locked0_sun4u(void); extern vm_offset_t md_load(char *, vm_offset_t *); @@ -104,6 +116,9 @@ static int __elfN(exec)(struct preloaded static int mmu_mapin_sun4u(vm_offset_t, vm_size_t); static int mmu_mapin_sun4v(vm_offset_t, vm_size_t); static vm_offset_t init_heap(void); +static phandle_t find_bsp_sun4u(phandle_t, uint32_t); +const char *cpu_cpuid_prop_sun4u(void); +uint32_t cpu_get_mid_sun4u(void); static void tlb_init_sun4u(void); static void tlb_init_sun4v(void); @@ -120,11 +135,11 @@ static struct mmu_ops mmu_ops_sun4v = { /* sun4u */ struct tlb_entry *dtlb_store; struct tlb_entry *itlb_store; -int dtlb_slot; -int itlb_slot; +u_int dtlb_slot; +u_int itlb_slot; int cpu_impl; -static int dtlb_slot_max; -static int itlb_slot_max; +static u_int dtlb_slot_max; +static u_int itlb_slot_max; /* sun4v */ static struct tlb_entry *tlb_store; @@ -398,7 +413,7 @@ __elfN(exec)(struct preloaded_file *fp) } static inline u_long -dtlb_get_data_sun4u(int slot) +dtlb_get_data_sun4u(u_int slot) { /* @@ -410,7 +425,7 @@ dtlb_get_data_sun4u(int slot) } static inline u_long -itlb_get_data_sun4u(int slot) +itlb_get_data_sun4u(u_int slot) { /* @@ -668,33 +683,98 @@ init_heap(void) return (heapva); } +static phandle_t +find_bsp_sun4u(phandle_t node, uint32_t bspid) +{ + char type[sizeof("cpu")]; + phandle_t child; + uint32_t cpuid; + + for (; node > 0; node = OF_peer(node)) { + child = OF_child(node); + if (child > 0) { + child = find_bsp_sun4u(child, bspid); + if (child > 0) + return (child); + } else { + if (OF_getprop(node, "device_type", type, + sizeof(type)) <= 0) + continue; + if (strcmp(type, "cpu") != 0) + continue; + if (OF_getprop(node, cpu_cpuid_prop_sun4u(), &cpuid, + sizeof(cpuid)) <= 0) + continue; + if (cpuid == bspid) + return (node); + } + } + return (0); +} + +const char * +cpu_cpuid_prop_sun4u(void) +{ + + switch (cpu_impl) { + case CPU_IMPL_SPARC64: + case CPU_IMPL_ULTRASPARCI: + case CPU_IMPL_ULTRASPARCII: + case CPU_IMPL_ULTRASPARCIIi: + case CPU_IMPL_ULTRASPARCIIe: + return ("upa-portid"); + case CPU_IMPL_ULTRASPARCIII: + case CPU_IMPL_ULTRASPARCIIIp: + case CPU_IMPL_ULTRASPARCIIIi: + case CPU_IMPL_ULTRASPARCIIIip: + return ("portid"); + case CPU_IMPL_ULTRASPARCIV: + case CPU_IMPL_ULTRASPARCIVp: + return ("cpuid"); + default: + return (""); + } +} + +uint32_t +cpu_get_mid_sun4u(void) +{ + + switch (cpu_impl) { + case CPU_IMPL_SPARC64: + case CPU_IMPL_ULTRASPARCI: + case CPU_IMPL_ULTRASPARCII: + case CPU_IMPL_ULTRASPARCIIi: + case CPU_IMPL_ULTRASPARCIIe: + return (UPA_CR_GET_MID(ldxa(0, ASI_UPA_CONFIG_REG))); + case CPU_IMPL_ULTRASPARCIII: + case CPU_IMPL_ULTRASPARCIIIp: + return (FIREPLANE_CR_GET_AID(ldxa(AA_FIREPLANE_CONFIG, + ASI_FIREPLANE_CONFIG_REG))); + case CPU_IMPL_ULTRASPARCIIIi: + case CPU_IMPL_ULTRASPARCIIIip: + return (JBUS_CR_GET_JID(ldxa(0, ASI_JBUS_CONFIG_REG))); + case CPU_IMPL_ULTRASPARCIV: + case CPU_IMPL_ULTRASPARCIVp: + return (INTR_ID_GET_ID(ldxa(AA_INTR_ID, ASI_INTR_ID))); + default: + return (0); + } +} + static void tlb_init_sun4u(void) { - phandle_t child; - char buf[128]; - u_int bootcpu; - u_int cpu; + phandle_t bsp; cpu_impl = VER_IMPL(rdpr(ver)); - bootcpu = UPA_CR_GET_MID(ldxa(0, ASI_UPA_CONFIG_REG)); - for (child = OF_child(root); child != 0; child = OF_peer(child)) { - if (OF_getprop(child, "device_type", buf, sizeof(buf)) <= 0) - continue; - if (strcmp(buf, "cpu") != 0) - continue; - if (OF_getprop(child, cpu_impl < CPU_IMPL_ULTRASPARCIII ? - "upa-portid" : "portid", &cpu, sizeof(cpu)) <= 0) - continue; - if (cpu == bootcpu) - break; - } - if (cpu != bootcpu) + bsp = find_bsp_sun4u(OF_child(root), cpu_get_mid_sun4u()); + if (bsp == 0) panic("%s: no node for bootcpu?!?!", __func__); - if (OF_getprop(child, "#dtlb-entries", &dtlb_slot_max, + if (OF_getprop(bsp, "#dtlb-entries", &dtlb_slot_max, sizeof(dtlb_slot_max)) == -1 || - OF_getprop(child, "#itlb-entries", &itlb_slot_max, + OF_getprop(bsp, "#itlb-entries", &itlb_slot_max, sizeof(itlb_slot_max)) == -1) panic("%s: can't get TLB slot max.", __func__); @@ -749,14 +829,15 @@ main(int (*openfirm)(void *)) archsw.arch_autoload = sparc64_autoload; archsw.arch_maphint = sparc64_maphint; - init_heap(); - setheap((void *)heapva, (void *)(heapva + HEAPSZ)); - /* * Probe for a console. */ cons_probe(); + if (init_heap() == (vm_offset_t)-1) + panic("%s: can't claim heap", __func__); + setheap((void *)heapva, (void *)(heapva + HEAPSZ)); + if ((root = OF_peer(0)) == -1) panic("%s: can't get root phandle", __func__); OF_getprop(root, "compatible", compatible, sizeof(compatible)); Modified: stable/8/sys/sparc64/include/asi.h ============================================================================== --- stable/8/sys/sparc64/include/asi.h Tue Mar 30 19:54:29 2010 (r205919) +++ stable/8/sys/sparc64/include/asi.h Tue Mar 30 20:02:26 2010 (r205920) @@ -33,7 +33,7 @@ #define _MACHINE_ASI_H_ /* - * Standard v9 asis + * Standard v9 ASIs */ #define ASI_N 0x4 #define ASI_NL 0xc @@ -51,7 +51,7 @@ #define ASI_SNFL 0x8b /* - * UltraSPARC extensions. ASIs limited to a certain family are annotated. + * UltraSPARC extensions - ASIs limited to a certain family are annotated. */ #define ASI_PHYS_USE_EC 0x14 #define ASI_PHYS_BYPASS_EC_WITH_EBIT 0x15 @@ -91,9 +91,12 @@ #define ASI_INTR_RECEIVE 0x49 #define ASI_UPA_CONFIG_REG 0x4a /* US-I, II */ -#define ASI_FIREPLANE_CONFIG_REG 0x4a /* US-III Cu */ -#define AA_FIREPLANE_CONFIG 0x0 /* US-III Cu */ -#define AA_FIREPLANE_ADDRESS 0x8 /* US-III Cu */ +#define ASI_FIREPLANE_CONFIG_REG 0x4a /* US-III{,+}, IV{,+} */ +#define AA_FIREPLANE_CONFIG 0x0 /* US-III{,+}, IV{,+} */ +#define AA_FIREPLANE_ADDRESS 0x8 /* US-III{,+}, IV{,+} */ +#define AA_FIREPLANE_CONFIG_2 0x10 /* US-IV{,+} */ + +#define ASI_JBUS_CONFIG_REG 0x4a /* US-IIIi{,+} */ #define ASI_ESTATE_ERROR_EN_REG 0x4b #define AA_ESTATE_CEEN 0x1 @@ -153,6 +156,11 @@ #define ASI_IIU_INST_TRAP 0x60 /* US-III family */ +#define ASI_INTR_ID 0x63 /* US-IV{,+} */ +#define AA_INTR_ID 0x0 /* US-IV{,+} */ +#define AA_CORE_ID 0x10 /* US-IV{,+} */ +#define AA_CESR_ID 0x40 /* US-IV{,+} */ + #define ASI_ICACHE_INSTR 0x66 #define ASI_ICACHE_TAG 0x67 #define ASI_ICACHE_SNOOP_TAG 0x68 /* US-III family */ @@ -179,7 +187,7 @@ /* * With the advent of the US-III, the numbering has changed, as additional - * registers were inserted in between. We retain the original ordering for + * registers were inserted in between. We retain the original ordering for * now, and append an A to the inserted registers. * Exceptions are AA_SDB_INTR_D6 and AA_SDB_INTR_D7, which were appended * at the end. Copied: stable/8/sys/sparc64/include/cmt.h (from r203829, head/sys/sparc64/include/cmt.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/sys/sparc64/include/cmt.h Tue Mar 30 20:02:26 2010 (r205920, copy of r203829, head/sys/sparc64/include/cmt.h) @@ -0,0 +1,39 @@ +/*- + * Copyright (c) 2010 Marius Strobl + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _MACHINE_CMT_H_ +#define _MACHINE_CMT_H_ + +#define INTR_ID_ID_SHIFT (0) +#define INTR_ID_ID_SIZE (10) +#define INTR_ID_ID_MASK \ + (((1 << INTR_ID_ID_SIZE) - 1) << INTR_ID_ID_SHIFT) + +#define INTR_ID_GET_ID(cr) ((cr & INTR_ID_ID_MASK) >> INTR_ID_ID_SHIFT) + +#endif /* _MACHINE_CMT_H_ */ Copied: stable/8/sys/sparc64/include/fireplane.h (from r203829, head/sys/sparc64/include/fireplane.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/sys/sparc64/include/fireplane.h Tue Mar 30 20:02:26 2010 (r205920, copy of r203829, head/sys/sparc64/include/fireplane.h) @@ -0,0 +1,40 @@ +/*- + * Copyright (c) 2010 Marius Strobl + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _MACHINE_FIREPLANE_H_ +#define _MACHINE_FIREPLANE_H_ + +#define FIREPLANE_CR_AID_SHIFT (17) +#define FIREPLANE_CR_AID_SIZE (10) +#define FIREPLANE_CR_AID_MASK \ + (((1 << FIREPLANE_CR_AID_SIZE) - 1) << FIREPLANE_CR_AID_SHIFT) + +#define FIREPLANE_CR_GET_AID(cr) \ + ((cr & FIREPLANE_CR_AID_MASK) >> FIREPLANE_CR_AID_SHIFT) + +#endif /* _MACHINE_FIREPLANE_H_ */ Copied: stable/8/sys/sparc64/include/jbus.h (from r203829, head/sys/sparc64/include/jbus.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/sys/sparc64/include/jbus.h Tue Mar 30 20:02:26 2010 (r205920, copy of r203829, head/sys/sparc64/include/jbus.h) @@ -0,0 +1,39 @@ +/*- + * Copyright (c) 2010 Marius Strobl + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _MACHINE_JBUS_H_ +#define _MACHINE_JBUS_H_ + +#define JBUS_CR_JID_SHIFT (17) +#define JBUS_CR_JID_SIZE (3) +#define JBUS_CR_JID_MASK \ + (((1 << JBUS_CR_JID_SIZE) - 1) << JBUS_CR_JID_SHIFT) + +#define JBUS_CR_GET_JID(cr) ((cr & JBUS_CR_JID_MASK) >> JBUS_CR_JID_SHIFT) + +#endif /* _MACHINE_JBUS_H_ */ Modified: stable/8/sys/sun4v/include/asi.h ============================================================================== --- stable/8/sys/sun4v/include/asi.h Tue Mar 30 19:54:29 2010 (r205919) +++ stable/8/sys/sun4v/include/asi.h Tue Mar 30 20:02:26 2010 (r205920) @@ -158,6 +158,11 @@ #define AA_DMMU_TAR 0x30 #define ASI_UPA_CONFIG_REG 0x4a /* US-I, II */ +#define ASI_FIREPLANE_CONFIG_REG 0x4a /* US-III{,+}, IV{,+} */ +#define AA_FIREPLANE_CONFIG 0x0 /* US-III{,+}, IV{,+} */ +#define AA_FIREPLANE_ADDRESS 0x8 /* US-III{,+}, IV{,+} */ +#define AA_FIREPLANE_CONFIG_2 0x10 /* US-IV{,+} */ +#define ASI_JBUS_CONFIG_REG 0x4a /* US-IIIi{,+} */ #define ASI_IMMU 0x50 #define ASI_ITLB_DATA_IN_REG 0x54 #define ASI_ITLB_DATA_ACCESS_REG 0x55 @@ -167,5 +172,7 @@ #define ASI_DTLB_DATA_IN_REG 0x5c #define ASI_DTLB_DATA_ACCESS_REG 0x5d #define ASI_DTLB_TAG_READ_REG 0x5e +#define ASI_INTR_ID 0x63 /* US-IV{,+} */ +#define AA_INTR_ID 0x0 /* US-IV{,+} */ #endif /* !_MACHINE_ASI_H_ */ Copied: stable/8/sys/sun4v/include/cmt.h (from r203829, head/sys/sun4v/include/cmt.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/sys/sun4v/include/cmt.h Tue Mar 30 20:02:26 2010 (r205920, copy of r203829, head/sys/sun4v/include/cmt.h) @@ -0,0 +1,7 @@ +/*- + * This file is in the public domain. + * + * $FreeBSD$ + */ + +#include Copied: stable/8/sys/sun4v/include/fireplane.h (from r203829, head/sys/sun4v/include/fireplane.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/sys/sun4v/include/fireplane.h Tue Mar 30 20:02:26 2010 (r205920, copy of r203829, head/sys/sun4v/include/fireplane.h) @@ -0,0 +1,7 @@ +/*- + * This file is in the public domain. + * + * $FreeBSD$ + */ + +#include Copied: stable/8/sys/sun4v/include/jbus.h (from r203829, head/sys/sun4v/include/jbus.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/sys/sun4v/include/jbus.h Tue Mar 30 20:02:26 2010 (r205920, copy of r203829, head/sys/sun4v/include/jbus.h) @@ -0,0 +1,7 @@ +/*- + * This file is in the public domain. + * + * $FreeBSD$ + */ + +#include From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 20:02:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E6660106566C; Tue, 30 Mar 2010 20:02:28 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D3B1A8FC13; Tue, 30 Mar 2010 20:02: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 o2UK2SmQ080400; Tue, 30 Mar 2010 20:02:28 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UK2Sfr080390; Tue, 30 Mar 2010 20:02:28 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003302002.o2UK2Sfr080390@svn.freebsd.org> From: Marius Strobl Date: Tue, 30 Mar 2010 20:02:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205921 - in stable/7/sys: boot/sparc64/loader sparc64/include sun4v/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2010 20:02:29 -0000 Author: marius Date: Tue Mar 30 20:02:28 2010 New Revision: 205921 URL: http://svn.freebsd.org/changeset/base/205921 Log: MFC: r203829 - Assert that HEAPSZ is a multiple of PAGE_SIZE as at least the firmware of Sun Fire V1280 doesn't round up the size itself but instead lets claiming of non page-sized amounts of memory fail. - Change parameters and variables related to the TLB slots to unsigned which is more appropriate. - Search the whole OFW device tree instead of only the children of the root nexus device for the BSP as starting with UltraSPARC IV the 'cpu' nodes hang off of from 'cmp' (chip multi-threading processor) or 'core' or combinations thereof. Also in large UltraSPARC III based machines the 'cpu' nodes hang off of 'ssm' (scalable shared memory) nodes which group snooping-coherency domains together instead of directly from the nexus. - Add support for UltraSPARC IV and IV+ BSPs. Due to the fact that these are multi-core each CPU has two Fireplane config registers and thus the module/target ID has to be determined differently so the one specific to a certain core is used. Similarly, starting with UltraSPARC IV the individual cores use a different property in the OFW device tree to indicate the CPU/core ID as it no longer is in coincidence with the shared slot/socket ID. While at it additionally distinguish between CPUs with Fireplane and JBus interconnects as these also use slightly different sizes for the JBus/agent/module/target IDs. - Check the return value of init_heap(). This requires moving it after cons_probe() so we can panic when appropriate. This should be fine as the PowerPC OFW loader uses that order for quite some time now. Added: stable/7/sys/sparc64/include/cmt.h - copied unchanged from r203829, head/sys/sparc64/include/cmt.h stable/7/sys/sparc64/include/fireplane.h - copied unchanged from r203829, head/sys/sparc64/include/fireplane.h stable/7/sys/sparc64/include/jbus.h - copied unchanged from r203829, head/sys/sparc64/include/jbus.h stable/7/sys/sun4v/include/cmt.h - copied unchanged from r203829, head/sys/sun4v/include/cmt.h stable/7/sys/sun4v/include/fireplane.h - copied unchanged from r203829, head/sys/sun4v/include/fireplane.h stable/7/sys/sun4v/include/jbus.h - copied unchanged from r203829, head/sys/sun4v/include/jbus.h Modified: stable/7/sys/boot/sparc64/loader/main.c stable/7/sys/sparc64/include/asi.h stable/7/sys/sun4v/include/asi.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/boot/sparc64/loader/main.c ============================================================================== --- stable/7/sys/boot/sparc64/loader/main.c Tue Mar 30 20:02:26 2010 (r205920) +++ stable/7/sys/boot/sparc64/loader/main.c Tue Mar 30 20:02:28 2010 (r205921) @@ -46,16 +46,19 @@ __FBSDID("$FreeBSD$"); */ #include -#include #include -#include +#include #include +#include #include #include #include +#include #include #include +#include +#include #include #include #include @@ -68,6 +71,12 @@ __FBSDID("$FreeBSD$"); #include "libofw.h" #include "dev_net.h" +#ifndef CTASSERT +#define CTASSERT(x) _CTASSERT(x, __LINE__) +#define _CTASSERT(x, y) __CTASSERT(x, y) +#define __CTASSERT(x, y) typedef char __assert ## y[(x) ? 1 : -1] +#endif + extern char bootprog_name[], bootprog_rev[], bootprog_date[], bootprog_maker[]; enum { @@ -76,6 +85,9 @@ enum { LOADSZ = 0x1000000 /* for kernel and modules */ }; +/* At least Sun Fire V1280 require page sized allocations to be claimed. */ +CTASSERT(HEAPSZ % PAGE_SIZE == 0); + static struct mmu_ops { void (*tlb_init)(void); int (*mmu_mapin)(vm_offset_t va, vm_size_t len); @@ -84,11 +96,11 @@ static struct mmu_ops { typedef void kernel_entry_t(vm_offset_t mdp, u_long o1, u_long o2, u_long o3, void *openfirmware); -static inline u_long dtlb_get_data_sun4u(int slot); -static void dtlb_enter_sun4u(u_long vpn, u_long data); +static inline u_long dtlb_get_data_sun4u(u_int); +static void dtlb_enter_sun4u(u_long, u_long); static vm_offset_t dtlb_va_to_pa_sun4u(vm_offset_t); -static inline u_long itlb_get_data_sun4u(int slot); -static void itlb_enter_sun4u(u_long vpn, u_long data); +static inline u_long itlb_get_data_sun4u(u_int); +static void itlb_enter_sun4u(u_long, u_long); static vm_offset_t itlb_va_to_pa_sun4u(vm_offset_t); static void itlb_relocate_locked0_sun4u(void); extern vm_offset_t md_load(char *, vm_offset_t *); @@ -104,6 +116,9 @@ static int __elfN(exec)(struct preloaded static int mmu_mapin_sun4u(vm_offset_t, vm_size_t); static int mmu_mapin_sun4v(vm_offset_t, vm_size_t); static vm_offset_t init_heap(void); +static phandle_t find_bsp_sun4u(phandle_t, uint32_t); +const char *cpu_cpuid_prop_sun4u(void); +uint32_t cpu_get_mid_sun4u(void); static void tlb_init_sun4u(void); static void tlb_init_sun4v(void); @@ -120,11 +135,11 @@ static struct mmu_ops mmu_ops_sun4v = { /* sun4u */ struct tlb_entry *dtlb_store; struct tlb_entry *itlb_store; -int dtlb_slot; -int itlb_slot; +u_int dtlb_slot; +u_int itlb_slot; int cpu_impl; -static int dtlb_slot_max; -static int itlb_slot_max; +static u_int dtlb_slot_max; +static u_int itlb_slot_max; /* sun4v */ static struct tlb_entry *tlb_store; @@ -399,7 +414,7 @@ __elfN(exec)(struct preloaded_file *fp) } static inline u_long -dtlb_get_data_sun4u(int slot) +dtlb_get_data_sun4u(u_int slot) { /* @@ -411,7 +426,7 @@ dtlb_get_data_sun4u(int slot) } static inline u_long -itlb_get_data_sun4u(int slot) +itlb_get_data_sun4u(u_int slot) { /* @@ -669,33 +684,98 @@ init_heap(void) return (heapva); } +static phandle_t +find_bsp_sun4u(phandle_t node, uint32_t bspid) +{ + char type[sizeof("cpu")]; + phandle_t child; + uint32_t cpuid; + + for (; node > 0; node = OF_peer(node)) { + child = OF_child(node); + if (child > 0) { + child = find_bsp_sun4u(child, bspid); + if (child > 0) + return (child); + } else { + if (OF_getprop(node, "device_type", type, + sizeof(type)) <= 0) + continue; + if (strcmp(type, "cpu") != 0) + continue; + if (OF_getprop(node, cpu_cpuid_prop_sun4u(), &cpuid, + sizeof(cpuid)) <= 0) + continue; + if (cpuid == bspid) + return (node); + } + } + return (0); +} + +const char * +cpu_cpuid_prop_sun4u(void) +{ + + switch (cpu_impl) { + case CPU_IMPL_SPARC64: + case CPU_IMPL_ULTRASPARCI: + case CPU_IMPL_ULTRASPARCII: + case CPU_IMPL_ULTRASPARCIIi: + case CPU_IMPL_ULTRASPARCIIe: + return ("upa-portid"); + case CPU_IMPL_ULTRASPARCIII: + case CPU_IMPL_ULTRASPARCIIIp: + case CPU_IMPL_ULTRASPARCIIIi: + case CPU_IMPL_ULTRASPARCIIIip: + return ("portid"); + case CPU_IMPL_ULTRASPARCIV: + case CPU_IMPL_ULTRASPARCIVp: + return ("cpuid"); + default: + return (""); + } +} + +uint32_t +cpu_get_mid_sun4u(void) +{ + + switch (cpu_impl) { + case CPU_IMPL_SPARC64: + case CPU_IMPL_ULTRASPARCI: + case CPU_IMPL_ULTRASPARCII: + case CPU_IMPL_ULTRASPARCIIi: + case CPU_IMPL_ULTRASPARCIIe: + return (UPA_CR_GET_MID(ldxa(0, ASI_UPA_CONFIG_REG))); + case CPU_IMPL_ULTRASPARCIII: + case CPU_IMPL_ULTRASPARCIIIp: + return (FIREPLANE_CR_GET_AID(ldxa(AA_FIREPLANE_CONFIG, + ASI_FIREPLANE_CONFIG_REG))); + case CPU_IMPL_ULTRASPARCIIIi: + case CPU_IMPL_ULTRASPARCIIIip: + return (JBUS_CR_GET_JID(ldxa(0, ASI_JBUS_CONFIG_REG))); + case CPU_IMPL_ULTRASPARCIV: + case CPU_IMPL_ULTRASPARCIVp: + return (INTR_ID_GET_ID(ldxa(AA_INTR_ID, ASI_INTR_ID))); + default: + return (0); + } +} + static void tlb_init_sun4u(void) { - phandle_t child; - char buf[128]; - u_int bootcpu; - u_int cpu; + phandle_t bsp; cpu_impl = VER_IMPL(rdpr(ver)); - bootcpu = UPA_CR_GET_MID(ldxa(0, ASI_UPA_CONFIG_REG)); - for (child = OF_child(root); child != 0; child = OF_peer(child)) { - if (OF_getprop(child, "device_type", buf, sizeof(buf)) <= 0) - continue; - if (strcmp(buf, "cpu") != 0) - continue; - if (OF_getprop(child, cpu_impl < CPU_IMPL_ULTRASPARCIII ? - "upa-portid" : "portid", &cpu, sizeof(cpu)) <= 0) - continue; - if (cpu == bootcpu) - break; - } - if (cpu != bootcpu) + bsp = find_bsp_sun4u(OF_child(root), cpu_get_mid_sun4u()); + if (bsp == 0) panic("%s: no node for bootcpu?!?!", __func__); - if (OF_getprop(child, "#dtlb-entries", &dtlb_slot_max, + if (OF_getprop(bsp, "#dtlb-entries", &dtlb_slot_max, sizeof(dtlb_slot_max)) == -1 || - OF_getprop(child, "#itlb-entries", &itlb_slot_max, + OF_getprop(bsp, "#itlb-entries", &itlb_slot_max, sizeof(itlb_slot_max)) == -1) panic("%s: can't get TLB slot max.", __func__); @@ -750,14 +830,15 @@ main(int (*openfirm)(void *)) archsw.arch_autoload = sparc64_autoload; archsw.arch_maphint = sparc64_maphint; - init_heap(); - setheap((void *)heapva, (void *)(heapva + HEAPSZ)); - /* * Probe for a console. */ cons_probe(); + if (init_heap() == (vm_offset_t)-1) + panic("%s: can't claim heap", __func__); + setheap((void *)heapva, (void *)(heapva + HEAPSZ)); + if ((root = OF_peer(0)) == -1) panic("%s: can't get root phandle", __func__); OF_getprop(root, "compatible", compatible, sizeof(compatible)); Modified: stable/7/sys/sparc64/include/asi.h ============================================================================== --- stable/7/sys/sparc64/include/asi.h Tue Mar 30 20:02:26 2010 (r205920) +++ stable/7/sys/sparc64/include/asi.h Tue Mar 30 20:02:28 2010 (r205921) @@ -33,7 +33,7 @@ #define _MACHINE_ASI_H_ /* - * Standard v9 asis + * Standard v9 ASIs */ #define ASI_N 0x4 #define ASI_NL 0xc @@ -51,7 +51,7 @@ #define ASI_SNFL 0x8b /* - * UltraSPARC extensions. ASIs limited to a certain family are annotated. + * UltraSPARC extensions - ASIs limited to a certain family are annotated. */ #define ASI_PHYS_USE_EC 0x14 #define ASI_PHYS_BYPASS_EC_WITH_EBIT 0x15 @@ -91,9 +91,12 @@ #define ASI_INTR_RECEIVE 0x49 #define ASI_UPA_CONFIG_REG 0x4a /* US-I, II */ -#define ASI_FIREPLANE_CONFIG_REG 0x4a /* US-III Cu */ -#define AA_FIREPLANE_CONFIG 0x0 /* US-III Cu */ -#define AA_FIREPLANE_ADDRESS 0x8 /* US-III Cu */ +#define ASI_FIREPLANE_CONFIG_REG 0x4a /* US-III{,+}, IV{,+} */ +#define AA_FIREPLANE_CONFIG 0x0 /* US-III{,+}, IV{,+} */ +#define AA_FIREPLANE_ADDRESS 0x8 /* US-III{,+}, IV{,+} */ +#define AA_FIREPLANE_CONFIG_2 0x10 /* US-IV{,+} */ + +#define ASI_JBUS_CONFIG_REG 0x4a /* US-IIIi{,+} */ #define ASI_ESTATE_ERROR_EN_REG 0x4b #define AA_ESTATE_CEEN 0x1 @@ -153,6 +156,11 @@ #define ASI_IIU_INST_TRAP 0x60 /* US-III family */ +#define ASI_INTR_ID 0x63 /* US-IV{,+} */ +#define AA_INTR_ID 0x0 /* US-IV{,+} */ +#define AA_CORE_ID 0x10 /* US-IV{,+} */ +#define AA_CESR_ID 0x40 /* US-IV{,+} */ + #define ASI_ICACHE_INSTR 0x66 #define ASI_ICACHE_TAG 0x67 #define ASI_ICACHE_SNOOP_TAG 0x68 /* US-III family */ @@ -179,7 +187,7 @@ /* * With the advent of the US-III, the numbering has changed, as additional - * registers were inserted in between. We retain the original ordering for + * registers were inserted in between. We retain the original ordering for * now, and append an A to the inserted registers. * Exceptions are AA_SDB_INTR_D6 and AA_SDB_INTR_D7, which were appended * at the end. Copied: stable/7/sys/sparc64/include/cmt.h (from r203829, head/sys/sparc64/include/cmt.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/sys/sparc64/include/cmt.h Tue Mar 30 20:02:28 2010 (r205921, copy of r203829, head/sys/sparc64/include/cmt.h) @@ -0,0 +1,39 @@ +/*- + * Copyright (c) 2010 Marius Strobl + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _MACHINE_CMT_H_ +#define _MACHINE_CMT_H_ + +#define INTR_ID_ID_SHIFT (0) +#define INTR_ID_ID_SIZE (10) +#define INTR_ID_ID_MASK \ + (((1 << INTR_ID_ID_SIZE) - 1) << INTR_ID_ID_SHIFT) + +#define INTR_ID_GET_ID(cr) ((cr & INTR_ID_ID_MASK) >> INTR_ID_ID_SHIFT) + +#endif /* _MACHINE_CMT_H_ */ Copied: stable/7/sys/sparc64/include/fireplane.h (from r203829, head/sys/sparc64/include/fireplane.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/sys/sparc64/include/fireplane.h Tue Mar 30 20:02:28 2010 (r205921, copy of r203829, head/sys/sparc64/include/fireplane.h) @@ -0,0 +1,40 @@ +/*- + * Copyright (c) 2010 Marius Strobl + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _MACHINE_FIREPLANE_H_ +#define _MACHINE_FIREPLANE_H_ + +#define FIREPLANE_CR_AID_SHIFT (17) +#define FIREPLANE_CR_AID_SIZE (10) +#define FIREPLANE_CR_AID_MASK \ + (((1 << FIREPLANE_CR_AID_SIZE) - 1) << FIREPLANE_CR_AID_SHIFT) + +#define FIREPLANE_CR_GET_AID(cr) \ + ((cr & FIREPLANE_CR_AID_MASK) >> FIREPLANE_CR_AID_SHIFT) + +#endif /* _MACHINE_FIREPLANE_H_ */ Copied: stable/7/sys/sparc64/include/jbus.h (from r203829, head/sys/sparc64/include/jbus.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/sys/sparc64/include/jbus.h Tue Mar 30 20:02:28 2010 (r205921, copy of r203829, head/sys/sparc64/include/jbus.h) @@ -0,0 +1,39 @@ +/*- + * Copyright (c) 2010 Marius Strobl + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _MACHINE_JBUS_H_ +#define _MACHINE_JBUS_H_ + +#define JBUS_CR_JID_SHIFT (17) +#define JBUS_CR_JID_SIZE (3) +#define JBUS_CR_JID_MASK \ + (((1 << JBUS_CR_JID_SIZE) - 1) << JBUS_CR_JID_SHIFT) + +#define JBUS_CR_GET_JID(cr) ((cr & JBUS_CR_JID_MASK) >> JBUS_CR_JID_SHIFT) + +#endif /* _MACHINE_JBUS_H_ */ Modified: stable/7/sys/sun4v/include/asi.h ============================================================================== --- stable/7/sys/sun4v/include/asi.h Tue Mar 30 20:02:26 2010 (r205920) +++ stable/7/sys/sun4v/include/asi.h Tue Mar 30 20:02:28 2010 (r205921) @@ -158,6 +158,11 @@ #define AA_DMMU_TAR 0x30 #define ASI_UPA_CONFIG_REG 0x4a /* US-I, II */ +#define ASI_FIREPLANE_CONFIG_REG 0x4a /* US-III{,+}, IV{,+} */ +#define AA_FIREPLANE_CONFIG 0x0 /* US-III{,+}, IV{,+} */ +#define AA_FIREPLANE_ADDRESS 0x8 /* US-III{,+}, IV{,+} */ +#define AA_FIREPLANE_CONFIG_2 0x10 /* US-IV{,+} */ +#define ASI_JBUS_CONFIG_REG 0x4a /* US-IIIi{,+} */ #define ASI_IMMU 0x50 #define ASI_ITLB_DATA_IN_REG 0x54 #define ASI_ITLB_DATA_ACCESS_REG 0x55 @@ -167,5 +172,7 @@ #define ASI_DTLB_DATA_IN_REG 0x5c #define ASI_DTLB_DATA_ACCESS_REG 0x5d #define ASI_DTLB_TAG_READ_REG 0x5e +#define ASI_INTR_ID 0x63 /* US-IV{,+} */ +#define AA_INTR_ID 0x0 /* US-IV{,+} */ #endif /* !_MACHINE_ASI_H_ */ Copied: stable/7/sys/sun4v/include/cmt.h (from r203829, head/sys/sun4v/include/cmt.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/sys/sun4v/include/cmt.h Tue Mar 30 20:02:28 2010 (r205921, copy of r203829, head/sys/sun4v/include/cmt.h) @@ -0,0 +1,7 @@ +/*- + * This file is in the public domain. + * + * $FreeBSD$ + */ + +#include Copied: stable/7/sys/sun4v/include/fireplane.h (from r203829, head/sys/sun4v/include/fireplane.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/sys/sun4v/include/fireplane.h Tue Mar 30 20:02:28 2010 (r205921, copy of r203829, head/sys/sun4v/include/fireplane.h) @@ -0,0 +1,7 @@ +/*- + * This file is in the public domain. + * + * $FreeBSD$ + */ + +#include Copied: stable/7/sys/sun4v/include/jbus.h (from r203829, head/sys/sun4v/include/jbus.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/sys/sun4v/include/jbus.h Tue Mar 30 20:02:28 2010 (r205921, copy of r203829, head/sys/sun4v/include/jbus.h) @@ -0,0 +1,7 @@ +/*- + * This file is in the public domain. + * + * $FreeBSD$ + */ + +#include From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 20:05:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8F9F1065673; Tue, 30 Mar 2010 20:05:20 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B7A328FC16; Tue, 30 Mar 2010 20:05: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 o2UK5Khv081112; Tue, 30 Mar 2010 20:05:20 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UK5KAm081110; Tue, 30 Mar 2010 20:05:20 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003302005.o2UK5KAm081110@svn.freebsd.org> From: Marius Strobl Date: Tue, 30 Mar 2010 20:05:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205922 - stable/8/sys/boot/sparc64/loader X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2010 20:05:20 -0000 Author: marius Date: Tue Mar 30 20:05:20 2010 New Revision: 205922 URL: http://svn.freebsd.org/changeset/base/205922 Log: MFC: r203830, r203831 Use the SUNW,{d,i}tlb-load methods for entering locked TLB entries like OpenBSD and OpenSolaris do instead of fiddling with the MMUs ourselves. Unlike direct access the firmware methods don't automatically use the next free (?) TLB slot, instead the slot to be used has to be specified. We allocate the TLB slots for the kernel top-down as OpenSolaris suggests that the firmware will always allocate the ones for its own use bottom-up. Besides being simpler, according to OpenBSD using the firmware methods is required to allow booting on Sun Fire E10K with multi-systemboard domains. Modified: stable/8/sys/boot/sparc64/loader/main.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/sparc64/loader/main.c ============================================================================== --- stable/8/sys/boot/sparc64/loader/main.c Tue Mar 30 20:02:28 2010 (r205921) +++ stable/8/sys/boot/sparc64/loader/main.c Tue Mar 30 20:05:20 2010 (r205922) @@ -97,10 +97,10 @@ typedef void kernel_entry_t(vm_offset_t void *openfirmware); static inline u_long dtlb_get_data_sun4u(u_int); -static void dtlb_enter_sun4u(u_long, u_long); +static int dtlb_enter_sun4u(u_int, u_long data, vm_offset_t); static vm_offset_t dtlb_va_to_pa_sun4u(vm_offset_t); static inline u_long itlb_get_data_sun4u(u_int); -static void itlb_enter_sun4u(u_long, u_long); +static int itlb_enter_sun4u(u_int, u_long data, vm_offset_t); static vm_offset_t itlb_va_to_pa_sun4u(vm_offset_t); static void itlb_relocate_locked0_sun4u(void); extern vm_offset_t md_load(char *, vm_offset_t *); @@ -482,55 +482,24 @@ itlb_va_to_pa_sun4u(vm_offset_t va) return (-1); } -static void -dtlb_enter_sun4u(u_long vpn, u_long data) +static int +dtlb_enter_sun4u(u_int index, u_long data, vm_offset_t virt) { - u_long reg; - reg = rdpr(pstate); - wrpr(pstate, reg & ~PSTATE_IE, 0); - stxa(AA_DMMU_TAR, ASI_DMMU, - TLB_TAR_VA(vpn) | TLB_TAR_CTX(TLB_CTX_KERNEL)); - stxa(0, ASI_DTLB_DATA_IN_REG, data); - membar(Sync); - wrpr(pstate, reg, 0); + return (OF_call_method("SUNW,dtlb-load", mmu, 3, 0, index, data, + virt)); } -static void -itlb_enter_sun4u(u_long vpn, u_long data) +static int +itlb_enter_sun4u(u_int index, u_long data, vm_offset_t virt) { - u_long reg; - int i; - reg = rdpr(pstate); - wrpr(pstate, reg & ~PSTATE_IE, 0); - - if (cpu_impl == CPU_IMPL_ULTRASPARCIIIp) { - /* - * Search an unused slot != 0 and explicitly enter the data - * and tag there in order to avoid Cheetah+ erratum 34. - */ - for (i = 1; i < itlb_slot_max; i++) { - if ((itlb_get_data_sun4u(i) & TD_V) != 0) - continue; - - stxa(AA_IMMU_TAR, ASI_IMMU, - TLB_TAR_VA(vpn) | TLB_TAR_CTX(TLB_CTX_KERNEL)); - stxa(TLB_DAR_SLOT(i), ASI_ITLB_DATA_ACCESS_REG, data); - flush(PROMBASE); - break; - } - wrpr(pstate, reg, 0); - if (i == itlb_slot_max) - panic("%s: could not find an unused slot", __func__); - return; - } - - stxa(AA_IMMU_TAR, ASI_IMMU, - TLB_TAR_VA(vpn) | TLB_TAR_CTX(TLB_CTX_KERNEL)); - stxa(0, ASI_ITLB_DATA_IN_REG, data); - flush(PROMBASE); - wrpr(pstate, reg, 0); + if (cpu_impl == CPU_IMPL_ULTRASPARCIIIp && index == 0 && + (data & TD_L) != 0) + panic("%s: won't enter locked TLB entry at index 0 on USIII+", + __func__); + return (OF_call_method("SUNW,itlb-load", mmu, 3, 0, index, data, + virt)); } static void @@ -580,6 +549,7 @@ mmu_mapin_sun4u(vm_offset_t va, vm_size_ { vm_offset_t pa, mva; u_long data; + u_int index; if (va + len > curkva) curkva = va + len; @@ -617,12 +587,20 @@ mmu_mapin_sun4u(vm_offset_t va, vm_size_ TD_CV | TD_P | TD_W; dtlb_store[dtlb_slot].te_pa = pa; dtlb_store[dtlb_slot].te_va = va; + index = dtlb_slot_max - dtlb_slot - 1; + if (dtlb_enter_sun4u(index, data, va) < 0) + panic("%s: can't enter dTLB slot %d data " + "%#lx va %#lx", __func__, index, data, + va); + dtlb_slot++; itlb_store[itlb_slot].te_pa = pa; itlb_store[itlb_slot].te_va = va; - dtlb_slot++; + index = itlb_slot_max - itlb_slot - 1; + if (itlb_enter_sun4u(index, data, va) < 0) + panic("%s: can't enter iTLB slot %d data " + "%#lx va %#lxd", __func__, index, data, + va); itlb_slot++; - dtlb_enter_sun4u(va, data); - itlb_enter_sun4u(va, data); pa = (vm_offset_t)-1; } len -= len > PAGE_SIZE_4M ? PAGE_SIZE_4M : len; From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 20:05:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1CE271065672; Tue, 30 Mar 2010 20:05:23 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0B81C8FC18; Tue, 30 Mar 2010 20:05: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 o2UK5MNP081143; Tue, 30 Mar 2010 20:05:22 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UK5MgW081141; Tue, 30 Mar 2010 20:05:22 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003302005.o2UK5MgW081141@svn.freebsd.org> From: Marius Strobl Date: Tue, 30 Mar 2010 20:05:22 +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: r205923 - stable/7/sys/boot/sparc64/loader X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2010 20:05:23 -0000 Author: marius Date: Tue Mar 30 20:05:22 2010 New Revision: 205923 URL: http://svn.freebsd.org/changeset/base/205923 Log: MFC: r203830, r203831 Use the SUNW,{d,i}tlb-load methods for entering locked TLB entries like OpenBSD and OpenSolaris do instead of fiddling with the MMUs ourselves. Unlike direct access the firmware methods don't automatically use the next free (?) TLB slot, instead the slot to be used has to be specified. We allocate the TLB slots for the kernel top-down as OpenSolaris suggests that the firmware will always allocate the ones for its own use bottom-up. Besides being simpler, according to OpenBSD using the firmware methods is required to allow booting on Sun Fire E10K with multi-systemboard domains. Modified: stable/7/sys/boot/sparc64/loader/main.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/boot/sparc64/loader/main.c ============================================================================== --- stable/7/sys/boot/sparc64/loader/main.c Tue Mar 30 20:05:20 2010 (r205922) +++ stable/7/sys/boot/sparc64/loader/main.c Tue Mar 30 20:05:22 2010 (r205923) @@ -97,10 +97,10 @@ typedef void kernel_entry_t(vm_offset_t void *openfirmware); static inline u_long dtlb_get_data_sun4u(u_int); -static void dtlb_enter_sun4u(u_long, u_long); +static int dtlb_enter_sun4u(u_int, u_long data, vm_offset_t); static vm_offset_t dtlb_va_to_pa_sun4u(vm_offset_t); static inline u_long itlb_get_data_sun4u(u_int); -static void itlb_enter_sun4u(u_long, u_long); +static int itlb_enter_sun4u(u_int, u_long data, vm_offset_t); static vm_offset_t itlb_va_to_pa_sun4u(vm_offset_t); static void itlb_relocate_locked0_sun4u(void); extern vm_offset_t md_load(char *, vm_offset_t *); @@ -483,55 +483,24 @@ itlb_va_to_pa_sun4u(vm_offset_t va) return (-1); } -static void -dtlb_enter_sun4u(u_long vpn, u_long data) +static int +dtlb_enter_sun4u(u_int index, u_long data, vm_offset_t virt) { - u_long reg; - reg = rdpr(pstate); - wrpr(pstate, reg & ~PSTATE_IE, 0); - stxa(AA_DMMU_TAR, ASI_DMMU, - TLB_TAR_VA(vpn) | TLB_TAR_CTX(TLB_CTX_KERNEL)); - stxa(0, ASI_DTLB_DATA_IN_REG, data); - membar(Sync); - wrpr(pstate, reg, 0); + return (OF_call_method("SUNW,dtlb-load", mmu, 3, 0, index, data, + virt)); } -static void -itlb_enter_sun4u(u_long vpn, u_long data) +static int +itlb_enter_sun4u(u_int index, u_long data, vm_offset_t virt) { - u_long reg; - int i; - reg = rdpr(pstate); - wrpr(pstate, reg & ~PSTATE_IE, 0); - - if (cpu_impl == CPU_IMPL_ULTRASPARCIIIp) { - /* - * Search an unused slot != 0 and explicitly enter the data - * and tag there in order to avoid Cheetah+ erratum 34. - */ - for (i = 1; i < itlb_slot_max; i++) { - if ((itlb_get_data_sun4u(i) & TD_V) != 0) - continue; - - stxa(AA_IMMU_TAR, ASI_IMMU, - TLB_TAR_VA(vpn) | TLB_TAR_CTX(TLB_CTX_KERNEL)); - stxa(TLB_DAR_SLOT(i), ASI_ITLB_DATA_ACCESS_REG, data); - flush(PROMBASE); - break; - } - wrpr(pstate, reg, 0); - if (i == itlb_slot_max) - panic("%s: could not find an unused slot", __func__); - return; - } - - stxa(AA_IMMU_TAR, ASI_IMMU, - TLB_TAR_VA(vpn) | TLB_TAR_CTX(TLB_CTX_KERNEL)); - stxa(0, ASI_ITLB_DATA_IN_REG, data); - flush(PROMBASE); - wrpr(pstate, reg, 0); + if (cpu_impl == CPU_IMPL_ULTRASPARCIIIp && index == 0 && + (data & TD_L) != 0) + panic("%s: won't enter locked TLB entry at index 0 on USIII+", + __func__); + return (OF_call_method("SUNW,itlb-load", mmu, 3, 0, index, data, + virt)); } static void @@ -581,6 +550,7 @@ mmu_mapin_sun4u(vm_offset_t va, vm_size_ { vm_offset_t pa, mva; u_long data; + u_int index; if (va + len > curkva) curkva = va + len; @@ -618,12 +588,20 @@ mmu_mapin_sun4u(vm_offset_t va, vm_size_ TD_CV | TD_P | TD_W; dtlb_store[dtlb_slot].te_pa = pa; dtlb_store[dtlb_slot].te_va = va; + index = dtlb_slot_max - dtlb_slot - 1; + if (dtlb_enter_sun4u(index, data, va) < 0) + panic("%s: can't enter dTLB slot %d data " + "%#lx va %#lx", __func__, index, data, + va); + dtlb_slot++; itlb_store[itlb_slot].te_pa = pa; itlb_store[itlb_slot].te_va = va; - dtlb_slot++; + index = itlb_slot_max - itlb_slot - 1; + if (itlb_enter_sun4u(index, data, va) < 0) + panic("%s: can't enter iTLB slot %d data " + "%#lx va %#lxd", __func__, index, data, + va); itlb_slot++; - dtlb_enter_sun4u(va, data); - itlb_enter_sun4u(va, data); pa = (vm_offset_t)-1; } len -= len > PAGE_SIZE_4M ? PAGE_SIZE_4M : len; From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 20:12:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 46A37106566B; Tue, 30 Mar 2010 20:12:43 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 34DEC8FC18; Tue, 30 Mar 2010 20:12:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2UKChgw082881; Tue, 30 Mar 2010 20:12:43 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UKChox082878; Tue, 30 Mar 2010 20:12:43 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003302012.o2UKChox082878@svn.freebsd.org> From: Marius Strobl Date: Tue, 30 Mar 2010 20:12: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: r205924 - stable/8/sys/sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2010 20:12:43 -0000 Author: marius Date: Tue Mar 30 20:12:42 2010 New Revision: 205924 URL: http://svn.freebsd.org/changeset/base/205924 Log: MFC: r203833 - At least the trap table of the Sun Fire V1280 firmware apparently has no cleanwindows handler so just remove trying to trigger it from _start and the AP trampoline code as that leads to a crash there. This should be okay as leaking data from the OFW via the CPU registers on start of the kernel should be no real concern. - Make the comments of _start and the AP trampoline code regarding the initializations they perform match each other and reality. - Make the comments of the AP trampoline code regarding iTLB accesses refer to the right macro. Modified: stable/8/sys/sparc64/sparc64/locore.S stable/8/sys/sparc64/sparc64/mp_locore.S 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/sparc64/sparc64/locore.S ============================================================================== --- stable/8/sys/sparc64/sparc64/locore.S Tue Mar 30 20:05:22 2010 (r205923) +++ stable/8/sys/sparc64/sparc64/locore.S Tue Mar 30 20:12:42 2010 (r205924) @@ -46,12 +46,14 @@ ENTRY(btext) ENTRY(_start) /* * Initialize misc. state to known values: interrupts disabled, normal - * globals, windows flushed (cr = 0, cs = nwindows - 1), no clean - * windows, pil 0, and floating point disabled. + * globals, windows flushed (cr = 0, cs = nwindows - 1), PIL 0 and + * floating point disabled. + * Note that some firmware versions don't implement a clean window + * trap handler so we unfortunately can't clear the windows by setting + * %cleanwin to zero here. */ wrpr %g0, PSTATE_NORMAL, %pstate flushw - wrpr %g0, 0, %cleanwin wrpr %g0, 0, %pil wr %g0, 0, %fprs Modified: stable/8/sys/sparc64/sparc64/mp_locore.S ============================================================================== --- stable/8/sys/sparc64/sparc64/mp_locore.S Tue Mar 30 20:05:22 2010 (r205923) +++ stable/8/sys/sparc64/sparc64/mp_locore.S Tue Mar 30 20:12:42 2010 (r205924) @@ -44,12 +44,14 @@ __FBSDID("$FreeBSD$"); .text _ALIGN_TEXT /* - * Initialize misc. state to known values: interrupts disabled, - * normal globals, no clean windows, PIL 0, and floating point - * disabled. + * Initialize misc. state to known values: interrupts disabled, normal + * globals, windows flushed (cr = 0, cs = nwindows - 1), PIL 0 and + * floating point disabled. + * Note that some firmware versions don't implement a clean window + * trap handler so we unfortunately can't clear the windows by setting + * %cleanwin to zero here. */ 1: wrpr %g0, PSTATE_NORMAL, %pstate - wrpr %g0, 0, %cleanwin wrpr %g0, 0, %pil wr %g0, 0, %fprs @@ -68,7 +70,7 @@ __FBSDID("$FreeBSD$"); setx TD_V | TD_L, %l1, %l0 /* - * We read ASI_DTLB_DATA_ACCESS_REG twice in order to work + * We read ASI_ITLB_DATA_ACCESS_REG twice in order to work * around errata of USIII and beyond. */ ldxa [%g0] ASI_ITLB_DATA_ACCESS_REG, %g0 @@ -94,7 +96,7 @@ __FBSDID("$FreeBSD$"); mov (1 << TLB_DAR_SLOT_SHIFT), %l4 setx TD_V, %l1, %l0 /* - * We read ASI_DTLB_DATA_ACCESS_REG twice in order to work + * We read ASI_ITLB_DATA_ACCESS_REG twice in order to work * around errata of USIII and beyond. */ 2: ldxa [%l4] ASI_ITLB_DATA_ACCESS_REG, %g0 @@ -136,7 +138,7 @@ __FBSDID("$FreeBSD$"); mov (1 << TLB_DAR_SLOT_SHIFT), %l0 setx TD_V, %o1, %o0 /* - * We read ASI_DTLB_DATA_ACCESS_REG twice in order to work + * We read ASI_ITLB_DATA_ACCESS_REG twice in order to work * around errata of USIII and beyond. */ 5: ldxa [%l0] ASI_ITLB_DATA_ACCESS_REG, %g0 From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 20:12:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD00D1065676; Tue, 30 Mar 2010 20:12:46 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9BBC08FC1B; Tue, 30 Mar 2010 20:12:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2UKCkpE082916; Tue, 30 Mar 2010 20:12:46 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UKCkYQ082913; Tue, 30 Mar 2010 20:12:46 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003302012.o2UKCkYQ082913@svn.freebsd.org> From: Marius Strobl Date: Tue, 30 Mar 2010 20:12: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: r205925 - stable/7/sys/sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2010 20:12:46 -0000 Author: marius Date: Tue Mar 30 20:12:46 2010 New Revision: 205925 URL: http://svn.freebsd.org/changeset/base/205925 Log: MFC: r203833 - At least the trap table of the Sun Fire V1280 firmware apparently has no cleanwindows handler so just remove trying to trigger it from _start and the AP trampoline code as that leads to a crash there. This should be okay as leaking data from the OFW via the CPU registers on start of the kernel should be no real concern. - Make the comments of _start and the AP trampoline code regarding the initializations they perform match each other and reality. - Make the comments of the AP trampoline code regarding iTLB accesses refer to the right macro. Modified: stable/7/sys/sparc64/sparc64/locore.S stable/7/sys/sparc64/sparc64/mp_locore.S Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/sparc64/locore.S ============================================================================== --- stable/7/sys/sparc64/sparc64/locore.S Tue Mar 30 20:12:42 2010 (r205924) +++ stable/7/sys/sparc64/sparc64/locore.S Tue Mar 30 20:12:46 2010 (r205925) @@ -46,12 +46,14 @@ ENTRY(btext) ENTRY(_start) /* * Initialize misc. state to known values: interrupts disabled, normal - * globals, windows flushed (cr = 0, cs = nwindows - 1), no clean - * windows, pil 0, and floating point disabled. + * globals, windows flushed (cr = 0, cs = nwindows - 1), PIL 0 and + * floating point disabled. + * Note that some firmware versions don't implement a clean window + * trap handler so we unfortunately can't clear the windows by setting + * %cleanwin to zero here. */ wrpr %g0, PSTATE_NORMAL, %pstate flushw - wrpr %g0, 0, %cleanwin wrpr %g0, 0, %pil wr %g0, 0, %fprs Modified: stable/7/sys/sparc64/sparc64/mp_locore.S ============================================================================== --- stable/7/sys/sparc64/sparc64/mp_locore.S Tue Mar 30 20:12:42 2010 (r205924) +++ stable/7/sys/sparc64/sparc64/mp_locore.S Tue Mar 30 20:12:46 2010 (r205925) @@ -44,12 +44,14 @@ __FBSDID("$FreeBSD$"); .text _ALIGN_TEXT /* - * Initialize misc. state to known values: interrupts disabled, - * normal globals, no clean windows, PIL 0, and floating point - * disabled. + * Initialize misc. state to known values: interrupts disabled, normal + * globals, windows flushed (cr = 0, cs = nwindows - 1), PIL 0 and + * floating point disabled. + * Note that some firmware versions don't implement a clean window + * trap handler so we unfortunately can't clear the windows by setting + * %cleanwin to zero here. */ 1: wrpr %g0, PSTATE_NORMAL, %pstate - wrpr %g0, 0, %cleanwin wrpr %g0, 0, %pil wr %g0, 0, %fprs @@ -68,7 +70,7 @@ __FBSDID("$FreeBSD$"); setx TD_V | TD_L, %l1, %l0 /* - * We read ASI_DTLB_DATA_ACCESS_REG twice in order to work + * We read ASI_ITLB_DATA_ACCESS_REG twice in order to work * around errata of USIII and beyond. */ ldxa [%g0] ASI_ITLB_DATA_ACCESS_REG, %g0 @@ -94,7 +96,7 @@ __FBSDID("$FreeBSD$"); mov (1 << TLB_DAR_SLOT_SHIFT), %l4 setx TD_V, %l1, %l0 /* - * We read ASI_DTLB_DATA_ACCESS_REG twice in order to work + * We read ASI_ITLB_DATA_ACCESS_REG twice in order to work * around errata of USIII and beyond. */ 2: ldxa [%l4] ASI_ITLB_DATA_ACCESS_REG, %g0 @@ -136,7 +138,7 @@ __FBSDID("$FreeBSD$"); mov (1 << TLB_DAR_SLOT_SHIFT), %l0 setx TD_V, %o1, %o0 /* - * We read ASI_DTLB_DATA_ACCESS_REG twice in order to work + * We read ASI_ITLB_DATA_ACCESS_REG twice in order to work * around errata of USIII and beyond. */ 5: ldxa [%l0] ASI_ITLB_DATA_ACCESS_REG, %g0 From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 20:29:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA1331065677; Tue, 30 Mar 2010 20:29:45 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D78588FC15; Tue, 30 Mar 2010 20:29: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 o2UKTjmt086748; Tue, 30 Mar 2010 20:29:45 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UKTjnu086741; Tue, 30 Mar 2010 20:29:45 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003302029.o2UKTjnu086741@svn.freebsd.org> From: Marius Strobl Date: Tue, 30 Mar 2010 20:29:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205926 - in stable/7/sys/sparc64: include sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2010 20:29:46 -0000 Author: marius Date: Tue Mar 30 20:29:45 2010 New Revision: 205926 URL: http://svn.freebsd.org/changeset/base/205926 Log: MFC: r203838 - Search the whole OFW device tree instead of only the children of the root nexus device for the CPUs as starting with UltraSPARC IV the 'cpu' nodes hang off of from 'cmp' (chip multi-threading processor) or 'core' or combinations thereof. Also in large UltraSPARC III based machines the 'cpu' nodes hang off of 'ssm' (scalable shared memory) nodes which group snooping-coherency domains together instead of directly from the nexus. It would be great if we could use newbus to deal with the different ways the 'cpu' devices can hang off of pseudo ones but unfortunately both cpu_mp_setmaxid() and sparc64_init() have to work prior to regular device probing. - Add support for UltraSPARC IV and IV+ CPUs. Due to the fact that these are multi-core each CPU has two Fireplane config registers and thus the module/target ID has to be determined differently so the one specific to a certain core is used. Similarly, starting with UltraSPARC IV the individual cores use a different property in the OFW device tree to indicate the CPU/core ID as it no longer is in coincidence with the shared slot/socket ID. This involves changing the MD KTR code to not directly read the UPA module ID either. We use the MID stored in the per-CPU data instead of calling cpu_get_mid() as a replacement in order prevent clobbering any registers as side-effect in the assembler version. This requires CATR() invocations from mp_startup() prior to mapping the per-CPU pages to be removed though. While at it additionally distinguish between CPUs with Fireplane and JBus interconnects as these also use slightly different sizes for the JBus/agent/module/target IDs. - Make sparc64_shutdown_final() static as it's not used outside of machdep.c. Modified: stable/7/sys/sparc64/include/ktr.h stable/7/sys/sparc64/include/md_var.h stable/7/sys/sparc64/include/upa.h stable/7/sys/sparc64/sparc64/machdep.c stable/7/sys/sparc64/sparc64/mp_locore.S stable/7/sys/sparc64/sparc64/mp_machdep.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/include/ktr.h ============================================================================== --- stable/7/sys/sparc64/include/ktr.h Tue Mar 30 20:12:46 2010 (r205925) +++ stable/7/sys/sparc64/include/ktr.h Tue Mar 30 20:29:45 2010 (r205926) @@ -34,11 +34,9 @@ #include -#include - #ifndef LOCORE -#define KTR_CPU UPA_CR_GET_MID(ldxa(0, ASI_UPA_CONFIG_REG)) +#define KTR_CPU PCPU_GET(mid) #else @@ -74,7 +72,7 @@ l2: add r2, 1, r3 ; \ add r1, r2, r1 ; \ rd %tick, r2 ; \ stx r2, [r1 + KTR_TIMESTAMP] ; \ - UPA_GET_MID(r2) ; \ + lduw [PCPU(MID)], r2 ; \ stw r2, [r1 + KTR_CPU] ; \ stw %g0, [r1 + KTR_LINE] ; \ stx %g0, [r1 + KTR_FILE] ; \ @@ -84,7 +82,7 @@ l2: add r2, 1, r3 ; \ #define CATR(mask, desc, r1, r2, r3, l1, l2, l3) \ set mask, r1 ; \ TEST(ktr_mask, r1, r2, r2, l3) ; \ - UPA_GET_MID(r1) ; \ + lduw [PCPU(MID)], r1 ; \ mov 1, r2 ; \ sllx r2, r1, r1 ; \ TEST(ktr_cpumask, r1, r2, r3, l3) ; \ Modified: stable/7/sys/sparc64/include/md_var.h ============================================================================== --- stable/7/sys/sparc64/include/md_var.h Tue Mar 30 20:12:46 2010 (r205925) +++ stable/7/sys/sparc64/include/md_var.h Tue Mar 30 20:29:45 2010 (r205926) @@ -47,6 +47,8 @@ extern vm_paddr_t kstack0_phys; struct pcpu; struct md_utrap; +char *cpu_cpuid_prop(void); +uint32_t cpu_get_mid(void); void cpu_identify(u_long vers, u_int clock, u_int id); void cpu_setregs(struct pcpu *pc); int is_physical_memory(vm_paddr_t addr); Modified: stable/7/sys/sparc64/include/upa.h ============================================================================== --- stable/7/sys/sparc64/include/upa.h Tue Mar 30 20:12:46 2010 (r205925) +++ stable/7/sys/sparc64/include/upa.h Tue Mar 30 20:29:45 2010 (r205926) @@ -26,25 +26,16 @@ */ #ifndef _MACHINE_UPA_H_ -#define _MACHINE_UPA_H_ +#define _MACHINE_UPA_H_ #define UPA_MEMSTART 0x1c000000000UL #define UPA_MEMEND 0x1ffffffffffUL #define UPA_CR_MID_SHIFT (17) #define UPA_CR_MID_SIZE (5) -#define UPA_CR_MID_MASK \ +#define UPA_CR_MID_MASK \ (((1 << UPA_CR_MID_SIZE) - 1) << UPA_CR_MID_SHIFT) #define UPA_CR_GET_MID(cr) ((cr & UPA_CR_MID_MASK) >> UPA_CR_MID_SHIFT) -#ifdef LOCORE - -#define UPA_GET_MID(r1) \ - ldxa [%g0] ASI_UPA_CONFIG_REG, r1 ; \ - srlx r1, UPA_CR_MID_SHIFT, r1 ; \ - and r1, (1 << UPA_CR_MID_SIZE) - 1, r1 - -#endif - #endif /* _MACHINE_UPA_H_ */ Modified: stable/7/sys/sparc64/sparc64/machdep.c ============================================================================== --- stable/7/sys/sparc64/sparc64/machdep.c Tue Mar 30 20:12:46 2010 (r205925) +++ stable/7/sys/sparc64/sparc64/machdep.c Tue Mar 30 20:29:45 2010 (r205926) @@ -89,10 +89,13 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include #include #include #include +#include #include #include #include @@ -142,11 +145,12 @@ static int cpu_use_vis = 1; cpu_block_copy_t *cpu_block_copy; cpu_block_zero_t *cpu_block_zero; +static phandle_t find_bsp(phandle_t node, uint32_t bspid); void sparc64_init(caddr_t mdp, u_long o1, u_long o2, u_long o3, ofw_vec_t *vec); -void sparc64_shutdown_final(void *dummy, int howto); +static void sparc64_shutdown_final(void *dummy, int howto); -static void cpu_startup(void *); +static void cpu_startup(void *arg); SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, cpu_startup, NULL); CTASSERT((1 << INT_SHIFT) == sizeof(int)); @@ -235,18 +239,94 @@ spinlock_exit(void) wrpr(pil, td->td_md.md_saved_pil, 0); } +static phandle_t +find_bsp(phandle_t node, uint32_t bspid) +{ + char type[sizeof("cpu")]; + phandle_t child; + uint32_t cpuid; + + for (; node != 0; node = OF_peer(node)) { + child = OF_child(node); + if (child > 0) { + child = find_bsp(child, bspid); + if (child > 0) + return (child); + } else { + if (OF_getprop(node, "device_type", type, + sizeof(type)) <= 0) + continue; + if (strcmp(type, "cpu") != 0) + continue; + if (OF_getprop(node, cpu_cpuid_prop(), &cpuid, + sizeof(cpuid)) <= 0) + continue; + if (cpuid == bspid) + return (node); + } + } + return (0); +} + +char * +cpu_cpuid_prop(void) +{ + + switch (cpu_impl) { + case CPU_IMPL_SPARC64: + case CPU_IMPL_ULTRASPARCI: + case CPU_IMPL_ULTRASPARCII: + case CPU_IMPL_ULTRASPARCIIi: + case CPU_IMPL_ULTRASPARCIIe: + return ("upa-portid"); + case CPU_IMPL_ULTRASPARCIII: + case CPU_IMPL_ULTRASPARCIIIp: + case CPU_IMPL_ULTRASPARCIIIi: + case CPU_IMPL_ULTRASPARCIIIip: + return ("portid"); + case CPU_IMPL_ULTRASPARCIV: + case CPU_IMPL_ULTRASPARCIVp: + return ("cpuid"); + default: + return (""); + } +} + +uint32_t +cpu_get_mid(void) +{ + + switch (cpu_impl) { + case CPU_IMPL_SPARC64: + case CPU_IMPL_ULTRASPARCI: + case CPU_IMPL_ULTRASPARCII: + case CPU_IMPL_ULTRASPARCIIi: + case CPU_IMPL_ULTRASPARCIIe: + return (UPA_CR_GET_MID(ldxa(0, ASI_UPA_CONFIG_REG))); + case CPU_IMPL_ULTRASPARCIII: + case CPU_IMPL_ULTRASPARCIIIp: + return (FIREPLANE_CR_GET_AID(ldxa(AA_FIREPLANE_CONFIG, + ASI_FIREPLANE_CONFIG_REG))); + case CPU_IMPL_ULTRASPARCIIIi: + case CPU_IMPL_ULTRASPARCIIIip: + return (JBUS_CR_GET_JID(ldxa(0, ASI_JBUS_CONFIG_REG))); + case CPU_IMPL_ULTRASPARCIV: + case CPU_IMPL_ULTRASPARCIVp: + return (INTR_ID_GET_ID(ldxa(AA_INTR_ID, ASI_INTR_ID))); + default: + return (0); + } +} + void sparc64_init(caddr_t mdp, u_long o1, u_long o2, u_long o3, ofw_vec_t *vec) { - char type[8]; char *env; struct pcpu *pc; vm_offset_t end; vm_offset_t va; caddr_t kmdp; - phandle_t child; phandle_t root; - uint32_t portid; end = 0; kmdp = NULL; @@ -311,7 +391,7 @@ sparc64_init(caddr_t mdp, u_long o1, u_l pc = (struct pcpu *)(pcpu0 + (PCPU_PAGES * PAGE_SIZE)) - 1; pcpu_init(pc, 0, sizeof(struct pcpu)); pc->pc_addr = (vm_offset_t)pcpu0; - pc->pc_mid = UPA_CR_GET_MID(ldxa(0, ASI_UPA_CONFIG_REG)); + pc->pc_mid = cpu_get_mid(); pc->pc_tlb_ctx = TLB_CTX_USER_MIN; pc->pc_tlb_ctx_min = TLB_CTX_USER_MIN; pc->pc_tlb_ctx_max = TLB_CTX_USER_MAX; @@ -320,24 +400,11 @@ sparc64_init(caddr_t mdp, u_long o1, u_l * Determine the OFW node and frequency of the BSP (and ensure the * BSP is in the device tree in the first place). */ - pc->pc_node = 0; root = OF_peer(0); - for (child = OF_child(root); child != 0; child = OF_peer(child)) { - if (OF_getprop(child, "device_type", type, sizeof(type)) <= 0) - continue; - if (strcmp(type, "cpu") != 0) - continue; - if (OF_getprop(child, cpu_impl < CPU_IMPL_ULTRASPARCIII ? - "upa-portid" : "portid", &portid, sizeof(portid)) <= 0) - continue; - if (portid == pc->pc_mid) { - pc->pc_node = child; - break; - } - } + pc->pc_node = find_bsp(root, pc->pc_mid); if (pc->pc_node == 0) OF_exit(); - if (OF_getprop(child, "clock-frequency", &pc->pc_clock, + if (OF_getprop(pc->pc_node, "clock-frequency", &pc->pc_clock, sizeof(pc->pc_clock)) <= 0) OF_exit(); @@ -830,7 +897,7 @@ cpu_halt(void) cpu_shutdown(&args); } -void +static void sparc64_shutdown_final(void *dummy, int howto) { static struct { Modified: stable/7/sys/sparc64/sparc64/mp_locore.S ============================================================================== --- stable/7/sys/sparc64/sparc64/mp_locore.S Tue Mar 30 20:12:46 2010 (r205925) +++ stable/7/sys/sparc64/sparc64/mp_locore.S Tue Mar 30 20:29:45 2010 (r205926) @@ -33,7 +33,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include "assym.s" @@ -212,14 +211,8 @@ ENTRY(mp_startup) nop wr %l1, 0, %asr24 -3: UPA_GET_MID(%o0) - -#if KTR_COMPILE & KTR_SMP - CATR(KTR_SMP, "mp_start: CPU %d entered kernel" - , %g1, %g2, %g3, 7, 8, 9) - stx %o0, [%g1 + KTR_PARM1] -9: -#endif +3: call cpu_get_mid + nop /* * Inform the boot processor we have inited. @@ -236,13 +229,6 @@ ENTRY(mp_startup) bne %xcc, 4b nop -#if KTR_COMPILE & KTR_SMP - CATR(KTR_SMP, "_mp_start: CPU %d got start signal" - , %g1, %g2, %g3, 7, 8, 9) - stx %o0, [%g1 + KTR_PARM1] -9: -#endif - add %l0, CSA_TTES, %l1 clr %l2 @@ -283,7 +269,7 @@ ENTRY(mp_startup) #if KTR_COMPILE & KTR_SMP CATR(KTR_SMP, - "_mp_start: bootstrap cpuid=%d mid=%d pcpu=%#lx data=%#lx sp=%#lx" + "mp_startup: bootstrap cpuid=%d mid=%d pcpu=%#lx data=%#lx sp=%#lx" , %g1, %g2, %g3, 7, 8, 9) lduw [%l1 + PC_CPUID], %g2 stx %g2, [%g1 + KTR_PARM1] Modified: stable/7/sys/sparc64/sparc64/mp_machdep.c ============================================================================== --- stable/7/sys/sparc64/sparc64/mp_machdep.c Tue Mar 30 20:12:46 2010 (r205925) +++ stable/7/sys/sparc64/sparc64/mp_machdep.c Tue Mar 30 20:29:45 2010 (r205926) @@ -119,7 +119,11 @@ static u_int cpuid_to_mid[MAXCPU]; static int isjbus; static volatile u_int shutdown_cpus; +static void ap_count(phandle_t node, u_int mid); +static void ap_start(phandle_t node, u_int mid); static void cpu_mp_unleash(void *v); +static void foreach_ap(phandle_t node, void (*func)(phandle_t node, + u_int mid)); static void spitfire_ipi_send(u_int mid, u_long d0, u_long d1, u_long d2); static void sun4u_startcpu(phandle_t cpu, void *func, u_long arg); @@ -166,25 +170,56 @@ mp_init(void) cpu_ipi_selected = spitfire_ipi_selected; } +static void +foreach_ap(phandle_t node, void (*func)(phandle_t node, u_int mid)) +{ + char type[sizeof("cpu")]; + phandle_t child; + u_int cpuid; + + /* There's no need to traverse the whole OFW tree twice. */ + if (mp_maxid > 0 && mp_ncpus >= mp_maxid + 1) + return; + + for (; node != 0; node = OF_peer(node)) { + child = OF_child(node); + if (child > 0) + foreach_ap(child, func); + else { + if (OF_getprop(node, "device_type", type, + sizeof(type)) <= 0) + continue; + if (strcmp(type, "cpu") != 0) + continue; + if (OF_getprop(node, cpu_cpuid_prop(), &cpuid, + sizeof(cpuid)) <= 0) + panic("%s: can't get module ID", __func__); + if (cpuid == PCPU_GET(mid)) + continue; + (*func)(node, cpuid); + } + } +} + /* * Probe for other CPUs. */ void -cpu_mp_setmaxid(void) +cpu_mp_setmaxid() { - char buf[128]; - phandle_t child; - u_int cpus; all_cpus = 1 << curcpu; mp_ncpus = 1; + mp_maxid = 0; + + foreach_ap(OF_child(OF_peer(0)), ap_count); +} + +static void +ap_count(phandle_t node __unused, u_int mid __unused) +{ - cpus = 0; - for (child = OF_child(OF_peer(0)); child != 0; child = OF_peer(child)) - if (OF_getprop(child, "device_type", buf, sizeof(buf)) > 0 && - strcmp(buf, "cpu") == 0) - cpus++; - mp_maxid = cpus - 1; + mp_maxid++; } int @@ -221,15 +256,6 @@ sun4u_startcpu(phandle_t cpu, void *func void cpu_mp_start(void) { - char buf[128]; - volatile struct cpu_start_args *csa; - struct pcpu *pc; - register_t s; - vm_offset_t va; - phandle_t child; - u_int mid; - u_int clock; - u_int cpuid; mtx_init(&ipi_mtx, "ipi", NULL, MTX_SPIN); @@ -241,63 +267,67 @@ cpu_mp_start(void) cpuid_to_mid[curcpu] = PCPU_GET(mid); - csa = &cpu_start_args; - for (child = OF_child(OF_peer(0)); child != 0 && mp_ncpus <= MAXCPU; - child = OF_peer(child)) { - if (OF_getprop(child, "device_type", buf, sizeof(buf)) <= 0 || - strcmp(buf, "cpu") != 0) - continue; - if (OF_getprop(child, cpu_impl < CPU_IMPL_ULTRASPARCIII ? - "upa-portid" : "portid", &mid, sizeof(mid)) <= 0) - panic("%s: can't get module ID", __func__); - if (mid == PCPU_GET(mid)) - continue; - if (OF_getprop(child, "clock-frequency", &clock, - sizeof(clock)) <= 0) - panic("%s: can't get clock", __func__); - if (clock != PCPU_GET(clock)) - hardclock_use_stick = 1; + foreach_ap(OF_child(OF_peer(0)), ap_start); + KASSERT(!isjbus || mp_ncpus <= IDR_JALAPENO_MAX_BN_PAIRS, + ("%s: can only IPI a maximum of %d JBus-CPUs", + __func__, IDR_JALAPENO_MAX_BN_PAIRS)); + PCPU_SET(other_cpus, all_cpus & ~(1 << curcpu)); + smp_active = 1; +} - csa->csa_state = 0; - sun4u_startcpu(child, (void *)mp_tramp, 0); - s = intr_disable(); - while (csa->csa_state != CPU_TICKSYNC) +static void +ap_start(phandle_t node, u_int mid) +{ + volatile struct cpu_start_args *csa; + struct pcpu *pc; + register_t s; + vm_offset_t va; + u_int clock; + u_int cpuid; + + if (mp_ncpus > MAXCPU) + return; + + if (OF_getprop(node, "clock-frequency", &clock, sizeof(clock)) <= 0) + panic("%s: can't get clock", __func__); + if (clock != PCPU_GET(clock)) + hardclock_use_stick = 1; + + csa = &cpu_start_args; + csa->csa_state = 0; + sun4u_startcpu(node, (void *)mp_tramp, 0); + s = intr_disable(); + while (csa->csa_state != CPU_TICKSYNC) + ; + membar(StoreLoad); + csa->csa_tick = rd(tick); + if (cpu_impl >= CPU_IMPL_ULTRASPARCIII) { + while (csa->csa_state != CPU_STICKSYNC) ; membar(StoreLoad); - csa->csa_tick = rd(tick); - if (cpu_impl >= CPU_IMPL_ULTRASPARCIII) { - while (csa->csa_state != CPU_STICKSYNC) - ; - membar(StoreLoad); - csa->csa_stick = rdstick(); - } - while (csa->csa_state != CPU_INIT) - ; - csa->csa_tick = csa->csa_stick = 0; - intr_restore(s); + csa->csa_stick = rdstick(); + } + while (csa->csa_state != CPU_INIT) + ; + csa->csa_tick = csa->csa_stick = 0; + intr_restore(s); - cpuid = mp_ncpus++; - cpuid_to_mid[cpuid] = mid; - cpu_identify(csa->csa_ver, clock, cpuid); - - va = kmem_alloc(kernel_map, PCPU_PAGES * PAGE_SIZE); - pc = (struct pcpu *)(va + (PCPU_PAGES * PAGE_SIZE)) - 1; - pcpu_init(pc, cpuid, sizeof(*pc)); - pc->pc_addr = va; - pc->pc_clock = clock; - pc->pc_mid = mid; - pc->pc_node = child; + cpuid = mp_ncpus++; + cpuid_to_mid[cpuid] = mid; + cpu_identify(csa->csa_ver, clock, cpuid); + + va = kmem_alloc(kernel_map, PCPU_PAGES * PAGE_SIZE); + pc = (struct pcpu *)(va + (PCPU_PAGES * PAGE_SIZE)) - 1; + pcpu_init(pc, cpuid, sizeof(*pc)); + pc->pc_addr = va; + pc->pc_clock = clock; + pc->pc_mid = mid; + pc->pc_node = node; - cache_init(pc); + cache_init(pc); - all_cpus |= 1 << cpuid; - intr_add_cpu(cpuid); - } - KASSERT(!isjbus || mp_ncpus <= IDR_JALAPENO_MAX_BN_PAIRS, - ("%s: can only IPI a maximum of %d JBus-CPUs", - __func__, IDR_JALAPENO_MAX_BN_PAIRS)); - PCPU_SET(other_cpus, all_cpus & ~(1 << curcpu)); - smp_active = 1; + all_cpus |= 1 << cpuid; + intr_add_cpu(cpuid); } void From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 20:29:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5025D106564A; Tue, 30 Mar 2010 20:29:46 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3DD298FC16; Tue, 30 Mar 2010 20: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 o2UKTkjj086774; Tue, 30 Mar 2010 20:29:46 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UKTkOh086767; Tue, 30 Mar 2010 20:29:46 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003302029.o2UKTkOh086767@svn.freebsd.org> From: Marius Strobl Date: Tue, 30 Mar 2010 20:29: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: r205927 - in stable/8/sys/sparc64: include sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2010 20:29:46 -0000 Author: marius Date: Tue Mar 30 20:29:45 2010 New Revision: 205927 URL: http://svn.freebsd.org/changeset/base/205927 Log: MFC: r203838 - Search the whole OFW device tree instead of only the children of the root nexus device for the CPUs as starting with UltraSPARC IV the 'cpu' nodes hang off of from 'cmp' (chip multi-threading processor) or 'core' or combinations thereof. Also in large UltraSPARC III based machines the 'cpu' nodes hang off of 'ssm' (scalable shared memory) nodes which group snooping-coherency domains together instead of directly from the nexus. It would be great if we could use newbus to deal with the different ways the 'cpu' devices can hang off of pseudo ones but unfortunately both cpu_mp_setmaxid() and sparc64_init() have to work prior to regular device probing. - Add support for UltraSPARC IV and IV+ CPUs. Due to the fact that these are multi-core each CPU has two Fireplane config registers and thus the module/target ID has to be determined differently so the one specific to a certain core is used. Similarly, starting with UltraSPARC IV the individual cores use a different property in the OFW device tree to indicate the CPU/core ID as it no longer is in coincidence with the shared slot/socket ID. This involves changing the MD KTR code to not directly read the UPA module ID either. We use the MID stored in the per-CPU data instead of calling cpu_get_mid() as a replacement in order prevent clobbering any registers as side-effect in the assembler version. This requires CATR() invocations from mp_startup() prior to mapping the per-CPU pages to be removed though. While at it additionally distinguish between CPUs with Fireplane and JBus interconnects as these also use slightly different sizes for the JBus/agent/module/target IDs. - Make sparc64_shutdown_final() static as it's not used outside of machdep.c. Modified: stable/8/sys/sparc64/include/ktr.h stable/8/sys/sparc64/include/md_var.h stable/8/sys/sparc64/include/upa.h stable/8/sys/sparc64/sparc64/machdep.c stable/8/sys/sparc64/sparc64/mp_locore.S stable/8/sys/sparc64/sparc64/mp_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/sparc64/include/ktr.h ============================================================================== --- stable/8/sys/sparc64/include/ktr.h Tue Mar 30 20:29:45 2010 (r205926) +++ stable/8/sys/sparc64/include/ktr.h Tue Mar 30 20:29:45 2010 (r205927) @@ -34,11 +34,9 @@ #include -#include - #ifndef LOCORE -#define KTR_CPU UPA_CR_GET_MID(ldxa(0, ASI_UPA_CONFIG_REG)) +#define KTR_CPU PCPU_GET(mid) #else @@ -74,7 +72,7 @@ l2: add r2, 1, r3 ; \ add r1, r2, r1 ; \ rd %tick, r2 ; \ stx r2, [r1 + KTR_TIMESTAMP] ; \ - UPA_GET_MID(r2) ; \ + lduw [PCPU(MID)], r2 ; \ stw r2, [r1 + KTR_CPU] ; \ stw %g0, [r1 + KTR_LINE] ; \ stx %g0, [r1 + KTR_FILE] ; \ @@ -84,7 +82,7 @@ l2: add r2, 1, r3 ; \ #define CATR(mask, desc, r1, r2, r3, l1, l2, l3) \ set mask, r1 ; \ TEST(ktr_mask, r1, r2, r2, l3) ; \ - UPA_GET_MID(r1) ; \ + lduw [PCPU(MID)], r1 ; \ mov 1, r2 ; \ sllx r2, r1, r1 ; \ TEST(ktr_cpumask, r1, r2, r3, l3) ; \ Modified: stable/8/sys/sparc64/include/md_var.h ============================================================================== --- stable/8/sys/sparc64/include/md_var.h Tue Mar 30 20:29:45 2010 (r205926) +++ stable/8/sys/sparc64/include/md_var.h Tue Mar 30 20:29:45 2010 (r205927) @@ -47,6 +47,8 @@ extern vm_paddr_t kstack0_phys; struct pcpu; struct md_utrap; +const char *cpu_cpuid_prop(void); +uint32_t cpu_get_mid(void); void cpu_identify(u_long vers, u_int clock, u_int id); void cpu_setregs(struct pcpu *pc); int is_physical_memory(vm_paddr_t addr); Modified: stable/8/sys/sparc64/include/upa.h ============================================================================== --- stable/8/sys/sparc64/include/upa.h Tue Mar 30 20:29:45 2010 (r205926) +++ stable/8/sys/sparc64/include/upa.h Tue Mar 30 20:29:45 2010 (r205927) @@ -26,25 +26,16 @@ */ #ifndef _MACHINE_UPA_H_ -#define _MACHINE_UPA_H_ +#define _MACHINE_UPA_H_ #define UPA_MEMSTART 0x1c000000000UL #define UPA_MEMEND 0x1ffffffffffUL #define UPA_CR_MID_SHIFT (17) #define UPA_CR_MID_SIZE (5) -#define UPA_CR_MID_MASK \ +#define UPA_CR_MID_MASK \ (((1 << UPA_CR_MID_SIZE) - 1) << UPA_CR_MID_SHIFT) #define UPA_CR_GET_MID(cr) ((cr & UPA_CR_MID_MASK) >> UPA_CR_MID_SHIFT) -#ifdef LOCORE - -#define UPA_GET_MID(r1) \ - ldxa [%g0] ASI_UPA_CONFIG_REG, r1 ; \ - srlx r1, UPA_CR_MID_SHIFT, r1 ; \ - and r1, (1 << UPA_CR_MID_SIZE) - 1, r1 - -#endif - #endif /* _MACHINE_UPA_H_ */ Modified: stable/8/sys/sparc64/sparc64/machdep.c ============================================================================== --- stable/8/sys/sparc64/sparc64/machdep.c Tue Mar 30 20:29:45 2010 (r205926) +++ stable/8/sys/sparc64/sparc64/machdep.c Tue Mar 30 20:29:45 2010 (r205927) @@ -89,10 +89,13 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include #include #include #include +#include #include #include #include @@ -143,11 +146,12 @@ static int cpu_use_vis = 1; cpu_block_copy_t *cpu_block_copy; cpu_block_zero_t *cpu_block_zero; +static phandle_t find_bsp(phandle_t node, uint32_t bspid); void sparc64_init(caddr_t mdp, u_long o1, u_long o2, u_long o3, ofw_vec_t *vec); -void sparc64_shutdown_final(void *dummy, int howto); +static void sparc64_shutdown_final(void *dummy, int howto); -static void cpu_startup(void *); +static void cpu_startup(void *arg); SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, cpu_startup, NULL); CTASSERT((1 << INT_SHIFT) == sizeof(int)); @@ -236,18 +240,94 @@ spinlock_exit(void) wrpr(pil, td->td_md.md_saved_pil, 0); } +static phandle_t +find_bsp(phandle_t node, uint32_t bspid) +{ + char type[sizeof("cpu")]; + phandle_t child; + uint32_t cpuid; + + for (; node != 0; node = OF_peer(node)) { + child = OF_child(node); + if (child > 0) { + child = find_bsp(child, bspid); + if (child > 0) + return (child); + } else { + if (OF_getprop(node, "device_type", type, + sizeof(type)) <= 0) + continue; + if (strcmp(type, "cpu") != 0) + continue; + if (OF_getprop(node, cpu_cpuid_prop(), &cpuid, + sizeof(cpuid)) <= 0) + continue; + if (cpuid == bspid) + return (node); + } + } + return (0); +} + +const char * +cpu_cpuid_prop(void) +{ + + switch (cpu_impl) { + case CPU_IMPL_SPARC64: + case CPU_IMPL_ULTRASPARCI: + case CPU_IMPL_ULTRASPARCII: + case CPU_IMPL_ULTRASPARCIIi: + case CPU_IMPL_ULTRASPARCIIe: + return ("upa-portid"); + case CPU_IMPL_ULTRASPARCIII: + case CPU_IMPL_ULTRASPARCIIIp: + case CPU_IMPL_ULTRASPARCIIIi: + case CPU_IMPL_ULTRASPARCIIIip: + return ("portid"); + case CPU_IMPL_ULTRASPARCIV: + case CPU_IMPL_ULTRASPARCIVp: + return ("cpuid"); + default: + return (""); + } +} + +uint32_t +cpu_get_mid(void) +{ + + switch (cpu_impl) { + case CPU_IMPL_SPARC64: + case CPU_IMPL_ULTRASPARCI: + case CPU_IMPL_ULTRASPARCII: + case CPU_IMPL_ULTRASPARCIIi: + case CPU_IMPL_ULTRASPARCIIe: + return (UPA_CR_GET_MID(ldxa(0, ASI_UPA_CONFIG_REG))); + case CPU_IMPL_ULTRASPARCIII: + case CPU_IMPL_ULTRASPARCIIIp: + return (FIREPLANE_CR_GET_AID(ldxa(AA_FIREPLANE_CONFIG, + ASI_FIREPLANE_CONFIG_REG))); + case CPU_IMPL_ULTRASPARCIIIi: + case CPU_IMPL_ULTRASPARCIIIip: + return (JBUS_CR_GET_JID(ldxa(0, ASI_JBUS_CONFIG_REG))); + case CPU_IMPL_ULTRASPARCIV: + case CPU_IMPL_ULTRASPARCIVp: + return (INTR_ID_GET_ID(ldxa(AA_INTR_ID, ASI_INTR_ID))); + default: + return (0); + } +} + void sparc64_init(caddr_t mdp, u_long o1, u_long o2, u_long o3, ofw_vec_t *vec) { - char type[8]; char *env; struct pcpu *pc; vm_offset_t end; vm_offset_t va; caddr_t kmdp; - phandle_t child; phandle_t root; - uint32_t portid; end = 0; kmdp = NULL; @@ -319,7 +399,7 @@ sparc64_init(caddr_t mdp, u_long o1, u_l pc = (struct pcpu *)(pcpu0 + (PCPU_PAGES * PAGE_SIZE)) - 1; pcpu_init(pc, 0, sizeof(struct pcpu)); pc->pc_addr = (vm_offset_t)pcpu0; - pc->pc_mid = UPA_CR_GET_MID(ldxa(0, ASI_UPA_CONFIG_REG)); + pc->pc_mid = cpu_get_mid(); pc->pc_tlb_ctx = TLB_CTX_USER_MIN; pc->pc_tlb_ctx_min = TLB_CTX_USER_MIN; pc->pc_tlb_ctx_max = TLB_CTX_USER_MAX; @@ -328,24 +408,11 @@ sparc64_init(caddr_t mdp, u_long o1, u_l * Determine the OFW node and frequency of the BSP (and ensure the * BSP is in the device tree in the first place). */ - pc->pc_node = 0; root = OF_peer(0); - for (child = OF_child(root); child != 0; child = OF_peer(child)) { - if (OF_getprop(child, "device_type", type, sizeof(type)) <= 0) - continue; - if (strcmp(type, "cpu") != 0) - continue; - if (OF_getprop(child, cpu_impl < CPU_IMPL_ULTRASPARCIII ? - "upa-portid" : "portid", &portid, sizeof(portid)) <= 0) - continue; - if (portid == pc->pc_mid) { - pc->pc_node = child; - break; - } - } + pc->pc_node = find_bsp(root, pc->pc_mid); if (pc->pc_node == 0) OF_exit(); - if (OF_getprop(child, "clock-frequency", &pc->pc_clock, + if (OF_getprop(pc->pc_node, "clock-frequency", &pc->pc_clock, sizeof(pc->pc_clock)) <= 0) OF_exit(); @@ -838,7 +905,7 @@ cpu_halt(void) cpu_shutdown(&args); } -void +static void sparc64_shutdown_final(void *dummy, int howto) { static struct { Modified: stable/8/sys/sparc64/sparc64/mp_locore.S ============================================================================== --- stable/8/sys/sparc64/sparc64/mp_locore.S Tue Mar 30 20:29:45 2010 (r205926) +++ stable/8/sys/sparc64/sparc64/mp_locore.S Tue Mar 30 20:29:45 2010 (r205927) @@ -33,7 +33,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include "assym.s" @@ -212,14 +211,8 @@ ENTRY(mp_startup) nop wr %l1, 0, %asr24 -3: UPA_GET_MID(%o0) - -#if KTR_COMPILE & KTR_SMP - CATR(KTR_SMP, "mp_start: CPU %d entered kernel" - , %g1, %g2, %g3, 7, 8, 9) - stx %o0, [%g1 + KTR_PARM1] -9: -#endif +3: call cpu_get_mid + nop /* * Inform the boot processor we have inited. @@ -236,13 +229,6 @@ ENTRY(mp_startup) bne %xcc, 4b nop -#if KTR_COMPILE & KTR_SMP - CATR(KTR_SMP, "_mp_start: CPU %d got start signal" - , %g1, %g2, %g3, 7, 8, 9) - stx %o0, [%g1 + KTR_PARM1] -9: -#endif - add %l0, CSA_TTES, %l1 clr %l2 @@ -283,7 +269,7 @@ ENTRY(mp_startup) #if KTR_COMPILE & KTR_SMP CATR(KTR_SMP, - "_mp_start: bootstrap cpuid=%d mid=%d pcpu=%#lx data=%#lx sp=%#lx" + "mp_startup: bootstrap cpuid=%d mid=%d pcpu=%#lx data=%#lx sp=%#lx" , %g1, %g2, %g3, 7, 8, 9) lduw [%l1 + PC_CPUID], %g2 stx %g2, [%g1 + KTR_PARM1] Modified: stable/8/sys/sparc64/sparc64/mp_machdep.c ============================================================================== --- stable/8/sys/sparc64/sparc64/mp_machdep.c Tue Mar 30 20:29:45 2010 (r205926) +++ stable/8/sys/sparc64/sparc64/mp_machdep.c Tue Mar 30 20:29:45 2010 (r205927) @@ -119,7 +119,11 @@ static u_int cpuid_to_mid[MAXCPU]; static int isjbus; static volatile u_int shutdown_cpus; +static void ap_count(phandle_t node, u_int mid); +static void ap_start(phandle_t node, u_int mid); static void cpu_mp_unleash(void *v); +static void foreach_ap(phandle_t node, void (*func)(phandle_t node, + u_int mid)); static void spitfire_ipi_send(u_int mid, u_long d0, u_long d1, u_long d2); static void sun4u_startcpu(phandle_t cpu, void *func, u_long arg); @@ -166,25 +170,56 @@ mp_init(void) cpu_ipi_selected = spitfire_ipi_selected; } +static void +foreach_ap(phandle_t node, void (*func)(phandle_t node, u_int mid)) +{ + char type[sizeof("cpu")]; + phandle_t child; + u_int cpuid; + + /* There's no need to traverse the whole OFW tree twice. */ + if (mp_maxid > 0 && mp_ncpus >= mp_maxid + 1) + return; + + for (; node != 0; node = OF_peer(node)) { + child = OF_child(node); + if (child > 0) + foreach_ap(child, func); + else { + if (OF_getprop(node, "device_type", type, + sizeof(type)) <= 0) + continue; + if (strcmp(type, "cpu") != 0) + continue; + if (OF_getprop(node, cpu_cpuid_prop(), &cpuid, + sizeof(cpuid)) <= 0) + panic("%s: can't get module ID", __func__); + if (cpuid == PCPU_GET(mid)) + continue; + (*func)(node, cpuid); + } + } +} + /* * Probe for other CPUs. */ void -cpu_mp_setmaxid(void) +cpu_mp_setmaxid() { - char buf[128]; - phandle_t child; - u_int cpus; all_cpus = 1 << curcpu; mp_ncpus = 1; + mp_maxid = 0; + + foreach_ap(OF_child(OF_peer(0)), ap_count); +} + +static void +ap_count(phandle_t node __unused, u_int mid __unused) +{ - cpus = 0; - for (child = OF_child(OF_peer(0)); child != 0; child = OF_peer(child)) - if (OF_getprop(child, "device_type", buf, sizeof(buf)) > 0 && - strcmp(buf, "cpu") == 0) - cpus++; - mp_maxid = cpus - 1; + mp_maxid++; } int @@ -228,15 +263,6 @@ sun4u_startcpu(phandle_t cpu, void *func void cpu_mp_start(void) { - char buf[128]; - volatile struct cpu_start_args *csa; - struct pcpu *pc; - register_t s; - vm_offset_t va; - phandle_t child; - u_int mid; - u_int clock; - u_int cpuid; mtx_init(&ipi_mtx, "ipi", NULL, MTX_SPIN); @@ -248,65 +274,68 @@ cpu_mp_start(void) cpuid_to_mid[curcpu] = PCPU_GET(mid); - csa = &cpu_start_args; - for (child = OF_child(OF_peer(0)); child != 0 && mp_ncpus <= MAXCPU; - child = OF_peer(child)) { - if (OF_getprop(child, "device_type", buf, sizeof(buf)) <= 0 || - strcmp(buf, "cpu") != 0) - continue; - if (OF_getprop(child, cpu_impl < CPU_IMPL_ULTRASPARCIII ? - "upa-portid" : "portid", &mid, sizeof(mid)) <= 0) - panic("%s: can't get module ID", __func__); - if (mid == PCPU_GET(mid)) - continue; - if (OF_getprop(child, "clock-frequency", &clock, - sizeof(clock)) <= 0) - panic("%s: can't get clock", __func__); - if (clock != PCPU_GET(clock)) - hardclock_use_stick = 1; + foreach_ap(OF_child(OF_peer(0)), ap_start); + KASSERT(!isjbus || mp_ncpus <= IDR_JALAPENO_MAX_BN_PAIRS, + ("%s: can only IPI a maximum of %d JBus-CPUs", + __func__, IDR_JALAPENO_MAX_BN_PAIRS)); + PCPU_SET(other_cpus, all_cpus & ~(1 << curcpu)); + smp_active = 1; +} - csa->csa_state = 0; - sun4u_startcpu(child, (void *)mp_tramp, 0); - s = intr_disable(); - while (csa->csa_state != CPU_TICKSYNC) +static void +ap_start(phandle_t node, u_int mid) +{ + volatile struct cpu_start_args *csa; + struct pcpu *pc; + register_t s; + vm_offset_t va; + u_int clock; + u_int cpuid; + + if (mp_ncpus > MAXCPU) + return; + + if (OF_getprop(node, "clock-frequency", &clock, sizeof(clock)) <= 0) + panic("%s: can't get clock", __func__); + if (clock != PCPU_GET(clock)) + hardclock_use_stick = 1; + + csa = &cpu_start_args; + csa->csa_state = 0; + sun4u_startcpu(node, (void *)mp_tramp, 0); + s = intr_disable(); + while (csa->csa_state != CPU_TICKSYNC) + ; + membar(StoreLoad); + csa->csa_tick = rd(tick); + if (cpu_impl >= CPU_IMPL_ULTRASPARCIII) { + while (csa->csa_state != CPU_STICKSYNC) ; membar(StoreLoad); - csa->csa_tick = rd(tick); - if (cpu_impl >= CPU_IMPL_ULTRASPARCIII) { - while (csa->csa_state != CPU_STICKSYNC) - ; - membar(StoreLoad); - csa->csa_stick = rdstick(); - } - while (csa->csa_state != CPU_INIT) - ; - csa->csa_tick = csa->csa_stick = 0; - intr_restore(s); + csa->csa_stick = rdstick(); + } + while (csa->csa_state != CPU_INIT) + ; + csa->csa_tick = csa->csa_stick = 0; + intr_restore(s); - cpuid = mp_ncpus++; - cpuid_to_mid[cpuid] = mid; - cpu_identify(csa->csa_ver, clock, cpuid); - - va = kmem_alloc(kernel_map, PCPU_PAGES * PAGE_SIZE); - pc = (struct pcpu *)(va + (PCPU_PAGES * PAGE_SIZE)) - 1; - pcpu_init(pc, cpuid, sizeof(*pc)); - dpcpu_init((void *)kmem_alloc(kernel_map, DPCPU_SIZE), - cpuid); - pc->pc_addr = va; - pc->pc_clock = clock; - pc->pc_mid = mid; - pc->pc_node = child; + cpuid = mp_ncpus++; + cpuid_to_mid[cpuid] = mid; + cpu_identify(csa->csa_ver, clock, cpuid); + + va = kmem_alloc(kernel_map, PCPU_PAGES * PAGE_SIZE); + pc = (struct pcpu *)(va + (PCPU_PAGES * PAGE_SIZE)) - 1; + pcpu_init(pc, cpuid, sizeof(*pc)); + dpcpu_init((void *)kmem_alloc(kernel_map, DPCPU_SIZE), cpuid); + pc->pc_addr = va; + pc->pc_clock = clock; + pc->pc_mid = mid; + pc->pc_node = node; - cache_init(pc); + cache_init(pc); - all_cpus |= 1 << cpuid; - intr_add_cpu(cpuid); - } - KASSERT(!isjbus || mp_ncpus <= IDR_JALAPENO_MAX_BN_PAIRS, - ("%s: can only IPI a maximum of %d JBus-CPUs", - __func__, IDR_JALAPENO_MAX_BN_PAIRS)); - PCPU_SET(other_cpus, all_cpus & ~(1 << curcpu)); - smp_active = 1; + all_cpus |= 1 << cpuid; + intr_add_cpu(cpuid); } void From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 20:38:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BEC4E106566B; Tue, 30 Mar 2010 20:38:18 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AD1008FC17; Tue, 30 Mar 2010 20:38: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 o2UKcIH3088724; Tue, 30 Mar 2010 20:38:18 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UKcIUU088722; Tue, 30 Mar 2010 20:38:18 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003302038.o2UKcIUU088722@svn.freebsd.org> From: Marius Strobl Date: Tue, 30 Mar 2010 20:38:18 +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: r205928 - stable/8/sys/sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2010 20:38:18 -0000 Author: marius Date: Tue Mar 30 20:38:18 2010 New Revision: 205928 URL: http://svn.freebsd.org/changeset/base/205928 Log: MFC: r203839 Style fixes Modified: stable/8/sys/sparc64/sparc64/pmap.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/sparc64/sparc64/pmap.c ============================================================================== --- stable/8/sys/sparc64/sparc64/pmap.c Tue Mar 30 20:29:45 2010 (r205927) +++ stable/8/sys/sparc64/sparc64/pmap.c Tue Mar 30 20:38:18 2010 (r205928) @@ -241,6 +241,7 @@ PMAP_STATS_VAR(pmap_nnew_thread_oc); */ static int mr_cmp(const void *a, const void *b); static int om_cmp(const void *a, const void *b); + static int mr_cmp(const void *a, const void *b) { @@ -256,6 +257,7 @@ mr_cmp(const void *a, const void *b) else return (0); } + static int om_cmp(const void *a, const void *b) { @@ -1111,10 +1113,9 @@ pmap_release(pmap_t pm) * to a kernel thread, leaving the pmap pointer unchanged. */ mtx_lock_spin(&sched_lock); - SLIST_FOREACH(pc, &cpuhead, pc_allcpu) { + SLIST_FOREACH(pc, &cpuhead, pc_allcpu) if (pc->pc_pmap == pm) pc->pc_pmap = NULL; - } mtx_unlock_spin(&sched_lock); obj = pm->pm_tsb_obj; @@ -1150,7 +1151,7 @@ pmap_growkernel(vm_offset_t addr) int pmap_remove_tte(struct pmap *pm, struct pmap *pm2, struct tte *tp, - vm_offset_t va) + vm_offset_t va) { vm_page_t m; u_long data; @@ -1198,12 +1199,10 @@ pmap_remove(pmap_t pm, vm_offset_t start tsb_foreach(pm, NULL, start, end, pmap_remove_tte); tlb_context_demap(pm); } else { - for (va = start; va < end; va += PAGE_SIZE) { - if ((tp = tsb_tte_lookup(pm, va)) != NULL) { - if (!pmap_remove_tte(pm, NULL, tp, va)) - break; - } - } + for (va = start; va < end; va += PAGE_SIZE) + if ((tp = tsb_tte_lookup(pm, va)) != NULL && + !pmap_remove_tte(pm, NULL, tp, va)) + break; tlb_range_demap(pm, start, end - 1); } PMAP_UNLOCK(pm); @@ -1245,7 +1244,7 @@ pmap_remove_all(vm_page_t m) int pmap_protect_tte(struct pmap *pm, struct pmap *pm2, struct tte *tp, - vm_offset_t va) + vm_offset_t va) { u_long data; vm_page_t m; @@ -1287,10 +1286,9 @@ pmap_protect(pmap_t pm, vm_offset_t sva, tsb_foreach(pm, NULL, sva, eva, pmap_protect_tte); tlb_context_demap(pm); } else { - for (va = sva; va < eva; va += PAGE_SIZE) { + for (va = sva; va < eva; va += PAGE_SIZE) if ((tp = tsb_tte_lookup(pm, va)) != NULL) pmap_protect_tte(pm, NULL, tp, va); - } tlb_range_demap(pm, sva, eva - 1); } PMAP_UNLOCK(pm); @@ -1386,21 +1384,18 @@ pmap_enter_locked(pmap_t pm, vm_offset_t */ if ((prot & VM_PROT_WRITE) != 0) { tp->tte_data |= TD_SW; - if (wired) { + if (wired) tp->tte_data |= TD_W; - } vm_page_flag_set(m, PG_WRITEABLE); - } else if ((data & TD_W) != 0) { + } else if ((data & TD_W) != 0) vm_page_dirty(m); - } /* * If we're turning on execute permissions, flush the icache. */ if ((prot & VM_PROT_EXECUTE) != 0) { - if ((data & TD_EXEC) == 0) { + if ((data & TD_EXEC) == 0) icache_page_inval(pa); - } tp->tte_data |= TD_EXEC; } @@ -1495,7 +1490,7 @@ pmap_enter_quick(pmap_t pm, vm_offset_t void pmap_object_init_pt(pmap_t pm, vm_offset_t addr, vm_object_t object, - vm_pindex_t pindex, vm_size_t size) + vm_pindex_t pindex, vm_size_t size) { VM_OBJECT_LOCK_ASSERT(object, MA_OWNED); @@ -1529,7 +1524,8 @@ pmap_change_wiring(pmap_t pm, vm_offset_ } static int -pmap_copy_tte(pmap_t src_pmap, pmap_t dst_pmap, struct tte *tp, vm_offset_t va) +pmap_copy_tte(pmap_t src_pmap, pmap_t dst_pmap, struct tte *tp, + vm_offset_t va) { vm_page_t m; u_long data; @@ -1567,10 +1563,9 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm pmap_copy_tte); tlb_context_demap(dst_pmap); } else { - for (va = src_addr; va < src_addr + len; va += PAGE_SIZE) { + for (va = src_addr; va < src_addr + len; va += PAGE_SIZE) if ((tp = tsb_tte_lookup(src_pmap, va)) != NULL) pmap_copy_tte(src_pmap, dst_pmap, tp, va); - } tlb_range_demap(dst_pmap, src_addr, src_addr + len - 1); } vm_page_unlock_queues(); @@ -1823,10 +1818,9 @@ pmap_page_is_mapped(vm_page_t m) if ((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) != 0) return (FALSE); mtx_assert(&vm_page_queue_mtx, MA_OWNED); - TAILQ_FOREACH(tp, &m->md.tte_list, tte_link) { + TAILQ_FOREACH(tp, &m->md.tte_list, tte_link) if ((tp->tte_data & TD_PV) != 0) return (TRUE); - } return (FALSE); } From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 20:38:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD9FF106566C; Tue, 30 Mar 2010 20:38:20 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9BD658FC1C; Tue, 30 Mar 2010 20:38: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 o2UKcKVA088754; Tue, 30 Mar 2010 20:38:20 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UKcK0v088752; Tue, 30 Mar 2010 20:38:20 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003302038.o2UKcK0v088752@svn.freebsd.org> From: Marius Strobl Date: Tue, 30 Mar 2010 20:38: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: r205929 - stable/7/sys/sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2010 20:38:20 -0000 Author: marius Date: Tue Mar 30 20:38:20 2010 New Revision: 205929 URL: http://svn.freebsd.org/changeset/base/205929 Log: MFC: r203839 Style fixes Modified: stable/7/sys/sparc64/sparc64/pmap.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/sparc64/pmap.c ============================================================================== --- stable/7/sys/sparc64/sparc64/pmap.c Tue Mar 30 20:38:18 2010 (r205928) +++ stable/7/sys/sparc64/sparc64/pmap.c Tue Mar 30 20:38:20 2010 (r205929) @@ -241,6 +241,7 @@ PMAP_STATS_VAR(pmap_nnew_thread_oc); */ static int mr_cmp(const void *a, const void *b); static int om_cmp(const void *a, const void *b); + static int mr_cmp(const void *a, const void *b) { @@ -256,6 +257,7 @@ mr_cmp(const void *a, const void *b) else return (0); } + static int om_cmp(const void *a, const void *b) { @@ -1106,10 +1108,9 @@ pmap_release(pmap_t pm) * to a kernel thread, leaving the pmap pointer unchanged. */ mtx_lock_spin(&sched_lock); - SLIST_FOREACH(pc, &cpuhead, pc_allcpu) { + SLIST_FOREACH(pc, &cpuhead, pc_allcpu) if (pc->pc_pmap == pm) pc->pc_pmap = NULL; - } mtx_unlock_spin(&sched_lock); obj = pm->pm_tsb_obj; @@ -1145,7 +1146,7 @@ pmap_growkernel(vm_offset_t addr) int pmap_remove_tte(struct pmap *pm, struct pmap *pm2, struct tte *tp, - vm_offset_t va) + vm_offset_t va) { vm_page_t m; u_long data; @@ -1193,12 +1194,10 @@ pmap_remove(pmap_t pm, vm_offset_t start tsb_foreach(pm, NULL, start, end, pmap_remove_tte); tlb_context_demap(pm); } else { - for (va = start; va < end; va += PAGE_SIZE) { - if ((tp = tsb_tte_lookup(pm, va)) != NULL) { - if (!pmap_remove_tte(pm, NULL, tp, va)) - break; - } - } + for (va = start; va < end; va += PAGE_SIZE) + if ((tp = tsb_tte_lookup(pm, va)) != NULL && + !pmap_remove_tte(pm, NULL, tp, va)) + break; tlb_range_demap(pm, start, end - 1); } PMAP_UNLOCK(pm); @@ -1240,7 +1239,7 @@ pmap_remove_all(vm_page_t m) int pmap_protect_tte(struct pmap *pm, struct pmap *pm2, struct tte *tp, - vm_offset_t va) + vm_offset_t va) { u_long data; vm_page_t m; @@ -1282,10 +1281,9 @@ pmap_protect(pmap_t pm, vm_offset_t sva, tsb_foreach(pm, NULL, sva, eva, pmap_protect_tte); tlb_context_demap(pm); } else { - for (va = sva; va < eva; va += PAGE_SIZE) { + for (va = sva; va < eva; va += PAGE_SIZE) if ((tp = tsb_tte_lookup(pm, va)) != NULL) pmap_protect_tte(pm, NULL, tp, va); - } tlb_range_demap(pm, sva, eva - 1); } PMAP_UNLOCK(pm); @@ -1381,21 +1379,18 @@ pmap_enter_locked(pmap_t pm, vm_offset_t */ if ((prot & VM_PROT_WRITE) != 0) { tp->tte_data |= TD_SW; - if (wired) { + if (wired) tp->tte_data |= TD_W; - } vm_page_flag_set(m, PG_WRITEABLE); - } else if ((data & TD_W) != 0) { + } else if ((data & TD_W) != 0) vm_page_dirty(m); - } /* * If we're turning on execute permissions, flush the icache. */ if ((prot & VM_PROT_EXECUTE) != 0) { - if ((data & TD_EXEC) == 0) { + if ((data & TD_EXEC) == 0) icache_page_inval(pa); - } tp->tte_data |= TD_EXEC; } @@ -1490,7 +1485,7 @@ pmap_enter_quick(pmap_t pm, vm_offset_t void pmap_object_init_pt(pmap_t pm, vm_offset_t addr, vm_object_t object, - vm_pindex_t pindex, vm_size_t size) + vm_pindex_t pindex, vm_size_t size) { VM_OBJECT_LOCK_ASSERT(object, MA_OWNED); @@ -1524,7 +1519,8 @@ pmap_change_wiring(pmap_t pm, vm_offset_ } static int -pmap_copy_tte(pmap_t src_pmap, pmap_t dst_pmap, struct tte *tp, vm_offset_t va) +pmap_copy_tte(pmap_t src_pmap, pmap_t dst_pmap, struct tte *tp, + vm_offset_t va) { vm_page_t m; u_long data; @@ -1562,10 +1558,9 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm pmap_copy_tte); tlb_context_demap(dst_pmap); } else { - for (va = src_addr; va < src_addr + len; va += PAGE_SIZE) { + for (va = src_addr; va < src_addr + len; va += PAGE_SIZE) if ((tp = tsb_tte_lookup(src_pmap, va)) != NULL) pmap_copy_tte(src_pmap, dst_pmap, tp, va); - } tlb_range_demap(dst_pmap, src_addr, src_addr + len - 1); } vm_page_unlock_queues(); @@ -1798,10 +1793,9 @@ pmap_page_is_mapped(vm_page_t m) if ((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) != 0) return (FALSE); mtx_assert(&vm_page_queue_mtx, MA_OWNED); - TAILQ_FOREACH(tp, &m->md.tte_list, tte_link) { + TAILQ_FOREACH(tp, &m->md.tte_list, tte_link) if ((tp->tte_data & TD_PV) != 0) return (TRUE); - } return (FALSE); } @@ -1984,11 +1978,12 @@ pmap_addr_hint(vm_object_t object, vm_of } /* - * Increase the starting virtual address of the given mapping if a - * different alignment might result in more superpage mappings. + * Increase the starting virtual address of the given mapping if a + * different alignment might result in more superpage mappings. */ void pmap_align_superpage(vm_object_t object, vm_ooffset_t offset, vm_offset_t *addr, vm_size_t size) { + } From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 20:39:48 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F15A81065670; Tue, 30 Mar 2010 20:39:47 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D6AD48FC12; Tue, 30 Mar 2010 20:39: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 o2UKdljE089147; Tue, 30 Mar 2010 20:39:47 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UKdlNG089145; Tue, 30 Mar 2010 20:39:47 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003302039.o2UKdlNG089145@svn.freebsd.org> From: Marius Strobl Date: Tue, 30 Mar 2010 20:39: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: r205930 - stable/8/sys/sparc64/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2010 20:39:48 -0000 Author: marius Date: Tue Mar 30 20:39:47 2010 New Revision: 205930 URL: http://svn.freebsd.org/changeset/base/205930 Log: MFC: r203843 Resurrect nexusvar.h from r167307. Added: stable/8/sys/sparc64/include/nexusvar.h - copied unchanged from r203843, head/sys/sparc64/include/nexusvar.h Modified: 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) Copied: stable/8/sys/sparc64/include/nexusvar.h (from r203843, head/sys/sparc64/include/nexusvar.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/sys/sparc64/include/nexusvar.h Tue Mar 30 20:39:47 2010 (r205930, copy of r203843, head/sys/sparc64/include/nexusvar.h) @@ -0,0 +1,58 @@ +/*- + * Copyright (c) 2001 by Thomas Moestl . + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE + * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _MACHINE_NEXUSVAR_H_ +#define _MACHINE_NEXUSVAR_H_ + +enum nexus_ivars { + NEXUS_IVAR_NODE, + NEXUS_IVAR_NAME, + NEXUS_IVAR_DEVICE_TYPE, + NEXUS_IVAR_MODEL, + NEXUS_IVAR_REG, + NEXUS_IVAR_NREG, + NEXUS_IVAR_INTERRUPTS, + NEXUS_IVAR_NINTERRUPTS, + NEXUS_IVAR_DMATAG, +}; + +#define NEXUS_ACCESSOR(var, ivar, type) \ + __BUS_ACCESSOR(nexus, var, NEXUS, ivar, type) + +NEXUS_ACCESSOR(node, NODE, phandle_t) +NEXUS_ACCESSOR(name, NAME, char *) +NEXUS_ACCESSOR(device_type, DEVICE_TYPE, char *) +NEXUS_ACCESSOR(model, MODEL, char *) +NEXUS_ACCESSOR(reg, REG, struct upa_regs *) +NEXUS_ACCESSOR(nreg, NREG, int) +NEXUS_ACCESSOR(interrupts, INTERRUPTS, u_int *) +NEXUS_ACCESSOR(ninterrupts, NINTERRUPTS, int) +NEXUS_ACCESSOR(dmatag, DMATAG, bus_dma_tag_t) + +#undef NEXUS_ACCESSOR + +#endif /* _MACHINE_NEXUSVAR_H_ */ From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 20:39:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F34C81065675; Tue, 30 Mar 2010 20:39:48 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D7FC38FC18; Tue, 30 Mar 2010 20:39: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 o2UKdmOF089177; Tue, 30 Mar 2010 20:39:48 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UKdmLo089175; Tue, 30 Mar 2010 20:39:48 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003302039.o2UKdmLo089175@svn.freebsd.org> From: Marius Strobl Date: Tue, 30 Mar 2010 20:39:48 +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: r205931 - stable/7/sys/sparc64/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2010 20:39:49 -0000 Author: marius Date: Tue Mar 30 20:39:48 2010 New Revision: 205931 URL: http://svn.freebsd.org/changeset/base/205931 Log: MFC: r203843 Resurrect nexusvar.h from r167307. Added: stable/7/sys/sparc64/include/nexusvar.h - copied unchanged from r203843, head/sys/sparc64/include/nexusvar.h Modified: Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Copied: stable/7/sys/sparc64/include/nexusvar.h (from r203843, head/sys/sparc64/include/nexusvar.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/sys/sparc64/include/nexusvar.h Tue Mar 30 20:39:48 2010 (r205931, copy of r203843, head/sys/sparc64/include/nexusvar.h) @@ -0,0 +1,58 @@ +/*- + * Copyright (c) 2001 by Thomas Moestl . + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE + * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _MACHINE_NEXUSVAR_H_ +#define _MACHINE_NEXUSVAR_H_ + +enum nexus_ivars { + NEXUS_IVAR_NODE, + NEXUS_IVAR_NAME, + NEXUS_IVAR_DEVICE_TYPE, + NEXUS_IVAR_MODEL, + NEXUS_IVAR_REG, + NEXUS_IVAR_NREG, + NEXUS_IVAR_INTERRUPTS, + NEXUS_IVAR_NINTERRUPTS, + NEXUS_IVAR_DMATAG, +}; + +#define NEXUS_ACCESSOR(var, ivar, type) \ + __BUS_ACCESSOR(nexus, var, NEXUS, ivar, type) + +NEXUS_ACCESSOR(node, NODE, phandle_t) +NEXUS_ACCESSOR(name, NAME, char *) +NEXUS_ACCESSOR(device_type, DEVICE_TYPE, char *) +NEXUS_ACCESSOR(model, MODEL, char *) +NEXUS_ACCESSOR(reg, REG, struct upa_regs *) +NEXUS_ACCESSOR(nreg, NREG, int) +NEXUS_ACCESSOR(interrupts, INTERRUPTS, u_int *) +NEXUS_ACCESSOR(ninterrupts, NINTERRUPTS, int) +NEXUS_ACCESSOR(dmatag, DMATAG, bus_dma_tag_t) + +#undef NEXUS_ACCESSOR + +#endif /* _MACHINE_NEXUSVAR_H_ */ From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 20:39:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB761106564A; Tue, 30 Mar 2010 20:39:57 +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 DB9D38FC1F; Tue, 30 Mar 2010 20:39: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 o2UKdvIW089247; Tue, 30 Mar 2010 20:39:57 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UKdvgb089245; Tue, 30 Mar 2010 20:39:57 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201003302039.o2UKdvgb089245@svn.freebsd.org> From: Matt Jacob Date: Tue, 30 Mar 2010 20:39: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: r205932 - head/sys/dev/mpt X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2010 20:39:58 -0000 Author: mjacob Date: Tue Mar 30 20:39:57 2010 New Revision: 205932 URL: http://svn.freebsd.org/changeset/base/205932 Log: nit: xpt_bus_deregister has to be called with the sim lock held. MFC after: 1 month Modified: head/sys/dev/mpt/mpt_cam.c Modified: head/sys/dev/mpt/mpt_cam.c ============================================================================== --- head/sys/dev/mpt/mpt_cam.c Tue Mar 30 20:39:48 2010 (r205931) +++ head/sys/dev/mpt/mpt_cam.c Tue Mar 30 20:39:57 2010 (r205932) @@ -1208,14 +1208,18 @@ mpt_cam_detach(struct mpt_softc *mpt) if (mpt->sim != NULL) { xpt_free_path(mpt->path); + MPT_LOCK(mpt); xpt_bus_deregister(cam_sim_path(mpt->sim)); + MPT_UNLOCK(mpt); cam_sim_free(mpt->sim, TRUE); mpt->sim = NULL; } if (mpt->phydisk_sim != NULL) { xpt_free_path(mpt->phydisk_path); + MPT_LOCK(mpt); xpt_bus_deregister(cam_sim_path(mpt->phydisk_sim)); + MPT_UNLOCK(mpt); cam_sim_free(mpt->phydisk_sim, TRUE); mpt->phydisk_sim = NULL; } From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 20:41:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C30EF1065670; Tue, 30 Mar 2010 20:41:20 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail09.syd.optusnet.com.au (mail09.syd.optusnet.com.au [211.29.132.190]) by mx1.freebsd.org (Postfix) with ESMTP id 56B278FC17; Tue, 30 Mar 2010 20:41:20 +0000 (UTC) Received: from besplex.bde.org (c122-106-158-90.carlnfd1.nsw.optusnet.com.au [122.106.158.90]) by mail09.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o2UKfD2X000871 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 31 Mar 2010 07:41:16 +1100 Date: Wed, 31 Mar 2010 07:41:13 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Giovanni Trematerra In-Reply-To: <4e6cba831003300839u5eac26d2n142ecb69502a64b0@mail.gmail.com> Message-ID: <20100331072023.E2216@besplex.bde.org> References: <201003131117.o2DBHek2003410@svn.freebsd.org> <4e6cba831003300839u5eac26d2n142ecb69502a64b0@mail.gmail.com> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-1128807053-1269981673=:2216" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Randall Stewart , Bruce Cran Subject: Re: svn commit: r205119 - head/contrib/top X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2010 20:41:20 -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. --0-1128807053-1269981673=:2216 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Tue, 30 Mar 2010, Giovanni Trematerra wrote: > On Sat, Mar 13, 2010 at 1:17 PM, Bruce Cran wrote: >> Author: brucec >> Date: Sat Mar 13 11:17:39 2010 >> New Revision: 205119 >> URL: http://svn.freebsd.org/changeset/base/205119 >> >> Log: >> =A0Change the 'amt' parameter in format_k2 from int to unsigned long lon= g >> =A0to match the values passed in and prevent the SIZE field being corrup= ted >> =A0when more than 2TB is allocated. >> >> =A0PR: =A0 =A0 =A0 =A0 =A0 bin/129706 >> =A0Approved by: =A0rrs (mentor) >> =A0MFC after: =A0 =A01 week Grrr, where are the ASCII ribbon campaigners? mav@ (?) just reported a type error in this. I may have already complained about this :-). unsigned long long should be a syntax error... >> >> Modified: >> =A0head/contrib/top/utils.c >> >> Modified: head/contrib/top/utils.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/contrib/top/utils.c =A0 =A0Sat Mar 13 11:08:57 2010 =A0 =A0 =A0= =A0(r205118) >> +++ head/contrib/top/utils.c =A0 =A0Sat Mar 13 11:17:39 2010 =A0 =A0 =A0= =A0(r205119) >> @@ -476,7 +476,7 @@ int amt; >> >> =A0char *format_k2(amt) >> >> -int amt; >> +unsigned long long amt; >> >> =A0{ >> =A0 =A0 static char retarray[NUM_STRINGS][16]; > > While here wouldn't be good thing to ansify the function? No, ansi doesn't exist, and this is contribed code which is already hundreds if not thousands of versions behind the "vendor" version, partly because even non-gratuitous changes in it are hard to maintain. contrib/top doesn't have many local changes, but usr.bin/top does (including an almost complete reformatting to KNF), and unfortunately the "vendor" changed almost everything in that too. format_k2() is a FreeBSD addition. In the "vendor" version 3.8b1, there is still only format_k(). This has been converted to a new-style definitio= n so that it can no longer be compiled by old compilers, and its parameter type has been changed from int to long, which is hopefully long enough. Even its style has been improved. Bruce --0-1128807053-1269981673=:2216-- From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 20:44:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D4FB1065674; Tue, 30 Mar 2010 20:44:04 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6B7318FC23; Tue, 30 Mar 2010 20:44: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 o2UKi44l090226; Tue, 30 Mar 2010 20:44:04 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UKi4fr090223; Tue, 30 Mar 2010 20:44:04 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003302044.o2UKi4fr090223@svn.freebsd.org> From: Marius Strobl Date: Tue, 30 Mar 2010 20:44: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: r205933 - in stable/8/sys/sparc64: include sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2010 20:44:04 -0000 Author: marius Date: Tue Mar 30 20:44:04 2010 New Revision: 205933 URL: http://svn.freebsd.org/changeset/base/205933 Log: MFC: r203845 - Add the 'cmp' and 'core' pseudo-busses which are used to group CPU cores to the exclusion lists as the CPU nodes aren't handled as regular devices either. Also add the pseudo-devices found in Sun Fire V1280. - Allow nexus_attach() and nexus_alloc_resource() to be used by drivers derived from nexus(4) for subordinate busses. - Don't add the zero-sized memory resources of glue devices to the resource lists. Modified: stable/8/sys/sparc64/include/nexusvar.h stable/8/sys/sparc64/sparc64/nexus.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/sparc64/include/nexusvar.h ============================================================================== --- stable/8/sys/sparc64/include/nexusvar.h Tue Mar 30 20:39:57 2010 (r205932) +++ stable/8/sys/sparc64/include/nexusvar.h Tue Mar 30 20:44:04 2010 (r205933) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2001 by Thomas Moestl . + * Copyright (c) 2010 Marius Strobl * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -11,48 +11,24 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR 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. + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. * * $FreeBSD$ */ #ifndef _MACHINE_NEXUSVAR_H_ -#define _MACHINE_NEXUSVAR_H_ +#define _MACHINE_NEXUSVAR_H_ -enum nexus_ivars { - NEXUS_IVAR_NODE, - NEXUS_IVAR_NAME, - NEXUS_IVAR_DEVICE_TYPE, - NEXUS_IVAR_MODEL, - NEXUS_IVAR_REG, - NEXUS_IVAR_NREG, - NEXUS_IVAR_INTERRUPTS, - NEXUS_IVAR_NINTERRUPTS, - NEXUS_IVAR_DMATAG, -}; - -#define NEXUS_ACCESSOR(var, ivar, type) \ - __BUS_ACCESSOR(nexus, var, NEXUS, ivar, type) - -NEXUS_ACCESSOR(node, NODE, phandle_t) -NEXUS_ACCESSOR(name, NAME, char *) -NEXUS_ACCESSOR(device_type, DEVICE_TYPE, char *) -NEXUS_ACCESSOR(model, MODEL, char *) -NEXUS_ACCESSOR(reg, REG, struct upa_regs *) -NEXUS_ACCESSOR(nreg, NREG, int) -NEXUS_ACCESSOR(interrupts, INTERRUPTS, u_int *) -NEXUS_ACCESSOR(ninterrupts, NINTERRUPTS, int) -NEXUS_ACCESSOR(dmatag, DMATAG, bus_dma_tag_t) - -#undef NEXUS_ACCESSOR +DECLARE_CLASS(nexus_driver); #endif /* _MACHINE_NEXUSVAR_H_ */ Modified: stable/8/sys/sparc64/sparc64/nexus.c ============================================================================== --- stable/8/sys/sparc64/sparc64/nexus.c Tue Mar 30 20:39:57 2010 (r205932) +++ stable/8/sys/sparc64/sparc64/nexus.c Tue Mar 30 20:44:04 2010 (r205933) @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -154,17 +155,22 @@ static const char *const nexus_excl_name "aliases", "associations", "chosen", + "cmp", "counter-timer", /* No separate device; handled by psycho/sbus */ + "failsafe", "memory", "openprom", "options", "packages", "rsc", + "sgcn", + "todsg", "virtual-memory", NULL }; static const char *const nexus_excl_type[] = { + "core", "cpu", NULL }; @@ -206,20 +212,24 @@ nexus_attach(device_t dev) device_t cdev; phandle_t node; - node = OF_peer(0); - if (node == -1) - panic("%s: OF_peer failed.", __func__); - - sc = device_get_softc(dev); - sc->sc_intr_rman.rm_type = RMAN_ARRAY; - sc->sc_intr_rman.rm_descr = "Interrupts"; - sc->sc_mem_rman.rm_type = RMAN_ARRAY; - sc->sc_mem_rman.rm_descr = "Device Memory"; - if (rman_init(&sc->sc_intr_rman) != 0 || - rman_init(&sc->sc_mem_rman) != 0 || - rman_manage_region(&sc->sc_intr_rman, 0, IV_MAX - 1) != 0 || - rman_manage_region(&sc->sc_mem_rman, 0ULL, ~0ULL) != 0) - panic("%s: failed to set up rmans.", __func__); + if (strcmp(device_get_name(device_get_parent(dev)), "root") == 0) { + node = OF_peer(0); + if (node == -1) + panic("%s: OF_peer failed.", __func__); + + sc = device_get_softc(dev); + sc->sc_intr_rman.rm_type = RMAN_ARRAY; + sc->sc_intr_rman.rm_descr = "Interrupts"; + sc->sc_mem_rman.rm_type = RMAN_ARRAY; + sc->sc_mem_rman.rm_descr = "Device Memory"; + if (rman_init(&sc->sc_intr_rman) != 0 || + rman_init(&sc->sc_mem_rman) != 0 || + rman_manage_region(&sc->sc_intr_rman, 0, + IV_MAX - 1) != 0 || + rman_manage_region(&sc->sc_mem_rman, 0ULL, ~0ULL) != 0) + panic("%s: failed to set up rmans.", __func__); + } else + node = ofw_bus_get_node(dev); /* * Allow devices to identify. @@ -347,12 +357,16 @@ nexus_alloc_resource(device_t bus, devic struct rman *rm; struct resource *rv; struct resource_list_entry *rle; + device_t nexus; int isdefault, needactivate, passthrough; isdefault = (start == 0UL && end == ~0UL); needactivate = flags & RF_ACTIVE; passthrough = (device_get_parent(child) != bus); - sc = device_get_softc(bus); + nexus = bus; + while (strcmp(device_get_name(device_get_parent(nexus)), "root") != 0) + nexus = device_get_parent(nexus); + sc = device_get_softc(nexus); rle = NULL; if (!passthrough) { @@ -498,8 +512,10 @@ nexus_setup_dinfo(device_t dev, phandle_ for (i = 0; i < nreg; i++) { phys = NEXUS_REG_PHYS(®[i]); size = NEXUS_REG_SIZE(®[i]); - resource_list_add(&ndi->ndi_rl, SYS_RES_MEMORY, i, phys, - phys + size - 1, size); + /* Skip the dummy reg property of glue devices like ssm(4). */ + if (size != 0) + resource_list_add(&ndi->ndi_rl, SYS_RES_MEMORY, i, + phys, phys + size - 1, size); } free(reg, M_OFWPROP); From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 20:44:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA5571065675; Tue, 30 Mar 2010 20:44:05 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B86678FC1C; Tue, 30 Mar 2010 20:44: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 o2UKi5iD090287; Tue, 30 Mar 2010 20:44:05 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UKi5Ju090284; Tue, 30 Mar 2010 20:44:05 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003302044.o2UKi5Ju090284@svn.freebsd.org> From: Marius Strobl Date: Tue, 30 Mar 2010 20:44:05 +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: r205934 - in stable/7/sys/sparc64: include sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2010 20:44:06 -0000 Author: marius Date: Tue Mar 30 20:44:05 2010 New Revision: 205934 URL: http://svn.freebsd.org/changeset/base/205934 Log: MFC: r203845 - Add the 'cmp' and 'core' pseudo-busses which are used to group CPU cores to the exclusion lists as the CPU nodes aren't handled as regular devices either. Also add the pseudo-devices found in Sun Fire V1280. - Allow nexus_attach() and nexus_alloc_resource() to be used by drivers derived from nexus(4) for subordinate busses. - Don't add the zero-sized memory resources of glue devices to the resource lists. Modified: stable/7/sys/sparc64/include/nexusvar.h stable/7/sys/sparc64/sparc64/nexus.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/include/nexusvar.h ============================================================================== --- stable/7/sys/sparc64/include/nexusvar.h Tue Mar 30 20:44:04 2010 (r205933) +++ stable/7/sys/sparc64/include/nexusvar.h Tue Mar 30 20:44:05 2010 (r205934) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2001 by Thomas Moestl . + * Copyright (c) 2010 Marius Strobl * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -11,48 +11,24 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR 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. + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. * * $FreeBSD$ */ #ifndef _MACHINE_NEXUSVAR_H_ -#define _MACHINE_NEXUSVAR_H_ +#define _MACHINE_NEXUSVAR_H_ -enum nexus_ivars { - NEXUS_IVAR_NODE, - NEXUS_IVAR_NAME, - NEXUS_IVAR_DEVICE_TYPE, - NEXUS_IVAR_MODEL, - NEXUS_IVAR_REG, - NEXUS_IVAR_NREG, - NEXUS_IVAR_INTERRUPTS, - NEXUS_IVAR_NINTERRUPTS, - NEXUS_IVAR_DMATAG, -}; - -#define NEXUS_ACCESSOR(var, ivar, type) \ - __BUS_ACCESSOR(nexus, var, NEXUS, ivar, type) - -NEXUS_ACCESSOR(node, NODE, phandle_t) -NEXUS_ACCESSOR(name, NAME, char *) -NEXUS_ACCESSOR(device_type, DEVICE_TYPE, char *) -NEXUS_ACCESSOR(model, MODEL, char *) -NEXUS_ACCESSOR(reg, REG, struct upa_regs *) -NEXUS_ACCESSOR(nreg, NREG, int) -NEXUS_ACCESSOR(interrupts, INTERRUPTS, u_int *) -NEXUS_ACCESSOR(ninterrupts, NINTERRUPTS, int) -NEXUS_ACCESSOR(dmatag, DMATAG, bus_dma_tag_t) - -#undef NEXUS_ACCESSOR +DECLARE_CLASS(nexus_driver); #endif /* _MACHINE_NEXUSVAR_H_ */ Modified: stable/7/sys/sparc64/sparc64/nexus.c ============================================================================== --- stable/7/sys/sparc64/sparc64/nexus.c Tue Mar 30 20:44:04 2010 (r205933) +++ stable/7/sys/sparc64/sparc64/nexus.c Tue Mar 30 20:44:05 2010 (r205934) @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -153,17 +154,22 @@ static const char *const nexus_excl_name "aliases", "associations", "chosen", + "cmp", "counter-timer", /* No separate device; handled by psycho/sbus */ + "failsafe", "memory", "openprom", "options", "packages", "rsc", + "sgcn", + "todsg", "virtual-memory", NULL }; static const char *const nexus_excl_type[] = { + "core", "cpu", NULL }; @@ -205,20 +211,24 @@ nexus_attach(device_t dev) device_t cdev; phandle_t node; - node = OF_peer(0); - if (node == -1) - panic("%s: OF_peer failed.", __func__); - - sc = device_get_softc(dev); - sc->sc_intr_rman.rm_type = RMAN_ARRAY; - sc->sc_intr_rman.rm_descr = "Interrupts"; - sc->sc_mem_rman.rm_type = RMAN_ARRAY; - sc->sc_mem_rman.rm_descr = "Device Memory"; - if (rman_init(&sc->sc_intr_rman) != 0 || - rman_init(&sc->sc_mem_rman) != 0 || - rman_manage_region(&sc->sc_intr_rman, 0, IV_MAX - 1) != 0 || - rman_manage_region(&sc->sc_mem_rman, 0ULL, ~0ULL) != 0) - panic("%s: failed to set up rmans.", __func__); + if (strcmp(device_get_name(device_get_parent(dev)), "root") == 0) { + node = OF_peer(0); + if (node == -1) + panic("%s: OF_peer failed.", __func__); + + sc = device_get_softc(dev); + sc->sc_intr_rman.rm_type = RMAN_ARRAY; + sc->sc_intr_rman.rm_descr = "Interrupts"; + sc->sc_mem_rman.rm_type = RMAN_ARRAY; + sc->sc_mem_rman.rm_descr = "Device Memory"; + if (rman_init(&sc->sc_intr_rman) != 0 || + rman_init(&sc->sc_mem_rman) != 0 || + rman_manage_region(&sc->sc_intr_rman, 0, + IV_MAX - 1) != 0 || + rman_manage_region(&sc->sc_mem_rman, 0ULL, ~0ULL) != 0) + panic("%s: failed to set up rmans.", __func__); + } else + node = ofw_bus_get_node(dev); /* * Allow devices to identify. @@ -346,12 +356,16 @@ nexus_alloc_resource(device_t bus, devic struct rman *rm; struct resource *rv; struct resource_list_entry *rle; + device_t nexus; int isdefault, needactivate, passthrough; isdefault = (start == 0UL && end == ~0UL); needactivate = flags & RF_ACTIVE; passthrough = (device_get_parent(child) != bus); - sc = device_get_softc(bus); + nexus = bus; + while (strcmp(device_get_name(device_get_parent(nexus)), "root") != 0) + nexus = device_get_parent(nexus); + sc = device_get_softc(nexus); rle = NULL; if (!passthrough) { @@ -497,8 +511,10 @@ nexus_setup_dinfo(device_t dev, phandle_ for (i = 0; i < nreg; i++) { phys = NEXUS_REG_PHYS(®[i]); size = NEXUS_REG_SIZE(®[i]); - resource_list_add(&ndi->ndi_rl, SYS_RES_MEMORY, i, phys, - phys + size - 1, size); + /* Skip the dummy reg property of glue devices like ssm(4). */ + if (size != 0) + resource_list_add(&ndi->ndi_rl, SYS_RES_MEMORY, i, + phys, phys + size - 1, size); } free(reg, M_OFWPROP); From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 20:46:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57E14106566C; Tue, 30 Mar 2010 20:46:10 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 46DFA8FC12; Tue, 30 Mar 2010 20:46: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 o2UKkAOO090823; Tue, 30 Mar 2010 20:46:10 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UKkAol090821; Tue, 30 Mar 2010 20:46:10 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003302046.o2UKkAol090821@svn.freebsd.org> From: Marius Strobl Date: Tue, 30 Mar 2010 20:46:10 +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: r205935 - stable/7/sys/sparc64/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2010 20:46:10 -0000 Author: marius Date: Tue Mar 30 20:46:09 2010 New Revision: 205935 URL: http://svn.freebsd.org/changeset/base/205935 Log: MFC: r203846 Predict KASSERTs to be true. Modified: stable/7/sys/sparc64/include/asmacros.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/include/asmacros.h ============================================================================== --- stable/7/sys/sparc64/include/asmacros.h Tue Mar 30 20:44:05 2010 (r205934) +++ stable/7/sys/sparc64/include/asmacros.h Tue Mar 30 20:46:09 2010 (r205935) @@ -107,7 +107,7 @@ #ifdef INVARIANTS #define KASSERT(r1, msg) \ - brnz r1, 8f ; \ + brnz,pt r1, 8f ; \ nop ; \ PANIC(msg, r1) ; \ 8: From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 20:46:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8FD5B106564A; Tue, 30 Mar 2010 20:46:10 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7EFAB8FC16; Tue, 30 Mar 2010 20:46: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 o2UKkAJQ090837; Tue, 30 Mar 2010 20:46:10 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UKkAq7090835; Tue, 30 Mar 2010 20:46:10 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003302046.o2UKkAq7090835@svn.freebsd.org> From: Marius Strobl Date: Tue, 30 Mar 2010 20:46:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205936 - stable/8/sys/sparc64/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2010 20:46:10 -0000 Author: marius Date: Tue Mar 30 20:46:10 2010 New Revision: 205936 URL: http://svn.freebsd.org/changeset/base/205936 Log: MFC: r203846 Predict KASSERTs to be true. Modified: stable/8/sys/sparc64/include/asmacros.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/sparc64/include/asmacros.h ============================================================================== --- stable/8/sys/sparc64/include/asmacros.h Tue Mar 30 20:46:09 2010 (r205935) +++ stable/8/sys/sparc64/include/asmacros.h Tue Mar 30 20:46:10 2010 (r205936) @@ -107,7 +107,7 @@ #ifdef INVARIANTS #define KASSERT(r1, msg) \ - brnz r1, 8f ; \ + brnz,pt r1, 8f ; \ nop ; \ PANIC(msg, r1) ; \ 8: From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 21:11:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E6DD1065673; Tue, 30 Mar 2010 21:11:17 +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 E7C7C8FC1F; Tue, 30 Mar 2010 21:11: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 o2ULBGDW096415; Tue, 30 Mar 2010 21:11:16 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2ULBGr6096413; Tue, 30 Mar 2010 21:11:16 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201003302111.o2ULBGr6096413@svn.freebsd.org> From: Edwin Groothuis Date: Tue, 30 Mar 2010 21:11: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: r205937 - head/usr.bin/calendar/calendars X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2010 21:11:17 -0000 Author: edwin Date: Tue Mar 30 21:11:16 2010 New Revision: 205937 URL: http://svn.freebsd.org/changeset/base/205937 Log: For where possible, make the dates of the Tasmanian holidays properly variable. The leftover ones are the Thursday before the Fourth Saturday of October (Oct/SatFourth-2) which is not possible yet. Modified: head/usr.bin/calendar/calendars/calendar.australia Modified: head/usr.bin/calendar/calendars/calendar.australia ============================================================================== --- head/usr.bin/calendar/calendars/calendar.australia Tue Mar 30 20:46:10 2010 (r205936) +++ head/usr.bin/calendar/calendars/calendar.australia Tue Mar 30 21:11:16 2010 (r205937) @@ -26,13 +26,27 @@ Oct/MonFirst Labour Day (ACT, NSW, SA) Mar/MonSecond Labour Day (VIC) Nov/TueFirst Melbourne Cup (VIC) -/* Tasmania */ -Feb 11 Regatta Day (TAS) -Feb 27 Launceston Cup (TAS) -Mar 11 Eight Hours Day (TAS) -Oct 10 Launceston Show Day (TAS) -Oct 24 Hobart Show Day (TAS) -Nov 04 Recreation Day (N TAS) +/* Tasmania + * http://www.wst.tas.gov.au/employment_info/public_holidays/html/2010 + */ +Feb/MonSecond Regatta Day (TAS) +Feb/WedLast Launceston Cup (TAS) +Mar/TueFirst King Island show (TAS) +Mar/MonSecond Eight Hours Day (TAS) +Oct 10 Launceston Show Day (TAS) /* Thursday preceding second Saturday in October */ +Oct 24 Hobart Show Day (TAS) /* Thursday preceding fourth Saturday in October */ +Nov/MonFirst Recreation Day (N TAS) + +/* +Oct/SatSecond-2 Launceston Show Day (TAS) // Thursday preceding second Sat in October +Oct/SatFourth-2 Hobart Show Day (TAS) // Thursday preceding fourth Sat in October +May/ThuFirst+1 Agfest (Circular Head only) // Friday following the first Thursday in May +Oct/SatFirst-1 Burnie Show // Friday preceding first Saturday in October +Oct/SatThird-1 Flinders Island Show // Friday preceding third Saturday in October + +DEVONPORT CUP Wednesday not earlier than fifth and not later than eleventh day of January +DEVONPORT SHOW Friday nearest last day in November, but not later than first day of December +*/ /* South Australia */ May/MonThird Adelaide Cup (SA) @@ -53,6 +67,6 @@ Aug/MonFirst Picnic Day (NT) /* Queensland */ May/MonFirst Labour Day (QLD) -Aug 14 RNA Show Day (Brisbane metro) +Aug/WedSecond RNA Show Day (Brisbane metro) /* Second Last Wednesday */ #endif From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 21:54:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1DEEF1065672; Tue, 30 Mar 2010 21:54:26 +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 E70F78FC1C; Tue, 30 Mar 2010 21:54: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 o2ULsPjT006003; Tue, 30 Mar 2010 21:54:25 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2ULsPjw006000; Tue, 30 Mar 2010 21:54:25 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201003302154.o2ULsPjw006000@svn.freebsd.org> From: Xin LI Date: Tue, 30 Mar 2010 21:54:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205938 - head/usr.sbin/mailwrapper X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2010 21:54:26 -0000 Author: delphij Date: Tue Mar 30 21:54:25 2010 New Revision: 205938 URL: http://svn.freebsd.org/changeset/base/205938 Log: Sync with OpenBSD: - avoid coredump when there's only one token on a line; - Use calloc(); - Remove a line inherited from example mdoc. Obtained from: OpenBSD MFC after: 1 month Modified: head/usr.sbin/mailwrapper/mailwrapper.8 head/usr.sbin/mailwrapper/mailwrapper.c Modified: head/usr.sbin/mailwrapper/mailwrapper.8 ============================================================================== --- head/usr.sbin/mailwrapper/mailwrapper.8 Tue Mar 30 21:11:16 2010 (r205937) +++ head/usr.sbin/mailwrapper/mailwrapper.8 Tue Mar 30 21:54:25 2010 (r205938) @@ -1,5 +1,5 @@ +.\" $OpenBSD: mailwrapper.8,v 1.10 2009/02/07 16:58:23 martynas Exp $ .\" $NetBSD: mailwrapper.8,v 1.11 2002/02/08 01:38:50 ross Exp $ -.\" $OpenBSD: mailwrapper.8,v 1.8 2003/06/12 12:59:51 jmc Exp $ .\" $FreeBSD$ .\" .\" Copyright (c) 1998 @@ -31,7 +31,6 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" The following requests are required for all man pages. .Dd August 7, 2006 .Dt MAILWRAPPER 8 .Os Modified: head/usr.sbin/mailwrapper/mailwrapper.c ============================================================================== --- head/usr.sbin/mailwrapper/mailwrapper.c Tue Mar 30 21:11:16 2010 (r205937) +++ head/usr.sbin/mailwrapper/mailwrapper.c Tue Mar 30 21:54:25 2010 (r205938) @@ -1,4 +1,4 @@ -/* $OpenBSD: mailwrapper.c,v 1.16 2004/07/06 03:38:14 millert Exp $ */ +/* $OpenBSD: mailwrapper.c,v 1.18 2007/11/06 14:39:19 otto Exp $ */ /* $NetBSD: mailwrapper.c,v 1.9 2003/03/09 08:10:43 mjl Exp $ */ /* @@ -61,8 +61,8 @@ initarg(struct arglist *al) { al->argc = 0; al->maxc = 10; - if ((al->argv = malloc(al->maxc * sizeof(char *))) == NULL) - err(EX_TEMPFAIL, "malloc"); + if ((al->argv = calloc(al->maxc, sizeof(char *))) == NULL) + err(EX_TEMPFAIL, "calloc"); } static void @@ -126,7 +126,7 @@ main(int argc, char *argv[], char *envp[ continue; } - if ((from = strsep(&cp, WS)) == NULL) + if ((from = strsep(&cp, WS)) == NULL || cp == NULL) goto parse_error; cp += strspn(cp, WS); From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 23:10:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 94D85106564A; Tue, 30 Mar 2010 23:10:56 +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 848BF8FC15; Tue, 30 Mar 2010 23:10: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 o2UNAuuD022942; Tue, 30 Mar 2010 23:10:56 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UNAuNJ022940; Tue, 30 Mar 2010 23:10:56 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201003302310.o2UNAuNJ022940@svn.freebsd.org> From: Xin LI Date: Tue, 30 Mar 2010 23:10: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: r205940 - head/bin/pax X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2010 23:10:56 -0000 Author: delphij Date: Tue Mar 30 23:10:56 2010 New Revision: 205940 URL: http://svn.freebsd.org/changeset/base/205940 Log: Remove unused files. Deleted: head/bin/pax/cpio.1 head/bin/pax/tar.1 Modified: head/bin/pax/Makefile Modified: head/bin/pax/Makefile ============================================================================== --- head/bin/pax/Makefile Tue Mar 30 22:31:30 2010 (r205939) +++ head/bin/pax/Makefile Tue Mar 30 23:10:56 2010 (r205940) @@ -29,8 +29,5 @@ PROG= pax SRCS= ar_io.c ar_subs.c buf_subs.c cache.c cpio.c file_subs.c ftree.c \ gen_subs.c getoldopt.c options.c pat_rep.c pax.c sel_subs.c \ tables.c tar.c tty_subs.c -#XXX NOTYET -#MAN= pax.1 tar.1 cpio.1 -#LINKS= ${BINDIR}/pax ${BINDIR}/tar ${BINDIR}/pax ${BINDIR}/cpio .include From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 23:11:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D6456106566B; Tue, 30 Mar 2010 23:11:50 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C42CB8FC30; Tue, 30 Mar 2010 23:11:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2UNBokl023205; Tue, 30 Mar 2010 23:11:50 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UNBoLL023198; Tue, 30 Mar 2010 23:11:50 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201003302311.o2UNBoLL023198@svn.freebsd.org> From: Rick Macklem Date: Tue, 30 Mar 2010 23:11:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205941 - in head/sys/fs: nfs nfsserver X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2010 23:11:50 -0000 Author: rmacklem Date: Tue Mar 30 23:11:50 2010 New Revision: 205941 URL: http://svn.freebsd.org/changeset/base/205941 Log: This patch should fix handling of byte range locks locally on the server for the experimental nfs server. When enabled by setting vfs.newnfs.locallocks_enable to non-zero, the experimental nfs server will now acquire byte range locks on the file on behalf of NFSv4 clients, such that lock conflicts between the NFSv4 clients and processes running locally on the server, will be recognized and handled correctly. MFC after: 2 weeks Modified: head/sys/fs/nfs/nfs_commonport.c head/sys/fs/nfs/nfs_commonsubs.c head/sys/fs/nfs/nfs_var.h head/sys/fs/nfs/nfsport.h head/sys/fs/nfs/nfsrvstate.h head/sys/fs/nfsserver/nfs_nfsdstate.c Modified: head/sys/fs/nfs/nfs_commonport.c ============================================================================== --- head/sys/fs/nfs/nfs_commonport.c Tue Mar 30 23:10:56 2010 (r205940) +++ head/sys/fs/nfs/nfs_commonport.c Tue Mar 30 23:11:50 2010 (r205941) @@ -82,7 +82,8 @@ SYSCTL_STRING(_vfs_newnfs, OID_AUTO, cal */ MALLOC_DEFINE(M_NEWNFSRVCACHE, "NFSD srvcache", "NFSD Server Request Cache"); MALLOC_DEFINE(M_NEWNFSDCLIENT, "NFSD V4client", "NFSD V4 Client Id"); -MALLOC_DEFINE(M_NEWNFSDSTATE, "NFSD V4state", "NFSD V4 State (Openowner, Open, Lockowner, Delegation"); +MALLOC_DEFINE(M_NEWNFSDSTATE, "NFSD V4state", + "NFSD V4 State (Openowner, Open, Lockowner, Delegation"); MALLOC_DEFINE(M_NEWNFSDLOCK, "NFSD V4lock", "NFSD V4 byte range lock"); MALLOC_DEFINE(M_NEWNFSDLOCKFILE, "NFSD lckfile", "NFSD Open/Lock file"); MALLOC_DEFINE(M_NEWNFSSTRING, "NFSD string", "NFSD V4 long string"); @@ -97,7 +98,10 @@ MALLOC_DEFINE(M_NEWNFSCLLOCKOWNER, "NFSC MALLOC_DEFINE(M_NEWNFSCLLOCK, "NFSCL lck", "NFSCL Lock"); MALLOC_DEFINE(M_NEWNFSV4NODE, "NEWNFSnode", "New nfs vnode"); MALLOC_DEFINE(M_NEWNFSDIRECTIO, "NEWdirectio", "New nfs Direct IO buffer"); -MALLOC_DEFINE(M_NEWNFSDIROFF, "Newnfscl_diroff", "New NFS directory offset data"); +MALLOC_DEFINE(M_NEWNFSDIROFF, "NFSCL diroffdiroff", + "New NFS directory offset data"); +MALLOC_DEFINE(M_NEWNFSDROLLBACK, "NFSD rollback", + "New NFS local lock rollback"); /* * Definition of mutex locks. Modified: head/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- head/sys/fs/nfs/nfs_commonsubs.c Tue Mar 30 23:10:56 2010 (r205940) +++ head/sys/fs/nfs/nfs_commonsubs.c Tue Mar 30 23:11:50 2010 (r205941) @@ -1824,6 +1824,19 @@ nfsv4_getref(struct nfsv4lock *lp, int * } /* + * Test for a lock. Return 1 if locked, 0 otherwise. + */ +APPLESTATIC int +nfsv4_testlock(struct nfsv4lock *lp) +{ + + if ((lp->nfslock_lock & NFSV4LOCK_LOCK) == 0 && + lp->nfslock_usecnt == 0) + return (0); + return (1); +} + +/* * Wake up anyone sleeping, waiting for this lock. */ static void Modified: head/sys/fs/nfs/nfs_var.h ============================================================================== --- head/sys/fs/nfs/nfs_var.h Tue Mar 30 23:10:56 2010 (r205940) +++ head/sys/fs/nfs/nfs_var.h Tue Mar 30 23:11:50 2010 (r205941) @@ -251,6 +251,7 @@ int nfsv4_lock(struct nfsv4lock *, int, void nfsv4_unlock(struct nfsv4lock *, int); void nfsv4_relref(struct nfsv4lock *); void nfsv4_getref(struct nfsv4lock *, int *, void *); +int nfsv4_testlock(struct nfsv4lock *); int nfsrv_mtostr(struct nfsrv_descript *, char *, int); int nfsrv_checkutf8(u_int8_t *, int); int newnfs_sndlock(int *); Modified: head/sys/fs/nfs/nfsport.h ============================================================================== --- head/sys/fs/nfs/nfsport.h Tue Mar 30 23:10:56 2010 (r205940) +++ head/sys/fs/nfs/nfsport.h Tue Mar 30 23:11:50 2010 (r205941) @@ -539,6 +539,7 @@ void nfsrvd_rcv(struct socket *, void *, #define NFSSTATESPINLOCK extern struct mtx nfs_state_mutex #define NFSLOCKSTATE() mtx_lock(&nfs_state_mutex) #define NFSUNLOCKSTATE() mtx_unlock(&nfs_state_mutex) +#define NFSSTATEMUTEXPTR (&nfs_state_mutex) #define NFSREQSPINLOCK extern struct mtx nfs_req_mutex #define NFSLOCKREQ() mtx_lock(&nfs_req_mutex) #define NFSUNLOCKREQ() mtx_unlock(&nfs_req_mutex) @@ -674,6 +675,7 @@ MALLOC_DECLARE(M_NEWNFSDIROFF); MALLOC_DECLARE(M_NEWNFSV4NODE); MALLOC_DECLARE(M_NEWNFSDIRECTIO); MALLOC_DECLARE(M_NEWNFSMNT); +MALLOC_DECLARE(M_NEWNFSDROLLBACK); #define M_NFSRVCACHE M_NEWNFSRVCACHE #define M_NFSDCLIENT M_NEWNFSDCLIENT #define M_NFSDSTATE M_NEWNFSDSTATE @@ -692,6 +694,7 @@ MALLOC_DECLARE(M_NEWNFSMNT); #define M_NFSDIROFF M_NEWNFSDIROFF #define M_NFSV4NODE M_NEWNFSV4NODE #define M_NFSDIRECTIO M_NEWNFSDIRECTIO +#define M_NFSDROLLBACK M_NEWNFSDROLLBACK #define NFSINT_SIGMASK(set) \ (SIGISMEMBER(set, SIGINT) || SIGISMEMBER(set, SIGTERM) || \ Modified: head/sys/fs/nfs/nfsrvstate.h ============================================================================== --- head/sys/fs/nfs/nfsrvstate.h Tue Mar 30 23:10:56 2010 (r205940) +++ head/sys/fs/nfs/nfsrvstate.h Tue Mar 30 23:11:50 2010 (r205941) @@ -185,6 +185,17 @@ struct nfslockconflict { }; /* + * This structure is used to keep track of local locks that might need + * to be rolled back. + */ +struct nfsrollback { + LIST_ENTRY(nfsrollback) rlck_list; + uint64_t rlck_first; + uint64_t rlck_end; + int rlck_type; +}; + +/* * This structure refers to a file for which lock(s) and/or open(s) exist. * Searched via hash table on file handle or found via the back pointer from an * open or lock owner. @@ -193,8 +204,12 @@ struct nfslockfile { LIST_HEAD(, nfsstate) lf_open; /* Open list */ LIST_HEAD(, nfsstate) lf_deleg; /* Delegation list */ LIST_HEAD(, nfslock) lf_lock; /* Lock list */ + LIST_HEAD(, nfslock) lf_locallock; /* Local lock list */ + LIST_HEAD(, nfsrollback) lf_rollback; /* Local lock rollback list */ LIST_ENTRY(nfslockfile) lf_hash; /* Hash list entry */ fhandle_t lf_fh; /* The file handle */ + struct nfsv4lock lf_locallock_lck; /* serialize local locking */ + int lf_usecount; /* Ref count for locking */ }; /* Modified: head/sys/fs/nfsserver/nfs_nfsdstate.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdstate.c Tue Mar 30 23:10:56 2010 (r205940) +++ head/sys/fs/nfsserver/nfs_nfsdstate.c Tue Mar 30 23:11:50 2010 (r205941) @@ -65,11 +65,11 @@ static void nfsrv_dumpaclient(struct nfs struct nfsd_dumpclients *dumpp); static void nfsrv_freeopenowner(struct nfsstate *stp, int cansleep, NFSPROC_T *p); -static int nfsrv_freeopen(struct nfsstate *stp, int *freedlockp, - int cansleep, NFSPROC_T *p); -static int nfsrv_freelockowner(struct nfsstate *stp, int *freedlockp, - int cansleep, NFSPROC_T *p); -static int nfsrv_freeallnfslocks(struct nfsstate *stp, int *freedlockp, +static int nfsrv_freeopen(struct nfsstate *stp, vnode_t vp, int cansleep, + NFSPROC_T *p); +static void nfsrv_freelockowner(struct nfsstate *stp, vnode_t vp, int cansleep, + NFSPROC_T *p); +static void nfsrv_freeallnfslocks(struct nfsstate *stp, vnode_t vp, int cansleep, NFSPROC_T *p); static void nfsrv_freenfslock(struct nfslock *lop); static void nfsrv_freenfslockfile(struct nfslockfile *lfp); @@ -80,8 +80,8 @@ static void nfsrv_getowner(struct nfssta struct nfsstate **stpp); static int nfsrv_getlockfh(vnode_t vp, u_short flags, struct nfslockfile **new_lfpp, fhandle_t *nfhp, NFSPROC_T *p); -static int nfsrv_getlockfile(u_short flags, - struct nfslockfile **new_lfpp, struct nfslockfile **lfpp, fhandle_t *nfhp); +static int nfsrv_getlockfile(u_short flags, struct nfslockfile **new_lfpp, + struct nfslockfile **lfpp, fhandle_t *nfhp, int lockit); static void nfsrv_insertlock(struct nfslock *new_lop, struct nfslock *insert_lop, struct nfsstate *stp, struct nfslockfile *lfp); static void nfsrv_updatelock(struct nfsstate *stp, struct nfslock **new_lopp, @@ -109,9 +109,20 @@ static time_t nfsrv_leaseexpiry(void); static void nfsrv_delaydelegtimeout(struct nfsstate *stp); static int nfsrv_checkseqid(struct nfsrv_descript *nd, u_int32_t seqid, struct nfsstate *stp, struct nfsrvcache *op); -static void nfsrv_locallocks(vnode_t vp, struct nfslockfile *lfp, - NFSPROC_T *p); static int nfsrv_nootherstate(struct nfsstate *stp); +static int nfsrv_locallock(vnode_t vp, struct nfslockfile *lfp, int flags, + uint64_t first, uint64_t end, struct nfslockconflict *cfp, NFSPROC_T *p); +static void nfsrv_localunlock(vnode_t vp, struct nfslockfile *lfp, + uint64_t init_first, uint64_t init_end, NFSPROC_T *p); +static int nfsrv_dolocal(vnode_t vp, struct nfslockfile *lfp, int flags, + int oldflags, uint64_t first, uint64_t end, struct nfslockconflict *cfp, + NFSPROC_T *p); +static void nfsrv_locallock_rollback(vnode_t vp, struct nfslockfile *lfp, + NFSPROC_T *p); +static void nfsrv_locallock_commit(struct nfslockfile *lfp, int flags, + uint64_t first, uint64_t end); +static void nfsrv_locklf(struct nfslockfile *lfp); +static void nfsrv_unlocklf(struct nfslockfile *lfp); /* * Scan the client list for a match and either return the current one, @@ -683,7 +694,7 @@ nfsrv_dumplocks(vnode_t vp, struct nfsd_ ret = nfsrv_getlockfh(vp, 0, NULL, &nfh, p); NFSLOCKSTATE(); if (!ret) - ret = nfsrv_getlockfile(0, NULL, &lfp, &nfh); + ret = nfsrv_getlockfile(0, NULL, &lfp, &nfh, 0); if (ret) { ldumpp[0].ndlck_clid.nclid_idlen = 0; NFSUNLOCKSTATE(); @@ -927,9 +938,8 @@ nfsrv_cleanclient(struct nfsclient *clp, { struct nfsstate *stp, *nstp; - LIST_FOREACH_SAFE(stp, &clp->lc_open, ls_list, nstp) { + LIST_FOREACH_SAFE(stp, &clp->lc_open, ls_list, nstp) nfsrv_freeopenowner(stp, 1, p); - } } /* @@ -993,7 +1003,10 @@ nfsrv_freedeleg(struct nfsstate *stp) LIST_REMOVE(stp, ls_file); lfp = stp->ls_lfp; if (LIST_EMPTY(&lfp->lf_open) && - LIST_EMPTY(&lfp->lf_lock) && LIST_EMPTY(&lfp->lf_deleg)) + LIST_EMPTY(&lfp->lf_lock) && LIST_EMPTY(&lfp->lf_deleg) && + LIST_EMPTY(&lfp->lf_locallock) && LIST_EMPTY(&lfp->lf_rollback) && + lfp->lf_usecount == 0 && + nfsv4_testlock(&lfp->lf_locallock_lck) == 0) nfsrv_freenfslockfile(lfp); FREE((caddr_t)stp, M_NFSDSTATE); newnfsstats.srvdelegates--; @@ -1031,16 +1044,14 @@ nfsrv_freeopenowner(struct nfsstate *stp * This function frees an open (nfsstate open structure) with all associated * lock_owners and locks. It also frees the nfslockfile structure iff there * are no other opens on the file. - * Must be called with soft clock interrupts disabled. * Returns 1 if it free'd the nfslockfile, 0 otherwise. */ static int -nfsrv_freeopen(struct nfsstate *stp, int *freedlockp, int cansleep, - NFSPROC_T *p) +nfsrv_freeopen(struct nfsstate *stp, vnode_t vp, int cansleep, NFSPROC_T *p) { struct nfsstate *nstp, *tstp; struct nfslockfile *lfp; - int ret = 0, ret2; + int ret; LIST_REMOVE(stp, ls_hash); LIST_REMOVE(stp, ls_list); @@ -1048,28 +1059,27 @@ nfsrv_freeopen(struct nfsstate *stp, int lfp = stp->ls_lfp; /* + * Now, free all lockowners associated with this open. + */ + LIST_FOREACH_SAFE(tstp, &stp->ls_open, ls_list, nstp) + nfsrv_freelockowner(tstp, vp, cansleep, p); + + /* * The nfslockfile is freed here if there are no locks * associated with the open. * If there are locks associated with the open, the * nfslockfile structure can be freed via nfsrv_freelockowner(). * (That is why the call must be here instead of after the loop.) */ - if (LIST_EMPTY(&lfp->lf_open) && LIST_EMPTY(&lfp->lf_lock) && - LIST_EMPTY(&lfp->lf_deleg)) { + if (lfp != NULL && LIST_EMPTY(&lfp->lf_open) && + LIST_EMPTY(&lfp->lf_deleg) && LIST_EMPTY(&lfp->lf_lock) && + LIST_EMPTY(&lfp->lf_locallock) && LIST_EMPTY(&lfp->lf_rollback) && + lfp->lf_usecount == 0 && + (cansleep != 0 || nfsv4_testlock(&lfp->lf_locallock_lck) == 0)) { nfsrv_freenfslockfile(lfp); ret = 1; - } - /* - * Now, free all lockowners associated with this open. - */ - nstp = LIST_FIRST(&stp->ls_open); - while (nstp != LIST_END(&stp->ls_open)) { - tstp = nstp; - nstp = LIST_NEXT(nstp, ls_list); - ret2 = nfsrv_freelockowner(tstp, freedlockp, cansleep, p); - if (ret == 0 && ret2 != 0) - ret = ret2; - } + } else + ret = 0; FREE((caddr_t)stp, M_NFSDSTATE); newnfsstats.srvopens--; nfsrv_openpluslock--; @@ -1078,79 +1088,76 @@ nfsrv_freeopen(struct nfsstate *stp, int /* * Frees a lockowner and all associated locks. - * It also frees the nfslockfile structure, if there are no more - * references to it. - * Must be called with soft clock interrupts disabled. - * Returns 1 if it free'd the nfslockfile structure, 1 otherwise. */ -static int -nfsrv_freelockowner(struct nfsstate *stp, int *freedlockp, int cansleep, +static void +nfsrv_freelockowner(struct nfsstate *stp, vnode_t vp, int cansleep, NFSPROC_T *p) { - int ret; LIST_REMOVE(stp, ls_hash); LIST_REMOVE(stp, ls_list); - ret = nfsrv_freeallnfslocks(stp, freedlockp, cansleep, p); + nfsrv_freeallnfslocks(stp, vp, cansleep, p); if (stp->ls_op) nfsrvd_derefcache(stp->ls_op); FREE((caddr_t)stp, M_NFSDSTATE); newnfsstats.srvlockowners--; nfsrv_openpluslock--; - return (ret); } /* * Free all the nfs locks on a lockowner. - * Returns 1 if it free'd the nfslockfile structure, 0 otherwise. - * If any byte range lock is free'd, *freedlockp is set to 1. */ -static int -nfsrv_freeallnfslocks(struct nfsstate *stp, int *freedlockp, int cansleep, +static void +nfsrv_freeallnfslocks(struct nfsstate *stp, vnode_t vp, int cansleep, NFSPROC_T *p) { struct nfslock *lop, *nlop; - struct nfslockfile *lfp = NULL, *olfp = NULL; - int ret = 0; + struct nfsrollback *rlp, *nrlp; + struct nfslockfile *lfp = NULL; + int gottvp = 0; + vnode_t tvp = NULL; lop = LIST_FIRST(&stp->ls_lock); while (lop != LIST_END(&stp->ls_lock)) { nlop = LIST_NEXT(lop, lo_lckowner); /* - * Since locks off a lockowner are ordered by - * file, you should update the local locks when - * you hit the next file OR the end of the lock - * list. If there are no locks for other owners, - * it must be done before the lockowner is discarded. - * (All this only applies if cansleep == 1.) + * Since all locks should be for the same file, lfp should + * not change. */ - olfp = lfp; - lfp = lop->lo_lfp; - nfsrv_freenfslock(lop); - if (freedlockp) - *freedlockp = 1; - if (LIST_EMPTY(&lfp->lf_open) && LIST_EMPTY(&lfp->lf_lock) && - LIST_EMPTY(&lfp->lf_deleg)) { - if (cansleep) - nfsrv_locallocks(NULL, lfp, p); - nfsrv_freenfslockfile(lfp); - /* - * Set the pointer(s) to this lockowner NULL, - * to indicate it has been free'd and local - * locks discarded already. - */ - if (olfp == lfp) - olfp = NULL; - lfp = NULL; - ret = 1; + if (lfp == NULL) + lfp = lop->lo_lfp; + else if (lfp != lop->lo_lfp) + panic("allnfslocks"); + /* + * If vp is NULL and cansleep != 0, a vnode must be acquired + * from the file handle. This only occurs when called from + * nfsrv_cleanclient(). + */ + if (gottvp == 0) { + if (nfsrv_dolocallocks == 0) + tvp = NULL; + else if (vp == NULL && cansleep != 0) + tvp = nfsvno_getvp(&lfp->lf_fh); + else + tvp = vp; + gottvp = 1; + } + + if (tvp != NULL) { + if (cansleep == 0) + panic("allnfs2"); + nfsrv_localunlock(tvp, lfp, lop->lo_first, + lop->lo_end, p); + LIST_FOREACH_SAFE(rlp, &lfp->lf_rollback, rlck_list, + nrlp) + free(rlp, M_NFSDROLLBACK); + LIST_INIT(&lfp->lf_rollback); } - if (cansleep && olfp != lfp && olfp != NULL) - nfsrv_locallocks(NULL, olfp, p); + nfsrv_freenfslock(lop); lop = nlop; } - if (cansleep && lfp != NULL) - nfsrv_locallocks(NULL, olfp, p); - return (ret); + if (vp == NULL && tvp != NULL) + vput(tvp); } /* @@ -1161,11 +1168,13 @@ static void nfsrv_freenfslock(struct nfslock *lop) { - LIST_REMOVE(lop, lo_lckfile); + if (lop->lo_lckfile.le_prev != NULL) { + LIST_REMOVE(lop, lo_lckfile); + newnfsstats.srvlocks--; + nfsrv_openpluslock--; + } LIST_REMOVE(lop, lo_lckowner); FREE((caddr_t)lop, M_NFSDLOCK); - newnfsstats.srvlocks--; - nfsrv_openpluslock--; } /* @@ -1240,7 +1249,8 @@ nfsrv_getowner(struct nfsstatehead *hp, APPLESTATIC int nfsrv_lockctrl(vnode_t vp, struct nfsstate **new_stpp, struct nfslock **new_lopp, struct nfslockconflict *cfp, - nfsquad_t clientid, nfsv4stateid_t *stateidp, __unused struct nfsexstuff *exp, + nfsquad_t clientid, nfsv4stateid_t *stateidp, + __unused struct nfsexstuff *exp, struct nfsrv_descript *nd, NFSPROC_T *p) { struct nfslock *lop; @@ -1253,9 +1263,11 @@ nfsrv_lockctrl(vnode_t vp, struct nfssta struct nfsstate *stp, *lckstp = NULL; struct nfsclient *clp = NULL; u_int32_t bits; - int error = 0, haslock = 0, ret; - int getlckret, delegation = 0; + int error = 0, haslock = 0, ret, reterr; + int getlckret, delegation = 0, filestruct_locked; fhandle_t nfh; + uint64_t first, end; + uint32_t lock_flags; if (new_stp->ls_flags & (NFSLCK_CHECK | NFSLCK_SETATTR)) { /* @@ -1290,23 +1302,6 @@ nfsrv_lockctrl(vnode_t vp, struct nfssta return (NFSERR_RESOURCE); /* - * For Lock, check for a conflict with a lock held by - * a process running locally on the server now, before - * monkeying with nfsd state. Since the vp is locked, any - * other local calls are blocked during this Op. - */ - if (new_stp->ls_flags & NFSLCK_LOCK) { - if (new_lop->lo_flags & NFSLCK_WRITE) - error = nfsvno_localconflict(vp, F_WRLCK, - new_lop->lo_first, new_lop->lo_end, cfp, p); - else - error = nfsvno_localconflict(vp, F_RDLCK, - new_lop->lo_first, new_lop->lo_end, cfp, p); - if (error) - return (error); - } - - /* * For the lock case, get another nfslock structure, * just in case we need it. * Malloc now, before we start sifting through the linked lists, @@ -1316,6 +1311,9 @@ tryagain: if (new_stp->ls_flags & NFSLCK_LOCK) MALLOC(other_lop, struct nfslock *, sizeof (struct nfslock), M_NFSDLOCK, M_WAITOK); + filestruct_locked = 0; + reterr = 0; + lfp = NULL; /* * Get the lockfile structure for CFH now, so we can do a sanity @@ -1324,22 +1322,41 @@ tryagain: * shouldn't be incremented for this case. * If nfsrv_getlockfile() returns -1, it means "not found", which * will be handled later. + * If we are doing Lock/LockU and local locking is enabled, sleep + * lock the nfslockfile structure. */ getlckret = nfsrv_getlockfh(vp, new_stp->ls_flags, NULL, &nfh, p); NFSLOCKSTATE(); - if (!getlckret) - getlckret = nfsrv_getlockfile(new_stp->ls_flags, NULL, - &lfp, &nfh); - if (getlckret != 0 && getlckret != -1) { - NFSUNLOCKSTATE(); - if (other_lop) - FREE((caddr_t)other_lop, M_NFSDLOCK); - if (haslock) { - NFSLOCKV4ROOTMUTEX(); - nfsv4_unlock(&nfsv4rootfs_lock, 1); - NFSUNLOCKV4ROOTMUTEX(); + if (getlckret == 0) { + if ((new_stp->ls_flags & (NFSLCK_LOCK | NFSLCK_UNLOCK)) != 0 && + nfsrv_dolocallocks != 0 && nd->nd_repstat == 0) { + getlckret = nfsrv_getlockfile(new_stp->ls_flags, NULL, + &lfp, &nfh, 1); + if (getlckret == 0) + filestruct_locked = 1; + } else + getlckret = nfsrv_getlockfile(new_stp->ls_flags, NULL, + &lfp, &nfh, 0); + } + if (getlckret != 0 && getlckret != -1) + reterr = getlckret; + + if (filestruct_locked != 0) { + LIST_INIT(&lfp->lf_rollback); + if ((new_stp->ls_flags & NFSLCK_LOCK)) { + /* + * For local locking, do the advisory locking now, so + * that any conflict can be detected. A failure later + * can be rolled back locally. If an error is returned, + * struct nfslockfile has been unlocked and any local + * locking rolled back. + */ + NFSUNLOCKSTATE(); + reterr = nfsrv_locallock(vp, lfp, + (new_lop->lo_flags & (NFSLCK_READ | NFSLCK_WRITE)), + new_lop->lo_first, new_lop->lo_end, cfp, p); + NFSLOCKSTATE(); } - return (getlckret); } /* @@ -1381,11 +1398,11 @@ tryagain: */ if (error == 0 && (stp->ls_flags & NFSLCK_OPEN) && ((stp->ls_openowner->ls_flags & NFSLCK_NEEDSCONFIRM) || - (getlckret != -1 && stp->ls_lfp != lfp))) + (getlckret == 0 && stp->ls_lfp != lfp))) error = NFSERR_BADSTATEID; if (error == 0 && (stp->ls_flags & (NFSLCK_DELEGREAD | NFSLCK_DELEGWRITE)) && - getlckret != -1 && stp->ls_lfp != lfp) + getlckret == 0 && stp->ls_lfp != lfp) error = NFSERR_BADSTATEID; /* @@ -1398,7 +1415,7 @@ tryagain: */ if (error == 0 && (stp->ls_flags & (NFSLCK_OPEN | NFSLCK_DELEGREAD | NFSLCK_DELEGWRITE)) == 0 && - getlckret != -1 && stp->ls_lfp != lfp) { + getlckret == 0 && stp->ls_lfp != lfp) { #ifdef DIAGNOSTIC printf("Got a lock statid for different file open\n"); #endif @@ -1478,12 +1495,30 @@ tryagain: nfsrv_markstable(clp); /* - * If nd_repstat is set, we can return that now, since the - * seqid# has been incremented. - */ - if (nd->nd_repstat && !error) - error = nd->nd_repstat; - if (error) { + * At this point, either error == NFSERR_BADSTATEID or the + * seqid# has been updated, so we can return any error. + * If error == 0, there may be an error in: + * nd_repstat - Set by the calling function. + * reterr - Set above, if getting the nfslockfile structure + * or acquiring the local lock failed. + * (If both of these are set, nd_repstat should probably be + * returned, since that error was detected before this + * function call.) + */ + if (error != 0 || nd->nd_repstat != 0 || reterr != 0) { + if (error == 0) { + if (nd->nd_repstat != 0) + error = nd->nd_repstat; + else + error = reterr; + } + if (filestruct_locked != 0) { + /* Roll back local locks. */ + NFSUNLOCKSTATE(); + nfsrv_locallock_rollback(vp, lfp, p); + NFSLOCKSTATE(); + nfsrv_unlocklf(lfp); + } NFSUNLOCKSTATE(); if (other_lop) FREE((caddr_t)other_lop, M_NFSDLOCK); @@ -1569,6 +1604,13 @@ tryagain: ((new_stp->ls_flags & (NFSLCK_CHECK|NFSLCK_WRITEACCESS)) == (NFSLCK_CHECK | NFSLCK_WRITEACCESS) && !(mystp->ls_flags & NFSLCK_WRITEACCESS))) { + if (filestruct_locked != 0) { + /* Roll back local locks. */ + NFSUNLOCKSTATE(); + nfsrv_locallock_rollback(vp, lfp, p); + NFSLOCKSTATE(); + nfsrv_unlocklf(lfp); + } NFSUNLOCKSTATE(); if (other_lop) FREE((caddr_t)other_lop, M_NFSDLOCK); @@ -1680,11 +1722,18 @@ tryagain: (new_lop->lo_flags & NFSLCK_WRITE) && (clp != tstp->ls_clp || (tstp->ls_flags & NFSLCK_DELEGREAD)))) { + if (filestruct_locked != 0) { + /* Roll back local locks. */ + NFSUNLOCKSTATE(); + nfsrv_locallock_rollback(vp, lfp, p); + NFSLOCKSTATE(); + nfsrv_unlocklf(lfp); + } ret = nfsrv_delegconflict(tstp, &haslock, p, vp); if (ret) { /* * nfsrv_delegconflict unlocks state when it - * returns non-zero. + * returns non-zero, which it always does. */ if (other_lop) { FREE((caddr_t)other_lop, M_NFSDLOCK); @@ -1696,6 +1745,7 @@ tryagain: } return (ret); } + /* Never gets here. */ } tstp = nstp; } @@ -1706,32 +1756,21 @@ tryagain: * just let it happen.) */ if (new_stp->ls_flags & NFSLCK_UNLOCK) { + first = new_lop->lo_first; + end = new_lop->lo_end; nfsrv_updatelock(stp, new_lopp, &other_lop, lfp); stateidp->seqid = ++(stp->ls_stateid.seqid); stateidp->other[0] = stp->ls_stateid.other[0]; stateidp->other[1] = stp->ls_stateid.other[1]; stateidp->other[2] = stp->ls_stateid.other[2]; - /* - * For a non-empty flp->lf_lock list, I believe - * nfsrv_locallocks() can safely traverse the list, including - * sleeping, for two reasons: - * 1 - The Lock/LockU/Close Ops all require a locked - * vnode for the file and we currently have that. - * 2 - The only other thing that modifies a non-empty - * list is nfsrv_cleanclient() and it is always - * done with the exclusive nfsv4rootfs_lock held. - * Since this Op in progress holds either a shared or - * exclusive lock on nfsv4rootfs_lock, that can't - * happen now. - * However, the structure pointed to by lfp can go - * in many places for an empty list, so that is handled - * by passing a NULL pointer to nfsrv_locallocks(). - * Do that check now, while we are still SMP safe. - */ - if (LIST_EMPTY(&lfp->lf_lock)) - lfp = NULL; + if (filestruct_locked != 0) { + NFSUNLOCKSTATE(); + /* Update the local locks. */ + nfsrv_localunlock(vp, lfp, first, end, p); + NFSLOCKSTATE(); + nfsrv_unlocklf(lfp); + } NFSUNLOCKSTATE(); - nfsrv_locallocks(vp, lfp, p); if (haslock) { NFSLOCKV4ROOTMUTEX(); nfsv4_unlock(&nfsv4rootfs_lock, 1); @@ -1763,6 +1802,13 @@ tryagain: } ret = nfsrv_clientconflict(lop->lo_stp->ls_clp,&haslock,vp,p); if (ret) { + if (filestruct_locked != 0) { + /* Roll back local locks. */ + nfsrv_locallock_rollback(vp, lfp, p); + NFSLOCKSTATE(); + nfsrv_unlocklf(lfp); + NFSUNLOCKSTATE(); + } /* * nfsrv_clientconflict() unlocks state when it * returns non-zero. @@ -1790,6 +1836,13 @@ tryagain: error = NFSERR_LOCKED; else error = NFSERR_DENIED; + if (filestruct_locked != 0) { + /* Roll back local locks. */ + NFSUNLOCKSTATE(); + nfsrv_locallock_rollback(vp, lfp, p); + NFSLOCKSTATE(); + nfsrv_unlocklf(lfp); + } NFSUNLOCKSTATE(); if (haslock) { NFSLOCKV4ROOTMUTEX(); @@ -1820,6 +1873,9 @@ tryagain: * - exist_lock_owner where lock_owner exists * - open_to_lock_owner with new lock_owner */ + first = new_lop->lo_first; + end = new_lop->lo_end; + lock_flags = new_lop->lo_flags; if (!(new_stp->ls_flags & NFSLCK_OPENTOLOCK)) { nfsrv_updatelock(lckstp, new_lopp, &other_lop, lfp); stateidp->seqid = ++(lckstp->ls_stateid.seqid); @@ -1854,11 +1910,13 @@ tryagain: newnfsstats.srvlockowners++; nfsrv_openpluslock++; } - /* See comment above, w.r.t. nfsrv_locallocks(). */ - if (LIST_EMPTY(&lfp->lf_lock)) - lfp = NULL; + if (filestruct_locked != 0) { + NFSUNLOCKSTATE(); + nfsrv_locallock_commit(lfp, lock_flags, first, end); + NFSLOCKSTATE(); + nfsrv_unlocklf(lfp); + } NFSUNLOCKSTATE(); - nfsrv_locallocks(vp, lfp, p); if (haslock) { NFSLOCKV4ROOTMUTEX(); nfsv4_unlock(&nfsv4rootfs_lock, 1); @@ -1984,7 +2042,7 @@ tryagain: error = getfhret; else error = nfsrv_getlockfile(new_stp->ls_flags, &new_lfp, &lfp, - NULL); + NULL, 0); if (new_lfp) FREE((caddr_t)new_lfp, M_NFSDLOCKFILE); if (error) { @@ -2227,7 +2285,7 @@ tryagain: error = getfhret; else error = nfsrv_getlockfile(new_stp->ls_flags, &new_lfp, &lfp, - NULL); + NULL, 0); if (new_lfp) FREE((caddr_t)new_lfp, M_NFSDLOCKFILE); if (error) { @@ -2775,7 +2833,7 @@ nfsrv_openupdate(vnode_t vp, struct nfss struct nfsclient *clp; struct nfslockfile *lfp; u_int32_t bits; - int error, gotstate = 0, len = 0, ret, freedlock; + int error, gotstate = 0, len = 0; u_char client[NFSV4_OPAQUELIMIT]; /* @@ -2863,26 +2921,19 @@ nfsrv_openupdate(vnode_t vp, struct nfss } else if (new_stp->ls_flags & NFSLCK_CLOSE) { ownerstp = stp->ls_openowner; lfp = stp->ls_lfp; - freedlock = 0; - ret = nfsrv_freeopen(stp, &freedlock, 0, p); - /* See comment on nfsrv_lockctrl() w.r.t. locallocks. */ - if (ret) { - lfp = NULL; + if (nfsrv_dolocallocks != 0 && !LIST_EMPTY(&stp->ls_open)) { + /* Get the lf lock */ + nfsrv_locklf(lfp); + NFSUNLOCKSTATE(); + if (nfsrv_freeopen(stp, vp, 1, p) == 0) { + NFSLOCKSTATE(); + nfsrv_unlocklf(lfp); + NFSUNLOCKSTATE(); + } } else { - if (LIST_EMPTY(&lfp->lf_lock)) - lfp = NULL; - } - /* - * For now, I won't do this. The openowner should be - * free'd in NFSNOOPEN seconds and it will be deref'd then. - if (LIST_EMPTY(&ownerstp->ls_open) && ownerstp->ls_op) { - nfsrvd_derefcache(ownerstp->ls_op); - ownerstp->ls_op = NULL; + (void) nfsrv_freeopen(stp, NULL, 0, p); + NFSUNLOCKSTATE(); } - */ - NFSUNLOCKSTATE(); - if (freedlock && lfp != NULL) - nfsrv_locallocks(vp, lfp, p); } else { /* * Update the share bits, making sure that the new set are a @@ -3024,7 +3075,7 @@ nfsrv_releaselckown(struct nfsstate *new !NFSBCMP(stp->ls_owner, new_stp->ls_owner, stp->ls_ownerlen)){ if (LIST_EMPTY(&stp->ls_lock)) { - (void) nfsrv_freelockowner(stp, NULL, 0, p); + nfsrv_freelockowner(stp, NULL, 0, p); } else { NFSUNLOCKSTATE(); return (NFSERR_LOCKSHELD); @@ -3072,7 +3123,7 @@ nfsrv_getlockfh(vnode_t vp, u_short flag */ static int nfsrv_getlockfile(u_short flags, struct nfslockfile **new_lfpp, - struct nfslockfile **lfpp, fhandle_t *nfhp) + struct nfslockfile **lfpp, fhandle_t *nfhp, int lockit) { struct nfslockfile *lfp; fhandle_t *fhp = NULL, *tfhp; @@ -3096,6 +3147,8 @@ nfsrv_getlockfile(u_short flags, struct LIST_FOREACH(lfp, hp, lf_hash) { tfhp = &lfp->lf_fh; if (NFSVNO_CMPFH(fhp, tfhp)) { + if (lockit) + nfsrv_locklf(lfp); *lfpp = lfp; return (0); } @@ -3109,6 +3162,11 @@ nfsrv_getlockfile(u_short flags, struct LIST_INIT(&new_lfp->lf_open); LIST_INIT(&new_lfp->lf_lock); LIST_INIT(&new_lfp->lf_deleg); + LIST_INIT(&new_lfp->lf_locallock); + LIST_INIT(&new_lfp->lf_rollback); + new_lfp->lf_locallock_lck.nfslock_usecnt = 0; + new_lfp->lf_locallock_lck.nfslock_lock = 0; + new_lfp->lf_usecount = 0; LIST_INSERT_HEAD(hp, new_lfp, lf_hash); *lfpp = new_lfp; *new_lfpp = NULL; @@ -3130,31 +3188,39 @@ nfsrv_insertlock(struct nfslock *new_lop new_lop->lo_stp = stp; new_lop->lo_lfp = lfp; - /* Insert in increasing lo_first order */ - lop = LIST_FIRST(&lfp->lf_lock); - if (lop == LIST_END(&lfp->lf_lock) || - new_lop->lo_first <= lop->lo_first) { - LIST_INSERT_HEAD(&lfp->lf_lock, new_lop, lo_lckfile); - } else { - nlop = LIST_NEXT(lop, lo_lckfile); - while (nlop != LIST_END(&lfp->lf_lock) && - nlop->lo_first < new_lop->lo_first) { - lop = nlop; + if (stp != NULL) { + /* Insert in increasing lo_first order */ + lop = LIST_FIRST(&lfp->lf_lock); + if (lop == LIST_END(&lfp->lf_lock) || + new_lop->lo_first <= lop->lo_first) { + LIST_INSERT_HEAD(&lfp->lf_lock, new_lop, lo_lckfile); + } else { nlop = LIST_NEXT(lop, lo_lckfile); + while (nlop != LIST_END(&lfp->lf_lock) && + nlop->lo_first < new_lop->lo_first) { + lop = nlop; + nlop = LIST_NEXT(lop, lo_lckfile); + } + LIST_INSERT_AFTER(lop, new_lop, lo_lckfile); } - LIST_INSERT_AFTER(lop, new_lop, lo_lckfile); + } else { + new_lop->lo_lckfile.le_prev = NULL; /* list not used */ } /* - * Insert after insert_lop, which is overloaded as stp for + * Insert after insert_lop, which is overloaded as stp or lfp for * an empty list. */ - if ((struct nfsstate *)insert_lop == stp) + if (stp == NULL && (struct nfslockfile *)insert_lop == lfp) + LIST_INSERT_HEAD(&lfp->lf_locallock, new_lop, lo_lckowner); + else if ((struct nfsstate *)insert_lop == stp) LIST_INSERT_HEAD(&stp->ls_lock, new_lop, lo_lckowner); else LIST_INSERT_AFTER(insert_lop, new_lop, lo_lckowner); - newnfsstats.srvlocks++; - nfsrv_openpluslock++; + if (stp != NULL) { + newnfsstats.srvlocks++; + nfsrv_openpluslock++; + } } /* @@ -3180,9 +3246,14 @@ nfsrv_updatelock(struct nfsstate *stp, s */ if (new_lop->lo_flags & NFSLCK_UNLOCK) unlock = 1; - ilop = (struct nfslock *)stp; - lop = LIST_FIRST(&stp->ls_lock); - while (lop != LIST_END(&stp->ls_lock)) { + if (stp != NULL) { + ilop = (struct nfslock *)stp; + lop = LIST_FIRST(&stp->ls_lock); + } else { + ilop = (struct nfslock *)lfp; + lop = LIST_FIRST(&lfp->lf_locallock); + } + while (lop != NULL) { /* * Only check locks for this file that aren't before the start of * new lock's range. @@ -3278,8 +3349,7 @@ nfsrv_updatelock(struct nfsstate *stp, s } ilop = lop; lop = LIST_NEXT(lop, lo_lckowner); - if (myfile && (lop == LIST_END(&stp->ls_lock) || - lop->lo_lfp != lfp)) + if (myfile && (lop == NULL || lop->lo_lfp != lfp)) break; } @@ -4362,7 +4432,7 @@ nfsrv_checkremove(vnode_t vp, int remove tryagain: NFSLOCKSTATE(); if (!error) - error = nfsrv_getlockfile(NFSLCK_CHECK, NULL, &lfp, &nfh); + error = nfsrv_getlockfile(NFSLCK_CHECK, NULL, &lfp, &nfh, 0); if (error) { NFSUNLOCKSTATE(); if (haslock) { @@ -4612,7 +4682,7 @@ nfsrv_checkgetattr(struct nfsrv_descript error = nfsrv_getlockfh(vp, NFSLCK_CHECK, NULL, &nfh, p); NFSLOCKSTATE(); if (!error) - error = nfsrv_getlockfile(NFSLCK_CHECK, NULL, &lfp, &nfh); + error = nfsrv_getlockfile(NFSLCK_CHECK, NULL, &lfp, &nfh, 0); if (error) { NFSUNLOCKSTATE(); if (error == -1) @@ -4783,112 +4853,252 @@ nfsrv_delaydelegtimeout(struct nfsstate } /* - * Go through a lock list and set local locks for all ranges. - * This assumes that the lock list is sorted on increasing - * lo_first and that the list won't change, despite the possibility - * of sleeps. + * This function checks to see if there is any other state associated + * with the openowner for this Open. + * It returns 1 if there is no other state, 0 otherwise. */ -static void -nfsrv_locallocks(vnode_t vp, struct nfslockfile *lfp, - NFSPROC_T *p) +static int +nfsrv_nootherstate(struct nfsstate *stp) { - struct nfslock *lop, *nlop; - vnode_t tvp; - int newcollate, flags = 0; - u_int64_t first = 0x0ull, end = 0x0ull; + struct nfsstate *tstp; - if (!nfsrv_dolocallocks) - return; - /* - * If vp is NULL, a vnode must be aquired from the file - * handle. - */ - if (vp == NULL) { - if (lfp == NULL) - panic("nfsrv_locallocks"); - tvp = nfsvno_getvp(&lfp->lf_fh); - if (tvp == NULL) - return; - } else { - tvp = vp; + LIST_FOREACH(tstp, &stp->ls_openowner->ls_open, ls_list) { + if (tstp != stp || !LIST_EMPTY(&tstp->ls_lock)) + return (0); } + return (1); +} - /* - * If lfp == NULL, the lock list is empty, so just unlock - * everything. - */ - if (lfp == NULL) { - (void) nfsvno_advlock(tvp, F_UNLCK, (u_int64_t)0, - NFS64BITSSET, p); - /* vp can't be NULL */ - return; - } +/* + * Create a list of lock deltas (changes to local byte range locking + * that can be rolled back using the list) and apply the changes via + * nfsvno_advlock(). Optionally, lock the list. It is expected that either + * the rollback or update function will be called after this. + * It returns an error (and rolls back, as required), if any nfsvno_advlock() + * call fails. If it returns an error, it will unlock the list. + */ +static int +nfsrv_locallock(vnode_t vp, struct nfslockfile *lfp, int flags, + uint64_t first, uint64_t end, struct nfslockconflict *cfp, NFSPROC_T *p) +{ + struct nfslock *lop, *nlop; + int error = 0; - /* handle whole file case first */ - lop = LIST_FIRST(&lfp->lf_lock); - if (lop != LIST_END(&lfp->lf_lock) && - lop->lo_first == (u_int64_t)0 && - lop->lo_end == NFS64BITSSET) { - if (lop->lo_flags & NFSLCK_WRITE) - (void) nfsvno_advlock(tvp, F_WRLCK, lop->lo_first, - lop->lo_end, p); - else - (void) nfsvno_advlock(tvp, F_RDLCK, lop->lo_first, - lop->lo_end, p); - if (vp == NULL) - vput(tvp); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Mar 30 23:14:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F3C8D1065672; Tue, 30 Mar 2010 23:14:35 +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 E37308FC22; Tue, 30 Mar 2010 23:14: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 o2UNEZCO023825; Tue, 30 Mar 2010 23:14:35 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2UNEZpl023823; Tue, 30 Mar 2010 23:14:35 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201003302314.o2UNEZpl023823@svn.freebsd.org> From: Xin LI Date: Tue, 30 Mar 2010 23:14: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: r205942 - head/bin/pax X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Mar 2010 23:14:36 -0000 Author: delphij Date: Tue Mar 30 23:14:35 2010 New Revision: 205942 URL: http://svn.freebsd.org/changeset/base/205942 Log: Merge OpenBSD revisions 1.4 through 1.9, mostly style cleanups. Obtained from: OpenBSD MFC after: 3 month Modified: head/bin/pax/getoldopt.c Modified: head/bin/pax/getoldopt.c ============================================================================== --- head/bin/pax/getoldopt.c Tue Mar 30 23:11:50 2010 (r205941) +++ head/bin/pax/getoldopt.c Tue Mar 30 23:14:35 2010 (r205942) @@ -1,4 +1,4 @@ -/* $OpenBSD: getoldopt.c,v 1.4 2000/01/22 20:24:51 deraadt Exp $ */ +/* $OpenBSD: getoldopt.c,v 1.9 2009/10/27 23:59:22 deraadt Exp $ */ /* $NetBSD: getoldopt.c,v 1.3 1995/03/21 09:07:28 cgd Exp $ */ /*- @@ -7,7 +7,7 @@ * otherwise, it uses the old rules used by tar, dump, and ps. * * Written 25 August 1985 by John Gilmore (ihnp4!hoptoad!gnu) and placed - * in the Pubic Domain for your edification and enjoyment. + * in the Public Domain for your edification and enjoyment. */ #include @@ -33,7 +33,8 @@ getoldopt(int argc, char **argv, const c optarg = NULL; if (key == NULL) { /* First time */ - if (argc < 2) return EOF; + if (argc < 2) + return (-1); key = argv[1]; if (*key == '-') use_getopt++; @@ -42,18 +43,18 @@ getoldopt(int argc, char **argv, const c } if (use_getopt) - return getopt(argc, argv, optstring); + return (getopt(argc, argv, optstring)); c = *key++; if (c == '\0') { key--; - return EOF; + return (-1); } place = strchr(optstring, c); if (place == NULL || c == ':') { fprintf(stderr, "%s: unknown option %c\n", argv[0], c); - return('?'); + return ('?'); } place++; @@ -64,9 +65,9 @@ getoldopt(int argc, char **argv, const c } else { fprintf(stderr, "%s: %c argument missing\n", argv[0], c); - return('?'); + return ('?'); } } - return(c); + return (c); } From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 00:19:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16155106567F; Wed, 31 Mar 2010 00:19:40 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0595B8FC0C; Wed, 31 Mar 2010 00:19: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 o2V0JdZw038298; Wed, 31 Mar 2010 00:19:39 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2V0Jd7l038296; Wed, 31 Mar 2010 00:19:39 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201003310019.o2V0Jd7l038296@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 31 Mar 2010 00:19: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: r205944 - head/sys/dev/cxgb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 00:19:40 -0000 Author: np Date: Wed Mar 31 00:19:39 2010 New Revision: 205944 URL: http://svn.freebsd.org/changeset/base/205944 Log: Refresh the firmware version immediately after it is upgraded (or downgraded). MFC after: 3 days Modified: head/sys/dev/cxgb/cxgb_main.c Modified: head/sys/dev/cxgb/cxgb_main.c ============================================================================== --- head/sys/dev/cxgb/cxgb_main.c Tue Mar 30 23:15:06 2010 (r205943) +++ head/sys/dev/cxgb/cxgb_main.c Wed Mar 31 00:19:39 2010 (r205944) @@ -378,17 +378,25 @@ upgrade_fw(adapter_t *sc) { const struct firmware *fw; int status; + u32 vers; if ((fw = firmware_get(FW_FNAME)) == NULL) { device_printf(sc->dev, "Could not find firmware image %s\n", FW_FNAME); return (ENOENT); } else - device_printf(sc->dev, "updating firmware on card\n"); + device_printf(sc->dev, "installing firmware on card\n"); status = t3_load_fw(sc, (const uint8_t *)fw->data, fw->datasize); - device_printf(sc->dev, "firmware update returned %s %d\n", - status == 0 ? "success" : "fail", status); - + if (status != 0) { + device_printf(sc->dev, "failed to install firmware: %d\n", + status); + } else { + t3_get_fw_version(sc, &vers); + snprintf(&sc->fw_version[0], sizeof(sc->fw_version), "%d.%d.%d", + G_FW_VERSION_MAJOR(vers), G_FW_VERSION_MINOR(vers), + G_FW_VERSION_MICRO(vers)); + } + firmware_put(fw, FIRMWARE_UNLOAD); return (status); From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 00:21:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3ED51106566C; Wed, 31 Mar 2010 00:21:57 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2C08F8FC1B; Wed, 31 Mar 2010 00:21: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 o2V0Lv7K038842; Wed, 31 Mar 2010 00:21:57 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2V0LvDP038840; Wed, 31 Mar 2010 00:21:57 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201003310021.o2V0LvDP038840@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 31 Mar 2010 00:21: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: r205945 - head/sys/dev/cxgb/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, 31 Mar 2010 00:21:57 -0000 Author: np Date: Wed Mar 31 00:21:56 2010 New Revision: 205945 URL: http://svn.freebsd.org/changeset/base/205945 Log: Improved PHY EDC settings. MFC after: 3 days Modified: head/sys/dev/cxgb/common/cxgb_ael1002.c Modified: head/sys/dev/cxgb/common/cxgb_ael1002.c ============================================================================== --- head/sys/dev/cxgb/common/cxgb_ael1002.c Wed Mar 31 00:19:39 2010 (r205944) +++ head/sys/dev/cxgb/common/cxgb_ael1002.c Wed Mar 31 00:21:56 2010 (r205945) @@ -1447,395 +1447,439 @@ static int ael2020_setup_twinax_edc(stru 0xd803, 0x40aa, 0xd804, 0x401c, 0xd805, 0x401e, - 0xd806, 0x2ff4, - 0xd807, 0x3dc4, - 0xd808, 0x2035, - 0xd809, 0x3035, - 0xd80a, 0x6524, - 0xd80b, 0x2cb2, - 0xd80c, 0x3012, - 0xd80d, 0x1002, - 0xd80e, 0x26e2, - 0xd80f, 0x3022, - 0xd810, 0x1002, - 0xd811, 0x27d2, - 0xd812, 0x3022, + 0xd806, 0x20c5, + 0xd807, 0x3c05, + 0xd808, 0x6536, + 0xd809, 0x2fe4, + 0xd80a, 0x3dc4, + 0xd80b, 0x6624, + 0xd80c, 0x2ff4, + 0xd80d, 0x3dc4, + 0xd80e, 0x2035, + 0xd80f, 0x30a5, + 0xd810, 0x6524, + 0xd811, 0x2ca2, + 0xd812, 0x3012, 0xd813, 0x1002, - 0xd814, 0x2822, - 0xd815, 0x3012, + 0xd814, 0x27e2, + 0xd815, 0x3022, 0xd816, 0x1002, - 0xd817, 0x2492, + 0xd817, 0x28d2, 0xd818, 0x3022, 0xd819, 0x1002, - 0xd81a, 0x2772, + 0xd81a, 0x2892, 0xd81b, 0x3012, 0xd81c, 0x1002, - 0xd81d, 0x23d2, + 0xd81d, 0x24e2, 0xd81e, 0x3022, 0xd81f, 0x1002, - 0xd820, 0x22cd, - 0xd821, 0x301d, - 0xd822, 0x27f2, - 0xd823, 0x3022, - 0xd824, 0x1002, - 0xd825, 0x5553, - 0xd826, 0x0307, - 0xd827, 0x2522, - 0xd828, 0x3022, - 0xd829, 0x1002, - 0xd82a, 0x2142, - 0xd82b, 0x3012, - 0xd82c, 0x1002, - 0xd82d, 0x4016, - 0xd82e, 0x5e63, - 0xd82f, 0x0344, - 0xd830, 0x2142, + 0xd820, 0x27e2, + 0xd821, 0x3012, + 0xd822, 0x1002, + 0xd823, 0x2422, + 0xd824, 0x3022, + 0xd825, 0x1002, + 0xd826, 0x22cd, + 0xd827, 0x301d, + 0xd828, 0x28f2, + 0xd829, 0x3022, + 0xd82a, 0x1002, + 0xd82b, 0x5553, + 0xd82c, 0x0307, + 0xd82d, 0x2572, + 0xd82e, 0x3022, + 0xd82f, 0x1002, + 0xd830, 0x21a2, 0xd831, 0x3012, 0xd832, 0x1002, - 0xd833, 0x400e, - 0xd834, 0x2522, - 0xd835, 0x3022, - 0xd836, 0x1002, - 0xd837, 0x2b52, - 0xd838, 0x3012, - 0xd839, 0x1002, - 0xd83a, 0x2742, + 0xd833, 0x4016, + 0xd834, 0x5e63, + 0xd835, 0x0344, + 0xd836, 0x21a2, + 0xd837, 0x3012, + 0xd838, 0x1002, + 0xd839, 0x400e, + 0xd83a, 0x2572, 0xd83b, 0x3022, 0xd83c, 0x1002, - 0xd83d, 0x25e2, - 0xd83e, 0x3022, + 0xd83d, 0x2b22, + 0xd83e, 0x3012, 0xd83f, 0x1002, - 0xd840, 0x2fa4, - 0xd841, 0x3dc4, - 0xd842, 0x6624, - 0xd843, 0x414b, - 0xd844, 0x56b3, - 0xd845, 0x03c6, - 0xd846, 0x866b, - 0xd847, 0x400c, - 0xd848, 0x2712, - 0xd849, 0x3012, - 0xd84a, 0x1002, - 0xd84b, 0x2c4b, - 0xd84c, 0x309b, - 0xd84d, 0x56b3, - 0xd84e, 0x03c3, - 0xd84f, 0x866b, - 0xd850, 0x400c, - 0xd851, 0x2272, - 0xd852, 0x3022, - 0xd853, 0x1002, - 0xd854, 0x2742, - 0xd855, 0x3022, - 0xd856, 0x1002, - 0xd857, 0x25e2, - 0xd858, 0x3022, - 0xd859, 0x1002, - 0xd85a, 0x2fb4, - 0xd85b, 0x3dc4, - 0xd85c, 0x6624, - 0xd85d, 0x56b3, - 0xd85e, 0x03c3, - 0xd85f, 0x866b, - 0xd860, 0x401c, - 0xd861, 0x2c45, - 0xd862, 0x3095, - 0xd863, 0x5b53, - 0xd864, 0x2372, - 0xd865, 0x3012, - 0xd866, 0x13c2, - 0xd867, 0x5cc3, - 0xd868, 0x2712, - 0xd869, 0x3012, - 0xd86a, 0x1312, - 0xd86b, 0x2b52, + 0xd840, 0x2842, + 0xd841, 0x3022, + 0xd842, 0x1002, + 0xd843, 0x26e2, + 0xd844, 0x3022, + 0xd845, 0x1002, + 0xd846, 0x2fa4, + 0xd847, 0x3dc4, + 0xd848, 0x6624, + 0xd849, 0x2e8b, + 0xd84a, 0x303b, + 0xd84b, 0x56b3, + 0xd84c, 0x03c6, + 0xd84d, 0x866b, + 0xd84e, 0x400c, + 0xd84f, 0x2782, + 0xd850, 0x3012, + 0xd851, 0x1002, + 0xd852, 0x2c4b, + 0xd853, 0x309b, + 0xd854, 0x56b3, + 0xd855, 0x03c3, + 0xd856, 0x866b, + 0xd857, 0x400c, + 0xd858, 0x22a2, + 0xd859, 0x3022, + 0xd85a, 0x1002, + 0xd85b, 0x2842, + 0xd85c, 0x3022, + 0xd85d, 0x1002, + 0xd85e, 0x26e2, + 0xd85f, 0x3022, + 0xd860, 0x1002, + 0xd861, 0x2fb4, + 0xd862, 0x3dc4, + 0xd863, 0x6624, + 0xd864, 0x56b3, + 0xd865, 0x03c3, + 0xd866, 0x866b, + 0xd867, 0x401c, + 0xd868, 0x2c45, + 0xd869, 0x3095, + 0xd86a, 0x5b53, + 0xd86b, 0x23d2, 0xd86c, 0x3012, - 0xd86d, 0x1002, - 0xd86e, 0x2742, - 0xd86f, 0x3022, - 0xd870, 0x1002, - 0xd871, 0x2582, - 0xd872, 0x3022, - 0xd873, 0x1002, - 0xd874, 0x2142, - 0xd875, 0x3012, - 0xd876, 0x1002, - 0xd877, 0x628f, - 0xd878, 0x2985, - 0xd879, 0x33a5, - 0xd87a, 0x25e2, - 0xd87b, 0x3022, - 0xd87c, 0x1002, - 0xd87d, 0x5653, - 0xd87e, 0x03d2, - 0xd87f, 0x401e, - 0xd880, 0x6f72, - 0xd881, 0x1002, - 0xd882, 0x628f, - 0xd883, 0x2304, - 0xd884, 0x3c84, - 0xd885, 0x6436, - 0xd886, 0xdff4, - 0xd887, 0x6436, - 0xd888, 0x2ff5, - 0xd889, 0x3005, - 0xd88a, 0x8656, - 0xd88b, 0xdfba, - 0xd88c, 0x56a3, - 0xd88d, 0xd05a, - 0xd88e, 0x2972, - 0xd88f, 0x3012, - 0xd890, 0x1392, - 0xd891, 0xd05a, - 0xd892, 0x56a3, - 0xd893, 0xdfba, - 0xd894, 0x0383, - 0xd895, 0x6f72, - 0xd896, 0x1002, - 0xd897, 0x2b45, - 0xd898, 0x3005, - 0xd899, 0x4178, - 0xd89a, 0x5653, - 0xd89b, 0x0384, - 0xd89c, 0x2a62, - 0xd89d, 0x3012, - 0xd89e, 0x1002, - 0xd89f, 0x2f05, - 0xd8a0, 0x3005, - 0xd8a1, 0x41c8, - 0xd8a2, 0x5653, - 0xd8a3, 0x0382, - 0xd8a4, 0x0002, - 0xd8a5, 0x4218, - 0xd8a6, 0x2474, - 0xd8a7, 0x3c84, - 0xd8a8, 0x6437, - 0xd8a9, 0xdff4, - 0xd8aa, 0x6437, - 0xd8ab, 0x2ff5, - 0xd8ac, 0x3c05, - 0xd8ad, 0x8757, - 0xd8ae, 0xb888, - 0xd8af, 0x9787, - 0xd8b0, 0xdff4, - 0xd8b1, 0x6724, - 0xd8b2, 0x866a, - 0xd8b3, 0x6f72, - 0xd8b4, 0x1002, - 0xd8b5, 0x2641, - 0xd8b6, 0x3021, - 0xd8b7, 0x1001, - 0xd8b8, 0xc620, - 0xd8b9, 0x0000, - 0xd8ba, 0xc621, - 0xd8bb, 0x0000, - 0xd8bc, 0xc622, - 0xd8bd, 0x00ce, - 0xd8be, 0xc623, - 0xd8bf, 0x007f, - 0xd8c0, 0xc624, - 0xd8c1, 0x0032, - 0xd8c2, 0xc625, - 0xd8c3, 0x0000, - 0xd8c4, 0xc627, - 0xd8c5, 0x0000, - 0xd8c6, 0xc628, - 0xd8c7, 0x0000, - 0xd8c8, 0xc62c, + 0xd86d, 0x13c2, + 0xd86e, 0x5cc3, + 0xd86f, 0x2782, + 0xd870, 0x3012, + 0xd871, 0x1312, + 0xd872, 0x2b22, + 0xd873, 0x3012, + 0xd874, 0x1002, + 0xd875, 0x2842, + 0xd876, 0x3022, + 0xd877, 0x1002, + 0xd878, 0x2622, + 0xd879, 0x3022, + 0xd87a, 0x1002, + 0xd87b, 0x21a2, + 0xd87c, 0x3012, + 0xd87d, 0x1002, + 0xd87e, 0x628f, + 0xd87f, 0x2985, + 0xd880, 0x33a5, + 0xd881, 0x26e2, + 0xd882, 0x3022, + 0xd883, 0x1002, + 0xd884, 0x5653, + 0xd885, 0x03d2, + 0xd886, 0x401e, + 0xd887, 0x6f72, + 0xd888, 0x1002, + 0xd889, 0x628f, + 0xd88a, 0x2304, + 0xd88b, 0x3c84, + 0xd88c, 0x6436, + 0xd88d, 0xdff4, + 0xd88e, 0x6436, + 0xd88f, 0x2ff5, + 0xd890, 0x3005, + 0xd891, 0x8656, + 0xd892, 0xdfba, + 0xd893, 0x56a3, + 0xd894, 0xd05a, + 0xd895, 0x29e2, + 0xd896, 0x3012, + 0xd897, 0x1392, + 0xd898, 0xd05a, + 0xd899, 0x56a3, + 0xd89a, 0xdfba, + 0xd89b, 0x0383, + 0xd89c, 0x6f72, + 0xd89d, 0x1002, + 0xd89e, 0x2a64, + 0xd89f, 0x3014, + 0xd8a0, 0x2005, + 0xd8a1, 0x3d75, + 0xd8a2, 0xc451, + 0xd8a3, 0x29a2, + 0xd8a4, 0x3022, + 0xd8a5, 0x1002, + 0xd8a6, 0x178c, + 0xd8a7, 0x1898, + 0xd8a8, 0x19a4, + 0xd8a9, 0x1ab0, + 0xd8aa, 0x1bbc, + 0xd8ab, 0x1cc8, + 0xd8ac, 0x1dd3, + 0xd8ad, 0x1ede, + 0xd8ae, 0x1fe9, + 0xd8af, 0x20f4, + 0xd8b0, 0x21ff, + 0xd8b1, 0x0000, + 0xd8b2, 0x2741, + 0xd8b3, 0x3021, + 0xd8b4, 0x1001, + 0xd8b5, 0xc620, + 0xd8b6, 0x0000, + 0xd8b7, 0xc621, + 0xd8b8, 0x0000, + 0xd8b9, 0xc622, + 0xd8ba, 0x00e2, + 0xd8bb, 0xc623, + 0xd8bc, 0x007f, + 0xd8bd, 0xc624, + 0xd8be, 0x00ce, + 0xd8bf, 0xc625, + 0xd8c0, 0x0000, + 0xd8c1, 0xc627, + 0xd8c2, 0x0000, + 0xd8c3, 0xc628, + 0xd8c4, 0x0000, + 0xd8c5, 0xc90a, + 0xd8c6, 0x3a7c, + 0xd8c7, 0xc62c, + 0xd8c8, 0x0000, 0xd8c9, 0x0000, - 0xd8ca, 0x0000, - 0xd8cb, 0x2641, - 0xd8cc, 0x3021, - 0xd8cd, 0x1001, - 0xd8ce, 0xc502, - 0xd8cf, 0x53ac, - 0xd8d0, 0xc503, - 0xd8d1, 0x2cd3, - 0xd8d2, 0xc600, - 0xd8d3, 0x2a6e, - 0xd8d4, 0xc601, - 0xd8d5, 0x2a2c, - 0xd8d6, 0xc605, - 0xd8d7, 0x5557, - 0xd8d8, 0xc60c, - 0xd8d9, 0x5400, - 0xd8da, 0xc710, - 0xd8db, 0x0700, - 0xd8dc, 0xc711, - 0xd8dd, 0x0f06, - 0xd8de, 0xc718, - 0xd8df, 0x0700, - 0xd8e0, 0xc719, - 0xd8e1, 0x0f06, - 0xd8e2, 0xc720, - 0xd8e3, 0x4700, - 0xd8e4, 0xc721, - 0xd8e5, 0x0f06, - 0xd8e6, 0xc728, - 0xd8e7, 0x0700, - 0xd8e8, 0xc729, - 0xd8e9, 0x1207, - 0xd8ea, 0xc801, - 0xd8eb, 0x7f50, - 0xd8ec, 0xc802, - 0xd8ed, 0x7760, - 0xd8ee, 0xc803, - 0xd8ef, 0x7fce, - 0xd8f0, 0xc804, - 0xd8f1, 0x520e, - 0xd8f2, 0xc805, - 0xd8f3, 0x5c11, - 0xd8f4, 0xc806, - 0xd8f5, 0x3c51, - 0xd8f6, 0xc807, - 0xd8f7, 0x4061, - 0xd8f8, 0xc808, - 0xd8f9, 0x49c1, - 0xd8fa, 0xc809, - 0xd8fb, 0x3840, - 0xd8fc, 0xc80a, - 0xd8fd, 0x0000, - 0xd8fe, 0xc821, - 0xd8ff, 0x0002, - 0xd900, 0xc822, - 0xd901, 0x0046, - 0xd902, 0xc844, - 0xd903, 0x182f, - 0xd904, 0xc013, - 0xd905, 0xf341, - 0xd906, 0xc084, - 0xd907, 0x0030, - 0xd908, 0xc904, - 0xd909, 0x1401, - 0xd90a, 0xcb0c, - 0xd90b, 0x0004, - 0xd90c, 0xcb0e, - 0xd90d, 0xa00a, - 0xd90e, 0xcb0f, - 0xd90f, 0xc0c0, - 0xd910, 0xcb10, - 0xd911, 0xc0c0, - 0xd912, 0xcb11, - 0xd913, 0x00a0, - 0xd914, 0xcb12, - 0xd915, 0x0007, - 0xd916, 0xc241, - 0xd917, 0xa000, - 0xd918, 0xc243, - 0xd919, 0x7fe0, - 0xd91a, 0xc604, - 0xd91b, 0x000e, - 0xd91c, 0xc609, - 0xd91d, 0x00f5, - 0xd91e, 0xc611, - 0xd91f, 0x000e, - 0xd920, 0xc660, - 0xd921, 0x9600, - 0xd922, 0xc687, - 0xd923, 0x0004, - 0xd924, 0xc60a, - 0xd925, 0x04f5, - 0xd926, 0x0000, - 0xd927, 0x2641, - 0xd928, 0x3021, - 0xd929, 0x1001, - 0xd92a, 0xc620, - 0xd92b, 0x14e5, - 0xd92c, 0xc621, - 0xd92d, 0xc53d, - 0xd92e, 0xc622, - 0xd92f, 0x3cbe, - 0xd930, 0xc623, - 0xd931, 0x4452, - 0xd932, 0xc624, - 0xd933, 0xc5c5, - 0xd934, 0xc625, - 0xd935, 0xe01e, - 0xd936, 0xc627, - 0xd937, 0x0000, - 0xd938, 0xc628, - 0xd939, 0x0000, - 0xd93a, 0xc62c, - 0xd93b, 0x0000, + 0xd8ca, 0x2741, + 0xd8cb, 0x3021, + 0xd8cc, 0x1001, + 0xd8cd, 0xc502, + 0xd8ce, 0x53ac, + 0xd8cf, 0xc503, + 0xd8d0, 0x2cd3, + 0xd8d1, 0xc600, + 0xd8d2, 0x2a6e, + 0xd8d3, 0xc601, + 0xd8d4, 0x2a2c, + 0xd8d5, 0xc605, + 0xd8d6, 0x5557, + 0xd8d7, 0xc60c, + 0xd8d8, 0x5400, + 0xd8d9, 0xc710, + 0xd8da, 0x0700, + 0xd8db, 0xc711, + 0xd8dc, 0x0f06, + 0xd8dd, 0xc718, + 0xd8de, 0x700, + 0xd8df, 0xc719, + 0xd8e0, 0x0f06, + 0xd8e1, 0xc720, + 0xd8e2, 0x4700, + 0xd8e3, 0xc721, + 0xd8e4, 0x0f06, + 0xd8e5, 0xc728, + 0xd8e6, 0x0700, + 0xd8e7, 0xc729, + 0xd8e8, 0x1207, + 0xd8e9, 0xc801, + 0xd8ea, 0x7f50, + 0xd8eb, 0xc802, + 0xd8ec, 0x7760, + 0xd8ed, 0xc803, + 0xd8ee, 0x7fce, + 0xd8ef, 0xc804, + 0xd8f0, 0x520e, + 0xd8f1, 0xc805, + 0xd8f2, 0x5c11, + 0xd8f3, 0xc806, + 0xd8f4, 0x3c51, + 0xd8f5, 0xc807, + 0xd8f6, 0x4061, + 0xd8f7, 0xc808, + 0xd8f8, 0x49c1, + 0xd8f9, 0xc809, + 0xd8fa, 0x3840, + 0xd8fb, 0xc80a, + 0xd8fc, 0x0000, + 0xd8fd, 0xc821, + 0xd8fe, 0x0002, + 0xd8ff, 0xc822, + 0xd900, 0x0046, + 0xd901, 0xc844, + 0xd902, 0x182f, + 0xd903, 0xc849, + 0xd904, 0x0400, + 0xd905, 0xc84a, + 0xd906, 0x0002, + 0xd907, 0xc013, + 0xd908, 0xf341, + 0xd909, 0xc084, + 0xd90a, 0x0030, + 0xd90b, 0xc904, + 0xd90c, 0x1401, + 0xd90d, 0xcb0c, + 0xd90e, 0x0004, + 0xd90f, 0xcb0e, + 0xd910, 0xa00a, + 0xd911, 0xcb0f, + 0xd912, 0xc0c0, + 0xd913, 0xcb10, + 0xd914, 0xc0c0, + 0xd915, 0xcb11, + 0xd916, 0x00a0, + 0xd917, 0xcb12, + 0xd918, 0x0007, + 0xd919, 0xc241, + 0xd91a, 0xa000, + 0xd91b, 0xc243, + 0xd91c, 0x7fe0, + 0xd91d, 0xc604, + 0xd91e, 0x000e, + 0xd91f, 0xc609, + 0xd920, 0x00f5, + 0xd921, 0xc611, + 0xd922, 0x000e, + 0xd923, 0xc660, + 0xd924, 0x9600, + 0xd925, 0xc687, + 0xd926, 0x0004, + 0xd927, 0xc60a, + 0xd928, 0x04f5, + 0xd929, 0x0000, + 0xd92a, 0x2741, + 0xd92b, 0x3021, + 0xd92c, 0x1001, + 0xd92d, 0xc620, + 0xd92e, 0x14e5, + 0xd92f, 0xc621, + 0xd930, 0xc53d, + 0xd931, 0xc622, + 0xd932, 0x3cbe, + 0xd933, 0xc623, + 0xd934, 0x4452, + 0xd935, 0xc624, + 0xd936, 0xc5c5, + 0xd937, 0xc625, + 0xd938, 0xe01e, + 0xd939, 0xc627, + 0xd93a, 0x0000, + 0xd93b, 0xc628, 0xd93c, 0x0000, - 0xd93d, 0x2b84, - 0xd93e, 0x3c74, - 0xd93f, 0x6435, - 0xd940, 0xdff4, - 0xd941, 0x6435, - 0xd942, 0x2806, - 0xd943, 0x3006, - 0xd944, 0x8565, - 0xd945, 0x2b24, - 0xd946, 0x3c24, - 0xd947, 0x6436, - 0xd948, 0x1002, - 0xd949, 0x2b24, - 0xd94a, 0x3c24, - 0xd94b, 0x6436, - 0xd94c, 0x4045, - 0xd94d, 0x8656, - 0xd94e, 0x5663, - 0xd94f, 0x0302, - 0xd950, 0x401e, - 0xd951, 0x1002, - 0xd952, 0x2807, - 0xd953, 0x31a7, - 0xd954, 0x20c4, - 0xd955, 0x3c24, - 0xd956, 0x6724, - 0xd957, 0x1002, - 0xd958, 0x2807, - 0xd959, 0x3187, - 0xd95a, 0x20c4, - 0xd95b, 0x3c24, - 0xd95c, 0x6724, - 0xd95d, 0x1002, - 0xd95e, 0x24f4, - 0xd95f, 0x3c64, - 0xd960, 0x6436, - 0xd961, 0xdff4, - 0xd962, 0x6436, - 0xd963, 0x1002, - 0xd964, 0x2006, - 0xd965, 0x3d76, - 0xd966, 0xc161, - 0xd967, 0x6134, - 0xd968, 0x6135, - 0xd969, 0x5443, - 0xd96a, 0x0303, - 0xd96b, 0x6524, - 0xd96c, 0x00fb, + 0xd93d, 0xc62c, + 0xd93e, 0x0000, + 0xd93f, 0xc90a, + 0xd940, 0x3a7c, + 0xd941, 0x0000, + 0xd942, 0x2b84, + 0xd943, 0x3c74, + 0xd944, 0x6435, + 0xd945, 0xdff4, + 0xd946, 0x6435, + 0xd947, 0x2806, + 0xd948, 0x3006, + 0xd949, 0x8565, + 0xd94a, 0x2b24, + 0xd94b, 0x3c24, + 0xd94c, 0x6436, + 0xd94d, 0x1002, + 0xd94e, 0x2b24, + 0xd94f, 0x3c24, + 0xd950, 0x6436, + 0xd951, 0x4045, + 0xd952, 0x8656, + 0xd953, 0x5663, + 0xd954, 0x0302, + 0xd955, 0x401e, + 0xd956, 0x1002, + 0xd957, 0x2807, + 0xd958, 0x31a7, + 0xd959, 0x20c4, + 0xd95a, 0x3c24, + 0xd95b, 0x6724, + 0xd95c, 0x2ff7, + 0xd95d, 0x30f7, + 0xd95e, 0x20c4, + 0xd95f, 0x3c04, + 0xd960, 0x6724, + 0xd961, 0x1002, + 0xd962, 0x2807, + 0xd963, 0x3187, + 0xd964, 0x20c4, + 0xd965, 0x3c24, + 0xd966, 0x6724, + 0xd967, 0x2fe4, + 0xd968, 0x3dc4, + 0xd969, 0x6437, + 0xd96a, 0x20c4, + 0xd96b, 0x3c04, + 0xd96c, 0x6724, 0xd96d, 0x1002, - 0xd96e, 0x20d4, - 0xd96f, 0x3c24, - 0xd970, 0x2025, - 0xd971, 0x3005, - 0xd972, 0x6524, + 0xd96e, 0x24f4, + 0xd96f, 0x3c64, + 0xd970, 0x6436, + 0xd971, 0xdff4, + 0xd972, 0x6436, 0xd973, 0x1002, - 0xd974, 0xd019, - 0xd975, 0x2104, - 0xd976, 0x3c24, - 0xd977, 0x2105, - 0xd978, 0x3805, - 0xd979, 0x6524, - 0xd97a, 0xdff4, - 0xd97b, 0x4005, - 0xd97c, 0x6524, - 0xd97d, 0x2e8d, - 0xd97e, 0x303d, - 0xd97f, 0x2408, - 0xd980, 0x35d8, - 0xd981, 0x5dd3, - 0xd982, 0x0307, - 0xd983, 0x8887, - 0xd984, 0x63a7, - 0xd985, 0x8887, - 0xd986, 0x63a7, - 0xd987, 0xdffd, - 0xd988, 0x00f9, - 0xd989, 0x1002, - 0xd98a, 0x0000, + 0xd974, 0x2006, + 0xd975, 0x3d76, + 0xd976, 0xc161, + 0xd977, 0x6134, + 0xd978, 0x6135, + 0xd979, 0x5443, + 0xd97a, 0x0303, + 0xd97b, 0x6524, + 0xd97c, 0x00fb, + 0xd97d, 0x1002, + 0xd97e, 0x20d4, + 0xd97f, 0x3c24, + 0xd980, 0x2025, + 0xd981, 0x3005, + 0xd982, 0x6524, + 0xd983, 0x1002, + 0xd984, 0xd019, + 0xd985, 0x2104, + 0xd986, 0x3c24, + 0xd987, 0x2105, + 0xd988, 0x3805, + 0xd989, 0x6524, + 0xd98a, 0xdff4, + 0xd98b, 0x4005, + 0xd98c, 0x6524, + 0xd98d, 0x2e8d, + 0xd98e, 0x303d, + 0xd98f, 0x2408, + 0xd990, 0x35d8, + 0xd991, 0x5dd3, + 0xd992, 0x0307, + 0xd993, 0x8887, + 0xd994, 0x63a7, + 0xd995, 0x8887, + 0xd996, 0x63a7, + 0xd997, 0xdffd, + 0xd998, 0x00f9, + 0xd999, 0x1002, + 0xd99a, 0x866a, + 0xd99b, 0x6138, + 0xd99c, 0x5883, + 0xd99d, 0x2aa2, + 0xd99e, 0x3022, + 0xd99f, 0x1302, + 0xd9a0, 0x2ff7, + 0xd9a1, 0x3007, + 0xd9a2, 0x8785, + 0xd9a3, 0xb887, + 0xd9a4, 0x8786, + 0xd9a5, 0xb8c6, + 0xd9a6, 0x5a53, + 0xd9a7, 0x29b2, + 0xd9a8, 0x3022, + 0xd9a9, 0x13c2, + 0xd9aa, 0x2474, + 0xd9ab, 0x3c84, + 0xd9ac, 0x64d7, + 0xd9ad, 0x64d7, + 0xd9ae, 0x2ff5, + 0xd9af, 0x3c05, + 0xd9b0, 0x8757, + 0xd9b1, 0xb886, + 0xd9b2, 0x9767, + 0xd9b3, 0x67c4, + 0xd9b4, 0x6f72, + 0xd9b5, 0x1002, + 0xd9b6, 0x0000, }; int i, err; @@ -1956,10 +2000,14 @@ static struct reg_val ael2020_reset_regs { MDIO_DEV_PMA_PMD, 0xcd40, 0xffff, 0x0001 }, + { MDIO_DEV_PMA_PMD, 0xca12, 0xffff, 0x0100 }, + { MDIO_DEV_PMA_PMD, 0xca22, 0xffff, 0x0100 }, + { MDIO_DEV_PMA_PMD, 0xca42, 0xffff, 0x0100 }, { MDIO_DEV_PMA_PMD, 0xff02, 0xffff, 0x0023 }, { MDIO_DEV_PMA_PMD, 0xff03, 0xffff, 0x0000 }, { MDIO_DEV_PMA_PMD, 0xff04, 0xffff, 0x0000 }, + { MDIO_DEV_PMA_PMD, 0xc20d, 0xffff, 0x0002 }, /* end */ { 0, 0, 0, 0 } }; @@ -1987,6 +2035,7 @@ static int ael2020_reset(struct cphy *ph err = set_phy_regs(phy, ael2020_reset_regs); if (err) return err; + msleep(100); /* determine module type and perform appropriate initialization */ err = ael2020_get_module_type(phy, 0); @@ -2091,6 +2140,8 @@ int t3_ael2020_phy_prep(pinfo_t *pinfo, err = set_phy_regs(phy, ael2020_reset_regs); if (err) return err; + msleep(100); + err = ael2020_get_module_type(phy, 0); if (err >= 0) phy->modtype = err; From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 00:22:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 93CC2106564A; Wed, 31 Mar 2010 00:22:58 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8389B8FC18; Wed, 31 Mar 2010 00:22: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 o2V0Mwcs039125; Wed, 31 Mar 2010 00:22:58 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2V0MwJO039123; Wed, 31 Mar 2010 00:22:58 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201003310022.o2V0MwJO039123@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 31 Mar 2010 00:22:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205946 - head/sys/dev/cxgb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 00:22:58 -0000 Author: np Date: Wed Mar 31 00:22:58 2010 New Revision: 205946 URL: http://svn.freebsd.org/changeset/base/205946 Log: Do not attempt to retrieve interrupt information before it is available. MFC after: 3 days Modified: head/sys/dev/cxgb/cxgb_main.c Modified: head/sys/dev/cxgb/cxgb_main.c ============================================================================== --- head/sys/dev/cxgb/cxgb_main.c Wed Mar 31 00:21:56 2010 (r205945) +++ head/sys/dev/cxgb/cxgb_main.c Wed Mar 31 00:22:58 2010 (r205946) @@ -2715,7 +2715,9 @@ cxgb_extension_ioctl(struct cdev *dev, u t->cong_thres = q->cong_thres; t->qnum = i; - if (sc->flags & USING_MSIX) + if ((sc->flags & FULL_INIT_DONE) == 0) + t->vector = 0; + else if (sc->flags & USING_MSIX) t->vector = rman_get_start(sc->msix_irq_res[i]); else t->vector = rman_get_start(sc->irq_res); From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 00:24:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0A6C1065670; Wed, 31 Mar 2010 00:24:44 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C6E408FC1D; Wed, 31 Mar 2010 00:24: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 o2V0Oiqn039523; Wed, 31 Mar 2010 00:24:44 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2V0Oin8039521; Wed, 31 Mar 2010 00:24:44 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201003310024.o2V0Oin8039521@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 31 Mar 2010 00:24: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: r205947 - head/sys/dev/cxgb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 00:24:45 -0000 Author: np Date: Wed Mar 31 00:24:44 2010 New Revision: 205947 URL: http://svn.freebsd.org/changeset/base/205947 Log: Fix build with "nooptions INET" Requested by: bz MFC after: 3 days Modified: head/sys/dev/cxgb/cxgb_sge.c Modified: head/sys/dev/cxgb/cxgb_sge.c ============================================================================== --- head/sys/dev/cxgb/cxgb_sge.c Wed Mar 31 00:22:58 2010 (r205946) +++ head/sys/dev/cxgb/cxgb_sge.c Wed Mar 31 00:24:44 2010 (r205947) @@ -30,6 +30,8 @@ POSSIBILITY OF SUCH DAMAGE. #include __FBSDID("$FreeBSD$"); +#include "opt_inet.h" + #include #include #include @@ -2060,7 +2062,9 @@ t3_free_qset(adapter_t *sc, struct sge_q MTX_DESTROY(&q->rspq.lock); } +#ifdef INET tcp_lro_free(&q->lro.ctrl); +#endif bzero(q, sizeof(*q)); } @@ -2647,11 +2651,13 @@ t3_sge_alloc_qset(adapter_t *sc, u_int i /* Allocate and setup the lro_ctrl structure */ q->lro.enabled = !!(pi->ifp->if_capenable & IFCAP_LRO); +#ifdef INET ret = tcp_lro_init(&q->lro.ctrl); if (ret) { printf("error %d from tcp_lro_init\n", ret); goto err; } +#endif q->lro.ctrl.ifp = pi->ifp; mtx_lock_spin(&sc->sge.reg_lock); @@ -3059,8 +3065,11 @@ process_responses(adapter_t *adap, struc */ skip_lro = __predict_false(qs->port->ifp != m->m_pkthdr.rcvif); - if (lro_enabled && lro_ctrl->lro_cnt && !skip_lro && - (tcp_lro_rx(lro_ctrl, m, 0) == 0)) { + if (lro_enabled && lro_ctrl->lro_cnt && !skip_lro +#ifdef INET + && (tcp_lro_rx(lro_ctrl, m, 0) == 0) +#endif + ) { /* successfully queue'd for LRO */ } else { /* @@ -3081,12 +3090,14 @@ process_responses(adapter_t *adap, struc deliver_partial_bundle(&adap->tdev, rspq, offload_mbufs, ngathered); +#ifdef INET /* Flush LRO */ while (!SLIST_EMPTY(&lro_ctrl->lro_active)) { struct lro_entry *queued = SLIST_FIRST(&lro_ctrl->lro_active); SLIST_REMOVE_HEAD(&lro_ctrl->lro_active, next); tcp_lro_flush(lro_ctrl, queued); } +#endif if (sleeping) check_ring_db(adap, qs, sleeping); From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 00:26:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C6BB7106564A; Wed, 31 Mar 2010 00:26:02 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B66758FC15; Wed, 31 Mar 2010 00:26: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 o2V0Q2EY039858; Wed, 31 Mar 2010 00:26:02 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2V0Q2rr039854; Wed, 31 Mar 2010 00:26:02 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201003310026.o2V0Q2rr039854@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 31 Mar 2010 00:26: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: r205948 - head/sys/dev/cxgb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 00:26:03 -0000 Author: np Date: Wed Mar 31 00:26:02 2010 New Revision: 205948 URL: http://svn.freebsd.org/changeset/base/205948 Log: Fix tx drop statistics. MFC after: 3 days Modified: head/sys/dev/cxgb/cxgb_adapter.h head/sys/dev/cxgb/cxgb_main.c head/sys/dev/cxgb/cxgb_sge.c Modified: head/sys/dev/cxgb/cxgb_adapter.h ============================================================================== --- head/sys/dev/cxgb/cxgb_adapter.h Wed Mar 31 00:24:44 2010 (r205947) +++ head/sys/dev/cxgb/cxgb_adapter.h Wed Mar 31 00:26:02 2010 (r205948) @@ -248,7 +248,6 @@ struct sge_txq { struct callout txq_timer; struct callout txq_watchdog; uint64_t txq_coalesced; - uint32_t txq_drops; uint32_t txq_skipped; uint32_t txq_enqueued; uint32_t txq_dump_start; Modified: head/sys/dev/cxgb/cxgb_main.c ============================================================================== --- head/sys/dev/cxgb/cxgb_main.c Wed Mar 31 00:24:44 2010 (r205947) +++ head/sys/dev/cxgb/cxgb_main.c Wed Mar 31 00:26:02 2010 (r205948) @@ -2423,6 +2423,7 @@ cxgb_tick_handler(void *arg, int count) struct ifnet *ifp = pi->ifp; struct cmac *mac = &pi->mac; struct mac_stats *mstats = &mac->stats; + int drops, j; if (!isset(&sc->open_device_map, pi->port_id)) continue; @@ -2431,34 +2432,20 @@ cxgb_tick_handler(void *arg, int count) t3_mac_update_stats(mac); PORT_UNLOCK(pi); - ifp->if_opackets = - mstats->tx_frames_64 + - mstats->tx_frames_65_127 + - mstats->tx_frames_128_255 + - mstats->tx_frames_256_511 + - mstats->tx_frames_512_1023 + - mstats->tx_frames_1024_1518 + - mstats->tx_frames_1519_max; - - ifp->if_ipackets = - mstats->rx_frames_64 + - mstats->rx_frames_65_127 + - mstats->rx_frames_128_255 + - mstats->rx_frames_256_511 + - mstats->rx_frames_512_1023 + - mstats->rx_frames_1024_1518 + - mstats->rx_frames_1519_max; - + ifp->if_opackets = mstats->tx_frames; + ifp->if_ipackets = mstats->rx_frames; ifp->if_obytes = mstats->tx_octets; ifp->if_ibytes = mstats->rx_octets; ifp->if_omcasts = mstats->tx_mcast_frames; ifp->if_imcasts = mstats->rx_mcast_frames; - - ifp->if_collisions = - mstats->tx_total_collisions; - + ifp->if_collisions = mstats->tx_total_collisions; ifp->if_iqdrops = mstats->rx_cong_drops; - + + drops = 0; + for (j = pi->first_qset; j < pi->first_qset + pi->nqsets; j++) + drops += sc->sge.qs[j].txq[TXQ_ETH].txq_mr->br_drops; + ifp->if_snd.ifq_drops = drops; + ifp->if_oerrors = mstats->tx_excess_collisions + mstats->tx_underrun + Modified: head/sys/dev/cxgb/cxgb_sge.c ============================================================================== --- head/sys/dev/cxgb/cxgb_sge.c Wed Mar 31 00:24:44 2010 (r205947) +++ head/sys/dev/cxgb/cxgb_sge.c Wed Mar 31 00:26:02 2010 (r205948) @@ -3599,10 +3599,9 @@ t3_add_configured_sysctls(adapter_t *sc) CTLTYPE_STRING | CTLFLAG_RD, &qs->rspq, 0, t3_dump_rspq, "A", "dump of the response queue"); - - SYSCTL_ADD_INT(ctx, txqpoidlist, OID_AUTO, "dropped", - CTLFLAG_RD, &qs->txq[TXQ_ETH].txq_drops, - 0, "#tunneled packets dropped"); + SYSCTL_ADD_QUAD(ctx, txqpoidlist, OID_AUTO, "dropped", + CTLFLAG_RD, &qs->txq[TXQ_ETH].txq_mr->br_drops, + "#tunneled packets dropped"); SYSCTL_ADD_INT(ctx, txqpoidlist, OID_AUTO, "sendqlen", CTLFLAG_RD, &qs->txq[TXQ_ETH].sendq.qlen, 0, "#tunneled packets waiting to be sent"); From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 00:26:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 210ED106566C; Wed, 31 Mar 2010 00:26:36 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 10DA88FC08; Wed, 31 Mar 2010 00:26: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 o2V0QZMA040028; Wed, 31 Mar 2010 00:26:35 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2V0QZcS040026; Wed, 31 Mar 2010 00:26:35 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201003310026.o2V0QZcS040026@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 31 Mar 2010 00:26: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: r205949 - head/sys/dev/cxgb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 00:26:36 -0000 Author: np Date: Wed Mar 31 00:26:35 2010 New Revision: 205949 URL: http://svn.freebsd.org/changeset/base/205949 Log: Fix signed/unsigned mix-up that allowed txq->in_use to grow beyond txq->size. Modified: head/sys/dev/cxgb/cxgb_sge.c Modified: head/sys/dev/cxgb/cxgb_sge.c ============================================================================== --- head/sys/dev/cxgb/cxgb_sge.c Wed Mar 31 00:26:02 2010 (r205948) +++ head/sys/dev/cxgb/cxgb_sge.c Wed Mar 31 00:26:35 2010 (r205949) @@ -1638,12 +1638,9 @@ cxgb_start_locked(struct sge_qset *qs) { struct mbuf *m_head = NULL; struct sge_txq *txq = &qs->txq[TXQ_ETH]; - int avail, txmax; int in_use_init = txq->in_use; struct port_info *pi = qs->port; struct ifnet *ifp = pi->ifp; - avail = txq->size - txq->in_use - 4; - txmax = min(TX_START_MAX_DESC, avail); if (qs->qs_flags & (QS_FLUSHING|QS_TIMEOUT)) reclaim_completed_tx(qs, 0, TXQ_ETH); @@ -1653,12 +1650,14 @@ cxgb_start_locked(struct sge_qset *qs) return; } TXQ_LOCK_ASSERT(qs); - while ((txq->in_use - in_use_init < txmax) && - !TXQ_RING_EMPTY(qs) && - (ifp->if_drv_flags & IFF_DRV_RUNNING) && + while ((txq->in_use - in_use_init < TX_START_MAX_DESC) && + !TXQ_RING_EMPTY(qs) && (ifp->if_drv_flags & IFF_DRV_RUNNING) && pi->link_config.link_ok) { reclaim_completed_tx(qs, cxgb_tx_reclaim_threshold, TXQ_ETH); + if (txq->size - txq->in_use <= TX_MAX_DESC) + break; + if ((m_head = cxgb_dequeue(qs)) == NULL) break; /* @@ -1697,7 +1696,7 @@ cxgb_transmit_locked(struct ifnet *ifp, * - there is space in hardware transmit queue */ if (check_pkt_coalesce(qs) == 0 && - !TXQ_RING_NEEDS_ENQUEUE(qs) && avail > 4) { + !TXQ_RING_NEEDS_ENQUEUE(qs) && avail > TX_MAX_DESC) { if (t3_encap(qs, &m)) { if (m != NULL && (error = drbr_enqueue(ifp, br, m)) != 0) From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 00:27:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 419741065673; Wed, 31 Mar 2010 00:27:50 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2FFDF8FC13; Wed, 31 Mar 2010 00:27:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2V0RoAm040329; Wed, 31 Mar 2010 00:27:50 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2V0RoFn040323; Wed, 31 Mar 2010 00:27:50 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201003310027.o2V0RoFn040323@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 31 Mar 2010 00:27:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205950 - in head/sys/dev/cxgb: . 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, 31 Mar 2010 00:27:50 -0000 Author: np Date: Wed Mar 31 00:27:49 2010 New Revision: 205950 URL: http://svn.freebsd.org/changeset/base/205950 Log: Multiple fixes related to queue set sizing and resources: - Only the tunnelq (TXQ_ETH) requires a buf_ring, an ifq, and the watchdog/timer callouts. Do not allocate these for the other tx queues. - Use 16k jumbo clusters only on offload capable cards by default. - Do not allocate a full tx ring for the offload queue if the card is not offload capable. - Slightly better freelist size calculation. - Fix nmbjumbo4 typo, remove unneeded global variables. MFC after: 3 days Modified: head/sys/dev/cxgb/common/cxgb_common.h head/sys/dev/cxgb/common/cxgb_t3_hw.c head/sys/dev/cxgb/cxgb_adapter.h head/sys/dev/cxgb/cxgb_main.c head/sys/dev/cxgb/cxgb_sge.c Modified: head/sys/dev/cxgb/common/cxgb_common.h ============================================================================== --- head/sys/dev/cxgb/common/cxgb_common.h Wed Mar 31 00:26:35 2010 (r205949) +++ head/sys/dev/cxgb/common/cxgb_common.h Wed Mar 31 00:27:49 2010 (r205950) @@ -314,6 +314,7 @@ struct qset_params { / unsigned int rspq_size; /* # of entries in response queue */ unsigned int fl_size; /* # of entries in regular free list */ unsigned int jumbo_size; /* # of entries in jumbo free list */ + unsigned int jumbo_buf_size; /* buffer size of jumbo entry */ unsigned int txq_size[SGE_TXQ_PER_SET]; /* Tx queue sizes */ unsigned int cong_thres; /* FL congestion threshold */ unsigned int vector; /* Interrupt (line or vector) number */ Modified: head/sys/dev/cxgb/common/cxgb_t3_hw.c ============================================================================== --- head/sys/dev/cxgb/common/cxgb_t3_hw.c Wed Mar 31 00:26:35 2010 (r205949) +++ head/sys/dev/cxgb/common/cxgb_t3_hw.c Wed Mar 31 00:27:49 2010 (r205950) @@ -4467,8 +4467,6 @@ int __devinit t3_prep_adapter(adapter_t if (reset && t3_reset_adapter(adapter)) return -1; - t3_sge_prep(adapter, &adapter->params.sge); - if (adapter->params.vpd.mclk) { struct tp_params *p = &adapter->params.tp; @@ -4497,6 +4495,8 @@ int __devinit t3_prep_adapter(adapter_t t3_mc7_size(&adapter->pmtx) && t3_mc7_size(&adapter->cm); + t3_sge_prep(adapter, &adapter->params.sge); + if (is_offload(adapter)) { adapter->params.mc5.nservers = DEFAULT_NSERVERS; /* PR 6487. TOE and filtering are mutually exclusive */ Modified: head/sys/dev/cxgb/cxgb_adapter.h ============================================================================== --- head/sys/dev/cxgb/cxgb_adapter.h Wed Mar 31 00:26:35 2010 (r205949) +++ head/sys/dev/cxgb/cxgb_adapter.h Wed Mar 31 00:27:49 2010 (r205950) @@ -141,6 +141,8 @@ enum { #define JUMBO_Q_SIZE 1024 #define RSPQ_Q_SIZE 1024 #define TX_ETH_Q_SIZE 1024 +#define TX_OFLD_Q_SIZE 1024 +#define TX_CTRL_Q_SIZE 256 enum { TXQ_ETH = 0, TXQ_OFLD = 1, Modified: head/sys/dev/cxgb/cxgb_main.c ============================================================================== --- head/sys/dev/cxgb/cxgb_main.c Wed Mar 31 00:26:35 2010 (r205949) +++ head/sys/dev/cxgb/cxgb_main.c Wed Mar 31 00:27:49 2010 (r205950) @@ -218,9 +218,9 @@ TUNABLE_INT("hw.cxgb.force_fw_update", & SYSCTL_UINT(_hw_cxgb, OID_AUTO, force_fw_update, CTLFLAG_RDTUN, &force_fw_update, 0, "update firmware even if up to date"); -int cxgb_use_16k_clusters = 1; +int cxgb_use_16k_clusters = -1; TUNABLE_INT("hw.cxgb.use_16k_clusters", &cxgb_use_16k_clusters); -SYSCTL_UINT(_hw_cxgb, OID_AUTO, use_16k_clusters, CTLFLAG_RDTUN, +SYSCTL_INT(_hw_cxgb, OID_AUTO, use_16k_clusters, CTLFLAG_RDTUN, &cxgb_use_16k_clusters, 0, "use 16kB clusters for the jumbo queue "); /* Modified: head/sys/dev/cxgb/cxgb_sge.c ============================================================================== --- head/sys/dev/cxgb/cxgb_sge.c Wed Mar 31 00:26:35 2010 (r205949) +++ head/sys/dev/cxgb/cxgb_sge.c Wed Mar 31 00:27:49 2010 (r205950) @@ -119,13 +119,9 @@ SYSCTL_UINT(_hw_cxgb, OID_AUTO, tx_recla * we have an m_ext */ static int recycle_enable = 0; -int cxgb_ext_freed = 0; -int cxgb_ext_inited = 0; -int fl_q_size = 0; -int jumbo_q_size = 0; extern int cxgb_use_16k_clusters; -extern int nmbjumbo4; +extern int nmbjumbop; extern int nmbjumbo9; extern int nmbjumbo16; @@ -532,21 +528,30 @@ t3_sge_err_intr_handler(adapter_t *adapt void t3_sge_prep(adapter_t *adap, struct sge_params *p) { - int i, nqsets; + int i, nqsets, fl_q_size, jumbo_q_size, use_16k, jumbo_buf_size; - nqsets = min(SGE_QSETS, mp_ncpus*4); + nqsets = min(SGE_QSETS / adap->params.nports, mp_ncpus); + nqsets *= adap->params.nports; fl_q_size = min(nmbclusters/(3*nqsets), FL_Q_SIZE); while (!powerof2(fl_q_size)) fl_q_size--; + + use_16k = cxgb_use_16k_clusters != -1 ? cxgb_use_16k_clusters : + is_offload(adap); + #if __FreeBSD_version >= 700111 - if (cxgb_use_16k_clusters) + if (use_16k) { jumbo_q_size = min(nmbjumbo16/(3*nqsets), JUMBO_Q_SIZE); - else + jumbo_buf_size = MJUM16BYTES; + } else { jumbo_q_size = min(nmbjumbo9/(3*nqsets), JUMBO_Q_SIZE); + jumbo_buf_size = MJUM9BYTES; + } #else - jumbo_q_size = min(nmbjumbo4/(3*nqsets), JUMBO_Q_SIZE); + jumbo_q_size = min(nmbjumbop/(3*nqsets), JUMBO_Q_SIZE); + jumbo_buf_size = MJUMPAGESIZE; #endif while (!powerof2(jumbo_q_size)) jumbo_q_size--; @@ -555,8 +560,7 @@ t3_sge_prep(adapter_t *adap, struct sge_ device_printf(adap->dev, "Insufficient clusters and/or jumbo buffers.\n"); - /* XXX Does ETHER_ALIGN need to be accounted for here? */ - p->max_pkt_size = adap->sge.qs[0].fl[1].buf_size - sizeof(struct cpl_rx_data); + p->max_pkt_size = jumbo_buf_size - sizeof(struct cpl_rx_data); for (i = 0; i < SGE_QSETS; ++i) { struct qset_params *q = p->qset + i; @@ -574,9 +578,10 @@ t3_sge_prep(adapter_t *adap, struct sge_ q->rspq_size = RSPQ_Q_SIZE; q->fl_size = fl_q_size; q->jumbo_size = jumbo_q_size; + q->jumbo_buf_size = jumbo_buf_size; q->txq_size[TXQ_ETH] = TX_ETH_Q_SIZE; - q->txq_size[TXQ_OFLD] = 1024; - q->txq_size[TXQ_CTRL] = 256; + q->txq_size[TXQ_OFLD] = is_offload(adap) ? TX_OFLD_Q_SIZE : 16; + q->txq_size[TXQ_CTRL] = TX_CTRL_Q_SIZE; q->cong_thres = 0; } } @@ -2004,15 +2009,13 @@ t3_free_qset(adapter_t *sc, struct sge_q int i; reclaim_completed_tx(q, 0, TXQ_ETH); - for (i = 0; i < SGE_TXQ_PER_SET; i++) { - if (q->txq[i].txq_mr != NULL) - buf_ring_free(q->txq[i].txq_mr, M_DEVBUF); - if (q->txq[i].txq_ifq != NULL) { - ifq_delete(q->txq[i].txq_ifq); - free(q->txq[i].txq_ifq, M_DEVBUF); - } + if (q->txq[TXQ_ETH].txq_mr != NULL) + buf_ring_free(q->txq[TXQ_ETH].txq_mr, M_DEVBUF); + if (q->txq[TXQ_ETH].txq_ifq != NULL) { + ifq_delete(q->txq[TXQ_ETH].txq_ifq); + free(q->txq[TXQ_ETH].txq_ifq, M_DEVBUF); } - + for (i = 0; i < SGE_RXQ_PER_SET; ++i) { if (q->fl[i].desc) { mtx_lock_spin(&sc->sge.reg_lock); @@ -2549,25 +2552,22 @@ t3_sge_alloc_qset(adapter_t *sc, u_int i MTX_INIT(&q->lock, q->namebuf, NULL, MTX_DEF); q->port = pi; - for (i = 0; i < SGE_TXQ_PER_SET; i++) { - - if ((q->txq[i].txq_mr = buf_ring_alloc(cxgb_txq_buf_ring_size, - M_DEVBUF, M_WAITOK, &q->lock)) == NULL) { - device_printf(sc->dev, "failed to allocate mbuf ring\n"); - goto err; - } - if ((q->txq[i].txq_ifq = - malloc(sizeof(struct ifaltq), M_DEVBUF, M_NOWAIT|M_ZERO)) - == NULL) { - device_printf(sc->dev, "failed to allocate ifq\n"); - goto err; - } - ifq_init(q->txq[i].txq_ifq, pi->ifp); - callout_init(&q->txq[i].txq_timer, 1); - callout_init(&q->txq[i].txq_watchdog, 1); - q->txq[i].txq_timer.c_cpu = id % mp_ncpus; - q->txq[i].txq_watchdog.c_cpu = id % mp_ncpus; + if ((q->txq[TXQ_ETH].txq_mr = buf_ring_alloc(cxgb_txq_buf_ring_size, + M_DEVBUF, M_WAITOK, &q->lock)) == NULL) { + device_printf(sc->dev, "failed to allocate mbuf ring\n"); + goto err; } + if ((q->txq[TXQ_ETH].txq_ifq = malloc(sizeof(struct ifaltq), M_DEVBUF, + M_NOWAIT | M_ZERO)) == NULL) { + device_printf(sc->dev, "failed to allocate ifq\n"); + goto err; + } + ifq_init(q->txq[TXQ_ETH].txq_ifq, pi->ifp); + callout_init(&q->txq[TXQ_ETH].txq_timer, 1); + callout_init(&q->txq[TXQ_ETH].txq_watchdog, 1); + q->txq[TXQ_ETH].txq_timer.c_cpu = id % mp_ncpus; + q->txq[TXQ_ETH].txq_watchdog.c_cpu = id % mp_ncpus; + init_qset_cntxt(q, id); q->idx = id; if ((ret = alloc_ring(sc, p->fl_size, sizeof(struct rx_desc), @@ -2632,21 +2632,22 @@ t3_sge_alloc_qset(adapter_t *sc, u_int i q->fl[0].buf_size = MCLBYTES; q->fl[0].zone = zone_pack; q->fl[0].type = EXT_PACKET; -#if __FreeBSD_version > 800000 - if (cxgb_use_16k_clusters) { - q->fl[1].buf_size = MJUM16BYTES; + + if (p->jumbo_buf_size == MJUM16BYTES) { q->fl[1].zone = zone_jumbo16; q->fl[1].type = EXT_JUMBO16; - } else { - q->fl[1].buf_size = MJUM9BYTES; + } else if (p->jumbo_buf_size == MJUM9BYTES) { q->fl[1].zone = zone_jumbo9; q->fl[1].type = EXT_JUMBO9; + } else if (p->jumbo_buf_size == MJUMPAGESIZE) { + q->fl[1].zone = zone_jumbop; + q->fl[1].type = EXT_JUMBOP; + } else { + KASSERT(0, ("can't deal with jumbo_buf_size %d.", p->jumbo_buf_size)); + ret = EDOOFUS; + goto err; } -#else - q->fl[1].buf_size = MJUMPAGESIZE; - q->fl[1].zone = zone_jumbop; - q->fl[1].type = EXT_JUMBOP; -#endif + q->fl[1].buf_size = p->jumbo_buf_size; /* Allocate and setup the lro_ctrl structure */ q->lro.enabled = !!(pi->ifp->if_capenable & IFCAP_LRO); From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 00:41:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3F7F71065673; Wed, 31 Mar 2010 00:41:33 +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 2E3428FC18; Wed, 31 Mar 2010 00:41: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 o2V0fX1N043464; Wed, 31 Mar 2010 00:41:33 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2V0fXCP043462; Wed, 31 Mar 2010 00:41:33 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201003310041.o2V0fXCP043462@svn.freebsd.org> From: Xin LI Date: Wed, 31 Mar 2010 00:41: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: r205951 - stable/8/sys/dev/uart X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Mar 2010 00:41:33 -0000 Author: delphij Date: Wed Mar 31 00:41:32 2010 New Revision: 205951 URL: http://svn.freebsd.org/changeset/base/205951 Log: MFC r204533: Add PCI ID for MCS9901. Submitted by: gcooper PR: kern/144397 Modified: stable/8/sys/dev/uart/uart_bus_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/uart/uart_bus_pci.c ============================================================================== --- stable/8/sys/dev/uart/uart_bus_pci.c Wed Mar 31 00:27:49 2010 (r205950) +++ stable/8/sys/dev/uart/uart_bus_pci.c Wed Mar 31 00:41:32 2010 (r205951) @@ -112,6 +112,8 @@ static struct pci_id pci_ns8250_ids[] = { 0x151f, 0x0000, 0xffff, 0, "TOPIC Semiconductor TP560 56k modem", 0x10 }, { 0x9710, 0x9835, 0x1000, 1, "NetMos NM9835 Serial Port", 0x10 }, { 0x9710, 0x9865, 0xa000, 0x1000, "NetMos NM9865 Serial Port", 0x10 }, +{ 0x9710, 0x9901, 0xa000, 0x1000, + "MosChip MCS9901 PCIe to Peripheral Controller", 0x10 }, { 0xdeaf, 0x9051, 0xffff, 0, "Middle Digital PC Weasel Serial Port", 0x10 }, { 0xffff, 0, 0xffff, 0, NULL, 0, 0} }; From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 00:42:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B99A106564A; Wed, 31 Mar 2010 00:42:19 +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 EE68E8FC17; Wed, 31 Mar 2010 00:42: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 o2V0gIuS043668; Wed, 31 Mar 2010 00:42:18 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2V0gIfP043666; Wed, 31 Mar 2010 00:42:18 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201003310042.o2V0gIfP043666@svn.freebsd.org> From: Xin LI Date: Wed, 31 Mar 2010 00:42: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: r205952 - stable/7/sys/dev/uart X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Mar 2010 00:42:19 -0000 Author: delphij Date: Wed Mar 31 00:42:18 2010 New Revision: 205952 URL: http://svn.freebsd.org/changeset/base/205952 Log: MFC r204533: Add PCI ID for MCS9901. Submitted by: gcooper PR: kern/144397 Modified: stable/7/sys/dev/uart/uart_bus_pci.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/uart/uart_bus_pci.c ============================================================================== --- stable/7/sys/dev/uart/uart_bus_pci.c Wed Mar 31 00:41:32 2010 (r205951) +++ stable/7/sys/dev/uart/uart_bus_pci.c Wed Mar 31 00:42:18 2010 (r205952) @@ -111,6 +111,8 @@ static struct pci_id pci_ns8250_ids[] = { 0x151f, 0x0000, 0xffff, 0, "TOPIC Semiconductor TP560 56k modem", 0x10 }, { 0x9710, 0x9835, 0x1000, 1, "NetMos NM9835 Serial Port", 0x10 }, { 0x9710, 0x9865, 0xa000, 0x1000, "NetMos NM9865 Serial Port", 0x10 }, +{ 0x9710, 0x9901, 0xa000, 0x1000, + "MosChip MCS9901 PCIe to Peripheral Controller", 0x10 }, { 0xdeaf, 0x9051, 0xffff, 0, "Middle Digital PC Weasel Serial Port", 0x10 }, { 0xffff, 0, 0xffff, 0, NULL, 0, 0} }; From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 01:51:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C8131065674; Wed, 31 Mar 2010 01:51:09 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0AC998FC12; Wed, 31 Mar 2010 01:51: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 o2V1p8eb058663; Wed, 31 Mar 2010 01:51:08 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2V1p8QW058661; Wed, 31 Mar 2010 01:51:08 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201003310151.o2V1p8QW058661@svn.freebsd.org> From: Luigi Rizzo Date: Wed, 31 Mar 2010 01:51: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: r205953 - stable/8/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: Wed, 31 Mar 2010 01:51:09 -0000 Author: luigi Date: Wed Mar 31 01:51:08 2010 New Revision: 205953 URL: http://svn.freebsd.org/changeset/base/205953 Log: A last-minute change in the previous commit broke rule deletion, so i am fixing it, this time with a more detailed description of what the code is supposed to do. Modified: stable/8/sys/netinet/ipfw/ip_fw_sockopt.c Modified: stable/8/sys/netinet/ipfw/ip_fw_sockopt.c ============================================================================== --- stable/8/sys/netinet/ipfw/ip_fw_sockopt.c Wed Mar 31 00:42:18 2010 (r205952) +++ stable/8/sys/netinet/ipfw/ip_fw_sockopt.c Wed Mar 31 01:51:08 2010 (r205953) @@ -239,12 +239,12 @@ ipfw_reap_rules(struct ip_fw *head) * The argument is an u_int32_t. The low 16 bit are the rule or set number, * the next 8 bits are the new set, the top 8 bits are the command: * - * 0 delete rules with given number - * 1 delete rules with given set number - * 2 move rules with given number to new set - * 3 move rules with given set number to new set - * 4 swap sets with given numbers - * 5 delete rules with given number and with given set number + * 0 delete rules numbered "rulenum" + * 1 delete rules in set "rulenum" + * 2 move rules "rulenum" to set "new_set" + * 3 move rules from set "rulenum" to set "new_set" + * 4 swap sets "rulenum" and "new_set" + * 5 delete rules "rulenum" and set "new_set" */ static int del_entry(struct ip_fw_chain *chain, u_int32_t arg) @@ -274,7 +274,7 @@ del_entry(struct ip_fw_chain *chain, u_i chain->reap = NULL; /* prepare for deletions */ switch (cmd) { - case 0: /* delete rules number N (N == 0 means all) */ + case 0: /* delete rules "rulenum" (rulenum == 0 matches all) */ case 1: /* delete all rules in set N */ case 5: /* delete rules with number N and set "new_set". */ @@ -287,7 +287,7 @@ del_entry(struct ip_fw_chain *chain, u_i if (cmd == 1) { /* look for a specific set, must scan all */ new_set = rulenum; for (start = -1, i = 0; i < chain->n_rules; i++) { - if (chain->map[i]->set != rulenum) + if (chain->map[i]->set != new_set) continue; if (start < 0) start = i; @@ -321,16 +321,21 @@ del_entry(struct ip_fw_chain *chain, u_i * and then bcopy the final part. * Once we are done we can swap maps and clean up the * deleted rules (unfortunately we need to repeat a - * convoluted test). + * convoluted test). Rules to keep are + * (set == RESVD_SET || !match_set || !match_rule) + * where + * match_set ::= (cmd == 0 || rule->set == new_set) + * match_rule ::= (cmd == 1 || rule->rulenum == rulenum) */ if (start > 0) bcopy(chain->map, map, start * sizeof(struct ip_fw *)); for (i = ofs = start; i < end; i++) { rule = chain->map[i]; - if (rule->set == RESVD_SET || cmd == 0 || - (rule->set == new_set && - (cmd == 1 || rule->rulenum == rulenum))) + if (rule->set == RESVD_SET || + !(cmd == 0 || rule->set == new_set) || + !(cmd == 1 || rule->rulenum == rulenum) ) { map[ofs++] = chain->map[i]; + } } bcopy(chain->map + end, map + ofs, (chain->n_rules - end) * sizeof(struct ip_fw *)); @@ -341,9 +346,9 @@ del_entry(struct ip_fw_chain *chain, u_i int l; rule = map[i]; /* same test as above */ - if (rule->set == RESVD_SET || cmd == 0 || - (rule->set == new_set && - (cmd == 1 || rule->rulenum == rulenum))) + if (rule->set == RESVD_SET || + !(cmd == 0 || rule->set == new_set) || + !(cmd == 1 || rule->rulenum == rulenum) ) continue; l = RULESIZE(rule); From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 02:12:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B5746106566B; Wed, 31 Mar 2010 02:12:24 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A4B1B8FC1F; Wed, 31 Mar 2010 02:12: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 o2V2COOm063421; Wed, 31 Mar 2010 02:12:24 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2V2CO7b063419; Wed, 31 Mar 2010 02:12:24 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201003310212.o2V2CO7b063419@svn.freebsd.org> From: Juli Mallett Date: Wed, 31 Mar 2010 02:12: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: r205954 - head/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 02:12:24 -0000 Author: jmallett Date: Wed Mar 31 02:12:24 2010 New Revision: 205954 URL: http://svn.freebsd.org/changeset/base/205954 Log: Be like stdlib.h and bring in a wchar_t definition and use it to prototype wcstoimax and wcstoumax, rather than spelling it __wchar_t. This is necessary to use these functions in C++ where wchar_t is different to __wchar_t and is a built-in type. It may be better to use __wchar_t here and to simply define __wchar_t as being wchar_t in C++ mode rather than to bring in wchar_t, but this is less invasive and follows our existing practice, and restores wchar_t usage in this file to what it was before r1.8. Modified: head/include/inttypes.h Modified: head/include/inttypes.h ============================================================================== --- head/include/inttypes.h Wed Mar 31 01:51:08 2010 (r205953) +++ head/include/inttypes.h Wed Mar 31 02:12:24 2010 (r205954) @@ -32,6 +32,13 @@ #include #include +#ifndef __cplusplus +#ifndef _WCHAR_T_DECLARED +typedef __wchar_t wchar_t; +#define _WCHAR_T_DECLARED +#endif +#endif + typedef struct { intmax_t quot; /* Quotient. */ intmax_t rem; /* Remainder. */ @@ -43,10 +50,10 @@ imaxdiv_t imaxdiv(intmax_t, intmax_t) __ intmax_t strtoimax(const char * __restrict, char ** __restrict, int); uintmax_t strtoumax(const char * __restrict, char ** __restrict, int); -intmax_t wcstoimax(const __wchar_t * __restrict, - __wchar_t ** __restrict, int); -uintmax_t wcstoumax(const __wchar_t * __restrict, - __wchar_t ** __restrict, int); +intmax_t wcstoimax(const wchar_t * __restrict, + wchar_t ** __restrict, int); +uintmax_t wcstoumax(const wchar_t * __restrict, + wchar_t ** __restrict, int); __END_DECLS #endif /* !_INTTYPES_H_ */ From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 02:20:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B99B106566C; Wed, 31 Mar 2010 02:20:23 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6ACB28FC08; Wed, 31 Mar 2010 02:20: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 o2V2KNPI065193; Wed, 31 Mar 2010 02:20:23 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2V2KNJL065191; Wed, 31 Mar 2010 02:20:23 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201003310220.o2V2KNJL065191@svn.freebsd.org> From: Luigi Rizzo Date: Wed, 31 Mar 2010 02:20: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: r205955 - 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: Wed, 31 Mar 2010 02:20:23 -0000 Author: luigi Date: Wed Mar 31 02:20:22 2010 New Revision: 205955 URL: http://svn.freebsd.org/changeset/base/205955 Log: fix bug in previous commit related to rule deletion (stable/8 just fixed moments ago) Modified: head/sys/netinet/ipfw/ip_fw_sockopt.c Modified: head/sys/netinet/ipfw/ip_fw_sockopt.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw_sockopt.c Wed Mar 31 02:12:24 2010 (r205954) +++ head/sys/netinet/ipfw/ip_fw_sockopt.c Wed Mar 31 02:20:22 2010 (r205955) @@ -239,12 +239,12 @@ ipfw_reap_rules(struct ip_fw *head) * The argument is an u_int32_t. The low 16 bit are the rule or set number, * the next 8 bits are the new set, the top 8 bits are the command: * - * 0 delete rules with given number - * 1 delete rules with given set number - * 2 move rules with given number to new set - * 3 move rules with given set number to new set - * 4 swap sets with given numbers - * 5 delete rules with given number and with given set number + * 0 delete rules numbered "rulenum" + * 1 delete rules in set "rulenum" + * 2 move rules "rulenum" to set "new_set" + * 3 move rules from set "rulenum" to set "new_set" + * 4 swap sets "rulenum" and "new_set" + * 5 delete rules "rulenum" and set "new_set" */ static int del_entry(struct ip_fw_chain *chain, u_int32_t arg) @@ -274,7 +274,7 @@ del_entry(struct ip_fw_chain *chain, u_i chain->reap = NULL; /* prepare for deletions */ switch (cmd) { - case 0: /* delete rules number N (N == 0 means all) */ + case 0: /* delete rules "rulenum" (rulenum == 0 matches all) */ case 1: /* delete all rules in set N */ case 5: /* delete rules with number N and set "new_set". */ @@ -287,7 +287,7 @@ del_entry(struct ip_fw_chain *chain, u_i if (cmd == 1) { /* look for a specific set, must scan all */ new_set = rulenum; for (start = -1, i = 0; i < chain->n_rules; i++) { - if (chain->map[i]->set != rulenum) + if (chain->map[i]->set != new_set) continue; if (start < 0) start = i; @@ -321,16 +321,21 @@ del_entry(struct ip_fw_chain *chain, u_i * and then bcopy the final part. * Once we are done we can swap maps and clean up the * deleted rules (unfortunately we need to repeat a - * convoluted test). + * convoluted test). Rules to keep are + * (set == RESVD_SET || !match_set || !match_rule) + * where + * match_set ::= (cmd == 0 || rule->set == new_set) + * match_rule ::= (cmd == 1 || rule->rulenum == rulenum) */ if (start > 0) bcopy(chain->map, map, start * sizeof(struct ip_fw *)); for (i = ofs = start; i < end; i++) { rule = chain->map[i]; - if (rule->set == RESVD_SET || cmd == 0 || - (rule->set == new_set && - (cmd == 1 || rule->rulenum == rulenum))) + if (rule->set == RESVD_SET || + !(cmd == 0 || rule->set == new_set) || + !(cmd == 1 || rule->rulenum == rulenum) ) { map[ofs++] = chain->map[i]; + } } bcopy(chain->map + end, map + ofs, (chain->n_rules - end) * sizeof(struct ip_fw *)); @@ -341,9 +346,9 @@ del_entry(struct ip_fw_chain *chain, u_i int l; rule = map[i]; /* same test as above */ - if (rule->set == RESVD_SET || cmd == 0 || - (rule->set == new_set && - (cmd == 1 || rule->rulenum == rulenum))) + if (rule->set == RESVD_SET || + !(cmd == 0 || rule->set == new_set) || + !(cmd == 1 || rule->rulenum == rulenum) ) continue; l = RULESIZE(rule); From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 02:43:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 23F3F106564A; Wed, 31 Mar 2010 02:43:59 +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 0E6398FC18; Wed, 31 Mar 2010 02:43: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 o2V2hxHh070407; Wed, 31 Mar 2010 02:43:59 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2V2hwa9070387; Wed, 31 Mar 2010 02:43:58 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201003310243.o2V2hwa9070387@svn.freebsd.org> From: Marcel Moolenaar Date: Wed, 31 Mar 2010 02:43:58 +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: r205956 - in stable/8/sys: amd64/amd64 arm/arm i386/i386 i386/xen ia64/ia64 kern mips/mips powerpc/aim powerpc/booke powerpc/include powerpc/powerpc sparc64/sparc64 sun4v/sun4v 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, 31 Mar 2010 02:43:59 -0000 Author: marcel Date: Wed Mar 31 02:43:58 2010 New Revision: 205956 URL: http://svn.freebsd.org/changeset/base/205956 Log: MFC rev 198341 and 198342: o Introduce vm_sync_icache() for making the I-cache coherent with the memory or D-cache, depending on the semantics of the platform. vm_sync_icache() is basically a wrapper around pmap_sync_icache(), that translates the vm_map_t argumument to pmap_t. o Introduce pmap_sync_icache() to all PMAP implementation. For powerpc it replaces the pmap_page_executable() function, added to solve the I-cache problem in uiomove_fromphys(). o In proc_rwmem() call vm_sync_icache() when writing to a page that has execute permissions. This assures that when breakpoints are written, the I-cache will be coherent and the process will actually hit the breakpoint. o This also fixes the Book-E PMAP implementation that was missing necessary locking while trying to deal with the I-cache coherency in pmap_enter() (read: mmu_booke_enter_locked). Modified: stable/8/sys/amd64/amd64/pmap.c stable/8/sys/arm/arm/pmap.c stable/8/sys/i386/i386/pmap.c stable/8/sys/i386/xen/pmap.c stable/8/sys/ia64/ia64/pmap.c stable/8/sys/kern/sys_process.c stable/8/sys/mips/mips/pmap.c stable/8/sys/powerpc/aim/mmu_oea.c stable/8/sys/powerpc/aim/mmu_oea64.c stable/8/sys/powerpc/booke/pmap.c stable/8/sys/powerpc/include/pmap.h stable/8/sys/powerpc/powerpc/mmu_if.m stable/8/sys/powerpc/powerpc/pmap_dispatch.c stable/8/sys/powerpc/powerpc/uio_machdep.c stable/8/sys/sparc64/sparc64/pmap.c stable/8/sys/sun4v/sun4v/pmap.c stable/8/sys/vm/pmap.h stable/8/sys/vm/vm_extern.h stable/8/sys/vm/vm_glue.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/pmap.c ============================================================================== --- stable/8/sys/amd64/amd64/pmap.c Wed Mar 31 02:20:22 2010 (r205955) +++ stable/8/sys/amd64/amd64/pmap.c Wed Mar 31 02:43:58 2010 (r205956) @@ -4756,6 +4756,11 @@ if (oldpmap) /* XXX FIXME */ critical_exit(); } +void +pmap_sync_icache(pmap_t pm, vm_offset_t va, vm_size_t sz) +{ +} + /* * Increase the starting virtual address of the given mapping if a * different alignment might result in more superpage mappings. Modified: stable/8/sys/arm/arm/pmap.c ============================================================================== --- stable/8/sys/arm/arm/pmap.c Wed Mar 31 02:20:22 2010 (r205955) +++ stable/8/sys/arm/arm/pmap.c Wed Mar 31 02:43:58 2010 (r205956) @@ -2869,14 +2869,14 @@ pmap_kenter_internal(vm_offset_t va, vm_ if (pvzone != NULL && (m = vm_phys_paddr_to_vm_page(pa))) { vm_page_lock_queues(); if (!TAILQ_EMPTY(&m->md.pv_list) || m->md.pv_kva) { - /* release vm_page lock for pv_entry UMA */ + /* release vm_page lock for pv_entry UMA */ vm_page_unlock_queues(); if ((pve = pmap_get_pv_entry()) == NULL) panic("pmap_kenter_internal: no pv entries"); vm_page_lock_queues(); PMAP_LOCK(pmap_kernel()); pmap_enter_pv(m, pve, pmap_kernel(), va, - PVF_WRITE | PVF_UNMAN); + PVF_WRITE | PVF_UNMAN); pmap_fix_cache(m, pmap_kernel(), va); PMAP_UNLOCK(pmap_kernel()); } else { @@ -4573,6 +4573,12 @@ pmap_mincore(pmap_t pmap, vm_offset_t ad } +void +pmap_sync_icache(pmap_t pm, vm_offset_t va, vm_size_t sz) +{ +} + + /* * Increase the starting virtual address of the given mapping if a * different alignment might result in more superpage mappings. Modified: stable/8/sys/i386/i386/pmap.c ============================================================================== --- stable/8/sys/i386/i386/pmap.c Wed Mar 31 02:20:22 2010 (r205955) +++ stable/8/sys/i386/i386/pmap.c Wed Mar 31 02:43:58 2010 (r205956) @@ -4859,6 +4859,11 @@ pmap_activate(struct thread *td) critical_exit(); } +void +pmap_sync_icache(pmap_t pm, vm_offset_t va, vm_size_t sz) +{ +} + /* * Increase the starting virtual address of the given mapping if a * different alignment might result in more superpage mappings. Modified: stable/8/sys/i386/xen/pmap.c ============================================================================== --- stable/8/sys/i386/xen/pmap.c Wed Mar 31 02:20:22 2010 (r205955) +++ stable/8/sys/i386/xen/pmap.c Wed Mar 31 02:43:58 2010 (r205956) @@ -4175,6 +4175,11 @@ pmap_activate(struct thread *td) critical_exit(); } +void +pmap_sync_icache(pmap_t pm, vm_offset_t va, vm_size_t sz) +{ +} + /* * Increase the starting virtual address of the given mapping if a * different alignment might result in more superpage mappings. Modified: stable/8/sys/ia64/ia64/pmap.c ============================================================================== --- stable/8/sys/ia64/ia64/pmap.c Wed Mar 31 02:20:22 2010 (r205955) +++ stable/8/sys/ia64/ia64/pmap.c Wed Mar 31 02:43:58 2010 (r205956) @@ -2263,6 +2263,33 @@ out: return (prevpm); } +void +pmap_sync_icache(pmap_t pm, vm_offset_t va, vm_size_t sz) +{ + pmap_t oldpm; + struct ia64_lpte *pte; + vm_offset_t lim; + vm_size_t len; + + sz += va & 31; + va &= ~31; + sz = (sz + 31) & ~31; + + PMAP_LOCK(pm); + oldpm = pmap_switch(pm); + while (sz > 0) { + lim = round_page(va); + len = MIN(lim - va, sz); + pte = pmap_find_vhpt(va); + if (pte != NULL && pmap_present(pte)) + ia64_sync_icache(va, len); + va += len; + sz -= len; + } + pmap_switch(oldpm); + PMAP_UNLOCK(pm); +} + /* * Increase the starting virtual address of the given mapping if a * different alignment might result in more superpage mappings. Modified: stable/8/sys/kern/sys_process.c ============================================================================== --- stable/8/sys/kern/sys_process.c Wed Mar 31 02:20:22 2010 (r205955) +++ stable/8/sys/kern/sys_process.c Wed Mar 31 02:43:58 2010 (r205956) @@ -341,6 +341,10 @@ proc_rwmem(struct proc *p, struct uio *u */ error = uiomove_fromphys(&m, page_offset, len, uio); + /* Make the I-cache coherent for breakpoints. */ + if (!error && writing && (out_prot & VM_PROT_EXECUTE)) + vm_sync_icache(map, uva, len); + /* * Release the page. */ Modified: stable/8/sys/mips/mips/pmap.c ============================================================================== --- stable/8/sys/mips/mips/pmap.c Wed Mar 31 02:20:22 2010 (r205955) +++ stable/8/sys/mips/mips/pmap.c Wed Mar 31 02:43:58 2010 (r205956) @@ -2903,6 +2903,11 @@ pmap_activate(struct thread *td) critical_exit(); } +void +pmap_sync_icache(pmap_t pm, vm_offset_t va, vm_size_t sz) +{ +} + /* * Increase the starting virtual address of the given mapping if a * different alignment might result in more superpage mappings. Modified: stable/8/sys/powerpc/aim/mmu_oea.c ============================================================================== --- stable/8/sys/powerpc/aim/mmu_oea.c Wed Mar 31 02:20:22 2010 (r205955) +++ stable/8/sys/powerpc/aim/mmu_oea.c Wed Mar 31 02:43:58 2010 (r205956) @@ -330,7 +330,7 @@ void moea_unmapdev(mmu_t, vm_offset_t, v vm_offset_t moea_kextract(mmu_t, vm_offset_t); void moea_kenter(mmu_t, vm_offset_t, vm_offset_t); boolean_t moea_dev_direct_mapped(mmu_t, vm_offset_t, vm_size_t); -boolean_t moea_page_executable(mmu_t, vm_page_t); +static void moea_sync_icache(mmu_t, pmap_t, vm_offset_t, vm_size_t); static mmu_method_t moea_methods[] = { MMUMETHOD(mmu_change_wiring, moea_change_wiring), @@ -357,6 +357,7 @@ static mmu_method_t moea_methods[] = { MMUMETHOD(mmu_remove, moea_remove), MMUMETHOD(mmu_remove_all, moea_remove_all), MMUMETHOD(mmu_remove_write, moea_remove_write), + MMUMETHOD(mmu_sync_icache, moea_sync_icache), MMUMETHOD(mmu_zero_page, moea_zero_page), MMUMETHOD(mmu_zero_page_area, moea_zero_page_area), MMUMETHOD(mmu_zero_page_idle, moea_zero_page_idle), @@ -371,7 +372,6 @@ static mmu_method_t moea_methods[] = { MMUMETHOD(mmu_kextract, moea_kextract), MMUMETHOD(mmu_kenter, moea_kenter), MMUMETHOD(mmu_dev_direct_mapped,moea_dev_direct_mapped), - MMUMETHOD(mmu_page_executable, moea_page_executable), { 0, 0 } }; @@ -2361,12 +2361,6 @@ moea_dev_direct_mapped(mmu_t mmu, vm_off return (EFAULT); } -boolean_t -moea_page_executable(mmu_t mmu, vm_page_t pg) -{ - return ((moea_attr_fetch(pg) & PTE_EXEC) == PTE_EXEC); -} - /* * Map a set of physical memory pages into the kernel virtual * address space. Return a pointer to where it is mapped. This @@ -2426,3 +2420,27 @@ moea_unmapdev(mmu_t mmu, vm_offset_t va, kmem_free(kernel_map, base, size); } } + +static void +moea_sync_icache(mmu_t mmu, pmap_t pm, vm_offset_t va, vm_size_t sz) +{ + struct pvo_entry *pvo; + vm_offset_t lim; + vm_paddr_t pa; + vm_size_t len; + + PMAP_LOCK(pm); + while (sz > 0) { + lim = round_page(va); + len = MIN(lim - va, sz); + pvo = moea_pvo_find_va(pm, va & ~ADDR_POFF, NULL); + if (pvo != NULL) { + pa = (pvo->pvo_pte.pte.pte_lo & PTE_RPGN) | + (va & ADDR_POFF); + moea_syncicache(pa, len); + } + va += len; + sz -= len; + } + PMAP_UNLOCK(pm); +} Modified: stable/8/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- stable/8/sys/powerpc/aim/mmu_oea64.c Wed Mar 31 02:20:22 2010 (r205955) +++ stable/8/sys/powerpc/aim/mmu_oea64.c Wed Mar 31 02:43:58 2010 (r205956) @@ -362,7 +362,7 @@ static boolean_t moea64_query_bit(vm_pag static u_int moea64_clear_bit(vm_page_t, u_int64_t, u_int64_t *); static void moea64_kremove(mmu_t, vm_offset_t); static void moea64_syncicache(pmap_t pmap, vm_offset_t va, - vm_offset_t pa); + vm_offset_t pa, vm_size_t sz); static void tlbia(void); /* @@ -403,7 +403,7 @@ void moea64_unmapdev(mmu_t, vm_offset_t, vm_offset_t moea64_kextract(mmu_t, vm_offset_t); void moea64_kenter(mmu_t, vm_offset_t, vm_offset_t); boolean_t moea64_dev_direct_mapped(mmu_t, vm_offset_t, vm_size_t); -boolean_t moea64_page_executable(mmu_t, vm_page_t); +static void moea64_sync_icache(mmu_t, pmap_t, vm_offset_t, vm_size_t); static mmu_method_t moea64_bridge_methods[] = { MMUMETHOD(mmu_change_wiring, moea64_change_wiring), @@ -430,6 +430,7 @@ static mmu_method_t moea64_bridge_method MMUMETHOD(mmu_remove, moea64_remove), MMUMETHOD(mmu_remove_all, moea64_remove_all), MMUMETHOD(mmu_remove_write, moea64_remove_write), + MMUMETHOD(mmu_sync_icache, moea64_sync_icache), MMUMETHOD(mmu_zero_page, moea64_zero_page), MMUMETHOD(mmu_zero_page_area, moea64_zero_page_area), MMUMETHOD(mmu_zero_page_idle, moea64_zero_page_idle), @@ -444,7 +445,6 @@ static mmu_method_t moea64_bridge_method MMUMETHOD(mmu_kextract, moea64_kextract), MMUMETHOD(mmu_kenter, moea64_kenter), MMUMETHOD(mmu_dev_direct_mapped,moea64_dev_direct_mapped), - MMUMETHOD(mmu_page_executable, moea64_page_executable), { 0, 0 } }; @@ -1256,12 +1256,12 @@ moea64_enter_locked(pmap_t pmap, vm_offs * mapped executable and cacheable. */ if ((pte_lo & (LPTE_I | LPTE_G | LPTE_NOEXEC)) == 0) { - moea64_syncicache(pmap, va, VM_PAGE_TO_PHYS(m)); + moea64_syncicache(pmap, va, VM_PAGE_TO_PHYS(m), PAGE_SIZE); } } static void -moea64_syncicache(pmap_t pmap, vm_offset_t va, vm_offset_t pa) +moea64_syncicache(pmap_t pmap, vm_offset_t va, vm_offset_t pa, vm_size_t sz) { /* @@ -1278,16 +1278,16 @@ moea64_syncicache(pmap_t pmap, vm_offset * If PMAP is not bootstrapped, we are likely to be * in real mode. */ - __syncicache((void *)pa,PAGE_SIZE); + __syncicache((void *)pa, sz); } else if (pmap == kernel_pmap) { - __syncicache((void *)va,PAGE_SIZE); + __syncicache((void *)va, sz); } else { /* Use the scratch page to set up a temp mapping */ mtx_lock(&moea64_scratchpage_mtx); moea64_set_scratchpage_pa(1,pa); - __syncicache((void *)moea64_scratchpage_va[1],PAGE_SIZE); + __syncicache((void *)moea64_scratchpage_va[1], sz); mtx_unlock(&moea64_scratchpage_mtx); } @@ -1803,8 +1803,9 @@ moea64_protect(mmu_t mmu, pmap_t pm, vm_ pvo->pvo_pmap, PVO_VADDR(pvo)); if ((pvo->pvo_pte.lpte.pte_lo & (LPTE_I | LPTE_G | LPTE_NOEXEC)) == 0) { - moea64_syncicache(pm, sva, - pvo->pvo_pte.lpte.pte_lo & LPTE_RPGN); + moea64_syncicache(pm, sva, + pvo->pvo_pte.lpte.pte_lo & LPTE_RPGN, + PAGE_SIZE); } } UNLOCK_TABLE(); @@ -2431,12 +2432,6 @@ moea64_dev_direct_mapped(mmu_t mmu, vm_o return (error); } -boolean_t -moea64_page_executable(mmu_t mmu, vm_page_t pg) -{ - return (!moea64_query_bit(pg, LPTE_NOEXEC)); -} - /* * Map a set of physical memory pages into the kernel virtual * address space. Return a pointer to where it is mapped. This @@ -2479,3 +2474,26 @@ moea64_unmapdev(mmu_t mmu, vm_offset_t v kmem_free(kernel_map, base, size); } +static void +moea64_sync_icache(mmu_t mmu, pmap_t pm, vm_offset_t va, vm_size_t sz) +{ + struct pvo_entry *pvo; + vm_offset_t lim; + vm_paddr_t pa; + vm_size_t len; + + PMAP_LOCK(pm); + while (sz > 0) { + lim = round_page(va); + len = MIN(lim - va, sz); + pvo = moea64_pvo_find_va(pm, va & ~ADDR_POFF, NULL); + if (pvo != NULL) { + pa = (pvo->pvo_pte.pte.pte_lo & PTE_RPGN) | + (va & ADDR_POFF); + moea64_syncicache(pm, va, pa, len); + } + va += len; + sz -= len; + } + PMAP_UNLOCK(pm); +} Modified: stable/8/sys/powerpc/booke/pmap.c ============================================================================== --- stable/8/sys/powerpc/booke/pmap.c Wed Mar 31 02:20:22 2010 (r205955) +++ stable/8/sys/powerpc/booke/pmap.c Wed Mar 31 02:43:58 2010 (r205956) @@ -319,7 +319,8 @@ static vm_offset_t mmu_booke_kextract(mm static void mmu_booke_kenter(mmu_t, vm_offset_t, vm_offset_t); static void mmu_booke_kremove(mmu_t, vm_offset_t); static boolean_t mmu_booke_dev_direct_mapped(mmu_t, vm_offset_t, vm_size_t); -static boolean_t mmu_booke_page_executable(mmu_t, vm_page_t); +static void mmu_booke_sync_icache(mmu_t, pmap_t, vm_offset_t, + vm_size_t); static vm_offset_t mmu_booke_dumpsys_map(mmu_t, struct pmap_md *, vm_size_t, vm_size_t *); static void mmu_booke_dumpsys_unmap(mmu_t, struct pmap_md *, @@ -357,6 +358,7 @@ static mmu_method_t mmu_booke_methods[] MMUMETHOD(mmu_remove, mmu_booke_remove), MMUMETHOD(mmu_remove_all, mmu_booke_remove_all), MMUMETHOD(mmu_remove_write, mmu_booke_remove_write), + MMUMETHOD(mmu_sync_icache, mmu_booke_sync_icache), MMUMETHOD(mmu_zero_page, mmu_booke_zero_page), MMUMETHOD(mmu_zero_page_area, mmu_booke_zero_page_area), MMUMETHOD(mmu_zero_page_idle, mmu_booke_zero_page_idle), @@ -370,7 +372,6 @@ static mmu_method_t mmu_booke_methods[] MMUMETHOD(mmu_kenter, mmu_booke_kenter), MMUMETHOD(mmu_kextract, mmu_booke_kextract), /* MMUMETHOD(mmu_kremove, mmu_booke_kremove), */ - MMUMETHOD(mmu_page_executable, mmu_booke_page_executable), MMUMETHOD(mmu_unmapdev, mmu_booke_unmapdev), /* dumpsys() support */ @@ -1682,21 +1683,6 @@ mmu_booke_enter_locked(mmu_t mmu, pmap_t __syncicache((void *)va, PAGE_SIZE); sync = 0; } - - if (sync) { - /* Create a temporary mapping. */ - pmap = PCPU_GET(curpmap); - - va = 0; - pte = pte_find(mmu, pmap, va); - KASSERT(pte == NULL, ("%s:%d", __func__, __LINE__)); - - flags = PTE_SR | PTE_VALID | PTE_UR | PTE_M; - - pte_enter(mmu, pmap, m, va, flags); - __syncicache((void *)va, PAGE_SIZE); - pte_remove(mmu, pmap, va, PTBL_UNHOLD); - } } /* @@ -1991,25 +1977,47 @@ mmu_booke_remove_write(mmu_t mmu, vm_pag vm_page_flag_clear(m, PG_WRITEABLE); } -static boolean_t -mmu_booke_page_executable(mmu_t mmu, vm_page_t m) +static void +mmu_booke_sync_icache(mmu_t mmu, pmap_t pm, vm_offset_t va, vm_size_t sz) { - pv_entry_t pv; pte_t *pte; - boolean_t executable; + pmap_t pmap; + vm_page_t m; + vm_offset_t addr; + vm_paddr_t pa; + int active, valid; + + va = trunc_page(va); + sz = round_page(sz); - executable = FALSE; - TAILQ_FOREACH(pv, &m->md.pv_list, pv_link) { - PMAP_LOCK(pv->pv_pmap); - pte = pte_find(mmu, pv->pv_pmap, pv->pv_va); - if (pte != NULL && PTE_ISVALID(pte) && (pte->flags & PTE_UX)) - executable = TRUE; - PMAP_UNLOCK(pv->pv_pmap); - if (executable) - break; + vm_page_lock_queues(); + pmap = PCPU_GET(curpmap); + active = (pm == kernel_pmap || pm == pmap) ? 1 : 0; + while (sz > 0) { + PMAP_LOCK(pm); + pte = pte_find(mmu, pm, va); + valid = (pte != NULL && PTE_ISVALID(pte)) ? 1 : 0; + if (valid) + pa = PTE_PA(pte); + PMAP_UNLOCK(pm); + if (valid) { + if (!active) { + /* Create a mapping in the active pmap. */ + addr = 0; + m = PHYS_TO_VM_PAGE(pa); + PMAP_LOCK(pmap); + pte_enter(mmu, pmap, m, addr, + PTE_SR | PTE_VALID | PTE_UR); + __syncicache((void *)addr, PAGE_SIZE); + pte_remove(mmu, pmap, addr, PTBL_UNHOLD); + PMAP_UNLOCK(pmap); + } else + __syncicache((void *)va, PAGE_SIZE); + } + va += PAGE_SIZE; + sz -= PAGE_SIZE; } - - return (executable); + vm_page_unlock_queues(); } /* Modified: stable/8/sys/powerpc/include/pmap.h ============================================================================== --- stable/8/sys/powerpc/include/pmap.h Wed Mar 31 02:20:22 2010 (r205955) +++ stable/8/sys/powerpc/include/pmap.h Wed Mar 31 02:43:58 2010 (r205956) @@ -171,7 +171,6 @@ void pmap_bootstrap(vm_offset_t, vm_off void pmap_kenter(vm_offset_t va, vm_offset_t pa); void pmap_kremove(vm_offset_t); void *pmap_mapdev(vm_offset_t, vm_size_t); -boolean_t pmap_page_executable(vm_page_t); void pmap_unmapdev(vm_offset_t, vm_size_t); void pmap_deactivate(struct thread *); vm_offset_t pmap_kextract(vm_offset_t); Modified: stable/8/sys/powerpc/powerpc/mmu_if.m ============================================================================== --- stable/8/sys/powerpc/powerpc/mmu_if.m Wed Mar 31 02:20:22 2010 (r205955) +++ stable/8/sys/powerpc/powerpc/mmu_if.m Wed Mar 31 02:43:58 2010 (r205956) @@ -789,15 +789,21 @@ METHOD boolean_t dev_direct_mapped { /** - * @brief Evaluate if a physical page has an executable mapping - * - * @param _pg physical page - * - * @retval bool TRUE if a physical mapping exists for the given page. + * @brief Enforce instruction cache coherency. Typically called after a + * region of memory has been modified and before execution of or within + * that region is attempted. Setting breakpoints in a process through + * ptrace(2) is one example of when the instruction cache needs to be + * made coherent. + * + * @param _pm the physical map of the virtual address + * @param _va the virtual address of the modified region + * @param _sz the size of the modified region */ -METHOD boolean_t page_executable { +METHOD void sync_icache { mmu_t _mmu; - vm_page_t _pg; + pmap_t _pm; + vm_offset_t _va; + vm_size_t _sz; }; Modified: stable/8/sys/powerpc/powerpc/pmap_dispatch.c ============================================================================== --- stable/8/sys/powerpc/powerpc/pmap_dispatch.c Wed Mar 31 02:20:22 2010 (r205955) +++ stable/8/sys/powerpc/powerpc/pmap_dispatch.c Wed Mar 31 02:43:58 2010 (r205956) @@ -457,12 +457,12 @@ pmap_dev_direct_mapped(vm_offset_t pa, v return (MMU_DEV_DIRECT_MAPPED(mmu_obj, pa, size)); } -boolean_t -pmap_page_executable(vm_page_t pg) +void +pmap_sync_icache(pmap_t pm, vm_offset_t va, vm_size_t sz) { - - CTR2(KTR_PMAP, "%s(%p)", __func__, pg); - return (MMU_PAGE_EXECUTABLE(mmu_obj, pg)); + + CTR4(KTR_PMAP, "%s(%p, %#x, %#x)", __func__, pm, va, sz); + return (MMU_SYNC_ICACHE(mmu_obj, pm, va, sz)); } vm_offset_t Modified: stable/8/sys/powerpc/powerpc/uio_machdep.c ============================================================================== --- stable/8/sys/powerpc/powerpc/uio_machdep.c Wed Mar 31 02:20:22 2010 (r205955) +++ stable/8/sys/powerpc/powerpc/uio_machdep.c Wed Mar 31 02:43:58 2010 (r205956) @@ -107,9 +107,6 @@ uiomove_fromphys(vm_page_t ma[], vm_offs sf_buf_free(sf); goto out; } - if (uio->uio_rw == UIO_WRITE && - pmap_page_executable(m)) - __syncicache(cp, cnt); break; case UIO_SYSSPACE: if (uio->uio_rw == UIO_READ) Modified: stable/8/sys/sparc64/sparc64/pmap.c ============================================================================== --- stable/8/sys/sparc64/sparc64/pmap.c Wed Mar 31 02:20:22 2010 (r205955) +++ stable/8/sys/sparc64/sparc64/pmap.c Wed Mar 31 02:43:58 2010 (r205956) @@ -1995,6 +1995,11 @@ pmap_activate(struct thread *td) mtx_unlock_spin(&sched_lock); } +void +pmap_sync_icache(pmap_t pm, vm_offset_t va, vm_size_t sz) +{ +} + /* * Increase the starting virtual address of the given mapping if a * different alignment might result in more superpage mappings. Modified: stable/8/sys/sun4v/sun4v/pmap.c ============================================================================== --- stable/8/sys/sun4v/sun4v/pmap.c Wed Mar 31 02:20:22 2010 (r205955) +++ stable/8/sys/sun4v/sun4v/pmap.c Wed Mar 31 02:43:58 2010 (r205956) @@ -424,6 +424,11 @@ pmap_activate(struct thread *td) critical_exit(); } +void +pmap_sync_icache(pmap_t pm, vm_offset_t va, vm_size_t sz) +{ +} + /* * Increase the starting virtual address of the given mapping if a * different alignment might result in more superpage mappings. Modified: stable/8/sys/vm/pmap.h ============================================================================== --- stable/8/sys/vm/pmap.h Wed Mar 31 02:20:22 2010 (r205955) +++ stable/8/sys/vm/pmap.h Wed Mar 31 02:43:58 2010 (r205956) @@ -133,6 +133,7 @@ void pmap_remove(pmap_t, vm_offset_t, void pmap_remove_all(vm_page_t m); void pmap_remove_pages(pmap_t); void pmap_remove_write(vm_page_t m); +void pmap_sync_icache(pmap_t, vm_offset_t, vm_size_t); void pmap_zero_page(vm_page_t); void pmap_zero_page_area(vm_page_t, int off, int size); void pmap_zero_page_idle(vm_page_t); Modified: stable/8/sys/vm/vm_extern.h ============================================================================== --- stable/8/sys/vm/vm_extern.h Wed Mar 31 02:20:22 2010 (r205955) +++ stable/8/sys/vm/vm_extern.h Wed Mar 31 02:43:58 2010 (r205956) @@ -63,6 +63,7 @@ int vm_forkproc(struct thread *, struct void vm_waitproc(struct proc *); int vm_mmap(vm_map_t, vm_offset_t *, vm_size_t, vm_prot_t, vm_prot_t, int, objtype_t, void *, vm_ooffset_t); void vm_set_page_size(void); +void vm_sync_icache(vm_map_t, vm_offset_t, vm_size_t); struct vmspace *vmspace_alloc(vm_offset_t, vm_offset_t); struct vmspace *vmspace_fork(struct vmspace *, vm_ooffset_t *); int vmspace_exec(struct proc *, vm_offset_t, vm_offset_t); Modified: stable/8/sys/vm/vm_glue.c ============================================================================== --- stable/8/sys/vm/vm_glue.c Wed Mar 31 02:20:22 2010 (r205955) +++ stable/8/sys/vm/vm_glue.c Wed Mar 31 02:43:58 2010 (r205956) @@ -309,6 +309,13 @@ vm_imgact_unmap_page(struct sf_buf *sf) vm_page_unlock_queues(); } +void +vm_sync_icache(vm_map_t map, vm_offset_t va, vm_offset_t sz) +{ + + pmap_sync_icache(map->pmap, va, sz); +} + struct kstack_cache_entry { vm_object_t ksobj; struct kstack_cache_entry *next_ks_entry; From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 03:14:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D728C1065676; Wed, 31 Mar 2010 03:14:40 +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 C573B8FC15; Wed, 31 Mar 2010 03:14: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 o2V3EeKc077502; Wed, 31 Mar 2010 03:14:40 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2V3EeVG077500; Wed, 31 Mar 2010 03:14:40 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201003310314.o2V3EeVG077500@svn.freebsd.org> From: Marcel Moolenaar Date: Wed, 31 Mar 2010 03:14: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: r205957 - stable/8/sys/dev/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 03:14:40 -0000 Author: marcel Date: Wed Mar 31 03:14:40 2010 New Revision: 205957 URL: http://svn.freebsd.org/changeset/base/205957 Log: MFC rev 198431: Have the early USB takeover only enabled for i386 and amd64 by default. This also avoids a panic on PowerPC. Modified: stable/8/sys/dev/pci/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/pci/pci.c ============================================================================== --- stable/8/sys/dev/pci/pci.c Wed Mar 31 02:43:58 2010 (r205956) +++ stable/8/sys/dev/pci/pci.c Wed Mar 31 03:14:40 2010 (r205957) @@ -274,7 +274,11 @@ TUNABLE_INT("hw.pci.honor_msi_blacklist" SYSCTL_INT(_hw_pci, OID_AUTO, honor_msi_blacklist, CTLFLAG_RD, &pci_honor_msi_blacklist, 1, "Honor chipset blacklist for MSI"); +#if defined(__i386__) || defined(__amd64__) static int pci_usb_takeover = 1; +#else +static int pci_usb_takeover = 0; +#endif TUNABLE_INT("hw.pci.usb_early_takeover", &pci_usb_takeover); SYSCTL_INT(_hw_pci, OID_AUTO, usb_early_takeover, CTLFLAG_RD | CTLFLAG_TUN, &pci_usb_takeover, 1, "Enable early takeover of USB controllers.\n\ From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 03:20:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 537E5106566B; Wed, 31 Mar 2010 03:20:15 +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 4107D8FC08; Wed, 31 Mar 2010 03:20: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 o2V3KFUk078840; Wed, 31 Mar 2010 03:20:15 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2V3KFlG078836; Wed, 31 Mar 2010 03:20:15 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201003310320.o2V3KFlG078836@svn.freebsd.org> From: Marcel Moolenaar Date: Wed, 31 Mar 2010 03:20: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: r205958 - stable/8/sys/ia64/ia64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Mar 2010 03:20:15 -0000 Author: marcel Date: Wed Mar 31 03:20:14 2010 New Revision: 205958 URL: http://svn.freebsd.org/changeset/base/205958 Log: MFC revs 199502, 199566 and 199574: Add a seatbelt to the Nested TLB Fault handler to give us a chance to panic when we have an unexpected TLB fault while interrupt collection is disabled. Modified: stable/8/sys/ia64/ia64/db_machdep.c stable/8/sys/ia64/ia64/exception.S stable/8/sys/ia64/ia64/trap.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/ia64/ia64/db_machdep.c ============================================================================== --- stable/8/sys/ia64/ia64/db_machdep.c Wed Mar 31 03:14:40 2010 (r205957) +++ stable/8/sys/ia64/ia64/db_machdep.c Wed Mar 31 03:20:14 2010 (r205958) @@ -29,7 +29,7 @@ #include __FBSDID("$FreeBSD$"); -#include +#include "opt_xtrace.h" #include #include Modified: stable/8/sys/ia64/ia64/exception.S ============================================================================== --- stable/8/sys/ia64/ia64/exception.S Wed Mar 31 03:14:40 2010 (r205957) +++ stable/8/sys/ia64/ia64/exception.S Wed Mar 31 03:20:14 2010 (r205958) @@ -28,12 +28,20 @@ #include __FBSDID("$FreeBSD$"); -#include +#include "opt_xtrace.h" #include #include /* + * Nested TLB restart tokens. These are used by the + * nested TLB handler for jumping back to the code + * where the nested TLB was caused. + */ +#define NTLBRT_SAVE 0x12c12c +#define NTLBRT_RESTORE 0x12c12d + +/* * ar.k7 = kernel memory stack * ar.k6 = kernel register stack * ar.k5 = EPC gateway page @@ -140,9 +148,10 @@ ENTRY_NOPROFILE(exception_save, 0) add r31=8,r30 ;; } -{ .mlx +{ .mib mov r22=cr.iip - movl r26=exception_save_restart + addl r29=NTLBRT_SAVE,r0 // 22-bit restart token. + nop 0 ;; } @@ -157,7 +166,7 @@ ENTRY_NOPROFILE(exception_save, 0) * that are currently alive: * r16,r17=arguments * r18=pr, r19=length, r20=unat, r21=rsc, r22=iip, r23=TOS - * r26=restart point + * r29=restart point * r30,r31=trapframe pointers * p14,p15=memory stack switch */ @@ -543,7 +552,7 @@ ENTRY_NOPROFILE(exception_restore, 0) ld8 r21=[r31],24 // rnat mov ar.pfs=r28 ;; - ld8.fill r29=[r30],16 // tp + ld8.fill r26=[r30],16 // tp ld8 r22=[r31],16 // rsc ;; { .mmi @@ -554,21 +563,21 @@ ENTRY_NOPROFILE(exception_restore, 0) } { .mmi ld8.fill r1=[r30],16 // gp - ld8 r25=[r31],16 // ndirty + ld8 r27=[r31],16 // ndirty cmp.le p14,p15=5,r28 ;; } { .mmb - ld8 r26=[r30] // cfm + ld8 r25=[r30] // cfm ld8 r19=[r31] // ip nop 0 ;; } -{ .mib +{ .mii // Switch register stack alloc r30=ar.pfs,0,0,0,0 // discard current frame - shl r31=r25,16 // value for ar.rsc - nop 0 + shl r31=r27,16 // value for ar.rsc +(p15) mov r13=r26 ;; } // The loadrs can fault if the backing store is not currently @@ -579,7 +588,7 @@ ENTRY_NOPROFILE(exception_restore, 0) { .mmi mov ar.rsc=r31 // setup for loadrs mov ar.k7=r16 -(p15) mov r13=r29 + addl r29=NTLBRT_RESTORE,r0 // 22-bit restart token ;; } exception_restore_restart: @@ -610,7 +619,7 @@ exception_restore_restart: } { .mmi mov cr.ipsr=r24 - mov cr.ifs=r26 + mov cr.ifs=r25 mov pr=r18,0x1ffff ;; } @@ -943,7 +952,7 @@ IVT_ENTRY(Data_Nested_TLB, 0x1400) } { .mii ld8 r27=[r27] // dir L0 page - extr.u r29=r30,2*PAGE_SHIFT-5, PAGE_SHIFT-3 // dir L1 index + extr.u r26=r30,2*PAGE_SHIFT-5, PAGE_SHIFT-3 // dir L1 index ;; dep r27=0,r27,61,3 ;; @@ -956,16 +965,16 @@ IVT_ENTRY(Data_Nested_TLB, 0x1400) ;; } { .mmi - shladd r27=r29,3,r27 + shladd r27=r26,3,r27 ;; - mov r29=rr[r30] + mov r26=rr[r30] dep r27=0,r27,61,3 ;; } { .mii ld8 r27=[r27] // pte page shl r28=r28,5 - dep r29=0,r29,0,2 + dep r26=0,r26,0,2 ;; } { .mmi @@ -978,28 +987,54 @@ IVT_ENTRY(Data_Nested_TLB, 0x1400) { .mmi ld8 r28=[r27] // pte ;; - mov cr.itir=r29 + mov cr.itir=r26 or r28=PTE_DIRTY+PTE_ACCESSED,r28 ;; } -{ .mlx +{ .mmi st8 [r27]=r28 - movl r29=exception_save_restart ;; + addl r26=NTLBRT_SAVE,r0 + addl r27=NTLBRT_RESTORE,r0 } { .mmi itc.d r28 ;; ssm psr.dt - cmp.eq p12,p13=r26,r29 + cmp.eq p12,p0=r29,r26 ;; } -{ .mbb +{ .mib srlz.d + cmp.eq p13,p0=r29,r27 (p12) br.sptk exception_save_restart + ;; +} +{ .mib + nop 0 + nop 0 (p13) br.sptk exception_restore_restart ;; } +{ .mlx + mov r26=ar.bsp + movl r27=kstack + ;; +} +{ .mib + mov r28=sp + addl r27=KSTACK_PAGES*PAGE_SIZE-16,r0 + nop 0 + ;; +} +{ .mmi + mov sp=r27 + ;; + mov r27=ar.bspstore + nop 0 + ;; +} + CALL(trap, 5, r30) IVT_END(Data_Nested_TLB) IVT_ENTRY(Instruction_Key_Miss, 0x1800) Modified: stable/8/sys/ia64/ia64/trap.c ============================================================================== --- stable/8/sys/ia64/ia64/trap.c Wed Mar 31 03:14:40 2010 (r205957) +++ stable/8/sys/ia64/ia64/trap.c Wed Mar 31 03:20:14 2010 (r205958) @@ -414,11 +414,9 @@ trap(int vector, struct trapframe *tf) case IA64_VEC_NESTED_DTLB: /* - * We never call trap() with this vector. We may want to - * do that in the future in case the nested TLB handler - * could not find the translation it needs. In that case - * we could switch to a special (hardwired) stack and - * come here to produce a nice panic(). + * When the nested TLB handler encounters an unexpected + * condition, it'll switch to the backup stack and transfer + * here. All we need to do is panic. */ trap_panic(vector, tf); break; From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 03:58:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B50B106566B; Wed, 31 Mar 2010 03:58:58 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 095878FC1B; Wed, 31 Mar 2010 03:58: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 o2V3wvgA088045; Wed, 31 Mar 2010 03:58:57 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2V3wvTj088041; Wed, 31 Mar 2010 03:58:57 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201003310358.o2V3wvTj088041@svn.freebsd.org> From: Lawrence Stewart Date: Wed, 31 Mar 2010 03:58: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: r205959 - in head/sys: kern modules modules/alq X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Mar 2010 03:58:58 -0000 Author: lstewart Date: Wed Mar 31 03:58:57 2010 New Revision: 205959 URL: http://svn.freebsd.org/changeset/base/205959 Log: Add support for ALQ(9) to be compiled and loaded as a kernel module. Sponsored by: FreeBSD Foundation Reviewed by: dwmalone, jeff, rpaulo, rwatson Approved by: kmacy (mentor) MFC after: 1 month Added: head/sys/modules/alq/ head/sys/modules/alq/Makefile (contents, props changed) Modified: head/sys/kern/kern_alq.c head/sys/modules/Makefile Modified: head/sys/kern/kern_alq.c ============================================================================== --- head/sys/kern/kern_alq.c Wed Mar 31 03:20:14 2010 (r205958) +++ head/sys/kern/kern_alq.c Wed Mar 31 03:58:57 2010 (r205959) @@ -1,7 +1,13 @@ /*- * Copyright (c) 2002, Jeffrey Roberson + * Copyright (c) 2008-2009, Lawrence Stewart + * Copyright (c) 2009-2010, The FreeBSD Foundation * All rights reserved. * + * Portions of this software were developed at the Centre for Advanced + * Internet Architectures, Swinburne University of Technology, Melbourne, + * Australia by Lawrence Stewart under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -27,6 +33,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_mac.h" + #include #include #include @@ -180,9 +188,16 @@ ald_daemon(void) ALD_LOCK(); for (;;) { - while ((alq = LIST_FIRST(&ald_active)) == NULL) + while ((alq = LIST_FIRST(&ald_active)) == NULL && + !ald_shutingdown) msleep(&ald_active, &ald_mtx, PWAIT, "aldslp", 0); + /* Don't shutdown until all active ALQs are flushed. */ + if (ald_shutingdown && alq == NULL) { + ALD_UNLOCK(); + break; + } + ALQ_LOCK(alq); ald_deactivate(alq); ALD_UNLOCK(); @@ -192,6 +207,8 @@ ald_daemon(void) wakeup(alq); ALD_LOCK(); } + + kproc_exit(0); } static void @@ -200,14 +217,29 @@ ald_shutdown(void *arg, int howto) struct alq *alq; ALD_LOCK(); + + /* Ensure no new queues can be created. */ ald_shutingdown = 1; + /* Shutdown all ALQs prior to terminating the ald_daemon. */ while ((alq = LIST_FIRST(&ald_queues)) != NULL) { LIST_REMOVE(alq, aq_link); ALD_UNLOCK(); alq_shutdown(alq); ALD_LOCK(); } + + /* At this point, all ALQs are flushed and shutdown. */ + + /* + * Wake ald_daemon so that it exits. It won't be able to do + * anything until we msleep because we hold the ald_mtx. + */ + wakeup(&ald_active); + + /* Wait for ald_daemon to exit. */ + msleep(ald_proc, &ald_mtx, PWAIT, "aldslp", 0); + ALD_UNLOCK(); } @@ -510,3 +542,53 @@ alq_close(struct alq *alq) free(alq->aq_entbuf, M_ALD); free(alq, M_ALD); } + +static int +alq_load_handler(module_t mod, int what, void *arg) +{ + int ret; + + ret = 0; + + switch (what) { + case MOD_LOAD: + case MOD_SHUTDOWN: + break; + + case MOD_QUIESCE: + ALD_LOCK(); + /* Only allow unload if there are no open queues. */ + if (LIST_FIRST(&ald_queues) == NULL) { + ald_shutingdown = 1; + ALD_UNLOCK(); + ald_shutdown(NULL, 0); + mtx_destroy(&ald_mtx); + } else { + ALD_UNLOCK(); + ret = EBUSY; + } + break; + + case MOD_UNLOAD: + /* If MOD_QUIESCE failed we must fail here too. */ + if (ald_shutingdown == 0) + ret = EBUSY; + break; + + default: + ret = EINVAL; + break; + } + + return (ret); +} + +static moduledata_t alq_mod = +{ + "alq", + alq_load_handler, + NULL +}; + +DECLARE_MODULE(alq, alq_mod, SI_SUB_SMP, SI_ORDER_ANY); +MODULE_VERSION(alq, 1); Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Wed Mar 31 03:20:14 2010 (r205958) +++ head/sys/modules/Makefile Wed Mar 31 03:58:57 2010 (r205959) @@ -20,6 +20,7 @@ SUBDIR= ${_3dfx} \ aio \ alc \ ale \ + alq \ ${_amd} \ ${_amdsbwd} \ ${_amdtemp} \ Added: head/sys/modules/alq/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/alq/Makefile Wed Mar 31 03:58:57 2010 (r205959) @@ -0,0 +1,9 @@ +# $FreeBSD$ + +.include + +.PATH: ${.CURDIR}/../../kern +KMOD= alq +SRCS= opt_mac.h vnode_if.h kern_alq.c + +.include From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 05:05:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B6AB106566B; Wed, 31 Mar 2010 05:05:28 +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 76EA28FC1D; Wed, 31 Mar 2010 05: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 o2V55Sis002762; Wed, 31 Mar 2010 05:05:28 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2V55S1V002750; Wed, 31 Mar 2010 05:05:28 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201003310505.o2V55S1V002750@svn.freebsd.org> From: Marcel Moolenaar Date: Wed, 31 Mar 2010 05:05:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205960 - in stable/8/sys: cddl/contrib/opensolaris/common/atomic/ia64 conf ia64/conf ia64/ia64 ia64/include ia64/pci 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: Wed, 31 Mar 2010 05:05:28 -0000 Author: marcel Date: Wed Mar 31 05:05:28 2010 New Revision: 205960 URL: http://svn.freebsd.org/changeset/base/205960 Log: MFC rev 199727, 200888, 201031, 202904, 203054, 203106, 203572, 203884, 204183, 204184, 204185, 204425, 204904, 204905, 205172, 205234, 205357, 205428, 205429, 205431, 205432, 205433, 205434, 205435, 205454, 205665, 205713, 205723, 205726 and 205727: Bring ia64 machine-dependent changes from 9-current to 8-stable. Deleted: stable/8/sys/ia64/include/nexusvar.h stable/8/sys/ia64/include/sapicreg.h stable/8/sys/ia64/include/sapicvar.h Modified: stable/8/sys/cddl/contrib/opensolaris/common/atomic/ia64/opensolaris_atomic.S stable/8/sys/conf/files.ia64 stable/8/sys/ia64/conf/GENERIC stable/8/sys/ia64/ia64/autoconf.c stable/8/sys/ia64/ia64/clock.c stable/8/sys/ia64/ia64/context.S stable/8/sys/ia64/ia64/db_machdep.c stable/8/sys/ia64/ia64/exception.S stable/8/sys/ia64/ia64/highfp.c stable/8/sys/ia64/ia64/interrupt.c stable/8/sys/ia64/ia64/locore.S stable/8/sys/ia64/ia64/machdep.c stable/8/sys/ia64/ia64/mp_machdep.c stable/8/sys/ia64/ia64/nexus.c stable/8/sys/ia64/ia64/pmap.c stable/8/sys/ia64/ia64/sal.c stable/8/sys/ia64/ia64/sapic.c stable/8/sys/ia64/ia64/support.S stable/8/sys/ia64/ia64/syscall.S stable/8/sys/ia64/ia64/trap.c stable/8/sys/ia64/ia64/vm_machdep.c stable/8/sys/ia64/include/acpica_machdep.h stable/8/sys/ia64/include/clock.h stable/8/sys/ia64/include/cpufunc.h stable/8/sys/ia64/include/frame.h stable/8/sys/ia64/include/intr.h stable/8/sys/ia64/include/intrcnt.h stable/8/sys/ia64/include/mca.h stable/8/sys/ia64/include/pcb.h stable/8/sys/ia64/include/pci_cfgreg.h stable/8/sys/ia64/include/pcpu.h stable/8/sys/ia64/include/smp.h stable/8/sys/ia64/pci/pci_cfgreg.c stable/8/sys/modules/Makefile 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/cddl/contrib/opensolaris/common/atomic/ia64/opensolaris_atomic.S ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/common/atomic/ia64/opensolaris_atomic.S Wed Mar 31 03:58:57 2010 (r205959) +++ stable/8/sys/cddl/contrib/opensolaris/common/atomic/ia64/opensolaris_atomic.S Wed Mar 31 05:05:28 2010 (r205960) @@ -76,7 +76,7 @@ ENTRY(atomic_or_8_nv, 2) END(atomic_or_8_nv) ENTRY(membar_producer, 0) - mf.a + mf ;; br.ret.sptk rp END(membar_producer) Modified: stable/8/sys/conf/files.ia64 ============================================================================== --- stable/8/sys/conf/files.ia64 Wed Mar 31 03:58:57 2010 (r205959) +++ stable/8/sys/conf/files.ia64 Wed Mar 31 05:05:28 2010 (r205960) @@ -45,8 +45,6 @@ contrib/ia64/libuwx/src/uwx_uinfo.c sta contrib/ia64/libuwx/src/uwx_utable.c standard crypto/blowfish/bf_enc.c optional crypto | ipsec crypto/des/des_enc.c optional crypto | ipsec | netsmb -dev/advansys/adv_isa.c optional adv isa -dev/aic/aic_isa.c optional aic isa dev/atkbdc/atkbd.c optional atkbd atkbdc dev/atkbdc/atkbd_atkbdc.c optional atkbd atkbdc dev/atkbdc/atkbdc.c optional atkbdc Modified: stable/8/sys/ia64/conf/GENERIC ============================================================================== --- stable/8/sys/ia64/conf/GENERIC Wed Mar 31 03:58:57 2010 (r205959) +++ stable/8/sys/ia64/conf/GENERIC Wed Mar 31 05:05:28 2010 (r205960) @@ -20,7 +20,7 @@ # # $FreeBSD$ -cpu ITANIUM +cpu ITANIUM2 ident GENERIC makeoptions DEBUG=-g # Build kernel with debug information. @@ -28,10 +28,12 @@ makeoptions DEBUG=-g # Build kernel with options AUDIT # Security event auditing options CD9660 # ISO 9660 Filesystem options COMPAT_43TTY # BSD 4.3 TTY compat (sgtty) -options COMPAT_FREEBSD6 # Compatible with FreeBSD6 options COMPAT_FREEBSD7 # Compatible with FreeBSD7 options FFS # Berkeley Fast Filesystem +options FLOWTABLE # per-cpu routing cache +options GDB # Support remote GDB options GEOM_LABEL # Provides labelization +options INCLUDE_CONFIG_FILE # Include this file in kernel options INET # InterNETworking options INET6 # IPv6 communications protocols options INVARIANTS # Enable calls of extra sanity checking @@ -41,9 +43,11 @@ options MAC # TrustedBSD MAC Framework options MD_ROOT # MD usable as root device options MSDOSFS # MSDOS Filesystem options NFSCLIENT # Network Filesystem Client -options NFSSERVER # Network Filesystem Server options NFSLOCKD # Network Lock Manager +options NFSSERVER # Network Filesystem Server options NFS_ROOT # NFS usable as root device +options P1003_1B_SEMAPHORES # POSIX-style semaphores +options PREEMPTION # Enable kernel thread preemption options PRINTF_BUFR_SIZE=128 # Printf buffering to limit interspersion options PROCFS # Process filesystem (/proc) options PSEUDOFS # Pseudo-filesystem framework @@ -56,13 +60,10 @@ options STACK # stack(9) support options SYSVMSG # SYSV-style message queues options SYSVSEM # SYSV-style semaphores options SYSVSHM # SYSV-style shared memory -options P1003_1B_SEMAPHORES # POSIX-style semaphores options UFS_ACL # Support for access control lists options UFS_DIRHASH # Hash-based directory lookup scheme options UFS_GJOURNAL # Enable gjournal-based UFS journaling options _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B RT extensions -options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) -options INCLUDE_CONFIG_FILE # Include this file in kernel # Various "busses" device firewire # FireWire bus code @@ -76,20 +77,25 @@ device ata # ATA controller device atadisk # ATA disk drives device atapicd # ATAPI CDROM drives device atapifd # ATAPI floppy drives +device atapist # ATAPI tape drives device ataraid # ATA RAID drives # SCSI Controllers device ahc # AHA2940 and AIC7xxx devices device ahd # AHA39320/29320 and AIC79xx devices +device hptiop # Highpoint RocketRaid 3xxx series device isp # Qlogic family device mpt # LSI-Logic MPT-Fusion device sym # NCR/Symbios Logic # RAID controllers interfaced to the SCSI subsystem +device amr # AMI MegaRAID device ciss # Compaq Smart RAID 5* device dpt # DPT Smartcache III, IV device iir # Intel Integrated RAID +device ips # IBM (Adaptec) ServeRAID device mly # Mylex AcceleRAID/eXtremeRAID +device twa # 3ware 9000 series PATA/SATA RAID # SCSI peripherals device cd # CD-ROM, DVD-ROM etc. @@ -102,7 +108,6 @@ device ses # Environmental Services (a # RAID controllers device aac # Adaptec FSA RAID device aacp # SCSI passthrough for aac (requires CAM) -device amr # AMI MegaRAID device ida # Compaq Smart RAID device mlx # Mylex DAC960 family @@ -118,34 +123,58 @@ device ums # Mouse # PCI Ethernet NICs. device de # DEC/Intel DC21x4x (``Tulip'') -device em # Intel PRO/1000 adapter Gigabit Ethernet Card -device le # AMD Am7900 LANCE and Am79C9xx PCnet +device em # Intel PRO/1000 Gigabit Ethernet Family +device igb # Intel PRO/1000 PCIE Server Gigabit Family +device ixgbe # Intel PRO/10GbE PCIE Ethernet Family device txp # 3Com 3cR990 (``Typhoon'') -device vx # 3Com 3c590, 3c595 (``Vortex'') # PCI Ethernet NICs that use the common MII bus controller code. +device ae # Attansic/Atheros L2 FastEthernet +device age # Attansic/Atheros L1 Gigabit Ethernet +device alc # Atheros AR8131/AR8132 Ethernet +device ale # Atheros AR8121/AR8113/AR8114 Ethernet +device bce # Broadcom BCM5706/BCM5708 Gigabit Ethernet +device bfe # Broadcom BCM440x 10/100 Ethernet device bge # Broadcom BCM570xx Gigabit Ethernet -device dc # DEC/Intel 21143 and various workalikes +device et # Agere ET1310 10/100/Gigabit Ethernet +device jme # JMicron JMC250 Gigabit/JMC260 Fast Ethernet +device msk # Marvell/SysKonnect Yukon II Gigabit Ethernet +device nge # NatSemi DP83820 gigabit Ethernet device fxp # Intel EtherExpress PRO/100B (82557, 82558) -device pcn # AMD Am79C97x PCI 10/100 (precedence over 'le') device re # RealTek 8139C+/8169/8169S/8110S -device rl # RealTek 8129/8139 device sf # Adaptec AIC-6915 (``Starfire'') -device sis # Silicon Integrated Systems SiS 900/SiS 7016 +device sk # SysKonnect SK-984x & SK-982x gigabit Ethernet +device ste # Sundance ST201 (D-Link DFE-550TX) +device stge # Sundance/Tamarack TC9021 gigabit Ethernet +device tx # SMC EtherPower II (83c170 ``EPIC'') +device vge # VIA VT612x gigabit Ethernet device xl # 3Com 3c90x ("Boomerang", "Cyclone") # USB Ethernet device aue # ADMtek USB Ethernet +device axe # ASIX Electronics USB Ethernet device cdce # Generic USB over Ethernet device cue # CATC USB Ethernet device kue # Kawasaki LSI USB Ethernet +device rue # RealTek RTL8150 USB Ethernet +device udav # Davicom DM9601E USB + +# USB Serial +device uark # Technologies ARK3116 based serial adapters +device ubsa # Belkin F5U103 and compatible serial adapters +device uftdi # For FTDI usb serial adapters +device uipaq # Some WinCE based devices +device uplcom # Prolific PL-2303 serial adapters +device uslcom # SI Labs CP2101/CP2102 serial adapters +device uvisor # Visor and Palm devices +device uvscom # USB serial support for DDI pocket's PHS # FireWire support -#device sbp # SCSI over FireWire (need scbus & da) +device fwip # IP over FireWire (RFC 2734,3146) +device sbp # SCSI over FireWire (need scbus & da) # Various (pseudo) devices device ether # Ethernet support -device vlan # 802.1Q VLAN support device faith # IPv6-to-IPv4 relaying (translation) device gif # IPv6 and IPv4 tunneling device loop # Network loopback @@ -155,6 +184,7 @@ device puc # Multi I/O cards and multi device random # Entropy device device tun # Packet tunnel. device uart # Serial port (UART) +device vlan # 802.1Q VLAN support device firmware # firmware assist module # The `bpf' device enables the Berkeley Packet Filter. Modified: stable/8/sys/ia64/ia64/autoconf.c ============================================================================== --- stable/8/sys/ia64/ia64/autoconf.c Wed Mar 31 03:58:57 2010 (r205959) +++ stable/8/sys/ia64/ia64/autoconf.c Wed Mar 31 05:05:28 2010 (r205960) @@ -39,15 +39,9 @@ #include #include -#include #include - -#include -#include -#include -#include -#include -#include +#include +#include static void configure_first(void *); static void configure(void *); @@ -97,12 +91,9 @@ static void configure_final(void *dummy) { - /* - * Now we're ready to handle (pending) interrupts. - * XXX this is slightly misplaced. - */ - enable_intr(); - cninit_finish(); + + ia64_enable_intr(); + cold = 0; } Modified: stable/8/sys/ia64/ia64/clock.c ============================================================================== --- stable/8/sys/ia64/ia64/clock.c Wed Mar 31 03:58:57 2010 (r205959) +++ stable/8/sys/ia64/ia64/clock.c Wed Mar 31 05:05:28 2010 (r205960) @@ -29,19 +29,42 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include +#include #include #include #include -#include #include #include -#include #include #include +#include +#include #include +#include + +SYSCTL_NODE(_debug, OID_AUTO, clock, CTLFLAG_RW, 0, "clock statistics"); + +static int adjust_edges = 0; +SYSCTL_INT(_debug_clock, OID_AUTO, adjust_edges, CTLFLAG_RD, + &adjust_edges, 0, "Number of times ITC got more than 12.5% behind"); + +static int adjust_excess = 0; +SYSCTL_INT(_debug_clock, OID_AUTO, adjust_excess, CTLFLAG_RD, + &adjust_excess, 0, "Total number of ignored ITC interrupts"); -uint64_t ia64_clock_reload; +static int adjust_lost = 0; +SYSCTL_INT(_debug_clock, OID_AUTO, adjust_lost, CTLFLAG_RD, + &adjust_lost, 0, "Total number of lost ITC interrupts"); + +static int adjust_ticks = 0; +SYSCTL_INT(_debug_clock, OID_AUTO, adjust_ticks, CTLFLAG_RD, + &adjust_ticks, 0, "Total number of ITC interrupts with adjustment"); + +static u_int ia64_clock_xiv; +static uint64_t ia64_clock_reload; #ifndef SMP static timecounter_get_t ia64_get_timecount; @@ -54,26 +77,80 @@ static struct timecounter ia64_timecount "ITC" /* name */ }; -static unsigned +static u_int ia64_get_timecount(struct timecounter* tc) { return ia64_get_itc(); } #endif -void -pcpu_initclock(void) +static u_int +ia64_ih_clock(struct thread *td, u_int xiv, struct trapframe *tf) { + uint64_t adj, clk, itc; + int64_t delta; + int count; + + PCPU_INC(md.stats.pcs_nclks); + + if (PCPU_GET(cpuid) == 0) { + /* + * Clock processing on the BSP. + */ + intrcnt[INTRCNT_CLOCK]++; + + itc = ia64_get_itc(); + + adj = PCPU_GET(md.clockadj); + clk = PCPU_GET(md.clock); + + delta = itc - clk; + count = 0; + while (delta >= ia64_clock_reload) { +#ifdef SMP + ipi_all_but_self(ia64_clock_xiv); +#endif + hardclock(TRAPF_USERMODE(tf), TRAPF_PC(tf)); + if (profprocs != 0) + profclock(TRAPF_USERMODE(tf), TRAPF_PC(tf)); + statclock(TRAPF_USERMODE(tf)); + delta -= ia64_clock_reload; + clk += ia64_clock_reload; + if (adj != 0) + adjust_ticks++; + count++; + } + ia64_set_itm(ia64_get_itc() + ia64_clock_reload - adj); + ia64_srlz_d(); + if (count > 0) { + adjust_lost += count - 1; + if (delta > (ia64_clock_reload >> 3)) { + if (adj == 0) + adjust_edges++; + adj = ia64_clock_reload >> 4; + } else + adj = 0; + } else { + adj = 0; + adjust_excess++; + } + PCPU_SET(md.clock, clk); + PCPU_SET(md.clockadj, adj); + } else { + /* + * Clock processing on the BSP. + */ + hardclock_cpu(TRAPF_USERMODE(tf)); + if (profprocs != 0) + profclock(TRAPF_USERMODE(tf), TRAPF_PC(tf)); + statclock(TRAPF_USERMODE(tf)); + } - PCPU_SET(md.clockadj, 0); - PCPU_SET(md.clock, ia64_get_itc()); - ia64_set_itm(PCPU_GET(md.clock) + ia64_clock_reload); - ia64_set_itv(CLOCK_VECTOR); /* highest priority class */ - ia64_srlz_d(); + return (0); } /* - * Start the real-time and statistics clocks. We use cr.itc and cr.itm + * Start the real-time and statistics clocks. We use ar.itc and cr.itm * to implement a 1000hz clock. */ void @@ -81,6 +158,11 @@ cpu_initclocks() { u_long itc_freq; + ia64_clock_xiv = ia64_xiv_alloc(PI_REALTIME, IA64_XIV_IPI, + ia64_ih_clock); + if (ia64_clock_xiv == 0) + panic("No XIV for clock interrupts"); + itc_freq = (u_long)ia64_itc_freq() * 1000000ul; stathz = hz; @@ -91,7 +173,11 @@ cpu_initclocks() tc_init(&ia64_timecounter); #endif - pcpu_initclock(); + PCPU_SET(md.clockadj, 0); + PCPU_SET(md.clock, ia64_get_itc()); + ia64_set_itm(PCPU_GET(md.clock) + ia64_clock_reload); + ia64_set_itv(ia64_clock_xiv); + ia64_srlz_d(); } void Modified: stable/8/sys/ia64/ia64/context.S ============================================================================== --- stable/8/sys/ia64/ia64/context.S Wed Mar 31 03:58:57 2010 (r205959) +++ stable/8/sys/ia64/ia64/context.S Wed Mar 31 05:05:28 2010 (r205960) @@ -86,18 +86,18 @@ ENTRY(restorectx, 1) { .mmi ld8.fill r6=[r14],16 // r6 ld8.fill r7=[r15],16 // r7 - nop 1 + nop 0 ;; } { .mmi mov ar.unat=r16 mov ar.rsc=3 - nop 2 + nop 0 } { .mmi ld8 r17=[r14],16 // b1 ld8 r18=[r15],16 // b2 - nop 3 + nop 0 ;; } { .mmi @@ -286,7 +286,7 @@ ENTRY(swapctx, 2) (p15) br.ret.sptk rp ;; } -{ .mfb +{ .mib mov r32=r33 nop 0 br.sptk restorectx @@ -338,10 +338,10 @@ ENTRY(save_callee_saved, 1) mov r17=b5 ;; } -{ .mfi +{ .mii st8 [r14]=r17,16 // b5 - nop 0 mov r16=ar.lc + nop 0 ;; } { .mmb @@ -363,13 +363,13 @@ ENTRY(restore_callee_saved, 1) add r31=-8,r32 ;; } -{ .mmb +{ .mmi ld8.fill r4=[r31],16 // r4 ld8.fill r5=[r32],16 // r5 nop 0 ;; } -{ .mmb +{ .mmi ld8.fill r6=[r31],16 // r6 ld8.fill r7=[r32],16 // r7 nop 0 Modified: stable/8/sys/ia64/ia64/db_machdep.c ============================================================================== --- stable/8/sys/ia64/ia64/db_machdep.c Wed Mar 31 03:58:57 2010 (r205959) +++ stable/8/sys/ia64/ia64/db_machdep.c Wed Mar 31 05:05:28 2010 (r205960) @@ -577,6 +577,13 @@ db_write_bytes(vm_offset_t addr, size_t void db_show_mdpcpu(struct pcpu *pc) { + struct pcpu_md *md = &pc->pc_md; + + db_printf("MD: vhpt = %#lx\n", md->vhpt); + db_printf("MD: lid = %#lx\n", md->lid); + db_printf("MD: clock = %#lx/%#lx\n", md->clock, md->clockadj); + db_printf("MD: stats = %p\n", &md->stats); + db_printf("MD: pmap = %p\n", md->current_pmap); } void Modified: stable/8/sys/ia64/ia64/exception.S ============================================================================== --- stable/8/sys/ia64/ia64/exception.S Wed Mar 31 03:58:57 2010 (r205959) +++ stable/8/sys/ia64/ia64/exception.S Wed Mar 31 05:05:28 2010 (r205960) @@ -89,10 +89,10 @@ xhead: data8 xtrace addl r29=1024*5*8,r0 ;; \ (p15) sub r27=r28,r29 ;; \ } ; \ -{ .mib ; \ +{ .mmi ; \ st8 [r28]=r27 ; \ - mov pr=r25,0x1ffff ; \ - nop 0 ;; \ + nop 0 ; \ + mov pr=r25,0x1ffff ;; \ } #else @@ -148,10 +148,10 @@ ENTRY_NOPROFILE(exception_save, 0) add r31=8,r30 ;; } -{ .mib +{ .mmi mov r22=cr.iip - addl r29=NTLBRT_SAVE,r0 // 22-bit restart token. nop 0 + addl r29=NTLBRT_SAVE,r0 // 22-bit restart token. ;; } @@ -235,7 +235,7 @@ exception_save_restart: nop 0 ;; } -{ .mmb +{ .mmi (p13) mov ar.rnat=r19 mov r18=ar.bsp nop 0 @@ -248,7 +248,7 @@ exception_save_restart: ;; } // r19=ifs, r22=iip -{ .mmb +{ .mmi st8 [r31]=r18,16 // ndirty st8 [r30]=r19,16 // cfm nop 0 @@ -260,7 +260,7 @@ exception_save_restart: add r29=16,r30 ;; } -{ .mmb +{ .mmi st8 [r30]=r17,24 // ifa st8 [r31]=r18,24 // isr nop 0 @@ -407,7 +407,7 @@ exception_save_restart: movl gp=__gp ;; } -{ .mfb +{ .mib srlz.d nop 0 br.sptk b7 @@ -567,7 +567,7 @@ ENTRY_NOPROFILE(exception_restore, 0) cmp.le p14,p15=5,r28 ;; } -{ .mmb +{ .mmi ld8 r25=[r30] // cfm ld8 r19=[r31] // ip nop 0 @@ -606,13 +606,13 @@ exception_restore_restart: dep r31=0,r31,0,13 // 8KB aligned ;; } -{ .mmb +{ .mmi mov ar.k6=r31 mov ar.rnat=r21 nop 0 ;; } -{ .mmb +{ .mmi mov ar.unat=r17 mov cr.iip=r19 nop 0 @@ -656,7 +656,7 @@ END(exception_restore) add out1=16,sp ; \ br.call.sptk rp=_func_ ;; \ } ; \ -{ .mfb ; \ +{ .mib ; \ nop 0 ; \ nop 0 ; \ br.sptk exception_restore ;; \ @@ -1021,10 +1021,10 @@ IVT_ENTRY(Data_Nested_TLB, 0x1400) movl r27=kstack ;; } -{ .mib +{ .mmi mov r28=sp - addl r27=KSTACK_PAGES*PAGE_SIZE-16,r0 nop 0 + addl r27=KSTACK_PAGES*PAGE_SIZE-16,r0 ;; } { .mmi @@ -1287,13 +1287,13 @@ IVT_ENTRY(Break_Instruction, 0x2c00) (p11) srlz.d add out1=16,sp } -{ .mfb +{ .mib nop 0 nop 0 br.call.sptk rp=trap ;; } -{ .mfb +{ .mib nop 0 nop 0 br.sptk exception_restore @@ -1303,24 +1303,24 @@ IVT_END(Break_Instruction) IVT_ENTRY(External_Interrupt, 0x3000) { .mib - mov r17=cr.ivr // Put the vector in the trap frame. + mov r17=ar.itc // Put the ITC in the trapframe. mov r16=ip br.sptk exception_save ;; } -{ .mfb +{ .mmi alloc r15=ar.pfs,0,0,1,0 nop 0 nop 0 ;; } -{ .mfb +{ .mib add out0=16,sp nop 0 - br.call.sptk rp=interrupt + br.call.sptk rp=ia64_handle_intr ;; } -{ .mfb +{ .mib nop 0 nop 0 br.sptk exception_restore Modified: stable/8/sys/ia64/ia64/highfp.c ============================================================================== --- stable/8/sys/ia64/ia64/highfp.c Wed Mar 31 03:58:57 2010 (r205959) +++ stable/8/sys/ia64/ia64/highfp.c Wed Mar 31 05:05:28 2010 (r205960) @@ -53,7 +53,7 @@ ia64_highfp_ipi(struct pcpu *cpu) { int error; - ipi_send(cpu, IPI_HIGH_FP); + ipi_send(cpu, ia64_ipi_highfp); error = msleep_spin(&cpu->pc_fpcurthread, &ia64_highfp_mtx, "High FP", 0); return (error); @@ -92,8 +92,6 @@ ia64_highfp_enable(struct thread *td, st pcb = td->td_pcb; mtx_lock_spin(&ia64_highfp_mtx); - KASSERT((tf->tf_special.psr & IA64_PSR_DFH) != 0, - ("(tf->tf_special.psr & IA64_PSR_DFH) == 0")); cpu = pcb->pcb_fpcpu; #ifdef SMP if (cpu != NULL && cpu != pcpup) { Modified: stable/8/sys/ia64/ia64/interrupt.c ============================================================================== --- stable/8/sys/ia64/ia64/interrupt.c Wed Mar 31 03:58:57 2010 (r205959) +++ stable/8/sys/ia64/ia64/interrupt.c Wed Mar 31 05:05:28 2010 (r205960) @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include @@ -52,246 +53,141 @@ #include #include -#include #include #include #include #include +#include #include #include #include -#include #include -#ifdef EVCNT_COUNTERS -struct evcnt clock_intr_evcnt; /* event counter for clock intrs. */ -#else -#include -#include -#endif - #ifdef DDB #include #endif -static void ia64_dispatch_intr(void *, u_int); - -static void -dummy_perf(unsigned long vector, struct trapframe *tf) -{ - printf("performance interrupt!\n"); -} - -void (*perf_irq)(unsigned long, struct trapframe *) = dummy_perf; - -SYSCTL_NODE(_debug, OID_AUTO, clock, CTLFLAG_RW, 0, "clock statistics"); - -static int adjust_edges = 0; -SYSCTL_INT(_debug_clock, OID_AUTO, adjust_edges, CTLFLAG_RD, - &adjust_edges, 0, "Number of times ITC got more than 12.5% behind"); +struct ia64_intr { + struct intr_event *event; /* interrupt event */ + volatile long *cntp; /* interrupt counter */ + struct sapic *sapic; + u_int irq; +}; -static int adjust_excess = 0; -SYSCTL_INT(_debug_clock, OID_AUTO, adjust_excess, CTLFLAG_RD, - &adjust_excess, 0, "Total number of ignored ITC interrupts"); +ia64_ihtype *ia64_handler[IA64_NXIVS]; -static int adjust_lost = 0; -SYSCTL_INT(_debug_clock, OID_AUTO, adjust_lost, CTLFLAG_RD, - &adjust_lost, 0, "Total number of lost ITC interrupts"); +static enum ia64_xiv_use ia64_xiv[IA64_NXIVS]; +static struct ia64_intr *ia64_intrs[IA64_NXIVS]; -static int adjust_ticks = 0; -SYSCTL_INT(_debug_clock, OID_AUTO, adjust_ticks, CTLFLAG_RD, - &adjust_ticks, 0, "Total number of ITC interrupts with adjustment"); +static ia64_ihtype ia64_ih_invalid; +static ia64_ihtype ia64_ih_irq; void -interrupt(struct trapframe *tf) +ia64_xiv_init(void) { - struct thread *td; - uint64_t adj, clk, itc; - int64_t delta; - u_int vector; - int count; - uint8_t inta; + u_int xiv; - ia64_set_fpsr(IA64_FPSR_DEFAULT); + for (xiv = 0; xiv < IA64_NXIVS; xiv++) { + ia64_handler[xiv] = ia64_ih_invalid; + ia64_xiv[xiv] = IA64_XIV_FREE; + ia64_intrs[xiv] = NULL; + } + (void)ia64_xiv_reserve(15, IA64_XIV_ARCH, NULL); +} - td = curthread; +int +ia64_xiv_free(u_int xiv, enum ia64_xiv_use what) +{ - PCPU_INC(cnt.v_intr); + if (xiv >= IA64_NXIVS) + return (EINVAL); + if (what == IA64_XIV_FREE || what == IA64_XIV_ARCH) + return (EINVAL); + if (ia64_xiv[xiv] != what) + return (ENXIO); + ia64_xiv[xiv] = IA64_XIV_FREE; + ia64_handler[xiv] = ia64_ih_invalid; + return (0); +} - vector = tf->tf_special.ifa; +int +ia64_xiv_reserve(u_int xiv, enum ia64_xiv_use what, ia64_ihtype ih) +{ - next: - /* - * Handle ExtINT interrupts by generating an INTA cycle to - * read the vector. - * IPI_STOP_HARD is mapped to IPI_STOP so it is not necessary - * to add it to this switch-like construct. - */ - if (vector == 0) { - PCPU_INC(md.stats.pcs_nextints); - inta = ia64_ld1(&ia64_pib->ib_inta); - if (inta == 15) { - PCPU_INC(md.stats.pcs_nstrays); - __asm __volatile("mov cr.eoi = r0;; srlz.d"); - goto stray; - } - vector = (int)inta; - } else if (vector == 15) { - PCPU_INC(md.stats.pcs_nstrays); - goto stray; - } + if (xiv >= IA64_NXIVS) + return (EINVAL); + if (what == IA64_XIV_FREE) + return (EINVAL); + if (ia64_xiv[xiv] != IA64_XIV_FREE) + return (EBUSY); + ia64_xiv[xiv] = what; + ia64_handler[xiv] = (ih == NULL) ? ia64_ih_invalid: ih; + if (bootverbose) + printf("XIV %u: use=%u, IH=%p\n", xiv, what, ih); + return (0); +} - if (vector == CLOCK_VECTOR) {/* clock interrupt */ - /* CTR0(KTR_INTR, "clock interrupt"); */ +u_int +ia64_xiv_alloc(u_int prio, enum ia64_xiv_use what, ia64_ihtype ih) +{ + u_int hwprio; + u_int xiv0, xiv; - itc = ia64_get_itc(); + hwprio = prio >> 2; + if (hwprio > IA64_MAX_HWPRIO) + hwprio = IA64_MAX_HWPRIO; - PCPU_INC(md.stats.pcs_nclks); -#ifdef EVCNT_COUNTERS - clock_intr_evcnt.ev_count++; -#else - intrcnt[INTRCNT_CLOCK]++; -#endif + xiv0 = IA64_NXIVS - (hwprio + 1) * 16; - critical_enter(); + KASSERT(xiv0 >= IA64_MIN_XIV, ("%s: min XIV", __func__)); + KASSERT(xiv0 < IA64_NXIVS, ("%s: max XIV", __func__)); - adj = PCPU_GET(md.clockadj); - clk = PCPU_GET(md.clock); - delta = itc - clk; - count = 0; - while (delta >= ia64_clock_reload) { - /* Only the BSP runs the real clock */ - if (PCPU_GET(cpuid) == 0) - hardclock(TRAPF_USERMODE(tf), TRAPF_PC(tf)); - else - hardclock_cpu(TRAPF_USERMODE(tf)); - if (profprocs != 0) - profclock(TRAPF_USERMODE(tf), TRAPF_PC(tf)); - statclock(TRAPF_USERMODE(tf)); - delta -= ia64_clock_reload; - clk += ia64_clock_reload; - if (adj != 0) - adjust_ticks++; - count++; - } - ia64_set_itm(ia64_get_itc() + ia64_clock_reload - adj); - if (count > 0) { - adjust_lost += count - 1; - if (delta > (ia64_clock_reload >> 3)) { - if (adj == 0) - adjust_edges++; - adj = ia64_clock_reload >> 4; - } else - adj = 0; - } else { - adj = 0; - adjust_excess++; - } - PCPU_SET(md.clock, clk); - PCPU_SET(md.clockadj, adj); - critical_exit(); - ia64_srlz_d(); + xiv = xiv0; + while (xiv < IA64_NXIVS && ia64_xiv_reserve(xiv, what, ih)) + xiv++; -#ifdef SMP - } else if (vector == ipi_vector[IPI_AST]) { - PCPU_INC(md.stats.pcs_nasts); - CTR1(KTR_SMP, "IPI_AST, cpuid=%d", PCPU_GET(cpuid)); - } else if (vector == ipi_vector[IPI_HIGH_FP]) { - PCPU_INC(md.stats.pcs_nhighfps); - ia64_highfp_save_ipi(); - } else if (vector == ipi_vector[IPI_RENDEZVOUS]) { - PCPU_INC(md.stats.pcs_nrdvs); - CTR1(KTR_SMP, "IPI_RENDEZVOUS, cpuid=%d", PCPU_GET(cpuid)); - enable_intr(); - smp_rendezvous_action(); - disable_intr(); - } else if (vector == ipi_vector[IPI_STOP]) { - PCPU_INC(md.stats.pcs_nstops); - cpumask_t mybit = PCPU_GET(cpumask); - - savectx(PCPU_PTR(md.pcb)); - atomic_set_int(&stopped_cpus, mybit); - while ((started_cpus & mybit) == 0) - cpu_spinwait(); - atomic_clear_int(&started_cpus, mybit); - atomic_clear_int(&stopped_cpus, mybit); - } else if (vector == ipi_vector[IPI_PREEMPT]) { - PCPU_INC(md.stats.pcs_npreempts); - CTR1(KTR_SMP, "IPI_PREEMPT, cpuid=%d", PCPU_GET(cpuid)); - __asm __volatile("mov cr.eoi = r0;; srlz.d"); - enable_intr(); - sched_preempt(curthread); - disable_intr(); - goto stray; -#endif - } else { - PCPU_INC(md.stats.pcs_nhwints); - atomic_add_int(&td->td_intr_nesting_level, 1); - ia64_dispatch_intr(tf, vector); - atomic_subtract_int(&td->td_intr_nesting_level, 1); - } + if (xiv < IA64_NXIVS) + return (xiv); - __asm __volatile("mov cr.eoi = r0;; srlz.d"); - vector = ia64_get_ivr(); - if (vector != 15) - goto next; + xiv = xiv0; + while (xiv >= IA64_MIN_XIV && ia64_xiv_reserve(xiv, what, ih)) + xiv--; -stray: - if (TRAPF_USERMODE(tf)) { - enable_intr(); - userret(td, tf); - mtx_assert(&Giant, MA_NOTOWNED); - do_ast(tf); - } + return ((xiv >= IA64_MIN_XIV) ? xiv : 0); } -/* - * Hardware irqs have vectors starting at this offset. - */ -#define IA64_HARDWARE_IRQ_BASE 0x20 - -struct ia64_intr { - struct intr_event *event; /* interrupt event */ - volatile long *cntp; /* interrupt counter */ - struct sapic *sapic; - u_int irq; -}; - -static struct ia64_intr *ia64_intrs[256]; - static void ia64_intr_eoi(void *arg) { - u_int vector = (uintptr_t)arg; + u_int xiv = (uintptr_t)arg; struct ia64_intr *i; - i = ia64_intrs[vector]; - if (i != NULL) - sapic_eoi(i->sapic, vector); + i = ia64_intrs[xiv]; + KASSERT(i != NULL, ("%s", __func__)); + sapic_eoi(i->sapic, xiv); } static void ia64_intr_mask(void *arg) { - u_int vector = (uintptr_t)arg; + u_int xiv = (uintptr_t)arg; struct ia64_intr *i; - i = ia64_intrs[vector]; - if (i != NULL) { - sapic_mask(i->sapic, i->irq); - sapic_eoi(i->sapic, vector); - } + i = ia64_intrs[xiv]; + KASSERT(i != NULL, ("%s", __func__)); + sapic_mask(i->sapic, i->irq); + sapic_eoi(i->sapic, xiv); } static void ia64_intr_unmask(void *arg) { - u_int vector = (uintptr_t)arg; + u_int xiv = (uintptr_t)arg; struct ia64_intr *i; - i = ia64_intrs[vector]; - if (i != NULL) - sapic_unmask(i->sapic, i->irq); + i = ia64_intrs[xiv]; + KASSERT(i != NULL, ("%s", __func__)); + sapic_unmask(i->sapic, i->irq); } int @@ -301,57 +197,79 @@ ia64_setup_intr(const char *name, int ir struct ia64_intr *i; struct sapic *sa; char *intrname; - u_int vector; + u_int prio, xiv; int error; - /* Get the I/O SAPIC that corresponds to the IRQ. */ - sa = sapic_lookup(irq); - if (sa == NULL) + prio = intr_priority(flags); + if (prio > PRI_MAX_ITHD) return (EINVAL); + /* XXX lock */ + + /* Get the I/O SAPIC and XIV that corresponds to the IRQ. */ + sa = sapic_lookup(irq, &xiv); + if (sa == NULL) { + /* XXX unlock */ + return (EINVAL); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 05:23:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8242A1065670; Wed, 31 Mar 2010 05:23:35 +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 70AC18FC17; Wed, 31 Mar 2010 05:23: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 o2V5NZZA006810; Wed, 31 Mar 2010 05:23:35 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2V5NZsV006808; Wed, 31 Mar 2010 05:23:35 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201003310523.o2V5NZsV006808@svn.freebsd.org> From: Marcel Moolenaar Date: Wed, 31 Mar 2010 05:23: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: r205961 - stable/8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 05:23:35 -0000 Author: marcel Date: Wed Mar 31 05:23:35 2010 New Revision: 205961 URL: http://svn.freebsd.org/changeset/base/205961 Log: , and removed on ia64. Modified: stable/8/ObsoleteFiles.inc Modified: stable/8/ObsoleteFiles.inc ============================================================================== --- stable/8/ObsoleteFiles.inc Wed Mar 31 05:05:28 2010 (r205960) +++ stable/8/ObsoleteFiles.inc Wed Mar 31 05:23:35 2010 (r205961) @@ -14,6 +14,12 @@ # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last. # +# 20100330: [ia64] Sync with 9-current +.if ${TARGET_ARCH} == "ia64" +OLD_FILES+=usr/include/machine/nexusvar.h +OLD_FILES+=usr/include/machine/sapicreg.h +OLD_FILES+=usr/include/machine/sapicvar.h +.endif # 20100329: gcpio removal OLD_FILES+=usr/bin/gcpio OLD_FILES+=usr/share/info/cpio.info.gz From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 07:10:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C02001065670; Wed, 31 Mar 2010 07:10:40 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AE07B8FC12; Wed, 31 Mar 2010 07:10: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 o2V7Aec7030381; Wed, 31 Mar 2010 07:10:40 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2V7Ae14030379; Wed, 31 Mar 2010 07:10:40 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201003310710.o2V7Ae14030379@svn.freebsd.org> From: Fabien Thomas Date: Wed, 31 Mar 2010 07:10: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: r205965 - stable/8/usr.sbin/pmcstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Mar 2010 07:10:40 -0000 Author: fabient Date: Wed Mar 31 07:10:40 2010 New Revision: 205965 URL: http://svn.freebsd.org/changeset/base/205965 Log: MFC r205809: Wait for pmc name in the log before displaying data. This will solve an abort in case of low throughput PMCs. Modified: stable/8/usr.sbin/pmcstat/pmcstat_log.c Directory Properties: stable/8/usr.sbin/pmcstat/ (props changed) Modified: stable/8/usr.sbin/pmcstat/pmcstat_log.c ============================================================================== --- stable/8/usr.sbin/pmcstat/pmcstat_log.c Wed Mar 31 06:50:25 2010 (r205964) +++ stable/8/usr.sbin/pmcstat/pmcstat_log.c Wed Mar 31 07:10:40 2010 (r205965) @@ -1049,7 +1049,6 @@ pmcstat_pmcindex_to_name(int pmcin) if (pr->pr_pmcin == pmcin) return pmcstat_string_unintern(pr->pr_pmcname); - err(EX_SOFTWARE, "ERROR: cannot find pmcid name"); return NULL; } @@ -1789,19 +1788,23 @@ static void pmcstat_refresh_top(void) { char pmcname[40]; + const char *s; /* If in pause mode do not refresh display. */ if (pmcstat_pause) return; + /* Wait until PMC pop in the log. */ + s = pmcstat_pmcindex_to_name(pmcstat_pmcinfilter); + if (s == NULL) + return; + /* Format PMC name. */ if (pmcstat_mergepmc) - snprintf(pmcname, sizeof(pmcname), "[%s]", - pmcstat_pmcindex_to_name(pmcstat_pmcinfilter)); + snprintf(pmcname, sizeof(pmcname), "[%s]", s); else snprintf(pmcname, sizeof(pmcname), "%s.%d", - pmcstat_pmcindex_to_name(pmcstat_pmcinfilter), - pmcstat_pmcinfilter); + s, pmcstat_pmcinfilter); PMCSTAT_PRINTBEGIN(); PMCSTAT_PRINTW("PMC: %s Samples: %u processed, %u invalid\n\n", From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 07:12:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 040861065672; Wed, 31 Mar 2010 07:12:13 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E62E48FC08; Wed, 31 Mar 2010 07:12: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 o2V7CCSW030789; Wed, 31 Mar 2010 07:12:12 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2V7CC0H030787; Wed, 31 Mar 2010 07:12:12 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201003310712.o2V7CC0H030787@svn.freebsd.org> From: Fabien Thomas Date: Wed, 31 Mar 2010 07:12: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: r205966 - stable/7/usr.sbin/pmcstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Mar 2010 07:12:13 -0000 Author: fabient Date: Wed Mar 31 07:12:12 2010 New Revision: 205966 URL: http://svn.freebsd.org/changeset/base/205966 Log: MFC r205809: Wait for pmc name in the log before displaying data. This will solve an abort in case of low throughput PMCs. Modified: stable/7/usr.sbin/pmcstat/pmcstat_log.c Directory Properties: stable/7/usr.sbin/pmcstat/ (props changed) Modified: stable/7/usr.sbin/pmcstat/pmcstat_log.c ============================================================================== --- stable/7/usr.sbin/pmcstat/pmcstat_log.c Wed Mar 31 07:10:40 2010 (r205965) +++ stable/7/usr.sbin/pmcstat/pmcstat_log.c Wed Mar 31 07:12:12 2010 (r205966) @@ -1049,7 +1049,6 @@ pmcstat_pmcindex_to_name(int pmcin) if (pr->pr_pmcin == pmcin) return pmcstat_string_unintern(pr->pr_pmcname); - err(EX_SOFTWARE, "ERROR: cannot find pmcid name"); return NULL; } @@ -1789,19 +1788,23 @@ static void pmcstat_refresh_top(void) { char pmcname[40]; + const char *s; /* If in pause mode do not refresh display. */ if (pmcstat_pause) return; + /* Wait until PMC pop in the log. */ + s = pmcstat_pmcindex_to_name(pmcstat_pmcinfilter); + if (s == NULL) + return; + /* Format PMC name. */ if (pmcstat_mergepmc) - snprintf(pmcname, sizeof(pmcname), "[%s]", - pmcstat_pmcindex_to_name(pmcstat_pmcinfilter)); + snprintf(pmcname, sizeof(pmcname), "[%s]", s); else snprintf(pmcname, sizeof(pmcname), "%s.%d", - pmcstat_pmcindex_to_name(pmcstat_pmcinfilter), - pmcstat_pmcinfilter); + s, pmcstat_pmcinfilter); PMCSTAT_PRINTBEGIN(); PMCSTAT_PRINTW("PMC: %s Samples: %u processed, %u invalid\n\n", From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 07:20:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88137106564A; Wed, 31 Mar 2010 07:20:10 +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 7749C8FC0A; Wed, 31 Mar 2010 07:20: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 o2V7KAUu032562; Wed, 31 Mar 2010 07:20:10 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2V7KAoj032560; Wed, 31 Mar 2010 07:20:10 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201003310720.o2V7KAoj032560@svn.freebsd.org> From: Alexander Motin Date: Wed, 31 Mar 2010 07:20: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: r205967 - head/sys/dev/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 07:20:10 -0000 Author: mav Date: Wed Mar 31 07:20:10 2010 New Revision: 205967 URL: http://svn.freebsd.org/changeset/base/205967 Log: Include opt_ata.h, as some structures here depending on ATA_CAM option. This fixes ATA_CAM with atamvsata and probably some other drivers. Modified: head/sys/dev/ata/ata-all.h Modified: head/sys/dev/ata/ata-all.h ============================================================================== --- head/sys/dev/ata/ata-all.h Wed Mar 31 07:12:12 2010 (r205966) +++ head/sys/dev/ata/ata-all.h Wed Mar 31 07:20:10 2010 (r205967) @@ -26,6 +26,8 @@ * $FreeBSD$ */ +#include "opt_ata.h" + #if 0 #define ATA_LEGACY_SUPPORT /* Enable obsolete features that break * some modern devices */ From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 07:49:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EC470106564A; Wed, 31 Mar 2010 07:49:59 +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 BFF208FC14; Wed, 31 Mar 2010 07:49: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 o2V7nxgE039261; Wed, 31 Mar 2010 07:49:59 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2V7nxjW039259; Wed, 31 Mar 2010 07:49:59 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201003310749.o2V7nxjW039259@svn.freebsd.org> From: Alexander Motin Date: Wed, 31 Mar 2010 07:49: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: r205968 - 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: Wed, 31 Mar 2010 07:50:00 -0000 Author: mav Date: Wed Mar 31 07:49:59 2010 New Revision: 205968 URL: http://svn.freebsd.org/changeset/base/205968 Log: MFC r205074: Mask disk_idx to avoid panic because of extra bits set. PR: kern/102211 Submitted by: yoichi Modified: stable/8/sys/dev/ata/ata-raid.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-raid.c ============================================================================== --- stable/8/sys/dev/ata/ata-raid.c Wed Mar 31 07:20:10 2010 (r205967) +++ stable/8/sys/dev/ata/ata-raid.c Wed Mar 31 07:49:59 2010 (r205968) @@ -2544,22 +2544,24 @@ ata_raid_intel_read_meta(device_t dev, s /* clear out any old info */ for (disk = 0; disk < raid->total_disks; disk++) { + u_int disk_idx = map->disk_idx[disk] & 0xffff; + raid->disks[disk].dev = NULL; - bcopy(meta->disk[map->disk_idx[disk]].serial, + bcopy(meta->disk[disk_idx].serial, raid->disks[disk].serial, sizeof(raid->disks[disk].serial)); raid->disks[disk].sectors = - meta->disk[map->disk_idx[disk]].sectors; + meta->disk[disk_idx].sectors; raid->disks[disk].flags = 0; - if (meta->disk[map->disk_idx[disk]].flags & INTEL_F_ONLINE) + if (meta->disk[disk_idx].flags & INTEL_F_ONLINE) raid->disks[disk].flags |= AR_DF_ONLINE; - if (meta->disk[map->disk_idx[disk]].flags & INTEL_F_ASSIGNED) + if (meta->disk[disk_idx].flags & INTEL_F_ASSIGNED) raid->disks[disk].flags |= AR_DF_ASSIGNED; - if (meta->disk[map->disk_idx[disk]].flags & INTEL_F_SPARE) { + if (meta->disk[disk_idx].flags & INTEL_F_SPARE) { raid->disks[disk].flags &= ~(AR_DF_ONLINE | AR_DF_ASSIGNED); raid->disks[disk].flags |= AR_DF_SPARE; } - if (meta->disk[map->disk_idx[disk]].flags & INTEL_F_DOWN) + if (meta->disk[disk_idx].flags & INTEL_F_DOWN) raid->disks[disk].flags &= ~AR_DF_ONLINE; } } From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 07:52:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 07E35106564A; Wed, 31 Mar 2010 07:52:49 +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 D02448FC0A; Wed, 31 Mar 2010 07:52: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 o2V7qmAb039943; Wed, 31 Mar 2010 07:52:48 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2V7qmWi039941; Wed, 31 Mar 2010 07:52:48 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201003310752.o2V7qmWi039941@svn.freebsd.org> From: Alexander Motin Date: Wed, 31 Mar 2010 07:52:48 +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: r205969 - stable/7/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: Wed, 31 Mar 2010 07:52:49 -0000 Author: mav Date: Wed Mar 31 07:52:48 2010 New Revision: 205969 URL: http://svn.freebsd.org/changeset/base/205969 Log: MFC r205074: Mask disk_idx to avoid panic because of extra bits set. PR: kern/102211 Submitted by: yoichi Modified: stable/7/sys/dev/ata/ata-raid.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/ata/ata-raid.c ============================================================================== --- stable/7/sys/dev/ata/ata-raid.c Wed Mar 31 07:49:59 2010 (r205968) +++ stable/7/sys/dev/ata/ata-raid.c Wed Mar 31 07:52:48 2010 (r205969) @@ -2535,22 +2535,24 @@ ata_raid_intel_read_meta(device_t dev, s /* clear out any old info */ for (disk = 0; disk < raid->total_disks; disk++) { + u_int disk_idx = map->disk_idx[disk] & 0xffff; + raid->disks[disk].dev = NULL; - bcopy(meta->disk[map->disk_idx[disk]].serial, + bcopy(meta->disk[disk_idx].serial, raid->disks[disk].serial, sizeof(raid->disks[disk].serial)); raid->disks[disk].sectors = - meta->disk[map->disk_idx[disk]].sectors; + meta->disk[disk_idx].sectors; raid->disks[disk].flags = 0; - if (meta->disk[map->disk_idx[disk]].flags & INTEL_F_ONLINE) + if (meta->disk[disk_idx].flags & INTEL_F_ONLINE) raid->disks[disk].flags |= AR_DF_ONLINE; - if (meta->disk[map->disk_idx[disk]].flags & INTEL_F_ASSIGNED) + if (meta->disk[disk_idx].flags & INTEL_F_ASSIGNED) raid->disks[disk].flags |= AR_DF_ASSIGNED; - if (meta->disk[map->disk_idx[disk]].flags & INTEL_F_SPARE) { + if (meta->disk[disk_idx].flags & INTEL_F_SPARE) { raid->disks[disk].flags &= ~(AR_DF_ONLINE | AR_DF_ASSIGNED); raid->disks[disk].flags |= AR_DF_SPARE; } - if (meta->disk[map->disk_idx[disk]].flags & INTEL_F_DOWN) + if (meta->disk[disk_idx].flags & INTEL_F_DOWN) raid->disks[disk].flags &= ~AR_DF_ONLINE; } } From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 07:56:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A3BD11065670; Wed, 31 Mar 2010 07:56: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 77C2F8FC12; Wed, 31 Mar 2010 07:56: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 o2V7uW3Z040841; Wed, 31 Mar 2010 07:56:32 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2V7uWb9040839; Wed, 31 Mar 2010 07:56:32 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201003310756.o2V7uWb9040839@svn.freebsd.org> From: Alexander Motin Date: Wed, 31 Mar 2010 07:56: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: r205970 - stable/8/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: Wed, 31 Mar 2010 07:56:32 -0000 Author: mav Date: Wed Mar 31 07:56:32 2010 New Revision: 205970 URL: http://svn.freebsd.org/changeset/base/205970 Log: MFC r205422: - Spec tells that CCC interrupt is edge triggered. Acknowledge it as such. - Do not try to enable CCC if it is not supported. Modified: stable/8/sys/dev/ahci/ahci.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/ahci/ahci.c ============================================================================== --- stable/8/sys/dev/ahci/ahci.c Wed Mar 31 07:52:48 2010 (r205969) +++ stable/8/sys/dev/ahci/ahci.c Wed Mar 31 07:56:32 2010 (r205970) @@ -66,6 +66,7 @@ static void ahci_ch_pm(void *arg); static void ahci_ch_intr_locked(void *data); static void ahci_ch_intr(void *data); static int ahci_ctlr_reset(device_t dev); +static int ahci_ctlr_setup(device_t dev); static void ahci_begin_transaction(device_t dev, union ccb *ccb); static void ahci_dmasetprd(void *arg, bus_dma_segment_t *segs, int nsegs, int error); static void ahci_execute_transaction(struct ahci_slot *slot); @@ -372,6 +373,9 @@ ahci_attach(device_t dev) ctlr->caps &= ~AHCI_CAP_SPM; if (ctlr->quirks & AHCI_Q_NONCQ) ctlr->caps &= ~AHCI_CAP_SNCQ; + if ((ctlr->caps & AHCI_CAP_CCCS) == 0) + ctlr->ccc = 0; + ahci_ctlr_setup(dev); /* Setup interrupts. */ if (ahci_setup_interrupt(dev)) { bus_release_resource(dev, SYS_RES_MEMORY, ctlr->r_rid, ctlr->r_mem); @@ -501,6 +505,13 @@ ahci_ctlr_reset(device_t dev) } /* Reenable AHCI mode */ ATA_OUTL(ctlr->r_mem, AHCI_GHC, AHCI_GHC_AE); + return (0); +} + +static int +ahci_ctlr_setup(device_t dev) +{ + struct ahci_controller *ctlr = device_get_softc(dev); /* Clear interrupts */ ATA_OUTL(ctlr->r_mem, AHCI_IS, ATA_INL(ctlr->r_mem, AHCI_IS)); /* Configure CCC */ @@ -543,6 +554,7 @@ ahci_resume(device_t dev) if ((res = ahci_ctlr_reset(dev)) != 0) return (res); + ahci_ctlr_setup(dev); return (bus_generic_resume(dev)); } @@ -609,7 +621,7 @@ ahci_intr(void *data) { struct ahci_controller_irq *irq = data; struct ahci_controller *ctlr = irq->ctlr; - u_int32_t is; + u_int32_t is, ise = 0; void *arg; int unit; @@ -623,9 +635,14 @@ ahci_intr(void *data) unit = irq->r_irq_rid - 1; is = ATA_INL(ctlr->r_mem, AHCI_IS); } + /* CCC interrupt is edge triggered. */ + if (ctlr->ccc) + ise = 1 << ctlr->cccv; /* Some controllers have edge triggered IS. */ if (ctlr->quirks & AHCI_Q_EDGEIS) - ATA_OUTL(ctlr->r_mem, AHCI_IS, is); + ise |= is; + if (ise != 0) + ATA_OUTL(ctlr->r_mem, AHCI_IS, ise); for (; unit < ctlr->channels; unit++) { if ((is & (1 << unit)) != 0 && (arg = ctlr->interrupt[unit].argument)) { From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 08:02:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EFF93106568A; Wed, 31 Mar 2010 08:02:16 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DD7168FC24; Wed, 31 Mar 2010 08: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 o2V82GeV042242; Wed, 31 Mar 2010 08:02:16 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2V82GTq042240; Wed, 31 Mar 2010 08:02:16 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201003310802.o2V82GTq042240@svn.freebsd.org> From: Alexander Motin Date: Wed, 31 Mar 2010 08: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: r205971 - stable/8/sys/dev/sound/pci/hda X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Mar 2010 08:02:17 -0000 Author: mav Date: Wed Mar 31 08:02:16 2010 New Revision: 205971 URL: http://svn.freebsd.org/changeset/base/205971 Log: MFC r205413: Add some more codec IDs. Modified: stable/8/sys/dev/sound/pci/hda/hdac.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/sound/pci/hda/hdac.c ============================================================================== --- stable/8/sys/dev/sound/pci/hda/hdac.c Wed Mar 31 07:56:32 2010 (r205970) +++ stable/8/sys/dev/sound/pci/hda/hdac.c Wed Mar 31 08:02:16 2010 (r205971) @@ -619,10 +619,14 @@ static const struct { #define HDA_CODEC_ALC267 HDA_CODEC_CONSTRUCT(REALTEK, 0x0267) #define HDA_CODEC_ALC268 HDA_CODEC_CONSTRUCT(REALTEK, 0x0268) #define HDA_CODEC_ALC269 HDA_CODEC_CONSTRUCT(REALTEK, 0x0269) +#define HDA_CODEC_ALC270 HDA_CODEC_CONSTRUCT(REALTEK, 0x0270) #define HDA_CODEC_ALC272 HDA_CODEC_CONSTRUCT(REALTEK, 0x0272) +#define HDA_CODEC_ALC273 HDA_CODEC_CONSTRUCT(REALTEK, 0x0273) +#define HDA_CODEC_ALC275 HDA_CODEC_CONSTRUCT(REALTEK, 0x0275) #define HDA_CODEC_ALC660 HDA_CODEC_CONSTRUCT(REALTEK, 0x0660) #define HDA_CODEC_ALC662 HDA_CODEC_CONSTRUCT(REALTEK, 0x0662) #define HDA_CODEC_ALC663 HDA_CODEC_CONSTRUCT(REALTEK, 0x0663) +#define HDA_CODEC_ALC665 HDA_CODEC_CONSTRUCT(REALTEK, 0x0665) #define HDA_CODEC_ALC861 HDA_CODEC_CONSTRUCT(REALTEK, 0x0861) #define HDA_CODEC_ALC861VD HDA_CODEC_CONSTRUCT(REALTEK, 0x0862) #define HDA_CODEC_ALC880 HDA_CODEC_CONSTRUCT(REALTEK, 0x0880) @@ -632,6 +636,7 @@ static const struct { #define HDA_CODEC_ALC887 HDA_CODEC_CONSTRUCT(REALTEK, 0x0887) #define HDA_CODEC_ALC888 HDA_CODEC_CONSTRUCT(REALTEK, 0x0888) #define HDA_CODEC_ALC889 HDA_CODEC_CONSTRUCT(REALTEK, 0x0889) +#define HDA_CODEC_ALC892 HDA_CODEC_CONSTRUCT(REALTEK, 0x0892) #define HDA_CODEC_ALCXXXX HDA_CODEC_CONSTRUCT(REALTEK, 0xffff) /* Analog Devices */ @@ -735,6 +740,7 @@ static const struct { #define HDA_CODEC_CX20551 HDA_CODEC_CONSTRUCT(CONEXANT, 0x5047) #define HDA_CODEC_CX20561 HDA_CODEC_CONSTRUCT(CONEXANT, 0x5051) #define HDA_CODEC_CX20582 HDA_CODEC_CONSTRUCT(CONEXANT, 0x5066) +#define HDA_CODEC_CX20583 HDA_CODEC_CONSTRUCT(CONEXANT, 0x5067) #define HDA_CODEC_CXXXXX HDA_CODEC_CONSTRUCT(CONEXANT, 0xffff) /* VIA */ @@ -805,7 +811,8 @@ static const struct { #define HDA_CODEC_INTELG45_1 HDA_CODEC_CONSTRUCT(INTEL, 0x2801) #define HDA_CODEC_INTELG45_2 HDA_CODEC_CONSTRUCT(INTEL, 0x2802) #define HDA_CODEC_INTELG45_3 HDA_CODEC_CONSTRUCT(INTEL, 0x2803) -#define HDA_CODEC_INTELG45_4 HDA_CODEC_CONSTRUCT(INTEL, 0x29fb) +#define HDA_CODEC_INTELG45_4 HDA_CODEC_CONSTRUCT(INTEL, 0x2804) +#define HDA_CODEC_INTELG45_5 HDA_CODEC_CONSTRUCT(INTEL, 0x29fb) #define HDA_CODEC_INTELQ57 HDA_CODEC_CONSTRUCT(INTEL, 0x0054) #define HDA_CODEC_INTELXXXX HDA_CODEC_CONSTRUCT(INTEL, 0xffff) @@ -821,10 +828,14 @@ static const struct { { HDA_CODEC_ALC267, "Realtek ALC267" }, { HDA_CODEC_ALC268, "Realtek ALC268" }, { HDA_CODEC_ALC269, "Realtek ALC269" }, + { HDA_CODEC_ALC270, "Realtek ALC270" }, { HDA_CODEC_ALC272, "Realtek ALC272" }, + { HDA_CODEC_ALC273, "Realtek ALC273" }, + { HDA_CODEC_ALC275, "Realtek ALC275" }, { HDA_CODEC_ALC660, "Realtek ALC660" }, { HDA_CODEC_ALC662, "Realtek ALC662" }, { HDA_CODEC_ALC663, "Realtek ALC663" }, + { HDA_CODEC_ALC665, "Realtek ALC665" }, { HDA_CODEC_ALC861, "Realtek ALC861" }, { HDA_CODEC_ALC861VD, "Realtek ALC861-VD" }, { HDA_CODEC_ALC880, "Realtek ALC880" }, @@ -834,6 +845,7 @@ static const struct { { HDA_CODEC_ALC887, "Realtek ALC887" }, { HDA_CODEC_ALC888, "Realtek ALC888" }, { HDA_CODEC_ALC889, "Realtek ALC889" }, + { HDA_CODEC_ALC892, "Realtek ALC892" }, { HDA_CODEC_AD1882, "Analog Devices AD1882" }, { HDA_CODEC_AD1882A, "Analog Devices AD1882A" }, { HDA_CODEC_AD1883, "Analog Devices AD1883" }, @@ -907,6 +919,7 @@ static const struct { { HDA_CODEC_CX20551, "Conexant CX20551 (Waikiki)" }, { HDA_CODEC_CX20561, "Conexant CX20561 (Hermosa)" }, { HDA_CODEC_CX20582, "Conexant CX20582 (Pebble)" }, + { HDA_CODEC_CX20583, "Conexant CX20583 (Pebble HSF)" }, { HDA_CODEC_VT1708_8, "VIA VT1708_8" }, { HDA_CODEC_VT1708_9, "VIA VT1708_9" }, { HDA_CODEC_VT1708_A, "VIA VT1708_A" }, @@ -966,6 +979,7 @@ static const struct { { HDA_CODEC_INTELG45_2, "Intel G45 HDMI" }, { HDA_CODEC_INTELG45_3, "Intel G45 HDMI" }, { HDA_CODEC_INTELG45_4, "Intel G45 HDMI" }, + { HDA_CODEC_INTELG45_5, "Intel G45 HDMI" }, { HDA_CODEC_INTELQ57, "Intel Q57 HDMI" }, { HDA_CODEC_SII1390, "Silicon Image SiI1390 HDMI" }, { HDA_CODEC_SII1392, "Silicon Image SiI1392 HDMI" }, From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 08:03:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DFE72106564A; Wed, 31 Mar 2010 08:03:49 +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 CE3818FC0C; Wed, 31 Mar 2010 08:03: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 o2V83nR6042613; Wed, 31 Mar 2010 08:03:49 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2V83nrN042611; Wed, 31 Mar 2010 08:03:49 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201003310803.o2V83nrN042611@svn.freebsd.org> From: Alexander Motin Date: Wed, 31 Mar 2010 08:03:49 +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: r205972 - stable/8/sys/dev/sound/pcm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Mar 2010 08:03:50 -0000 Author: mav Date: Wed Mar 31 08:03:49 2010 New Revision: 205972 URL: http://svn.freebsd.org/changeset/base/205972 Log: MFC r205734: Fix lock leakage. PR: kern/145081 Modified: stable/8/sys/dev/sound/pcm/dsp.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/sound/pcm/dsp.c ============================================================================== --- stable/8/sys/dev/sound/pcm/dsp.c Wed Mar 31 08:02:16 2010 (r205971) +++ stable/8/sys/dev/sound/pcm/dsp.c Wed Mar 31 08:03:49 2010 (r205972) @@ -1071,6 +1071,7 @@ dsp_ioctl(struct cdev *i_dev, u_long cmd if (IOCGROUP(cmd) == 'M') { if (cmd == OSS_GETVERSION) { *arg_i = SOUND_VERSION; + PCM_GIANT_EXIT(d); return (0); } ret = dsp_ioctl_channel(i_dev, PCM_VOLCH(i_dev), cmd, arg); From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 08:12:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0312106566B; Wed, 31 Mar 2010 08:12:22 +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 BE03D8FC20; Wed, 31 Mar 2010 08:12:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2V8CMPP044641; Wed, 31 Mar 2010 08:12:22 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2V8CMQP044639; Wed, 31 Mar 2010 08:12:22 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201003310812.o2V8CMQP044639@svn.freebsd.org> From: Alexander Motin Date: Wed, 31 Mar 2010 08:12:22 +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: r205973 - 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: Wed, 31 Mar 2010 08:12:22 -0000 Author: mav Date: Wed Mar 31 08:12:22 2010 New Revision: 205973 URL: http://svn.freebsd.org/changeset/base/205973 Log: MFC r204655: Add some more supported controllers. Crosslink with CAM ATA man pages. Modified: stable/8/share/man/man4/ata.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/ata.4 ============================================================================== --- stable/8/share/man/man4/ata.4 Wed Mar 31 08:03:49 2010 (r205972) +++ stable/8/share/man/man4/ata.4 Wed Mar 31 08:12:22 2010 (r205973) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 23, 2009 +.Dd March 3, 2010 .Dt ATA 4 .Os .Sh NAME @@ -81,6 +81,13 @@ To support ATAPI floppy drives: To support ATAPI tape drives: .Cd device atapist .Pp +To turn +.Xr ata 4 +subsystem controller drivers into cam(4) interface modules (disables all native +.Xr ata 4 +APIs and periperal drivers): +.Cd options ATA_CAM +.Pp The following tunables are settable from the loader: .Bl -ohang .It Va hw.ata.ata_dma @@ -125,7 +132,7 @@ The currently supported ATA/SATA control .It Acard: ATP850P, ATP860A, ATP860R, ATP865A, ATP865R. .It ALI: -M5229, M5281, M5287, M5288, M5289. +M5228, M5229, M5281, M5283, M5287, M5288, M5289. .It AMD: AMD756, AMD766, AMD768, AMD8111, CS5536. .It ATI: @@ -139,7 +146,8 @@ Cyrix 5530. .It HighPoint: HPT302, HPT366, HPT368, HPT370, HPT371, HPT372, HPT372N, HPT374. .It Intel: -6300ESB, 31244, PIIX, PIIX3, PIIX4, ESB2, ICH, ICH0, ICH2, ICH3, ICH4, ICH5, ICH6, ICH7, ICH8, ICH9, ICH10. +6300ESB, 31244, PIIX, PIIX3, PIIX4, ESB2, ICH, ICH0, ICH2, ICH3, ICH4, ICH5, +ICH6, ICH7, ICH8, ICH9, ICH10, SCH, PCH. .It ITE: IT8211F, IT8212F, IT8213F. .It JMicron: @@ -163,7 +171,9 @@ SiI0680, SiI3112, SiI3114, SiI3124, SiI3 .It SiS: SIS180, SIS181, SIS182, SIS5513, SIS530, SIS540, SIS550, SIS620, SIS630, SIS630S, SIS633, SIS635, SIS730, SIS733, SIS735, SIS745, SIS961, SIS962, SIS963, SIS964, SIS965. .It VIA: -VT6410, VT6420, VT6421, VT82C586, VT82C586B, VT82C596, VT82C596B, VT82C686, VT82C686A, VT82C686B, VT8231, VT8233, VT8233A, VT8233C, VT8235, VT8237, VT8237A, VT8237S, VT8251. +VT6410, VT6420, VT6421, VT82C586, VT82C586B, VT82C596, VT82C596B, VT82C686, +VT82C686A, VT82C686B, VT8231, VT8233, VT8233A, VT8233C, VT8235, VT8237, +VT8237A, VT8237S, VT8251, CX700, VX800, VX855. .El .Pp Unknown ATA chipsets are supported in PIO modes, and if the standard @@ -246,9 +256,12 @@ and not depend on attach order. .Pp Native Command Queuing (NCQ) on SATA drives is not yet supported. .Sh SEE ALSO +.Xr ahci 4 , +.Xr cam 4 , .Xr ataraid 4 , .Xr atacontrol 8 , -.Xr burncd 8 +.Xr burncd 8 , +.Xr siis 4 .Sh HISTORY The .Nm From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 08:14:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E0F81065672; Wed, 31 Mar 2010 08:14: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 5C2768FC1B; Wed, 31 Mar 2010 08:14: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 o2V8E7lp045076; Wed, 31 Mar 2010 08:14:07 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2V8E7SO045074; Wed, 31 Mar 2010 08:14:07 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201003310814.o2V8E7SO045074@svn.freebsd.org> From: Alexander Motin Date: Wed, 31 Mar 2010 08:14: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: r205974 - 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: Wed, 31 Mar 2010 08:14:07 -0000 Author: mav Date: Wed Mar 31 08:14:07 2010 New Revision: 205974 URL: http://svn.freebsd.org/changeset/base/205974 Log: MFC r204704: Reflect added CAM ATA support. Modified: stable/8/share/man/man4/scsi.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/scsi.4 ============================================================================== --- stable/8/share/man/man4/scsi.4 Wed Mar 31 08:12:22 2010 (r205973) +++ stable/8/share/man/man4/scsi.4 Wed Mar 31 08:14:07 2010 (r205974) @@ -24,15 +24,15 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd October 15, 1998 -.Dt SCSI 4 +.Dd March 4, 2010 +.Dt CAM 4 .Os .Sh NAME -.Nm SCSI , .Nm CAM -.Nd CAM SCSI subsystem +.Nd Common Access Method SCSI/ATA subsystem .Sh SYNOPSIS .Cd "device scbus" +.Cd "device ada" .Cd "device cd" .Cd "device ch" .Cd "device da" @@ -49,31 +49,32 @@ .Cd "options SCSI_NO_OP_STRINGS" .Cd "options SCSI_DELAY=8000" .Sh DESCRIPTION -The CAM -.Tn SCSI +The +.Nm subsystem provides a uniform and modular system for the implementation of drivers to control various .Tn SCSI +and +.Tn ATA devices, and to utilize different .Tn SCSI +and +.Tn ATA host adapters through host adapter drivers. -When the system probes the -.Tn SCSI -busses, it attaches any devices it finds to the appropriate -drivers. +When the system probes busses, it attaches any devices it finds to the +appropriate drivers. The .Xr pass 4 -driver, if it is configured in the kernel, will attach to all -.Tn SCSI -devices. +driver, if it is configured in the kernel, will attach to all devices. .Sh KERNEL CONFIGURATION There are a number of generic kernel configuration options for the -CAM -.Tn SCSI +.Nm subsystem: .Bl -tag -width SCSI_NO_SENSE_STRINGS .It Dv CAMDEBUG -This option enables the CAM debugging printf code. +This option enables the +.Nm +debugging printf code. This will not actually cause any debugging information to be printed out when included by itself. Enabling printouts requires additional configuration. @@ -82,12 +83,11 @@ See below for details. This sets the maximum allowable number of concurrent "high power" commands. A "high power" command is a command that takes more electrical power than most to complete. -An example of this (and the only command currently -tagged as "high power") is the +An example of this is the .Tn SCSI START UNIT command. -Starting a SCSI disk often takes significantly more -electrical power than normal operation of the disk. +Starting a disk often takes significantly more electrical power than normal +operation. This option allows the user to specify how many concurrent high power commands may be outstanding without overloading the power supply on his computer. @@ -120,7 +120,9 @@ problems. This is the .Tn SCSI "bus settle delay." -In CAM, it is specified in +In +.Nm , +it is specified in .Em milliseconds , not seconds like the old .Tn SCSI @@ -148,7 +150,7 @@ In that case, the will be reset to 100ms. .El .Pp -All devices and the SCSI busses support boot time allocation so that +All devices and busses support dynamic allocation so that an upper number of devices and controllers does not need to be configured; .Cd "device da" will suffice for any number of disk drivers. @@ -204,7 +206,9 @@ hint.da.0.unit="0" This assigns .Em da0 to target 0, unit (lun) 0 of scbus 0. -Omitting the target or unit hints will instruct CAM to treat them as wildcards +Omitting the target or unit hints will instruct +.Nm +to treat them as wildcards and use the first respective counted instances. These examples can be combined together to allow a peripheral device to be wired to any particular controller, bus, target, and/or unit instance. @@ -221,7 +225,9 @@ The system allows common device drivers types of adapters. The adapters take requests from the upper layers and do all IO between the -.Em SCSI +.Tn SCSI +or +.Tn ATA bus and the system. The maximum size of a transfer is governed by the adapter. @@ -233,7 +239,8 @@ Some adapters support in which the system is capable of operating as a device, responding to operations initiated by another system. Target mode is supported for -some adapters, but is not yet complete for this version of the CAM +some adapters, but is not yet complete for this version of the +.Nm .Tn SCSI subsystem. .Sh FILES @@ -278,7 +285,9 @@ Users can enable debugging from their ke the following kernel config options: .Bl -tag -width CAM_DEBUG_TARGET .It Dv CAMDEBUG -This enables CAM debugging. +This enables +.Nm +debugging. Without this option, users will not even be able to turn on debugging from userland via .Xr camcontrol 8 . @@ -313,9 +322,12 @@ See .Xr camcontrol 8 for details. .Sh SEE ALSO +.Xr ada 4 , .Xr aha 4 , .Xr ahb 4 , .Xr ahc 4 , +.Xr ahci 4 , +.Xr ata 4 , .Xr bt 4 , .Xr cd 4 , .Xr ch 4 , @@ -326,15 +338,26 @@ for details. .Xr xpt 4 , .Xr camcontrol 8 .Sh HISTORY -The CAM +The +.Nm .Tn SCSI subsystem first appeared in .Fx 3.0 . +The +.Nm +ATA support was added in +.Fx 8.0 . .Sh AUTHORS .An -nosplit -The CAM +The +.Nm .Tn SCSI subsystem was written by .An Justin Gibbs and .An Kenneth Merry . +The +.Nm +.Tn ATA +support was added by +.An Alexander Motin Aq mav@FreeBSD.org . From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 08:15:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 399EA106564A; Wed, 31 Mar 2010 08:15: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 278458FC12; Wed, 31 Mar 2010 08:15: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 o2V8FX60045427; Wed, 31 Mar 2010 08:15:33 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2V8FXXj045424; Wed, 31 Mar 2010 08:15:33 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201003310815.o2V8FXXj045424@svn.freebsd.org> From: Alexander Motin Date: Wed, 31 Mar 2010 08:15: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: r205975 - 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: Wed, 31 Mar 2010 08:15:33 -0000 Author: mav Date: Wed Mar 31 08:15:32 2010 New Revision: 205975 URL: http://svn.freebsd.org/changeset/base/205975 Log: MFC r204565: Some style and language improvements. Submitted by: ru Modified: stable/8/share/man/man4/ahci.4 stable/8/share/man/man4/siis.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/ahci.4 ============================================================================== --- stable/8/share/man/man4/ahci.4 Wed Mar 31 08:14:07 2010 (r205974) +++ stable/8/share/man/man4/ahci.4 Wed Mar 31 08:15:32 2010 (r205975) @@ -48,9 +48,10 @@ module at boot time, place the following ahci_load="YES" .Ed .Pp -The following tunables are settable from the loader: +The following tunables are settable from the +.Xr loader 8 : .Bl -ohang -.It Va hint.ahci.X.msi +.It Va hint.ahci. Ns Ar X Ns Va .msi controls Message Signaled Interrupts (MSI) usage by the specified controller .Bl -tag -compact .It 0 @@ -60,15 +61,15 @@ single MSI vector used, if supported (de .It 2 multiple MSI vectors used, if supported; .El -.It Va hint.ahci.X.ccc +.It Va hint.ahci. Ns Ar X Ns Va .ccc controls Command Completion Coalescing (CCC) usage by the specified controller. Non-zero value enables CCC and defines maximum time (in ms), request can wait for interrupt, if there are some more requests present on controller queue. CCC reduces number of context switches on systems with many parallel requests, but it can decrease disk performance on some workloads due to additional command latency. -.It Va hint.ahcich.X.pm_level -controls SATA interface Power Management for specified channel, +.It Va hint.ahcich. Ns Ar X Ns Va .pm_level +controls SATA interface Power Management for the specified channel, allowing some power to be saved at the cost of additional command latency. Possible values: @@ -92,18 +93,20 @@ Because of artificial entering latency, .Pp Note that interface Power Management is not compatible with device presence detection. -You will have to reset bus manually on device hot-plug. -.It Va hint.ahcich.X.sata_rev +A manual bus reset is needed on device hot-plug. +.It Va hint.ahcich. Ns Ar X Ns Va .sata_rev setting to nonzero value limits maximum SATA revision (speed). Values 1, 2 and 3 are respectively 1.5, 3 and 6Gbps. .El .Sh DESCRIPTION -This driver provides the CAM subsystem with native access to the +This driver provides the +.Xr CAM 4 +subsystem with native access to the .Tn SATA ports of AHCI-compatible controllers. Each SATA port found is represented to CAM as a separate bus with one target, or, if HBA supports Port Multipliers, 16 targets. -Most of the bus-management details are handled by the SATA-specific +Most of the bus-management details are handled by the SATA-specific transport of CAM. Connected ATA disks are handled by the ATA protocol disk peripheral driver .Xr ada 4 . @@ -121,7 +124,8 @@ and Message Signaled Interrupts. .Pp AHCI hardware is also supported by ataahci driver from .Xr ata 4 -subsystem. If both drivers are loaded at the same time, this one will be +subsystem. +If both drivers are loaded at the same time, this one will be given precedence as the more functional of the two. .Sh HARDWARE The @@ -134,11 +138,11 @@ it supports AHCI part of legacy-PATA + A such as JMicron JMB36x and Marvell 88SX61xx. .Sh SEE ALSO .Xr ada 4 , +.Xr ata 4 , .Xr cd 4 , .Xr da 4 , .Xr sa 4 , -.Xr scsi 4 , -.Xr ata 4 +.Xr scsi 4 .Sh HISTORY The .Nm Modified: stable/8/share/man/man4/siis.4 ============================================================================== --- stable/8/share/man/man4/siis.4 Wed Mar 31 08:14:07 2010 (r205974) +++ stable/8/share/man/man4/siis.4 Wed Mar 31 08:15:32 2010 (r205975) @@ -48,12 +48,13 @@ module at boot time, place the following siis_load="YES" .Ed .Pp -The following tunables are settable from the loader: +The following tunables are settable from the +.Xr loader 8 : .Bl -ohang -.It Va hint.siis.X.msi +.It Va hint.siis. Ns Ar X Ns Va .msi controls Message Signaled Interrupts (MSI) usage by the specified controller. -.It Va hint.siisch.X.pm_level -controls SATA interface Power Management for specified channel, +.It Va hint.siisch. Ns Ar X Ns Va .pm_level +controls SATA interface Power Management for the specified channel, allowing some power to be saved at the cost of additional command latency. Possible values: @@ -65,13 +66,15 @@ device is allowed to initiate PM state c .El Note that interface Power Management is not compatible with device presence detection. -You will have to reset bus manually on device hot-plug. -.It Va hint.siisch.X.sata_rev +A manual bus reset is needed on device hot-plug. +.It Va hint.siisch. Ns Ar X Ns Va .sata_rev setting to nonzero value limits maximum SATA revision (speed). Values 1, 2 and 3 are respectively 1.5, 3 and 6Gbps. .El .Sh DESCRIPTION -This driver provides the CAM subsystem native access to the +This driver provides the +.Xr CAM 4 +subsystem with native access to the .Tn SATA ports of controller. Each SATA port is represented to CAM as a separate bus with 16 targets. @@ -90,14 +93,15 @@ Port Multipliers (including FIS-based sw (31 command per port), Native Command Queuing, SATA interface Power Management, device hot-plug and Message Signaled Interrupts. .Pp -Same hardware is also supported by atasiliconimage driver from +Same hardware is also supported by the atasiliconimage driver from .Xr ata 4 -subsystem. If both drivers are loaded at the same time, this one will be +subsystem. +If both drivers are loaded at the same time, this one will be given precedence as the more functional of the two. .Sh HARDWARE The .Nm -driver supports following controllers: +driver supports the following controllers: .Bl -bullet -compact .It SiI3124 @@ -108,11 +112,11 @@ SiI3531 .El .Sh SEE ALSO .Xr ada 4 , +.Xr ata 4 , .Xr cd 4 , .Xr da 4 , .Xr sa 4 , -.Xr scsi 4 , -.Xr ata 4 +.Xr scsi 4 .Sh HISTORY The .Nm From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 08:17:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C3CF1065674; Wed, 31 Mar 2010 08:17: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 4A6FA8FC0A; Wed, 31 Mar 2010 08:17: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 o2V8HXIE045938; Wed, 31 Mar 2010 08:17:33 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2V8HXXS045928; Wed, 31 Mar 2010 08:17:33 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201003310817.o2V8HXXS045928@svn.freebsd.org> From: Alexander Motin Date: Wed, 31 Mar 2010 08:17: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: r205976 - 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: Wed, 31 Mar 2010 08:17:33 -0000 Author: mav Date: Wed Mar 31 08:17:32 2010 New Revision: 205976 URL: http://svn.freebsd.org/changeset/base/205976 Log: MFC r204705: Add links to cam(4). Modified: stable/8/share/man/man4/ada.4 stable/8/share/man/man4/ahci.4 stable/8/share/man/man4/cd.4 stable/8/share/man/man4/ch.4 stable/8/share/man/man4/da.4 stable/8/share/man/man4/pass.4 stable/8/share/man/man4/pt.4 stable/8/share/man/man4/sa.4 stable/8/share/man/man4/siis.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/ada.4 ============================================================================== --- stable/8/share/man/man4/ada.4 Wed Mar 31 08:15:32 2010 (r205975) +++ stable/8/share/man/man4/ada.4 Wed Mar 31 08:17:32 2010 (r205976) @@ -127,6 +127,7 @@ ATA device nodes .Sh SEE ALSO .Xr ad 4 , .Xr ahci 4 , +.Xr cam 4 , .Xr da 4 , .Xr siis 4 .Sh HISTORY Modified: stable/8/share/man/man4/ahci.4 ============================================================================== --- stable/8/share/man/man4/ahci.4 Wed Mar 31 08:15:32 2010 (r205975) +++ stable/8/share/man/man4/ahci.4 Wed Mar 31 08:17:32 2010 (r205976) @@ -139,10 +139,10 @@ such as JMicron JMB36x and Marvell 88SX6 .Sh SEE ALSO .Xr ada 4 , .Xr ata 4 , +.Xr cam 4 , .Xr cd 4 , .Xr da 4 , -.Xr sa 4 , -.Xr scsi 4 +.Xr sa 4 .Sh HISTORY The .Nm Modified: stable/8/share/man/man4/cd.4 ============================================================================== --- stable/8/share/man/man4/cd.4 Wed Mar 31 08:15:32 2010 (r205975) +++ stable/8/share/man/man4/cd.4 Wed Mar 31 08:17:32 2010 (r205976) @@ -496,8 +496,8 @@ devices .Sh DIAGNOSTICS None. .Sh SEE ALSO +.Xr cam 4 , .Xr da 4 , -.Xr scsi 4 , .Xr disklabel 5 , .Xr disklabel 8 , .Xr cd 9 Modified: stable/8/share/man/man4/ch.4 ============================================================================== --- stable/8/share/man/man4/ch.4 Wed Mar 31 08:15:32 2010 (r205975) +++ stable/8/share/man/man4/ch.4 Wed Mar 31 08:17:32 2010 (r205976) @@ -325,6 +325,7 @@ If the media changer does not support fe driver, it will produce both console error messages and failure return codes to the ioctls described here. .Sh SEE ALSO +.Xr cam 4 , .Xr chio 1 , .Xr cd 4 , .Xr da 4 , Modified: stable/8/share/man/man4/da.4 ============================================================================== --- stable/8/share/man/man4/da.4 Wed Mar 31 08:15:32 2010 (r205975) +++ stable/8/share/man/man4/da.4 Wed Mar 31 08:17:32 2010 (r205976) @@ -196,6 +196,7 @@ SCSI disk device nodes None. .Sh SEE ALSO .Xr ad 4 , +.Xr cam 4 , .Xr geom 4 , .Xr bsdlabel 8 , .Xr fdisk 8 Modified: stable/8/share/man/man4/pass.4 ============================================================================== --- stable/8/share/man/man4/pass.4 Wed Mar 31 08:15:32 2010 (r205975) +++ stable/8/share/man/man4/pass.4 Wed Mar 31 08:17:32 2010 (r205976) @@ -104,6 +104,7 @@ CAM subsystem. None. .Sh SEE ALSO .Xr cam 3 , +.Xr cam 4 , .Xr cam_cdbparse 3 , .Xr xpt 4 , .Xr camcontrol 8 Modified: stable/8/share/man/man4/pt.4 ============================================================================== --- stable/8/share/man/man4/pt.4 Wed Mar 31 08:15:32 2010 (r205975) +++ stable/8/share/man/man4/pt.4 Wed Mar 31 08:17:32 2010 (r205976) @@ -84,7 +84,7 @@ the .Ar N Ns th processor device. .El .Sh SEE ALSO -.Xr scsi 4 +.Xr cam 4 .Sh HISTORY The .Nm Modified: stable/8/share/man/man4/sa.4 ============================================================================== --- stable/8/share/man/man4/sa.4 Wed Mar 31 08:15:32 2010 (r205975) +++ stable/8/share/man/man4/sa.4 Wed Mar 31 08:17:32 2010 (r205976) @@ -200,8 +200,8 @@ accessing the device, e.g.). .Sh DIAGNOSTICS None. .Sh SEE ALSO -.Xr mt 1 , -.Xr scsi 4 +.Xr cam 4 , +.Xr mt 1 .Sh AUTHORS .An -nosplit The Modified: stable/8/share/man/man4/siis.4 ============================================================================== --- stable/8/share/man/man4/siis.4 Wed Mar 31 08:15:32 2010 (r205975) +++ stable/8/share/man/man4/siis.4 Wed Mar 31 08:17:32 2010 (r205976) @@ -113,10 +113,10 @@ SiI3531 .Sh SEE ALSO .Xr ada 4 , .Xr ata 4 , +.Xr cam 4 , .Xr cd 4 , .Xr da 4 , -.Xr sa 4 , -.Xr scsi 4 +.Xr sa 4 .Sh HISTORY The .Nm From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 09:32:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5FEBC106566B; Wed, 31 Mar 2010 09:32:37 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id BC7098FC13; Wed, 31 Mar 2010 09:32:35 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id MAA15749; Wed, 31 Mar 2010 12:32:33 +0300 (EEST) (envelope-from avg@freebsd.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1NwuHo-000Mp4-VI; Wed, 31 Mar 2010 12:32:33 +0300 Message-ID: <4BB316AE.7000503@freebsd.org> Date: Wed, 31 Mar 2010 12:32:30 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.24 (X11/20100321) MIME-Version: 1.0 To: Luigi Rizzo References: <201003310151.o2V1p8QW058661@svn.freebsd.org> In-Reply-To: <201003310151.o2V1p8QW058661@svn.freebsd.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r205953 - stable/8/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: Wed, 31 Mar 2010 09:32:37 -0000 on 31/03/2010 04:51 Luigi Rizzo said the following: > Author: luigi > Date: Wed Mar 31 01:51:08 2010 > New Revision: 205953 > URL: http://svn.freebsd.org/changeset/base/205953 > > Log: > A last-minute change in the previous commit broke rule deletion, > so i am fixing it, this time with a more detailed description > of what the code is supposed to do. > > Modified: > stable/8/sys/netinet/ipfw/ip_fw_sockopt.c Is this a direct commit to a stable branch? -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 12:52:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1610C106564A; Wed, 31 Mar 2010 12:52:20 +0000 (UTC) (envelope-from keramida@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 054A48FC21; Wed, 31 Mar 2010 12:52: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 o2VCqJEs011803; Wed, 31 Mar 2010 12:52:19 GMT (envelope-from keramida@svn.freebsd.org) Received: (from keramida@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VCqJf6011801; Wed, 31 Mar 2010 12:52:19 GMT (envelope-from keramida@svn.freebsd.org) Message-Id: <201003311252.o2VCqJf6011801@svn.freebsd.org> From: Giorgos Keramidas Date: Wed, 31 Mar 2010 12:52: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: r205978 - head/share/man/man7 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Mar 2010 12:52:20 -0000 Author: keramida (doc committer) Date: Wed Mar 31 12:52:19 2010 New Revision: 205978 URL: http://svn.freebsd.org/changeset/base/205978 Log: Document DEBUG_FLAGS in a more visible place, in the build(7) manpage Noticed by: Alexander Best Reviewed by: jhb MFC after: 1 week Modified: head/share/man/man7/build.7 Modified: head/share/man/man7/build.7 ============================================================================== --- head/share/man/man7/build.7 Wed Mar 31 12:22:55 2010 (r205977) +++ head/share/man/man7/build.7 Wed Mar 31 12:52:19 2010 (r205978) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 15, 2009 +.Dd March 31, 2010 .Dt BUILD 7 .Os .Sh NAME @@ -311,6 +311,20 @@ should be set as with .Sh ENVIRONMENT Variables that influence all builds include: .Bl -tag -width ".Va MAKEOBJDIRPREFIX" +.It Va DEBUG_FLAGS +Defines a set of debugging flags that will be used to build all userland +binaries under +.Pa /usr/src . +When +.Va DEBUG_FLAGS +is defined, the +.Cm install +and +.Cm installworld +targets install binaries from the current +.Va MAKEOBJDIRPREFIX +without stripping, +so that debugging information is retained in the installed binaries. .It Va DESTDIR The directory hierarchy prefix where built objects will be installed. If not set, From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 13:51:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 05E83106566B; Wed, 31 Mar 2010 13:51:32 +0000 (UTC) (envelope-from gahr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CDB058FC08; Wed, 31 Mar 2010 13:51: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 o2VDpVne025352; Wed, 31 Mar 2010 13:51:31 GMT (envelope-from gahr@svn.freebsd.org) Received: (from gahr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VDpVvd025347; Wed, 31 Mar 2010 13:51:31 GMT (envelope-from gahr@svn.freebsd.org) Message-Id: <201003311351.o2VDpVvd025347@svn.freebsd.org> From: Pietro Cerutti Date: Wed, 31 Mar 2010 13:51: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: r205979 - in stable/8: include lib/libc/gen libexec/rtld-elf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Mar 2010 13:51:32 -0000 Author: gahr (ports committer) Date: Wed Mar 31 13:51:31 2010 New Revision: 205979 URL: http://svn.freebsd.org/changeset/base/205979 Log: MFC r205606 Remove const'ness from dlerror(3) prototype, for consistency with POSIX. Approved by: cognet Modified: stable/8/include/dlfcn.h stable/8/lib/libc/gen/dlfcn.c stable/8/lib/libc/gen/dlopen.3 stable/8/libexec/rtld-elf/rtld.c Directory Properties: stable/8/include/ (props changed) stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) stable/8/libexec/ (props changed) stable/8/libexec/rtld-elf/ (props changed) Modified: stable/8/include/dlfcn.h ============================================================================== --- stable/8/include/dlfcn.h Wed Mar 31 12:52:19 2010 (r205978) +++ stable/8/include/dlfcn.h Wed Mar 31 13:51:31 2010 (r205979) @@ -117,8 +117,7 @@ typedef struct dl_serinfo { __BEGIN_DECLS /* XSI functions first. */ int dlclose(void *); -const char * - dlerror(void); +char *dlerror(void); void *dlopen(const char *, int); void *dlsym(void * __restrict, const char * __restrict); Modified: stable/8/lib/libc/gen/dlfcn.c ============================================================================== --- stable/8/lib/libc/gen/dlfcn.c Wed Mar 31 12:52:19 2010 (r205978) +++ stable/8/lib/libc/gen/dlfcn.c Wed Mar 31 13:51:31 2010 (r205979) @@ -34,7 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include -static const char sorry[] = "Service unavailable"; +static char sorry[] = "Service unavailable"; /* * For ELF, the dynamic linker directly resolves references to its @@ -69,7 +69,7 @@ dlclose(void *handle) } #pragma weak dlerror -const char * +char * dlerror(void) { return sorry; Modified: stable/8/lib/libc/gen/dlopen.3 ============================================================================== --- stable/8/lib/libc/gen/dlopen.3 Wed Mar 31 12:52:19 2010 (r205978) +++ stable/8/lib/libc/gen/dlopen.3 Wed Mar 31 13:51:31 2010 (r205979) @@ -52,7 +52,7 @@ .Fn dlsym "void * restrict handle" "const char * restrict symbol" .Ft dlfunc_t .Fn dlfunc "void * restrict handle" "const char * restrict symbol" -.Ft const char * +.Ft char * .Fn dlerror "void" .Ft int .Fn dlclose "void *handle" Modified: stable/8/libexec/rtld-elf/rtld.c ============================================================================== --- stable/8/libexec/rtld-elf/rtld.c Wed Mar 31 12:52:19 2010 (r205978) +++ stable/8/libexec/rtld-elf/rtld.c Wed Mar 31 13:51:31 2010 (r205979) @@ -1961,7 +1961,7 @@ dlclose(void *handle) return 0; } -const char * +char * dlerror(void) { char *msg = error_message; From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 14:42:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EAAD5106564A; Wed, 31 Mar 2010 14:42:07 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DA3CA8FC14; Wed, 31 Mar 2010 14:42: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 o2VEg7AV036589; Wed, 31 Mar 2010 14:42:07 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VEg7gS036587; Wed, 31 Mar 2010 14:42:07 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201003311442.o2VEg7gS036587@svn.freebsd.org> From: Warner Losh Date: Wed, 31 Mar 2010 14:42: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: r205980 - head/tools/tools/nanobsd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Mar 2010 14:42:08 -0000 Author: imp Date: Wed Mar 31 14:42:07 2010 New Revision: 205980 URL: http://svn.freebsd.org/changeset/base/205980 Log: Stop hard coding i386 as the arch for the build. Instead, default to the processor we're running on. Also, supply amd64 version of create_diskimage that's the same as i386's. # didn't fix the confusion between using the processor for this and using # the machine (which would be more appropriate). NANO_ARCH smashes the two # together right now. MFC after: 7 days Modified: head/tools/tools/nanobsd/nanobsd.sh Modified: head/tools/tools/nanobsd/nanobsd.sh ============================================================================== --- head/tools/tools/nanobsd/nanobsd.sh Wed Mar 31 13:51:31 2010 (r205979) +++ head/tools/tools/nanobsd/nanobsd.sh Wed Mar 31 14:42:07 2010 (r205980) @@ -134,7 +134,7 @@ PPLEVEL=3 ####################################################################### # Not a variable at this time -NANO_ARCH=i386 +NANO_ARCH=`uname -p` ####################################################################### # @@ -497,6 +497,11 @@ create_i386_diskimage ( ) ( ) > ${NANO_OBJ}/_.di 2>&1 ) +# i386 and amd64 are identical for disk images +create_amd64_diskimage ( ) ( + create_i386_diskimage +) + last_orders () ( # Redefine this function with any last orders you may have # after the build completed, for instance to copy the finished From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 15:32:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD6A7106566B; Wed, 31 Mar 2010 15:32:36 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9ACD28FC0C; Wed, 31 Mar 2010 15:32: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 o2VFWatV047780; Wed, 31 Mar 2010 15:32:36 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VFWahr047778; Wed, 31 Mar 2010 15:32:36 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201003311532.o2VFWahr047778@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 31 Mar 2010 15:32: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: r205981 - stable/8/sys/compat/x86bios X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Mar 2010 15:32:36 -0000 Author: jkim Date: Wed Mar 31 15:32:36 2010 New Revision: 205981 URL: http://svn.freebsd.org/changeset/base/205981 Log: MFC: r205297, r205347, r205452, r205455, r205649, r205650 Sync. x86bios with HEAD. - Detect illegal access to unmapped memory within real mode emulator. - Map EBDA if available and support memory wraparound above 1MB as VM86 does. - Set initial %ds to 0x40 as X.org int10 handler does. - Print the initial memory map when bootverbose is set. - Optimize real mode page table lookup. - Add strictly aligned memory access for distant future. - Update copyright date. Modified: stable/8/sys/compat/x86bios/x86bios.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/compat/x86bios/x86bios.c ============================================================================== --- stable/8/sys/compat/x86bios/x86bios.c Wed Mar 31 14:42:07 2010 (r205980) +++ stable/8/sys/compat/x86bios/x86bios.c Wed Mar 31 15:32:36 2010 (r205981) @@ -1,6 +1,6 @@ /*- * Copyright (c) 2009 Alex Keda - * Copyright (c) 2009 Jung-uk Kim + * Copyright (c) 2009-2010 Jung-uk Kim * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -60,9 +60,9 @@ __FBSDID("$FreeBSD$"); #define X86BIOS_IVT_BASE 0x00000000 #define X86BIOS_RAM_BASE 0x00001000 -#define X86BIOS_ROM_BASE 0x000a0000 /* XXX EBDA? */ +#define X86BIOS_ROM_BASE 0x000a0000 -#define X86BIOS_ROM_SIZE (X86BIOS_MEM_SIZE - X86BIOS_ROM_BASE) +#define X86BIOS_ROM_SIZE (X86BIOS_MEM_SIZE - (uint32_t)x86bios_rom_phys) #define X86BIOS_PAGES (X86BIOS_MEM_SIZE / X86BIOS_PAGE_SIZE) @@ -79,8 +79,14 @@ static void *x86bios_seg; static vm_offset_t *x86bios_map; +static vm_paddr_t x86bios_rom_phys; static vm_paddr_t x86bios_seg_phys; +static int x86bios_fault; +static uint32_t x86bios_fault_addr; +static uint16_t x86bios_fault_cs; +static uint16_t x86bios_fault_ip; + SYSCTL_NODE(_debug, OID_AUTO, x86bios, CTLFLAG_RD, NULL, "x86bios debugging"); static int x86bios_trace_call; TUNABLE_INT("debug.x86bios.call", &x86bios_trace_call); @@ -91,18 +97,30 @@ TUNABLE_INT("debug.x86bios.int", &x86bio SYSCTL_INT(_debug_x86bios, OID_AUTO, int, CTLFLAG_RW, &x86bios_trace_int, 0, "Trace software interrupt handlers"); +static void +x86bios_set_fault(struct x86emu *emu, uint32_t addr) +{ + + x86bios_fault = 1; + x86bios_fault_addr = addr; + x86bios_fault_cs = emu->x86.R_CS; + x86bios_fault_ip = emu->x86.R_IP; + x86emu_halt_sys(emu); +} + static void * x86bios_get_pages(uint32_t offset, size_t size) { - int i; + vm_offset_t page; - if (offset + size > X86BIOS_MEM_SIZE) + if (offset + size > X86BIOS_MEM_SIZE + X86BIOS_IVT_SIZE) return (NULL); - i = offset / X86BIOS_PAGE_SIZE; - if (x86bios_map[i] != 0) - return ((void *)(x86bios_map[i] + offset - - i * X86BIOS_PAGE_SIZE)); + if (offset >= X86BIOS_MEM_SIZE) + offset -= X86BIOS_MEM_SIZE; + page = x86bios_map[offset / X86BIOS_PAGE_SIZE]; + if (page != 0) + return ((void *)(page + offset % X86BIOS_PAGE_SIZE)); return (NULL); } @@ -124,7 +142,7 @@ x86bios_emu_rdb(struct x86emu *emu, uint va = x86bios_get_pages(addr, sizeof(*va)); if (va == NULL) - x86emu_halt_sys(emu); + x86bios_set_fault(emu, addr); return (*va); } @@ -136,8 +154,13 @@ x86bios_emu_rdw(struct x86emu *emu, uint va = x86bios_get_pages(addr, sizeof(*va)); if (va == NULL) - x86emu_halt_sys(emu); + x86bios_set_fault(emu, addr); +#ifndef __NO_STRICT_ALIGNMENT + if ((addr & 1) != 0) + return (le16dec(va)); + else +#endif return (le16toh(*va)); } @@ -148,8 +171,13 @@ x86bios_emu_rdl(struct x86emu *emu, uint va = x86bios_get_pages(addr, sizeof(*va)); if (va == NULL) - x86emu_halt_sys(emu); + x86bios_set_fault(emu, addr); +#ifndef __NO_STRICT_ALIGNMENT + if ((addr & 3) != 0) + return (le32dec(va)); + else +#endif return (le32toh(*va)); } @@ -160,7 +188,7 @@ x86bios_emu_wrb(struct x86emu *emu, uint va = x86bios_get_pages(addr, sizeof(*va)); if (va == NULL) - x86emu_halt_sys(emu); + x86bios_set_fault(emu, addr); *va = val; } @@ -172,8 +200,13 @@ x86bios_emu_wrw(struct x86emu *emu, uint va = x86bios_get_pages(addr, sizeof(*va)); if (va == NULL) - x86emu_halt_sys(emu); + x86bios_set_fault(emu, addr); +#ifndef __NO_STRICT_ALIGNMENT + if ((addr & 1) != 0) + le16enc(va, val); + else +#endif *va = htole16(val); } @@ -184,8 +217,13 @@ x86bios_emu_wrl(struct x86emu *emu, uint va = x86bios_get_pages(addr, sizeof(*va)); if (va == NULL) - x86emu_halt_sys(emu); + x86bios_set_fault(emu, addr); +#ifndef __NO_STRICT_ALIGNMENT + if ((addr & 3) != 0) + le32enc(va, val); + else +#endif *va = htole32(val); } @@ -281,7 +319,7 @@ x86bios_alloc(uint32_t *offset, size_t s return (NULL); vaddr = contigmalloc(size, M_DEVBUF, M_NOWAIT, X86BIOS_RAM_BASE, - X86BIOS_ROM_BASE, X86BIOS_PAGE_SIZE, 0); + x86bios_rom_phys, X86BIOS_PAGE_SIZE, 0); if (vaddr != NULL) { *offset = vtophys(vaddr); x86bios_set_pages((vm_offset_t)vaddr, *offset, size); @@ -299,7 +337,7 @@ x86bios_free(void *addr, size_t size) return; paddr = vtophys(addr); - if (paddr < X86BIOS_RAM_BASE || paddr >= X86BIOS_ROM_BASE || + if (paddr < X86BIOS_RAM_BASE || paddr >= x86bios_rom_phys || paddr % X86BIOS_PAGE_SIZE != 0) return; @@ -313,7 +351,8 @@ x86bios_init_regs(struct x86regs *regs) { bzero(regs, sizeof(*regs)); - regs->X86BIOS_R_DS = regs->X86BIOS_R_SS = x86bios_seg_phys >> 4; + regs->X86BIOS_R_DS = 0x40; + regs->X86BIOS_R_SS = x86bios_seg_phys >> 4; } void @@ -331,15 +370,21 @@ x86bios_call(struct x86regs *regs, uint1 mtx_lock_spin(&x86bios_lock); memcpy(&x86bios_emu.x86, regs, sizeof(*regs)); + x86bios_fault = 0; x86emu_exec_call(&x86bios_emu, seg, off); memcpy(regs, &x86bios_emu.x86, sizeof(*regs)); mtx_unlock_spin(&x86bios_lock); - if (x86bios_trace_call) + if (x86bios_trace_call) { printf("Exiting 0x%05x (ax=0x%04x bx=0x%04x " "cx=0x%04x dx=0x%04x es=0x%04x di=0x%04x)\n", (seg << 4) + off, regs->R_AX, regs->R_BX, regs->R_CX, regs->R_DX, regs->R_ES, regs->R_DI); + if (x86bios_fault) + printf("Page fault at 0x%05x from 0x%04x:0x%04x.\n", + x86bios_fault_addr, x86bios_fault_cs, + x86bios_fault_ip); + } } uint32_t @@ -370,15 +415,21 @@ x86bios_intr(struct x86regs *regs, int i mtx_lock_spin(&x86bios_lock); memcpy(&x86bios_emu.x86, regs, sizeof(*regs)); + x86bios_fault = 0; x86emu_exec_intr(&x86bios_emu, intno); memcpy(regs, &x86bios_emu.x86, sizeof(*regs)); mtx_unlock_spin(&x86bios_lock); - if (x86bios_trace_int) + if (x86bios_trace_int) { printf("Exiting int 0x%x (ax=0x%04x bx=0x%04x " "cx=0x%04x dx=0x%04x es=0x%04x di=0x%04x)\n", intno, regs->R_AX, regs->R_BX, regs->R_CX, regs->R_DX, regs->R_ES, regs->R_DI); + if (x86bios_fault) + printf("Page fault at 0x%05x from 0x%04x:0x%04x.\n", + x86bios_fault_addr, x86bios_fault_cs, + x86bios_fault_ip); + } } void * @@ -433,6 +484,12 @@ x86bios_match_device(uint32_t offset, de return (1); } +#if defined(__amd64__) || (defined(__i386__) && !defined(PC98)) +#define PROBE_EBDA 1 +#else +#define PROBE_EBDA 0 +#endif + static __inline int x86bios_map_mem(void) { @@ -440,18 +497,63 @@ x86bios_map_mem(void) x86bios_ivt = pmap_mapbios(X86BIOS_IVT_BASE, X86BIOS_IVT_SIZE); if (x86bios_ivt == NULL) return (1); - x86bios_rom = pmap_mapdev(X86BIOS_ROM_BASE, X86BIOS_ROM_SIZE); + +#if PROBE_EBDA + /* Probe EBDA via BDA. */ + x86bios_rom_phys = *(uint16_t *)((vm_offset_t)x86bios_ivt + 0x40e); + x86bios_rom_phys = le16toh(x86bios_rom_phys) << 4; + if (x86bios_rom_phys != 0 && x86bios_rom_phys < X86BIOS_ROM_BASE && + X86BIOS_ROM_BASE - x86bios_rom_phys <= 128 * 1024) + x86bios_rom_phys = + rounddown(x86bios_rom_phys, X86BIOS_PAGE_SIZE); + else +#endif + x86bios_rom_phys = X86BIOS_ROM_BASE; + x86bios_rom = pmap_mapdev(x86bios_rom_phys, X86BIOS_ROM_SIZE); if (x86bios_rom == NULL) { pmap_unmapdev((vm_offset_t)x86bios_ivt, X86BIOS_IVT_SIZE); return (1); } +#if PROBE_EBDA + /* Change attribute for EBDA. */ + if (x86bios_rom_phys < X86BIOS_ROM_BASE && + pmap_change_attr((vm_offset_t)x86bios_rom, + X86BIOS_ROM_BASE - x86bios_rom_phys, PAT_WRITE_BACK) != 0) { + pmap_unmapdev((vm_offset_t)x86bios_ivt, X86BIOS_IVT_SIZE); + pmap_unmapdev((vm_offset_t)x86bios_rom, X86BIOS_ROM_SIZE); + return (1); + } +#endif + x86bios_seg = contigmalloc(X86BIOS_SEG_SIZE, M_DEVBUF, M_WAITOK, - X86BIOS_RAM_BASE, X86BIOS_ROM_BASE, X86BIOS_PAGE_SIZE, 0); + X86BIOS_RAM_BASE, x86bios_rom_phys, X86BIOS_PAGE_SIZE, 0); x86bios_seg_phys = vtophys(x86bios_seg); + if (bootverbose) { + printf("x86bios: IVT 0x%06x-0x%06x at %p\n", + X86BIOS_IVT_BASE, X86BIOS_IVT_SIZE + X86BIOS_IVT_BASE - 1, + x86bios_ivt); + printf("x86bios: SSEG 0x%06x-0x%06x at %p\n", + (uint32_t)x86bios_seg_phys, + X86BIOS_SEG_SIZE + (uint32_t)x86bios_seg_phys - 1, + x86bios_seg); +#if PROBE_EBDA + if (x86bios_rom_phys < X86BIOS_ROM_BASE) + printf("x86bios: EBDA 0x%06x-0x%06x at %p\n", + (uint32_t)x86bios_rom_phys, X86BIOS_ROM_BASE - 1, + x86bios_rom); +#endif + printf("x86bios: ROM 0x%06x-0x%06x at %p\n", + X86BIOS_ROM_BASE, X86BIOS_MEM_SIZE - X86BIOS_SEG_SIZE - 1, + (void *)((vm_offset_t)x86bios_rom + X86BIOS_ROM_BASE - + (vm_offset_t)x86bios_rom_phys)); + } + return (0); } +#undef PROBE_EBDA + static __inline void x86bios_unmap_mem(void) { @@ -475,7 +577,7 @@ x86bios_init(void *arg __unused) M_WAITOK | M_ZERO); x86bios_set_pages((vm_offset_t)x86bios_ivt, X86BIOS_IVT_BASE, X86BIOS_IVT_SIZE); - x86bios_set_pages((vm_offset_t)x86bios_rom, X86BIOS_ROM_BASE, + x86bios_set_pages((vm_offset_t)x86bios_rom, x86bios_rom_phys, X86BIOS_ROM_SIZE); x86bios_set_pages((vm_offset_t)x86bios_seg, x86bios_seg_phys, X86BIOS_SEG_SIZE); From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 15:39:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 45111106566B; Wed, 31 Mar 2010 15:39:47 +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 335C08FC14; Wed, 31 Mar 2010 15:39: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 o2VFdl0K049400; Wed, 31 Mar 2010 15:39:47 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VFdlNx049396; Wed, 31 Mar 2010 15:39:47 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201003311539.o2VFdlNx049396@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 31 Mar 2010 15:39: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: r205982 - stable/8/sys/dev/syscons X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Mar 2010 15:39:47 -0000 Author: jkim Date: Wed Mar 31 15:39:46 2010 New Revision: 205982 URL: http://svn.freebsd.org/changeset/base/205982 Log: MFC: r205550, r205605, r205865 Sync. pixel mode support for syscons(4) with HEAD. - Separate 24-bit pixel draw from 32-bit case. Although it is slower, we do not want to write a useless zero to inaccessible memory region. - We only want the dummy palette for direct color mode. Modified: stable/8/sys/dev/syscons/scvgarndr.c stable/8/sys/dev/syscons/scvidctl.c stable/8/sys/dev/syscons/syscons.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/syscons/scvgarndr.c ============================================================================== --- stable/8/sys/dev/syscons/scvgarndr.c Wed Mar 31 15:32:36 2010 (r205981) +++ stable/8/sys/dev/syscons/scvgarndr.c Wed Mar 31 15:39:46 2010 (r205982) @@ -181,9 +181,17 @@ static u_short mouse_or_mask[16] = { #define vga_drawpxl(pos, color) \ switch (scp->sc->adp->va_info.vi_depth) { \ case 32: \ - case 24: \ writel(pos, vga_palette32[color]); \ break; \ + case 24: \ + if (((pos) & 1) == 0) { \ + writew(pos, vga_palette32[color]); \ + writeb(pos + 2, vga_palette32[color] >> 16);\ + } else { \ + writeb(pos, vga_palette32[color]); \ + writew(pos + 1, vga_palette32[color] >> 8);\ + } \ + break; \ case 16: \ if (scp->sc->adp->va_info.vi_pixel_fsizes[1] == 5)\ writew(pos, vga_palette15[color]); \ Modified: stable/8/sys/dev/syscons/scvidctl.c ============================================================================== --- stable/8/sys/dev/syscons/scvidctl.c Wed Mar 31 15:32:36 2010 (r205981) +++ stable/8/sys/dev/syscons/scvidctl.c Wed Mar 31 15:39:46 2010 (r205982) @@ -741,7 +741,7 @@ sc_vid_ioctl(struct tty *tp, u_long cmd, #ifndef SC_NO_PALETTE_LOADING #ifdef SC_PIXEL_MODE - if ((adp->va_flags & V_ADP_DAC8) != 0) + if (adp->va_info.vi_mem_model == V_INFO_MM_DIRECT) vidd_load_palette(adp, scp->sc->palette2); else #endif @@ -802,7 +802,7 @@ sc_vid_ioctl(struct tty *tp, u_long cmd, if (scp == scp->sc->cur_scp) { set_mode(scp); #ifndef SC_NO_PALETTE_LOADING - if ((adp->va_flags & V_ADP_DAC8) != 0) + if (adp->va_info.vi_mem_model == V_INFO_MM_DIRECT) vidd_load_palette(adp, scp->sc->palette2); else vidd_load_palette(adp, scp->sc->palette); Modified: stable/8/sys/dev/syscons/syscons.c ============================================================================== --- stable/8/sys/dev/syscons/syscons.c Wed Mar 31 15:32:36 2010 (r205981) +++ stable/8/sys/dev/syscons/syscons.c Wed Mar 31 15:39:46 2010 (r205982) @@ -2127,7 +2127,7 @@ restore_scrn_saver_mode(scr_stat *scp, i if (set_mode(scp) == 0) { #ifndef SC_NO_PALETTE_LOADING #ifdef SC_PIXEL_MODE - if ((scp->sc->adp->va_flags & V_ADP_DAC8) != 0) + if (scp->sc->adp->va_info.vi_mem_model == V_INFO_MM_DIRECT) vidd_load_palette(scp->sc->adp, scp->sc->palette2); else #endif @@ -2536,7 +2536,7 @@ exchange_scr(sc_softc_t *sc) #ifndef SC_NO_PALETTE_LOADING if (ISGRAPHSC(sc->old_scp)) { #ifdef SC_PIXEL_MODE - if ((sc->adp->va_flags & V_ADP_DAC8) != 0) + if (sc->adp->va_info.vi_mem_model == V_INFO_MM_DIRECT) vidd_load_palette(sc->adp, sc->palette2); else #endif From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 15:45:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 98BF9106566C; Wed, 31 Mar 2010 15:45:11 +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 821198FC14; Wed, 31 Mar 2010 15:45: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 o2VFjBZn050607; Wed, 31 Mar 2010 15:45:11 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VFjBYL050604; Wed, 31 Mar 2010 15:45:11 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201003311545.o2VFjBYL050604@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 31 Mar 2010 15:45:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205983 - stable/8/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, 31 Mar 2010 15:45:11 -0000 Author: jkim Date: Wed Mar 31 15:45:11 2010 New Revision: 205983 URL: http://svn.freebsd.org/changeset/base/205983 Log: MFC: r205557, r205558, r205564, r205566, r205604, r205653 Sync. pixel mode support for VESA and VGA frame buffers with HEAD. - Map entire video memory again. Although we do not use them all directly, it seems VGA renderer may access unmapped memory region and cause kernel panic. - Fall back to VGA palette functions if VESA function failed and DAC is still in 6-bit mode. Although we have to check non-VGA compatibility bit here, it seems there are too many broken VESA BIOSes out to rely on it. - Be careful when we determine bytes per scan line information. We compare mode table data against minimum value. If the mode table does not make sense, we set the minimum in the mode info. - Teach VGA framebuffer about 8-bit palette format for VESA. - Add my copyright here. Modified: stable/8/sys/dev/fb/vesa.c stable/8/sys/dev/fb/vga.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/fb/vesa.c ============================================================================== --- stable/8/sys/dev/fb/vesa.c Wed Mar 31 15:39:46 2010 (r205982) +++ stable/8/sys/dev/fb/vesa.c Wed Mar 31 15:45:11 2010 (r205983) @@ -1,5 +1,6 @@ /*- * Copyright (c) 1998 Kazutaka YOKOTA and Michael Smith + * Copyright (c) 2009-2010 Jung-uk Kim * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -188,7 +189,7 @@ static int vesa_bios_load_palette2(int s #define STATE_ALL (STATE_HW | STATE_DATA | STATE_DAC | STATE_REG) static ssize_t vesa_bios_state_buf_size(void); static int vesa_bios_save_restore(int code, void *p, size_t size); -#if 0 +#ifdef MODE_TABLE_BROKEN static int vesa_bios_get_line_length(void); #endif static int vesa_bios_set_line_length(int pixel, int *bytes, int *lines); @@ -199,6 +200,7 @@ static int vesa_bios_set_start(int x, in static int vesa_map_gen_mode_num(int type, int color, int mode); static int vesa_translate_flags(u_int16_t vflags); static int vesa_translate_mmodel(u_int8_t vmodel); +static int vesa_get_bpscanline(struct vesa_mode *vmode); static int vesa_bios_init(void); static void vesa_clear_modes(video_info_t *info, int color); @@ -558,7 +560,7 @@ vesa_bios_save_restore(int code, void *p return (regs.R_AX != 0x004f); } -#if 0 +#ifdef MODE_TABLE_BROKEN static int vesa_bios_get_line_length(void) { @@ -709,6 +711,43 @@ vesa_translate_mmodel(u_int8_t vmodel) return (V_INFO_MM_OTHER); } +static int +vesa_get_bpscanline(struct vesa_mode *vmode) +{ + int bpsl; + + if ((vmode->v_modeattr & V_MODEGRAPHICS) != 0) { + /* Find the minimum length. */ + switch (vmode->v_bpp / vmode->v_planes) { + case 1: + bpsl = vmode->v_width / 8; + break; + case 2: + bpsl = vmode->v_width / 4; + break; + case 4: + bpsl = vmode->v_width / 2; + break; + default: + bpsl = vmode->v_width * ((vmode->v_bpp + 7) / 8); + bpsl /= vmode->v_planes; + break; + } + + /* Use VBE 3.0 information if it looks sane. */ + if ((vmode->v_modeattr & V_MODELFB) != 0 && + vesa_adp_info->v_version >= 0x0300 && + vmode->v_linbpscanline > bpsl) + return (vmode->v_linbpscanline); + + /* Return the minimum if the mode table looks absurd. */ + if (vmode->v_bpscanline < bpsl) + return (bpsl); + } + + return (vmode->v_bpscanline); +} + #define VESA_MAXSTR 256 #define VESA_STRCPY(dst, src) do { \ @@ -733,7 +772,6 @@ vesa_bios_init(void) void *vmbuf; uint32_t offs; uint16_t vers; - int bpsl; int is_via_cle266; int modes; int i; @@ -858,9 +896,7 @@ vesa_bios_init(void) } #endif - bpsl = (vmode.v_modeattr & V_MODELFB) != 0 && vers >= 0x0300 ? - vmode.v_linbpscanline : vmode.v_bpscanline; - bsize = bpsl * vmode.v_height; + bsize = vesa_get_bpscanline(&vmode) * vmode.v_height; if ((vmode.v_modeattr & V_MODEGRAPHICS) != 0) bsize *= vmode.v_planes; @@ -1209,7 +1245,7 @@ vesa_set_mode(video_adapter_t *adp, int int10_set_mode(adp->va_initial_bios_mode); if (adp->va_info.vi_flags & V_INFO_LINEAR) pmap_unmapdev(adp->va_buffer, - adp->va_buffer_size); + vesa_adp_info->v_memsize * 64 * 1024); /* * Once (*prevvidsw->get_info)() succeeded, * (*prevvidsw->set_mode)() below won't fail... @@ -1241,12 +1277,12 @@ vesa_set_mode(video_adapter_t *adp, int if ((vesa_adp_info->v_flags & V_DAC8) != 0 && (info.vi_flags & V_INFO_GRAPHICS) != 0 && - (info.vi_flags & V_INFO_NONVGA) != 0 && vesa_bios_set_dac(8) > 6) adp->va_flags |= V_ADP_DAC8; if (adp->va_info.vi_flags & V_INFO_LINEAR) - pmap_unmapdev(adp->va_buffer, adp->va_buffer_size); + pmap_unmapdev(adp->va_buffer, + vesa_adp_info->v_memsize * 64 * 1024); #if VESA_DEBUG > 0 printf("VESA: mode set!\n"); @@ -1257,13 +1293,31 @@ vesa_set_mode(video_adapter_t *adp, int (info.vi_flags & V_INFO_COLOR) ? V_ADP_COLOR : 0; vesa_adp->va_crtc_addr = (vesa_adp->va_flags & V_ADP_COLOR) ? COLOR_CRTC : MONO_CRTC; + + vesa_adp->va_line_width = info.vi_buffer_size / info.vi_height; + if ((info.vi_flags & V_INFO_GRAPHICS) != 0) + vesa_adp->va_line_width /= info.vi_planes; + +#ifdef MODE_TABLE_BROKEN + /* If VBE function returns bigger bytes per scan line, use it. */ + { + int bpsl = vesa_bios_get_line_length(); + if (bpsl > vesa_adp->va_line_width) { + vesa_adp->va_line_width = bpsl; + info.vi_buffer_size = bpsl * info.vi_height; + if ((info.vi_flags & V_INFO_GRAPHICS) != 0) + info.vi_buffer_size *= info.vi_planes; + } + } +#endif + if (info.vi_flags & V_INFO_LINEAR) { #if VESA_DEBUG > 1 printf("VESA: setting up LFB\n"); #endif vesa_adp->va_buffer = (vm_offset_t)pmap_mapdev_attr(info.vi_buffer, - info.vi_buffer_size, PAT_WRITE_COMBINING); + vesa_adp_info->v_memsize * 64 * 1024, PAT_WRITE_COMBINING); vesa_adp->va_window = vesa_adp->va_buffer; vesa_adp->va_window_size = info.vi_buffer_size / info.vi_planes; vesa_adp->va_window_gran = info.vi_buffer_size / info.vi_planes; @@ -1275,9 +1329,6 @@ vesa_set_mode(video_adapter_t *adp, int } vesa_adp->va_buffer_size = info.vi_buffer_size; vesa_adp->va_window_orig = 0; - vesa_adp->va_line_width = info.vi_buffer_size / info.vi_height; - if ((info.vi_flags & V_INFO_GRAPHICS) != 0) - vesa_adp->va_line_width /= info.vi_planes; vesa_adp->va_disp_start.x = 0; vesa_adp->va_disp_start.y = 0; #if VESA_DEBUG > 0 @@ -1322,10 +1373,10 @@ vesa_save_palette(video_adapter_t *adp, { int bits; - if (adp == vesa_adp && VESA_MODE(adp->va_mode) && - (adp->va_info.vi_flags & V_INFO_NONVGA) != 0) { + if (adp == vesa_adp && VESA_MODE(adp->va_mode)) { bits = (adp->va_flags & V_ADP_DAC8) != 0 ? 8 : 6; - return (vesa_bios_save_palette(0, 256, palette, bits)); + if (vesa_bios_save_palette(0, 256, palette, bits) == 0) + return (0); } return ((*prevvidsw->save_palette)(adp, palette)); @@ -1336,10 +1387,10 @@ vesa_load_palette(video_adapter_t *adp, { int bits; - if (adp == vesa_adp && VESA_MODE(adp->va_mode) && - (adp->va_info.vi_flags & V_INFO_NONVGA) != 0) { + if (adp == vesa_adp && VESA_MODE(adp->va_mode)) { bits = (adp->va_flags & V_ADP_DAC8) != 0 ? 8 : 6; - return (vesa_bios_load_palette(0, 256, palette, bits)); + if (vesa_bios_load_palette(0, 256, palette, bits) == 0) + return (0); } return ((*prevvidsw->load_palette)(adp, palette)); @@ -1544,8 +1595,6 @@ get_palette(video_adapter_t *adp, int ba return (1); if (!VESA_MODE(adp->va_mode)) return (1); - if ((adp->va_info.vi_flags & V_INFO_NONVGA) == 0) - return (1); bits = (adp->va_flags & V_ADP_DAC8) != 0 ? 8 : 6; r = malloc(count * 3, M_DEVBUF, M_WAITOK); @@ -1582,8 +1631,6 @@ set_palette(video_adapter_t *adp, int ba return (1); if (!VESA_MODE(adp->va_mode)) return (1); - if ((adp->va_info.vi_flags & V_INFO_NONVGA) == 0) - return (1); bits = (adp->va_flags & V_ADP_DAC8) != 0 ? 8 : 6; r = malloc(count * 3, M_DEVBUF, M_WAITOK); Modified: stable/8/sys/dev/fb/vga.c ============================================================================== --- stable/8/sys/dev/fb/vga.c Wed Mar 31 15:39:46 2010 (r205982) +++ stable/8/sys/dev/fb/vga.c Wed Mar 31 15:45:11 2010 (r205983) @@ -1979,6 +1979,7 @@ vga_show_font(video_adapter_t *adp, int static int vga_save_palette(video_adapter_t *adp, u_char *palette) { + int bits; int i; prologue(adp, V_ADP_PALETTE, ENODEV); @@ -1988,8 +1989,9 @@ vga_save_palette(video_adapter_t *adp, u * VGA has 6 bit DAC . */ outb(PALRADR, 0x00); + bits = (adp->va_flags & V_ADP_DAC8) != 0 ? 0 : 2; for (i = 0; i < 256*3; ++i) - palette[i] = inb(PALDATA) << 2; + palette[i] = inb(PALDATA) << bits; inb(adp->va_crtc_addr + 6); /* reset flip/flop */ return 0; } @@ -1998,15 +2000,17 @@ static int vga_save_palette2(video_adapter_t *adp, int base, int count, u_char *r, u_char *g, u_char *b) { + int bits; int i; prologue(adp, V_ADP_PALETTE, ENODEV); outb(PALRADR, base); + bits = (adp->va_flags & V_ADP_DAC8) != 0 ? 0 : 2; for (i = 0; i < count; ++i) { - r[i] = inb(PALDATA) << 2; - g[i] = inb(PALDATA) << 2; - b[i] = inb(PALDATA) << 2; + r[i] = inb(PALDATA) << bits; + g[i] = inb(PALDATA) << bits; + b[i] = inb(PALDATA) << bits; } inb(adp->va_crtc_addr + 6); /* reset flip/flop */ return 0; @@ -2021,14 +2025,16 @@ vga_save_palette2(video_adapter_t *adp, static int vga_load_palette(video_adapter_t *adp, u_char *palette) { + int bits; int i; prologue(adp, V_ADP_PALETTE, ENODEV); outb(PIXMASK, 0xff); /* no pixelmask */ outb(PALWADR, 0x00); + bits = (adp->va_flags & V_ADP_DAC8) != 0 ? 0 : 2; for (i = 0; i < 256*3; ++i) - outb(PALDATA, palette[i] >> 2); + outb(PALDATA, palette[i] >> bits); inb(adp->va_crtc_addr + 6); /* reset flip/flop */ outb(ATC, 0x20); /* enable palette */ return 0; @@ -2038,16 +2044,18 @@ static int vga_load_palette2(video_adapter_t *adp, int base, int count, u_char *r, u_char *g, u_char *b) { + int bits; int i; prologue(adp, V_ADP_PALETTE, ENODEV); outb(PIXMASK, 0xff); /* no pixelmask */ outb(PALWADR, base); + bits = (adp->va_flags & V_ADP_DAC8) != 0 ? 0 : 2; for (i = 0; i < count; ++i) { - outb(PALDATA, r[i] >> 2); - outb(PALDATA, g[i] >> 2); - outb(PALDATA, b[i] >> 2); + outb(PALDATA, r[i] >> bits); + outb(PALDATA, g[i] >> bits); + outb(PALDATA, b[i] >> bits); } inb(adp->va_crtc_addr + 6); /* reset flip/flop */ outb(ATC, 0x20); /* enable palette */ From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 15:49:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9FA3C1065672; Wed, 31 Mar 2010 15:49:10 +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 8E7638FC0A; Wed, 31 Mar 2010 15:49: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 o2VFnADF051566; Wed, 31 Mar 2010 15:49:10 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VFnAhG051564; Wed, 31 Mar 2010 15:49:10 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201003311549.o2VFnAhG051564@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 31 Mar 2010 15:49:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205984 - stable/8/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, 31 Mar 2010 15:49:10 -0000 Author: jkim Date: Wed Mar 31 15:49:10 2010 New Revision: 205984 URL: http://svn.freebsd.org/changeset/base/205984 Log: MFC: r197185 Enable BIOS modes on amd64. Modified: stable/8/sys/dev/fb/vga.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/fb/vga.c ============================================================================== --- stable/8/sys/dev/fb/vga.c Wed Mar 31 15:45:11 2010 (r205983) +++ stable/8/sys/dev/fb/vga.c Wed Mar 31 15:49:10 2010 (r205984) @@ -177,7 +177,7 @@ vga_mmap(struct cdev *dev, vga_softc_t * #endif /* architecture dependent option */ -#ifndef __i386__ +#if !defined(__i386__) && !defined(__amd64__) #define VGA_NO_BIOS 1 #endif From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 16:01:48 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E3647106564A; Wed, 31 Mar 2010 16:01:48 +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 80F9C8FC16; Wed, 31 Mar 2010 16:01: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 o2VG1mxu054434; Wed, 31 Mar 2010 16:01:48 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VG1mkR054432; Wed, 31 Mar 2010 16:01:48 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201003311601.o2VG1mkR054432@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 31 Mar 2010 16:01: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: r205985 - stable/8/usr.sbin/vidcontrol X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Mar 2010 16:01:49 -0000 Author: jkim Date: Wed Mar 31 16:01:48 2010 New Revision: 205985 URL: http://svn.freebsd.org/changeset/base/205985 Log: MFC: r205855 Print memory model of the video mode except for planar memory model. 'P', 'D', 'C', 'H', and 'V' mean packed pixel, direct color, CGA, Hercules, and VGA X memory models respectively where they have fixed number of planes. Modified: stable/8/usr.sbin/vidcontrol/vidcontrol.c Directory Properties: stable/8/usr.sbin/vidcontrol/ (props changed) Modified: stable/8/usr.sbin/vidcontrol/vidcontrol.c ============================================================================== --- stable/8/usr.sbin/vidcontrol/vidcontrol.c Wed Mar 31 15:49:10 2010 (r205984) +++ stable/8/usr.sbin/vidcontrol/vidcontrol.c Wed Mar 31 16:01:48 2010 (r205985) @@ -950,10 +950,11 @@ show_adapter_info(void) static void show_mode_info(void) { - struct video_info _info; char buf[80]; - int mode; + struct video_info _info; int c; + int mm; + int mode; printf(" mode# flags type size " "font window linear buffer\n"); @@ -972,9 +973,35 @@ show_mode_info(void) if (_info.vi_flags & V_INFO_GRAPHICS) { c = 'G'; - snprintf(buf, sizeof(buf), "%dx%dx%d %d", - _info.vi_width, _info.vi_height, - _info.vi_depth, _info.vi_planes); + if (_info.vi_mem_model == V_INFO_MM_PLANAR) + snprintf(buf, sizeof(buf), "%dx%dx%d %d", + _info.vi_width, _info.vi_height, + _info.vi_depth, _info.vi_planes); + else { + switch (_info.vi_mem_model) { + case V_INFO_MM_PACKED: + mm = 'P'; + break; + case V_INFO_MM_DIRECT: + mm = 'D'; + break; + case V_INFO_MM_CGA: + mm = 'C'; + break; + case V_INFO_MM_HGC: + mm = 'H'; + break; + case V_INFO_MM_VGAX: + mm = 'V'; + break; + default: + mm = ' '; + break; + } + snprintf(buf, sizeof(buf), "%dx%dx%d %c", + _info.vi_width, _info.vi_height, + _info.vi_depth, mm); + } } else { c = 'T'; From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 16:07:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1A0F106566B; Wed, 31 Mar 2010 16:07:36 +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 C0BFD8FC15; Wed, 31 Mar 2010 16:07: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 o2VG7aWj055737; Wed, 31 Mar 2010 16:07:36 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VG7a7K055734; Wed, 31 Mar 2010 16:07:36 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201003311607.o2VG7a7K055734@svn.freebsd.org> From: Rui Paulo Date: Wed, 31 Mar 2010 16:07:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205986 - head/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: Wed, 31 Mar 2010 16:07:37 -0000 Author: rpaulo Date: Wed Mar 31 16:07:36 2010 New Revision: 205986 URL: http://svn.freebsd.org/changeset/base/205986 Log: Constify vap argument of ieee80211_{note,discard}* functions. MFC after: 1 week Modified: head/sys/net80211/ieee80211_input.c head/sys/net80211/ieee80211_var.h Modified: head/sys/net80211/ieee80211_input.c ============================================================================== --- head/sys/net80211/ieee80211_input.c Wed Mar 31 16:01:48 2010 (r205985) +++ head/sys/net80211/ieee80211_input.c Wed Mar 31 16:07:36 2010 (r205986) @@ -734,7 +734,8 @@ ieee80211_ssid_mismatch(struct ieee80211 * Return the bssid of a frame. */ static const uint8_t * -ieee80211_getbssid(struct ieee80211vap *vap, const struct ieee80211_frame *wh) +ieee80211_getbssid(const struct ieee80211vap *vap, + const struct ieee80211_frame *wh) { if (vap->iv_opmode == IEEE80211_M_STA) return wh->i_addr2; @@ -748,7 +749,7 @@ ieee80211_getbssid(struct ieee80211vap * #include void -ieee80211_note(struct ieee80211vap *vap, const char *fmt, ...) +ieee80211_note(const struct ieee80211vap *vap, const char *fmt, ...) { char buf[128]; /* XXX */ va_list ap; @@ -761,7 +762,7 @@ ieee80211_note(struct ieee80211vap *vap, } void -ieee80211_note_frame(struct ieee80211vap *vap, +ieee80211_note_frame(const struct ieee80211vap *vap, const struct ieee80211_frame *wh, const char *fmt, ...) { @@ -776,7 +777,7 @@ ieee80211_note_frame(struct ieee80211vap } void -ieee80211_note_mac(struct ieee80211vap *vap, +ieee80211_note_mac(const struct ieee80211vap *vap, const uint8_t mac[IEEE80211_ADDR_LEN], const char *fmt, ...) { @@ -790,7 +791,7 @@ ieee80211_note_mac(struct ieee80211vap * } void -ieee80211_discard_frame(struct ieee80211vap *vap, +ieee80211_discard_frame(const struct ieee80211vap *vap, const struct ieee80211_frame *wh, const char *type, const char *fmt, ...) { @@ -811,7 +812,7 @@ ieee80211_discard_frame(struct ieee80211 } void -ieee80211_discard_ie(struct ieee80211vap *vap, +ieee80211_discard_ie(const struct ieee80211vap *vap, const struct ieee80211_frame *wh, const char *type, const char *fmt, ...) { @@ -830,7 +831,7 @@ ieee80211_discard_ie(struct ieee80211vap } void -ieee80211_discard_mac(struct ieee80211vap *vap, +ieee80211_discard_mac(const struct ieee80211vap *vap, const uint8_t mac[IEEE80211_ADDR_LEN], const char *type, const char *fmt, ...) { Modified: head/sys/net80211/ieee80211_var.h ============================================================================== --- head/sys/net80211/ieee80211_var.h Wed Mar 31 16:01:48 2010 (r205985) +++ head/sys/net80211/ieee80211_var.h Wed Mar 31 16:07:36 2010 (r205986) @@ -852,10 +852,10 @@ ieee80211_htchanflags(const struct ieee8 if (ieee80211_msg(_vap, _m)) \ ieee80211_note_frame(_vap, _wh, _fmt, __VA_ARGS__); \ } while (0) -void ieee80211_note(struct ieee80211vap *, const char *, ...); -void ieee80211_note_mac(struct ieee80211vap *, +void ieee80211_note(const struct ieee80211vap *, const char *, ...); +void ieee80211_note_mac(const struct ieee80211vap *, const uint8_t mac[IEEE80211_ADDR_LEN], const char *, ...); -void ieee80211_note_frame(struct ieee80211vap *, +void ieee80211_note_frame(const struct ieee80211vap *, const struct ieee80211_frame *, const char *, ...); #define ieee80211_msg_debug(_vap) \ ((_vap)->iv_debug & IEEE80211_MSG_DEBUG) @@ -893,11 +893,11 @@ void ieee80211_note_frame(struct ieee802 ieee80211_discard_mac(_vap, _mac, _type, _fmt, __VA_ARGS__);\ } while (0) -void ieee80211_discard_frame(struct ieee80211vap *, +void ieee80211_discard_frame(const struct ieee80211vap *, const struct ieee80211_frame *, const char *type, const char *fmt, ...); -void ieee80211_discard_ie(struct ieee80211vap *, +void ieee80211_discard_ie(const struct ieee80211vap *, const struct ieee80211_frame *, const char *type, const char *fmt, ...); -void ieee80211_discard_mac(struct ieee80211vap *, +void ieee80211_discard_mac(const struct ieee80211vap *, const uint8_t mac[IEEE80211_ADDR_LEN], const char *type, const char *fmt, ...); #else From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 16:17:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF2281065670 for ; Wed, 31 Mar 2010 16:17:55 +0000 (UTC) (envelope-from post@posterous.com) Received: from mail1.posterous.com (mail1.posterous.com [67.207.138.63]) by mx1.freebsd.org (Postfix) with ESMTP id 92E5B8FC0A for ; Wed, 31 Mar 2010 16:17:55 +0000 (UTC) Received: from mail1.posterous.com (localhost [127.0.0.1]) by mail1.posterous.com (Postfix) with ESMTP id CEBDA34052F; Wed, 31 Mar 2010 08:59:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=posterous.com; h=date:from :to:message-id:in-reply-to:references:subject:mime-version :content-type; s=posterous1; bh=aeFVtUBdY+n5+7axb6clF5l4hPY=; b= EeWt/z8hAHhYTPAjWnWKr3aIeigDSkz1TCCKpeR6SwFtcznaRbd7/hAMvwqEA/sx 0AUvlioV+uWShlxVSQ6CRBAYuyI44kz76F94eFal+sRLGPttelWP607wndij6gDf 6PSMTlvg/OVAEOyIpFMcgqgiAQyeCfGU+171mvfVM0Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=posterous.com; h=date:from :to:message-id:in-reply-to:references:subject:mime-version :content-type; q=dns; s=posterous1; b=JsjTND2WrH15dAOI0AY5COoJkw vvxULbSWsKlWeAKUpbDw1Ut+0TvYiTQJzMBWSTYhx0mYFPKNNTiPSwMC8GDG9sUo LHgDVqdGA0HqI01oBFgrjC1nbpyBaAJXPYYWVf97T0AdWRw9sVF7vYhCwTubEAd8 wriC/2mZcf8IQso2Y= Received: from posterous.com (67-207-140-50.static.cloud-ips.com [67.207.140.50]) (Authenticated sender: emailsender) by mail1.posterous.com (Postfix) with ESMTPA id BF1DE340463; Wed, 31 Mar 2010 08:59:21 -0700 (PDT) Date: Wed, 31 Mar 2010 08:59:21 -0700 From: Posterous To: svn-src-all@freebsd.org Message-Id: <4bb37159bbb2d_28b54da92c386614@dj2.tmail> In-Reply-To: <20100331155856.08DFF34066B@mail1.posterous.com> References: <20100331155856.08DFF34066B@mail1.posterous.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: Quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Posterous | Re: MAIL SYSTEM ERROR - RETURNED MAIL X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Mar 2010 16:17:55 -0000 --- Reply above this line to create a new post --- Your email has been posted! Welcome to Posterous! We think e-mailing is such a natural way to share i= nformation, there can be no better way to publish something on the intern= et. So go for it, send us something else! We'll add it to the blog you ha= ve already created. Your new post: http://svnsrcall-ith8d.posterous.com Do you want to edit or remove this post? Click here to edit or remove: http://posterous.com/editpost/k29pkLgrgLB0ZdchKSJw0aYaXT4MU07g6JKf5ya1kng= wV0EkAZBLPJS2KaSj =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D Setting a password is easy. It's optional, but here's why you should: = * Choose a personalized subdomain. We just gave you a temporary one. You choose your own .posterous.com a= ddress. * More security. Be able to manage and edit your posterous securely using your own pass= word. * Make it yours. Customize your site name and upload a profile photo. = * Connect. Be able to subscribe and keep up to date with others. = Click here to set a password: http://posterous.com/main/register?hash=3Dk29pkLgrgLB0ZdchKSJw0aYaXT4MU07= g6JKf5ya1kngwV0EkAZBLPJS2KaSj =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D = -- Posterous.com is the place to post everything. Just email us. Unsubscribe from emails: http://posterous.com/main/unsubscribeemail/cbvpHbJHjzidahDFCCaxDicIcFpqbn= From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 16:42:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 71B691065670; Wed, 31 Mar 2010 16:42:22 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 614B58FC0A; Wed, 31 Mar 2010 16:42:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2VGgMXr063358; Wed, 31 Mar 2010 16:42:22 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VGgMFw063356; Wed, 31 Mar 2010 16:42:22 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201003311642.o2VGgMFw063356@svn.freebsd.org> From: Jack F Vogel Date: Wed, 31 Mar 2010 16:42:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205987 - head/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 16:42:22 -0000 Author: jfv Date: Wed Mar 31 16:42:22 2010 New Revision: 205987 URL: http://svn.freebsd.org/changeset/base/205987 Log: Fix poll handler declaration. Modified: head/sys/dev/e1000/if_lem.c Modified: head/sys/dev/e1000/if_lem.c ============================================================================== --- head/sys/dev/e1000/if_lem.c Wed Mar 31 16:07:36 2010 (r205986) +++ head/sys/dev/e1000/if_lem.c Wed Mar 31 16:42:22 2010 (r205987) @@ -269,7 +269,7 @@ static void lem_add_rx_process_limit(str #endif /* ~EM_LEGACY_IRQ */ #ifdef DEVICE_POLLING -static poll_handler_t em_poll; +static poll_handler_t lem_poll; #endif /* POLLING */ /********************************************************************* From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 16:55:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CAF70106566B; Wed, 31 Mar 2010 16:55:47 +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 BA3288FC1D; Wed, 31 Mar 2010 16:55: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 o2VGtlGY066436; Wed, 31 Mar 2010 16:55:47 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VGtlAD066434; Wed, 31 Mar 2010 16:55:47 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201003311655.o2VGtlAD066434@svn.freebsd.org> From: Andriy Gapon Date: Wed, 31 Mar 2010 16:55:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205988 - head/usr.bin/indent X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Mar 2010 16:55:47 -0000 Author: avg Date: Wed Mar 31 16:55:47 2010 New Revision: 205988 URL: http://svn.freebsd.org/changeset/base/205988 Log: indent(1): correctly handle case/label at the very start of a function Obtained from: NetBSD (rev. 1.11 of indent.c) MFC after: 1 week Modified: head/usr.bin/indent/indent.c Modified: head/usr.bin/indent/indent.c ============================================================================== --- head/usr.bin/indent/indent.c Wed Mar 31 16:42:22 2010 (r205987) +++ head/usr.bin/indent/indent.c Wed Mar 31 16:55:47 2010 (r205988) @@ -675,7 +675,7 @@ check_type: ps.want_blank = true; break; } - if (ps.in_decl) { + if (ps.in_or_st) { *e_code++ = ':'; ps.want_blank = false; break; From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 17:05:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8127C1065673; Wed, 31 Mar 2010 17:05:30 +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 641228FC1A; Wed, 31 Mar 2010 17:05: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 o2VH5UEt068584; Wed, 31 Mar 2010 17:05:30 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VH5Uk3068579; Wed, 31 Mar 2010 17:05:30 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201003311705.o2VH5Uk3068579@svn.freebsd.org> From: Andriy Gapon Date: Wed, 31 Mar 2010 17:05: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: r205989 - head/usr.bin/indent X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Mar 2010 17:05:30 -0000 Author: avg Date: Wed Mar 31 17:05:30 2010 New Revision: 205989 URL: http://svn.freebsd.org/changeset/base/205989 Log: indent(1): add a new option, -ta, to treat all *_t identifiers as types Submitted by: Hans Petter Selasky Discussed with: bde MFC after: 10 days Modified: head/usr.bin/indent/args.c head/usr.bin/indent/indent.1 head/usr.bin/indent/indent_globs.h head/usr.bin/indent/lexi.c Modified: head/usr.bin/indent/args.c ============================================================================== --- head/usr.bin/indent/args.c Wed Mar 31 16:55:47 2010 (r205988) +++ head/usr.bin/indent/args.c Wed Mar 31 17:05:30 2010 (r205989) @@ -157,6 +157,7 @@ struct pro { {"sc", PRO_BOOL, true, ON, &star_comment_cont}, {"sob", PRO_BOOL, false, ON, &swallow_optional_blanklines}, {"st", PRO_SPECIAL, 0, STDIN, 0}, + {"ta", PRO_BOOL, false, ON, &auto_typedefs}, {"troff", PRO_BOOL, false, ON, &troff}, {"ut", PRO_BOOL, true, ON, &use_tabs}, {"v", PRO_BOOL, false, ON, &verbose}, Modified: head/usr.bin/indent/indent.1 ============================================================================== --- head/usr.bin/indent/indent.1 Wed Mar 31 16:55:47 2010 (r205988) +++ head/usr.bin/indent/indent.1 Wed Mar 31 17:05:30 2010 (r205989) @@ -80,6 +80,7 @@ .Op Fl sob | Fl nsob .Ek .Op Fl \&st +.Op Fl \&ta .Op Fl troff .Op Fl ut | Fl nut .Op Fl v | Fl \&nv @@ -377,6 +378,9 @@ Default: Causes .Nm to take its input from stdin and put its output to stdout. +.It Fl ta +Automatically add all identifiers ending in "_t" to the list +of type keywords. .It Fl T Ns Ar typename Adds .Ar typename Modified: head/usr.bin/indent/indent_globs.h ============================================================================== --- head/usr.bin/indent/indent_globs.h Wed Mar 31 16:55:47 2010 (r205988) +++ head/usr.bin/indent/indent_globs.h Wed Mar 31 17:05:30 2010 (r205989) @@ -204,6 +204,8 @@ int function_brace_split; /* split f * brace onto separate lines */ int use_tabs; /* set true to use tabs for spacing, * false uses all spaces */ +int auto_typedefs; /* set true to recognize identifiers + * ending in "_t" like typedefs */ /* -troff font state information */ Modified: head/usr.bin/indent/lexi.c ============================================================================== --- head/usr.bin/indent/lexi.c Wed Mar 31 16:55:47 2010 (r205988) +++ head/usr.bin/indent/lexi.c Wed Mar 31 17:05:30 2010 (r205989) @@ -249,6 +249,17 @@ lexi(void) last_code = ident; /* Remember that this is the code we will * return */ + if (auto_typedefs) { + const char *q = s_token; + /* Check if we have an "_t" in the end */ + if (q[0] && q[1] && + (strcmp(q + strlen(q) - 2, "_t") == 0)) { + ps.its_a_keyword = true; + ps.last_u_d = true; + goto found_auto_typedef; + } + } + /* * This loop will check if the token is a keyword. */ @@ -285,6 +296,7 @@ lexi(void) /* FALLTHROUGH */ case 4: /* one of the declaration keywords */ + found_auto_typedef: if (ps.p_l_follow) { ps.cast_mask |= (1 << ps.p_l_follow) & ~ps.sizeof_mask; break; /* inside parens: cast, param list or sizeof */ From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 17:14:00 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EC06A106564A; Wed, 31 Mar 2010 17:13:59 +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 D9B568FC12; Wed, 31 Mar 2010 17:13: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 o2VHDxIl070512; Wed, 31 Mar 2010 17:13:59 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VHDxoH070467; Wed, 31 Mar 2010 17:13:59 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201003311713.o2VHDxoH070467@svn.freebsd.org> From: Xin LI Date: Wed, 31 Mar 2010 17:13:59 +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: r205990 - vendor/libz/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: Wed, 31 Mar 2010 17:14:00 -0000 Author: delphij Date: Wed Mar 31 17:13:59 2010 New Revision: 205990 URL: http://svn.freebsd.org/changeset/base/205990 Log: Import zlib 1.2.4.1 beta (trimmed) Modified: vendor/libz/dist/ChangeLog vendor/libz/dist/README vendor/libz/dist/crc32.c vendor/libz/dist/deflate.c vendor/libz/dist/gzguts.h vendor/libz/dist/gzlib.c vendor/libz/dist/gzread.c vendor/libz/dist/inftrees.c vendor/libz/dist/minigzip.c vendor/libz/dist/zconf.h vendor/libz/dist/zlib.3 vendor/libz/dist/zlib.h vendor/libz/dist/zutil.c vendor/libz/dist/zutil.h Modified: vendor/libz/dist/ChangeLog ============================================================================== --- vendor/libz/dist/ChangeLog Wed Mar 31 17:05:30 2010 (r205989) +++ vendor/libz/dist/ChangeLog Wed Mar 31 17:13:59 2010 (r205990) @@ -1,6 +1,30 @@ ChangeLog file for zlib +Changes in 1.2.4.1 (28 Mar 2010) +- Remove the use of [a-z] constructs for sed in configure [gentoo 310225] +- Remove $(SHAREDLIB) from LIBS in Makefile.in [Creech] +- Restore "for debugging" comment on sprintf() in gzlib.c +- Remove fdopen for MVS from gzguts.h +- Put new README-WIN32.txt in win32 [Rowe] +- Add check for shell to configure and invoke another shell if needed +- Fix big fat stinking bug in gzseek() on uncompressed files +- Remove vestigial F_OPEN64 define in zutil.h +- Set and check the value of _LARGEFILE_SOURCE and _LARGEFILE64_SOURCE +- Avoid errors on non-LFS systems when applications define LFS macros +- Set EXE to ".exe" in configure for MINGW [Kahle] +- Match crc32() in crc32.c exactly to the prototype in zlib.h [Sherrill] +- Add prefix for cross-compilation in win32/makefile.gcc [Bar-Lev] +- Add DLL install in win32/makefile.gcc [Bar-Lev] +- Allow Linux* or linux* from uname in configure [Bar-Lev] +- Allow ldconfig to be redefined in configure and Makefile.in [Bar-Lev] +- Add cross-compilation prefixes to configure [Bar-Lev] +- Match type exactly in gz_load() invocation in gzread.c +- Match type exactly of zcalloc() in zutil.c to zlib.h alloc_func +- Provide prototypes for *64 functions when building zlib without LFS +- Don't use -lc when linking shared library on MinGW +- Remove errno.h check in configure and vestigial errno code in zutil.h + Changes in 1.2.4 (14 Mar 2010) - Fix VER3 extraction in configure for no fourth subversion - Update zlib.3, add docs to Makefile.in to make .pdf out of it Modified: vendor/libz/dist/README ============================================================================== --- vendor/libz/dist/README Wed Mar 31 17:05:30 2010 (r205989) +++ vendor/libz/dist/README Wed Mar 31 17:13:59 2010 (r205990) @@ -1,6 +1,6 @@ ZLIB DATA COMPRESSION LIBRARY -zlib 1.2.4 is a general purpose data compression library. All the code is +zlib 1.2.4.1 is a general purpose data compression library. All the code is thread safe. The data format used by the zlib library is described by RFCs (Request for Comments) 1950 to 1952 in the files http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format) @@ -30,7 +30,7 @@ Mark Nelson wrote an ar issue of Dr. Dobb's Journal; a copy of the article is available at http://marknelson.us/1997/01/01/zlib-engine/ . -The changes made in version 1.2.4 are documented in the file ChangeLog. +The changes made in version 1.2.4.1 are documented in the file ChangeLog. Unsupported third party contributions are provided in directory contrib/ . Modified: vendor/libz/dist/crc32.c ============================================================================== --- vendor/libz/dist/crc32.c Wed Mar 31 17:05:30 2010 (r205989) +++ vendor/libz/dist/crc32.c Wed Mar 31 17:13:59 2010 (r205990) @@ -221,7 +221,7 @@ const unsigned long FAR * ZEXPORT get_cr unsigned long ZEXPORT crc32(crc, buf, len) unsigned long crc; const unsigned char FAR *buf; - unsigned len; + uInt len; { if (buf == Z_NULL) return 0UL; Modified: vendor/libz/dist/deflate.c ============================================================================== --- vendor/libz/dist/deflate.c Wed Mar 31 17:05:30 2010 (r205989) +++ vendor/libz/dist/deflate.c Wed Mar 31 17:13:59 2010 (r205990) @@ -52,7 +52,7 @@ #include "deflate.h" const char deflate_copyright[] = - " deflate 1.2.4 Copyright 1995-2010 Jean-loup Gailly and Mark Adler "; + " deflate 1.2.4.1 Copyright 1995-2010 Jean-loup Gailly and Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot Modified: vendor/libz/dist/gzguts.h ============================================================================== --- vendor/libz/dist/gzguts.h Wed Mar 31 17:05:30 2010 (r205989) +++ vendor/libz/dist/gzguts.h Wed Mar 31 17:13:59 2010 (r205990) @@ -3,9 +3,9 @@ * For conditions of distribution and use, see copyright notice in zlib.h */ -#ifdef _LARGEFILE64_SOURCE +#if _LARGEFILE64_SOURCE == 1 # ifndef _LARGEFILE_SOURCE -# define _LARGEFILE_SOURCE +# define _LARGEFILE_SOURCE 1 # endif # ifdef _FILE_OFFSET_BITS # undef _FILE_OFFSET_BITS @@ -44,7 +44,7 @@ #endif /* get errno and strerror definition */ -#if defined UNDER_CE && defined NO_ERRNO_H +#if defined UNDER_CE # include # define zstrerror() gz_strwinerror((DWORD)GetLastError()) #else @@ -56,13 +56,7 @@ # endif #endif -/* MVS fdopen() */ -#ifdef __MVS__ - #pragma map (fdopen , "\174\174FDOPEN") - FILE *fdopen(int, const char *); -#endif - -#ifdef _LARGEFILE64_SOURCE +#if _LARGEFILE64_SOURCE == 1 # define z_off64_t off64_t #else # define z_off64_t z_off_t @@ -117,7 +111,7 @@ typedef gz_state FAR *gz_statep; /* shared functions */ ZEXTERN void ZEXPORT gz_error OF((gz_statep, int, const char *)); -#if defined UNDER_CE && defined NO_ERRNO_H +#if defined UNDER_CE ZEXTERN char ZEXPORT *gz_strwinerror OF((DWORD error)); #endif Modified: vendor/libz/dist/gzlib.c ============================================================================== --- vendor/libz/dist/gzlib.c Wed Mar 31 17:05:30 2010 (r205989) +++ vendor/libz/dist/gzlib.c Wed Mar 31 17:13:59 2010 (r205990) @@ -5,7 +5,7 @@ #include "gzguts.h" -#ifdef _LARGEFILE64_SOURCE +#if _LARGEFILE64_SOURCE == 1 && _LFS64_LARGEFILE == 1 # define LSEEK lseek64 #else # define LSEEK lseek @@ -15,7 +15,7 @@ local void gz_reset OF((gz_statep)); local gzFile gz_open OF((const char *, int, const char *)); -#if defined UNDER_CE && defined NO_ERRNO_H +#if defined UNDER_CE /* Map the Windows error number in ERROR to a locale-dependent error message string and return a pointer to it. Typically, the values for ERROR come @@ -65,7 +65,7 @@ char ZEXPORT *gz_strwinerror (error) return buf; } -#endif /* UNDER_CE && NO_ERRNO_H */ +#endif /* UNDER_CE */ /* Reset gzip file state */ local void gz_reset(state) @@ -217,7 +217,7 @@ gzFile ZEXPORT gzdopen(fd, mode) if (fd == -1 || (path = malloc(7 + 3 * sizeof(int))) == NULL) return NULL; - sprintf(path, "", fd); + sprintf(path, "", fd); /* for debugging */ gz = gz_open(path, fd, mode); free(path); return gz; @@ -305,7 +305,7 @@ z_off64_t ZEXPORT gzseek64(file, offset, /* if within raw area while reading, just go there */ if (state->mode == GZ_READ && state->how == COPY && state->pos + offset >= state->raw) { - ret = LSEEK(state->fd, offset, SEEK_CUR); + ret = LSEEK(state->fd, offset - state->have, SEEK_CUR); if (ret == -1) return -1; state->have = 0; Modified: vendor/libz/dist/gzread.c ============================================================================== --- vendor/libz/dist/gzread.c Wed Mar 31 17:05:30 2010 (r205989) +++ vendor/libz/dist/gzread.c Wed Mar 31 17:13:59 2010 (r205990) @@ -55,7 +55,8 @@ local int gz_avail(state) if (state->err != Z_OK) return -1; if (state->eof == 0) { - if (gz_load(state, state->in, state->size, &(strm->avail_in)) == -1) + if (gz_load(state, state->in, state->size, + (unsigned *)&(strm->avail_in)) == -1) return -1; strm->next_in = state->in; } Modified: vendor/libz/dist/inftrees.c ============================================================================== --- vendor/libz/dist/inftrees.c Wed Mar 31 17:05:30 2010 (r205989) +++ vendor/libz/dist/inftrees.c Wed Mar 31 17:13:59 2010 (r205990) @@ -9,7 +9,7 @@ #define MAXBITS 15 const char inflate_copyright[] = - " inflate 1.2.4 Copyright 1995-2010 Mark Adler "; + " inflate 1.2.4.1 Copyright 1995-2010 Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot @@ -62,7 +62,7 @@ unsigned short FAR *work; 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; static const unsigned short lext[31] = { /* Length codes 257..285 extra */ 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, - 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 64, 195}; + 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 67, 206}; static const unsigned short dbase[32] = { /* Distance codes 0..29 base */ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, Modified: vendor/libz/dist/minigzip.c ============================================================================== --- vendor/libz/dist/minigzip.c Wed Mar 31 17:05:30 2010 (r205989) +++ vendor/libz/dist/minigzip.c Wed Mar 31 17:13:59 2010 (r205990) @@ -54,7 +54,7 @@ extern int unlink OF((const char *)); #endif -#if defined(UNDER_CE) && defined(NO_ERRNO_H) +#if defined(UNDER_CE) # include # define perror(s) pwinerror(s) @@ -116,7 +116,7 @@ static void pwinerror (s) fprintf(stderr, "%s\n", strwinerror(GetLastError ())); } -#endif /* UNDER_CE && NO_ERRNO_H */ +#endif /* UNDER_CE */ #ifndef GZ_SUFFIX # define GZ_SUFFIX ".gz" Modified: vendor/libz/dist/zconf.h ============================================================================== --- vendor/libz/dist/zconf.h Wed Mar 31 17:05:30 2010 (r205989) +++ vendor/libz/dist/zconf.h Wed Mar 31 17:13:59 2010 (r205990) @@ -364,7 +364,7 @@ typedef uLong FAR uLongf; # define Z_HAVE_UNISTD_H #endif -#ifdef Z_HAVE_UNISTD_H +#if defined(Z_HAVE_UNISTD_H) || _LARGEFILE64_SOURCE == 1 # include /* for off_t */ # include /* for SEEK_* and off_t */ # ifdef VMS @@ -375,15 +375,12 @@ typedef uLong FAR uLongf; # endif #endif -#ifdef _LARGEFILE64_SOURCE -# include -#endif - #ifndef SEEK_SET # define SEEK_SET 0 /* Seek from beginning of file. */ # define SEEK_CUR 1 /* Seek from current position. */ # define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ #endif + #ifndef z_off_t # define z_off_t long #endif Modified: vendor/libz/dist/zlib.3 ============================================================================== --- vendor/libz/dist/zlib.3 Wed Mar 31 17:05:30 2010 (r205989) +++ vendor/libz/dist/zlib.3 Wed Mar 31 17:13:59 2010 (r205990) @@ -1,4 +1,4 @@ -.TH ZLIB 3 "14 March 2010" +.TH ZLIB 3 "28 Mar 2010" .SH NAME zlib \- compression/decompression library .SH SYNOPSIS @@ -125,7 +125,7 @@ before asking for help. Send questions and/or comments to zlib@gzip.org, or (for the Windows DLL version) to Gilles Vollant (info@winimage.com). .SH AUTHORS -Version 1.2.4 +Version 1.2.4.1 Copyright (C) 1995-2010 Jean-loup Gailly (jloup@gzip.org) and Mark Adler (madler@alumni.caltech.edu). .LP Modified: vendor/libz/dist/zlib.h ============================================================================== --- vendor/libz/dist/zlib.h Wed Mar 31 17:05:30 2010 (r205989) +++ vendor/libz/dist/zlib.h Wed Mar 31 17:13:59 2010 (r205990) @@ -1,5 +1,5 @@ /* zlib.h -- interface of the 'zlib' general purpose compression library - version 1.2.4, Mar 14th, 2010 + version 1.2.4.1, March 28th, 2010 Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler @@ -37,12 +37,12 @@ extern "C" { #endif -#define ZLIB_VERSION "1.2.4" -#define ZLIB_VERNUM 0x1240 +#define ZLIB_VERSION "1.2.4.1" +#define ZLIB_VERNUM 0x1241 #define ZLIB_VER_MAJOR 1 #define ZLIB_VER_MINOR 2 #define ZLIB_VER_REVISION 4 -#define ZLIB_VER_SUBREVISION 0 +#define ZLIB_VER_SUBREVISION 1 /* The 'zlib' compression library provides in-memory compression and @@ -1556,7 +1556,7 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF( inflateBackInit_((strm), (windowBits), (window), \ ZLIB_VERSION, sizeof(z_stream)) -#ifdef _LARGEFILE64_SOURCE +#if _LARGEFILE64_SOURCE == 1 && _LFS64_LARGEFILE == 1 ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); ZEXTERN off64_t ZEXPORT gzseek64 OF((gzFile, off64_t, int)); ZEXTERN off64_t ZEXPORT gztell64 OF((gzFile)); @@ -1565,14 +1565,14 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF( ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, off64_t)); #endif -#if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS == 64 +#if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS == 64 && _LFS64_LARGEFILE == 1 # define gzopen gzopen64 # define gzseek gzseek64 # define gztell gztell64 # define gzoffset gzoffset64 # define adler32_combine adler32_combine64 # define crc32_combine crc32_combine64 -# ifndef _LARGEFILE64_SOURCE +# if _LARGEFILE64_SOURCE != 1 ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); ZEXTERN off_t ZEXPORT gzseek64 OF((gzFile, off_t, int)); ZEXTERN off_t ZEXPORT gztell64 OF((gzFile)); Modified: vendor/libz/dist/zutil.c ============================================================================== --- vendor/libz/dist/zutil.c Wed Mar 31 17:05:30 2010 (r205989) +++ vendor/libz/dist/zutil.c Wed Mar 31 17:13:59 2010 (r205990) @@ -272,7 +272,7 @@ void zcfree (voidpf opaque, voidpf ptr) # define _hfree hfree #endif -voidpf zcalloc (voidpf opaque, unsigned items, unsigned size) +voidpf zcalloc (voidpf opaque, uInt items, uInt size) { if (opaque) opaque = 0; /* to make compiler happy */ return _halloc((long)items, size); Modified: vendor/libz/dist/zutil.h ============================================================================== --- vendor/libz/dist/zutil.h Wed Mar 31 17:05:30 2010 (r205989) +++ vendor/libz/dist/zutil.h Wed Mar 31 17:13:59 2010 (r205990) @@ -24,19 +24,6 @@ # include #endif -#if defined(UNDER_CE) && defined(NO_ERRNO_H) -# define zseterrno(ERR) SetLastError((DWORD)(ERR)) -# define zerrno() ((int)GetLastError()) -#else -# ifdef NO_ERRNO_H - extern int errno; -# else -# include -# endif -# define zseterrno(ERR) do { errno = (ERR); } while (0) -# define zerrno() errno -#endif - #ifndef local # define local static #endif @@ -167,12 +154,22 @@ extern const char * const z_errmsg[10]; #pragma warn -8066 #endif -#ifdef _LARGEFILE64_SOURCE +#if _LARGEFILE64_SOURCE == 1 && _LFS64_LARGEFILE == 1 # define z_off64_t off64_t #else # define z_off64_t z_off_t #endif +/* provide prototypes for these when building zlib without LFS */ +#if _LARGEFILE64_SOURCE != 1 || _LFS64_LARGEFILE != 1 + ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); + ZEXTERN off_t ZEXPORT gzseek64 OF((gzFile, off_t, int)); + ZEXTERN off_t ZEXPORT gztell64 OF((gzFile)); + ZEXTERN off_t ZEXPORT gzoffset64 OF((gzFile)); + ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, off_t)); + ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, off_t)); +#endif + /* common defaults */ #ifndef OS_CODE @@ -183,12 +180,6 @@ extern const char * const z_errmsg[10]; # define F_OPEN(name, mode) fopen((name), (mode)) #endif -#ifdef _LARGEFILE64_SOURCE -# define F_OPEN64(name, mode) fopen64((name), (mode)) -#else -# define F_OPEN64(name, mode) fopen((name), (mode)) -#endif - /* functions */ #if defined(STDC99) || (defined(__TURBOC__) && __TURBOC__ >= 0x550) From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 17:14:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2622F106566B; Wed, 31 Mar 2010 17:14:33 +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 EF3368FC13; Wed, 31 Mar 2010 17:14: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 o2VHEWba070659; Wed, 31 Mar 2010 17:14:32 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VHEWfi070658; Wed, 31 Mar 2010 17:14:32 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201003311714.o2VHEWfi070658@svn.freebsd.org> From: Xin LI Date: Wed, 31 Mar 2010 17:14:32 +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: r205991 - vendor/libz/1.2.4.1 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 17:14:33 -0000 Author: delphij Date: Wed Mar 31 17:14:32 2010 New Revision: 205991 URL: http://svn.freebsd.org/changeset/base/205991 Log: Tag zlib 1.2.4.1. Added: vendor/libz/1.2.4.1/ - copied from r205990, vendor/libz/dist/ From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 17:40:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A25D106566C; Wed, 31 Mar 2010 17:40:14 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 390D78FC14; Wed, 31 Mar 2010 17:40: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 o2VHeEXa076317; Wed, 31 Mar 2010 17:40:14 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VHeEdt076314; Wed, 31 Mar 2010 17:40:14 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201003311740.o2VHeEdt076314@svn.freebsd.org> From: Warner Losh Date: Wed, 31 Mar 2010 17:40: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: r205992 - head/usr.bin/sed X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Mar 2010 17:40:14 -0000 Author: imp Date: Wed Mar 31 17:40:13 2010 New Revision: 205992 URL: http://svn.freebsd.org/changeset/base/205992 Log: Make -r mean exactly the same thing as -E for increased compatibility with GNU sed. MFC after: 7 days Modified: head/usr.bin/sed/main.c head/usr.bin/sed/sed.1 Modified: head/usr.bin/sed/main.c ============================================================================== --- head/usr.bin/sed/main.c Wed Mar 31 17:14:32 2010 (r205991) +++ head/usr.bin/sed/main.c Wed Mar 31 17:40:13 2010 (r205992) @@ -130,8 +130,9 @@ main(int argc, char *argv[]) fflag = 0; inplace = NULL; - while ((c = getopt(argc, argv, "EI:ae:f:i:ln")) != -1) + while ((c = getopt(argc, argv, "EI:ae:f:i:lnr")) != -1) switch (c) { + case 'r': /* Gnu sed compat */ case 'E': rflags = REG_EXTENDED; break; Modified: head/usr.bin/sed/sed.1 ============================================================================== --- head/usr.bin/sed/sed.1 Wed Mar 31 17:14:32 2010 (r205991) +++ head/usr.bin/sed/sed.1 Wed Mar 31 17:40:13 2010 (r205992) @@ -39,11 +39,11 @@ .Nd stream editor .Sh SYNOPSIS .Nm -.Op Fl Ealn +.Op Fl Ealnr .Ar command .Op Ar .Nm -.Op Fl Ealn +.Op Fl Ealnr .Op Fl e Ar command .Op Fl f Ar command_file .Op Fl I Ar extension @@ -144,6 +144,10 @@ all of the commands have been applied to The .Fl n option suppresses this behavior. +.It Fl r +Same as +.Fl E +for compatibility with GNU sed. .El .Pp The form of a From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 17:47:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3DF01106566C; Wed, 31 Mar 2010 17:47:58 +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 2D1778FC0A; Wed, 31 Mar 2010 17:47: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 o2VHlwXl078039; Wed, 31 Mar 2010 17:47:58 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VHlwJX078037; Wed, 31 Mar 2010 17:47:58 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201003311747.o2VHlwJX078037@svn.freebsd.org> From: Matt Jacob Date: Wed, 31 Mar 2010 17:47: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: r205993 - 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: Wed, 31 Mar 2010 17:47:58 -0000 Author: mjacob Date: Wed Mar 31 17:47:57 2010 New Revision: 205993 URL: http://svn.freebsd.org/changeset/base/205993 Log: For unhandled actions in xpt_action_default, remember to call xpt_done for queued requests. This solves the problem of indefinite hangs for unspecified transports when XPT_SCAN_BUS is called. A few minor cosmetics elsewhere. MFC after: 1 week Modified: head/sys/cam/cam_xpt.c Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Wed Mar 31 17:40:13 2010 (r205992) +++ head/sys/cam/cam_xpt.c Wed Mar 31 17:47:57 2010 (r205993) @@ -2380,6 +2380,7 @@ xpt_action_default(union ccb *start_ccb) if (start_ccb->ccb_h.func_code == XPT_ATA_IO) { start_ccb->ataio.resid = 0; } + /* FALLTHROUGH */ case XPT_RESET_DEV: case XPT_ENG_EXEC: { @@ -2888,6 +2889,9 @@ xpt_action_default(union ccb *start_ccb) case XPT_ENG_INQ: /* XXX Implement */ start_ccb->ccb_h.status = CAM_PROVIDE_FAIL; + if (start_ccb->ccb_h.func_code & XPT_FC_DEV_QUEUED) { + xpt_done(start_ccb); + } break; } } @@ -3930,7 +3934,7 @@ xpt_dev_async_default(u_int32_t async_co struct cam_et *target, struct cam_ed *device, void *async_arg) { - printf("xpt_dev_async called\n"); + printf("%s called\n", __func__); } u_int32_t @@ -4919,4 +4923,3 @@ camisr_runqueue(void *V_queue) (*ccb_h->cbfcnp)(ccb_h->path->periph, (union ccb *)ccb_h); } } - From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 18:18:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 326E0106566C; Wed, 31 Mar 2010 18:18:38 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 213478FC0C; Wed, 31 Mar 2010 18:18: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 o2VIIcN2084838; Wed, 31 Mar 2010 18:18:38 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VIIcco084836; Wed, 31 Mar 2010 18:18:38 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201003311818.o2VIIcco084836@svn.freebsd.org> From: Warner Losh Date: Wed, 31 Mar 2010 18:18: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: r205994 - head/tools/tools/nanobsd/gateworks X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Mar 2010 18:18:38 -0000 Author: imp Date: Wed Mar 31 18:18:37 2010 New Revision: 205994 URL: http://svn.freebsd.org/changeset/base/205994 Log: Two fixes: (1) We don't need a custom install_kernel. We can install without symbols by adding INSTALL_NODEBUG (which likely should be WITHOUT_KERNEL_SYMBOLS_FILE, or something shorter) to CONF_INSTALL (2) for make buildenv stage, use NANO_MAKE_CONF_BUILD rather than the non-existant NANO_MAKE_CONF. MFC after: 7 days Modified: head/tools/tools/nanobsd/gateworks/common Modified: head/tools/tools/nanobsd/gateworks/common ============================================================================== --- head/tools/tools/nanobsd/gateworks/common Wed Mar 31 17:47:57 2010 (r205993) +++ head/tools/tools/nanobsd/gateworks/common Wed Mar 31 18:18:37 2010 (r205994) @@ -37,7 +37,7 @@ NANO_CUSTOMIZE="$NANO_CUSTOMIZE cust_ins buildenv() { cd ${NANO_SRC} - env TARGET_ARCH=${NANO_ARCH} __MAKE_CONF=${NANO_MAKE_CONF} \ + env TARGET_ARCH=${NANO_ARCH} __MAKE_CONF=${NANO_MAKE_CONF_BUILD} \ DESTDIR=${NANO_WORLDDIR} make buildenv } @@ -146,22 +146,9 @@ WITHOUT_TCSH=true CONF_INSTALL="$CONF_BUILD WITHOUT_TOOLCHAIN=true WITHOUT_INSTALLLIB=true +INSTALL_NODEBUG=true " -# NB: override to suppress install of kernel.symbols -install_kernel() -{ - pprint 2 "install kernel" - pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.ik" - - cd ${NANO_SRC} - env TARGET_ARCH=${NANO_ARCH} ${NANO_PMAKE} installkernel \ - INSTALL_NODEBUG=true \ - DESTDIR=${NANO_WORLDDIR} \ - __MAKE_CONF=${NANO_MAKE_CONF} KERNCONF=`basename ${NANO_KERNEL}` \ - > ${MAKEOBJDIRPREFIX}/_.ik 2>&1 -} - # NB: override to force / on s1 instead of s1a setup_nanobsd_etc() { From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 18:21:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA7E2106566C; Wed, 31 Mar 2010 18:21:26 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D71898FC0C; Wed, 31 Mar 2010 18:21: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 o2VILQBi085496; Wed, 31 Mar 2010 18:21:26 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VILPwY085492; Wed, 31 Mar 2010 18:21:25 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201003311821.o2VILPwY085492@svn.freebsd.org> From: Ulrich Spoerlein Date: Wed, 31 Mar 2010 18:21:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205995 - in 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, 31 Mar 2010 18:21:27 -0000 Author: uqs Date: Wed Mar 31 18:21:25 2010 New Revision: 205995 URL: http://svn.freebsd.org/changeset/base/205995 Log: Sync fortunes with other *BSDs - Spelling errors - Typographical fixes - Consistent attributions - Use Jr. more consistently - Capitalization of dictionary-like entries - Sorting using tools/do_sort - Remove duplicate fortunes - Style according to the Notes file - Reflect correct default fortune name in Notes - Remove some no longer needed spelling hints - Drop latin1 characters (sorry MÃ¥rten) This is a partial sync against the DragonflyBSD sources, where a lot of fixes from Free, Net and OpenBSD were merged previously. Only about 50% of the changes originate from there, the rest was done by dougb and yours truly. Partial review by: wilko (earlier version), ed (dito) In collaboration with: dougb Approved by: ed (co-mentor) Modified: head/games/fortune/Notes head/games/fortune/datfiles/fortunes head/games/fortune/datfiles/fortunes-o.real head/games/fortune/datfiles/fortunes.sp.ok head/games/fortune/datfiles/limerick head/games/fortune/datfiles/startrek head/games/fortune/datfiles/zippy Modified: head/games/fortune/Notes ============================================================================== --- head/games/fortune/Notes Wed Mar 31 18:18:37 2010 (r205994) +++ head/games/fortune/Notes Wed Mar 31 18:21:25 2010 (r205995) @@ -19,13 +19,13 @@ Warning: /usr/share/games/fortune. A fortune file has two parts: the source file (which contains the fortunes themselves) and the data file which describes the fortunes. The data file always has the same name as the fortune file -with the string ".dat" concatenated, i.e. "fort" is the standard fortune -database, and "fort.dat" is the data file which describes it. See +with the string ".dat" concatenated, i.e. "fortunes" is the standard fortune +database, and "fortunes.dat" is the data file which describes it. See strfile(8) for more information on creating the data files. Fortunes are split into potentially offensive and not potentially offensive parts. The offensive version of a file has the same name as the -non-offensive version with "-o" concatenated, i.e. "fort" is the standard -fortune database, and "fort-o" is the standard offensive database. The +non-offensive version with "-o" concatenated, i.e. "fortunes" is the standard +fortune database, and "fortunes-o" is the standard offensive database. The fortune program automatically assumes that any file with a name ending in "-o" is potentially offensive, and should therefore only be displayed if explicitly requested, either with the -o option or by specifying a file name @@ -42,10 +42,10 @@ MUST be in the potentially offensive dat explicit language (see George Carlin's recent updated list) MUST be in the potentially offensive database. Political and religious opinions are often sequestered in the potentially offensive section as well. Anything which -assumes as a world view blatantly racist, mysogynist (sexist), or homophobic +assumes as a world view blatantly racist, misogynist (sexist), or homophobic ideas should not be in either, since they are not really funny unless *you* -are racist, mysogynist, or homophobic. - The point of this is that people have should have a reasonable +are racist, misogynist, or homophobic. + The point of this is that people should have a reasonable expectation that, should they just run "fortune", they will not be offended. We know that some people take offense at anything, but normal people do have opinions, too, and have a right not to have their sensibilities offended by @@ -53,7 +53,7 @@ a program which is supposed to be entert -o" or "fortune -a" are saying, in effect, that they are willing to have their sensibilities tweaked. However, they should not have their personal worth seriously (i.e., not in jest) assaulted. Jokes which depend for their -humor on racist, mysogynist, or homophobic stereotypes *do* seriously +humor on racist, misogynist, or homophobic stereotypes *do* seriously assault individual personal worth, and in a general entertainment medium we should be able to get by without it. Modified: head/games/fortune/datfiles/fortunes ============================================================================== --- head/games/fortune/datfiles/fortunes Wed Mar 31 18:18:37 2010 (r205994) +++ head/games/fortune/datfiles/fortunes Wed Mar 31 18:21:25 2010 (r205995) @@ -368,8 +368,10 @@ OR'd together, outta sight! Double bucky, I'd like a whole word of Double bucky, I'm happy I heard of Double bucky, I'd like a whole word of you! - - -- (C) 1978 by Guy L. Steele, Jr. + -- Guy L. Steele, Jr., (C) 1978 + (to Nicholas Wirth, who suggested that an extra bit + be added to terminal codes on 36-bit machines for use + by screen editors.) % Hard Copies and Chmod @@ -834,7 +836,7 @@ would like on it. "Here lies an honest lawyer. "Sorry, but I can't do that," replied the stonecutter. "In this state, it's against the law to bury two people in the same grave. However, -I could put ``here lies an honest lawyer'', if that would be okay." +I could put `here lies an honest lawyer', if that would be okay." "But that won't let people know who it is" protested the lawyer. "Certainly will," retorted the stonecutter. "people will read it and exclaim, "That's Strange!" @@ -1146,7 +1148,7 @@ strings of pearls. The spirit and inten throughout. There should be neither too little nor too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity. - A program should follow the 'Law of Least Astonishment'. What is this + A program should follow the "Law of Least Astonishment." What is this law? It is simply that the program should always respond to the user in the way that astonishes him least. A program, no matter how complex, should act as a single unit. The @@ -1161,7 +1163,7 @@ program. conference and then returned to report to his manager, saying: "What sort of programmers work for other companies? They behaved badly and were unconcerned with appearances. Their hair was long and unkempt and their -clothes were wrinkled and old. They crashed out hospitality suites and they +clothes were wrinkled and old. They crashed our hospitality suites and they made rude noises during my presentation." The manager said: "I should have never sent you to the conference. Those programmers live beyond the physical world. They consider life absurd, @@ -1466,7 +1468,7 @@ generalizable. The general tendency is to over-design the second system, using all the ideas and frills that were cautiously sidetracked on the first one. The result, as Ovid says, is a "big pile". - -- Frederick Brooks, "The Mythical Man Month" + -- Frederick Brooks, Jr., "The Mythical Man-Month" % An eighty-year-old woman is rocking away the afternoon on her porch when she sees an old, tarnished lamp sitting near the steps. She @@ -1513,7 +1515,7 @@ over canoe frames, for my people need tr and we offer you a chance to kill yourself with our ceremonial knife." The Englishman accepts the knife and yells, "God Save the Queen", while plunging the knife into his heart. - The Frenchman removes the knife from the fallen body, and yells, + The Frenchman removes the knife from the fallen body, and yells, "Vive la France", while plunging the knife into his heart. The American removes the knife from the fallen body, and yells, while stabbing himself all over his body, "Here's your lousy canoe!" @@ -1562,7 +1564,7 @@ a postcard?" "The curious incident of the stable dog in the nighttime." "But the dog did nothing in the nighttime." "That was the curious incident." - -- A. Conan Doyle, "Silver Blaze" + -- Sir Arthur Conan Doyle, "Silver Blaze" % Approaching the gates of the monastery, Hakuin found Ken the Zen preaching to a group of disciples. @@ -1609,8 +1611,8 @@ Los Angeles fainted from hyperoxygenatio under the exhaust of a bus until he revived. % Before he became a hermit, Zarathud was a young Priest, and - took great delight in making fools of his opponents in front of -his followers. +took great delight in making fools of his opponents in front of his +followers. One day Zarathud took his students to a pleasant pasture and there he confronted The Sacred Chao while She was contentedly grazing. "Tell me, you dumb beast," demanded the Priest in his @@ -1626,7 +1628,7 @@ Chinese ideogram for NO-THING.) and finds himself no wiser than before," Bokonon tells us. "He is full of murderous resentment of people who are ignorant without having come by their ignorance the hard way." - -- Kurt Vonnegut, "Cat's Cradle" + -- Kurt Vonnegut, Jr., "Cat's Cradle" % Bubba, Jim Bob, and Leroy were fishing out on the lake last November, and, when Bubba tipped his head back to empty the Jim Beam, he fell out of the @@ -1694,7 +1696,7 @@ way I ought to go from here?" the Cat. "I don't care much where--" said Alice. "Then it doesn't matter which way you go," said the Cat. - -- Lewis Carroll + -- Lewis Carroll, "Alice's Adventures in Wonderland" (1865) % Concerning the war in Vietnam, Senator George Aiken of Vermont noted in January, 1966, "I'm not very keen for doves or hawks. I think we need more @@ -1877,7 +1879,7 @@ how to be excellent: "In Search of Excel So the Cleaning Personnel Don't Steal It", etc. -- Dave Barry, "In Search of Excellence" % - Exxon's 'Universe of Energy' tends to the peculiar rather than the + Exxon's "Universe of Energy" tends to the peculiar rather than the humorous ... After [an incomprehensible film montage about wind and sun and rain and strip mines and] two or three minutes of mechanical confusion, the seats locomote through a short tunnel filled with clock-work dinosaurs. @@ -1923,9 +1925,9 @@ of events, there lurks a singular, sinis "MINE! HA-HA!" % "Found it," the Mouse replied rather crossly: -"of course you know what 'it' means." +"of course you know what `it' means." - "I know what 'it' means well enough, when I find a thing," + "I know what `it' means well enough, when I find a thing," said the Duck: "it's generally a frog or a worm. The question is, what did the archbishop find?" @@ -1937,15 +1939,15 @@ such as a "pride of lions" or a "gaggle One of the professors noticed a group of prostitutes down the block, and posed the question, "What name would be given to that group?" The four fell into silence for a moment, as they pondered the possibilities... - At last, one spoke: "How about 'a Jam of Tarts'?" The others nodded + At last, one spoke: "How about `a Jam of Tarts'?" The others nodded in acknowledgment as they continued to consider the problem. A second -professor spoke: "I'd suggest 'an Essay of Trollops.'" Again, the others -nodded. A third spoke: "I propose 'a Flourish of Strumpets.'" +professor spoke: "I'd suggest `an Essay of Trollops.'" Again, the others +nodded. A third spoke: "I propose `a Flourish of Strumpets.'" They continued their walk in silence, until the first professor remarked to the remaining professor, who was the most senior and learned of the four, "You haven't suggested a name for our ladies. What are your thoughts?" - Replied the fourth professor, "'An Anthology of Prose.'" + Replied the fourth professor, "`An Anthology of Prose.'" % Fred noticed his roommate had a black eye upon returning from a dance. "What happened?" @@ -1958,12 +1960,11 @@ and sarcastic?" "Of course not," said a sympathetic friend. "Well," retorted Frank, "neither would Jennifer." % - "Gee, Mudhead, everyone at More Science High has an + "Gee, Mudhead, everyone at Morse Science High has an extracurricular activity except you." "Well, gee, doesn't Louise count?" "Only to ten, Mudhead." - - -- Firesign Theater + -- The Firesign Theatre % "Gentlemen of the jury," said the defense attorney, now beginning to warm to his summation, "the real question here before you is, shall this @@ -2261,7 +2262,7 @@ each other up: the floor.) S-word. Excuse me. Look, Bob, I'm going to have to get back to you. Bob: Fine. - -- Dave Barry + -- Dave Barry, "$#$%#^%!^%&@%@!" % "I don't know what you mean by `glory,'" Alice said Humpty Dumpty smiled contemptuously. "Of course you don't -- @@ -2276,7 +2277,9 @@ less." so many different things." "The question is," said Humpty Dumpty, "which is to be master-- that's all." - -- Lewis Carroll, "Through the Looking Glass" + -- Lewis Carroll, + "Through the Looking-Glass, + and What Alice Found There" (1871) % I for one cannot protest the recent M.T.A. fare hike and the accompanying promises that this would in no way improve service. For @@ -2328,7 +2331,7 @@ operation - namely, to remove those irri "And then he will be sane?" "Then he will be perfectly sane, and a quite admirable citizen." "Thank heaven for science!" said old Yacob. - -- H.G. Wells, "The Country of the Blind" + -- H. G. Wells, "The Country of the Blind" % "I keep seeing spots in front of my eyes." "Did you ever see a doctor?" @@ -2403,7 +2406,7 @@ more simply -- `Never imagine yourself n might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise.'" - -- Lewis Carroll, "Alice in Wonderland" + -- Lewis Carroll, "Alice's Adventures in Wonderland" (1865) % I said, "Preacher, give me strength for round 5." He said, "What you need is to grow up, son." @@ -2567,7 +2570,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, Jr., "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 @@ -2815,7 +2818,7 @@ guzzled in one gulp and then smashed on the man stuffed the broken bottle in his mouth, munched broken glass and smacked his lips with relish. "Can I, ah, uh, get you another, sir?" the drifter stammered. - "Naw, I gotta git outa here, boy," the man grunted. "Big Mike's + "Naw, I gotta git outta here, boy," the man grunted. "Big Mike's a-comin'." % Love's Drug @@ -3002,7 +3005,7 @@ confirm who I am. -- Captain Freedom % Old Barlow was a crossing-tender at a junction where an express train -demolished an automobile and it's occupants. Being the chief witness, his +demolished an automobile and its occupants. Being the chief witness, his testimony was vitally important. Barlow explained that the night was dark, and he waved his lantern frantically, but the driver of the car paid no attention to the signal. @@ -3072,7 +3075,7 @@ and it was very juicy. I stood up and t when my mother at the kitchen window called my name in a sharp voice. I had to decide quickly. I decided. A rotten Big Boy hitting the target is a memorable sound, like a fat -man doing a belly-flop. With a whoop and a yell the tomatoe came after +man doing a belly-flop. With a whoop and a yell the tomatoee came after me faster than I knew she could run, and grabbed my shirt and was about to brain me when Mother called her name in a sharp voice. And my sister, who was a good person, obeyed and let go -- and burst into tears. I guess she knew that @@ -3164,7 +3167,7 @@ biggest, strongest fish he had ever caug until, finally, he managed to bring it to the surface. Looking of the edge of the boat, he saw the head of this huge fish breaking the surface. Smiling with pride, he reached over the edge to pull the fish up. Unfortunately, he -accidently caught his watch on the edge, and, before he knew it, there was a +accidentally caught his watch on the edge, and, before he knew it, there was a snap, and his watch tumbled into the water next to the fish with a loud "sploosh!" Distracted by this shiny object, the fish made a sudden lunge, simultaneously snapping the line, and swallowing the watch. Sadly, the @@ -3539,12 +3542,14 @@ know." "An uncomfortable sort of age. Now if you'd asked MY advice, I'd have said 'Leave off at seven' -- but it's too late now." "I never ask advice about growing," Alice said indignantly. - "Too proud?" the other enquired. + "Too proud?" the other enquired. Alice felt even more indignant at this suggestion. "I mean," she said, "that one can't help growing older." "ONE can't, perhaps," said Humpty Dumpty; "but TWO can. With proper assistance, you might have left off at seven." - -- Lewis Carroll, "Through the Looking-Glass" + -- Lewis Carroll, + "Through the Looking-Glass, + and What Alice Found There" (1871) % Several students were asked to prove that all odd integers are prime. The first student to try to do this was a math student. "Hmmm... @@ -3732,7 +3737,7 @@ she'd been she said she'd spent the nigh % "That's right; the upper-case shift works fine on the screen, but they're not coming out on the damn printer... Hold? Sure, I'll hold." - -- e.e. cummings last service call + -- e. e. cummings last service call % "The best thing for being sad," replied Merlin, beginning to puff and blow, "is to learn something. That's the only thing that never fails. @@ -3907,7 +3912,7 @@ married! You're a sadist, that's what!" THE LESSER-KNOWN PROGRAMMING LANGUAGES #2: RENE Named after the famous French philosopher and mathematician Rene -DesCartes, RENE is a language used for artificial intelligence. The +Descartes, RENE is a language used for artificial intelligence. The language is being developed at the Chicago Center of Machine Politics and Programming under a grant from the Jane Byrne Victory Fund. A spokesman described the language as "Just as great as dis [sic] city of @@ -4030,7 +4035,9 @@ called 'Ways and Means': but that's onl time completely bewildered. "I was coming to that," the Knight said. "The song really is "A-sitting on a Gate": and the tune's my own invention." - --Lewis Carroll, "Through the Looking Glass" + -- Lewis Carroll, + "Through the Looking-Glass, + and What Alice Found There" (1871) % The only real game in the world, I think, is baseball... You've got to start way down, at the bottom, when you're six or seven years @@ -4065,7 +4072,8 @@ blocks of wood. Opaque, like black pool "The pyramid is opening!" "Which one?" "The one with the ever-widening hole in it!" - -- Firesign Theater, "How Can You Be In Two Places At + -- The Firesign Theatre, + "How Can You Be In Two Places At Once When You're Not Anywhere At All" % The salesman and the system analyst took off to spend a weekend in the @@ -4157,8 +4165,8 @@ make sure that they are Earthlings. The when some guy goes bananas, the cops rope off a sixteen block area around him and call a shrink from the medical school who stands atop a patrol car with a megaphone and shouts, "OK! THIS! ALL! STARTED! WHEN! YOU! WERE! -THREE! YEARS! OLD! ON! ACCOUNT! OF! YOUR MOTHER! RIGHT? SO! LET'S! -TALK! ABOUT! IT!" Down here they don't waste that kind of time. The LAPD +THREE! YEARS! OLD! ON! ACCOUNT! OF! YOUR MOTHER! RIGHT? SO! LET'S! +TALK! ABOUT! IT!" Down here they don't waste that kind of time. The LAPD has SWAT teams composed of guys who make Darth Vader look like Mr. Peepers. Before they go to bust a bookie joint they mortar it first. -- M. Christensen, "A Portland Innocent in LA" @@ -4270,7 +4278,7 @@ you the Widow Miffin?" a small boy asked "Oh, no?" replied the little boy. "Wait 'til you see what they're carrying upstairs!" % - There was a mad scientist (a mad... social... scientist) who kidnaped + There was a mad scientist (a mad... social... scientist) who kidnapped three colleagues, an engineer, a physicist, and a mathematician, and locked each of them in separate cells with plenty of canned food and water but no can opener. @@ -4282,13 +4290,13 @@ and escaped. off the tin cans by throwing them against the wall. She was developing a good pitching arm and a new quantum theory. The mathematician had stacked the unopened cans into a surprising -solution to the kissing problem; his dessicated corpse was propped calmly +solution to the kissing problem; his desiccated corpse was propped calmly against a wall, and this was inscribed on the floor: Theorem: If I can't open these cans, I'll die. Proof: assume the opposite... % There was once a programmer who was attached to the court of the -warlord Wu. The warlord asked the programmer: "Which is easier to design: +warlord of Wu. The warlord asked the programmer: "Which is easier to design: an accounting package or an operating system?" "An operating system," replied the programmer. The warlord uttered an exclamation of disbelief. "Surely an @@ -4328,7 +4336,7 @@ demands from him more than his utmost st sinew and brain and hope and fear and dreams -- and still calls for more. They are fools that think otherwise. No great effort was ever bought. No painting, no music, no poem, no cathedral in stone, no church, no state was -ever raised into being for payment of any kind. No parthenon, no Thermopylae +ever raised into being for payment of any kind. No Parthenon, no Thermopylae was ever built or fought for pay or glory; no Bukhara sacked, or China ground beneath Mongol heel, for loot or power alone. The payment for doing these things was itself the doing of them. @@ -4393,14 +4401,14 @@ be as easily led to beauty as to uglines relations, to joy as to bitterness, be said to be suffering from Hunter Thompson's disease. I don't have it this morning. It comes and goes. This morning I don't have Hunter Thompson's disease. - -- Kurt Vonnegut Jr. on Dr. Hunter S. Thompson: Excerpt + -- Kurt Vonnegut, Jr. on Dr. Hunter S. Thompson: Excerpt from "A Political Disease", Vonnegut's review of "Fear and Loathing: On the Campaign Trail '72" % - To A Quick Young Fox + To A Quick Young Fox: Why jog exquisite bulk, fond crazy vamp, Daft buxom jonquil, zephyr's gawky vice? -Guy fed by work, quiz Jove's xanthic lamp-- +Guy fed by work, quiz Jove's xanthic lamp -- Zow! Qualms by deja vu gyp fox-kin thrice. -- Lazy Dog % @@ -4565,7 +4573,7 @@ let him lie there all night." "Don't worry about that. They have a guard station in front of the White House that's open 24 hours a day. The guards would recognize Colson... and by that time of course his wife would have called the cops and reported -that a bunch of thugs had kidnaped him." +that a bunch of thugs had kidnapped him." "Wouldn't it be a little kinder if you drove about four more blocks and stopped at a phone box to ring the hospital and say, 'Would you mind going around to the front of the White House? There's a naked man lying outside @@ -4574,7 +4582,7 @@ in the street, bleeding to death...'" "It would be quite a story for the newspapers, wouldn't it?" "Yeah, I think it's safe to say we'd see some headlines on that one." -- Hunter S. Thompson, talking to R. Steadman on C. Colson, - ex-Marine captain, now born again, of Watergate fame. + ex-Marine captain, now born again, of Watergate fame. % "Well, it's garish, ugly, and derelicts have used it for a toilet. The rides are dilapidated to the point of being lethal, and could easily @@ -4593,7 +4601,7 @@ an End-user of Very Little Brain, and lo "Well, that was a piece of cake, eh K-9?" "Piece of cake, Master? Radial slice of baked confection ... coefficient of relevance to Key of Time: zero." - -- Dr. Who + -- "Doctor Who" % "We're running out of adjectives to describe our situation. We had crisis, then we went into chaos, and now what do we call this?" said @@ -4691,7 +4699,7 @@ ever happened to me... the most dreadful "Well, it's a highly technical, sensitive instrument we use in computer repair. Being a layman, you probably can't grasp exactly what it does. We call it a two-by-four." - -- Jeff MacNelley, "Shoe" + -- Jeff MacNelly, "Shoe" % "When I drink, *everybody* drinks!" a man shouted to the assembled bar patrons. A loud general cheer went up. After downing his @@ -4860,14 +4868,14 @@ There, that ought to patch it. Dist it "The famous scientific criminal, as famous among crooks as --" "My blushes, Watson," Holmes murmured, in a deprecating voice. "I was about to say 'as he is unknown to the public.'" - -- A. Conan Doyle, "The Valley of Fear" + -- Sir Arthur Conan Doyle, "The Valley of Fear" % "You know, it's at times like this when I'm trapped in a Vogon airlock with a man from Betelgeuse and about to die of asphyxiation in deep space that I really wish I'd listened to what my mother told me when I was young!" "Why, what did she tell you?" - "I don't know, I didn't listen." + "I don't know, I didn't listen!" -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy" % "You mean, if you allow the master to be uncivil, to treat you @@ -5076,7 +5084,7 @@ please communicate them by one of the fo ARPA: WastebasketSLMHQ.ARPA UUCP: [berkeley, seismo, harpo]!fubar!thekid!slmhq!wastebasket - Non-network sites: Federal Express to: + Non-network sites: Federal Express to: Wastebasket Room NE43-926 Copernicus, The Moon, 12345-6789 @@ -5223,7 +5231,7 @@ III. Any body passing through solid matt 8. Babes in Boyland 9. Santa's Magic Lap 10. Hot Buttered Elves - -- David Letterman's "Top Ten Christmas Movies in Times + -- David Letterman, "Top Ten Christmas Movies in Times Square" % ... A booming voice says, "Wrong, cretin!", and you notice that you @@ -5337,7 +5345,7 @@ other's private parts. ... computer hardware progress is so fast. No other technology since civilization began has seen six orders of magnitude in performance-price gain in 30 years. - -- Fred Brooks + -- Frederick Brooks, Jr. % ... [concerning quotation marks] even if we *_d_i_d* quote anybody in this business, it probably would be gibberish. @@ -5350,8 +5358,6 @@ introduction of Christianity, have been yet we have not advanced one inch towards uniformity. -- Thomas Jefferson, "Notes on Virginia" % - Eat drink and be merry, for tomorrow they may make it illegal. -% <<<<< EVACUATION ROUTE <<<<< % ... "fire" does not matter, "earth" and "air" and "water" do not matter. @@ -5440,14 +5446,14 @@ legally ... impeccable! -- Individuals who make their abode in vitreous edifices would be well advised to refrain from catapulting projectiles. -- Neophyte's serendipity. --- Exclusive dedication to necessitious chores without interludes of hedonistic +-- Exclusive dedication to necessitous chores without interludes of hedonistic diversion renders John a hebetudinous fellow. -- A revolving concretion of earthy or mineral matter accumulates no congeries of small, green bryophytic plant. -- Abstention from any aleatory undertaking precludes a potential escalation of a lucrative nature. -- Missiles of ligneous or osteal consistency have the potential of fracturing - osseous structure, but appelations will eternally remain innocuous. + osseous structure, but appellations will eternally remain innocuous. % ** MAXIMUM TERMINALS ACTIVE. TRY AGAIN LATER ** % @@ -5492,7 +5498,7 @@ their C programs. -- Robert Firth % ... Our second completely true news item was sent to me by Mr. H. Boyce -Connell Jr. of Atlanta, Ga., where he is involved in a law firm. One +Connell, Jr. of Atlanta, Ga., where he is involved in a law firm. One thing I like about the South is, folks there care about tradition. If somebody gets handed a name like "H. Boyce," he hangs on to it, puts it on his legal stationery, even passes it to his son, rather than do what @@ -5519,7 +5525,7 @@ awareness of the great goals for Man and galled saucepan does not reach 212 degrees Fahrenheit. % ... so long as the people do not care to exercise their freedom, those -who wish to tyrranize will do so; for tyrants are active and ardent, +who wish to tyrannize will do so; for tyrants are active and ardent, and will devote themselves in the name of any number of gods, religious and otherwise, to put shackles upon sleeping men. -- Voltarine de Cleyre @@ -5596,13 +5602,13 @@ cleanersayingIllgetyoumyprettyandyourlit % ... this is an awesome sight. The entire rebel resistance buried under six million hardbound copies of "The Naked Lunch." - -- The Firesign Theater + -- The Firesign Theatre % ... though his invention worked superbly -- his theory was a crock of sewage from beginning to end. -- Vernor Vinge, "The Peace War" % - U X + U X e dUdX, e dX, cosine, secant, tangent, sine, 3.14159... % * UNIX is a Trademark of Bell Laboratories. @@ -5647,7 +5653,7 @@ into doubt. % ... when fits of creativity run strong, more than one programmer or writer has been known to abandon the desktop for the more spacious floor. - -- Fred Brooks + -- Frederick Brooks, Jr. % ... which reminds me of the Carrot family: Ma Carrot, Pa Carrot, and Baby Carrot. One fine spring day they decided to go out for a picnic. They all @@ -5708,20 +5714,20 @@ QED: A sheet of paper is a lazy dog. 10. The city does not employ so called "Wallet Inspectors". -- David Letterman, "Top Ten New York City Pedestrian Tips" % -[1] Alexander the Great was a great general. -[2] Great generals are forewarned. -[3] Forewarned is forearmed. -[4] Four is an even number. -[5] Four is certainly an odd number of arms for a man to have. -[6] The only number that is both even and odd is infinity. +(1) Alexander the Great was a great general. +(2) Great generals are forewarned. +(3) Forewarned is forearmed. +(4) Four is an even number. +(5) Four is certainly an odd number of arms for a man to have. +(6) The only number that is both even and odd is infinity. Therefore, Alexander the Great had an infinite number of arms. % -[1] Alexander the Great was a great general. -[2] Great generals are forewarned. -[3] Forewarned is forearmed. -[4] Four is an even number. -[5] Four is certainly an odd number of arms for a man to have. -[6] The only number that is both even and odd is infinity. +(1) Alexander the Great was a great general. +(2) Great generals are forewarned. +(3) Forewarned is forearmed. +(4) Four is an even number. +(5) Four is certainly an odd number of arms for a man to have. +(6) The only number that is both even and odd is infinity. Therefore, all horses are black. % 1. Avoid fried meats which angry up the blood. @@ -5792,7 +5798,7 @@ you have to (always catch the buyer hung 2. I, David Letterman, will never rent out my farm again. 1. We are stardust. We are golden. We are going to look really stupid to future generations. - -- David Letterman, Top Ten Lessons of Woodstock + -- David Letterman, "Top Ten Lessons of Woodstock" % 10 Reasons Why a Beer is Better Than a Woman: @@ -5801,8 +5807,8 @@ you have to (always catch the buyer hung 3. A beer doesn't think baseball is stupid simply because the guys spit. 4. A beer doesn't give a [expletive deleted] if you keep a bunch of other beers on the side. - 5. A beer will not call you a sexist pig if you say "doberman" instead of - "doberperson". + 5. A beer will not call you a sexist pig if you say "Doberman" instead of + "Doberperson." 6. A beer won't get a job as a DJ and play 5 straight hours of lesbian folk music on yer fave radio station. 7. A beer understands why The Three Stooges are funny. @@ -5820,7 +5826,7 @@ FF buckets of bits on the bus FF buckets of bits on the bus FF buckets of bits Take one down, short it to ground -FE buckets of bits on the bus... +FE buckets of bits on the bus ad infinitum... % @@ -5932,13 +5938,13 @@ It isn't just a good idea, it's the law! What 20th Century U.S. President was almost impeached and what office did he later hold? % -3 syncs represent the trinity - init, the child and the eternal zombie +3 syncs represent the trinity -- init, the child and the eternal zombie process. In doing 3, you're paying homage to each and I think such traditions are important in this shallow, mercurial business we find ourselves in. -- Jordan K. Hubbard % -$3,000,000. +$3,000,000 % 355/113 -- Not the famous irrational number PI, but an incredible simulation. @@ -6050,7 +6056,7 @@ A beautiful woman is a blessing from Hea -- Kipling % A beautiful woman is a picture which drives all beholders nobly mad. - -- Emerson + -- Ralph Waldo Emerson % A beer delayed is a beer denied. % @@ -6067,7 +6073,7 @@ A billion hours ago man had not yet walk A billion dollars ago was late yesterday afternoon at the U.S. Treasury. % A biologist, a statistician, a mathematician and a computer scientist are on -a photo-safari in Africa. As they're driving along the savanna in their +a photo-safari in Africa. As they're driving along the savannah in their jeep, they stop and scout the horizon with their binoculars. The biologist: "Look! A herd of zebras! And there's a white zebra! @@ -6203,7 +6209,7 @@ invariably sat silent. The monk had alr and a moonlit night. One day he brought to Tortue a piece of string, and asked the same question. In reply, the Grand Tortue grasped the loop between his feet and, with a few simple manipulations, created a complex -string which he proferred wordlessly to the monk. At that moment, the monk +string which he proffered wordlessly to the monk. At that moment, the monk was enlightened. From then on, the monk did not bother Tortue. Instead, he made string after @@ -6261,9 +6267,10 @@ A city is a large community where people % A clash of doctrine is not a disaster - it is an opportunity. % -A classic is something that everyone wants to have read +A classic is something that everybody wants to have read and nobody wants to read. - -- Mark Twain, "The Disappearance of Literature" + -- Mark Twain quoting Professor Winchester, + "The Disappearance of Literature" % A clever prophet makes sure of the event first. % @@ -6438,7 +6445,7 @@ damned things is ample. A couch is as good as a chair. % A countryman between two lawyers is like a fish between two cats. - -- Ben Franklin + -- Benjamin Franklin % A couple of young fellers were fishing at their special pond off the beaten track when out of the bushes jumped the Game Warden. Immediately, @@ -6535,7 +6542,7 @@ A diplomatic husband said to his wife, " your birthday when you never look any older?" % A diplomat's life consists of three things: protocol, Geritol, and alcohol. - -- Adlai Stevenson + -- Adlai E. Stevenson % A distraught patient phoned her doctor's office. "Was it true," the woman inquired, "that the medication the doctor had prescribed was for the rest @@ -6544,7 +6551,7 @@ of her life?" the woman proceeded bravely on. "Well, I'm wondering, then, how serious my condition is. This prescription is marked `NO REFILLS'". % -A diva who specializes in risque arias is an off-coloratura soprano. +A diva who specializes in risqu'e arias is an off-coloratura soprano. % A doctor calls his patient to give him the results of his tests. "I have some bad news," says the doctor, "and some worse news." The bad news is @@ -6708,7 +6715,7 @@ dimension strictly exceeds the topologic -- Mandelbrot, "The Fractal Geometry of Nature" % A free society is one where it is safe to be unpopular. - -- Adlai Stevenson + -- Adlai E. Stevenson % A freelancer is one who gets paid by the word -- per piece or perhaps. -- Robert Benchley @@ -6728,11 +6735,11 @@ lawyers more than he hates his wife. A friend with weed is a friend indeed. % A full belly makes a dull brain. - -- Ben Franklin + -- Benjamin Franklin [and the local candy machine man. Ed] % -A 'full' life in my experience is usually full only of other +A "full" life in my experience is usually full only of other people's demands. % A furore Normanorum libera nos, O Domine! @@ -6782,7 +6789,7 @@ A gift of a flower will soon be made to A girl and a boy bump into each other -- surely an accident. A girl and a boy bump and her handkerchief drops -- surely another accident. But when a girl gives a boy a dead squid -- *_t_h_a_t _h_a_d _t_o _m_e_a_n _s_o_m_e_t_h_i_n_g*. - -- S. Morganstern, "The Silent Gondoliers" + -- S. Morgenstern, "The Silent Gondoliers" % A girl with a future avoids the man with a past. -- Evan Esar, "The Humor of Humor" @@ -6847,7 +6854,7 @@ then asks the backhoe operator for direc A GOOD WAY TO THREATEN somebody is to light a stick of dynamite. Then you call the guy and hold the burning fuse to the phone. "Hear that?" you say. "That's dynamite, baby." - -- Jack Handey, The New Mexican, 1988 + -- Jack Handey, "The New Mexican" (1988) % A gossip is one who talks to you about others, a bore is one who talks to you about himself; and a brilliant conversationalist is one who talks to @@ -6867,7 +6874,7 @@ to take it all away. A grammarian's life is always intense. % A great empire, like a great cake, is most easily diminished at the edges. - -- Ben Franklin + -- Benjamin Franklin % A great many people think they are thinking when they are merely rearranging their prejudices. @@ -6883,7 +6890,7 @@ indicating two directions at once. Full bushy black moustache and, at their corners, sank into little folds filled with disapproval and potato chip crumbs. In the shadow under the green visor of the cap Ignatius J. Reilly's supercilious blue and yellow eyes looked down -upon the other people waiting under the clock at the D.H. Holmes department +upon the other people waiting under the clock at the D. H. Holmes department store, studying the crowd of people for signs of bad taste in dress. Several of the outfits, Ignatius noticed, were new enough and expensive enough to be properly considered offenses against taste and decency. Possession of @@ -6981,19 +6988,19 @@ Stormtroopers, who can't hit the broad s -- Tom Galloway % A is for Amy who fell down the stairs, B is for Basil assaulted by bears. -C is for Clair who wasted away, D is for Desmond thrown out of the sleigh. +C is for Clara who wasted away, D is for Desmond thrown out of the sleigh. E is for Ernest who choked on a peach, F is for Fanny, sucked dry by a leech. G is for George, smothered under a rug, H is for Hector, done in by a thug. I is for Ida who drowned in the lake, J is for James who took lye, by mistake. K is for Kate who was struck with an axe, L is for Leo who swallowed some tacks. -M is for Maud who was swept out to sea, N is for Nevil who died of ennui. +M is for Maud who was swept out to sea, N is for Neville who died of ennui. O is for Olive, run through with an awl, P is for Prue, trampled flat in a brawl -Q is for Quinton who sank in a mire, R is for Rhoda, consumed by a fire. -S is for Susan who parished of fits, T is for Titas who flew into bits. +Q is for Quentin who sank in a mire, R is for Rhoda, consumed by a fire. +S is for Susan who parished of fits, T is for Titus who flew into bits. U is for Una who slipped down a drain, V is for Victor, squashed under a train. -W is for Winie, embedded in ice, X is for Xercies, devoured by mice. -Y is for Yoric whose head was bashed in, Z is for Zilla who drank too much gin. - -- Edward Gorey "The Gastly Crumb Tines" +W is for Winnie, embedded in ice, X is for Xerxes, devoured by mice. +Y is for Yorick whose head was bashed in, Z is for Zillah who drank too much gin. + -- Edward Gorey, "The Gashlycrumb Tinies" % A is for Apple. -- Hester Pryne @@ -7077,7 +7084,7 @@ The lady, indignant, removed her ear. % A language that doesn't affect the way you think about programming is not worth knowing. - -- Alan Perlis + -- Alan J. Perlis % A language that doesn't have everything is actually easier to program in than some that do. @@ -7138,7 +7145,7 @@ A lie in time saves nine. % A lie is an abomination unto the Lord and a very present help in time of trouble. - -- Adlai Stevenson + -- Adlai E. Stevenson % A life lived in fear is a life half lived. % @@ -7160,10 +7167,10 @@ And the clean ones so seldom are comical % A LISP programmer knows the value of everything, but the cost of nothing. - -- Alan Perlis + -- Alan J. Perlis % A list is only as strong as its weakest link. - -- Don Knuth + -- Donald E. Knuth % A little experience often upsets a lot of theory. % @@ -7171,7 +7178,7 @@ A little inaccuracy saves a world of exp -- C. E. Ayres % A little inaccuracy sometimes saves tons of explanation. - -- H. H. Munro, "Saki" + -- H. H. Munroe a.k.a. Saki, "The Square Egg" (1924) % A little kid went up to Santa and asked him, "Santa, you know when I'm bad right?" And Santa says, "Yes, I do." The little kid then asks, "And you @@ -7185,7 +7192,7 @@ those software systems that have excited the products of one or a few designing minds, great designers. Consider Unix, APL, Pascal, Modula, the Smalltalk interface, even Fortran; and contrast them with Cobol, PL/I, Algol, MVS/370, and MS-DOS. - -- Fred Brooks + -- Frederick Brooks, Jr. % A little word of doubtful number, A foe to rest and peaceful slumber. @@ -7208,7 +7215,7 @@ A lot of people are afraid of heights. -- Steven Wright % A lot of people I know believe in positive thinking, -and so do I. I believe everything positively stinks. +and so do I. I believe everything positively stinks. -- Lew Col % A lover without indiscretion is no lover at all. @@ -7228,7 +7235,7 @@ a beautiful woman. Somewhere, somebody' % A man always remembers his first love with special tenderness, but after that begins to bunch them. - -- Mencken + -- H. L. Mencken % A man arrived home early to find his wife in the arms of his best friend, who swore how much they were in love. To quiet the enraged husband, the @@ -7288,7 +7295,7 @@ staggers up to the door and confronts th "I'm sorry, sir, ties required." % A man is known by the company he organizes. - -- A. Bierce + -- Ambrose Bierce % A man is like a rusty wheel on a rusty cart, He sings his song as he rattles along and then he falls apart. @@ -7366,7 +7373,7 @@ Tell, me who is buried here?" "My wife's first husband." % A man who cannot seduce men cannot save them either. - -- Soren Kierkegaard + -- S. A. Kierkegaard (1813-1855) % A man who carries a cat by its tail learns something he can learn in no other way. @@ -7444,7 +7451,7 @@ but to protect the writer. % A method of solution is perfect if we can foresee from the start, and even prove, that following that method we shall attain our aim. - -- Leibnitz + -- Gottfried Wilhelm Leibniz % A Mexican newspaper reports that bored Royal Air Force pilots stationed on the Falkland Islands have devised what they consider a marvelous new @@ -7454,28 +7461,24 @@ along it at the water's edge. Perhaps t heads in unison watching the planes go by, and when the pilots turn around and fly back, the birds turn their heads in the opposite direction, like spectators at a slow-motion tennis match. Then, the -paper reports "The pilots fly out to sea and directly to the penguin +paper reports, "The pilots fly out to sea and directly to the penguin colony and overfly it. Heads go up, up, up, and ten thousand penguins fall over gently onto their backs. - -- Audobon Society Magazine - -2001-02-02, from http://news.bbc.co.uk: - -For five weeks, a team from the British Antarctic Survey (BAS) -monitored 1,000 king penguins on the island of South Georgia as -Lynx helicopters passed overhead. - -"Not one king penguin fell over when the helicopters came over," -said team leader Dr Richard Stone. + -- Audubon Society Magazine -"As the aircraft approached, the birds went quiet and stopped +[From the BBC, 2001-02-02: + For five weeks, a team from the British Antarctic Survey (BAS) +monitored 1,000 king penguins on the island of South Georgia as Lynx +helicopters passed overhead. + "Not one king penguin fell over when the helicopters came over," +said team leader Dr. Richard Stone. + "As the aircraft approached, the birds went quiet and stopped calling to each other, and adolescent birds that were not associated with nests began walking away from the noise. Pure animal instinct, really." - -The conclusion, said Dr Stone, is that flights over 305 metres -(1,000 feet) caused "only minor and transitory ecological effects" -on king penguins. + The conclusion, said Dr. Stone, is that flights over 305 metres +(1,000 feet) caused "only minor and transitory ecological effects" on +king penguins.] % A mighty creature is the germ, Though smaller than the pachyderm. @@ -7613,7 +7616,7 @@ A nickel ain't worth a dime anymore. % A "No" uttered from deepest conviction is better and greater than a "Yes" merely uttered to please, or what is worse, to avoid trouble. - -- Mahatma Ghandi + -- Mahatma Gandhi % A novice of the temple once approached the Chief Priest with a question. @@ -7684,12 +7687,12 @@ A person who has something looks at all % A person who is more than casually interested in computers should be well schooled in machine language, since it is a fundamental part of a computer. - -- Donald Knuth + -- Donald E. Knuth % A pessimist is a man who has been compelled to live with an optimist. -- Elbert Hubbard % -A physicist is an atoms way of knowing about atoms. +A physicist is an atom's way of knowing about atoms. -- George Wald % A pickup with three guys in it pulls into the lumber yard. One of the men @@ -7756,7 +7759,7 @@ paycheck?" % A political man can have as his aim the realization of freedom, but he has no means to realize it other than through violence. - -- Jean Paul Sartre + -- Jean-Paul Sartre % A possum must be himself, and being himself he is honest. -- Walt Kelly @@ -7764,7 +7767,7 @@ A possum must be himself, and being hims A pound of salt will not sweeten a single cup of tea. % A power so great, it can only be used for Good or Evil! - -- Firesign Theatre, "The Giant Rat of Summatra" + -- The Firesign Theatre, "The Giant Rat of Sumatra" % A "practical joker" deserves applause for his wit according to its quality. Bastinado is about right. For exceptional wit one might grant keelhauling. @@ -7777,7 +7780,7 @@ A prediction is worth twenty explanation A pretty foot is one of the greatest gifts of nature... please send me your last pair of shoes, already worn out in dancing... so I can have something of yours to press against my heart. - -- Goethe + -- Johann Wolfgang von Goethe % A pretty woman can do anything; an ugly woman must do everything. % @@ -7831,7 +7834,7 @@ when its programs require attention to t % A prohibitionist is the sort of man one wouldn't care to drink with -- even if he drank. - -- Mencken + -- H. L. Mencken % A prominent broadcaster, on a big-game safari in Africa, was taken to a watering hole where the life of the jungle could be observed. As he @@ -8019,7 +8022,7 @@ die and a new generation grows up that i % A sect or party is an elegant incognito devised to save a man from the vexation of thinking. - -- Ralph Waldo Emerson, Journals, 1831 + -- Ralph Waldo Emerson, "Journals" (1831) % A sense of desolation and uncertainty, of futility, of the baselessness of aspirations, of the vanity of endeavor, and a thirst for a life giving @@ -8197,7 +8200,7 @@ Lord of the Rings LITE(tm) Some guys take a long vacation to throw a ring into a volcano. Hamlet LITE(tm) - -- by Wm. Shakespeare + -- by William Shakespeare A college student on vacation with family problems, a screwy girl-friend and a mother who won't act her age. @@ -8210,7 +8213,7 @@ A Tale of Two Cities LITE(tm) lady who knits. Crime and Punishment LITE(tm) - -- by Fyodor Dostoevski + -- by Fyodor Dostoyevsky A man sends a nasty letter to a pawnbroker, but later *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 18:36:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B7C4B106564A; Wed, 31 Mar 2010 18:36:04 +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 A677C8FC12; Wed, 31 Mar 2010 18:36: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 o2VIa42J088700; Wed, 31 Mar 2010 18:36:04 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VIa4x3088698; Wed, 31 Mar 2010 18:36:04 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201003311836.o2VIa4x3088698@svn.freebsd.org> From: Xin LI Date: Wed, 31 Mar 2010 18:36: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: r205996 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Mar 2010 18:36:04 -0000 Author: delphij Date: Wed Mar 31 18:36:04 2010 New Revision: 205996 URL: http://svn.freebsd.org/changeset/base/205996 Log: Add prototypes for libc private interfaces. While I'm there, apply __unused whenever appropriate. Reviewed by: md5(1) Modified: head/lib/libc/gen/_spinlock_stub.c Modified: head/lib/libc/gen/_spinlock_stub.c ============================================================================== --- head/lib/libc/gen/_spinlock_stub.c Wed Mar 31 18:21:25 2010 (r205995) +++ head/lib/libc/gen/_spinlock_stub.c Wed Mar 31 18:36:04 2010 (r205996) @@ -34,6 +34,11 @@ __FBSDID("$FreeBSD$"); #include "spinlock.h" +long _atomic_lock_stub(volatile long *); +void _spinlock_stub(spinlock_t *); +void _spinunlock_stub(spinlock_t *); +void _spinlock_debug_stub(spinlock_t *, char *, int); + /* * Declare weak definitions in case the application is not linked * with libpthread. @@ -43,12 +48,11 @@ __weak_reference(_spinlock_stub, _spinlo __weak_reference(_spinunlock_stub, _spinunlock); __weak_reference(_spinlock_debug_stub, _spinlock_debug); - /* * This function is a stub for the _atomic_lock function in libpthread. */ long -_atomic_lock_stub(volatile long *lck) +_atomic_lock_stub(volatile long *lck __unused) { return (0L); } @@ -58,7 +62,7 @@ _atomic_lock_stub(volatile long *lck) * This function is a stub for the spinlock function in libpthread. */ void -_spinlock_stub(spinlock_t *lck) +_spinlock_stub(spinlock_t *lck __unused) { } @@ -66,7 +70,7 @@ _spinlock_stub(spinlock_t *lck) * This function is a stub for the spinunlock function in libpthread. */ void -_spinunlock_stub(spinlock_t *lck) +_spinunlock_stub(spinlock_t *lck __unused) { } @@ -74,6 +78,6 @@ _spinunlock_stub(spinlock_t *lck) * This function is a stub for the debug spinlock function in libpthread. */ void -_spinlock_debug_stub(spinlock_t *lck, char *fname, int lineno) +_spinlock_debug_stub(spinlock_t *lck __unused, char *fname __unused, int lineno __unused) { } From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 18:37:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 172321065675; Wed, 31 Mar 2010 18:37:01 +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 05F768FC27; Wed, 31 Mar 2010 18:37: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 o2VIb0do088938; Wed, 31 Mar 2010 18:37:00 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VIb0Iv088935; Wed, 31 Mar 2010 18:37:00 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201003311837.o2VIb0Iv088935@svn.freebsd.org> From: Xin LI Date: Wed, 31 Mar 2010 18:37: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: r205997 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Mar 2010 18:37:01 -0000 Author: delphij Date: Wed Mar 31 18:37:00 2010 New Revision: 205997 URL: http://svn.freebsd.org/changeset/base/205997 Log: Add prototype for libc internal interfaces. Modified: head/lib/libc/gen/__getosreldate.c head/lib/libc/gen/_thread_init.c Modified: head/lib/libc/gen/__getosreldate.c ============================================================================== --- head/lib/libc/gen/__getosreldate.c Wed Mar 31 18:36:04 2010 (r205996) +++ head/lib/libc/gen/__getosreldate.c Wed Mar 31 18:37:00 2010 (r205997) @@ -30,6 +30,8 @@ __FBSDID("$FreeBSD$"); #include #include +int __getosreldate(void); + /* * This is private to libc. It is intended for wrapping syscall stubs in order * to avoid having to put SIGSYS signal handlers in place to test for presence Modified: head/lib/libc/gen/_thread_init.c ============================================================================== --- head/lib/libc/gen/_thread_init.c Wed Mar 31 18:36:04 2010 (r205996) +++ head/lib/libc/gen/_thread_init.c Wed Mar 31 18:37:00 2010 (r205997) @@ -29,6 +29,8 @@ __FBSDID("$FreeBSD$"); #include +void _thread_init_stub(void); + __weak_reference(_thread_init_stub, _thread_init); __weak_reference(_thread_autoinit_dummy_decl_stub, _thread_autoinit_dummy_decl); From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 20:00:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E25B1065672; Wed, 31 Mar 2010 20:00:45 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3CD8D8FC13; Wed, 31 Mar 2010 20:00: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 o2VK0jdo007437; Wed, 31 Mar 2010 20:00:45 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VK0jGl007435; Wed, 31 Mar 2010 20:00:45 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201003312000.o2VK0jGl007435@svn.freebsd.org> From: Fabien Thomas Date: Wed, 31 Mar 2010 20:00: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: r205998 - head/sys/dev/hwpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 20:00:45 -0000 Author: fabient Date: Wed Mar 31 20:00:44 2010 New Revision: 205998 URL: http://svn.freebsd.org/changeset/base/205998 Log: If there is multiple PMCs for the same interrupt ignore new post. This will indirectly fix a bug where the thread will be pinned forever if the assert is not compiled. MFC after: 3days Modified: head/sys/dev/hwpmc/hwpmc_mod.c Modified: head/sys/dev/hwpmc/hwpmc_mod.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_mod.c Wed Mar 31 18:37:00 2010 (r205997) +++ head/sys/dev/hwpmc/hwpmc_mod.c Wed Mar 31 20:00:44 2010 (r205998) @@ -3972,9 +3972,11 @@ pmc_post_callchain_callback(void) td = curthread; - KASSERT((td->td_pflags & TDP_CALLCHAIN) == 0, - ("[pmc,%d] thread %p already marked for callchain capture", - __LINE__, (void *) td)); + /* + * If there is multiple PMCs for the same interrupt ignore new post + */ + if (td->td_pflags & TDP_CALLCHAIN) + return; /* * Mark this thread as needing callchain capture. From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 20:15:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A49AE1065672; Wed, 31 Mar 2010 20:15: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 938898FC0C; Wed, 31 Mar 2010 20:15: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 o2VKFKwm010657; Wed, 31 Mar 2010 20:15:20 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VKFK4T010655; Wed, 31 Mar 2010 20:15:20 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201003312015.o2VKFK4T010655@svn.freebsd.org> From: Alexander Motin Date: Wed, 31 Mar 2010 20:15: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: r205999 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 20:15:20 -0000 Author: mav Date: Wed Mar 31 20:15:20 2010 New Revision: 205999 URL: http://svn.freebsd.org/changeset/base/205999 Log: ng_gif depends on gif. Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Mar 31 20:00:44 2010 (r205998) +++ head/sys/conf/files Wed Mar 31 20:15:20 2010 (r205999) @@ -2322,7 +2322,7 @@ net/if_ethersubr.c optional ether \ net/if_faith.c optional faith net/if_fddisubr.c optional fddi net/if_fwsubr.c optional fwip -net/if_gif.c optional gif +net/if_gif.c optional gif | netgraph_gif net/if_gre.c optional gre inet net/if_iso88025subr.c optional token net/if_lagg.c optional lagg @@ -2485,7 +2485,7 @@ netinet/if_ether.c optional inet ether netinet/igmp.c optional inet netinet/in.c optional inet netinet/ip_carp.c optional inet carp | inet6 carp -netinet/in_gif.c optional gif inet +netinet/in_gif.c optional gif inet | netgraph_gif inet netinet/ip_gre.c optional gre inet netinet/ip_id.c optional inet netinet/in_mcast.c optional inet @@ -2560,7 +2560,7 @@ netinet6/frag6.c optional inet6 netinet6/icmp6.c optional inet6 netinet6/in6.c optional inet6 netinet6/in6_cksum.c optional inet6 -netinet6/in6_gif.c optional gif inet6 +netinet6/in6_gif.c optional gif inet6 | netgraph_gif inet6 netinet6/in6_ifattach.c optional inet6 netinet6/in6_mcast.c optional inet6 netinet6/in6_pcb.c optional inet6 From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 20:37:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B58C106564A; Wed, 31 Mar 2010 20:37: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 8A6768FC08; Wed, 31 Mar 2010 20:37: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 o2VKbihP015583; Wed, 31 Mar 2010 20:37:44 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VKbiPe015581; Wed, 31 Mar 2010 20:37:44 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201003312037.o2VKbiPe015581@svn.freebsd.org> From: Alexander Motin Date: Wed, 31 Mar 2010 20:37: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: r206000 - head/sys/netgraph X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 20:37:44 -0000 Author: mav Date: Wed Mar 31 20:37:44 2010 New Revision: 206000 URL: http://svn.freebsd.org/changeset/base/206000 Log: Make ng_ppp fulfill upper protocol stack layers alignment requirements on platforms with strict alignment constraints. This fixes kernel panics on arm and probably other architectures. PR: sparc64/80410 Modified: head/sys/netgraph/ng_ppp.c Modified: head/sys/netgraph/ng_ppp.c ============================================================================== --- head/sys/netgraph/ng_ppp.c Wed Mar 31 20:15:20 2010 (r205999) +++ head/sys/netgraph/ng_ppp.c Wed Mar 31 20:37:44 2010 (r206000) @@ -907,7 +907,21 @@ ng_ppp_proto_recv(node_p node, item_p it const priv_p priv = NG_NODE_PRIVATE(node); hook_p outHook = NULL; int error; +#ifdef ALIGNED_POINTER + struct mbuf *m, *n; + NGI_GET_M(item, m); + if (!ALIGNED_POINTER(mtod(m, caddr_t), uint32_t)) { + n = m_defrag(m, M_NOWAIT); + if (n == NULL) { + m_freem(m); + NG_FREE_ITEM(item); + return (ENOBUFS); + } + m = n; + } + NGI_M(item) = m; +#endif /* ALIGNED_POINTER */ switch (proto) { case PROT_IP: if (priv->conf.enableIP) From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 20:43:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F3211065672; Wed, 31 Mar 2010 20:43:25 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3D66F8FC18; Wed, 31 Mar 2010 20:43: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 o2VKhPKL016857; Wed, 31 Mar 2010 20:43:25 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VKhP9Y016850; Wed, 31 Mar 2010 20:43:25 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003312043.o2VKhP9Y016850@svn.freebsd.org> From: Marius Strobl Date: Wed, 31 Mar 2010 20:43:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206001 - head/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 20:43:25 -0000 Author: marius Date: Wed Mar 31 20:43:24 2010 New Revision: 206001 URL: http://svn.freebsd.org/changeset/base/206001 Log: Hook the identification LEDs of igb(4), lem(4) and em(4) devices up with led(4) so they can be lit or f.e. made blink via `echo f2 > /dev/led/em0` for localization purposes. Approved by: jfv MFC afer: 1 week (after r205869) Modified: head/sys/dev/e1000/if_em.c head/sys/dev/e1000/if_em.h head/sys/dev/e1000/if_igb.c head/sys/dev/e1000/if_igb.h head/sys/dev/e1000/if_lem.c head/sys/dev/e1000/if_lem.h Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Wed Mar 31 20:37:44 2010 (r206000) +++ head/sys/dev/e1000/if_em.c Wed Mar 31 20:43:24 2010 (r206001) @@ -77,6 +77,7 @@ #include #include +#include #include #include @@ -267,6 +268,7 @@ static void em_release_hw_control(st static void em_get_wakeup(device_t); static void em_enable_wakeup(device_t); static int em_enable_phy_wakeup(struct adapter *); +static void em_led_func(void *, int); static int em_irq_fast(void *); @@ -656,6 +658,9 @@ em_attach(device_t dev) /* Tell the stack that the interface is not active */ adapter->ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); + adapter->led_dev = led_create(em_led_func, adapter, + device_get_nameunit(dev)); + INIT_DEBUGOUT("em_attach: end"); return (0); @@ -769,6 +774,9 @@ em_resume(device_t dev) struct adapter *adapter = device_get_softc(dev); struct ifnet *ifp = adapter->ifp; + if (adapter->led_dev != NULL) + led_destroy(adapter->led_dev); + EM_CORE_LOCK(adapter); em_init_locked(adapter); em_init_manageability(adapter); @@ -2163,6 +2171,9 @@ em_stop(void *arg) e1000_reset_hw(&adapter->hw); E1000_WRITE_REG(&adapter->hw, E1000_WUC, 0); + + e1000_led_off(&adapter->hw); + e1000_cleanup_led(&adapter->hw); } @@ -4538,7 +4549,7 @@ em_get_wakeup(device_t dev) /* * Enable PCI Wake On Lan capability */ -void +static void em_enable_wakeup(device_t dev) { struct adapter *adapter = device_get_softc(dev); @@ -4690,6 +4701,22 @@ out: return ret; } +static void +em_led_func(void *arg, int onoff) +{ + struct adapter *adapter = arg; + + EM_CORE_LOCK(adapter); + if (onoff) { + e1000_setup_led(&adapter->hw); + e1000_led_on(&adapter->hw); + } else { + e1000_led_off(&adapter->hw); + e1000_cleanup_led(&adapter->hw); + } + EM_CORE_UNLOCK(adapter); +} + /********************************************************************** * * Update the board statistics counters. Modified: head/sys/dev/e1000/if_em.h ============================================================================== --- head/sys/dev/e1000/if_em.h Wed Mar 31 20:37:44 2010 (r206000) +++ head/sys/dev/e1000/if_em.h Wed Mar 31 20:43:24 2010 (r206001) @@ -337,6 +337,7 @@ struct adapter { /* FreeBSD operating-system-specific structures. */ struct e1000_osdep osdep; struct device *dev; + struct cdev *led_dev; struct resource *memory; struct resource *flash; Modified: head/sys/dev/e1000/if_igb.c ============================================================================== --- head/sys/dev/e1000/if_igb.c Wed Mar 31 20:37:44 2010 (r206000) +++ head/sys/dev/e1000/if_igb.c Wed Mar 31 20:43:24 2010 (r206001) @@ -83,6 +83,7 @@ #include #include +#include #include #include @@ -234,6 +235,7 @@ static void igb_release_manageability(st static void igb_get_hw_control(struct adapter *); static void igb_release_hw_control(struct adapter *); static void igb_enable_wakeup(device_t); +static void igb_led_func(void *, int); static int igb_irq_fast(void *); static void igb_add_rx_process_limit(struct adapter *, const char *, @@ -585,6 +587,9 @@ igb_attach(device_t dev) /* Tell the stack that the interface is not active */ adapter->ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); + adapter->led_dev = led_create(igb_led_func, adapter, + device_get_nameunit(dev)); + INIT_DEBUGOUT("igb_attach: end"); return (0); @@ -624,6 +629,9 @@ igb_detach(device_t dev) return (EBUSY); } + if (adapter->led_dev != NULL) + led_destroy(adapter->led_dev); + #ifdef DEVICE_POLLING if (ifp->if_capenable & IFCAP_POLLING) ether_poll_deregister(ifp); @@ -2002,6 +2010,9 @@ igb_stop(void *arg) e1000_reset_hw(&adapter->hw); E1000_WRITE_REG(&adapter->hw, E1000_WUC, 0); + + e1000_led_off(&adapter->hw); + e1000_cleanup_led(&adapter->hw); } @@ -4613,7 +4624,7 @@ igb_is_valid_ether_addr(uint8_t *addr) /* * Enable PCI Wake On Lan capability */ -void +static void igb_enable_wakeup(device_t dev) { u16 cap, status; @@ -4634,6 +4645,21 @@ igb_enable_wakeup(device_t dev) return; } +static void +igb_led_func(void *arg, int onoff) +{ + struct adapter *adapter = arg; + + IGB_CORE_LOCK(adapter); + if (onoff) { + e1000_setup_led(&adapter->hw); + e1000_led_on(&adapter->hw); + } else { + e1000_led_off(&adapter->hw); + e1000_cleanup_led(&adapter->hw); + } + IGB_CORE_UNLOCK(adapter); +} /********************************************************************** * Modified: head/sys/dev/e1000/if_igb.h ============================================================================== --- head/sys/dev/e1000/if_igb.h Wed Mar 31 20:37:44 2010 (r206000) +++ head/sys/dev/e1000/if_igb.h Wed Mar 31 20:43:24 2010 (r206001) @@ -361,6 +361,7 @@ struct adapter { struct e1000_osdep osdep; struct device *dev; + struct cdev *led_dev; struct resource *pci_mem; struct resource *msix_mem; Modified: head/sys/dev/e1000/if_lem.c ============================================================================== --- head/sys/dev/e1000/if_lem.c Wed Mar 31 20:37:44 2010 (r206000) +++ head/sys/dev/e1000/if_lem.c Wed Mar 31 20:43:24 2010 (r206001) @@ -79,6 +79,7 @@ #include #include +#include #include #include @@ -253,6 +254,7 @@ static void lem_release_hw_control(s static void lem_get_wakeup(device_t); static void lem_enable_wakeup(device_t); static int lem_enable_phy_wakeup(struct adapter *); +static void lem_led_func(void *, int); #ifdef EM_LEGACY_IRQ static void lem_intr(void *); @@ -667,6 +669,9 @@ lem_attach(device_t dev) /* Tell the stack that the interface is not active */ adapter->ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); + adapter->led_dev = led_create(lem_led_func, adapter, + device_get_nameunit(dev)); + INIT_DEBUGOUT("lem_attach: end"); return (0); @@ -722,6 +727,9 @@ lem_detach(device_t dev) ether_poll_deregister(ifp); #endif + if (adapter->led_dev != NULL) + led_destroy(adapter->led_dev); + EM_CORE_LOCK(adapter); EM_TX_LOCK(adapter); adapter->in_detach = 1; @@ -2252,6 +2260,9 @@ lem_stop(void *arg) e1000_reset_hw(&adapter->hw); if (adapter->hw.mac.type >= e1000_82544) E1000_WRITE_REG(&adapter->hw, E1000_WUC, 0); + + e1000_led_off(&adapter->hw); + e1000_cleanup_led(&adapter->hw); } @@ -4126,7 +4137,7 @@ lem_get_wakeup(device_t dev) /* * Enable PCI Wake On Lan capability */ -void +static void lem_enable_wakeup(device_t dev) { struct adapter *adapter = device_get_softc(dev); @@ -4268,6 +4279,21 @@ out: return ret; } +static void +lem_led_func(void *arg, int onoff) +{ + struct adapter *adapter = arg; + + EM_CORE_LOCK(adapter); + if (onoff) { + e1000_setup_led(&adapter->hw); + e1000_led_on(&adapter->hw); + } else { + e1000_led_off(&adapter->hw); + e1000_cleanup_led(&adapter->hw); + } + EM_CORE_UNLOCK(adapter); +} /********************************************************************* * 82544 Coexistence issue workaround. Modified: head/sys/dev/e1000/if_lem.h ============================================================================== --- head/sys/dev/e1000/if_lem.h Wed Mar 31 20:37:44 2010 (r206000) +++ head/sys/dev/e1000/if_lem.h Wed Mar 31 20:43:24 2010 (r206001) @@ -293,6 +293,7 @@ struct adapter { /* FreeBSD operating-system-specific structures. */ struct e1000_osdep osdep; struct device *dev; + struct cdev *led_dev; struct resource *memory; struct resource *flash; From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 20:55:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84D7A106564A; Wed, 31 Mar 2010 20:55:13 +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 726D98FC0C; Wed, 31 Mar 2010 20:55: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 o2VKtDPs019663; Wed, 31 Mar 2010 20:55:13 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VKtDOF019648; Wed, 31 Mar 2010 20:55:13 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201003312055.o2VKtDOF019648@svn.freebsd.org> From: Xin LI Date: Wed, 31 Mar 2010 20:55: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: r206002 - head/lib/libz X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Mar 2010 20:55:13 -0000 Author: delphij Date: Wed Mar 31 20:55:13 2010 New Revision: 206002 URL: http://svn.freebsd.org/changeset/base/206002 Log: Update to 1.2.4.1 (beta). Modified: head/lib/libz/ChangeLog head/lib/libz/README head/lib/libz/crc32.c head/lib/libz/deflate.c head/lib/libz/gzguts.h (contents, props changed) head/lib/libz/gzlib.c head/lib/libz/gzread.c head/lib/libz/inftrees.c head/lib/libz/minigzip.c head/lib/libz/zconf.h head/lib/libz/zlib.3 head/lib/libz/zlib.h head/lib/libz/zutil.c head/lib/libz/zutil.h Directory Properties: head/lib/libz/ (props changed) Modified: head/lib/libz/ChangeLog ============================================================================== --- head/lib/libz/ChangeLog Wed Mar 31 20:43:24 2010 (r206001) +++ head/lib/libz/ChangeLog Wed Mar 31 20:55:13 2010 (r206002) @@ -1,6 +1,30 @@ ChangeLog file for zlib +Changes in 1.2.4.1 (28 Mar 2010) +- Remove the use of [a-z] constructs for sed in configure [gentoo 310225] +- Remove $(SHAREDLIB) from LIBS in Makefile.in [Creech] +- Restore "for debugging" comment on sprintf() in gzlib.c +- Remove fdopen for MVS from gzguts.h +- Put new README-WIN32.txt in win32 [Rowe] +- Add check for shell to configure and invoke another shell if needed +- Fix big fat stinking bug in gzseek() on uncompressed files +- Remove vestigial F_OPEN64 define in zutil.h +- Set and check the value of _LARGEFILE_SOURCE and _LARGEFILE64_SOURCE +- Avoid errors on non-LFS systems when applications define LFS macros +- Set EXE to ".exe" in configure for MINGW [Kahle] +- Match crc32() in crc32.c exactly to the prototype in zlib.h [Sherrill] +- Add prefix for cross-compilation in win32/makefile.gcc [Bar-Lev] +- Add DLL install in win32/makefile.gcc [Bar-Lev] +- Allow Linux* or linux* from uname in configure [Bar-Lev] +- Allow ldconfig to be redefined in configure and Makefile.in [Bar-Lev] +- Add cross-compilation prefixes to configure [Bar-Lev] +- Match type exactly in gz_load() invocation in gzread.c +- Match type exactly of zcalloc() in zutil.c to zlib.h alloc_func +- Provide prototypes for *64 functions when building zlib without LFS +- Don't use -lc when linking shared library on MinGW +- Remove errno.h check in configure and vestigial errno code in zutil.h + Changes in 1.2.4 (14 Mar 2010) - Fix VER3 extraction in configure for no fourth subversion - Update zlib.3, add docs to Makefile.in to make .pdf out of it Modified: head/lib/libz/README ============================================================================== --- head/lib/libz/README Wed Mar 31 20:43:24 2010 (r206001) +++ head/lib/libz/README Wed Mar 31 20:55:13 2010 (r206002) @@ -1,6 +1,6 @@ ZLIB DATA COMPRESSION LIBRARY -zlib 1.2.4 is a general purpose data compression library. All the code is +zlib 1.2.4.1 is a general purpose data compression library. All the code is thread safe. The data format used by the zlib library is described by RFCs (Request for Comments) 1950 to 1952 in the files http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format) @@ -30,7 +30,7 @@ Mark Nelson wrote an ar issue of Dr. Dobb's Journal; a copy of the article is available at http://marknelson.us/1997/01/01/zlib-engine/ . -The changes made in version 1.2.4 are documented in the file ChangeLog. +The changes made in version 1.2.4.1 are documented in the file ChangeLog. Unsupported third party contributions are provided in directory contrib/ . Modified: head/lib/libz/crc32.c ============================================================================== --- head/lib/libz/crc32.c Wed Mar 31 20:43:24 2010 (r206001) +++ head/lib/libz/crc32.c Wed Mar 31 20:55:13 2010 (r206002) @@ -221,7 +221,7 @@ const unsigned long FAR * ZEXPORT get_cr unsigned long ZEXPORT crc32(crc, buf, len) unsigned long crc; const unsigned char FAR *buf; - unsigned len; + uInt len; { if (buf == Z_NULL) return 0UL; Modified: head/lib/libz/deflate.c ============================================================================== --- head/lib/libz/deflate.c Wed Mar 31 20:43:24 2010 (r206001) +++ head/lib/libz/deflate.c Wed Mar 31 20:55:13 2010 (r206002) @@ -52,7 +52,7 @@ #include "deflate.h" const char deflate_copyright[] = - " deflate 1.2.4 Copyright 1995-2010 Jean-loup Gailly and Mark Adler "; + " deflate 1.2.4.1 Copyright 1995-2010 Jean-loup Gailly and Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot Modified: head/lib/libz/gzguts.h ============================================================================== --- head/lib/libz/gzguts.h Wed Mar 31 20:43:24 2010 (r206001) +++ head/lib/libz/gzguts.h Wed Mar 31 20:55:13 2010 (r206002) @@ -3,9 +3,9 @@ * For conditions of distribution and use, see copyright notice in zlib.h */ -#ifdef _LARGEFILE64_SOURCE +#if _LARGEFILE64_SOURCE == 1 # ifndef _LARGEFILE_SOURCE -# define _LARGEFILE_SOURCE +# define _LARGEFILE_SOURCE 1 # endif # ifdef _FILE_OFFSET_BITS # undef _FILE_OFFSET_BITS @@ -44,7 +44,7 @@ #endif /* get errno and strerror definition */ -#if defined UNDER_CE && defined NO_ERRNO_H +#if defined UNDER_CE # include # define zstrerror() gz_strwinerror((DWORD)GetLastError()) #else @@ -56,13 +56,7 @@ # endif #endif -/* MVS fdopen() */ -#ifdef __MVS__ - #pragma map (fdopen , "\174\174FDOPEN") - FILE *fdopen(int, const char *); -#endif - -#ifdef _LARGEFILE64_SOURCE +#if _LARGEFILE64_SOURCE == 1 # define z_off64_t off64_t #else # define z_off64_t z_off_t @@ -117,7 +111,7 @@ typedef gz_state FAR *gz_statep; /* shared functions */ ZEXTERN void ZEXPORT gz_error OF((gz_statep, int, const char *)); -#if defined UNDER_CE && defined NO_ERRNO_H +#if defined UNDER_CE ZEXTERN char ZEXPORT *gz_strwinerror OF((DWORD error)); #endif Modified: head/lib/libz/gzlib.c ============================================================================== --- head/lib/libz/gzlib.c Wed Mar 31 20:43:24 2010 (r206001) +++ head/lib/libz/gzlib.c Wed Mar 31 20:55:13 2010 (r206002) @@ -3,9 +3,12 @@ * For conditions of distribution and use, see copyright notice in zlib.h */ +/* $FreeBSD$ */ + #include "gzguts.h" +#include "zutil.h" -#ifdef _LARGEFILE64_SOURCE +#if _LARGEFILE64_SOURCE == 1 && _LFS64_LARGEFILE == 1 # define LSEEK lseek64 #else # define LSEEK lseek @@ -15,7 +18,7 @@ local void gz_reset OF((gz_statep)); local gzFile gz_open OF((const char *, int, const char *)); -#if defined UNDER_CE && defined NO_ERRNO_H +#if defined UNDER_CE /* Map the Windows error number in ERROR to a locale-dependent error message string and return a pointer to it. Typically, the values for ERROR come @@ -65,7 +68,7 @@ char ZEXPORT *gz_strwinerror (error) return buf; } -#endif /* UNDER_CE && NO_ERRNO_H */ +#endif /* UNDER_CE */ /* Reset gzip file state */ local void gz_reset(state) @@ -217,7 +220,7 @@ gzFile ZEXPORT gzdopen(fd, mode) if (fd == -1 || (path = malloc(7 + 3 * sizeof(int))) == NULL) return NULL; - sprintf(path, "", fd); + sprintf(path, "", fd); /* for debugging */ gz = gz_open(path, fd, mode); free(path); return gz; @@ -305,7 +308,7 @@ z_off64_t ZEXPORT gzseek64(file, offset, /* if within raw area while reading, just go there */ if (state->mode == GZ_READ && state->how == COPY && state->pos + offset >= state->raw) { - ret = LSEEK(state->fd, offset, SEEK_CUR); + ret = LSEEK(state->fd, offset - state->have, SEEK_CUR); if (ret == -1) return -1; state->have = 0; Modified: head/lib/libz/gzread.c ============================================================================== --- head/lib/libz/gzread.c Wed Mar 31 20:43:24 2010 (r206001) +++ head/lib/libz/gzread.c Wed Mar 31 20:55:13 2010 (r206002) @@ -3,6 +3,8 @@ * For conditions of distribution and use, see copyright notice in zlib.h */ +/* $FreeBSD$ */ + #include "gzguts.h" #include @@ -56,7 +58,8 @@ local int gz_avail(state) if (state->err != Z_OK) return -1; if (state->eof == 0) { - if (gz_load(state, state->in, state->size, &(strm->avail_in)) == -1) + if (gz_load(state, state->in, state->size, + (unsigned *)&(strm->avail_in)) == -1) return -1; strm->next_in = state->in; } Modified: head/lib/libz/inftrees.c ============================================================================== --- head/lib/libz/inftrees.c Wed Mar 31 20:43:24 2010 (r206001) +++ head/lib/libz/inftrees.c Wed Mar 31 20:55:13 2010 (r206002) @@ -9,7 +9,7 @@ #define MAXBITS 15 const char inflate_copyright[] = - " inflate 1.2.4 Copyright 1995-2010 Mark Adler "; + " inflate 1.2.4.1 Copyright 1995-2010 Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot @@ -62,7 +62,7 @@ unsigned short FAR *work; 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; static const unsigned short lext[31] = { /* Length codes 257..285 extra */ 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, - 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 64, 195}; + 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 67, 206}; static const unsigned short dbase[32] = { /* Distance codes 0..29 base */ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, Modified: head/lib/libz/minigzip.c ============================================================================== --- head/lib/libz/minigzip.c Wed Mar 31 20:43:24 2010 (r206001) +++ head/lib/libz/minigzip.c Wed Mar 31 20:55:13 2010 (r206002) @@ -54,7 +54,7 @@ extern int unlink OF((const char *)); #endif -#if defined(UNDER_CE) && defined(NO_ERRNO_H) +#if defined(UNDER_CE) # include # define perror(s) pwinerror(s) @@ -116,7 +116,7 @@ static void pwinerror (s) fprintf(stderr, "%s\n", strwinerror(GetLastError ())); } -#endif /* UNDER_CE && NO_ERRNO_H */ +#endif /* UNDER_CE */ #ifndef GZ_SUFFIX # define GZ_SUFFIX ".gz" Modified: head/lib/libz/zconf.h ============================================================================== --- head/lib/libz/zconf.h Wed Mar 31 20:43:24 2010 (r206001) +++ head/lib/libz/zconf.h Wed Mar 31 20:55:13 2010 (r206002) @@ -364,7 +364,7 @@ typedef uLong FAR uLongf; # define Z_HAVE_UNISTD_H #endif -#ifdef Z_HAVE_UNISTD_H +#if defined(Z_HAVE_UNISTD_H) || _LARGEFILE64_SOURCE == 1 # include /* for off_t */ # include /* for SEEK_* and off_t */ # ifdef VMS @@ -375,10 +375,6 @@ typedef uLong FAR uLongf; # endif #endif -#ifdef _LARGEFILE64_SOURCE -# include -#endif - #ifndef SEEK_SET # define SEEK_SET 0 /* Seek from beginning of file. */ # define SEEK_CUR 1 /* Seek from current position. */ Modified: head/lib/libz/zlib.3 ============================================================================== --- head/lib/libz/zlib.3 Wed Mar 31 20:43:24 2010 (r206001) +++ head/lib/libz/zlib.3 Wed Mar 31 20:55:13 2010 (r206002) @@ -1,4 +1,4 @@ -.TH ZLIB 3 "14 March 2010" +.TH ZLIB 3 "28 Mar 2010" .SH NAME zlib \- compression/decompression library .SH SYNOPSIS @@ -125,7 +125,7 @@ before asking for help. Send questions and/or comments to zlib@gzip.org, or (for the Windows DLL version) to Gilles Vollant (info@winimage.com). .SH AUTHORS -Version 1.2.4 +Version 1.2.4.1 Copyright (C) 1995-2010 Jean-loup Gailly (jloup@gzip.org) and Mark Adler (madler@alumni.caltech.edu). .LP Modified: head/lib/libz/zlib.h ============================================================================== --- head/lib/libz/zlib.h Wed Mar 31 20:43:24 2010 (r206001) +++ head/lib/libz/zlib.h Wed Mar 31 20:55:13 2010 (r206002) @@ -1,5 +1,5 @@ /* zlib.h -- interface of the 'zlib' general purpose compression library - version 1.2.4, Mar 14th, 2010 + version 1.2.4.1, March 28th, 2010 Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler @@ -37,12 +37,12 @@ extern "C" { #endif -#define ZLIB_VERSION "1.2.4" -#define ZLIB_VERNUM 0x1240 +#define ZLIB_VERSION "1.2.4.1" +#define ZLIB_VERNUM 0x1241 #define ZLIB_VER_MAJOR 1 #define ZLIB_VER_MINOR 2 #define ZLIB_VER_REVISION 4 -#define ZLIB_VER_SUBREVISION 0 +#define ZLIB_VER_SUBREVISION 1 /* The 'zlib' compression library provides in-memory compression and @@ -1556,29 +1556,30 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF( inflateBackInit_((strm), (windowBits), (window), \ ZLIB_VERSION, sizeof(z_stream)) -#ifdef _LARGEFILE64_SOURCE +#if _LARGEFILE64_SOURCE == 1 && _LFS64_LARGEFILE == 1 ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); ZEXTERN off64_t ZEXPORT gzseek64 OF((gzFile, off64_t, int)); ZEXTERN off64_t ZEXPORT gztell64 OF((gzFile)); ZEXTERN off64_t ZEXPORT gzoffset64 OF((gzFile)); ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, off64_t)); ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, off64_t)); -#elif _FILE_OFFSET_BITS == 64 - ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); - ZEXTERN off_t ZEXPORT gzseek64 OF((gzFile, off_t, int)); - ZEXTERN off_t ZEXPORT gztell64 OF((gzFile)); - ZEXTERN off_t ZEXPORT gzoffset64 OF((gzFile)); - ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, off_t)); - ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, off_t)); #endif -#if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS == 64 +#if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS == 64 && _LFS64_LARGEFILE == 1 # define gzopen gzopen64 # define gzseek gzseek64 # define gztell gztell64 # define gzoffset gzoffset64 # define adler32_combine adler32_combine64 # define crc32_combine crc32_combine64 +# if _LARGEFILE64_SOURCE != 1 + ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); + ZEXTERN off_t ZEXPORT gzseek64 OF((gzFile, off_t, int)); + ZEXTERN off_t ZEXPORT gztell64 OF((gzFile)); + ZEXTERN off_t ZEXPORT gzoffset64 OF((gzFile)); + ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, off_t)); + ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, off_t)); +# endif #else ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *)); ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile, z_off_t, int)); Modified: head/lib/libz/zutil.c ============================================================================== --- head/lib/libz/zutil.c Wed Mar 31 20:43:24 2010 (r206001) +++ head/lib/libz/zutil.c Wed Mar 31 20:55:13 2010 (r206002) @@ -272,7 +272,7 @@ void zcfree (voidpf opaque, voidpf ptr) # define _hfree hfree #endif -voidpf zcalloc (voidpf opaque, unsigned items, unsigned size) +voidpf zcalloc (voidpf opaque, uInt items, uInt size) { if (opaque) opaque = 0; /* to make compiler happy */ return _halloc((long)items, size); Modified: head/lib/libz/zutil.h ============================================================================== --- head/lib/libz/zutil.h Wed Mar 31 20:43:24 2010 (r206001) +++ head/lib/libz/zutil.h Wed Mar 31 20:55:13 2010 (r206002) @@ -24,19 +24,6 @@ # include #endif -#if defined(UNDER_CE) && defined(NO_ERRNO_H) -# define zseterrno(ERR) SetLastError((DWORD)(ERR)) -# define zerrno() ((int)GetLastError()) -#else -# ifdef NO_ERRNO_H - extern int errno; -# else -# include -# endif -# define zseterrno(ERR) do { errno = (ERR); } while (0) -# define zerrno() errno -#endif - #ifndef local # define local static #endif @@ -167,12 +154,22 @@ extern const char * const z_errmsg[10]; #pragma warn -8066 #endif -#ifdef _LARGEFILE64_SOURCE +#if _LARGEFILE64_SOURCE == 1 && _LFS64_LARGEFILE == 1 # define z_off64_t off64_t #else # define z_off64_t z_off_t #endif +/* provide prototypes for these when building zlib without LFS */ +#if _LARGEFILE64_SOURCE != 1 || _LFS64_LARGEFILE != 1 + ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); + ZEXTERN off_t ZEXPORT gzseek64 OF((gzFile, off_t, int)); + ZEXTERN off_t ZEXPORT gztell64 OF((gzFile)); + ZEXTERN off_t ZEXPORT gzoffset64 OF((gzFile)); + ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, off_t)); + ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, off_t)); +#endif + /* common defaults */ #ifndef OS_CODE @@ -183,12 +180,6 @@ extern const char * const z_errmsg[10]; # define F_OPEN(name, mode) fopen((name), (mode)) #endif -#ifdef _LARGEFILE64_SOURCE -# define F_OPEN64(name, mode) fopen64((name), (mode)) -#else -# define F_OPEN64(name, mode) fopen((name), (mode)) -#endif - /* functions */ #if defined(STDC99) || (defined(__TURBOC__) && __TURBOC__ >= 0x550) From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 21:32:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 08822106566B; Wed, 31 Mar 2010 21:32:53 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E8E728FC08; Wed, 31 Mar 2010 21:32: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 o2VLWqs5028057; Wed, 31 Mar 2010 21:32:52 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VLWq5B028023; Wed, 31 Mar 2010 21:32:52 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003312132.o2VLWq5B028023@svn.freebsd.org> From: Marius Strobl Date: Wed, 31 Mar 2010 21:32:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206004 - in stable/7/sys: boot/sparc64/loader sparc64/include sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Mar 2010 21:32:53 -0000 Author: marius Date: Wed Mar 31 21:32:52 2010 New Revision: 206004 URL: http://svn.freebsd.org/changeset/base/206004 Log: MFC: r204152, r204164 Some machines can not only consist of CPUs running at different speeds but also of different types, f.e. Sun Fire V890 can be equipped with a mix of UltraSPARC IV and IV+ CPUs, requiring different MMU initialization and different workarounds for model specific errata. Therefore move the CPU implementation number from a global variable to the per-CPU data. Functions which are called before the latter is available are passed the implementation number as a parameter now. Modified: stable/7/sys/boot/sparc64/loader/main.c stable/7/sys/sparc64/include/cache.h stable/7/sys/sparc64/include/cpu.h stable/7/sys/sparc64/include/md_var.h stable/7/sys/sparc64/include/pcpu.h stable/7/sys/sparc64/include/pmap.h stable/7/sys/sparc64/include/smp.h stable/7/sys/sparc64/include/tick.h stable/7/sys/sparc64/include/ver.h stable/7/sys/sparc64/sparc64/cache.c stable/7/sys/sparc64/sparc64/cheetah.c stable/7/sys/sparc64/sparc64/identcpu.c stable/7/sys/sparc64/sparc64/iommu.c stable/7/sys/sparc64/sparc64/machdep.c stable/7/sys/sparc64/sparc64/mp_locore.S stable/7/sys/sparc64/sparc64/mp_machdep.c stable/7/sys/sparc64/sparc64/nexus.c stable/7/sys/sparc64/sparc64/pmap.c stable/7/sys/sparc64/sparc64/spitfire.c stable/7/sys/sparc64/sparc64/tick.c stable/7/sys/sparc64/sparc64/trap.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/boot/sparc64/loader/main.c ============================================================================== --- stable/7/sys/boot/sparc64/loader/main.c Wed Mar 31 21:12:27 2010 (r206003) +++ stable/7/sys/boot/sparc64/loader/main.c Wed Mar 31 21:32:52 2010 (r206004) @@ -137,7 +137,7 @@ struct tlb_entry *dtlb_store; struct tlb_entry *itlb_store; u_int dtlb_slot; u_int itlb_slot; -int cpu_impl; +static int cpu_impl; static u_int dtlb_slot_max; static u_int itlb_slot_max; Modified: stable/7/sys/sparc64/include/cache.h ============================================================================== --- stable/7/sys/sparc64/include/cache.h Wed Mar 31 21:12:27 2010 (r206003) +++ stable/7/sys/sparc64/include/cache.h Wed Mar 31 21:32:52 2010 (r206004) @@ -91,7 +91,7 @@ struct cacheinfo { struct pcpu; -typedef void cache_enable_t(void); +typedef void cache_enable_t(u_int cpu_impl); typedef void cache_flush_t(void); typedef void dcache_page_inval_t(vm_paddr_t pa); typedef void icache_page_inval_t(vm_paddr_t pa); Modified: stable/7/sys/sparc64/include/cpu.h ============================================================================== --- stable/7/sys/sparc64/include/cpu.h Wed Mar 31 21:12:27 2010 (r206003) +++ stable/7/sys/sparc64/include/cpu.h Wed Mar 31 21:32:52 2010 (r206004) @@ -52,7 +52,7 @@ extern char btext[]; extern char etext[]; -void cheetah_init(void); +void cheetah_init(u_int cpu_impl); void cpu_halt(void); void cpu_reset(void); void fork_trampoline(void); Modified: stable/7/sys/sparc64/include/md_var.h ============================================================================== --- stable/7/sys/sparc64/include/md_var.h Wed Mar 31 21:12:27 2010 (r206003) +++ stable/7/sys/sparc64/include/md_var.h Wed Mar 31 21:32:52 2010 (r206004) @@ -47,8 +47,8 @@ extern vm_paddr_t kstack0_phys; struct pcpu; struct md_utrap; -char *cpu_cpuid_prop(void); -uint32_t cpu_get_mid(void); +char *cpu_cpuid_prop(u_int cpu_impl); +uint32_t cpu_get_mid(u_int cpu_impl); void cpu_identify(u_long vers, u_int clock, u_int id); void cpu_setregs(struct pcpu *pc); int is_physical_memory(vm_paddr_t addr); Modified: stable/7/sys/sparc64/include/pcpu.h ============================================================================== --- stable/7/sys/sparc64/include/pcpu.h Wed Mar 31 21:12:27 2010 (r206003) +++ stable/7/sys/sparc64/include/pcpu.h Wed Mar 31 21:32:52 2010 (r206004) @@ -54,6 +54,7 @@ struct pmap; u_long pc_tickref; \ u_long pc_tickadj; \ u_int pc_clock; \ + u_int pc_impl; \ u_int pc_mid; \ u_int pc_node; \ u_int pc_tlb_ctx; \ Modified: stable/7/sys/sparc64/include/pmap.h ============================================================================== --- stable/7/sys/sparc64/include/pmap.h Wed Mar 31 21:12:27 2010 (r206003) +++ stable/7/sys/sparc64/include/pmap.h Wed Mar 31 21:32:52 2010 (r206004) @@ -80,7 +80,7 @@ struct pmap { #define pmap_page_get_memattr(m) VM_MEMATTR_DEFAULT #define pmap_page_set_memattr(m, ma) (void)0 -void pmap_bootstrap(void); +void pmap_bootstrap(u_int cpu_impl); vm_paddr_t pmap_kextract(vm_offset_t va); void pmap_kenter(vm_offset_t va, vm_page_t m); void pmap_kremove(vm_offset_t); Modified: stable/7/sys/sparc64/include/smp.h ============================================================================== --- stable/7/sys/sparc64/include/smp.h Wed Mar 31 21:12:27 2010 (r206003) +++ stable/7/sys/sparc64/include/smp.h Wed Mar 31 21:32:52 2010 (r206004) @@ -93,7 +93,7 @@ void cpu_mp_shutdown(void); typedef void cpu_ipi_selected_t(u_int, u_long, u_long, u_long); extern cpu_ipi_selected_t *cpu_ipi_selected; -void mp_init(void); +void mp_init(u_int cpu_impl); extern struct mtx ipi_mtx; extern struct ipi_cache_args ipi_cache_args; Modified: stable/7/sys/sparc64/include/tick.h ============================================================================== --- stable/7/sys/sparc64/include/tick.h Wed Mar 31 21:12:27 2010 (r206003) +++ stable/7/sys/sparc64/include/tick.h Wed Mar 31 21:32:52 2010 (r206004) @@ -31,8 +31,8 @@ extern u_int hardclock_use_stick; -void tick_clear(void); +void tick_clear(u_int cpu_impl); void tick_start(void); -void tick_stop(void); +void tick_stop(u_int cpu_impl); #endif Modified: stable/7/sys/sparc64/include/ver.h ============================================================================== --- stable/7/sys/sparc64/include/ver.h Wed Mar 31 21:12:27 2010 (r206003) +++ stable/7/sys/sparc64/include/ver.h Wed Mar 31 21:32:52 2010 (r206004) @@ -43,24 +43,28 @@ #ifndef LOCORE -#define VER_MANUF_MASK (((1L<> VER_MANUF_SHIFT) -#define VER_IMPL(ver) \ +#define VER_IMPL(ver) \ (((ver) & VER_IMPL_MASK) >> VER_IMPL_SHIFT) -#define VER_MASK(ver) \ +#define VER_MASK(ver) \ (((ver) & VER_MASK_MASK) >> VER_MASK_SHIFT) -#define VER_MAXTL(ver) \ +#define VER_MAXTL(ver) \ (((ver) & VER_MAXTL_MASK) >> VER_MAXTL_SHIFT) -#define VER_MAXWIN(ver) \ +#define VER_MAXWIN(ver) \ (((ver) & VER_MAXWIN_MASK) >> VER_MAXWIN_SHIFT) -extern int cpu_impl; extern char sparc64_model[]; #endif /* !LOCORE */ Modified: stable/7/sys/sparc64/sparc64/cache.c ============================================================================== --- stable/7/sys/sparc64/sparc64/cache.c Wed Mar 31 21:12:27 2010 (r206003) +++ stable/7/sys/sparc64/sparc64/cache.c Wed Mar 31 21:32:52 2010 (r206004) @@ -130,7 +130,7 @@ cache_init(struct pcpu *pcpu) if ((set & ~(1UL << (ffs(set) - 1))) != 0) panic("cache_init: E$ set size not a power of 2"); - if (cpu_impl >= CPU_IMPL_ULTRASPARCIII) { + if (pcpu->pc_impl >= CPU_IMPL_ULTRASPARCIII) { cache_enable = cheetah_cache_enable; cache_flush = cheetah_cache_flush; dcache_page_inval = cheetah_dcache_page_inval; Modified: stable/7/sys/sparc64/sparc64/cheetah.c ============================================================================== --- stable/7/sys/sparc64/sparc64/cheetah.c Wed Mar 31 21:12:27 2010 (r206003) +++ stable/7/sys/sparc64/sparc64/cheetah.c Wed Mar 31 21:32:52 2010 (r206004) @@ -58,7 +58,7 @@ __FBSDID("$FreeBSD$"); * CPU-specific initialization */ void -cheetah_init(void) +cheetah_init(u_int cpu_impl) { register_t s; @@ -119,7 +119,7 @@ cheetah_init(void) * Enable level 1 caches. */ void -cheetah_cache_enable(void) +cheetah_cache_enable(u_int cpu_impl) { u_long lsu; Modified: stable/7/sys/sparc64/sparc64/identcpu.c ============================================================================== --- stable/7/sys/sparc64/sparc64/identcpu.c Wed Mar 31 21:12:27 2010 (r206003) +++ stable/7/sys/sparc64/sparc64/identcpu.c Wed Mar 31 21:32:52 2010 (r206004) @@ -15,7 +15,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include @@ -27,8 +26,6 @@ static char cpu_model[128]; SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD, cpu_model, 0, "Machine model"); -int cpu_impl; - void cpu_identify(u_long vers, u_int freq, u_int id) { Modified: stable/7/sys/sparc64/sparc64/iommu.c ============================================================================== --- stable/7/sys/sparc64/sparc64/iommu.c Wed Mar 31 21:12:27 2010 (r206003) +++ stable/7/sys/sparc64/sparc64/iommu.c Wed Mar 31 21:32:52 2010 (r206004) @@ -130,6 +130,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -377,7 +378,7 @@ iommu_init(const char *name, struct iomm printf("%s: PROM IOTSB size: %d (%d entries)\n", name, obptsbsize, obptsbentries); if ((is->is_flags & IOMMU_PRESERVE_PROM) != 0 && - !(cpu_impl == CPU_IMPL_ULTRASPARCIIi && obptsbsize == 7)) { + !(PCPU_GET(impl) == CPU_IMPL_ULTRASPARCIIi && obptsbsize == 7)) { if (obptsbentries > tsbentries) panic("%s: PROM IOTSB entries exceed kernel", __func__); Modified: stable/7/sys/sparc64/sparc64/machdep.c ============================================================================== --- stable/7/sys/sparc64/sparc64/machdep.c Wed Mar 31 21:12:27 2010 (r206003) +++ stable/7/sys/sparc64/sparc64/machdep.c Wed Mar 31 21:32:52 2010 (r206004) @@ -145,7 +145,7 @@ static int cpu_use_vis = 1; cpu_block_copy_t *cpu_block_copy; cpu_block_zero_t *cpu_block_zero; -static phandle_t find_bsp(phandle_t node, uint32_t bspid); +static phandle_t find_bsp(phandle_t node, uint32_t bspid, u_int cpu_impl); void sparc64_init(caddr_t mdp, u_long o1, u_long o2, u_long o3, ofw_vec_t *vec); static void sparc64_shutdown_final(void *dummy, int howto); @@ -240,7 +240,7 @@ spinlock_exit(void) } static phandle_t -find_bsp(phandle_t node, uint32_t bspid) +find_bsp(phandle_t node, uint32_t bspid, u_int cpu_impl) { char type[sizeof("cpu")]; phandle_t child; @@ -249,7 +249,7 @@ find_bsp(phandle_t node, uint32_t bspid) for (; node != 0; node = OF_peer(node)) { child = OF_child(node); if (child > 0) { - child = find_bsp(child, bspid); + child = find_bsp(child, bspid, cpu_impl); if (child > 0) return (child); } else { @@ -258,7 +258,7 @@ find_bsp(phandle_t node, uint32_t bspid) continue; if (strcmp(type, "cpu") != 0) continue; - if (OF_getprop(node, cpu_cpuid_prop(), &cpuid, + if (OF_getprop(node, cpu_cpuid_prop(cpu_impl), &cpuid, sizeof(cpuid)) <= 0) continue; if (cpuid == bspid) @@ -269,7 +269,7 @@ find_bsp(phandle_t node, uint32_t bspid) } char * -cpu_cpuid_prop(void) +cpu_cpuid_prop(u_int cpu_impl) { switch (cpu_impl) { @@ -293,7 +293,7 @@ cpu_cpuid_prop(void) } uint32_t -cpu_get_mid(void) +cpu_get_mid(u_int cpu_impl) { switch (cpu_impl) { @@ -327,6 +327,7 @@ sparc64_init(caddr_t mdp, u_long o1, u_l vm_offset_t va; caddr_t kmdp; phandle_t root; + u_int cpu_impl; end = 0; kmdp = NULL; @@ -341,12 +342,12 @@ sparc64_init(caddr_t mdp, u_long o1, u_l * Do CPU-specific Initialization. */ if (cpu_impl >= CPU_IMPL_ULTRASPARCIII) - cheetah_init(); + cheetah_init(cpu_impl); /* * Clear (S)TICK timer (including NPT). */ - tick_clear(); + tick_clear(cpu_impl); /* * UltraSparc II[e,i] based systems come up with the tick interrupt @@ -356,7 +357,7 @@ sparc64_init(caddr_t mdp, u_long o1, u_l * enabled, causing an interrupt storm on startup since they are not * handled. */ - tick_stop(); + tick_stop(cpu_impl); /* * Initialize Open Firmware (needed for console). @@ -391,7 +392,8 @@ sparc64_init(caddr_t mdp, u_long o1, u_l pc = (struct pcpu *)(pcpu0 + (PCPU_PAGES * PAGE_SIZE)) - 1; pcpu_init(pc, 0, sizeof(struct pcpu)); pc->pc_addr = (vm_offset_t)pcpu0; - pc->pc_mid = cpu_get_mid(); + pc->pc_impl = cpu_impl; + pc->pc_mid = cpu_get_mid(cpu_impl); pc->pc_tlb_ctx = TLB_CTX_USER_MIN; pc->pc_tlb_ctx_min = TLB_CTX_USER_MIN; pc->pc_tlb_ctx_max = TLB_CTX_USER_MAX; @@ -401,7 +403,7 @@ sparc64_init(caddr_t mdp, u_long o1, u_l * BSP is in the device tree in the first place). */ root = OF_peer(0); - pc->pc_node = find_bsp(root, pc->pc_mid); + pc->pc_node = find_bsp(root, pc->pc_mid, cpu_impl); if (pc->pc_node == 0) OF_exit(); if (OF_getprop(pc->pc_node, "clock-frequency", &pc->pc_clock, @@ -467,7 +469,7 @@ sparc64_init(caddr_t mdp, u_long o1, u_l panic("sparc64_init: cannot determine number of iTLB slots"); cache_init(pc); - cache_enable(); + cache_enable(cpu_impl); uma_set_align(pc->pc_cache.dc_linesize - 1); cpu_block_copy = bcopy; @@ -493,13 +495,13 @@ sparc64_init(caddr_t mdp, u_long o1, u_l } #ifdef SMP - mp_init(); + mp_init(cpu_impl); #endif /* * Initialize virtual memory and calculate physmem. */ - pmap_bootstrap(); + pmap_bootstrap(cpu_impl); /* * Initialize tunables. Modified: stable/7/sys/sparc64/sparc64/mp_locore.S ============================================================================== --- stable/7/sys/sparc64/sparc64/mp_locore.S Wed Mar 31 21:12:27 2010 (r206003) +++ stable/7/sys/sparc64/sparc64/mp_locore.S Wed Mar 31 21:32:52 2010 (r206004) @@ -202,17 +202,17 @@ ENTRY(mp_startup) cmp %l1, CPU_IMPL_ULTRASPARCIII bl %icc, 3f nop - mov CPU_STICKSYNC, %l1 + mov CPU_STICKSYNC, %l2 membar #StoreLoad - stw %l1, [%l0 + CSA_STATE] + stw %l2, [%l0 + CSA_STATE] -2: ldx [%l0 + CSA_STICK], %l1 - brz %l1, 2b +2: ldx [%l0 + CSA_STICK], %l2 + brz %l2, 2b nop - wr %l1, 0, %asr24 + wr %l2, 0, %asr24 3: call cpu_get_mid - nop + mov %l1, %o0 /* * Inform the boot processor we have inited. Modified: stable/7/sys/sparc64/sparc64/mp_machdep.c ============================================================================== --- stable/7/sys/sparc64/sparc64/mp_machdep.c Wed Mar 31 21:12:27 2010 (r206003) +++ stable/7/sys/sparc64/sparc64/mp_machdep.c Wed Mar 31 21:32:52 2010 (r206004) @@ -119,11 +119,11 @@ static u_int cpuid_to_mid[MAXCPU]; static int isjbus; static volatile u_int shutdown_cpus; -static void ap_count(phandle_t node, u_int mid); -static void ap_start(phandle_t node, u_int mid); +static void ap_count(phandle_t node, u_int mid, u_int cpu_impl); +static void ap_start(phandle_t node, u_int mid, u_int cpu_impl); static void cpu_mp_unleash(void *v); static void foreach_ap(phandle_t node, void (*func)(phandle_t node, - u_int mid)); + u_int mid, u_int cpu_impl)); static void spitfire_ipi_send(u_int mid, u_long d0, u_long d1, u_long d2); static void sun4u_startcpu(phandle_t cpu, void *func, u_long arg); @@ -137,7 +137,7 @@ CTASSERT(MAXCPU <= sizeof(u_int) * NBBY) CTASSERT(MAXCPU <= sizeof(int) * NBBY); void -mp_init(void) +mp_init(u_int cpu_impl) { struct tte *tp; int i; @@ -171,11 +171,13 @@ mp_init(void) } static void -foreach_ap(phandle_t node, void (*func)(phandle_t node, u_int mid)) +foreach_ap(phandle_t node, void (*func)(phandle_t node, u_int mid, + u_int cpu_impl)) { char type[sizeof("cpu")]; phandle_t child; u_int cpuid; + uint32_t cpu_impl; /* There's no need to traverse the whole OFW tree twice. */ if (mp_maxid > 0 && mp_ncpus >= mp_maxid + 1) @@ -191,12 +193,17 @@ foreach_ap(phandle_t node, void (*func)( continue; if (strcmp(type, "cpu") != 0) continue; - if (OF_getprop(node, cpu_cpuid_prop(), &cpuid, - sizeof(cpuid)) <= 0) - panic("%s: can't get module ID", __func__); + if (OF_getprop(node, "implementation#", &cpu_impl, + sizeof(cpu_impl)) <= 0) + panic("%s: couldn't determine CPU " + "implementation", __func__); + if (OF_getprop(node, cpu_cpuid_prop(cpu_impl), &cpuid, + sizeof(cpuid)) <= 0) + panic("%s: couldn't determine CPU module ID", + __func__); if (cpuid == PCPU_GET(mid)) continue; - (*func)(node, cpuid); + (*func)(node, cpuid, cpu_impl); } } } @@ -216,7 +223,7 @@ cpu_mp_setmaxid() } static void -ap_count(phandle_t node __unused, u_int mid __unused) +ap_count(phandle_t node __unused, u_int mid __unused, u_int cpu_impl __unused) { mp_maxid++; @@ -276,20 +283,20 @@ cpu_mp_start(void) } static void -ap_start(phandle_t node, u_int mid) +ap_start(phandle_t node, u_int mid, u_int cpu_impl) { volatile struct cpu_start_args *csa; struct pcpu *pc; register_t s; vm_offset_t va; - u_int clock; u_int cpuid; + uint32_t clock; if (mp_ncpus > MAXCPU) return; if (OF_getprop(node, "clock-frequency", &clock, sizeof(clock)) <= 0) - panic("%s: can't get clock", __func__); + panic("%s: couldn't determine CPU frequency", __func__); if (clock != PCPU_GET(clock)) hardclock_use_stick = 1; @@ -321,6 +328,7 @@ ap_start(phandle_t node, u_int mid) pcpu_init(pc, cpuid, sizeof(*pc)); pc->pc_addr = va; pc->pc_clock = clock; + pc->pc_impl = cpu_impl; pc->pc_mid = mid; pc->pc_node = node; @@ -393,9 +401,9 @@ cpu_mp_bootstrap(struct pcpu *pc) volatile struct cpu_start_args *csa; csa = &cpu_start_args; - if (cpu_impl >= CPU_IMPL_ULTRASPARCIII) - cheetah_init(); - cache_enable(); + if (pc->pc_impl >= CPU_IMPL_ULTRASPARCIII) + cheetah_init(pc->pc_impl); + cache_enable(pc->pc_impl); pmap_map_tsb(); /* * Flush all non-locked TLB entries possibly left over by the Modified: stable/7/sys/sparc64/sparc64/nexus.c ============================================================================== --- stable/7/sys/sparc64/sparc64/nexus.c Wed Mar 31 21:12:27 2010 (r206003) +++ stable/7/sys/sparc64/sparc64/nexus.c Wed Mar 31 21:32:52 2010 (r206004) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -521,7 +522,7 @@ nexus_setup_dinfo(device_t dev, phandle_ nintr = OF_getprop_alloc(node, "interrupts", sizeof(*intr), (void **)&intr); if (nintr > 0) { - if (OF_getprop(node, cpu_impl < CPU_IMPL_ULTRASPARCIII ? + if (OF_getprop(node, PCPU_GET(impl) < CPU_IMPL_ULTRASPARCIII ? "upa-portid" : "portid", &ign, sizeof(ign)) <= 0) { device_printf(dev, "<%s>: could not determine portid\n", ndi->ndi_obdinfo.obd_name); Modified: stable/7/sys/sparc64/sparc64/pmap.c ============================================================================== --- stable/7/sys/sparc64/sparc64/pmap.c Wed Mar 31 21:12:27 2010 (r206003) +++ stable/7/sys/sparc64/sparc64/pmap.c Wed Mar 31 21:32:52 2010 (r206004) @@ -278,7 +278,7 @@ om_cmp(const void *a, const void *b) * Bootstrap the system enough to run with virtual memory. */ void -pmap_bootstrap(void) +pmap_bootstrap(u_int cpu_impl) { struct pmap *pm; struct tte *tp; @@ -1538,7 +1538,7 @@ pmap_copy_tte(pmap_t src_pmap, pmap_t ds void pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_t dst_addr, - vm_size_t len, vm_offset_t src_addr) + vm_size_t len, vm_offset_t src_addr) { struct tte *tp; vm_offset_t va; Modified: stable/7/sys/sparc64/sparc64/spitfire.c ============================================================================== --- stable/7/sys/sparc64/sparc64/spitfire.c Wed Mar 31 21:12:27 2010 (r206003) +++ stable/7/sys/sparc64/sparc64/spitfire.c Wed Mar 31 21:32:52 2010 (r206004) @@ -56,7 +56,7 @@ PMAP_STATS_VAR(spitfire_icache_npage_inv * Enable the level 1 caches. */ void -spitfire_cache_enable(void) +spitfire_cache_enable(u_int cpu_impl __unused) { u_long lsu; Modified: stable/7/sys/sparc64/sparc64/tick.c ============================================================================== --- stable/7/sys/sparc64/sparc64/tick.c Wed Mar 31 21:12:27 2010 (r206003) +++ stable/7/sys/sparc64/sparc64/tick.c Wed Mar 31 21:32:52 2010 (r206004) @@ -120,7 +120,7 @@ cpu_initclocks(void) */ } else { clock = PCPU_GET(clock); - intr_setup(PIL_TICK, cpu_impl < CPU_IMPL_ULTRASPARCIII ? + intr_setup(PIL_TICK, PCPU_GET(impl) < CPU_IMPL_ULTRASPARCIII ? tick_hardclock_bbwar : tick_hardclock, -1, NULL, NULL); set_cputicker(tick_cputicks, clock, 0); } @@ -322,7 +322,7 @@ tick_start(void) } void -tick_clear(void) +tick_clear(u_int cpu_impl) { if (cpu_impl >= CPU_IMPL_ULTRASPARCIII) @@ -331,7 +331,7 @@ tick_clear(void) } void -tick_stop(void) +tick_stop(u_int cpu_impl) { if (cpu_impl >= CPU_IMPL_ULTRASPARCIII) Modified: stable/7/sys/sparc64/sparc64/trap.c ============================================================================== --- stable/7/sys/sparc64/sparc64/trap.c Wed Mar 31 21:12:27 2010 (r206003) +++ stable/7/sys/sparc64/sparc64/trap.c Wed Mar 31 21:32:52 2010 (r206004) @@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -380,7 +381,7 @@ trap(struct trapframe *tf) if (tf->tf_tpc > (u_long)fas_nofault_begin && tf->tf_tpc < (u_long)fas_nofault_end) { cache_flush(); - cache_enable(); + cache_enable(PCPU_GET(impl)); tf->tf_tpc = (u_long)fas_fault; tf->tf_tnpc = tf->tf_tpc + 4; error = 0; From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 21:32:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 47252106566C; Wed, 31 Mar 2010 21:32:53 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 336068FC15; Wed, 31 Mar 2010 21:32:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2VLWrHl028079; Wed, 31 Mar 2010 21:32:53 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VLWqJZ028051; Wed, 31 Mar 2010 21:32:52 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003312132.o2VLWqJZ028051@svn.freebsd.org> From: Marius Strobl Date: Wed, 31 Mar 2010 21:32:52 +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: r206005 - in stable/8/sys: boot/sparc64/loader sparc64/include sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Mar 2010 21:32:53 -0000 Author: marius Date: Wed Mar 31 21:32:52 2010 New Revision: 206005 URL: http://svn.freebsd.org/changeset/base/206005 Log: MFC: r204152, r204164 Some machines can not only consist of CPUs running at different speeds but also of different types, f.e. Sun Fire V890 can be equipped with a mix of UltraSPARC IV and IV+ CPUs, requiring different MMU initialization and different workarounds for model specific errata. Therefore move the CPU implementation number from a global variable to the per-CPU data. Functions which are called before the latter is available are passed the implementation number as a parameter now. Modified: stable/8/sys/boot/sparc64/loader/main.c stable/8/sys/sparc64/include/cache.h stable/8/sys/sparc64/include/cpu.h stable/8/sys/sparc64/include/md_var.h stable/8/sys/sparc64/include/pcpu.h stable/8/sys/sparc64/include/pmap.h stable/8/sys/sparc64/include/smp.h stable/8/sys/sparc64/include/tick.h stable/8/sys/sparc64/include/ver.h stable/8/sys/sparc64/sparc64/cache.c stable/8/sys/sparc64/sparc64/cheetah.c stable/8/sys/sparc64/sparc64/identcpu.c stable/8/sys/sparc64/sparc64/iommu.c stable/8/sys/sparc64/sparc64/machdep.c stable/8/sys/sparc64/sparc64/mp_locore.S stable/8/sys/sparc64/sparc64/mp_machdep.c stable/8/sys/sparc64/sparc64/nexus.c stable/8/sys/sparc64/sparc64/pmap.c stable/8/sys/sparc64/sparc64/spitfire.c stable/8/sys/sparc64/sparc64/tick.c stable/8/sys/sparc64/sparc64/trap.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/sparc64/loader/main.c ============================================================================== --- stable/8/sys/boot/sparc64/loader/main.c Wed Mar 31 21:32:52 2010 (r206004) +++ stable/8/sys/boot/sparc64/loader/main.c Wed Mar 31 21:32:52 2010 (r206005) @@ -137,7 +137,7 @@ struct tlb_entry *dtlb_store; struct tlb_entry *itlb_store; u_int dtlb_slot; u_int itlb_slot; -int cpu_impl; +static int cpu_impl; static u_int dtlb_slot_max; static u_int itlb_slot_max; Modified: stable/8/sys/sparc64/include/cache.h ============================================================================== --- stable/8/sys/sparc64/include/cache.h Wed Mar 31 21:32:52 2010 (r206004) +++ stable/8/sys/sparc64/include/cache.h Wed Mar 31 21:32:52 2010 (r206005) @@ -91,7 +91,7 @@ struct cacheinfo { struct pcpu; -typedef void cache_enable_t(void); +typedef void cache_enable_t(u_int cpu_impl); typedef void cache_flush_t(void); typedef void dcache_page_inval_t(vm_paddr_t pa); typedef void icache_page_inval_t(vm_paddr_t pa); Modified: stable/8/sys/sparc64/include/cpu.h ============================================================================== --- stable/8/sys/sparc64/include/cpu.h Wed Mar 31 21:32:52 2010 (r206004) +++ stable/8/sys/sparc64/include/cpu.h Wed Mar 31 21:32:52 2010 (r206005) @@ -52,7 +52,7 @@ extern char btext[]; extern char etext[]; -void cheetah_init(void); +void cheetah_init(u_int cpu_impl); void cpu_halt(void); void cpu_reset(void); void fork_trampoline(void); Modified: stable/8/sys/sparc64/include/md_var.h ============================================================================== --- stable/8/sys/sparc64/include/md_var.h Wed Mar 31 21:32:52 2010 (r206004) +++ stable/8/sys/sparc64/include/md_var.h Wed Mar 31 21:32:52 2010 (r206005) @@ -47,8 +47,8 @@ extern vm_paddr_t kstack0_phys; struct pcpu; struct md_utrap; -const char *cpu_cpuid_prop(void); -uint32_t cpu_get_mid(void); +const char *cpu_cpuid_prop(u_int cpu_impl); +uint32_t cpu_get_mid(u_int cpu_impl); void cpu_identify(u_long vers, u_int clock, u_int id); void cpu_setregs(struct pcpu *pc); int is_physical_memory(vm_paddr_t addr); Modified: stable/8/sys/sparc64/include/pcpu.h ============================================================================== --- stable/8/sys/sparc64/include/pcpu.h Wed Mar 31 21:32:52 2010 (r206004) +++ stable/8/sys/sparc64/include/pcpu.h Wed Mar 31 21:32:52 2010 (r206005) @@ -54,6 +54,7 @@ struct pmap; u_long pc_tickref; \ u_long pc_tickadj; \ u_int pc_clock; \ + u_int pc_impl; \ u_int pc_mid; \ u_int pc_node; \ u_int pc_tlb_ctx; \ Modified: stable/8/sys/sparc64/include/pmap.h ============================================================================== --- stable/8/sys/sparc64/include/pmap.h Wed Mar 31 21:32:52 2010 (r206004) +++ stable/8/sys/sparc64/include/pmap.h Wed Mar 31 21:32:52 2010 (r206005) @@ -80,7 +80,7 @@ struct pmap { #define pmap_page_get_memattr(m) VM_MEMATTR_DEFAULT #define pmap_page_set_memattr(m, ma) (void)0 -void pmap_bootstrap(void); +void pmap_bootstrap(u_int cpu_impl); vm_paddr_t pmap_kextract(vm_offset_t va); void pmap_kenter(vm_offset_t va, vm_page_t m); void pmap_kremove(vm_offset_t); Modified: stable/8/sys/sparc64/include/smp.h ============================================================================== --- stable/8/sys/sparc64/include/smp.h Wed Mar 31 21:32:52 2010 (r206004) +++ stable/8/sys/sparc64/include/smp.h Wed Mar 31 21:32:52 2010 (r206005) @@ -94,7 +94,7 @@ void cpu_mp_shutdown(void); typedef void cpu_ipi_selected_t(u_int, u_long, u_long, u_long); extern cpu_ipi_selected_t *cpu_ipi_selected; -void mp_init(void); +void mp_init(u_int cpu_impl); extern struct mtx ipi_mtx; extern struct ipi_cache_args ipi_cache_args; Modified: stable/8/sys/sparc64/include/tick.h ============================================================================== --- stable/8/sys/sparc64/include/tick.h Wed Mar 31 21:32:52 2010 (r206004) +++ stable/8/sys/sparc64/include/tick.h Wed Mar 31 21:32:52 2010 (r206005) @@ -31,8 +31,8 @@ extern u_int hardclock_use_stick; -void tick_clear(void); +void tick_clear(u_int cpu_impl); void tick_start(void); -void tick_stop(void); +void tick_stop(u_int cpu_impl); #endif Modified: stable/8/sys/sparc64/include/ver.h ============================================================================== --- stable/8/sys/sparc64/include/ver.h Wed Mar 31 21:32:52 2010 (r206004) +++ stable/8/sys/sparc64/include/ver.h Wed Mar 31 21:32:52 2010 (r206005) @@ -43,24 +43,28 @@ #ifndef LOCORE -#define VER_MANUF_MASK (((1L<> VER_MANUF_SHIFT) -#define VER_IMPL(ver) \ +#define VER_IMPL(ver) \ (((ver) & VER_IMPL_MASK) >> VER_IMPL_SHIFT) -#define VER_MASK(ver) \ +#define VER_MASK(ver) \ (((ver) & VER_MASK_MASK) >> VER_MASK_SHIFT) -#define VER_MAXTL(ver) \ +#define VER_MAXTL(ver) \ (((ver) & VER_MAXTL_MASK) >> VER_MAXTL_SHIFT) -#define VER_MAXWIN(ver) \ +#define VER_MAXWIN(ver) \ (((ver) & VER_MAXWIN_MASK) >> VER_MAXWIN_SHIFT) -extern int cpu_impl; extern char sparc64_model[]; #endif /* !LOCORE */ Modified: stable/8/sys/sparc64/sparc64/cache.c ============================================================================== --- stable/8/sys/sparc64/sparc64/cache.c Wed Mar 31 21:32:52 2010 (r206004) +++ stable/8/sys/sparc64/sparc64/cache.c Wed Mar 31 21:32:52 2010 (r206005) @@ -130,7 +130,7 @@ cache_init(struct pcpu *pcpu) if ((set & ~(1UL << (ffs(set) - 1))) != 0) panic("cache_init: E$ set size not a power of 2"); - if (cpu_impl >= CPU_IMPL_ULTRASPARCIII) { + if (pcpu->pc_impl >= CPU_IMPL_ULTRASPARCIII) { cache_enable = cheetah_cache_enable; cache_flush = cheetah_cache_flush; dcache_page_inval = cheetah_dcache_page_inval; Modified: stable/8/sys/sparc64/sparc64/cheetah.c ============================================================================== --- stable/8/sys/sparc64/sparc64/cheetah.c Wed Mar 31 21:32:52 2010 (r206004) +++ stable/8/sys/sparc64/sparc64/cheetah.c Wed Mar 31 21:32:52 2010 (r206005) @@ -58,7 +58,7 @@ __FBSDID("$FreeBSD$"); * CPU-specific initialization */ void -cheetah_init(void) +cheetah_init(u_int cpu_impl) { register_t s; @@ -119,7 +119,7 @@ cheetah_init(void) * Enable level 1 caches. */ void -cheetah_cache_enable(void) +cheetah_cache_enable(u_int cpu_impl) { u_long lsu; Modified: stable/8/sys/sparc64/sparc64/identcpu.c ============================================================================== --- stable/8/sys/sparc64/sparc64/identcpu.c Wed Mar 31 21:32:52 2010 (r206004) +++ stable/8/sys/sparc64/sparc64/identcpu.c Wed Mar 31 21:32:52 2010 (r206005) @@ -15,7 +15,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include @@ -34,8 +33,6 @@ static u_int cpu_freq; SYSCTL_UINT(_hw_freq, OID_AUTO, cpu, CTLFLAG_RD, &cpu_freq, 0, "CPU clock frequency"); -int cpu_impl; - void cpu_identify(u_long vers, u_int freq, u_int id) { Modified: stable/8/sys/sparc64/sparc64/iommu.c ============================================================================== --- stable/8/sys/sparc64/sparc64/iommu.c Wed Mar 31 21:32:52 2010 (r206004) +++ stable/8/sys/sparc64/sparc64/iommu.c Wed Mar 31 21:32:52 2010 (r206005) @@ -130,6 +130,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -377,7 +378,7 @@ iommu_init(const char *name, struct iomm printf("%s: PROM IOTSB size: %d (%d entries)\n", name, obptsbsize, obptsbentries); if ((is->is_flags & IOMMU_PRESERVE_PROM) != 0 && - !(cpu_impl == CPU_IMPL_ULTRASPARCIIi && obptsbsize == 7)) { + !(PCPU_GET(impl) == CPU_IMPL_ULTRASPARCIIi && obptsbsize == 7)) { if (obptsbentries > tsbentries) panic("%s: PROM IOTSB entries exceed kernel", __func__); Modified: stable/8/sys/sparc64/sparc64/machdep.c ============================================================================== --- stable/8/sys/sparc64/sparc64/machdep.c Wed Mar 31 21:32:52 2010 (r206004) +++ stable/8/sys/sparc64/sparc64/machdep.c Wed Mar 31 21:32:52 2010 (r206005) @@ -146,7 +146,7 @@ static int cpu_use_vis = 1; cpu_block_copy_t *cpu_block_copy; cpu_block_zero_t *cpu_block_zero; -static phandle_t find_bsp(phandle_t node, uint32_t bspid); +static phandle_t find_bsp(phandle_t node, uint32_t bspid, u_int cpu_impl); void sparc64_init(caddr_t mdp, u_long o1, u_long o2, u_long o3, ofw_vec_t *vec); static void sparc64_shutdown_final(void *dummy, int howto); @@ -241,7 +241,7 @@ spinlock_exit(void) } static phandle_t -find_bsp(phandle_t node, uint32_t bspid) +find_bsp(phandle_t node, uint32_t bspid, u_int cpu_impl) { char type[sizeof("cpu")]; phandle_t child; @@ -250,7 +250,7 @@ find_bsp(phandle_t node, uint32_t bspid) for (; node != 0; node = OF_peer(node)) { child = OF_child(node); if (child > 0) { - child = find_bsp(child, bspid); + child = find_bsp(child, bspid, cpu_impl); if (child > 0) return (child); } else { @@ -259,7 +259,7 @@ find_bsp(phandle_t node, uint32_t bspid) continue; if (strcmp(type, "cpu") != 0) continue; - if (OF_getprop(node, cpu_cpuid_prop(), &cpuid, + if (OF_getprop(node, cpu_cpuid_prop(cpu_impl), &cpuid, sizeof(cpuid)) <= 0) continue; if (cpuid == bspid) @@ -270,7 +270,7 @@ find_bsp(phandle_t node, uint32_t bspid) } const char * -cpu_cpuid_prop(void) +cpu_cpuid_prop(u_int cpu_impl) { switch (cpu_impl) { @@ -294,7 +294,7 @@ cpu_cpuid_prop(void) } uint32_t -cpu_get_mid(void) +cpu_get_mid(u_int cpu_impl) { switch (cpu_impl) { @@ -328,6 +328,7 @@ sparc64_init(caddr_t mdp, u_long o1, u_l vm_offset_t va; caddr_t kmdp; phandle_t root; + u_int cpu_impl; end = 0; kmdp = NULL; @@ -342,12 +343,12 @@ sparc64_init(caddr_t mdp, u_long o1, u_l * Do CPU-specific Initialization. */ if (cpu_impl >= CPU_IMPL_ULTRASPARCIII) - cheetah_init(); + cheetah_init(cpu_impl); /* * Clear (S)TICK timer (including NPT). */ - tick_clear(); + tick_clear(cpu_impl); /* * UltraSparc II[e,i] based systems come up with the tick interrupt @@ -357,7 +358,7 @@ sparc64_init(caddr_t mdp, u_long o1, u_l * enabled, causing an interrupt storm on startup since they are not * handled. */ - tick_stop(); + tick_stop(cpu_impl); /* * Set up Open Firmware entry points. @@ -399,7 +400,8 @@ sparc64_init(caddr_t mdp, u_long o1, u_l pc = (struct pcpu *)(pcpu0 + (PCPU_PAGES * PAGE_SIZE)) - 1; pcpu_init(pc, 0, sizeof(struct pcpu)); pc->pc_addr = (vm_offset_t)pcpu0; - pc->pc_mid = cpu_get_mid(); + pc->pc_impl = cpu_impl; + pc->pc_mid = cpu_get_mid(cpu_impl); pc->pc_tlb_ctx = TLB_CTX_USER_MIN; pc->pc_tlb_ctx_min = TLB_CTX_USER_MIN; pc->pc_tlb_ctx_max = TLB_CTX_USER_MAX; @@ -409,7 +411,7 @@ sparc64_init(caddr_t mdp, u_long o1, u_l * BSP is in the device tree in the first place). */ root = OF_peer(0); - pc->pc_node = find_bsp(root, pc->pc_mid); + pc->pc_node = find_bsp(root, pc->pc_mid, cpu_impl); if (pc->pc_node == 0) OF_exit(); if (OF_getprop(pc->pc_node, "clock-frequency", &pc->pc_clock, @@ -475,7 +477,7 @@ sparc64_init(caddr_t mdp, u_long o1, u_l panic("sparc64_init: cannot determine number of iTLB slots"); cache_init(pc); - cache_enable(); + cache_enable(cpu_impl); uma_set_align(pc->pc_cache.dc_linesize - 1); cpu_block_copy = bcopy; @@ -501,13 +503,13 @@ sparc64_init(caddr_t mdp, u_long o1, u_l } #ifdef SMP - mp_init(); + mp_init(cpu_impl); #endif /* * Initialize virtual memory and calculate physmem. */ - pmap_bootstrap(); + pmap_bootstrap(cpu_impl); /* * Initialize tunables. Modified: stable/8/sys/sparc64/sparc64/mp_locore.S ============================================================================== --- stable/8/sys/sparc64/sparc64/mp_locore.S Wed Mar 31 21:32:52 2010 (r206004) +++ stable/8/sys/sparc64/sparc64/mp_locore.S Wed Mar 31 21:32:52 2010 (r206005) @@ -202,17 +202,17 @@ ENTRY(mp_startup) cmp %l1, CPU_IMPL_ULTRASPARCIII bl %icc, 3f nop - mov CPU_STICKSYNC, %l1 + mov CPU_STICKSYNC, %l2 membar #StoreLoad - stw %l1, [%l0 + CSA_STATE] + stw %l2, [%l0 + CSA_STATE] -2: ldx [%l0 + CSA_STICK], %l1 - brz %l1, 2b +2: ldx [%l0 + CSA_STICK], %l2 + brz %l2, 2b nop - wr %l1, 0, %asr24 + wr %l2, 0, %asr24 3: call cpu_get_mid - nop + mov %l1, %o0 /* * Inform the boot processor we have inited. Modified: stable/8/sys/sparc64/sparc64/mp_machdep.c ============================================================================== --- stable/8/sys/sparc64/sparc64/mp_machdep.c Wed Mar 31 21:32:52 2010 (r206004) +++ stable/8/sys/sparc64/sparc64/mp_machdep.c Wed Mar 31 21:32:52 2010 (r206005) @@ -119,11 +119,11 @@ static u_int cpuid_to_mid[MAXCPU]; static int isjbus; static volatile u_int shutdown_cpus; -static void ap_count(phandle_t node, u_int mid); -static void ap_start(phandle_t node, u_int mid); +static void ap_count(phandle_t node, u_int mid, u_int cpu_impl); +static void ap_start(phandle_t node, u_int mid, u_int cpu_impl); static void cpu_mp_unleash(void *v); static void foreach_ap(phandle_t node, void (*func)(phandle_t node, - u_int mid)); + u_int mid, u_int cpu_impl)); static void spitfire_ipi_send(u_int mid, u_long d0, u_long d1, u_long d2); static void sun4u_startcpu(phandle_t cpu, void *func, u_long arg); @@ -137,7 +137,7 @@ CTASSERT(MAXCPU <= sizeof(u_int) * NBBY) CTASSERT(MAXCPU <= sizeof(int) * NBBY); void -mp_init(void) +mp_init(u_int cpu_impl) { struct tte *tp; int i; @@ -171,11 +171,13 @@ mp_init(void) } static void -foreach_ap(phandle_t node, void (*func)(phandle_t node, u_int mid)) +foreach_ap(phandle_t node, void (*func)(phandle_t node, u_int mid, + u_int cpu_impl)) { char type[sizeof("cpu")]; phandle_t child; u_int cpuid; + uint32_t cpu_impl; /* There's no need to traverse the whole OFW tree twice. */ if (mp_maxid > 0 && mp_ncpus >= mp_maxid + 1) @@ -191,12 +193,17 @@ foreach_ap(phandle_t node, void (*func)( continue; if (strcmp(type, "cpu") != 0) continue; - if (OF_getprop(node, cpu_cpuid_prop(), &cpuid, - sizeof(cpuid)) <= 0) - panic("%s: can't get module ID", __func__); + if (OF_getprop(node, "implementation#", &cpu_impl, + sizeof(cpu_impl)) <= 0) + panic("%s: couldn't determine CPU " + "implementation", __func__); + if (OF_getprop(node, cpu_cpuid_prop(cpu_impl), &cpuid, + sizeof(cpuid)) <= 0) + panic("%s: couldn't determine CPU module ID", + __func__); if (cpuid == PCPU_GET(mid)) continue; - (*func)(node, cpuid); + (*func)(node, cpuid, cpu_impl); } } } @@ -216,7 +223,7 @@ cpu_mp_setmaxid() } static void -ap_count(phandle_t node __unused, u_int mid __unused) +ap_count(phandle_t node __unused, u_int mid __unused, u_int cpu_impl __unused) { mp_maxid++; @@ -283,20 +290,20 @@ cpu_mp_start(void) } static void -ap_start(phandle_t node, u_int mid) +ap_start(phandle_t node, u_int mid, u_int cpu_impl) { volatile struct cpu_start_args *csa; struct pcpu *pc; register_t s; vm_offset_t va; - u_int clock; u_int cpuid; + uint32_t clock; if (mp_ncpus > MAXCPU) return; if (OF_getprop(node, "clock-frequency", &clock, sizeof(clock)) <= 0) - panic("%s: can't get clock", __func__); + panic("%s: couldn't determine CPU frequency", __func__); if (clock != PCPU_GET(clock)) hardclock_use_stick = 1; @@ -329,6 +336,7 @@ ap_start(phandle_t node, u_int mid) dpcpu_init((void *)kmem_alloc(kernel_map, DPCPU_SIZE), cpuid); pc->pc_addr = va; pc->pc_clock = clock; + pc->pc_impl = cpu_impl; pc->pc_mid = mid; pc->pc_node = node; @@ -401,9 +409,9 @@ cpu_mp_bootstrap(struct pcpu *pc) volatile struct cpu_start_args *csa; csa = &cpu_start_args; - if (cpu_impl >= CPU_IMPL_ULTRASPARCIII) - cheetah_init(); - cache_enable(); + if (pc->pc_impl >= CPU_IMPL_ULTRASPARCIII) + cheetah_init(pc->pc_impl); + cache_enable(pc->pc_impl); pmap_map_tsb(); /* * Flush all non-locked TLB entries possibly left over by the Modified: stable/8/sys/sparc64/sparc64/nexus.c ============================================================================== --- stable/8/sys/sparc64/sparc64/nexus.c Wed Mar 31 21:32:52 2010 (r206004) +++ stable/8/sys/sparc64/sparc64/nexus.c Wed Mar 31 21:32:52 2010 (r206005) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -522,7 +523,7 @@ nexus_setup_dinfo(device_t dev, phandle_ nintr = OF_getprop_alloc(node, "interrupts", sizeof(*intr), (void **)&intr); if (nintr > 0) { - if (OF_getprop(node, cpu_impl < CPU_IMPL_ULTRASPARCIII ? + if (OF_getprop(node, PCPU_GET(impl) < CPU_IMPL_ULTRASPARCIII ? "upa-portid" : "portid", &ign, sizeof(ign)) <= 0) { device_printf(dev, "<%s>: could not determine portid\n", ndi->ndi_obdinfo.obd_name); Modified: stable/8/sys/sparc64/sparc64/pmap.c ============================================================================== --- stable/8/sys/sparc64/sparc64/pmap.c Wed Mar 31 21:32:52 2010 (r206004) +++ stable/8/sys/sparc64/sparc64/pmap.c Wed Mar 31 21:32:52 2010 (r206005) @@ -278,7 +278,7 @@ om_cmp(const void *a, const void *b) * Bootstrap the system enough to run with virtual memory. */ void -pmap_bootstrap(void) +pmap_bootstrap(u_int cpu_impl) { struct pmap *pm; struct tte *tp; @@ -1543,7 +1543,7 @@ pmap_copy_tte(pmap_t src_pmap, pmap_t ds void pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_t dst_addr, - vm_size_t len, vm_offset_t src_addr) + vm_size_t len, vm_offset_t src_addr) { struct tte *tp; vm_offset_t va; @@ -1998,6 +1998,7 @@ pmap_activate(struct thread *td) void pmap_sync_icache(pmap_t pm, vm_offset_t va, vm_size_t sz) { + } /* Modified: stable/8/sys/sparc64/sparc64/spitfire.c ============================================================================== --- stable/8/sys/sparc64/sparc64/spitfire.c Wed Mar 31 21:32:52 2010 (r206004) +++ stable/8/sys/sparc64/sparc64/spitfire.c Wed Mar 31 21:32:52 2010 (r206005) @@ -56,7 +56,7 @@ PMAP_STATS_VAR(spitfire_icache_npage_inv * Enable the level 1 caches. */ void -spitfire_cache_enable(void) +spitfire_cache_enable(u_int cpu_impl __unused) { u_long lsu; Modified: stable/8/sys/sparc64/sparc64/tick.c ============================================================================== --- stable/8/sys/sparc64/sparc64/tick.c Wed Mar 31 21:32:52 2010 (r206004) +++ stable/8/sys/sparc64/sparc64/tick.c Wed Mar 31 21:32:52 2010 (r206005) @@ -120,7 +120,7 @@ cpu_initclocks(void) */ } else { clock = PCPU_GET(clock); - intr_setup(PIL_TICK, cpu_impl < CPU_IMPL_ULTRASPARCIII ? + intr_setup(PIL_TICK, PCPU_GET(impl) < CPU_IMPL_ULTRASPARCIII ? tick_hardclock_bbwar : tick_hardclock, -1, NULL, NULL); set_cputicker(tick_cputicks, clock, 0); } @@ -322,7 +322,7 @@ tick_start(void) } void -tick_clear(void) +tick_clear(u_int cpu_impl) { if (cpu_impl >= CPU_IMPL_ULTRASPARCIII) @@ -331,7 +331,7 @@ tick_clear(void) } void -tick_stop(void) +tick_stop(u_int cpu_impl) { if (cpu_impl >= CPU_IMPL_ULTRASPARCIII) Modified: stable/8/sys/sparc64/sparc64/trap.c ============================================================================== --- stable/8/sys/sparc64/sparc64/trap.c Wed Mar 31 21:32:52 2010 (r206004) +++ stable/8/sys/sparc64/sparc64/trap.c Wed Mar 31 21:32:52 2010 (r206005) @@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -391,7 +392,7 @@ trap(struct trapframe *tf) if (tf->tf_tpc > (u_long)fas_nofault_begin && tf->tf_tpc < (u_long)fas_nofault_end) { cache_flush(); - cache_enable(); + cache_enable(PCPU_GET(impl)); tf->tf_tpc = (u_long)fas_fault; tf->tf_tnpc = tf->tf_tpc + 4; error = 0; From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 21:41:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3CA81106566B; Wed, 31 Mar 2010 21:41:01 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2A1548FC16; Wed, 31 Mar 2010 21:41: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 o2VLf1gM029973; Wed, 31 Mar 2010 21:41:01 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VLf1DA029971; Wed, 31 Mar 2010 21:41:01 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003312141.o2VLf1DA029971@svn.freebsd.org> From: Marius Strobl Date: Wed, 31 Mar 2010 21:41: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: r206007 - stable/8/sys/sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Mar 2010 21:41:01 -0000 Author: marius Date: Wed Mar 31 21:41:00 2010 New Revision: 206007 URL: http://svn.freebsd.org/changeset/base/206007 Log: MFC: r204153 Starting with UltraSPARC IV CPUs the CPU caches are described with different OFW properties. Modified: stable/8/sys/sparc64/sparc64/cache.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/sparc64/sparc64/cache.c ============================================================================== --- stable/8/sys/sparc64/sparc64/cache.c Wed Mar 31 21:33:51 2010 (r206006) +++ stable/8/sys/sparc64/sparc64/cache.c Wed Mar 31 21:41:00 2010 (r206007) @@ -43,6 +43,7 @@ */ /*- * Copyright (c) 2001 by Thomas Moestl . + * Copyright (c) 2008, 2010 Marius Strobl * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -89,32 +90,49 @@ icache_page_inval_t *icache_page_inval; #define OF_GET(h, n, v) OF_getprop((h), (n), &(v), sizeof(v)) +static u_int cache_new_prop(u_int cpu_impl); + +static u_int +cache_new_prop(u_int cpu_impl) +{ + + switch (cpu_impl) { + case CPU_IMPL_ULTRASPARCIV: + case CPU_IMPL_ULTRASPARCIVp: + return (1); + default: + return (0); + } +} + /* - * Fill in the cache parameters using the cpu node. + * Fill in the cache parameters using the CPU node. */ void cache_init(struct pcpu *pcpu) { u_long set; + u_int use_new_prop; - if (OF_GET(pcpu->pc_node, "icache-size", - pcpu->pc_cache.ic_size) == -1 || - OF_GET(pcpu->pc_node, "icache-line-size", - pcpu->pc_cache.ic_linesize) == -1 || - OF_GET(pcpu->pc_node, "icache-associativity", - pcpu->pc_cache.ic_assoc) == -1 || - OF_GET(pcpu->pc_node, "dcache-size", - pcpu->pc_cache.dc_size) == -1 || - OF_GET(pcpu->pc_node, "dcache-line-size", - pcpu->pc_cache.dc_linesize) == -1 || - OF_GET(pcpu->pc_node, "dcache-associativity", - pcpu->pc_cache.dc_assoc) == -1 || - OF_GET(pcpu->pc_node, "ecache-size", - pcpu->pc_cache.ec_size) == -1 || - OF_GET(pcpu->pc_node, "ecache-line-size", - pcpu->pc_cache.ec_linesize) == -1 || - OF_GET(pcpu->pc_node, "ecache-associativity", - pcpu->pc_cache.ec_assoc) == -1) + use_new_prop = cache_new_prop(pcpu->pc_impl); + if (OF_GET(pcpu->pc_node, !use_new_prop ? "icache-size" : + "l1-icache-size", pcpu->pc_cache.ic_size) == -1 || + OF_GET(pcpu->pc_node, !use_new_prop ? "icache-line-size" : + "l1-icache-line-size", pcpu->pc_cache.ic_linesize) == -1 || + OF_GET(pcpu->pc_node, !use_new_prop ? "icache-associativity" : + "l1-icache-associativity", pcpu->pc_cache.ic_assoc) == -1 || + OF_GET(pcpu->pc_node, !use_new_prop ? "dcache-size" : + "l1-dcache-size", pcpu->pc_cache.dc_size) == -1 || + OF_GET(pcpu->pc_node, !use_new_prop ? "dcache-line-size" : + "l1-dcache-line-size", pcpu->pc_cache.dc_linesize) == -1 || + OF_GET(pcpu->pc_node, !use_new_prop ? "dcache-associativity" : + "l1-dcache-associativity", pcpu->pc_cache.dc_assoc) == -1 || + OF_GET(pcpu->pc_node, !use_new_prop ? "ecache-size" : + "l2-cache-size", pcpu->pc_cache.ec_size) == -1 || + OF_GET(pcpu->pc_node, !use_new_prop ? "ecache-line-size" : + "l2-cache-line-size", pcpu->pc_cache.ec_linesize) == -1 || + OF_GET(pcpu->pc_node, !use_new_prop ? "ecache-associativity" : + "l2-cache-associativity", pcpu->pc_cache.ec_assoc) == -1) panic("cache_init: could not retrieve cache parameters"); set = pcpu->pc_cache.ic_size / pcpu->pc_cache.ic_assoc; From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 21:41:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DCD4A106564A; Wed, 31 Mar 2010 21:41:03 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CA6A18FC17; Wed, 31 Mar 2010 21: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 o2VLf3Vn030009; Wed, 31 Mar 2010 21:41:03 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VLf3WR030007; Wed, 31 Mar 2010 21:41:03 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003312141.o2VLf3WR030007@svn.freebsd.org> From: Marius Strobl Date: Wed, 31 Mar 2010 21:41: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: r206008 - stable/7/sys/sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Mar 2010 21:41:04 -0000 Author: marius Date: Wed Mar 31 21:41:03 2010 New Revision: 206008 URL: http://svn.freebsd.org/changeset/base/206008 Log: MFC: r204153 Starting with UltraSPARC IV CPUs the CPU caches are described with different OFW properties. Modified: stable/7/sys/sparc64/sparc64/cache.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/sparc64/cache.c ============================================================================== --- stable/7/sys/sparc64/sparc64/cache.c Wed Mar 31 21:41:00 2010 (r206007) +++ stable/7/sys/sparc64/sparc64/cache.c Wed Mar 31 21:41:03 2010 (r206008) @@ -43,6 +43,7 @@ */ /*- * Copyright (c) 2001 by Thomas Moestl . + * Copyright (c) 2008, 2010 Marius Strobl * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -89,32 +90,49 @@ icache_page_inval_t *icache_page_inval; #define OF_GET(h, n, v) OF_getprop((h), (n), &(v), sizeof(v)) +static u_int cache_new_prop(u_int cpu_impl); + +static u_int +cache_new_prop(u_int cpu_impl) +{ + + switch (cpu_impl) { + case CPU_IMPL_ULTRASPARCIV: + case CPU_IMPL_ULTRASPARCIVp: + return (1); + default: + return (0); + } +} + /* - * Fill in the cache parameters using the cpu node. + * Fill in the cache parameters using the CPU node. */ void cache_init(struct pcpu *pcpu) { u_long set; + u_int use_new_prop; - if (OF_GET(pcpu->pc_node, "icache-size", - pcpu->pc_cache.ic_size) == -1 || - OF_GET(pcpu->pc_node, "icache-line-size", - pcpu->pc_cache.ic_linesize) == -1 || - OF_GET(pcpu->pc_node, "icache-associativity", - pcpu->pc_cache.ic_assoc) == -1 || - OF_GET(pcpu->pc_node, "dcache-size", - pcpu->pc_cache.dc_size) == -1 || - OF_GET(pcpu->pc_node, "dcache-line-size", - pcpu->pc_cache.dc_linesize) == -1 || - OF_GET(pcpu->pc_node, "dcache-associativity", - pcpu->pc_cache.dc_assoc) == -1 || - OF_GET(pcpu->pc_node, "ecache-size", - pcpu->pc_cache.ec_size) == -1 || - OF_GET(pcpu->pc_node, "ecache-line-size", - pcpu->pc_cache.ec_linesize) == -1 || - OF_GET(pcpu->pc_node, "ecache-associativity", - pcpu->pc_cache.ec_assoc) == -1) + use_new_prop = cache_new_prop(pcpu->pc_impl); + if (OF_GET(pcpu->pc_node, !use_new_prop ? "icache-size" : + "l1-icache-size", pcpu->pc_cache.ic_size) == -1 || + OF_GET(pcpu->pc_node, !use_new_prop ? "icache-line-size" : + "l1-icache-line-size", pcpu->pc_cache.ic_linesize) == -1 || + OF_GET(pcpu->pc_node, !use_new_prop ? "icache-associativity" : + "l1-icache-associativity", pcpu->pc_cache.ic_assoc) == -1 || + OF_GET(pcpu->pc_node, !use_new_prop ? "dcache-size" : + "l1-dcache-size", pcpu->pc_cache.dc_size) == -1 || + OF_GET(pcpu->pc_node, !use_new_prop ? "dcache-line-size" : + "l1-dcache-line-size", pcpu->pc_cache.dc_linesize) == -1 || + OF_GET(pcpu->pc_node, !use_new_prop ? "dcache-associativity" : + "l1-dcache-associativity", pcpu->pc_cache.dc_assoc) == -1 || + OF_GET(pcpu->pc_node, !use_new_prop ? "ecache-size" : + "l2-cache-size", pcpu->pc_cache.ec_size) == -1 || + OF_GET(pcpu->pc_node, !use_new_prop ? "ecache-line-size" : + "l2-cache-line-size", pcpu->pc_cache.ec_linesize) == -1 || + OF_GET(pcpu->pc_node, !use_new_prop ? "ecache-associativity" : + "l2-cache-associativity", pcpu->pc_cache.ec_assoc) == -1) panic("cache_init: could not retrieve cache parameters"); set = pcpu->pc_cache.ic_size / pcpu->pc_cache.ic_assoc; From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 21:57:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68E4E106566B; Wed, 31 Mar 2010 21:57:49 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 55F558FC1C; Wed, 31 Mar 2010 21:57: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 o2VLvnRq034213; Wed, 31 Mar 2010 21:57:49 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VLvnMF034206; Wed, 31 Mar 2010 21:57:49 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003312157.o2VLvnMF034206@svn.freebsd.org> From: Marius Strobl Date: Wed, 31 Mar 2010 21:57:49 +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: r206009 - in stable/8/sys/sparc64: include sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Mar 2010 21:57:49 -0000 Author: marius Date: Wed Mar 31 21:57:48 2010 New Revision: 206009 URL: http://svn.freebsd.org/changeset/base/206009 Log: MFC: r205258 - Add TTE and context register bits for the additional page sizes supported by UltraSparc-IV and -IV+ as well as SPARC64 V, VI, VII and VIIIfx CPUs. - Replace TLB_PCXR_PGSZ_MASK and TLB_SCXR_PGSZ_MASK with TLB_CXR_PGSZ_MASK which just is the complement of TLB_CXR_CTX_MASK instead of trying to assemble it from the page size bits which vary across CPUs. - Add macros for the remainder of the SFSR bits, which are useful for at least debugging purposes. Modified: stable/8/sys/sparc64/include/tlb.h stable/8/sys/sparc64/include/tte.h stable/8/sys/sparc64/sparc64/genassym.c stable/8/sys/sparc64/sparc64/pmap.c stable/8/sys/sparc64/sparc64/swtch.S 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/sparc64/include/tlb.h ============================================================================== --- stable/8/sys/sparc64/include/tlb.h Wed Mar 31 21:41:03 2010 (r206008) +++ stable/8/sys/sparc64/include/tlb.h Wed Mar 31 21:57:48 2010 (r206009) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2001 Jake Burkholder. + * Copyright (c) 2008, 2010 Marius Strobl * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,11 +36,11 @@ #define TLB_DIRECT_ADDRESS_MASK ((1UL << TLB_DIRECT_ADDRESS_BITS) - 1) #define TLB_DIRECT_PAGE_MASK ((1UL << TLB_DIRECT_PAGE_BITS) - 1) -#define TLB_PHYS_TO_DIRECT(pa) \ +#define TLB_PHYS_TO_DIRECT(pa) \ ((pa) | VM_MIN_DIRECT_ADDRESS) -#define TLB_DIRECT_TO_PHYS(va) \ +#define TLB_DIRECT_TO_PHYS(va) \ ((va) & TLB_DIRECT_ADDRESS_MASK) -#define TLB_DIRECT_TO_TTE_MASK \ +#define TLB_DIRECT_TO_TTE_MASK \ (TD_V | TD_4M | (TLB_DIRECT_ADDRESS_MASK - TLB_DIRECT_PAGE_MASK)) #define TLB_DAR_SLOT_SHIFT (3) @@ -56,18 +57,21 @@ (((1UL << TLB_CXR_CTX_BITS) - 1) << TLB_CXR_CTX_SHIFT) #define TLB_CXR_CTX_SHIFT (0) #define TLB_CXR_PGSZ_BITS (3) -#define TLB_PCXR_PGSZ_MASK \ - ((((1UL << TLB_CXR_PGSZ_BITS) - 1) << TLB_PCXR_N_PGSZ0_SHIFT) | \ - (((1UL << TLB_CXR_PGSZ_BITS) - 1) << TLB_PCXR_N_PGSZ1_SHIFT) | \ - (((1UL << TLB_CXR_PGSZ_BITS) - 1) << TLB_PCXR_P_PGSZ0_SHIFT) | \ - (((1UL << TLB_CXR_PGSZ_BITS) - 1) << TLB_PCXR_P_PGSZ1_SHIFT)) +#define TLB_CXR_PGSZ_MASK (~TLB_CXR_CTX_MASK) +#define TLB_PCXR_N_IPGSZ0_SHIFT (53) /* SPARC64 VI, VII, VIIIfx */ +#define TLB_PCXR_N_IPGSZ1_SHIFT (50) /* SPARC64 VI, VII, VIIIfx */ #define TLB_PCXR_N_PGSZ0_SHIFT (61) #define TLB_PCXR_N_PGSZ1_SHIFT (58) +#define TLB_PCXR_N_PGSZ_I_SHIFT (55) /* US-IV+ */ +#define TLB_PCXR_P_IPGSZ0_SHIFT (24) /* SPARC64 VI, VII, VIIIfx */ +#define TLB_PCXR_P_IPGSZ1_SHIFT (27) /* SPARC64 VI, VII, VIIIfx */ #define TLB_PCXR_P_PGSZ0_SHIFT (16) #define TLB_PCXR_P_PGSZ1_SHIFT (19) -#define TLB_SCXR_PGSZ_MASK \ - ((((1UL << TLB_CXR_PGSZ_BITS) - 1) << TLB_SCXR_S_PGSZ0_SHIFT) | \ - (((1UL << TLB_CXR_PGSZ_BITS) - 1) << TLB_SCXR_S_PGSZ1_SHIFT)) +/* + * Note that the US-IV+ documentation appears to have TLB_PCXR_P_PGSZ_I_SHIFT + * and TLB_PCXR_P_PGSZ0_SHIFT erroneously inverted. + */ +#define TLB_PCXR_P_PGSZ_I_SHIFT (22) /* US-IV+ */ #define TLB_SCXR_S_PGSZ1_SHIFT (19) #define TLB_SCXR_S_PGSZ0_SHIFT (16) @@ -87,7 +91,7 @@ #define TLB_DEMAP_TYPE_SHIFT (6) #define TLB_DEMAP_TYPE_PAGE (0) #define TLB_DEMAP_TYPE_CONTEXT (1) -#define TLB_DEMAP_TYPE_ALL (2) /* USIII and beyond only */ +#define TLB_DEMAP_TYPE_ALL (2) /* US-III and beyond only */ #define TLB_DEMAP_VA(va) ((va) & ~PAGE_MASK) #define TLB_DEMAP_ID(id) ((id) << TLB_DEMAP_ID_SHIFT) @@ -118,9 +122,17 @@ #define MMU_SFSR_FT_SIZE (6) #define MMU_SFSR_CT_SIZE (2) -#define MMU_SFSR_GET_ASI(sfsr) \ +#define MMU_SFSR_GET_ASI(sfsr) \ (((sfsr) >> MMU_SFSR_ASI_SHIFT) & ((1UL << MMU_SFSR_ASI_SIZE) - 1)) +#define MMU_SFSR_GET_FT(sfsr) \ + (((sfsr) >> MMU_SFSR_FT_SHIFT) & ((1UL << MMU_SFSR_FT_SIZE) - 1)) +#define MMU_SFSR_GET_CT(sfsr) \ + (((sfsr) >> MMU_SFSR_CT_SHIFT) & ((1UL << MMU_SFSR_CT_SIZE) - 1)) + +#define MMU_SFSR_E (1UL << MMU_SFSR_E_SHIFT) +#define MMU_SFSR_PR (1UL << MMU_SFSR_PR_SHIFT) #define MMU_SFSR_W (1UL << MMU_SFSR_W_SHIFT) +#define MMU_SFSR_OW (1UL << MMU_SFSR_OW_SHIFT) #define MMU_SFSR_FV (1UL << MMU_SFSR_FV_SHIFT) typedef void tlb_flush_nonlocked_t(void); Modified: stable/8/sys/sparc64/include/tte.h ============================================================================== --- stable/8/sys/sparc64/include/tte.h Wed Mar 31 21:41:03 2010 (r206008) +++ stable/8/sys/sparc64/include/tte.h Wed Mar 31 21:57:48 2010 (r206009) @@ -36,25 +36,42 @@ #define TD_SIZE_SHIFT (61) #define TD_SOFT2_SHIFT (50) +#define TD_RSVD2_SHIFT (49) +#define TD_SIZE2_SHIFT (48) #define TD_DIAG_SF_SHIFT (41) #define TD_RSVD_CH_SHIFT (43) +#define TD_RSVD_OC_SHIFT (47) +#define TD_RSVD_PT_SHIFT TD_RSVD_CH_SHIFT +#define TD_RSVD_VE_SHIFT (41) #define TD_PA_SHIFT (13) #define TD_SOFT_SHIFT (7) #define TD_SIZE_BITS (2) #define TD_SOFT2_BITS (9) -#define TD_DIAG_SF_BITS (9) -#define TD_RSVD_CH_BITS (7) -#define TD_PA_CH_BITS (30) -#define TD_PA_SF_BITS (28) +#define TD_RSVD2_BITS (1) /* US-IV+, SPARC64 VI, VII, VIIIfx */ +#define TD_SIZE2_BITS (1) /* US-IV+, SPARC64 VI, VII, VIIIfx */ +#define TD_DIAG_SF_BITS (9) /* US-I, II{,e,i} */ +#define TD_RSVD_CH_BITS (7) /* US-III{,i,+}, US-IV, SPARC64 V */ +#define TD_RSVD_OC_BITS (1) /* SPARC64 VI, VII */ +#define TD_RSVD_PT_BITS (5) /* US-IV+, SPARC64 VI, VII */ +#define TD_RSVD_VE_BITS (7) /* SPARC64 VIIIfx */ +#define TD_PA_CH_BITS (30) /* US-III{,i,+}, US-IV{,+}, SPARC64 V */ +#define TD_PA_OC_BITS (34) /* SPARC64 VI, VII */ +#define TD_PA_SF_BITS (28) /* US-I, II{,e,i}, SPARC64 VIIIfx */ #define TD_PA_BITS TD_PA_CH_BITS #define TD_SOFT_BITS (6) #define TD_SIZE_MASK ((1UL << TD_SIZE_BITS) - 1) #define TD_SOFT2_MASK ((1UL << TD_SOFT2_BITS) - 1) +#define TD_RSVD2_MASK ((1UL << TD_RSVD2_BITS) - 1) +#define TD_SIZE2_MASK ((1UL << TD_SIZE2_BITS) - 1) #define TD_DIAG_SF_MASK ((1UL << TD_DIAG_SF_BITS) - 1) #define TD_RSVD_CH_MASK ((1UL << TD_RSVD_CH_BITS) - 1) +#define TD_RSVD_OC_MASK ((1UL << TD_RSVD_OC_BITS) - 1) +#define TD_RSVD_PT_MASK ((1UL << TD_RSVD_PT_BITS) - 1) +#define TD_RSVD_VE_MASK ((1UL << TD_RSVD_VE_BITS) - 1) #define TD_PA_CH_MASK ((1UL << TD_PA_CH_BITS) - 1) +#define TD_PA_OC_MASK ((1UL << TD_PA_OC_BITS) - 1) #define TD_PA_SF_MASK ((1UL << TD_PA_SF_BITS) - 1) #define TD_PA_MASK ((1UL << TD_PA_BITS) - 1) #define TD_SOFT_MASK ((1UL << TD_SOFT_BITS) - 1) @@ -63,6 +80,9 @@ #define TS_64K (1UL) #define TS_512K (2UL) #define TS_4M (3UL) +#define TS_32M (4UL) /* US-IV+, SPARC64 VI, VII only */ +#define TS_256M (5UL) /* US-IV+, SPARC64 VI, VII only */ +#define TS_2G (6UL) /* SPARC64 VIIIfx only */ #define TS_MIN TS_8K #define TS_MAX TS_4M @@ -72,6 +92,15 @@ #define TD_64K (TS_64K << TD_SIZE_SHIFT) #define TD_512K (TS_512K << TD_SIZE_SHIFT) #define TD_4M (TS_4M << TD_SIZE_SHIFT) +#define TD_32M \ + (((TS_32M & TD_SIZE_MASK) << TD_SIZE_SHIFT) | \ + (TD_SIZE2_MASK << TD_SIZE2_SHIFT)) +#define TD_256M \ + (((TS_256M & TD_SIZE_MASK) << TD_SIZE_SHIFT) | \ + (TD_SIZE2_MASK << TD_SIZE2_SHIFT)) +#define TD_2G \ + (((TS_2G & TD_SIZE_MASK) << TD_SIZE_SHIFT) | \ + (TD_SIZE2_MASK << TD_SIZE2_SHIFT)) #define TD_NFO (1UL << 60) #define TD_IE (1UL << 59) #define TD_PA(pa) ((pa) & (TD_PA_MASK << TD_PA_SHIFT)) @@ -94,29 +123,28 @@ #define TV_VPN(va, sz) ((((va) >> TTE_PAGE_SHIFT(sz)) << TV_SIZE_BITS) | sz) #define TTE_SIZE_SPREAD (3) -#define TTE_PAGE_SHIFT(sz) \ +#define TTE_PAGE_SHIFT(sz) \ (PAGE_SHIFT + ((sz) * TTE_SIZE_SPREAD)) -#define TTE_GET_SIZE(tp) \ +#define TTE_GET_SIZE(tp) \ (((tp)->tte_data >> TD_SIZE_SHIFT) & TD_SIZE_MASK) -#define TTE_GET_PAGE_SHIFT(tp) \ +#define TTE_GET_PAGE_SHIFT(tp) \ TTE_PAGE_SHIFT(TTE_GET_SIZE(tp)) -#define TTE_GET_PAGE_SIZE(tp) \ +#define TTE_GET_PAGE_SIZE(tp) \ (1 << TTE_GET_PAGE_SHIFT(tp)) -#define TTE_GET_PAGE_MASK(tp) \ +#define TTE_GET_PAGE_MASK(tp) \ (TTE_GET_PAGE_SIZE(tp) - 1) -#define TTE_GET_PA(tp) \ +#define TTE_GET_PA(tp) \ ((tp)->tte_data & (TD_PA_MASK << TD_PA_SHIFT)) -#define TTE_GET_VPN(tp) \ +#define TTE_GET_VPN(tp) \ ((tp)->tte_vpn >> TV_SIZE_BITS) -#define TTE_GET_VA(tp) \ +#define TTE_GET_VA(tp) \ (TTE_GET_VPN(tp) << TTE_GET_PAGE_SHIFT(tp)) -#define TTE_GET_PMAP(tp) \ - (((tp)->tte_data & TD_P) != 0 ? \ - (kernel_pmap) : \ - (PHYS_TO_VM_PAGE(pmap_kextract((vm_offset_t)(tp)))->md.pmap)) -#define TTE_ZERO(tp) \ +#define TTE_GET_PMAP(tp) \ + (((tp)->tte_data & TD_P) != 0 ? (kernel_pmap) : \ + (PHYS_TO_VM_PAGE(pmap_kextract((vm_offset_t)(tp)))->md.pmap)) +#define TTE_ZERO(tp) \ memset(tp, 0, sizeof(*tp)) struct pmap; @@ -130,6 +158,7 @@ struct tte { static __inline int tte_match(struct tte *tp, vm_offset_t va) { + return (((tp->tte_data & TD_V) != 0) && (tp->tte_vpn == TV_VPN(va, TTE_GET_SIZE(tp)))); } Modified: stable/8/sys/sparc64/sparc64/genassym.c ============================================================================== --- stable/8/sys/sparc64/sparc64/genassym.c Wed Mar 31 21:41:03 2010 (r206008) +++ stable/8/sys/sparc64/sparc64/genassym.c Wed Mar 31 21:57:48 2010 (r206009) @@ -139,7 +139,7 @@ ASSYM(TD_W, TD_W); ASSYM(TS_MIN, TS_MIN); ASSYM(TS_MAX, TS_MAX); ASSYM(TLB_DAR_SLOT_SHIFT, TLB_DAR_SLOT_SHIFT); -ASSYM(TLB_PCXR_PGSZ_MASK, TLB_PCXR_PGSZ_MASK); +ASSYM(TLB_CXR_PGSZ_MASK, TLB_CXR_PGSZ_MASK); ASSYM(TLB_DIRECT_TO_TTE_MASK, TLB_DIRECT_TO_TTE_MASK); ASSYM(TV_SIZE_BITS, TV_SIZE_BITS); #endif Modified: stable/8/sys/sparc64/sparc64/pmap.c ============================================================================== --- stable/8/sys/sparc64/sparc64/pmap.c Wed Mar 31 21:41:03 2010 (r206008) +++ stable/8/sys/sparc64/sparc64/pmap.c Wed Mar 31 21:57:48 2010 (r206009) @@ -572,7 +572,7 @@ pmap_map_tsb(void) * FP block operations in the kernel). */ stxa(AA_DMMU_SCXR, ASI_DMMU, (ldxa(AA_DMMU_SCXR, ASI_DMMU) & - TLB_SCXR_PGSZ_MASK) | TLB_CTX_KERNEL); + TLB_CXR_PGSZ_MASK) | TLB_CTX_KERNEL); flush(KERNBASE); intr_restore(s); @@ -1989,7 +1989,7 @@ pmap_activate(struct thread *td) stxa(AA_DMMU_TSB, ASI_DMMU, pm->pm_tsb); stxa(AA_IMMU_TSB, ASI_IMMU, pm->pm_tsb); stxa(AA_DMMU_PCXR, ASI_DMMU, (ldxa(AA_DMMU_PCXR, ASI_DMMU) & - TLB_PCXR_PGSZ_MASK) | context); + TLB_CXR_PGSZ_MASK) | context); flush(KERNBASE); mtx_unlock_spin(&sched_lock); Modified: stable/8/sys/sparc64/sparc64/swtch.S ============================================================================== --- stable/8/sys/sparc64/sparc64/swtch.S Wed Mar 31 21:41:03 2010 (r206008) +++ stable/8/sys/sparc64/sparc64/swtch.S Wed Mar 31 21:57:48 2010 (r206009) @@ -237,7 +237,7 @@ ENTRY(cpu_switch) stxa %i4, [%i5] ASI_DMMU mov AA_IMMU_TSB, %i5 stxa %i4, [%i5] ASI_IMMU - setx TLB_PCXR_PGSZ_MASK, %i5, %i4 + setx TLB_CXR_PGSZ_MASK, %i5, %i4 mov AA_DMMU_PCXR, %i5 ldxa [%i5] ASI_DMMU, %l1 and %l1, %i4, %l1 From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 21:57:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE6711065672; Wed, 31 Mar 2010 21:57:49 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AB5968FC1D; Wed, 31 Mar 2010 21:57: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 o2VLvnW3034231; Wed, 31 Mar 2010 21:57:49 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VLvnha034225; Wed, 31 Mar 2010 21:57:49 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003312157.o2VLvnha034225@svn.freebsd.org> From: Marius Strobl Date: Wed, 31 Mar 2010 21:57: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: r206010 - in stable/7/sys/sparc64: include sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Mar 2010 21:57:49 -0000 Author: marius Date: Wed Mar 31 21:57:49 2010 New Revision: 206010 URL: http://svn.freebsd.org/changeset/base/206010 Log: MFC: r205258 - Add TTE and context register bits for the additional page sizes supported by UltraSparc-IV and -IV+ as well as SPARC64 V, VI, VII and VIIIfx CPUs. - Replace TLB_PCXR_PGSZ_MASK and TLB_SCXR_PGSZ_MASK with TLB_CXR_PGSZ_MASK which just is the complement of TLB_CXR_CTX_MASK instead of trying to assemble it from the page size bits which vary across CPUs. - Add macros for the remainder of the SFSR bits, which are useful for at least debugging purposes. Modified: stable/7/sys/sparc64/include/tlb.h stable/7/sys/sparc64/include/tte.h stable/7/sys/sparc64/sparc64/genassym.c stable/7/sys/sparc64/sparc64/pmap.c stable/7/sys/sparc64/sparc64/swtch.S Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/include/tlb.h ============================================================================== --- stable/7/sys/sparc64/include/tlb.h Wed Mar 31 21:57:48 2010 (r206009) +++ stable/7/sys/sparc64/include/tlb.h Wed Mar 31 21:57:49 2010 (r206010) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2001 Jake Burkholder. + * Copyright (c) 2008, 2010 Marius Strobl * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,11 +36,11 @@ #define TLB_DIRECT_ADDRESS_MASK ((1UL << TLB_DIRECT_ADDRESS_BITS) - 1) #define TLB_DIRECT_PAGE_MASK ((1UL << TLB_DIRECT_PAGE_BITS) - 1) -#define TLB_PHYS_TO_DIRECT(pa) \ +#define TLB_PHYS_TO_DIRECT(pa) \ ((pa) | VM_MIN_DIRECT_ADDRESS) -#define TLB_DIRECT_TO_PHYS(va) \ +#define TLB_DIRECT_TO_PHYS(va) \ ((va) & TLB_DIRECT_ADDRESS_MASK) -#define TLB_DIRECT_TO_TTE_MASK \ +#define TLB_DIRECT_TO_TTE_MASK \ (TD_V | TD_4M | (TLB_DIRECT_ADDRESS_MASK - TLB_DIRECT_PAGE_MASK)) #define TLB_DAR_SLOT_SHIFT (3) @@ -56,18 +57,21 @@ (((1UL << TLB_CXR_CTX_BITS) - 1) << TLB_CXR_CTX_SHIFT) #define TLB_CXR_CTX_SHIFT (0) #define TLB_CXR_PGSZ_BITS (3) -#define TLB_PCXR_PGSZ_MASK \ - ((((1UL << TLB_CXR_PGSZ_BITS) - 1) << TLB_PCXR_N_PGSZ0_SHIFT) | \ - (((1UL << TLB_CXR_PGSZ_BITS) - 1) << TLB_PCXR_N_PGSZ1_SHIFT) | \ - (((1UL << TLB_CXR_PGSZ_BITS) - 1) << TLB_PCXR_P_PGSZ0_SHIFT) | \ - (((1UL << TLB_CXR_PGSZ_BITS) - 1) << TLB_PCXR_P_PGSZ1_SHIFT)) +#define TLB_CXR_PGSZ_MASK (~TLB_CXR_CTX_MASK) +#define TLB_PCXR_N_IPGSZ0_SHIFT (53) /* SPARC64 VI, VII, VIIIfx */ +#define TLB_PCXR_N_IPGSZ1_SHIFT (50) /* SPARC64 VI, VII, VIIIfx */ #define TLB_PCXR_N_PGSZ0_SHIFT (61) #define TLB_PCXR_N_PGSZ1_SHIFT (58) +#define TLB_PCXR_N_PGSZ_I_SHIFT (55) /* US-IV+ */ +#define TLB_PCXR_P_IPGSZ0_SHIFT (24) /* SPARC64 VI, VII, VIIIfx */ +#define TLB_PCXR_P_IPGSZ1_SHIFT (27) /* SPARC64 VI, VII, VIIIfx */ #define TLB_PCXR_P_PGSZ0_SHIFT (16) #define TLB_PCXR_P_PGSZ1_SHIFT (19) -#define TLB_SCXR_PGSZ_MASK \ - ((((1UL << TLB_CXR_PGSZ_BITS) - 1) << TLB_SCXR_S_PGSZ0_SHIFT) | \ - (((1UL << TLB_CXR_PGSZ_BITS) - 1) << TLB_SCXR_S_PGSZ1_SHIFT)) +/* + * Note that the US-IV+ documentation appears to have TLB_PCXR_P_PGSZ_I_SHIFT + * and TLB_PCXR_P_PGSZ0_SHIFT erroneously inverted. + */ +#define TLB_PCXR_P_PGSZ_I_SHIFT (22) /* US-IV+ */ #define TLB_SCXR_S_PGSZ1_SHIFT (19) #define TLB_SCXR_S_PGSZ0_SHIFT (16) @@ -87,7 +91,7 @@ #define TLB_DEMAP_TYPE_SHIFT (6) #define TLB_DEMAP_TYPE_PAGE (0) #define TLB_DEMAP_TYPE_CONTEXT (1) -#define TLB_DEMAP_TYPE_ALL (2) /* USIII and beyond only */ +#define TLB_DEMAP_TYPE_ALL (2) /* US-III and beyond only */ #define TLB_DEMAP_VA(va) ((va) & ~PAGE_MASK) #define TLB_DEMAP_ID(id) ((id) << TLB_DEMAP_ID_SHIFT) @@ -118,9 +122,17 @@ #define MMU_SFSR_FT_SIZE (6) #define MMU_SFSR_CT_SIZE (2) -#define MMU_SFSR_GET_ASI(sfsr) \ +#define MMU_SFSR_GET_ASI(sfsr) \ (((sfsr) >> MMU_SFSR_ASI_SHIFT) & ((1UL << MMU_SFSR_ASI_SIZE) - 1)) +#define MMU_SFSR_GET_FT(sfsr) \ + (((sfsr) >> MMU_SFSR_FT_SHIFT) & ((1UL << MMU_SFSR_FT_SIZE) - 1)) +#define MMU_SFSR_GET_CT(sfsr) \ + (((sfsr) >> MMU_SFSR_CT_SHIFT) & ((1UL << MMU_SFSR_CT_SIZE) - 1)) + +#define MMU_SFSR_E (1UL << MMU_SFSR_E_SHIFT) +#define MMU_SFSR_PR (1UL << MMU_SFSR_PR_SHIFT) #define MMU_SFSR_W (1UL << MMU_SFSR_W_SHIFT) +#define MMU_SFSR_OW (1UL << MMU_SFSR_OW_SHIFT) #define MMU_SFSR_FV (1UL << MMU_SFSR_FV_SHIFT) typedef void tlb_flush_nonlocked_t(void); Modified: stable/7/sys/sparc64/include/tte.h ============================================================================== --- stable/7/sys/sparc64/include/tte.h Wed Mar 31 21:57:48 2010 (r206009) +++ stable/7/sys/sparc64/include/tte.h Wed Mar 31 21:57:49 2010 (r206010) @@ -36,25 +36,42 @@ #define TD_SIZE_SHIFT (61) #define TD_SOFT2_SHIFT (50) +#define TD_RSVD2_SHIFT (49) +#define TD_SIZE2_SHIFT (48) #define TD_DIAG_SF_SHIFT (41) #define TD_RSVD_CH_SHIFT (43) +#define TD_RSVD_OC_SHIFT (47) +#define TD_RSVD_PT_SHIFT TD_RSVD_CH_SHIFT +#define TD_RSVD_VE_SHIFT (41) #define TD_PA_SHIFT (13) #define TD_SOFT_SHIFT (7) #define TD_SIZE_BITS (2) #define TD_SOFT2_BITS (9) -#define TD_DIAG_SF_BITS (9) -#define TD_RSVD_CH_BITS (7) -#define TD_PA_CH_BITS (30) -#define TD_PA_SF_BITS (28) +#define TD_RSVD2_BITS (1) /* US-IV+, SPARC64 VI, VII, VIIIfx */ +#define TD_SIZE2_BITS (1) /* US-IV+, SPARC64 VI, VII, VIIIfx */ +#define TD_DIAG_SF_BITS (9) /* US-I, II{,e,i} */ +#define TD_RSVD_CH_BITS (7) /* US-III{,i,+}, US-IV, SPARC64 V */ +#define TD_RSVD_OC_BITS (1) /* SPARC64 VI, VII */ +#define TD_RSVD_PT_BITS (5) /* US-IV+, SPARC64 VI, VII */ +#define TD_RSVD_VE_BITS (7) /* SPARC64 VIIIfx */ +#define TD_PA_CH_BITS (30) /* US-III{,i,+}, US-IV{,+}, SPARC64 V */ +#define TD_PA_OC_BITS (34) /* SPARC64 VI, VII */ +#define TD_PA_SF_BITS (28) /* US-I, II{,e,i}, SPARC64 VIIIfx */ #define TD_PA_BITS TD_PA_CH_BITS #define TD_SOFT_BITS (6) #define TD_SIZE_MASK ((1UL << TD_SIZE_BITS) - 1) #define TD_SOFT2_MASK ((1UL << TD_SOFT2_BITS) - 1) +#define TD_RSVD2_MASK ((1UL << TD_RSVD2_BITS) - 1) +#define TD_SIZE2_MASK ((1UL << TD_SIZE2_BITS) - 1) #define TD_DIAG_SF_MASK ((1UL << TD_DIAG_SF_BITS) - 1) #define TD_RSVD_CH_MASK ((1UL << TD_RSVD_CH_BITS) - 1) +#define TD_RSVD_OC_MASK ((1UL << TD_RSVD_OC_BITS) - 1) +#define TD_RSVD_PT_MASK ((1UL << TD_RSVD_PT_BITS) - 1) +#define TD_RSVD_VE_MASK ((1UL << TD_RSVD_VE_BITS) - 1) #define TD_PA_CH_MASK ((1UL << TD_PA_CH_BITS) - 1) +#define TD_PA_OC_MASK ((1UL << TD_PA_OC_BITS) - 1) #define TD_PA_SF_MASK ((1UL << TD_PA_SF_BITS) - 1) #define TD_PA_MASK ((1UL << TD_PA_BITS) - 1) #define TD_SOFT_MASK ((1UL << TD_SOFT_BITS) - 1) @@ -63,6 +80,9 @@ #define TS_64K (1UL) #define TS_512K (2UL) #define TS_4M (3UL) +#define TS_32M (4UL) /* US-IV+, SPARC64 VI, VII only */ +#define TS_256M (5UL) /* US-IV+, SPARC64 VI, VII only */ +#define TS_2G (6UL) /* SPARC64 VIIIfx only */ #define TS_MIN TS_8K #define TS_MAX TS_4M @@ -72,6 +92,15 @@ #define TD_64K (TS_64K << TD_SIZE_SHIFT) #define TD_512K (TS_512K << TD_SIZE_SHIFT) #define TD_4M (TS_4M << TD_SIZE_SHIFT) +#define TD_32M \ + (((TS_32M & TD_SIZE_MASK) << TD_SIZE_SHIFT) | \ + (TD_SIZE2_MASK << TD_SIZE2_SHIFT)) +#define TD_256M \ + (((TS_256M & TD_SIZE_MASK) << TD_SIZE_SHIFT) | \ + (TD_SIZE2_MASK << TD_SIZE2_SHIFT)) +#define TD_2G \ + (((TS_2G & TD_SIZE_MASK) << TD_SIZE_SHIFT) | \ + (TD_SIZE2_MASK << TD_SIZE2_SHIFT)) #define TD_NFO (1UL << 60) #define TD_IE (1UL << 59) #define TD_PA(pa) ((pa) & (TD_PA_MASK << TD_PA_SHIFT)) @@ -94,29 +123,28 @@ #define TV_VPN(va, sz) ((((va) >> TTE_PAGE_SHIFT(sz)) << TV_SIZE_BITS) | sz) #define TTE_SIZE_SPREAD (3) -#define TTE_PAGE_SHIFT(sz) \ +#define TTE_PAGE_SHIFT(sz) \ (PAGE_SHIFT + ((sz) * TTE_SIZE_SPREAD)) -#define TTE_GET_SIZE(tp) \ +#define TTE_GET_SIZE(tp) \ (((tp)->tte_data >> TD_SIZE_SHIFT) & TD_SIZE_MASK) -#define TTE_GET_PAGE_SHIFT(tp) \ +#define TTE_GET_PAGE_SHIFT(tp) \ TTE_PAGE_SHIFT(TTE_GET_SIZE(tp)) -#define TTE_GET_PAGE_SIZE(tp) \ +#define TTE_GET_PAGE_SIZE(tp) \ (1 << TTE_GET_PAGE_SHIFT(tp)) -#define TTE_GET_PAGE_MASK(tp) \ +#define TTE_GET_PAGE_MASK(tp) \ (TTE_GET_PAGE_SIZE(tp) - 1) -#define TTE_GET_PA(tp) \ +#define TTE_GET_PA(tp) \ ((tp)->tte_data & (TD_PA_MASK << TD_PA_SHIFT)) -#define TTE_GET_VPN(tp) \ +#define TTE_GET_VPN(tp) \ ((tp)->tte_vpn >> TV_SIZE_BITS) -#define TTE_GET_VA(tp) \ +#define TTE_GET_VA(tp) \ (TTE_GET_VPN(tp) << TTE_GET_PAGE_SHIFT(tp)) -#define TTE_GET_PMAP(tp) \ - (((tp)->tte_data & TD_P) != 0 ? \ - (kernel_pmap) : \ - (PHYS_TO_VM_PAGE(pmap_kextract((vm_offset_t)(tp)))->md.pmap)) -#define TTE_ZERO(tp) \ +#define TTE_GET_PMAP(tp) \ + (((tp)->tte_data & TD_P) != 0 ? (kernel_pmap) : \ + (PHYS_TO_VM_PAGE(pmap_kextract((vm_offset_t)(tp)))->md.pmap)) +#define TTE_ZERO(tp) \ memset(tp, 0, sizeof(*tp)) struct pmap; @@ -130,6 +158,7 @@ struct tte { static __inline int tte_match(struct tte *tp, vm_offset_t va) { + return (((tp->tte_data & TD_V) != 0) && (tp->tte_vpn == TV_VPN(va, TTE_GET_SIZE(tp)))); } Modified: stable/7/sys/sparc64/sparc64/genassym.c ============================================================================== --- stable/7/sys/sparc64/sparc64/genassym.c Wed Mar 31 21:57:48 2010 (r206009) +++ stable/7/sys/sparc64/sparc64/genassym.c Wed Mar 31 21:57:49 2010 (r206010) @@ -139,7 +139,7 @@ ASSYM(TD_W, TD_W); ASSYM(TS_MIN, TS_MIN); ASSYM(TS_MAX, TS_MAX); ASSYM(TLB_DAR_SLOT_SHIFT, TLB_DAR_SLOT_SHIFT); -ASSYM(TLB_PCXR_PGSZ_MASK, TLB_PCXR_PGSZ_MASK); +ASSYM(TLB_CXR_PGSZ_MASK, TLB_CXR_PGSZ_MASK); ASSYM(TLB_DIRECT_TO_TTE_MASK, TLB_DIRECT_TO_TTE_MASK); ASSYM(TV_SIZE_BITS, TV_SIZE_BITS); #endif Modified: stable/7/sys/sparc64/sparc64/pmap.c ============================================================================== --- stable/7/sys/sparc64/sparc64/pmap.c Wed Mar 31 21:57:48 2010 (r206009) +++ stable/7/sys/sparc64/sparc64/pmap.c Wed Mar 31 21:57:49 2010 (r206010) @@ -566,7 +566,7 @@ pmap_map_tsb(void) * FP block operations in the kernel). */ stxa(AA_DMMU_SCXR, ASI_DMMU, (ldxa(AA_DMMU_SCXR, ASI_DMMU) & - TLB_SCXR_PGSZ_MASK) | TLB_CTX_KERNEL); + TLB_CXR_PGSZ_MASK) | TLB_CTX_KERNEL); flush(KERNBASE); intr_restore(s); @@ -1964,7 +1964,7 @@ pmap_activate(struct thread *td) stxa(AA_DMMU_TSB, ASI_DMMU, pm->pm_tsb); stxa(AA_IMMU_TSB, ASI_IMMU, pm->pm_tsb); stxa(AA_DMMU_PCXR, ASI_DMMU, (ldxa(AA_DMMU_PCXR, ASI_DMMU) & - TLB_PCXR_PGSZ_MASK) | context); + TLB_CXR_PGSZ_MASK) | context); flush(KERNBASE); mtx_unlock_spin(&sched_lock); Modified: stable/7/sys/sparc64/sparc64/swtch.S ============================================================================== --- stable/7/sys/sparc64/sparc64/swtch.S Wed Mar 31 21:57:48 2010 (r206009) +++ stable/7/sys/sparc64/sparc64/swtch.S Wed Mar 31 21:57:49 2010 (r206010) @@ -237,7 +237,7 @@ ENTRY(cpu_switch) stxa %i4, [%i5] ASI_DMMU mov AA_IMMU_TSB, %i5 stxa %i4, [%i5] ASI_IMMU - setx TLB_PCXR_PGSZ_MASK, %i5, %i4 + setx TLB_CXR_PGSZ_MASK, %i5, %i4 mov AA_DMMU_PCXR, %i5 ldxa [%i5] ASI_DMMU, %l1 and %l1, %i4, %l1 From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 22:00:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61FB8106566B; Wed, 31 Mar 2010 22:00:22 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5041C8FC08; Wed, 31 Mar 2010 22:00:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2VM0MgK034904; Wed, 31 Mar 2010 22:00:22 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VM0McW034902; Wed, 31 Mar 2010 22:00:22 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003312200.o2VM0McW034902@svn.freebsd.org> From: Marius Strobl Date: Wed, 31 Mar 2010 22:00:22 +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: r206011 - stable/8/sys/sparc64/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 22:00:22 -0000 Author: marius Date: Wed Mar 31 22:00:22 2010 New Revision: 206011 URL: http://svn.freebsd.org/changeset/base/206011 Log: MFC: r205263 Add macros for the VER.impl of SPARC64 II to VIIIfx. Modified: stable/8/sys/sparc64/include/ver.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/sparc64/include/ver.h ============================================================================== --- stable/8/sys/sparc64/include/ver.h Wed Mar 31 21:57:49 2010 (r206010) +++ stable/8/sys/sparc64/include/ver.h Wed Mar 31 22:00:22 2010 (r206011) @@ -69,8 +69,15 @@ extern char sparc64_model[]; #endif /* !LOCORE */ -/* Known implementations. */ +/* Known implementations */ #define CPU_IMPL_SPARC64 0x01 +#define CPU_IMPL_SPARC64II 0x02 +#define CPU_IMPL_SPARC64III 0x03 +#define CPU_IMPL_SPARC64IV 0x04 +#define CPU_IMPL_SPARC64V 0x05 +#define CPU_IMPL_SPARC64VI 0x06 +#define CPU_IMPL_SPARC64VII 0x07 +#define CPU_IMPL_SPARC64VIIIfx 0x08 #define CPU_IMPL_ULTRASPARCI 0x10 #define CPU_IMPL_ULTRASPARCII 0x11 #define CPU_IMPL_ULTRASPARCIIi 0x12 From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 22:00:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE351106566C; Wed, 31 Mar 2010 22:00:22 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CC5DC8FC0A; Wed, 31 Mar 2010 22:00:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2VM0M9F034925; Wed, 31 Mar 2010 22:00:22 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VM0M4B034923; Wed, 31 Mar 2010 22:00:22 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003312200.o2VM0M4B034923@svn.freebsd.org> From: Marius Strobl Date: Wed, 31 Mar 2010 22:00:22 +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: r206012 - stable/7/sys/sparc64/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 22:00:23 -0000 Author: marius Date: Wed Mar 31 22:00:22 2010 New Revision: 206012 URL: http://svn.freebsd.org/changeset/base/206012 Log: MFC: r205263 Add macros for the VER.impl of SPARC64 II to VIIIfx. Modified: stable/7/sys/sparc64/include/ver.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/include/ver.h ============================================================================== --- stable/7/sys/sparc64/include/ver.h Wed Mar 31 22:00:22 2010 (r206011) +++ stable/7/sys/sparc64/include/ver.h Wed Mar 31 22:00:22 2010 (r206012) @@ -69,8 +69,15 @@ extern char sparc64_model[]; #endif /* !LOCORE */ -/* Known implementations. */ +/* Known implementations */ #define CPU_IMPL_SPARC64 0x01 +#define CPU_IMPL_SPARC64II 0x02 +#define CPU_IMPL_SPARC64III 0x03 +#define CPU_IMPL_SPARC64IV 0x04 +#define CPU_IMPL_SPARC64V 0x05 +#define CPU_IMPL_SPARC64VI 0x06 +#define CPU_IMPL_SPARC64VII 0x07 +#define CPU_IMPL_SPARC64VIIIfx 0x08 #define CPU_IMPL_ULTRASPARCI 0x10 #define CPU_IMPL_ULTRASPARCII 0x11 #define CPU_IMPL_ULTRASPARCIIi 0x12 From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 22:05:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09F7D1065672; Wed, 31 Mar 2010 22:05:50 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EC1F58FC12; Wed, 31 Mar 2010 22:05: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 o2VM5nIF036216; Wed, 31 Mar 2010 22:05:49 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VM5nt1036214; Wed, 31 Mar 2010 22:05:49 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003312205.o2VM5nt1036214@svn.freebsd.org> From: Marius Strobl Date: Wed, 31 Mar 2010 22:05:49 +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: r206013 - stable/8/sys/sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Mar 2010 22:05:50 -0000 Author: marius Date: Wed Mar 31 22:05:49 2010 New Revision: 206013 URL: http://svn.freebsd.org/changeset/base/206013 Log: MFC: r205399 Improve the KVA space sizing of r186682; on machines with large dTLBs we can actually use all of the available lockable entries of the tiny dTLB for the kernel TSB. With this change the KVA space sizing happens to be more in line with the MI one so up to at least 24GB machines KVA doesn't need to be limited manually. This is just another stopgap though, the real solution is to take advantage of ASI_ATOMIC_QUAD_LDD_PHYS on CPUs providing it so we don't need to lock the kernel TSB pages into the dTLB in the first place. Modified: stable/8/sys/sparc64/sparc64/pmap.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/sparc64/sparc64/pmap.c ============================================================================== --- stable/8/sys/sparc64/sparc64/pmap.c Wed Mar 31 22:00:22 2010 (r206012) +++ stable/8/sys/sparc64/sparc64/pmap.c Wed Mar 31 22:05:49 2010 (r206013) @@ -236,6 +236,8 @@ PMAP_STATS_VAR(pmap_ncopy_page_soc); PMAP_STATS_VAR(pmap_nnew_thread); PMAP_STATS_VAR(pmap_nnew_thread_oc); +static inline u_long dtlb_get_data(u_int slot); + /* * Quick sort callout for comparing memory regions */ @@ -274,6 +276,18 @@ om_cmp(const void *a, const void *b) return (0); } +static inline u_long +dtlb_get_data(u_int slot) +{ + + /* + * We read ASI_DTLB_DATA_ACCESS_REG twice in order to work + * around errata of USIII and beyond. + */ + (void)ldxa(TLB_DAR_SLOT(slot), ASI_DTLB_DATA_ACCESS_REG); + return (ldxa(TLB_DAR_SLOT(slot), ASI_DTLB_DATA_ACCESS_REG)); +} + /* * Bootstrap the system enough to run with virtual memory. */ @@ -287,11 +301,13 @@ pmap_bootstrap(u_int cpu_impl) vm_paddr_t pa; vm_size_t physsz; vm_size_t virtsz; + u_long data; phandle_t pmem; phandle_t vmem; - int sz; + u_int dtlb_slots_avail; int i; int j; + int sz; /* * Find out what physical memory is available from the PROM and @@ -336,22 +352,30 @@ pmap_bootstrap(u_int cpu_impl) /* * Calculate the size of kernel virtual memory, and the size and mask * for the kernel TSB based on the phsyical memory size but limited - * by letting the kernel TSB take up no more than half of the dTLB - * slots available for locked entries. - */ + * by the amount of dTLB slots available for locked entries (given + * that for spitfire-class CPUs all of the dt64 slots can hold locked + * entries but there is no large dTLB for unlocked ones, we don't use + * more than half of it for locked entries). + */ + dtlb_slots_avail = 0; + for (i = 0; i < dtlb_slots; i++) { + data = dtlb_get_data(i); + if ((data & (TD_V | TD_L)) != (TD_V | TD_L)) + dtlb_slots_avail++; + } +#ifdef SMP + dtlb_slots_avail -= PCPU_PAGES; +#endif + if (cpu_impl >= CPU_IMPL_ULTRASPARCI && + cpu_impl < CPU_IMPL_ULTRASPARCIII) + dtlb_slots_avail /= 2; virtsz = roundup(physsz, PAGE_SIZE_4M << (PAGE_SHIFT - TTE_SHIFT)); virtsz = MIN(virtsz, - (dtlb_slots / 2 * PAGE_SIZE_4M) << (PAGE_SHIFT - TTE_SHIFT)); + (dtlb_slots_avail * PAGE_SIZE_4M) << (PAGE_SHIFT - TTE_SHIFT)); vm_max_kernel_address = VM_MIN_KERNEL_ADDRESS + virtsz; tsb_kernel_size = virtsz >> (PAGE_SHIFT - TTE_SHIFT); tsb_kernel_mask = (tsb_kernel_size >> TTE_SHIFT) - 1; - if (kernel_tlb_slots + PCPU_PAGES + tsb_kernel_size / PAGE_SIZE_4M + - 1 /* PROM page */ + 1 /* spare */ > dtlb_slots) - panic("pmap_bootstrap: insufficient dTLB entries"); - if (kernel_tlb_slots + 1 /* PROM page */ + 1 /* spare */ > itlb_slots) - panic("pmap_bootstrap: insufficient iTLB entries"); - /* * Allocate the kernel TSB and lock it in the TLB. */ From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 22:05:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 287BE106566B; Wed, 31 Mar 2010 22:05:54 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 162628FC16; Wed, 31 Mar 2010 22:05: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 o2VM5r42036247; Wed, 31 Mar 2010 22:05:53 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VM5rML036245; Wed, 31 Mar 2010 22:05:53 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003312205.o2VM5rML036245@svn.freebsd.org> From: Marius Strobl Date: Wed, 31 Mar 2010 22:05: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: r206014 - stable/7/sys/sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Mar 2010 22:05:54 -0000 Author: marius Date: Wed Mar 31 22:05:53 2010 New Revision: 206014 URL: http://svn.freebsd.org/changeset/base/206014 Log: MFC: r205399 Improve the KVA space sizing of r186682 (r190080); on machines with large dTLBs we can actually use all of the available lockable entries of the tiny dTLB for the kernel TSB. With this change the KVA space sizing happens to be more in line with the MI one so up to at least 24GB machines KVA doesn't need to be limited manually. This is just another stopgap though, the real solution is to take advantage of ASI_ATOMIC_QUAD_LDD_PHYS on CPUs providing it so we don't need to lock the kernel TSB pages into the dTLB in the first place. Modified: stable/7/sys/sparc64/sparc64/pmap.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/sparc64/pmap.c ============================================================================== --- stable/7/sys/sparc64/sparc64/pmap.c Wed Mar 31 22:05:49 2010 (r206013) +++ stable/7/sys/sparc64/sparc64/pmap.c Wed Mar 31 22:05:53 2010 (r206014) @@ -236,6 +236,8 @@ PMAP_STATS_VAR(pmap_ncopy_page_soc); PMAP_STATS_VAR(pmap_nnew_thread); PMAP_STATS_VAR(pmap_nnew_thread_oc); +static inline u_long dtlb_get_data(u_int slot); + /* * Quick sort callout for comparing memory regions */ @@ -274,6 +276,18 @@ om_cmp(const void *a, const void *b) return (0); } +static inline u_long +dtlb_get_data(u_int slot) +{ + + /* + * We read ASI_DTLB_DATA_ACCESS_REG twice in order to work + * around errata of USIII and beyond. + */ + (void)ldxa(TLB_DAR_SLOT(slot), ASI_DTLB_DATA_ACCESS_REG); + return (ldxa(TLB_DAR_SLOT(slot), ASI_DTLB_DATA_ACCESS_REG)); +} + /* * Bootstrap the system enough to run with virtual memory. */ @@ -287,11 +301,13 @@ pmap_bootstrap(u_int cpu_impl) vm_paddr_t pa; vm_size_t physsz; vm_size_t virtsz; + u_long data; phandle_t pmem; phandle_t vmem; - int sz; + u_int dtlb_slots_avail; int i; int j; + int sz; /* * Find out what physical memory is available from the PROM and @@ -336,22 +352,30 @@ pmap_bootstrap(u_int cpu_impl) /* * Calculate the size of kernel virtual memory, and the size and mask * for the kernel TSB based on the phsyical memory size but limited - * by letting the kernel TSB take up no more than half of the dTLB - * slots available for locked entries. - */ + * by the amount of dTLB slots available for locked entries (given + * that for spitfire-class CPUs all of the dt64 slots can hold locked + * entries but there is no large dTLB for unlocked ones, we don't use + * more than half of it for locked entries). + */ + dtlb_slots_avail = 0; + for (i = 0; i < dtlb_slots; i++) { + data = dtlb_get_data(i); + if ((data & (TD_V | TD_L)) != (TD_V | TD_L)) + dtlb_slots_avail++; + } +#ifdef SMP + dtlb_slots_avail -= PCPU_PAGES; +#endif + if (cpu_impl >= CPU_IMPL_ULTRASPARCI && + cpu_impl < CPU_IMPL_ULTRASPARCIII) + dtlb_slots_avail /= 2; virtsz = roundup(physsz, PAGE_SIZE_4M << (PAGE_SHIFT - TTE_SHIFT)); virtsz = MIN(virtsz, - (dtlb_slots / 2 * PAGE_SIZE_4M) << (PAGE_SHIFT - TTE_SHIFT)); + (dtlb_slots_avail * PAGE_SIZE_4M) << (PAGE_SHIFT - TTE_SHIFT)); vm_max_kernel_address = VM_MIN_KERNEL_ADDRESS + virtsz; tsb_kernel_size = virtsz >> (PAGE_SHIFT - TTE_SHIFT); tsb_kernel_mask = (tsb_kernel_size >> TTE_SHIFT) - 1; - if (kernel_tlb_slots + PCPU_PAGES + tsb_kernel_size / PAGE_SIZE_4M + - 1 /* PROM page */ + 1 /* spare */ > dtlb_slots) - panic("pmap_bootstrap: insufficient dTLB entries"); - if (kernel_tlb_slots + 1 /* PROM page */ + 1 /* spare */ > itlb_slots) - panic("pmap_bootstrap: insufficient iTLB entries"); - /* * Allocate the kernel TSB and lock it in the TLB. */ From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 22:11:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 235EC106566B; Wed, 31 Mar 2010 22:11: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 11EEA8FC12; Wed, 31 Mar 2010 22:11: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 o2VMB6MU037485; Wed, 31 Mar 2010 22:11:06 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VMB63m037483; Wed, 31 Mar 2010 22:11:06 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201003312211.o2VMB63m037483@svn.freebsd.org> From: Alexander Motin Date: Wed, 31 Mar 2010 22:11: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: r206015 - head/sys/netgraph X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 22:11:07 -0000 Author: mav Date: Wed Mar 31 22:11:06 2010 New Revision: 206015 URL: http://svn.freebsd.org/changeset/base/206015 Log: Make ng_l2tp irrelevant to data alignment. Modified: head/sys/netgraph/ng_l2tp.c Modified: head/sys/netgraph/ng_l2tp.c ============================================================================== --- head/sys/netgraph/ng_l2tp.c Wed Mar 31 22:05:53 2010 (r206014) +++ head/sys/netgraph/ng_l2tp.c Wed Mar 31 22:11:06 2010 (r206015) @@ -790,7 +790,7 @@ ng_l2tp_rcvdata_lower(hook_p h, item_p i NG_FREE_ITEM(item); ERROUT(EINVAL); } - hdr = ntohs(*mtod(m, u_int16_t *)); + hdr = (mtod(m, uint8_t *)[0] << 8) + mtod(m, uint8_t *)[1]; m_adj(m, 2); /* Check required header bits and minimum length */ @@ -819,7 +819,7 @@ ng_l2tp_rcvdata_lower(hook_p h, item_p i NG_FREE_ITEM(item); ERROUT(EINVAL); } - len = (u_int16_t)ntohs(*mtod(m, u_int16_t *)) - 4; + len = (mtod(m, uint8_t *)[0] << 8) + mtod(m, uint8_t *)[1] - 4; m_adj(m, 2); if (len < 0 || len > m->m_pkthdr.len) { priv->stats.recvInvalid++; @@ -1095,9 +1095,10 @@ ng_l2tp_rcvdata(hook_p hook, item_p item const priv_p priv = NG_NODE_PRIVATE(NG_HOOK_NODE(hook)); const hookpriv_p hpriv = NG_HOOK_PRIVATE(hook); struct mbuf *m; + uint8_t *p; u_int16_t hdr; int error; - int i = 1; + int i = 2; /* Sanity check */ L2TP_SEQ_CHECK(&priv->seq); @@ -1129,20 +1130,27 @@ ng_l2tp_rcvdata(hook_p hook, item_p item NG_FREE_ITEM(item); ERROUT(ENOBUFS); } + p = mtod(m, uint8_t *); hdr = L2TP_DATA_HDR; if (hpriv->conf.include_length) { hdr |= L2TP_HDR_LEN; - mtod(m, u_int16_t *)[i++] = htons(m->m_pkthdr.len); + p[i++] = m->m_pkthdr.len >> 8; + p[i++] = m->m_pkthdr.len & 0xff; } - mtod(m, u_int16_t *)[i++] = htons(priv->conf.peer_id); - mtod(m, u_int16_t *)[i++] = htons(hpriv->conf.peer_id); + p[i++] = priv->conf.peer_id >> 8; + p[i++] = priv->conf.peer_id & 0xff; + p[i++] = hpriv->conf.peer_id >> 8; + p[i++] = hpriv->conf.peer_id & 0xff; if (hpriv->conf.enable_dseq) { hdr |= L2TP_HDR_SEQ; - mtod(m, u_int16_t *)[i++] = htons(hpriv->ns); - mtod(m, u_int16_t *)[i++] = htons(hpriv->nr); + p[i++] = hpriv->ns >> 8; + p[i++] = hpriv->ns & 0xff; + p[i++] = hpriv->nr >> 8; + p[i++] = hpriv->nr & 0xff; hpriv->ns++; } - mtod(m, u_int16_t *)[0] = htons(hdr); + p[0] = hdr >> 8; + p[1] = hdr & 0xff; /* Update per session stats. */ hpriv->stats.xmitPackets++; @@ -1496,6 +1504,7 @@ static int ng_l2tp_xmit_ctrl(priv_p priv, struct mbuf *m, u_int16_t ns) { struct l2tp_seq *const seq = &priv->seq; + uint8_t *p; u_int16_t session_id = 0; int error; @@ -1540,12 +1549,19 @@ ng_l2tp_xmit_ctrl(priv_p priv, struct mb } /* Fill in L2TP header */ - mtod(m, u_int16_t *)[0] = htons(L2TP_CTRL_HDR); - mtod(m, u_int16_t *)[1] = htons(m->m_pkthdr.len); - mtod(m, u_int16_t *)[2] = htons(priv->conf.peer_id); - mtod(m, u_int16_t *)[3] = htons(session_id); - mtod(m, u_int16_t *)[4] = htons(ns); - mtod(m, u_int16_t *)[5] = htons(seq->nr); + p = mtod(m, u_int8_t *); + p[0] = L2TP_CTRL_HDR >> 8; + p[1] = L2TP_CTRL_HDR & 0xff; + p[2] = m->m_pkthdr.len >> 8; + p[3] = m->m_pkthdr.len & 0xff; + p[4] = priv->conf.peer_id >> 8; + p[5] = priv->conf.peer_id & 0xff; + p[6] = session_id >> 8; + p[7] = session_id & 0xff; + p[8] = ns >> 8; + p[9] = ns & 0xff; + p[10] = seq->nr >> 8; + p[11] = seq->nr & 0xff; /* Update sequence number info and stats */ priv->stats.xmitPackets++; From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 22:16:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B502E106564A; Wed, 31 Mar 2010 22:16:05 +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 A40D18FC14; Wed, 31 Mar 2010 22:16: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 o2VMG5al038647; Wed, 31 Mar 2010 22:16:05 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VMG5L7038645; Wed, 31 Mar 2010 22:16:05 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201003312216.o2VMG5L7038645@svn.freebsd.org> From: Alexander Motin Date: Wed, 31 Mar 2010 22:16: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: r206017 - head/sys/netgraph X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 22:16:05 -0000 Author: mav Date: Wed Mar 31 22:16:05 2010 New Revision: 206017 URL: http://svn.freebsd.org/changeset/base/206017 Log: Make ng_ksocket fulfill lower protocol stack layers alignment requirements on platforms with strict alignment constraints. This fixes kernel panics on arm and probably other architectures. PR: sparc64/80410 Modified: head/sys/netgraph/ng_ksocket.c Modified: head/sys/netgraph/ng_ksocket.c ============================================================================== --- head/sys/netgraph/ng_ksocket.c Wed Mar 31 22:11:19 2010 (r206016) +++ head/sys/netgraph/ng_ksocket.c Wed Mar 31 22:16:05 2010 (r206017) @@ -902,12 +902,24 @@ ng_ksocket_rcvdata(hook_p hook, item_p i struct sockaddr *sa = NULL; int error; struct mbuf *m; +#ifdef ALIGNED_POINTER + struct mbuf *n; +#endif /* ALIGNED_POINTER */ struct sa_tag *stag; /* Extract data */ NGI_GET_M(item, m); NG_FREE_ITEM(item); - +#ifdef ALIGNED_POINTER + if (!ALIGNED_POINTER(mtod(m, caddr_t), uint32_t)) { + n = m_defrag(m, M_NOWAIT); + if (n == NULL) { + m_freem(m); + return (ENOBUFS); + } + m = n; + } +#endif /* ALIGNED_POINTER */ /* * Look if socket address is stored in packet tags. * If sockaddr is ours, or provided by a third party (zero id), From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 22:19:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1185F106566C; Wed, 31 Mar 2010 22:19:01 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F37918FC19; Wed, 31 Mar 2010 22: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 o2VMJ0uO039299; Wed, 31 Mar 2010 22:19:00 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VMJ0DX039294; Wed, 31 Mar 2010 22:19:00 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003312219.o2VMJ0DX039294@svn.freebsd.org> From: Marius Strobl Date: Wed, 31 Mar 2010 22:19: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: r206018 - in head/sys/sparc64: fhc pci sbus X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Mar 2010 22:19:01 -0000 Author: marius Date: Wed Mar 31 22:19:00 2010 New Revision: 206018 URL: http://svn.freebsd.org/changeset/base/206018 Log: - Take advantage of the INTCLR_* macros. - Right-justify the backslashes as per style(9). Modified: head/sys/sparc64/fhc/fhc.c head/sys/sparc64/pci/psycho.c head/sys/sparc64/pci/schizo.c head/sys/sparc64/sbus/sbus.c Modified: head/sys/sparc64/fhc/fhc.c ============================================================================== --- head/sys/sparc64/fhc/fhc.c Wed Mar 31 22:16:05 2010 (r206017) +++ head/sys/sparc64/fhc/fhc.c Wed Mar 31 22:19:00 2010 (r206018) @@ -208,7 +208,7 @@ fhc_attach(device_t dev) printf("model unknown\n"); for (i = FHC_FANFAIL; i <= FHC_TOD; i++) { - bus_write_4(sc->sc_memres[i], FHC_ICLR, 0x0); + bus_write_4(sc->sc_memres[i], FHC_ICLR, INTCLR_IDLE); (void)bus_read_4(sc->sc_memres[i], FHC_ICLR); } @@ -391,7 +391,7 @@ fhc_intr_clear(void *arg) struct intr_vector *iv = arg; struct fhc_icarg *fica = iv->iv_icarg; - bus_write_4(fica->fica_memres, FHC_ICLR, 0x0); + bus_write_4(fica->fica_memres, FHC_ICLR, INTCLR_IDLE); (void)bus_read_4(fica->fica_memres, FHC_ICLR); } Modified: head/sys/sparc64/pci/psycho.c ============================================================================== --- head/sys/sparc64/pci/psycho.c Wed Mar 31 22:16:05 2010 (r206017) +++ head/sys/sparc64/pci/psycho.c Wed Mar 31 22:19:00 2010 (r206018) @@ -188,13 +188,13 @@ struct psycho_dma_sync { uint8_t pds_func; /* func. of farest PCI dev. */ }; -#define PSYCHO_READ8(sc, off) \ +#define PSYCHO_READ8(sc, off) \ bus_read_8((sc)->sc_mem_res, (off)) -#define PSYCHO_WRITE8(sc, off, v) \ +#define PSYCHO_WRITE8(sc, off, v) \ bus_write_8((sc)->sc_mem_res, (off), (v)) -#define PCICTL_READ8(sc, off) \ +#define PCICTL_READ8(sc, off) \ PSYCHO_READ8((sc), (sc)->sc_pcictl + (off)) -#define PCICTL_WRITE8(sc, off, v) \ +#define PCICTL_WRITE8(sc, off, v) \ PSYCHO_WRITE8((sc), (sc)->sc_pcictl + (off), (v)) /* @@ -523,7 +523,7 @@ psycho_attach(device_t dev) (u_long)intrmap, (u_long)PSYCHO_READ8(sc, intrmap), (u_long)intrclr); PSYCHO_WRITE8(sc, intrmap, INTMAP_VEC(sc->sc_ign, i)); - PSYCHO_WRITE8(sc, intrclr, 0); + PSYCHO_WRITE8(sc, intrclr, INTCLR_IDLE); PSYCHO_WRITE8(sc, intrmap, INTMAP_ENABLE(INTMAP_VEC(sc->sc_ign, i), PCPU_GET(mid))); @@ -1137,7 +1137,7 @@ psycho_intr_clear(void *arg) struct intr_vector *iv = arg; struct psycho_icarg *pica = iv->iv_icarg; - PSYCHO_WRITE8(pica->pica_sc, pica->pica_clr, 0); + PSYCHO_WRITE8(pica->pica_sc, pica->pica_clr, INTCLR_IDLE); } static int Modified: head/sys/sparc64/pci/schizo.c ============================================================================== --- head/sys/sparc64/pci/schizo.c Wed Mar 31 22:16:05 2010 (r206017) +++ head/sys/sparc64/pci/schizo.c Wed Mar 31 22:19:00 2010 (r206018) @@ -189,26 +189,26 @@ struct schizo_dma_sync { #define SCHIZO_PERF_CNT_QLTY 100 -#define SCHIZO_SPC_READ_8(spc, sc, offs) \ +#define SCHIZO_SPC_READ_8(spc, sc, offs) \ bus_read_8((sc)->sc_mem_res[(spc)], (offs)) -#define SCHIZO_SPC_WRITE_8(spc, sc, offs, v) \ +#define SCHIZO_SPC_WRITE_8(spc, sc, offs, v) \ bus_write_8((sc)->sc_mem_res[(spc)], (offs), (v)) -#define SCHIZO_PCI_READ_8(sc, offs) \ +#define SCHIZO_PCI_READ_8(sc, offs) \ SCHIZO_SPC_READ_8(STX_PCI, (sc), (offs)) -#define SCHIZO_PCI_WRITE_8(sc, offs, v) \ +#define SCHIZO_PCI_WRITE_8(sc, offs, v) \ SCHIZO_SPC_WRITE_8(STX_PCI, (sc), (offs), (v)) -#define SCHIZO_CTRL_READ_8(sc, offs) \ +#define SCHIZO_CTRL_READ_8(sc, offs) \ SCHIZO_SPC_READ_8(STX_CTRL, (sc), (offs)) -#define SCHIZO_CTRL_WRITE_8(sc, offs, v) \ +#define SCHIZO_CTRL_WRITE_8(sc, offs, v) \ SCHIZO_SPC_WRITE_8(STX_CTRL, (sc), (offs), (v)) -#define SCHIZO_PCICFG_READ_8(sc, offs) \ +#define SCHIZO_PCICFG_READ_8(sc, offs) \ SCHIZO_SPC_READ_8(STX_PCICFG, (sc), (offs)) -#define SCHIZO_PCICFG_WRITE_8(sc, offs, v) \ +#define SCHIZO_PCICFG_WRITE_8(sc, offs, v) \ SCHIZO_SPC_WRITE_8(STX_PCICFG, (sc), (offs), (v)) -#define SCHIZO_ICON_READ_8(sc, offs) \ +#define SCHIZO_ICON_READ_8(sc, offs) \ SCHIZO_SPC_READ_8(STX_ICON, (sc), (offs)) -#define SCHIZO_ICON_WRITE_8(sc, offs, v) \ +#define SCHIZO_ICON_WRITE_8(sc, offs, v) \ SCHIZO_SPC_WRITE_8(STX_ICON, (sc), (offs), (v)) struct schizo_desc { @@ -1077,7 +1077,7 @@ schizo_dma_sync_stub(void *arg) for (; atomic_cmpset_acq_32(&sc->sc_cdma_state, SCHIZO_CDMA_STATE_DONE, SCHIZO_CDMA_STATE_PENDING) == 0;) ; - SCHIZO_PCI_WRITE_8(sc, sc->sc_cdma_clr, 1); + SCHIZO_PCI_WRITE_8(sc, sc->sc_cdma_clr, INTCLR_RECEIVED); microuptime(&cur); end.tv_sec = 1; end.tv_usec = 0; @@ -1162,7 +1162,7 @@ schizo_intr_clear(void *arg) struct intr_vector *iv = arg; struct schizo_icarg *sica = iv->iv_icarg; - SCHIZO_PCI_WRITE_8(sica->sica_sc, sica->sica_clr, 0); + SCHIZO_PCI_WRITE_8(sica->sica_sc, sica->sica_clr, INTCLR_IDLE); } static int Modified: head/sys/sparc64/sbus/sbus.c ============================================================================== --- head/sys/sparc64/sbus/sbus.c Wed Mar 31 22:16:05 2010 (r206017) +++ head/sys/sparc64/sbus/sbus.c Wed Mar 31 22:19:00 2010 (r206018) @@ -171,9 +171,9 @@ struct sbus_softc { void *sc_pf_ihand; }; -#define SYSIO_READ8(sc, off) \ +#define SYSIO_READ8(sc, off) \ bus_read_8((sc)->sc_sysio_res, (off)) -#define SYSIO_WRITE8(sc, off, v) \ +#define SYSIO_WRITE8(sc, off, v) \ bus_write_8((sc)->sc_sysio_res, (off), (v)) static device_probe_t sbus_probe; @@ -697,7 +697,7 @@ sbus_intr_clear(void *arg) struct intr_vector *iv = arg; struct sbus_icarg *sica = iv->iv_icarg; - SYSIO_WRITE8(sica->sica_sc, sica->sica_clr, 0); + SYSIO_WRITE8(sica->sica_sc, sica->sica_clr, INTCLR_IDLE); } static int From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 22:27:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9EE4C1065672; Wed, 31 Mar 2010 22:27:33 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 738D78FC1D; Wed, 31 Mar 2010 22:27: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 o2VMRXKb041275; Wed, 31 Mar 2010 22:27:33 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VMRXPV041273; Wed, 31 Mar 2010 22:27:33 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003312227.o2VMRXPV041273@svn.freebsd.org> From: Marius Strobl Date: Wed, 31 Mar 2010 22:27: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: r206019 - head/sys/sparc64/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: Wed, 31 Mar 2010 22:27:33 -0000 Author: marius Date: Wed Mar 31 22:27:33 2010 New Revision: 206019 URL: http://svn.freebsd.org/changeset/base/206019 Log: Don't re-implement device_get_nameunit(9). Modified: head/sys/sparc64/pci/apb.c Modified: head/sys/sparc64/pci/apb.c ============================================================================== --- head/sys/sparc64/pci/apb.c Wed Mar 31 22:19:00 2010 (r206018) +++ head/sys/sparc64/pci/apb.c Wed Mar 31 22:27:33 2010 (r206019) @@ -223,8 +223,7 @@ apb_alloc_resource(device_t dev, device_ */ if (start == 0 && end == ~0) { device_printf(dev, "can't decode default resource id %d for " - "%s%d, bypassing\n", *rid, device_get_name(child), - device_get_unit(child)); + "%s, bypassing\n", *rid, device_get_nameunit(child)); goto passup; } @@ -236,31 +235,28 @@ apb_alloc_resource(device_t dev, device_ switch (type) { case SYS_RES_IOPORT: if (!apb_checkrange(sc->sc_iomap, APB_IO_SCALE, start, end)) { - device_printf(dev, "device %s%d requested unsupported " - "I/O range 0x%lx-0x%lx\n", device_get_name(child), - device_get_unit(child), start, end); + device_printf(dev, "device %s requested unsupported " + "I/O range 0x%lx-0x%lx\n", + device_get_nameunit(child), start, end); return (NULL); } if (bootverbose) device_printf(sc->sc_bsc.ops_pcib_sc.dev, "device " - "%s%d requested decoded I/O range 0x%lx-0x%lx\n", - device_get_name(child), device_get_unit(child), - start, end); + "%s requested decoded I/O range 0x%lx-0x%lx\n", + device_get_nameunit(child), start, end); break; case SYS_RES_MEMORY: if (!apb_checkrange(sc->sc_memmap, APB_MEM_SCALE, start, end)) { - device_printf(dev, "device %s%d requested unsupported " + device_printf(dev, "device %s requested unsupported " "memory range 0x%lx-0x%lx\n", - device_get_name(child), device_get_unit(child), - start, end); + device_get_nameunit(child), start, end); return (NULL); } if (bootverbose) device_printf(sc->sc_bsc.ops_pcib_sc.dev, "device " - "%s%d requested decoded memory range 0x%lx-0x%lx\n", - device_get_name(child), device_get_unit(child), - start, end); + "%s requested decoded memory range 0x%lx-0x%lx\n", + device_get_nameunit(child), start, end); break; default: From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 22:32:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE270106564A; Wed, 31 Mar 2010 22:32:56 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B28748FC15; Wed, 31 Mar 2010 22:32: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 o2VMWubZ042490; Wed, 31 Mar 2010 22:32:56 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VMWud4042487; Wed, 31 Mar 2010 22:32:56 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003312232.o2VMWud4042487@svn.freebsd.org> From: Marius Strobl Date: Wed, 31 Mar 2010 22:32: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: r206020 - head/sys/sparc64/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: Wed, 31 Mar 2010 22:32:57 -0000 Author: marius Date: Wed Mar 31 22:32:56 2010 New Revision: 206020 URL: http://svn.freebsd.org/changeset/base/206020 Log: Use device_get_nameunit(9) rather than device_get_name(9) so one can identify the reporting bridge in machines with multiple PCI domains. Modified: head/sys/sparc64/pci/psycho.c head/sys/sparc64/pci/schizo.c Modified: head/sys/sparc64/pci/psycho.c ============================================================================== --- head/sys/sparc64/pci/psycho.c Wed Mar 31 22:27:33 2010 (r206019) +++ head/sys/sparc64/pci/psycho.c Wed Mar 31 22:32:56 2010 (r206020) @@ -808,7 +808,7 @@ psycho_ue(void *arg) if ((afsr & UEAFSR_P_DTE) != 0) iommu_decode_fault(sc->sc_is, afar); panic("%s: uncorrectable DMA error AFAR %#lx AFSR %#lx", - device_get_name(sc->sc_dev), (u_long)afar, (u_long)afsr); + device_get_nameunit(sc->sc_dev), (u_long)afar, (u_long)afsr); return (FILTER_HANDLED); } @@ -838,7 +838,7 @@ psycho_pci_bus(void *arg) afar = PCICTL_READ8(sc, PCR_AFA); afsr = PCICTL_READ8(sc, PCR_AFS); panic("%s: PCI bus %c error AFAR %#lx AFSR %#lx", - device_get_name(sc->sc_dev), 'A' + sc->sc_half, (u_long)afar, + device_get_nameunit(sc->sc_dev), 'A' + sc->sc_half, (u_long)afar, (u_long)afsr); return (FILTER_HANDLED); } Modified: head/sys/sparc64/pci/schizo.c ============================================================================== --- head/sys/sparc64/pci/schizo.c Wed Mar 31 22:27:33 2010 (r206019) +++ head/sys/sparc64/pci/schizo.c Wed Mar 31 22:32:56 2010 (r206020) @@ -826,7 +826,7 @@ schizo_pci_bus(void *arg) } panic("%s: PCI bus %c error AFAR %#llx AFSR %#llx PCI CSR %#llx " - "IOMMU %#llx STATUS %#llx", device_get_name(sc->sc_dev), + "IOMMU %#llx STATUS %#llx", device_get_nameunit(sc->sc_dev), 'A' + sc->sc_half, (unsigned long long)afar, (unsigned long long)afsr, (unsigned long long)csr, (unsigned long long)iommu, (unsigned long long)status); @@ -861,7 +861,7 @@ schizo_ue(void *arg) break; mtx_unlock_spin(sc->sc_mtx); panic("%s: uncorrectable DMA error AFAR %#llx AFSR %#llx", - device_get_name(sc->sc_dev), (unsigned long long)afar, + device_get_nameunit(sc->sc_dev), (unsigned long long)afar, (unsigned long long)afsr); return (FILTER_HANDLED); } @@ -895,7 +895,7 @@ schizo_host_bus(void *arg) uint64_t errlog; errlog = SCHIZO_CTRL_READ_8(sc, STX_CTRL_BUS_ERRLOG); - panic("%s: %s error %#llx", device_get_name(sc->sc_dev), + panic("%s: %s error %#llx", device_get_nameunit(sc->sc_dev), sc->sc_mode == SCHIZO_MODE_TOM ? "JBus" : "Safari", (unsigned long long)errlog); return (FILTER_HANDLED); From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 22:47:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 375AB1065674; Wed, 31 Mar 2010 22:47:56 +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 0BE878FC1E; Wed, 31 Mar 2010 22:47: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 o2VMltFB045812; Wed, 31 Mar 2010 22:47:55 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VMltHT045811; Wed, 31 Mar 2010 22:47:55 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201003312247.o2VMltHT045811@svn.freebsd.org> From: Alexander Motin Date: Wed, 31 Mar 2010 22:47:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206021 - head/sys/netgraph X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 22:47:56 -0000 Author: mav Date: Wed Mar 31 22:47:55 2010 New Revision: 206021 URL: http://svn.freebsd.org/changeset/base/206021 Log: Remove some more alignment constraints. Modified: head/sys/netgraph/ng_mppc.c head/sys/netgraph/ng_ppp.c Modified: head/sys/netgraph/ng_mppc.c ============================================================================== --- head/sys/netgraph/ng_mppc.c Wed Mar 31 22:32:56 2010 (r206020) +++ head/sys/netgraph/ng_mppc.c Wed Mar 31 22:47:55 2010 (r206021) @@ -53,6 +53,7 @@ #include #include #include +#include #include #include @@ -601,7 +602,7 @@ err1: /* Install header */ M_PREPEND(m, MPPC_HDRLEN, M_DONTWAIT); if (m != NULL) - *(mtod(m, uint16_t *)) = htons(header); + be16enc(mtod(m, void *), header); *datap = m; return (*datap == NULL ? ENOBUFS : 0); @@ -630,8 +631,7 @@ ng_mppc_decompress(node_p node, struct m m_freem(m); return (EINVAL); } - m_copydata(m, 0, MPPC_HDRLEN, (caddr_t)&header); - header = ntohs(header); + header = be16dec(mtod(m, void *)); cc = (header & MPPC_CCOUNT_MASK); m_adj(m, MPPC_HDRLEN); Modified: head/sys/netgraph/ng_ppp.c ============================================================================== --- head/sys/netgraph/ng_ppp.c Wed Mar 31 22:32:56 2010 (r206020) +++ head/sys/netgraph/ng_ppp.c Wed Mar 31 22:47:55 2010 (r206021) @@ -97,6 +97,7 @@ #include #include #include +#include #include #include @@ -860,8 +861,8 @@ ng_ppp_rcvdata_bypass(hook_p hook, item_ NG_FREE_ITEM(item); return (ENOBUFS); } - linkNum = ntohs(mtod(m, uint16_t *)[0]); - proto = ntohs(mtod(m, uint16_t *)[1]); + linkNum = be16dec(mtod(m, uint8_t *)); + proto = be16dec(mtod(m, uint8_t *) + 2); m_adj(m, 4); NGI_M(item) = m; @@ -1544,7 +1545,7 @@ ng_ppp_mp_recv(node_p node, item_p item, if (m->m_len < 2 && (m = m_pullup(m, 2)) == NULL) ERROUT(ENOBUFS); - shdr = ntohs(*mtod(m, uint16_t *)); + shdr = be16dec(mtod(m, void *)); frag->seq = MP_SHORT_EXTEND(shdr); frag->first = (shdr & MP_SHORT_FIRST_FLAG) != 0; frag->last = (shdr & MP_SHORT_LAST_FLAG) != 0; @@ -1561,7 +1562,7 @@ ng_ppp_mp_recv(node_p node, item_p item, if (m->m_len < 4 && (m = m_pullup(m, 4)) == NULL) ERROUT(ENOBUFS); - lhdr = ntohl(*mtod(m, uint32_t *)); + lhdr = be32dec(mtod(m, void *)); frag->seq = MP_LONG_EXTEND(lhdr); frag->first = (lhdr & MP_LONG_FIRST_FLAG) != 0; frag->last = (lhdr & MP_LONG_LAST_FLAG) != 0; From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 23:02:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B4BB51065673; Wed, 31 Mar 2010 23:02:26 +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 A3E958FC18; Wed, 31 Mar 2010 23:02: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 o2VN2QwD049122; Wed, 31 Mar 2010 23:02:26 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VN2QW0049121; Wed, 31 Mar 2010 23:02:26 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201003312302.o2VN2QW0049121@svn.freebsd.org> From: Xin LI Date: Wed, 31 Mar 2010 23:02: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: r206022 - 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: Wed, 31 Mar 2010 23:02:26 -0000 Author: delphij Date: Wed Mar 31 23:02:25 2010 New Revision: 206022 URL: http://svn.freebsd.org/changeset/base/206022 Log: Add definition of IPv6 mobility header's protocol number, as assigned by IANA and defined in RFC 3775. Obtained from: KAME Modified: head/sys/netinet/in.h Modified: head/sys/netinet/in.h ============================================================================== --- head/sys/netinet/in.h Wed Mar 31 22:47:55 2010 (r206021) +++ head/sys/netinet/in.h Wed Mar 31 23:02:25 2010 (r206022) @@ -236,6 +236,7 @@ __END_DECLS #define IPPROTO_GMTP 100 /* GMTP*/ #define IPPROTO_IPCOMP 108 /* payload compression (IPComp) */ #define IPPROTO_SCTP 132 /* SCTP */ +#define IPPROTO_MH 135 /* IPv6 Mobility Header */ /* 101-254: Partly Unassigned */ #define IPPROTO_PIM 103 /* Protocol Independent Mcast */ #define IPPROTO_CARP 112 /* CARP */ From owner-svn-src-all@FreeBSD.ORG Wed Mar 31 23:24:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7A52106564A; Wed, 31 Mar 2010 23:24:42 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C69FF8FC14; Wed, 31 Mar 2010 23:24: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 o2VNOgBB054059; Wed, 31 Mar 2010 23:24:42 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VNOgB5054057; Wed, 31 Mar 2010 23:24:42 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201003312324.o2VNOgB5054057@svn.freebsd.org> From: Jack F Vogel Date: Wed, 31 Mar 2010 23:24: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: r206023 - head/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 23:24:42 -0000 Author: jfv Date: Wed Mar 31 23:24:42 2010 New Revision: 206023 URL: http://svn.freebsd.org/changeset/base/206023 Log: The POLL code was missed in the queue conversion, change the argument type to igb_rxeof() to the correct type. Note, any users of POLLING must be sure and set the number of queues to 1 for things to work correctly. Modified: head/sys/dev/e1000/if_igb.c Modified: head/sys/dev/e1000/if_igb.c ============================================================================== --- head/sys/dev/e1000/if_igb.c Wed Mar 31 23:02:25 2010 (r206022) +++ head/sys/dev/e1000/if_igb.c Wed Mar 31 23:24:42 2010 (r206023) @@ -1316,7 +1316,8 @@ igb_irq_fast(void *arg) #ifdef DEVICE_POLLING /********************************************************************* * - * Legacy polling routine + * Legacy polling routine : if using this code you MUST be sure that + * multiqueue is not defined, ie, set igb_num_queues to 1. * *********************************************************************/ #if __FreeBSD_version >= 800000 @@ -1328,12 +1329,12 @@ static void #endif igb_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) { - struct adapter *adapter = ifp->if_softc; - struct rx_ring *rxr = adapter->rx_rings; - struct tx_ring *txr = adapter->tx_rings; - u32 reg_icr, rx_done = 0; - u32 loop = IGB_MAX_LOOP; - bool more; + struct adapter *adapter = ifp->if_softc; + struct igb_queue *que = adapter->queues; + struct tx_ring *txr = adapter->tx_rings; + u32 reg_icr, rx_done = 0; + u32 loop = IGB_MAX_LOOP; + bool more; IGB_CORE_LOCK(adapter); if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) { @@ -1353,7 +1354,7 @@ igb_poll(struct ifnet *ifp, enum poll_cm IGB_CORE_UNLOCK(adapter); /* TODO: rx_count */ - rx_done = igb_rxeof(rxr, count) ? 1 : 0; + rx_done = igb_rxeof(que, count) ? 1 : 0; IGB_TX_LOCK(txr); do { From owner-svn-src-all@FreeBSD.ORG Thu Apr 1 00:36:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 073DD1065670; Thu, 1 Apr 2010 00:36:41 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E7F798FC0C; Thu, 1 Apr 2010 00:36: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 o310aeYo070173; Thu, 1 Apr 2010 00:36:40 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o310ae4T070170; Thu, 1 Apr 2010 00:36:40 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <201004010036.o310ae4T070170@svn.freebsd.org> From: Kip Macy Date: Thu, 1 Apr 2010 00:36: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: r206024 - in stable/8/sys: net 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: Thu, 01 Apr 2010 00:36:41 -0000 Author: kmacy Date: Thu Apr 1 00:36:40 2010 New Revision: 206024 URL: http://svn.freebsd.org/changeset/base/206024 Log: MFC 205066, 205069, 205093, 205097, 205488: r205066: Log: - restructure flowtable to support ipv6 - add a name argument to flowtable_alloc for printing with ddb commands - extend ddb commands to print destination address or 4-tuples - don't parse ports in ulp header if FL_HASH_ALL is not passed - add kern_flowtable_insert to enable more generic use of flowtable (e.g. system calls for adding entries) - don't hash loopback addresses - cleanup whitespace - keep statistics per-cpu for per-cpu flowtables to avoid cache line contention - add sysctls to accumulate stats and report aggregate r205069: Log: fix stats reporting sysctl r205093: Log: re-update copyright to 2010 pointed out by danfe@ r205097: Log: flowtable_get_hashkey is only used by a DDB function - move under #ifdef DDB pointed out by jkim@ r205488: Log: - boot-time size the ipv4 flowtable and the maximum number of flows - increase flow cleaning frequency and decrease flow caching time when near the flow limit - stop allocating new flows when within 3% of maxflows don't start allocating again until below 12.5% Modified: stable/8/sys/net/flowtable.c stable/8/sys/net/flowtable.h stable/8/sys/net/if_llatbl.c stable/8/sys/net/if_llatbl.h stable/8/sys/netinet/ip_input.c stable/8/sys/netinet/ip_output.c Directory Properties: stable/8/sys/net/ (props changed) Modified: stable/8/sys/net/flowtable.c ============================================================================== --- stable/8/sys/net/flowtable.c Wed Mar 31 23:24:42 2010 (r206023) +++ stable/8/sys/net/flowtable.c Thu Apr 1 00:36:40 2010 (r206024) @@ -1,6 +1,6 @@ /************************************************************************** -Copyright (c) 2008-2009, BitGravity Inc. +Copyright (c) 2008-2010, BitGravity Inc. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -30,6 +30,8 @@ POSSIBILITY OF SUCH DAMAGE. #include "opt_route.h" #include "opt_mpath.h" #include "opt_ddb.h" +#include "opt_inet.h" +#include "opt_inet6.h" #include __FBSDID("$FreeBSD$"); @@ -45,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -63,6 +66,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#ifdef INET6 +#include +#endif #include #include #include @@ -140,31 +146,42 @@ union flentryp { struct flentry **pcpu[MAXCPU]; }; +struct flowtable_stats { + uint64_t ft_collisions; + uint64_t ft_allocated; + uint64_t ft_misses; + uint64_t ft_max_depth; + uint64_t ft_free_checks; + uint64_t ft_frees; + uint64_t ft_hits; + uint64_t ft_lookups; +} __aligned(CACHE_LINE_SIZE); + struct flowtable { + struct flowtable_stats ft_stats[MAXCPU]; int ft_size; int ft_lock_count; uint32_t ft_flags; - uint32_t ft_collisions; - uint32_t ft_allocated; - uint32_t ft_misses; - uint64_t ft_hits; - - uint32_t ft_udp_idle; - uint32_t ft_fin_wait_idle; - uint32_t ft_syn_idle; - uint32_t ft_tcp_idle; - + char *ft_name; fl_lock_t *ft_lock; fl_lock_t *ft_unlock; fl_rtalloc_t *ft_rtalloc; + /* + * XXX need to pad out + */ struct mtx *ft_locks; - - union flentryp ft_table; bitstr_t *ft_masks[MAXCPU]; bitstr_t *ft_tmpmask; struct flowtable *ft_next; -}; + + uint32_t ft_count __aligned(CACHE_LINE_SIZE); + uint32_t ft_udp_idle __aligned(CACHE_LINE_SIZE); + uint32_t ft_fin_wait_idle; + uint32_t ft_syn_idle; + uint32_t ft_tcp_idle; + boolean_t ft_full; +} __aligned(CACHE_LINE_SIZE); static struct proc *flowcleanerproc; static VNET_DEFINE(struct flowtable *, flow_list_head); @@ -177,16 +194,30 @@ static VNET_DEFINE(uma_zone_t, flow_ipv6 #define V_flow_ipv4_zone VNET(flow_ipv4_zone) #define V_flow_ipv6_zone VNET(flow_ipv6_zone) + static struct cv flowclean_cv; static struct mtx flowclean_lock; static uint32_t flowclean_cycles; +static uint32_t flowclean_freq; + +#ifdef FLOWTABLE_DEBUG +#define FLDPRINTF(ft, flags, fmt, ...) \ +do { \ + if ((ft)->ft_flags & (flags)) \ + printf((fmt), __VA_ARGS__); \ +} while (0); \ + +#else +#define FLDPRINTF(ft, flags, fmt, ...) + +#endif + /* * TODO: * - Make flowtable stats per-cpu, aggregated at sysctl call time, * to avoid extra cache evictions caused by incrementing a shared * counter - * - add IPv6 support to flow lookup * - add sysctls to resize && flush flow tables * - Add per flowtable sysctls for statistics and configuring timeouts * - add saturation counter to rtentry to support per-packet load-balancing @@ -200,29 +231,15 @@ static uint32_t flowclean_cycles; */ VNET_DEFINE(int, flowtable_enable) = 1; static VNET_DEFINE(int, flowtable_debug); -static VNET_DEFINE(int, flowtable_hits); -static VNET_DEFINE(int, flowtable_lookups); -static VNET_DEFINE(int, flowtable_misses); -static VNET_DEFINE(int, flowtable_frees); -static VNET_DEFINE(int, flowtable_free_checks); -static VNET_DEFINE(int, flowtable_max_depth); -static VNET_DEFINE(int, flowtable_collisions); static VNET_DEFINE(int, flowtable_syn_expire) = SYN_IDLE; static VNET_DEFINE(int, flowtable_udp_expire) = UDP_IDLE; static VNET_DEFINE(int, flowtable_fin_wait_expire) = FIN_WAIT_IDLE; static VNET_DEFINE(int, flowtable_tcp_expire) = TCP_IDLE; -static VNET_DEFINE(int, flowtable_nmbflows) = 4096; +static VNET_DEFINE(int, flowtable_nmbflows); static VNET_DEFINE(int, flowtable_ready) = 0; #define V_flowtable_enable VNET(flowtable_enable) #define V_flowtable_debug VNET(flowtable_debug) -#define V_flowtable_hits VNET(flowtable_hits) -#define V_flowtable_lookups VNET(flowtable_lookups) -#define V_flowtable_misses VNET(flowtable_misses) -#define V_flowtable_frees VNET(flowtable_frees) -#define V_flowtable_free_checks VNET(flowtable_free_checks) -#define V_flowtable_max_depth VNET(flowtable_max_depth) -#define V_flowtable_collisions VNET(flowtable_collisions) #define V_flowtable_syn_expire VNET(flowtable_syn_expire) #define V_flowtable_udp_expire VNET(flowtable_udp_expire) #define V_flowtable_fin_wait_expire VNET(flowtable_fin_wait_expire) @@ -235,20 +252,6 @@ SYSCTL_VNET_INT(_net_inet_flowtable, OID &VNET_NAME(flowtable_debug), 0, "print debug info."); SYSCTL_VNET_INT(_net_inet_flowtable, OID_AUTO, enable, CTLFLAG_RW, &VNET_NAME(flowtable_enable), 0, "enable flowtable caching."); -SYSCTL_VNET_INT(_net_inet_flowtable, OID_AUTO, hits, CTLFLAG_RD, - &VNET_NAME(flowtable_hits), 0, "# flowtable hits."); -SYSCTL_VNET_INT(_net_inet_flowtable, OID_AUTO, lookups, CTLFLAG_RD, - &VNET_NAME(flowtable_lookups), 0, "# flowtable lookups."); -SYSCTL_VNET_INT(_net_inet_flowtable, OID_AUTO, misses, CTLFLAG_RD, - &VNET_NAME(flowtable_misses), 0, "#flowtable misses."); -SYSCTL_VNET_INT(_net_inet_flowtable, OID_AUTO, frees, CTLFLAG_RD, - &VNET_NAME(flowtable_frees), 0, "#flows freed."); -SYSCTL_VNET_INT(_net_inet_flowtable, OID_AUTO, free_checks, CTLFLAG_RD, - &VNET_NAME(flowtable_free_checks), 0, "#flows free checks."); -SYSCTL_VNET_INT(_net_inet_flowtable, OID_AUTO, max_depth, CTLFLAG_RD, - &VNET_NAME(flowtable_max_depth), 0, "max collision list length."); -SYSCTL_VNET_INT(_net_inet_flowtable, OID_AUTO, collisions, CTLFLAG_RD, - &VNET_NAME(flowtable_collisions), 0, "#flowtable collisions."); /* * XXX This does not end up updating timeouts at runtime @@ -298,6 +301,77 @@ SYSCTL_VNET_PROC(_net_inet_flowtable, OI CTLTYPE_INT|CTLFLAG_RW, 0, 0, sysctl_nmbflows, "IU", "Maximum number of flows allowed"); + + +#define FS_PRINT(sb, field) sbuf_printf((sb), "\t%s: %jd\n", #field, fs->ft_##field) + +static void +fs_print(struct sbuf *sb, struct flowtable_stats *fs) +{ + + FS_PRINT(sb, collisions); + FS_PRINT(sb, allocated); + FS_PRINT(sb, misses); + FS_PRINT(sb, max_depth); + FS_PRINT(sb, free_checks); + FS_PRINT(sb, frees); + FS_PRINT(sb, hits); + FS_PRINT(sb, lookups); +} + +static void +flowtable_show_stats(struct sbuf *sb, struct flowtable *ft) +{ + int i; + struct flowtable_stats fs, *pfs; + + if (ft->ft_flags & FL_PCPU) { + bzero(&fs, sizeof(fs)); + pfs = &fs; + for (i = 0; i <= mp_maxid; i++) { + if (CPU_ABSENT(i)) + continue; + pfs->ft_collisions += ft->ft_stats[i].ft_collisions; + pfs->ft_allocated += ft->ft_stats[i].ft_allocated; + pfs->ft_misses += ft->ft_stats[i].ft_misses; + pfs->ft_free_checks += ft->ft_stats[i].ft_free_checks; + pfs->ft_frees += ft->ft_stats[i].ft_frees; + pfs->ft_hits += ft->ft_stats[i].ft_hits; + pfs->ft_lookups += ft->ft_stats[i].ft_lookups; + if (ft->ft_stats[i].ft_max_depth > pfs->ft_max_depth) + pfs->ft_max_depth = ft->ft_stats[i].ft_max_depth; + } + } else { + pfs = &ft->ft_stats[0]; + } + fs_print(sb, pfs); +} + +static int +sysctl_flowtable_stats(SYSCTL_HANDLER_ARGS) +{ + struct flowtable *ft; + struct sbuf *sb; + int error; + + sb = sbuf_new(NULL, NULL, 64*1024, SBUF_FIXEDLEN); + + ft = V_flow_list_head; + while (ft != NULL) { + sbuf_printf(sb, "\ntable name: %s\n", ft->ft_name); + flowtable_show_stats(sb, ft); + ft = ft->ft_next; + } + sbuf_finish(sb); + error = SYSCTL_OUT(req, sbuf_data(sb), sbuf_len(sb) + 1); + sbuf_delete(sb); + + return (error); +} +SYSCTL_VNET_PROC(_net_inet_flowtable, OID_AUTO, stats, CTLTYPE_STRING|CTLFLAG_RD, + NULL, 0, sysctl_flowtable_stats, "A", "flowtable statistics"); + + #ifndef RADIX_MPATH static void in_rtalloc_ign_wrapper(struct route *ro, uint32_t hash, u_int fibnum) @@ -342,52 +416,122 @@ flowtable_pcpu_unlock(struct flowtable * #define FL_ENTRY_LOCK(table, hash) (table)->ft_lock((table), (hash)) #define FL_ENTRY_UNLOCK(table, hash) (table)->ft_unlock((table), (hash)) -#define FL_STALE (1<<8) -#define FL_IPV6 (1<<9) +#define FL_STALE (1<<8) +#define FL_IPV6 (1<<9) +#define FL_OVERWRITE (1<<10) -static uint32_t -ipv4_flow_lookup_hash_internal(struct mbuf *m, struct route *ro, - uint32_t *key, uint16_t *flags, uint8_t *protop) +void +flow_invalidate(struct flentry *fle) { - uint16_t sport = 0, dport = 0; - struct ip *ip = NULL; - uint8_t proto = 0; + + fle->f_flags |= FL_STALE; +} + +static __inline int +proto_to_flags(uint8_t proto) +{ + int flag; + + switch (proto) { + case IPPROTO_TCP: + flag = FL_TCP; + break; + case IPPROTO_SCTP: + flag = FL_SCTP; + break; + case IPPROTO_UDP: + flag = FL_UDP; + break; + default: + flag = 0; + break; + } + + return (flag); +} + +static __inline int +flags_to_proto(int flags) +{ + int proto, protoflags; + + protoflags = flags & (FL_TCP|FL_SCTP|FL_UDP); + switch (protoflags) { + case FL_TCP: + proto = IPPROTO_TCP; + break; + case FL_SCTP: + proto = IPPROTO_SCTP; + break; + case FL_UDP: + proto = IPPROTO_UDP; + break; + default: + proto = 0; + break; + } + return (proto); +} + +#ifdef INET +#ifdef FLOWTABLE_DEBUG +static void +ipv4_flow_print_tuple(int flags, int proto, struct sockaddr_in *ssin, + struct sockaddr_in *dsin) +{ + char saddr[4*sizeof "123"], daddr[4*sizeof "123"]; + + if (flags & FL_HASH_ALL) { + inet_ntoa_r(ssin->sin_addr, saddr); + inet_ntoa_r(dsin->sin_addr, daddr); + printf("proto=%d %s:%d->%s:%d\n", + proto, saddr, ntohs(ssin->sin_port), daddr, + ntohs(dsin->sin_port)); + } else { + inet_ntoa_r(*(struct in_addr *) &dsin->sin_addr, daddr); + printf("proto=%d %s\n", proto, daddr); + } + +} +#endif + +static int +ipv4_mbuf_demarshal(struct flowtable *ft, struct mbuf *m, + struct sockaddr_in *ssin, struct sockaddr_in *dsin, uint16_t *flags) +{ + struct ip *ip; + uint8_t proto; int iphlen; - uint32_t hash; - struct sockaddr_in *sin; struct tcphdr *th; struct udphdr *uh; struct sctphdr *sh; + uint16_t sport, dport; - if ((V_flowtable_enable == 0) || (V_flowtable_ready == 0)) - return (0); + proto = sport = dport = 0; + ip = mtod(m, struct ip *); + dsin->sin_family = AF_INET; + dsin->sin_len = sizeof(*dsin); + dsin->sin_addr = ip->ip_dst; + ssin->sin_family = AF_INET; + ssin->sin_len = sizeof(*ssin); + ssin->sin_addr = ip->ip_src; - key[1] = key[0] = 0; - sin = (struct sockaddr_in *)&ro->ro_dst; - if (m != NULL) { - ip = mtod(m, struct ip *); - sin->sin_family = AF_INET; - sin->sin_len = sizeof(*sin); - sin->sin_addr = ip->ip_dst; - } else - *flags &= ~FL_HASH_PORTS; - - key[2] = sin->sin_addr.s_addr; - - if ((*flags & FL_HASH_PORTS) == 0) + proto = ip->ip_p; + if ((*flags & FL_HASH_ALL) == 0) { + FLDPRINTF(ft, FL_DEBUG_ALL, "skip port check flags=0x%x ", + *flags); goto skipports; + } - proto = ip->ip_p; iphlen = ip->ip_hl << 2; /* XXX options? */ - key[1] = ip->ip_src.s_addr; - + switch (proto) { case IPPROTO_TCP: th = (struct tcphdr *)((caddr_t)ip + iphlen); - sport = ntohs(th->th_sport); - dport = ntohs(th->th_dport); - *flags |= th->th_flags; - if (*flags & TH_RST) + sport = th->th_sport; + dport = th->th_dport; + if ((*flags & FL_HASH_ALL) && + (th->th_flags & (TH_RST|TH_FIN))) *flags |= FL_STALE; break; case IPPROTO_UDP: @@ -401,38 +545,288 @@ ipv4_flow_lookup_hash_internal(struct mb dport = sh->dest_port; break; default: - if (*flags & FL_HASH_PORTS) - goto noop; + FLDPRINTF(ft, FL_DEBUG_ALL, "proto=0x%x not supported\n", proto); + return (ENOTSUP); /* no port - hence not a protocol we care about */ break; } - *protop = proto; - /* - * If this is a transmit route cache then - * hash all flows to a given destination to - * the same bucket - */ - if ((*flags & FL_HASH_PORTS) == 0) - proto = sport = dport = 0; +skipports: + *flags |= proto_to_flags(proto); + ssin->sin_port = sport; + dsin->sin_port = dport; + return (0); +} - ((uint16_t *)key)[0] = sport; - ((uint16_t *)key)[1] = dport; +static uint32_t +ipv4_flow_lookup_hash_internal( + struct sockaddr_in *ssin, struct sockaddr_in *dsin, + uint32_t *key, uint16_t flags) +{ + uint16_t sport, dport; + uint8_t proto; + int offset = 0; -skipports: - hash = jenkins_hashword(key, 3, V_flow_hashjitter + proto); - if (m != NULL && (m->m_flags & M_FLOWID) == 0) { - m->m_flags |= M_FLOWID; - m->m_pkthdr.flowid = hash; + if ((V_flowtable_enable == 0) || (V_flowtable_ready == 0)) + return (0); + proto = flags_to_proto(flags); + sport = dport = key[2] = key[1] = key[0] = 0; + if ((ssin != NULL) && (flags & FL_HASH_ALL)) { + key[1] = ssin->sin_addr.s_addr; + sport = ssin->sin_port; + } + if (dsin != NULL) { + key[2] = dsin->sin_addr.s_addr; + dport = dsin->sin_port; + } + if (flags & FL_HASH_ALL) { + ((uint16_t *)key)[0] = sport; + ((uint16_t *)key)[1] = dport; + } else + offset = V_flow_hashjitter + proto; + + return (jenkins_hashword(key, 3, offset)); +} + +static struct flentry * +flowtable_lookup_mbuf4(struct flowtable *ft, struct mbuf *m) +{ + struct sockaddr_storage ssa, dsa; + uint16_t flags; + struct sockaddr_in *dsin, *ssin; + + dsin = (struct sockaddr_in *)&dsa; + ssin = (struct sockaddr_in *)&ssa; + flags = ft->ft_flags; + if (ipv4_mbuf_demarshal(ft, m, ssin, dsin, &flags) != 0) + return (NULL); + + return (flowtable_lookup(ft, &ssa, &dsa, M_GETFIB(m), flags)); +} + +void +flow_to_route(struct flentry *fle, struct route *ro) +{ + uint32_t *hashkey = NULL; + struct sockaddr_in *sin; + + sin = (struct sockaddr_in *)&ro->ro_dst; + sin->sin_family = AF_INET; + sin->sin_len = sizeof(*sin); + hashkey = ((struct flentry_v4 *)fle)->fl_flow.ipf_key; + sin->sin_addr.s_addr = hashkey[2]; + ro->ro_rt = __DEVOLATILE(struct rtentry *, fle->f_rt); + ro->ro_lle = __DEVOLATILE(struct llentry *, fle->f_lle); +} +#endif /* INET */ + +#ifdef INET6 +/* + * PULLUP_TO(len, p, T) makes sure that len + sizeof(T) is contiguous, + * then it sets p to point at the offset "len" in the mbuf. WARNING: the + * pointer might become stale after other pullups (but we never use it + * this way). + */ +#define PULLUP_TO(_len, p, T) \ +do { \ + int x = (_len) + sizeof(T); \ + if ((m)->m_len < x) { \ + goto receive_failed; \ + } \ + p = (mtod(m, char *) + (_len)); \ +} while (0) + +#define TCP(p) ((struct tcphdr *)(p)) +#define SCTP(p) ((struct sctphdr *)(p)) +#define UDP(p) ((struct udphdr *)(p)) + +static int +ipv6_mbuf_demarshal(struct flowtable *ft, struct mbuf *m, + struct sockaddr_in6 *ssin6, struct sockaddr_in6 *dsin6, uint16_t *flags) +{ + struct ip6_hdr *ip6; + uint8_t proto; + int hlen; + uint16_t src_port, dst_port; + u_short offset; + void *ulp; + + offset = hlen = src_port = dst_port = 0; + ulp = NULL; + ip6 = mtod(m, struct ip6_hdr *); + hlen = sizeof(struct ip6_hdr); + proto = ip6->ip6_nxt; + + if ((*flags & FL_HASH_ALL) == 0) + goto skipports; + + while (ulp == NULL) { + switch (proto) { + case IPPROTO_ICMPV6: + case IPPROTO_OSPFIGP: + case IPPROTO_PIM: + case IPPROTO_CARP: + case IPPROTO_ESP: + case IPPROTO_NONE: + ulp = ip6; + break; + case IPPROTO_TCP: + PULLUP_TO(hlen, ulp, struct tcphdr); + dst_port = TCP(ulp)->th_dport; + src_port = TCP(ulp)->th_sport; + if ((*flags & FL_HASH_ALL) && + (TCP(ulp)->th_flags & (TH_RST|TH_FIN))) + *flags |= FL_STALE; + break; + case IPPROTO_SCTP: + PULLUP_TO(hlen, ulp, struct sctphdr); + src_port = SCTP(ulp)->src_port; + dst_port = SCTP(ulp)->dest_port; + break; + case IPPROTO_UDP: + PULLUP_TO(hlen, ulp, struct udphdr); + dst_port = UDP(ulp)->uh_dport; + src_port = UDP(ulp)->uh_sport; + break; + case IPPROTO_HOPOPTS: /* RFC 2460 */ + PULLUP_TO(hlen, ulp, struct ip6_hbh); + hlen += (((struct ip6_hbh *)ulp)->ip6h_len + 1) << 3; + proto = ((struct ip6_hbh *)ulp)->ip6h_nxt; + ulp = NULL; + break; + case IPPROTO_ROUTING: /* RFC 2460 */ + PULLUP_TO(hlen, ulp, struct ip6_rthdr); + hlen += (((struct ip6_rthdr *)ulp)->ip6r_len + 1) << 3; + proto = ((struct ip6_rthdr *)ulp)->ip6r_nxt; + ulp = NULL; + break; + case IPPROTO_FRAGMENT: /* RFC 2460 */ + PULLUP_TO(hlen, ulp, struct ip6_frag); + hlen += sizeof (struct ip6_frag); + proto = ((struct ip6_frag *)ulp)->ip6f_nxt; + offset = ((struct ip6_frag *)ulp)->ip6f_offlg & + IP6F_OFF_MASK; + ulp = NULL; + break; + case IPPROTO_DSTOPTS: /* RFC 2460 */ + PULLUP_TO(hlen, ulp, struct ip6_hbh); + hlen += (((struct ip6_hbh *)ulp)->ip6h_len + 1) << 3; + proto = ((struct ip6_hbh *)ulp)->ip6h_nxt; + ulp = NULL; + break; + case IPPROTO_AH: /* RFC 2402 */ + PULLUP_TO(hlen, ulp, struct ip6_ext); + hlen += (((struct ip6_ext *)ulp)->ip6e_len + 2) << 2; + proto = ((struct ip6_ext *)ulp)->ip6e_nxt; + ulp = NULL; + break; + default: + PULLUP_TO(hlen, ulp, struct ip6_ext); + break; + } + } + + if (src_port == 0) { + receive_failed: + return (ENOTSUP); } - return (hash); -noop: - *protop = proto; +skipports: + dsin6->sin6_family = AF_INET6; + dsin6->sin6_len = sizeof(*dsin6); + dsin6->sin6_port = dst_port; + memcpy(&dsin6->sin6_addr, &ip6->ip6_dst, sizeof(struct in6_addr)); + + ssin6->sin6_family = AF_INET6; + ssin6->sin6_len = sizeof(*ssin6); + ssin6->sin6_port = src_port; + memcpy(&ssin6->sin6_addr, &ip6->ip6_src, sizeof(struct in6_addr)); + *flags |= proto_to_flags(proto); + return (0); } +#define zero_key(key) \ +do { \ + key[0] = 0; \ + key[1] = 0; \ + key[2] = 0; \ + key[3] = 0; \ + key[4] = 0; \ + key[5] = 0; \ + key[6] = 0; \ + key[7] = 0; \ + key[8] = 0; \ +} while (0) + +static uint32_t +ipv6_flow_lookup_hash_internal( + struct sockaddr_in6 *ssin6, struct sockaddr_in6 *dsin6, + uint32_t *key, uint16_t flags) +{ + uint16_t sport, dport; + uint8_t proto; + int offset = 0; + + if ((V_flowtable_enable == 0) || (V_flowtable_ready == 0)) + return (0); + + proto = flags_to_proto(flags); + zero_key(key); + sport = dport = 0; + if (dsin6 != NULL) { + memcpy(&key[1], &dsin6->sin6_addr, sizeof(struct in6_addr)); + dport = dsin6->sin6_port; + } + if ((ssin6 != NULL) && (flags & FL_HASH_ALL)) { + memcpy(&key[5], &ssin6->sin6_addr, sizeof(struct in6_addr)); + sport = ssin6->sin6_port; + } + if (flags & FL_HASH_ALL) { + ((uint16_t *)key)[0] = sport; + ((uint16_t *)key)[1] = dport; + } else + offset = V_flow_hashjitter + proto; + + return (jenkins_hashword(key, 9, offset)); +} + +static struct flentry * +flowtable_lookup_mbuf6(struct flowtable *ft, struct mbuf *m) +{ + struct sockaddr_storage ssa, dsa; + struct sockaddr_in6 *dsin6, *ssin6; + uint16_t flags; + + dsin6 = (struct sockaddr_in6 *)&dsa; + ssin6 = (struct sockaddr_in6 *)&ssa; + flags = ft->ft_flags; + + if (ipv6_mbuf_demarshal(ft, m, ssin6, dsin6, &flags) != 0) + return (NULL); + + return (flowtable_lookup(ft, &ssa, &dsa, M_GETFIB(m), flags)); +} + +void +flow_to_route_in6(struct flentry *fle, struct route_in6 *ro) +{ + uint32_t *hashkey = NULL; + struct sockaddr_in6 *sin6; + + sin6 = (struct sockaddr_in6 *)&ro->ro_dst; + + sin6->sin6_family = AF_INET6; + sin6->sin6_len = sizeof(*sin6); + hashkey = ((struct flentry_v6 *)fle)->fl_flow.ipf_key; + memcpy(&sin6->sin6_addr, &hashkey[5], sizeof (struct in6_addr)); + ro->ro_rt = __DEVOLATILE(struct rtentry *, fle->f_rt); + ro->ro_lle = __DEVOLATILE(struct llentry *, fle->f_lle); + +} +#endif /* INET6 */ + static bitstr_t * flowtable_mask(struct flowtable *ft) { @@ -511,22 +905,78 @@ flowtable_set_hashkey(struct flentry *fl hashkey[i] = key[i]; } +static struct flentry * +flow_alloc(struct flowtable *ft) +{ + struct flentry *newfle; + uma_zone_t zone; + + newfle = NULL; + zone = (ft->ft_flags & FL_IPV6) ? V_flow_ipv6_zone : V_flow_ipv4_zone; + + newfle = uma_zalloc(zone, M_NOWAIT | M_ZERO); + if (newfle != NULL) + atomic_add_int(&ft->ft_count, 1); + return (newfle); +} + +static void +flow_free(struct flentry *fle, struct flowtable *ft) +{ + uma_zone_t zone; + + zone = (ft->ft_flags & FL_IPV6) ? V_flow_ipv6_zone : V_flow_ipv4_zone; + atomic_add_int(&ft->ft_count, -1); + uma_zfree(zone, fle); +} + +static int +flow_full(struct flowtable *ft) +{ + boolean_t full; + uint32_t count; + + full = ft->ft_full; + count = ft->ft_count; + + if (full && (count < (V_flowtable_nmbflows - (V_flowtable_nmbflows >> 3)))) + ft->ft_full = FALSE; + else if (!full && (count > (V_flowtable_nmbflows - (V_flowtable_nmbflows >> 5)))) + ft->ft_full = TRUE; + + if (full && !ft->ft_full) { + flowclean_freq = 4*hz; + if ((ft->ft_flags & FL_HASH_ALL) == 0) + ft->ft_udp_idle = ft->ft_fin_wait_idle = + ft->ft_syn_idle = ft->ft_tcp_idle = 5; + cv_broadcast(&flowclean_cv); + } else if (!full && ft->ft_full) { + flowclean_freq = 20*hz; + if ((ft->ft_flags & FL_HASH_ALL) == 0) + ft->ft_udp_idle = ft->ft_fin_wait_idle = + ft->ft_syn_idle = ft->ft_tcp_idle = 30; + } + + return (ft->ft_full); +} + static int flowtable_insert(struct flowtable *ft, uint32_t hash, uint32_t *key, - uint8_t proto, uint32_t fibnum, struct route *ro, uint16_t flags) + uint32_t fibnum, struct route *ro, uint16_t flags) { struct flentry *fle, *fletail, *newfle, **flep; + struct flowtable_stats *fs = &ft->ft_stats[curcpu]; int depth; - uma_zone_t flezone; bitstr_t *mask; + uint8_t proto; - flezone = (flags & FL_IPV6) ? V_flow_ipv6_zone : V_flow_ipv4_zone; - newfle = uma_zalloc(flezone, M_NOWAIT | M_ZERO); + newfle = flow_alloc(ft); if (newfle == NULL) return (ENOMEM); newfle->f_flags |= (flags & FL_IPV6); - + proto = flags_to_proto(flags); + FL_ENTRY_LOCK(ft, hash); mask = flowtable_mask(ft); flep = flowtable_entry(ft, hash); @@ -539,7 +989,7 @@ flowtable_insert(struct flowtable *ft, u } depth = 0; - V_flowtable_collisions++; + fs->ft_collisions++; /* * find end of list and make sure that we were not * preempted by another thread handling this flow @@ -551,8 +1001,10 @@ flowtable_insert(struct flowtable *ft, u * or we lost a race to insert */ FL_ENTRY_UNLOCK(ft, hash); - uma_zfree((newfle->f_flags & FL_IPV6) ? - V_flow_ipv6_zone : V_flow_ipv4_zone, newfle); + flow_free(newfle, ft); + + if (flags & FL_OVERWRITE) + goto skip; return (EEXIST); } /* @@ -565,8 +1017,8 @@ flowtable_insert(struct flowtable *ft, u fle = fle->f_next; } - if (depth > V_flowtable_max_depth) - V_flowtable_max_depth = depth; + if (depth > fs->ft_max_depth) + fs->ft_max_depth = depth; fletail->f_next = newfle; fle = newfle; skip: @@ -582,6 +1034,35 @@ skip: return (0); } +int +kern_flowtable_insert(struct flowtable *ft, + struct sockaddr_storage *ssa, struct sockaddr_storage *dsa, + struct route *ro, uint32_t fibnum, int flags) +{ + uint32_t key[9], hash; + + flags = (ft->ft_flags | flags | FL_OVERWRITE); + hash = 0; + +#ifdef INET + if (ssa->ss_family == AF_INET) + hash = ipv4_flow_lookup_hash_internal((struct sockaddr_in *)ssa, + (struct sockaddr_in *)dsa, key, flags); +#endif +#ifdef INET6 + if (ssa->ss_family == AF_INET6) + hash = ipv6_flow_lookup_hash_internal((struct sockaddr_in6 *)ssa, + (struct sockaddr_in6 *)dsa, key, flags); +#endif + if (ro->ro_rt == NULL || ro->ro_lle == NULL) + return (EINVAL); + + FLDPRINTF(ft, FL_DEBUG, + "kern_flowtable_insert: key=%x:%x:%x hash=%x fibnum=%d flags=%x\n", + key[0], key[1], key[2], hash, fibnum, flags); + return (flowtable_insert(ft, hash, key, fibnum, ro, flags)); +} + static int flowtable_key_equal(struct flentry *fle, uint32_t *key) { @@ -595,7 +1076,7 @@ flowtable_key_equal(struct flentry *fle, nwords = 3; hashkey = ((struct flentry_v6 *)fle)->fl_flow.ipf_key; } - + for (i = 0; i < nwords; i++) if (hashkey[i] != key[i]) return (0); @@ -603,44 +1084,86 @@ flowtable_key_equal(struct flentry *fle, return (1); } -int -flowtable_lookup(struct flowtable *ft, struct mbuf *m, struct route *ro, uint32_t fibnum) +struct flentry * +flowtable_lookup_mbuf(struct flowtable *ft, struct mbuf *m, int af) +{ + struct flentry *fle = NULL; + +#ifdef INET + if (af == AF_INET) + fle = flowtable_lookup_mbuf4(ft, m); +#endif +#ifdef INET6 + if (af == AF_INET6) + fle = flowtable_lookup_mbuf6(ft, m); +#endif + if (fle != NULL && m != NULL && (m->m_flags & M_FLOWID) == 0) { + m->m_flags |= M_FLOWID; + m->m_pkthdr.flowid = fle->f_fhash; + } + return (fle); +} + +struct flentry * +flowtable_lookup(struct flowtable *ft, struct sockaddr_storage *ssa, + struct sockaddr_storage *dsa, uint32_t fibnum, int flags) { uint32_t key[9], hash; struct flentry *fle; - uint16_t flags; + struct flowtable_stats *fs = &ft->ft_stats[curcpu]; uint8_t proto = 0; int error = 0; struct rtentry *rt; struct llentry *lle; + struct route sro, *ro; + struct route_in6 sro6; - flags = ft->ft_flags; - ro->ro_rt = NULL; - ro->ro_lle = NULL; + sro.ro_rt = sro6.ro_rt = NULL; + sro.ro_lle = sro6.ro_lle = NULL; + ro = NULL; + hash = 0; + flags |= ft->ft_flags; + proto = flags_to_proto(flags); +#ifdef INET + if (ssa->ss_family == AF_INET) { + struct sockaddr_in *ssin, *dsin; + + ro = &sro; + memcpy(&ro->ro_dst, dsa, sizeof(struct sockaddr_in)); + dsin = (struct sockaddr_in *)dsa; + ssin = (struct sockaddr_in *)ssa; + if ((dsin->sin_addr.s_addr == ssin->sin_addr.s_addr) || + (ntohl(dsin->sin_addr.s_addr) >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET || + (ntohl(ssin->sin_addr.s_addr) >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET) + return (NULL); - /* - * The internal hash lookup is the only IPv4 specific bit - * remaining - * - * XXX BZ: to add IPv6 support just add a check for the - * address type in m and ro and an equivalent ipv6 lookup - * function - the rest of the code should automatically - * handle an ipv6 flow (note that m can be NULL in which - * case ro will be set) - */ - hash = ipv4_flow_lookup_hash_internal(m, ro, key, - &flags, &proto); + hash = ipv4_flow_lookup_hash_internal(ssin, dsin, key, flags); + } +#endif +#ifdef INET6 + if (ssa->ss_family == AF_INET6) { + struct sockaddr_in6 *ssin6, *dsin6; + + ro = (struct route *)&sro6; + memcpy(&sro6.ro_dst, dsa, + sizeof(struct sockaddr_in6)); + dsin6 = (struct sockaddr_in6 *)dsa; + ssin6 = (struct sockaddr_in6 *)ssa; + flags |= FL_IPV6; + hash = ipv6_flow_lookup_hash_internal(ssin6, dsin6, key, flags); + } +#endif /* * Ports are zero and this isn't a transmit cache * - thus not a protocol for which we need to keep * state - * FL_HASH_PORTS => key[0] != 0 for TCP || UDP || SCTP + * FL_HASH_ALL => key[0] != 0 for TCP || UDP || SCTP */ - if (hash == 0 || (key[0] == 0 && (ft->ft_flags & FL_HASH_PORTS))) - return (ENOENT); + if (hash == 0 || (key[0] == 0 && (ft->ft_flags & FL_HASH_ALL))) + return (NULL); - V_flowtable_lookups++; + fs->ft_lookups++; FL_ENTRY_LOCK(ft, hash); if ((fle = FL_ENTRY(ft, hash)) == NULL) { FL_ENTRY_UNLOCK(ft, hash); @@ -656,21 +1179,21 @@ keycheck: && (fibnum == fle->f_fibnum) && (rt->rt_flags & RTF_UP) && (rt->rt_ifp != NULL)) { - V_flowtable_hits++; + fs->ft_hits++; fle->f_uptime = time_uptime; fle->f_flags |= flags; - ro->ro_rt = rt; - ro->ro_lle = lle; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Apr 1 00:38:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E4701065670; Thu, 1 Apr 2010 00:38:39 +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 F02C38FC18; Thu, 1 Apr 2010 00:38: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 o310cc78070704; Thu, 1 Apr 2010 00:38:38 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o310cc4O070702; Thu, 1 Apr 2010 00:38:38 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201004010038.o310cc4O070702@svn.freebsd.org> From: Xin LI Date: Thu, 1 Apr 2010 00:38: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: r206025 - in stable: 6/libexec/ftpd 7/libexec/ftpd 8/libexec/ftpd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 01 Apr 2010 00:38:39 -0000 Author: delphij Date: Thu Apr 1 00:38:38 2010 New Revision: 206025 URL: http://svn.freebsd.org/changeset/base/206025 Log: MFC r205656: Check that gl_pathc is bigger than zero before derefencing gl_pathv. When gl_pathc == 0, the content of gl_pathv is undefined. PR: bin/144761 Submitted by: David BERARD Obtained from: OpenBSD Modified: stable/8/libexec/ftpd/popen.c Directory Properties: stable/8/libexec/ftpd/ (props changed) Changes in other areas also in this revision: Modified: stable/6/libexec/ftpd/popen.c stable/7/libexec/ftpd/popen.c Directory Properties: stable/6/libexec/ftpd/ (props changed) stable/7/libexec/ftpd/ (props changed) Modified: stable/8/libexec/ftpd/popen.c ============================================================================== --- stable/8/libexec/ftpd/popen.c Thu Apr 1 00:36:40 2010 (r206024) +++ stable/8/libexec/ftpd/popen.c Thu Apr 1 00:38:38 2010 (r206025) @@ -110,10 +110,11 @@ ftpd_popen(char *program, char *type) flags |= GLOB_LIMIT; if (glob(argv[argc], flags, NULL, &gl)) gargv[gargc++] = strdup(argv[argc]); - else + else if (gl.gl_pathc > 0) { for (pop = gl.gl_pathv; *pop && gargc < (MAXGLOBARGS-1); pop++) gargv[gargc++] = strdup(*pop); + } globfree(&gl); } gargv[gargc] = NULL; From owner-svn-src-all@FreeBSD.ORG Thu Apr 1 00:38:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2DC3E1065672; Thu, 1 Apr 2010 00:38:39 +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 1BC018FC1A; Thu, 1 Apr 2010 00:38: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 o310cd8l070710; Thu, 1 Apr 2010 00:38:39 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o310ccjN070708; Thu, 1 Apr 2010 00:38:38 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201004010038.o310ccjN070708@svn.freebsd.org> From: Xin LI Date: Thu, 1 Apr 2010 00:38: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: r206025 - in stable: 6/libexec/ftpd 7/libexec/ftpd 8/libexec/ftpd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 01 Apr 2010 00:38:39 -0000 Author: delphij Date: Thu Apr 1 00:38:38 2010 New Revision: 206025 URL: http://svn.freebsd.org/changeset/base/206025 Log: MFC r205656: Check that gl_pathc is bigger than zero before derefencing gl_pathv. When gl_pathc == 0, the content of gl_pathv is undefined. PR: bin/144761 Submitted by: David BERARD Obtained from: OpenBSD Modified: stable/7/libexec/ftpd/popen.c Directory Properties: stable/7/libexec/ftpd/ (props changed) Changes in other areas also in this revision: Modified: stable/6/libexec/ftpd/popen.c stable/8/libexec/ftpd/popen.c Directory Properties: stable/6/libexec/ftpd/ (props changed) stable/8/libexec/ftpd/ (props changed) Modified: stable/7/libexec/ftpd/popen.c ============================================================================== --- stable/7/libexec/ftpd/popen.c Thu Apr 1 00:36:40 2010 (r206024) +++ stable/7/libexec/ftpd/popen.c Thu Apr 1 00:38:38 2010 (r206025) @@ -110,10 +110,11 @@ ftpd_popen(char *program, char *type) flags |= GLOB_LIMIT; if (glob(argv[argc], flags, NULL, &gl)) gargv[gargc++] = strdup(argv[argc]); - else + else if (gl.gl_pathc > 0) { for (pop = gl.gl_pathv; *pop && gargc < (MAXGLOBARGS-1); pop++) gargv[gargc++] = strdup(*pop); + } globfree(&gl); } gargv[gargc] = NULL; From owner-svn-src-all@FreeBSD.ORG Thu Apr 1 00:38:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E0DC1065673; Thu, 1 Apr 2010 00:38:39 +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 3BFD98FC1B; Thu, 1 Apr 2010 00:38: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 o310cdb9070716; Thu, 1 Apr 2010 00:38:39 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o310cdtS070714; Thu, 1 Apr 2010 00:38:39 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201004010038.o310cdtS070714@svn.freebsd.org> From: Xin LI Date: Thu, 1 Apr 2010 00:38:39 +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: r206025 - in stable: 6/libexec/ftpd 7/libexec/ftpd 8/libexec/ftpd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 01 Apr 2010 00:38:39 -0000 Author: delphij Date: Thu Apr 1 00:38:38 2010 New Revision: 206025 URL: http://svn.freebsd.org/changeset/base/206025 Log: MFC r205656: Check that gl_pathc is bigger than zero before derefencing gl_pathv. When gl_pathc == 0, the content of gl_pathv is undefined. PR: bin/144761 Submitted by: David BERARD Obtained from: OpenBSD Modified: stable/6/libexec/ftpd/popen.c Directory Properties: stable/6/libexec/ftpd/ (props changed) Changes in other areas also in this revision: Modified: stable/7/libexec/ftpd/popen.c stable/8/libexec/ftpd/popen.c Directory Properties: stable/7/libexec/ftpd/ (props changed) stable/8/libexec/ftpd/ (props changed) Modified: stable/6/libexec/ftpd/popen.c ============================================================================== --- stable/6/libexec/ftpd/popen.c Thu Apr 1 00:36:40 2010 (r206024) +++ stable/6/libexec/ftpd/popen.c Thu Apr 1 00:38:38 2010 (r206025) @@ -110,10 +110,11 @@ ftpd_popen(char *program, char *type) flags |= GLOB_LIMIT; if (glob(argv[argc], flags, NULL, &gl)) gargv[gargc++] = strdup(argv[argc]); - else + else if (gl.gl_pathc > 0) { for (pop = gl.gl_pathv; *pop && gargc < (MAXGLOBARGS-1); pop++) gargv[gargc++] = strdup(*pop); + } globfree(&gl); } gargv[gargc] = NULL; From owner-svn-src-all@FreeBSD.ORG Thu Apr 1 01:16:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F588106566C; Thu, 1 Apr 2010 01:16:01 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4419E8FC08; Thu, 1 Apr 2010 01:16: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 o311G1kw078881; Thu, 1 Apr 2010 01:16:01 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o311G147078879; Thu, 1 Apr 2010 01:16:01 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201004010116.o311G147078879@svn.freebsd.org> From: Lawrence Stewart Date: Thu, 1 Apr 2010 01:16: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: r206026 - 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: Thu, 01 Apr 2010 01:16:01 -0000 Author: lstewart Date: Thu Apr 1 01:16:00 2010 New Revision: 206026 URL: http://svn.freebsd.org/changeset/base/206026 Log: - Factor code to destroy an ALQ out of alq_close() into a private alq_destroy(). - Use the new alq_destroy() to properly handle a failure case in alq_open(). Sponsored by: FreeBSD Foundation Reviewed by: dwmalone, jeff, rpaulo, rwatson (as part of a larger patch) Approved by: kmacy (mentor) MFC after: 1 month Modified: head/sys/kern/kern_alq.c Modified: head/sys/kern/kern_alq.c ============================================================================== --- head/sys/kern/kern_alq.c Thu Apr 1 00:38:38 2010 (r206025) +++ head/sys/kern/kern_alq.c Thu Apr 1 01:16:00 2010 (r206026) @@ -103,6 +103,7 @@ static void ald_deactivate(struct alq *) /* Internal queue functions */ static void alq_shutdown(struct alq *); +static void alq_destroy(struct alq *); static int alq_doio(struct alq *); @@ -263,6 +264,18 @@ alq_shutdown(struct alq *alq) crfree(alq->aq_cred); } +void +alq_destroy(struct alq *alq) +{ + /* Drain all pending IO. */ + alq_shutdown(alq); + + mtx_destroy(&alq->aq_mtx); + free(alq->aq_first, M_ALD); + free(alq->aq_entbuf, M_ALD); + free(alq, M_ALD); +} + /* * Flush all pending data to disk. This operation will block. */ @@ -420,8 +433,11 @@ alq_open(struct alq **alqp, const char * alp->ae_next = alq->aq_first; - if ((error = ald_add(alq)) != 0) + if ((error = ald_add(alq)) != 0) { + alq_destroy(alq); return (error); + } + *alqp = alq; return (0); @@ -525,22 +541,9 @@ alq_flush(struct alq *alq) void alq_close(struct alq *alq) { - /* - * If we're already shuting down someone else will flush and close - * the vnode. - */ - if (ald_rem(alq) != 0) - return; - - /* - * Drain all pending IO. - */ - alq_shutdown(alq); - - mtx_destroy(&alq->aq_mtx); - free(alq->aq_first, M_ALD); - free(alq->aq_entbuf, M_ALD); - free(alq, M_ALD); + /* Only flush and destroy alq if not already shutting down. */ + if (ald_rem(alq) == 0) + alq_destroy(alq); } static int From owner-svn-src-all@FreeBSD.ORG Thu Apr 1 01:23:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C22E91065670; Thu, 1 Apr 2010 01:23:36 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B12AA8FC18; Thu, 1 Apr 2010 01:23: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 o311Namc080599; Thu, 1 Apr 2010 01:23:36 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o311NajH080597; Thu, 1 Apr 2010 01:23:36 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201004010123.o311NajH080597@svn.freebsd.org> From: Lawrence Stewart Date: Thu, 1 Apr 2010 01:23:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206027 - 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: Thu, 01 Apr 2010 01:23:36 -0000 Author: lstewart Date: Thu Apr 1 01:23:36 2010 New Revision: 206027 URL: http://svn.freebsd.org/changeset/base/206027 Log: According to SLEEP(9), msleep() is deprecated in favour of mtx_sleep(). Sponsored by: FreeBSD Foundation Reviewed by: dwmalone, jeff, rpaulo, rwatson (as part of a larger patch) Approved by: kmacy (mentor) MFC after: 1 month Modified: head/sys/kern/kern_alq.c Modified: head/sys/kern/kern_alq.c ============================================================================== --- head/sys/kern/kern_alq.c Thu Apr 1 01:16:00 2010 (r206026) +++ head/sys/kern/kern_alq.c Thu Apr 1 01:23:36 2010 (r206027) @@ -191,7 +191,7 @@ ald_daemon(void) for (;;) { while ((alq = LIST_FIRST(&ald_active)) == NULL && !ald_shutingdown) - msleep(&ald_active, &ald_mtx, PWAIT, "aldslp", 0); + mtx_sleep(&ald_active, &ald_mtx, PWAIT, "aldslp", 0); /* Don't shutdown until all active ALQs are flushed. */ if (ald_shutingdown && alq == NULL) { @@ -234,12 +234,12 @@ ald_shutdown(void *arg, int howto) /* * Wake ald_daemon so that it exits. It won't be able to do - * anything until we msleep because we hold the ald_mtx. + * anything until we mtx_sleep because we hold the ald_mtx. */ wakeup(&ald_active); /* Wait for ald_daemon to exit. */ - msleep(ald_proc, &ald_mtx, PWAIT, "aldslp", 0); + mtx_sleep(ald_proc, &ald_mtx, PWAIT, "aldslp", 0); ALD_UNLOCK(); } From owner-svn-src-all@FreeBSD.ORG Thu Apr 1 01:27:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED9AB106564A; Thu, 1 Apr 2010 01:27:10 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DCC498FC13; Thu, 1 Apr 2010 01:27: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 o311RAZv081385; Thu, 1 Apr 2010 01:27:10 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o311RA7C081383; Thu, 1 Apr 2010 01:27:10 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201004010127.o311RA7C081383@svn.freebsd.org> From: Lawrence Stewart Date: Thu, 1 Apr 2010 01:27: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: r206028 - 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: Thu, 01 Apr 2010 01:27:11 -0000 Author: lstewart Date: Thu Apr 1 01:27:10 2010 New Revision: 206028 URL: http://svn.freebsd.org/changeset/base/206028 Log: The ALQ should not be considered drained until it has been made inactive. Sponsored by: FreeBSD Foundation Reviewed by: dwmalone, jeff, rpaulo, rwatson (as part of a larger patch) Approved by: kmacy (mentor) MFC after: 1 month Modified: head/sys/kern/kern_alq.c Modified: head/sys/kern/kern_alq.c ============================================================================== --- head/sys/kern/kern_alq.c Thu Apr 1 01:23:36 2010 (r206027) +++ head/sys/kern/kern_alq.c Thu Apr 1 01:27:10 2010 (r206028) @@ -253,7 +253,7 @@ alq_shutdown(struct alq *alq) alq->aq_flags |= AQ_SHUTDOWN; /* Drain IO */ - while (alq->aq_flags & (AQ_FLUSHING|AQ_ACTIVE)) { + while (alq->aq_flags & AQ_ACTIVE) { alq->aq_flags |= AQ_WANTED; msleep_spin(alq, &alq->aq_mtx, "aldclose", 0); } From owner-svn-src-all@FreeBSD.ORG Thu Apr 1 01:49:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E6E5106564A; Thu, 1 Apr 2010 01:49: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 8DA568FC0A; Thu, 1 Apr 2010 01:49: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 o311nhGG086336; Thu, 1 Apr 2010 01:49:43 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o311nh5I086335; Thu, 1 Apr 2010 01:49:43 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201004010149.o311nh5I086335@svn.freebsd.org> From: Matt Jacob Date: Thu, 1 Apr 2010 01:49:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206029 - 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: Thu, 01 Apr 2010 01:49:43 -0000 Author: mjacob Date: Thu Apr 1 01:49:43 2010 New Revision: 206029 URL: http://svn.freebsd.org/changeset/base/206029 Log: Add a couple missing basic mode page codes. MFC after: 1 week Modified: head/sys/cam/scsi/scsi_all.h Modified: head/sys/cam/scsi/scsi_all.h ============================================================================== --- head/sys/cam/scsi/scsi_all.h Thu Apr 1 01:27:10 2010 (r206028) +++ head/sys/cam/scsi/scsi_all.h Thu Apr 1 01:49:43 2010 (r206029) @@ -170,6 +170,8 @@ struct scsi_mode_sense_6 #define SMS_PAGE_CODE 0x3F #define SMS_VENDOR_SPECIFIC_PAGE 0x00 #define SMS_DISCONNECT_RECONNECT_PAGE 0x02 +#define SMS_FORMAT_DEVICE_PAGE 0x03 +#define SMS_GEOMETRY_PAGE 0x04 #define SMS_CACHE_PAGE 0x08 #define SMS_PERIPHERAL_DEVICE_PAGE 0x09 #define SMS_CONTROL_MODE_PAGE 0x0A From owner-svn-src-all@FreeBSD.ORG Thu Apr 1 02:03:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE90C1065672; Thu, 1 Apr 2010 02:03:28 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A35C78FC08; Thu, 1 Apr 2010 02:03: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 o3123Ssp089449; Thu, 1 Apr 2010 02:03:28 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3123SWs089447; Thu, 1 Apr 2010 02:03:28 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201004010203.o3123SWs089447@svn.freebsd.org> From: Warner Losh Date: Thu, 1 Apr 2010 02:03:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206030 - in stable/8/tools: regression/lib/msun regression/usr.bin/pkill tools/ath/common tools/nanobsd tools/termcap X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 01 Apr 2010 02:03:28 -0000 Author: imp Date: Thu Apr 1 02:03:28 2010 New Revision: 206030 URL: http://svn.freebsd.org/changeset/base/206030 Log: MFC: r197542: - When we run our trap cleanup handler, echo that we are running this handler to make it more clear why we are 'suddenly' running df, umount, and mdconfig. - Remove trap handler again after we have unconfigured the memory device etc. Before we could end up running the trap handler if a later stage failed, which was a bit confusing and not really useful. MFC after: 2 weeks Modified: stable/8/tools/tools/nanobsd/nanobsd.sh Directory Properties: stable/8/tools/ (props changed) stable/8/tools/build/mk/ (props changed) stable/8/tools/build/options/ (props changed) stable/8/tools/kerneldoc/subsys/ (props changed) stable/8/tools/regression/acltools/ (props changed) stable/8/tools/regression/aio/aiotest/ (props changed) stable/8/tools/regression/bin/sh/ (props changed) stable/8/tools/regression/fifo/ (props changed) stable/8/tools/regression/geom/ (props changed) stable/8/tools/regression/lib/libc/ (props changed) stable/8/tools/regression/lib/msun/test-conj.t (props changed) stable/8/tools/regression/mqueue/mqtest1/ (props changed) stable/8/tools/regression/mqueue/mqtest2/ (props changed) stable/8/tools/regression/mqueue/mqtest3/ (props changed) stable/8/tools/regression/mqueue/mqtest4/ (props changed) stable/8/tools/regression/mqueue/mqtest5/ (props changed) stable/8/tools/regression/poll/ (props changed) stable/8/tools/regression/posixsem/ (props changed) stable/8/tools/regression/priv/ (props changed) stable/8/tools/regression/usr.bin/pkill/pgrep-_g.t (props changed) stable/8/tools/regression/usr.bin/pkill/pgrep-_s.t (props changed) stable/8/tools/regression/usr.bin/pkill/pkill-_g.t (props changed) stable/8/tools/tools/ath/ (props changed) stable/8/tools/tools/ath/common/dumpregs.h (props changed) stable/8/tools/tools/ath/common/dumpregs_5210.c (props changed) stable/8/tools/tools/ath/common/dumpregs_5211.c (props changed) stable/8/tools/tools/ath/common/dumpregs_5212.c (props changed) stable/8/tools/tools/ath/common/dumpregs_5416.c (props changed) stable/8/tools/tools/termcap/termcap.pl (props changed) stable/8/tools/tools/vimage/ (props changed) Modified: stable/8/tools/tools/nanobsd/nanobsd.sh ============================================================================== --- stable/8/tools/tools/nanobsd/nanobsd.sh Thu Apr 1 01:49:43 2010 (r206029) +++ stable/8/tools/tools/nanobsd/nanobsd.sh Thu Apr 1 02:03:28 2010 (r206030) @@ -439,7 +439,7 @@ create_i386_diskimage ( ) ( -y ${NANO_HEADS}` fi - trap "df -i ${MNT} ; umount ${MNT} || true ; mdconfig -d -u $MD" 1 2 15 EXIT + trap "echo 'Running exit trap code' ; df -i ${MNT} ; umount ${MNT} || true ; mdconfig -d -u $MD" 1 2 15 EXIT fdisk -i -f ${NANO_OBJ}/_.fdisk ${MD} fdisk ${MD} @@ -491,6 +491,9 @@ create_i386_diskimage ( ) ( echo "Writing out _.disk.image..." dd if=/dev/${MD}s1 of=${NANO_DISKIMGDIR}/_.disk.image bs=64k mdconfig -d -u $MD + + trap - 1 2 15 EXIT + ) > ${NANO_OBJ}/_.di 2>&1 ) From owner-svn-src-all@FreeBSD.ORG Thu Apr 1 02:41:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 46DFC106564A; Thu, 1 Apr 2010 02:41:51 +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 33AD08FC1F; Thu, 1 Apr 2010 02:41: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 o312fpli098256; Thu, 1 Apr 2010 02:41:51 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o312fpYb098247; Thu, 1 Apr 2010 02:41:51 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201004010241.o312fpYb098247@svn.freebsd.org> From: Marcel Moolenaar Date: Thu, 1 Apr 2010 02:41:51 +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: r206031 - in stable/8/sys/powerpc: booke mpc85xx 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: Thu, 01 Apr 2010 02:41:51 -0000 Author: marcel Date: Thu Apr 1 02:41:50 2010 New Revision: 206031 URL: http://svn.freebsd.org/changeset/base/206031 Log: MFC rev 199602, 200739, 203177, 203350, 203352, 205495, 205527, 205535 and 205569: Sync MPC85xx/Book-E with 9-current. Modified: stable/8/sys/powerpc/booke/clock.c stable/8/sys/powerpc/booke/interrupt.c stable/8/sys/powerpc/booke/machdep.c stable/8/sys/powerpc/booke/trap_subr.S stable/8/sys/powerpc/mpc85xx/ocpbus.c stable/8/sys/powerpc/mpc85xx/ocpbus.h stable/8/sys/powerpc/mpc85xx/pci_ocp.c stable/8/sys/powerpc/powerpc/cpu.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/net/ (props changed) Modified: stable/8/sys/powerpc/booke/clock.c ============================================================================== --- stable/8/sys/powerpc/booke/clock.c Thu Apr 1 02:03:28 2010 (r206030) +++ stable/8/sys/powerpc/booke/clock.c Thu Apr 1 02:41:50 2010 (r206031) @@ -197,15 +197,8 @@ DELAY(int n) { u_quad_t start, end, now; -#define USECS_IN_SEC 1000000ULL - - if (n > USECS_IN_SEC) { - printf("WARNING: %s(%d) called from %p", __func__, n, - __builtin_return_address(0)); - } - start = mftb(); - end = start + (u_quad_t)ticks_per_sec / (USECS_IN_SEC / n); + end = start + (u_quad_t)ticks_per_sec / (1000000ULL / n); do { now = mftb(); } while (now < end || (now > start && end < start)); Modified: stable/8/sys/powerpc/booke/interrupt.c ============================================================================== --- stable/8/sys/powerpc/booke/interrupt.c Thu Apr 1 02:03:28 2010 (r206030) +++ stable/8/sys/powerpc/booke/interrupt.c Thu Apr 1 02:41:50 2010 (r206031) @@ -123,6 +123,7 @@ powerpc_decr_interrupt(struct trapframe decr_intr(framep); atomic_subtract_int(&td->td_intr_nesting_level, 1); critical_exit(); + framep->srr1 &= ~PSL_WE; } /* @@ -135,4 +136,5 @@ powerpc_extr_interrupt(struct trapframe critical_enter(); PIC_DISPATCH(pic, framep); critical_exit(); + framep->srr1 &= ~PSL_WE; } Modified: stable/8/sys/powerpc/booke/machdep.c ============================================================================== --- stable/8/sys/powerpc/booke/machdep.c Thu Apr 1 02:03:28 2010 (r206030) +++ stable/8/sys/powerpc/booke/machdep.c Thu Apr 1 02:41:50 2010 (r206031) @@ -706,6 +706,7 @@ cpu_idle (int busy) register_t msr; msr = mfmsr(); + #ifdef INVARIANTS if ((msr & PSL_EE) != PSL_EE) { struct thread *td = curthread; @@ -713,19 +714,10 @@ cpu_idle (int busy) panic("ints disabled in idleproc!"); } #endif -#if 0 - /* - * Freescale E500 core RM section 6.4.1 - */ - msr = msr | PSL_WE; - __asm__(" msync;" - " mtmsr %0;" - " isync;" - "loop: b loop" : - /* no output */ : - "r" (msr)); -#endif + /* Freescale E500 core RM section 6.4.1. */ + msr = msr | PSL_WE; + __asm __volatile("msync; mtmsr %0; isync" :: "r" (msr)); } int Modified: stable/8/sys/powerpc/booke/trap_subr.S ============================================================================== --- stable/8/sys/powerpc/booke/trap_subr.S Thu Apr 1 02:03:28 2010 (r206030) +++ stable/8/sys/powerpc/booke/trap_subr.S Thu Apr 1 02:41:50 2010 (r206031) @@ -441,6 +441,7 @@ INTERRUPT(int_instr_storage) INTERRUPT(int_external_input) STANDARD_PROLOG(SPR_SPRG1, PC_TEMPSAVE, SPR_SRR0, SPR_SRR1) FRAME_SETUP(SPR_SPRG1, PC_TEMPSAVE, EXC_EXI) + addi %r3, %r1, 8 bl CNAME(powerpc_extr_interrupt) b trapexit Modified: stable/8/sys/powerpc/mpc85xx/ocpbus.c ============================================================================== --- stable/8/sys/powerpc/mpc85xx/ocpbus.c Thu Apr 1 02:03:28 2010 (r206030) +++ stable/8/sys/powerpc/mpc85xx/ocpbus.c Thu Apr 1 02:41:50 2010 (r206031) @@ -152,6 +152,10 @@ ocpbus_write_law(int trgt, int type, u_l addr = 0xA0000000; size = 0x10000000; break; + case OCP85XX_TGTIF_PCI3: + addr = 0xB0000000; + size = 0x10000000; + break; default: return (EINVAL); } @@ -170,6 +174,10 @@ ocpbus_write_law(int trgt, int type, u_l addr = 0xfee20000; size = 0x00010000; break; + case OCP85XX_TGTIF_PCI3: + addr = 0xfee30000; + size = 0x00010000; + break; default: return (EINVAL); } @@ -188,7 +196,7 @@ static int ocpbus_probe(device_t dev) { - device_set_desc(dev, "On-Chip Peripherals bus"); + device_set_desc(dev, "Freescale on-chip peripherals bus"); return (BUS_PROBE_DEFAULT); } @@ -210,6 +218,7 @@ ocpbus_attach(device_t dev) ocpbus_mk_child(dev, OCPBUS_DEVTYPE_PCIB, 0); ocpbus_mk_child(dev, OCPBUS_DEVTYPE_PCIB, 1); ocpbus_mk_child(dev, OCPBUS_DEVTYPE_PCIB, 2); + ocpbus_mk_child(dev, OCPBUS_DEVTYPE_PCIB, 3); ocpbus_mk_child(dev, OCPBUS_DEVTYPE_TSEC, 0); ocpbus_mk_child(dev, OCPBUS_DEVTYPE_TSEC, 1); ocpbus_mk_child(dev, OCPBUS_DEVTYPE_TSEC, 2); @@ -338,6 +347,10 @@ const struct ocp_resource mpc8555_resour OCP85XX_PCI_SIZE}, {OCPBUS_DEVTYPE_PCIB, 2, SYS_RES_MEMORY, 1, 0, OCP85XX_TGTIF_PCI2}, {OCPBUS_DEVTYPE_PCIB, 2, SYS_RES_IOPORT, 1, 0, OCP85XX_TGTIF_PCI2}, + {OCPBUS_DEVTYPE_PCIB, 3, SYS_RES_MEMORY, 0, OCP85XX_PCI3_OFF, + OCP85XX_PCI_SIZE}, + {OCPBUS_DEVTYPE_PCIB, 3, SYS_RES_MEMORY, 1, 0, OCP85XX_TGTIF_PCI3}, + {OCPBUS_DEVTYPE_PCIB, 3, SYS_RES_IOPORT, 1, 0, OCP85XX_TGTIF_PCI3}, {OCPBUS_DEVTYPE_LBC, 0, SYS_RES_MEMORY, 0, OCP85XX_LBC_OFF, OCP85XX_LBC_SIZE}, Modified: stable/8/sys/powerpc/mpc85xx/ocpbus.h ============================================================================== --- stable/8/sys/powerpc/mpc85xx/ocpbus.h Thu Apr 1 02:03:28 2010 (r206030) +++ stable/8/sys/powerpc/mpc85xx/ocpbus.h Thu Apr 1 02:41:50 2010 (r206031) @@ -50,6 +50,7 @@ #define OCP85XX_TGTIF_PCI0 0 #define OCP85XX_TGTIF_PCI1 1 #define OCP85XX_TGTIF_PCI2 2 +#define OCP85XX_TGTIF_PCI3 3 #define OCP85XX_TGTIF_LBC 4 #define OCP85XX_TGTIF_RAM_INTL 11 #define OCP85XX_TGTIF_RIO 12 @@ -86,6 +87,7 @@ #define OCP85XX_PCI0_OFF 0x08000 #define OCP85XX_PCI1_OFF 0x09000 #define OCP85XX_PCI2_OFF 0x0A000 +#define OCP85XX_PCI3_OFF 0x0B000 #define OCP85XX_PCI_SIZE 0x1000 #define OCP85XX_TSEC0_OFF 0x24000 #define OCP85XX_TSEC1_OFF 0x25000 Modified: stable/8/sys/powerpc/mpc85xx/pci_ocp.c ============================================================================== --- stable/8/sys/powerpc/mpc85xx/pci_ocp.c Thu Apr 1 02:03:28 2010 (r206030) +++ stable/8/sys/powerpc/mpc85xx/pci_ocp.c Thu Apr 1 02:41:50 2010 (r206031) @@ -76,6 +76,9 @@ __FBSDID("$FreeBSD$"); #define REG_PIWBEAR(n) (0x0e0c - 0x20 * (n)) #define REG_PIWAR(n) (0x0e10 - 0x20 * (n)) +#define PCIR_FSL_LTSSM 0x404 +#define FSL_LTSSM_L0 0x16 + #define DEVFN(b, s, f) ((b << 16) | (s << 8) | f) struct pci_ocp_softc { @@ -94,7 +97,7 @@ struct pci_ocp_softc { int sc_rid; int sc_busnr; - int sc_pcie:1; + uint8_t sc_pcie_cap; /* Devices that need special attention. */ int sc_devfn_tundra; @@ -168,7 +171,7 @@ pci_ocp_cfgread(struct pci_ocp_softc *sc addr |= (slot & 0x1f) << 11; addr |= (func & 0x7) << 8; addr |= reg & 0xfc; - if (sc->sc_pcie) + if (sc->sc_pcie_cap) addr |= (reg & 0xf00) << 16; bus_space_write_4(sc->sc_bst, sc->sc_bsh, REG_CFG_ADDR, addr); @@ -206,7 +209,7 @@ pci_ocp_cfgwrite(struct pci_ocp_softc *s addr |= (slot & 0x1f) << 11; addr |= (func & 0x7) << 8; addr |= reg & 0xfc; - if (sc->sc_pcie) + if (sc->sc_pcie_cap) addr |= (reg & 0xf00) << 16; bus_space_write_4(sc->sc_bst, sc->sc_bsh, REG_CFG_ADDR, addr); @@ -261,7 +264,7 @@ pci_ocp_maxslots(device_t dev) { struct pci_ocp_softc *sc = device_get_softc(dev); - return ((sc->sc_pcie) ? 0 : 30); + return ((sc->sc_pcie_cap) ? 0 : 31); } static uint32_t @@ -271,9 +274,21 @@ pci_ocp_read_config(device_t dev, u_int struct pci_ocp_softc *sc = device_get_softc(dev); u_int devfn; - if (bus == sc->sc_busnr && !sc->sc_pcie && slot < 10) + if (bus == sc->sc_busnr && !sc->sc_pcie_cap && slot < 10) return (~0); devfn = DEVFN(bus, slot, func); + /* + * For the host controller itself, pretend to be a standard + * PCI bridge, rather than a PowerPC processor. That way the + * generic PCI code will enumerate all subordinate busses + * and devices as usual. + */ + if (sc->sc_pcie_cap && devfn == 0) { + if (reg == PCIR_CLASS && bytes == 1) + return (PCIC_BRIDGE); + if (reg == PCIR_SUBCLASS && bytes == 1) + return (PCIS_BRIDGE_PCI); + } if (devfn == sc->sc_devfn_tundra) return (~0); if (devfn == sc->sc_devfn_via_ide && reg == PCIR_INTPIN) @@ -287,7 +302,7 @@ pci_ocp_write_config(device_t dev, u_int { struct pci_ocp_softc *sc = device_get_softc(dev); - if (bus == sc->sc_busnr && !sc->sc_pcie && slot < 10) + if (bus == sc->sc_busnr && !sc->sc_pcie_cap && slot < 10) return; pci_ocp_cfgwrite(sc, bus, slot, func, reg, val, bytes); } @@ -297,11 +312,12 @@ pci_ocp_probe(device_t dev) { char buf[128]; struct pci_ocp_softc *sc; - const char *mpcid, *type; + const char *type; device_t parent; u_long start, size; uintptr_t devtype; uint32_t cfgreg; + uint8_t capptr; int error; parent = device_get_parent(dev); @@ -312,6 +328,7 @@ pci_ocp_probe(device_t dev) return (ENXIO); sc = device_get_softc(dev); + sc->sc_dev = dev; sc->sc_rid = 0; sc->sc_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->sc_rid, @@ -327,48 +344,33 @@ pci_ocp_probe(device_t dev) cfgreg = pci_ocp_cfgread(sc, 0, 0, 0, PCIR_VENDOR, 2); if (cfgreg != 0x1057 && cfgreg != 0x1957) goto out; - cfgreg = pci_ocp_cfgread(sc, 0, 0, 0, PCIR_DEVICE, 2); - switch (cfgreg) { - case 0x000a: - mpcid = "8555E"; - break; - case 0x0012: - mpcid = "8548E"; - break; - case 0x0013: - mpcid = "8548"; - break; - /* - * Documentation from Freescale is incorrect. - * Use right values after documentation is corrected. - */ - case 0x0030: - mpcid = "8544E"; - break; - case 0x0031: - mpcid = "8544"; - break; - case 0x0032: - mpcid = "8544"; - break; - default: + + cfgreg = pci_ocp_cfgread(sc, 0, 0, 0, PCIR_CLASS, 1); + if (cfgreg != PCIC_PROCESSOR) + goto out; + + cfgreg = pci_ocp_cfgread(sc, 0, 0, 0, PCIR_SUBCLASS, 1); + if (cfgreg != PCIS_PROCESSOR_POWERPC) + goto out; + + cfgreg = pci_ocp_cfgread(sc, 0, 0, 0, PCIR_PROGIF, 1); + if (cfgreg != 0) /* RC mode = 0, EP mode = 1 */ goto out; - } type = "PCI"; - cfgreg = pci_ocp_cfgread(sc, 0, 0, 0, PCIR_CAP_PTR, 1); - while (cfgreg != 0) { - cfgreg = pci_ocp_cfgread(sc, 0, 0, 0, cfgreg, 2); + capptr = pci_ocp_cfgread(sc, 0, 0, 0, PCIR_CAP_PTR, 1); + while (capptr != 0) { + cfgreg = pci_ocp_cfgread(sc, 0, 0, 0, capptr, 2); switch (cfgreg & 0xff) { case PCIY_PCIX: /* PCI-X */ type = "PCI-X"; break; case PCIY_EXPRESS: /* PCI Express */ type = "PCI Express"; - sc->sc_pcie = 1; + sc->sc_pcie_cap = capptr; break; } - cfgreg = (cfgreg >> 8) & 0xff; + capptr = (cfgreg >> 8) & 0xff; } error = bus_get_resource(dev, SYS_RES_MEMORY, 1, &start, &size); @@ -376,7 +378,7 @@ pci_ocp_probe(device_t dev) goto out; snprintf(buf, sizeof(buf), - "Freescale MPC%s %s host controller", mpcid, type); + "Freescale on-chip %s host controller", type); device_set_desc_copy(dev, buf); error = BUS_PROBE_DEFAULT; @@ -491,7 +493,7 @@ pci_ocp_route_int(struct pci_ocp_softc * } static int -pci_ocp_init(struct pci_ocp_softc *sc, int bus, int maxslot) +pci_ocp_init(struct pci_ocp_softc *sc, int bus, int nslots) { int secbus, slot; int func, maxfunc; @@ -501,7 +503,7 @@ pci_ocp_init(struct pci_ocp_softc *sc, i uint8_t intline, intpin; secbus = bus; - for (slot = 0; slot < maxslot; slot++) { + for (slot = 0; slot < nslots; slot++) { maxfunc = 0; for (func = 0; func <= maxfunc; func++) { hdrtype = pci_ocp_read_config(sc->sc_dev, bus, slot, @@ -598,7 +600,7 @@ pci_ocp_init(struct pci_ocp_softc *sc, i PCIR_SUBBUS_1, 0xff, 1); secbus = pci_ocp_init(sc, secbus, - (subclass == PCIS_BRIDGE_PCI) ? 31 : 1); + (subclass == PCIS_BRIDGE_PCI) ? 32 : 1); pci_ocp_write_config(sc->sc_dev, bus, slot, func, PCIR_SUBBUS_1, secbus, 1); @@ -720,7 +722,7 @@ pci_ocp_attach(device_t dev) { struct pci_ocp_softc *sc; uint32_t cfgreg; - int error, maxslot; + int error, nslots; sc = device_get_softc(dev); sc->sc_dev = dev; @@ -753,8 +755,19 @@ pci_ocp_attach(device_t dev) sc->sc_devfn_tundra = -1; sc->sc_devfn_via_ide = -1; - maxslot = (sc->sc_pcie) ? 1 : 31; - pci_ocp_init(sc, sc->sc_busnr, maxslot); + /* + * PCI Express host controllers require a link. We don't + * fail the attach if there's no link, but we also don't + * create a child pci(4) device. + */ + if (sc->sc_pcie_cap) { + cfgreg = pci_ocp_cfgread(sc, 0, 0, 0, PCIR_FSL_LTSSM, 4); + if (cfgreg < FSL_LTSSM_L0) + return (0); + } + + nslots = (sc->sc_pcie_cap) ? 1 : 32; + pci_ocp_init(sc, sc->sc_busnr, nslots); device_add_child(dev, "pci", -1); return (bus_generic_attach(dev)); @@ -783,6 +796,7 @@ pci_ocp_alloc_resource(device_t dev, dev device_printf(dev, "%s requested ISA interrupt %lu\n", device_get_nameunit(child), start); } + flags |= RF_SHAREABLE; return (BUS_ALLOC_RESOURCE(device_get_parent(dev), child, type, rid, start, end, count, flags)); default: Modified: stable/8/sys/powerpc/powerpc/cpu.c ============================================================================== --- stable/8/sys/powerpc/powerpc/cpu.c Thu Apr 1 02:03:28 2010 (r206030) +++ stable/8/sys/powerpc/powerpc/cpu.c Thu Apr 1 02:41:50 2010 (r206031) @@ -433,6 +433,13 @@ cpu_e500_setup(int cpuid, uint16_t vers) register_t hid0; hid0 = mfspr(SPR_HID0); + + /* Programe power-management mode. */ + hid0 &= ~(HID0_DOZE | HID0_NAP | HID0_SLEEP); + hid0 |= HID0_DOZE; + + mtspr(SPR_HID0, hid0); + printf("cpu%d: HID0 %b\n", cpuid, (int)hid0, HID0_E500_BITMASK); } From owner-svn-src-all@FreeBSD.ORG Thu Apr 1 10:41:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 534191065670; Thu, 1 Apr 2010 10:41:02 +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 42FC18FC14; Thu, 1 Apr 2010 10:41:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o31Af2HB006566; Thu, 1 Apr 2010 10:41:02 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o31Af2Vl006565; Thu, 1 Apr 2010 10:41:02 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201004011041.o31Af2Vl006565@svn.freebsd.org> From: Alexander Motin Date: Thu, 1 Apr 2010 10:41: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: r206032 - head/sys/netgraph X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2010 10:41:02 -0000 Author: mav Date: Thu Apr 1 10:41:01 2010 New Revision: 206032 URL: http://svn.freebsd.org/changeset/base/206032 Log: Remove alignment constraints. Modified: head/sys/netgraph/ng_tcpmss.c Modified: head/sys/netgraph/ng_tcpmss.c ============================================================================== --- head/sys/netgraph/ng_tcpmss.c Thu Apr 1 02:41:50 2010 (r206031) +++ head/sys/netgraph/ng_tcpmss.c Thu Apr 1 10:41:01 2010 (r206032) @@ -47,6 +47,7 @@ #include #include +#include #include #include #include @@ -410,9 +411,9 @@ correct_mss(struct tcphdr *tc, int hlen, { int olen, optlen; u_char *opt; - uint16_t *mss; int accumulate; int res = 0; + uint16_t sum; for (olen = hlen - sizeof(struct tcphdr), opt = (u_char *)(tc + 1); olen > 0; olen -= optlen, opt += optlen) { @@ -427,13 +428,15 @@ correct_mss(struct tcphdr *tc, int hlen, if (*opt == TCPOPT_MAXSEG) { if (optlen != TCPOLEN_MAXSEG) continue; - mss = (uint16_t *)(opt + 2); - if (ntohs(*mss) > maxmss) { - accumulate = *mss; - *mss = htons(maxmss); - accumulate -= *mss; - if ((flags & CSUM_TCP) == 0) - TCPMSS_ADJUST_CHECKSUM(accumulate, tc->th_sum); + accumulate = be16dec(opt + 2); + if (accumulate > maxmss) { + if ((flags & CSUM_TCP) == 0) { + accumulate -= maxmss; + sum = be16dec(&tc->th_sum); + TCPMSS_ADJUST_CHECKSUM(accumulate, sum); + be16enc(&tc->th_sum, sum); + } + be16enc(opt + 2, maxmss); res = 1; } } From owner-svn-src-all@FreeBSD.ORG Thu Apr 1 11:30:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C764A1065670; Thu, 1 Apr 2010 11:30:46 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B6D768FC12; Thu, 1 Apr 2010 11:30: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 o31BUkNC017373; Thu, 1 Apr 2010 11:30:46 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o31BUk3p017371; Thu, 1 Apr 2010 11:30:46 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201004011130.o31BUk3p017371@svn.freebsd.org> From: Joel Dahl Date: Thu, 1 Apr 2010 11:30: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: r206033 - head/sys/dev/sound/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: Thu, 01 Apr 2010 11:30:46 -0000 Author: joel (doc committer) Date: Thu Apr 1 11:30:46 2010 New Revision: 206033 URL: http://svn.freebsd.org/changeset/base/206033 Log: Fix the gap between mute and lowest possible volume. The es1370 mixer volumes were incorrectly calculated. I've tested this with one of my es1370 cards and I can confirm that it works. PR: 98167 Submitted by: Joseph Terner Approved by: kib Modified: head/sys/dev/sound/pci/es137x.c Modified: head/sys/dev/sound/pci/es137x.c ============================================================================== --- head/sys/dev/sound/pci/es137x.c Thu Apr 1 10:41:01 2010 (r206032) +++ head/sys/dev/sound/pci/es137x.c Thu Apr 1 11:30:46 2010 (r206033) @@ -355,7 +355,7 @@ es1370_mixset(struct snd_mixer *m, unsig if (mixtable[dev].left == 0xf) rl = (l < 2) ? 0x80 : 7 - (l - 2) / 14; else - rl = (l < 10) ? 0x80 : 15 - (l - 10) / 6; + rl = (l < 7) ? 0x80 : 31 - (l - 7) / 3; es = mix_getdevinfo(m); ES_LOCK(es); if (dev == SOUND_MIXER_PCM && (ES_SINGLE_PCM_MIX(es->escfg)) && @@ -364,7 +364,7 @@ es1370_mixset(struct snd_mixer *m, unsig else set_dac1 = 0; if (mixtable[dev].stereo) { - rr = (r < 10) ? 0x80 : 15 - (r - 10) / 6; + rr = (r < 7) ? 0x80 : 31 - (r - 7) / 3; es1370_wrcodec(es, mixtable[dev].right, rr); if (set_dac1 && mixtable[SOUND_MIXER_SYNTH].stereo) es1370_wrcodec(es, From owner-svn-src-all@FreeBSD.ORG Thu Apr 1 12:18:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A6CC71065677; Thu, 1 Apr 2010 12:18:44 +0000 (UTC) (envelope-from decke@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 95F2D8FC0C; Thu, 1 Apr 2010 12:18: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 o31CIibe027983; Thu, 1 Apr 2010 12:18:44 GMT (envelope-from decke@svn.freebsd.org) Received: (from decke@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o31CIiL4027981; Thu, 1 Apr 2010 12:18:44 GMT (envelope-from decke@svn.freebsd.org) Message-Id: <201004011218.o31CIiL4027981@svn.freebsd.org> From: Bernhard Froehlich Date: Thu, 1 Apr 2010 12:18: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: r206034 - 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, 01 Apr 2010 12:18:44 -0000 Author: decke (ports committer) Date: Thu Apr 1 12:18:44 2010 New Revision: 206034 URL: http://svn.freebsd.org/changeset/base/206034 Log: - Add myself to the ports committer list Approved by: miwi (mentor), beat (co-mentor) Modified: head/share/misc/committers-ports.dot Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Thu Apr 1 11:30:46 2010 (r206033) +++ head/share/misc/committers-ports.dot Thu Apr 1 12:18:44 2010 (r206034) @@ -67,6 +67,7 @@ cperciva [label="Colin Percival\ncperciv daichi [label="Daichi Goto\ndaichi@FreeBSD.org\n2002/10/17"] danfe [label="Alexey Dokuchaev\ndanfe@FreeBSD.org\n2004/08/20"] db [label="Diane Bruce\ndb@FreeBSD.org\n2007/01/18"] +decke [label="Bernhard Froehlich\ndecke@FreeBSD.org\n2010/03/21"] delphij [label="Xin Li\ndelphij@FreeBSD.org\n2006/05/01"] demon [label="Dmitry Sivachenko\ndemon@FreeBSD.org\n2000/11/13"] dryice [label="Dryice Dong Liu\ndryice@FreeBSD.org\n2006/12/25"] @@ -181,6 +182,8 @@ arved -> stefan asami -> obrien +beat -> decke + beech -> glarkin beech -> mva @@ -283,6 +286,7 @@ mezz -> tmclaugh miwi -> amdmi3 miwi -> avilla miwi -> beat +miwi -> decke miwi -> farrokhi miwi -> gahr miwi -> makc From owner-svn-src-all@FreeBSD.ORG Thu Apr 1 12:25:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 876E6106566B; Thu, 1 Apr 2010 12:25:41 +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 730108FC13; Thu, 1 Apr 2010 12:25: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 o31CPfZ6029602; Thu, 1 Apr 2010 12:25:41 GMT (envelope-from simon@svn.freebsd.org) Received: (from simon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o31CPfPb029573; Thu, 1 Apr 2010 12:25:41 GMT (envelope-from simon@svn.freebsd.org) Message-Id: <201004011225.o31CPfPb029573@svn.freebsd.org> From: "Simon L. Nielsen" Date: Thu, 1 Apr 2010 12:25:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor-crypto MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206035 - in vendor-crypto/openssl/dist: . apps crypto crypto/asn1 crypto/bio crypto/bn crypto/bn/asm crypto/engine crypto/evp crypto/ocsp crypto/rand engines fips ssl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 01 Apr 2010 12:25:41 -0000 Author: simon Date: Thu Apr 1 12:25:40 2010 New Revision: 206035 URL: http://svn.freebsd.org/changeset/base/206035 Log: Import OpenSSL 0.9.8n. Modified: vendor-crypto/openssl/dist/CHANGES vendor-crypto/openssl/dist/FAQ vendor-crypto/openssl/dist/Makefile vendor-crypto/openssl/dist/NEWS vendor-crypto/openssl/dist/README vendor-crypto/openssl/dist/apps/req.c vendor-crypto/openssl/dist/apps/speed.c vendor-crypto/openssl/dist/config vendor-crypto/openssl/dist/crypto/asn1/a_object.c vendor-crypto/openssl/dist/crypto/bio/bss_file.c vendor-crypto/openssl/dist/crypto/bn/asm/ppc.pl vendor-crypto/openssl/dist/crypto/bn/asm/x86_64-gcc.c vendor-crypto/openssl/dist/crypto/bn/bn_div.c vendor-crypto/openssl/dist/crypto/engine/eng_all.c vendor-crypto/openssl/dist/crypto/engine/eng_cryptodev.c vendor-crypto/openssl/dist/crypto/evp/digest.c vendor-crypto/openssl/dist/crypto/evp/evp_locl.h vendor-crypto/openssl/dist/crypto/evp/names.c vendor-crypto/openssl/dist/crypto/md32_common.h vendor-crypto/openssl/dist/crypto/ocsp/ocsp_prn.c vendor-crypto/openssl/dist/crypto/opensslv.h vendor-crypto/openssl/dist/crypto/rand/rand_win.c vendor-crypto/openssl/dist/engines/e_capi.c vendor-crypto/openssl/dist/engines/e_chil.c vendor-crypto/openssl/dist/fips/Makefile vendor-crypto/openssl/dist/openssl.spec vendor-crypto/openssl/dist/ssl/kssl.c vendor-crypto/openssl/dist/ssl/s3_pkt.c Modified: vendor-crypto/openssl/dist/CHANGES ============================================================================== --- vendor-crypto/openssl/dist/CHANGES Thu Apr 1 12:18:44 2010 (r206034) +++ vendor-crypto/openssl/dist/CHANGES Thu Apr 1 12:25:40 2010 (r206035) @@ -2,6 +2,21 @@ OpenSSL CHANGES _______________ + Changes between 0.9.8m and 0.9.8n [24 Mar 2010] + + *) When rejecting SSL/TLS records due to an incorrect version number, never + update s->server with a new major version number. As of + - OpenSSL 0.9.8m if 'short' is a 16-bit type, + - OpenSSL 0.9.8f if 'short' is longer than 16 bits, + the previous behavior could result in a read attempt at NULL when + receiving specific incorrect SSL/TLS records once record payload + protection is active. (CVE-2010-0740) + [Bodo Moeller, Adam Langley ] + + *) Fix for CVE-2010-0433 where some kerberos enabled versions of OpenSSL + could be crashed if the relevant tables were not present (e.g. chrooted). + [Tomas Hoger ] + Changes between 0.9.8l and 0.9.8m [25 Feb 2010] *) Always check bn_wexpend() return values for failure. (CVE-2009-3245) Modified: vendor-crypto/openssl/dist/FAQ ============================================================================== --- vendor-crypto/openssl/dist/FAQ Thu Apr 1 12:18:44 2010 (r206034) +++ vendor-crypto/openssl/dist/FAQ Thu Apr 1 12:25:40 2010 (r206035) @@ -78,7 +78,7 @@ OpenSSL - Frequently Asked Questions * Which is the current version of OpenSSL? The current version is available from . -OpenSSL 0.9.8m was released on Feb 25th, 2010. +OpenSSL 0.9.8n was released on Mar 24th, 2010. In addition to the current stable release, you can also access daily snapshots of the OpenSSL development version at value,def,value,nid,n_min,n_max, chtype)) Modified: vendor-crypto/openssl/dist/apps/speed.c ============================================================================== --- vendor-crypto/openssl/dist/apps/speed.c Thu Apr 1 12:18:44 2010 (r206034) +++ vendor-crypto/openssl/dist/apps/speed.c Thu Apr 1 12:25:40 2010 (r206035) @@ -254,12 +254,18 @@ # endif #endif -#if defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MACINTOSH_CLASSIC) || defined(OPENSSL_SYS_OS2) || defined(OPENSSL_SYS_NETWARE) -# define NO_FORK 1 -#elif HAVE_FORK +#ifndef HAVE_FORK +# if defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MACINTOSH_CLASSIC) || defined(OPENSSL_SYS_OS2) || defined(OPENSSL_SYS_NETWARE) +# define HAVE_FORK 0 +# else +# define HAVE_FORK 1 +# endif +#endif + +#if HAVE_FORK # undef NO_FORK #else -# define NO_FORK 1 +# define NO_FORK #endif #undef BUFSIZE Modified: vendor-crypto/openssl/dist/config ============================================================================== --- vendor-crypto/openssl/dist/config Thu Apr 1 12:18:44 2010 (r206034) +++ vendor-crypto/openssl/dist/config Thu Apr 1 12:25:40 2010 (r206035) @@ -741,6 +741,10 @@ case "$GUESSOS" in OBJECT_MODE=${OBJECT_MODE:-32} if [ "$CC" = "gcc" ]; then OUT="aix-gcc" + if [ $OBJECT_MODE -eq 64 ]; then + echo 'Your $OBJECT_MODE was found to be set to 64' + OUT="aix64-gcc" + fi elif [ $OBJECT_MODE -eq 64 ]; then echo 'Your $OBJECT_MODE was found to be set to 64' OUT="aix64-cc" Modified: vendor-crypto/openssl/dist/crypto/asn1/a_object.c ============================================================================== --- vendor-crypto/openssl/dist/crypto/asn1/a_object.c Thu Apr 1 12:18:44 2010 (r206034) +++ vendor-crypto/openssl/dist/crypto/asn1/a_object.c Thu Apr 1 12:25:40 2010 (r206035) @@ -291,12 +291,12 @@ ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT ASN1_OBJECT *ret=NULL; const unsigned char *p; int i; - /* Sanity check OID encoding: can't have 0x80 in subidentifiers, see: - * X.690 8.19.2 + /* Sanity check OID encoding: can't have leading 0x80 in + * subidentifiers, see: X.690 8.19.2 */ for (i = 0, p = *pp + 1; i < len - 1; i++, p++) { - if (*p == 0x80) + if (*p == 0x80 && (!i || !(p[-1] & 0x80))) { ASN1err(ASN1_F_C2I_ASN1_OBJECT,ASN1_R_INVALID_OBJECT_ENCODING); return NULL; Modified: vendor-crypto/openssl/dist/crypto/bio/bss_file.c ============================================================================== --- vendor-crypto/openssl/dist/crypto/bio/bss_file.c Thu Apr 1 12:18:44 2010 (r206034) +++ vendor-crypto/openssl/dist/crypto/bio/bss_file.c Thu Apr 1 12:25:40 2010 (r206035) @@ -272,9 +272,9 @@ static long MS_CALLBACK file_ctrl(BIO *b BIO_clear_flags(b,BIO_FLAGS_UPLINK); #endif #endif -#ifdef UP_fsetmode +#ifdef UP_fsetmod if (b->flags&BIO_FLAGS_UPLINK) - UP_fsetmode(b->ptr,num&BIO_FP_TEXT?'t':'b'); + UP_fsetmod(b->ptr,(char)((num&BIO_FP_TEXT)?'t':'b')); else #endif { Modified: vendor-crypto/openssl/dist/crypto/bn/asm/ppc.pl ============================================================================== --- vendor-crypto/openssl/dist/crypto/bn/asm/ppc.pl Thu Apr 1 12:18:44 2010 (r206034) +++ vendor-crypto/openssl/dist/crypto/bn/asm/ppc.pl Thu Apr 1 12:25:40 2010 (r206035) @@ -2074,5 +2074,7 @@ EOF $data =~ s/^(\s*)cmplw(\s+)([^,]+),(.*)/$1cmpl$2$3,0,$4/gm; # assembler X doesn't accept li, load immediate value #$data =~ s/^(\s*)li(\s+)([^,]+),(.*)/$1addi$2$3,0,$4/gm; + # assembler Y chokes on apostrophes in comments + $data =~ s/'//gm; return($data); } Modified: vendor-crypto/openssl/dist/crypto/bn/asm/x86_64-gcc.c ============================================================================== --- vendor-crypto/openssl/dist/crypto/bn/asm/x86_64-gcc.c Thu Apr 1 12:18:44 2010 (r206034) +++ vendor-crypto/openssl/dist/crypto/bn/asm/x86_64-gcc.c Thu Apr 1 12:25:40 2010 (r206035) @@ -59,6 +59,7 @@ #undef mul #undef mul_add +#undef sqr /* * "m"(a), "+m"(r) is the way to favor DirectPath µ-code; Modified: vendor-crypto/openssl/dist/crypto/bn/bn_div.c ============================================================================== --- vendor-crypto/openssl/dist/crypto/bn/bn_div.c Thu Apr 1 12:18:44 2010 (r206034) +++ vendor-crypto/openssl/dist/crypto/bn/bn_div.c Thu Apr 1 12:25:40 2010 (r206035) @@ -337,7 +337,10 @@ X) -> 0x%08X\n", t2 -= d1; } #else /* !BN_LLONG */ - BN_ULONG t2l,t2h,ql,qh; + BN_ULONG t2l,t2h; +#if !defined(BN_UMULT_LOHI) && !defined(BN_UMULT_HIGH) + BN_ULONG ql,qh; +#endif q=bn_div_words(n0,n1,d0); #ifdef BN_DEBUG_LEVITTE @@ -561,7 +564,10 @@ X) -> 0x%08X\n", t2 -= d1; } #else /* !BN_LLONG */ - BN_ULONG t2l,t2h,ql,qh; + BN_ULONG t2l,t2h; +#if !defined(BN_UMULT_LOHI) && !defined(BN_UMULT_HIGH) + BN_ULONG ql,qh; +#endif q=bn_div_words(n0,n1,d0); #ifdef BN_DEBUG_LEVITTE Modified: vendor-crypto/openssl/dist/crypto/engine/eng_all.c ============================================================================== --- vendor-crypto/openssl/dist/crypto/engine/eng_all.c Thu Apr 1 12:18:44 2010 (r206034) +++ vendor-crypto/openssl/dist/crypto/engine/eng_all.c Thu Apr 1 12:25:40 2010 (r206035) @@ -104,7 +104,7 @@ void ENGINE_load_builtin_engines(void) #endif #endif #ifndef OPENSSL_NO_HW -#if defined(__OpenBSD__) || defined(__FreeBSD__) +#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(HAVE_CRYPTODEV) ENGINE_load_cryptodev(); #endif #if defined(OPENSSL_SYS_WIN32) && !defined(OPENSSL_NO_CAPIENG) Modified: vendor-crypto/openssl/dist/crypto/engine/eng_cryptodev.c ============================================================================== --- vendor-crypto/openssl/dist/crypto/engine/eng_cryptodev.c Thu Apr 1 12:18:44 2010 (r206034) +++ vendor-crypto/openssl/dist/crypto/engine/eng_cryptodev.c Thu Apr 1 12:25:40 2010 (r206035) @@ -755,10 +755,18 @@ cryptodev_bn_mod_exp(BIGNUM *r, const BI goto err; kop.crk_iparams = 3; - if (cryptodev_asym(&kop, BN_num_bytes(m), r, 0, NULL) == -1) { + if (cryptodev_asym(&kop, BN_num_bytes(m), r, 0, NULL)) { const RSA_METHOD *meth = RSA_PKCS1_SSLeay(); + printf("OCF asym process failed, Running in software\n"); + ret = meth->bn_mod_exp(r, a, p, m, ctx, in_mont); + + } else if (ECANCELED == kop.crk_status) { + const RSA_METHOD *meth = RSA_PKCS1_SSLeay(); + printf("OCF hardware operation cancelled. Running in Software\n"); ret = meth->bn_mod_exp(r, a, p, m, ctx, in_mont); } + /* else cryptodev operation worked ok ==> ret = 1*/ + err: zapparams(&kop); return (ret); @@ -801,10 +809,18 @@ cryptodev_rsa_mod_exp(BIGNUM *r0, const goto err; kop.crk_iparams = 6; - if (cryptodev_asym(&kop, BN_num_bytes(rsa->n), r0, 0, NULL) == -1) { + if (cryptodev_asym(&kop, BN_num_bytes(rsa->n), r0, 0, NULL)) { const RSA_METHOD *meth = RSA_PKCS1_SSLeay(); + printf("OCF asym process failed, running in Software\n"); + ret = (*meth->rsa_mod_exp)(r0, I, rsa, ctx); + + } else if (ECANCELED == kop.crk_status) { + const RSA_METHOD *meth = RSA_PKCS1_SSLeay(); + printf("OCF hardware operation cancelled. Running in Software\n"); ret = (*meth->rsa_mod_exp)(r0, I, rsa, ctx); } + /* else cryptodev operation worked ok ==> ret = 1*/ + err: zapparams(&kop); return (ret); @@ -940,7 +956,8 @@ cryptodev_dsa_verify(const unsigned char kop.crk_iparams = 7; if (cryptodev_asym(&kop, 0, NULL, 0, NULL) == 0) { - dsaret = kop.crk_status; +/*OCF success value is 0, if not zero, change dsaret to fail*/ + if(0 != kop.crk_status) dsaret = 0; } else { const DSA_METHOD *meth = DSA_OpenSSL(); Modified: vendor-crypto/openssl/dist/crypto/evp/digest.c ============================================================================== --- vendor-crypto/openssl/dist/crypto/evp/digest.c Thu Apr 1 12:18:44 2010 (r206034) +++ vendor-crypto/openssl/dist/crypto/evp/digest.c Thu Apr 1 12:25:40 2010 (r206035) @@ -235,6 +235,7 @@ static int do_evp_md_engine(EVP_MD_CTX * { /* Same comment from evp_enc.c */ EVPerr(EVP_F_DO_EVP_MD_ENGINE,EVP_R_INITIALIZATION_ERROR); + ENGINE_finish(impl); return 0; } /* We'll use the ENGINE's private digest definition */ Modified: vendor-crypto/openssl/dist/crypto/evp/evp_locl.h ============================================================================== --- vendor-crypto/openssl/dist/crypto/evp/evp_locl.h Thu Apr 1 12:18:44 2010 (r206034) +++ vendor-crypto/openssl/dist/crypto/evp/evp_locl.h Thu Apr 1 12:25:40 2010 (r206035) @@ -127,9 +127,9 @@ BLOCK_CIPHER_def1(cname, cbc, cbc, CBC, #define BLOCK_CIPHER_def_cfb(cname, kstruct, nid, key_len, \ iv_len, cbits, flags, init_key, cleanup, \ set_asn1, get_asn1, ctrl) \ -BLOCK_CIPHER_def1(cname, cfb##cbits, cfb##cbits, CFB, kstruct, nid, \ - (cbits + 7)/8, key_len, iv_len, \ - flags, init_key, cleanup, set_asn1, get_asn1, ctrl) +BLOCK_CIPHER_def1(cname, cfb##cbits, cfb##cbits, CFB, kstruct, nid, 1, \ + key_len, iv_len, flags, init_key, cleanup, set_asn1, \ + get_asn1, ctrl) #define BLOCK_CIPHER_def_ofb(cname, kstruct, nid, key_len, \ iv_len, cbits, flags, init_key, cleanup, \ Modified: vendor-crypto/openssl/dist/crypto/evp/names.c ============================================================================== --- vendor-crypto/openssl/dist/crypto/evp/names.c Thu Apr 1 12:18:44 2010 (r206034) +++ vendor-crypto/openssl/dist/crypto/evp/names.c Thu Apr 1 12:25:40 2010 (r206035) @@ -90,7 +90,7 @@ int EVP_add_digest(const EVP_MD *md) r=OBJ_NAME_add(OBJ_nid2ln(md->type),OBJ_NAME_TYPE_MD_METH,(const char *)md); if (r == 0) return(0); - if (md->type != md->pkey_type) + if (md->pkey_type && md->type != md->pkey_type) { r=OBJ_NAME_add(OBJ_nid2sn(md->pkey_type), OBJ_NAME_TYPE_MD_METH|OBJ_NAME_ALIAS,name); Modified: vendor-crypto/openssl/dist/crypto/md32_common.h ============================================================================== --- vendor-crypto/openssl/dist/crypto/md32_common.h Thu Apr 1 12:18:44 2010 (r206034) +++ vendor-crypto/openssl/dist/crypto/md32_common.h Thu Apr 1 12:25:40 2010 (r206035) @@ -241,11 +241,11 @@ #ifndef PEDANTIC # if defined(__GNUC__) && __GNUC__>=2 && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) # if defined(__s390x__) -# define HOST_c2l(c,l) ({ asm ("lrv %0,0(%1)" \ - :"=r"(l) : "r"(c)); \ +# define HOST_c2l(c,l) ({ asm ("lrv %0,%1" \ + :"=d"(l) :"m"(*(const unsigned int *)(c));\ (c)+=4; (l); }) -# define HOST_l2c(l,c) ({ asm ("strv %0,0(%1)" \ - : : "r"(l),"r"(c) : "memory"); \ +# define HOST_l2c(l,c) ({ asm ("strv %1,%0" \ + :"=m"(*(unsigned int *)(c)) :"d"(l));\ (c)+=4; (l); }) # endif # endif Modified: vendor-crypto/openssl/dist/crypto/ocsp/ocsp_prn.c ============================================================================== --- vendor-crypto/openssl/dist/crypto/ocsp/ocsp_prn.c Thu Apr 1 12:18:44 2010 (r206034) +++ vendor-crypto/openssl/dist/crypto/ocsp/ocsp_prn.c Thu Apr 1 12:25:40 2010 (r206035) @@ -275,6 +275,7 @@ int OCSP_RESPONSE_print(BIO *bp, OCSP_RE } if (!X509V3_extensions_print(bp, "Response Extensions", rd->responseExtensions, flags, 4)) + goto err; if(X509_signature_print(bp, br->signatureAlgorithm, br->signature) <= 0) goto err; Modified: vendor-crypto/openssl/dist/crypto/opensslv.h ============================================================================== --- vendor-crypto/openssl/dist/crypto/opensslv.h Thu Apr 1 12:18:44 2010 (r206034) +++ vendor-crypto/openssl/dist/crypto/opensslv.h Thu Apr 1 12:25:40 2010 (r206035) @@ -25,11 +25,11 @@ * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for * major minor fix final patch/beta) */ -#define OPENSSL_VERSION_NUMBER 0x009080dfL +#define OPENSSL_VERSION_NUMBER 0x009080efL #ifdef OPENSSL_FIPS -#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8m-fips 25 Feb 2010" +#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8n-fips 24 Mar 2010" #else -#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8m 25 Feb 2010" +#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8n 24 Mar 2010" #endif #define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT Modified: vendor-crypto/openssl/dist/crypto/rand/rand_win.c ============================================================================== --- vendor-crypto/openssl/dist/crypto/rand/rand_win.c Thu Apr 1 12:18:44 2010 (r206034) +++ vendor-crypto/openssl/dist/crypto/rand/rand_win.c Thu Apr 1 12:25:40 2010 (r206035) @@ -750,7 +750,7 @@ static void readscreen(void) int y; /* y-coordinate of screen lines to grab */ int n = 16; /* number of screen lines to grab at a time */ - if (GetVersion() >= 0x80000000 || !OPENSSL_isservice()) + if (GetVersion() < 0x80000000 && OPENSSL_isservice()>0) return; /* Create a screen DC and a memory DC compatible to screen DC */ Modified: vendor-crypto/openssl/dist/engines/e_capi.c ============================================================================== --- vendor-crypto/openssl/dist/engines/e_capi.c Thu Apr 1 12:18:44 2010 (r206034) +++ vendor-crypto/openssl/dist/engines/e_capi.c Thu Apr 1 12:25:40 2010 (r206035) @@ -83,6 +83,10 @@ #define CERT_STORE_CREATE_NEW_FLAG 0x00002000 #endif +#ifndef CERT_SYSTEM_STORE_CURRENT_USER +#define CERT_SYSTEM_STORE_CURRENT_USER 0x00010000 +#endif + #include #include #include Modified: vendor-crypto/openssl/dist/engines/e_chil.c ============================================================================== --- vendor-crypto/openssl/dist/engines/e_chil.c Thu Apr 1 12:18:44 2010 (r206034) +++ vendor-crypto/openssl/dist/engines/e_chil.c Thu Apr 1 12:25:40 2010 (r206035) @@ -1204,6 +1204,11 @@ static int hwcrhk_get_pass(const char *p pem_password_cb *callback = NULL; void *callback_data = NULL; UI_METHOD *ui_method = NULL; + /* Despite what the documentation says prompt_info can be + * an empty string. + */ + if (prompt_info && !*prompt_info) + prompt_info = NULL; if (cactx) { @@ -1305,8 +1310,10 @@ static int hwcrhk_insert_card(const char { char answer; char buf[BUFSIZ]; - - if (wrong_info) + /* Despite what the documentation says wrong_info can be + * an empty string. + */ + if (wrong_info && *wrong_info) BIO_snprintf(buf, sizeof(buf)-1, "Current card: \"%s\"\n", wrong_info); ok = UI_dup_info_string(ui, buf); Modified: vendor-crypto/openssl/dist/fips/Makefile ============================================================================== --- vendor-crypto/openssl/dist/fips/Makefile Thu Apr 1 12:18:44 2010 (r206034) +++ vendor-crypto/openssl/dist/fips/Makefile Thu Apr 1 12:25:40 2010 (r206035) @@ -123,7 +123,7 @@ fips_premain_dso$(EXE_EXT): fips_premain $(FIPSLIBDIR)fipscanister.o ../libcrypto.a $(EX_LIBS) # this is executed only when linking with external fipscanister.o fips_standalone_sha1$(EXE_EXT): sha/fips_standalone_sha1.c - if [ -z $(HOSTCC) ] ; then \ + if [ -z "$(HOSTCC)" ] ; then \ $(CC) $(CFLAGS) -DFIPSCANISTER_O -o $@ sha/fips_standalone_sha1.c $(FIPSLIBDIR)fipscanister.o $(EX_LIBS) ; \ else \ $(HOSTCC) $(HOSTCFLAGS) -o $ $@ -I../include -I../crypto sha/fips_standalone_sha1.c ../crypto/sha/sha1dgst.c ; \ Modified: vendor-crypto/openssl/dist/openssl.spec ============================================================================== --- vendor-crypto/openssl/dist/openssl.spec Thu Apr 1 12:18:44 2010 (r206034) +++ vendor-crypto/openssl/dist/openssl.spec Thu Apr 1 12:25:40 2010 (r206035) @@ -2,7 +2,7 @@ %define libmaj 0 %define libmin 9 %define librel 8 -%define librev m +%define librev n Release: 1 %define openssldir /var/ssl Modified: vendor-crypto/openssl/dist/ssl/kssl.c ============================================================================== --- vendor-crypto/openssl/dist/ssl/kssl.c Thu Apr 1 12:18:44 2010 (r206034) +++ vendor-crypto/openssl/dist/ssl/kssl.c Thu Apr 1 12:25:40 2010 (r206035) @@ -1802,6 +1802,9 @@ kssl_ctx_show(KSSL_CTX *kssl_ctx) kssl_ctx->service_name ? kssl_ctx->service_name: KRB5SVC, KRB5_NT_SRV_HST, &princ); + if (krb5rc) + goto exit; + krb5rc = krb5_kt_get_entry(krb5context, krb5keytab, princ, 0 /* IGNORE_VNO */, Modified: vendor-crypto/openssl/dist/ssl/s3_pkt.c ============================================================================== --- vendor-crypto/openssl/dist/ssl/s3_pkt.c Thu Apr 1 12:18:44 2010 (r206034) +++ vendor-crypto/openssl/dist/ssl/s3_pkt.c Thu Apr 1 12:25:40 2010 (r206035) @@ -291,9 +291,9 @@ again: if (version != s->version) { SSLerr(SSL_F_SSL3_GET_RECORD,SSL_R_WRONG_VERSION_NUMBER); - /* Send back error using their - * version number :-) */ - s->version=version; + if ((s->version & 0xFF00) == (version & 0xFF00)) + /* Send back error using their minor version number :-) */ + s->version = (unsigned short)version; al=SSL_AD_PROTOCOL_VERSION; goto f_err; } From owner-svn-src-all@FreeBSD.ORG Thu Apr 1 12:26:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF8581065675; Thu, 1 Apr 2010 12:26:29 +0000 (UTC) (envelope-from decke@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AE6BF8FC24; Thu, 1 Apr 2010 12:26: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 o31CQTpP029843; Thu, 1 Apr 2010 12:26:29 GMT (envelope-from decke@svn.freebsd.org) Received: (from decke@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o31CQTnL029841; Thu, 1 Apr 2010 12:26:29 GMT (envelope-from decke@svn.freebsd.org) Message-Id: <201004011226.o31CQTnL029841@svn.freebsd.org> From: Bernhard Froehlich Date: Thu, 1 Apr 2010 12:26: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: r206036 - head/usr.bin/calendar/calendars X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2010 12:26:29 -0000 Author: decke (ports committer) Date: Thu Apr 1 12:26:29 2010 New Revision: 206036 URL: http://svn.freebsd.org/changeset/base/206036 Log: - Add my birthday to the calendar Approved by: miwi (mentor), beat (co-mentor) Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Thu Apr 1 12:25:40 2010 (r206035) +++ head/usr.bin/calendar/calendars/calendar.freebsd Thu Apr 1 12:26:29 2010 (r206036) @@ -82,6 +82,7 @@ 03/12 Greg Lewis born in Adelaide, South Australia, Australia, 1969 03/13 Alexander Leidinger born in Neunkirchen, Saarland, Germany, 1976 03/13 Will Andrews born in Pontiac, Michigan, United States, 1982 +03/14 Bernhard Froehlich born in Graz, Styria, Austria, 1985 03/15 Paolo Pisati born in Lodi, Italy, 1977 03/15 Brian Fundakowski Feldman born in Alexandria, Virginia, United States, 1983 03/17 Michael Smith born in Bankstown, New South Wales, Australia, 1971 From owner-svn-src-all@FreeBSD.ORG Thu Apr 1 12:26:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1DE57106566B; Thu, 1 Apr 2010 12:26:33 +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 E6EF18FC15; Thu, 1 Apr 2010 12: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 o31CQWku029877; Thu, 1 Apr 2010 12:26:32 GMT (envelope-from simon@svn.freebsd.org) Received: (from simon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o31CQWuP029876; Thu, 1 Apr 2010 12:26:32 GMT (envelope-from simon@svn.freebsd.org) Message-Id: <201004011226.o31CQWuP029876@svn.freebsd.org> From: "Simon L. Nielsen" Date: Thu, 1 Apr 2010 12:26:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor-crypto MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206037 - vendor-crypto/openssl/0.9.8n X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 01 Apr 2010 12:26:33 -0000 Author: simon Date: Thu Apr 1 12:26:32 2010 New Revision: 206037 URL: http://svn.freebsd.org/changeset/base/206037 Log: Tag OpenSSL 0.9.8n. Added: vendor-crypto/openssl/0.9.8n/ - copied from r206035, vendor-crypto/openssl/dist/ From owner-svn-src-all@FreeBSD.ORG Thu Apr 1 13:11:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2878D106566B; Thu, 1 Apr 2010 13:11:40 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 173678FC0A; Thu, 1 Apr 2010 13:11: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 o31DBdrL039767; Thu, 1 Apr 2010 13:11:39 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o31DBdpC039764; Thu, 1 Apr 2010 13:11:39 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201004011311.o31DBdpC039764@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Thu, 1 Apr 2010 13:11: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: r206038 - head/libexec/fingerd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 01 Apr 2010 13:11:40 -0000 Author: des Date: Thu Apr 1 13:11:39 2010 New Revision: 206038 URL: http://svn.freebsd.org/changeset/base/206038 Log: Add a debugging option (-d) Add a -k option which fingerd(8) passes through to finger(1). MFC after: 2 weeks Modified: head/libexec/fingerd/fingerd.8 head/libexec/fingerd/fingerd.c Modified: head/libexec/fingerd/fingerd.8 ============================================================================== --- head/libexec/fingerd/fingerd.8 Thu Apr 1 12:26:32 2010 (r206037) +++ head/libexec/fingerd/fingerd.8 Thu Apr 1 13:11:39 2010 (r206038) @@ -32,7 +32,7 @@ .\" @(#)fingerd.8 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 4, 1993 +.Dd April 1, 2010 .Dt FINGERD 8 .Os .Sh NAME @@ -40,6 +40,8 @@ .Nd remote user information server .Sh SYNOPSIS .Nm +.Op Fl d +.Op Fl k .Op Fl s .Op Fl l .Op Fl p Ar filename @@ -106,6 +108,25 @@ The following options may be passed to as server program arguments in .Pa /etc/inetd.conf : .Bl -tag -width indent +.It Fl d +Enable debugging mode. +In debugging mode, +.Nm +will not attempt any network-related operations on +.Va stdin , +and it will print the full +.Nm finger +command line +to +.Va stderr +before executing it. +.It Fl k +Suppress login information. +See the description of the +.Fl k +option in +.Xr finger 1 +for details. .It Fl s Enable secure mode. Queries without a user name are rejected and Modified: head/libexec/fingerd/fingerd.c ============================================================================== --- head/libexec/fingerd/fingerd.c Thu Apr 1 12:26:32 2010 (r206037) +++ head/libexec/fingerd/fingerd.c Thu Apr 1 13:11:39 2010 (r206038) @@ -72,17 +72,23 @@ main(int argc, char *argv[]) char *lp; struct sockaddr_storage ss; socklen_t sval; - int p[2], logging, pflag, secure; + int p[2], debug, kflag, logging, pflag, secure; #define ENTRIES 50 char **ap, *av[ENTRIES + 1], **comp, line[1024], *prog; char rhost[MAXHOSTNAMELEN]; prog = _PATH_FINGER; - logging = pflag = secure = 0; + logging = kflag = pflag = secure = 0; openlog("fingerd", LOG_PID | LOG_CONS, LOG_DAEMON); opterr = 0; - while ((ch = getopt(argc, argv, "lp:s")) != -1) + while ((ch = getopt(argc, argv, "dklp:s")) != -1) switch (ch) { + case 'd': + debug = 1; + break; + case 'k': + kflag = 1; + break; case 'l': logging = 1; break; @@ -101,7 +107,7 @@ main(int argc, char *argv[]) /* * Enable server-side Transaction TCP. */ - { + if (!debug) { int one = 1; if (setsockopt(STDOUT_FILENO, IPPROTO_TCP, TCP_NOPUSH, &one, sizeof one) < 0) { @@ -112,7 +118,7 @@ main(int argc, char *argv[]) if (!fgets(line, sizeof(line), stdin)) exit(1); - if (logging || pflag) { + if (!debug && (logging || pflag)) { sval = sizeof(ss); if (getpeername(0, (struct sockaddr *)&ss, &sval) < 0) logerr("getpeername: %s", strerror(errno)); @@ -143,12 +149,14 @@ main(int argc, char *argv[]) syslog(LOG_NOTICE, "query from %s: `%s'", rhost, t); } - comp = &av[1]; - av[2] = "--"; - for (lp = line, ap = &av[3];;) { + comp = &av[2]; + av[3] = "--"; + if (kflag) + *comp-- = "-k"; + for (lp = line, ap = &av[4];;) { *ap = strtok(lp, " \t\r\n"); if (!*ap) { - if (secure && ap == &av[3]) { + if (secure && ap == &av[4]) { puts("must provide username\r\n"); exit(1); } @@ -161,8 +169,7 @@ main(int argc, char *argv[]) /* RFC742: "/[Ww]" == "-l" */ if ((*ap)[0] == '/' && ((*ap)[1] == 'W' || (*ap)[1] == 'w')) { - av[1] = "-l"; - comp = &av[0]; + *comp-- = "-l"; } else if (++ap == av + ENTRIES) { *ap = NULL; @@ -178,6 +185,13 @@ main(int argc, char *argv[]) if (pipe(p) < 0) logerr("pipe: %s", strerror(errno)); + if (debug) { + fprintf(stderr, "%s", prog); + for (ap = comp; *ap != NULL; ++ap) + fprintf(stderr, " %s", *ap); + fprintf(stderr, "\n"); + } + switch(vfork()) { case 0: (void)close(p[0]); From owner-svn-src-all@FreeBSD.ORG Thu Apr 1 13:13:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44635106566C; Thu, 1 Apr 2010 13:13:10 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 33F168FC1D; Thu, 1 Apr 2010 13:13: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 o31DDAtR040133; Thu, 1 Apr 2010 13:13:10 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o31DDA7N040131; Thu, 1 Apr 2010 13:13:10 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201004011313.o31DDA7N040131@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Thu, 1 Apr 2010 13:13: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: r206039 - head/etc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2010 13:13:10 -0000 Author: des Date: Thu Apr 1 13:13:09 2010 New Revision: 206039 URL: http://svn.freebsd.org/changeset/base/206039 Log: Add -k to the recommended fingerd(8) command line. MFC after: 2 weeks Modified: head/etc/inetd.conf Modified: head/etc/inetd.conf ============================================================================== --- head/etc/inetd.conf Thu Apr 1 13:11:39 2010 (r206038) +++ head/etc/inetd.conf Thu Apr 1 13:13:09 2010 (r206039) @@ -16,8 +16,8 @@ #shell stream tcp6 nowait root /usr/libexec/rshd rshd #login stream tcp nowait root /usr/libexec/rlogind rlogind #login stream tcp6 nowait root /usr/libexec/rlogind rlogind -#finger stream tcp nowait/3/10 nobody /usr/libexec/fingerd fingerd -s -#finger stream tcp6 nowait/3/10 nobody /usr/libexec/fingerd fingerd -s +#finger stream tcp nowait/3/10 nobody /usr/libexec/fingerd fingerd -k -s +#finger stream tcp6 nowait/3/10 nobody /usr/libexec/fingerd fingerd -k -s # # run comsat as root to be able to print partial mailbox contents w/ biff, # or use the safer tty:tty to just print that new mail has been received. From owner-svn-src-all@FreeBSD.ORG Thu Apr 1 13:16:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 45EDA1065670; Thu, 1 Apr 2010 13:16:33 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 353678FC19; Thu, 1 Apr 2010 13:16: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 o31DGXtI040946; Thu, 1 Apr 2010 13:16:33 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o31DGXaC040944; Thu, 1 Apr 2010 13:16:33 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201004011316.o31DGXaC040944@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Thu, 1 Apr 2010 13:16: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: r206040 - head/libexec/fingerd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 01 Apr 2010 13:16:33 -0000 Author: des Date: Thu Apr 1 13:16:32 2010 New Revision: 206040 URL: http://svn.freebsd.org/changeset/base/206040 Log: Forgot to initialize the debug variable. MFC after: 2 weeks Modified: head/libexec/fingerd/fingerd.c Modified: head/libexec/fingerd/fingerd.c ============================================================================== --- head/libexec/fingerd/fingerd.c Thu Apr 1 13:13:09 2010 (r206039) +++ head/libexec/fingerd/fingerd.c Thu Apr 1 13:16:32 2010 (r206040) @@ -78,7 +78,7 @@ main(int argc, char *argv[]) char rhost[MAXHOSTNAMELEN]; prog = _PATH_FINGER; - logging = kflag = pflag = secure = 0; + debug = logging = kflag = pflag = secure = 0; openlog("fingerd", LOG_PID | LOG_CONS, LOG_DAEMON); opterr = 0; while ((ch = getopt(argc, argv, "dklp:s")) != -1) From owner-svn-src-all@FreeBSD.ORG Thu Apr 1 13:21:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A611A106566B; Thu, 1 Apr 2010 13:21:04 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 941C58FC08; Thu, 1 Apr 2010 13:21: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 o31DL4vP042008; Thu, 1 Apr 2010 13:21:04 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o31DL4Y3042006; Thu, 1 Apr 2010 13:21:04 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201004011321.o31DL4Y3042006@svn.freebsd.org> From: Nathan Whitehorn Date: Thu, 1 Apr 2010 13:21: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: r206041 - stable/8/sys/powerpc/aim X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2010 13:21:04 -0000 Author: nwhitehorn Date: Thu Apr 1 13:21:04 2010 New Revision: 206041 URL: http://svn.freebsd.org/changeset/base/206041 Log: MFC r205163: Fix two small bugs. The PowerPC 970 does not support non-coherent memory access, and reflects this by autonomously writing LPTE_M into PTE entries. As such, we should not panic if LPTE_M changes by itself. While here, fix a harmless typo in moea64_sync_icache(). Modified: stable/8/sys/powerpc/aim/mmu_oea64.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) stable/8/sys/net/ (props changed) Modified: stable/8/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- stable/8/sys/powerpc/aim/mmu_oea64.c Thu Apr 1 13:16:32 2010 (r206040) +++ stable/8/sys/powerpc/aim/mmu_oea64.c Thu Apr 1 13:21:04 2010 (r206041) @@ -2246,7 +2246,7 @@ moea64_pvo_to_pte(const struct pvo_entry } if (((pt->pte_lo ^ pvo->pvo_pte.lpte.pte_lo) & - ~(LPTE_CHG|LPTE_REF)) != 0) { + ~(LPTE_M|LPTE_CHG|LPTE_REF)) != 0) { panic("moea64_pvo_to_pte: pvo %p pte does not match " "pte %p in moea64_pteg_table difference is %#x", pvo, pt, @@ -2488,7 +2488,7 @@ moea64_sync_icache(mmu_t mmu, pmap_t pm, len = MIN(lim - va, sz); pvo = moea64_pvo_find_va(pm, va & ~ADDR_POFF, NULL); if (pvo != NULL) { - pa = (pvo->pvo_pte.pte.pte_lo & PTE_RPGN) | + pa = (pvo->pvo_pte.pte.pte_lo & LPTE_RPGN) | (va & ADDR_POFF); moea64_syncicache(pm, va, pa, len); } From owner-svn-src-all@FreeBSD.ORG Thu Apr 1 13:27:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5169A1065672; Thu, 1 Apr 2010 13:27:28 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3EAAA8FC19; Thu, 1 Apr 2010 13:27: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 o31DRSI6043486; Thu, 1 Apr 2010 13:27:28 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o31DRSWm043484; Thu, 1 Apr 2010 13:27:28 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201004011327.o31DRSWm043484@svn.freebsd.org> From: Nathan Whitehorn Date: Thu, 1 Apr 2010 13:27:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206042 - stable/8/sys/powerpc/aim X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2010 13:27:28 -0000 Author: nwhitehorn Date: Thu Apr 1 13:27:27 2010 New Revision: 206042 URL: http://svn.freebsd.org/changeset/base/206042 Log: MFC r204694,204719,205370 Update the page table locking for the 64-bit PMAP. One of these revisions largely reverted the other, so there is a small amount of churn and the addition of some mtx_assert()s. Modified: stable/8/sys/powerpc/aim/mmu_oea64.c Modified: stable/8/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- stable/8/sys/powerpc/aim/mmu_oea64.c Thu Apr 1 13:21:04 2010 (r206041) +++ stable/8/sys/powerpc/aim/mmu_oea64.c Thu Apr 1 13:27:27 2010 (r206042) @@ -327,7 +327,6 @@ SYSCTL_INT(_machdep, OID_AUTO, moea64_pv &moea64_pvo_remove_calls, 0, ""); vm_offset_t moea64_scratchpage_va[2]; -struct pvo_entry *moea64_scratchpage_pvo[2]; struct lpte *moea64_scratchpage_pte[2]; struct mtx moea64_scratchpage_mtx; @@ -965,22 +964,36 @@ moea64_bridge_bootstrap(mmu_t mmup, vm_o PMAP_UNLOCK(kernel_pmap); /* - * Allocate some things for page zeroing + * Allocate some things for page zeroing. We put this directly + * in the page table, marked with LPTE_LOCKED, to avoid any + * of the PVO book-keeping or other parts of the VM system + * from even knowing that this hack exists. */ mtx_init(&moea64_scratchpage_mtx, "pvo zero page", NULL, MTX_DEF); for (i = 0; i < 2; i++) { + struct lpte pt; + uint64_t vsid; + int pteidx, ptegidx; + moea64_scratchpage_va[i] = (virtual_end+1) - PAGE_SIZE; virtual_end -= PAGE_SIZE; - moea64_kenter(mmup,moea64_scratchpage_va[i],0); - LOCK_TABLE(); - moea64_scratchpage_pvo[i] = moea64_pvo_find_va(kernel_pmap, - moea64_scratchpage_va[i],&j); - moea64_scratchpage_pte[i] = moea64_pvo_to_pte( - moea64_scratchpage_pvo[i],j); - moea64_scratchpage_pte[i]->pte_hi |= LPTE_LOCKED; + + vsid = va_to_vsid(kernel_pmap, moea64_scratchpage_va[i]); + moea64_pte_create(&pt, vsid, moea64_scratchpage_va[i], + LPTE_NOEXEC); + pt.pte_hi |= LPTE_LOCKED; + + ptegidx = va_to_pteg(vsid, moea64_scratchpage_va[i]); + pteidx = moea64_pte_insert(ptegidx, &pt); + if (pt.pte_hi & LPTE_HID) + ptegidx ^= moea64_pteg_mask; + + moea64_scratchpage_pte[i] = + &moea64_pteg_table[ptegidx].pt[pteidx]; + UNLOCK_TABLE(); } @@ -1088,18 +1101,16 @@ moea64_change_wiring(mmu_t mmu, pmap_t p static __inline void moea64_set_scratchpage_pa(int which, vm_offset_t pa) { - mtx_assert(&moea64_scratchpage_mtx, MA_OWNED); - moea64_scratchpage_pvo[which]->pvo_pte.lpte.pte_lo &= - ~(LPTE_WIMG | LPTE_RPGN); - moea64_scratchpage_pvo[which]->pvo_pte.lpte.pte_lo |= - moea64_calc_wimg(pa) | (uint64_t)pa; + mtx_assert(&moea64_scratchpage_mtx, MA_OWNED); moea64_scratchpage_pte[which]->pte_hi &= ~LPTE_VALID; TLBIE(kernel_pmap, moea64_scratchpage_va[which]); - moea64_scratchpage_pte[which]->pte_lo = - moea64_scratchpage_pvo[which]->pvo_pte.lpte.pte_lo; + moea64_scratchpage_pte[which]->pte_lo &= + ~(LPTE_WIMG | LPTE_RPGN); + moea64_scratchpage_pte[which]->pte_lo |= + moea64_calc_wimg(pa) | (uint64_t)pa; EIEIO(); moea64_scratchpage_pte[which]->pte_hi |= LPTE_VALID; @@ -1498,8 +1509,8 @@ moea64_remove_write(mmu_t mmu, vm_page_t LIST_FOREACH(pvo, vm_page_to_pvoh(m), pvo_vlink) { pmap = pvo->pvo_pmap; PMAP_LOCK(pmap); + LOCK_TABLE(); if ((pvo->pvo_pte.lpte.pte_lo & LPTE_PP) != LPTE_BR) { - LOCK_TABLE(); pt = moea64_pvo_to_pte(pvo, -1); pvo->pvo_pte.lpte.pte_lo &= ~LPTE_PP; pvo->pvo_pte.lpte.pte_lo |= LPTE_BR; @@ -1510,8 +1521,8 @@ moea64_remove_write(mmu_t mmu, vm_page_t moea64_pte_change(pt, &pvo->pvo_pte.lpte, pvo->pvo_pmap, PVO_VADDR(pvo)); } - UNLOCK_TABLE(); } + UNLOCK_TABLE(); PMAP_UNLOCK(pmap); } if ((lo & LPTE_CHG) != 0) { @@ -1592,6 +1603,13 @@ moea64_kextract(mmu_t mmu, vm_offset_t v struct pvo_entry *pvo; vm_paddr_t pa; + /* + * Shortcut the direct-mapped case when applicable. We never put + * anything but 1:1 mappings below VM_MIN_KERNEL_ADDRESS. + */ + if (va < VM_MIN_KERNEL_ADDRESS) + return (va); + PMAP_LOCK(kernel_pmap); pvo = moea64_pvo_find_va(kernel_pmap, va & ~ADDR_POFF, NULL); KASSERT(pvo != NULL, ("moea64_kextract: no addr found")); @@ -1649,9 +1667,11 @@ moea64_page_exists_quick(mmu_t mmu, pmap if (!moea64_initialized || (m->flags & PG_FICTITIOUS)) return FALSE; + mtx_assert(&vm_page_queue_mtx, MA_OWNED); + loops = 0; LIST_FOREACH(pvo, vm_page_to_pvoh(m), pvo_vlink) { - if (pvo->pvo_pmap == pmap) + if (pvo->pvo_pmap == pmap) return (TRUE); if (++loops >= 16) break; @@ -2045,7 +2065,7 @@ moea64_pvo_enter(pmap_t pm, uma_zone_t z bootstrap = 1; } else { /* - * Note: drop the table around the UMA allocation in + * Note: drop the table lock around the UMA allocation in * case the UMA allocator needs to manipulate the page * table. The mapping we are working with is already * protected by the PMAP lock. @@ -2129,7 +2149,6 @@ moea64_pvo_remove(struct pvo_entry *pvo, } else { moea64_pte_overflow--; } - UNLOCK_TABLE(); /* * Update our statistics. @@ -2161,9 +2180,12 @@ moea64_pvo_remove(struct pvo_entry *pvo, * if we aren't going to reuse it. */ LIST_REMOVE(pvo, pvo_olink); + UNLOCK_TABLE(); + if (!(pvo->pvo_vaddr & PVO_BOOTSTRAP)) uma_zfree((pvo->pvo_vaddr & PVO_MANAGED) ? moea64_mpvo_zone : moea64_upvo_zone, pvo); + moea64_pvo_entries--; moea64_pvo_remove_calls++; } @@ -2312,6 +2334,8 @@ moea64_query_bit(vm_page_t m, u_int64_t if (moea64_attr_fetch(m) & ptebit) return (TRUE); + mtx_assert(&vm_page_queue_mtx, MA_OWNED); + LIST_FOREACH(pvo, vm_page_to_pvoh(m), pvo_vlink) { MOEA_PVO_CHECK(pvo); /* sanity check */ @@ -2366,6 +2390,8 @@ moea64_clear_bit(vm_page_t m, u_int64_t struct lpte *pt; uint64_t rv; + mtx_assert(&vm_page_queue_mtx, MA_OWNED); + /* * Clear the cached value. */ @@ -2398,10 +2424,10 @@ moea64_clear_bit(vm_page_t m, u_int64_t moea64_pte_clear(pt, pvo->pvo_pmap, PVO_VADDR(pvo), ptebit); } } - UNLOCK_TABLE(); rv |= pvo->pvo_pte.lpte.pte_lo; pvo->pvo_pte.lpte.pte_lo &= ~ptebit; MOEA_PVO_CHECK(pvo); /* sanity check */ + UNLOCK_TABLE(); } if (origbit != NULL) { From owner-svn-src-all@FreeBSD.ORG Thu Apr 1 14:27:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA289106564A; Thu, 1 Apr 2010 14:27:29 +0000 (UTC) (envelope-from flz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A727B8FC20; Thu, 1 Apr 2010 14:27: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 o31ERTpg056834; Thu, 1 Apr 2010 14:27:29 GMT (envelope-from flz@svn.freebsd.org) Received: (from flz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o31ERTaT056824; Thu, 1 Apr 2010 14:27:29 GMT (envelope-from flz@svn.freebsd.org) Message-Id: <201004011427.o31ERTaT056824@svn.freebsd.org> From: Florent Thoumie Date: Thu, 1 Apr 2010 14:27: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: r206043 - in head/usr.sbin/pkg_install: add delete lib version X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 01 Apr 2010 14:27:29 -0000 Author: flz Date: Thu Apr 1 14:27:29 2010 New Revision: 206043 URL: http://svn.freebsd.org/changeset/base/206043 Log: Various fixes. - Replace hardcoded INDEX version. [1] - Fix a buffer overlap. [2] - Remove empty package when fetching fails and -K is used. [3] - Remove useless chmod2() after mkdtemp(3). [4] - Replace mkdir(1) call with mkdir(2). [5] - Get rid of some vsystem() calls. - Switch from lstat(2) to open(2) in fexists(). - Try rename(2) in move_file() first. - Bump PKG_INSTALL_VERSION to 20100401. PR: bin/145101 [1], bin/139492 [2], bin/144919 [3] bin/144920 [4], bin/144921 [5] Submitted by: gcooper [1,2,3,4,5] Modified: head/usr.sbin/pkg_install/add/futil.c head/usr.sbin/pkg_install/add/perform.c head/usr.sbin/pkg_install/delete/perform.c head/usr.sbin/pkg_install/lib/file.c head/usr.sbin/pkg_install/lib/lib.h head/usr.sbin/pkg_install/lib/match.c head/usr.sbin/pkg_install/lib/pen.c head/usr.sbin/pkg_install/lib/url.c head/usr.sbin/pkg_install/version/perform.c Modified: head/usr.sbin/pkg_install/add/futil.c ============================================================================== --- head/usr.sbin/pkg_install/add/futil.c Thu Apr 1 13:27:27 2010 (r206042) +++ head/usr.sbin/pkg_install/add/futil.c Thu Apr 1 14:27:29 2010 (r206043) @@ -50,7 +50,7 @@ make_hierarchy(char *dir) } } else { - if (vsystem("/bin/mkdir %s", dir)) { + if (mkdir(dir, 0777) < 0) { if (cp2) *cp2 = '/'; return FAIL; Modified: head/usr.sbin/pkg_install/add/perform.c ============================================================================== --- head/usr.sbin/pkg_install/add/perform.c Thu Apr 1 13:27:27 2010 (r206042) +++ head/usr.sbin/pkg_install/add/perform.c Thu Apr 1 14:27:29 2010 (r206043) @@ -78,6 +78,7 @@ pkg_do(char *pkg) char pre_arg[FILENAME_MAX], post_arg[FILENAME_MAX]; char *conflict[2]; char **matched; + int fd; conflictsfound = 0; code = 0; @@ -408,8 +409,10 @@ pkg_do(char *pkg) goto bomb; /* Look for the requirements file */ - if (fexists(REQUIRE_FNAME)) { - vsystem("/bin/chmod +x %s", REQUIRE_FNAME); /* be sure */ + if ((fd = open(REQUIRE_FNAME, O_RDWR)) != -1) { + fstat(fd, &sb); + fchmod(fd, sb.st_mode | S_IXALL); /* be sure, chmod a+x */ + close(fd); if (Verbose) printf("Running requirements file first for %s..\n", Plist.name); if (!Fake && vsystem("./%s %s INSTALL", REQUIRE_FNAME, Plist.name)) { @@ -441,8 +444,10 @@ pkg_do(char *pkg) } /* If we're really installing, and have an installation file, run it */ - if (!NoInstall && fexists(pre_script)) { - vsystem("/bin/chmod +x %s", pre_script); /* make sure */ + if (!NoInstall && (fd = open(pre_script, O_RDWR)) != -1) { + fstat(fd, &sb); + fchmod(fd, sb.st_mode | S_IXALL); /* be sure, chmod a+x */ + close(fd); if (Verbose) printf("Running pre-install for %s..\n", Plist.name); if (!Fake && vsystem("./%s %s %s", pre_script, Plist.name, pre_arg)) { @@ -470,8 +475,10 @@ pkg_do(char *pkg) } /* Run the installation script one last time? */ - if (!NoInstall && fexists(post_script)) { - vsystem("/bin/chmod +x %s", post_script); /* make sure */ + if (!NoInstall && (fd = open(post_script, O_RDWR)) != -1) { + fstat(fd, &sb); + fchmod(fd, sb.st_mode | S_IXALL); /* be sure, chmod a+x */ + close(fd); if (Verbose) printf("Running post-install for %s..\n", Plist.name); if (!Fake && vsystem("./%s %s %s", post_script, Plist.name, post_arg)) { @@ -503,7 +510,10 @@ pkg_do(char *pkg) goto success; /* close enough for government work */ } /* Make sure pkg_info can read the entry */ - vsystem("/bin/chmod a+rx %s", LogDir); + fd = open(LogDir, O_RDWR); + fstat(fd, &sb); + fchmod(fd, sb.st_mode | S_IRALL | S_IXALL); /* be sure, chmod a+rx */ + close(fd); move_file(".", DESC_FNAME, LogDir); move_file(".", COMMENT_FNAME, LogDir); if (fexists(INSTALL_FNAME)) Modified: head/usr.sbin/pkg_install/delete/perform.c ============================================================================== --- head/usr.sbin/pkg_install/delete/perform.c Thu Apr 1 13:27:27 2010 (r206042) +++ head/usr.sbin/pkg_install/delete/perform.c Thu Apr 1 14:27:29 2010 (r206043) @@ -132,6 +132,8 @@ pkg_do(char *pkg) const char *post_script, *pre_arg, *post_arg; struct reqr_by_entry *rb_entry; struct reqr_by_head *rb_list; + int fd; + struct stat sb; if (!pkg || !(len = strlen(pkg))) return 1; @@ -221,10 +223,12 @@ pkg_do(char *pkg) setenv(PKG_PREFIX_VNAME, p->name, 1); - if (fexists(REQUIRE_FNAME)) { + if ((fd = open(REQUIRE_FNAME, O_RDWR)) != -1) { + fstat(fd, &sb); + fchmod(fd, sb.st_mode | S_IXALL); /* be sure, chmod a+x */ + close(fd); if (Verbose) printf("Executing 'require' script.\n"); - vsystem("/bin/chmod +x %s", REQUIRE_FNAME); /* be sure */ if (vsystem("./%s %s DEINSTALL", REQUIRE_FNAME, pkg)) { warnx("package %s fails requirements %s", pkg, Force ? "" : "- not deleted"); @@ -250,11 +254,13 @@ pkg_do(char *pkg) post_script = pre_arg = post_arg = NULL; } - if (!NoDeInstall && pre_script != NULL && fexists(pre_script)) { + if (!NoDeInstall && pre_script != NULL && (fd = open(pre_script, O_RDWR)) != -1) { if (Fake) printf("Would execute de-install script at this point.\n"); else { - vsystem("/bin/chmod +x %s", pre_script); /* make sure */ + fstat(fd, &sb); + fchmod(fd, sb.st_mode | S_IXALL); /* be sure, chmod a+x */ + close(fd); if (vsystem("./%s %s %s", pre_script, pkg, pre_arg)) { warnx("deinstall script returned error status"); if (!Force) @@ -326,11 +332,13 @@ pkg_do(char *pkg) return 1; } - if (!NoDeInstall && post_script != NULL && fexists(post_script)) { + if (!NoDeInstall && post_script != NULL && (fd = open(post_script, O_RDWR)) != -1) { if (Fake) printf("Would execute post-deinstall script at this point.\n"); else { - vsystem("/bin/chmod +x %s", post_script); /* make sure */ + fstat(fd, &sb); + fchmod(fd, sb.st_mode | S_IXALL); /* be sure, chmod a+x */ + close(fd); if (vsystem("./%s %s %s", post_script, pkg, post_arg)) { warnx("post-deinstall script returned error status"); if (!Force) Modified: head/usr.sbin/pkg_install/lib/file.c ============================================================================== --- head/usr.sbin/pkg_install/lib/file.c Thu Apr 1 13:27:27 2010 (r206042) +++ head/usr.sbin/pkg_install/lib/file.c Thu Apr 1 14:27:29 2010 (r206043) @@ -31,10 +31,13 @@ __FBSDID("$FreeBSD$"); Boolean fexists(const char *fname) { - struct stat dummy; - if (!lstat(fname, &dummy)) - return TRUE; - return FALSE; + int fd; + + if ((fd = open(fname, O_RDONLY)) == -1) + return FALSE; + + close(fd); + return TRUE; } /* Quick check to see if something is a directory or symlink to a directory */ @@ -279,17 +282,23 @@ copy_file(const char *dir, const char *f } void -move_file(const char *dir, const char *fname, const char *to) +move_file(const char *dir, const char *fname, const char *tdir) { - char cmd[FILENAME_MAX]; + char from[FILENAME_MAX]; + char to[FILENAME_MAX]; if (fname[0] == '/') - snprintf(cmd, FILENAME_MAX, "/bin/mv %s %s", fname, to); + strncpy(from, fname, FILENAME_MAX); else - snprintf(cmd, FILENAME_MAX, "/bin/mv %s/%s %s", dir, fname, to); - if (vsystem(cmd)) { - cleanup(0); - errx(2, "%s: could not perform '%s'", __func__, cmd); + snprintf(from, FILENAME_MAX, "%s/%s", dir, fname); + + snprintf(to, FILENAME_MAX, "%s/%s", tdir, fname); + + if (rename(from, to) == -1) { + if (vsystem("/bin/mv %s %s", from, to)) { + cleanup(0); + errx(2, "%s: could not move '%s' to '%s'", __func__, from, to); + } } } Modified: head/usr.sbin/pkg_install/lib/lib.h ============================================================================== --- head/usr.sbin/pkg_install/lib/lib.h Thu Apr 1 13:27:27 2010 (r206042) +++ head/usr.sbin/pkg_install/lib/lib.h Thu Apr 1 14:27:29 2010 (r206043) @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -51,6 +52,11 @@ #define YES 2 #define NO 1 +/* Some more stat macros. */ +#define S_IRALL 0000444 +#define S_IWALL 0000222 +#define S_IXALL 0000111 + /* Usually "rm", but often "echo" during debugging! */ #define REMOVE_CMD "/bin/rm" @@ -84,18 +90,6 @@ #define DISPLAY_FNAME "+DISPLAY" #define MTREE_FNAME "+MTREE_DIRS" -#if defined(__FreeBSD_version) && __FreeBSD_version >= 900000 -#define INDEX_FNAME "INDEX-9" -#elif defined(__FreeBSD_version) && __FreeBSD_version >= 800000 -#define INDEX_FNAME "INDEX-8" -#elif defined(__FreeBSD_version) && __FreeBSD_version >= 700000 -#define INDEX_FNAME "INDEX-7" -#elif defined(__FreeBSD_version) && __FreeBSD_version >= 600000 -#define INDEX_FNAME "INDEX-6" -#else -#define INDEX_FNAME "INDEX" -#endif - #define CMD_CHAR '@' /* prefix for extended PLIST cmd */ /* The name of the "prefix" environment variable given to scripts */ @@ -105,7 +99,7 @@ * Version of the package tools - increase whenever you make a change * in the code that is not cosmetic only. */ -#define PKG_INSTALL_VERSION 20100122 +#define PKG_INSTALL_VERSION 20100401 #define PKG_WRAPCONF_FNAME "/var/db/pkg_install.conf" #define main(argc, argv) real_main(argc, argv) Modified: head/usr.sbin/pkg_install/lib/match.c ============================================================================== --- head/usr.sbin/pkg_install/lib/match.c Thu Apr 1 13:27:27 2010 (r206042) +++ head/usr.sbin/pkg_install/lib/match.c Thu Apr 1 14:27:29 2010 (r206043) @@ -267,7 +267,7 @@ matchallbyorigin(const char **origins, i */ if (isemptydir(tmp)) continue; - snprintf(tmp, PATH_MAX, "%s/%s", tmp, CONTENTS_FNAME); + strncat(tmp, "/" CONTENTS_FNAME, PATH_MAX); fp = fopen(tmp, "r"); if (fp == NULL) { warnx("the package info for package '%s' is corrupt", installed[i]); Modified: head/usr.sbin/pkg_install/lib/pen.c ============================================================================== --- head/usr.sbin/pkg_install/lib/pen.c Thu Apr 1 13:27:27 2010 (r206042) +++ head/usr.sbin/pkg_install/lib/pen.c Thu Apr 1 14:27:29 2010 (r206043) @@ -113,10 +113,6 @@ make_playpen(char *pen, off_t sz) cleanup(0); errx(2, "%s: can't mktemp '%s'", __func__, pen); } - if (chmod(pen, 0700) == FAIL) { - cleanup(0); - errx(2, "%s: can't mkdir '%s'", __func__, pen); - } if (Verbose) { if (sz) { Modified: head/usr.sbin/pkg_install/lib/url.c ============================================================================== --- head/usr.sbin/pkg_install/lib/url.c Thu Apr 1 13:27:27 2010 (r206042) +++ head/usr.sbin/pkg_install/lib/url.c Thu Apr 1 14:27:29 2010 (r206043) @@ -108,6 +108,10 @@ fileGetURL(const char *base, const char if ((ftp = fetchGetURL(fname, Verbose ? "v" : NULL)) == NULL) { printf("Error: Unable to get %s: %s\n", fname, fetchLastErrString); + /* If the fetch fails, yank the package. */ + if (keep_package && unlink(pkg) < 0 && Verbose) { + warnx("failed to remove partially fetched package: %s", pkg); + } return NULL; } Modified: head/usr.sbin/pkg_install/version/perform.c ============================================================================== --- head/usr.sbin/pkg_install/version/perform.c Thu Apr 1 13:27:27 2010 (r206042) +++ head/usr.sbin/pkg_install/version/perform.c Thu Apr 1 14:27:29 2010 (r206043) @@ -35,28 +35,41 @@ static int pkg_do(char *); static void show_version(Package, const char *, const char *); /* - * This is the traditional pkg_perform, except that the argument is _not_ - * a list of packages. It is the index file from the command line. + * This is the traditional pkg_perform, except that the argument is _not_ a + * list of packages. It is the index file from the command line. * - * We loop over the installed packages, matching them with the -s flag - * if needed and calling pkg_do(). Before hand we set up a few things, - * and after we tear them down... + * We loop over the installed packages, matching them with the -s flag if + * needed and calling pkg_do(). Beforehand we set up a few things, and after + * we tear them down... + * + * Returns 0 on success, non-zero on failure, corresponding to the number of + * failed attempts to access the INDEX. */ int pkg_perform(char **indexarg) { char **pkgs, *pat[2], **patterns; struct index_entry *ie; - int i, err_cnt = 0; + int i, err_cnt = 0, rel_major_ver; int MatchType; + struct utsname u; + + if (uname(&u) == -1) { + warn("%s(): failed to determine uname information", __func__); + return 1; + } else if ((rel_major_ver = (int) strtol(u.release, NULL, 10)) <= 0) { + + } + /* * Try to find and open the INDEX. We only check IndexFile != NULL * later, if we actually need the INDEX. */ - if (*indexarg == NULL) - snprintf(IndexPath, sizeof(IndexPath), "%s/%s", PORTS_DIR, INDEX_FNAME); - else + if (*indexarg == NULL) { + snprintf(IndexPath, sizeof(IndexPath), "%s/INDEX-%d", PORTS_DIR, + rel_major_ver); + } else strlcpy(IndexPath, *indexarg, sizeof(IndexPath)); if (isURL(IndexPath)) IndexFile = fetchGetURL(IndexPath, ""); From owner-svn-src-all@FreeBSD.ORG Thu Apr 1 15:17:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E160B106566B; Thu, 1 Apr 2010 15:17:50 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CDE898FC28; Thu, 1 Apr 2010 15:17: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 o31FHo3s068026; Thu, 1 Apr 2010 15:17:50 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o31FHorZ068020; Thu, 1 Apr 2010 15:17:50 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201004011517.o31FHorZ068020@svn.freebsd.org> From: Marius Strobl Date: Thu, 1 Apr 2010 15:17:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206044 - in stable/8/sys/sparc64: include sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 01 Apr 2010 15:17:51 -0000 Author: marius Date: Thu Apr 1 15:17:50 2010 New Revision: 206044 URL: http://svn.freebsd.org/changeset/base/206044 Log: MFC: r205409 - The firmware of Sun Fire V1280 has a misfeature of setting %wstate to 7 which corresponds to WSTATE_KMIX in OpenSolaris whenever calling into it which totally screws us even when restoring %wstate afterwards as spill/fill traps can happen while in OFW. The rather hackish OpenBSD approach of just setting the equivalent of WSTATE_KERNEL to 7 also is no option as we treat %wstate as a bit field. So in order to deal with this problem actually implement spill/fill handlers for %wstate 7 which just act as the WSTATE_KERNEL ones except of theoretically also handling 32-bit, turn off interrupts completely so we don't even take IPIs while in OFW which should ensure we only take spill/fill traps at most and restore %wstate after calling into OFW once we have taken over the trap table. While at it, actually set WSTATE_{,PROM}_KMIX before calling into OFW just like OpenSolaris does, which should at least help testing this change on non-V1280. - Remove comments referring to the %wstate usage in BSD/OS. - Remove the no longer used RSF_ALIGN_RETRY macro. - Correct some trap table addresses in comments. - Ensure %wstate is set to WSTATE_KERNEL when taking over the trap table. - Ensure PSTATE_AM is off when entering or exiting to OFW as well as that interrupts are also completely off when exiting to OFW as the firmware trap table shouldn't be used to handle our interrupts. Modified: stable/8/sys/sparc64/include/wstate.h stable/8/sys/sparc64/sparc64/exception.S stable/8/sys/sparc64/sparc64/locore.S stable/8/sys/sparc64/sparc64/machdep.c stable/8/sys/sparc64/sparc64/support.S 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) stable/8/sys/net/ (props changed) Modified: stable/8/sys/sparc64/include/wstate.h ============================================================================== --- stable/8/sys/sparc64/include/wstate.h Thu Apr 1 14:27:29 2010 (r206043) +++ stable/8/sys/sparc64/include/wstate.h Thu Apr 1 15:17:50 2010 (r206044) @@ -33,7 +33,7 @@ #define _MACHINE_WSTATE_H_ /* - * Window state register bits. + * Window state register bits * * There really are no bits per se, just the two fields WSTATE.NORMAL * and WSTATE.OTHER. The rest is up to software. @@ -42,37 +42,8 @@ * (whichever is currently in effect) and WSTATE_OTHER to represent * user mode saves (only). * - * We use the low bit to suggest 32-bit mode, with the next bit set - * once we succeed in saving in some mode. That is, if the WSTATE_ASSUME - * bit is set, the spill or fill handler we use will be one that makes - * an assumption about the proper window-save mode. If the spill or - * fill fails with an alignment fault, the spill or fill op should - * take the `assume' bit away retry the instruction that caused the - * spill or fill. This will use the new %wstate, which will test for - * which mode to use. The alignment fault code helps us out here by - * resuming the spill vector at offset +70, where we are allowed to - * execute two instructions (i.e., write to %wstate and RETRY). - * - * If the ASSUME bit is not set when the alignment fault occurs, the - * given stack pointer is hopelessly wrong (and the spill, if it is a - * spill, should be done as a sort of "panic spill") -- so those two - * instructions will be a branch sequence. - * * Note that locore.s assumes this same bit layout (since the translation * from "bits" to "{spill,fill}_N_{normal,other}" is done in hardware). - * - * The value 0 is preferred for unknown to make it easy to start in - * unknown state and continue in whichever state unknown succeeds in -- - * a successful "other" save, for instance, can just set %wstate to - * ASSUMExx << USERSHIFT and thus leave the kernel state "unknown". - * - * We also need values for managing the somewhat tricky transition from - * user to kernel and back, so we use the one remaining free bit to mean - * "although this looks like kernel mode, the window(s) involved are - * user windows and should be saved ASI_AIUP". Everything else is - * otherwise the same, but we need not bother with assumptions in this - * mode (we expect it to apply to at most one window spill or fill), - * i.e., WSTATE_TRANSITION can ignore WSTATE_ASSUME if it likes. */ #define WSTATE_NORMAL_MASK 1 /* wstate normal minus transition */ @@ -88,4 +59,8 @@ #define WSTATE_NESTED /* if set, spill must not fault */ \ (WSTATE_TRANSITION << WSTATE_OTHER_SHIFT) +/* Values used by the PROM and (Open)Solaris */ +#define WSTATE_PROM_KMIX 7 +#define WSTATE_PROM_MASK 7 + #endif /* !_MACHINE_WSTATE_H_ */ Modified: stable/8/sys/sparc64/sparc64/exception.S ============================================================================== --- stable/8/sys/sparc64/sparc64/exception.S Thu Apr 1 14:27:29 2010 (r206043) +++ stable/8/sys/sparc64/sparc64/exception.S Thu Apr 1 15:17:50 2010 (r206044) @@ -316,15 +316,6 @@ END(tl1_kstack_fault) #define RSF_FILL_INC tl0_ret_fill_end - tl0_ret_fill /* - * Retry a spill or fill with a different wstate due to an alignment fault. - * We may just be using the wrong stack offset. - */ -#define RSF_ALIGN_RETRY(ws) \ - wrpr %g0, (ws), %wstate ; \ - retry ; \ - .align 16 - -/* * Generate a T_SPILL or T_FILL trap if the window operation fails. */ #define RSF_TRAP(type) \ @@ -1716,6 +1707,19 @@ END(tl1_dmmu_prot_trap) RSF_SPILL_TOPCB .endm + .macro tl1_spill_7_n + btst 1, %sp + bnz,a,pn %xcc, tl1_spill_0_n + nop + srl %sp, 0, %sp + SPILL(stw, %sp, 4, EMPTY) + saved + retry + .align 32 + RSF_FATAL(T_SPILL) + RSF_FATAL(T_SPILL) + .endm + .macro tl1_spill_0_o wr %g0, ASI_AIUP, %asi SPILL(stxa, %sp + SPOFF, 8, %asi) @@ -1770,6 +1774,19 @@ END(tl1_dmmu_prot_trap) RSF_FILL_MAGIC .endm + .macro tl1_fill_7_n + btst 1, %sp + bnz,a,pt %xcc, tl1_fill_0_n + nop + srl %sp, 0, %sp + FILL(lduw, %sp, 4, EMPTY) + restored + retry + .align 32 + RSF_FATAL(T_FILL) + RSF_FATAL(T_FILL) + .endm + /* * This is used to spill windows that are still occupied with user * data on kernel entry to the pcb. @@ -2016,8 +2033,10 @@ tl1_spill_0_n: tl1_spill_2_n: tl1_spill_2_n ! 0x288 tl1_spill_3_n: - tl1_spill_3_n ! 0x29c - tl1_spill_bad 4 ! 0x290-0x29f + tl1_spill_3_n ! 0x28c + tl1_spill_bad 3 ! 0x290-0x29b +tl1_spill_7_n: + tl1_spill_7_n ! 0x29c tl1_spill_0_o: tl1_spill_0_o ! 0x2a0 tl1_spill_1_o: @@ -2029,10 +2048,13 @@ tl1_fill_0_n: tl1_fill_0_n ! 0x2c0 tl1_fill_bad 1 ! 0x2c4 tl1_fill_2_n: - tl1_fill_2_n ! 0x2d0 + tl1_fill_2_n ! 0x2c8 tl1_fill_3_n: - tl1_fill_3_n ! 0x2d4 - tl1_fill_bad 12 ! 0x2d8-0x2ff + tl1_fill_3_n ! 0x2cc + tl1_fill_bad 3 ! 0x2d0-0x2db +tl1_fill_7_n: + tl1_fill_7_n ! 0x2dc + tl1_fill_bad 8 ! 0x2e0-0x2ff tl1_reserved 1 ! 0x300 tl1_breakpoint: tl1_gen T_BREAKPOINT ! 0x301 @@ -2649,7 +2671,7 @@ END(tl0_ret) * Kernel trap entry point * * void tl1_trap(u_int type, u_long o1, u_long o2, u_long tar, u_long sfar, - * u_int sfsr) + * u_int sfsr) * * This is easy because the stack is already setup and the windows don't need * to be split. We build a trapframe and call trap(), the same as above, but Modified: stable/8/sys/sparc64/sparc64/locore.S ============================================================================== --- stable/8/sys/sparc64/sparc64/locore.S Thu Apr 1 14:27:29 2010 (r206043) +++ stable/8/sys/sparc64/sparc64/locore.S Thu Apr 1 15:17:50 2010 (r206044) @@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "assym.s" @@ -139,8 +140,12 @@ ENTRY(cpu_setregs) * Force trap level 1 and take over the trap table. */ SET(tl0_base, %o2, %o1) + SET(tba_taken_over, %o3, %o2) + mov 1, %o3 + wrpr %g0, WSTATE_KERNEL, %wstate wrpr %g0, 1, %tl wrpr %o1, 0, %tba + stw %o3, [%o2] /* * Re-enable interrupts. Modified: stable/8/sys/sparc64/sparc64/machdep.c ============================================================================== --- stable/8/sys/sparc64/sparc64/machdep.c Thu Apr 1 14:27:29 2010 (r206043) +++ stable/8/sys/sparc64/sparc64/machdep.c Thu Apr 1 15:17:50 2010 (r206044) @@ -138,6 +138,7 @@ struct kva_md_info kmi; u_long ofw_vec; u_long ofw_tba; +u_int tba_taken_over; char sparc64_model[32]; @@ -466,7 +467,7 @@ sparc64_init(caddr_t mdp, u_long o1, u_l /* * Determine the TLB slot maxima, which are expected to be * equal across all CPUs. - * NB: for Cheetah-class CPUs, these properties only refer + * NB: for cheetah-class CPUs, these properties only refer * to the t16s. */ if (OF_getprop(pc->pc_node, "#dtlb-entries", &dtlb_slots, Modified: stable/8/sys/sparc64/sparc64/support.S ============================================================================== --- stable/8/sys/sparc64/sparc64/support.S Thu Apr 1 14:27:29 2010 (r206043) +++ stable/8/sys/sparc64/sparc64/support.S Thu Apr 1 15:17:50 2010 (r206044) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "assym.s" @@ -751,11 +752,20 @@ ENTRY(ofw_entry) save %sp, -CCFSZ, %sp SET(ofw_vec, %l7, %l6) ldx [%l6], %l6 - rdpr %pil, %l7 - wrpr %g0, PIL_TICK, %pil - call %l6 + rdpr %pstate, %l7 + andn %l7, PSTATE_AM | PSTATE_IE, %l5 + wrpr %l5, 0, %pstate + SET(tba_taken_over, %l5, %l4) + brz,pn %l4, 1f + rdpr %wstate, %l5 + andn %l5, WSTATE_PROM_MASK, %l3 + wrpr %l3, WSTATE_PROM_KMIX, %wstate +1: call %l6 mov %i0, %o0 - wrpr %l7, 0, %pil + brz,pn %l4, 1f + nop + wrpr %g0, %l5, %wstate +1: wrpr %l7, 0, %pstate ret restore %o0, %g0, %o0 END(ofw_entry) @@ -766,9 +776,14 @@ END(ofw_entry) ENTRY(ofw_exit) save %sp, -CCFSZ, %sp flushw - wrpr %g0, PIL_TICK, %pil SET(ofw_tba, %l7, %l5) ldx [%l5], %l5 + rdpr %pstate, %l7 + andn %l7, PSTATE_AM | PSTATE_IE, %l7 + wrpr %l7, 0, %pstate + rdpr %wstate, %l7 + andn %l7, WSTATE_PROM_MASK, %l7 + wrpr %l7, WSTATE_PROM_KMIX, %wstate wrpr %l5, 0, %tba ! restore the OFW trap table SET(ofw_vec, %l7, %l6) ldx [%l6], %l6 From owner-svn-src-all@FreeBSD.ORG Thu Apr 1 15:17:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54D52106564A; Thu, 1 Apr 2010 15:17:53 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4141B8FC17; Thu, 1 Apr 2010 15:17: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 o31FHrtf068095; Thu, 1 Apr 2010 15:17:53 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o31FHrIj068089; Thu, 1 Apr 2010 15:17:53 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201004011517.o31FHrIj068089@svn.freebsd.org> From: Marius Strobl Date: Thu, 1 Apr 2010 15:17: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: r206045 - in stable/7/sys/sparc64: include sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 01 Apr 2010 15:17:53 -0000 Author: marius Date: Thu Apr 1 15:17:52 2010 New Revision: 206045 URL: http://svn.freebsd.org/changeset/base/206045 Log: MFC: r205409 - The firmware of Sun Fire V1280 has a misfeature of setting %wstate to 7 which corresponds to WSTATE_KMIX in OpenSolaris whenever calling into it which totally screws us even when restoring %wstate afterwards as spill/fill traps can happen while in OFW. The rather hackish OpenBSD approach of just setting the equivalent of WSTATE_KERNEL to 7 also is no option as we treat %wstate as a bit field. So in order to deal with this problem actually implement spill/fill handlers for %wstate 7 which just act as the WSTATE_KERNEL ones except of theoretically also handling 32-bit, turn off interrupts completely so we don't even take IPIs while in OFW which should ensure we only take spill/fill traps at most and restore %wstate after calling into OFW once we have taken over the trap table. While at it, actually set WSTATE_{,PROM}_KMIX before calling into OFW just like OpenSolaris does, which should at least help testing this change on non-V1280. - Remove comments referring to the %wstate usage in BSD/OS. - Remove the no longer used RSF_ALIGN_RETRY macro. - Correct some trap table addresses in comments. - Ensure %wstate is set to WSTATE_KERNEL when taking over the trap table. - Ensure PSTATE_AM is off when entering or exiting to OFW as well as that interrupts are also completely off when exiting to OFW as the firmware trap table shouldn't be used to handle our interrupts. Modified: stable/7/sys/sparc64/include/wstate.h stable/7/sys/sparc64/sparc64/exception.S stable/7/sys/sparc64/sparc64/locore.S stable/7/sys/sparc64/sparc64/machdep.c stable/7/sys/sparc64/sparc64/support.S Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/include/wstate.h ============================================================================== --- stable/7/sys/sparc64/include/wstate.h Thu Apr 1 15:17:50 2010 (r206044) +++ stable/7/sys/sparc64/include/wstate.h Thu Apr 1 15:17:52 2010 (r206045) @@ -33,7 +33,7 @@ #define _MACHINE_WSTATE_H_ /* - * Window state register bits. + * Window state register bits * * There really are no bits per se, just the two fields WSTATE.NORMAL * and WSTATE.OTHER. The rest is up to software. @@ -42,37 +42,8 @@ * (whichever is currently in effect) and WSTATE_OTHER to represent * user mode saves (only). * - * We use the low bit to suggest 32-bit mode, with the next bit set - * once we succeed in saving in some mode. That is, if the WSTATE_ASSUME - * bit is set, the spill or fill handler we use will be one that makes - * an assumption about the proper window-save mode. If the spill or - * fill fails with an alignment fault, the spill or fill op should - * take the `assume' bit away retry the instruction that caused the - * spill or fill. This will use the new %wstate, which will test for - * which mode to use. The alignment fault code helps us out here by - * resuming the spill vector at offset +70, where we are allowed to - * execute two instructions (i.e., write to %wstate and RETRY). - * - * If the ASSUME bit is not set when the alignment fault occurs, the - * given stack pointer is hopelessly wrong (and the spill, if it is a - * spill, should be done as a sort of "panic spill") -- so those two - * instructions will be a branch sequence. - * * Note that locore.s assumes this same bit layout (since the translation * from "bits" to "{spill,fill}_N_{normal,other}" is done in hardware). - * - * The value 0 is preferred for unknown to make it easy to start in - * unknown state and continue in whichever state unknown succeeds in -- - * a successful "other" save, for instance, can just set %wstate to - * ASSUMExx << USERSHIFT and thus leave the kernel state "unknown". - * - * We also need values for managing the somewhat tricky transition from - * user to kernel and back, so we use the one remaining free bit to mean - * "although this looks like kernel mode, the window(s) involved are - * user windows and should be saved ASI_AIUP". Everything else is - * otherwise the same, but we need not bother with assumptions in this - * mode (we expect it to apply to at most one window spill or fill), - * i.e., WSTATE_TRANSITION can ignore WSTATE_ASSUME if it likes. */ #define WSTATE_NORMAL_MASK 1 /* wstate normal minus transition */ @@ -88,4 +59,8 @@ #define WSTATE_NESTED /* if set, spill must not fault */ \ (WSTATE_TRANSITION << WSTATE_OTHER_SHIFT) +/* Values used by the PROM and (Open)Solaris */ +#define WSTATE_PROM_KMIX 7 +#define WSTATE_PROM_MASK 7 + #endif /* !_MACHINE_WSTATE_H_ */ Modified: stable/7/sys/sparc64/sparc64/exception.S ============================================================================== --- stable/7/sys/sparc64/sparc64/exception.S Thu Apr 1 15:17:50 2010 (r206044) +++ stable/7/sys/sparc64/sparc64/exception.S Thu Apr 1 15:17:52 2010 (r206045) @@ -316,15 +316,6 @@ END(tl1_kstack_fault) #define RSF_FILL_INC tl0_ret_fill_end - tl0_ret_fill /* - * Retry a spill or fill with a different wstate due to an alignment fault. - * We may just be using the wrong stack offset. - */ -#define RSF_ALIGN_RETRY(ws) \ - wrpr %g0, (ws), %wstate ; \ - retry ; \ - .align 16 - -/* * Generate a T_SPILL or T_FILL trap if the window operation fails. */ #define RSF_TRAP(type) \ @@ -1716,6 +1707,19 @@ END(tl1_dmmu_prot_trap) RSF_SPILL_TOPCB .endm + .macro tl1_spill_7_n + btst 1, %sp + bnz,a,pn %xcc, tl1_spill_0_n + nop + srl %sp, 0, %sp + SPILL(stw, %sp, 4, EMPTY) + saved + retry + .align 32 + RSF_FATAL(T_SPILL) + RSF_FATAL(T_SPILL) + .endm + .macro tl1_spill_0_o wr %g0, ASI_AIUP, %asi SPILL(stxa, %sp + SPOFF, 8, %asi) @@ -1770,6 +1774,19 @@ END(tl1_dmmu_prot_trap) RSF_FILL_MAGIC .endm + .macro tl1_fill_7_n + btst 1, %sp + bnz,a,pt %xcc, tl1_fill_0_n + nop + srl %sp, 0, %sp + FILL(lduw, %sp, 4, EMPTY) + restored + retry + .align 32 + RSF_FATAL(T_FILL) + RSF_FATAL(T_FILL) + .endm + /* * This is used to spill windows that are still occupied with user * data on kernel entry to the pcb. @@ -2016,8 +2033,10 @@ tl1_spill_0_n: tl1_spill_2_n: tl1_spill_2_n ! 0x288 tl1_spill_3_n: - tl1_spill_3_n ! 0x29c - tl1_spill_bad 4 ! 0x290-0x29f + tl1_spill_3_n ! 0x28c + tl1_spill_bad 3 ! 0x290-0x29b +tl1_spill_7_n: + tl1_spill_7_n ! 0x29c tl1_spill_0_o: tl1_spill_0_o ! 0x2a0 tl1_spill_1_o: @@ -2029,10 +2048,13 @@ tl1_fill_0_n: tl1_fill_0_n ! 0x2c0 tl1_fill_bad 1 ! 0x2c4 tl1_fill_2_n: - tl1_fill_2_n ! 0x2d0 + tl1_fill_2_n ! 0x2c8 tl1_fill_3_n: - tl1_fill_3_n ! 0x2d4 - tl1_fill_bad 12 ! 0x2d8-0x2ff + tl1_fill_3_n ! 0x2cc + tl1_fill_bad 3 ! 0x2d0-0x2db +tl1_fill_7_n: + tl1_fill_7_n ! 0x2dc + tl1_fill_bad 8 ! 0x2e0-0x2ff tl1_reserved 1 ! 0x300 tl1_breakpoint: tl1_gen T_BREAKPOINT ! 0x301 @@ -2649,7 +2671,7 @@ END(tl0_ret) * Kernel trap entry point * * void tl1_trap(u_int type, u_long o1, u_long o2, u_long tar, u_long sfar, - * u_int sfsr) + * u_int sfsr) * * This is easy because the stack is already setup and the windows don't need * to be split. We build a trapframe and call trap(), the same as above, but Modified: stable/7/sys/sparc64/sparc64/locore.S ============================================================================== --- stable/7/sys/sparc64/sparc64/locore.S Thu Apr 1 15:17:50 2010 (r206044) +++ stable/7/sys/sparc64/sparc64/locore.S Thu Apr 1 15:17:52 2010 (r206045) @@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "assym.s" @@ -139,8 +140,12 @@ ENTRY(cpu_setregs) * Force trap level 1 and take over the trap table. */ SET(tl0_base, %o2, %o1) + SET(tba_taken_over, %o3, %o2) + mov 1, %o3 + wrpr %g0, WSTATE_KERNEL, %wstate wrpr %g0, 1, %tl wrpr %o1, 0, %tba + stw %o3, [%o2] /* * Re-enable interrupts. Modified: stable/7/sys/sparc64/sparc64/machdep.c ============================================================================== --- stable/7/sys/sparc64/sparc64/machdep.c Thu Apr 1 15:17:50 2010 (r206044) +++ stable/7/sys/sparc64/sparc64/machdep.c Thu Apr 1 15:17:52 2010 (r206045) @@ -137,6 +137,7 @@ struct kva_md_info kmi; u_long ofw_vec; u_long ofw_tba; +u_int tba_taken_over; char sparc64_model[32]; @@ -458,7 +459,7 @@ sparc64_init(caddr_t mdp, u_long o1, u_l /* * Determine the TLB slot maxima, which are expected to be * equal across all CPUs. - * NB: for Cheetah-class CPUs, these properties only refer + * NB: for cheetah-class CPUs, these properties only refer * to the t16s. */ if (OF_getprop(pc->pc_node, "#dtlb-entries", &dtlb_slots, Modified: stable/7/sys/sparc64/sparc64/support.S ============================================================================== --- stable/7/sys/sparc64/sparc64/support.S Thu Apr 1 15:17:50 2010 (r206044) +++ stable/7/sys/sparc64/sparc64/support.S Thu Apr 1 15:17:52 2010 (r206045) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "assym.s" @@ -751,11 +752,20 @@ ENTRY(openfirmware) save %sp, -CCFSZ, %sp SET(ofw_vec, %l7, %l6) ldx [%l6], %l6 - rdpr %pil, %l7 - wrpr %g0, PIL_TICK, %pil - call %l6 + rdpr %pstate, %l7 + andn %l7, PSTATE_AM | PSTATE_IE, %l5 + wrpr %l5, 0, %pstate + SET(tba_taken_over, %l5, %l4) + brz,pn %l4, 1f + rdpr %wstate, %l5 + andn %l5, WSTATE_PROM_MASK, %l3 + wrpr %l3, WSTATE_PROM_KMIX, %wstate +1: call %l6 mov %i0, %o0 - wrpr %l7, 0, %pil + brz,pn %l4, 1f + nop + wrpr %g0, %l5, %wstate +1: wrpr %l7, 0, %pstate ret restore %o0, %g0, %o0 END(openfirmware) @@ -766,9 +776,14 @@ END(openfirmware) ENTRY(openfirmware_exit) save %sp, -CCFSZ, %sp flushw - wrpr %g0, PIL_TICK, %pil SET(ofw_tba, %l7, %l5) ldx [%l5], %l5 + rdpr %pstate, %l7 + andn %l7, PSTATE_AM | PSTATE_IE, %l7 + wrpr %l7, 0, %pstate + rdpr %wstate, %l7 + andn %l7, WSTATE_PROM_MASK, %l7 + wrpr %l7, WSTATE_PROM_KMIX, %wstate wrpr %l5, 0, %tba ! restore the OFW trap table SET(ofw_vec, %l7, %l6) ldx [%l6], %l6 From owner-svn-src-all@FreeBSD.ORG Thu Apr 1 15:19:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B4319106566C; Thu, 1 Apr 2010 15:19:51 +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 9FCB68FC0A; Thu, 1 Apr 2010 15:19: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 o31FJpqk068578; Thu, 1 Apr 2010 15:19:51 GMT (envelope-from simon@svn.freebsd.org) Received: (from simon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o31FJpw2068549; Thu, 1 Apr 2010 15:19:51 GMT (envelope-from simon@svn.freebsd.org) Message-Id: <201004011519.o31FJpw2068549@svn.freebsd.org> From: "Simon L. Nielsen" Date: Thu, 1 Apr 2010 15:19: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: r206046 - in head/crypto/openssl: . apps crypto crypto/asn1 crypto/bio crypto/bn crypto/bn/asm crypto/engine crypto/evp crypto/ocsp crypto/rand engines fips ssl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 01 Apr 2010 15:19:51 -0000 Author: simon Date: Thu Apr 1 15:19:51 2010 New Revision: 206046 URL: http://svn.freebsd.org/changeset/base/206046 Log: Merge OpenSSL 0.9.8n into head. This fixes CVE-2010-0740 which only affected -CURRENT (OpenSSL 0.9.8m) but not -STABLE branches. I have not yet been able to find out if CVE-2010-0433 impacts FreeBSD. This will be investigated further. Security: CVE-2010-0433, CVE-2010-0740 Security: http://www.openssl.org/news/secadv_20100324.txt Modified: head/crypto/openssl/CHANGES head/crypto/openssl/FAQ head/crypto/openssl/Makefile head/crypto/openssl/NEWS head/crypto/openssl/README head/crypto/openssl/apps/req.c head/crypto/openssl/apps/speed.c head/crypto/openssl/config head/crypto/openssl/crypto/asn1/a_object.c head/crypto/openssl/crypto/bio/bss_file.c head/crypto/openssl/crypto/bn/asm/ppc.pl head/crypto/openssl/crypto/bn/asm/x86_64-gcc.c head/crypto/openssl/crypto/bn/bn_div.c head/crypto/openssl/crypto/engine/eng_all.c head/crypto/openssl/crypto/engine/eng_cryptodev.c head/crypto/openssl/crypto/evp/digest.c head/crypto/openssl/crypto/evp/evp_locl.h head/crypto/openssl/crypto/evp/names.c head/crypto/openssl/crypto/md32_common.h head/crypto/openssl/crypto/ocsp/ocsp_prn.c head/crypto/openssl/crypto/opensslv.h head/crypto/openssl/crypto/rand/rand_win.c head/crypto/openssl/engines/e_capi.c head/crypto/openssl/engines/e_chil.c head/crypto/openssl/fips/Makefile head/crypto/openssl/openssl.spec head/crypto/openssl/ssl/kssl.c head/crypto/openssl/ssl/s3_pkt.c Directory Properties: head/crypto/openssl/ (props changed) Modified: head/crypto/openssl/CHANGES ============================================================================== --- head/crypto/openssl/CHANGES Thu Apr 1 15:17:52 2010 (r206045) +++ head/crypto/openssl/CHANGES Thu Apr 1 15:19:51 2010 (r206046) @@ -2,6 +2,21 @@ OpenSSL CHANGES _______________ + Changes between 0.9.8m and 0.9.8n [24 Mar 2010] + + *) When rejecting SSL/TLS records due to an incorrect version number, never + update s->server with a new major version number. As of + - OpenSSL 0.9.8m if 'short' is a 16-bit type, + - OpenSSL 0.9.8f if 'short' is longer than 16 bits, + the previous behavior could result in a read attempt at NULL when + receiving specific incorrect SSL/TLS records once record payload + protection is active. (CVE-2010-0740) + [Bodo Moeller, Adam Langley ] + + *) Fix for CVE-2010-0433 where some kerberos enabled versions of OpenSSL + could be crashed if the relevant tables were not present (e.g. chrooted). + [Tomas Hoger ] + Changes between 0.9.8l and 0.9.8m [25 Feb 2010] *) Always check bn_wexpend() return values for failure. (CVE-2009-3245) Modified: head/crypto/openssl/FAQ ============================================================================== --- head/crypto/openssl/FAQ Thu Apr 1 15:17:52 2010 (r206045) +++ head/crypto/openssl/FAQ Thu Apr 1 15:19:51 2010 (r206046) @@ -78,7 +78,7 @@ OpenSSL - Frequently Asked Questions * Which is the current version of OpenSSL? The current version is available from . -OpenSSL 0.9.8m was released on Feb 25th, 2010. +OpenSSL 0.9.8n was released on Mar 24th, 2010. In addition to the current stable release, you can also access daily snapshots of the OpenSSL development version at value,def,value,nid,n_min,n_max, chtype)) Modified: head/crypto/openssl/apps/speed.c ============================================================================== --- head/crypto/openssl/apps/speed.c Thu Apr 1 15:17:52 2010 (r206045) +++ head/crypto/openssl/apps/speed.c Thu Apr 1 15:19:51 2010 (r206046) @@ -254,12 +254,18 @@ # endif #endif -#if defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MACINTOSH_CLASSIC) || defined(OPENSSL_SYS_OS2) || defined(OPENSSL_SYS_NETWARE) -# define NO_FORK 1 -#elif HAVE_FORK +#ifndef HAVE_FORK +# if defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MACINTOSH_CLASSIC) || defined(OPENSSL_SYS_OS2) || defined(OPENSSL_SYS_NETWARE) +# define HAVE_FORK 0 +# else +# define HAVE_FORK 1 +# endif +#endif + +#if HAVE_FORK # undef NO_FORK #else -# define NO_FORK 1 +# define NO_FORK #endif #undef BUFSIZE Modified: head/crypto/openssl/config ============================================================================== --- head/crypto/openssl/config Thu Apr 1 15:17:52 2010 (r206045) +++ head/crypto/openssl/config Thu Apr 1 15:19:51 2010 (r206046) @@ -741,6 +741,10 @@ case "$GUESSOS" in OBJECT_MODE=${OBJECT_MODE:-32} if [ "$CC" = "gcc" ]; then OUT="aix-gcc" + if [ $OBJECT_MODE -eq 64 ]; then + echo 'Your $OBJECT_MODE was found to be set to 64' + OUT="aix64-gcc" + fi elif [ $OBJECT_MODE -eq 64 ]; then echo 'Your $OBJECT_MODE was found to be set to 64' OUT="aix64-cc" Modified: head/crypto/openssl/crypto/asn1/a_object.c ============================================================================== --- head/crypto/openssl/crypto/asn1/a_object.c Thu Apr 1 15:17:52 2010 (r206045) +++ head/crypto/openssl/crypto/asn1/a_object.c Thu Apr 1 15:19:51 2010 (r206046) @@ -291,12 +291,12 @@ ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT ASN1_OBJECT *ret=NULL; const unsigned char *p; int i; - /* Sanity check OID encoding: can't have 0x80 in subidentifiers, see: - * X.690 8.19.2 + /* Sanity check OID encoding: can't have leading 0x80 in + * subidentifiers, see: X.690 8.19.2 */ for (i = 0, p = *pp + 1; i < len - 1; i++, p++) { - if (*p == 0x80) + if (*p == 0x80 && (!i || !(p[-1] & 0x80))) { ASN1err(ASN1_F_C2I_ASN1_OBJECT,ASN1_R_INVALID_OBJECT_ENCODING); return NULL; Modified: head/crypto/openssl/crypto/bio/bss_file.c ============================================================================== --- head/crypto/openssl/crypto/bio/bss_file.c Thu Apr 1 15:17:52 2010 (r206045) +++ head/crypto/openssl/crypto/bio/bss_file.c Thu Apr 1 15:19:51 2010 (r206046) @@ -272,9 +272,9 @@ static long MS_CALLBACK file_ctrl(BIO *b BIO_clear_flags(b,BIO_FLAGS_UPLINK); #endif #endif -#ifdef UP_fsetmode +#ifdef UP_fsetmod if (b->flags&BIO_FLAGS_UPLINK) - UP_fsetmode(b->ptr,num&BIO_FP_TEXT?'t':'b'); + UP_fsetmod(b->ptr,(char)((num&BIO_FP_TEXT)?'t':'b')); else #endif { Modified: head/crypto/openssl/crypto/bn/asm/ppc.pl ============================================================================== --- head/crypto/openssl/crypto/bn/asm/ppc.pl Thu Apr 1 15:17:52 2010 (r206045) +++ head/crypto/openssl/crypto/bn/asm/ppc.pl Thu Apr 1 15:19:51 2010 (r206046) @@ -2074,5 +2074,7 @@ EOF $data =~ s/^(\s*)cmplw(\s+)([^,]+),(.*)/$1cmpl$2$3,0,$4/gm; # assembler X doesn't accept li, load immediate value #$data =~ s/^(\s*)li(\s+)([^,]+),(.*)/$1addi$2$3,0,$4/gm; + # assembler Y chokes on apostrophes in comments + $data =~ s/'//gm; return($data); } Modified: head/crypto/openssl/crypto/bn/asm/x86_64-gcc.c ============================================================================== --- head/crypto/openssl/crypto/bn/asm/x86_64-gcc.c Thu Apr 1 15:17:52 2010 (r206045) +++ head/crypto/openssl/crypto/bn/asm/x86_64-gcc.c Thu Apr 1 15:19:51 2010 (r206046) @@ -59,6 +59,7 @@ #undef mul #undef mul_add +#undef sqr /* * "m"(a), "+m"(r) is the way to favor DirectPath µ-code; Modified: head/crypto/openssl/crypto/bn/bn_div.c ============================================================================== --- head/crypto/openssl/crypto/bn/bn_div.c Thu Apr 1 15:17:52 2010 (r206045) +++ head/crypto/openssl/crypto/bn/bn_div.c Thu Apr 1 15:19:51 2010 (r206046) @@ -337,7 +337,10 @@ X) -> 0x%08X\n", t2 -= d1; } #else /* !BN_LLONG */ - BN_ULONG t2l,t2h,ql,qh; + BN_ULONG t2l,t2h; +#if !defined(BN_UMULT_LOHI) && !defined(BN_UMULT_HIGH) + BN_ULONG ql,qh; +#endif q=bn_div_words(n0,n1,d0); #ifdef BN_DEBUG_LEVITTE @@ -561,7 +564,10 @@ X) -> 0x%08X\n", t2 -= d1; } #else /* !BN_LLONG */ - BN_ULONG t2l,t2h,ql,qh; + BN_ULONG t2l,t2h; +#if !defined(BN_UMULT_LOHI) && !defined(BN_UMULT_HIGH) + BN_ULONG ql,qh; +#endif q=bn_div_words(n0,n1,d0); #ifdef BN_DEBUG_LEVITTE Modified: head/crypto/openssl/crypto/engine/eng_all.c ============================================================================== --- head/crypto/openssl/crypto/engine/eng_all.c Thu Apr 1 15:17:52 2010 (r206045) +++ head/crypto/openssl/crypto/engine/eng_all.c Thu Apr 1 15:19:51 2010 (r206046) @@ -104,7 +104,7 @@ void ENGINE_load_builtin_engines(void) #endif #endif #ifndef OPENSSL_NO_HW -#if defined(__OpenBSD__) || defined(__FreeBSD__) +#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(HAVE_CRYPTODEV) ENGINE_load_cryptodev(); #endif #if defined(OPENSSL_SYS_WIN32) && !defined(OPENSSL_NO_CAPIENG) Modified: head/crypto/openssl/crypto/engine/eng_cryptodev.c ============================================================================== --- head/crypto/openssl/crypto/engine/eng_cryptodev.c Thu Apr 1 15:17:52 2010 (r206045) +++ head/crypto/openssl/crypto/engine/eng_cryptodev.c Thu Apr 1 15:19:51 2010 (r206046) @@ -755,10 +755,18 @@ cryptodev_bn_mod_exp(BIGNUM *r, const BI goto err; kop.crk_iparams = 3; - if (cryptodev_asym(&kop, BN_num_bytes(m), r, 0, NULL) == -1) { + if (cryptodev_asym(&kop, BN_num_bytes(m), r, 0, NULL)) { const RSA_METHOD *meth = RSA_PKCS1_SSLeay(); + printf("OCF asym process failed, Running in software\n"); + ret = meth->bn_mod_exp(r, a, p, m, ctx, in_mont); + + } else if (ECANCELED == kop.crk_status) { + const RSA_METHOD *meth = RSA_PKCS1_SSLeay(); + printf("OCF hardware operation cancelled. Running in Software\n"); ret = meth->bn_mod_exp(r, a, p, m, ctx, in_mont); } + /* else cryptodev operation worked ok ==> ret = 1*/ + err: zapparams(&kop); return (ret); @@ -801,10 +809,18 @@ cryptodev_rsa_mod_exp(BIGNUM *r0, const goto err; kop.crk_iparams = 6; - if (cryptodev_asym(&kop, BN_num_bytes(rsa->n), r0, 0, NULL) == -1) { + if (cryptodev_asym(&kop, BN_num_bytes(rsa->n), r0, 0, NULL)) { const RSA_METHOD *meth = RSA_PKCS1_SSLeay(); + printf("OCF asym process failed, running in Software\n"); + ret = (*meth->rsa_mod_exp)(r0, I, rsa, ctx); + + } else if (ECANCELED == kop.crk_status) { + const RSA_METHOD *meth = RSA_PKCS1_SSLeay(); + printf("OCF hardware operation cancelled. Running in Software\n"); ret = (*meth->rsa_mod_exp)(r0, I, rsa, ctx); } + /* else cryptodev operation worked ok ==> ret = 1*/ + err: zapparams(&kop); return (ret); @@ -940,7 +956,8 @@ cryptodev_dsa_verify(const unsigned char kop.crk_iparams = 7; if (cryptodev_asym(&kop, 0, NULL, 0, NULL) == 0) { - dsaret = kop.crk_status; +/*OCF success value is 0, if not zero, change dsaret to fail*/ + if(0 != kop.crk_status) dsaret = 0; } else { const DSA_METHOD *meth = DSA_OpenSSL(); Modified: head/crypto/openssl/crypto/evp/digest.c ============================================================================== --- head/crypto/openssl/crypto/evp/digest.c Thu Apr 1 15:17:52 2010 (r206045) +++ head/crypto/openssl/crypto/evp/digest.c Thu Apr 1 15:19:51 2010 (r206046) @@ -235,6 +235,7 @@ static int do_evp_md_engine(EVP_MD_CTX * { /* Same comment from evp_enc.c */ EVPerr(EVP_F_DO_EVP_MD_ENGINE,EVP_R_INITIALIZATION_ERROR); + ENGINE_finish(impl); return 0; } /* We'll use the ENGINE's private digest definition */ Modified: head/crypto/openssl/crypto/evp/evp_locl.h ============================================================================== --- head/crypto/openssl/crypto/evp/evp_locl.h Thu Apr 1 15:17:52 2010 (r206045) +++ head/crypto/openssl/crypto/evp/evp_locl.h Thu Apr 1 15:19:51 2010 (r206046) @@ -127,9 +127,9 @@ BLOCK_CIPHER_def1(cname, cbc, cbc, CBC, #define BLOCK_CIPHER_def_cfb(cname, kstruct, nid, key_len, \ iv_len, cbits, flags, init_key, cleanup, \ set_asn1, get_asn1, ctrl) \ -BLOCK_CIPHER_def1(cname, cfb##cbits, cfb##cbits, CFB, kstruct, nid, \ - (cbits + 7)/8, key_len, iv_len, \ - flags, init_key, cleanup, set_asn1, get_asn1, ctrl) +BLOCK_CIPHER_def1(cname, cfb##cbits, cfb##cbits, CFB, kstruct, nid, 1, \ + key_len, iv_len, flags, init_key, cleanup, set_asn1, \ + get_asn1, ctrl) #define BLOCK_CIPHER_def_ofb(cname, kstruct, nid, key_len, \ iv_len, cbits, flags, init_key, cleanup, \ Modified: head/crypto/openssl/crypto/evp/names.c ============================================================================== --- head/crypto/openssl/crypto/evp/names.c Thu Apr 1 15:17:52 2010 (r206045) +++ head/crypto/openssl/crypto/evp/names.c Thu Apr 1 15:19:51 2010 (r206046) @@ -90,7 +90,7 @@ int EVP_add_digest(const EVP_MD *md) r=OBJ_NAME_add(OBJ_nid2ln(md->type),OBJ_NAME_TYPE_MD_METH,(const char *)md); if (r == 0) return(0); - if (md->type != md->pkey_type) + if (md->pkey_type && md->type != md->pkey_type) { r=OBJ_NAME_add(OBJ_nid2sn(md->pkey_type), OBJ_NAME_TYPE_MD_METH|OBJ_NAME_ALIAS,name); Modified: head/crypto/openssl/crypto/md32_common.h ============================================================================== --- head/crypto/openssl/crypto/md32_common.h Thu Apr 1 15:17:52 2010 (r206045) +++ head/crypto/openssl/crypto/md32_common.h Thu Apr 1 15:19:51 2010 (r206046) @@ -241,11 +241,11 @@ #ifndef PEDANTIC # if defined(__GNUC__) && __GNUC__>=2 && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) # if defined(__s390x__) -# define HOST_c2l(c,l) ({ asm ("lrv %0,0(%1)" \ - :"=r"(l) : "r"(c)); \ +# define HOST_c2l(c,l) ({ asm ("lrv %0,%1" \ + :"=d"(l) :"m"(*(const unsigned int *)(c));\ (c)+=4; (l); }) -# define HOST_l2c(l,c) ({ asm ("strv %0,0(%1)" \ - : : "r"(l),"r"(c) : "memory"); \ +# define HOST_l2c(l,c) ({ asm ("strv %1,%0" \ + :"=m"(*(unsigned int *)(c)) :"d"(l));\ (c)+=4; (l); }) # endif # endif Modified: head/crypto/openssl/crypto/ocsp/ocsp_prn.c ============================================================================== --- head/crypto/openssl/crypto/ocsp/ocsp_prn.c Thu Apr 1 15:17:52 2010 (r206045) +++ head/crypto/openssl/crypto/ocsp/ocsp_prn.c Thu Apr 1 15:19:51 2010 (r206046) @@ -275,6 +275,7 @@ int OCSP_RESPONSE_print(BIO *bp, OCSP_RE } if (!X509V3_extensions_print(bp, "Response Extensions", rd->responseExtensions, flags, 4)) + goto err; if(X509_signature_print(bp, br->signatureAlgorithm, br->signature) <= 0) goto err; Modified: head/crypto/openssl/crypto/opensslv.h ============================================================================== --- head/crypto/openssl/crypto/opensslv.h Thu Apr 1 15:17:52 2010 (r206045) +++ head/crypto/openssl/crypto/opensslv.h Thu Apr 1 15:19:51 2010 (r206046) @@ -25,11 +25,11 @@ * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for * major minor fix final patch/beta) */ -#define OPENSSL_VERSION_NUMBER 0x009080dfL +#define OPENSSL_VERSION_NUMBER 0x009080efL #ifdef OPENSSL_FIPS -#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8m-fips 25 Feb 2010" +#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8n-fips 24 Mar 2010" #else -#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8m 25 Feb 2010" +#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8n 24 Mar 2010" #endif #define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT Modified: head/crypto/openssl/crypto/rand/rand_win.c ============================================================================== --- head/crypto/openssl/crypto/rand/rand_win.c Thu Apr 1 15:17:52 2010 (r206045) +++ head/crypto/openssl/crypto/rand/rand_win.c Thu Apr 1 15:19:51 2010 (r206046) @@ -750,7 +750,7 @@ static void readscreen(void) int y; /* y-coordinate of screen lines to grab */ int n = 16; /* number of screen lines to grab at a time */ - if (GetVersion() >= 0x80000000 || !OPENSSL_isservice()) + if (GetVersion() < 0x80000000 && OPENSSL_isservice()>0) return; /* Create a screen DC and a memory DC compatible to screen DC */ Modified: head/crypto/openssl/engines/e_capi.c ============================================================================== --- head/crypto/openssl/engines/e_capi.c Thu Apr 1 15:17:52 2010 (r206045) +++ head/crypto/openssl/engines/e_capi.c Thu Apr 1 15:19:51 2010 (r206046) @@ -83,6 +83,10 @@ #define CERT_STORE_CREATE_NEW_FLAG 0x00002000 #endif +#ifndef CERT_SYSTEM_STORE_CURRENT_USER +#define CERT_SYSTEM_STORE_CURRENT_USER 0x00010000 +#endif + #include #include #include Modified: head/crypto/openssl/engines/e_chil.c ============================================================================== --- head/crypto/openssl/engines/e_chil.c Thu Apr 1 15:17:52 2010 (r206045) +++ head/crypto/openssl/engines/e_chil.c Thu Apr 1 15:19:51 2010 (r206046) @@ -1204,6 +1204,11 @@ static int hwcrhk_get_pass(const char *p pem_password_cb *callback = NULL; void *callback_data = NULL; UI_METHOD *ui_method = NULL; + /* Despite what the documentation says prompt_info can be + * an empty string. + */ + if (prompt_info && !*prompt_info) + prompt_info = NULL; if (cactx) { @@ -1305,8 +1310,10 @@ static int hwcrhk_insert_card(const char { char answer; char buf[BUFSIZ]; - - if (wrong_info) + /* Despite what the documentation says wrong_info can be + * an empty string. + */ + if (wrong_info && *wrong_info) BIO_snprintf(buf, sizeof(buf)-1, "Current card: \"%s\"\n", wrong_info); ok = UI_dup_info_string(ui, buf); Modified: head/crypto/openssl/fips/Makefile ============================================================================== --- head/crypto/openssl/fips/Makefile Thu Apr 1 15:17:52 2010 (r206045) +++ head/crypto/openssl/fips/Makefile Thu Apr 1 15:19:51 2010 (r206046) @@ -123,7 +123,7 @@ fips_premain_dso$(EXE_EXT): fips_premain $(FIPSLIBDIR)fipscanister.o ../libcrypto.a $(EX_LIBS) # this is executed only when linking with external fipscanister.o fips_standalone_sha1$(EXE_EXT): sha/fips_standalone_sha1.c - if [ -z $(HOSTCC) ] ; then \ + if [ -z "$(HOSTCC)" ] ; then \ $(CC) $(CFLAGS) -DFIPSCANISTER_O -o $@ sha/fips_standalone_sha1.c $(FIPSLIBDIR)fipscanister.o $(EX_LIBS) ; \ else \ $(HOSTCC) $(HOSTCFLAGS) -o $ $@ -I../include -I../crypto sha/fips_standalone_sha1.c ../crypto/sha/sha1dgst.c ; \ Modified: head/crypto/openssl/openssl.spec ============================================================================== --- head/crypto/openssl/openssl.spec Thu Apr 1 15:17:52 2010 (r206045) +++ head/crypto/openssl/openssl.spec Thu Apr 1 15:19:51 2010 (r206046) @@ -2,7 +2,7 @@ %define libmaj 0 %define libmin 9 %define librel 8 -%define librev m +%define librev n Release: 1 %define openssldir /var/ssl Modified: head/crypto/openssl/ssl/kssl.c ============================================================================== --- head/crypto/openssl/ssl/kssl.c Thu Apr 1 15:17:52 2010 (r206045) +++ head/crypto/openssl/ssl/kssl.c Thu Apr 1 15:19:51 2010 (r206046) @@ -1802,6 +1802,9 @@ kssl_ctx_show(KSSL_CTX *kssl_ctx) kssl_ctx->service_name ? kssl_ctx->service_name: KRB5SVC, KRB5_NT_SRV_HST, &princ); + if (krb5rc) + goto exit; + krb5rc = krb5_kt_get_entry(krb5context, krb5keytab, princ, 0 /* IGNORE_VNO */, Modified: head/crypto/openssl/ssl/s3_pkt.c ============================================================================== --- head/crypto/openssl/ssl/s3_pkt.c Thu Apr 1 15:17:52 2010 (r206045) +++ head/crypto/openssl/ssl/s3_pkt.c Thu Apr 1 15:19:51 2010 (r206046) @@ -291,9 +291,9 @@ again: if (version != s->version) { SSLerr(SSL_F_SSL3_GET_RECORD,SSL_R_WRONG_VERSION_NUMBER); - /* Send back error using their - * version number :-) */ - s->version=version; + if ((s->version & 0xFF00) == (version & 0xFF00)) + /* Send back error using their minor version number :-) */ + s->version = (unsigned short)version; al=SSL_AD_PROTOCOL_VERSION; goto f_err; } From owner-svn-src-all@FreeBSD.ORG Thu Apr 1 15:35:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 665F51065677; Thu, 1 Apr 2010 15:35:30 +0000 (UTC) (envelope-from simon@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 27D5E8FC19; Thu, 1 Apr 2010 15:35: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 o31FZU28072025; Thu, 1 Apr 2010 15:35:30 GMT (envelope-from simon@svn.freebsd.org) Received: (from simon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o31FZU6p072023; Thu, 1 Apr 2010 15:35:30 GMT (envelope-from simon@svn.freebsd.org) Message-Id: <201004011535.o31FZU6p072023@svn.freebsd.org> From: "Simon L. Nielsen" Date: Thu, 1 Apr 2010 15:35: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: r206047 - head/secure/lib/libcrypto X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 01 Apr 2010 15:35:30 -0000 Author: simon Date: Thu Apr 1 15:35:29 2010 New Revision: 206047 URL: http://svn.freebsd.org/changeset/base/206047 Log: - Make it slightly simpler to update OpenSSL version information for regenerating OpenSSL manual pages. - Explicitly set the OpenSSL release date so manual pages contain the date OpenSSL was released and not just the date OpenSSL was imported into the FreeBSD base system. - Update for Makefile for OpenSSL 0.9.8n. Modified: head/secure/lib/libcrypto/Makefile.inc Modified: head/secure/lib/libcrypto/Makefile.inc ============================================================================== --- head/secure/lib/libcrypto/Makefile.inc Thu Apr 1 15:19:51 2010 (r206046) +++ head/secure/lib/libcrypto/Makefile.inc Thu Apr 1 15:35:29 2010 (r206047) @@ -2,6 +2,10 @@ .include +# OpenSSL version used for manual page generation +OPENSSL_VER= 0.9.8n +OPENSSL_DATE= 2010-03-24 + LCRYPTO_SRC= ${.CURDIR}/../../../crypto/openssl LCRYPTO_DOC= ${.CURDIR}/../../../crypto/openssl/doc @@ -34,7 +38,8 @@ man-update: @(sec=${manpage:E}; \ pod=${manpage:R}.pod; \ cp ${LCRYPTO_DOC}/${_docs}/$$pod .; \ - pod2man --section=$$sec --release="0.9.8m" --center="OpenSSL" \ + pod2man --section=$$sec --release="${OPENSSL_VER}" \ + --date="${OPENSSL_DATE}" --center="OpenSSL" \ $$pod > ${.CURDIR}/man/${manpage}; \ rm -f $$pod; \ ${ECHO} ${manpage}) From owner-svn-src-all@FreeBSD.ORG Thu Apr 1 15:37:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 485911065670; Thu, 1 Apr 2010 15:37:40 +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 343078FC1A; Thu, 1 Apr 2010 15:37: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 o31Fbeqj072612; Thu, 1 Apr 2010 15:37:40 GMT (envelope-from simon@svn.freebsd.org) Received: (from simon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o31Fbdim072519; Thu, 1 Apr 2010 15:37:39 GMT (envelope-from simon@svn.freebsd.org) Message-Id: <201004011537.o31Fbdim072519@svn.freebsd.org> From: "Simon L. Nielsen" Date: Thu, 1 Apr 2010 15:37: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: r206048 - in head/secure: lib/libcrypto/man lib/libssl/man usr.bin/openssl/man X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 01 Apr 2010 15:37:40 -0000 Author: simon Date: Thu Apr 1 15:37:38 2010 New Revision: 206048 URL: http://svn.freebsd.org/changeset/base/206048 Log: Regenerate manual pages for OpenSSL 0.9.8n. Modified: head/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 head/secure/lib/libcrypto/man/ASN1_STRING_length.3 head/secure/lib/libcrypto/man/ASN1_STRING_new.3 head/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 head/secure/lib/libcrypto/man/ASN1_generate_nconf.3 head/secure/lib/libcrypto/man/BIO_ctrl.3 head/secure/lib/libcrypto/man/BIO_f_base64.3 head/secure/lib/libcrypto/man/BIO_f_buffer.3 head/secure/lib/libcrypto/man/BIO_f_cipher.3 head/secure/lib/libcrypto/man/BIO_f_md.3 head/secure/lib/libcrypto/man/BIO_f_null.3 head/secure/lib/libcrypto/man/BIO_f_ssl.3 head/secure/lib/libcrypto/man/BIO_find_type.3 head/secure/lib/libcrypto/man/BIO_new.3 head/secure/lib/libcrypto/man/BIO_push.3 head/secure/lib/libcrypto/man/BIO_read.3 head/secure/lib/libcrypto/man/BIO_s_accept.3 head/secure/lib/libcrypto/man/BIO_s_bio.3 head/secure/lib/libcrypto/man/BIO_s_connect.3 head/secure/lib/libcrypto/man/BIO_s_fd.3 head/secure/lib/libcrypto/man/BIO_s_file.3 head/secure/lib/libcrypto/man/BIO_s_mem.3 head/secure/lib/libcrypto/man/BIO_s_null.3 head/secure/lib/libcrypto/man/BIO_s_socket.3 head/secure/lib/libcrypto/man/BIO_set_callback.3 head/secure/lib/libcrypto/man/BIO_should_retry.3 head/secure/lib/libcrypto/man/BN_BLINDING_new.3 head/secure/lib/libcrypto/man/BN_CTX_new.3 head/secure/lib/libcrypto/man/BN_CTX_start.3 head/secure/lib/libcrypto/man/BN_add.3 head/secure/lib/libcrypto/man/BN_add_word.3 head/secure/lib/libcrypto/man/BN_bn2bin.3 head/secure/lib/libcrypto/man/BN_cmp.3 head/secure/lib/libcrypto/man/BN_copy.3 head/secure/lib/libcrypto/man/BN_generate_prime.3 head/secure/lib/libcrypto/man/BN_mod_inverse.3 head/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 head/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 head/secure/lib/libcrypto/man/BN_new.3 head/secure/lib/libcrypto/man/BN_num_bytes.3 head/secure/lib/libcrypto/man/BN_rand.3 head/secure/lib/libcrypto/man/BN_set_bit.3 head/secure/lib/libcrypto/man/BN_swap.3 head/secure/lib/libcrypto/man/BN_zero.3 head/secure/lib/libcrypto/man/CONF_modules_free.3 head/secure/lib/libcrypto/man/CONF_modules_load_file.3 head/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 head/secure/lib/libcrypto/man/DH_generate_key.3 head/secure/lib/libcrypto/man/DH_generate_parameters.3 head/secure/lib/libcrypto/man/DH_get_ex_new_index.3 head/secure/lib/libcrypto/man/DH_new.3 head/secure/lib/libcrypto/man/DH_set_method.3 head/secure/lib/libcrypto/man/DH_size.3 head/secure/lib/libcrypto/man/DSA_SIG_new.3 head/secure/lib/libcrypto/man/DSA_do_sign.3 head/secure/lib/libcrypto/man/DSA_dup_DH.3 head/secure/lib/libcrypto/man/DSA_generate_key.3 head/secure/lib/libcrypto/man/DSA_generate_parameters.3 head/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 head/secure/lib/libcrypto/man/DSA_new.3 head/secure/lib/libcrypto/man/DSA_set_method.3 head/secure/lib/libcrypto/man/DSA_sign.3 head/secure/lib/libcrypto/man/DSA_size.3 head/secure/lib/libcrypto/man/ERR_GET_LIB.3 head/secure/lib/libcrypto/man/ERR_clear_error.3 head/secure/lib/libcrypto/man/ERR_error_string.3 head/secure/lib/libcrypto/man/ERR_get_error.3 head/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 head/secure/lib/libcrypto/man/ERR_load_strings.3 head/secure/lib/libcrypto/man/ERR_print_errors.3 head/secure/lib/libcrypto/man/ERR_put_error.3 head/secure/lib/libcrypto/man/ERR_remove_state.3 head/secure/lib/libcrypto/man/ERR_set_mark.3 head/secure/lib/libcrypto/man/EVP_BytesToKey.3 head/secure/lib/libcrypto/man/EVP_DigestInit.3 head/secure/lib/libcrypto/man/EVP_EncryptInit.3 head/secure/lib/libcrypto/man/EVP_OpenInit.3 head/secure/lib/libcrypto/man/EVP_PKEY_new.3 head/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 head/secure/lib/libcrypto/man/EVP_SealInit.3 head/secure/lib/libcrypto/man/EVP_SignInit.3 head/secure/lib/libcrypto/man/EVP_VerifyInit.3 head/secure/lib/libcrypto/man/OBJ_nid2obj.3 head/secure/lib/libcrypto/man/OPENSSL_Applink.3 head/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 head/secure/lib/libcrypto/man/OPENSSL_config.3 head/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 head/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 head/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 head/secure/lib/libcrypto/man/PKCS12_create.3 head/secure/lib/libcrypto/man/PKCS12_parse.3 head/secure/lib/libcrypto/man/PKCS7_decrypt.3 head/secure/lib/libcrypto/man/PKCS7_encrypt.3 head/secure/lib/libcrypto/man/PKCS7_sign.3 head/secure/lib/libcrypto/man/PKCS7_verify.3 head/secure/lib/libcrypto/man/RAND_add.3 head/secure/lib/libcrypto/man/RAND_bytes.3 head/secure/lib/libcrypto/man/RAND_cleanup.3 head/secure/lib/libcrypto/man/RAND_egd.3 head/secure/lib/libcrypto/man/RAND_load_file.3 head/secure/lib/libcrypto/man/RAND_set_rand_method.3 head/secure/lib/libcrypto/man/RSA_blinding_on.3 head/secure/lib/libcrypto/man/RSA_check_key.3 head/secure/lib/libcrypto/man/RSA_generate_key.3 head/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 head/secure/lib/libcrypto/man/RSA_new.3 head/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 head/secure/lib/libcrypto/man/RSA_print.3 head/secure/lib/libcrypto/man/RSA_private_encrypt.3 head/secure/lib/libcrypto/man/RSA_public_encrypt.3 head/secure/lib/libcrypto/man/RSA_set_method.3 head/secure/lib/libcrypto/man/RSA_sign.3 head/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 head/secure/lib/libcrypto/man/RSA_size.3 head/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 head/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 head/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 head/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 head/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 head/secure/lib/libcrypto/man/X509_NAME_print_ex.3 head/secure/lib/libcrypto/man/X509_new.3 head/secure/lib/libcrypto/man/bio.3 head/secure/lib/libcrypto/man/blowfish.3 head/secure/lib/libcrypto/man/bn.3 head/secure/lib/libcrypto/man/bn_internal.3 head/secure/lib/libcrypto/man/buffer.3 head/secure/lib/libcrypto/man/crypto.3 head/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 head/secure/lib/libcrypto/man/d2i_DHparams.3 head/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 head/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 head/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 head/secure/lib/libcrypto/man/d2i_X509.3 head/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 head/secure/lib/libcrypto/man/d2i_X509_CRL.3 head/secure/lib/libcrypto/man/d2i_X509_NAME.3 head/secure/lib/libcrypto/man/d2i_X509_REQ.3 head/secure/lib/libcrypto/man/d2i_X509_SIG.3 head/secure/lib/libcrypto/man/des.3 head/secure/lib/libcrypto/man/dh.3 head/secure/lib/libcrypto/man/dsa.3 head/secure/lib/libcrypto/man/ecdsa.3 head/secure/lib/libcrypto/man/engine.3 head/secure/lib/libcrypto/man/err.3 head/secure/lib/libcrypto/man/evp.3 head/secure/lib/libcrypto/man/hmac.3 head/secure/lib/libcrypto/man/lh_stats.3 head/secure/lib/libcrypto/man/lhash.3 head/secure/lib/libcrypto/man/md5.3 head/secure/lib/libcrypto/man/mdc2.3 head/secure/lib/libcrypto/man/pem.3 head/secure/lib/libcrypto/man/rand.3 head/secure/lib/libcrypto/man/rc4.3 head/secure/lib/libcrypto/man/ripemd.3 head/secure/lib/libcrypto/man/rsa.3 head/secure/lib/libcrypto/man/sha.3 head/secure/lib/libcrypto/man/threads.3 head/secure/lib/libcrypto/man/ui.3 head/secure/lib/libcrypto/man/ui_compat.3 head/secure/lib/libcrypto/man/x509.3 head/secure/lib/libssl/man/SSL_CIPHER_get_name.3 head/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 head/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 head/secure/lib/libssl/man/SSL_CTX_add_session.3 head/secure/lib/libssl/man/SSL_CTX_ctrl.3 head/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 head/secure/lib/libssl/man/SSL_CTX_free.3 head/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 head/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 head/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 head/secure/lib/libssl/man/SSL_CTX_new.3 head/secure/lib/libssl/man/SSL_CTX_sess_number.3 head/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 head/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 head/secure/lib/libssl/man/SSL_CTX_sessions.3 head/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 head/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 head/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 head/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 head/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 head/secure/lib/libssl/man/SSL_CTX_set_mode.3 head/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_options.3 head/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 head/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 head/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 head/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 head/secure/lib/libssl/man/SSL_CTX_set_timeout.3 head/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_verify.3 head/secure/lib/libssl/man/SSL_CTX_use_certificate.3 head/secure/lib/libssl/man/SSL_SESSION_free.3 head/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 head/secure/lib/libssl/man/SSL_SESSION_get_time.3 head/secure/lib/libssl/man/SSL_accept.3 head/secure/lib/libssl/man/SSL_alert_type_string.3 head/secure/lib/libssl/man/SSL_clear.3 head/secure/lib/libssl/man/SSL_connect.3 head/secure/lib/libssl/man/SSL_do_handshake.3 head/secure/lib/libssl/man/SSL_free.3 head/secure/lib/libssl/man/SSL_get_SSL_CTX.3 head/secure/lib/libssl/man/SSL_get_ciphers.3 head/secure/lib/libssl/man/SSL_get_client_CA_list.3 head/secure/lib/libssl/man/SSL_get_current_cipher.3 head/secure/lib/libssl/man/SSL_get_default_timeout.3 head/secure/lib/libssl/man/SSL_get_error.3 head/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 head/secure/lib/libssl/man/SSL_get_ex_new_index.3 head/secure/lib/libssl/man/SSL_get_fd.3 head/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 head/secure/lib/libssl/man/SSL_get_peer_certificate.3 head/secure/lib/libssl/man/SSL_get_rbio.3 head/secure/lib/libssl/man/SSL_get_session.3 head/secure/lib/libssl/man/SSL_get_verify_result.3 head/secure/lib/libssl/man/SSL_get_version.3 head/secure/lib/libssl/man/SSL_library_init.3 head/secure/lib/libssl/man/SSL_load_client_CA_file.3 head/secure/lib/libssl/man/SSL_new.3 head/secure/lib/libssl/man/SSL_pending.3 head/secure/lib/libssl/man/SSL_read.3 head/secure/lib/libssl/man/SSL_rstate_string.3 head/secure/lib/libssl/man/SSL_session_reused.3 head/secure/lib/libssl/man/SSL_set_bio.3 head/secure/lib/libssl/man/SSL_set_connect_state.3 head/secure/lib/libssl/man/SSL_set_fd.3 head/secure/lib/libssl/man/SSL_set_session.3 head/secure/lib/libssl/man/SSL_set_shutdown.3 head/secure/lib/libssl/man/SSL_set_verify_result.3 head/secure/lib/libssl/man/SSL_shutdown.3 head/secure/lib/libssl/man/SSL_state_string.3 head/secure/lib/libssl/man/SSL_want.3 head/secure/lib/libssl/man/SSL_write.3 head/secure/lib/libssl/man/d2i_SSL_SESSION.3 head/secure/lib/libssl/man/ssl.3 head/secure/usr.bin/openssl/man/CA.pl.1 head/secure/usr.bin/openssl/man/asn1parse.1 head/secure/usr.bin/openssl/man/ca.1 head/secure/usr.bin/openssl/man/ciphers.1 head/secure/usr.bin/openssl/man/crl.1 head/secure/usr.bin/openssl/man/crl2pkcs7.1 head/secure/usr.bin/openssl/man/dgst.1 head/secure/usr.bin/openssl/man/dhparam.1 head/secure/usr.bin/openssl/man/dsa.1 head/secure/usr.bin/openssl/man/dsaparam.1 head/secure/usr.bin/openssl/man/ec.1 head/secure/usr.bin/openssl/man/ecparam.1 head/secure/usr.bin/openssl/man/enc.1 head/secure/usr.bin/openssl/man/errstr.1 head/secure/usr.bin/openssl/man/gendsa.1 head/secure/usr.bin/openssl/man/genrsa.1 head/secure/usr.bin/openssl/man/nseq.1 head/secure/usr.bin/openssl/man/ocsp.1 head/secure/usr.bin/openssl/man/openssl.1 head/secure/usr.bin/openssl/man/passwd.1 head/secure/usr.bin/openssl/man/pkcs12.1 head/secure/usr.bin/openssl/man/pkcs7.1 head/secure/usr.bin/openssl/man/pkcs8.1 head/secure/usr.bin/openssl/man/rand.1 head/secure/usr.bin/openssl/man/req.1 head/secure/usr.bin/openssl/man/rsa.1 head/secure/usr.bin/openssl/man/rsautl.1 head/secure/usr.bin/openssl/man/s_client.1 head/secure/usr.bin/openssl/man/s_server.1 head/secure/usr.bin/openssl/man/s_time.1 head/secure/usr.bin/openssl/man/sess_id.1 head/secure/usr.bin/openssl/man/smime.1 head/secure/usr.bin/openssl/man/speed.1 head/secure/usr.bin/openssl/man/spkac.1 head/secure/usr.bin/openssl/man/verify.1 head/secure/usr.bin/openssl/man/version.1 head/secure/usr.bin/openssl/man/x509.1 head/secure/usr.bin/openssl/man/x509v3_config.1 Modified: head/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_OBJECT_new 3" -.TH ASN1_OBJECT_new 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH ASN1_OBJECT_new 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" ASN1_OBJECT_new, ASN1_OBJECT_free, \- object allocation functions .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/ASN1_STRING_length.3 ============================================================================== --- head/secure/lib/libcrypto/man/ASN1_STRING_length.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/ASN1_STRING_length.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_length 3" -.TH ASN1_STRING_length 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH ASN1_STRING_length 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" ASN1_STRING_dup, ASN1_STRING_cmp, ASN1_STRING_set, ASN1_STRING_length, ASN1_STRING_length_set, ASN1_STRING_type, ASN1_STRING_data \- Modified: head/secure/lib/libcrypto/man/ASN1_STRING_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/ASN1_STRING_new.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/ASN1_STRING_new.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_new 3" -.TH ASN1_STRING_new 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH ASN1_STRING_new 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" ASN1_STRING_new, ASN1_STRING_type_new, ASN1_STRING_free \- ASN1_STRING allocation functions Modified: head/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 ============================================================================== --- head/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_print_ex 3" -.TH ASN1_STRING_print_ex 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH ASN1_STRING_print_ex 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" ASN1_STRING_print_ex, ASN1_STRING_print_ex_fp \- ASN1_STRING output routines. .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/ASN1_generate_nconf.3 ============================================================================== --- head/secure/lib/libcrypto/man/ASN1_generate_nconf.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/ASN1_generate_nconf.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_generate_nconf 3" -.TH ASN1_generate_nconf 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH ASN1_generate_nconf 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" ASN1_generate_nconf, ASN1_generate_v3 \- ASN1 generation functions .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/BIO_ctrl.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_ctrl.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BIO_ctrl.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BIO_ctrl 3" -.TH BIO_ctrl 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BIO_ctrl 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BIO_ctrl, BIO_callback_ctrl, BIO_ptr_ctrl, BIO_int_ctrl, BIO_reset, BIO_seek, BIO_tell, BIO_flush, BIO_eof, BIO_set_close, BIO_get_close, Modified: head/secure/lib/libcrypto/man/BIO_f_base64.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_f_base64.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BIO_f_base64.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_base64 3" -.TH BIO_f_base64 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BIO_f_base64 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BIO_f_base64 \- base64 BIO filter .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/BIO_f_buffer.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_f_buffer.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BIO_f_buffer.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_buffer 3" -.TH BIO_f_buffer 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BIO_f_buffer 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BIO_f_buffer \- buffering BIO .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/BIO_f_cipher.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_f_cipher.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BIO_f_cipher.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_cipher 3" -.TH BIO_f_cipher 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BIO_f_cipher 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BIO_f_cipher, BIO_set_cipher, BIO_get_cipher_status, BIO_get_cipher_ctx \- cipher BIO filter .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/BIO_f_md.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_f_md.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BIO_f_md.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_md 3" -.TH BIO_f_md 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BIO_f_md 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BIO_f_md, BIO_set_md, BIO_get_md, BIO_get_md_ctx \- message digest BIO filter .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/BIO_f_null.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_f_null.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BIO_f_null.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_null 3" -.TH BIO_f_null 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BIO_f_null 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BIO_f_null \- null filter .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/BIO_f_ssl.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_f_ssl.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BIO_f_ssl.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_ssl 3" -.TH BIO_f_ssl 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BIO_f_ssl 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BIO_f_ssl, BIO_set_ssl, BIO_get_ssl, BIO_set_ssl_mode, BIO_set_ssl_renegotiate_bytes, BIO_get_num_renegotiates, BIO_set_ssl_renegotiate_timeout, BIO_new_ssl, Modified: head/secure/lib/libcrypto/man/BIO_find_type.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_find_type.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BIO_find_type.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BIO_find_type 3" -.TH BIO_find_type 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BIO_find_type 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BIO_find_type, BIO_next \- BIO chain traversal .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/BIO_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_new.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BIO_new.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BIO_new 3" -.TH BIO_new 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BIO_new 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BIO_new, BIO_set, BIO_free, BIO_vfree, BIO_free_all \- BIO allocation and freeing functions .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/BIO_push.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_push.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BIO_push.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BIO_push 3" -.TH BIO_push 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BIO_push 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BIO_push, BIO_pop \- add and remove BIOs from a chain. .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/BIO_read.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_read.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BIO_read.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BIO_read 3" -.TH BIO_read 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BIO_read 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BIO_read, BIO_write, BIO_gets, BIO_puts \- BIO I/O functions .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/BIO_s_accept.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_accept.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BIO_s_accept.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_accept 3" -.TH BIO_s_accept 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BIO_s_accept 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BIO_s_accept, BIO_set_accept_port, BIO_get_accept_port, BIO_set_nbio_accept, BIO_set_accept_bios, BIO_set_bind_mode, Modified: head/secure/lib/libcrypto/man/BIO_s_bio.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_bio.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BIO_s_bio.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_bio 3" -.TH BIO_s_bio 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BIO_s_bio 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BIO_s_bio, BIO_make_bio_pair, BIO_destroy_bio_pair, BIO_shutdown_wr, BIO_set_write_buf_size, BIO_get_write_buf_size, BIO_new_bio_pair, Modified: head/secure/lib/libcrypto/man/BIO_s_connect.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_connect.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BIO_s_connect.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_connect 3" -.TH BIO_s_connect 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BIO_s_connect 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BIO_s_connect, BIO_set_conn_hostname, BIO_set_conn_port, BIO_set_conn_ip, BIO_set_conn_int_port, BIO_get_conn_hostname, Modified: head/secure/lib/libcrypto/man/BIO_s_fd.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_fd.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BIO_s_fd.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_fd 3" -.TH BIO_s_fd 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BIO_s_fd 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BIO_s_fd, BIO_set_fd, BIO_get_fd, BIO_new_fd \- file descriptor BIO .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/BIO_s_file.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_file.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BIO_s_file.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_file 3" -.TH BIO_s_file 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BIO_s_file 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BIO_s_file, BIO_new_file, BIO_new_fp, BIO_set_fp, BIO_get_fp, BIO_read_filename, BIO_write_filename, BIO_append_filename, Modified: head/secure/lib/libcrypto/man/BIO_s_mem.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_mem.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BIO_s_mem.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_mem 3" -.TH BIO_s_mem 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BIO_s_mem 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BIO_s_mem, BIO_set_mem_eof_return, BIO_get_mem_data, BIO_set_mem_buf, BIO_get_mem_ptr, BIO_new_mem_buf \- memory BIO Modified: head/secure/lib/libcrypto/man/BIO_s_null.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_null.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BIO_s_null.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_null 3" -.TH BIO_s_null 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BIO_s_null 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BIO_s_null \- null data sink .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/BIO_s_socket.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_socket.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BIO_s_socket.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_socket 3" -.TH BIO_s_socket 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BIO_s_socket 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BIO_s_socket, BIO_new_socket \- socket BIO .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/BIO_set_callback.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_set_callback.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BIO_set_callback.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BIO_set_callback 3" -.TH BIO_set_callback 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BIO_set_callback 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BIO_set_callback, BIO_get_callback, BIO_set_callback_arg, BIO_get_callback_arg, BIO_debug_callback \- BIO callback functions Modified: head/secure/lib/libcrypto/man/BIO_should_retry.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_should_retry.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BIO_should_retry.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BIO_should_retry 3" -.TH BIO_should_retry 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BIO_should_retry 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BIO_should_retry, BIO_should_read, BIO_should_write, BIO_should_io_special, BIO_retry_type, BIO_should_retry, Modified: head/secure/lib/libcrypto/man/BN_BLINDING_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_BLINDING_new.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BN_BLINDING_new.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BN_BLINDING_new 3" -.TH BN_BLINDING_new 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BN_BLINDING_new 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BN_BLINDING_new, BN_BLINDING_free, BN_BLINDING_update, BN_BLINDING_convert, BN_BLINDING_invert, BN_BLINDING_convert_ex, BN_BLINDING_invert_ex, Modified: head/secure/lib/libcrypto/man/BN_CTX_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_CTX_new.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BN_CTX_new.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BN_CTX_new 3" -.TH BN_CTX_new 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BN_CTX_new 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BN_CTX_new, BN_CTX_init, BN_CTX_free \- allocate and free BN_CTX structures .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/BN_CTX_start.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_CTX_start.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BN_CTX_start.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BN_CTX_start 3" -.TH BN_CTX_start 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BN_CTX_start 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BN_CTX_start, BN_CTX_get, BN_CTX_end \- use temporary BIGNUM variables .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/BN_add.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_add.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BN_add.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BN_add 3" -.TH BN_add 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BN_add 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BN_add, BN_sub, BN_mul, BN_sqr, BN_div, BN_mod, BN_nnmod, BN_mod_add, BN_mod_sub, BN_mod_mul, BN_mod_sqr, BN_exp, BN_mod_exp, BN_gcd \- Modified: head/secure/lib/libcrypto/man/BN_add_word.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_add_word.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BN_add_word.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BN_add_word 3" -.TH BN_add_word 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BN_add_word 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BN_add_word, BN_sub_word, BN_mul_word, BN_div_word, BN_mod_word \- arithmetic functions on BIGNUMs with integers Modified: head/secure/lib/libcrypto/man/BN_bn2bin.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_bn2bin.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BN_bn2bin.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BN_bn2bin 3" -.TH BN_bn2bin 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BN_bn2bin 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BN_bn2bin, BN_bin2bn, BN_bn2hex, BN_bn2dec, BN_hex2bn, BN_dec2bn, BN_print, BN_print_fp, BN_bn2mpi, BN_mpi2bn \- format conversions Modified: head/secure/lib/libcrypto/man/BN_cmp.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_cmp.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BN_cmp.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BN_cmp 3" -.TH BN_cmp 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BN_cmp 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BN_cmp, BN_ucmp, BN_is_zero, BN_is_one, BN_is_word, BN_is_odd \- BIGNUM comparison and test functions .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/BN_copy.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_copy.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BN_copy.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BN_copy 3" -.TH BN_copy 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BN_copy 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BN_copy, BN_dup \- copy BIGNUMs .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/BN_generate_prime.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_generate_prime.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BN_generate_prime.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BN_generate_prime 3" -.TH BN_generate_prime 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BN_generate_prime 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BN_generate_prime, BN_is_prime, BN_is_prime_fasttest \- generate primes and test for primality .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/BN_mod_inverse.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_mod_inverse.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BN_mod_inverse.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BN_mod_inverse 3" -.TH BN_mod_inverse 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BN_mod_inverse 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BN_mod_inverse \- compute inverse modulo n .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BN_mod_mul_montgomery 3" -.TH BN_mod_mul_montgomery 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BN_mod_mul_montgomery 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BN_mod_mul_montgomery, BN_MONT_CTX_new, BN_MONT_CTX_init, BN_MONT_CTX_free, BN_MONT_CTX_set, BN_MONT_CTX_copy, Modified: head/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BN_mod_mul_reciprocal 3" -.TH BN_mod_mul_reciprocal 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BN_mod_mul_reciprocal 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BN_mod_mul_reciprocal, BN_div_recp, BN_RECP_CTX_new, BN_RECP_CTX_init, BN_RECP_CTX_free, BN_RECP_CTX_set \- modular multiplication using Modified: head/secure/lib/libcrypto/man/BN_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_new.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BN_new.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BN_new 3" -.TH BN_new 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BN_new 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BN_new, BN_init, BN_clear, BN_free, BN_clear_free \- allocate and free BIGNUMs .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/BN_num_bytes.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_num_bytes.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BN_num_bytes.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BN_num_bytes 3" -.TH BN_num_bytes 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BN_num_bytes 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BN_num_bits, BN_num_bytes, BN_num_bits_word \- get BIGNUM size .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/BN_rand.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_rand.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BN_rand.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BN_rand 3" -.TH BN_rand 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BN_rand 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BN_rand, BN_pseudo_rand \- generate pseudo\-random number .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/BN_set_bit.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_set_bit.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BN_set_bit.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BN_set_bit 3" -.TH BN_set_bit 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BN_set_bit 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BN_set_bit, BN_clear_bit, BN_is_bit_set, BN_mask_bits, BN_lshift, BN_lshift1, BN_rshift, BN_rshift1 \- bit operations on BIGNUMs Modified: head/secure/lib/libcrypto/man/BN_swap.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_swap.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BN_swap.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BN_swap 3" -.TH BN_swap 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BN_swap 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BN_swap \- exchange BIGNUMs .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/BN_zero.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_zero.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/BN_zero.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BN_zero 3" -.TH BN_zero 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH BN_zero 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" BN_zero, BN_one, BN_value_one, BN_set_word, BN_get_word \- BIGNUM assignment operations Modified: head/secure/lib/libcrypto/man/CONF_modules_free.3 ============================================================================== --- head/secure/lib/libcrypto/man/CONF_modules_free.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/CONF_modules_free.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "CONF_modules_free 3" -.TH CONF_modules_free 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH CONF_modules_free 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" .Vb 2 \& CONF_modules_free, CONF_modules_finish, CONF_modules_unload - Modified: head/secure/lib/libcrypto/man/CONF_modules_load_file.3 ============================================================================== --- head/secure/lib/libcrypto/man/CONF_modules_load_file.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/CONF_modules_load_file.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "CONF_modules_load_file 3" -.TH CONF_modules_load_file 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH CONF_modules_load_file 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" .Vb 1 \& CONF_modules_load_file, CONF_modules_load - OpenSSL configuration functions Modified: head/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 ============================================================================== --- head/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "CRYPTO_set_ex_data 3" -.TH CRYPTO_set_ex_data 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH CRYPTO_set_ex_data 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" CRYPTO_set_ex_data, CRYPTO_get_ex_data \- internal application specific data functions .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/DH_generate_key.3 ============================================================================== --- head/secure/lib/libcrypto/man/DH_generate_key.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/DH_generate_key.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "DH_generate_key 3" -.TH DH_generate_key 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH DH_generate_key 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" DH_generate_key, DH_compute_key \- perform Diffie\-Hellman key exchange .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/DH_generate_parameters.3 ============================================================================== --- head/secure/lib/libcrypto/man/DH_generate_parameters.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/DH_generate_parameters.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "DH_generate_parameters 3" -.TH DH_generate_parameters 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH DH_generate_parameters 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" DH_generate_parameters, DH_check \- generate and check Diffie\-Hellman parameters .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/DH_get_ex_new_index.3 ============================================================================== --- head/secure/lib/libcrypto/man/DH_get_ex_new_index.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/DH_get_ex_new_index.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "DH_get_ex_new_index 3" -.TH DH_get_ex_new_index 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH DH_get_ex_new_index 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" DH_get_ex_new_index, DH_set_ex_data, DH_get_ex_data \- add application specific data to DH structures .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/DH_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/DH_new.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/DH_new.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "DH_new 3" -.TH DH_new 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH DH_new 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" DH_new, DH_free \- allocate and free DH objects .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/DH_set_method.3 ============================================================================== --- head/secure/lib/libcrypto/man/DH_set_method.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/DH_set_method.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "DH_set_method 3" -.TH DH_set_method 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH DH_set_method 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" DH_set_default_method, DH_get_default_method, DH_set_method, DH_new_method, DH_OpenSSL \- select DH method Modified: head/secure/lib/libcrypto/man/DH_size.3 ============================================================================== --- head/secure/lib/libcrypto/man/DH_size.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/DH_size.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "DH_size 3" -.TH DH_size 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH DH_size 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" DH_size \- get Diffie\-Hellman prime size .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/DSA_SIG_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_SIG_new.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/DSA_SIG_new.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "DSA_SIG_new 3" -.TH DSA_SIG_new 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH DSA_SIG_new 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" DSA_SIG_new, DSA_SIG_free \- allocate and free DSA signature objects .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/DSA_do_sign.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_do_sign.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/DSA_do_sign.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "DSA_do_sign 3" -.TH DSA_do_sign 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH DSA_do_sign 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" DSA_do_sign, DSA_do_verify \- raw DSA signature operations .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/DSA_dup_DH.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_dup_DH.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/DSA_dup_DH.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "DSA_dup_DH 3" -.TH DSA_dup_DH 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH DSA_dup_DH 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" DSA_dup_DH \- create a DH structure out of DSA structure .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/DSA_generate_key.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_generate_key.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/DSA_generate_key.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "DSA_generate_key 3" -.TH DSA_generate_key 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH DSA_generate_key 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" DSA_generate_key \- generate DSA key pair .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/DSA_generate_parameters.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_generate_parameters.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/DSA_generate_parameters.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "DSA_generate_parameters 3" -.TH DSA_generate_parameters 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH DSA_generate_parameters 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" DSA_generate_parameters \- generate DSA parameters .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "DSA_get_ex_new_index 3" -.TH DSA_get_ex_new_index 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH DSA_get_ex_new_index 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" DSA_get_ex_new_index, DSA_set_ex_data, DSA_get_ex_data \- add application specific data to DSA structures .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/DSA_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_new.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/DSA_new.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "DSA_new 3" -.TH DSA_new 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH DSA_new 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" DSA_new, DSA_free \- allocate and free DSA objects .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/DSA_set_method.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_set_method.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/DSA_set_method.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "DSA_set_method 3" -.TH DSA_set_method 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH DSA_set_method 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" DSA_set_default_method, DSA_get_default_method, DSA_set_method, DSA_new_method, DSA_OpenSSL \- select DSA method Modified: head/secure/lib/libcrypto/man/DSA_sign.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_sign.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/DSA_sign.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "DSA_sign 3" -.TH DSA_sign 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH DSA_sign 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" DSA_sign, DSA_sign_setup, DSA_verify \- DSA signatures .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/DSA_size.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_size.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/DSA_size.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "DSA_size 3" -.TH DSA_size 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH DSA_size 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" DSA_size \- get DSA signature size .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/ERR_GET_LIB.3 ============================================================================== --- head/secure/lib/libcrypto/man/ERR_GET_LIB.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/ERR_GET_LIB.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "ERR_GET_LIB 3" -.TH ERR_GET_LIB 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH ERR_GET_LIB 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" ERR_GET_LIB, ERR_GET_FUNC, ERR_GET_REASON \- get library, function and reason code Modified: head/secure/lib/libcrypto/man/ERR_clear_error.3 ============================================================================== --- head/secure/lib/libcrypto/man/ERR_clear_error.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/ERR_clear_error.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "ERR_clear_error 3" -.TH ERR_clear_error 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH ERR_clear_error 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" ERR_clear_error \- clear the error queue .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/ERR_error_string.3 ============================================================================== --- head/secure/lib/libcrypto/man/ERR_error_string.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/ERR_error_string.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "ERR_error_string 3" -.TH ERR_error_string 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH ERR_error_string 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" ERR_error_string, ERR_error_string_n, ERR_lib_error_string, ERR_func_error_string, ERR_reason_error_string \- obtain human\-readable Modified: head/secure/lib/libcrypto/man/ERR_get_error.3 ============================================================================== --- head/secure/lib/libcrypto/man/ERR_get_error.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/ERR_get_error.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "ERR_get_error 3" -.TH ERR_get_error 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH ERR_get_error 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" ERR_get_error, ERR_peek_error, ERR_peek_last_error, ERR_get_error_line, ERR_peek_error_line, ERR_peek_last_error_line, Modified: head/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 ============================================================================== --- head/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "ERR_load_crypto_strings 3" -.TH ERR_load_crypto_strings 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH ERR_load_crypto_strings 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" ERR_load_crypto_strings, SSL_load_error_strings, ERR_free_strings \- load and free error strings Modified: head/secure/lib/libcrypto/man/ERR_load_strings.3 ============================================================================== --- head/secure/lib/libcrypto/man/ERR_load_strings.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/ERR_load_strings.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "ERR_load_strings 3" -.TH ERR_load_strings 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH ERR_load_strings 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" ERR_load_strings, ERR_PACK, ERR_get_next_error_library \- load arbitrary error strings Modified: head/secure/lib/libcrypto/man/ERR_print_errors.3 ============================================================================== --- head/secure/lib/libcrypto/man/ERR_print_errors.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/ERR_print_errors.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "ERR_print_errors 3" -.TH ERR_print_errors 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH ERR_print_errors 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" ERR_print_errors, ERR_print_errors_fp \- print error messages .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/ERR_put_error.3 ============================================================================== --- head/secure/lib/libcrypto/man/ERR_put_error.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/ERR_put_error.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "ERR_put_error 3" -.TH ERR_put_error 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH ERR_put_error 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" ERR_put_error, ERR_add_error_data \- record an error .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/ERR_remove_state.3 ============================================================================== --- head/secure/lib/libcrypto/man/ERR_remove_state.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/ERR_remove_state.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "ERR_remove_state 3" -.TH ERR_remove_state 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH ERR_remove_state 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" ERR_remove_state \- free a thread's error queue .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/ERR_set_mark.3 ============================================================================== --- head/secure/lib/libcrypto/man/ERR_set_mark.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/ERR_set_mark.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "ERR_set_mark 3" -.TH ERR_set_mark 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH ERR_set_mark 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" ERR_set_mark, ERR_pop_to_mark \- set marks and pop errors until mark .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/EVP_BytesToKey.3 ============================================================================== --- head/secure/lib/libcrypto/man/EVP_BytesToKey.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/EVP_BytesToKey.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "EVP_BytesToKey 3" -.TH EVP_BytesToKey 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH EVP_BytesToKey 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" EVP_BytesToKey \- password based encryption routine .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/EVP_DigestInit.3 ============================================================================== --- head/secure/lib/libcrypto/man/EVP_DigestInit.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/EVP_DigestInit.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "EVP_DigestInit 3" -.TH EVP_DigestInit 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH EVP_DigestInit 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" EVP_MD_CTX_init, EVP_MD_CTX_create, EVP_DigestInit_ex, EVP_DigestUpdate, EVP_DigestFinal_ex, EVP_MD_CTX_cleanup, EVP_MD_CTX_destroy, EVP_MAX_MD_SIZE, Modified: head/secure/lib/libcrypto/man/EVP_EncryptInit.3 ============================================================================== --- head/secure/lib/libcrypto/man/EVP_EncryptInit.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/EVP_EncryptInit.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "EVP_EncryptInit 3" -.TH EVP_EncryptInit 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH EVP_EncryptInit 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" EVP_CIPHER_CTX_init, EVP_EncryptInit_ex, EVP_EncryptUpdate, EVP_EncryptFinal_ex, EVP_DecryptInit_ex, EVP_DecryptUpdate, Modified: head/secure/lib/libcrypto/man/EVP_OpenInit.3 ============================================================================== --- head/secure/lib/libcrypto/man/EVP_OpenInit.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/EVP_OpenInit.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "EVP_OpenInit 3" -.TH EVP_OpenInit 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH EVP_OpenInit 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" EVP_OpenInit, EVP_OpenUpdate, EVP_OpenFinal \- EVP envelope decryption .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/EVP_PKEY_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/EVP_PKEY_new.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/EVP_PKEY_new.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "EVP_PKEY_new 3" -.TH EVP_PKEY_new 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH EVP_PKEY_new 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" EVP_PKEY_new, EVP_PKEY_free \- private key allocation functions. .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 ============================================================================== --- head/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "EVP_PKEY_set1_RSA 3" -.TH EVP_PKEY_set1_RSA 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH EVP_PKEY_set1_RSA 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" EVP_PKEY_set1_RSA, EVP_PKEY_set1_DSA, EVP_PKEY_set1_DH, EVP_PKEY_set1_EC_KEY, EVP_PKEY_get1_RSA, EVP_PKEY_get1_DSA, EVP_PKEY_get1_DH, EVP_PKEY_get1_EC_KEY, Modified: head/secure/lib/libcrypto/man/EVP_SealInit.3 ============================================================================== --- head/secure/lib/libcrypto/man/EVP_SealInit.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/EVP_SealInit.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "EVP_SealInit 3" -.TH EVP_SealInit 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH EVP_SealInit 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" EVP_SealInit, EVP_SealUpdate, EVP_SealFinal \- EVP envelope encryption .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/EVP_SignInit.3 ============================================================================== --- head/secure/lib/libcrypto/man/EVP_SignInit.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/EVP_SignInit.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "EVP_SignInit 3" -.TH EVP_SignInit 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH EVP_SignInit 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" EVP_SignInit, EVP_SignUpdate, EVP_SignFinal \- EVP signing functions .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/EVP_VerifyInit.3 ============================================================================== --- head/secure/lib/libcrypto/man/EVP_VerifyInit.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/EVP_VerifyInit.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "EVP_VerifyInit 3" -.TH EVP_VerifyInit 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH EVP_VerifyInit 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" EVP_VerifyInit, EVP_VerifyUpdate, EVP_VerifyFinal \- EVP signature verification functions .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/OBJ_nid2obj.3 ============================================================================== --- head/secure/lib/libcrypto/man/OBJ_nid2obj.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/OBJ_nid2obj.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "OBJ_nid2obj 3" -.TH OBJ_nid2obj 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH OBJ_nid2obj 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" OBJ_nid2obj, OBJ_nid2ln, OBJ_nid2sn, OBJ_obj2nid, OBJ_txt2nid, OBJ_ln2nid, OBJ_sn2nid, OBJ_cmp, OBJ_dup, OBJ_txt2obj, OBJ_obj2txt, OBJ_create, OBJ_cleanup \- ASN1 object utility Modified: head/secure/lib/libcrypto/man/OPENSSL_Applink.3 ============================================================================== --- head/secure/lib/libcrypto/man/OPENSSL_Applink.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/OPENSSL_Applink.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "OPENSSL_Applink 3" -.TH OPENSSL_Applink 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH OPENSSL_Applink 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" OPENSSL_Applink \- glue between OpenSSL BIO and Win32 compiler run\-time .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 ============================================================================== --- head/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "OPENSSL_VERSION_NUMBER 3" -.TH OPENSSL_VERSION_NUMBER 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH OPENSSL_VERSION_NUMBER 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" OPENSSL_VERSION_NUMBER, SSLeay, SSLeay_version \- get OpenSSL version number .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/OPENSSL_config.3 ============================================================================== --- head/secure/lib/libcrypto/man/OPENSSL_config.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/OPENSSL_config.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "OPENSSL_config 3" -.TH OPENSSL_config 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH OPENSSL_config 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" OPENSSL_config, OPENSSL_no_config \- simple OpenSSL configuration functions .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 ============================================================================== --- head/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "OPENSSL_ia32cap 3" -.TH OPENSSL_ia32cap 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH OPENSSL_ia32cap 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" OPENSSL_ia32cap \- finding the IA\-32 processor capabilities .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 ============================================================================== --- head/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "OPENSSL_load_builtin_modules 3" -.TH OPENSSL_load_builtin_modules 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH OPENSSL_load_builtin_modules 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" OPENSSL_load_builtin_modules \- add standard configuration modules .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 ============================================================================== --- head/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "OpenSSL_add_all_algorithms 3" -.TH OpenSSL_add_all_algorithms 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH OpenSSL_add_all_algorithms 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" OpenSSL_add_all_algorithms, OpenSSL_add_all_ciphers, OpenSSL_add_all_digests \- add algorithms to internal table Modified: head/secure/lib/libcrypto/man/PKCS12_create.3 ============================================================================== --- head/secure/lib/libcrypto/man/PKCS12_create.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/PKCS12_create.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "PKCS12_create 3" -.TH PKCS12_create 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH PKCS12_create 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" PKCS12_create \- create a PKCS#12 structure .SH "SYNOPSIS" Modified: head/secure/lib/libcrypto/man/PKCS12_parse.3 ============================================================================== --- head/secure/lib/libcrypto/man/PKCS12_parse.3 Thu Apr 1 15:35:29 2010 (r206047) +++ head/secure/lib/libcrypto/man/PKCS12_parse.3 Thu Apr 1 15:37:38 2010 (r206048) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "PKCS12_parse 3" -.TH PKCS12_parse 3 "2010-03-13" "0.9.8m" "OpenSSL" +.TH PKCS12_parse 3 "2010-03-24" "0.9.8n" "OpenSSL" .SH "NAME" PKCS12_parse \- parse a PKCS#12 structure *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Apr 1 15:45:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 032EA1065670; Thu, 1 Apr 2010 15:45:26 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-bw0-f216.google.com (mail-bw0-f216.google.com [209.85.218.216]) by mx1.freebsd.org (Postfix) with ESMTP id 032EE8FC19; Thu, 1 Apr 2010 15:45:24 +0000 (UTC) Received: by bwz8 with SMTP id 8so994602bwz.3 for ; Thu, 01 Apr 2010 08:45:23 -0700 (PDT) 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:received:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=Y+o66SHFE8oZPZZ24GjV9RBaO43UDWBrQBn4ryh9aEo=; b=sUxkirbSp67UH2UDzUi+XBzbIfSSq6Et4BbaPaSd9LRruvqmEHbg04tPW7+ypa9ZXT bQ6r4aSwJ5SzaFtc4JHhcK1aynTdVrnjhggPxv+ByB1NC1gd4C3dPBnaG5PxMsRRplAA UIZmgXWHD1jFDYDNlI3kDieexVlBzK0H7F+qg= 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=Ndx0YnHZKqpfFT8RPezmR3cEG2190epom1J+TA2hblvDBt+EjLv7x2z8NN1S+HYPoX chLY+leMAF86jglh3tf1AE0uP8/kjECeCe+HEDyjdDowdBrBkMaMLMO3WTi36FEOdkO4 BaaJSKt3hMWMnmMyEepajozvnXHxtwCcDm790= MIME-Version: 1.0 Received: by 10.204.47.232 with HTTP; Thu, 1 Apr 2010 08:45:22 -0700 (PDT) In-Reply-To: <201004011427.o31ERTaT056824@svn.freebsd.org> References: <201004011427.o31ERTaT056824@svn.freebsd.org> Date: Thu, 1 Apr 2010 19:45:22 +0400 Received: by 10.204.3.216 with SMTP id 24mr1661270bko.30.1270136722875; Thu, 01 Apr 2010 08:45:22 -0700 (PDT) Message-ID: From: pluknet To: Florent Thoumie 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: r206043 - in head/usr.sbin/pkg_install: add delete lib version X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 01 Apr 2010 15:45:26 -0000 On 1 April 2010 18:27, Florent Thoumie wrote: > Author: flz > Date: Thu Apr =A01 14:27:29 2010 > New Revision: 206043 > URL: http://svn.freebsd.org/changeset/base/206043 > > Log: > =A0Various fixes. > > =A0- Replace hardcoded INDEX version. [1] > =A0- Fix a buffer overlap. [2] > =A0- Remove empty package when fetching fails and -K is used. [3] > =A0- Remove useless chmod2() after mkdtemp(3). [4] > =A0- Replace mkdir(1) call with mkdir(2). [5] > =A0- Get rid of some vsystem() calls. > =A0- Switch from lstat(2) to open(2) in fexists(). ^^ This closes bin/136419, too. > =A0- Try rename(2) in move_file() first. > =A0- Bump PKG_INSTALL_VERSION to 20100401. > > =A0PR: =A0 =A0 =A0 =A0 =A0 bin/145101 [1], bin/139492 [2], bin/144919 [3] > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0bin/144920 [4], bin/144921 [5] > =A0Submitted by: gcooper [1,2,3,4,5] --=20 wbr, pluknet From owner-svn-src-all@FreeBSD.ORG Thu Apr 1 16:18:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D58361065672; Thu, 1 Apr 2010 16:18:16 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C4B6D8FC20; Thu, 1 Apr 2010 16:18: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 o31GIGRa081569; Thu, 1 Apr 2010 16:18:16 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o31GIGIl081567; Thu, 1 Apr 2010 16:18:16 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201004011618.o31GIGIl081567@svn.freebsd.org> From: Alexander Motin Date: Thu, 1 Apr 2010 16:18: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: r206049 - head/sys/netgraph X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2010 16:18:16 -0000 Author: mav Date: Thu Apr 1 16:18:16 2010 New Revision: 206049 URL: http://svn.freebsd.org/changeset/base/206049 Log: Remove alignment constraints. Modified: head/sys/netgraph/ng_deflate.c Modified: head/sys/netgraph/ng_deflate.c ============================================================================== --- head/sys/netgraph/ng_deflate.c Thu Apr 1 15:37:38 2010 (r206048) +++ head/sys/netgraph/ng_deflate.c Thu Apr 1 16:18:16 2010 (r206049) @@ -36,6 +36,7 @@ #include #include #include +#include #include #include @@ -505,8 +506,8 @@ ng_deflate_compress(node_p node, struct priv->stats.OutOctets+=inlen; } else { /* Install header. */ - ((u_int16_t *)priv->outbuf)[0] = htons(PROT_COMPD); - ((u_int16_t *)priv->outbuf)[1] = htons(priv->seqnum); + be16enc(priv->outbuf, PROT_COMPD); + be16enc(priv->outbuf + 2, priv->seqnum); /* Return packet in an mbuf. */ m_copyback(m, 0, outlen, (caddr_t)priv->outbuf); @@ -568,7 +569,7 @@ ng_deflate_decompress(node_p node, struc proto = priv->inbuf[0]; offset = 1; } else { - proto = ntohs(((uint16_t *)priv->inbuf)[0]); + proto = be16dec(priv->inbuf); offset = 2; } @@ -579,7 +580,7 @@ ng_deflate_decompress(node_p node, struc priv->stats.FramesComp++; /* Check sequence number. */ - rseqnum = ntohs(((uint16_t *)(priv->inbuf + offset))[0]); + rseqnum = be16dec(priv->inbuf + offset); offset += 2; if (rseqnum != priv->seqnum) { priv->stats.Errors++; From owner-svn-src-all@FreeBSD.ORG Thu Apr 1 16:20:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BDCB3106566C; Thu, 1 Apr 2010 16:20:36 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 927738FC1E; Thu, 1 Apr 2010 16:20: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 o31GKa9G082102; Thu, 1 Apr 2010 16:20:36 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o31GKa8L082100; Thu, 1 Apr 2010 16:20:36 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201004011620.o31GKa8L082100@svn.freebsd.org> From: Alexander Motin Date: Thu, 1 Apr 2010 16:20:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206050 - head/sys/netgraph X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2010 16:20:36 -0000 Author: mav Date: Thu Apr 1 16:20:36 2010 New Revision: 206050 URL: http://svn.freebsd.org/changeset/base/206050 Log: Remove alignment constraints. Modified: head/sys/netgraph/ng_pptpgre.c Modified: head/sys/netgraph/ng_pptpgre.c ============================================================================== --- head/sys/netgraph/ng_pptpgre.c Thu Apr 1 16:18:16 2010 (r206049) +++ head/sys/netgraph/ng_pptpgre.c Thu Apr 1 16:20:36 2010 (r206050) @@ -62,6 +62,7 @@ #include #include #include +#include #include #include @@ -572,9 +573,9 @@ ng_pptpgre_xmit(hpriv_p hpriv, item_p it } /* Build GRE header */ - ((u_int32_t *)gre)[0] = htonl(PPTP_INIT_VALUE); - gre->length = (m != NULL) ? htons((u_short)m->m_pkthdr.len) : 0; - gre->cid = htons(hpriv->conf.peerCid); + be32enc(gre, PPTP_INIT_VALUE); + be16enc(&gre->length, (m != NULL) ? m->m_pkthdr.len : 0); + be16enc(&gre->cid, hpriv->conf.peerCid); /* Include sequence number if packet contains any data */ if (m != NULL) { @@ -584,13 +585,13 @@ ng_pptpgre_xmit(hpriv_p hpriv, item_p it = ng_pptpgre_time(); } hpriv->xmitSeq++; - gre->data[0] = htonl(hpriv->xmitSeq); + be32enc(&gre->data[0], hpriv->xmitSeq); } /* Include acknowledgement (and stop send ack timer) if needed */ if (hpriv->conf.enableAlwaysAck || hpriv->xmitAck != hpriv->recvSeq) { gre->hasAck = 1; - gre->data[gre->hasSeq] = htonl(hpriv->recvSeq); + be32enc(&gre->data[gre->hasSeq], hpriv->recvSeq); hpriv->xmitAck = hpriv->recvSeq; if (hpriv->conf.enableDelayedAck) ng_uncallout(&hpriv->sackTimer, hpriv->node); @@ -705,18 +706,17 @@ ng_pptpgre_rcvdata_lower(hook_p hook, it /* Sanity check packet length and GRE header bits */ extralen = m->m_pkthdr.len - - (iphlen + grelen + gre->hasSeq * (u_int16_t)ntohs(gre->length)); + - (iphlen + grelen + gre->hasSeq * be16dec(&gre->length)); if (extralen < 0) { priv->stats.recvBadGRE++; ERROUT(EINVAL); } - if ((ntohl(*((const u_int32_t *)gre)) & PPTP_INIT_MASK) - != PPTP_INIT_VALUE) { + if ((be32dec(gre) & PPTP_INIT_MASK) != PPTP_INIT_VALUE) { priv->stats.recvBadGRE++; ERROUT(EINVAL); } - hpriv = ng_pptpgre_find_session(priv, ntohs(gre->cid)); + hpriv = ng_pptpgre_find_session(priv, be16dec(&gre->cid)); if (hpriv == NULL || hpriv->hook == NULL || !hpriv->conf.enabled) { priv->stats.recvBadCID++; ERROUT(EINVAL); @@ -725,7 +725,7 @@ ng_pptpgre_rcvdata_lower(hook_p hook, it /* Look for peer ack */ if (gre->hasAck) { - const u_int32_t ack = ntohl(gre->data[gre->hasSeq]); + const u_int32_t ack = be32dec(&gre->data[gre->hasSeq]); const int index = ack - hpriv->recvAck - 1; long sample; long diff; @@ -776,7 +776,7 @@ badAck: /* See if frame contains any data */ if (gre->hasSeq) { - const u_int32_t seq = ntohl(gre->data[0]); + const u_int32_t seq = be32dec(&gre->data[0]); /* Sanity check sequence number */ if (PPTP_SEQ_DIFF(seq, hpriv->recvSeq) <= 0) { From owner-svn-src-all@FreeBSD.ORG Thu Apr 1 16:21:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 635EE106568A; Thu, 1 Apr 2010 16:21:36 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 387BE8FC23; Thu, 1 Apr 2010 16:21: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 o31GLalO082376; Thu, 1 Apr 2010 16:21:36 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o31GLaF8082374; Thu, 1 Apr 2010 16:21:36 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201004011621.o31GLaF8082374@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 1 Apr 2010 16:21:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206051 - 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: Thu, 01 Apr 2010 16:21:36 -0000 Author: pjd Date: Thu Apr 1 16:21:35 2010 New Revision: 206051 URL: http://svn.freebsd.org/changeset/base/206051 Log: IOCPARM_MAX defines maximum size of a structure that can be passed directly to ioctl(2). Because of how ioctl command is build using _IO*() macros we have only 13 bits to encode structure size. So the structure can be up to 8kB-1. Currently we define IOCPARM_MAX as PAGE_SIZE. This is IMHO wrong for three main reasons: 1. It is confusing on archs with page size larger than 8kB (not really sure if we support such archs (sparc64?)), as even if PAGE_SIZE is bigger than 8kB, we won't be able to encode anything larger in ioctl command. 2. It is a waste. Why the structure can be only 4kB on most archs if we have 13 bits dedicated for that, not 12? 3. It shouldn't depend on architecture and page size. My ioctl command can work on one arch, but can't on the other? Increase IOCPARM_MAX to 8kB and make it independed of PAGE_SIZE and architecture it is compiled for. This allows to use all the bits on all the archs for size. Note that this doesn't mean we will copy more on every ioctl(2) call. No. We still copyin(9)/copyout(9) only exact number of bytes encoded in ioctl command. Practical use for this change is ZFS. zfs_cmd_t structure used for ZFS ioctls is larger than 4kB. Silence on: arch@ MFC after: 1 month Modified: head/sys/sys/ioccom.h Modified: head/sys/sys/ioccom.h ============================================================================== --- head/sys/sys/ioccom.h Thu Apr 1 16:20:36 2010 (r206050) +++ head/sys/sys/ioccom.h Thu Apr 1 16:21:35 2010 (r206051) @@ -38,12 +38,13 @@ * any in or out parameters in the upper word. The high 3 bits of the * upper word are used to encode the in/out status of the parameter. */ -#define IOCPARM_MASK 0x1fff /* parameter length, at most 13 bits */ +#define IOCPARM_SHIFT 13 /* number of bits for ioctl size */ +#define IOCPARM_MASK ((1 << IOCPARM_SHIFT) - 1) /* parameter length mask */ #define IOCPARM_LEN(x) (((x) >> 16) & IOCPARM_MASK) #define IOCBASECMD(x) ((x) & ~(IOCPARM_MASK << 16)) #define IOCGROUP(x) (((x) >> 8) & 0xff) -#define IOCPARM_MAX PAGE_SIZE /* max size of ioctl, mult. of PAGE_SIZE */ +#define IOCPARM_MAX (1 << IOCPARM_SHIFT) /* max size of ioctl */ #define IOC_VOID 0x20000000 /* no parameters */ #define IOC_OUT 0x40000000 /* copy out parameters */ #define IOC_IN 0x80000000 /* copy in parameters */ From owner-svn-src-all@FreeBSD.ORG Thu Apr 1 17:04:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E66D1065670; Thu, 1 Apr 2010 17:04:37 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6E0748FC16; Thu, 1 Apr 2010 17:04: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 o31H4boc091860; Thu, 1 Apr 2010 17:04:37 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o31H4bhv091858; Thu, 1 Apr 2010 17:04:37 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201004011704.o31H4bhv091858@svn.freebsd.org> From: Warner Losh Date: Thu, 1 Apr 2010 17:04: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: r206052 - head/usr.sbin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 01 Apr 2010 17:04:37 -0000 Author: imp Date: Thu Apr 1 17:04:37 2010 New Revision: 206052 URL: http://svn.freebsd.org/changeset/base/206052 Log: We don't need to note that mkproto is missing anymore. It is definitely OBE in a number of ways, and likely should have been removed in 2000, not 2010. Modified: head/usr.sbin/Makefile Modified: head/usr.sbin/Makefile ============================================================================== --- head/usr.sbin/Makefile Thu Apr 1 16:21:35 2010 (r206051) +++ head/usr.sbin/Makefile Thu Apr 1 17:04:37 2010 (r206052) @@ -3,7 +3,6 @@ .include -# XXX MISSING: mkproto SUBDIR= ${_ac} \ ${_accton} \ ${_acpi} \ From owner-svn-src-all@FreeBSD.ORG Thu Apr 1 18:17:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A3F4106564A; Thu, 1 Apr 2010 18:17:54 +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 3983C8FC18; Thu, 1 Apr 2010 18:17: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 o31IHsg6008043; Thu, 1 Apr 2010 18:17:54 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o31IHsXq008041; Thu, 1 Apr 2010 18:17:54 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201004011817.o31IHsXq008041@svn.freebsd.org> From: Alexander Motin Date: Thu, 1 Apr 2010 18:17: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: r206053 - head/sys/arm/mv X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 01 Apr 2010 18:17:54 -0000 Author: mav Date: Thu Apr 1 18:17:53 2010 New Revision: 206053 URL: http://svn.freebsd.org/changeset/base/206053 Log: Fill extended ATA command registers in cPRD to support 48bit commands. Modified: head/sys/arm/mv/mv_sata.c Modified: head/sys/arm/mv/mv_sata.c ============================================================================== --- head/sys/arm/mv/mv_sata.c Thu Apr 1 17:04:37 2010 (r206052) +++ head/sys/arm/mv/mv_sata.c Thu Apr 1 18:17:53 2010 (r206053) @@ -600,7 +600,12 @@ sata_channel_begin_transaction(struct at crqb->crqb_ata_lba_mid = request->u.ata.lba >> 8; crqb->crqb_ata_lba_high = request->u.ata.lba >> 16; crqb->crqb_ata_device = ((request->u.ata.lba >> 24) & 0x0F) | (1 << 6); + crqb->crqb_ata_lba_low_p = request->u.ata.lba >> 24; + crqb->crqb_ata_lba_mid_p = request->u.ata.lba >> 32; + crqb->crqb_ata_lba_high_p = request->u.ata.lba >> 40; + crqb->crqb_ata_feature_p = request->u.ata.feature >> 8; crqb->crqb_ata_count = request->u.ata.count; + crqb->crqb_ata_count_p = request->u.ata.count; bus_dmamap_sync(ch->dma.work_tag, ch->dma.work_map, BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); From owner-svn-src-all@FreeBSD.ORG Thu Apr 1 18:20:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8AC66106566B for ; Thu, 1 Apr 2010 18:20:18 +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 18ACA8FC28 for ; Thu, 1 Apr 2010 18:20:17 +0000 (UTC) Received: (qmail 25730 invoked by uid 399); 1 Apr 2010 18:20:17 -0000 Received: from localhost (HELO foreign.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 1 Apr 2010 18:20:17 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4BB4E3DF.8030407@FreeBSD.org> Date: Thu, 01 Apr 2010 11:20:15 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.9) Gecko/20100330 Thunderbird/3.0.4 MIME-Version: 1.0 To: "Simon L. Nielsen" References: <201004011519.o31FJpw2068549@svn.freebsd.org> In-Reply-To: <201004011519.o31FJpw2068549@svn.freebsd.org> X-Enigmail-Version: 1.0.1 OpenPGP: id=D5B2F0FB 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: r206046 - in head/crypto/openssl: . apps crypto crypto/asn1 crypto/bio crypto/bn crypto/bn/asm crypto/engine crypto/evp crypto/ocsp crypto/rand engines fips ssl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 01 Apr 2010 18:20:18 -0000 On 04/01/10 08:19, Simon L. Nielsen wrote: > Author: simon > Date: Thu Apr 1 15:19:51 2010 > New Revision: 206046 > URL: http://svn.freebsd.org/changeset/base/206046 > > Log: > Merge OpenSSL 0.9.8n into head. Just curious, why not 1.0.0? Doug -- ... and that's just a little bit of history repeating. -- Propellerheads Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Thu Apr 1 19:05:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7B50106564A; Thu, 1 Apr 2010 19:05:43 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D73118FC18; Thu, 1 Apr 2010 19:05: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 o31J5hLs018465; Thu, 1 Apr 2010 19:05:43 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o31J5hDw018463; Thu, 1 Apr 2010 19:05:43 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201004011905.o31J5hDw018463@svn.freebsd.org> From: Alexander Motin Date: Thu, 1 Apr 2010 19:05:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206054 - head/sys/arm/mv X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 01 Apr 2010 19:05:44 -0000 Author: mav Date: Thu Apr 1 19:05:43 2010 New Revision: 206054 URL: http://svn.freebsd.org/changeset/base/206054 Log: Oops! Wrong copy-paste in r206053. Modified: head/sys/arm/mv/mv_sata.c Modified: head/sys/arm/mv/mv_sata.c ============================================================================== --- head/sys/arm/mv/mv_sata.c Thu Apr 1 18:17:53 2010 (r206053) +++ head/sys/arm/mv/mv_sata.c Thu Apr 1 19:05:43 2010 (r206054) @@ -605,7 +605,7 @@ sata_channel_begin_transaction(struct at crqb->crqb_ata_lba_high_p = request->u.ata.lba >> 40; crqb->crqb_ata_feature_p = request->u.ata.feature >> 8; crqb->crqb_ata_count = request->u.ata.count; - crqb->crqb_ata_count_p = request->u.ata.count; + crqb->crqb_ata_count_p = request->u.ata.count >> 8; bus_dmamap_sync(ch->dma.work_tag, ch->dma.work_map, BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); From owner-svn-src-all@FreeBSD.ORG Thu Apr 1 20:23:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D11CB1065679; Thu, 1 Apr 2010 20:23:43 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A55FF8FC21; Thu, 1 Apr 2010 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 o31KNhQZ035677; Thu, 1 Apr 2010 20:23:43 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o31KNhct035675; Thu, 1 Apr 2010 20:23:43 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <201004012023.o31KNhct035675@svn.freebsd.org> From: Qing Li Date: Thu, 1 Apr 2010 20:23: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: r206055 - stable/8/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2010 20:23:43 -0000 Author: qingli Date: Thu Apr 1 20:23:43 2010 New Revision: 206055 URL: http://svn.freebsd.org/changeset/base/206055 Log: MFC 205077 The flow-table module retrieves the destination and source address as well as the transport protocol port information from the outbound packets. The routing code is generic and compares every byte in the given sockaddr object. Therefore the temporary sockaddr objects must be cleared due to padding bytes. In addition, the port information must be stripped or the route search will either fail or return the incorrect route entry. Unit testing is done using OpenVPN over the if_tun interface. Modified: stable/8/sys/net/flowtable.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) stable/8/sys/net/ (props changed) Modified: stable/8/sys/net/flowtable.c ============================================================================== --- stable/8/sys/net/flowtable.c Thu Apr 1 19:05:43 2010 (r206054) +++ stable/8/sys/net/flowtable.c Thu Apr 1 20:23:43 2010 (r206055) @@ -598,6 +598,8 @@ flowtable_lookup_mbuf4(struct flowtable dsin = (struct sockaddr_in *)&dsa; ssin = (struct sockaddr_in *)&ssa; + bzero(dsin, sizeof(*dsin)); + bzero(ssin, sizeof(*ssin)); flags = ft->ft_flags; if (ipv4_mbuf_demarshal(ft, m, ssin, dsin, &flags) != 0) return (NULL); @@ -801,6 +803,8 @@ flowtable_lookup_mbuf6(struct flowtable dsin6 = (struct sockaddr_in6 *)&dsa; ssin6 = (struct sockaddr_in6 *)&ssa; + bzero(dsin6, sizeof(*dsin6)); + bzero(ssin6, sizeof(*ssin6)); flags = ft->ft_flags; if (ipv6_mbuf_demarshal(ft, m, ssin6, dsin6, &flags) != 0) @@ -1130,6 +1134,14 @@ flowtable_lookup(struct flowtable *ft, s ro = &sro; memcpy(&ro->ro_dst, dsa, sizeof(struct sockaddr_in)); + /* + * The harvested source and destination addresses + * may contain port information if the packet is + * from a transport protocol (e.g. TCP/UDP). The + * port field must be cleared before performing + * a route lookup. + */ + ((struct sockaddr_in *)&ro->ro_dst)->sin_port = 0; dsin = (struct sockaddr_in *)dsa; ssin = (struct sockaddr_in *)ssa; if ((dsin->sin_addr.s_addr == ssin->sin_addr.s_addr) || @@ -1147,6 +1159,7 @@ flowtable_lookup(struct flowtable *ft, s ro = (struct route *)&sro6; memcpy(&sro6.ro_dst, dsa, sizeof(struct sockaddr_in6)); + ((struct sockaddr_in6 *)&ro->ro_dst)->sin6_port = 0; dsin6 = (struct sockaddr_in6 *)dsa; ssin6 = (struct sockaddr_in6 *)ssa; From owner-svn-src-all@FreeBSD.ORG Thu Apr 1 20:43:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C203B1065678; Thu, 1 Apr 2010 20:43:26 +0000 (UTC) (envelope-from simon@nitro.dk) Received: from mx.nitro.dk (unknown [77.75.165.90]) by mx1.freebsd.org (Postfix) with ESMTP id 8165F8FC29; Thu, 1 Apr 2010 20:43:26 +0000 (UTC) Received: from arthur.nitro.dk (arthur.bofh [192.168.2.3]) by mx.nitro.dk (Postfix) with ESMTP id 658892D4841; Thu, 1 Apr 2010 20:43:25 +0000 (UTC) Received: by arthur.nitro.dk (Postfix, from userid 1000) id 4F5105C30; Thu, 1 Apr 2010 22:43:25 +0200 (CEST) Date: Thu, 1 Apr 2010 22:43:25 +0200 From: "Simon L. Nielsen" To: Doug Barton Message-ID: <20100401204324.GB1301@arthur.nitro.dk> References: <201004011519.o31FJpw2068549@svn.freebsd.org> <4BB4E3DF.8030407@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4BB4E3DF.8030407@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: r206046 - in head/crypto/openssl: . apps crypto crypto/asn1 crypto/bio crypto/bn crypto/bn/asm crypto/engine crypto/evp crypto/ocsp crypto/rand engines fips ssl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 01 Apr 2010 20:43:26 -0000 B0;253;0cOn 2010.04.01 11:20:15 -0700, Doug Barton wrote: > On 04/01/10 08:19, Simon L. Nielsen wrote: > > Author: simon > > Date: Thu Apr 1 15:19:51 2010 > > New Revision: 206046 > > URL: http://svn.freebsd.org/changeset/base/206046 > > > > Log: > > Merge OpenSSL 0.9.8n into head. > > Just curious, why not 1.0.0? The main reason is that 0.9.8n is needed for MFC to 7 and 8, so I prefered to get it tested a bit in -CURRENT first while I have the chance. I also prefered to get the security fixes for 0.9.8m into head faster - I don't know how much trouble 1.0.0 will be, but it will probably take some work. That said, given how long OpenSSL 1.0 has been under way it would have been perfect to commit it today of all days :-). -- Simon L. Nielsen From owner-svn-src-all@FreeBSD.ORG Thu Apr 1 20:47:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 70F591065676 for ; Thu, 1 Apr 2010 20:47:26 +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 F10588FC1A for ; Thu, 1 Apr 2010 20:47:25 +0000 (UTC) Received: (qmail 2691 invoked by uid 399); 1 Apr 2010 20:47:25 -0000 Received: from localhost (HELO foreign.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 1 Apr 2010 20:47:25 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4BB5065B.5000702@FreeBSD.org> Date: Thu, 01 Apr 2010 13:47:23 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.9) Gecko/20100330 Thunderbird/3.0.4 MIME-Version: 1.0 To: "Simon L. Nielsen" References: <201004011519.o31FJpw2068549@svn.freebsd.org> <4BB4E3DF.8030407@FreeBSD.org> <20100401204324.GB1301@arthur.nitro.dk> In-Reply-To: <20100401204324.GB1301@arthur.nitro.dk> X-Enigmail-Version: 1.0.1 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: r206046 - in head/crypto/openssl: . apps crypto crypto/asn1 crypto/bio crypto/bn crypto/bn/asm crypto/engine crypto/evp crypto/ocsp crypto/rand engines fips ssl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 01 Apr 2010 20:47:26 -0000 On 04/01/10 13:43, Simon L. Nielsen wrote: > B0;253;0cOn 2010.04.01 11:20:15 -0700, Doug Barton wrote: >> On 04/01/10 08:19, Simon L. Nielsen wrote: >>> Author: simon >>> Date: Thu Apr 1 15:19:51 2010 >>> New Revision: 206046 >>> URL: http://svn.freebsd.org/changeset/base/206046 >>> >>> Log: >>> Merge OpenSSL 0.9.8n into head. >> >> Just curious, why not 1.0.0? > > The main reason is that 0.9.8n is needed for MFC to 7 and 8, so I > prefered to get it tested a bit in -CURRENT first while I have the > chance. I also prefered to get the security fixes for 0.9.8m into > head faster - I don't know how much trouble 1.0.0 will be, but it will > probably take some work. Sounds reasonable, thanks for the explanation. > That said, given how long OpenSSL 1.0 has been under way it would have > been perfect to commit it today of all days :-). Yes. :) -- ... and that's just a little bit of history repeating. -- Propellerheads Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Thu Apr 1 21:20:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 20FE9106566C; Thu, 1 Apr 2010 21:20:20 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 106F58FC14; Thu, 1 Apr 2010 21:20: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 o31LKJwM048278; Thu, 1 Apr 2010 21:20:19 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o31LKJLT048276; Thu, 1 Apr 2010 21:20:19 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201004012120.o31LKJLT048276@svn.freebsd.org> From: Bruce Cran Date: Thu, 1 Apr 2010 21:20: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: r206056 - head/contrib/top X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 01 Apr 2010 21:20:20 -0000 Author: brucec Date: Thu Apr 1 21:20:19 2010 New Revision: 206056 URL: http://svn.freebsd.org/changeset/base/206056 Log: Specify the parameter in the format_k2 prototype. This fixes top on ARM, which assumes that format_k2 takes an int. Approved by: rrs (mentor) Modified: head/contrib/top/utils.h Modified: head/contrib/top/utils.h ============================================================================== --- head/contrib/top/utils.h Thu Apr 1 20:23:43 2010 (r206055) +++ head/contrib/top/utils.h Thu Apr 1 21:20:19 2010 (r206056) @@ -21,4 +21,4 @@ long percentages(); char *errmsg(); char *format_time(); char *format_k(); -char *format_k2(); +char *format_k2(unsigned long long); From owner-svn-src-all@FreeBSD.ORG Thu Apr 1 21:21:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 496511065670; Thu, 1 Apr 2010 21:21: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 1ECB68FC0A; Thu, 1 Apr 2010 21:21:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o31LLkGk048650; Thu, 1 Apr 2010 21:21:46 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o31LLkoN048648; Thu, 1 Apr 2010 21:21:46 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201004012121.o31LLkoN048648@svn.freebsd.org> From: Xin LI Date: Thu, 1 Apr 2010 21:21: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: r206057 - head/lib/libz X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 01 Apr 2010 21:21:46 -0000 Author: delphij Date: Thu Apr 1 21:21:45 2010 New Revision: 206057 URL: http://svn.freebsd.org/changeset/base/206057 Log: For now, hardcode FreeBSD configuration that will never change on zlib.h: unifdef -D_FILE_OFFSET_BITS=64 -U_LFS64_LARGEFILE -U_LARGEFILE64_SOURCE Modified: head/lib/libz/zlib.h Modified: head/lib/libz/zlib.h ============================================================================== --- head/lib/libz/zlib.h Thu Apr 1 21:20:19 2010 (r206056) +++ head/lib/libz/zlib.h Thu Apr 1 21:21:45 2010 (r206057) @@ -1556,38 +1556,13 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF( inflateBackInit_((strm), (windowBits), (window), \ ZLIB_VERSION, sizeof(z_stream)) -#if _LARGEFILE64_SOURCE == 1 && _LFS64_LARGEFILE == 1 - ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); - ZEXTERN off64_t ZEXPORT gzseek64 OF((gzFile, off64_t, int)); - ZEXTERN off64_t ZEXPORT gztell64 OF((gzFile)); - ZEXTERN off64_t ZEXPORT gzoffset64 OF((gzFile)); - ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, off64_t)); - ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, off64_t)); -#endif -#if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS == 64 && _LFS64_LARGEFILE == 1 -# define gzopen gzopen64 -# define gzseek gzseek64 -# define gztell gztell64 -# define gzoffset gzoffset64 -# define adler32_combine adler32_combine64 -# define crc32_combine crc32_combine64 -# if _LARGEFILE64_SOURCE != 1 - ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); - ZEXTERN off_t ZEXPORT gzseek64 OF((gzFile, off_t, int)); - ZEXTERN off_t ZEXPORT gztell64 OF((gzFile)); - ZEXTERN off_t ZEXPORT gzoffset64 OF((gzFile)); - ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, off_t)); - ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, off_t)); -# endif -#else ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *)); ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile, z_off_t, int)); ZEXTERN z_off_t ZEXPORT gztell OF((gzFile)); ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile)); ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t)); ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t)); -#endif #if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL) struct internal_state {int dummy;}; /* hack for buggy compilers */ From owner-svn-src-all@FreeBSD.ORG Thu Apr 1 21:23:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D80851065673; Thu, 1 Apr 2010 21:23:54 +0000 (UTC) (envelope-from bruce@cran.org.uk) Received: from muon.cran.org.uk (unknown [IPv6:2001:470:1f09:679::1]) by mx1.freebsd.org (Postfix) with ESMTP id 9CA198FC0A; Thu, 1 Apr 2010 21:23:54 +0000 (UTC) Received: from muon.cran.org.uk (localhost [127.0.0.1]) by muon.cran.org.uk (Postfix) with ESMTP id D71EB93B1; Thu, 1 Apr 2010 21:23:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on muon.cran.org.uk X-Spam-Level: X-Spam-Status: No, score=-2.6 required=8.0 tests=AWL,BAYES_00,RDNS_DYNAMIC autolearn=no version=3.2.5 Received: from core.draftnet (87-194-158-129.bethere.co.uk [87.194.158.129]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by muon.cran.org.uk (Postfix) with ESMTPSA; Thu, 1 Apr 2010 21:23:53 +0000 (UTC) From: Bruce Cran To: Alexander Motin Date: Thu, 1 Apr 2010 22:23:49 +0100 User-Agent: KMail/1.13.1 (FreeBSD/9.0-CURRENT; KDE/4.4.1; amd64; ; ) References: <201003131117.o2DBHek2003410@svn.freebsd.org> <4BB2182C.4080203@FreeBSD.org> In-Reply-To: <4BB2182C.4080203@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201004012223.49249.bruce@cran.org.uk> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Bruce Cran Subject: Re: svn commit: r205119 - head/contrib/top X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 01 Apr 2010 21:23:55 -0000 On Tuesday 30 March 2010 16:26:36 Alexander Motin wrote: > Bruce Cran wrote: > > Author: brucec > > Date: Sat Mar 13 11:17:39 2010 > > New Revision: 205119 > > URL: http://svn.freebsd.org/changeset/base/205119 > > > > Log: > > Change the 'amt' parameter in format_k2 from int to unsigned long long > > to match the values passed in and prevent the SIZE field being > > corrupted when more than 2TB is allocated. > > This change seems broke top on ARM, as declaration in util.h doesn't > specifies argument type, and caller assumes int there. To make it work > correctly, second part should be done: > > --- top.prev/utils.h 2009-10-14 15:23:42.000000000 +0300 > +++ top/utils.h 2010-03-30 18:14:11.000000000 +0300 > @@ -21,4 +21,4 @@ long percentages(); > char *errmsg(); > char *format_time(); > char *format_k(); > -char *format_k2(); > +char *format_k2(unsigned long long); Sorry, I thought things would just work since format_k2 is only ever being called with a 64-bit argument. I've committed the patch in r206056. -- Bruce Cran From owner-svn-src-all@FreeBSD.ORG Thu Apr 1 22:52:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2B021106566B; Thu, 1 Apr 2010 22:52:10 +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 1A9258FC08; Thu, 1 Apr 2010 22:52: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 o31Mq90B069005; Thu, 1 Apr 2010 22:52:09 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o31Mq9M6069003; Thu, 1 Apr 2010 22:52:09 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201004012252.o31Mq9M6069003@svn.freebsd.org> From: Xin LI Date: Thu, 1 Apr 2010 22:52: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: r206058 - head/lib/libz X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 01 Apr 2010 22:52:10 -0000 Author: delphij Date: Thu Apr 1 22:52:09 2010 New Revision: 206058 URL: http://svn.freebsd.org/changeset/base/206058 Log: Remove _LARGEFILE64_SOURCE==1 case which is supposed to be always false on FreeBSD. Pointed out by: dougb Modified: head/lib/libz/zconf.h Modified: head/lib/libz/zconf.h ============================================================================== --- head/lib/libz/zconf.h Thu Apr 1 21:21:45 2010 (r206057) +++ head/lib/libz/zconf.h Thu Apr 1 22:52:09 2010 (r206058) @@ -364,7 +364,7 @@ typedef uLong FAR uLongf; # define Z_HAVE_UNISTD_H #endif -#if defined(Z_HAVE_UNISTD_H) || _LARGEFILE64_SOURCE == 1 +#if defined(Z_HAVE_UNISTD_H) # include /* for off_t */ # include /* for SEEK_* and off_t */ # ifdef VMS From owner-svn-src-all@FreeBSD.ORG Fri Apr 2 00:02:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A043106566C; Fri, 2 Apr 2010 00:02:36 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-qy0-f199.google.com (mail-qy0-f199.google.com [209.85.221.199]) by mx1.freebsd.org (Postfix) with ESMTP id C78338FC08; Fri, 2 Apr 2010 00:02:35 +0000 (UTC) Received: by qyk37 with SMTP id 37so1813548qyk.8 for ; Thu, 01 Apr 2010 17:02:35 -0700 (PDT) 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:received:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=T/Ani2z6IV/skKn8Gsg9shES/5oLmzedMMrbNCzV/ro=; b=S81HtxBnZo6ZbtR093S80HfIroP0YCNQFgmgHhDB4KiDbh8+eK1xqo5zpNjG6soswc kXeFjpA79rzU9t71PLMMGeBxyeDy0MK2Idtq5O2RFhAKLzbjH08RaRDVq1iOjJdkAQB9 braRKV4z5DKNGMsBulNjG4gKysTx82g2Qqr3I= 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=xhUTLKNWtbSGrKW+pFGxB2zvpS9v5as0PPrHOUFNAqBnQYVAi7BKf5HKyy4Juqg5J+ 7p8nfrK0eCdTocRGHNVAf7h5MjU1c4gbtQN4N1CInD5rdMtWT8sx2ZXDZjECPpbO4qNr n4ZxB+yi85RzgfTnN+H3kuXnPZrGziXJ8A4Y8= MIME-Version: 1.0 Received: by 10.229.33.72 with HTTP; Thu, 1 Apr 2010 17:02:34 -0700 (PDT) In-Reply-To: <201004011427.o31ERTaT056824@svn.freebsd.org> References: <201004011427.o31ERTaT056824@svn.freebsd.org> Date: Thu, 1 Apr 2010 17:02:34 -0700 Received: by 10.229.222.205 with SMTP id ih13mr2557432qcb.73.1270166554849; Thu, 01 Apr 2010 17:02:34 -0700 (PDT) Message-ID: From: Garrett Cooper To: Florent Thoumie 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, rwatson@freebsd.org Subject: Re: svn commit: r206043 - in head/usr.sbin/pkg_install: add delete lib version X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Apr 2010 00:02:36 -0000 Hi Florent and Robert, On Thu, Apr 1, 2010 at 7:27 AM, Florent Thoumie wrote: > Author: flz > Date: Thu Apr =A01 14:27:29 2010 > New Revision: 206043 > URL: http://svn.freebsd.org/changeset/base/206043 > > Log: > =A0Various fixes. > > =A0- Replace hardcoded INDEX version. [1] > =A0- Fix a buffer overlap. [2] > =A0- Remove empty package when fetching fails and -K is used. [3] > =A0- Remove useless chmod2() after mkdtemp(3). [4] > =A0- Replace mkdir(1) call with mkdir(2). [5] > =A0- Get rid of some vsystem() calls. > =A0- Switch from lstat(2) to open(2) in fexists(). > =A0- Try rename(2) in move_file() first. > =A0- Bump PKG_INSTALL_VERSION to 20100401. > > =A0PR: =A0 =A0 =A0 =A0 =A0 bin/145101 [1], bin/139492 [2], bin/144919 [3] > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0bin/144920 [4], bin/144921 [5] > =A0Submitted by: gcooper [1,2,3,4,5] > > Modified: > =A0head/usr.sbin/pkg_install/add/futil.c > =A0head/usr.sbin/pkg_install/add/perform.c > =A0head/usr.sbin/pkg_install/delete/perform.c > =A0head/usr.sbin/pkg_install/lib/file.c > =A0head/usr.sbin/pkg_install/lib/lib.h > =A0head/usr.sbin/pkg_install/lib/match.c > =A0head/usr.sbin/pkg_install/lib/pen.c > =A0head/usr.sbin/pkg_install/lib/url.c > =A0head/usr.sbin/pkg_install/version/perform.c [...] > Modified: head/usr.sbin/pkg_install/add/perform.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/usr.sbin/pkg_install/add/perform.c =A0 =A0 Thu Apr =A01 13:27:27= 2010 =A0 =A0 =A0 =A0(r206042) > +++ head/usr.sbin/pkg_install/add/perform.c =A0 =A0 Thu Apr =A01 14:27:29= 2010 =A0 =A0 =A0 =A0(r206043) > @@ -78,6 +78,7 @@ pkg_do(char *pkg) > =A0 =A0 char pre_arg[FILENAME_MAX], post_arg[FILENAME_MAX]; > =A0 =A0 char *conflict[2]; > =A0 =A0 char **matched; > + =A0 =A0int fd; [...] > =A0 =A0 =A0 =A0/* Make sure pkg_info can read the entry */ > - =A0 =A0 =A0 vsystem("/bin/chmod a+rx %s", LogDir); > + =A0 =A0 =A0 fd =3D open(LogDir, O_RDWR); > + =A0 =A0 =A0 fstat(fd, &sb); > + =A0 =A0 =A0 fchmod(fd, sb.st_mode | S_IRALL | S_IXALL); =A0 =A0 /* be s= ure, chmod a+rx */ > + =A0 =A0 =A0 close(fd); Yipes... we really should be checking to make sure that fchmod, fstat, and open pass. This would look really bad if not. I would also argue that all of the files that aren't properly chmod'ed, etc are in fact the packager's fault and should be fixed by adding appropriate scripts because mtree should catch this stuff if it's setup appropriately. [...] > Modified: head/usr.sbin/pkg_install/lib/file.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/usr.sbin/pkg_install/lib/file.c =A0 =A0 =A0 =A0Thu Apr =A01 13:2= 7:27 2010 =A0 =A0 =A0 =A0(r206042) > +++ head/usr.sbin/pkg_install/lib/file.c =A0 =A0 =A0 =A0Thu Apr =A01 14:2= 7:29 2010 =A0 =A0 =A0 =A0(r206043) > @@ -31,10 +31,13 @@ __FBSDID("$FreeBSD$"); > =A0Boolean > =A0fexists(const char *fname) > =A0{ > - =A0 =A0struct stat dummy; > - =A0 =A0if (!lstat(fname, &dummy)) > - =A0 =A0 =A0 return TRUE; > - =A0 =A0return FALSE; > + =A0 =A0int fd; > + > + =A0 =A0if ((fd =3D open(fname, O_RDONLY)) =3D=3D -1) > + =A0 =A0 =A0 return FALSE; > + > + =A0 =A0close(fd); > + =A0 =A0return TRUE; > =A0} I was leery of this change because fexists is used widely across pkg_install for purposes other than just determining whether or not a file existed, in particular it's determining whether or not the end-file exists. The original submitter for the PR didn't actually test this point thoroughly so I need to go and write some tests to ensure that the code isn't actually regressing on accident :/. > =A0/* Quick check to see if something is a directory or symlink to a dire= ctory */ > @@ -279,17 +282,23 @@ copy_file(const char *dir, const char *f > =A0} > > =A0void > -move_file(const char *dir, const char *fname, const char *to) > +move_file(const char *dir, const char *fname, const char *tdir) > =A0{ > - =A0 =A0char cmd[FILENAME_MAX]; > + =A0 =A0char from[FILENAME_MAX]; > + =A0 =A0char to[FILENAME_MAX]; > > =A0 =A0 if (fname[0] =3D=3D '/') > - =A0 =A0 =A0 snprintf(cmd, FILENAME_MAX, "/bin/mv %s %s", fname, to); > + =A0 =A0 =A0 strncpy(from, fname, FILENAME_MAX); > =A0 =A0 else > - =A0 =A0 =A0 snprintf(cmd, FILENAME_MAX, "/bin/mv %s/%s %s", dir, fname,= to); > - =A0 =A0if (vsystem(cmd)) { > - =A0 =A0 =A0 cleanup(0); > - =A0 =A0 =A0 errx(2, "%s: could not perform '%s'", __func__, cmd); > + =A0 =A0 =A0 snprintf(from, FILENAME_MAX, "%s/%s", dir, fname); > + > + =A0 =A0snprintf(to, FILENAME_MAX, "%s/%s", tdir, fname); > + > + =A0 =A0if (rename(from, to) =3D=3D -1) { > + =A0 =A0 =A0 =A0if (vsystem("/bin/mv %s %s", from, to)) { > + =A0 =A0 =A0 =A0 =A0 cleanup(0); > + =A0 =A0 =A0 =A0 =A0 errx(2, "%s: could not move '%s' to '%s'", __func__= , from, to); > + =A0 =A0 =A0 } > =A0 =A0 } > =A0} 1. FILENAME_MAX could be less than PATH_MAX, and actually is on the BSDs (256 vs 1024). PATH_MAX allows for duplicate slashes and all sorts of whacky path crud and probably should be used more liberally in the pkg_install code. This however isn't always true in the NetBSD case because they're aiming for portability of pkg_install, however PATH_MAX is always guaranteed to be at least as large as FILENAME_MAX. 2. Does rename(2) copy [MAC] and other attributes properly? It appears to do the right thing, but I could be misreading the code... Thanks for the commits BTW :)! -Garrett From owner-svn-src-all@FreeBSD.ORG Fri Apr 2 00:14:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 95BD1106564A for ; Fri, 2 Apr 2010 00:14:12 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from www.sonnenberger.org (www.sonnenberger.org [92.79.50.50]) by mx1.freebsd.org (Postfix) with ESMTP id 57E948FC12 for ; Fri, 2 Apr 2010 00:14:12 +0000 (UTC) Received: from britannica.bec.de (www.sonnenberger.org [192.168.1.10]) by www.sonnenberger.org (Postfix) with ESMTP id DCDC466781 for ; Fri, 2 Apr 2010 02:14:10 +0200 (CEST) Received: by britannica.bec.de (Postfix, from userid 1000) id B3E5615C2B; Fri, 2 Apr 2010 02:12:31 +0200 (CEST) Date: Fri, 2 Apr 2010 02:12:31 +0200 From: Joerg Sonnenberger To: svn-src-all@freebsd.org Message-ID: <20100402001231.GA16732@britannica.bec.de> References: <201004011427.o31ERTaT056824@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Subject: Re: svn commit: r206043 - in head/usr.sbin/pkg_install: add delete lib version X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Apr 2010 00:14:12 -0000 On Thu, Apr 01, 2010 at 05:02:34PM -0700, Garrett Cooper wrote: > 1. FILENAME_MAX could be less than PATH_MAX, and actually is on > the BSDs (256 vs 1024). PATH_MAX allows for duplicate slashes and all > sorts of whacky path crud and probably should be used more liberally > in the pkg_install code. This however isn't always true in the NetBSD > case because they're aiming for portability of pkg_install, however > PATH_MAX is always guaranteed to be at least as large as FILENAME_MAX. Well, I've been slowly working on eliminating the use of PATH_MAX in the NetBSD/pkgsrc version of pkg_install. The performance gain from using fixed stack space is minimal and the error handling generally incompletely at best. Joerg From owner-svn-src-all@FreeBSD.ORG Fri Apr 2 01:53:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2FC041065673; Fri, 2 Apr 2010 01:53:49 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1EBF58FC1E; Fri, 2 Apr 2010 01:53: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 o321rmpY012360; Fri, 2 Apr 2010 01:53:49 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o321rmxG012359; Fri, 2 Apr 2010 01:53:48 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201004020153.o321rmxG012359@svn.freebsd.org> From: Rick Macklem Date: Fri, 2 Apr 2010 01:53:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206061 - head/sys/fs/nfsserver X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2010 01:53:49 -0000 Author: rmacklem Date: Fri Apr 2 01:53:48 2010 New Revision: 206061 URL: http://svn.freebsd.org/changeset/base/206061 Log: Add SAVENAME to the cn_flags for all cases in the experimental NFS server for the CREATE cn_nameiop where SAVESTART isn't set. I was not aware that this needed to be done by the caller until recently. Tested by: lampa AT fit.vutbr.cz (link case) Submitted by: lampa AT fit.vutbr.cz (link case) MFC after: 2 weeks Modified: head/sys/fs/nfsserver/nfs_nfsdserv.c Modified: head/sys/fs/nfsserver/nfs_nfsdserv.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdserv.c Thu Apr 1 23:35:35 2010 (r206060) +++ head/sys/fs/nfsserver/nfs_nfsdserv.c Fri Apr 2 01:53:48 2010 (r206061) @@ -1086,7 +1086,7 @@ nfsrvd_mknod(struct nfsrv_descript *nd, case NFFIFO: break; case NFDIR: - cnflags = LOCKPARENT; + cnflags = (LOCKPARENT | SAVENAME); break; default: nd->nd_repstat = NFSERR_BADTYPE; @@ -1549,7 +1549,8 @@ nfsrvd_link(struct nfsrv_descript *nd, i NFSVOPUNLOCK(dp, 0, p); } } - NFSNAMEICNDSET(&named.ni_cnd, nd->nd_cred, CREATE, LOCKPARENT); + NFSNAMEICNDSET(&named.ni_cnd, nd->nd_cred, CREATE, + LOCKPARENT | SAVENAME); if (!nd->nd_repstat) { nfsvno_setpathbuf(&named, &bufp, &hashp); error = nfsrv_parsename(nd, bufp, hashp, &named.ni_pathlen); @@ -1743,7 +1744,8 @@ nfsrvd_mkdir(struct nfsrv_descript *nd, nfsrv_wcc(nd, dirfor_ret, &dirfor, diraft_ret, &diraft); return (0); } - NFSNAMEICNDSET(&named.ni_cnd, nd->nd_cred, CREATE, LOCKPARENT); + NFSNAMEICNDSET(&named.ni_cnd, nd->nd_cred, CREATE, + LOCKPARENT | SAVENAME); nfsvno_setpathbuf(&named, &bufp, &hashp); error = nfsrv_parsename(nd, bufp, hashp, &named.ni_pathlen); if (error) { From owner-svn-src-all@FreeBSD.ORG Fri Apr 2 02:19:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F3AA1065672; Fri, 2 Apr 2010 02:19:29 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0E7C28FC15; Fri, 2 Apr 2010 02:19: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 o322JSsb018091; Fri, 2 Apr 2010 02:19:28 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o322JSfA018089; Fri, 2 Apr 2010 02:19:28 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201004020219.o322JSfA018089@svn.freebsd.org> From: Rick Macklem Date: Fri, 2 Apr 2010 02:19: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: r206063 - head/sys/fs/nfsserver X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2010 02:19:29 -0000 Author: rmacklem Date: Fri Apr 2 02:19:28 2010 New Revision: 206063 URL: http://svn.freebsd.org/changeset/base/206063 Log: For the experimental NFS server, add a call to free the lookup path buffer for one case where it was missing when doing mkdir. This could have conceivably resulted in a leak of a buffer, but a leak was never observed during testing, so I suspect it would have occurred rarely, if ever, in practice. MFC after: 2 weeks Modified: head/sys/fs/nfsserver/nfs_nfsdport.c Modified: head/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdport.c Fri Apr 2 02:17:15 2010 (r206062) +++ head/sys/fs/nfsserver/nfs_nfsdport.c Fri Apr 2 02:19:28 2010 (r206063) @@ -869,6 +869,7 @@ nfsvno_mkdir(struct nameidata *ndp, stru else vput(ndp->ni_dvp); vrele(ndp->ni_vp); + nfsvno_relpathbuf(ndp); return (EEXIST); } error = VOP_MKDIR(ndp->ni_dvp, &ndp->ni_vp, &ndp->ni_cnd, From owner-svn-src-all@FreeBSD.ORG Fri Apr 2 04:58:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 062F4106564A; Fri, 2 Apr 2010 04:58:18 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E8A4E8FC13; Fri, 2 Apr 2010 04:58: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 o324wHFU053680; Fri, 2 Apr 2010 04:58:17 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o324wHr2053678; Fri, 2 Apr 2010 04:58:17 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <201004020458.o324wHr2053678@svn.freebsd.org> From: Qing Li Date: Fri, 2 Apr 2010 04:58: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: r206066 - stable/8/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, 02 Apr 2010 04:58:18 -0000 Author: qingli Date: Fri Apr 2 04:58:17 2010 New Revision: 206066 URL: http://svn.freebsd.org/changeset/base/206066 Log: MFC 201131 introduce a local variable rte acting as a cache of ro->ro_rt within ip_output, achieving (in random order of importance): - a reduction of the number of 'r's in the source code; - improved legibility; - a reduction of 64 bytes in the .text Modified: stable/8/sys/netinet/ip_output.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) stable/8/sys/net/ (props changed) Modified: stable/8/sys/netinet/ip_output.c ============================================================================== --- stable/8/sys/netinet/ip_output.c Fri Apr 2 04:42:02 2010 (r206065) +++ stable/8/sys/netinet/ip_output.c Fri Apr 2 04:58:17 2010 (r206066) @@ -128,6 +128,7 @@ ip_output(struct mbuf *m, struct mbuf *o struct in_ifaddr *ia = NULL; int isbroadcast, sw_csum; struct route iproute; + struct rtentry *rte; /* cache for ro->ro_rt */ struct in_addr odst; #ifdef IPFIREWALL_FORWARD struct m_tag *fwd_tag = NULL; @@ -205,18 +206,19 @@ again: * The address family should also be checked in case of sharing the * cache with IPv6. */ - if (ro->ro_rt && ((ro->ro_rt->rt_flags & RTF_UP) == 0 || + rte = ro->ro_rt; + if (rte && ((rte->rt_flags & RTF_UP) == 0 || dst->sin_family != AF_INET || dst->sin_addr.s_addr != ip->ip_dst.s_addr)) { if (!nortfree) - RTFREE(ro->ro_rt); - ro->ro_rt = (struct rtentry *)NULL; + RTFREE(rte); + rte = ro->ro_rt = (struct rtentry *)NULL; ro->ro_lle = (struct llentry *)NULL; } #ifdef IPFIREWALL_FORWARD - if (ro->ro_rt == NULL && fwd_tag == NULL) { + if (rte == NULL && fwd_tag == NULL) { #else - if (ro->ro_rt == NULL) { + if (rte == NULL) { #endif bzero(dst, sizeof(*dst)); dst->sin_family = AF_INET; @@ -266,7 +268,7 @@ again: * as this is probably required in all cases for correct * operation (as it is for ARP). */ - if (ro->ro_rt == NULL) + if (rte == NULL) { #ifdef RADIX_MPATH rtalloc_mpath_fib(ro, ntohl(ip->ip_src.s_addr ^ ip->ip_dst.s_addr), @@ -275,7 +277,9 @@ again: in_rtalloc_ign(ro, 0, inp ? inp->inp_inc.inc_fibnum : M_GETFIB(m)); #endif - if (ro->ro_rt == NULL) { + rte = ro->ro_rt; + } + if (rte == NULL) { #ifdef IPSEC /* * There is no route for this packet, but it is @@ -289,14 +293,14 @@ again: error = EHOSTUNREACH; goto bad; } - ia = ifatoia(ro->ro_rt->rt_ifa); + ia = ifatoia(rte->rt_ifa); ifa_ref(&ia->ia_ifa); - ifp = ro->ro_rt->rt_ifp; - ro->ro_rt->rt_rmx.rmx_pksent++; - if (ro->ro_rt->rt_flags & RTF_GATEWAY) - dst = (struct sockaddr_in *)ro->ro_rt->rt_gateway; - if (ro->ro_rt->rt_flags & RTF_HOST) - isbroadcast = (ro->ro_rt->rt_flags & RTF_BROADCAST); + ifp = rte->rt_ifp; + rte->rt_rmx.rmx_pksent++; + if (rte->rt_flags & RTF_GATEWAY) + dst = (struct sockaddr_in *)rte->rt_gateway; + if (rte->rt_flags & RTF_HOST) + isbroadcast = (rte->rt_flags & RTF_BROADCAST); else isbroadcast = in_broadcast(dst->sin_addr, ifp); } @@ -304,7 +308,7 @@ again: * Calculate MTU. If we have a route that is up, use that, * otherwise use the interface's MTU. */ - if (ro->ro_rt != NULL && (ro->ro_rt->rt_flags & (RTF_UP|RTF_HOST))) { + if (rte != NULL && (rte->rt_flags & (RTF_UP|RTF_HOST))) { /* * This case can happen if the user changed the MTU * of an interface after enabling IP on it. Because @@ -312,9 +316,9 @@ again: * them, there is no way for one to update all its * routes when the MTU is changed. */ - if (ro->ro_rt->rt_rmx.rmx_mtu > ifp->if_mtu) - ro->ro_rt->rt_rmx.rmx_mtu = ifp->if_mtu; - mtu = ro->ro_rt->rt_rmx.rmx_mtu; + if (rte->rt_rmx.rmx_mtu > ifp->if_mtu) + rte->rt_rmx.rmx_mtu = ifp->if_mtu; + mtu = rte->rt_rmx.rmx_mtu; } else { mtu = ifp->if_mtu; } From owner-svn-src-all@FreeBSD.ORG Fri Apr 2 05:02:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D6166106566B; Fri, 2 Apr 2010 05:02:50 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C3CDF8FC1A; Fri, 2 Apr 2010 05:02: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 o3252oN5054756; Fri, 2 Apr 2010 05:02:50 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3252otY054748; Fri, 2 Apr 2010 05:02:50 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <201004020502.o3252otY054748@svn.freebsd.org> From: Qing Li Date: Fri, 2 Apr 2010 05:02:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206067 - in stable/8/sys: net 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, 02 Apr 2010 05:02:51 -0000 Author: qingli Date: Fri Apr 2 05:02:50 2010 New Revision: 206067 URL: http://svn.freebsd.org/changeset/base/206067 Log: MFC 204902 One of the advantages of enabling ECMP (a.k.a RADIX_MPATH) is to allow for connection load balancing across interfaces. Currently the address alias handling method is colliding with the ECMP code. For example, when two interfaces are configured on the same prefix, only one prefix route is installed. So connection load balancing among the available interfaces is not possible. The other advantage of ECMP is for failover. The issue with the current code, is that the interface link-state is not reflected in the route entry. For example, if there are two interfaces on the same prefix, the cable on one interface is unplugged, new and existing connections should switch over to the other interface. This is not done today and packets go into a black hole. Also, there is a small bug in the kernel where deleting ECMP routes in the userland will always return an error even though the command is successfully executed. Modified: stable/8/sys/net/flowtable.c stable/8/sys/net/radix.c stable/8/sys/net/radix_mpath.c stable/8/sys/net/route.c stable/8/sys/net/route.h stable/8/sys/netinet/in.c stable/8/sys/netinet/ip_output.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) stable/8/sys/net/ (props changed) Modified: stable/8/sys/net/flowtable.c ============================================================================== --- stable/8/sys/net/flowtable.c Fri Apr 2 04:58:17 2010 (r206066) +++ stable/8/sys/net/flowtable.c Fri Apr 2 05:02:50 2010 (r206067) @@ -870,7 +870,8 @@ flow_stale(struct flowtable *ft, struct || ((fle->f_rt->rt_flags & RTF_HOST) && ((fle->f_rt->rt_flags & (RTF_UP)) != (RTF_UP))) - || (fle->f_rt->rt_ifp == NULL)) + || (fle->f_rt->rt_ifp == NULL) + || !RT_LINK_IS_UP(fle->f_rt->rt_ifp)) return (1); idle_time = time_uptime - fle->f_uptime; Modified: stable/8/sys/net/radix.c ============================================================================== --- stable/8/sys/net/radix.c Fri Apr 2 04:58:17 2010 (r206066) +++ stable/8/sys/net/radix.c Fri Apr 2 05:02:50 2010 (r206067) @@ -761,8 +761,10 @@ on2: if (m->rm_flags & RNF_NORMAL) { mmask = m->rm_leaf->rn_mask; if (tt->rn_flags & RNF_NORMAL) { +#if !defined(RADIX_MPATH) log(LOG_ERR, "Non-unique normal route, mask not entered\n"); +#endif return tt; } } else Modified: stable/8/sys/net/radix_mpath.c ============================================================================== --- stable/8/sys/net/radix_mpath.c Fri Apr 2 04:58:17 2010 (r206066) +++ stable/8/sys/net/radix_mpath.c Fri Apr 2 05:02:50 2010 (r206067) @@ -270,7 +270,8 @@ rtalloc_mpath_fib(struct route *ro, uint * XXX we don't attempt to lookup cached route again; what should * be done for sendto(3) case? */ - if (ro->ro_rt && ro->ro_rt->rt_ifp && (ro->ro_rt->rt_flags & RTF_UP)) + if (ro->ro_rt && ro->ro_rt->rt_ifp && (ro->ro_rt->rt_flags & RTF_UP) + && RT_LINK_IS_UP(ro->ro_rt->rt_ifp)) return; ro->ro_rt = rtalloc1_fib(&ro->ro_dst, 1, 0, fibnum); Modified: stable/8/sys/net/route.c ============================================================================== --- stable/8/sys/net/route.c Fri Apr 2 04:58:17 2010 (r206066) +++ stable/8/sys/net/route.c Fri Apr 2 05:02:50 2010 (r206067) @@ -830,7 +830,13 @@ rt_getifa_fib(struct rt_addrinfo *info, int rtexpunge(struct rtentry *rt) { +#if !defined(RADIX_MPATH) struct radix_node *rn; +#else + struct rt_addrinfo info; + int fib; + struct rtentry *rt0; +#endif struct radix_node_head *rnh; struct ifaddr *ifa; int error = 0; @@ -843,14 +849,26 @@ rtexpunge(struct rtentry *rt) if (rnh == NULL) return (EAFNOSUPPORT); RADIX_NODE_HEAD_LOCK_ASSERT(rnh); -#if 0 - /* - * We cannot assume anything about the reference count - * because protocols call us in many situations; often - * before unwinding references to the table entry. - */ - KASSERT(rt->rt_refcnt <= 1, ("bogus refcnt %ld", rt->rt_refcnt)); -#endif + +#ifdef RADIX_MPATH + fib = rt->rt_fibnum; + bzero(&info, sizeof(info)); + info.rti_ifp = rt->rt_ifp; + info.rti_flags = RTF_RNH_LOCKED; + info.rti_info[RTAX_DST] = rt_key(rt); + info.rti_info[RTAX_GATEWAY] = rt->rt_ifa->ifa_addr; + + RT_UNLOCK(rt); + error = rtrequest1_fib(RTM_DELETE, &info, &rt0, fib); + + if (error == 0 && rt0 != NULL) { + rt = rt0; + RT_LOCK(rt); + } else if (error != 0) { + RT_LOCK(rt); + return (error); + } +#else /* * Remove the item from the tree; it should be there, * but when callers invoke us blindly it may not (sigh). @@ -864,6 +882,7 @@ rtexpunge(struct rtentry *rt) ("unexpected flags 0x%x", rn->rn_flags)); KASSERT(rt == RNTORT(rn), ("lookup mismatch, rt %p rn %p", rt, rn)); +#endif /* RADIX_MPATH */ rt->rt_flags &= ~RTF_UP; @@ -886,7 +905,9 @@ rtexpunge(struct rtentry *rt) * linked to the routing table. */ V_rttrash++; +#if !defined(RADIX_MPATH) bad: +#endif return (error); } @@ -1044,6 +1065,7 @@ rtrequest1_fib(int req, struct rt_addrin */ if (error != ENOENT) goto bad; + error = 0; } #endif /* Modified: stable/8/sys/net/route.h ============================================================================== --- stable/8/sys/net/route.h Fri Apr 2 04:58:17 2010 (r206066) +++ stable/8/sys/net/route.h Fri Apr 2 05:02:50 2010 (r206067) @@ -319,6 +319,8 @@ struct rt_addrinfo { #ifdef _KERNEL +#define RT_LINK_IS_UP(ifp) ((ifp)->if_link_state == LINK_STATE_UP) + #define RT_LOCK_INIT(_rt) \ mtx_init(&(_rt)->rt_mtx, "rtentry", NULL, MTX_DEF | MTX_DUPOK) #define RT_LOCK(_rt) mtx_lock(&(_rt)->rt_mtx) Modified: stable/8/sys/netinet/in.c ============================================================================== --- stable/8/sys/netinet/in.c Fri Apr 2 04:58:17 2010 (r206066) +++ stable/8/sys/netinet/in.c Fri Apr 2 05:02:50 2010 (r206067) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include "opt_carp.h" +#include "opt_mpath.h" #include #include @@ -1040,6 +1041,13 @@ in_addprefix(struct in_ifaddr *target, i * interface address, we are done here. */ if (ia->ia_flags & IFA_ROUTE) { +#ifdef RADIX_MPATH + if (ia->ia_addr.sin_addr.s_addr == + target->ia_addr.sin_addr.s_addr) + return (EEXIST); + else + break; +#endif if (V_sameprefixcarponly && target->ia_ifp->if_type != IFT_CARP && ia->ia_ifp->if_type != IFT_CARP) { Modified: stable/8/sys/netinet/ip_output.c ============================================================================== --- stable/8/sys/netinet/ip_output.c Fri Apr 2 04:58:17 2010 (r206066) +++ stable/8/sys/netinet/ip_output.c Fri Apr 2 05:02:50 2010 (r206067) @@ -208,6 +208,8 @@ again: */ rte = ro->ro_rt; if (rte && ((rte->rt_flags & RTF_UP) == 0 || + rte->rt_ifp == NULL || + !RT_LINK_IS_UP(rte->rt_ifp) || dst->sin_family != AF_INET || dst->sin_addr.s_addr != ip->ip_dst.s_addr)) { if (!nortfree) @@ -279,7 +281,9 @@ again: #endif rte = ro->ro_rt; } - if (rte == NULL) { + if (rte == NULL || + rte->rt_ifp == NULL || + !RT_LINK_IS_UP(rte->rt_ifp)) { #ifdef IPSEC /* * There is no route for this packet, but it is From owner-svn-src-all@FreeBSD.ORG Fri Apr 2 05:05:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B4672106564A; Fri, 2 Apr 2010 05:05:51 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A30C08FC0C; Fri, 2 Apr 2010 05: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 o3255pXN055460; Fri, 2 Apr 2010 05:05:51 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3255pQL055457; Fri, 2 Apr 2010 05:05:51 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <201004020505.o3255pQL055457@svn.freebsd.org> From: Qing Li Date: Fri, 2 Apr 2010 05:05:51 +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: r206068 - stable/8/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2010 05:05:51 -0000 Author: qingli Date: Fri Apr 2 05:05:51 2010 New Revision: 206068 URL: http://svn.freebsd.org/changeset/base/206068 Log: MFC 205024 The if_tap interface is of IFT_ETHERNET type, but it does not set or update the if_link_state variable. As such RT_LINK_IS_UP() fails for the if_tap interface. Also, the RT_LINK_IS_UP() needs to bypass all loopback interfaces because loopback interfaces are considered up logically as long as the system is running. This patch fixes the above issues by setting and updating the if_link_state variable when the tap interface is opened or closed respectively. Similary approach is already done in the if_tun device. Modified: stable/8/sys/net/if_tap.c stable/8/sys/net/route.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) stable/8/sys/net/ (props changed) Modified: stable/8/sys/net/if_tap.c ============================================================================== --- stable/8/sys/net/if_tap.c Fri Apr 2 05:02:50 2010 (r206067) +++ stable/8/sys/net/if_tap.c Fri Apr 2 05:05:51 2010 (r206068) @@ -502,6 +502,7 @@ tapopen(struct cdev *dev, int flag, int ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; if (tapuponopen) ifp->if_flags |= IFF_UP; + if_link_state_change(ifp, LINK_STATE_UP); splx(s); TAPDEBUG("%s is open. minor = %#x\n", ifp->if_xname, dev2unit(dev)); @@ -547,6 +548,7 @@ tapclose(struct cdev *dev, int foo, int } else mtx_unlock(&tp->tap_mtx); + if_link_state_change(ifp, LINK_STATE_DOWN); funsetown(&tp->tap_sigio); selwakeuppri(&tp->tap_rsel, PZERO+1); KNOTE_UNLOCKED(&tp->tap_rsel.si_note, 0); Modified: stable/8/sys/net/route.h ============================================================================== --- stable/8/sys/net/route.h Fri Apr 2 05:02:50 2010 (r206067) +++ stable/8/sys/net/route.h Fri Apr 2 05:05:51 2010 (r206068) @@ -319,7 +319,9 @@ struct rt_addrinfo { #ifdef _KERNEL -#define RT_LINK_IS_UP(ifp) ((ifp)->if_link_state == LINK_STATE_UP) +#define RT_LINK_IS_UP(ifp) (((ifp)->if_flags & \ + (IFF_LOOPBACK | IFF_POINTOPOINT)) \ + || (ifp)->if_link_state == LINK_STATE_UP) #define RT_LOCK_INIT(_rt) \ mtx_init(&(_rt)->rt_mtx, "rtentry", NULL, MTX_DEF | MTX_DUPOK) From owner-svn-src-all@FreeBSD.ORG Fri Apr 2 05:12:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 704571065679; Fri, 2 Apr 2010 05:12:46 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5E4608FC12; Fri, 2 Apr 2010 05:12:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o325CkAn057031; Fri, 2 Apr 2010 05:12:46 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o325CkSn057025; Fri, 2 Apr 2010 05:12:46 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <201004020512.o325CkSn057025@svn.freebsd.org> From: Qing Li Date: Fri, 2 Apr 2010 05:12: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: r206069 - in stable/8: sbin/ifconfig sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2010 05:12:46 -0000 Author: qingli Date: Fri Apr 2 05:12:46 2010 New Revision: 206069 URL: http://svn.freebsd.org/changeset/base/206069 Log: MFC 205222 Verify interface up status using its link state only if the interface has such capability. The interface capability flag indicates whether such capability exists. This approach is much more backward compatible. Physical device driver changes will be part of another commit. Also updated the ifconfig utility to show the LINKSTATE capability if present. Reviewed by: rwatson, imp, juli Modified: stable/8/sbin/ifconfig/ifconfig.c stable/8/sys/net/if.h stable/8/sys/net/if_tap.c stable/8/sys/net/if_tun.c stable/8/sys/net/route.h Directory Properties: stable/8/sbin/ (props changed) stable/8/sbin/atacontrol/ (props changed) stable/8/sbin/bsdlabel/ (props changed) stable/8/sbin/camcontrol/ (props changed) stable/8/sbin/ddb/ (props changed) stable/8/sbin/devfs/ (props changed) stable/8/sbin/dhclient/ (props changed) stable/8/sbin/dump/ (props changed) stable/8/sbin/dumpfs/ (props changed) stable/8/sbin/fsck/ (props changed) stable/8/sbin/fsck_ffs/ (props changed) stable/8/sbin/geom/ (props changed) stable/8/sbin/geom/class/stripe/ (props changed) stable/8/sbin/ggate/ (props changed) stable/8/sbin/growfs/ (props changed) stable/8/sbin/ifconfig/ (props changed) stable/8/sbin/ipfw/ (props changed) stable/8/sbin/iscontrol/ (props changed) stable/8/sbin/mdconfig/ (props changed) stable/8/sbin/mksnap_ffs/ (props changed) stable/8/sbin/mount/ (props changed) stable/8/sbin/mount_cd9660/ (props changed) stable/8/sbin/mount_msdosfs/ (props changed) stable/8/sbin/mount_nfs/ (props changed) stable/8/sbin/natd/ (props changed) stable/8/sbin/newfs/ (props changed) stable/8/sbin/restore/ (props changed) stable/8/sbin/routed/ (props changed) stable/8/sbin/sysctl/ (props changed) stable/8/sbin/tunefs/ (props changed) stable/8/sbin/umount/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/net/ (props changed) Modified: stable/8/sbin/ifconfig/ifconfig.c ============================================================================== --- stable/8/sbin/ifconfig/ifconfig.c Fri Apr 2 05:05:51 2010 (r206068) +++ stable/8/sbin/ifconfig/ifconfig.c Fri Apr 2 05:12:46 2010 (r206069) @@ -865,7 +865,7 @@ unsetifdescr(const char *val, int value, #define IFCAPBITS \ "\020\1RXCSUM\2TXCSUM\3NETCONS\4VLAN_MTU\5VLAN_HWTAGGING\6JUMBO_MTU\7POLLING" \ "\10VLAN_HWCSUM\11TSO4\12TSO6\13LRO\14WOL_UCAST\15WOL_MCAST\16WOL_MAGIC" \ -"\21VLAN_HWFILTER\23VLAN_HWTSO" +"\21VLAN_HWFILTER\23VLAN_HWTSO\24LINKSTATE" /* * Print the status of the interface. If an address family was Modified: stable/8/sys/net/if.h ============================================================================== --- stable/8/sys/net/if.h Fri Apr 2 05:05:51 2010 (r206068) +++ stable/8/sys/net/if.h Fri Apr 2 05:12:46 2010 (r206069) @@ -219,6 +219,7 @@ struct if_data { #define IFCAP_VLAN_HWFILTER 0x10000 /* interface hw can filter vlan tag */ #define IFCAP_POLLING_NOCOUNT 0x20000 /* polling ticks cannot be fragmented */ #define IFCAP_VLAN_HWTSO 0x40000 /* can do IFCAP_TSO on VLANs */ +#define IFCAP_LINKSTATE 0x80000 /* the runtime link state is dynamic */ #define IFCAP_HWCSUM (IFCAP_RXCSUM | IFCAP_TXCSUM) #define IFCAP_TSO (IFCAP_TSO4 | IFCAP_TSO6) Modified: stable/8/sys/net/if_tap.c ============================================================================== --- stable/8/sys/net/if_tap.c Fri Apr 2 05:05:51 2010 (r206068) +++ stable/8/sys/net/if_tap.c Fri Apr 2 05:12:46 2010 (r206069) @@ -443,6 +443,8 @@ tapcreate(struct cdev *dev) ifp->if_mtu = ETHERMTU; ifp->if_flags = (IFF_BROADCAST|IFF_SIMPLEX|IFF_MULTICAST); ifp->if_snd.ifq_maxlen = ifqmaxlen; + ifp->if_capabilities |= IFCAP_LINKSTATE; + ifp->if_capenable |= IFCAP_LINKSTATE; dev->si_drv1 = tp; tp->tap_dev = dev; Modified: stable/8/sys/net/if_tun.c ============================================================================== --- stable/8/sys/net/if_tun.c Fri Apr 2 05:05:51 2010 (r206068) +++ stable/8/sys/net/if_tun.c Fri Apr 2 05:12:46 2010 (r206069) @@ -386,6 +386,8 @@ tuncreate(const char *name, struct cdev ifp->if_snd.ifq_drv_maxlen = 0; IFQ_SET_READY(&ifp->if_snd); knlist_init_mtx(&sc->tun_rsel.si_note, NULL); + ifp->if_capabilities |= IFCAP_LINKSTATE; + ifp->if_capenable |= IFCAP_LINKSTATE; if_attach(ifp); bpfattach(ifp, DLT_NULL, sizeof(u_int32_t)); Modified: stable/8/sys/net/route.h ============================================================================== --- stable/8/sys/net/route.h Fri Apr 2 05:05:51 2010 (r206068) +++ stable/8/sys/net/route.h Fri Apr 2 05:12:46 2010 (r206069) @@ -319,8 +319,7 @@ struct rt_addrinfo { #ifdef _KERNEL -#define RT_LINK_IS_UP(ifp) (((ifp)->if_flags & \ - (IFF_LOOPBACK | IFF_POINTOPOINT)) \ +#define RT_LINK_IS_UP(ifp) (!((ifp)->if_capabilities & IFCAP_LINKSTATE) \ || (ifp)->if_link_state == LINK_STATE_UP) #define RT_LOCK_INIT(_rt) \ From owner-svn-src-all@FreeBSD.ORG Fri Apr 2 05:15:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA2E91065686; Fri, 2 Apr 2010 05:15:27 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C8B518FC18; Fri, 2 Apr 2010 05:15: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 o325FRpT057707; Fri, 2 Apr 2010 05:15:27 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o325FRLP057705; Fri, 2 Apr 2010 05:15:27 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <201004020515.o325FRLP057705@svn.freebsd.org> From: Qing Li Date: Fri, 2 Apr 2010 05:15:27 +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: r206071 - stable/8/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: Fri, 02 Apr 2010 05:15:28 -0000 Author: qingli Date: Fri Apr 2 05:15:27 2010 New Revision: 206071 URL: http://svn.freebsd.org/changeset/base/206071 Log: MFC 205268 Set the device capabilities to include dynamic link-state for those modern drivers. Reviewed by: imp (and suggested by imp) Modified: stable/8/sys/dev/mii/mii.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) stable/8/sys/net/ (props changed) Modified: stable/8/sys/dev/mii/mii.c ============================================================================== --- stable/8/sys/dev/mii/mii.c Fri Apr 2 05:14:57 2010 (r206070) +++ stable/8/sys/dev/mii/mii.c Fri Apr 2 05:15:27 2010 (r206071) @@ -180,6 +180,8 @@ miibus_attach(device_t dev) * XXX: EVIL HACK! */ mii->mii_ifp = *(struct ifnet**)device_get_softc(device_get_parent(dev)); + mii->mii_ifp->if_capabilities |= IFCAP_LINKSTATE; + mii->mii_ifp->if_capenable |= IFCAP_LINKSTATE; ivars = device_get_ivars(dev); ifmedia_init(&mii->mii_media, IFM_IMASK, ivars->ifmedia_upd, ivars->ifmedia_sts); From owner-svn-src-all@FreeBSD.ORG Fri Apr 2 06:50:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ACE9210656C4; Fri, 2 Apr 2010 06:50:28 +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 9B2DB8FC0A; Fri, 2 Apr 2010 06:50: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 o326oSDW078770; Fri, 2 Apr 2010 06:50:28 GMT (envelope-from netchild@svn.freebsd.org) Received: (from netchild@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o326oSRo078768; Fri, 2 Apr 2010 06:50:28 GMT (envelope-from netchild@svn.freebsd.org) Message-Id: <201004020650.o326oSRo078768@svn.freebsd.org> From: Alexander Leidinger Date: Fri, 2 Apr 2010 06:50: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: r206081 - head/sys/compat/linprocfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Apr 2010 06:50:28 -0000 Author: netchild Date: Fri Apr 2 06:50:28 2010 New Revision: 206081 URL: http://svn.freebsd.org/changeset/base/206081 Log: Re-apply r205683 with some modifications: Fix some bogus values in linprocfs. Submitted by: Petr Salinger Verified on: GNU/kFreeBSD debian 8.0-1-686 (by submitter) PR: 144584 Reviewed by / discussed with: kib, des, jhb, submitter Modified: head/sys/compat/linprocfs/linprocfs.c Modified: head/sys/compat/linprocfs/linprocfs.c ============================================================================== --- head/sys/compat/linprocfs/linprocfs.c Fri Apr 2 06:41:45 2010 (r206080) +++ head/sys/compat/linprocfs/linprocfs.c Fri Apr 2 06:50:28 2010 (r206081) @@ -110,12 +110,14 @@ __FBSDID("$FreeBSD$"); /* * Various conversion macros */ -#define T2J(x) (((x) * 100UL) / (stathz ? stathz : hz)) /* ticks to jiffies */ +#define T2J(x) ((long)(((x) * 100ULL) / (stathz ? stathz : hz))) /* ticks to jiffies */ +#define T2CS(x) ((unsigned long)(((x) * 100ULL) / (stathz ? stathz : hz))) /* ticks to centiseconds */ #define T2S(x) ((x) / (stathz ? stathz : hz)) /* ticks to seconds */ #define B2K(x) ((x) >> 10) /* bytes to kbytes */ #define B2P(x) ((x) >> PAGE_SHIFT) /* bytes to pages */ #define P2B(x) ((x) << PAGE_SHIFT) /* pages to bytes */ #define P2K(x) ((x) << (PAGE_SHIFT - 10)) /* pages to kbytes */ +#define TV2J(x) ((x)->tv_sec * 100UL + (x)->tv_usec / 10000) /** * @brief Mapping of ki_stat in struct kinfo_proc to the linux state @@ -505,9 +507,10 @@ linprocfs_douptime(PFS_FILL_ARGS) getmicrouptime(&tv); read_cpu_time(cp_time); - sbuf_printf(sb, "%lld.%02ld %ld.%02ld\n", + sbuf_printf(sb, "%lld.%02ld %ld.%02lu\n", (long long)tv.tv_sec, tv.tv_usec / 10000, - T2S(cp_time[CP_IDLE]), T2J(cp_time[CP_IDLE]) % 100); + T2S(cp_time[CP_IDLE] / mp_ncpus), + T2CS(cp_time[CP_IDLE] / mp_ncpus) % 100); return (0); } @@ -613,9 +616,17 @@ linprocfs_doprocstat(PFS_FILL_ARGS) struct kinfo_proc kp; char state; static int ratelimit = 0; + vm_offset_t startcode, startdata; PROC_LOCK(p); fill_kinfo_proc(p, &kp); + if (p->p_vmspace) { + startcode = (vm_offset_t)p->p_vmspace->vm_taddr; + startdata = (vm_offset_t)p->p_vmspace->vm_daddr; + } else { + startcode = 0; + startdata = 0; + }; sbuf_printf(sb, "%d", p->p_pid); #define PS_ADD(name, fmt, arg) sbuf_printf(sb, " " fmt, arg) PS_ADD("comm", "(%s)", p->p_comm); @@ -634,30 +645,27 @@ linprocfs_doprocstat(PFS_FILL_ARGS) PS_ADD("pgrp", "%d", p->p_pgid); PS_ADD("session", "%d", p->p_session->s_sid); PROC_UNLOCK(p); - PS_ADD("tty", "%d", 0); /* XXX */ + PS_ADD("tty", "%d", kp.ki_tdev); PS_ADD("tpgid", "%d", kp.ki_tpgid); PS_ADD("flags", "%u", 0); /* XXX */ PS_ADD("minflt", "%lu", kp.ki_rusage.ru_minflt); PS_ADD("cminflt", "%lu", kp.ki_rusage_ch.ru_minflt); PS_ADD("majflt", "%lu", kp.ki_rusage.ru_majflt); PS_ADD("cmajflt", "%lu", kp.ki_rusage_ch.ru_majflt); - PS_ADD("utime", "%ld", T2J(tvtohz(&kp.ki_rusage.ru_utime))); - PS_ADD("stime", "%ld", T2J(tvtohz(&kp.ki_rusage.ru_stime))); - PS_ADD("cutime", "%ld", T2J(tvtohz(&kp.ki_rusage_ch.ru_utime))); - PS_ADD("cstime", "%ld", T2J(tvtohz(&kp.ki_rusage_ch.ru_stime))); + PS_ADD("utime", "%ld", TV2J(&kp.ki_rusage.ru_utime)); + PS_ADD("stime", "%ld", TV2J(&kp.ki_rusage.ru_stime)); + PS_ADD("cutime", "%ld", TV2J(&kp.ki_rusage_ch.ru_utime)); + PS_ADD("cstime", "%ld", TV2J(&kp.ki_rusage_ch.ru_stime)); PS_ADD("priority", "%d", kp.ki_pri.pri_user); PS_ADD("nice", "%d", kp.ki_nice); /* 19 (nicest) to -19 */ PS_ADD("0", "%d", 0); /* removed field */ PS_ADD("itrealvalue", "%d", 0); /* XXX */ - /* XXX: starttime is not right, it is the _same_ for _every_ process. - It should be the number of jiffies between system boot and process - start. */ - PS_ADD("starttime", "%lu", T2J(tvtohz(&kp.ki_start))); + PS_ADD("starttime", "%lu", TV2J(&kp.ki_start) - TV2J(&boottime)); PS_ADD("vsize", "%ju", P2K((uintmax_t)kp.ki_size)); PS_ADD("rss", "%ju", (uintmax_t)kp.ki_rssize); PS_ADD("rlim", "%lu", kp.ki_rusage.ru_maxrss); - PS_ADD("startcode", "%u", (unsigned)0); - PS_ADD("endcode", "%u", 0); /* XXX */ + PS_ADD("startcode", "%ju", (uintmax_t)startcode); + PS_ADD("endcode", "%ju", (uintmax_t)startdata); PS_ADD("startstack", "%u", 0); /* XXX */ PS_ADD("kstkesp", "%u", 0); /* XXX */ PS_ADD("kstkeip", "%u", 0); /* XXX */ @@ -800,7 +808,7 @@ linprocfs_doprocstatus(PFS_FILL_ARGS) */ sbuf_printf(sb, "VmSize:\t%8ju kB\n", B2K((uintmax_t)kp.ki_size)); sbuf_printf(sb, "VmLck:\t%8u kB\n", P2K(0)); /* XXX */ - sbuf_printf(sb, "VmRss:\t%8ju kB\n", P2K((uintmax_t)kp.ki_rssize)); + sbuf_printf(sb, "VmRSS:\t%8ju kB\n", P2K((uintmax_t)kp.ki_rssize)); sbuf_printf(sb, "VmData:\t%8ju kB\n", P2K((uintmax_t)kp.ki_dsize)); sbuf_printf(sb, "VmStk:\t%8ju kB\n", P2K((uintmax_t)kp.ki_ssize)); sbuf_printf(sb, "VmExe:\t%8ju kB\n", P2K((uintmax_t)kp.ki_tsize)); From owner-svn-src-all@FreeBSD.ORG Fri Apr 2 06:55:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3FCC71065672; Fri, 2 Apr 2010 06:55:32 +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 2CB678FC13; Fri, 2 Apr 2010 06:55: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 o326tWZV079893; Fri, 2 Apr 2010 06:55:32 GMT (envelope-from netchild@svn.freebsd.org) Received: (from netchild@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o326tWax079882; Fri, 2 Apr 2010 06:55:32 GMT (envelope-from netchild@svn.freebsd.org) Message-Id: <201004020655.o326tWax079882@svn.freebsd.org> From: Alexander Leidinger Date: Fri, 2 Apr 2010 06:55: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: r206082 - in head: . share/man/man7 share/mk sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2010 06:55:32 -0000 Author: netchild Date: Fri Apr 2 06:55:31 2010 New Revision: 206082 URL: http://svn.freebsd.org/changeset/base/206082 Log: WITH_CTF can now be specified in src.conf (not recommended, there are some problems with static executables), make.conf (would also affect ports which do not use GNU make and do not override the compile targets) or in the kernel config (via "makeoptions WITH_CTF=yes"). Additional (related) changes: - propagate WITH_CTF to module builds - do not add -g to the linker flags, it's a noop there anyway (at least according to the man page of ld) - do not add -g to CFLAGS unconditionally we need to have a look if it is really needed (IMO not) or if there is a way to add it only when WITH_CTF is used Note: ctfconvert / ctfmerge lines will not appear in the build output, to protect the innocent (those which do not build with WITH_CTF would see the shell-test and may think WITH_CTF is used). Reviewed by: imp, jhb, scottl (earlier version) Discussed on: arch@ Modified: head/UPDATING head/share/man/man7/build.7 head/share/mk/bsd.lib.mk head/share/mk/bsd.port.mk head/share/mk/bsd.prog.mk head/share/mk/sys.mk head/sys/conf/kern.mk head/sys/conf/kern.post.mk head/sys/conf/kern.pre.mk head/sys/conf/kmod.mk Modified: head/UPDATING ============================================================================== --- head/UPDATING Fri Apr 2 06:50:28 2010 (r206081) +++ head/UPDATING Fri Apr 2 06:55:31 2010 (r206082) @@ -22,6 +22,16 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. machines to maximize performance. (To disable malloc debugging, run ln -s aj /etc/malloc.conf.) +20100402: + WITH_CTF can now be specified in src.conf (not recommended, there + are some problems with static executables), make.conf (would also + affect ports which do not use GNU make and do not override the + compile targets) or in the kernel config (via "makeoptions + WITH_CTF=yes"). + When WITH_CTF was specified there before this was silently ignored, + so make sure that WITH_CTF is not used in places which could lead + to unwanted behavior. + 20100311: The kernel option COMPAT_IA32 has been replaced with COMPAT_FREEBSD32 to allow 32-bit compatibility on non-x86 platforms. All kernel Modified: head/share/man/man7/build.7 ============================================================================== --- head/share/man/man7/build.7 Fri Apr 2 06:50:28 2010 (r206081) +++ head/share/man/man7/build.7 Fri Apr 2 06:55:31 2010 (r206082) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 31, 2010 +.Dd April 02, 2010 .Dt BUILD 7 .Os .Sh NAME @@ -341,6 +341,15 @@ or the command line. .It Va NO_WERROR If defined, compiler warnings will not cause the build to halt, even if the makefile says otherwise. +.It Va WITH_CTF +If defined, the build process will run the DTrace CTF conversion +tools on built objects. +Please note that this WITH_ option is handled differently than all +other WITH_ options (there is no +.Va WITHOUT_CTF , +or corresponding +.Va MK_CTF +in the build system). .El .Pp Additionally, builds in Modified: head/share/mk/bsd.lib.mk ============================================================================== --- head/share/mk/bsd.lib.mk Fri Apr 2 06:50:28 2010 (r206081) +++ head/share/mk/bsd.lib.mk Fri Apr 2 06:55:31 2010 (r206082) @@ -33,6 +33,11 @@ CFLAGS+= -DNDEBUG NO_WERROR= .endif +# Enable CTF conversion on request. +.if defined(WITH_CTF) +.undef NO_CTF +.endif + .if defined(DEBUG_FLAGS) CFLAGS+= ${DEBUG_FLAGS} @@ -68,15 +73,11 @@ PO_FLAG=-pg .c.po: ${CC} ${PO_FLAG} ${PO_CFLAGS} -c ${.IMPSRC} -o ${.TARGET} -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .c.So: ${CC} ${PICFLAG} -DPIC ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET} -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .cc.po .C.po .cpp.po .cxx.po: ${CXX} ${PO_FLAG} ${PO_CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET} @@ -86,58 +87,40 @@ PO_FLAG=-pg .f.po: ${FC} -pg ${FFLAGS} -o ${.TARGET} -c ${.IMPSRC} -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .f.So: ${FC} ${PICFLAG} -DPIC ${FFLAGS} -o ${.TARGET} -c ${.IMPSRC} -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .m.po: ${OBJC} ${OBJCFLAGS} -pg -c ${.IMPSRC} -o ${.TARGET} -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .m.So: ${OBJC} ${PICFLAG} -DPIC ${OBJCFLAGS} -c ${.IMPSRC} -o ${.TARGET} -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .s.po .s.So: ${AS} ${AFLAGS} -o ${.TARGET} ${.IMPSRC} -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .asm.po: ${CC} -x assembler-with-cpp -DPROF ${PO_CFLAGS} -c ${.IMPSRC} -o ${.TARGET} -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .asm.So: ${CC} -x assembler-with-cpp ${PICFLAG} -DPIC ${CFLAGS} \ -c ${.IMPSRC} -o ${.TARGET} -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .S.po: ${CC} -DPROF ${PO_CFLAGS} -c ${.IMPSRC} -o ${.TARGET} -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .S.So: ${CC} ${PICFLAG} -DPIC ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET} -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} all: objwarn @@ -208,9 +191,7 @@ ${SHLIB_NAME}: ${SOBJS} -o ${.TARGET} -Wl,-soname,${SONAME} \ `NM='${NM}' lorder ${SOBJS} | tsort -q` ${LDADD} .endif -.if defined(CTFMERGE) - ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SOBJS} -.endif + @[ -z "${CTFMERGE}" -o -n "${NO_CTF}" ] || ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SOBJS} .endif .if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) && ${MK_TOOLCHAIN} != "no" Modified: head/share/mk/bsd.port.mk ============================================================================== --- head/share/mk/bsd.port.mk Fri Apr 2 06:50:28 2010 (r206081) +++ head/share/mk/bsd.port.mk Fri Apr 2 06:55:31 2010 (r206082) @@ -7,5 +7,10 @@ BSDPORTMK?= ${PORTSDIR}/Mk/bsd.port.mk # and setting MK_* variables when building ports. _WITHOUT_SRCCONF= +# Enable CTF conversion on request. +.if defined(WITH_CTF) +.undef NO_CTF +.endif + .include .include "${BSDPORTMK}" Modified: head/share/mk/bsd.prog.mk ============================================================================== --- head/share/mk/bsd.prog.mk Fri Apr 2 06:50:28 2010 (r206081) +++ head/share/mk/bsd.prog.mk Fri Apr 2 06:55:31 2010 (r206082) @@ -15,6 +15,11 @@ CFLAGS+= -DNDEBUG NO_WERROR= .endif +# Enable CTF conversion on request. +.if defined(WITH_CTF) +.undef NO_CTF +.endif + .if defined(DEBUG_FLAGS) CFLAGS+=${DEBUG_FLAGS} CXXFLAGS+=${DEBUG_FLAGS} @@ -61,9 +66,7 @@ ${PROG}: ${OBJS} .else ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD} .endif -.if defined(CTFMERGE) - ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} -.endif + @[ -z "${CTFMERGE}" -o -n "${NO_CTF}" ] || ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} .else # !defined(SRCS) @@ -87,9 +90,7 @@ ${PROG}: ${OBJS} .else ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD} .endif -.if defined(CTFMERGE) - ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} -.endif + @[ -z "${CTFMERGE}" -o -n "${NO_CTF}" ] || ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} .endif .endif Modified: head/share/mk/sys.mk ============================================================================== --- head/share/mk/sys.mk Fri Apr 2 06:50:28 2010 (r206081) +++ head/share/mk/sys.mk Fri Apr 2 06:55:31 2010 (r206082) @@ -55,14 +55,14 @@ NO_CTF = 1 # C Type Format data is required for DTrace CTFFLAGS ?= -L VERSION -.if !defined(NO_CTF) CTFCONVERT ?= ctfconvert CTFMERGE ?= ctfmerge .if defined(CFLAGS) && (${CFLAGS:M-g} != "") CTFFLAGS += -g .else -CFLAGS += -g -.endif +# XXX: What to do here? Is removing the CFLAGS part completely ok here? +# For now comment it out to not compile with -g unconditionally. +#CFLAGS += -g .endif CXX ?= c++ @@ -144,15 +144,11 @@ YFLAGS ?= -d # SINGLE SUFFIX RULES .c: ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.IMPSRC} -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .f: ${FC} ${FFLAGS} ${LDFLAGS} -o ${.TARGET} ${.IMPSRC} -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .sh: cp ${.IMPSRC} ${.TARGET} @@ -162,33 +158,25 @@ YFLAGS ?= -d .c.o: ${CC} ${CFLAGS} -c ${.IMPSRC} -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .f.o: ${FC} ${FFLAGS} -c ${.IMPSRC} -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .y.o: ${YACC} ${YFLAGS} ${.IMPSRC} ${CC} ${CFLAGS} -c y.tab.c rm -f y.tab.c mv y.tab.o ${.TARGET} -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .l.o: ${LEX} ${LFLAGS} ${.IMPSRC} ${CC} ${CFLAGS} -c lex.yy.c rm -f lex.yy.c mv lex.yy.o ${.TARGET} -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .y.c: ${YACC} ${YFLAGS} ${.IMPSRC} @@ -226,15 +214,11 @@ YFLAGS ?= -d .c: ${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .c.o: ${CC} ${CFLAGS} -c ${.IMPSRC} -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .cc .cpp .cxx .C: ${CXX} ${CXXFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} @@ -244,15 +228,11 @@ YFLAGS ?= -d .m.o: ${OBJC} ${OBJCFLAGS} -c ${.IMPSRC} -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .p.o: ${PC} ${PFLAGS} -c ${.IMPSRC} -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .e .r .F .f: ${FC} ${RFLAGS} ${EFLAGS} ${FFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} \ @@ -263,38 +243,28 @@ YFLAGS ?= -d .S.o: ${CC} ${CFLAGS} -c ${.IMPSRC} -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .asm.o: ${CC} -x assembler-with-cpp ${CFLAGS} -c ${.IMPSRC} -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .s.o: ${AS} ${AFLAGS} -o ${.TARGET} ${.IMPSRC} -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} # XXX not -j safe .y.o: ${YACC} ${YFLAGS} ${.IMPSRC} ${CC} ${CFLAGS} -c y.tab.c -o ${.TARGET} rm -f y.tab.c -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .l.o: ${LEX} -t ${LFLAGS} ${.IMPSRC} > ${.PREFIX}.tmp.c ${CC} ${CFLAGS} -c ${.PREFIX}.tmp.c -o ${.TARGET} rm -f ${.PREFIX}.tmp.c -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} # XXX not -j safe .y.c: @@ -306,34 +276,26 @@ YFLAGS ?= -d .s.out .c.out .o.out: ${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .f.out .F.out .r.out .e.out: ${FC} ${EFLAGS} ${RFLAGS} ${FFLAGS} ${LDFLAGS} ${.IMPSRC} \ ${LDLIBS} -o ${.TARGET} rm -f ${.PREFIX}.o -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} # XXX not -j safe .y.out: ${YACC} ${YFLAGS} ${.IMPSRC} ${CC} ${CFLAGS} ${LDFLAGS} y.tab.c ${LDLIBS} -ly -o ${.TARGET} rm -f y.tab.c -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .l.out: ${LEX} -t ${LFLAGS} ${.IMPSRC} > ${.PREFIX}.tmp.c ${CC} ${CFLAGS} ${LDFLAGS} ${.PREFIX}.tmp.c ${LDLIBS} -ll -o ${.TARGET} rm -f ${.PREFIX}.tmp.c -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} # FreeBSD build pollution. Hide it in the non-POSIX part of the ifdef. __MAKE_CONF?=/etc/make.conf Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Fri Apr 2 06:50:28 2010 (r206081) +++ head/sys/conf/kern.mk Fri Apr 2 06:55:31 2010 (r206082) @@ -108,3 +108,11 @@ CFLAGS+= -restrict ${MACHINE_ARCH} != "arm" && ${MACHINE_ARCH} != "mips" CFLAGS+= -fstack-protector .endif + +# +# Enable CTF conversation on request. +# +.if defined(WITH_CTF) +.undef NO_CTF +.endif + Modified: head/sys/conf/kern.post.mk ============================================================================== --- head/sys/conf/kern.post.mk Fri Apr 2 06:50:28 2010 (r206081) +++ head/sys/conf/kern.post.mk Fri Apr 2 06:55:31 2010 (r206082) @@ -19,6 +19,10 @@ MKMODULESENV+= KERNBUILDDIR="${.CURDIR}" MKMODULESENV+= CONF_CFLAGS="${CONF_CFLAGS}" .endif +.if defined(WITH_CTF) +MKMODULESENV+= WITH_CTF="${WITH_CTF}" +.endif + .MAIN: all .for target in all clean cleandepend cleandir clobber depend install \ @@ -90,9 +94,7 @@ ${FULLKERNEL}: ${SYSTEM_DEP} vers.o @rm -f ${.TARGET} @echo linking ${.TARGET} ${SYSTEM_LD} -.if defined(CTFMERGE) - ${SYSTEM_CTFMERGE} -.endif + @${SYSTEM_CTFMERGE} .if !defined(DEBUG) ${OBJCOPY} --strip-debug ${.TARGET} .endif @@ -240,9 +242,7 @@ kernel-reinstall: config.o env.o hints.o vers.o vnode_if.o: ${NORMAL_C} -.if defined(CTFCONVERT) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} config.ln env.ln hints.ln vers.ln vnode_if.ln: ${NORMAL_LINT} Modified: head/sys/conf/kern.pre.mk ============================================================================== --- head/sys/conf/kern.pre.mk Fri Apr 2 06:50:28 2010 (r206081) +++ head/sys/conf/kern.pre.mk Fri Apr 2 06:55:31 2010 (r206082) @@ -128,11 +128,7 @@ NORMAL_C_NOWERROR= ${CC} -c ${CFLAGS} ${ NORMAL_M= ${AWK} -f $S/tools/makeobjops.awk ${.IMPSRC} -c ; \ ${CC} -c ${CFLAGS} ${WERROR} ${PROF} ${.PREFIX}.c -.if defined(CTFCONVERT) -NORMAL_CTFCONVERT= ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.else -NORMAL_CTFCONVERT= -.endif +NORMAL_CTFCONVERT= [ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} NORMAL_LINT= ${LINT} ${LINTFLAGS} ${CFLAGS:M-[DIU]*} ${.IMPSRC} @@ -142,10 +138,7 @@ SYSTEM_DEP= Makefile ${SYSTEM_OBJS} SYSTEM_OBJS= locore.o ${MDOBJS} ${OBJS} SYSTEM_OBJS+= ${SYSTEM_CFILES:.c=.o} SYSTEM_OBJS+= hack.So -.if defined(CTFMERGE) -SYSTEM_CTFMERGE= ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SYSTEM_OBJS} vers.o -LD+= -g -.endif +SYSTEM_CTFMERGE= [ -z "${CTFMERGE}" -o -n "${NO_CTF}" ] || ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SYSTEM_OBJS} vers.o SYSTEM_LD= @${LD} -Bdynamic -T ${LDSCRIPT} \ -warn-common -export-dynamic -dynamic-linker /red/herring \ -o ${.TARGET} -X ${SYSTEM_OBJS} vers.o Modified: head/sys/conf/kmod.mk ============================================================================== --- head/sys/conf/kmod.mk Fri Apr 2 06:50:28 2010 (r206081) +++ head/sys/conf/kmod.mk Fri Apr 2 06:55:31 2010 (r206082) @@ -69,6 +69,11 @@ OBJCOPY?= objcopy .error "Do not use KMODDEPS on 5.0+; use MODULE_VERSION/MODULE_DEPEND" .endif +# Enable CTF conversion on request. +.if defined(WITH_CTF) +.undef NO_CTF +.endif + .include .SUFFIXES: .out .o .c .cc .cxx .C .y .l .s .S From owner-svn-src-all@FreeBSD.ORG Fri Apr 2 07:52:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 478BB1065673; Fri, 2 Apr 2010 07:52:15 +0000 (UTC) (envelope-from ndenev@gmail.com) Received: from mail-fx0-f209.google.com (mail-fx0-f209.google.com [209.85.220.209]) by mx1.freebsd.org (Postfix) with ESMTP id 7255A8FC14; Fri, 2 Apr 2010 07:52:13 +0000 (UTC) Received: by fxm1 with SMTP id 1so1291032fxm.13 for ; Fri, 02 Apr 2010 00:52:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:mime-version :content-type:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to:x-mailer; bh=+j98N9MwjY3nz1iK2oAYRcIkQyPC3uFGwV5XfKCkT7M=; b=CCx6L/AMaDzvXM751mj1ZWzM6+9WPj3D49EgP7D3OOuHSjbCmiwTrCeHGkpuvNDR2X tfTI1cxsb1MHYwuv/brI3kZEAsszXr3AnYqNRiYGn72YW36Pig8wiV0GaAdHd85S/yIH yweyo3MuBsDobNaDYvx7sMjbi8WGgd0cVGBLI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=iXPEMbBu9bM+aKszZKHbHhjw1L6L9qCGElJU4UDHrV3+X0JxhV27uBLfyEP9Cg/2Gh LZlvBTn6/Y23zH0DZ9UCjKMNevJGvh9iYWACsLXJlXvYgt++OlQmaCc11JP3mKsuVij9 UgCHFNMKHsv+ggCVjH56iVrCO98eiloR62Txg= Received: by 10.223.101.80 with SMTP id b16mr1680144fao.25.1270194732196; Fri, 02 Apr 2010 00:52:12 -0700 (PDT) Received: from mbp-gige.totalterror.net (93-152-151-19.ddns.onlinedirect.bg [93.152.151.19]) by mx.google.com with ESMTPS id 19sm19490275fkr.39.2010.04.02.00.52.10 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 02 Apr 2010 00:52:10 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v1078) Content-Type: text/plain; charset=us-ascii From: Nikolay Denev In-Reply-To: <201004020655.o326tWax079882@svn.freebsd.org> Date: Fri, 2 Apr 2010 10:52:08 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201004020655.o326tWax079882@svn.freebsd.org> To: Alexander Leidinger X-Mailer: Apple Mail (2.1078) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r206082 - in head: . share/man/man7 share/mk sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2010 07:52:15 -0000 On 2 Apr, 2010, at 09:55 , Alexander Leidinger wrote: > Author: netchild > Date: Fri Apr 2 06:55:31 2010 > New Revision: 206082 > URL: http://svn.freebsd.org/changeset/base/206082 >=20 > Log: > WITH_CTF can now be specified in src.conf (not recommended, there > are some problems with static executables), make.conf (would also > affect ports which do not use GNU make and do not override the > compile targets) or in the kernel config (via "makeoptions > WITH_CTF=3Dyes"). >=20 > Additional (related) changes: > - propagate WITH_CTF to module builds > - do not add -g to the linker flags, it's a noop there anyway > (at least according to the man page of ld) > - do not add -g to CFLAGS unconditionally > we need to have a look if it is really needed (IMO not) or if = there > is a way to add it only when WITH_CTF is used >=20 > Note: ctfconvert / ctfmerge lines will not appear in the build = output, > to protect the innocent (those which do not build with WITH_CTF would > see the shell-test and may think WITH_CTF is used). >=20 > Reviewed by: imp, jhb, scottl (earlier version) > Discussed on: arch@ >=20 > Modified: > head/UPDATING > head/share/man/man7/build.7 > head/share/mk/bsd.lib.mk > head/share/mk/bsd.port.mk > head/share/mk/bsd.prog.mk > head/share/mk/sys.mk > head/sys/conf/kern.mk > head/sys/conf/kern.post.mk > head/sys/conf/kern.pre.mk > head/sys/conf/kmod.mk >=20 Finally! Thanks for this. I got tired of rebuilding kernels after = accidentally forgetting to put WITH_CTF on the make command line. :) I hope that this can also be MFC-ed to 8-STABLE at least. Regards, Niki= From owner-svn-src-all@FreeBSD.ORG Fri Apr 2 08:23:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F4B01065672; Fri, 2 Apr 2010 08:23:38 +0000 (UTC) (envelope-from netchild@freebsd.org) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id 3F3588FC08; Fri, 2 Apr 2010 08:23:38 +0000 (UTC) Received: from outgoing.leidinger.net (pD9E2CC21.dip.t-dialin.net [217.226.204.33]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id 15B428442CC; Fri, 2 Apr 2010 10:23:33 +0200 (CEST) Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id E52515081; Fri, 2 Apr 2010 10:23:29 +0200 (CEST) Received: (from www@localhost) by webmail.leidinger.net (8.14.3/8.13.8/Submit) id o328NTTJ097447; Fri, 2 Apr 2010 10:23:29 +0200 (CEST) (envelope-from netchild@FreeBSD.org) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Fri, 02 Apr 2010 10:23:29 +0200 Message-ID: <20100402102329.18472x2t5iwey7qc@webmail.leidinger.net> Date: Fri, 02 Apr 2010 10:23:29 +0200 From: Alexander Leidinger To: Nikolay Denev References: <201004020655.o326tWax079882@svn.freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Dynamic Internet Messaging Program (DIMP) H3 (1.1.4) X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: 15B428442CC.5A132 X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=-1.363, required 6, autolearn=disabled, ALL_TRUSTED -1.44, TW_SV 0.08) X-EBL-MailScanner-From: netchild@freebsd.org X-EBL-MailScanner-Watermark: 1270801413.78583@8eLCW7O5TUj5x5le5I/1rg X-EBL-Spam-Status: No Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r206082 - in head: . share/man/man7 share/mk sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2010 08:23:38 -0000 Quoting Nikolay Denev (from Fri, 2 Apr 2010 10:52:08 +0300): >> Log: >> WITH_CTF can now be specified in src.conf (not recommended, there >> are some problems with static executables), make.conf (would also >> affect ports which do not use GNU make and do not override the >> compile targets) or in the kernel config (via "makeoptions >> WITH_CTF=yes"). > I hope that this can also be MFC-ed to 8-STABLE at least. Except for build.7 and UPDATING, I would expect that everything should just apply if you try it on 8-stable. Just go and try (and report back). Bye, Alexander. -- http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 Keep your boss's boss off your boss's back. From owner-svn-src-all@FreeBSD.ORG Fri Apr 2 08:54:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 79B991065670; Fri, 2 Apr 2010 08:54:31 +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 63B1A8FC14; Fri, 2 Apr 2010 08:54: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 o328sV6p006012; Fri, 2 Apr 2010 08:54:31 GMT (envelope-from rdivacky@svn.freebsd.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o328sUQh005984; Fri, 2 Apr 2010 08:54:30 GMT (envelope-from rdivacky@svn.freebsd.org) Message-Id: <201004020854.o328sUQh005984@svn.freebsd.org> From: Roman Divacky Date: Fri, 2 Apr 2010 08:54:30 +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: r206083 - in vendor/llvm/dist: . autoconf docs docs/tutorial examples/OCaml-Kaleidoscope/Chapter6 examples/OCaml-Kaleidoscope/Chapter7 include/llvm include/llvm/ADT include/llvm/Analysi... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Apr 2010 08:54:31 -0000 Author: rdivacky Date: Fri Apr 2 08:54:30 2010 New Revision: 206083 URL: http://svn.freebsd.org/changeset/base/206083 Log: Update LLVM to r100181. Added: vendor/llvm/dist/lib/Target/X86/SSEDomainFix.cpp vendor/llvm/dist/lib/VMCore/DebugLoc.cpp vendor/llvm/dist/lib/VMCore/LLVMContextImpl.cpp vendor/llvm/dist/test/Bitcode/sse41_pmulld.ll vendor/llvm/dist/test/Bitcode/sse41_pmulld.ll.bc (contents, props changed) vendor/llvm/dist/test/CodeGen/CellSPU/bigstack.ll vendor/llvm/dist/test/CodeGen/Generic/2010-ZeroSizedArg.ll vendor/llvm/dist/test/CodeGen/PowerPC/2010-04-01-MachineCSEBug.ll vendor/llvm/dist/test/CodeGen/X86/pmulld.ll vendor/llvm/dist/test/CodeGen/X86/vec_insert-4.ll vendor/llvm/dist/test/CodeGen/X86/vec_insert-9.ll vendor/llvm/dist/test/DebugInfo/2010-03-22-CU-HighLow.ll vendor/llvm/dist/test/DebugInfo/2010-03-24-MemberFn.ll vendor/llvm/dist/test/DebugInfo/2010-03-30-InvalidDbgInfoCrash.ll vendor/llvm/dist/test/FrontendC++/2010-03-22-empty-baseclass.cpp vendor/llvm/dist/test/TableGen/2010-03-24-PrematureDefaults.td vendor/llvm/dist/test/Transforms/GVN/2010-03-31-RedundantPHIs.ll vendor/llvm/dist/test/Transforms/Inline/noinline.ll vendor/llvm/dist/test/Transforms/SimplifyCFG/2010-03-30-InvokeCrash.ll vendor/llvm/dist/utils/lit/lit/LitTestCase.py Deleted: vendor/llvm/dist/test/CodeGen/X86/vec_insert_4.ll Modified: vendor/llvm/dist/Makefile vendor/llvm/dist/autoconf/configure.ac vendor/llvm/dist/configure vendor/llvm/dist/docs/CodeGenerator.html vendor/llvm/dist/docs/ProgrammersManual.html vendor/llvm/dist/docs/ReleaseNotes.html vendor/llvm/dist/docs/SourceLevelDebugging.html vendor/llvm/dist/docs/TableGenFundamentals.html vendor/llvm/dist/docs/tutorial/OCamlLangImpl6.html vendor/llvm/dist/docs/tutorial/OCamlLangImpl7.html vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter6/myocamlbuild.ml vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter7/myocamlbuild.ml vendor/llvm/dist/include/llvm/ADT/PointerUnion.h vendor/llvm/dist/include/llvm/ADT/SmallVector.h vendor/llvm/dist/include/llvm/ADT/Statistic.h vendor/llvm/dist/include/llvm/ADT/StringMap.h vendor/llvm/dist/include/llvm/Analysis/DebugInfo.h vendor/llvm/dist/include/llvm/Analysis/Dominators.h vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h vendor/llvm/dist/include/llvm/CodeGen/DwarfWriter.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/MachineOperand.h vendor/llvm/dist/include/llvm/CodeGen/RuntimeLibcalls.h vendor/llvm/dist/include/llvm/CodeGen/SelectionDAG.h vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGISel.h vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGNodes.h vendor/llvm/dist/include/llvm/Function.h vendor/llvm/dist/include/llvm/InlineAsm.h 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/IntrinsicsARM.td vendor/llvm/dist/include/llvm/IntrinsicsPowerPC.td vendor/llvm/dist/include/llvm/IntrinsicsX86.td vendor/llvm/dist/include/llvm/LLVMContext.h vendor/llvm/dist/include/llvm/MC/MCAsmLayout.h vendor/llvm/dist/include/llvm/MC/MCAssembler.h vendor/llvm/dist/include/llvm/MC/MCContext.h vendor/llvm/dist/include/llvm/MC/MCExpr.h vendor/llvm/dist/include/llvm/MC/MCInst.h vendor/llvm/dist/include/llvm/MC/MCObjectWriter.h vendor/llvm/dist/include/llvm/MC/MCSection.h vendor/llvm/dist/include/llvm/MC/MCStreamer.h vendor/llvm/dist/include/llvm/MC/MachObjectWriter.h vendor/llvm/dist/include/llvm/PassManagers.h vendor/llvm/dist/include/llvm/Support/Allocator.h vendor/llvm/dist/include/llvm/Support/CFG.h vendor/llvm/dist/include/llvm/Support/CallSite.h vendor/llvm/dist/include/llvm/Support/Casting.h vendor/llvm/dist/include/llvm/Support/DebugLoc.h vendor/llvm/dist/include/llvm/Support/FileUtilities.h vendor/llvm/dist/include/llvm/Support/IRBuilder.h vendor/llvm/dist/include/llvm/Support/MathExtras.h vendor/llvm/dist/include/llvm/Support/Timer.h vendor/llvm/dist/include/llvm/Support/ValueHandle.h vendor/llvm/dist/include/llvm/Support/raw_ostream.h vendor/llvm/dist/include/llvm/System/Memory.h vendor/llvm/dist/include/llvm/Target/TargetAsmBackend.h vendor/llvm/dist/include/llvm/Target/TargetInstrDesc.h vendor/llvm/dist/include/llvm/Target/TargetLowering.h vendor/llvm/dist/include/llvm/Target/TargetMachine.h vendor/llvm/dist/include/llvm/Target/TargetSelectionDAG.td vendor/llvm/dist/include/llvm/Transforms/Utils/BuildLibCalls.h vendor/llvm/dist/include/llvm/Transforms/Utils/SSAUpdater.h vendor/llvm/dist/include/llvm/Type.h vendor/llvm/dist/include/llvm/Value.h vendor/llvm/dist/lib/Analysis/CaptureTracking.cpp vendor/llvm/dist/lib/Analysis/DebugInfo.cpp vendor/llvm/dist/lib/Analysis/IPA/CallGraphSCCPass.cpp vendor/llvm/dist/lib/Analysis/IPA/GlobalsModRef.cpp vendor/llvm/dist/lib/Analysis/InlineCost.cpp vendor/llvm/dist/lib/Analysis/LiveValues.cpp vendor/llvm/dist/lib/Analysis/LoopPass.cpp vendor/llvm/dist/lib/Analysis/MemoryBuiltins.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/ScalarEvolutionExpander.cpp vendor/llvm/dist/lib/Archive/ArchiveWriter.cpp vendor/llvm/dist/lib/AsmParser/LLLexer.h 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/Bitcode/Writer/BitcodeWriter.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinter.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DIE.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DIE.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfException.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfWriter.cpp vendor/llvm/dist/lib/CodeGen/BranchFolding.cpp vendor/llvm/dist/lib/CodeGen/DwarfEHPrepare.cpp vendor/llvm/dist/lib/CodeGen/LiveInterval.cpp vendor/llvm/dist/lib/CodeGen/LiveIntervalAnalysis.cpp vendor/llvm/dist/lib/CodeGen/LiveStackAnalysis.cpp vendor/llvm/dist/lib/CodeGen/LiveVariables.cpp vendor/llvm/dist/lib/CodeGen/MachineBasicBlock.cpp vendor/llvm/dist/lib/CodeGen/MachineCSE.cpp vendor/llvm/dist/lib/CodeGen/MachineFunction.cpp vendor/llvm/dist/lib/CodeGen/MachineModuleInfo.cpp vendor/llvm/dist/lib/CodeGen/OptimizeExts.cpp vendor/llvm/dist/lib/CodeGen/PHIElimination.cpp vendor/llvm/dist/lib/CodeGen/PreAllocSplitting.cpp vendor/llvm/dist/lib/CodeGen/RegAllocLocal.cpp vendor/llvm/dist/lib/CodeGen/ScheduleDAGInstrs.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/DAGCombiner.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/FastISel.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/InstrEmitter.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/InstrEmitter.h vendor/llvm/dist/lib/CodeGen/SelectionDAG/SDNodeDbgValue.h vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAG.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/TargetLowering.cpp vendor/llvm/dist/lib/CodeGen/SimpleRegisterCoalescing.cpp vendor/llvm/dist/lib/CodeGen/TargetLoweringObjectFileImpl.cpp vendor/llvm/dist/lib/CodeGen/TwoAddressInstructionPass.cpp vendor/llvm/dist/lib/CodeGen/VirtRegRewriter.cpp vendor/llvm/dist/lib/ExecutionEngine/ExecutionEngine.cpp vendor/llvm/dist/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp vendor/llvm/dist/lib/MC/MCAsmStreamer.cpp vendor/llvm/dist/lib/MC/MCAssembler.cpp vendor/llvm/dist/lib/MC/MCContext.cpp vendor/llvm/dist/lib/MC/MCExpr.cpp vendor/llvm/dist/lib/MC/MCInst.cpp vendor/llvm/dist/lib/MC/MCMachOStreamer.cpp vendor/llvm/dist/lib/MC/MCParser/AsmParser.cpp vendor/llvm/dist/lib/MC/MCSection.cpp vendor/llvm/dist/lib/MC/MachObjectWriter.cpp vendor/llvm/dist/lib/Support/APFloat.cpp vendor/llvm/dist/lib/Support/APInt.cpp vendor/llvm/dist/lib/Support/CommandLine.cpp vendor/llvm/dist/lib/Support/Debug.cpp vendor/llvm/dist/lib/Support/ErrorHandling.cpp vendor/llvm/dist/lib/Support/MemoryBuffer.cpp vendor/llvm/dist/lib/Support/Statistic.cpp vendor/llvm/dist/lib/Support/Timer.cpp vendor/llvm/dist/lib/Support/Triple.cpp vendor/llvm/dist/lib/Support/raw_ostream.cpp vendor/llvm/dist/lib/System/Unix/Mutex.inc vendor/llvm/dist/lib/System/Unix/Path.inc vendor/llvm/dist/lib/System/Win32/Program.inc vendor/llvm/dist/lib/System/Win32/Signals.inc vendor/llvm/dist/lib/Target/ARM/ARM.td vendor/llvm/dist/lib/Target/ARM/ARMBaseInstrInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.cpp vendor/llvm/dist/lib/Target/ARM/ARMInstrFormats.td vendor/llvm/dist/lib/Target/ARM/ARMInstrInfo.td vendor/llvm/dist/lib/Target/ARM/ARMInstrNEON.td vendor/llvm/dist/lib/Target/ARM/ARMInstrVFP.td vendor/llvm/dist/lib/Target/ARM/ARMLoadStoreOptimizer.cpp vendor/llvm/dist/lib/Target/ARM/ARMSubtarget.cpp vendor/llvm/dist/lib/Target/ARM/ARMSubtarget.h vendor/llvm/dist/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp vendor/llvm/dist/lib/Target/ARM/AsmPrinter/ARMMCInstLower.cpp 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/Thumb2InstrInfo.cpp vendor/llvm/dist/lib/Target/Alpha/AlphaInstrInfo.cpp vendor/llvm/dist/lib/Target/Blackfin/BlackfinInstrInfo.td vendor/llvm/dist/lib/Target/Blackfin/BlackfinIntrinsics.td vendor/llvm/dist/lib/Target/Blackfin/BlackfinRegisterInfo.cpp vendor/llvm/dist/lib/Target/CellSPU/SPU.h vendor/llvm/dist/lib/Target/CellSPU/SPUISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/CellSPU/SPUISelLowering.cpp vendor/llvm/dist/lib/Target/CellSPU/SPUInstrInfo.cpp vendor/llvm/dist/lib/Target/CellSPU/SPUInstrInfo.td vendor/llvm/dist/lib/Target/CellSPU/SPURegisterInfo.cpp vendor/llvm/dist/lib/Target/CellSPU/SPURegisterInfo.h vendor/llvm/dist/lib/Target/MBlaze/MBlazeIntrinsics.td vendor/llvm/dist/lib/Target/MSIL/MSILWriter.cpp vendor/llvm/dist/lib/Target/MSP430/AsmPrinter/MSP430MCInstLower.cpp vendor/llvm/dist/lib/Target/MSP430/MSP430InstrInfo.cpp vendor/llvm/dist/lib/Target/Mangler.cpp vendor/llvm/dist/lib/Target/Mips/MipsInstrFPU.td vendor/llvm/dist/lib/Target/Mips/MipsInstrInfo.cpp vendor/llvm/dist/lib/Target/PIC16/PIC16InstrInfo.cpp vendor/llvm/dist/lib/Target/PIC16/PIC16Section.cpp vendor/llvm/dist/lib/Target/PIC16/PIC16Section.h vendor/llvm/dist/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCBranchSelector.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.h vendor/llvm/dist/lib/Target/PowerPC/PPCInstrAltivec.td vendor/llvm/dist/lib/Target/PowerPC/PPCInstrInfo.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCRegisterInfo.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZInstrFP.td vendor/llvm/dist/lib/Target/SystemZ/SystemZInstrInfo.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZInstrInfo.td vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp vendor/llvm/dist/lib/Target/X86/CMakeLists.txt vendor/llvm/dist/lib/Target/X86/X86.h vendor/llvm/dist/lib/Target/X86/X86.td vendor/llvm/dist/lib/Target/X86/X86AsmBackend.cpp vendor/llvm/dist/lib/Target/X86/X86FastISel.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/X86InstrFormats.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/X86Subtarget.cpp vendor/llvm/dist/lib/Target/X86/X86Subtarget.h vendor/llvm/dist/lib/Target/X86/X86TargetMachine.cpp vendor/llvm/dist/lib/Target/X86/X86TargetMachine.h vendor/llvm/dist/lib/Target/XCore/XCoreInstrInfo.cpp vendor/llvm/dist/lib/Target/XCore/XCoreInstrInfo.td vendor/llvm/dist/lib/Transforms/IPO/ArgumentPromotion.cpp vendor/llvm/dist/lib/Transforms/IPO/DeadArgumentElimination.cpp vendor/llvm/dist/lib/Transforms/IPO/GlobalOpt.cpp vendor/llvm/dist/lib/Transforms/IPO/PruneEH.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCalls.cpp vendor/llvm/dist/lib/Transforms/Scalar/ABCD.cpp vendor/llvm/dist/lib/Transforms/Scalar/CodeGenPrepare.cpp vendor/llvm/dist/lib/Transforms/Scalar/GVN.cpp vendor/llvm/dist/lib/Transforms/Scalar/IndVarSimplify.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopStrengthReduce.cpp vendor/llvm/dist/lib/Transforms/Scalar/Reg2Mem.cpp vendor/llvm/dist/lib/Transforms/Scalar/SCCP.cpp vendor/llvm/dist/lib/Transforms/Scalar/SimplifyCFGPass.cpp vendor/llvm/dist/lib/Transforms/Scalar/SimplifyLibCalls.cpp vendor/llvm/dist/lib/Transforms/Utils/AddrModeMatcher.cpp vendor/llvm/dist/lib/Transforms/Utils/BreakCriticalEdges.cpp vendor/llvm/dist/lib/Transforms/Utils/BuildLibCalls.cpp vendor/llvm/dist/lib/Transforms/Utils/LowerInvoke.cpp vendor/llvm/dist/lib/Transforms/Utils/PromoteMemoryToRegister.cpp vendor/llvm/dist/lib/Transforms/Utils/SSAUpdater.cpp vendor/llvm/dist/lib/Transforms/Utils/SimplifyCFG.cpp vendor/llvm/dist/lib/VMCore/AsmWriter.cpp vendor/llvm/dist/lib/VMCore/AutoUpgrade.cpp vendor/llvm/dist/lib/VMCore/CMakeLists.txt 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/Function.cpp vendor/llvm/dist/lib/VMCore/Globals.cpp vendor/llvm/dist/lib/VMCore/IRBuilder.cpp vendor/llvm/dist/lib/VMCore/InlineAsm.cpp vendor/llvm/dist/lib/VMCore/Instruction.cpp vendor/llvm/dist/lib/VMCore/Instructions.cpp vendor/llvm/dist/lib/VMCore/LLVMContext.cpp vendor/llvm/dist/lib/VMCore/LLVMContextImpl.h vendor/llvm/dist/lib/VMCore/Metadata.cpp vendor/llvm/dist/lib/VMCore/Module.cpp vendor/llvm/dist/lib/VMCore/PassManager.cpp vendor/llvm/dist/lib/VMCore/Type.cpp vendor/llvm/dist/lib/VMCore/Value.cpp vendor/llvm/dist/lib/VMCore/ValueSymbolTable.cpp vendor/llvm/dist/lib/VMCore/Verifier.cpp vendor/llvm/dist/test/CodeGen/ARM/fabss.ll vendor/llvm/dist/test/CodeGen/ARM/fadds.ll vendor/llvm/dist/test/CodeGen/ARM/fdivs.ll vendor/llvm/dist/test/CodeGen/ARM/fmacs.ll vendor/llvm/dist/test/CodeGen/ARM/fmscs.ll vendor/llvm/dist/test/CodeGen/ARM/fmuls.ll vendor/llvm/dist/test/CodeGen/ARM/fnegs.ll vendor/llvm/dist/test/CodeGen/ARM/fnmacs.ll vendor/llvm/dist/test/CodeGen/ARM/fnmscs.ll vendor/llvm/dist/test/CodeGen/ARM/fp_convert.ll vendor/llvm/dist/test/CodeGen/ARM/fsubs.ll vendor/llvm/dist/test/CodeGen/Generic/addr-label.ll vendor/llvm/dist/test/CodeGen/PIC16/2009-07-17-PR4566-pic16.ll vendor/llvm/dist/test/CodeGen/PIC16/2009-11-20-NewNode.ll vendor/llvm/dist/test/CodeGen/PIC16/C16-15.ll vendor/llvm/dist/test/CodeGen/PIC16/global-in-user-section.ll vendor/llvm/dist/test/CodeGen/PIC16/globals.ll vendor/llvm/dist/test/CodeGen/PIC16/sext.ll vendor/llvm/dist/test/CodeGen/PowerPC/eqv-andc-orc-nor.ll vendor/llvm/dist/test/CodeGen/PowerPC/tango.net.ftp.FtpClient.ll vendor/llvm/dist/test/CodeGen/Thumb2/2009-08-04-CoalescerBug.ll vendor/llvm/dist/test/CodeGen/Thumb2/2009-08-04-ScavengerAssert.ll vendor/llvm/dist/test/CodeGen/Thumb2/2009-08-04-SubregLoweringBug.ll vendor/llvm/dist/test/CodeGen/Thumb2/2009-08-04-SubregLoweringBug2.ll vendor/llvm/dist/test/CodeGen/Thumb2/2009-08-04-SubregLoweringBug3.ll vendor/llvm/dist/test/CodeGen/Thumb2/2009-08-07-NeonFPBug.ll vendor/llvm/dist/test/CodeGen/X86/2007-01-13-StackPtrIndex.ll vendor/llvm/dist/test/CodeGen/X86/2007-04-25-MMX-PADDQ.ll vendor/llvm/dist/test/CodeGen/X86/2009-02-05-CoalescerBug.ll vendor/llvm/dist/test/CodeGen/X86/2009-02-26-MachineLICMBug.ll vendor/llvm/dist/test/CodeGen/X86/2009-11-16-UnfoldMemOpBug.ll vendor/llvm/dist/test/CodeGen/X86/byval7.ll vendor/llvm/dist/test/CodeGen/X86/coalesce-esp.ll vendor/llvm/dist/test/CodeGen/X86/dagcombine-buildvector.ll vendor/llvm/dist/test/CodeGen/X86/gather-addresses.ll vendor/llvm/dist/test/CodeGen/X86/licm-symbol.ll vendor/llvm/dist/test/CodeGen/X86/memcpy-2.ll vendor/llvm/dist/test/CodeGen/X86/memset-2.ll vendor/llvm/dist/test/CodeGen/X86/memset64-on-x86-32.ll vendor/llvm/dist/test/CodeGen/X86/pic.ll vendor/llvm/dist/test/CodeGen/X86/pmul.ll vendor/llvm/dist/test/CodeGen/X86/postalloc-coalescing.ll vendor/llvm/dist/test/CodeGen/X86/pr2659.ll vendor/llvm/dist/test/CodeGen/X86/sibcall.ll vendor/llvm/dist/test/CodeGen/X86/small-byval-memcpy.ll vendor/llvm/dist/test/CodeGen/X86/sse-align-12.ll vendor/llvm/dist/test/CodeGen/X86/sse-align-6.ll vendor/llvm/dist/test/CodeGen/X86/sse3.ll vendor/llvm/dist/test/CodeGen/X86/unaligned-load.ll vendor/llvm/dist/test/CodeGen/X86/vec_compare.ll vendor/llvm/dist/test/CodeGen/X86/vec_return.ll vendor/llvm/dist/test/CodeGen/X86/vec_set.ll vendor/llvm/dist/test/CodeGen/X86/vec_shuffle-7.ll vendor/llvm/dist/test/CodeGen/X86/vec_shuffle-9.ll vendor/llvm/dist/test/CodeGen/X86/vec_shuffle.ll vendor/llvm/dist/test/CodeGen/X86/vec_zero.ll vendor/llvm/dist/test/CodeGen/X86/vec_zero_cse.ll vendor/llvm/dist/test/CodeGen/X86/widen_arith-5.ll vendor/llvm/dist/test/CodeGen/X86/widen_cast-2.ll vendor/llvm/dist/test/CodeGen/X86/widen_load-2.ll vendor/llvm/dist/test/CodeGen/X86/xor-icmp.ll vendor/llvm/dist/test/CodeGen/X86/xor.ll vendor/llvm/dist/test/DebugInfo/2009-11-03-InsertExtractValue.ll vendor/llvm/dist/test/Feature/unions.ll vendor/llvm/dist/test/FrontendObjC/2010-03-17-StructRef.m vendor/llvm/dist/test/MC/AsmParser/X86/x86_32-bit_cat.s vendor/llvm/dist/test/MC/AsmParser/X86/x86_32-encoding.s vendor/llvm/dist/test/MC/MachO/absolutize.s vendor/llvm/dist/test/MC/MachO/darwin-x86_64-reloc.s vendor/llvm/dist/test/Transforms/GVN/rle.ll vendor/llvm/dist/test/Transforms/InstCombine/objsize.ll vendor/llvm/dist/test/Transforms/SimplifyLibCalls/StrCpy.ll vendor/llvm/dist/tools/Makefile vendor/llvm/dist/tools/bugpoint/BugDriver.cpp vendor/llvm/dist/tools/bugpoint/BugDriver.h vendor/llvm/dist/tools/edis/Makefile vendor/llvm/dist/tools/llc/llc.cpp vendor/llvm/dist/tools/llvm-extract/llvm-extract.cpp vendor/llvm/dist/tools/llvm-ld/Optimize.cpp vendor/llvm/dist/tools/llvm-ld/llvm-ld.cpp vendor/llvm/dist/tools/llvm-link/llvm-link.cpp vendor/llvm/dist/tools/llvm-mc/llvm-mc.cpp vendor/llvm/dist/tools/llvmc/plugins/Base/Base.td.in vendor/llvm/dist/tools/lto/LTOCodeGenerator.cpp vendor/llvm/dist/tools/opt/opt.cpp vendor/llvm/dist/unittests/ADT/SmallVectorTest.cpp vendor/llvm/dist/utils/TableGen/CodeGenDAGPatterns.cpp vendor/llvm/dist/utils/TableGen/CodeGenDAGPatterns.h vendor/llvm/dist/utils/TableGen/CodeGenInstruction.cpp vendor/llvm/dist/utils/TableGen/CodeGenInstruction.h vendor/llvm/dist/utils/TableGen/CodeGenTarget.cpp vendor/llvm/dist/utils/TableGen/DAGISelEmitter.cpp vendor/llvm/dist/utils/TableGen/DAGISelMatcher.cpp vendor/llvm/dist/utils/TableGen/DAGISelMatcher.h vendor/llvm/dist/utils/TableGen/DAGISelMatcherEmitter.cpp vendor/llvm/dist/utils/TableGen/DAGISelMatcherGen.cpp vendor/llvm/dist/utils/TableGen/DAGISelMatcherOpt.cpp vendor/llvm/dist/utils/TableGen/FastISelEmitter.cpp vendor/llvm/dist/utils/TableGen/InstrInfoEmitter.cpp vendor/llvm/dist/utils/TableGen/IntrinsicEmitter.cpp vendor/llvm/dist/utils/TableGen/Record.cpp vendor/llvm/dist/utils/TableGen/Record.h vendor/llvm/dist/utils/TableGen/TableGen.cpp vendor/llvm/dist/utils/buildit/build_llvm vendor/llvm/dist/utils/lit/lit/TestFormats.py vendor/llvm/dist/utils/lit/lit/TestRunner.py vendor/llvm/dist/utils/lit/lit/lit.py Modified: vendor/llvm/dist/Makefile ============================================================================== --- vendor/llvm/dist/Makefile Fri Apr 2 06:55:31 2010 (r206082) +++ vendor/llvm/dist/Makefile Fri Apr 2 08:54:30 2010 (r206083) @@ -214,7 +214,7 @@ update: $(SVN) $(SVN-UPDATE-OPTIONS) update $(LLVM_SRC_ROOT) @ $(SVN) status $(LLVM_SRC_ROOT) | $(SUB-SVN-DIRS) | xargs $(SVN) $(SVN-UPDATE-OPTIONS) update -happiness: update all check unittests +happiness: update all check-all .PHONY: srpm rpm update happiness Modified: vendor/llvm/dist/autoconf/configure.ac ============================================================================== --- vendor/llvm/dist/autoconf/configure.ac Fri Apr 2 06:55:31 2010 (r206082) +++ vendor/llvm/dist/autoconf/configure.ac Fri Apr 2 08:54:30 2010 (r206083) @@ -110,6 +110,11 @@ do llvm-tv) AC_CONFIG_SUBDIRS([projects/llvm-tv]) ;; safecode) AC_CONFIG_SUBDIRS([projects/safecode]) ;; llvm-kernel) AC_CONFIG_SUBDIRS([projects/llvm-kernel]) ;; + llvm-gcc) ;; + test-suite) ;; + llvm-test) ;; + poolalloc) ;; + llvm-poolalloc) ;; *) AC_MSG_WARN([Unknown project (${i}) won't be configured automatically]) ;; Modified: vendor/llvm/dist/configure ============================================================================== --- vendor/llvm/dist/configure Fri Apr 2 06:55:31 2010 (r206082) +++ vendor/llvm/dist/configure Fri Apr 2 08:54:30 2010 (r206083) @@ -1999,6 +1999,11 @@ do ;; llvm-kernel) subdirs="$subdirs projects/llvm-kernel" ;; + llvm-gcc) ;; + test-suite) ;; + llvm-test) ;; + poolalloc) ;; + llvm-poolalloc) ;; *) { echo "$as_me:$LINENO: WARNING: Unknown project (${i}) won't be configured automatically" >&5 echo "$as_me: WARNING: Unknown project (${i}) won't be configured automatically" >&2;} @@ -11151,7 +11156,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <The portion of the instruction definition in bold indicates the pattern used to match the instruction. The DAG operators (like fmul/fadd) are defined in - the lib/Target/TargetSelectionDAG.td file. "F4RC" is the - register class of the input and result values.

+ the include/llvm/Target/TargetSelectionDAG.td file. " + F4RC" is the register class of the input and result values.

The TableGen DAG instruction selector generator reads the instruction patterns in the .td file and automatically builds parts of the @@ -2162,7 +2162,7 @@ MOVSX32rm16 -> movsx, 32-bit register Chris Lattner
The LLVM Compiler Infrastructure
- Last modified: $Date: 2010-03-11 01:22:57 +0100 (Thu, 11 Mar 2010) $ + Last modified: $Date: 2010-03-25 01:03:04 +0100 (Thu, 25 Mar 2010) $ Modified: vendor/llvm/dist/docs/ProgrammersManual.html ============================================================================== --- vendor/llvm/dist/docs/ProgrammersManual.html Fri Apr 2 06:55:31 2010 (r206082) +++ vendor/llvm/dist/docs/ProgrammersManual.html Fri Apr 2 08:54:30 2010 (r206083) @@ -1211,14 +1211,14 @@ and erasing, but does not support iterat

-

SmallPtrSet has all the advantages of SmallSet (and a SmallSet of pointers is -transparently implemented with a SmallPtrSet), but also supports iterators. If +

SmallPtrSet has all the advantages of SmallSet (and a SmallSet of pointers is +transparently implemented with a SmallPtrSet), but also supports iterators. If more than 'N' insertions are performed, a single quadratically probed hash table is allocated and grows as needed, providing extremely efficient access (constant time insertion/deleting/queries with low constant factors) and is very stingy with malloc traffic.

-

Note that, unlike std::set, the iterators of SmallPtrSet are invalidated +

Note that, unlike std::set, the iterators of SmallPtrSet are invalidated whenever an insertion occurs. Also, the values visited by the iterators are not visited in sorted order.

@@ -1843,6 +1843,21 @@ void printNextInstruction(Instruction* i
+

Unfortunately, these implicit conversions come at a cost; they prevent +these iterators from conforming to standard iterator conventions, and thus +from being usable with standard algorithms and containers. For example, they +prevent the following code, where B is a BasicBlock, +from compiling:

+ +
+
+  llvm::SmallVector<llvm::Instruction *, 16>(B->begin(), B->end());
+
+
+ +

Because of this, these implicit conversions may be removed some day, +and operator* changed to return a pointer instead of a reference.

+ @@ -1962,7 +1977,11 @@ for (Value::use_iterator i = F->use_b
-

Alternately, it's common to have an instance of the Note that dereferencing a Value::use_iterator is not a very cheap +operation. Instead of performing *i above several times, consider +doing it only once in the loop body and reusing its result.

+ +

Alternatively, it's common to have an instance of the User Class and need to know what Values are used by it. The list of all Values used by a User is known as a use-def chain. Instances of class @@ -1981,10 +2000,13 @@ for (User::op_iterator i = pi->op_beg

- +

Declaring objects as const is an important tool of enforcing +mutation free algorithms (such as analyses, etc.). For this purpose above +iterators come in constant flavors as Value::const_use_iterator +and Value::const_op_iterator. They automatically arise when +calling use/op_begin() on const Value*s or +const User*s respectively. Upon dereferencing, they return +const Use*s. Otherwise the above patterns remain unchanged.

@@ -3058,7 +3080,7 @@ the lib/VMCore directory.

FunctionType
Subclass of DerivedTypes for function types.
    -
  • bool isVarArg() const: Returns true if its a vararg +
  • bool isVarArg() const: Returns true if it's a vararg function
  • const Type * getReturnType() const: Returns the return type of the function.
  • @@ -3276,7 +3298,7 @@ simplifies the representation and makes
    • Value::use_iterator - Typedef for iterator over the use-list
      - Value::use_const_iterator - Typedef for const_iterator over + Value::const_use_iterator - Typedef for const_iterator over the use-list
      unsigned use_size() - Returns the number of users of the value.
      @@ -3921,7 +3943,7 @@ arguments. An argument has a pointer to Dinakar Dhurjati and Chris Lattner
      The LLVM Compiler Infrastructure
      - Last modified: $Date: 2010-02-26 00:51:27 +0100 (Fri, 26 Feb 2010) $ + Last modified: $Date: 2010-04-02 02:08:26 +0200 (Fri, 02 Apr 2010) $ Modified: vendor/llvm/dist/docs/ReleaseNotes.html ============================================================================== --- vendor/llvm/dist/docs/ReleaseNotes.html Fri Apr 2 06:55:31 2010 (r206082) +++ vendor/llvm/dist/docs/ReleaseNotes.html Fri Apr 2 08:54:30 2010 (r206083) @@ -127,8 +127,21 @@ development. Here we include updates on

      In the LLVM 2.7 time-frame, the Clang team has made many improvements:

        -
      • ...
      • -include a link to cxx_compatibility.html +
      • FIXME: C++! Include a link to cxx_compatibility.html
      • + +
      • FIXME: Static Analyzer improvements?
      • + +
      • CIndex API and Python bindings: Clang now includes a C API as part of the +CIndex library. Although we make make some changes to the API in the future, it +is intended to be stable and has been designed for use by external projects. See +the Clang +doxygen CIndex +documentation for more details. The CIndex API also includings an preliminary +set of Python bindings.
      • + +
      • ARM Support: Clang now has ABI support for both the Darwin and Linux ARM +ABIs. Coupled with many improvements to the LLVM ARM backend, Clang is now +suitable for use as a a beta quality ARM compiler.
      @@ -162,13 +175,23 @@ implementation of the CLI) using LLVM fo compilation.

      -VMKit version ?? builds with LLVM 2.7 and you can find it on its -web page. The release includes -bug fixes, cleanup and new features. The major changes are:

      +With the release of LLVM 2.7, VMKit has shifted to a great framework for writing +virtual machines. VMKit now offers precise and efficient garbage collection with +multi-threading support, thanks to the MMTk memory management toolkit, as well +as just in time and ahead of time compilation with LLVM. The major changes in +VMKit 0.27 are:

        -
      • ...
      • +
      • Garbage collection: VMKit now uses the MMTk toolkit for garbage collectors. + The first collector to be ported is the MarkSweep collector, which is precise, + and drastically improves the performance of VMKit.
      • +
      • Line number information in the JVM: by using the debug metadata of LLVM, the + JVM now supports precise line number information, useful when printing a stack + trace.
      • +
      • Interface calls in the JVM: we implemented a variant of the Interface Method + Table technique for interface calls in the JVM. +
      @@ -391,6 +414,27 @@ code.--> + + + +
      +

      +TCE is a toolset for designing +application-specific processors (ASP) based on the Transport triggered +architecture (TTA). The toolset provides a complete co-design flow from C/C++ +programs down to synthesizable VHDL and parallel program binaries. Processor +customization points include the register files, function units, supported +operations, and the interconnection network.

      + +

      TCE uses llvm-gcc/Clang and LLVM for C/C++ language support, target +independent optimizations and also for parts of code generation. It generates +new LLVM-based code generators "on the fly" for the designed TTA processors and +loads them in to the compiler backend as runtime libraries to avoid per-target +recompilation of larger parts of the compiler chain.

      + +
      @@ -439,7 +483,7 @@ New llvm/Support/Regex.h API. FileCheck Many subtle pointer invalidation bugs in Callgraph have been fixed and it now uses asserting value handles. MC Disassembler (with blog post), MCInstPrinter. Many X86 backend and AsmPrinter simplifications Various tools like llc and opt now read either .ll or .bc files as input. -Malloc and free instructions got removed. +Malloc and free instructions got removed, along with LowerAllocations pass. compiler-rt support for ARM. completely llvm-gcc NEON support. Can transcode from GAS to intel syntax with "llvm-mc foo.s -output-asm-variant=1" @@ -456,8 +500,12 @@ x86 sibcall optimization New LSR with full strength reduction mode The most awesome sext / zext optimization pass. ? +The ARM backend now has good support for ARMv4 backend (tested on StrongARM + hardware), previously only supported ARMv4T and newer. + +Defaults to RTTI off, packagers should build with make REQUIRE_RTTI=1. CondProp pass removed (functionality merged into jump threading). AndersAA got removed (from 2.7 or mainline?) PredSimplify, LoopVR, GVNPRE got removed. @@ -978,20 +1026,6 @@ ignored.
    - - - -
    - -

    The Llvm.Linkage module is broken, and has incorrect values. Only -Llvm.Linkage.External, Llvm.Linkage.Available_externally, and -Llvm.Linkage.Link_once will be correct. If you need any of the other linkage -modes, you'll have to write an external C library in order to expose the -functionality. This has been fixed in the trunk.

    -
    -
    Additional Information @@ -1024,7 +1058,7 @@ lists.

    src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01"> LLVM Compiler Infrastructure
    - Last modified: $Date: 2010-03-19 04:18:05 +0100 (Fri, 19 Mar 2010) $ + Last modified: $Date: 2010-04-01 03:53:24 +0200 (Thu, 01 Apr 2010) $ Modified: vendor/llvm/dist/docs/SourceLevelDebugging.html ============================================================================== --- vendor/llvm/dist/docs/SourceLevelDebugging.html Fri Apr 2 06:55:31 2010 (r206082) +++ vendor/llvm/dist/docs/SourceLevelDebugging.html Fri Apr 2 08:54:30 2010 (r206083) @@ -289,26 +289,25 @@ height="369"> 0x1000.)

    The fields of debug descriptors used internally by LLVM - are restricted to only the simple data types int, uint, - bool, float, double, mdstring and - mdnode.

    + are restricted to only the simple data types i32, i1, + float, double, mdstring and mdnode.

     !1 = metadata !{
    -  uint,   ;; A tag
    +  i32,   ;; A tag
       ...
     }
     

    The first field of a descriptor is always an - uint containing a tag value identifying the content of the + i32 containing a tag value identifying the content of the descriptor. The remaining fields are specific to the descriptor. The values of tags are loosely bound to the tag values of DWARF information entries. However, that does not restrict the use of the information supplied to DWARF targets. To facilitate versioning of debug information, the tag is augmented - with the current debug version (LLVMDebugVersion = 8 << 16 or 0x80000 or + with the current debug version (LLVMDebugVersion = 8 << 16 or 0x80000 or 524288.)

    The details of the various descriptors follow.

    @@ -829,8 +828,8 @@ DW_TAG_return_variable = 258 rules.

    In order to handle this, the LLVM debug format uses the metadata attached to - llvm instructions to encode line nuber and scoping information. Consider the - following C fragment, for example:

    + llvm instructions to encode line number and scoping information. Consider + the following C fragment, for example:

    @@ -1069,6 +1068,18 @@ int main(int argc, char *argv[]) {
     
    +

    llvm::Instruction provides easy access to metadata attached with an +instruction. One can extract line number information encoded in LLVM IR +using Instruction::getMetadata() and +DILocation::getLineNumber(). +

    + if (MDNode *N = I->getMetadata("dbg")) {  // Here I is an LLVM instruction
    +   DILocation Loc(N);                      // DILocation is in DebugInfo.h
    +   unsigned Line = Loc.getLineNumber();
    +   StringRef File = Loc.getFilename();
    +   StringRef Dir = Loc.getDirectory();
    + }
    +
    @@ -1762,7 +1773,7 @@ enum Trees { Chris Lattner
    LLVM Compiler Infrastructure
    - Last modified: $Date: 2010-03-17 16:01:50 +0100 (Wed, 17 Mar 2010) $ + Last modified: $Date: 2010-03-31 09:50:17 +0200 (Wed, 31 Mar 2010) $ Modified: vendor/llvm/dist/docs/TableGenFundamentals.html ============================================================================== --- vendor/llvm/dist/docs/TableGenFundamentals.html Fri Apr 2 06:55:31 2010 (r206082) +++ vendor/llvm/dist/docs/TableGenFundamentals.html Fri Apr 2 08:54:30 2010 (r206083) @@ -768,9 +768,6 @@ patterns:

    an implicitly defined physical register. This tells the dag instruction selection emitter the input pattern's extra definitions matches implicit physical register definitions.
    -
    (parallel (a), (b))
    -
    a list of dags specifying parallel operations which map to the same - instruction.
    @@ -797,7 +794,7 @@ This should highlight the APIs in Ta Chris Lattner
    LLVM Compiler Infrastructure
    - Last modified: $Date: 2010-02-28 00:47:46 +0100 (Sun, 28 Feb 2010) $ + Last modified: $Date: 2010-03-27 03:53:27 +0100 (Sat, 27 Mar 2010) $ Modified: vendor/llvm/dist/docs/tutorial/OCamlLangImpl6.html ============================================================================== --- vendor/llvm/dist/docs/tutorial/OCamlLangImpl6.html Fri Apr 2 06:55:31 2010 (r206082) +++ vendor/llvm/dist/docs/tutorial/OCamlLangImpl6.html Fri Apr 2 08:54:30 2010 (r206083) @@ -821,7 +821,7 @@ ocaml_lib ~extern:true "llvm_executionen ocaml_lib ~extern:true "llvm_target";; ocaml_lib ~extern:true "llvm_scalar_opts";; -flag ["link"; "ocaml"; "g++"] (S[A"-cc"; A"g++"]);; +flag ["link"; "ocaml"; "g++"] (S[A"-cc"; A"g++"; A"-cclib"; A"-rdynamic"]);; dep ["link"; "ocaml"; "use_bindings"] ["bindings.o"];;
@@ -1568,7 +1568,7 @@ SSA construction Chris Lattner
Erick Tryzelaar
The LLVM Compiler Infrastructure
- Last modified: $Date: 2010-03-08 20:32:18 +0100 (Mon, 08 Mar 2010) $ + Last modified: $Date: 2010-03-22 00:15:13 +0100 (Mon, 22 Mar 2010) $ Modified: vendor/llvm/dist/docs/tutorial/OCamlLangImpl7.html ============================================================================== --- vendor/llvm/dist/docs/tutorial/OCamlLangImpl7.html Fri Apr 2 06:55:31 2010 (r206082) +++ vendor/llvm/dist/docs/tutorial/OCamlLangImpl7.html Fri Apr 2 08:54:30 2010 (r206083) @@ -999,7 +999,7 @@ ocaml_lib ~extern:true "llvm_executionen ocaml_lib ~extern:true "llvm_target";; ocaml_lib ~extern:true "llvm_scalar_opts";; -flag ["link"; "ocaml"; "g++"] (S[A"-cc"; A"g++"]);; +flag ["link"; "ocaml"; "g++"] (S[A"-cc"; A"g++"; A"-cclib"; A"-rdynamic"]);; dep ["link"; "ocaml"; "use_bindings"] ["bindings.o"];;
@@ -1901,7 +1901,7 @@ extern double printd(double X) { Chris Lattner
The LLVM Compiler Infrastructure
Erick Tryzelaar
- Last modified: $Date: 2010-03-08 20:32:18 +0100 (Mon, 08 Mar 2010) $ + Last modified: $Date: 2010-03-22 00:15:13 +0100 (Mon, 22 Mar 2010) $ Modified: vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter6/myocamlbuild.ml ============================================================================== --- vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter6/myocamlbuild.ml Fri Apr 2 06:55:31 2010 (r206082) +++ vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter6/myocamlbuild.ml Fri Apr 2 08:54:30 2010 (r206083) @@ -6,5 +6,5 @@ ocaml_lib ~extern:true "llvm_executionen ocaml_lib ~extern:true "llvm_target";; ocaml_lib ~extern:true "llvm_scalar_opts";; -flag ["link"; "ocaml"; "g++"] (S[A"-cc"; A"g++"]);; +flag ["link"; "ocaml"; "g++"] (S[A"-cc"; A"g++"; A"-cclib"; A"-rdynamic"]);; dep ["link"; "ocaml"; "use_bindings"] ["bindings.o"];; Modified: vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter7/myocamlbuild.ml ============================================================================== --- vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter7/myocamlbuild.ml Fri Apr 2 06:55:31 2010 (r206082) +++ vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter7/myocamlbuild.ml Fri Apr 2 08:54:30 2010 (r206083) @@ -6,5 +6,5 @@ ocaml_lib ~extern:true "llvm_executionen ocaml_lib ~extern:true "llvm_target";; ocaml_lib ~extern:true "llvm_scalar_opts";; -flag ["link"; "ocaml"; "g++"] (S[A"-cc"; A"g++"]);; +flag ["link"; "ocaml"; "g++"] (S[A"-cc"; A"g++"; A"-cclib"; A"-rdynamic"]);; dep ["link"; "ocaml"; "use_bindings"] ["bindings.o"];; Modified: vendor/llvm/dist/include/llvm/ADT/PointerUnion.h ============================================================================== --- vendor/llvm/dist/include/llvm/ADT/PointerUnion.h Fri Apr 2 06:55:31 2010 (r206082) +++ vendor/llvm/dist/include/llvm/ADT/PointerUnion.h Fri Apr 2 08:54:30 2010 (r206083) @@ -124,7 +124,7 @@ namespace llvm { } void *getOpaqueValue() const { return Val.getOpaqueValue(); } - static PointerUnion getFromOpaqueValue(void *VP) { + static inline PointerUnion getFromOpaqueValue(void *VP) { PointerUnion V; V.Val = ValTy::getFromOpaqueValue(VP); return V; @@ -227,7 +227,7 @@ namespace llvm { } void *getOpaqueValue() const { return Val.getOpaqueValue(); } - static PointerUnion3 getFromOpaqueValue(void *VP) { + static inline PointerUnion3 getFromOpaqueValue(void *VP) { PointerUnion3 V; V.Val = ValTy::getFromOpaqueValue(VP); return V; @@ -338,7 +338,7 @@ namespace llvm { } void *getOpaqueValue() const { return Val.getOpaqueValue(); } - static PointerUnion4 getFromOpaqueValue(void *VP) { + static inline PointerUnion4 getFromOpaqueValue(void *VP) { PointerUnion4 V; V.Val = ValTy::getFromOpaqueValue(VP); return V; Modified: vendor/llvm/dist/include/llvm/ADT/SmallVector.h ============================================================================== --- vendor/llvm/dist/include/llvm/ADT/SmallVector.h Fri Apr 2 06:55:31 2010 (r206082) +++ vendor/llvm/dist/include/llvm/ADT/SmallVector.h Fri Apr 2 08:54:30 2010 (r206083) @@ -239,11 +239,20 @@ public: /// starting with "Dest", constructing elements into it as needed. template static void uninitialized_copy(It1 I, It1 E, It2 Dest) { - // Use memcpy for PODs: std::uninitialized_copy optimizes to memmove, memcpy - // is better. - memcpy(&*Dest, &*I, (E-I)*sizeof(T)); + // Arbitrary iterator types; just use the basic implementation. + std::uninitialized_copy(I, E, Dest); } - + + /// uninitialized_copy - Copy the range [I, E) onto the uninitialized memory + /// starting with "Dest", constructing elements into it as needed. + template + static void uninitialized_copy(T1 *I, T1 *E, T2 *Dest) { + // Use memcpy for PODs iterated by pointers (which includes SmallVector + // iterators): std::uninitialized_copy optimizes to memmove, but we can + // use memcpy here. + memcpy(Dest, I, (E-I)*sizeof(T)); + } + /// grow - double the size of the allocated memory, guaranteeing space for at /// least one more element or MinSize if specified. void grow(size_t MinSize = 0) { @@ -501,10 +510,13 @@ public: this->uninitialized_copy(I, OldEnd, this->end()-NumOverwritten); // Replace the overwritten part. - std::copy(From, From+NumOverwritten, I); + for (; NumOverwritten > 0; --NumOverwritten) { + *I = *From; + ++I; ++From; + } // Insert the non-overwritten middle part. - this->uninitialized_copy(From+NumOverwritten, To, OldEnd); + this->uninitialized_copy(From, To, OldEnd); return I; } Modified: vendor/llvm/dist/include/llvm/ADT/Statistic.h ============================================================================== --- vendor/llvm/dist/include/llvm/ADT/Statistic.h Fri Apr 2 06:55:31 2010 (r206082) +++ vendor/llvm/dist/include/llvm/ADT/Statistic.h Fri Apr 2 08:54:30 2010 (r206083) @@ -29,6 +29,7 @@ #include "llvm/System/Atomic.h" namespace llvm { +class raw_ostream; class Statistic { public: @@ -113,6 +114,15 @@ protected: #define STATISTIC(VARNAME, DESC) \ static llvm::Statistic VARNAME = { DEBUG_TYPE, DESC, 0, 0 } +/// \brief Enable the collection and printing of statistics. +void EnableStatistics(); + +/// \brief Print statistics to the file returned by CreateInfoOutputFile(). +void PrintStatistics(); + +/// \brief Print statistics to the given output stream. +void PrintStatistics(raw_ostream &OS); + } // End llvm namespace #endif Modified: vendor/llvm/dist/include/llvm/ADT/StringMap.h ============================================================================== --- vendor/llvm/dist/include/llvm/ADT/StringMap.h Fri Apr 2 06:55:31 2010 (r206082) +++ vendor/llvm/dist/include/llvm/ADT/StringMap.h Fri Apr 2 08:54:30 2010 (r206083) @@ -216,6 +216,14 @@ public: static const StringMapEntry &GetStringMapEntryFromValue(const ValueTy &V) { return GetStringMapEntryFromValue(const_cast(V)); } + + /// GetStringMapEntryFromKeyData - Given key data that is known to be embedded + /// into a StringMapEntry, return the StringMapEntry itself. + static StringMapEntry &GetStringMapEntryFromKeyData(const char *KeyData) { + char *Ptr = const_cast(KeyData) - sizeof(StringMapEntry); + return *reinterpret_cast(Ptr); + } + /// Destroy - Destroy this StringMapEntry, releasing memory back to the /// specified allocator. Modified: vendor/llvm/dist/include/llvm/Analysis/DebugInfo.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/DebugInfo.h Fri Apr 2 06:55:31 2010 (r206082) +++ vendor/llvm/dist/include/llvm/Analysis/DebugInfo.h Fri Apr 2 08:54:30 2010 (r206083) @@ -395,8 +395,21 @@ namespace llvm { } unsigned isArtificial() const { return getUnsignedField(14); } - StringRef getFilename() const { return getCompileUnit().getFilename();} - StringRef getDirectory() const { return getCompileUnit().getDirectory();} + StringRef getFilename() const { + if (getVersion() == llvm::LLVMDebugVersion7) + return getCompileUnit().getFilename(); + + DIFile F = getFieldAs(6); + return F.getFilename(); + } + + StringRef getDirectory() const { + if (getVersion() == llvm::LLVMDebugVersion7) + return getCompileUnit().getFilename(); + + DIFile F = getFieldAs(6); + return F.getDirectory(); + } /// Verify - Verify that a subprogram descriptor is well formed. bool Verify() const; Modified: vendor/llvm/dist/include/llvm/Analysis/Dominators.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/Dominators.h Fri Apr 2 06:55:31 2010 (r206082) +++ vendor/llvm/dist/include/llvm/Analysis/Dominators.h Fri Apr 2 08:54:30 2010 (r206083) @@ -116,12 +116,12 @@ public: return true; SmallPtrSet OtherChildren; - for(iterator I = Other->begin(), E = Other->end(); I != E; ++I) { + for (iterator I = Other->begin(), E = Other->end(); I != E; ++I) { NodeT *Nd = (*I)->getBlock(); OtherChildren.insert(Nd); } - for(iterator I = begin(), E = end(); I != E; ++I) { + for (iterator I = begin(), E = end(); I != E; ++I) { NodeT *N = (*I)->getBlock(); if (OtherChildren.count(N) == 0) return true; @@ -240,8 +240,9 @@ protected: template void Split(DominatorTreeBase& DT, typename GraphT::NodeType* NewBB) { - assert(std::distance(GraphT::child_begin(NewBB), GraphT::child_end(NewBB)) == 1 - && "NewBB should have a single successor!"); + assert(std::distance(GraphT::child_begin(NewBB), + GraphT::child_end(NewBB)) == 1 && + "NewBB should have a single successor!"); typename GraphT::NodeType* NewBBSucc = *GraphT::child_begin(NewBB); std::vector PredBlocks; @@ -374,8 +375,8 @@ public: /// isReachableFromEntry - Return true if A is dominated by the entry /// block of the function containing it. bool isReachableFromEntry(NodeT* A) { - assert (!this->isPostDominator() - && "This is not implemented for post dominators"); + assert(!this->isPostDominator() && + "This is not implemented for post dominators"); return dominates(&A->getParent()->front(), A); } @@ -393,8 +394,9 @@ public: // Compare the result of the tree walk and the dfs numbers, if expensive // checks are enabled. #ifdef XDEBUG - assert(!DFSInfoValid - || (dominatedBySlowTreeWalk(A, B) == B->DominatedBy(A))); + assert((!DFSInfoValid || + (dominatedBySlowTreeWalk(A, B) == B->DominatedBy(A))) && + "Tree walk disagrees with dfs numbers!"); #endif if (DFSInfoValid) @@ -430,16 +432,16 @@ public: /// findNearestCommonDominator - Find nearest common dominator basic block /// for basic block A and B. If there is no such block then return NULL. NodeT *findNearestCommonDominator(NodeT *A, NodeT *B) { + assert(A->getParent() == B->getParent() && + "Two blocks are not in same function"); - assert (!this->isPostDominator() - && "This is not implemented for post dominators"); - assert (A->getParent() == B->getParent() - && "Two blocks are not in same function"); - - // If either A or B is a entry block then it is nearest common dominator. - NodeT &Entry = A->getParent()->front(); - if (A == &Entry || B == &Entry) - return &Entry; + // If either A or B is a entry block then it is nearest common dominator + // (for forward-dominators). + if (!this->isPostDominator()) { + NodeT &Entry = A->getParent()->front(); + if (A == &Entry || B == &Entry) + return &Entry; + } // If B dominates A then B is nearest common dominator. if (dominates(B, A)) @@ -463,7 +465,7 @@ public: // Walk NodeB immediate dominators chain and find common dominator node. DomTreeNodeBase *IDomB = NodeB->getIDom(); - while(IDomB) { + while (IDomB) { if (NodeADoms.count(IDomB) != 0) return IDomB->getBlock(); @@ -508,8 +510,8 @@ public: /// children list. Deletes dominator node associated with basic block BB. void eraseNode(NodeT *BB) { DomTreeNodeBase *Node = getNode(BB); - assert (Node && "Removing node that isn't in dominator tree."); - assert (Node->getChildren().empty() && "Node is not a leaf node."); + assert(Node && "Removing node that isn't in dominator tree."); + assert(Node->getChildren().empty() && "Node is not a leaf node."); // Remove node from immediate dominator's children list. DomTreeNodeBase *IDom = Node->getIDom(); @@ -952,7 +954,7 @@ public: return true; } - if(!tmpSet.empty()) + if (!tmpSet.empty()) // There are nodes that are in DS2 but not in DS1. return true; Modified: vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h Fri Apr 2 06:55:31 2010 (r206082) +++ vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h Fri Apr 2 08:54:30 2010 (r206083) @@ -47,7 +47,6 @@ namespace llvm { class MCSection; class MCStreamer; class MCSymbol; - class MDNode; class DwarfWriter; class Mangler; class MCAsmInfo; @@ -138,9 +137,6 @@ namespace llvm { mutable unsigned Counter; mutable unsigned SetCounter; - // Private state for processDebugLoc() - mutable const MDNode *PrevDLT; - protected: explicit AsmPrinter(formatted_raw_ostream &o, TargetMachine &TM, MCStreamer &Streamer); Modified: vendor/llvm/dist/include/llvm/CodeGen/DwarfWriter.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/DwarfWriter.h Fri Apr 2 06:55:31 2010 (r206082) +++ vendor/llvm/dist/include/llvm/CodeGen/DwarfWriter.h Fri Apr 2 08:54:30 2010 (r206083) @@ -83,19 +83,11 @@ public: /// void EndFunction(const MachineFunction *MF); - /// RecordSourceLine - Register a source line with debug info. Returns the - /// unique label that was emitted and which provides correspondence to - /// the source line list. - MCSymbol *RecordSourceLine(unsigned Line, unsigned Col, MDNode *Scope); - - /// getRecordSourceLineCount - Count source lines. - unsigned getRecordSourceLineCount(); - /// ShouldEmitDwarfDebug - Returns true if Dwarf debugging declarations should /// be emitted. bool ShouldEmitDwarfDebug() const; - void BeginScope(const MachineInstr *MI, MCSymbol *Label); + void BeginScope(const MachineInstr *MI); void EndScope(const MachineInstr *MI); }; Modified: vendor/llvm/dist/include/llvm/CodeGen/LiveInterval.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/LiveInterval.h Fri Apr 2 06:55:31 2010 (r206082) +++ vendor/llvm/dist/include/llvm/CodeGen/LiveInterval.h Fri Apr 2 08:54:30 2010 (r206083) @@ -67,7 +67,7 @@ namespace llvm { } cr; public: - + typedef SpecificBumpPtrAllocator Allocator; typedef SmallVector KillSet; /// The ID number of this value. @@ -330,12 +330,7 @@ namespace llvm { } void clear() { - while (!valnos.empty()) { - VNInfo *VNI = valnos.back(); - valnos.pop_back(); - VNI->~VNInfo(); - } - + valnos.clear(); ranges.clear(); } @@ -370,10 +365,8 @@ namespace llvm { /// getNextValue - Create a new value number and return it. MIIdx specifies /// the instruction that defines the value number. VNInfo *getNextValue(SlotIndex def, MachineInstr *CopyMI, - bool isDefAccurate, BumpPtrAllocator &VNInfoAllocator){ - VNInfo *VNI = - static_cast(VNInfoAllocator.Allocate((unsigned)sizeof(VNInfo), - alignof())); + bool isDefAccurate, VNInfo::Allocator &VNInfoAllocator) { + VNInfo *VNI = VNInfoAllocator.Allocate(); new (VNI) VNInfo((unsigned)valnos.size(), def, CopyMI); VNI->setIsDefAccurate(isDefAccurate); valnos.push_back(VNI); @@ -383,11 +376,8 @@ namespace llvm { /// Create a copy of the given value. The new value will be identical except /// for the Value number. VNInfo *createValueCopy(const VNInfo *orig, - BumpPtrAllocator &VNInfoAllocator) { - VNInfo *VNI = - static_cast(VNInfoAllocator.Allocate((unsigned)sizeof(VNInfo), - alignof())); - + VNInfo::Allocator &VNInfoAllocator) { + VNInfo *VNI = VNInfoAllocator.Allocate(); new (VNI) VNInfo((unsigned)valnos.size(), *orig); valnos.push_back(VNI); return VNI; @@ -427,14 +417,14 @@ namespace llvm { /// VNInfoAllocator since it will create a new val#. void MergeInClobberRanges(LiveIntervals &li_, const LiveInterval &Clobbers, - BumpPtrAllocator &VNInfoAllocator); + VNInfo::Allocator &VNInfoAllocator); /// MergeInClobberRange - Same as MergeInClobberRanges except it merge in a /// single LiveRange only. void MergeInClobberRange(LiveIntervals &li_, SlotIndex Start, SlotIndex End, - BumpPtrAllocator &VNInfoAllocator); + VNInfo::Allocator &VNInfoAllocator); /// MergeValueInAsValue - Merge all of the live ranges of a specific val# /// in RHS into this live interval as the specified value number. @@ -454,7 +444,7 @@ namespace llvm { /// Copy - Copy the specified live interval. This copies all the fields /// except for the register of the interval. void Copy(const LiveInterval &RHS, MachineRegisterInfo *MRI, - BumpPtrAllocator &VNInfoAllocator); + VNInfo::Allocator &VNInfoAllocator); bool empty() const { return ranges.empty(); } Modified: vendor/llvm/dist/include/llvm/CodeGen/LiveIntervalAnalysis.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/LiveIntervalAnalysis.h Fri Apr 2 06:55:31 2010 (r206082) +++ vendor/llvm/dist/include/llvm/CodeGen/LiveIntervalAnalysis.h Fri Apr 2 08:54:30 2010 (r206083) @@ -55,7 +55,7 @@ namespace llvm { /// Special pool allocator for VNInfo's (LiveInterval val#). /// - BumpPtrAllocator VNInfoAllocator; + VNInfo::Allocator VNInfoAllocator; typedef DenseMap Reg2IntervalMap; Reg2IntervalMap r2iMap_; @@ -221,7 +221,7 @@ namespace llvm { indexes_->renumberIndexes(); } - BumpPtrAllocator& getVNInfoAllocator() { return VNInfoAllocator; } + VNInfo::Allocator& getVNInfoAllocator() { return VNInfoAllocator; } /// getVNInfoSourceReg - Helper function that parses the specified VNInfo /// copy field and returns the source register that defines it. Modified: vendor/llvm/dist/include/llvm/CodeGen/LiveStackAnalysis.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/LiveStackAnalysis.h Fri Apr 2 06:55:31 2010 (r206082) +++ vendor/llvm/dist/include/llvm/CodeGen/LiveStackAnalysis.h Fri Apr 2 08:54:30 2010 (r206083) @@ -27,7 +27,7 @@ namespace llvm { class LiveStacks : public MachineFunctionPass { /// Special pool allocator for VNInfo's (LiveInterval val#). /// - BumpPtrAllocator VNInfoAllocator; + VNInfo::Allocator VNInfoAllocator; /// S2IMap - Stack slot indices to live interval mapping. /// @@ -91,7 +91,7 @@ namespace llvm { return I->second; } - BumpPtrAllocator& getVNInfoAllocator() { return VNInfoAllocator; } + VNInfo::Allocator& getVNInfoAllocator() { return VNInfoAllocator; } virtual void getAnalysisUsage(AnalysisUsage &AU) const; virtual void releaseMemory(); Modified: vendor/llvm/dist/include/llvm/CodeGen/MachineOperand.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/MachineOperand.h Fri Apr 2 06:55:31 2010 (r206082) +++ vendor/llvm/dist/include/llvm/CodeGen/MachineOperand.h Fri Apr 2 08:54:30 2010 (r206083) @@ -285,6 +285,11 @@ public: IsEarlyClobber = Val; } + void setIsDebug(bool Val = true) { + assert(isReg() && IsDef && "Wrong MachineOperand accessor"); + IsDebug = Val; + } + //===--------------------------------------------------------------------===// // Accessors for various operand types. //===--------------------------------------------------------------------===// Modified: vendor/llvm/dist/include/llvm/CodeGen/RuntimeLibcalls.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/RuntimeLibcalls.h Fri Apr 2 06:55:31 2010 (r206082) +++ vendor/llvm/dist/include/llvm/CodeGen/RuntimeLibcalls.h Fri Apr 2 08:54:30 2010 (r206083) @@ -169,6 +169,8 @@ namespace RTLIB { FPTOSINT_F32_I32, FPTOSINT_F32_I64, FPTOSINT_F32_I128, + FPTOSINT_F64_I8, + FPTOSINT_F64_I16, FPTOSINT_F64_I32, FPTOSINT_F64_I64, FPTOSINT_F64_I128, @@ -183,6 +185,8 @@ namespace RTLIB { FPTOUINT_F32_I32, FPTOUINT_F32_I64, FPTOUINT_F32_I128, + FPTOUINT_F64_I8, + FPTOUINT_F64_I16, FPTOUINT_F64_I32, FPTOUINT_F64_I64, FPTOUINT_F64_I128, Modified: vendor/llvm/dist/include/llvm/CodeGen/SelectionDAG.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/SelectionDAG.h Fri Apr 2 06:55:31 2010 (r206082) +++ vendor/llvm/dist/include/llvm/CodeGen/SelectionDAG.h Fri Apr 2 08:54:30 2010 (r206083) @@ -34,6 +34,7 @@ class FunctionLoweringInfo; class MachineConstantPoolValue; class MachineFunction; class MachineModuleInfo; +class MDNode; class SDNodeOrdering; class SDDbgValue; class TargetLowering; @@ -60,42 +61,40 @@ private: /// SDDbgInfo - Keeps track of dbg_value information through SDISel. We do /// not build SDNodes for these so as not to perturb the generated code; -/// instead the info is kept off to the side in this structure. SDNodes may -/// have an associated dbg_value entry in DbgValMap. Debug info that is not -/// associated with any SDNode is held in DbgConstMap. It is possible for -/// optimizations to change a variable to a constant, in which case the -/// corresponding debug info is moved from the variable to the constant table -/// (NYI). +/// instead the info is kept off to the side in this structure. Each SDNode may +/// have one or more associated dbg_value entries. This information is kept in +/// DbgValMap. class SDDbgInfo { - DenseMap DbgVblMap; - SmallVector DbgConstMap; + SmallVector DbgValues; + DenseMap > DbgValMap; void operator=(const SDDbgInfo&); // Do not implement. SDDbgInfo(const SDDbgInfo&); // Do not implement. public: SDDbgInfo() {} - void add(const SDNode *Node, SDDbgValue *V) { - DbgVblMap[Node] = V; + void add(SDDbgValue *V, const SDNode *Node = 0) { + if (Node) + DbgValMap[Node].push_back(V); + DbgValues.push_back(V); } - void add(SDDbgValue *V) { DbgConstMap.push_back(V); } - void remove(const SDNode *Node) { - DenseMap::iterator Itr = - DbgVblMap.find(Node); - if (Itr != DbgVblMap.end()) - DbgVblMap.erase(Itr); - } - // No need to remove a constant. + void clear() { - DbgVblMap.clear(); - DbgConstMap.clear(); + DbgValMap.clear(); + DbgValues.clear(); } - SDDbgValue *getSDDbgValue(const SDNode *Node) { - return DbgVblMap[Node]; + + bool empty() const { + return DbgValues.empty(); + } + + SmallVector &getSDDbgValues(const SDNode *Node) { + return DbgValMap[Node]; } - typedef SmallVector::iterator ConstDbgIterator; - ConstDbgIterator DbgConstBegin() { return DbgConstMap.begin(); } - ConstDbgIterator DbgConstEnd() { return DbgConstMap.end(); } + + typedef SmallVector::iterator DbgIterator; + DbgIterator DbgBegin() { return DbgValues.begin(); } + DbgIterator DbgEnd() { return DbgValues.end(); } }; enum CombineLevel { @@ -769,6 +768,15 @@ public: SDNode *getNodeIfExists(unsigned Opcode, SDVTList VTs, const SDValue *Ops, unsigned NumOps); + /// getDbgValue - Creates a SDDbgValue node. + /// + SDDbgValue *getDbgValue(MDNode *MDPtr, SDNode *N, unsigned R, uint64_t Off, + DebugLoc DL, unsigned O); + SDDbgValue *getDbgValue(MDNode *MDPtr, Value *C, uint64_t Off, + DebugLoc DL, unsigned O); + SDDbgValue *getDbgValue(MDNode *MDPtr, unsigned FI, uint64_t Off, + DebugLoc DL, unsigned O); + /// DAGUpdateListener - Clients of various APIs that cause global effects on /// the DAG can optionally implement this interface. This allows the clients /// to handle the various sorts of updates that happen. @@ -871,19 +879,21 @@ public: /// GetOrdering - Get the order for the SDNode. unsigned GetOrdering(const SDNode *SD) const; - /// AssignDbgInfo - Assign debug info to the SDNode. - void AssignDbgInfo(SDNode *SD, SDDbgValue *db); + /// AddDbgValue - Add a dbg_value SDNode. If SD is non-null that means the + /// value is produced by SD. + void AddDbgValue(SDDbgValue *DB, SDNode *SD = 0); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Apr 2 08:55:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CFBB2106566B; Fri, 2 Apr 2010 08:55:11 +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 B596B8FC0A; Fri, 2 Apr 2010 08:55: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 o328tBPx006214; Fri, 2 Apr 2010 08:55:11 GMT (envelope-from rdivacky@svn.freebsd.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o328tBgJ006198; Fri, 2 Apr 2010 08:55:11 GMT (envelope-from rdivacky@svn.freebsd.org) Message-Id: <201004020855.o328tBgJ006198@svn.freebsd.org> From: Roman Divacky Date: Fri, 2 Apr 2010 08:55:11 +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: r206084 - in vendor/clang/dist: . clang.xcodeproj examples/clang-interpreter include/clang/AST include/clang/Analysis include/clang/Analysis/FlowSensitive include/clang/Basic include/cl... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Apr 2010 08:55:12 -0000 Author: rdivacky Date: Fri Apr 2 08:55:10 2010 New Revision: 206084 URL: http://svn.freebsd.org/changeset/base/206084 Log: Update clang to r100181. Added: vendor/clang/dist/include/clang/AST/DependentDiagnostic.h vendor/clang/dist/lib/Checker/AggExprVisitor.cpp vendor/clang/dist/lib/CodeGen/CGRecordLayout.h vendor/clang/dist/lib/Headers/wmmintrin.h vendor/clang/dist/test/CXX/basic/basic.stc/basic.stc.dynamic/p2-noexceptions.cpp vendor/clang/dist/test/CXX/class.access/class.access.base/p5.cpp vendor/clang/dist/test/CXX/class.derived/class.abstract/p4.cpp vendor/clang/dist/test/CXX/class.derived/class.abstract/p5.cpp vendor/clang/dist/test/CXX/class.derived/class.virtual/p2.cpp vendor/clang/dist/test/CXX/stmt.stmt/stmt.select/p3.cpp vendor/clang/dist/test/CXX/temp/temp.fct.spec/temp.deduct/p9.cpp vendor/clang/dist/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.type/p17.cpp vendor/clang/dist/test/CodeGen/restrict.c vendor/clang/dist/test/CodeGenCXX/multi-dim-operator-new.cpp vendor/clang/dist/test/CodeGenCXX/rtti-fundamental.cpp vendor/clang/dist/test/CodeGenCXX/template-instantiation.cpp vendor/clang/dist/test/CodeGenCXX/thunks.cpp vendor/clang/dist/test/CodeGenObjC/complex-property.m vendor/clang/dist/test/CodeGenObjC/objc2-nonfragile-abi-impl.m vendor/clang/dist/test/Driver/nostdincxx.cpp vendor/clang/dist/test/Headers/c89.c vendor/clang/dist/test/Headers/x86-intrinsics-headers.c vendor/clang/dist/test/Index/print-usrs.c vendor/clang/dist/test/Parser/cxx-default-args.cpp vendor/clang/dist/test/Sema/attr-format.c vendor/clang/dist/test/Sema/attr-sentinel.c vendor/clang/dist/test/Sema/warn-gnu-designators.c vendor/clang/dist/test/SemaCXX/PR6618.cpp vendor/clang/dist/test/SemaCXX/new-delete-predefined-decl-2.cpp vendor/clang/dist/test/SemaObjC/ivar-in-class-extension-error.m vendor/clang/dist/test/SemaObjC/no-protocol-option-tests.m vendor/clang/dist/test/SemaObjC/property-in-class-extension.m vendor/clang/dist/test/SemaTemplate/instantiate-elab-type-specifier.cpp vendor/clang/dist/test/SemaTemplate/instantiate-function-params.cpp vendor/clang/dist/www/analyzer/downloads/ Deleted: vendor/clang/dist/lib/CodeGen/CGRecordLayoutBuilder.h vendor/clang/dist/test/Preprocessor/macro_disable2.c vendor/clang/dist/test/Preprocessor/macro_disable3.c vendor/clang/dist/test/Preprocessor/macro_disable4.c vendor/clang/dist/test/Sema/format-attr-pr4470.c vendor/clang/dist/test/Sema/format-attribute-printf0.c vendor/clang/dist/test/Sema/format-attribute.c vendor/clang/dist/test/Sema/function-pointer-sentinel-attribute.c vendor/clang/dist/test/Sema/function-sentinel-attr.c vendor/clang/dist/test/Sema/x86-intrinsics-headers.c Modified: vendor/clang/dist/CMakeLists.txt vendor/clang/dist/clang.xcodeproj/project.pbxproj vendor/clang/dist/examples/clang-interpreter/main.cpp vendor/clang/dist/include/clang/AST/ASTContext.h vendor/clang/dist/include/clang/AST/CXXInheritance.h vendor/clang/dist/include/clang/AST/CanonicalType.h vendor/clang/dist/include/clang/AST/Decl.h vendor/clang/dist/include/clang/AST/DeclBase.h vendor/clang/dist/include/clang/AST/DeclCXX.h vendor/clang/dist/include/clang/AST/DeclContextInternals.h vendor/clang/dist/include/clang/AST/DeclFriend.h vendor/clang/dist/include/clang/AST/DeclTemplate.h vendor/clang/dist/include/clang/AST/DeclarationName.h vendor/clang/dist/include/clang/AST/Expr.h vendor/clang/dist/include/clang/AST/ExprCXX.h vendor/clang/dist/include/clang/AST/Type.h vendor/clang/dist/include/clang/AST/TypeLoc.h vendor/clang/dist/include/clang/AST/TypeNodes.def vendor/clang/dist/include/clang/Analysis/AnalysisContext.h vendor/clang/dist/include/clang/Analysis/FlowSensitive/DataflowSolver.h vendor/clang/dist/include/clang/Basic/Builtins.def vendor/clang/dist/include/clang/Basic/BuiltinsX86.def vendor/clang/dist/include/clang/Basic/CMakeLists.txt vendor/clang/dist/include/clang/Basic/Diagnostic.h vendor/clang/dist/include/clang/Basic/DiagnosticFrontendKinds.td 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/Basic/PartialDiagnostic.h vendor/clang/dist/include/clang/Basic/SourceLocation.h vendor/clang/dist/include/clang/Checker/BugReporter/BugReporter.h vendor/clang/dist/include/clang/Checker/BugReporter/BugType.h vendor/clang/dist/include/clang/Checker/BugReporter/PathDiagnostic.h vendor/clang/dist/include/clang/Checker/DomainSpecific/CocoaConventions.h vendor/clang/dist/include/clang/Checker/PathSensitive/BasicValueFactory.h vendor/clang/dist/include/clang/Checker/PathSensitive/Checker.h vendor/clang/dist/include/clang/Checker/PathSensitive/Environment.h vendor/clang/dist/include/clang/Checker/PathSensitive/ExplodedGraph.h vendor/clang/dist/include/clang/Checker/PathSensitive/GRBlockCounter.h vendor/clang/dist/include/clang/Checker/PathSensitive/GRCoreEngine.h vendor/clang/dist/include/clang/Checker/PathSensitive/GRExprEngine.h vendor/clang/dist/include/clang/Checker/PathSensitive/GRSimpleAPICheck.h vendor/clang/dist/include/clang/Checker/PathSensitive/GRState.h vendor/clang/dist/include/clang/Checker/PathSensitive/GRSubEngine.h vendor/clang/dist/include/clang/Checker/PathSensitive/GRTransferFuncs.h vendor/clang/dist/include/clang/Checker/PathSensitive/MemRegion.h vendor/clang/dist/include/clang/Checker/PathSensitive/Store.h vendor/clang/dist/include/clang/Checker/PathSensitive/SymbolManager.h vendor/clang/dist/include/clang/CodeGen/CodeGenOptions.h vendor/clang/dist/include/clang/Driver/CC1Options.td vendor/clang/dist/include/clang/Driver/CMakeLists.txt vendor/clang/dist/include/clang/Driver/Driver.h vendor/clang/dist/include/clang/Driver/Options.td vendor/clang/dist/include/clang/Frontend/HeaderSearchOptions.h vendor/clang/dist/include/clang/Frontend/TextDiagnosticPrinter.h vendor/clang/dist/include/clang/Frontend/TypeXML.def vendor/clang/dist/include/clang/Lex/PPCallbacks.h vendor/clang/dist/include/clang/Lex/Preprocessor.h vendor/clang/dist/include/clang/Lex/PreprocessorLexer.h vendor/clang/dist/include/clang/Parse/Action.h vendor/clang/dist/lib/AST/ASTContext.cpp vendor/clang/dist/lib/AST/ASTImporter.cpp vendor/clang/dist/lib/AST/CMakeLists.txt vendor/clang/dist/lib/AST/CXXInheritance.cpp vendor/clang/dist/lib/AST/Decl.cpp vendor/clang/dist/lib/AST/DeclBase.cpp vendor/clang/dist/lib/AST/DeclCXX.cpp vendor/clang/dist/lib/AST/Expr.cpp vendor/clang/dist/lib/AST/Type.cpp vendor/clang/dist/lib/AST/TypePrinter.cpp vendor/clang/dist/lib/Analysis/AnalysisContext.cpp vendor/clang/dist/lib/Analysis/CFG.cpp vendor/clang/dist/lib/Analysis/PrintfFormatString.cpp vendor/clang/dist/lib/Basic/Diagnostic.cpp vendor/clang/dist/lib/Basic/SourceManager.cpp vendor/clang/dist/lib/Basic/Targets.cpp vendor/clang/dist/lib/Checker/AdjustedReturnValueChecker.cpp vendor/clang/dist/lib/Checker/ArrayBoundChecker.cpp vendor/clang/dist/lib/Checker/AttrNonNullChecker.cpp vendor/clang/dist/lib/Checker/BasicObjCFoundationChecks.cpp vendor/clang/dist/lib/Checker/BugReporter.cpp vendor/clang/dist/lib/Checker/BugReporterVisitors.cpp vendor/clang/dist/lib/Checker/CFRefCount.cpp vendor/clang/dist/lib/Checker/CMakeLists.txt vendor/clang/dist/lib/Checker/CallAndMessageChecker.cpp vendor/clang/dist/lib/Checker/CastToStructChecker.cpp vendor/clang/dist/lib/Checker/CheckSecuritySyntaxOnly.cpp vendor/clang/dist/lib/Checker/DereferenceChecker.cpp vendor/clang/dist/lib/Checker/DivZeroChecker.cpp vendor/clang/dist/lib/Checker/Environment.cpp vendor/clang/dist/lib/Checker/FixedAddressChecker.cpp vendor/clang/dist/lib/Checker/GRBlockCounter.cpp vendor/clang/dist/lib/Checker/GRCoreEngine.cpp vendor/clang/dist/lib/Checker/GRExprEngine.cpp vendor/clang/dist/lib/Checker/GRState.cpp vendor/clang/dist/lib/Checker/MacOSXAPIChecker.cpp vendor/clang/dist/lib/Checker/MallocChecker.cpp vendor/clang/dist/lib/Checker/MemRegion.cpp vendor/clang/dist/lib/Checker/NSErrorChecker.cpp vendor/clang/dist/lib/Checker/NoReturnFunctionChecker.cpp vendor/clang/dist/lib/Checker/PathDiagnostic.cpp vendor/clang/dist/lib/Checker/PointerArithChecker.cpp vendor/clang/dist/lib/Checker/PointerSubChecker.cpp vendor/clang/dist/lib/Checker/RegionStore.cpp vendor/clang/dist/lib/Checker/ReturnPointerRangeChecker.cpp vendor/clang/dist/lib/Checker/ReturnStackAddressChecker.cpp vendor/clang/dist/lib/Checker/ReturnUndefChecker.cpp vendor/clang/dist/lib/Checker/SymbolManager.cpp vendor/clang/dist/lib/Checker/UndefBranchChecker.cpp vendor/clang/dist/lib/Checker/UndefCapturedBlockVarChecker.cpp vendor/clang/dist/lib/Checker/UndefResultChecker.cpp vendor/clang/dist/lib/Checker/UndefinedArraySubscriptChecker.cpp vendor/clang/dist/lib/Checker/UndefinedAssignmentChecker.cpp vendor/clang/dist/lib/Checker/UnixAPIChecker.cpp vendor/clang/dist/lib/Checker/VLASizeChecker.cpp vendor/clang/dist/lib/CodeGen/CGBlocks.cpp vendor/clang/dist/lib/CodeGen/CGBlocks.h 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/CGCall.h vendor/clang/dist/lib/CodeGen/CGClass.cpp vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp vendor/clang/dist/lib/CodeGen/CGDebugInfo.h vendor/clang/dist/lib/CodeGen/CGExpr.cpp vendor/clang/dist/lib/CodeGen/CGExprAgg.cpp vendor/clang/dist/lib/CodeGen/CGExprCXX.cpp vendor/clang/dist/lib/CodeGen/CGExprComplex.cpp vendor/clang/dist/lib/CodeGen/CGExprConstant.cpp vendor/clang/dist/lib/CodeGen/CGExprScalar.cpp vendor/clang/dist/lib/CodeGen/CGObjC.cpp vendor/clang/dist/lib/CodeGen/CGObjCGNU.cpp vendor/clang/dist/lib/CodeGen/CGObjCMac.cpp vendor/clang/dist/lib/CodeGen/CGObjCRuntime.h vendor/clang/dist/lib/CodeGen/CGRTTI.cpp vendor/clang/dist/lib/CodeGen/CGRecordLayoutBuilder.cpp vendor/clang/dist/lib/CodeGen/CGStmt.cpp vendor/clang/dist/lib/CodeGen/CGTemporaries.cpp vendor/clang/dist/lib/CodeGen/CGVTT.cpp vendor/clang/dist/lib/CodeGen/CGVtable.cpp vendor/clang/dist/lib/CodeGen/CGVtable.h vendor/clang/dist/lib/CodeGen/CodeGenFunction.cpp vendor/clang/dist/lib/CodeGen/CodeGenFunction.h vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp vendor/clang/dist/lib/CodeGen/CodeGenModule.h vendor/clang/dist/lib/CodeGen/CodeGenTypes.cpp vendor/clang/dist/lib/CodeGen/CodeGenTypes.h vendor/clang/dist/lib/CodeGen/Mangle.cpp vendor/clang/dist/lib/CodeGen/Mangle.h vendor/clang/dist/lib/Driver/CMakeLists.txt vendor/clang/dist/lib/Driver/Driver.cpp vendor/clang/dist/lib/Driver/HostInfo.cpp vendor/clang/dist/lib/Driver/Tools.cpp vendor/clang/dist/lib/Frontend/ASTUnit.cpp vendor/clang/dist/lib/Frontend/CompilerInstance.cpp vendor/clang/dist/lib/Frontend/CompilerInvocation.cpp vendor/clang/dist/lib/Frontend/DependencyFile.cpp vendor/clang/dist/lib/Frontend/FixItRewriter.cpp vendor/clang/dist/lib/Frontend/FrontendAction.cpp vendor/clang/dist/lib/Frontend/HTMLDiagnostics.cpp vendor/clang/dist/lib/Frontend/InitHeaderSearch.cpp vendor/clang/dist/lib/Frontend/PCHReader.cpp vendor/clang/dist/lib/Frontend/PCHWriter.cpp vendor/clang/dist/lib/Frontend/RewriteObjC.cpp vendor/clang/dist/lib/Frontend/TextDiagnosticPrinter.cpp vendor/clang/dist/lib/Headers/emmintrin.h vendor/clang/dist/lib/Headers/mm_malloc.h vendor/clang/dist/lib/Headers/mmintrin.h vendor/clang/dist/lib/Headers/pmmintrin.h vendor/clang/dist/lib/Headers/smmintrin.h vendor/clang/dist/lib/Headers/tmmintrin.h vendor/clang/dist/lib/Headers/xmmintrin.h vendor/clang/dist/lib/Lex/Lexer.cpp vendor/clang/dist/lib/Lex/PPDirectives.cpp vendor/clang/dist/lib/Lex/PPLexerChange.cpp vendor/clang/dist/lib/Lex/PPMacroExpansion.cpp vendor/clang/dist/lib/Lex/Preprocessor.cpp vendor/clang/dist/lib/Lex/TokenConcatenation.cpp vendor/clang/dist/lib/Parse/AttributeList.cpp vendor/clang/dist/lib/Parse/DeclSpec.cpp vendor/clang/dist/lib/Parse/ParseCXXInlineMethods.cpp vendor/clang/dist/lib/Parse/ParseDecl.cpp vendor/clang/dist/lib/Parse/ParseDeclCXX.cpp vendor/clang/dist/lib/Parse/ParseExprCXX.cpp vendor/clang/dist/lib/Parse/ParseInit.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/AnalysisBasedWarnings.cpp vendor/clang/dist/lib/Sema/AnalysisBasedWarnings.h vendor/clang/dist/lib/Sema/Lookup.h vendor/clang/dist/lib/Sema/Sema.cpp vendor/clang/dist/lib/Sema/Sema.h vendor/clang/dist/lib/Sema/SemaAccess.cpp vendor/clang/dist/lib/Sema/SemaCXXCast.cpp vendor/clang/dist/lib/Sema/SemaCXXScopeSpec.cpp vendor/clang/dist/lib/Sema/SemaChecking.cpp vendor/clang/dist/lib/Sema/SemaDecl.cpp vendor/clang/dist/lib/Sema/SemaDeclAttr.cpp vendor/clang/dist/lib/Sema/SemaDeclCXX.cpp vendor/clang/dist/lib/Sema/SemaDeclObjC.cpp vendor/clang/dist/lib/Sema/SemaExceptionSpec.cpp vendor/clang/dist/lib/Sema/SemaExpr.cpp vendor/clang/dist/lib/Sema/SemaExprCXX.cpp vendor/clang/dist/lib/Sema/SemaExprObjC.cpp vendor/clang/dist/lib/Sema/SemaInit.cpp vendor/clang/dist/lib/Sema/SemaInit.h vendor/clang/dist/lib/Sema/SemaLookup.cpp vendor/clang/dist/lib/Sema/SemaObjCProperty.cpp vendor/clang/dist/lib/Sema/SemaOverload.cpp vendor/clang/dist/lib/Sema/SemaStmt.cpp vendor/clang/dist/lib/Sema/SemaTemplate.cpp vendor/clang/dist/lib/Sema/SemaTemplate.h vendor/clang/dist/lib/Sema/SemaTemplateDeduction.cpp vendor/clang/dist/lib/Sema/SemaTemplateInstantiate.cpp vendor/clang/dist/lib/Sema/SemaTemplateInstantiateDecl.cpp vendor/clang/dist/lib/Sema/SemaType.cpp vendor/clang/dist/lib/Sema/TreeTransform.h vendor/clang/dist/test/Analysis/PR3991.m vendor/clang/dist/test/Analysis/inline.c vendor/clang/dist/test/Analysis/misc-ps-region-store.m vendor/clang/dist/test/Analysis/no-outofbounds.c vendor/clang/dist/test/Analysis/null-deref-ps.c vendor/clang/dist/test/Analysis/outofbound.c vendor/clang/dist/test/Analysis/plist-output.m vendor/clang/dist/test/Analysis/pr4209.m vendor/clang/dist/test/Analysis/retain-release-region-store.m vendor/clang/dist/test/Analysis/retain-release.m vendor/clang/dist/test/Analysis/uninit-vals-ps-region.m vendor/clang/dist/test/CXX/basic/basic.lookup/basic.lookup.argdep/p4.cpp vendor/clang/dist/test/CXX/basic/basic.stc/basic.stc.dynamic/p2.cpp vendor/clang/dist/test/CXX/class.access/class.friend/p1.cpp vendor/clang/dist/test/CXX/class.access/p4.cpp vendor/clang/dist/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p1.cpp vendor/clang/dist/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.type.elab/p3.cpp vendor/clang/dist/test/CXX/temp/temp.arg/temp.arg.nontype/p1.cpp vendor/clang/dist/test/CXX/temp/temp.arg/temp.arg.nontype/p5.cpp vendor/clang/dist/test/CXX/temp/temp.decls/temp.friend/p1.cpp vendor/clang/dist/test/CXX/temp/temp.res/temp.local/p1.cpp vendor/clang/dist/test/CXX/temp/temp.spec/temp.expl.spec/p20.cpp vendor/clang/dist/test/CodeGen/atomic.c vendor/clang/dist/test/CodeGen/mangle.c vendor/clang/dist/test/CodeGen/palignr.c vendor/clang/dist/test/CodeGen/regparm.c vendor/clang/dist/test/CodeGenCXX/constructor-init.cpp vendor/clang/dist/test/CodeGenCXX/copy-constructor-synthesis.cpp vendor/clang/dist/test/CodeGenCXX/member-expressions.cpp vendor/clang/dist/test/CodeGenCXX/references.cpp vendor/clang/dist/test/CodeGenCXX/rtti-linkage.cpp vendor/clang/dist/test/CodeGenCXX/temporaries.cpp vendor/clang/dist/test/CodeGenCXX/virt.cpp vendor/clang/dist/test/CodeGenCXX/virtual-bases.cpp vendor/clang/dist/test/CodeGenCXX/vtable-layout-abi-examples.cpp vendor/clang/dist/test/CodeGenCXX/vtable-layout.cpp vendor/clang/dist/test/CodeGenCXX/vtable-linkage.cpp vendor/clang/dist/test/FixIt/fixit.cpp vendor/clang/dist/test/Index/Inputs/remap-complete-to.c vendor/clang/dist/test/Index/cindex-on-invalid.m vendor/clang/dist/test/Index/recover-bad-code-rdar_7487294.c vendor/clang/dist/test/Index/remap-complete.c vendor/clang/dist/test/PCH/changed-files.c vendor/clang/dist/test/Parser/objc-messaging-neg-1.m vendor/clang/dist/test/Parser/statements.c vendor/clang/dist/test/Preprocessor/dependencies-and-pp.c vendor/clang/dist/test/Preprocessor/macro_disable.c vendor/clang/dist/test/Preprocessor/output_paste_avoid.c vendor/clang/dist/test/Sema/attr-unused.c vendor/clang/dist/test/Sema/format-strings.c vendor/clang/dist/test/Sema/init.c vendor/clang/dist/test/Sema/nested-redef.c vendor/clang/dist/test/Sema/return.c vendor/clang/dist/test/Sema/struct-packed-align.c vendor/clang/dist/test/Sema/warn-shadow.c vendor/clang/dist/test/SemaCXX/class-base-member-init.cpp vendor/clang/dist/test/SemaCXX/class-layout.cpp vendor/clang/dist/test/SemaCXX/conditional-expr.cpp vendor/clang/dist/test/SemaCXX/destructor.cpp vendor/clang/dist/test/SemaCXX/exception-spec.cpp vendor/clang/dist/test/SemaCXX/invalid-member-expr.cpp vendor/clang/dist/test/SemaCXX/namespace-alias.cpp vendor/clang/dist/test/SemaCXX/namespace.cpp vendor/clang/dist/test/SemaCXX/nested-name-spec.cpp vendor/clang/dist/test/SemaCXX/qual-id-test.cpp vendor/clang/dist/test/SemaCXX/static-cast.cpp vendor/clang/dist/test/SemaCXX/warn-reorder-ctor-initialization.cpp vendor/clang/dist/test/SemaObjC/block-type-safety.m vendor/clang/dist/test/SemaObjC/category-1.m vendor/clang/dist/test/SemaObjC/compare-qualified-id.m vendor/clang/dist/test/SemaObjC/comptypes-7.m vendor/clang/dist/test/SemaObjC/conditional-expr.m vendor/clang/dist/test/SemaObjC/gcc-cast-ext.m vendor/clang/dist/test/SemaObjC/ivar-in-implementations.m vendor/clang/dist/test/SemaObjC/ivar-sem-check-1.m vendor/clang/dist/test/SemaObjC/method-arg-decay.m vendor/clang/dist/test/SemaObjC/method-undef-category-warn-1.m vendor/clang/dist/test/SemaObjC/method-undef-extension-warn-1.m vendor/clang/dist/test/SemaObjC/method-undefined-warn-1.m vendor/clang/dist/test/SemaObjC/method-warn-unused-attribute.m vendor/clang/dist/test/SemaObjC/nsobject-attribute.m vendor/clang/dist/test/SemaObjC/property-expression-error.m vendor/clang/dist/test/SemaObjC/property-ivar-mismatch.m vendor/clang/dist/test/SemaObjC/property.m vendor/clang/dist/test/SemaObjC/undef-protocol-methods-1.m vendor/clang/dist/test/SemaTemplate/dependent-base-classes.cpp vendor/clang/dist/test/SemaTemplate/friend-template.cpp vendor/clang/dist/test/SemaTemplate/instantiate-declref.cpp vendor/clang/dist/test/SemaTemplate/instantiate-expr-4.cpp vendor/clang/dist/test/SemaTemplate/instantiate-init.cpp vendor/clang/dist/test/SemaTemplate/instantiate-member-class.cpp vendor/clang/dist/test/SemaTemplate/instantiate-member-initializers.cpp vendor/clang/dist/test/SemaTemplate/instantiation-default-2.cpp vendor/clang/dist/test/SemaTemplate/temp_arg_nontype.cpp vendor/clang/dist/tools/CIndex/CIndex.cpp vendor/clang/dist/tools/CIndex/CIndexDiagnostic.cpp vendor/clang/dist/tools/CIndex/CIndexUSRs.cpp vendor/clang/dist/tools/CIndex/CMakeLists.txt vendor/clang/dist/tools/c-index-test/c-index-test.c vendor/clang/dist/tools/driver/Makefile vendor/clang/dist/tools/driver/cc1_main.cpp vendor/clang/dist/tools/driver/driver.cpp vendor/clang/dist/tools/scan-build/scan-build vendor/clang/dist/utils/VtableTest/Makefile vendor/clang/dist/utils/VtableTest/check-ztt vendor/clang/dist/www/analyzer/latest_checker.html.incl vendor/clang/dist/www/get_started.html Modified: vendor/clang/dist/CMakeLists.txt ============================================================================== --- vendor/clang/dist/CMakeLists.txt Fri Apr 2 08:54:30 2010 (r206083) +++ vendor/clang/dist/CMakeLists.txt Fri Apr 2 08:55:10 2010 (r206084) @@ -92,6 +92,12 @@ install(DIRECTORY include/ PATTERN ".svn" EXCLUDE ) +install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/ + DESTINATION include + FILES_MATCHING + PATTERN "*.inc" + ) + add_definitions( -D_GNU_SOURCE ) option(CLANG_BUILD_EXAMPLES "Build CLANG example programs." OFF) Modified: vendor/clang/dist/clang.xcodeproj/project.pbxproj ============================================================================== --- vendor/clang/dist/clang.xcodeproj/project.pbxproj Fri Apr 2 08:54:30 2010 (r206083) +++ vendor/clang/dist/clang.xcodeproj/project.pbxproj Fri Apr 2 08:55:10 2010 (r206084) @@ -12,7 +12,6 @@ 1A2193CE0F45EEB700C0713D /* Mangle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2193CC0F45EEB700C0713D /* Mangle.cpp */; }; 1A2A54B50FD1DD1C00F4CE45 /* AnalysisConsumer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54A40FD1DD1C00F4CE45 /* AnalysisConsumer.cpp */; }; 1A2A54B60FD1DD1C00F4CE45 /* ASTConsumers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54A50FD1DD1C00F4CE45 /* ASTConsumers.cpp */; }; - 1A2A54B70FD1DD1C00F4CE45 /* Backend.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54A60FD1DD1C00F4CE45 /* Backend.cpp */; }; 1A2A54B80FD1DD1C00F4CE45 /* CacheTokens.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54A70FD1DD1C00F4CE45 /* CacheTokens.cpp */; }; 1A2A54B90FD1DD1C00F4CE45 /* DependencyFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54A80FD1DD1C00F4CE45 /* DependencyFile.cpp */; }; 1A2A54BA0FD1DD1C00F4CE45 /* DiagChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54A90FD1DD1C00F4CE45 /* DiagChecker.cpp */; }; @@ -70,6 +69,8 @@ 1ADF47AF0F782C3200E48A8A /* SemaTemplateInstantiateDecl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ADF47AE0F782C3200E48A8A /* SemaTemplateInstantiateDecl.cpp */; }; 1AE4EE3E103B89ED00888A23 /* StmtProfile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AE4EE3D103B89ED00888A23 /* StmtProfile.cpp */; }; 1AF1B50F109A4FB800AFAFAC /* CGException.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AF1B50E109A4FB800AFAFAC /* CGException.cpp */; }; + 1AFDD8721161085D00AE030A /* ASTMerge.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AFDD8701161085D00AE030A /* ASTMerge.cpp */; }; + 1AFDD8731161085D00AE030A /* CodeGenAction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AFDD8711161085D00AE030A /* CodeGenAction.cpp */; }; 1AFF8AE31012BFC900D248DA /* CGRecordLayoutBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AFF8AE11012BFC900D248DA /* CGRecordLayoutBuilder.cpp */; }; 3507E4C20E27FE2D00FB7B57 /* CheckObjCInstMethSignature.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3507E4C10E27FE2D00FB7B57 /* CheckObjCInstMethSignature.cpp */; }; 352246E70F5C6BE000D0D279 /* HTMLDiagnostics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 352246E10F5C6BE000D0D279 /* HTMLDiagnostics.cpp */; }; @@ -149,6 +150,11 @@ 90FD6D85103C3D49005F5B73 /* SelectorMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 90FD6D7A103C3D49005F5B73 /* SelectorMap.cpp */; }; 90FD6DB6103D977E005F5B73 /* index-test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 90FD6DB5103D977E005F5B73 /* index-test.cpp */; }; BDF87CF70FD746F300BBF872 /* SemaTemplateDeduction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BDF87CF60FD746F300BBF872 /* SemaTemplateDeduction.cpp */; }; + BF89C3E211595818001C2D68 /* AnalysisBasedWarnings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF89C3E111595818001C2D68 /* AnalysisBasedWarnings.cpp */; }; + BF89C3E91159594A001C2D68 /* SemaObjCProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF89C3E81159594A001C2D68 /* SemaObjCProperty.cpp */; }; + BF89C3F911595A01001C2D68 /* SemaType.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF89C3F811595A01001C2D68 /* SemaType.cpp */; }; + BF89C3FB11595A37001C2D68 /* SemaCodeComplete.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF89C3FA11595A37001C2D68 /* SemaCodeComplete.cpp */; }; + BF89C3FD11595A5D001C2D68 /* SemaExceptionSpec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF89C3FC11595A5D001C2D68 /* SemaExceptionSpec.cpp */; }; DE01DA490B12ADA300AC22CE /* PPCallbacks.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE01DA480B12ADA300AC22CE /* PPCallbacks.h */; }; DE06756C0C051CFE00EBBFD8 /* ParseExprCXX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE06756B0C051CFE00EBBFD8 /* ParseExprCXX.cpp */; }; DE06B73E0A8307640050E87E /* LangOptions.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE06B73D0A8307640050E87E /* LangOptions.h */; }; @@ -365,7 +371,6 @@ 1A2193CD0F45EEB700C0713D /* Mangle.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = Mangle.h; path = lib/CodeGen/Mangle.h; sourceTree = ""; tabWidth = 2; }; 1A2A54A40FD1DD1C00F4CE45 /* AnalysisConsumer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AnalysisConsumer.cpp; path = lib/Frontend/AnalysisConsumer.cpp; sourceTree = ""; }; 1A2A54A50FD1DD1C00F4CE45 /* ASTConsumers.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = ASTConsumers.cpp; path = lib/Frontend/ASTConsumers.cpp; sourceTree = ""; tabWidth = 2; }; - 1A2A54A60FD1DD1C00F4CE45 /* Backend.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Backend.cpp; path = lib/Frontend/Backend.cpp; sourceTree = ""; }; 1A2A54A70FD1DD1C00F4CE45 /* CacheTokens.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CacheTokens.cpp; path = lib/Frontend/CacheTokens.cpp; sourceTree = ""; }; 1A2A54A80FD1DD1C00F4CE45 /* DependencyFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DependencyFile.cpp; path = lib/Frontend/DependencyFile.cpp; sourceTree = ""; }; 1A2A54A90FD1DD1C00F4CE45 /* DiagChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DiagChecker.cpp; path = lib/Frontend/DiagChecker.cpp; sourceTree = ""; }; @@ -446,8 +451,9 @@ 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; }; 1AF1B50E109A4FB800AFAFAC /* CGException.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGException.cpp; path = lib/CodeGen/CGException.cpp; sourceTree = ""; tabWidth = 2; }; + 1AFDD8701161085D00AE030A /* ASTMerge.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ASTMerge.cpp; path = lib/Frontend/ASTMerge.cpp; sourceTree = ""; }; + 1AFDD8711161085D00AE030A /* CodeGenAction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CodeGenAction.cpp; path = lib/Frontend/CodeGenAction.cpp; sourceTree = ""; }; 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; }; 3507E4C10E27FE2D00FB7B57 /* CheckObjCInstMethSignature.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CheckObjCInstMethSignature.cpp; path = lib/Analysis/CheckObjCInstMethSignature.cpp; sourceTree = ""; }; 352246E10F5C6BE000D0D279 /* HTMLDiagnostics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HTMLDiagnostics.cpp; path = lib/Frontend/HTMLDiagnostics.cpp; sourceTree = ""; }; 352246E20F5C6BE000D0D279 /* InitHeaderSearch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = InitHeaderSearch.cpp; path = lib/Frontend/InitHeaderSearch.cpp; sourceTree = ""; }; @@ -618,6 +624,15 @@ 90FD6D91103C3D80005F5B73 /* Utils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Utils.h; path = clang/Frontend/Utils.h; sourceTree = ""; }; 90FD6DB5103D977E005F5B73 /* index-test.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "index-test.cpp"; path = "tools/index-test/index-test.cpp"; sourceTree = ""; }; BDF87CF60FD746F300BBF872 /* SemaTemplateDeduction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaTemplateDeduction.cpp; path = lib/Sema/SemaTemplateDeduction.cpp; sourceTree = ""; tabWidth = 2; }; + BF89C3E0115957FF001C2D68 /* AnalysisBasedWarnings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AnalysisBasedWarnings.h; path = lib/Sema/AnalysisBasedWarnings.h; sourceTree = ""; }; + BF89C3E111595818001C2D68 /* AnalysisBasedWarnings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AnalysisBasedWarnings.cpp; path = lib/Sema/AnalysisBasedWarnings.cpp; sourceTree = ""; }; + BF89C3E311595835001C2D68 /* Lookup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Lookup.h; path = lib/Sema/Lookup.h; sourceTree = ""; }; + BF89C3E411595855001C2D68 /* SemaInit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SemaInit.h; path = lib/Sema/SemaInit.h; sourceTree = ""; }; + BF89C3E5115958A1001C2D68 /* TargetAttributesSema.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TargetAttributesSema.h; path = lib/Sema/TargetAttributesSema.h; sourceTree = ""; }; + BF89C3E81159594A001C2D68 /* SemaObjCProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SemaObjCProperty.cpp; path = lib/Sema/SemaObjCProperty.cpp; sourceTree = ""; }; + BF89C3F811595A01001C2D68 /* SemaType.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SemaType.cpp; path = lib/Sema/SemaType.cpp; sourceTree = ""; }; + BF89C3FA11595A37001C2D68 /* SemaCodeComplete.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SemaCodeComplete.cpp; path = lib/Sema/SemaCodeComplete.cpp; sourceTree = ""; }; + BF89C3FC11595A5D001C2D68 /* SemaExceptionSpec.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SemaExceptionSpec.cpp; path = lib/Sema/SemaExceptionSpec.cpp; sourceTree = ""; }; DE01DA480B12ADA300AC22CE /* PPCallbacks.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PPCallbacks.h; sourceTree = ""; }; DE06756B0C051CFE00EBBFD8 /* ParseExprCXX.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = ParseExprCXX.cpp; path = lib/Parse/ParseExprCXX.cpp; sourceTree = ""; tabWidth = 2; }; DE06B73D0A8307640050E87E /* LangOptions.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; path = LangOptions.h; sourceTree = ""; tabWidth = 2; }; @@ -948,10 +963,11 @@ 352246E00F5C6BC000D0D279 /* Frontend */ = { isa = PBXGroup; children = ( + 1AFDD8701161085D00AE030A /* ASTMerge.cpp */, 9012911C1048068D0083456D /* ASTUnit.cpp */, 1A2A54A40FD1DD1C00F4CE45 /* AnalysisConsumer.cpp */, 1A2A54A50FD1DD1C00F4CE45 /* ASTConsumers.cpp */, - 1A2A54A60FD1DD1C00F4CE45 /* Backend.cpp */, + 1AFDD8711161085D00AE030A /* CodeGenAction.cpp */, 1A2A54A70FD1DD1C00F4CE45 /* CacheTokens.cpp */, 1ACB57DB1105820D0047B991 /* CompilerInstance.cpp */, 1ACB57DC1105820D0047B991 /* CompilerInvocation.cpp */, @@ -1257,29 +1273,36 @@ DE67E7070C020EAB00F66BC5 /* Sema */ = { isa = PBXGroup; children = ( + BF89C3E111595818001C2D68 /* AnalysisBasedWarnings.cpp */, + BF89C3E0115957FF001C2D68 /* AnalysisBasedWarnings.h */, 35585DBD0EAFBC4500D0A97A /* CXXFieldCollector.h */, 1A6B6CD110693FC900BB4A8F /* CodeCompleteConsumer.cpp */, 3527124F0DAFE54700C76352 /* IdentifierResolver.h */, 352712500DAFE54700C76352 /* IdentifierResolver.cpp */, DECB6D640F9AE26600F5FBC7 /* JumpDiagnostics.cpp */, + BF89C3E311595835001C2D68 /* Lookup.h */, DE67E7190C020F4F00F66BC5 /* ParseAST.cpp */, DE67E7140C020EDF00F66BC5 /* Sema.h */, DE67E7160C020EE400F66BC5 /* Sema.cpp */, 1A701B630F7C8FE400FEC4D1 /* SemaAccess.cpp */, DEB07AC70F4A427E00F5A2BE /* SemaAttr.cpp */, DEF2F00F0C6CFED5000C4259 /* SemaChecking.cpp */, + BF89C3FA11595A37001C2D68 /* SemaCodeComplete.cpp */, 35E194670ECB82FB00F21733 /* SemaCXXScopeSpec.cpp */, DE67E7120C020ED900F66BC5 /* SemaDecl.cpp */, DE22BCF10E14197E0094DC60 /* SemaDeclAttr.cpp */, 35EF676F0DAD1D2C00B19414 /* SemaDeclCXX.cpp */, DE704B250D0FBEBE009C7762 /* SemaDeclObjC.cpp */, + BF89C3FC11595A5D001C2D68 /* SemaExceptionSpec.cpp */, DE67E7100C020ED400F66BC5 /* SemaExpr.cpp */, DE47999B0D2EBE1A00706D2D /* SemaExprObjC.cpp */, DE67E70E0C020ECF00F66BC5 /* SemaExprCXX.cpp */, + BF89C3E411595855001C2D68 /* SemaInit.h */, 3599299A0DE2425300A8A33E /* SemaInit.cpp */, 357EA27C0F2526F300439B60 /* SemaLookup.cpp */, 1A6B6CD210693FC900BB4A8F /* SemaCodeComplete.cpp */, 35E194680ECB82FB00F21733 /* SemaCXXCast.cpp */, + BF89C3E81159594A001C2D68 /* SemaObjCProperty.cpp */, 35585DBE0EAFBC4500D0A97A /* SemaOverload.cpp */, 35585DBF0EAFBC4500D0A97A /* SemaOverload.h */, DE67E70C0C020ECA00F66BC5 /* SemaStmt.cpp */, @@ -1288,7 +1311,9 @@ BDF87CF60FD746F300BBF872 /* SemaTemplateDeduction.cpp */, 35544B8B0F5C803200D92AA9 /* SemaTemplateInstantiate.cpp */, 1ADF47AE0F782C3200E48A8A /* SemaTemplateInstantiateDecl.cpp */, + BF89C3F811595A01001C2D68 /* SemaType.cpp */, 1AE4EE3B103B89CA00888A23 /* TreeTransform.h */, + BF89C3E5115958A1001C2D68 /* TargetAttributesSema.h */, ); name = Sema; sourceTree = ""; @@ -1334,7 +1359,6 @@ DE38CD4F0D794D0100A273B6 /* CGObjCGNU.cpp */, 3552E7580E520DD7003A8CA5 /* CGObjCMac.cpp */, 1AFF8AE11012BFC900D248DA /* CGRecordLayoutBuilder.cpp */, - 1AFF8AE21012BFC900D248DA /* CGRecordLayoutBuilder.h */, 1A6C01F6108128710072DEE4 /* CGRTTI.cpp */, DE4772F90C10EAE5002239E8 /* CGStmt.cpp */, 1A6FE7080FD6F85800E00CA9 /* CGTemporaries.cpp */, @@ -1930,7 +1954,6 @@ DECB78170FA5882F00F5FBC7 /* PCHWriterStmt.cpp in Sources */, 1A2A54B50FD1DD1C00F4CE45 /* AnalysisConsumer.cpp in Sources */, 1A2A54B60FD1DD1C00F4CE45 /* ASTConsumers.cpp in Sources */, - 1A2A54B70FD1DD1C00F4CE45 /* Backend.cpp in Sources */, 1A2A54B80FD1DD1C00F4CE45 /* CacheTokens.cpp in Sources */, 1A2A54B90FD1DD1C00F4CE45 /* DependencyFile.cpp in Sources */, 1A2A54BA0FD1DD1C00F4CE45 /* DiagChecker.cpp in Sources */, @@ -1997,6 +2020,13 @@ 1A621C4511111D61009E6834 /* CIndexUSRs.cpp in Sources */, 1A621C4611111D61009E6834 /* CXCursor.cpp in Sources */, 1A96785211486FDC00F24372 /* RecordLayout.cpp in Sources */, + BF89C3E211595818001C2D68 /* AnalysisBasedWarnings.cpp in Sources */, + BF89C3E91159594A001C2D68 /* SemaObjCProperty.cpp in Sources */, + BF89C3F911595A01001C2D68 /* SemaType.cpp in Sources */, + BF89C3FB11595A37001C2D68 /* SemaCodeComplete.cpp in Sources */, + BF89C3FD11595A5D001C2D68 /* SemaExceptionSpec.cpp in Sources */, + 1AFDD8721161085D00AE030A /* ASTMerge.cpp in Sources */, + 1AFDD8731161085D00AE030A /* CodeGenAction.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; Modified: vendor/clang/dist/examples/clang-interpreter/main.cpp ============================================================================== --- vendor/clang/dist/examples/clang-interpreter/main.cpp Fri Apr 2 08:54:30 2010 (r206083) +++ vendor/clang/dist/examples/clang-interpreter/main.cpp Fri Apr 2 08:55:10 2010 (r206084) @@ -71,7 +71,8 @@ int main(int argc, const char **argv, ch Diagnostic Diags(&DiagClient); Driver TheDriver(Path.getBasename(), Path.getDirname(), llvm::sys::getHostTriple(), - "a.out", /*IsProduction=*/false, Diags); + "a.out", /*IsProduction=*/false, /*CXXIsProduction=*/false, + Diags); TheDriver.setTitle("clang interpreter"); // FIXME: This is a hack to try to force the driver to do something we can Modified: vendor/clang/dist/include/clang/AST/ASTContext.h ============================================================================== --- vendor/clang/dist/include/clang/AST/ASTContext.h Fri Apr 2 08:54:30 2010 (r206083) +++ vendor/clang/dist/include/clang/AST/ASTContext.h Fri Apr 2 08:55:10 2010 (r206084) @@ -17,6 +17,7 @@ #include "clang/Basic/IdentifierTable.h" #include "clang/Basic/LangOptions.h" #include "clang/Basic/OperatorKinds.h" +#include "clang/Basic/PartialDiagnostic.h" #include "clang/AST/Attr.h" #include "clang/AST/Decl.h" #include "clang/AST/NestedNameSpecifier.h" @@ -57,6 +58,7 @@ namespace clang { class ObjCIvarRefExpr; class ObjCPropertyDecl; class RecordDecl; + class StoredDeclsMap; class TagDecl; class TemplateTypeParmDecl; class TranslationUnitDecl; @@ -115,7 +117,7 @@ class ASTContext { llvm::FoldingSet SubstTemplateTypeParmTypes; llvm::FoldingSet TemplateSpecializationTypes; llvm::FoldingSet QualifiedNameTypes; - llvm::FoldingSet TypenameTypes; + llvm::FoldingSet DependentNameTypes; llvm::FoldingSet ObjCInterfaceTypes; llvm::FoldingSet ObjCObjectPointerTypes; llvm::FoldingSet ElaboratedTypes; @@ -264,6 +266,9 @@ class ASTContext { llvm::MallocAllocator MallocAlloc; llvm::BumpPtrAllocator BumpAlloc; + /// \brief Allocator for partial diagnostics. + PartialDiagnostic::StorageAllocator DiagAllocator; + public: const TargetInfo &Target; IdentifierTable &Idents; @@ -289,6 +294,11 @@ public: if (FreeMemory) MallocAlloc.Deallocate(Ptr); } + + PartialDiagnostic::StorageAllocator &getDiagAllocator() { + return DiagAllocator; + } + const LangOptions& getLangOptions() const { return LangOpts; } FullSourceLoc getFullLoc(SourceLocation Loc) const { @@ -437,6 +447,11 @@ public: /// allowable type. QualType getCallConvType(QualType T, CallingConv CallConv); + /// getRegParmType - Sets the specified regparm attribute to + /// the given type, which must be a FunctionType or a pointer to an + /// allowable type. + QualType getRegParmType(QualType T, unsigned RegParm); + /// getComplexType - Return the uniqued reference to the type for a complex /// number with the specified element type. QualType getComplexType(QualType T); @@ -554,8 +569,12 @@ public: /// getFunctionNoProtoType - Return a K&R style C function type like 'int()'. /// - QualType getFunctionNoProtoType(QualType ResultTy, bool NoReturn = false, - CallingConv CallConv = CC_Default); + QualType getFunctionNoProtoType(QualType ResultTy, + const FunctionType::ExtInfo &Info); + + QualType getFunctionNoProtoType(QualType ResultTy) { + return getFunctionNoProtoType(ResultTy, FunctionType::ExtInfo()); + } /// getFunctionType - Return a normal function type with a typed argument /// list. isVariadic indicates whether the argument list includes '...'. @@ -564,8 +583,7 @@ public: unsigned TypeQuals, bool hasExceptionSpec, bool hasAnyExceptionSpec, unsigned NumExs, const QualType *ExArray, - bool NoReturn, - CallingConv CallConv); + const FunctionType::ExtInfo &Info); /// getTypeDeclType - Return the unique reference to the type for /// the specified type declaration. @@ -612,12 +630,14 @@ public: QualType getQualifiedNameType(NestedNameSpecifier *NNS, QualType NamedType); - QualType getTypenameType(NestedNameSpecifier *NNS, - const IdentifierInfo *Name, - QualType Canon = QualType()); - QualType getTypenameType(NestedNameSpecifier *NNS, - const TemplateSpecializationType *TemplateId, - QualType Canon = QualType()); + QualType getDependentNameType(ElaboratedTypeKeyword Keyword, + NestedNameSpecifier *NNS, + const IdentifierInfo *Name, + QualType Canon = QualType()); + QualType getDependentNameType(ElaboratedTypeKeyword Keyword, + NestedNameSpecifier *NNS, + const TemplateSpecializationType *TemplateId, + QualType Canon = QualType()); QualType getElaboratedType(QualType UnderlyingType, ElaboratedType::TagKind Tag); @@ -937,8 +957,7 @@ public: llvm::SmallVectorImpl &Ivars); void CollectNonClassIvars(const ObjCInterfaceDecl *OI, llvm::SmallVectorImpl &Ivars); - unsigned CountSynthesizedIvars(const ObjCInterfaceDecl *OI); - unsigned CountProtocolSynthesizedIvars(const ObjCProtocolDecl *PD); + unsigned CountNonClassIvars(const ObjCInterfaceDecl *OI); void CollectInheritedProtocols(const Decl *CDecl, llvm::SmallPtrSet &Protocols); @@ -1273,9 +1292,8 @@ private: // FIXME: This currently contains the set of StoredDeclMaps used // by DeclContext objects. This probably should not be in ASTContext, // but we include it here so that ASTContext can quickly deallocate them. - std::vector SDMs; + llvm::PointerIntPair LastSDM; friend class DeclContext; - void *CreateStoredDeclsMap(); void ReleaseDeclContextMaps(); }; Modified: vendor/clang/dist/include/clang/AST/CXXInheritance.h ============================================================================== --- vendor/clang/dist/include/clang/AST/CXXInheritance.h Fri Apr 2 08:54:30 2010 (r206083) +++ vendor/clang/dist/include/clang/AST/CXXInheritance.h Fri Apr 2 08:55:10 2010 (r206084) @@ -19,6 +19,7 @@ #include "clang/AST/DeclCXX.h" #include "clang/AST/Type.h" #include "clang/AST/TypeOrdering.h" +#include "llvm/ADT/DenseMap.h" #include "llvm/ADT/SmallVector.h" #include #include @@ -227,6 +228,137 @@ public: /// object. void swap(CXXBasePaths &Other); }; + +/// \brief Uniquely identifies a virtual method within a class +/// hierarchy by the method itself and a class subobject number. +struct UniqueVirtualMethod { + UniqueVirtualMethod() : Method(0), Subobject(0), InVirtualSubobject(0) { } + + UniqueVirtualMethod(CXXMethodDecl *Method, unsigned Subobject, + const CXXRecordDecl *InVirtualSubobject) + : Method(Method), Subobject(Subobject), + InVirtualSubobject(InVirtualSubobject) { } + + /// \brief The overriding virtual method. + CXXMethodDecl *Method; + + /// \brief The subobject in which the overriding virtual method + /// resides. + unsigned Subobject; + + /// \brief The virtual base class subobject of which this overridden + /// virtual method is a part. Note that this records the closest + /// derived virtual base class subobject. + const CXXRecordDecl *InVirtualSubobject; + + friend bool operator==(const UniqueVirtualMethod &X, + const UniqueVirtualMethod &Y) { + return X.Method == Y.Method && X.Subobject == Y.Subobject && + X.InVirtualSubobject == Y.InVirtualSubobject; + } + + friend bool operator!=(const UniqueVirtualMethod &X, + const UniqueVirtualMethod &Y) { + return !(X == Y); + } +}; + +/// \brief The set of methods that override a given virtual method in +/// each subobject where it occurs. +/// +/// The first part of the pair is the subobject in which the +/// overridden virtual function occurs, while the second part of the +/// pair is the virtual method that overrides it (including the +/// subobject in which that virtual function occurs). +class OverridingMethods { + llvm::DenseMap > + Overrides; + +public: + // Iterate over the set of subobjects that have overriding methods. + typedef llvm::DenseMap > + ::iterator iterator; + typedef llvm::DenseMap > + ::const_iterator const_iterator; + iterator begin() { return Overrides.begin(); } + const_iterator begin() const { return Overrides.begin(); } + iterator end() { return Overrides.end(); } + const_iterator end() const { return Overrides.end(); } + unsigned size() const { return Overrides.size(); } + + // Iterate over the set of overriding virtual methods in a given + // subobject. + typedef llvm::SmallVector::iterator + overriding_iterator; + typedef llvm::SmallVector::const_iterator + overriding_const_iterator; + + // Add a new overriding method for a particular subobject. + void add(unsigned OverriddenSubobject, UniqueVirtualMethod Overriding); + + // Add all of the overriding methods from "other" into overrides for + // this method. Used when merging the overrides from multiple base + // class subobjects. + void add(const OverridingMethods &Other); + + // Replace all overriding virtual methods in all subobjects with the + // given virtual method. + void replaceAll(UniqueVirtualMethod Overriding); +}; + +/// \brief A mapping from each virtual member function to its set of +/// final overriders. +/// +/// Within a class hierarchy for a given derived class, each virtual +/// member function in that hierarchy has one or more "final +/// overriders" (C++ [class.virtual]p2). A final overrider for a +/// virtual function "f" is the virtual function that will actually be +/// invoked when dispatching a call to "f" through the +/// vtable. Well-formed classes have a single final overrider for each +/// virtual function; in abstract classes, the final overrider for at +/// least one virtual function is a pure virtual function. Due to +/// multiple, virtual inheritance, it is possible for a class to have +/// more than one final overrider. Athough this is an error (per C++ +/// [class.virtual]p2), it is not considered an error here: the final +/// overrider map can represent multiple final overriders for a +/// method, and it is up to the client to determine whether they are +/// problem. For example, the following class \c D has two final +/// overriders for the virtual function \c A::f(), one in \c C and one +/// in \c D: +/// +/// \code +/// struct A { virtual void f(); }; +/// struct B : virtual A { virtual void f(); }; +/// struct C : virtual A { virtual void f(); }; +/// struct D : B, C { }; +/// \endcode +/// +/// This data structure contaings a mapping from every virtual +/// function *that does not override an existing virtual function* and +/// in every subobject where that virtual function occurs to the set +/// of virtual functions that override it. Thus, the same virtual +/// function \c A::f can actually occur in multiple subobjects of type +/// \c A due to multiple inheritance, and may be overriden by +/// different virtual functions in each, as in the following example: +/// +/// \code +/// struct A { virtual void f(); }; +/// struct B : A { virtual void f(); }; +/// struct C : A { virtual void f(); }; +/// struct D : B, C { }; +/// \endcode +/// +/// Unlike in the previous example, where the virtual functions \c +/// B::f and \c C::f both overrode \c A::f in the same subobject of +/// type \c A, in this example the two virtual functions both override +/// \c A::f but in *different* subobjects of type A. This is +/// represented by numbering the subobjects in which the overridden +/// and the overriding virtual member functions are located. Subobject +/// 0 represents the virtua base class subobject of that type, while +/// subobject numbers greater than 0 refer to non-virtual base class +/// subobjects of that type. +class CXXFinalOverriderMap + : public llvm::DenseMap { }; } // end namespace clang Modified: vendor/clang/dist/include/clang/AST/CanonicalType.h ============================================================================== --- vendor/clang/dist/include/clang/AST/CanonicalType.h Fri Apr 2 08:54:30 2010 (r206083) +++ vendor/clang/dist/include/clang/AST/CanonicalType.h Fri Apr 2 08:55:10 2010 (r206084) @@ -165,6 +165,8 @@ public: // (dynamic) type. static CanQual CreateUnsafe(QualType Other); + void dump() const { Stored.dump(); } + void Profile(llvm::FoldingSetNodeID &ID) const { ID.AddPointer(getAsOpaquePtr()); } @@ -562,24 +564,21 @@ struct CanProxyAdaptor : template<> struct CanProxyAdaptor : public CanProxyBase { LLVM_CLANG_CANPROXY_TYPE_ACCESSOR(getResultType) - LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(bool, getNoReturnAttr) - LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(CallingConv, getCallConv) + LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(FunctionType::ExtInfo, getExtInfo) }; template<> struct CanProxyAdaptor : public CanProxyBase { LLVM_CLANG_CANPROXY_TYPE_ACCESSOR(getResultType) - LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(bool, getNoReturnAttr) - LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(CallingConv, getCallConv) + LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(FunctionType::ExtInfo, getExtInfo) }; template<> struct CanProxyAdaptor : public CanProxyBase { LLVM_CLANG_CANPROXY_TYPE_ACCESSOR(getResultType) - LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(bool, getNoReturnAttr) - LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(CallingConv, getCallConv) + LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(FunctionType::ExtInfo, getExtInfo) LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(unsigned, getNumArgs) CanQualType getArgType(unsigned i) const { return CanQualType::CreateUnsafe(this->getTypePtr()->getArgType(i)); Modified: vendor/clang/dist/include/clang/AST/Decl.h ============================================================================== --- vendor/clang/dist/include/clang/AST/Decl.h Fri Apr 2 08:54:30 2010 (r206083) +++ vendor/clang/dist/include/clang/AST/Decl.h Fri Apr 2 08:55:10 2010 (r206084) @@ -224,18 +224,26 @@ class NamespaceDecl : public NamedDecl, // NextNamespace points to the next extended declaration. // OrigNamespace points to the original namespace declaration. // OrigNamespace of the first namespace decl points to itself. - NamespaceDecl *OrigNamespace, *NextNamespace; + NamespaceDecl *NextNamespace; - // The (most recently entered) anonymous namespace inside this - // namespace. - NamespaceDecl *AnonymousNamespace; + /// \brief A pointer to either the original namespace definition for + /// this namespace (if the boolean value is false) or the anonymous + /// namespace that lives just inside this namespace (if the boolean + /// value is true). + /// + /// We can combine these two notions because the anonymous namespace + /// must only be stored in one of the namespace declarations (so all + /// of the namespace declarations can find it). We therefore choose + /// the original namespace declaration, since all of the namespace + /// declarations have a link directly to it; the original namespace + /// declaration itself only needs to know that it is the original + /// namespace declaration (which the boolean indicates). + llvm::PointerIntPair OrigOrAnonNamespace; NamespaceDecl(DeclContext *DC, SourceLocation L, IdentifierInfo *Id) - : NamedDecl(Namespace, DC, L, Id), DeclContext(Namespace) { - OrigNamespace = this; - NextNamespace = 0; - AnonymousNamespace = 0; - } + : NamedDecl(Namespace, DC, L, Id), DeclContext(Namespace), + NextNamespace(0), OrigOrAnonNamespace(0, true) { } + public: static NamespaceDecl *Create(ASTContext &C, DeclContext *DC, SourceLocation L, IdentifierInfo *Id); @@ -258,22 +266,33 @@ public: void setNextNamespace(NamespaceDecl *ND) { NextNamespace = ND; } NamespaceDecl *getOriginalNamespace() const { - return OrigNamespace; + if (OrigOrAnonNamespace.getInt()) + return const_cast(this); + + return OrigOrAnonNamespace.getPointer(); + } + + void setOriginalNamespace(NamespaceDecl *ND) { + if (ND != this) { + OrigOrAnonNamespace.setPointer(ND); + OrigOrAnonNamespace.setInt(false); + } } - void setOriginalNamespace(NamespaceDecl *ND) { OrigNamespace = ND; } NamespaceDecl *getAnonymousNamespace() const { - return AnonymousNamespace; + return getOriginalNamespace()->OrigOrAnonNamespace.getPointer(); } void setAnonymousNamespace(NamespaceDecl *D) { assert(!D || D->isAnonymousNamespace()); assert(!D || D->getParent() == this); - AnonymousNamespace = D; + getOriginalNamespace()->OrigOrAnonNamespace.setPointer(D); } - virtual NamespaceDecl *getCanonicalDecl() { return OrigNamespace; } - const NamespaceDecl *getCanonicalDecl() const { return OrigNamespace; } + virtual NamespaceDecl *getCanonicalDecl() { return getOriginalNamespace(); } + const NamespaceDecl *getCanonicalDecl() const { + return getOriginalNamespace(); + } virtual SourceRange getSourceRange() const { return SourceRange(getLocation(), RBracLoc); @@ -1819,12 +1838,12 @@ class RecordDecl : public TagDecl { /// If so, this cannot be contained in arrays or other structs as a member. bool HasFlexibleArrayMember : 1; - /// AnonymousStructOrUnion - Whether this is the type of an - /// anonymous struct or union. + /// AnonymousStructOrUnion - Whether this is the type of an anonymous struct + /// or union. bool AnonymousStructOrUnion : 1; - /// HasObjectMember - This is true if this struct has at least one - /// member containing an object + /// HasObjectMember - This is true if this struct has at least one member + /// containing an object. bool HasObjectMember : 1; protected: Modified: vendor/clang/dist/include/clang/AST/DeclBase.h ============================================================================== --- vendor/clang/dist/include/clang/AST/DeclBase.h Fri Apr 2 08:54:30 2010 (r206083) +++ vendor/clang/dist/include/clang/AST/DeclBase.h Fri Apr 2 08:55:10 2010 (r206084) @@ -41,6 +41,8 @@ class LinkageSpecDecl; class BlockDecl; class DeclarationName; class CompoundStmt; +class StoredDeclsMap; +class DependentDiagnostic; } namespace llvm { @@ -450,15 +452,23 @@ public: /// same entity may not (and probably don't) share this property. void setObjectOfFriendDecl(bool PreviouslyDeclared) { unsigned OldNS = IdentifierNamespace; - assert((OldNS == IDNS_Tag || OldNS == IDNS_Ordinary || - OldNS == (IDNS_Tag | IDNS_Ordinary)) - && "unsupported namespace for undeclared friend"); - if (!PreviouslyDeclared) IdentifierNamespace = 0; + assert((OldNS & (IDNS_Tag | IDNS_Ordinary | + IDNS_TagFriend | IDNS_OrdinaryFriend)) && + "namespace includes neither ordinary nor tag"); + assert(!(OldNS & ~(IDNS_Tag | IDNS_Ordinary | + IDNS_TagFriend | IDNS_OrdinaryFriend)) && + "namespace includes other than ordinary or tag"); - if (OldNS == IDNS_Tag) + IdentifierNamespace = 0; + if (OldNS & (IDNS_Tag | IDNS_TagFriend)) { IdentifierNamespace |= IDNS_TagFriend; - else + if (PreviouslyDeclared) IdentifierNamespace |= IDNS_Tag; + } + + if (OldNS & (IDNS_Ordinary | IDNS_OrdinaryFriend)) { IdentifierNamespace |= IDNS_OrdinaryFriend; + if (PreviouslyDeclared) IdentifierNamespace |= IDNS_Ordinary; + } } enum FriendObjectKind { @@ -545,9 +555,9 @@ class DeclContext { mutable bool ExternalVisibleStorage : 1; /// \brief Pointer to the data structure used to lookup declarations - /// within this context, which is a DenseMap. - mutable void* LookupPtr; + /// within this context (or a DependentStoredDeclsMap if this is a + /// dependent context). + mutable StoredDeclsMap *LookupPtr; /// FirstDecl - The first declaration stored within this declaration /// context. @@ -674,6 +684,9 @@ public: /// "primary" DeclContext structure, which will contain the /// information needed to perform name lookup into this context. DeclContext *getPrimaryContext(); + const DeclContext *getPrimaryContext() const { + return const_cast(this)->getPrimaryContext(); + } /// getLookupContext - Retrieve the innermost non-transparent /// context of this context, which corresponds to the innermost @@ -976,10 +989,15 @@ public: return getUsingDirectives().second; } + // These are all defined in DependentDiagnostic.h. + class ddiag_iterator; + inline ddiag_iterator ddiag_begin() const; + inline ddiag_iterator ddiag_end() const; + // Low-level accessors /// \brief Retrieve the internal representation of the lookup structure. - void* getLookupPtr() const { return LookupPtr; } + StoredDeclsMap* getLookupPtr() const { return LookupPtr; } /// \brief Whether this DeclContext has external storage containing /// additional declarations that are lexically in this context. @@ -1013,6 +1031,9 @@ private: void LoadLexicalDeclsFromExternalStorage() const; void LoadVisibleDeclsFromExternalStorage() const; + friend class DependentDiagnostic; + StoredDeclsMap *CreateStoredDeclsMap(ASTContext &C) const; + void buildLookup(DeclContext *DCtx); void makeDeclVisibleInContextImpl(NamedDecl *D); }; Modified: vendor/clang/dist/include/clang/AST/DeclCXX.h ============================================================================== --- vendor/clang/dist/include/clang/AST/DeclCXX.h Fri Apr 2 08:54:30 2010 (r206083) +++ vendor/clang/dist/include/clang/AST/DeclCXX.h Fri Apr 2 08:55:10 2010 (r206084) @@ -33,6 +33,7 @@ class CXXDestructorDecl; class CXXMethodDecl; class CXXRecordDecl; class CXXMemberLookupCriteria; +class CXXFinalOverriderMap; class FriendDecl; /// \brief Represents any kind of function declaration, whether it is a @@ -328,6 +329,10 @@ class CXXRecordDecl : public RecordDecl /// instantiated or specialized. llvm::PointerUnion TemplateOrInstantiation; + +#ifndef NDEBUG + void CheckConversionFunction(NamedDecl *D); +#endif protected: CXXRecordDecl(Kind K, TagKind TK, DeclContext *DC, @@ -549,17 +554,26 @@ public: return getConversionFunctions()->replace(Old, New); } + /// Removes a conversion function from this class. The conversion + /// function must currently be a member of this class. Furthermore, + /// this class must currently be in the process of being defined. + void removeConversion(const NamedDecl *Old); + /// getVisibleConversionFunctions - get all conversion functions visible /// in current class; including conversion function templates. const UnresolvedSetImpl *getVisibleConversionFunctions(); - /// addConversionFunction - Add a new conversion function to the - /// list of conversion functions. - void addConversionFunction(CXXConversionDecl *ConvDecl); - - /// \brief Add a new conversion function template to the list of conversion - /// functions. - void addConversionFunction(FunctionTemplateDecl *ConvDecl); + /// addConversionFunction - Registers a conversion function which + /// this class declares directly. + void addConversionFunction(NamedDecl *Decl) { +#ifndef NDEBUG + CheckConversionFunction(Decl); +#endif + + // We intentionally don't use the decl's access here because it + // hasn't been set yet. That's really just a misdesign in Sema. + data().Conversions.addDecl(Decl); + } /// isAggregate - Whether this class is an aggregate (C++ /// [dcl.init.aggr]), which is a class with no user-declared @@ -879,7 +893,12 @@ public: static bool FindNestedNameSpecifierMember(const CXXBaseSpecifier *Specifier, CXXBasePath &Path, void *UserData); - + + /// \brief Retrieve the final overriders for each virtual member + /// function in the class hierarchy where this class is the + /// most-derived class in the class hierarchy. + void getFinalOverriders(CXXFinalOverriderMap &FinaOverriders) const; + /// viewInheritance - Renders and displays an inheritance diagram /// for this C++ class and all of its base classes (transitively) using /// GraphViz. @@ -935,7 +954,7 @@ public: return (CD->begin_overridden_methods() != CD->end_overridden_methods()); } - + /// \brief Determine whether this is a usual deallocation function /// (C++ [basic.stc.dynamic.deallocation]p2), which is an overloaded /// delete or delete[] operator with a particular signature. Modified: vendor/clang/dist/include/clang/AST/DeclContextInternals.h ============================================================================== --- vendor/clang/dist/include/clang/AST/DeclContextInternals.h Fri Apr 2 08:54:30 2010 (r206083) +++ vendor/clang/dist/include/clang/AST/DeclContextInternals.h Fri Apr 2 08:55:10 2010 (r206084) @@ -24,6 +24,8 @@ namespace clang { +class DependentDiagnostic; + /// StoredDeclsList - This is an array of decls optimized a common case of only /// containing one entry. struct StoredDeclsList { @@ -258,8 +260,28 @@ public: } }; -typedef llvm::DenseMap StoredDeclsMap; +class StoredDeclsMap + : public llvm::DenseMap { + +public: + static void DestroyAll(StoredDeclsMap *Map, bool Dependent); + +private: + friend class ASTContext; // walks the chain deleting these + friend class DeclContext; + llvm::PointerIntPair Previous; +}; +class DependentStoredDeclsMap : public StoredDeclsMap { +public: + DependentStoredDeclsMap() : FirstDiagnostic(0) {} + +private: + friend class DependentDiagnostic; + friend class DeclContext; // iterates over diagnostics + + DependentDiagnostic *FirstDiagnostic; +}; } // end namespace clang Modified: vendor/clang/dist/include/clang/AST/DeclFriend.h ============================================================================== --- vendor/clang/dist/include/clang/AST/DeclFriend.h Fri Apr 2 08:54:30 2010 (r206083) +++ vendor/clang/dist/include/clang/AST/DeclFriend.h Fri Apr 2 08:55:10 2010 (r206084) @@ -36,7 +36,7 @@ namespace clang { /// The semantic context of a friend decl is its declaring class. class FriendDecl : public Decl { public: - typedef llvm::PointerUnion FriendUnion; + typedef llvm::PointerUnion FriendUnion; private: // The declaration that's a friend of this class. @@ -73,8 +73,8 @@ public: /// possibly dependent) type, return the type; otherwise /// return null. This is used only for C++0x's unelaborated /// friend type declarations. - Type *getFriendType() const { - return Friend.dyn_cast(); + TypeSourceInfo *getFriendType() const { + return Friend.dyn_cast(); } /// If this friend declaration doesn't name an unelaborated Modified: vendor/clang/dist/include/clang/AST/DeclTemplate.h ============================================================================== --- vendor/clang/dist/include/clang/AST/DeclTemplate.h Fri Apr 2 08:54:30 2010 (r206083) +++ vendor/clang/dist/include/clang/AST/DeclTemplate.h Fri Apr 2 08:55:10 2010 (r206084) @@ -1238,7 +1238,7 @@ public: /// template friend class Foo::Nested; // friend template class FriendTemplateDecl : public Decl { public: - typedef llvm::PointerUnion FriendUnion; + typedef llvm::PointerUnion FriendUnion; private: // The number of template parameters; always non-zero. @@ -1277,8 +1277,8 @@ public: /// If this friend declaration names a templated type (or /// a dependent member type of a templated type), return that /// type; otherwise return null. - Type *getFriendType() const { - return Friend.dyn_cast(); + TypeSourceInfo *getFriendType() const { + return Friend.dyn_cast(); } /// If this friend declaration names a templated function (or Modified: vendor/clang/dist/include/clang/AST/DeclarationName.h ============================================================================== --- vendor/clang/dist/include/clang/AST/DeclarationName.h Fri Apr 2 08:54:30 2010 (r206083) +++ vendor/clang/dist/include/clang/AST/DeclarationName.h Fri Apr 2 08:55:10 2010 (r206084) @@ -378,7 +378,7 @@ inline const PartialDiagnostic &operator Diagnostic::ak_declarationname); return PD; } - + } // end namespace clang namespace llvm { Added: vendor/clang/dist/include/clang/AST/DependentDiagnostic.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/clang/dist/include/clang/AST/DependentDiagnostic.h Fri Apr 2 08:55:10 2010 (r206084) @@ -0,0 +1,183 @@ +//===-- DependentDiagnostic.h - Dependently-generated diagnostics -*- C++ -*-=// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file defines interfaces for diagnostics which may or may +// fire based on how a template is instantiated. +// +// At the moment, the only consumer of this interface is access +// control. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_CLANG_AST_DEPENDENT_DIAGNOSTIC_H +#define LLVM_CLANG_AST_DEPENDENT_DIAGNOSTIC_H + +#include "clang/Basic/PartialDiagnostic.h" +#include "clang/Basic/SourceLocation.h" +#include "clang/AST/DeclBase.h" +#include "clang/AST/DeclContextInternals.h" + +namespace clang { + +class ASTContext; +class CXXRecordDecl; +class NamedDecl; + +/// A dependently-generated diagnostic. +class DependentDiagnostic { +public: + enum AccessNonce { Access = 0 }; + + static DependentDiagnostic *Create(ASTContext &Context, + DeclContext *Parent, + AccessNonce _, + SourceLocation Loc, + bool IsMemberAccess, + AccessSpecifier AS, + NamedDecl *TargetDecl, + CXXRecordDecl *NamingClass, + const PartialDiagnostic &PDiag) { + DependentDiagnostic *DD = Create(Context, Parent, PDiag); + DD->AccessData.Loc = Loc.getRawEncoding(); + DD->AccessData.IsMember = IsMemberAccess; + DD->AccessData.Access = AS; + DD->AccessData.TargetDecl = TargetDecl; + DD->AccessData.NamingClass = NamingClass; + return DD; + } + + unsigned getKind() const { + return Access; + } + + bool isAccessToMember() const { + assert(getKind() == Access); + return AccessData.IsMember; + } + + AccessSpecifier getAccess() const { + assert(getKind() == Access); + return AccessSpecifier(AccessData.Access); + } + + SourceLocation getAccessLoc() const { + assert(getKind() == Access); + return SourceLocation::getFromRawEncoding(AccessData.Loc); + } + + NamedDecl *getAccessTarget() const { + assert(getKind() == Access); + return AccessData.TargetDecl; + } + + NamedDecl *getAccessNamingClass() const { + assert(getKind() == Access); + return AccessData.NamingClass; + } + + const PartialDiagnostic &getDiagnostic() const { + return Diag; + } + +private: + DependentDiagnostic(const PartialDiagnostic &PDiag, + PartialDiagnostic::Storage *Storage) + : Diag(PDiag, Storage) {} + + static DependentDiagnostic *Create(ASTContext &Context, + DeclContext *Parent, + const PartialDiagnostic &PDiag); + + friend class DependentStoredDeclsMap; + friend class DeclContext::ddiag_iterator; + DependentDiagnostic *NextDiagnostic; + + PartialDiagnostic Diag; + + union { + struct { + unsigned Loc; + unsigned Access : 2; + unsigned IsMember : 1; + NamedDecl *TargetDecl; + CXXRecordDecl *NamingClass; + } AccessData; + }; +}; + +/// + +/// An iterator over the dependent diagnostics in a dependent context. +class DeclContext::ddiag_iterator { +public: + ddiag_iterator() : Ptr(0) {} + explicit ddiag_iterator(DependentDiagnostic *Ptr) : Ptr(Ptr) {} + + typedef DependentDiagnostic *value_type; + typedef DependentDiagnostic *reference; + typedef DependentDiagnostic *pointer; + typedef int difference_type; + typedef std::forward_iterator_tag iterator_category; + + reference operator*() const { return Ptr; } + + ddiag_iterator &operator++() { + assert(Ptr && "attempt to increment past end of diag list"); + Ptr = Ptr->NextDiagnostic; + return *this; + } + + ddiag_iterator operator++(int) { + ddiag_iterator tmp = *this; + ++*this; + return tmp; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Apr 2 08:57:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA6C5106564A; Fri, 2 Apr 2010 08:57: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 A8DA48FC3A; Fri, 2 Apr 2010 08:57: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 o328vdXr006818; Fri, 2 Apr 2010 08:57:39 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o328vdbS006816; Fri, 2 Apr 2010 08:57:39 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201004020857.o328vdbS006816@svn.freebsd.org> From: Jaakko Heinonen Date: Fri, 2 Apr 2010 08:57:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206085 - stable/7/usr.sbin/cdcontrol X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Apr 2010 08:57:39 -0000 Author: jh Date: Fri Apr 2 08:57:39 2010 New Revision: 206085 URL: http://svn.freebsd.org/changeset/base/206085 Log: MFC r197833: When run() returns an error, print the error message also in non-interactive mode. Previously error messages were printed only in interactive mode. PR: bin/124517 Modified: stable/7/usr.sbin/cdcontrol/cdcontrol.c Directory Properties: stable/7/usr.sbin/cdcontrol/ (props changed) Modified: stable/7/usr.sbin/cdcontrol/cdcontrol.c ============================================================================== --- stable/7/usr.sbin/cdcontrol/cdcontrol.c Fri Apr 2 08:55:10 2010 (r206084) +++ stable/7/usr.sbin/cdcontrol/cdcontrol.c Fri Apr 2 08:57:39 2010 (r206085) @@ -241,7 +241,7 @@ int main (int argc, char **argv) if (argc > 0) { char buf[80], *p; - int len; + int len, rc; for (p=buf; argc-->0; ++argv) { len = strlen (*argv); @@ -257,7 +257,11 @@ int main (int argc, char **argv) } *p = 0; arg = parse (buf, &cmd); - return (run (cmd, arg)); + rc = run (cmd, arg); + if (rc < 0 && verbose) + warn(NULL); + + return (rc); } if (verbose == 1) From owner-svn-src-all@FreeBSD.ORG Fri Apr 2 09:56:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A1ED106564A; Fri, 2 Apr 2010 09:56:23 +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 53A6E8FC0C; Fri, 2 Apr 2010 09:56:23 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 075A646B03; Fri, 2 Apr 2010 05:56:23 -0400 (EDT) Date: Fri, 2 Apr 2010 10:56:22 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Alexander Leidinger In-Reply-To: <201004020655.o326tWax079882@svn.freebsd.org> Message-ID: References: <201004020655.o326tWax079882@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: r206082 - in head: . share/man/man7 share/mk sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2010 09:56:23 -0000 On Fri, 2 Apr 2010, Alexander Leidinger wrote: > WITH_CTF can now be specified in src.conf (not recommended, there > are some problems with static executables), make.conf (would also > affect ports which do not use GNU make and do not override the > compile targets) or in the kernel config (via "makeoptions > WITH_CTF=yes"). > > Additional (related) changes: > - propagate WITH_CTF to module builds > - do not add -g to the linker flags, it's a noop there anyway > (at least according to the man page of ld) > - do not add -g to CFLAGS unconditionally > we need to have a look if it is really needed (IMO not) or if there > is a way to add it only when WITH_CTF is used > > Note: ctfconvert / ctfmerge lines will not appear in the build output, > to protect the innocent (those which do not build with WITH_CTF would > see the shell-test and may think WITH_CTF is used). Excellent -- I'm really glad to see this getting sorted out at last. I think there's a reasonable argument that we should be compiling options KDTRACE_HOOKS into GENERIC, and likewise enabling CTF on the kernel by default in 9.x. Part of the point of DTrace is that it "just works", and we already compile CDDL modules by default (and the hooks don't affect the license of the base kernel as far as I'm aware). Any thoughts on this? Robert From owner-svn-src-all@FreeBSD.ORG Fri Apr 2 10:23:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E84A106564A; Fri, 2 Apr 2010 10:23:12 +0000 (UTC) (envelope-from netchild@freebsd.org) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id 127A18FC18; Fri, 2 Apr 2010 10:23:11 +0000 (UTC) Received: from outgoing.leidinger.net (pD9E2CC21.dip.t-dialin.net [217.226.204.33]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id 106008442CC; Fri, 2 Apr 2010 12:23:06 +0200 (CEST) Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id A631F5043; Fri, 2 Apr 2010 12:23:02 +0200 (CEST) Received: (from www@localhost) by webmail.leidinger.net (8.14.3/8.13.8/Submit) id o32AN2eB026743; Fri, 2 Apr 2010 12:23:02 +0200 (CEST) (envelope-from netchild@FreeBSD.org) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Fri, 02 Apr 2010 12:23:02 +0200 Message-ID: <20100402122302.48713ufeslsu6su8@webmail.leidinger.net> Date: Fri, 02 Apr 2010 12:23:02 +0200 From: Alexander Leidinger To: Robert Watson References: <201004020655.o326tWax079882@svn.freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Dynamic Internet Messaging Program (DIMP) H3 (1.1.4) X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: 106008442CC.7C645 X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=-1.363, required 6, autolearn=disabled, ALL_TRUSTED -1.44, TW_SV 0.08) X-EBL-MailScanner-From: netchild@freebsd.org X-EBL-MailScanner-Watermark: 1270808587.13237@DowE8xAIp/qnQHuGQRykjw X-EBL-Spam-Status: No Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r206082 - in head: . share/man/man7 share/mk sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2010 10:23:12 -0000 Quoting Robert Watson (from Fri, 2 Apr 2010 10:56:22 +0100 (BST)): > > On Fri, 2 Apr 2010, Alexander Leidinger wrote: > >> WITH_CTF can now be specified in src.conf (not recommended, there >> are some problems with static executables), make.conf (would also >> affect ports which do not use GNU make and do not override the >> compile targets) or in the kernel config (via "makeoptions >> WITH_CTF=yes"). >> >> Additional (related) changes: >> - propagate WITH_CTF to module builds >> - do not add -g to the linker flags, it's a noop there anyway >> (at least according to the man page of ld) >> - do not add -g to CFLAGS unconditionally >> we need to have a look if it is really needed (IMO not) or if there >> is a way to add it only when WITH_CTF is used >> >> Note: ctfconvert / ctfmerge lines will not appear in the build output, >> to protect the innocent (those which do not build with WITH_CTF would >> see the shell-test and may think WITH_CTF is used). > > Excellent -- I'm really glad to see this getting sorted out at last. > > I think there's a reasonable argument that we should be compiling > options KDTRACE_HOOKS into GENERIC, and likewise enabling CTF on the > kernel by default in 9.x. Part of the point of DTrace is that it > "just works", and we already compile CDDL modules by default (and > the hooks don't affect the license of the base kernel as far as I'm > aware). Any thoughts on this? I'm in favour of this. You just need to commit 2 lines for GENERIC (and one for NOTES, I think)... Bye, Alexander. -- http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 BOFH excuse #36: dynamic software linking table corrupted From owner-svn-src-all@FreeBSD.ORG Fri Apr 2 10:36:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B48C106564A; Fri, 2 Apr 2010 10:36:40 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4A0868FC18; Fri, 2 Apr 2010 10:36: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 o32Aae9T028434; Fri, 2 Apr 2010 10:36:40 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o32Aae4x028432; Fri, 2 Apr 2010 10:36:40 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201004021036.o32Aae4x028432@svn.freebsd.org> From: Marius Strobl Date: Fri, 2 Apr 2010 10:36: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: r206086 - head/sys/sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Apr 2010 10:36:40 -0000 Author: marius Date: Fri Apr 2 10:36:40 2010 New Revision: 206086 URL: http://svn.freebsd.org/changeset/base/206086 Log: - Try do deal gracefully with correctable ECC errors. - Improve the reporting of unhandled kernel and user traps. Modified: head/sys/sparc64/sparc64/trap.c Modified: head/sys/sparc64/sparc64/trap.c ============================================================================== --- head/sys/sparc64/sparc64/trap.c Fri Apr 2 08:57:39 2010 (r206085) +++ head/sys/sparc64/sparc64/trap.c Fri Apr 2 10:36:40 2010 (r206086) @@ -106,6 +106,7 @@ void trap(struct trapframe *tf); void syscall(struct trapframe *tf); static int fetch_syscall_args(struct thread *td, struct syscall_args *sa); +static int trap_cecc(void); static int trap_pfault(struct thread *td, struct trapframe *tf); extern char copy_fault[]; @@ -240,6 +241,10 @@ int debugger_on_signal = 0; SYSCTL_INT(_debug, OID_AUTO, debugger_on_signal, CTLFLAG_RW, &debugger_on_signal, 0, ""); +u_int corrected_ecc = 0; +SYSCTL_UINT(_machdep, OID_AUTO, corrected_ecc, CTLFLAG_RD, &corrected_ecc, 0, + "corrected ECC errors"); + /* * SUNW,set-trap-table allows to take over %tba from the PROM, which * will turn off interrupts and handle outstanding ones while doing so, @@ -308,10 +313,16 @@ trap(struct trapframe *tf) case T_SPILL: sig = rwindow_save(td); break; + case T_CORRECTED_ECC_ERROR: + sig = trap_cecc(); + break; default: - if (tf->tf_type < 0 || tf->tf_type >= T_MAX || - trap_sig[tf->tf_type] == -1) - panic("trap: bad trap type"); + if (tf->tf_type < 0 || tf->tf_type >= T_MAX) + panic("trap: bad trap type %#lx (user)", + tf->tf_type); + else if (trap_sig[tf->tf_type] == -1) + panic("trap: %s (user)", + trap_msg[tf->tf_type]); sig = trap_sig[tf->tf_type]; break; } @@ -400,18 +411,53 @@ trap(struct trapframe *tf) } error = 1; break; + case T_CORRECTED_ECC_ERROR: + error = trap_cecc(); + break; default: error = 1; break; } - if (error != 0) - panic("trap: %s", trap_msg[tf->tf_type & ~T_KERNEL]); + if (error != 0) { + tf->tf_type &= ~T_KERNEL; + if (tf->tf_type < 0 || tf->tf_type >= T_MAX) + panic("trap: bad trap type %#lx (kernel)", + tf->tf_type); + else if (trap_sig[tf->tf_type] == -1) + panic("trap: %s (kernel)", + trap_msg[tf->tf_type]); + } } CTR1(KTR_TRAP, "trap: td=%p return", td); } static int +trap_cecc(void) +{ + u_long eee; + + /* + * Turn off (non-)correctable error reporting while we're dealing + * with the error. + */ + eee = ldxa(0, ASI_ESTATE_ERROR_EN_REG); + stxa_sync(0, ASI_ESTATE_ERROR_EN_REG, eee & ~(AA_ESTATE_NCEEN | + AA_ESTATE_CEEN)); + /* Flush the caches in order ensure no corrupt data got installed. */ + cache_flush(); + /* Ensure the caches are still turned on (should be). */ + cache_enable(PCPU_GET(impl)); + /* Clear the the error from the AFSR. */ + stxa_sync(0, ASI_AFSR, ldxa(0, ASI_AFSR)); + corrected_ecc++; + printf("corrected ECC error\n"); + /* Turn (non-)correctable error reporting back on. */ + stxa_sync(0, ASI_ESTATE_ERROR_EN_REG, eee); + return (0); +} + +static int trap_pfault(struct thread *td, struct trapframe *tf) { struct vmspace *vm; @@ -664,7 +710,7 @@ syscall(struct trapframe *tf) */ WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", (sa.code >= 0 && sa.code < SYS_MAXSYSCALL) ? - syscallnames[sa.code] : "???"); + syscallnames[sa.code] : "???"); KASSERT(td->td_critnest == 0, ("System call %s returning in a critical section", (sa.code >= 0 && sa.code < SYS_MAXSYSCALL) ? From owner-svn-src-all@FreeBSD.ORG Fri Apr 2 11:05:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A543D106564A; Fri, 2 Apr 2010 11:05:59 +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 949EB8FC1D; Fri, 2 Apr 2010 11:05: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 o32B5xT7036800; Fri, 2 Apr 2010 11:05:59 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o32B5xcj036794; Fri, 2 Apr 2010 11:05:59 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201004021105.o32B5xcj036794@svn.freebsd.org> From: Ed Schouten Date: Fri, 2 Apr 2010 11:05: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: r206087 - head/usr.bin/getent X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Apr 2010 11:05:59 -0000 Author: ed Date: Fri Apr 2 11:05:59 2010 New Revision: 206087 URL: http://svn.freebsd.org/changeset/base/206087 Log: Change how getent utmpx works. - Always require active, log or lastlogin to be provided. - Allow the user to provide custom filenames. Modified: head/usr.bin/getent/getent.c Modified: head/usr.bin/getent/getent.c ============================================================================== --- head/usr.bin/getent/getent.c Fri Apr 2 10:36:40 2010 (r206086) +++ head/usr.bin/getent/getent.c Fri Apr 2 11:05:59 2010 (r206087) @@ -615,14 +615,13 @@ static int utmpx(int argc, char *argv[]) { const struct utmpx *ut; - int rv = RV_OK, db; + const char *file = NULL; + int rv = RV_OK, db = 0; assert(argc > 1); assert(argv != NULL); - if (argc == 2) { - db = UTXDB_ACTIVE; - } else if (argc == 3) { + if (argc == 3 || argc == 4) { if (strcmp(argv[2], "active") == 0) db = UTXDB_ACTIVE; else if (strcmp(argv[2], "lastlogin") == 0) @@ -631,15 +630,18 @@ utmpx(int argc, char *argv[]) db = UTXDB_LOG; else rv = RV_USAGE; + if (argc == 4) + file = argv[3]; } else { rv = RV_USAGE; } if (rv == RV_USAGE) { - fprintf(stderr, "Usage: %s utmpx [active | lastlogin | log]\n", + fprintf(stderr, + "Usage: %s utmpx active | lastlogin | log [filename]\n", getprogname()); } else if (rv == RV_OK) { - if (setutxdb(db, NULL) != 0) + if (setutxdb(db, file) != 0) return (RV_NOTFOUND); while ((ut = getutxent()) != NULL) utmpxprint(ut); From owner-svn-src-all@FreeBSD.ORG Fri Apr 2 11:07:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AAE7C1065800; Fri, 2 Apr 2010 11:07:55 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8F66D8FC18; Fri, 2 Apr 2010 11:07: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 o32B7t13037255; Fri, 2 Apr 2010 11:07:55 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o32B7tSI037251; Fri, 2 Apr 2010 11:07:55 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201004021107.o32B7tSI037251@svn.freebsd.org> From: Gleb Smirnoff Date: Fri, 2 Apr 2010 11:07: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: r206088 - in stable/8: sys/netgraph usr.bin/netstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Apr 2010 11:07:55 -0000 Author: glebius Date: Fri Apr 2 11:07:55 2010 New Revision: 206088 URL: http://svn.freebsd.org/changeset/base/206088 Log: Merge r205082, r205083 that fix 'netstat -f netgraph' functionality. Modified: stable/8/sys/netgraph/ng_socket.c stable/8/sys/netgraph/ng_socketvar.h stable/8/usr.bin/netstat/netgraph.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) stable/8/sys/net/ (props changed) stable/8/usr.bin/netstat/ (props changed) Modified: stable/8/sys/netgraph/ng_socket.c ============================================================================== --- stable/8/sys/netgraph/ng_socket.c Fri Apr 2 11:05:59 2010 (r206087) +++ stable/8/sys/netgraph/ng_socket.c Fri Apr 2 11:07:55 2010 (r206088) @@ -156,6 +156,11 @@ static u_long ngpdg_recvspace = 20 * 102 SYSCTL_INT(_net_graph, OID_AUTO, recvspace, CTLFLAG_RW, &ngpdg_recvspace , 0, "Maximum space for incoming Netgraph datagrams"); +/* List of all sockets (for netstat -f netgraph) */ +static LIST_HEAD(, ngpcb) ngsocklist; + +static struct mtx ngsocketlist_mtx; + #define sotongpcb(so) ((struct ngpcb *)(so)->so_pcb) /* If getting unexplained errors returned, set this to "kdb_enter("X"); */ @@ -547,6 +552,9 @@ ng_attach_cntl(struct socket *so) return (error); } + /* Store a hint for netstat(1). */ + priv->node_id = priv->node->nd_ID; + /* Link the node and the private data. */ NG_NODE_SET_PRIVATE(priv->node, priv); NG_NODE_REF(priv->node); @@ -584,6 +592,10 @@ ng_attach_common(struct socket *so, int so->so_pcb = (caddr_t)pcbp; pcbp->ng_socket = so; + /* Add the socket to linked list */ + mtx_lock(&ngsocketlist_mtx); + LIST_INSERT_HEAD(&ngsocklist, pcbp, socks); + mtx_unlock(&ngsocketlist_mtx); return (0); } @@ -617,6 +629,9 @@ ng_detach_common(struct ngpcb *pcbp, int } pcbp->ng_socket->so_pcb = NULL; + mtx_lock(&ngsocketlist_mtx); + LIST_REMOVE(pcbp, socks); + mtx_unlock(&ngsocketlist_mtx); free(pcbp, M_PCB); } @@ -1115,8 +1130,14 @@ ngs_mod_event(module_t mod, int event, v switch (event) { case MOD_LOAD: + mtx_init(&ngsocketlist_mtx, "ng_socketlist", NULL, MTX_DEF); break; case MOD_UNLOAD: + /* Ensure there are no open netgraph sockets. */ + if (!LIST_EMPTY(&ngsocklist)) { + error = EBUSY; + break; + } #ifdef NOTYET /* Unregister protocol domain XXX can't do this yet.. */ #endif Modified: stable/8/sys/netgraph/ng_socketvar.h ============================================================================== --- stable/8/sys/netgraph/ng_socketvar.h Fri Apr 2 11:05:59 2010 (r206087) +++ stable/8/sys/netgraph/ng_socketvar.h Fri Apr 2 11:07:55 2010 (r206088) @@ -61,6 +61,7 @@ struct ngsock { int refs; struct mtx mtx; /* mtx to wait on */ int error; /* place to store error */ + ng_ID_t node_id; /* a hint for netstat(1) to find the node */ }; #define NGS_FLAG_NOLINGER 1 /* close with last hook */ Modified: stable/8/usr.bin/netstat/netgraph.c ============================================================================== --- stable/8/usr.bin/netstat/netgraph.c Fri Apr 2 11:05:59 2010 (r206087) +++ stable/8/usr.bin/netstat/netgraph.c Fri Apr 2 11:07:55 2010 (r206088) @@ -166,14 +166,14 @@ netgraphprotopr(u_long off, const char * name, sockb.so_rcv.sb_cc, sockb.so_snd.sb_cc); /* Get ngsock structure */ - if (ngpcb.sockdata == 0) /* unconnected data socket */ + if (ngpcb.sockdata == NULL) /* unconnected data socket */ goto finish; kread((u_long)ngpcb.sockdata, (char *)&info, sizeof(info)); /* Get info on associated node */ - if (info.node == 0 || csock == -1) + if (info.node_id == 0 || csock == -1) goto finish; - snprintf(path, sizeof(path), "[%lx]:", (u_long) info.node); + snprintf(path, sizeof(path), "[%x]:", info.node_id); if (NgSendMsg(csock, path, NGM_GENERIC_COOKIE, NGM_NODEINFO, NULL, 0) < 0) goto finish; From owner-svn-src-all@FreeBSD.ORG Fri Apr 2 11:13:12 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 34CDD1065673; Fri, 2 Apr 2010 11:13:12 +0000 (UTC) (envelope-from gallatin@cs.duke.edu) Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by mx1.freebsd.org (Postfix) with ESMTP id E86FC8FC08; Fri, 2 Apr 2010 11:13:11 +0000 (UTC) Received: from [172.31.193.10] (rrcs-98-101-145-84.midsouth.biz.rr.com [98.101.145.84]) (authenticated bits=0) by duke.cs.duke.edu (8.14.2/8.14.2) with ESMTP id o32BDA05019110 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 2 Apr 2010 07:13:10 -0400 (EDT) X-DKIM: Sendmail DKIM Filter v2.8.3 duke.cs.duke.edu o32BDA05019110 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cs.duke.edu; s=mail; t=1270206791; bh=DGdYUvnKTJkzwF58dekUglT6oPjVraEel7+7CPSWkWw=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=eRCMYoiS988Wjwc3AO7ZpvElHrpkdeFks35VNo1wyE7dMh2bvaAQQuutKnDU3/bV2 KDwL2zjGRv75sRwEEy+MxDhxWC0wXIO6cK49jUliZlT3CViIWIYga9xVnTmJRhtcev lZ5PE4LaMuidQv6/TQID5aGEHXkJ2R0uLv6xj7CY= Message-ID: <4BB5D140.5070208@cs.duke.edu> Date: Fri, 02 Apr 2010 07:13:04 -0400 From: Andrew Gallatin User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: Robert Watson References: <201004020655.o326tWax079882@svn.freebsd.org> In-Reply-To: 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, Alexander Leidinger Subject: Re: svn commit: r206082 - in head: . share/man/man7 share/mk sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2010 11:13:12 -0000 Robert Watson wrote: > I think there's a reasonable argument that we should be compiling > options KDTRACE_HOOKS into GENERIC, and likewise enabling CTF on the > kernel by default in 9.x. Part of the point of DTrace is that it "just > works", and we already compile CDDL modules by default (and the hooks > don't affect the license of the base kernel as far as I'm aware). Any > thoughts on this? I vaguely remember that there were some problems where CTF was incompatible with debugging, and dumps from CTF enabled kernels were unhelpful. Was this true, and (more importantly), has it been fixed? Drew From owner-svn-src-all@FreeBSD.ORG Fri Apr 2 13:19:45 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A4391106566B; Fri, 2 Apr 2010 13:19:45 +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 7BE718FC0A; Fri, 2 Apr 2010 13:19:45 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id E2BC646B23; Fri, 2 Apr 2010 09:19:44 -0400 (EDT) Date: Fri, 2 Apr 2010 14:19:44 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Andrew Gallatin In-Reply-To: <4BB5D140.5070208@cs.duke.edu> Message-ID: References: <201004020655.o326tWax079882@svn.freebsd.org> <4BB5D140.5070208@cs.duke.edu> 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, Alexander Leidinger Subject: Re: svn commit: r206082 - in head: . share/man/man7 share/mk sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2010 13:19:45 -0000 On Fri, 2 Apr 2010, Andrew Gallatin wrote: > Robert Watson wrote: > >> I think there's a reasonable argument that we should be compiling options >> KDTRACE_HOOKS into GENERIC, and likewise enabling CTF on the kernel by >> default in 9.x. Part of the point of DTrace is that it "just works", and >> we already compile CDDL modules by default (and the hooks don't affect the >> license of the base kernel as far as I'm aware). Any thoughts on this? > > I vaguely remember that there were some problems where CTF was incompatible > with debugging, and dumps from CTF enabled kernels were unhelpful. Was this > true, and (more importantly), has it been fixed? Hmm. I'll investigate that this weekend, I also have recollections of some issues here, but haven't been running into them myself so perhaps they were fixed. Robert From owner-svn-src-all@FreeBSD.ORG Fri Apr 2 13:23:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09412106566B; Fri, 2 Apr 2010 13:23:50 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E98AC8FC17; Fri, 2 Apr 2010 13:23: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 o32DNnnT066951; Fri, 2 Apr 2010 13:23:49 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o32DNnMY066946; Fri, 2 Apr 2010 13:23:49 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201004021323.o32DNnMY066946@svn.freebsd.org> From: Fabien Thomas Date: Fri, 2 Apr 2010 13:23: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: r206089 - in head: lib/libpmc sys/amd64/include sys/conf sys/dev/hwpmc sys/i386/include sys/modules/hwpmc 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, 02 Apr 2010 13:23:50 -0000 Author: fabient Date: Fri Apr 2 13:23:49 2010 New Revision: 206089 URL: http://svn.freebsd.org/changeset/base/206089 Log: - Support for uncore counting events: one fixed PMC with the uncore domain clock, 8 programmable PMC. - Westmere based CPU (Xeon 5600, Corei7 980X) support. - New man pages with events list for core and uncore. - Updated Corei7 events with Intel 253669-033US December 2009 doc. There is some removed events in the documentation, they have been kept in the code but documented in the man page as obsolete. - Offcore response events can be setup with rsp token. Sponsored by: NETASQ Added: head/lib/libpmc/pmc.corei7.3 (contents, props changed) head/lib/libpmc/pmc.corei7uc.3 (contents, props changed) head/lib/libpmc/pmc.ucf.3 (contents, props changed) head/lib/libpmc/pmc.westmere.3 (contents, props changed) head/lib/libpmc/pmc.westmereuc.3 (contents, props changed) head/sys/dev/hwpmc/hwpmc_uncore.c (contents, props changed) head/sys/dev/hwpmc/hwpmc_uncore.h (contents, props changed) Modified: head/lib/libpmc/Makefile head/lib/libpmc/libpmc.c head/sys/amd64/include/pmc_mdep.h head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/conf/files.pc98 head/sys/dev/hwpmc/hwpmc_core.c head/sys/dev/hwpmc/hwpmc_core.h head/sys/dev/hwpmc/hwpmc_intel.c head/sys/dev/hwpmc/pmc_events.h head/sys/i386/include/pmc_mdep.h head/sys/modules/hwpmc/Makefile head/sys/sys/pmc.h Modified: head/lib/libpmc/Makefile ============================================================================== --- head/lib/libpmc/Makefile Fri Apr 2 11:07:55 2010 (r206088) +++ head/lib/libpmc/Makefile Fri Apr 2 13:23:49 2010 (r206089) @@ -27,11 +27,16 @@ MAN+= pmc.atom.3 MAN+= pmc.core.3 MAN+= pmc.core2.3 MAN+= pmc.iaf.3 +MAN+= pmc.ucf.3 MAN+= pmc.k7.3 MAN+= pmc.k8.3 MAN+= pmc.p4.3 MAN+= pmc.p5.3 MAN+= pmc.p6.3 +MAN+= pmc.corei7.3 +MAN+= pmc.corei7uc.3 +MAN+= pmc.westmere.3 +MAN+= pmc.westmereuc.3 MAN+= pmc.tsc.3 .elif ${MACHINE_ARCH} == "arm" && ${CPUTYPE} == "xscale" MAN+= pmc.xscale.3 Modified: head/lib/libpmc/libpmc.c ============================================================================== --- head/lib/libpmc/libpmc.c Fri Apr 2 11:07:55 2010 (r206088) +++ head/lib/libpmc/libpmc.c Fri Apr 2 13:23:49 2010 (r206089) @@ -54,6 +54,10 @@ static int iaf_allocate_pmc(enum pmc_eve struct pmc_op_pmcallocate *_pmc_config); static int iap_allocate_pmc(enum pmc_event _pe, char *_ctrspec, struct pmc_op_pmcallocate *_pmc_config); +static int ucf_allocate_pmc(enum pmc_event _pe, char *_ctrspec, + struct pmc_op_pmcallocate *_pmc_config); +static int ucp_allocate_pmc(enum pmc_event _pe, char *_ctrspec, + struct pmc_op_pmcallocate *_pmc_config); static int k8_allocate_pmc(enum pmc_event _pe, char *_ctrspec, struct pmc_op_pmcallocate *_pmc_config); static int p4_allocate_pmc(enum pmc_event _pe, char *_ctrspec, @@ -144,6 +148,7 @@ PMC_CLASSDEP_TABLE(p5, P5); PMC_CLASSDEP_TABLE(p6, P6); PMC_CLASSDEP_TABLE(xscale, XSCALE); PMC_CLASSDEP_TABLE(mips24k, MIPS24K); +PMC_CLASSDEP_TABLE(ucf, UCF); #undef __PMC_EV_ALIAS #define __PMC_EV_ALIAS(N,CODE) { N, PMC_EV_##CODE }, @@ -169,6 +174,21 @@ static const struct pmc_event_descr core __PMC_EV_ALIAS_COREI7() }; +static const struct pmc_event_descr westmere_event_table[] = +{ + __PMC_EV_ALIAS_WESTMERE() +}; + +static const struct pmc_event_descr corei7uc_event_table[] = +{ + __PMC_EV_ALIAS_COREI7UC() +}; + +static const struct pmc_event_descr westmereuc_event_table[] = +{ + __PMC_EV_ALIAS_WESTMEREUC() +}; + /* * PMC_MDEP_TABLE(NAME, PRIMARYCLASS, ADDITIONAL_CLASSES...) * @@ -182,7 +202,8 @@ static const struct pmc_event_descr core PMC_MDEP_TABLE(atom, IAP, PMC_CLASS_IAF, PMC_CLASS_TSC); PMC_MDEP_TABLE(core, IAP, PMC_CLASS_TSC); PMC_MDEP_TABLE(core2, IAP, PMC_CLASS_IAF, PMC_CLASS_TSC); -PMC_MDEP_TABLE(corei7, IAP, PMC_CLASS_IAF, PMC_CLASS_TSC); +PMC_MDEP_TABLE(corei7, IAP, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); +PMC_MDEP_TABLE(westmere, IAP, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); PMC_MDEP_TABLE(k7, K7, PMC_CLASS_TSC); PMC_MDEP_TABLE(k8, K8, PMC_CLASS_TSC); PMC_MDEP_TABLE(p4, P4, PMC_CLASS_TSC); @@ -215,6 +236,10 @@ PMC_CLASS_TABLE_DESC(atom, IAP, atom, ia PMC_CLASS_TABLE_DESC(core, IAP, core, iap); PMC_CLASS_TABLE_DESC(core2, IAP, core2, iap); PMC_CLASS_TABLE_DESC(corei7, IAP, corei7, iap); +PMC_CLASS_TABLE_DESC(westmere, IAP, westmere, iap); +PMC_CLASS_TABLE_DESC(ucf, UCF, ucf, ucf); +PMC_CLASS_TABLE_DESC(corei7uc, UCP, corei7uc, ucp); +PMC_CLASS_TABLE_DESC(westmereuc, UCP, westmereuc, ucp); #endif #if defined(__i386__) PMC_CLASS_TABLE_DESC(k7, K7, k7, k7); @@ -302,7 +327,7 @@ struct pmc_masks { const uint32_t pm_value; }; #define PMCMASK(N,V) { .pm_name = #N, .pm_value = (V) } -#define NULLMASK PMCMASK(NULL,0) +#define NULLMASK { .pm_name = NULL } #if defined(__amd64__) || defined(__i386__) static int @@ -495,6 +520,8 @@ static struct pmc_event_alias core2_alia #define atom_aliases_without_iaf core2_aliases_without_iaf #define corei7_aliases core2_aliases #define corei7_aliases_without_iaf core2_aliases_without_iaf +#define westmere_aliases core2_aliases +#define westmere_aliases_without_iaf core2_aliases_without_iaf #define IAF_KW_OS "os" #define IAF_KW_USR "usr" @@ -545,6 +572,7 @@ iaf_allocate_pmc(enum pmc_event pe, char #define IAP_KW_SNOOPTYPE "snooptype" #define IAP_KW_TRANSITION "trans" #define IAP_KW_USR "usr" +#define IAP_KW_RSP "rsp" static struct pmc_masks iap_core_mask[] = { PMCMASK(all, (0x3 << 14)), @@ -592,19 +620,38 @@ static struct pmc_masks iap_transition_m NULLMASK }; +static struct pmc_masks iap_rsp_mask[] = { + PMCMASK(DMND_DATA_RD, (1 << 0)), + PMCMASK(DMND_RFO, (1 << 1)), + PMCMASK(DMND_IFETCH, (1 << 2)), + PMCMASK(WB, (1 << 3)), + PMCMASK(PF_DATA_RD, (1 << 4)), + PMCMASK(PF_RFO, (1 << 5)), + PMCMASK(PF_IFETCH, (1 << 6)), + PMCMASK(OTHER, (1 << 7)), + PMCMASK(UNCORE_HIT, (1 << 8)), + PMCMASK(OTHER_CORE_HIT_SNP, (1 << 9)), + PMCMASK(OTHER_CORE_HITM, (1 << 10)), + PMCMASK(REMOTE_CACHE_FWD, (1 << 12)), + PMCMASK(REMOTE_DRAM, (1 << 13)), + PMCMASK(LOCAL_DRAM, (1 << 14)), + PMCMASK(NON_DRAM, (1 << 15)), + NULLMASK +}; + static int iap_allocate_pmc(enum pmc_event pe, char *ctrspec, struct pmc_op_pmcallocate *pmc_config) { char *e, *p, *q; - uint32_t cachestate, evmask; + uint32_t cachestate, evmask, rsp; int count, n; pmc_config->pm_caps |= (PMC_CAP_READ | PMC_CAP_WRITE | PMC_CAP_QUALIFIER); pmc_config->pm_md.pm_iap.pm_iap_config = 0; - cachestate = evmask = 0; + cachestate = evmask = rsp = 0; /* Parse additional modifiers if present */ while ((p = strsep(&ctrspec, ",")) != NULL) { @@ -651,8 +698,7 @@ iap_allocate_pmc(enum pmc_event pe, char return (-1); } else if (cpu_info.pm_cputype == PMC_CPU_INTEL_ATOM || cpu_info.pm_cputype == PMC_CPU_INTEL_CORE2 || - cpu_info.pm_cputype == PMC_CPU_INTEL_CORE2EXTREME || - cpu_info.pm_cputype == PMC_CPU_INTEL_COREI7) { + cpu_info.pm_cputype == PMC_CPU_INTEL_CORE2EXTREME) { if (KWPREFIXMATCH(p, IAP_KW_SNOOPRESPONSE "=")) { n = pmc_parse_mask(iap_snoopresponse_mask, p, &evmask); @@ -661,6 +707,12 @@ iap_allocate_pmc(enum pmc_event pe, char &evmask); } else return (-1); + } else if (cpu_info.pm_cputype == PMC_CPU_INTEL_COREI7 || + cpu_info.pm_cputype == PMC_CPU_INTEL_WESTMERE) { + if (KWPREFIXMATCH(p, IAP_KW_RSP "=")) { + n = pmc_parse_mask(iap_rsp_mask, p, &rsp); + } else + return (-1); } else return (-1); @@ -693,6 +745,69 @@ iap_allocate_pmc(enum pmc_event pe, char } pmc_config->pm_md.pm_iap.pm_iap_config |= cachestate; + pmc_config->pm_md.pm_iap.pm_iap_rsp = rsp; + + return (0); +} + +/* + * Intel Uncore. + */ + +static int +ucf_allocate_pmc(enum pmc_event pe, char *ctrspec, + struct pmc_op_pmcallocate *pmc_config) +{ + (void) pe; + (void) ctrspec; + + pmc_config->pm_caps |= (PMC_CAP_READ | PMC_CAP_WRITE); + pmc_config->pm_md.pm_ucf.pm_ucf_flags = 0; + + return (0); +} + +#define UCP_KW_CMASK "cmask" +#define UCP_KW_EDGE "edge" +#define UCP_KW_INV "inv" + +static int +ucp_allocate_pmc(enum pmc_event pe, char *ctrspec, + struct pmc_op_pmcallocate *pmc_config) +{ + char *e, *p, *q; + int count, n; + + (void) pe; + + pmc_config->pm_caps |= (PMC_CAP_READ | PMC_CAP_WRITE | + PMC_CAP_QUALIFIER); + pmc_config->pm_md.pm_ucp.pm_ucp_config = 0; + + /* Parse additional modifiers if present */ + while ((p = strsep(&ctrspec, ",")) != NULL) { + + n = 0; + if (KWPREFIXMATCH(p, UCP_KW_CMASK "=")) { + q = strchr(p, '='); + if (*++q == '\0') /* skip '=' */ + return (-1); + count = strtol(q, &e, 0); + if (e == q || *e != '\0') + return (-1); + pmc_config->pm_caps |= PMC_CAP_THRESHOLD; + pmc_config->pm_md.pm_ucp.pm_ucp_config |= + UCP_CMASK(count); + } else if (KWMATCH(p, UCP_KW_EDGE)) { + pmc_config->pm_caps |= PMC_CAP_EDGE; + } else if (KWMATCH(p, UCP_KW_INV)) { + pmc_config->pm_caps |= PMC_CAP_INVERT; + } else + return (-1); + + if (n < 0) /* Parsing failed. */ + return (-1); + } return (0); } @@ -2392,6 +2507,31 @@ pmc_event_names_of_class(enum pmc_class ev = corei7_event_table; count = PMC_EVENT_TABLE_SIZE(corei7); break; + case PMC_CPU_INTEL_WESTMERE: + ev = westmere_event_table; + count = PMC_EVENT_TABLE_SIZE(westmere); + break; + } + break; + case PMC_CLASS_UCF: + ev = ucf_event_table; + count = PMC_EVENT_TABLE_SIZE(ucf); + break; + case PMC_CLASS_UCP: + /* + * Return the most appropriate set of event name + * spellings for the current CPU. + */ + switch (cpu_info.pm_cputype) { + default: + case PMC_CPU_INTEL_COREI7: + ev = corei7uc_event_table; + count = PMC_EVENT_TABLE_SIZE(corei7uc); + break; + case PMC_CPU_INTEL_WESTMERE: + ev = westmereuc_event_table; + count = PMC_EVENT_TABLE_SIZE(westmereuc); + break; } break; case PMC_CLASS_TSC: @@ -2605,8 +2745,15 @@ pmc_init(void) PMC_MDEP_INIT_INTEL_V2(core2); break; case PMC_CPU_INTEL_COREI7: + pmc_class_table[n++] = &ucf_class_table_descr; + pmc_class_table[n++] = &corei7uc_class_table_descr; PMC_MDEP_INIT_INTEL_V2(corei7); break; + case PMC_CPU_INTEL_WESTMERE: + pmc_class_table[n++] = &ucf_class_table_descr; + pmc_class_table[n++] = &westmereuc_class_table_descr; + PMC_MDEP_INIT_INTEL_V2(westmere); + break; case PMC_CPU_INTEL_PIV: PMC_MDEP_INIT(p4); pmc_class_table[n] = &p4_class_table_descr; @@ -2719,10 +2866,30 @@ _pmc_name_of_event(enum pmc_event pe, en ev = corei7_event_table; evfence = corei7_event_table + PMC_EVENT_TABLE_SIZE(corei7); break; + case PMC_CPU_INTEL_WESTMERE: + ev = westmere_event_table; + evfence = westmere_event_table + PMC_EVENT_TABLE_SIZE(westmere); + break; + default: /* Unknown CPU type. */ + break; + } + } else if (pe >= PMC_EV_UCF_FIRST && pe <= PMC_EV_UCF_LAST) { + ev = ucf_event_table; + evfence = ucf_event_table + PMC_EVENT_TABLE_SIZE(ucf); + } else if (pe >= PMC_EV_UCP_FIRST && pe <= PMC_EV_UCP_LAST) { + switch (cpu) { + case PMC_CPU_INTEL_COREI7: + ev = corei7uc_event_table; + evfence = corei7uc_event_table + PMC_EVENT_TABLE_SIZE(corei7uc); + break; + case PMC_CPU_INTEL_WESTMERE: + ev = westmereuc_event_table; + evfence = westmereuc_event_table + PMC_EVENT_TABLE_SIZE(westmereuc); + break; default: /* Unknown CPU type. */ break; } - } if (pe >= PMC_EV_K7_FIRST && pe <= PMC_EV_K7_LAST) { + } else if (pe >= PMC_EV_K7_FIRST && pe <= PMC_EV_K7_LAST) { ev = k7_event_table; evfence = k7_event_table + PMC_EVENT_TABLE_SIZE(k7); } else if (pe >= PMC_EV_K8_FIRST && pe <= PMC_EV_K8_LAST) { Added: head/lib/libpmc/pmc.corei7.3 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libpmc/pmc.corei7.3 Fri Apr 2 13:23:49 2010 (r206089) @@ -0,0 +1,1581 @@ +.\" Copyright (c) 2010 Fabien Thomas. 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 Joseph Koshy ``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 Joseph Koshy be liable +.\" for any direct, indirect, incidental, special, exemplary, or consequential +.\" damages (including, but not limited to, procurement of substitute goods +.\" or services; loss of use, data, or profits; or business interruption) +.\" however caused and on any theory of liability, whether in contract, strict +.\" liability, or tort (including negligence or otherwise) arising in any way +.\" out of the use of this software, even if advised of the possibility of +.\" such damage. +.\" +.\" $FreeBSD$ +.\" +.Dd March 24, 2010 +.Os +.Dt PMC.COREI7 3 +.Sh NAME +.Nm pmc.corei7 +.Nd measurement events for +.Tn Intel +.Tn Core i7 and Xeon 5500 +family CPUs +.Sh LIBRARY +.Lb libpmc +.Sh SYNOPSIS +.In pmc.h +.Sh DESCRIPTION +.Tn Intel +.Tn "Core i7" +CPUs contain PMCs conforming to version 2 of the +.Tn Intel +performance measurement architecture. +These CPUs may contain up to three classes of PMCs: +.Bl -tag -width "Li PMC_CLASS_IAP" +.It Li PMC_CLASS_IAF +Fixed-function counters that count only one hardware event per counter. +.It Li PMC_CLASS_IAP +Programmable counters that may be configured to count one of a defined +set of hardware events. +.El +.Pp +The number of PMCs available in each class and their widths need to be +determined at run time by calling +.Xr pmc_cpuinfo 3 . +.Pp +Intel Core i7 and Xeon 5500 PMCs are documented in +.Rs +.%B "Intel(R) 64 and IA-32 Architectures Software Developes Manual" +.%T "Volume 3B: System Programming Guide, Part 2" +.%N "Order Number: 253669-033US" +.%D December 2009 +.%Q "Intel Corporation" +.Re +.Ss COREI7 AND XEON 5500 FIXED FUNCTION PMCS +These PMCs and their supported events are documented in +.Xr pmc.iaf 3 . +Not all CPUs in this family implement fixed-function counters. +.Ss COREI7 AND XEON 5500 PROGRAMMABLE PMCS +The programmable PMCs support the following capabilities: +.Bl -column "PMC_CAP_INTERRUPT" "Support" +.It Em Capability Ta Em Support +.It PMC_CAP_CASCADE Ta \&No +.It PMC_CAP_EDGE Ta Yes +.It PMC_CAP_INTERRUPT Ta Yes +.It PMC_CAP_INVERT Ta Yes +.It PMC_CAP_READ Ta Yes +.It PMC_CAP_PRECISE Ta \&No +.It PMC_CAP_SYSTEM Ta Yes +.It PMC_CAP_TAGGING Ta \&No +.It PMC_CAP_THRESHOLD Ta Yes +.It PMC_CAP_USER Ta Yes +.It PMC_CAP_WRITE Ta Yes +.El +.Ss Event Qualifiers +Event specifiers for these PMCs support the following common +qualifiers: +.Bl -tag -width indent +.It Li rsp= Ns Ar value +Configure the Off-core Response bits. +.Bl -tag -width indent +.It Li DMND_DATA_RD +Counts the number of demand and DCU prefetch data reads of full +and partial cachelines as well as demand data page table entry +cacheline reads. Does not count L2 data read prefetches or +instruction fetches. +.It Li DMND_RFO +Counts the number of demand and DCU prefetch reads for ownership +(RFO) requests generated by a write to data cacheline. Does not +count L2 RFO. +.It Li DMND_IFETCH +Counts the number of demand and DCU prefetch instruction cacheline +reads. Does not count L2 code read prefetches. +WB +Counts the number of writeback (modified to exclusive) transactions. +.It Li PF_DATA_RD +Counts the number of data cacheline reads generated by L2 prefetchers. +.It Li PF_RFO +Counts the number of RFO requests generated by L2 prefetchers. +.It Li PF_IFETCH +Counts the number of code reads generated by L2 prefetchers. +.It Li OTHER +Counts one of the following transaction types, including L3 invalidate, +I/O, full or partial writes, WC or non-temporal stores, CLFLUSH, Fences, +lock, unlock, split lock. +.It Li UNCORE_HIT +L3 Hit: local or remote home requests that hit L3 cache in the uncore +with no coherency actions required (snooping). +.It Li OTHER_CORE_HIT_SNP +L3 Hit: local or remote home requests that hit L3 cache in the uncore +and was serviced by another core with a cross core snoop where no modified +copies were found (clean). +.It Li OTHER_CORE_HITM +L3 Hit: local or remote home requests that hit L3 cache in the uncore +and was serviced by another core with a cross core snoop where modified +copies were found (HITM). +.It Li REMOTE_CACHE_FWD +L3 Miss: local homed requests that missed the L3 cache and was serviced +by forwarded data following a cross package snoop where no modified +copies found. (Remote home requests are not counted) +.It Li REMOTE_DRAM +L3 Miss: remote home requests that missed the L3 cache and were serviced +by remote DRAM. +.It Li LOCAL_DRAM +L3 Miss: local home requests that missed the L3 cache and were serviced +by local DRAM. +.It Li NON_DRAM +Non-DRAM requests that were serviced by IOH. +.El +.It Li cmask= Ns Ar value +Configure the PMC to increment only if the number of configured +events measured in a cycle is greater than or equal to +.Ar value . +.It Li edge +Configure the PMC to count the number of de-asserted to asserted +transitions of the conditions expressed by the other qualifiers. +If specified, the counter will increment only once whenever a +condition becomes true, irrespective of the number of clocks during +which the condition remains true. +.It Li inv +Invert the sense of comparison when the +.Dq Li cmask +qualifier is present, making the counter increment when the number of +events per cycle is less than the value specified by the +.Dq Li cmask +qualifier. +.It Li os +Configure the PMC to count events happening at processor privilege +level 0. +.It Li usr +Configure the PMC to count events occurring at privilege levels 1, 2 +or 3. +.El +.Pp +If neither of the +.Dq Li os +or +.Dq Li usr +qualifiers are specified, the default is to enable both. +.Ss Event Specifiers (Programmable PMCs) +Core i7 and Xeon 5500 programmable PMCs support the following events: +.Bl -tag -width indent +.It Li SB_DRAIN.ANY +.Pq Event 04H , Umask 07H +Counts the number of store buffer drains. +.It Li STORE_BLOCKS.AT_RET +.Pq Event 06H , Umask 04H +Counts number of loads delayed with at-Retirement block code. The following +loads need to be executed at retirement and wait for all senior stores on +the same thread to be drained: load splitting across 4K boundary (page +split), load accessing uncacheable (UC or USWC) memory, load lock, and load +with page table in UC or USWC memory region. +.It Li STORE_BLOCKS.L1D_BLOCK +.Pq Event 06H , Umask 08H +Cacheable loads delayed with L1D block code +.It Li PARTIAL_ADDRESS_ALIAS +.Pq Event 07H , Umask 01H +Counts false dependency due to partial address aliasing +.It Li DTLB_LOAD_MISSES.ANY +.Pq Event 08H , Umask 01H +Counts all load misses that cause a page walk +.It Li DTLB_LOAD_MISSES.WALK_COMPLETED +.Pq Event 08H , Umask 02H +Counts number of completed page walks due to load miss in the STLB. +.It Li DTLB_LOAD_MISSES.STLB_HIT +.Pq Event 08H , Umask 10H +Number of cache load STLB hits +.It Li DTLB_LOAD_MISSES.PDE_MISS +.Pq Event 08H , Umask 20H +Number of DTLB cache load misses where the low part of the linear to +physical address translation was missed. +.It Li DTLB_LOAD_MISSES.PDP_MISS +.Pq Event 08H , Umask 40H +Number of DTLB cache load misses where the high part of the linear to +physical address translation was missed. +.It Li DTLB_LOAD_MISSES.LARGE_WALK_COMPLETED +.Pq Event 08H , Umask 80H +Counts number of completed large page walks due to load miss in the STLB. +.It Li MEM_INST_RETIRED.LOADS +.Pq Event 0BH , Umask 01H +Counts the number of instructions with an architecturally-visible store +retired on the architected path. +In conjunction with ld_lat facility +.It Li MEM_INST_RETIRED.STORES +.Pq Event 0BH , Umask 02H +Counts the number of instructions with an architecturally-visible store +retired on the architected path. +In conjunction with ld_lat facility +.It Li MEM_INST_RETIRED.LATENCY_ABOVE_THRESHOLD +.Pq Event 0BH , Umask 10H +Counts the number of instructions exceeding the latency specified with +ld_lat facility. +In conjunction with ld_lat facility +.It Li MEM_STORE_RETIRED.DTLB_MISS +.Pq Event 0CH , Umask 01H +The event counts the number of retired stores that missed the DTLB. The DTLB +miss is not counted if the store operation causes a fault. Does not counter +prefetches. Counts both primary and secondary misses to the TLB +.It Li UOPS_ISSUED.ANY +.Pq Event 0EH , Umask 01H +Counts the number of Uops issued by the Register Allocation Table to the +Reservation Station, i.e. the UOPs issued from the front end to the back +end. +.It Li UOPS_ISSUED.STALLED_CYCLES +.Pq Event 0EH , Umask 01H +Counts the number of cycles no Uops issued by the Register Allocation Table +to the Reservation Station, i.e. the UOPs issued from the front end to the +back end. +set invert=1, cmask = 1 +.It Li UOPS_ISSUED.FUSED +.Pq Event 0EH , Umask 02H +Counts the number of fused Uops that were issued from the Register +Allocation Table to the Reservation Station. +.It Li MEM_UNCORE_RETIRED.L3_DATA_MISS_UNKNOWN +.Pq Event 0FH , Umask 01H +Counts number of memory load instructions retired where the memory reference +missed L3 and data source is unknown. +Available only for CPUID signature 06_2EH +.It Li MEM_UNCORE_RETIRED.OTHER_CORE_L2_HITM +.Pq Event 0FH , Umask 02H +Counts number of memory load instructions retired where the memory reference +hit modified data in a sibling core residing on the same socket. +.It Li MEM_UNCORE_RETIRED.REMOTE_CACHE_LOCAL_HOME_HIT +.Pq Event 0FH , Umask 08H +Counts number of memory load instructions retired where the memory reference +missed the L1, L2 and L3 caches and HIT in a remote socket's cache. Only +counts locally homed lines. +.It Li MEM_UNCORE_RETIRED.REMOTE_DRAM +.Pq Event 0FH , Umask 10H +Counts number of memory load instructions retired where the memory reference +missed the L1, L2 and L3 caches and was remotely homed. This includes both +DRAM access and HITM in a remote socket's cache for remotely homed lines. +.It Li MEM_UNCORE_RETIRED.LOCAL_DRAM +.Pq Event 0FH , Umask 20H +Counts number of memory load instructions retired where the memory reference +missed the L1, L2 and L3 caches and required a local socket memory +reference. This includes locally homed cachelines that were in a modified +state in another socket. +.It Li MEM_UNCORE_RETIRED.UNCACHEABLE +.Pq Event 0FH , Umask 80H +Counts number of memory load instructions retired where the memory reference +missed the L1, L2 and L3 caches and to perform I/O. +Available only for CPUID signature 06_2EH +.It Li FP_COMP_OPS_EXE.X87 +.Pq Event 10H , Umask 01H +Counts the number of FP Computational Uops Executed. The number of FADD, +FSUB, FCOM, FMULs, integer MULsand IMULs, FDIVs, FPREMs, FSQRTS, integer +DIVs, and IDIVs. This event does not distinguish an FADD used in the middle +of a transcendental flow from a separate FADD instruction. +.It Li FP_COMP_OPS_EXE.MMX +.Pq Event 10H , Umask 02H +Counts number of MMX Uops executed. +.It Li FP_COMP_OPS_EXE.SSE_FP +.Pq Event 10H , Umask 04H +Counts number of SSE and SSE2 FP uops executed. +.It Li FP_COMP_OPS_EXE.SSE2_INTEGER +.Pq Event 10H , Umask 08H +Counts number of SSE2 integer uops executed. +.It Li FP_COMP_OPS_EXE.SSE_FP_PACKED +.Pq Event 10H , Umask 10H +Counts number of SSE FP packed uops executed. +.It Li FP_COMP_OPS_EXE.SSE_FP_SCALAR +.Pq Event 10H , Umask 20H +Counts number of SSE FP scalar uops executed. +.It Li FP_COMP_OPS_EXE.SSE_SINGLE_PRECISION +.Pq Event 10H , Umask 40H +Counts number of SSE* FP single precision uops executed. +.It Li FP_COMP_OPS_EXE.SSE_DOUBLE_PRECISION +.Pq Event 10H , Umask 80H +Counts number of SSE* FP double precision uops executed. +.It Li SIMD_INT_128.PACKED_MPY +.Pq Event 12H , Umask 01H +Counts number of 128 bit SIMD integer multiply operations. +.It Li SIMD_INT_128.PACKED_SHIFT +.Pq Event 12H , Umask 02H +Counts number of 128 bit SIMD integer shift operations. +.It Li SIMD_INT_128.PACK +.Pq Event 12H , Umask 04H +Counts number of 128 bit SIMD integer pack operations. +.It Li SIMD_INT_128.UNPACK +.Pq Event 12H , Umask 08H +Counts number of 128 bit SIMD integer unpack operations. +.It Li SIMD_INT_128.PACKED_LOGICAL +.Pq Event 12H , Umask 10H +Counts number of 128 bit SIMD integer logical operations. +.It Li SIMD_INT_128.PACKED_ARITH +.Pq Event 12H , Umask 20H +Counts number of 128 bit SIMD integer arithmetic operations. +.It Li SIMD_INT_128.SHUFFLE_MOVE +.Pq Event 12H , Umask 40H +Counts number of 128 bit SIMD integer shuffle and move operations. +.It Li LOAD_DISPATCH.RS +.Pq Event 13H , Umask 01H +Counts number of loads dispatched from the Reservation Station that bypass +the Memory Order Buffer. +.It Li LOAD_DISPATCH.RS_DELAYED +.Pq Event 13H , Umask 02H +Counts the number of delayed RS dispatches at the stage latch. If an RS +dispatch can not bypass to LB, it has another chance to dispatch from the +one-cycle delayed staging latch before it is written into the LB. +.It Li LOAD_DISPATCH.MOB +.Pq Event 13H , Umask 04H +Counts the number of loads dispatched from the Reservation Station to the +Memory Order Buffer. +.It Li LOAD_DISPATCH.ANY +.Pq Event 13H , Umask 07H +Counts all loads dispatched from the Reservation Station. +.It Li ARITH.CYCLES_DIV_BUSY +.Pq Event 14H , Umask 01H +Counts the number of cycles the divider is busy executing divide or square +root operations. The divide can be integer, X87 or Streaming SIMD Extensions +(SSE). The square root operation can be either X87 or SSE. +Set 'edge =1, invert=1, cmask=1' to count the number of divides. +Count may be incorrect When SMT is on. +.It Li ARITH.MUL +.Pq Event 14H , Umask 02H +Counts the number of multiply operations executed. This includes integer as +well as floating point multiply operations but excludes DPPS mul and MPSAD. +Count may be incorrect When SMT is on +.It Li INST_QUEUE_WRITES +.Pq Event 17H , Umask 01H +Counts the number of instructions written into the instruction queue every +cycle. +.It Li INST_DECODED.DEC0 +.Pq Event 18H , Umask 01H +Counts number of instructions that require decoder 0 to be decoded. Usually, +this means that the instruction maps to more than 1 uop +.It Li TWO_UOP_INSTS_DECODED +.Pq Event 19H , Umask 01H +An instruction that generates two uops was decoded +.It Li INST_QUEUE_WRITE_CYCLES +.Pq Event 1EH , Umask 01H +This event counts the number of cycles during which instructions are written +to the instruction queue. Dividing this counter by the number of +instructions written to the instruction queue (INST_QUEUE_WRITES) yields the +average number of instructions decoded each cycle. If this number is less +than four and the pipe stalls, this indicates that the decoder is failing to +decode enough instructions per cycle to sustain the 4-wide pipeline. +If SSE* instructions that are 6 bytes or longer arrive one after another, +then front end throughput may limit execution speed. In such case, +.It Li LSD_OVERFLOW +.Pq Event 20H , Umask 01H +Counts number of loops that cant stream from the instruction queue. +.It Li L2_RQSTS.LD_HIT +.Pq Event 24H , Umask 01H +Counts number of loads that hit the L2 cache. L2 loads include both L1D +demand misses as well as L1D prefetches. L2 loads can be rejected for +various reasons. Only non rejected loads are counted. +.It Li L2_RQSTS.LD_MISS +.Pq Event 24H , Umask 02H +Counts the number of loads that miss the L2 cache. L2 loads include both L1D +demand misses as well as L1D prefetches. +.It Li L2_RQSTS.LOADS +.Pq Event 24H , Umask 03H +Counts all L2 load requests. L2 loads include both L1D demand misses as well +as L1D prefetches. +.It Li L2_RQSTS.RFO_HIT +.Pq Event 24H , Umask 04H +Counts the number of store RFO requests that hit the L2 cache. L2 RFO +requests include both L1D demand RFO misses as well as L1D RFO prefetches. +Count includes WC memory requests, where the data is not fetched but the +permission to write the line is required. +.It Li L2_RQSTS.RFO_MISS +.Pq Event 24H , Umask 08H +Counts the number of store RFO requests that miss the L2 cache. L2 RFO +requests include both L1D demand RFO misses as well as L1D RFO prefetches. +.It Li L2_RQSTS.RFOS +.Pq Event 24H , Umask 0CH +Counts all L2 store RFO requests. L2 RFO requests include both L1D demand +RFO misses as well as L1D RFO prefetches. +.It Li L2_RQSTS.IFETCH_HIT +.Pq Event 24H , Umask 10H +Counts number of instruction fetches that hit the L2 cache. L2 instruction +fetches include both L1I demand misses as well as L1I instruction +prefetches. +.It Li L2_RQSTS.IFETCH_MISS +.Pq Event 24H , Umask 20H +Counts number of instruction fetches that miss the L2 cache. L2 instruction +fetches include both L1I demand misses as well as L1I instruction +prefetches. +.It Li L2_RQSTS.IFETCHES +.Pq Event 24H , Umask 30H +Counts all instruction fetches. L2 instruction fetches include both L1I +demand misses as well as L1I instruction prefetches. +.It Li L2_RQSTS.PREFETCH_HIT +.Pq Event 24H , Umask 40H +Counts L2 prefetch hits for both code and data. +.It Li L2_RQSTS.PREFETCH_MISS +.Pq Event 24H , Umask 80H +Counts L2 prefetch misses for both code and data. +.It Li L2_RQSTS.PREFETCHES +.Pq Event 24H , Umask C0H +Counts all L2 prefetches for both code and data. +.It Li L2_RQSTS.MISS +.Pq Event 24H , Umask AAH +Counts all L2 misses for both code and data. +.It Li L2_RQSTS.REFERENCES +.Pq Event 24H , Umask FFH +Counts all L2 requests for both code and data. +.It Li L2_DATA_RQSTS.DEMAND.I_STATE +.Pq Event 26H , Umask 01H +Counts number of L2 data demand loads where the cache line to be loaded is +in the I (invalid) state, i.e. a cache miss. L2 demand loads are both L1D +demand misses and L1D prefetches. +.It Li L2_DATA_RQSTS.DEMAND.S_STATE +.Pq Event 26H , Umask 02H +Counts number of L2 data demand loads where the cache line to be loaded is +in the S (shared) state. L2 demand loads are both L1D demand misses and L1D +prefetches. +.It Li L2_DATA_RQSTS.DEMAND.E_STATE +.Pq Event 26H , Umask 04H +Counts number of L2 data demand loads where the cache line to be loaded is +in the E (exclusive) state. L2 demand loads are both L1D demand misses and +L1D prefetches. +.It Li L2_DATA_RQSTS.DEMAND.M_STATE +.Pq Event 26H , Umask 08H +Counts number of L2 data demand loads where the cache line to be loaded is +in the M (modified) state. L2 demand loads are both L1D demand misses and +L1D prefetches. +.It Li L2_DATA_RQSTS.DEMAND.MESI +.Pq Event 26H , Umask 0FH +Counts all L2 data demand requests. L2 demand loads are both L1D demand +misses and L1D prefetches. +.It Li L2_DATA_RQSTS.PREFETCH.I_STATE +.Pq Event 26H , Umask 10H +Counts number of L2 prefetch data loads where the cache line to be loaded is +in the I (invalid) state, i.e. a cache miss. +.It Li L2_DATA_RQSTS.PREFETCH.S_STATE +.Pq Event 26H , Umask 20H +Counts number of L2 prefetch data loads where the cache line to be loaded is +in the S (shared) state. A prefetch RFO will miss on an S state line, while +a prefetch read will hit on an S state line. +.It Li L2_DATA_RQSTS.PREFETCH.E_STATE +.Pq Event 26H , Umask 40H +Counts number of L2 prefetch data loads where the cache line to be loaded is +in the E (exclusive) state. +.It Li L2_DATA_RQSTS.PREFETCH.M_STATE +.Pq Event 26H , Umask 80H +Counts number of L2 prefetch data loads where the cache line to be loaded is +in the M (modified) state. +.It Li L2_DATA_RQSTS.PREFETCH.MESI +.Pq Event 26H , Umask F0H +Counts all L2 prefetch requests. +.It Li L2_DATA_RQSTS.ANY +.Pq Event 26H , Umask FFH +Counts all L2 data requests. +.It Li L2_WRITE.RFO.I_STATE +.Pq Event 27H , Umask 01H +Counts number of L2 demand store RFO requests where the cache line to be +loaded is in the I (invalid) state, i.e, a cache miss. The L1D prefetcher +does not issue a RFO prefetch. +This is a demand RFO request +.It Li L2_WRITE.RFO.S_STATE +.Pq Event 27H , Umask 02H +Counts number of L2 store RFO requests where the cache line to be loaded is +in the S (shared) state. The L1D prefetcher does not issue a RFO prefetch,. +This is a demand RFO request +.It Li L2_WRITE.RFO.M_STATE +.Pq Event 27H , Umask 08H +Counts number of L2 store RFO requests where the cache line to be loaded is +in the M (modified) state. The L1D prefetcher does not issue a RFO prefetch. +This is a demand RFO request +.It Li L2_WRITE.RFO.HIT +.Pq Event 27H , Umask 0EH +Counts number of L2 store RFO requests where the cache line to be loaded is +in either the S, E or M states. The L1D prefetcher does not issue a RFO +prefetch. +This is a demand RFO request +.It Li L2_WRITE.RFO.MESI +.Pq Event 27H , Umask 0FH +Counts all L2 store RFO requests.The L1D prefetcher does not issue a RFO +prefetch. +This is a demand RFO request +.It Li L2_WRITE.LOCK.I_STATE +.Pq Event 27H , Umask 10H +Counts number of L2 demand lock RFO requests where the cache line to be +loaded is in the I (invalid) state, i.e. a cache miss. +.It Li L2_WRITE.LOCK.S_STATE +.Pq Event 27H , Umask 20H +Counts number of L2 lock RFO requests where the cache line to be loaded is +in the S (shared) state. +.It Li L2_WRITE.LOCK.E_STATE +.Pq Event 27H , Umask 40H +Counts number of L2 demand lock RFO requests where the cache line to be +loaded is in the E (exclusive) state. +.It Li L2_WRITE.LOCK.M_STATE +.Pq Event 27H , Umask 80H +Counts number of L2 demand lock RFO requests where the cache line to be +loaded is in the M (modified) state. +.It Li L2_WRITE.LOCK.HIT +.Pq Event 27H , Umask E0H +Counts number of L2 demand lock RFO requests where the cache line to be +loaded is in either the S, E, or M state. +.It Li L2_WRITE.LOCK.MESI +.Pq Event 27H , Umask F0H +Counts all L2 demand lock RFO requests. +.It Li L1D_WB_L2.I_STATE +.Pq Event 28H , Umask 01H +Counts number of L1 writebacks to the L2 where the cache line to be written +is in the I (invalid) state, i.e. a cache miss. +.It Li L1D_WB_L2.S_STATE +.Pq Event 28H , Umask 02H +Counts number of L1 writebacks to the L2 where the cache line to be written +is in the S state. +.It Li L1D_WB_L2.E_STATE +.Pq Event 28H , Umask 04H +Counts number of L1 writebacks to the L2 where the cache line to be written +is in the E (exclusive) state. +.It Li L1D_WB_L2.M_STATE +.Pq Event 28H , Umask 08H +Counts number of L1 writebacks to the L2 where the cache line to be written +is in the M (modified) state. +.It Li L1D_WB_L2.MESI +.Pq Event 28H , Umask 0FH +Counts all L1 writebacks to the L2. +.It Li L3_LAT_CACHE.REFERENCE +.Pq Event 2EH , Umask 4FH +This event counts requests originating from the core that reference a cache +line in the last level cache. The event count includes speculative traffic +but excludes cache line fills due to a L2 hardware-prefetch. Because cache +hierarchy, cache sizes and other implementation-specific characteristics; +value comparison to estimate performance differences is not recommended. +see Table A-1 +.It Li L3_LAT_CACHE.MISS +.Pq Event 2EH , Umask 41H +This event counts each cache miss condition for references to the last level +cache. The event count may include speculative traffic but excludes cache +line fills due to L2 hardware-prefetches. Because cache hierarchy, cache +sizes and other implementation-specific characteristics; value comparison to +estimate performance differences is not recommended. +see Table A-1 +.It Li CPU_CLK_UNHALTED.THREAD_P +.Pq Event 3CH , Umask 00H +Counts the number of thread cycles while the thread is not in a halt state. +The thread enters the halt state when it is running the HLT instruction. The +core frequency may change from time to time due to power or thermal +throttling. +see Table A-1 +.It Li CPU_CLK_UNHALTED.REF_P +.Pq Event 3CH , Umask 01H +Increments at the frequency of TSC when not halted. +see Table A-1 +.It Li L1D_CACHE_LD.I_STATE +.Pq Event 40H , Umask 01H +Counts L1 data cache read requests where the cache line to be loaded is in +the I (invalid) state, i.e. the read request missed the cache. +Counter 0, 1 only +.It Li L1D_CACHE_LD.S_STATE +.Pq Event 40H , Umask 02H +Counts L1 data cache read requests where the cache line to be loaded is in +the S (shared) state. +Counter 0, 1 only +.It Li L1D_CACHE_LD.E_STATE +.Pq Event 40H , Umask 04H +Counts L1 data cache read requests where the cache line to be loaded is in +the E (exclusive) state. +Counter 0, 1 only +.It Li L1D_CACHE_LD.M_STATE +.Pq Event 40H , Umask 08H +Counts L1 data cache read requests where the cache line to be loaded is in +the M (modified) state. +Counter 0, 1 only +.It Li L1D_CACHE_LD.MESI +.Pq Event 40H , Umask 0FH +Counts L1 data cache read requests. +Counter 0, 1 only +.It Li L1D_CACHE_ST.S_STATE +.Pq Event 41H , Umask 02H +Counts L1 data cache store RFO requests where the cache line to be loaded is +in the S (shared) state. +Counter 0, 1 only +.It Li L1D_CACHE_ST.E_STATE +.Pq Event 41H , Umask 04H +Counts L1 data cache store RFO requests where the cache line to be loaded is +in the E (exclusive) state. +Counter 0, 1 only +.It Li L1D_CACHE_ST.M_STATE +.Pq Event 41H , Umask 08H +Counts L1 data cache store RFO requests where cache line to be loaded is in +the M (modified) state. +Counter 0, 1 only +.It Li L1D_CACHE_LOCK.HIT +.Pq Event 42H , Umask 01H +Counts retired load locks that hit in the L1 data cache or hit in an already +allocated fill buffer. The lock portion of the load lock transaction must +hit in the L1D. +The initial load will pull the lock into the L1 data cache. Counter 0, 1 +only +.It Li L1D_CACHE_LOCK.S_STATE +.Pq Event 42H , Umask 02H +Counts L1 data cache retired load locks that hit the target cache line in +the shared state. +Counter 0, 1 only +.It Li L1D_CACHE_LOCK.E_STATE +.Pq Event 42H , Umask 04H +Counts L1 data cache retired load locks that hit the target cache line in +the exclusive state. +Counter 0, 1 only +.It Li L1D_CACHE_LOCK.M_STATE +.Pq Event 42H , Umask 08H +Counts L1 data cache retired load locks that hit the target cache line in +the modified state. +Counter 0, 1 only +.It Li L1D_ALL_REF.ANY +.Pq Event 43H , Umask 01H +Counts all references (uncached, speculated and retired) to the L1 data +cache, including all loads and stores with any memory types. The event +counts memory accesses only when they are actually performed. For example, a +load blocked by unknown store address and later performed is only counted +once. +The event does not include non- memory accesses, such as I/O accesses. +Counter 0, 1 only +.It Li L1D_ALL_REF.CACHEABLE +.Pq Event 43H , Umask 02H +Counts all data reads and writes (speculated and retired) from cacheable +memory, including locked operations. +Counter 0, 1 only +.It Li L1D_PEND_MISS.LOAD_BUFFERS_FULL +.Pq Event 48H , Umask 02H +Counts cycles of L1 data cache load fill buffers full. +Counter 0, 1 only +.It Li DTLB_MISSES.ANY +.Pq Event 49H , Umask 01H +Counts the number of misses in the STLB which causes a page walk. +.It Li DTLB_MISSES.WALK_COMPLETED +.Pq Event 49H , Umask 02H +Counts number of misses in the STLB which resulted in a completed page walk. +.It Li DTLB_MISSES.STLB_HIT +.Pq Event 49H , Umask 10H +Counts the number of DTLB first level misses that hit in the second level +TLB. This event is only relevant if the core contains multiple DTLB levels. +.It Li LOAD_HIT_PRE +.Pq Event 4CH , Umask 01H +Counts load operations sent to the L1 data cache while a previous SSE +prefetch instruction to the same cache line has started prefetching but has +not yet finished. +.It Li L1D_PREFETCH.REQUESTS +.Pq Event 4EH , Umask 01H +Counts number of hardware prefetch requests dispatched out of the prefetch +FIFO. +.It Li L1D_PREFETCH.MISS +.Pq Event 4EH , Umask 02H +Counts number of hardware prefetch requests that miss the L1D. There are two *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Apr 2 13:34:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E6D47106564A; Fri, 2 Apr 2010 13:34:28 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D56D08FC17; Fri, 2 Apr 2010 13:34: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 o32DYSmH069521; Fri, 2 Apr 2010 13:34:28 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o32DYSCh069516; Fri, 2 Apr 2010 13:34:28 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201004021334.o32DYSCh069516@svn.freebsd.org> From: Fabien Thomas Date: Fri, 2 Apr 2010 13:34: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: r206090 - head/usr.sbin/pmcstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Apr 2010 13:34:29 -0000 Author: fabient Date: Fri Apr 2 13:34:28 2010 New Revision: 206090 URL: http://svn.freebsd.org/changeset/base/206090 Log: Improve "top" header by: - Display sample received per PMCs (or merged PMCs). - Display percentage vs all samples Modified: head/usr.sbin/pmcstat/pmcpl_callgraph.c head/usr.sbin/pmcstat/pmcpl_calltree.c head/usr.sbin/pmcstat/pmcstat_log.c head/usr.sbin/pmcstat/pmcstat_log.h Modified: head/usr.sbin/pmcstat/pmcpl_callgraph.c ============================================================================== --- head/usr.sbin/pmcstat/pmcpl_callgraph.c Fri Apr 2 13:23:49 2010 (r206089) +++ head/usr.sbin/pmcstat/pmcpl_callgraph.c Fri Apr 2 13:34:28 2010 (r206090) @@ -341,6 +341,7 @@ pmcpl_cg_process(struct pmcstat_process parent = pmcstat_cgnode_hash_lookup_pc(pp, pmcid, pc, usermode); if (parent == NULL) { pmcstat_stats.ps_callchain_dubious_frames++; + pmcr->pr_dubious_frames++; return; } Modified: head/usr.sbin/pmcstat/pmcpl_calltree.c ============================================================================== --- head/usr.sbin/pmcstat/pmcpl_calltree.c Fri Apr 2 13:23:49 2010 (r206089) +++ head/usr.sbin/pmcstat/pmcpl_calltree.c Fri Apr 2 13:34:28 2010 (r206090) @@ -403,6 +403,10 @@ pmcpl_ct_node_dumptop(int pmcin, struct &pmcin, pmcpl_ct_arc_compare); for (i = 0; i < ct->pct_narc; i++) { + /* Skip this arc if there is no sample at all. */ + if (PMCPL_CT_SAMPLE(pmcin, + &ct->pct_arc[i].pcta_samples) == 0) + continue; if (PMCPL_CT_SAMPLEP(pmcin, &ct->pct_arc[i].pcta_samples) > pmcstat_threshold) { if (pmcpl_ct_node_dumptop(pmcin, @@ -516,6 +520,10 @@ pmcpl_ct_topdisplay(void) x = y = 0; for (i = 0; i < pmcpl_ct_root->pct_narc; i++) { + /* Skip this arc if there is no sample at all. */ + if (PMCPL_CT_SAMPLE(pmcin, + &pmcpl_ct_root->pct_arc[i].pcta_samples) == 0) + continue; if (pmcpl_ct_node_dumptop(pmcin, pmcpl_ct_root->pct_arc[i].pcta_child, &rsamples, x, &y, pmcstat_displayheight - 2)) { @@ -693,6 +701,7 @@ pmcpl_ct_process(struct pmcstat_process } if (n-- == 0) { pmcstat_stats.ps_callchain_dubious_frames++; + pmcr->pr_dubious_frames++; return; } Modified: head/usr.sbin/pmcstat/pmcstat_log.c ============================================================================== --- head/usr.sbin/pmcstat/pmcstat_log.c Fri Apr 2 13:23:49 2010 (r206089) +++ head/usr.sbin/pmcstat/pmcstat_log.c Fri Apr 2 13:34:28 2010 (r206090) @@ -247,6 +247,7 @@ static int pmcstat_string_compute_hash(c static void pmcstat_string_initialize(void); static int pmcstat_string_lookup_hash(pmcstat_interned_string _is); static void pmcstat_string_shutdown(void); +static void pmcstat_stats_reset(void); /* * A simple implementation of interned strings. Each interned string @@ -274,6 +275,21 @@ int pmcstat_npmcs; */ int pmcstat_pause; +static void +pmcstat_stats_reset(void) +{ + struct pmcstat_pmcrecord *pr; + + /* Flush PMCs stats. */ + LIST_FOREACH(pr, &pmcstat_pmcs, pr_next) { + pr->pr_samples = 0; + pr->pr_dubious_frames = 0; + } + + /* Flush global stats. */ + bzero(&pmcstat_stats, sizeof(struct pmcstat_stats)); +} + /* * Compute a 'hash' value for a string. */ @@ -1009,6 +1025,8 @@ pmcstat_pmcid_add(pmc_id_t pmcid, pmcsta pr->pr_pmcid = pmcid; pr->pr_pmcname = ps; pr->pr_pmcin = pmcstat_npmcs++; + pr->pr_samples = 0; + pr->pr_dubious_frames = 0; pr->pr_merge = prm == NULL ? pr : prm; LIST_INSERT_HEAD(&pmcstat_pmcs, pr, pr_next); @@ -1387,6 +1405,7 @@ pmcstat_analyze_log(void) /* Get PMC record. */ pmcr = pmcstat_lookup_pmcid(ev.pl_u.pl_s.pl_pmcid); assert(pmcr != NULL); + pmcr->pr_samples++; /* * Call the plugins processing @@ -1420,6 +1439,7 @@ pmcstat_analyze_log(void) /* Get PMC record. */ pmcr = pmcstat_lookup_pmcid(ev.pl_u.pl_cc.pl_pmcid); assert(pmcr != NULL); + pmcr->pr_samples++; /* * Call the plugins processing @@ -1787,32 +1807,46 @@ pmcstat_process_log(void) static void pmcstat_refresh_top(void) { + int v_attrs; + float v; char pmcname[40]; - const char *s; + struct pmcstat_pmcrecord *pmcpr; /* If in pause mode do not refresh display. */ if (pmcstat_pause) return; /* Wait until PMC pop in the log. */ - s = pmcstat_pmcindex_to_name(pmcstat_pmcinfilter); - if (s == NULL) + pmcpr = pmcstat_pmcindex_to_pmcr(pmcstat_pmcinfilter); + if (pmcpr == NULL) return; /* Format PMC name. */ if (pmcstat_mergepmc) - snprintf(pmcname, sizeof(pmcname), "[%s]", s); + snprintf(pmcname, sizeof(pmcname), "[%s]", + pmcstat_string_unintern(pmcpr->pr_pmcname)); else snprintf(pmcname, sizeof(pmcname), "%s.%d", - s, pmcstat_pmcinfilter); + pmcstat_string_unintern(pmcpr->pr_pmcname), + pmcstat_pmcinfilter); + + /* Format samples count. */ + if (pmcstat_stats.ps_samples_total > 0) + v = (pmcpr->pr_samples * 100.0) / + pmcstat_stats.ps_samples_total; + else + v = 0.; + v_attrs = PMCSTAT_ATTRPERCENT(v); PMCSTAT_PRINTBEGIN(); - PMCSTAT_PRINTW("PMC: %s Samples: %u processed, %u invalid\n\n", + PMCSTAT_PRINTW("PMC: %s Samples: %u ", pmcname, - pmcstat_stats.ps_samples_total, - pmcstat_stats.ps_samples_unknown_offset + - pmcstat_stats.ps_samples_indeterminable + - pmcstat_stats.ps_callchain_dubious_frames); + pmcpr->pr_samples); + PMCSTAT_ATTRON(v_attrs); + PMCSTAT_PRINTW("(%.1f%%) ", v); + PMCSTAT_ATTROFF(v_attrs); + PMCSTAT_PRINTW(", %u unresolved\n\n", + pmcpr->pr_dubious_frames); if (plugins[args.pa_plugin].pl_topdisplay != NULL) plugins[args.pa_plugin].pl_topdisplay(); PMCSTAT_PRINTEND(); @@ -1879,7 +1913,7 @@ pmcstat_keypress_log(void) */ if (plugins[args.pa_plugin].pl_shutdown != NULL) plugins[args.pa_plugin].pl_shutdown(NULL); - bzero(&pmcstat_stats, sizeof(struct pmcstat_stats)); + pmcstat_stats_reset(); if (plugins[args.pa_plugin].pl_init != NULL) plugins[args.pa_plugin].pl_init(); @@ -1900,7 +1934,7 @@ pmcstat_keypress_log(void) } while (plugins[args.pa_plugin].pl_topdisplay == NULL); /* Open new plugin. */ - bzero(&pmcstat_stats, sizeof(struct pmcstat_stats)); + pmcstat_stats_reset(); if (plugins[args.pa_plugin].pl_init != NULL) plugins[args.pa_plugin].pl_init(); wprintw(w, "switching to plugin %s", @@ -1949,7 +1983,7 @@ pmcstat_display_log(void) if (args.pa_topmode == PMCSTAT_TOP_DELTA) { if (plugins[args.pa_plugin].pl_shutdown != NULL) plugins[args.pa_plugin].pl_shutdown(NULL); - bzero(&pmcstat_stats, sizeof(struct pmcstat_stats)); + pmcstat_stats_reset(); if (plugins[args.pa_plugin].pl_init != NULL) plugins[args.pa_plugin].pl_init(); } Modified: head/usr.sbin/pmcstat/pmcstat_log.h ============================================================================== --- head/usr.sbin/pmcstat/pmcstat_log.h Fri Apr 2 13:23:49 2010 (r206089) +++ head/usr.sbin/pmcstat/pmcstat_log.h Fri Apr 2 13:34:28 2010 (r206090) @@ -146,6 +146,8 @@ struct pmcstat_pmcrecord { pmc_id_t pr_pmcid; int pr_pmcin; pmcstat_interned_string pr_pmcname; + int pr_samples; + int pr_dubious_frames; struct pmcstat_pmcrecord *pr_merge; }; extern LIST_HEAD(pmcstat_pmcs, pmcstat_pmcrecord) pmcstat_pmcs; /* PMC list */ From owner-svn-src-all@FreeBSD.ORG Fri Apr 2 13:39:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AAF86106566B; Fri, 2 Apr 2010 13:39:30 +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 99E538FC20; Fri, 2 Apr 2010 13:39: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 o32DdUfX070796; Fri, 2 Apr 2010 13:39:30 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o32DdUsk070794; Fri, 2 Apr 2010 13:39:30 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201004021339.o32DdUsk070794@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 2 Apr 2010 13:39:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206091 - 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, 02 Apr 2010 13:39:30 -0000 Author: kib Date: Fri Apr 2 13:39:30 2010 New Revision: 206091 URL: http://svn.freebsd.org/changeset/base/206091 Log: MFC r205316: Fix two style issues. Modified: stable/8/sys/kern/uipc_syscalls.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/net/ (props changed) Modified: stable/8/sys/kern/uipc_syscalls.c ============================================================================== --- stable/8/sys/kern/uipc_syscalls.c Fri Apr 2 13:34:28 2010 (r206090) +++ stable/8/sys/kern/uipc_syscalls.c Fri Apr 2 13:39:30 2010 (r206091) @@ -2528,7 +2528,7 @@ sctp_generic_sendmsg_iov(td, uap) goto sctp_bad; #endif /* MAC */ - auio.uio_iov = iov; + auio.uio_iov = iov; auio.uio_iovcnt = uap->iovlen; auio.uio_segflg = UIO_USERSPACE; auio.uio_rw = UIO_WRITE; @@ -2638,7 +2638,7 @@ sctp_generic_recvmsg(td, uap) } else { fromlen = 0; } - if(uap->msg_flags) { + if (uap->msg_flags) { error = copyin(uap->msg_flags, &msg_flags, sizeof (int)); if (error) { goto out; From owner-svn-src-all@FreeBSD.ORG Fri Apr 2 13:43:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 30BFF106566B; Fri, 2 Apr 2010 13:43:17 +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 1FB398FC19; Fri, 2 Apr 2010 13:43: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 o32DhGo8071659; Fri, 2 Apr 2010 13:43:16 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o32DhGo1071657; Fri, 2 Apr 2010 13:43:16 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201004021343.o32DhGo1071657@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 2 Apr 2010 13:43: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: r206092 - 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, 02 Apr 2010 13:43:17 -0000 Author: kib Date: Fri Apr 2 13:43:16 2010 New Revision: 206092 URL: http://svn.freebsd.org/changeset/base/206092 Log: MFC r205317: Remove dead statement. Modified: stable/8/sys/kern/uipc_syscalls.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/net/ (props changed) Modified: stable/8/sys/kern/uipc_syscalls.c ============================================================================== --- stable/8/sys/kern/uipc_syscalls.c Fri Apr 2 13:39:30 2010 (r206091) +++ stable/8/sys/kern/uipc_syscalls.c Fri Apr 2 13:43:16 2010 (r206092) @@ -2625,7 +2625,6 @@ sctp_generic_recvmsg(td, uap) error = mac_socket_check_receive(td->td_ucred, so); if (error) { goto out; - return (error); } #endif /* MAC */ From owner-svn-src-all@FreeBSD.ORG Fri Apr 2 14:03:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D9C98106564A; Fri, 2 Apr 2010 14:03:01 +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 AEB9B8FC14; Fri, 2 Apr 2010 14:03: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 o32E31Ux076435; Fri, 2 Apr 2010 14:03:01 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o32E31o2076431; Fri, 2 Apr 2010 14:03:01 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201004021403.o32E31o2076431@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 2 Apr 2010 14:03: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: r206093 - in head/sys: fs/deadfs 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, 02 Apr 2010 14:03:02 -0000 Author: kib Date: Fri Apr 2 14:03:01 2010 New Revision: 206093 URL: http://svn.freebsd.org/changeset/base/206093 Log: Add function vop_rename_fail(9) that performs needed cleanup for locks and references of the VOP_RENAME(9) arguments. Use vop_rename_fail() in deadfs_rename(). Tested by: Mikolaj Golub MFC after: 1 week Modified: head/sys/fs/deadfs/dead_vnops.c head/sys/kern/vfs_subr.c head/sys/sys/vnode.h Modified: head/sys/fs/deadfs/dead_vnops.c ============================================================================== --- head/sys/fs/deadfs/dead_vnops.c Fri Apr 2 13:43:16 2010 (r206092) +++ head/sys/fs/deadfs/dead_vnops.c Fri Apr 2 14:03:01 2010 (r206093) @@ -225,13 +225,7 @@ dead_rename(ap) struct componentname *a_tcnp; } */ *ap; { - if (ap->a_tvp) - vput(ap->a_tvp); - if (ap->a_tdvp == ap->a_tvp) - vrele(ap->a_tdvp); - else - vput(ap->a_tdvp); - vrele(ap->a_fdvp); - vrele(ap->a_fvp); + + vop_rename_fail(ap); return (EXDEV); } Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Fri Apr 2 13:43:16 2010 (r206092) +++ head/sys/kern/vfs_subr.c Fri Apr 2 14:03:01 2010 (r206093) @@ -3751,6 +3751,20 @@ assert_vop_slocked(struct vnode *vp, con #endif /* DEBUG_VFS_LOCKS */ void +vop_rename_fail(struct vop_rename_args *ap) +{ + + if (ap->a_tvp != NULL) + vput(ap->a_tvp); + if (ap->a_tdvp == ap->a_tvp) + vrele(ap->a_tdvp); + else + vput(ap->a_tdvp); + vrele(ap->a_fdvp); + vrele(ap->a_fvp); +} + +void vop_rename_pre(void *ap) { struct vop_rename_args *a = ap; Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Fri Apr 2 13:43:16 2010 (r206092) +++ head/sys/sys/vnode.h Fri Apr 2 14:03:01 2010 (r206093) @@ -720,6 +720,8 @@ void vop_symlink_post(void *a, int rc); void vop_unlock_post(void *a, int rc); void vop_unlock_pre(void *a); +void vop_rename_fail(struct vop_rename_args *ap); + #define VOP_WRITE_PRE(ap) \ struct vattr va; \ int error, osize, ooffset, noffset; \ From owner-svn-src-all@FreeBSD.ORG Fri Apr 2 14:03:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AED4F106566C; Fri, 2 Apr 2010 14:03:43 +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 9E9668FC16; Fri, 2 Apr 2010 14:03: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 o32E3hBG076636; Fri, 2 Apr 2010 14:03:43 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o32E3hsM076634; Fri, 2 Apr 2010 14:03:43 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201004021403.o32E3hsM076634@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 2 Apr 2010 14:03:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206094 - 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, 02 Apr 2010 14:03:43 -0000 Author: kib Date: Fri Apr 2 14:03:43 2010 New Revision: 206094 URL: http://svn.freebsd.org/changeset/base/206094 Log: Supply default implementation of VOP_RENAME() that does neccessary unlocks and unreferences for argument vnodes, as expected by kern_renameat(9), and returns EOPNOTSUPP. This fixes locks and reference leaks when rename is attempted on fs that does not implement rename. PR: kern/107439 Based on submission by: Mikolaj Golub Tested by: Mikolaj Golub MFC after: 1 week Modified: head/sys/kern/vfs_default.c Modified: head/sys/kern/vfs_default.c ============================================================================== --- head/sys/kern/vfs_default.c Fri Apr 2 14:03:01 2010 (r206093) +++ head/sys/kern/vfs_default.c Fri Apr 2 14:03:43 2010 (r206094) @@ -67,6 +67,7 @@ __FBSDID("$FreeBSD$"); #include static int vop_nolookup(struct vop_lookup_args *); +static int vop_norename(struct vop_rename_args *); static int vop_nostrategy(struct vop_strategy_args *); static int get_next_dirent(struct vnode *vp, struct dirent **dpp, char *dirbuf, int dirbuflen, off_t *off, @@ -113,6 +114,7 @@ struct vop_vector default_vnodeops = { .vop_poll = vop_nopoll, .vop_putpages = vop_stdputpages, .vop_readlink = VOP_EINVAL, + .vop_rename = vop_norename, .vop_revoke = VOP_PANIC, .vop_strategy = vop_nostrategy, .vop_unlock = vop_stdunlock, @@ -206,6 +208,20 @@ vop_nolookup(ap) } /* + * vop_norename: + * + * Handle unlock and reference counting for arguments of vop_rename + * for filesystems that do not implement rename operation. + */ +static int +vop_norename(struct vop_rename_args *ap) +{ + + vop_rename_fail(ap); + return (EOPNOTSUPP); +} + +/* * vop_nostrategy: * * Strategy routine for VFS devices that have none. From owner-svn-src-all@FreeBSD.ORG Fri Apr 2 14:30:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 800811065678; Fri, 2 Apr 2010 14:30:56 +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 700F58FC1F; Fri, 2 Apr 2010 14:30: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 o32EUugC083890; Fri, 2 Apr 2010 14:30:56 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o32EUuXc083888; Fri, 2 Apr 2010 14:30:56 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201004021430.o32EUuXc083888@svn.freebsd.org> From: Ed Schouten Date: Fri, 2 Apr 2010 14:30: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: r206095 - head/usr.sbin/ac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Apr 2010 14:30:56 -0000 Author: ed Date: Fri Apr 2 14:30:56 2010 New Revision: 206095 URL: http://svn.freebsd.org/changeset/base/206095 Log: Properly initialize the timestamp when using ac -w. When using ac -w, we must use the last timestamp to terminate the log file. I accidentally removed this when I ported the code to use utmpx. Reported by: avg Modified: head/usr.sbin/ac/ac.c Modified: head/usr.sbin/ac/ac.c ============================================================================== --- head/usr.sbin/ac/ac.c Fri Apr 2 14:03:43 2010 (r206094) +++ head/usr.sbin/ac/ac.c Fri Apr 2 14:30:56 2010 (r206095) @@ -583,10 +583,11 @@ ac(const char *file) endutxent(); if (!(Flags & AC_W)) usht.ut_tv.tv_sec = time(NULL); + else + usht.ut_tv.tv_sec = ut_timecopy;; usht.ut_type = SHUTDOWN_TIME; if (Flags & AC_D) { - ut_timecopy = usht.ut_tv.tv_sec; ltm = localtime(&ut_timecopy); if (day >= 0 && day != ltm->tm_yday) { /* From owner-svn-src-all@FreeBSD.ORG Fri Apr 2 14:37:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60D2F1065673; Fri, 2 Apr 2010 14:37:55 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4E7C08FC0C; Fri, 2 Apr 2010 14:37: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 o32EbtWM085535; Fri, 2 Apr 2010 14:37:55 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o32EbtYU085534; Fri, 2 Apr 2010 14:37:55 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201004021437.o32EbtYU085534@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Fri, 2 Apr 2010 14:37: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: r206096 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2010 14:37:55 -0000 Author: bz Date: Fri Apr 2 14:37:55 2010 New Revision: 206096 URL: http://svn.freebsd.org/changeset/base/206096 Log: Propagate merge-info from sys/net to sys for r206024. Also record mergeinfo for r206042. Modified: 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) stable/8/sys/net/ (props changed) From owner-svn-src-all@FreeBSD.ORG Fri Apr 2 15:12:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B177E106566B; Fri, 2 Apr 2010 15:12:31 +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 A0D5A8FC15; Fri, 2 Apr 2010 15:12: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 o32FCVYL093285; Fri, 2 Apr 2010 15:12:31 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o32FCVUM093282; Fri, 2 Apr 2010 15:12:31 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004021512.o32FCVUM093282@svn.freebsd.org> From: Andriy Gapon Date: Fri, 2 Apr 2010 15:12: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: r206097 - in head/sys: geom 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, 02 Apr 2010 15:12:31 -0000 Author: avg Date: Fri Apr 2 15:12:31 2010 New Revision: 206097 URL: http://svn.freebsd.org/changeset/base/206097 Log: bo_bsize: revert r205860 and take an alternative approch in getblk In r205860 I missed the fact that there is code that strongly assumes that devvp bo_bsize is equal to underlying provider's sectorsize. In those places it is hard to obtain the sectorsize in an alternative way if devvp bo_bsize is set to something else. So, I am reverting bo_bsize assigment in g_vfs_open. Instead, in getblk I use DEV_BSIZE block size for b_offset calculation if vp is a disk vp as reported by vn_isdisk. This should coinside with vp being a devvp. Reported by: Mykola Dzham Tested by: Mykola Dzham Pointyhat to: avg MFC after: 2 weeks X-ToDo: convert bread(devvp) in all fs to use bo_bsize-d blocks Modified: head/sys/geom/geom_vfs.c head/sys/kern/vfs_bio.c Modified: head/sys/geom/geom_vfs.c ============================================================================== --- head/sys/geom/geom_vfs.c Fri Apr 2 14:37:55 2010 (r206096) +++ head/sys/geom/geom_vfs.c Fri Apr 2 15:12:31 2010 (r206097) @@ -179,7 +179,7 @@ g_vfs_open(struct vnode *vp, struct g_co bo = &vp->v_bufobj; bo->bo_ops = g_vfs_bufops; bo->bo_private = cp; - bo->bo_bsize = DEV_BSIZE; + bo->bo_bsize = pp->sectorsize; gp->softc = bo; return (error); Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Fri Apr 2 14:37:55 2010 (r206096) +++ head/sys/kern/vfs_bio.c Fri Apr 2 15:12:31 2010 (r206097) @@ -2678,7 +2678,7 @@ loop: */ if (flags & GB_NOCREAT) return NULL; - bsize = bo->bo_bsize; + bsize = vn_isdisk(vp, NULL) ? DEV_BSIZE : bo->bo_bsize; offset = blkno * bsize; vmio = vp->v_object != NULL; maxsize = vmio ? size + (offset & PAGE_MASK) : size; From owner-svn-src-all@FreeBSD.ORG Fri Apr 2 15:22:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A61581065672; Fri, 2 Apr 2010 15:22: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 95E2C8FC16; Fri, 2 Apr 2010 15:22: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 o32FMNFZ095468; Fri, 2 Apr 2010 15:22:23 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o32FMNgu095467; Fri, 2 Apr 2010 15:22:23 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004021522.o32FMNgu095467@svn.freebsd.org> From: Andriy Gapon Date: Fri, 2 Apr 2010 15:22: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: r206098 - head/sys/fs/msdosfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2010 15:22:23 -0000 Author: avg Date: Fri Apr 2 15:22:23 2010 New Revision: 206098 URL: http://svn.freebsd.org/changeset/base/206098 Log: mountmsdosfs: reject too high value of bytes per cluster Bytes per cluster are calcuated as bytes per sector times sectors per cluster. Too high value can overflow an internal variable with type that can hold only values in valid range. Trying to use a wider type results in an attempt to read more than MAXBSIZE at once, a panic. Unfortunately, it is FreeBSD newfs_msdos that produces filesystems with invalid parameters for certain types of media. Reported by: Fabian Keil , Paul B. Mahol Discussed with: bde, kib MFC after: 1 week X-ToDo: fix newfs_msdos Modified: head/sys/fs/msdosfs/msdosfs_vfsops.c Modified: head/sys/fs/msdosfs/msdosfs_vfsops.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_vfsops.c Fri Apr 2 15:12:31 2010 (r206097) +++ head/sys/fs/msdosfs/msdosfs_vfsops.c Fri Apr 2 15:22:23 2010 (r206098) @@ -580,6 +580,7 @@ mountmsdosfs(struct vnode *devvp, struct || (pmp->pm_BytesPerSec & (pmp->pm_BytesPerSec - 1)) || (pmp->pm_HugeSectors == 0) || (pmp->pm_FATsecs == 0) + || (SecPerClust * pmp->pm_BlkPerSec > MAXBSIZE / DEV_BSIZE) ) { error = EINVAL; goto error_exit; From owner-svn-src-all@FreeBSD.ORG Fri Apr 2 15:26:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 98BF11065674; Fri, 2 Apr 2010 15:26:41 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 732268FC13; Fri, 2 Apr 2010 15:26:40 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id SAA01840; Fri, 02 Apr 2010 18:26:38 +0300 (EEST) (envelope-from avg@freebsd.org) Message-ID: <4BB60CAE.4090000@freebsd.org> Date: Fri, 02 Apr 2010 18:26:38 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.24 (X11/20100319) MIME-Version: 1.0 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201004021512.o32FCVUM093282@svn.freebsd.org> In-Reply-To: <201004021512.o32FCVUM093282@svn.freebsd.org> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Subject: Re: svn commit: r206097 - in head/sys: geom 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, 02 Apr 2010 15:26:41 -0000 on 02/04/2010 18:12 Andriy Gapon said the following: > Author: avg > Date: Fri Apr 2 15:12:31 2010 > New Revision: 206097 > URL: http://svn.freebsd.org/changeset/base/206097 > > Log: > bo_bsize: revert r205860 and take an alternative approch in getblk > > In r205860 I missed the fact that there is code that strongly assumes > that devvp bo_bsize is equal to underlying provider's sectorsize. > In those places it is hard to obtain the sectorsize in an alternative > way if devvp bo_bsize is set to something else. > So, I am reverting bo_bsize assigment in g_vfs_open. > Instead, in getblk I use DEV_BSIZE block size for b_offset calculation > if vp is a disk vp as reported by vn_isdisk. This should coinside with > vp being a devvp. > > Reported by: Mykola Dzham > Tested by: Mykola Dzham > Pointyhat to: avg > MFC after: 2 weeks > X-ToDo: convert bread(devvp) in all fs to use bo_bsize-d blocks I should have added that the issue was a panic like the following: panic: wrong length 512 for sectorsize 4096 Interesting part of stack trace: ... #9 0xffffffff8020642b in panic #10 0xffffffff801b4700 in g_io_request #11 0xffffffff803c33ae in vnode_pager_generic_getpages ... -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Fri Apr 2 15:33:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4D3D1065670; Fri, 2 Apr 2010 15:33:24 +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 B323A8FC13; Fri, 2 Apr 2010 15:33: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 o32FXOhB097919; Fri, 2 Apr 2010 15:33:24 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o32FXOvj097918; Fri, 2 Apr 2010 15:33:24 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004021533.o32FXOvj097918@svn.freebsd.org> From: Andriy Gapon Date: Fri, 2 Apr 2010 15:33: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: r206099 - stable/8/usr.bin/calendar/calendars X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2010 15:33:24 -0000 Author: avg Date: Fri Apr 2 15:33:24 2010 New Revision: 206099 URL: http://svn.freebsd.org/changeset/base/206099 Log: MFC r205854: calendar.freebsd: add my entry Modified: stable/8/usr.bin/calendar/calendars/calendar.freebsd Directory Properties: stable/8/usr.bin/calendar/ (props changed) Modified: stable/8/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- stable/8/usr.bin/calendar/calendars/calendar.freebsd Fri Apr 2 15:22:23 2010 (r206098) +++ stable/8/usr.bin/calendar/calendars/calendar.freebsd Fri Apr 2 15:33:24 2010 (r206099) @@ -205,6 +205,7 @@ 07/23 Sergey A. Osokin born in Krasnogorsky, Stepnogorsk, Akmolinskaya region, Kazakhstan, 1972 07/24 Alexander Nedotsukov born in Ulyanovsk, Russian Federation, 1974 07/24 Alberto Villa born in Vercelli, Italy, 1987 +07/27 Andriy Gapon born in Kyrykivka, Sumy region, Ukraine, 1976 07/28 Jim Mock born in Bethlehem, Pennsylvania, United States, 1974 07/28 Tom Hukins born in Manchester, United Kingdom, 1976 07/29 Dirk Meyer born in Kassel, Hessen, Germany, 1965 From owner-svn-src-all@FreeBSD.ORG Fri Apr 2 15:36:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5FB351065693; Fri, 2 Apr 2010 15:36: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 4E46F8FC12; Fri, 2 Apr 2010 15:36: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 o32FauQZ098759; Fri, 2 Apr 2010 15:36:56 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o32Fauuk098757; Fri, 2 Apr 2010 15:36:56 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004021536.o32Fauuk098757@svn.freebsd.org> From: Andriy Gapon Date: Fri, 2 Apr 2010 15:36:56 +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: r206100 - stable/7/usr.bin/calendar/calendars X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2010 15:36:56 -0000 Author: avg Date: Fri Apr 2 15:36:56 2010 New Revision: 206100 URL: http://svn.freebsd.org/changeset/base/206100 Log: MFC r205854: calendar.freebsd: add my entry Modified: stable/7/usr.bin/calendar/calendars/calendar.freebsd Directory Properties: stable/7/usr.bin/calendar/ (props changed) stable/7/usr.bin/calendar/calendars/ (props changed) Modified: stable/7/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- stable/7/usr.bin/calendar/calendars/calendar.freebsd Fri Apr 2 15:33:24 2010 (r206099) +++ stable/7/usr.bin/calendar/calendars/calendar.freebsd Fri Apr 2 15:36:56 2010 (r206100) @@ -182,6 +182,7 @@ 07/22 Lukas Ertl born in Weissenbach/Enns, Steiermark, Austria, 1976 07/23 Sergey A. Osokin born in Krasnogorsky, Stepnogorsk, Akmolinskaya region, Kazakhstan, 1972 07/24 Alexander Nedotsukov born in Ulyanovsk, Russian Federation, 1974 +07/27 Andriy Gapon born in Kyrykivka, Sumy region, Ukraine, 1976 07/28 Jim Mock born in Bethlehem, Pennsylvania, United States, 1974 07/28 Tom Hukins born in Manchester, United Kingdom, 1976 07/29 Dirk Meyer born in Kassel, Hessen, Germany, 1965 From owner-svn-src-all@FreeBSD.ORG Fri Apr 2 15:39:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9BC0F106566B; Fri, 2 Apr 2010 15:39: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 709318FC15; Fri, 2 Apr 2010 15:39: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 o32Fdbqv099395; Fri, 2 Apr 2010 15:39:37 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o32Fdbve099394; Fri, 2 Apr 2010 15:39:37 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004021539.o32Fdbve099394@svn.freebsd.org> From: Andriy Gapon Date: Fri, 2 Apr 2010 15:39: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: r206101 - in stable/7/usr.bin/calendar: . calendars X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2010 15:39:37 -0000 Author: avg Date: Fri Apr 2 15:39:37 2010 New Revision: 206101 URL: http://svn.freebsd.org/changeset/base/206101 Log: fix mergeinfo for r193462 in stable/7 move mergeinfo up from calendar/calendars to calendar Modified: Directory Properties: stable/7/usr.bin/calendar/ (props changed) stable/7/usr.bin/calendar/calendars/ (props changed) From owner-svn-src-all@FreeBSD.ORG Fri Apr 2 16:06:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26637106566B; Fri, 2 Apr 2010 16:06:47 +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 0B8648FC17; Fri, 2 Apr 2010 16:06: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 o32G6kjg005669; Fri, 2 Apr 2010 16:06:46 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o32G6k3m005667; Fri, 2 Apr 2010 16:06:46 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004021606.o32G6k3m005667@svn.freebsd.org> From: Andriy Gapon Date: Fri, 2 Apr 2010 16:06: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: r206102 - head/share/examples/indent X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Apr 2010 16:06:47 -0000 Author: avg Date: Fri Apr 2 16:06:46 2010 New Revision: 206102 URL: http://svn.freebsd.org/changeset/base/206102 Log: add example indent.pro file believed to produce code with minimal differences from KNF This file is what bde uses! With addition of some types from queue(3) by hps. Please note that the output will not be KNF and currently it's not possible to achieve correct KNF with any combination of options. indent(1) needs to be made smarter. Some issues: o indent produces a space between a queue type macro and opening parenthesis o indent produces a tab before __packed and __aligned o indent produce a space after #define bde also notes difference in the following options between this profile and profile in /usr/src/admin/style of 4.4BSD: -cdb -ei -ip8 -nsob Also, NetBSD uses -di0 instead of -di8. Location for the profile is suggested by jh. Submitted by: Hans Petter Selasky (parts) Obtained from: bde :-) MFC after: 10 days X-ToDo: make indent able to produce proper (perfect) KNF X-Perhaps-ToDo: make KNF default output Added: head/share/examples/indent/ head/share/examples/indent/indent.pro (contents, props changed) Added: head/share/examples/indent/indent.pro ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/examples/indent/indent.pro Fri Apr 2 16:06:46 2010 (r206102) @@ -0,0 +1,129 @@ +-TFILE +-T__sighandler_t +-Tblist_t +-Tblmeta_t +-Tboolean_t +-Tbus_addr_t +-Tbus_dma_segment_t +-Tbus_dma_tag_t +-Tbus_dmamap_t +-Tbus_size_t +-Tbus_space_handle_t +-Tc_db_sym_t +-Tc_linker_sym_t +-Tcaddr_t +-Tclock_t +-Tcomp_t +-Tctor_t +-Td_close_t +-Td_ioctl_t +-Td_open_t +-Td_thread_t +-Tdaddr_t +-Tdb_addr_t +-Tdb_expr_t +-Tdb_sym_t +-Tdev_t +-Tdevice_t +-Tdriver_intr_t +-Tdriver_t +-Tdumper_t +-Telf_file_t +-Tfd_mask +-Tfd_set +-Tfixpt_t +-Tgid_t +-Tin_addr_t +-Tino_t +-Tint16_t +-Tint32_t +-Tint64_t +-Tint8_t +-Tintmax_t +-Tintptr_t +-Tkey_t +-Tkobj_class_t +-Tkobj_t +-Tlinker_file_t +-Tlinker_sym_tT +-Tlinker_symval_t +-Tmode_t +-Tmodeventhand_t +-Tmodeventtype_t +-Tmodspecific_t +-Tmoduledata_t +-Tnetisr_t +-Tng_ID_t +-Tnlink_t +-Toff_t +-Tpd_entry_t +-Tpid_t +-Tpmap_t +-Tpoll_handler_t +-Tpps_params_t +-Tprfpregset_t +-Tprpsinfo_t +-Tprstatus_t +-Tpt_entry_t +-Tqaddr_t +-Tquad_t +-Tregister_t +-Trlim_t +-Tsa_family_t +-Tsemid_t +-Tsiginfo_t +-Tsigset_t +-Tsize_t +-Tsocklen_t +-Tspeed_t +-Tssize_t +-Tstack_t +-Tsy_call_t +-Tsysinit_cfunc_t +-Ttime_t +-Tu_char +-Tu_daddr_t +-Tu_int +-Tu_int16_t +-Tu_int32_t +-Tu_int64_t +-Tu_int8_t +-Tu_long +-Tu_quad_t +-Tu_short +-Tudev_t +-Tufs1_daddr_t +-Tufs2_daddr_t +-Tuid_t +-Tuint16_t +-Tuint32_t +-Tuint64_t +-Tuint8_t +-Tuintfptr_t +-Tuintmax_t +-Tuintptr_t +-Tuma_slab_t +-Tuma_zone_t +-Tuoff_t +-Tv_caddr_t +-Tvaddr_t +-Tvm_map_t +-Tvm_object_t +-Tvm_offset_t +-Tvm_ooffset_t +-Tvm_paddr_t +-Tvm_page_t +-Tvm_pindex_t +-Tvm_size_t +-Tvop_t +-Txdrproc_t +-TTAILQ_HEAD +-TTAILQ_ENTRY +-TLIST_HEAD +-TLIST_ENTRY +-TSTAILQ_HEAD +-TSTAILQ_ENTRY +-TSLIST_HEAD +-TSLIST_ENTRY +-bad -bap -nbbb -nbc -br -nbs -c41 -cd41 -cdb -ce -ci4 -cli0 -d0 -di8 -ndj +-ei -nfc1 -nfcb -i8 -ip8 -l79 -lc77 -ldi0 -nlp -npcs -psl -sc -nsob -nv From owner-svn-src-all@FreeBSD.ORG Fri Apr 2 16:09:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 08DA8106566B; Fri, 2 Apr 2010 16:09: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 ECA768FC14; Fri, 2 Apr 2010 16:09:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o32G9taq006420; Fri, 2 Apr 2010 16:09:55 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o32G9tZ8006418; Fri, 2 Apr 2010 16:09:55 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004021609.o32G9tZ8006418@svn.freebsd.org> From: Andriy Gapon Date: Fri, 2 Apr 2010 16:09:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206103 - head/share/examples/indent X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Apr 2010 16:09:56 -0000 Author: avg Date: Fri Apr 2 16:09:55 2010 New Revision: 206103 URL: http://svn.freebsd.org/changeset/base/206103 Log: indent.pro: replace a bunch of -T types with -ta introduced in r205989 Suggested by: bde, Hans Petter Selasky MFC after: 10 days Modified: head/share/examples/indent/indent.pro Modified: head/share/examples/indent/indent.pro ============================================================================== --- head/share/examples/indent/indent.pro Fri Apr 2 16:06:46 2010 (r206102) +++ head/share/examples/indent/indent.pro Fri Apr 2 16:09:55 2010 (r206103) @@ -1,122 +1,11 @@ -TFILE --T__sighandler_t --Tblist_t --Tblmeta_t --Tboolean_t --Tbus_addr_t --Tbus_dma_segment_t --Tbus_dma_tag_t --Tbus_dmamap_t --Tbus_size_t --Tbus_space_handle_t --Tc_db_sym_t --Tc_linker_sym_t --Tcaddr_t --Tclock_t --Tcomp_t --Tctor_t --Td_close_t --Td_ioctl_t --Td_open_t --Td_thread_t --Tdaddr_t --Tdb_addr_t --Tdb_expr_t --Tdb_sym_t --Tdev_t --Tdevice_t --Tdriver_intr_t --Tdriver_t --Tdumper_t --Telf_file_t -Tfd_mask -Tfd_set --Tfixpt_t --Tgid_t --Tin_addr_t --Tino_t --Tint16_t --Tint32_t --Tint64_t --Tint8_t --Tintmax_t --Tintptr_t --Tkey_t --Tkobj_class_t --Tkobj_t --Tlinker_file_t -Tlinker_sym_tT --Tlinker_symval_t --Tmode_t --Tmodeventhand_t --Tmodeventtype_t --Tmodspecific_t --Tmoduledata_t --Tnetisr_t --Tng_ID_t --Tnlink_t --Toff_t --Tpd_entry_t --Tpid_t --Tpmap_t --Tpoll_handler_t --Tpps_params_t --Tprfpregset_t --Tprpsinfo_t --Tprstatus_t --Tpt_entry_t --Tqaddr_t --Tquad_t --Tregister_t --Trlim_t --Tsa_family_t --Tsemid_t --Tsiginfo_t --Tsigset_t --Tsize_t --Tsocklen_t --Tspeed_t --Tssize_t --Tstack_t --Tsy_call_t --Tsysinit_cfunc_t --Ttime_t -Tu_char --Tu_daddr_t -Tu_int --Tu_int16_t --Tu_int32_t --Tu_int64_t --Tu_int8_t -Tu_long --Tu_quad_t -Tu_short --Tudev_t --Tufs1_daddr_t --Tufs2_daddr_t --Tuid_t --Tuint16_t --Tuint32_t --Tuint64_t --Tuint8_t --Tuintfptr_t --Tuintmax_t --Tuintptr_t --Tuma_slab_t --Tuma_zone_t --Tuoff_t --Tv_caddr_t --Tvaddr_t --Tvm_map_t --Tvm_object_t --Tvm_offset_t --Tvm_ooffset_t --Tvm_paddr_t --Tvm_page_t --Tvm_pindex_t --Tvm_size_t --Tvop_t --Txdrproc_t -TTAILQ_HEAD -TTAILQ_ENTRY -TLIST_HEAD @@ -127,3 +16,4 @@ -TSLIST_ENTRY -bad -bap -nbbb -nbc -br -nbs -c41 -cd41 -cdb -ce -ci4 -cli0 -d0 -di8 -ndj -ei -nfc1 -nfcb -i8 -ip8 -l79 -lc77 -ldi0 -nlp -npcs -psl -sc -nsob -nv +-ta From owner-svn-src-all@FreeBSD.ORG Fri Apr 2 16:18:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D9EA11065672; Fri, 2 Apr 2010 16:18:35 +0000 (UTC) (envelope-from fk@fabiankeil.de) Received: from smtprelay02.ispgateway.de (smtprelay02.ispgateway.de [80.67.18.44]) by mx1.freebsd.org (Postfix) with ESMTP id 98B4E8FC13; Fri, 2 Apr 2010 16:18:35 +0000 (UTC) Received: from [78.35.86.149] (helo=r500.local) by smtprelay02.ispgateway.de with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.68) (envelope-from ) id 1NxjOi-0006rt-Ox; Fri, 02 Apr 2010 18:07:04 +0200 Date: Fri, 2 Apr 2010 18:07:01 +0200 From: Fabian Keil To: Andriy Gapon Message-ID: <20100402180701.753341bb@r500.local> In-Reply-To: <201004021522.o32FMNgu095467@svn.freebsd.org> References: <201004021522.o32FMNgu095467@svn.freebsd.org> X-Mailer: Claws Mail 3.7.5 (GTK+ 2.18.7; amd64-portbld-freebsd9.0) X-PGP-KEY-URL: http://www.fabiankeil.de/gpg-keys/fk-2008-08-18.asc Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/Hf4zsLnHkKY6y+yuryWgCxY"; protocol="application/pgp-signature" X-Df-Sender: 180909 Cc: svn-src-all@freebsd.org Subject: Re: svn commit: r206098 - head/sys/fs/msdosfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2010 16:18:35 -0000 --Sig_/Hf4zsLnHkKY6y+yuryWgCxY Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Andriy Gapon wrote: > Author: avg > Date: Fri Apr 2 15:22:23 2010 > New Revision: 206098 > URL: http://svn.freebsd.org/changeset/base/206098 >=20 > Log: > mountmsdosfs: reject too high value of bytes per cluster Thanks. Fabian --Sig_/Hf4zsLnHkKY6y+yuryWgCxY Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAku2FigACgkQSMVSH78upWP8+gCfWNzcnA1FzRBmazSxbZOvuEVf gi0AmwfjTw9cg8cW2kuI1bbOy4yCBetk =Mnpf -----END PGP SIGNATURE----- --Sig_/Hf4zsLnHkKY6y+yuryWgCxY-- From owner-svn-src-all@FreeBSD.ORG Fri Apr 2 16:48:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E8CA0106564A; Fri, 2 Apr 2010 16:48:51 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D418A8FC19; Fri, 2 Apr 2010 16:48: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 o32GmpBq015125; Fri, 2 Apr 2010 16:48:51 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o32GmpJf015113; Fri, 2 Apr 2010 16:48:51 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201004021648.o32GmpJf015113@svn.freebsd.org> From: Jung-uk Kim Date: Fri, 2 Apr 2010 16:48:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206104 - in vendor-sys/acpica/dist: . common compiler debugger events executer include include/platform os_specific/service_layers parser tables tools/acpiexec utilities X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Apr 2010 16:48:52 -0000 Author: jkim Date: Fri Apr 2 16:48:51 2010 New Revision: 206104 URL: http://svn.freebsd.org/changeset/base/206104 Log: Import ACPICA 20100331. Modified: vendor-sys/acpica/dist/changes.txt vendor-sys/acpica/dist/common/dmextern.c vendor-sys/acpica/dist/compiler/aslanalyze.c vendor-sys/acpica/dist/compiler/aslcompiler.h vendor-sys/acpica/dist/compiler/aslpredef.c vendor-sys/acpica/dist/compiler/aslstubs.c vendor-sys/acpica/dist/compiler/asltypes.h vendor-sys/acpica/dist/debugger/dbdisply.c vendor-sys/acpica/dist/events/evgpe.c vendor-sys/acpica/dist/events/evgpeblk.c vendor-sys/acpica/dist/events/evxface.c vendor-sys/acpica/dist/events/evxfevnt.c vendor-sys/acpica/dist/executer/exdebug.c vendor-sys/acpica/dist/executer/exmutex.c vendor-sys/acpica/dist/executer/exoparg2.c vendor-sys/acpica/dist/executer/exregion.c vendor-sys/acpica/dist/include/acevents.h vendor-sys/acpica/dist/include/acexcep.h vendor-sys/acpica/dist/include/acglobal.h vendor-sys/acpica/dist/include/aclocal.h vendor-sys/acpica/dist/include/acpixf.h vendor-sys/acpica/dist/include/actables.h vendor-sys/acpica/dist/include/actypes.h vendor-sys/acpica/dist/include/platform/acfreebsd.h vendor-sys/acpica/dist/os_specific/service_layers/oswintbl.c vendor-sys/acpica/dist/os_specific/service_layers/oswinxf.c vendor-sys/acpica/dist/parser/psxface.c vendor-sys/acpica/dist/tables/tbutils.c vendor-sys/acpica/dist/tables/tbxface.c vendor-sys/acpica/dist/tools/acpiexec/aeexec.c vendor-sys/acpica/dist/utilities/utglobal.c Modified: vendor-sys/acpica/dist/changes.txt ============================================================================== --- vendor-sys/acpica/dist/changes.txt Fri Apr 2 16:09:55 2010 (r206103) +++ vendor-sys/acpica/dist/changes.txt Fri Apr 2 16:48:51 2010 (r206104) @@ -1,4 +1,79 @@ ---------------------------------------- +31 March 2010. Summary of changes for version 20100331: + +1) ACPI CA Core Subsystem: + +Completed a major update for the GPE support in order to improve support for +shared GPEs and to simplify both host OS and ACPICA code. Added a reference +count mechanism to support shared GPEs that require multiple device drivers. +Several external interfaces have changed. One external interface has been +removed. One new external interface was added. Most of the GPE external +interfaces now use the GPE spinlock instead of the events mutex (and the +Flags parameter for many GPE interfaces has been removed.) See the updated +ACPICA Programmer Reference for details. Matthew Garrett, Bob Moore, Rafael +Wysocki. ACPICA BZ 831. + +Changed: + AcpiEnableGpe, AcpiDisableGpe, AcpiClearGpe, AcpiGetGpeStatus +Removed: + AcpiSetGpeType +New: + AcpiSetGpe + +Implemented write support for DataTable operation regions. These regions are +defined via the DataTableRegion() operator. Previously, only read support was +implemented. The ACPI specification allows DataTableRegions to be read/write, +however. + +Implemented a new subsystem option to force a copy of the DSDT to local +memory. Optionally copy the entire DSDT to local memory (instead of simply +mapping it.) There are some (albeit very rare) BIOSs that corrupt or replace +the original DSDT, creating the need for this option. Default is FALSE, do +not copy the DSDT. + +Implemented detection of a corrupted or replaced DSDT. This change adds +support to detect a DSDT that has been corrupted and/or replaced from outside +the OS (by firmware). This is typically catastrophic for the system, but has +been seen on some machines. Once this problem has been detected, the DSDT +copy option can be enabled via system configuration. Lin Ming, Bob Moore. + +Fixed two problems with AcpiReallocateRootTable during the root table copy. +When copying the root table to the new allocation, the length used was +incorrect. The new size was used instead of the current table size, meaning +too much data was copied. Also, the count of available slots for ACPI tables +was not set correctly. Alexey Starikovskiy, Bob Moore. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and has a +much larger code and data size. + + Previous Release: + Non-Debug Version: 87.5K Code, 18.4K Data, 105.9K Total + Debug Version: 163.4K Code, 51.1K Data, 214.5K Total + Current Release: + Non-Debug Version: 87.9K Code, 18.6K Data, 106.5K Total + Debug Version: 163.5K Code, 51.3K Data, 214.8K Total + +2) iASL Compiler/Disassembler and Tools: + +iASL: Implement limited typechecking for values returned from predefined +control methods. The type of any returned static (unnamed) object is now +validated. For example, Return(1). ACPICA BZ 786. + +iASL: Fixed a predefined name object verification regression. Fixes a problem +introduced in version 20100304. An error is incorrectly generated if a +predefined name is declared as a static named object with a value defined +using the keywords "Zero", "One", or "Ones". Lin Ming. + +iASL: Added Windows 7 support for the -g option (get local ACPI tables) by +reducing the requested registry access rights. ACPICA BZ 842. + +Disassembler: fixed a possible fault when generating External() statements. +Introduced in commit ae7d6fd: Properly handle externals with parent-prefix +(carat). Fixes a string length allocation calculation. Lin Ming. + +---------------------------------------- 04 March 2010. Summary of changes for version 20100304: 1) ACPI CA Core Subsystem: Modified: vendor-sys/acpica/dist/common/dmextern.c ============================================================================== --- vendor-sys/acpica/dist/common/dmextern.c Fri Apr 2 16:09:55 2010 (r206103) +++ vendor-sys/acpica/dist/common/dmextern.c Fri Apr 2 16:48:51 2010 (r206104) @@ -270,6 +270,15 @@ AcpiDmNormalizeParentPrefix ( } Length = (ACPI_STRLEN (ParentPath) + ACPI_STRLEN (Path) + 1); + if (ParentPath[1]) + { + /* + * If ParentPath is not just a simple '\', increment the length + * for the required dot separator (ParentPath.Path) + */ + Length++; + } + Fullpath = ACPI_ALLOCATE_ZEROED (Length); if (!Fullpath) { Modified: vendor-sys/acpica/dist/compiler/aslanalyze.c ============================================================================== --- vendor-sys/acpica/dist/compiler/aslanalyze.c Fri Apr 2 16:09:55 2010 (r206103) +++ vendor-sys/acpica/dist/compiler/aslanalyze.c Fri Apr 2 16:48:51 2010 (r206104) @@ -1157,6 +1157,12 @@ AnMethodAnalysisWalkEnd ( case PARSEOP_RETURN: /* + * If the parent is a predefined method name, attempt to typecheck + * the return value. Only static types can be validated. + */ + ApCheckPredefinedReturnValue (Op, MethodInfo); + + /* * The parent block does not "exit" and continue execution -- the * method is terminated here with the Return() statement. */ Modified: vendor-sys/acpica/dist/compiler/aslcompiler.h ============================================================================== --- vendor-sys/acpica/dist/compiler/aslcompiler.h Fri Apr 2 16:09:55 2010 (r206103) +++ vendor-sys/acpica/dist/compiler/aslcompiler.h Fri Apr 2 16:48:51 2010 (r206104) @@ -461,6 +461,11 @@ ApCheckForPredefinedMethod ( ACPI_PARSE_OBJECT *Op, ASL_METHOD_INFO *MethodInfo); +void +ApCheckPredefinedReturnValue ( + ACPI_PARSE_OBJECT *Op, + ASL_METHOD_INFO *MethodInfo); + UINT32 ApCheckForPredefinedName ( ACPI_PARSE_OBJECT *Op, Modified: vendor-sys/acpica/dist/compiler/aslpredef.c ============================================================================== --- vendor-sys/acpica/dist/compiler/aslpredef.c Fri Apr 2 16:09:55 2010 (r206103) +++ vendor-sys/acpica/dist/compiler/aslpredef.c Fri Apr 2 16:48:51 2010 (r206104) @@ -296,7 +296,11 @@ ApCheckForPredefinedMethod ( if (MethodInfo->NumReturnNoValue && PredefinedNames[Index].Info.ExpectedBtypes) { - sprintf (MsgBuffer, "%4.4s", PredefinedNames[Index].Info.Name); + ApGetExpectedTypes (StringBuffer, + PredefinedNames[Index].Info.ExpectedBtypes); + + sprintf (MsgBuffer, "%s required for %4.4s", + StringBuffer, PredefinedNames[Index].Info.Name); AslError (ASL_WARNING, ASL_MSG_RESERVED_RETURN_VALUE, Op, MsgBuffer); @@ -308,6 +312,90 @@ ApCheckForPredefinedMethod ( /******************************************************************************* * + * FUNCTION: ApCheckPredefinedReturnValue + * + * PARAMETERS: Op - A parse node of type "RETURN". + * MethodInfo - Saved info about this method + * + * RETURN: None + * + * DESCRIPTION: If method is a predefined name, attempt to validate the return + * value. Only "static" types can be validated - a simple return + * of an integer/string/buffer/package or a named reference to + * a static object. Values such as a Localx or Argx or a control + * method invocation are not checked. + * + ******************************************************************************/ + +void +ApCheckPredefinedReturnValue ( + ACPI_PARSE_OBJECT *Op, + ASL_METHOD_INFO *MethodInfo) +{ + UINT32 Index; + ACPI_PARSE_OBJECT *ReturnValueOp; + + + /* Check parent method for a match against the predefined name list */ + + Index = ApCheckForPredefinedName (MethodInfo->Op, + MethodInfo->Op->Asl.NameSeg); + + switch (Index) + { + case ACPI_NOT_RESERVED_NAME: /* No underscore or _Txx or _xxx name not matched */ + case ACPI_PREDEFINED_NAME: /* Resource Name or reserved scope name */ + case ACPI_COMPILER_RESERVED_NAME: /* A _Txx that was not emitted by compiler */ + case ACPI_EVENT_RESERVED_NAME: /* _Lxx, _Exx, and _Qxx methods */ + + /* Just return, nothing to do */ + return; + + default: /* a real predefined ACPI name */ + + /* Exit if no return value expected */ + + if (!PredefinedNames[Index].Info.ExpectedBtypes) + { + return; + } + + /* Get the object returned, it is the next argument */ + + ReturnValueOp = Op->Asl.Child; + switch (ReturnValueOp->Asl.ParseOpcode) + { + case PARSEOP_ZERO: + case PARSEOP_ONE: + case PARSEOP_ONES: + case PARSEOP_INTEGER: + case PARSEOP_STRING_LITERAL: + case PARSEOP_BUFFER: + case PARSEOP_PACKAGE: + + /* Static data return object - check against expected type */ + + ApCheckObjectType (ReturnValueOp, + PredefinedNames[Index].Info.ExpectedBtypes); + break; + + default: + + /* + * All other ops are very difficult or impossible to typecheck at + * compile time. These include all Localx, Argx, and method + * invocations. Also, NAMESEG and NAMESTRING because the type of + * any named object can be changed at runtime (for example, + * CopyObject will change the type of the target object.) + */ + break; + } + } +} + + +/******************************************************************************* + * * FUNCTION: ApCheckForPredefinedObject * * PARAMETERS: Op - A parse node @@ -441,7 +529,7 @@ ApCheckForPredefinedName ( * * RETURN: None * - * DESCRIPTION: Check for the "special" predefined names - + * DESCRIPTION: Check for the "special" predefined names - * _Lxx, _Exx, _Qxx, and _T_x * ******************************************************************************/ @@ -512,7 +600,7 @@ ApCheckForSpecialName ( * * FUNCTION: ApCheckObjectType * - * PARAMETERS: Op - A parse node + * PARAMETERS: Op - Current parse node * ExpectedBtypes - Bitmap of expected return type(s) * * RETURN: None @@ -529,11 +617,13 @@ ApCheckObjectType ( UINT32 ExpectedBtypes) { UINT32 ReturnBtype; - char TypeBuffer[48]; /* Room for 5 types */ switch (Op->Asl.ParseOpcode) { + case PARSEOP_ZERO: + case PARSEOP_ONE: + case PARSEOP_ONES: case PARSEOP_INTEGER: ReturnBtype = ACPI_RTYPE_INTEGER; break; @@ -552,11 +642,11 @@ ApCheckObjectType ( default: /* Not one of the supported object types */ - + goto TypeErrorExit; } - /* Is the object one of the expected types? */ + /* Exit if the object is one of the expected types */ if (ReturnBtype & ExpectedBtypes) { @@ -568,10 +658,13 @@ TypeErrorExit: /* Format the expected types and emit an error message */ - ApGetExpectedTypes (TypeBuffer, ExpectedBtypes); + ApGetExpectedTypes (StringBuffer, ExpectedBtypes); + + sprintf (MsgBuffer, "found %s, requires %s", + UtGetOpName (Op->Asl.ParseOpcode), StringBuffer); AslError (ASL_ERROR, ASL_MSG_RESERVED_OPERAND_TYPE, Op, - TypeBuffer); + MsgBuffer); } Modified: vendor-sys/acpica/dist/compiler/aslstubs.c ============================================================================== --- vendor-sys/acpica/dist/compiler/aslstubs.c Fri Apr 2 16:09:55 2010 (r206103) +++ vendor-sys/acpica/dist/compiler/aslstubs.c Fri Apr 2 16:48:51 2010 (r206104) @@ -243,13 +243,6 @@ AcpiEvInitializeRegion ( return (AE_OK); } -ACPI_STATUS -AcpiEvCheckForWakeOnlyGpe ( - ACPI_GPE_EVENT_INFO *GpeEventInfo) -{ - return (AE_OK); -} - void AcpiExDoDebugObject ( ACPI_OPERAND_OBJECT *SourceDesc, Modified: vendor-sys/acpica/dist/compiler/asltypes.h ============================================================================== --- vendor-sys/acpica/dist/compiler/asltypes.h Fri Apr 2 16:09:55 2010 (r206103) +++ vendor-sys/acpica/dist/compiler/asltypes.h Fri Apr 2 16:48:51 2010 (r206104) @@ -507,7 +507,7 @@ char *AslMessages /* ASL_MSG_RESERVED_ARG_COUNT_HI */ "Reserved method has too many arguments", /* ASL_MSG_RESERVED_ARG_COUNT_LO */ "Reserved method has too few arguments", /* ASL_MSG_RESERVED_METHOD */ "Reserved name must be a control method", -/* ASL_MSG_RESERVED_OPERAND_TYPE */ "Invalid object type for reserved name, must be", +/* ASL_MSG_RESERVED_OPERAND_TYPE */ "Invalid object type for reserved name", /* ASL_MSG_RESERVED_RETURN_VALUE */ "Reserved method must return a value", /* ASL_MSG_RESERVED_USE */ "Invalid use of reserved name", /* ASL_MSG_RESERVED_WORD */ "Use of reserved name", Modified: vendor-sys/acpica/dist/debugger/dbdisply.c ============================================================================== --- vendor-sys/acpica/dist/debugger/dbdisply.c Fri Apr 2 16:09:55 2010 (r206103) +++ vendor-sys/acpica/dist/debugger/dbdisply.c Fri Apr 2 16:48:51 2010 (r206104) @@ -848,13 +848,12 @@ AcpiDbDisplayGpes ( Block, GpeBlock, GpeBlock->Node, Buffer); AcpiOsPrintf (" Registers: %u (%u GPEs)\n", - GpeBlock->RegisterCount, - ACPI_MUL_8 (GpeBlock->RegisterCount)); + GpeBlock->RegisterCount, GpeBlock->GpeCount); - AcpiOsPrintf (" GPE range: 0x%X to 0x%X\n", + AcpiOsPrintf (" GPE range: 0x%X to 0x%X on interrupt %u\n", GpeBlock->BlockBaseNumber, - GpeBlock->BlockBaseNumber + - (GpeBlock->RegisterCount * 8) -1); + GpeBlock->BlockBaseNumber + (GpeBlock->GpeCount - 1), + GpeXruptInfo->InterruptNumber); AcpiOsPrintf ( " RegisterInfo: %p Status %8.8X%8.8X Enable %8.8X%8.8X\n", @@ -871,9 +870,12 @@ AcpiDbDisplayGpes ( GpeRegisterInfo = &GpeBlock->RegisterInfo[i]; AcpiOsPrintf ( - " Reg %u: WakeEnable %2.2X, RunEnable %2.2X Status %8.8X%8.8X Enable %8.8X%8.8X\n", - i, GpeRegisterInfo->EnableForWake, + " Reg %u: (GPE %.2X-%.2X) RunEnable %2.2X WakeEnable %2.2X" + " Status %8.8X%8.8X Enable %8.8X%8.8X\n", + i, GpeRegisterInfo->BaseGpeNumber, + GpeRegisterInfo->BaseGpeNumber + (ACPI_GPE_REGISTER_WIDTH - 1), GpeRegisterInfo->EnableForRun, + GpeRegisterInfo->EnableForWake, ACPI_FORMAT_UINT64 (GpeRegisterInfo->StatusAddress.Address), ACPI_FORMAT_UINT64 (GpeRegisterInfo->EnableAddress.Address)); @@ -886,17 +888,19 @@ AcpiDbDisplayGpes ( if (!(GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK)) { - /* This GPE is not used (no method or handler) */ + /* This GPE is not used (no method or handler), ignore it */ continue; } AcpiOsPrintf ( - " GPE %.3X: %p Flags %2.2X: ", - GpeBlock->BlockBaseNumber + GpeIndex, - GpeEventInfo, + " GPE %.2X: %p RunRefs %2.2X WakeRefs %2.2X Flags %2.2X (", + GpeBlock->BlockBaseNumber + GpeIndex, GpeEventInfo, + GpeEventInfo->RuntimeCount, GpeEventInfo->WakeupCount, GpeEventInfo->Flags); + /* Decode the flags byte */ + if (GpeEventInfo->Flags & ACPI_GPE_LEVEL_TRIGGERED) { AcpiOsPrintf ("Level, "); @@ -906,38 +910,13 @@ AcpiDbDisplayGpes ( AcpiOsPrintf ("Edge, "); } - switch (GpeEventInfo->Flags & ACPI_GPE_TYPE_MASK) - { - case ACPI_GPE_TYPE_WAKE: - AcpiOsPrintf ("WakeOnly: "); - break; - case ACPI_GPE_TYPE_RUNTIME: - AcpiOsPrintf (" RunOnly: "); - break; - case ACPI_GPE_TYPE_WAKE_RUN: - AcpiOsPrintf (" WakeRun: "); - break; - default: - AcpiOsPrintf (" NotUsed: "); - break; - } - - if (GpeEventInfo->Flags & ACPI_GPE_WAKE_ENABLED) - { - AcpiOsPrintf ("[Wake 1 "); - } - else - { - AcpiOsPrintf ("[Wake 0 "); - } - - if (GpeEventInfo->Flags & ACPI_GPE_RUN_ENABLED) + if (GpeEventInfo->Flags & ACPI_GPE_CAN_WAKE) { - AcpiOsPrintf ("Run 1], "); + AcpiOsPrintf ("CanWake, "); } else { - AcpiOsPrintf ("Run 0], "); + AcpiOsPrintf ("RunOnly, "); } switch (GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) @@ -957,7 +936,7 @@ AcpiDbDisplayGpes ( break; } - AcpiOsPrintf ("\n"); + AcpiOsPrintf (")\n"); } } Block++; Modified: vendor-sys/acpica/dist/events/evgpe.c ============================================================================== --- vendor-sys/acpica/dist/events/evgpe.c Fri Apr 2 16:09:55 2010 (r206103) +++ vendor-sys/acpica/dist/events/evgpe.c Fri Apr 2 16:48:51 2010 (r206104) @@ -134,71 +134,20 @@ AcpiEvAsynchEnableGpe ( /******************************************************************************* * - * FUNCTION: AcpiEvSetGpeType - * - * PARAMETERS: GpeEventInfo - GPE to set - * Type - New type - * - * RETURN: Status - * - * DESCRIPTION: Sets the new type for the GPE (wake, run, or wake/run) - * - ******************************************************************************/ - -ACPI_STATUS -AcpiEvSetGpeType ( - ACPI_GPE_EVENT_INFO *GpeEventInfo, - UINT8 Type) -{ - ACPI_STATUS Status; - - - ACPI_FUNCTION_TRACE (EvSetGpeType); - - - /* Validate type and update register enable masks */ - - switch (Type) - { - case ACPI_GPE_TYPE_WAKE: - case ACPI_GPE_TYPE_RUNTIME: - case ACPI_GPE_TYPE_WAKE_RUN: - break; - - default: - return_ACPI_STATUS (AE_BAD_PARAMETER); - } - - /* Disable the GPE if currently enabled */ - - Status = AcpiEvDisableGpe (GpeEventInfo); - - /* Clear the type bits and insert the new Type */ - - GpeEventInfo->Flags &= ~ACPI_GPE_TYPE_MASK; - GpeEventInfo->Flags |= Type; - return_ACPI_STATUS (Status); -} - - -/******************************************************************************* - * * FUNCTION: AcpiEvUpdateGpeEnableMasks * * PARAMETERS: GpeEventInfo - GPE to update - * Type - What to do: ACPI_GPE_DISABLE or - * ACPI_GPE_ENABLE * * RETURN: Status * - * DESCRIPTION: Updates GPE register enable masks based on the GPE type + * DESCRIPTION: Updates GPE register enable masks based upon whether there are + * references (either wake or run) to this GPE * ******************************************************************************/ ACPI_STATUS AcpiEvUpdateGpeEnableMasks ( - ACPI_GPE_EVENT_INFO *GpeEventInfo, - UINT8 Type) + ACPI_GPE_EVENT_INFO *GpeEventInfo) { ACPI_GPE_REGISTER_INFO *GpeRegisterInfo; UINT8 RegisterBit; @@ -216,36 +165,21 @@ AcpiEvUpdateGpeEnableMasks ( RegisterBit = (UINT8) (1 << (GpeEventInfo->GpeNumber - GpeRegisterInfo->BaseGpeNumber)); - /* 1) Disable case. Simply clear all enable bits */ + /* Clear the wake/run bits up front */ - if (Type == ACPI_GPE_DISABLE) - { - ACPI_CLEAR_BIT (GpeRegisterInfo->EnableForWake, RegisterBit); - ACPI_CLEAR_BIT (GpeRegisterInfo->EnableForRun, RegisterBit); - return_ACPI_STATUS (AE_OK); - } + ACPI_CLEAR_BIT (GpeRegisterInfo->EnableForWake, RegisterBit); + ACPI_CLEAR_BIT (GpeRegisterInfo->EnableForRun, RegisterBit); - /* 2) Enable case. Set/Clear the appropriate enable bits */ + /* Set the mask bits only if there are references to this GPE */ - switch (GpeEventInfo->Flags & ACPI_GPE_TYPE_MASK) + if (GpeEventInfo->RuntimeCount) { - case ACPI_GPE_TYPE_WAKE: - ACPI_SET_BIT (GpeRegisterInfo->EnableForWake, RegisterBit); - ACPI_CLEAR_BIT (GpeRegisterInfo->EnableForRun, RegisterBit); - break; - - case ACPI_GPE_TYPE_RUNTIME: - ACPI_CLEAR_BIT (GpeRegisterInfo->EnableForWake, RegisterBit); - ACPI_SET_BIT (GpeRegisterInfo->EnableForRun, RegisterBit); - break; - - case ACPI_GPE_TYPE_WAKE_RUN: - ACPI_SET_BIT (GpeRegisterInfo->EnableForWake, RegisterBit); - ACPI_SET_BIT (GpeRegisterInfo->EnableForRun, RegisterBit); - break; + ACPI_SET_BIT (GpeRegisterInfo->EnableForRun, RegisterBit); + } - default: - return_ACPI_STATUS (AE_BAD_PARAMETER); + if (GpeEventInfo->WakeupCount) + { + ACPI_SET_BIT (GpeRegisterInfo->EnableForWake, RegisterBit); } return_ACPI_STATUS (AE_OK); @@ -257,19 +191,19 @@ AcpiEvUpdateGpeEnableMasks ( * FUNCTION: AcpiEvEnableGpe * * PARAMETERS: GpeEventInfo - GPE to enable - * WriteToHardware - Enable now, or just mark data structs - * (WAKE GPEs should be deferred) * * RETURN: Status * - * DESCRIPTION: Enable a GPE based on the GPE type + * DESCRIPTION: Hardware-enable a GPE. Always enables the GPE, regardless + * of type or number of references. + * + * Note: The GPE lock should be already acquired when this function is called. * ******************************************************************************/ ACPI_STATUS AcpiEvEnableGpe ( - ACPI_GPE_EVENT_INFO *GpeEventInfo, - BOOLEAN WriteToHardware) + ACPI_GPE_EVENT_INFO *GpeEventInfo) { ACPI_STATUS Status; @@ -277,54 +211,37 @@ AcpiEvEnableGpe ( ACPI_FUNCTION_TRACE (EvEnableGpe); - /* Make sure HW enable masks are updated */ + /* + * We will only allow a GPE to be enabled if it has either an + * associated method (_Lxx/_Exx) or a handler. Otherwise, the + * GPE will be immediately disabled by AcpiEvGpeDispatch the + * first time it fires. + */ + if (!(GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK)) + { + return_ACPI_STATUS (AE_NO_HANDLER); + } + + /* Ensure the HW enable masks are current */ - Status = AcpiEvUpdateGpeEnableMasks (GpeEventInfo, ACPI_GPE_ENABLE); + Status = AcpiEvUpdateGpeEnableMasks (GpeEventInfo); if (ACPI_FAILURE (Status)) { return_ACPI_STATUS (Status); } - /* Mark wake-enabled or HW enable, or both */ + /* Clear the GPE (of stale events) */ - switch (GpeEventInfo->Flags & ACPI_GPE_TYPE_MASK) + Status = AcpiHwClearGpe (GpeEventInfo); + if (ACPI_FAILURE (Status)) { - case ACPI_GPE_TYPE_WAKE: - - ACPI_SET_BIT (GpeEventInfo->Flags, ACPI_GPE_WAKE_ENABLED); - break; - - case ACPI_GPE_TYPE_WAKE_RUN: - - ACPI_SET_BIT (GpeEventInfo->Flags, ACPI_GPE_WAKE_ENABLED); - - /*lint -fallthrough */ - - case ACPI_GPE_TYPE_RUNTIME: - - ACPI_SET_BIT (GpeEventInfo->Flags, ACPI_GPE_RUN_ENABLED); - - if (WriteToHardware) - { - /* Clear the GPE (of stale events), then enable it */ - - Status = AcpiHwClearGpe (GpeEventInfo); - if (ACPI_FAILURE (Status)) - { - return_ACPI_STATUS (Status); - } - - /* Enable the requested runtime GPE */ - - Status = AcpiHwWriteGpeEnableReg (GpeEventInfo); - } - break; - - default: - return_ACPI_STATUS (AE_BAD_PARAMETER); + return_ACPI_STATUS (Status); } - return_ACPI_STATUS (AE_OK); + /* Enable the requested GPE */ + + Status = AcpiHwWriteGpeEnableReg (GpeEventInfo); + return_ACPI_STATUS (Status); } @@ -336,7 +253,10 @@ AcpiEvEnableGpe ( * * RETURN: Status * - * DESCRIPTION: Disable a GPE based on the GPE type + * DESCRIPTION: Hardware-disable a GPE. Always disables the requested GPE, + * regardless of the type or number of references. + * + * Note: The GPE lock should be already acquired when this function is called. * ******************************************************************************/ @@ -356,40 +276,14 @@ AcpiEvDisableGpe ( * the GPE behind our back. */ - /* Make sure HW enable masks are updated */ + /* Ensure the HW enable masks are current */ - Status = AcpiEvUpdateGpeEnableMasks (GpeEventInfo, ACPI_GPE_DISABLE); + Status = AcpiEvUpdateGpeEnableMasks (GpeEventInfo); if (ACPI_FAILURE (Status)) { return_ACPI_STATUS (Status); } - /* Clear the appropriate enabled flags for this GPE */ - - switch (GpeEventInfo->Flags & ACPI_GPE_TYPE_MASK) - { - case ACPI_GPE_TYPE_WAKE: - - ACPI_CLEAR_BIT (GpeEventInfo->Flags, ACPI_GPE_WAKE_ENABLED); - break; - - case ACPI_GPE_TYPE_WAKE_RUN: - - ACPI_CLEAR_BIT (GpeEventInfo->Flags, ACPI_GPE_WAKE_ENABLED); - - /*lint -fallthrough */ - - case ACPI_GPE_TYPE_RUNTIME: - - /* Disable the requested runtime GPE */ - - ACPI_CLEAR_BIT (GpeEventInfo->Flags, ACPI_GPE_RUN_ENABLED); - break; - - default: - break; - } - /* * Always H/W disable this GPE, even if we don't know the GPE type. * Simply clear the enable bit for this particular GPE, but do not @@ -405,6 +299,49 @@ AcpiEvDisableGpe ( /******************************************************************************* * + * FUNCTION: AcpiEvLowGetGpeInfo + * + * PARAMETERS: GpeNumber - Raw GPE number + * GpeBlock - A GPE info block + * + * RETURN: A GPE EventInfo struct. NULL if not a valid GPE (The GpeNumber + * is not within the specified GPE block) + * + * DESCRIPTION: Returns the EventInfo struct associated with this GPE. This is + * the low-level implementation of EvGetGpeEventInfo. + * + ******************************************************************************/ + +ACPI_GPE_EVENT_INFO * +AcpiEvLowGetGpeInfo ( + UINT32 GpeNumber, + ACPI_GPE_BLOCK_INFO *GpeBlock) +{ + UINT32 GpeIndex; + + + /* + * Validate that the GpeNumber is within the specified GpeBlock. + * (Two steps) + */ + if (!GpeBlock || + (GpeNumber < GpeBlock->BlockBaseNumber)) + { + return (NULL); + } + + GpeIndex = GpeNumber - GpeBlock->BlockBaseNumber; + if (GpeIndex >= GpeBlock->GpeCount) + { + return (NULL); + } + + return (&GpeBlock->EventInfo[GpeIndex]); +} + + +/******************************************************************************* + * * FUNCTION: AcpiEvGetGpeEventInfo * * PARAMETERS: GpeDevice - Device node. NULL for GPE0/GPE1 @@ -426,7 +363,7 @@ AcpiEvGetGpeEventInfo ( UINT32 GpeNumber) { ACPI_OPERAND_OBJECT *ObjDesc; - ACPI_GPE_BLOCK_INFO *GpeBlock; + ACPI_GPE_EVENT_INFO *GpeInfo; UINT32 i; @@ -441,16 +378,11 @@ AcpiEvGetGpeEventInfo ( for (i = 0; i < ACPI_MAX_GPE_BLOCKS; i++) { - GpeBlock = AcpiGbl_GpeFadtBlocks[i]; - if (GpeBlock) + GpeInfo = AcpiEvLowGetGpeInfo (GpeNumber, + AcpiGbl_GpeFadtBlocks[i]); + if (GpeInfo) { - if ((GpeNumber >= GpeBlock->BlockBaseNumber) && - (GpeNumber < GpeBlock->BlockBaseNumber + - (GpeBlock->RegisterCount * 8))) - { - return (&GpeBlock->EventInfo[GpeNumber - - GpeBlock->BlockBaseNumber]); - } + return (GpeInfo); } } @@ -468,15 +400,7 @@ AcpiEvGetGpeEventInfo ( return (NULL); } - GpeBlock = ObjDesc->Device.GpeBlock; - - if ((GpeNumber >= GpeBlock->BlockBaseNumber) && - (GpeNumber < GpeBlock->BlockBaseNumber + (GpeBlock->RegisterCount * 8))) - { - return (&GpeBlock->EventInfo[GpeNumber - GpeBlock->BlockBaseNumber]); - } - - return (NULL); + return (AcpiEvLowGetGpeInfo (GpeNumber, ObjDesc->Device.GpeBlock)); } @@ -654,9 +578,9 @@ AcpiEvAsynchExecuteGpeMethod ( return_VOID; } - /* Set the GPE flags for return to enabled state */ + /* Update the GPE register masks for return to enabled state */ - (void) AcpiEvEnableGpe (GpeEventInfo, FALSE); + (void) AcpiEvUpdateGpeEnableMasks (GpeEventInfo); /* * Take a snapshot of the GPE info for this level - we copy the info to @@ -872,15 +796,18 @@ AcpiEvGpeDispatch ( default: - /* No handler or method to run! */ - + /* + * No handler or method to run! + * 03/2010: This case should no longer be possible. We will not allow + * a GPE to be enabled if it has no handler or method. + */ ACPI_ERROR ((AE_INFO, "No handler or method for GPE[0x%2X], disabling event", GpeNumber)); /* - * Disable the GPE. The GPE will remain disabled until the ACPICA - * Core Subsystem is restarted, or a handler is installed. + * Disable the GPE. The GPE will remain disabled a handler + * is installed or ACPICA is restarted. */ Status = AcpiEvDisableGpe (GpeEventInfo); if (ACPI_FAILURE (Status)) Modified: vendor-sys/acpica/dist/events/evgpeblk.c ============================================================================== --- vendor-sys/acpica/dist/events/evgpeblk.c Fri Apr 2 16:09:55 2010 (r206103) +++ vendor-sys/acpica/dist/events/evgpeblk.c Fri Apr 2 16:48:51 2010 (r206104) @@ -124,7 +124,7 @@ /* Local prototypes */ static ACPI_STATUS -AcpiEvSaveMethodInfo ( +AcpiEvMatchGpeMethod ( ACPI_HANDLE ObjHandle, UINT32 Level, void *ObjDesc, @@ -194,8 +194,7 @@ AcpiEvValidGpeEvent ( while (GpeBlock) { if ((&GpeBlock->EventInfo[0] <= GpeEventInfo) && - (&GpeBlock->EventInfo[((ACPI_SIZE) - GpeBlock->RegisterCount) * 8] > GpeEventInfo)) + (&GpeBlock->EventInfo[GpeBlock->GpeCount] > GpeEventInfo)) { return (TRUE); } @@ -328,7 +327,7 @@ AcpiEvDeleteGpeHandlers ( /******************************************************************************* * - * FUNCTION: AcpiEvSaveMethodInfo + * FUNCTION: AcpiEvMatchGpeMethod * * PARAMETERS: Callback from WalkNamespace * @@ -340,8 +339,7 @@ AcpiEvDeleteGpeHandlers ( * information for quick lookup during GPE dispatch * * The name of each GPE control method is of the form: - * "_Lxx" or "_Exx" - * Where: + * "_Lxx" or "_Exx", where: * L - means that the GPE is level triggered * E - means that the GPE is edge triggered * xx - is the GPE number [in HEX] @@ -349,38 +347,44 @@ AcpiEvDeleteGpeHandlers ( ******************************************************************************/ static ACPI_STATUS -AcpiEvSaveMethodInfo ( +AcpiEvMatchGpeMethod ( ACPI_HANDLE ObjHandle, UINT32 Level, void *ObjDesc, void **ReturnValue) { + ACPI_NAMESPACE_NODE *MethodNode = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, ObjHandle); ACPI_GPE_BLOCK_INFO *GpeBlock = (void *) ObjDesc; ACPI_GPE_EVENT_INFO *GpeEventInfo; UINT32 GpeNumber; char Name[ACPI_NAME_SIZE + 1]; UINT8 Type; - ACPI_STATUS Status; - ACPI_FUNCTION_TRACE (EvSaveMethodInfo); + ACPI_FUNCTION_TRACE (EvMatchGpeMethod); /* - * _Lxx and _Exx GPE method support + * Match and decode the _Lxx and _Exx GPE method names * - * 1) Extract the name from the object and convert to a string + * 1) Extract the method name and null terminate it */ - ACPI_MOVE_32_TO_32 ( - Name, &((ACPI_NAMESPACE_NODE *) ObjHandle)->Name.Integer); + ACPI_MOVE_32_TO_32 (Name, &MethodNode->Name.Integer); Name[ACPI_NAME_SIZE] = 0; + /* 2) Name must begin with an underscore */ + + if (Name[0] != '_') + { + return_ACPI_STATUS (AE_OK); /* Ignore this method */ + } + /* - * 2) Edge/Level determination is based on the 2nd character + * 3) Edge/Level determination is based on the 2nd character * of the method name * - * NOTE: Default GPE type is RUNTIME. May be changed later to WAKE - * if a _PRW object is found that points to this GPE. + * NOTE: Default GPE type is RUNTIME only. Later, if a _PRW object is + * found that points to this GPE, the ACPI_GPE_CAN_WAKE flag is set. */ switch (Name[1]) { @@ -393,16 +397,15 @@ AcpiEvSaveMethodInfo ( break; default: - /* Unknown method type, just ignore it! */ + /* Unknown method type, just ignore it */ ACPI_DEBUG_PRINT ((ACPI_DB_LOAD, "Ignoring unknown GPE method type: %s " - "(name not of form _Lxx or _Exx)", - Name)); + "(name not of form _Lxx or _Exx)", Name)); return_ACPI_STATUS (AE_OK); } - /* Convert the last two characters of the name to the GPE Number */ + /* 4) The last two characters of the name are the hex GPE Number */ GpeNumber = ACPI_STRTOUL (&Name[2], NULL, 16); if (GpeNumber == ACPI_UINT32_MAX) @@ -411,45 +414,34 @@ AcpiEvSaveMethodInfo ( ACPI_DEBUG_PRINT ((ACPI_DB_LOAD, "Could not extract GPE number from name: %s " - "(name is not of form _Lxx or _Exx)", - Name)); + "(name is not of form _Lxx or _Exx)", Name)); return_ACPI_STATUS (AE_OK); } /* Ensure that we have a valid GPE number for this GPE block */ - if ((GpeNumber < GpeBlock->BlockBaseNumber) || - (GpeNumber >= (GpeBlock->BlockBaseNumber + - (GpeBlock->RegisterCount * 8)))) + GpeEventInfo = AcpiEvLowGetGpeInfo (GpeNumber, GpeBlock); + if (!GpeEventInfo) { /* - * Not valid for this GPE block, just ignore it. However, it may be - * valid for a different GPE block, since GPE0 and GPE1 methods both - * appear under \_GPE. + * This GpeNumber is not valid for this GPE block, just ignore it. + * However, it may be valid for a different GPE block, since GPE0 + * and GPE1 methods both appear under \_GPE. */ return_ACPI_STATUS (AE_OK); } /* - * Now we can add this information to the GpeEventInfo block for use - * during dispatch of this GPE. Default type is RUNTIME, although this may - * change when the _PRW methods are executed later. + * Add the GPE information from above to the GpeEventInfo block for + * use during dispatch of this GPE. */ - GpeEventInfo = &GpeBlock->EventInfo[GpeNumber - GpeBlock->BlockBaseNumber]; - *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Apr 2 16:50:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BDC8E106566C; Fri, 2 Apr 2010 16:50:24 +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 92BC88FC16; Fri, 2 Apr 2010 16:50: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 o32GoOQq015517; Fri, 2 Apr 2010 16:50:24 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o32GoO2f015516; Fri, 2 Apr 2010 16:50:24 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201004021650.o32GoO2f015516@svn.freebsd.org> From: Jung-uk Kim Date: Fri, 2 Apr 2010 16:50:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206105 - vendor-sys/acpica/20100331 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Apr 2010 16:50:24 -0000 Author: jkim Date: Fri Apr 2 16:50:24 2010 New Revision: 206105 URL: http://svn.freebsd.org/changeset/base/206105 Log: Tag ACPICA 20100331. Added: vendor-sys/acpica/20100331/ - copied from r206104, vendor-sys/acpica/dist/ From owner-svn-src-all@FreeBSD.ORG Fri Apr 2 16:57:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 83D9D106566C; Fri, 2 Apr 2010 16:57:25 +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 72D9E8FC18; Fri, 2 Apr 2010 16:57: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 o32GvPZ8017104; Fri, 2 Apr 2010 16:57:25 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o32GvPp4017102; Fri, 2 Apr 2010 16:57:25 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201004021657.o32GvPp4017102@svn.freebsd.org> From: Jung-uk Kim Date: Fri, 2 Apr 2010 16:57:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206106 - vendor-sys/acpica/dist/include/platform X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Apr 2010 16:57:25 -0000 Author: jkim Date: Fri Apr 2 16:57:25 2010 New Revision: 206106 URL: http://svn.freebsd.org/changeset/base/206106 Log: Integrate FreeBSD changes for acfreebsd.h. http://git.moblin.org/cgit.cgi/acpica/commit/?id=4580a813dd812d85c9a0ec1b77f7855c9940c60c Obtained from: Intel Modified: vendor-sys/acpica/dist/include/platform/acfreebsd.h Modified: vendor-sys/acpica/dist/include/platform/acfreebsd.h ============================================================================== --- vendor-sys/acpica/dist/include/platform/acfreebsd.h Fri Apr 2 16:50:24 2010 (r206105) +++ vendor-sys/acpica/dist/include/platform/acfreebsd.h Fri Apr 2 16:57:25 2010 (r206106) @@ -124,9 +124,10 @@ #include #define ACPI_UINTPTR_T uintptr_t + +#define ACPI_USE_DO_WHILE_0 #define ACPI_USE_LOCAL_CACHE #define ACPI_USE_SYSTEM_CLIBRARY -#define __cdecl #ifdef _KERNEL @@ -139,6 +140,7 @@ #include "opt_acpi.h" #define ACPI_THREAD_ID lwpid_t +#define ACPI_MUTEX_TYPE ACPI_OSL_MUTEX #ifdef ACPI_DEBUG #define ACPI_DEBUG_OUTPUT /* for backward compatibility */ @@ -166,11 +168,10 @@ #define ACPI_THREAD_ID pthread_t -/* Not building kernel code, so use libc */ #define ACPI_USE_STANDARD_HEADERS + #define ACPI_FLUSH_CPU_CACHE() -#define __cli() -#define __sti() +#define __cdecl #endif /* _KERNEL */ From owner-svn-src-all@FreeBSD.ORG Fri Apr 2 17:00:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ADBAA1065676; Fri, 2 Apr 2010 17:00:37 +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 83A9B8FC1B; Fri, 2 Apr 2010 17:00: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 o32H0bNW017861; Fri, 2 Apr 2010 17:00:37 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o32H0bp2017859; Fri, 2 Apr 2010 17:00:37 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201004021700.o32H0bp2017859@svn.freebsd.org> From: Jung-uk Kim Date: Fri, 2 Apr 2010 17:00:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206107 - vendor-sys/acpica/dist/tables X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Apr 2010 17:00:37 -0000 Author: jkim Date: Fri Apr 2 17:00:37 2010 New Revision: 206107 URL: http://svn.freebsd.org/changeset/base/206107 Log: Fixes for table load regression. http://git.moblin.org/cgit.cgi/acpica/commit/?id=e4c530f4e71d70804ed911d41d922dce4cea8b23 http://git.moblin.org/cgit.cgi/acpica/commit/?id=67a1ef8c98791bd4a0fb84fe0c2feff7082151dc Obtained from: Intel Modified: vendor-sys/acpica/dist/tables/tbxface.c Modified: vendor-sys/acpica/dist/tables/tbxface.c ============================================================================== --- vendor-sys/acpica/dist/tables/tbxface.c Fri Apr 2 16:57:25 2010 (r206106) +++ vendor-sys/acpica/dist/tables/tbxface.c Fri Apr 2 17:00:37 2010 (r206107) @@ -552,18 +552,13 @@ AcpiTbLoadNamespace ( (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES); /* - * Save the DSDT pointer for simple access. This is the mapped memory - * address. We must take care here because the address of the .Tables - * array can change dynamically as tables are loaded at run-time - */ - AcpiGbl_DSDT = AcpiGbl_RootTableList.Tables[ACPI_TABLE_INDEX_DSDT].Pointer; - - /* * Load the namespace. The DSDT is required, but any SSDT and * PSDT tables are optional. Verify the DSDT. */ if (!AcpiGbl_RootTableList.Count || - !ACPI_COMPARE_NAME (AcpiGbl_DSDT->Signature, ACPI_SIG_DSDT) || + !ACPI_COMPARE_NAME ( + &(AcpiGbl_RootTableList.Tables[ACPI_TABLE_INDEX_DSDT].Signature), + ACPI_SIG_DSDT) || ACPI_FAILURE (AcpiTbVerifyTable ( &AcpiGbl_RootTableList.Tables[ACPI_TABLE_INDEX_DSDT]))) { @@ -572,6 +567,14 @@ AcpiTbLoadNamespace ( } /* + * Save the DSDT pointer for simple access. This is the mapped memory + * address. We must take care here because the address of the .Tables + * array can change dynamically as tables are loaded at run-time. Note: + * .Pointer field is not validated until after call to AcpiTbVerifyTable. + */ + AcpiGbl_DSDT = AcpiGbl_RootTableList.Tables[ACPI_TABLE_INDEX_DSDT].Pointer; + + /* * Optionally copy the entire DSDT to local memory (instead of simply * mapping it.) There are some BIOSs that corrupt or replace the original * DSDT, creating the need for this option. Default is FALSE, do not copy From owner-svn-src-all@FreeBSD.ORG Fri Apr 2 17:48:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 12F89106564A; Fri, 2 Apr 2010 17:48:02 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DB6FE8FC1A; Fri, 2 Apr 2010 17:48: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 o32Hm1Zc028316; Fri, 2 Apr 2010 17:48:01 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o32Hm1H7028314; Fri, 2 Apr 2010 17:48:01 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201004021748.o32Hm1H7028314@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Fri, 2 Apr 2010 17:48: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: r206108 - stable/8/sys/netipsec X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Apr 2010 17:48:02 -0000 Author: bz Date: Fri Apr 2 17:48:01 2010 New Revision: 206108 URL: http://svn.freebsd.org/changeset/base/206108 Log: MFC r205789: When tearing down IPsec as part of a (virtual) network stack, do not try to free the same list twice but free both the acquiring list and the security policy acquiring list. Reviewed by: anchie Modified: stable/8/sys/netipsec/key.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/netipsec/key.c ============================================================================== --- stable/8/sys/netipsec/key.c Fri Apr 2 17:00:37 2010 (r206107) +++ stable/8/sys/netipsec/key.c Fri Apr 2 17:48:01 2010 (r206108) @@ -7787,7 +7787,8 @@ void key_destroy(void) { struct secpolicy *sp, *nextsp; - struct secspacq *acq, *nextacq; + struct secacq *acq, *nextacq; + struct secspacq *spacq, *nextspacq; struct secashead *sah, *nextsah; struct secreg *reg; int i; @@ -7828,7 +7829,7 @@ key_destroy(void) REGTREE_UNLOCK(); ACQ_LOCK(); - for (acq = LIST_FIRST(&V_spacqtree); acq != NULL; acq = nextacq) { + for (acq = LIST_FIRST(&V_acqtree); acq != NULL; acq = nextacq) { nextacq = LIST_NEXT(acq, chain); if (__LIST_CHAINED(acq)) { LIST_REMOVE(acq, chain); @@ -7838,11 +7839,12 @@ key_destroy(void) ACQ_UNLOCK(); SPACQ_LOCK(); - for (acq = LIST_FIRST(&V_spacqtree); acq != NULL; acq = nextacq) { - nextacq = LIST_NEXT(acq, chain); - if (__LIST_CHAINED(acq)) { - LIST_REMOVE(acq, chain); - free(acq, M_IPSEC_SAQ); + for (spacq = LIST_FIRST(&V_spacqtree); spacq != NULL; + spacq = nextspacq) { + nextspacq = LIST_NEXT(spacq, chain); + if (__LIST_CHAINED(spacq)) { + LIST_REMOVE(spacq, chain); + free(spacq, M_IPSEC_SAQ); } } SPACQ_UNLOCK(); From owner-svn-src-all@FreeBSD.ORG Fri Apr 2 17:50:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 369061065702; Fri, 2 Apr 2010 17:50:53 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1BAD38FC15; Fri, 2 Apr 2010 17:50: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 o32HorEP028995; Fri, 2 Apr 2010 17:50:53 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o32Hoq43028991; Fri, 2 Apr 2010 17:50:52 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201004021750.o32Hoq43028991@svn.freebsd.org> From: Navdeep Parhar Date: Fri, 2 Apr 2010 17:50: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: r206109 - head/sys/dev/cxgb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2010 17:50:53 -0000 Author: np Date: Fri Apr 2 17:50:52 2010 New Revision: 206109 URL: http://svn.freebsd.org/changeset/base/206109 Log: Increase response queue size to avoid starvation, add a counter to track it when it does occur. Modified: head/sys/dev/cxgb/cxgb_adapter.h head/sys/dev/cxgb/cxgb_main.c head/sys/dev/cxgb/cxgb_sge.c Modified: head/sys/dev/cxgb/cxgb_adapter.h ============================================================================== --- head/sys/dev/cxgb/cxgb_adapter.h Fri Apr 2 17:48:01 2010 (r206108) +++ head/sys/dev/cxgb/cxgb_adapter.h Fri Apr 2 17:50:52 2010 (r206109) @@ -139,7 +139,7 @@ enum { #define FL_Q_SIZE 4096 #define JUMBO_Q_SIZE 1024 -#define RSPQ_Q_SIZE 1024 +#define RSPQ_Q_SIZE 2048 #define TX_ETH_Q_SIZE 1024 #define TX_OFLD_Q_SIZE 1024 #define TX_CTRL_Q_SIZE 256 @@ -179,6 +179,7 @@ struct sge_rspq { uint32_t offload_bundles; uint32_t pure_rsps; uint32_t unhandled_irqs; + uint32_t starved; bus_addr_t phys_addr; bus_dma_tag_t desc_tag; Modified: head/sys/dev/cxgb/cxgb_main.c ============================================================================== --- head/sys/dev/cxgb/cxgb_main.c Fri Apr 2 17:48:01 2010 (r206108) +++ head/sys/dev/cxgb/cxgb_main.c Fri Apr 2 17:50:52 2010 (r206109) @@ -2398,25 +2398,33 @@ cxgb_tick_handler(void *arg, int count) if (p->rev == T3_REV_B2 && p->nports < 4 && sc->open_device_map) check_t3b2_mac(sc); - cause = t3_read_reg(sc, A_SG_INT_CAUSE); - reset = 0; - if (cause & F_FLEMPTY) { + cause = t3_read_reg(sc, A_SG_INT_CAUSE) & (F_RSPQSTARVE | F_FLEMPTY); + if (cause) { struct sge_qset *qs = &sc->sge.qs[0]; + uint32_t mask, v; - i = 0; - reset |= F_FLEMPTY; + v = t3_read_reg(sc, A_SG_RSPQ_FL_STATUS) & ~0xff00; - cause = (t3_read_reg(sc, A_SG_RSPQ_FL_STATUS) >> - S_FL0EMPTY) & 0xffff; - while (cause) { - qs->fl[i].empty += (cause & 1); - if (i) - qs++; - i ^= 1; - cause >>= 1; + mask = 1; + for (i = 0; i < SGE_QSETS; i++) { + if (v & mask) + qs[i].rspq.starved++; + mask <<= 1; } + + mask <<= SGE_QSETS; /* skip RSPQXDISABLED */ + + for (i = 0; i < SGE_QSETS * 2; i++) { + if (v & mask) { + qs[i / 2].fl[i % 2].empty++; + } + mask <<= 1; + } + + /* clear */ + t3_write_reg(sc, A_SG_RSPQ_FL_STATUS, v); + t3_write_reg(sc, A_SG_INT_CAUSE, cause); } - t3_write_reg(sc, A_SG_INT_CAUSE, reset); for (i = 0; i < sc->params.nports; i++) { struct port_info *pi = &sc->port[i]; Modified: head/sys/dev/cxgb/cxgb_sge.c ============================================================================== --- head/sys/dev/cxgb/cxgb_sge.c Fri Apr 2 17:48:01 2010 (r206108) +++ head/sys/dev/cxgb/cxgb_sge.c Fri Apr 2 17:50:52 2010 (r206109) @@ -3586,6 +3586,9 @@ t3_add_configured_sysctls(adapter_t *sc) SYSCTL_ADD_UINT(ctx, rspqpoidlist, OID_AUTO, "credits", CTLFLAG_RD, &qs->rspq.credits, 0, "#credits"); + SYSCTL_ADD_UINT(ctx, rspqpoidlist, OID_AUTO, "starved", + CTLFLAG_RD, &qs->rspq.starved, + 0, "#times starved"); SYSCTL_ADD_XLONG(ctx, rspqpoidlist, OID_AUTO, "phys_addr", CTLFLAG_RD, &qs->rspq.phys_addr, "physical_address_of the queue"); From owner-svn-src-all@FreeBSD.ORG Fri Apr 2 17:52:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B04E106566B; Fri, 2 Apr 2010 17:52:51 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 09D638FC13; Fri, 2 Apr 2010 17:52: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 o32Hqo8S029460; Fri, 2 Apr 2010 17:52:50 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o32HqoX1029458; Fri, 2 Apr 2010 17:52:50 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201004021752.o32HqoX1029458@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Fri, 2 Apr 2010 17:52:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206110 - stable/8/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, 02 Apr 2010 17:52:51 -0000 Author: bz Date: Fri Apr 2 17:52:50 2010 New Revision: 206110 URL: http://svn.freebsd.org/changeset/base/206110 Log: MFC r205637: We are holding a write lock here so avoid aquiring it twice calling the "locked" version rather than the wrapper function. Modified: stable/8/sys/netinet6/nd6.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/netinet6/nd6.c ============================================================================== --- stable/8/sys/netinet6/nd6.c Fri Apr 2 17:50:52 2010 (r206109) +++ stable/8/sys/netinet6/nd6.c Fri Apr 2 17:52:50 2010 (r206110) @@ -1167,7 +1167,7 @@ nd6_nud_hint(struct rtentry *rt, struct ln->ln_state = ND6_LLINFO_REACHABLE; if (!ND6_LLINFO_PERMANENT(ln)) { - nd6_llinfo_settimer(ln, + nd6_llinfo_settimer_locked(ln, (long)ND_IFINFO(rt->rt_ifp)->reachable * hz); } done: From owner-svn-src-all@FreeBSD.ORG Fri Apr 2 18:15:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16661106566C; Fri, 2 Apr 2010 18:15:24 +0000 (UTC) (envelope-from eri@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 00D018FC08; Fri, 2 Apr 2010 18:15: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 o32IFNZ2035019; Fri, 2 Apr 2010 18:15:23 GMT (envelope-from eri@svn.freebsd.org) Received: (from eri@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o32IFNkN035017; Fri, 2 Apr 2010 18:15:23 GMT (envelope-from eri@svn.freebsd.org) Message-Id: <201004021815.o32IFNkN035017@svn.freebsd.org> From: Ermal Luçi Date: Fri, 2 Apr 2010 18:15: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: r206111 - head/sys/netipsec X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Apr 2010 18:15:24 -0000 Author: eri Date: Fri Apr 2 18:15:23 2010 New Revision: 206111 URL: http://svn.freebsd.org/changeset/base/206111 Log: Fix a logic error in ipsec code that extracts information from the packets. Reviewed by: bz, mlaier Approved by: mlaier(mentor) MFC after: 1 month Modified: head/sys/netipsec/ipsec.c Modified: head/sys/netipsec/ipsec.c ============================================================================== --- head/sys/netipsec/ipsec.c Fri Apr 2 17:52:50 2010 (r206110) +++ head/sys/netipsec/ipsec.c Fri Apr 2 18:15:23 2010 (r206111) @@ -592,7 +592,7 @@ ipsec4_get_ulp(struct mbuf *m, struct se IPSEC_ASSERT(m->m_pkthdr.len >= sizeof(struct ip),("packet too short")); /* NB: ip_input() flips it into host endian. XXX Need more checking. */ - if (m->m_len < sizeof (struct ip)) { + if (m->m_len >= sizeof (struct ip)) { struct ip *ip = mtod(m, struct ip *); if (ip->ip_off & (IP_MF | IP_OFFMASK)) goto done; From owner-svn-src-all@FreeBSD.ORG Fri Apr 2 20:08:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 52180106566B; Fri, 2 Apr 2010 20:08:45 +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 414B18FC1D; Fri, 2 Apr 2010 20:08: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 o32K8jnu064013; Fri, 2 Apr 2010 20:08:45 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o32K8jrU064011; Fri, 2 Apr 2010 20:08:45 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201004022008.o32K8jrU064011@svn.freebsd.org> From: Matt Jacob Date: Fri, 2 Apr 2010 20:08: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: r206112 - 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: Fri, 02 Apr 2010 20:08:45 -0000 Author: mjacob Date: Fri Apr 2 20:08:44 2010 New Revision: 206112 URL: http://svn.freebsd.org/changeset/base/206112 Log: Nullify our periph pointer in dacleanup to try and catch race conditions in callbacks/downcalls. Modified: head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Fri Apr 2 18:15:23 2010 (r206111) +++ head/sys/cam/scsi/scsi_da.c Fri Apr 2 20:08:44 2010 (r206112) @@ -997,6 +997,11 @@ dacleanup(struct cam_periph *periph) xpt_print(periph->path, "can't remove sysctl context\n"); } + /* + * Nullify our periph pointer here to try and catch + * race conditions in callbacks/downcalls. + */ + softc->disk->d_drv1 = NULL; disk_destroy(softc->disk); callout_drain(&softc->sendordered_c); free(softc, M_DEVBUF); From owner-svn-src-all@FreeBSD.ORG Fri Apr 2 21:05:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 20A4F106566B; Fri, 2 Apr 2010 21:05:29 +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 0F0948FC15; Fri, 2 Apr 2010 21:05: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 o32L5S1B076525; Fri, 2 Apr 2010 21:05:28 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o32L5S5A076523; Fri, 2 Apr 2010 21:05:28 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201004022105.o32L5S5A076523@svn.freebsd.org> From: Jung-uk Kim Date: Fri, 2 Apr 2010 21:05:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206113 - vendor-sys/acpica/dist/tables X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Apr 2010 21:05:29 -0000 Author: jkim Date: Fri Apr 2 21:05:28 2010 New Revision: 206113 URL: http://svn.freebsd.org/changeset/base/206113 Log: Additional fix for root table size regression. Set the size of the new root table correctly. Not the current size, but the number of current tables + the default increment. http://git.moblin.org/cgit.cgi/acpica/commit/?id=752d13e80656436cd58e9710225a80c9deb3b053 Obtained from: Intel Modified: vendor-sys/acpica/dist/tables/tbxface.c Modified: vendor-sys/acpica/dist/tables/tbxface.c ============================================================================== --- vendor-sys/acpica/dist/tables/tbxface.c Fri Apr 2 20:08:44 2010 (r206112) +++ vendor-sys/acpica/dist/tables/tbxface.c Fri Apr 2 21:05:28 2010 (r206113) @@ -300,10 +300,14 @@ AcpiReallocateRootTable ( ACPI_MEMCPY (Tables, AcpiGbl_RootTableList.Tables, CurrentSize); - /* Update the root table descriptor */ - + /* + * Update the root table descriptor. The new size will be the current + * number of tables plus the increment, independent of the reserved + * size of the original table list. + */ AcpiGbl_RootTableList.Tables = Tables; - AcpiGbl_RootTableList.Size += ACPI_ROOT_TABLE_SIZE_INCREMENT; + AcpiGbl_RootTableList.Size = + AcpiGbl_RootTableList.Count + ACPI_ROOT_TABLE_SIZE_INCREMENT; AcpiGbl_RootTableList.Flags = ACPI_ROOT_ORIGIN_ALLOCATED | ACPI_ROOT_ALLOW_RESIZE; From owner-svn-src-all@FreeBSD.ORG Fri Apr 2 21:48:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8AF5106566B; Fri, 2 Apr 2010 21:48:27 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9D5368FC0C; Fri, 2 Apr 2010 21:48: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 o32LmRAe086122; Fri, 2 Apr 2010 21:48:27 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o32LmRD5086119; Fri, 2 Apr 2010 21:48:27 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201004022148.o32LmRD5086119@svn.freebsd.org> From: Marius Strobl Date: Fri, 2 Apr 2010 21:48:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206116 - in head/sys: dev/ofw powerpc/ofw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Apr 2010 21:48:27 -0000 Author: marius Date: Fri Apr 2 21:48:27 2010 New Revision: 206116 URL: http://svn.freebsd.org/changeset/base/206116 Log: With r205496 in place we should ensure that nargs and nreturns are always set to sane values as they no longer default to 0, otherwise some OFW implementation might copy in or out arguments not based on what the actual function takes but what ever stack garbage nargs and nreturns supply. Reviewed by: nwhitehorn Modified: head/sys/dev/ofw/ofw_standard.c head/sys/powerpc/ofw/ofw_real.c Modified: head/sys/dev/ofw/ofw_standard.c ============================================================================== --- head/sys/dev/ofw/ofw_standard.c Fri Apr 2 21:35:10 2010 (r206115) +++ head/sys/dev/ofw/ofw_standard.c Fri Apr 2 21:48:27 2010 (r206116) @@ -589,6 +589,7 @@ ofw_std_close(ofw_t ofw, ihandle_t insta } args = { (cell_t)"close", 1, + 0, }; args.instance = instance; @@ -717,6 +718,7 @@ ofw_std_release(ofw_t ofw, void *virt, s } args = { (cell_t)"release", 2, + 0, }; args.virt = (cell_t)virt; @@ -738,6 +740,8 @@ ofw_std_enter(ofw_t ofw) cell_t nreturns; } args = { (cell_t)"enter", + 0, + 0, }; openfirmware(&args); @@ -754,6 +758,8 @@ ofw_std_exit(ofw_t ofw) cell_t nreturns; } args = { (cell_t)"exit", + 0, + 0, }; openfirmware(&args); Modified: head/sys/powerpc/ofw/ofw_real.c ============================================================================== --- head/sys/powerpc/ofw/ofw_real.c Fri Apr 2 21:35:10 2010 (r206115) +++ head/sys/powerpc/ofw/ofw_real.c Fri Apr 2 21:48:27 2010 (r206116) @@ -737,6 +737,7 @@ ofw_real_close(ofw_t ofw, ihandle_t inst } args = { (cell_t)"close", 1, + 0, }; args.instance = instance; @@ -876,6 +877,7 @@ ofw_real_release(ofw_t ofw, void *virt, } args = { (cell_t)"release", 2, + 0, }; args.virt = (cell_t)virt; @@ -897,6 +899,8 @@ ofw_real_enter(ofw_t ofw) cell_t nreturns; } args = { (cell_t)"enter", + 0, + 0, }; openfirmware(&args); @@ -913,6 +917,8 @@ ofw_real_exit(ofw_t ofw) cell_t nreturns; } args = { (cell_t)"exit", + 0, + 0, }; openfirmware(&args); From owner-svn-src-all@FreeBSD.ORG Fri Apr 2 23:04:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 93056106566C; Fri, 2 Apr 2010 23:04:32 +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 7E4248FC12; Fri, 2 Apr 2010 23:04: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 o32N4Wwu002954; Fri, 2 Apr 2010 23:04:32 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o32N4WiA002944; Fri, 2 Apr 2010 23:04:32 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201004022304.o32N4WiA002944@svn.freebsd.org> From: Jung-uk Kim Date: Fri, 2 Apr 2010 23:04: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: r206117 - in head/sys: contrib/dev/acpica contrib/dev/acpica/common contrib/dev/acpica/compiler contrib/dev/acpica/debugger contrib/dev/acpica/events contrib/dev/acpica/executer contrib... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Apr 2010 23:04:32 -0000 Author: jkim Date: Fri Apr 2 23:04:31 2010 New Revision: 206117 URL: http://svn.freebsd.org/changeset/base/206117 Log: Merge ACPICA 20100331 (and four additional upstream patches). Modified: head/sys/contrib/dev/acpica/changes.txt head/sys/contrib/dev/acpica/common/dmextern.c head/sys/contrib/dev/acpica/compiler/aslanalyze.c head/sys/contrib/dev/acpica/compiler/aslcompiler.h head/sys/contrib/dev/acpica/compiler/aslpredef.c head/sys/contrib/dev/acpica/compiler/aslstubs.c head/sys/contrib/dev/acpica/compiler/asltypes.h head/sys/contrib/dev/acpica/debugger/dbdisply.c head/sys/contrib/dev/acpica/events/evgpe.c head/sys/contrib/dev/acpica/events/evgpeblk.c head/sys/contrib/dev/acpica/events/evxface.c head/sys/contrib/dev/acpica/events/evxfevnt.c head/sys/contrib/dev/acpica/executer/exdebug.c head/sys/contrib/dev/acpica/executer/exmutex.c head/sys/contrib/dev/acpica/executer/exoparg2.c head/sys/contrib/dev/acpica/executer/exregion.c head/sys/contrib/dev/acpica/include/acevents.h head/sys/contrib/dev/acpica/include/acexcep.h head/sys/contrib/dev/acpica/include/acglobal.h head/sys/contrib/dev/acpica/include/aclocal.h head/sys/contrib/dev/acpica/include/acpixf.h head/sys/contrib/dev/acpica/include/actables.h head/sys/contrib/dev/acpica/include/actypes.h head/sys/contrib/dev/acpica/include/platform/acfreebsd.h head/sys/contrib/dev/acpica/parser/psxface.c head/sys/contrib/dev/acpica/tables/tbutils.c head/sys/contrib/dev/acpica/tables/tbxface.c head/sys/contrib/dev/acpica/utilities/utglobal.c head/sys/dev/acpica/acpi.c head/sys/dev/acpica/acpi_button.c head/sys/dev/acpica/acpi_ec.c head/sys/dev/acpica/acpi_lid.c head/sys/dev/acpica/acpivar.h Directory Properties: head/sys/contrib/dev/acpica/ (props changed) Modified: head/sys/contrib/dev/acpica/changes.txt ============================================================================== --- head/sys/contrib/dev/acpica/changes.txt Fri Apr 2 21:48:27 2010 (r206116) +++ head/sys/contrib/dev/acpica/changes.txt Fri Apr 2 23:04:31 2010 (r206117) @@ -1,4 +1,79 @@ ---------------------------------------- +31 March 2010. Summary of changes for version 20100331: + +1) ACPI CA Core Subsystem: + +Completed a major update for the GPE support in order to improve support for +shared GPEs and to simplify both host OS and ACPICA code. Added a reference +count mechanism to support shared GPEs that require multiple device drivers. +Several external interfaces have changed. One external interface has been +removed. One new external interface was added. Most of the GPE external +interfaces now use the GPE spinlock instead of the events mutex (and the +Flags parameter for many GPE interfaces has been removed.) See the updated +ACPICA Programmer Reference for details. Matthew Garrett, Bob Moore, Rafael +Wysocki. ACPICA BZ 831. + +Changed: + AcpiEnableGpe, AcpiDisableGpe, AcpiClearGpe, AcpiGetGpeStatus +Removed: + AcpiSetGpeType +New: + AcpiSetGpe + +Implemented write support for DataTable operation regions. These regions are +defined via the DataTableRegion() operator. Previously, only read support was +implemented. The ACPI specification allows DataTableRegions to be read/write, +however. + +Implemented a new subsystem option to force a copy of the DSDT to local +memory. Optionally copy the entire DSDT to local memory (instead of simply +mapping it.) There are some (albeit very rare) BIOSs that corrupt or replace +the original DSDT, creating the need for this option. Default is FALSE, do +not copy the DSDT. + +Implemented detection of a corrupted or replaced DSDT. This change adds +support to detect a DSDT that has been corrupted and/or replaced from outside +the OS (by firmware). This is typically catastrophic for the system, but has +been seen on some machines. Once this problem has been detected, the DSDT +copy option can be enabled via system configuration. Lin Ming, Bob Moore. + +Fixed two problems with AcpiReallocateRootTable during the root table copy. +When copying the root table to the new allocation, the length used was +incorrect. The new size was used instead of the current table size, meaning +too much data was copied. Also, the count of available slots for ACPI tables +was not set correctly. Alexey Starikovskiy, Bob Moore. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and has a +much larger code and data size. + + Previous Release: + Non-Debug Version: 87.5K Code, 18.4K Data, 105.9K Total + Debug Version: 163.4K Code, 51.1K Data, 214.5K Total + Current Release: + Non-Debug Version: 87.9K Code, 18.6K Data, 106.5K Total + Debug Version: 163.5K Code, 51.3K Data, 214.8K Total + +2) iASL Compiler/Disassembler and Tools: + +iASL: Implement limited typechecking for values returned from predefined +control methods. The type of any returned static (unnamed) object is now +validated. For example, Return(1). ACPICA BZ 786. + +iASL: Fixed a predefined name object verification regression. Fixes a problem +introduced in version 20100304. An error is incorrectly generated if a +predefined name is declared as a static named object with a value defined +using the keywords "Zero", "One", or "Ones". Lin Ming. + +iASL: Added Windows 7 support for the -g option (get local ACPI tables) by +reducing the requested registry access rights. ACPICA BZ 842. + +Disassembler: fixed a possible fault when generating External() statements. +Introduced in commit ae7d6fd: Properly handle externals with parent-prefix +(carat). Fixes a string length allocation calculation. Lin Ming. + +---------------------------------------- 04 March 2010. Summary of changes for version 20100304: 1) ACPI CA Core Subsystem: Modified: head/sys/contrib/dev/acpica/common/dmextern.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmextern.c Fri Apr 2 21:48:27 2010 (r206116) +++ head/sys/contrib/dev/acpica/common/dmextern.c Fri Apr 2 23:04:31 2010 (r206117) @@ -270,6 +270,15 @@ AcpiDmNormalizeParentPrefix ( } Length = (ACPI_STRLEN (ParentPath) + ACPI_STRLEN (Path) + 1); + if (ParentPath[1]) + { + /* + * If ParentPath is not just a simple '\', increment the length + * for the required dot separator (ParentPath.Path) + */ + Length++; + } + Fullpath = ACPI_ALLOCATE_ZEROED (Length); if (!Fullpath) { Modified: head/sys/contrib/dev/acpica/compiler/aslanalyze.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslanalyze.c Fri Apr 2 21:48:27 2010 (r206116) +++ head/sys/contrib/dev/acpica/compiler/aslanalyze.c Fri Apr 2 23:04:31 2010 (r206117) @@ -1157,6 +1157,12 @@ AnMethodAnalysisWalkEnd ( case PARSEOP_RETURN: /* + * If the parent is a predefined method name, attempt to typecheck + * the return value. Only static types can be validated. + */ + ApCheckPredefinedReturnValue (Op, MethodInfo); + + /* * The parent block does not "exit" and continue execution -- the * method is terminated here with the Return() statement. */ Modified: head/sys/contrib/dev/acpica/compiler/aslcompiler.h ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcompiler.h Fri Apr 2 21:48:27 2010 (r206116) +++ head/sys/contrib/dev/acpica/compiler/aslcompiler.h Fri Apr 2 23:04:31 2010 (r206117) @@ -461,6 +461,11 @@ ApCheckForPredefinedMethod ( ACPI_PARSE_OBJECT *Op, ASL_METHOD_INFO *MethodInfo); +void +ApCheckPredefinedReturnValue ( + ACPI_PARSE_OBJECT *Op, + ASL_METHOD_INFO *MethodInfo); + UINT32 ApCheckForPredefinedName ( ACPI_PARSE_OBJECT *Op, Modified: head/sys/contrib/dev/acpica/compiler/aslpredef.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslpredef.c Fri Apr 2 21:48:27 2010 (r206116) +++ head/sys/contrib/dev/acpica/compiler/aslpredef.c Fri Apr 2 23:04:31 2010 (r206117) @@ -296,7 +296,11 @@ ApCheckForPredefinedMethod ( if (MethodInfo->NumReturnNoValue && PredefinedNames[Index].Info.ExpectedBtypes) { - sprintf (MsgBuffer, "%4.4s", PredefinedNames[Index].Info.Name); + ApGetExpectedTypes (StringBuffer, + PredefinedNames[Index].Info.ExpectedBtypes); + + sprintf (MsgBuffer, "%s required for %4.4s", + StringBuffer, PredefinedNames[Index].Info.Name); AslError (ASL_WARNING, ASL_MSG_RESERVED_RETURN_VALUE, Op, MsgBuffer); @@ -308,6 +312,90 @@ ApCheckForPredefinedMethod ( /******************************************************************************* * + * FUNCTION: ApCheckPredefinedReturnValue + * + * PARAMETERS: Op - A parse node of type "RETURN". + * MethodInfo - Saved info about this method + * + * RETURN: None + * + * DESCRIPTION: If method is a predefined name, attempt to validate the return + * value. Only "static" types can be validated - a simple return + * of an integer/string/buffer/package or a named reference to + * a static object. Values such as a Localx or Argx or a control + * method invocation are not checked. + * + ******************************************************************************/ + +void +ApCheckPredefinedReturnValue ( + ACPI_PARSE_OBJECT *Op, + ASL_METHOD_INFO *MethodInfo) +{ + UINT32 Index; + ACPI_PARSE_OBJECT *ReturnValueOp; + + + /* Check parent method for a match against the predefined name list */ + + Index = ApCheckForPredefinedName (MethodInfo->Op, + MethodInfo->Op->Asl.NameSeg); + + switch (Index) + { + case ACPI_NOT_RESERVED_NAME: /* No underscore or _Txx or _xxx name not matched */ + case ACPI_PREDEFINED_NAME: /* Resource Name or reserved scope name */ + case ACPI_COMPILER_RESERVED_NAME: /* A _Txx that was not emitted by compiler */ + case ACPI_EVENT_RESERVED_NAME: /* _Lxx, _Exx, and _Qxx methods */ + + /* Just return, nothing to do */ + return; + + default: /* a real predefined ACPI name */ + + /* Exit if no return value expected */ + + if (!PredefinedNames[Index].Info.ExpectedBtypes) + { + return; + } + + /* Get the object returned, it is the next argument */ + + ReturnValueOp = Op->Asl.Child; + switch (ReturnValueOp->Asl.ParseOpcode) + { + case PARSEOP_ZERO: + case PARSEOP_ONE: + case PARSEOP_ONES: + case PARSEOP_INTEGER: + case PARSEOP_STRING_LITERAL: + case PARSEOP_BUFFER: + case PARSEOP_PACKAGE: + + /* Static data return object - check against expected type */ + + ApCheckObjectType (ReturnValueOp, + PredefinedNames[Index].Info.ExpectedBtypes); + break; + + default: + + /* + * All other ops are very difficult or impossible to typecheck at + * compile time. These include all Localx, Argx, and method + * invocations. Also, NAMESEG and NAMESTRING because the type of + * any named object can be changed at runtime (for example, + * CopyObject will change the type of the target object.) + */ + break; + } + } +} + + +/******************************************************************************* + * * FUNCTION: ApCheckForPredefinedObject * * PARAMETERS: Op - A parse node @@ -441,7 +529,7 @@ ApCheckForPredefinedName ( * * RETURN: None * - * DESCRIPTION: Check for the "special" predefined names - + * DESCRIPTION: Check for the "special" predefined names - * _Lxx, _Exx, _Qxx, and _T_x * ******************************************************************************/ @@ -512,7 +600,7 @@ ApCheckForSpecialName ( * * FUNCTION: ApCheckObjectType * - * PARAMETERS: Op - A parse node + * PARAMETERS: Op - Current parse node * ExpectedBtypes - Bitmap of expected return type(s) * * RETURN: None @@ -529,11 +617,13 @@ ApCheckObjectType ( UINT32 ExpectedBtypes) { UINT32 ReturnBtype; - char TypeBuffer[48]; /* Room for 5 types */ switch (Op->Asl.ParseOpcode) { + case PARSEOP_ZERO: + case PARSEOP_ONE: + case PARSEOP_ONES: case PARSEOP_INTEGER: ReturnBtype = ACPI_RTYPE_INTEGER; break; @@ -552,11 +642,11 @@ ApCheckObjectType ( default: /* Not one of the supported object types */ - + goto TypeErrorExit; } - /* Is the object one of the expected types? */ + /* Exit if the object is one of the expected types */ if (ReturnBtype & ExpectedBtypes) { @@ -568,10 +658,13 @@ TypeErrorExit: /* Format the expected types and emit an error message */ - ApGetExpectedTypes (TypeBuffer, ExpectedBtypes); + ApGetExpectedTypes (StringBuffer, ExpectedBtypes); + + sprintf (MsgBuffer, "found %s, requires %s", + UtGetOpName (Op->Asl.ParseOpcode), StringBuffer); AslError (ASL_ERROR, ASL_MSG_RESERVED_OPERAND_TYPE, Op, - TypeBuffer); + MsgBuffer); } Modified: head/sys/contrib/dev/acpica/compiler/aslstubs.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslstubs.c Fri Apr 2 21:48:27 2010 (r206116) +++ head/sys/contrib/dev/acpica/compiler/aslstubs.c Fri Apr 2 23:04:31 2010 (r206117) @@ -243,13 +243,6 @@ AcpiEvInitializeRegion ( return (AE_OK); } -ACPI_STATUS -AcpiEvCheckForWakeOnlyGpe ( - ACPI_GPE_EVENT_INFO *GpeEventInfo) -{ - return (AE_OK); -} - void AcpiExDoDebugObject ( ACPI_OPERAND_OBJECT *SourceDesc, Modified: head/sys/contrib/dev/acpica/compiler/asltypes.h ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asltypes.h Fri Apr 2 21:48:27 2010 (r206116) +++ head/sys/contrib/dev/acpica/compiler/asltypes.h Fri Apr 2 23:04:31 2010 (r206117) @@ -507,7 +507,7 @@ char *AslMessages /* ASL_MSG_RESERVED_ARG_COUNT_HI */ "Reserved method has too many arguments", /* ASL_MSG_RESERVED_ARG_COUNT_LO */ "Reserved method has too few arguments", /* ASL_MSG_RESERVED_METHOD */ "Reserved name must be a control method", -/* ASL_MSG_RESERVED_OPERAND_TYPE */ "Invalid object type for reserved name, must be", +/* ASL_MSG_RESERVED_OPERAND_TYPE */ "Invalid object type for reserved name", /* ASL_MSG_RESERVED_RETURN_VALUE */ "Reserved method must return a value", /* ASL_MSG_RESERVED_USE */ "Invalid use of reserved name", /* ASL_MSG_RESERVED_WORD */ "Use of reserved name", Modified: head/sys/contrib/dev/acpica/debugger/dbdisply.c ============================================================================== --- head/sys/contrib/dev/acpica/debugger/dbdisply.c Fri Apr 2 21:48:27 2010 (r206116) +++ head/sys/contrib/dev/acpica/debugger/dbdisply.c Fri Apr 2 23:04:31 2010 (r206117) @@ -848,13 +848,12 @@ AcpiDbDisplayGpes ( Block, GpeBlock, GpeBlock->Node, Buffer); AcpiOsPrintf (" Registers: %u (%u GPEs)\n", - GpeBlock->RegisterCount, - ACPI_MUL_8 (GpeBlock->RegisterCount)); + GpeBlock->RegisterCount, GpeBlock->GpeCount); - AcpiOsPrintf (" GPE range: 0x%X to 0x%X\n", + AcpiOsPrintf (" GPE range: 0x%X to 0x%X on interrupt %u\n", GpeBlock->BlockBaseNumber, - GpeBlock->BlockBaseNumber + - (GpeBlock->RegisterCount * 8) -1); + GpeBlock->BlockBaseNumber + (GpeBlock->GpeCount - 1), + GpeXruptInfo->InterruptNumber); AcpiOsPrintf ( " RegisterInfo: %p Status %8.8X%8.8X Enable %8.8X%8.8X\n", @@ -871,9 +870,12 @@ AcpiDbDisplayGpes ( GpeRegisterInfo = &GpeBlock->RegisterInfo[i]; AcpiOsPrintf ( - " Reg %u: WakeEnable %2.2X, RunEnable %2.2X Status %8.8X%8.8X Enable %8.8X%8.8X\n", - i, GpeRegisterInfo->EnableForWake, + " Reg %u: (GPE %.2X-%.2X) RunEnable %2.2X WakeEnable %2.2X" + " Status %8.8X%8.8X Enable %8.8X%8.8X\n", + i, GpeRegisterInfo->BaseGpeNumber, + GpeRegisterInfo->BaseGpeNumber + (ACPI_GPE_REGISTER_WIDTH - 1), GpeRegisterInfo->EnableForRun, + GpeRegisterInfo->EnableForWake, ACPI_FORMAT_UINT64 (GpeRegisterInfo->StatusAddress.Address), ACPI_FORMAT_UINT64 (GpeRegisterInfo->EnableAddress.Address)); @@ -886,17 +888,19 @@ AcpiDbDisplayGpes ( if (!(GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK)) { - /* This GPE is not used (no method or handler) */ + /* This GPE is not used (no method or handler), ignore it */ continue; } AcpiOsPrintf ( - " GPE %.3X: %p Flags %2.2X: ", - GpeBlock->BlockBaseNumber + GpeIndex, - GpeEventInfo, + " GPE %.2X: %p RunRefs %2.2X WakeRefs %2.2X Flags %2.2X (", + GpeBlock->BlockBaseNumber + GpeIndex, GpeEventInfo, + GpeEventInfo->RuntimeCount, GpeEventInfo->WakeupCount, GpeEventInfo->Flags); + /* Decode the flags byte */ + if (GpeEventInfo->Flags & ACPI_GPE_LEVEL_TRIGGERED) { AcpiOsPrintf ("Level, "); @@ -906,38 +910,13 @@ AcpiDbDisplayGpes ( AcpiOsPrintf ("Edge, "); } - switch (GpeEventInfo->Flags & ACPI_GPE_TYPE_MASK) - { - case ACPI_GPE_TYPE_WAKE: - AcpiOsPrintf ("WakeOnly: "); - break; - case ACPI_GPE_TYPE_RUNTIME: - AcpiOsPrintf (" RunOnly: "); - break; - case ACPI_GPE_TYPE_WAKE_RUN: - AcpiOsPrintf (" WakeRun: "); - break; - default: - AcpiOsPrintf (" NotUsed: "); - break; - } - - if (GpeEventInfo->Flags & ACPI_GPE_WAKE_ENABLED) - { - AcpiOsPrintf ("[Wake 1 "); - } - else - { - AcpiOsPrintf ("[Wake 0 "); - } - - if (GpeEventInfo->Flags & ACPI_GPE_RUN_ENABLED) + if (GpeEventInfo->Flags & ACPI_GPE_CAN_WAKE) { - AcpiOsPrintf ("Run 1], "); + AcpiOsPrintf ("CanWake, "); } else { - AcpiOsPrintf ("Run 0], "); + AcpiOsPrintf ("RunOnly, "); } switch (GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) @@ -957,7 +936,7 @@ AcpiDbDisplayGpes ( break; } - AcpiOsPrintf ("\n"); + AcpiOsPrintf (")\n"); } } Block++; Modified: head/sys/contrib/dev/acpica/events/evgpe.c ============================================================================== --- head/sys/contrib/dev/acpica/events/evgpe.c Fri Apr 2 21:48:27 2010 (r206116) +++ head/sys/contrib/dev/acpica/events/evgpe.c Fri Apr 2 23:04:31 2010 (r206117) @@ -134,71 +134,20 @@ AcpiEvAsynchEnableGpe ( /******************************************************************************* * - * FUNCTION: AcpiEvSetGpeType - * - * PARAMETERS: GpeEventInfo - GPE to set - * Type - New type - * - * RETURN: Status - * - * DESCRIPTION: Sets the new type for the GPE (wake, run, or wake/run) - * - ******************************************************************************/ - -ACPI_STATUS -AcpiEvSetGpeType ( - ACPI_GPE_EVENT_INFO *GpeEventInfo, - UINT8 Type) -{ - ACPI_STATUS Status; - - - ACPI_FUNCTION_TRACE (EvSetGpeType); - - - /* Validate type and update register enable masks */ - - switch (Type) - { - case ACPI_GPE_TYPE_WAKE: - case ACPI_GPE_TYPE_RUNTIME: - case ACPI_GPE_TYPE_WAKE_RUN: - break; - - default: - return_ACPI_STATUS (AE_BAD_PARAMETER); - } - - /* Disable the GPE if currently enabled */ - - Status = AcpiEvDisableGpe (GpeEventInfo); - - /* Clear the type bits and insert the new Type */ - - GpeEventInfo->Flags &= ~ACPI_GPE_TYPE_MASK; - GpeEventInfo->Flags |= Type; - return_ACPI_STATUS (Status); -} - - -/******************************************************************************* - * * FUNCTION: AcpiEvUpdateGpeEnableMasks * * PARAMETERS: GpeEventInfo - GPE to update - * Type - What to do: ACPI_GPE_DISABLE or - * ACPI_GPE_ENABLE * * RETURN: Status * - * DESCRIPTION: Updates GPE register enable masks based on the GPE type + * DESCRIPTION: Updates GPE register enable masks based upon whether there are + * references (either wake or run) to this GPE * ******************************************************************************/ ACPI_STATUS AcpiEvUpdateGpeEnableMasks ( - ACPI_GPE_EVENT_INFO *GpeEventInfo, - UINT8 Type) + ACPI_GPE_EVENT_INFO *GpeEventInfo) { ACPI_GPE_REGISTER_INFO *GpeRegisterInfo; UINT8 RegisterBit; @@ -216,36 +165,21 @@ AcpiEvUpdateGpeEnableMasks ( RegisterBit = (UINT8) (1 << (GpeEventInfo->GpeNumber - GpeRegisterInfo->BaseGpeNumber)); - /* 1) Disable case. Simply clear all enable bits */ + /* Clear the wake/run bits up front */ - if (Type == ACPI_GPE_DISABLE) - { - ACPI_CLEAR_BIT (GpeRegisterInfo->EnableForWake, RegisterBit); - ACPI_CLEAR_BIT (GpeRegisterInfo->EnableForRun, RegisterBit); - return_ACPI_STATUS (AE_OK); - } + ACPI_CLEAR_BIT (GpeRegisterInfo->EnableForWake, RegisterBit); + ACPI_CLEAR_BIT (GpeRegisterInfo->EnableForRun, RegisterBit); - /* 2) Enable case. Set/Clear the appropriate enable bits */ + /* Set the mask bits only if there are references to this GPE */ - switch (GpeEventInfo->Flags & ACPI_GPE_TYPE_MASK) + if (GpeEventInfo->RuntimeCount) { - case ACPI_GPE_TYPE_WAKE: - ACPI_SET_BIT (GpeRegisterInfo->EnableForWake, RegisterBit); - ACPI_CLEAR_BIT (GpeRegisterInfo->EnableForRun, RegisterBit); - break; - - case ACPI_GPE_TYPE_RUNTIME: - ACPI_CLEAR_BIT (GpeRegisterInfo->EnableForWake, RegisterBit); - ACPI_SET_BIT (GpeRegisterInfo->EnableForRun, RegisterBit); - break; - - case ACPI_GPE_TYPE_WAKE_RUN: - ACPI_SET_BIT (GpeRegisterInfo->EnableForWake, RegisterBit); - ACPI_SET_BIT (GpeRegisterInfo->EnableForRun, RegisterBit); - break; + ACPI_SET_BIT (GpeRegisterInfo->EnableForRun, RegisterBit); + } - default: - return_ACPI_STATUS (AE_BAD_PARAMETER); + if (GpeEventInfo->WakeupCount) + { + ACPI_SET_BIT (GpeRegisterInfo->EnableForWake, RegisterBit); } return_ACPI_STATUS (AE_OK); @@ -257,19 +191,19 @@ AcpiEvUpdateGpeEnableMasks ( * FUNCTION: AcpiEvEnableGpe * * PARAMETERS: GpeEventInfo - GPE to enable - * WriteToHardware - Enable now, or just mark data structs - * (WAKE GPEs should be deferred) * * RETURN: Status * - * DESCRIPTION: Enable a GPE based on the GPE type + * DESCRIPTION: Hardware-enable a GPE. Always enables the GPE, regardless + * of type or number of references. + * + * Note: The GPE lock should be already acquired when this function is called. * ******************************************************************************/ ACPI_STATUS AcpiEvEnableGpe ( - ACPI_GPE_EVENT_INFO *GpeEventInfo, - BOOLEAN WriteToHardware) + ACPI_GPE_EVENT_INFO *GpeEventInfo) { ACPI_STATUS Status; @@ -277,54 +211,37 @@ AcpiEvEnableGpe ( ACPI_FUNCTION_TRACE (EvEnableGpe); - /* Make sure HW enable masks are updated */ + /* + * We will only allow a GPE to be enabled if it has either an + * associated method (_Lxx/_Exx) or a handler. Otherwise, the + * GPE will be immediately disabled by AcpiEvGpeDispatch the + * first time it fires. + */ + if (!(GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK)) + { + return_ACPI_STATUS (AE_NO_HANDLER); + } + + /* Ensure the HW enable masks are current */ - Status = AcpiEvUpdateGpeEnableMasks (GpeEventInfo, ACPI_GPE_ENABLE); + Status = AcpiEvUpdateGpeEnableMasks (GpeEventInfo); if (ACPI_FAILURE (Status)) { return_ACPI_STATUS (Status); } - /* Mark wake-enabled or HW enable, or both */ + /* Clear the GPE (of stale events) */ - switch (GpeEventInfo->Flags & ACPI_GPE_TYPE_MASK) + Status = AcpiHwClearGpe (GpeEventInfo); + if (ACPI_FAILURE (Status)) { - case ACPI_GPE_TYPE_WAKE: - - ACPI_SET_BIT (GpeEventInfo->Flags, ACPI_GPE_WAKE_ENABLED); - break; - - case ACPI_GPE_TYPE_WAKE_RUN: - - ACPI_SET_BIT (GpeEventInfo->Flags, ACPI_GPE_WAKE_ENABLED); - - /*lint -fallthrough */ - - case ACPI_GPE_TYPE_RUNTIME: - - ACPI_SET_BIT (GpeEventInfo->Flags, ACPI_GPE_RUN_ENABLED); - - if (WriteToHardware) - { - /* Clear the GPE (of stale events), then enable it */ - - Status = AcpiHwClearGpe (GpeEventInfo); - if (ACPI_FAILURE (Status)) - { - return_ACPI_STATUS (Status); - } - - /* Enable the requested runtime GPE */ - - Status = AcpiHwWriteGpeEnableReg (GpeEventInfo); - } - break; - - default: - return_ACPI_STATUS (AE_BAD_PARAMETER); + return_ACPI_STATUS (Status); } - return_ACPI_STATUS (AE_OK); + /* Enable the requested GPE */ + + Status = AcpiHwWriteGpeEnableReg (GpeEventInfo); + return_ACPI_STATUS (Status); } @@ -336,7 +253,10 @@ AcpiEvEnableGpe ( * * RETURN: Status * - * DESCRIPTION: Disable a GPE based on the GPE type + * DESCRIPTION: Hardware-disable a GPE. Always disables the requested GPE, + * regardless of the type or number of references. + * + * Note: The GPE lock should be already acquired when this function is called. * ******************************************************************************/ @@ -356,40 +276,14 @@ AcpiEvDisableGpe ( * the GPE behind our back. */ - /* Make sure HW enable masks are updated */ + /* Ensure the HW enable masks are current */ - Status = AcpiEvUpdateGpeEnableMasks (GpeEventInfo, ACPI_GPE_DISABLE); + Status = AcpiEvUpdateGpeEnableMasks (GpeEventInfo); if (ACPI_FAILURE (Status)) { return_ACPI_STATUS (Status); } - /* Clear the appropriate enabled flags for this GPE */ - - switch (GpeEventInfo->Flags & ACPI_GPE_TYPE_MASK) - { - case ACPI_GPE_TYPE_WAKE: - - ACPI_CLEAR_BIT (GpeEventInfo->Flags, ACPI_GPE_WAKE_ENABLED); - break; - - case ACPI_GPE_TYPE_WAKE_RUN: - - ACPI_CLEAR_BIT (GpeEventInfo->Flags, ACPI_GPE_WAKE_ENABLED); - - /*lint -fallthrough */ - - case ACPI_GPE_TYPE_RUNTIME: - - /* Disable the requested runtime GPE */ - - ACPI_CLEAR_BIT (GpeEventInfo->Flags, ACPI_GPE_RUN_ENABLED); - break; - - default: - break; - } - /* * Always H/W disable this GPE, even if we don't know the GPE type. * Simply clear the enable bit for this particular GPE, but do not @@ -405,6 +299,49 @@ AcpiEvDisableGpe ( /******************************************************************************* * + * FUNCTION: AcpiEvLowGetGpeInfo + * + * PARAMETERS: GpeNumber - Raw GPE number + * GpeBlock - A GPE info block + * + * RETURN: A GPE EventInfo struct. NULL if not a valid GPE (The GpeNumber + * is not within the specified GPE block) + * + * DESCRIPTION: Returns the EventInfo struct associated with this GPE. This is + * the low-level implementation of EvGetGpeEventInfo. + * + ******************************************************************************/ + +ACPI_GPE_EVENT_INFO * +AcpiEvLowGetGpeInfo ( + UINT32 GpeNumber, + ACPI_GPE_BLOCK_INFO *GpeBlock) +{ + UINT32 GpeIndex; + + + /* + * Validate that the GpeNumber is within the specified GpeBlock. + * (Two steps) + */ + if (!GpeBlock || + (GpeNumber < GpeBlock->BlockBaseNumber)) + { + return (NULL); + } + + GpeIndex = GpeNumber - GpeBlock->BlockBaseNumber; + if (GpeIndex >= GpeBlock->GpeCount) + { + return (NULL); + } + + return (&GpeBlock->EventInfo[GpeIndex]); +} + + +/******************************************************************************* + * * FUNCTION: AcpiEvGetGpeEventInfo * * PARAMETERS: GpeDevice - Device node. NULL for GPE0/GPE1 @@ -426,7 +363,7 @@ AcpiEvGetGpeEventInfo ( UINT32 GpeNumber) { ACPI_OPERAND_OBJECT *ObjDesc; - ACPI_GPE_BLOCK_INFO *GpeBlock; + ACPI_GPE_EVENT_INFO *GpeInfo; UINT32 i; @@ -441,16 +378,11 @@ AcpiEvGetGpeEventInfo ( for (i = 0; i < ACPI_MAX_GPE_BLOCKS; i++) { - GpeBlock = AcpiGbl_GpeFadtBlocks[i]; - if (GpeBlock) + GpeInfo = AcpiEvLowGetGpeInfo (GpeNumber, + AcpiGbl_GpeFadtBlocks[i]); + if (GpeInfo) { - if ((GpeNumber >= GpeBlock->BlockBaseNumber) && - (GpeNumber < GpeBlock->BlockBaseNumber + - (GpeBlock->RegisterCount * 8))) - { - return (&GpeBlock->EventInfo[GpeNumber - - GpeBlock->BlockBaseNumber]); - } + return (GpeInfo); } } @@ -468,15 +400,7 @@ AcpiEvGetGpeEventInfo ( return (NULL); } - GpeBlock = ObjDesc->Device.GpeBlock; - - if ((GpeNumber >= GpeBlock->BlockBaseNumber) && - (GpeNumber < GpeBlock->BlockBaseNumber + (GpeBlock->RegisterCount * 8))) - { - return (&GpeBlock->EventInfo[GpeNumber - GpeBlock->BlockBaseNumber]); - } - - return (NULL); + return (AcpiEvLowGetGpeInfo (GpeNumber, ObjDesc->Device.GpeBlock)); } @@ -654,9 +578,9 @@ AcpiEvAsynchExecuteGpeMethod ( return_VOID; } - /* Set the GPE flags for return to enabled state */ + /* Update the GPE register masks for return to enabled state */ - (void) AcpiEvEnableGpe (GpeEventInfo, FALSE); + (void) AcpiEvUpdateGpeEnableMasks (GpeEventInfo); /* * Take a snapshot of the GPE info for this level - we copy the info to @@ -872,15 +796,18 @@ AcpiEvGpeDispatch ( default: - /* No handler or method to run! */ - + /* + * No handler or method to run! + * 03/2010: This case should no longer be possible. We will not allow + * a GPE to be enabled if it has no handler or method. + */ ACPI_ERROR ((AE_INFO, "No handler or method for GPE[0x%2X], disabling event", GpeNumber)); /* - * Disable the GPE. The GPE will remain disabled until the ACPICA - * Core Subsystem is restarted, or a handler is installed. + * Disable the GPE. The GPE will remain disabled a handler + * is installed or ACPICA is restarted. */ Status = AcpiEvDisableGpe (GpeEventInfo); if (ACPI_FAILURE (Status)) Modified: head/sys/contrib/dev/acpica/events/evgpeblk.c ============================================================================== --- head/sys/contrib/dev/acpica/events/evgpeblk.c Fri Apr 2 21:48:27 2010 (r206116) +++ head/sys/contrib/dev/acpica/events/evgpeblk.c Fri Apr 2 23:04:31 2010 (r206117) @@ -124,7 +124,7 @@ /* Local prototypes */ static ACPI_STATUS -AcpiEvSaveMethodInfo ( +AcpiEvMatchGpeMethod ( ACPI_HANDLE ObjHandle, UINT32 Level, void *ObjDesc, @@ -194,8 +194,7 @@ AcpiEvValidGpeEvent ( while (GpeBlock) { if ((&GpeBlock->EventInfo[0] <= GpeEventInfo) && - (&GpeBlock->EventInfo[((ACPI_SIZE) - GpeBlock->RegisterCount) * 8] > GpeEventInfo)) + (&GpeBlock->EventInfo[GpeBlock->GpeCount] > GpeEventInfo)) { return (TRUE); } @@ -328,7 +327,7 @@ AcpiEvDeleteGpeHandlers ( /******************************************************************************* * - * FUNCTION: AcpiEvSaveMethodInfo + * FUNCTION: AcpiEvMatchGpeMethod * * PARAMETERS: Callback from WalkNamespace * @@ -340,8 +339,7 @@ AcpiEvDeleteGpeHandlers ( * information for quick lookup during GPE dispatch * * The name of each GPE control method is of the form: - * "_Lxx" or "_Exx" - * Where: + * "_Lxx" or "_Exx", where: * L - means that the GPE is level triggered * E - means that the GPE is edge triggered * xx - is the GPE number [in HEX] @@ -349,38 +347,44 @@ AcpiEvDeleteGpeHandlers ( ******************************************************************************/ static ACPI_STATUS -AcpiEvSaveMethodInfo ( +AcpiEvMatchGpeMethod ( ACPI_HANDLE ObjHandle, UINT32 Level, void *ObjDesc, void **ReturnValue) { + ACPI_NAMESPACE_NODE *MethodNode = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, ObjHandle); ACPI_GPE_BLOCK_INFO *GpeBlock = (void *) ObjDesc; ACPI_GPE_EVENT_INFO *GpeEventInfo; UINT32 GpeNumber; char Name[ACPI_NAME_SIZE + 1]; UINT8 Type; - ACPI_STATUS Status; - ACPI_FUNCTION_TRACE (EvSaveMethodInfo); + ACPI_FUNCTION_TRACE (EvMatchGpeMethod); /* - * _Lxx and _Exx GPE method support + * Match and decode the _Lxx and _Exx GPE method names * - * 1) Extract the name from the object and convert to a string + * 1) Extract the method name and null terminate it */ - ACPI_MOVE_32_TO_32 ( - Name, &((ACPI_NAMESPACE_NODE *) ObjHandle)->Name.Integer); + ACPI_MOVE_32_TO_32 (Name, &MethodNode->Name.Integer); Name[ACPI_NAME_SIZE] = 0; + /* 2) Name must begin with an underscore */ + + if (Name[0] != '_') + { + return_ACPI_STATUS (AE_OK); /* Ignore this method */ + } + /* - * 2) Edge/Level determination is based on the 2nd character + * 3) Edge/Level determination is based on the 2nd character * of the method name * - * NOTE: Default GPE type is RUNTIME. May be changed later to WAKE - * if a _PRW object is found that points to this GPE. + * NOTE: Default GPE type is RUNTIME only. Later, if a _PRW object is + * found that points to this GPE, the ACPI_GPE_CAN_WAKE flag is set. */ switch (Name[1]) { @@ -393,16 +397,15 @@ AcpiEvSaveMethodInfo ( break; default: - /* Unknown method type, just ignore it! */ + /* Unknown method type, just ignore it */ ACPI_DEBUG_PRINT ((ACPI_DB_LOAD, "Ignoring unknown GPE method type: %s " - "(name not of form _Lxx or _Exx)", - Name)); + "(name not of form _Lxx or _Exx)", Name)); return_ACPI_STATUS (AE_OK); } - /* Convert the last two characters of the name to the GPE Number */ + /* 4) The last two characters of the name are the hex GPE Number */ GpeNumber = ACPI_STRTOUL (&Name[2], NULL, 16); if (GpeNumber == ACPI_UINT32_MAX) @@ -411,45 +414,34 @@ AcpiEvSaveMethodInfo ( ACPI_DEBUG_PRINT ((ACPI_DB_LOAD, "Could not extract GPE number from name: %s " - "(name is not of form _Lxx or _Exx)", - Name)); + "(name is not of form _Lxx or _Exx)", Name)); return_ACPI_STATUS (AE_OK); } /* Ensure that we have a valid GPE number for this GPE block */ - if ((GpeNumber < GpeBlock->BlockBaseNumber) || - (GpeNumber >= (GpeBlock->BlockBaseNumber + - (GpeBlock->RegisterCount * 8)))) + GpeEventInfo = AcpiEvLowGetGpeInfo (GpeNumber, GpeBlock); + if (!GpeEventInfo) { /* - * Not valid for this GPE block, just ignore it. However, it may be - * valid for a different GPE block, since GPE0 and GPE1 methods both - * appear under \_GPE. + * This GpeNumber is not valid for this GPE block, just ignore it. + * However, it may be valid for a different GPE block, since GPE0 + * and GPE1 methods both appear under \_GPE. */ return_ACPI_STATUS (AE_OK); } /* - * Now we can add this information to the GpeEventInfo block for use - * during dispatch of this GPE. Default type is RUNTIME, although this may - * change when the _PRW methods are executed later. + * Add the GPE information from above to the GpeEventInfo block for + * use during dispatch of this GPE. */ - GpeEventInfo = &GpeBlock->EventInfo[GpeNumber - GpeBlock->BlockBaseNumber]; - *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Apr 3 00:47:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F9C9106564A; Sat, 3 Apr 2010 00:47:49 +0000 (UTC) (envelope-from yar@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0EDE38FC0A; Sat, 3 Apr 2010 00:47: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 o330lmcm025511; Sat, 3 Apr 2010 00:47:48 GMT (envelope-from yar@svn.freebsd.org) Received: (from yar@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o330lmHB025509; Sat, 3 Apr 2010 00:47:48 GMT (envelope-from yar@svn.freebsd.org) Message-Id: <201004030047.o330lmHB025509@svn.freebsd.org> From: Yar Tikhiy Date: Sat, 3 Apr 2010 00:47:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206118 - head/usr.sbin/mtree X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 03 Apr 2010 00:47:49 -0000 Author: yar Date: Sat Apr 3 00:47:48 2010 New Revision: 206118 URL: http://svn.freebsd.org/changeset/base/206118 Log: Keep the list of default keywords sorted so that paranoid folks like me don't try to find a hidden meaning in the strange order. The list used to be sorted in rev. 1.1 from 4.4BSD but the order was broken as soon as in rev. 1.2 by a single-character fix. MFC after: 3 days Modified: head/usr.sbin/mtree/mtree.8 Modified: head/usr.sbin/mtree/mtree.8 ============================================================================== --- head/usr.sbin/mtree/mtree.8 Fri Apr 2 23:04:31 2010 (r206117) +++ head/usr.sbin/mtree/mtree.8 Sat Apr 3 00:47:48 2010 (r206118) @@ -257,10 +257,10 @@ socket The default set of keywords are .Cm flags , .Cm gid , +.Cm link , .Cm mode , .Cm nlink , .Cm size , -.Cm link , .Cm time , and .Cm uid . From owner-svn-src-all@FreeBSD.ORG Sat Apr 3 07:12:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5142E106566B; Sat, 3 Apr 2010 07:12:36 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3FC2F8FC08; Sat, 3 Apr 2010 07:12: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 o337Cahv013605; Sat, 3 Apr 2010 07:12:36 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o337Ca43013603; Sat, 3 Apr 2010 07:12:36 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201004030712.o337Ca43013603@svn.freebsd.org> From: Fabien Thomas Date: Sat, 3 Apr 2010 07:12: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: r206121 - stable/8/sys/dev/hwpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Apr 2010 07:12:36 -0000 Author: fabient Date: Sat Apr 3 07:12:35 2010 New Revision: 206121 URL: http://svn.freebsd.org/changeset/base/206121 Log: MFC r205998: If there is multiple PMCs for the same interrupt ignore new post. This will indirectly fix a bug where the thread will be pinned forever if the assert is not compiled. Modified: stable/8/sys/dev/hwpmc/hwpmc_mod.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/hwpmc/hwpmc_mod.c ============================================================================== --- stable/8/sys/dev/hwpmc/hwpmc_mod.c Sat Apr 3 07:12:03 2010 (r206120) +++ stable/8/sys/dev/hwpmc/hwpmc_mod.c Sat Apr 3 07:12:35 2010 (r206121) @@ -3972,9 +3972,11 @@ pmc_post_callchain_callback(void) td = curthread; - KASSERT((td->td_pflags & TDP_CALLCHAIN) == 0, - ("[pmc,%d] thread %p already marked for callchain capture", - __LINE__, (void *) td)); + /* + * If there is multiple PMCs for the same interrupt ignore new post + */ + if (td->td_pflags & TDP_CALLCHAIN) + return; /* * Mark this thread as needing callchain capture. From owner-svn-src-all@FreeBSD.ORG Sat Apr 3 07:19:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 20712106564A; Sat, 3 Apr 2010 07:19:32 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0F0648FC0A; Sat, 3 Apr 2010 07:19: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 o337JVoP015163; Sat, 3 Apr 2010 07:19:31 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o337JVPl015161; Sat, 3 Apr 2010 07:19:31 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201004030719.o337JVPl015161@svn.freebsd.org> From: Fabien Thomas Date: Sat, 3 Apr 2010 07:19:31 +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: r206122 - stable/7/sys/dev/hwpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Apr 2010 07:19:32 -0000 Author: fabient Date: Sat Apr 3 07:19:31 2010 New Revision: 206122 URL: http://svn.freebsd.org/changeset/base/206122 Log: MFC r205998: If there is multiple PMCs for the same interrupt ignore new post. This will indirectly fix a bug where the thread will be pinned forever if the assert is not compiled. Modified: stable/7/sys/dev/hwpmc/hwpmc_mod.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/hwpmc/hwpmc_mod.c ============================================================================== --- stable/7/sys/dev/hwpmc/hwpmc_mod.c Sat Apr 3 07:12:35 2010 (r206121) +++ stable/7/sys/dev/hwpmc/hwpmc_mod.c Sat Apr 3 07:19:31 2010 (r206122) @@ -3976,9 +3976,11 @@ pmc_post_callchain_callback(void) td = curthread; - KASSERT((td->td_pflags & TDP_CALLCHAIN) == 0, - ("[pmc,%d] thread %p already marked for callchain capture", - __LINE__, (void *) td)); + /* + * If there is multiple PMCs for the same interrupt ignore new post + */ + if (td->td_pflags & TDP_CALLCHAIN) + return; /* * Mark this thread as needing callchain capture. From owner-svn-src-all@FreeBSD.ORG Sat Apr 3 07:51:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3914F106566C; Sat, 3 Apr 2010 07:51:11 +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 2393D8FC08; Sat, 3 Apr 2010 07:51: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 o337pBGJ022173; Sat, 3 Apr 2010 07:51:11 GMT (envelope-from rdivacky@svn.freebsd.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o337pAHY022141; Sat, 3 Apr 2010 07:51:10 GMT (envelope-from rdivacky@svn.freebsd.org) Message-Id: <201004030751.o337pAHY022141@svn.freebsd.org> From: Roman Divacky Date: Sat, 3 Apr 2010 07:51: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: r206124 - in vendor/llvm/dist: . docs include/llvm include/llvm/Analysis include/llvm/Assembly include/llvm/Bitcode include/llvm/CodeGen include/llvm/Support include/llvm/Target 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: Sat, 03 Apr 2010 07:51:11 -0000 Author: rdivacky Date: Sat Apr 3 07:51:10 2010 New Revision: 206124 URL: http://svn.freebsd.org/changeset/base/206124 Log: Update LLVM to r100285. Added: vendor/llvm/dist/lib/CodeGen/MachineFunctionPrinterPass.cpp vendor/llvm/dist/lib/Target/ARM/Disassembler/ vendor/llvm/dist/lib/Target/ARM/Disassembler/ARMDisassembler.cpp vendor/llvm/dist/lib/Target/ARM/Disassembler/ARMDisassembler.h vendor/llvm/dist/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp vendor/llvm/dist/lib/Target/ARM/Disassembler/ARMDisassemblerCore.h vendor/llvm/dist/lib/Target/ARM/Disassembler/Makefile vendor/llvm/dist/lib/Target/ARM/Disassembler/ThumbDisassemblerCore.h vendor/llvm/dist/test/CodeGen/X86/memset-3.ll vendor/llvm/dist/test/MC/Disassembler/arm-tests.txt vendor/llvm/dist/test/MC/Disassembler/neon-tests.txt vendor/llvm/dist/test/MC/Disassembler/thumb-tests.txt vendor/llvm/dist/test/Transforms/IndVarSimplify/crash.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/dangling-use.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/floating-point-iv.ll vendor/llvm/dist/utils/TableGen/ARMDecoderEmitter.cpp vendor/llvm/dist/utils/TableGen/ARMDecoderEmitter.h Deleted: vendor/llvm/dist/test/Transforms/GVN/2010-03-31-RedundantPHIs.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/2008-11-03-Floating.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/2008-11-17-Floating.ll Modified: vendor/llvm/dist/Makefile.rules vendor/llvm/dist/docs/ReleaseNotes.html vendor/llvm/dist/include/llvm/Analysis/DebugInfo.h vendor/llvm/dist/include/llvm/Analysis/LoopPass.h vendor/llvm/dist/include/llvm/Assembly/PrintModulePass.h vendor/llvm/dist/include/llvm/BasicBlock.h vendor/llvm/dist/include/llvm/Bitcode/LLVMBitCodes.h vendor/llvm/dist/include/llvm/CallGraphSCCPass.h vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h vendor/llvm/dist/include/llvm/CodeGen/MachineFunction.h vendor/llvm/dist/include/llvm/CodeGen/MachineFunctionPass.h vendor/llvm/dist/include/llvm/CodeGen/MachineInstr.h vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfo.h vendor/llvm/dist/include/llvm/CodeGen/Passes.h vendor/llvm/dist/include/llvm/CodeGen/SelectionDAG.h vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGNodes.h vendor/llvm/dist/include/llvm/CodeGen/SlotIndexes.h vendor/llvm/dist/include/llvm/Instruction.h vendor/llvm/dist/include/llvm/IntrinsicsX86.td vendor/llvm/dist/include/llvm/Pass.h vendor/llvm/dist/include/llvm/Support/Allocator.h vendor/llvm/dist/include/llvm/Support/DebugLoc.h vendor/llvm/dist/include/llvm/Support/IRBuilder.h vendor/llvm/dist/include/llvm/Support/MathExtras.h vendor/llvm/dist/include/llvm/Support/SlowOperationInformer.h vendor/llvm/dist/include/llvm/Target/TargetLowering.h vendor/llvm/dist/include/llvm/Transforms/Utils/SSAUpdater.h vendor/llvm/dist/lib/Analysis/DebugInfo.cpp vendor/llvm/dist/lib/Analysis/IPA/CallGraphSCCPass.cpp vendor/llvm/dist/lib/Analysis/LoopPass.cpp vendor/llvm/dist/lib/Bitcode/Reader/BitcodeReader.cpp vendor/llvm/dist/lib/Bitcode/Writer/BitcodeWriter.cpp vendor/llvm/dist/lib/Bitcode/Writer/ValueEnumerator.cpp vendor/llvm/dist/lib/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/CMakeLists.txt vendor/llvm/dist/lib/CodeGen/DwarfEHPrepare.cpp vendor/llvm/dist/lib/CodeGen/MachineFunction.cpp vendor/llvm/dist/lib/CodeGen/MachineFunctionPass.cpp vendor/llvm/dist/lib/CodeGen/MachineInstr.cpp vendor/llvm/dist/lib/CodeGen/MachineSSAUpdater.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/FastISel.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SDNodeDbgValue.h vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAG.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp vendor/llvm/dist/lib/ExecutionEngine/JIT/JITEmitter.cpp vendor/llvm/dist/lib/Target/ARM/ARMBaseInstrInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMBaseRegisterInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMConstantIslandPass.cpp vendor/llvm/dist/lib/Target/ARM/AsmParser/ARMAsmParser.cpp vendor/llvm/dist/lib/Target/ARM/Makefile vendor/llvm/dist/lib/Target/ARM/Thumb1InstrInfo.cpp vendor/llvm/dist/lib/Target/ARM/Thumb1RegisterInfo.cpp vendor/llvm/dist/lib/Target/ARM/Thumb2InstrInfo.cpp vendor/llvm/dist/lib/Target/Alpha/AlphaISelLowering.cpp vendor/llvm/dist/lib/Target/Alpha/AlphaInstrInfo.cpp vendor/llvm/dist/lib/Target/Alpha/AlphaLLRP.cpp vendor/llvm/dist/lib/Target/Alpha/AlphaRegisterInfo.cpp vendor/llvm/dist/lib/Target/Blackfin/BlackfinInstrInfo.cpp vendor/llvm/dist/lib/Target/Blackfin/BlackfinRegisterInfo.cpp vendor/llvm/dist/lib/Target/CellSPU/SPUInstrInfo.cpp vendor/llvm/dist/lib/Target/CellSPU/SPURegisterInfo.cpp vendor/llvm/dist/lib/Target/MBlaze/MBlazeInstrInfo.cpp vendor/llvm/dist/lib/Target/MBlaze/MBlazeRegisterInfo.cpp vendor/llvm/dist/lib/Target/MSP430/MSP430InstrInfo.cpp vendor/llvm/dist/lib/Target/MSP430/MSP430RegisterInfo.cpp vendor/llvm/dist/lib/Target/Mips/MipsInstrInfo.cpp vendor/llvm/dist/lib/Target/Mips/MipsRegisterInfo.cpp vendor/llvm/dist/lib/Target/PIC16/PIC16DebugInfo.cpp vendor/llvm/dist/lib/Target/PIC16/PIC16InstrInfo.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.h vendor/llvm/dist/lib/Target/PowerPC/PPCInstrInfo.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCRegisterInfo.cpp vendor/llvm/dist/lib/Target/Sparc/DelaySlotFiller.cpp vendor/llvm/dist/lib/Target/Sparc/SparcInstrInfo.cpp vendor/llvm/dist/lib/Target/Sparc/SparcRegisterInfo.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZInstrInfo.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZRegisterInfo.cpp vendor/llvm/dist/lib/Target/X86/Disassembler/X86Disassembler.cpp vendor/llvm/dist/lib/Target/X86/Disassembler/X86DisassemblerDecoder.c vendor/llvm/dist/lib/Target/X86/Disassembler/X86DisassemblerDecoder.h vendor/llvm/dist/lib/Target/X86/X86.td 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/X86InstrFormats.td vendor/llvm/dist/lib/Target/X86/X86InstrInfo.cpp vendor/llvm/dist/lib/Target/X86/X86InstrInfo.td vendor/llvm/dist/lib/Target/X86/X86InstrSSE.td vendor/llvm/dist/lib/Target/X86/X86Subtarget.cpp vendor/llvm/dist/lib/Target/X86/X86Subtarget.h vendor/llvm/dist/lib/Target/XCore/XCoreInstrInfo.cpp vendor/llvm/dist/lib/Target/XCore/XCoreRegisterInfo.cpp vendor/llvm/dist/lib/Transforms/IPO/Internalize.cpp vendor/llvm/dist/lib/Transforms/Scalar/IndVarSimplify.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopUnswitch.cpp vendor/llvm/dist/lib/Transforms/Utils/SSAUpdater.cpp vendor/llvm/dist/lib/VMCore/BasicBlock.cpp vendor/llvm/dist/lib/VMCore/Core.cpp vendor/llvm/dist/lib/VMCore/DebugLoc.cpp vendor/llvm/dist/lib/VMCore/Metadata.cpp vendor/llvm/dist/lib/VMCore/Pass.cpp vendor/llvm/dist/lib/VMCore/PassManager.cpp vendor/llvm/dist/lib/VMCore/PrintModulePass.cpp vendor/llvm/dist/test/CodeGen/X86/memset-2.ll vendor/llvm/dist/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp vendor/llvm/dist/tools/llvmc/plugins/Base/Base.td.in vendor/llvm/dist/utils/TableGen/CMakeLists.txt vendor/llvm/dist/utils/TableGen/DisassemblerEmitter.cpp vendor/llvm/dist/utils/TableGen/TableGen.cpp Modified: vendor/llvm/dist/Makefile.rules ============================================================================== --- vendor/llvm/dist/Makefile.rules Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/Makefile.rules Sat Apr 3 07:51:10 2010 (r206124) @@ -1612,6 +1612,11 @@ $(ObjDir)/%GenIntrinsics.inc.tmp : %.td $(Echo) "Building $(

-The goal of DragonEgg is to make -gcc-4.5 act like llvm-gcc without requiring any gcc modifications whatsoever. -DragonEgg is a shared library (dragonegg.so) -that is loaded by gcc at runtime. It ... +DragonEgg is a port of llvm-gcc to +gcc-4.5. Unlike llvm-gcc, which makes many intrusive changes to the underlying +gcc-4.2 code, dragonegg in theory does not require any gcc-4.5 modifications +whatsoever (currently one small patch is needed). This is thanks to the new +gcc plugin architecture, which +makes it possible to modify the behaviour of gcc at runtime by loading a plugin, +which is nothing more than a dynamic library which conforms to the gcc plugin +interface. DragonEgg is a gcc plugin that causes the LLVM optimizers to be run +instead of the gcc optimizers, and the LLVM code generators instead of the gcc +code generators, just like llvm-gcc. To use it, you add +"-fplugin=path/dragonegg.so" to the gcc-4.5 command line, and gcc-4.5 magically +becomes llvm-gcc-4.5! +

+ +

+DragonEgg is still a work in progress. Currently C works very well, while C++, +Ada and Fortran work fairly well. All other languages either don't work at all, +or only work poorly. For the moment only the x86-32 and x86-64 targets are +supported, and only on linux. +

+ +

+DragonEgg has not yet been released. Once gcc-4.5 has been released, dragonegg +will probably be released as part of the following LLVM release.

@@ -1058,7 +1078,7 @@ lists.

src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01"> LLVM Compiler Infrastructure
- Last modified: $Date: 2010-04-01 03:53:24 +0200 (Thu, 01 Apr 2010) $ + Last modified: $Date: 2010-04-02 11:23:15 +0200 (Fri, 02 Apr 2010) $ Modified: vendor/llvm/dist/include/llvm/Analysis/DebugInfo.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/DebugInfo.h Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/include/llvm/Analysis/DebugInfo.h Sat Apr 3 07:51:10 2010 (r206124) @@ -31,8 +31,6 @@ namespace llvm { class Type; class Value; class DbgDeclareInst; - class DebugLoc; - struct DebugLocTracker; class Instruction; class MDNode; class LLVMContext; @@ -710,11 +708,6 @@ namespace llvm { std::string &Type, unsigned &LineNo, std::string &File, std::string &Dir); - /// ExtractDebugLocation - Extract debug location information - /// from DILocation. - DebugLoc ExtractDebugLocation(DILocation &Loc, - DebugLocTracker &DebugLocInfo); - /// getDISubprogram - Find subprogram that is enclosing this scope. DISubprogram getDISubprogram(MDNode *Scope); Modified: vendor/llvm/dist/include/llvm/Analysis/LoopPass.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/LoopPass.h Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/include/llvm/Analysis/LoopPass.h Sat Apr 3 07:51:10 2010 (r206124) @@ -31,6 +31,10 @@ public: explicit LoopPass(intptr_t pid) : Pass(PT_Loop, pid) {} explicit LoopPass(void *pid) : Pass(PT_Loop, pid) {} + /// getPrinterPass - Get a pass to print the function corresponding + /// to a Loop. + Pass *createPrinterPass(raw_ostream &O, const std::string &Banner) const; + // runOnLoop - This method should be implemented by the subclass to perform // whatever action is necessary for the specified Loop. virtual bool runOnLoop(Loop *L, LPPassManager &LPM) = 0; Modified: vendor/llvm/dist/include/llvm/Assembly/PrintModulePass.h ============================================================================== --- vendor/llvm/dist/include/llvm/Assembly/PrintModulePass.h Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/include/llvm/Assembly/PrintModulePass.h Sat Apr 3 07:51:10 2010 (r206124) @@ -27,7 +27,9 @@ namespace llvm { /// createPrintModulePass - Create and return a pass that writes the /// module to the specified raw_ostream. - ModulePass *createPrintModulePass(raw_ostream *OS, bool DeleteStream=false); + ModulePass *createPrintModulePass(raw_ostream *OS, + bool DeleteStream=false, + const std::string &Banner = ""); /// createPrintFunctionPass - Create and return a pass that prints /// functions to the specified raw_ostream as they are processed. Modified: vendor/llvm/dist/include/llvm/BasicBlock.h ============================================================================== --- vendor/llvm/dist/include/llvm/BasicBlock.h Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/include/llvm/BasicBlock.h Sat Apr 3 07:51:10 2010 (r206124) @@ -131,6 +131,12 @@ public: const Instruction* getFirstNonPHI() const { return const_cast(this)->getFirstNonPHI(); } + + // Same as above, but also skip debug intrinsics. + Instruction* getFirstNonPHIOrDbg(); + const Instruction* getFirstNonPHIOrDbg() const { + return const_cast(this)->getFirstNonPHIOrDbg(); + } /// removeFromParent - This method unlinks 'this' from the containing /// function, but does not delete it. Modified: vendor/llvm/dist/include/llvm/Bitcode/LLVMBitCodes.h ============================================================================== --- vendor/llvm/dist/include/llvm/Bitcode/LLVMBitCodes.h Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/include/llvm/Bitcode/LLVMBitCodes.h Sat Apr 3 07:51:10 2010 (r206124) @@ -240,7 +240,10 @@ namespace bitc { // new select on i1 or [N x i1] FUNC_CODE_INST_VSELECT = 29, // VSELECT: [ty,opval,opval,predty,pred] FUNC_CODE_INST_INBOUNDS_GEP= 30, // INBOUNDS_GEP: [n x operands] - FUNC_CODE_INST_INDIRECTBR = 31 // INDIRECTBR: [opty, op0, op1, ...] + FUNC_CODE_INST_INDIRECTBR = 31, // INDIRECTBR: [opty, op0, op1, ...] + + FUNC_CODE_DEBUG_LOC = 32, // DEBUG_LOC: [Line,Col,ScopeVal, IAVal] + FUNC_CODE_DEBUG_LOC_AGAIN = 33 // DEBUG_LOC_AGAIN }; } // End bitc namespace } // End llvm namespace Modified: vendor/llvm/dist/include/llvm/CallGraphSCCPass.h ============================================================================== --- vendor/llvm/dist/include/llvm/CallGraphSCCPass.h Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/include/llvm/CallGraphSCCPass.h Sat Apr 3 07:51:10 2010 (r206124) @@ -35,6 +35,10 @@ struct CallGraphSCCPass : public Pass { explicit CallGraphSCCPass(intptr_t pid) : Pass(PT_CallGraphSCC, pid) {} explicit CallGraphSCCPass(void *pid) : Pass(PT_CallGraphSCC, pid) {} + /// createPrinterPass - Get a pass that prints the Module + /// corresponding to a CallGraph. + Pass *createPrinterPass(raw_ostream &O, const std::string &Banner) const; + /// doInitialization - This method is called before the SCC's of the program /// has been processed, allowing the pass to do initialization as necessary. virtual bool doInitialization(CallGraph &CG) { Modified: vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h Sat Apr 3 07:51:10 2010 (r206124) @@ -19,6 +19,7 @@ #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/Support/DebugLoc.h" #include "llvm/Target/TargetMachine.h" +#include "llvm/ADT/DenseMap.h" namespace llvm { class BlockAddress; Modified: vendor/llvm/dist/include/llvm/CodeGen/MachineFunction.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/MachineFunction.h Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/include/llvm/CodeGen/MachineFunction.h Sat Apr 3 07:51:10 2010 (r206124) @@ -26,7 +26,6 @@ namespace llvm { -class DILocation; class Value; class Function; class MachineRegisterInfo; @@ -112,9 +111,6 @@ class MachineFunction { // of a function. DebugLoc DefaultDebugLoc; - // Tracks debug locations. - DebugLocTracker DebugLocInfo; - /// FunctionNumber - This provides a unique ID for each function emitted in /// this translation unit. /// @@ -402,9 +398,6 @@ public: // Debug location. // - /// getDILocation - Get the DILocation for a given DebugLoc object. - DILocation getDILocation(DebugLoc DL) const; - /// getDefaultDebugLoc - Get the default debug location for the machine /// function. DebugLoc getDefaultDebugLoc() const { return DefaultDebugLoc; } @@ -412,9 +405,6 @@ public: /// setDefaultDebugLoc - Get the default debug location for the machine /// function. void setDefaultDebugLoc(DebugLoc DL) { DefaultDebugLoc = DL; } - - /// getDebugLocInfo - Get the debug info location tracker. - DebugLocTracker &getDebugLocInfo() { return DebugLocInfo; } }; //===--------------------------------------------------------------------===// Modified: vendor/llvm/dist/include/llvm/CodeGen/MachineFunctionPass.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/MachineFunctionPass.h Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/include/llvm/CodeGen/MachineFunctionPass.h Sat Apr 3 07:51:10 2010 (r206124) @@ -34,6 +34,9 @@ protected: explicit MachineFunctionPass(intptr_t ID) : FunctionPass(ID) {} explicit MachineFunctionPass(void *ID) : FunctionPass(ID) {} + /// createPrinterPass - Get a machine function printer pass. + Pass *createPrinterPass(raw_ostream &O, const std::string &Banner) const; + /// runOnMachineFunction - This method must be overloaded to perform the /// desired machine code transformation or analysis. /// Modified: vendor/llvm/dist/include/llvm/CodeGen/MachineInstr.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/MachineInstr.h Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/include/llvm/CodeGen/MachineInstr.h Sat Apr 3 07:51:10 2010 (r206124) @@ -16,12 +16,13 @@ #ifndef LLVM_CODEGEN_MACHINEINSTR_H #define LLVM_CODEGEN_MACHINEINSTR_H -#include "llvm/ADT/ilist.h" -#include "llvm/ADT/ilist_node.h" -#include "llvm/ADT/STLExtras.h" #include "llvm/CodeGen/MachineOperand.h" #include "llvm/Target/TargetInstrDesc.h" #include "llvm/Target/TargetOpcodes.h" +#include "llvm/ADT/ilist.h" +#include "llvm/ADT/ilist_node.h" +#include "llvm/ADT/STLExtras.h" +#include "llvm/ADT/DenseMapInfo.h" #include "llvm/Support/DebugLoc.h" #include Modified: vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfo.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfo.h Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfo.h Sat Apr 3 07:51:10 2010 (r206124) @@ -37,6 +37,7 @@ #include "llvm/CodeGen/MachineLocation.h" #include "llvm/MC/MCContext.h" #include "llvm/Support/Dwarf.h" +#include "llvm/Support/DebugLoc.h" #include "llvm/Support/ValueHandle.h" #include "llvm/System/DataTypes.h" #include "llvm/ADT/DenseMap.h" @@ -156,8 +157,8 @@ class MachineModuleInfo : public Immutab public: static char ID; // Pass identification, replacement for typeid - typedef std::pair > UnsignedAndMDNodePair; - typedef SmallVector< std::pair, UnsignedAndMDNodePair>, 4> + typedef std::pair UnsignedDebugLocPair; + typedef SmallVector, UnsignedDebugLocPair>, 4> VariableDbgInfoMapTy; VariableDbgInfoMapTy VariableDbgInfo; @@ -330,10 +331,10 @@ public: /// of one is required to emit exception handling info. Function *getPersonality() const; - /// setVariableDbgInfo - Collect information used to emit debugging information - /// of a variable. - void setVariableDbgInfo(MDNode *N, unsigned Slot, MDNode *Scope) { - VariableDbgInfo.push_back(std::make_pair(N, std::make_pair(Slot, Scope))); + /// setVariableDbgInfo - Collect information used to emit debugging + /// information of a variable. + void setVariableDbgInfo(MDNode *N, unsigned Slot, DebugLoc Loc) { + VariableDbgInfo.push_back(std::make_pair(N, std::make_pair(Slot, Loc))); } VariableDbgInfoMapTy &getVariableDbgInfo() { return VariableDbgInfo; } Modified: vendor/llvm/dist/include/llvm/CodeGen/Passes.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/Passes.h Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/include/llvm/CodeGen/Passes.h Sat Apr 3 07:51:10 2010 (r206124) @@ -21,6 +21,7 @@ namespace llvm { class FunctionPass; + class MachineFunctionPass; class PassInfo; class TargetLowering; class RegisterCoalescer; @@ -36,8 +37,9 @@ namespace llvm { /// MachineFunctionPrinter pass - This pass prints out the machine function to /// the given stream, as a debugging tool. - FunctionPass *createMachineFunctionPrinterPass(raw_ostream &OS, - const std::string &Banner =""); + MachineFunctionPass * + createMachineFunctionPrinterPass(raw_ostream &OS, + const std::string &Banner =""); /// MachineLoopInfo pass - This pass is a loop analysis pass. /// Modified: vendor/llvm/dist/include/llvm/CodeGen/SelectionDAG.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/SelectionDAG.h Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/include/llvm/CodeGen/SelectionDAG.h Sat Apr 3 07:51:10 2010 (r206124) @@ -461,8 +461,7 @@ public: SDValue getCALLSEQ_START(SDValue Chain, SDValue Op) { SDVTList VTs = getVTList(MVT::Other, MVT::Flag); SDValue Ops[] = { Chain, Op }; - return getNode(ISD::CALLSEQ_START, DebugLoc::getUnknownLoc(), - VTs, Ops, 2); + return getNode(ISD::CALLSEQ_START, DebugLoc(), VTs, Ops, 2); } /// getCALLSEQ_END - Return a new CALLSEQ_END node, which always must have a @@ -476,20 +475,19 @@ public: Ops.push_back(Op1); Ops.push_back(Op2); Ops.push_back(InFlag); - return getNode(ISD::CALLSEQ_END, DebugLoc::getUnknownLoc(), NodeTys, - &Ops[0], + return getNode(ISD::CALLSEQ_END, DebugLoc(), NodeTys, &Ops[0], (unsigned)Ops.size() - (InFlag.getNode() == 0 ? 1 : 0)); } /// getUNDEF - Return an UNDEF node. UNDEF does not have a useful DebugLoc. SDValue getUNDEF(EVT VT) { - return getNode(ISD::UNDEF, DebugLoc::getUnknownLoc(), VT); + return getNode(ISD::UNDEF, DebugLoc(), VT); } /// getGLOBAL_OFFSET_TABLE - Return a GLOBAL_OFFSET_TABLE node. This does /// not have a useful DebugLoc. SDValue getGLOBAL_OFFSET_TABLE(EVT VT) { - return getNode(ISD::GLOBAL_OFFSET_TABLE, DebugLoc::getUnknownLoc(), VT); + return getNode(ISD::GLOBAL_OFFSET_TABLE, DebugLoc(), VT); } /// getNode - Gets or creates the specified node. Modified: vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGNodes.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGNodes.h Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGNodes.h Sat Apr 3 07:51:10 2010 (r206124) @@ -1569,8 +1569,7 @@ public: #else explicit HandleSDNode(SDValue X) #endif - : SDNode(ISD::HANDLENODE, DebugLoc::getUnknownLoc(), - getSDVTList(MVT::Other)) { + : SDNode(ISD::HANDLENODE, DebugLoc(), getSDVTList(MVT::Other)) { InitOperands(&Op, X); } ~HandleSDNode(); @@ -1801,7 +1800,7 @@ class ConstantSDNode : public SDNode { friend class SelectionDAG; ConstantSDNode(bool isTarget, const ConstantInt *val, EVT VT) : SDNode(isTarget ? ISD::TargetConstant : ISD::Constant, - DebugLoc::getUnknownLoc(), getSDVTList(VT)), Value(val) { + DebugLoc(), getSDVTList(VT)), Value(val) { } public: @@ -1825,7 +1824,7 @@ class ConstantFPSDNode : public SDNode { friend class SelectionDAG; ConstantFPSDNode(bool isTarget, const ConstantFP *val, EVT VT) : SDNode(isTarget ? ISD::TargetConstantFP : ISD::ConstantFP, - DebugLoc::getUnknownLoc(), getSDVTList(VT)), Value(val) { + DebugLoc(), getSDVTList(VT)), Value(val) { } public: @@ -1896,7 +1895,7 @@ class FrameIndexSDNode : public SDNode { friend class SelectionDAG; FrameIndexSDNode(int fi, EVT VT, bool isTarg) : SDNode(isTarg ? ISD::TargetFrameIndex : ISD::FrameIndex, - DebugLoc::getUnknownLoc(), getSDVTList(VT)), FI(fi) { + DebugLoc(), getSDVTList(VT)), FI(fi) { } public: @@ -1915,7 +1914,7 @@ class JumpTableSDNode : public SDNode { friend class SelectionDAG; JumpTableSDNode(int jti, EVT VT, bool isTarg, unsigned char TF) : SDNode(isTarg ? ISD::TargetJumpTable : ISD::JumpTable, - DebugLoc::getUnknownLoc(), getSDVTList(VT)), JTI(jti), TargetFlags(TF) { + DebugLoc(), getSDVTList(VT)), JTI(jti), TargetFlags(TF) { } public: @@ -1941,7 +1940,7 @@ class ConstantPoolSDNode : public SDNode ConstantPoolSDNode(bool isTarget, Constant *c, EVT VT, int o, unsigned Align, unsigned char TF) : SDNode(isTarget ? ISD::TargetConstantPool : ISD::ConstantPool, - DebugLoc::getUnknownLoc(), + DebugLoc(), getSDVTList(VT)), Offset(o), Alignment(Align), TargetFlags(TF) { assert((int)Offset >= 0 && "Offset is too large"); Val.ConstVal = c; @@ -1949,7 +1948,7 @@ class ConstantPoolSDNode : public SDNode ConstantPoolSDNode(bool isTarget, MachineConstantPoolValue *v, EVT VT, int o, unsigned Align, unsigned char TF) : SDNode(isTarget ? ISD::TargetConstantPool : ISD::ConstantPool, - DebugLoc::getUnknownLoc(), + DebugLoc(), getSDVTList(VT)), Offset(o), Alignment(Align), TargetFlags(TF) { assert((int)Offset >= 0 && "Offset is too large"); Val.MachineCPVal = v; @@ -1997,8 +1996,7 @@ class BasicBlockSDNode : public SDNode { /// blocks out of order when they're jumped to, which makes it a bit /// harder. Let's see if we need it first. explicit BasicBlockSDNode(MachineBasicBlock *mbb) - : SDNode(ISD::BasicBlock, DebugLoc::getUnknownLoc(), - getSDVTList(MVT::Other)), MBB(mbb) { + : SDNode(ISD::BasicBlock, DebugLoc(), getSDVTList(MVT::Other)), MBB(mbb) { } public: @@ -2044,8 +2042,7 @@ class SrcValueSDNode : public SDNode { friend class SelectionDAG; /// Create a SrcValue for a general value. explicit SrcValueSDNode(const Value *v) - : SDNode(ISD::SRCVALUE, DebugLoc::getUnknownLoc(), - getSDVTList(MVT::Other)), V(v) {} + : SDNode(ISD::SRCVALUE, DebugLoc(), getSDVTList(MVT::Other)), V(v) {} public: /// getValue - return the contained Value. @@ -2062,8 +2059,7 @@ class RegisterSDNode : public SDNode { unsigned Reg; friend class SelectionDAG; RegisterSDNode(unsigned reg, EVT VT) - : SDNode(ISD::Register, DebugLoc::getUnknownLoc(), - getSDVTList(VT)), Reg(reg) { + : SDNode(ISD::Register, DebugLoc(), getSDVTList(VT)), Reg(reg) { } public: @@ -2081,7 +2077,7 @@ class BlockAddressSDNode : public SDNode friend class SelectionDAG; BlockAddressSDNode(unsigned NodeTy, EVT VT, BlockAddress *ba, unsigned char Flags) - : SDNode(NodeTy, DebugLoc::getUnknownLoc(), getSDVTList(VT)), + : SDNode(NodeTy, DebugLoc(), getSDVTList(VT)), BA(ba), TargetFlags(Flags) { } public: @@ -2119,8 +2115,7 @@ class ExternalSymbolSDNode : public SDNo friend class SelectionDAG; ExternalSymbolSDNode(bool isTarget, const char *Sym, unsigned char TF, EVT VT) : SDNode(isTarget ? ISD::TargetExternalSymbol : ISD::ExternalSymbol, - DebugLoc::getUnknownLoc(), - getSDVTList(VT)), Symbol(Sym), TargetFlags(TF) { + DebugLoc(), getSDVTList(VT)), Symbol(Sym), TargetFlags(TF) { } public: @@ -2138,8 +2133,8 @@ class CondCodeSDNode : public SDNode { ISD::CondCode Condition; friend class SelectionDAG; explicit CondCodeSDNode(ISD::CondCode Cond) - : SDNode(ISD::CONDCODE, DebugLoc::getUnknownLoc(), - getSDVTList(MVT::Other)), Condition(Cond) { + : SDNode(ISD::CONDCODE, DebugLoc(), getSDVTList(MVT::Other)), + Condition(Cond) { } public: @@ -2296,8 +2291,8 @@ class VTSDNode : public SDNode { EVT ValueType; friend class SelectionDAG; explicit VTSDNode(EVT VT) - : SDNode(ISD::VALUETYPE, DebugLoc::getUnknownLoc(), - getSDVTList(MVT::Other)), ValueType(VT) { + : SDNode(ISD::VALUETYPE, DebugLoc(), getSDVTList(MVT::Other)), + ValueType(VT) { } public: Modified: vendor/llvm/dist/include/llvm/CodeGen/SlotIndexes.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/SlotIndexes.h Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/include/llvm/CodeGen/SlotIndexes.h Sat Apr 3 07:51:10 2010 (r206124) @@ -22,11 +22,11 @@ #ifndef LLVM_CODEGEN_SLOTINDEXES_H #define LLVM_CODEGEN_SLOTINDEXES_H -#include "llvm/ADT/PointerIntPair.h" -#include "llvm/ADT/SmallVector.h" #include "llvm/CodeGen/MachineBasicBlock.h" #include "llvm/CodeGen/MachineFunctionPass.h" -#include "llvm/CodeGen/MachineInstr.h" +#include "llvm/ADT/PointerIntPair.h" +#include "llvm/ADT/SmallVector.h" +#include "llvm/ADT/DenseMap.h" #include "llvm/Support/Allocator.h" #include "llvm/Support/ErrorHandling.h" Modified: vendor/llvm/dist/include/llvm/Instruction.h ============================================================================== --- vendor/llvm/dist/include/llvm/Instruction.h Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/include/llvm/Instruction.h Sat Apr 3 07:51:10 2010 (r206124) @@ -32,7 +32,7 @@ class Instruction : public User, public Instruction(const Instruction &); // Do not implement BasicBlock *Parent; - NewDebugLoc DbgLoc; // 'dbg' Metadata cache. + DebugLoc DbgLoc; // 'dbg' Metadata cache. enum { /// HasMetadataBit - This is a bit stored in the SubClassData field which @@ -181,10 +181,10 @@ public: } /// setDebugLoc - Set the debug location information for this instruction. - void setDebugLoc(const NewDebugLoc &Loc) { DbgLoc = Loc; } + void setDebugLoc(const DebugLoc &Loc) { DbgLoc = Loc; } /// getDebugLoc - Return the debug location for this node as a DebugLoc. - const NewDebugLoc &getDebugLoc() const { return DbgLoc; } + const DebugLoc &getDebugLoc() const { return DbgLoc; } private: /// hasMetadataHashEntry - Return true if we have an entry in the on-the-side Modified: vendor/llvm/dist/include/llvm/IntrinsicsX86.td ============================================================================== --- vendor/llvm/dist/include/llvm/IntrinsicsX86.td Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/include/llvm/IntrinsicsX86.td Sat Apr 3 07:51:10 2010 (r206124) @@ -782,7 +782,7 @@ let TargetPrefix = "x86" in { // All in // Advanced Encryption Standard (AES) Instructions let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". def int_x86_aesni_aesimc : GCCBuiltin<"__builtin_ia32_aesimc128">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], + Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty], [IntrNoMem]>; def int_x86_aesni_aesenc : GCCBuiltin<"__builtin_ia32_aesenc128">, Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], @@ -797,7 +797,7 @@ let TargetPrefix = "x86" in { // All in Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>; def int_x86_aesni_aeskeygenassist : - GCCBuiltin<"__builtin_ia32_aeskeygenassist">, + GCCBuiltin<"__builtin_ia32_aeskeygenassist128">, Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem]>; } Modified: vendor/llvm/dist/include/llvm/Pass.h ============================================================================== --- vendor/llvm/dist/include/llvm/Pass.h Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/include/llvm/Pass.h Sat Apr 3 07:51:10 2010 (r206124) @@ -30,7 +30,9 @@ #define LLVM_PASS_H #include "llvm/System/DataTypes.h" + #include +#include #include #include @@ -120,6 +122,11 @@ public: virtual void print(raw_ostream &O, const Module *M) const; void dump() const; // dump - Print to stderr. + /// createPrinterPass - Get a Pass appropriate to print the IR this + /// pass operates one (Module, Function or MachineFunction). + virtual Pass *createPrinterPass(raw_ostream &O, + const std::string &Banner) const = 0; + /// Each pass is responsible for assigning a pass manager to itself. /// PMS is the stack of available pass manager. virtual void assignPassManager(PMStack &, @@ -233,6 +240,9 @@ public: /// class ModulePass : public Pass { public: + /// createPrinterPass - Get a module printer pass. + Pass *createPrinterPass(raw_ostream &O, const std::string &Banner) const; + /// runOnModule - Virtual method overriden by subclasses to process the module /// being operated on. virtual bool runOnModule(Module &M) = 0; @@ -293,6 +303,9 @@ public: explicit FunctionPass(intptr_t pid) : Pass(PT_Function, pid) {} explicit FunctionPass(const void *pid) : Pass(PT_Function, pid) {} + /// createPrinterPass - Get a function printer pass. + Pass *createPrinterPass(raw_ostream &O, const std::string &Banner) const; + /// doInitialization - Virtual method overridden by subclasses to do /// any necessary per-module initialization. /// @@ -343,6 +356,9 @@ public: explicit BasicBlockPass(intptr_t pid) : Pass(PT_BasicBlock, pid) {} explicit BasicBlockPass(const void *pid) : Pass(PT_BasicBlock, pid) {} + /// createPrinterPass - Get a function printer pass. + Pass *createPrinterPass(raw_ostream &O, const std::string &Banner) const; + /// doInitialization - Virtual method overridden by subclasses to do /// any necessary per-module initialization. /// Modified: vendor/llvm/dist/include/llvm/Support/Allocator.h ============================================================================== --- vendor/llvm/dist/include/llvm/Support/Allocator.h Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/include/llvm/Support/Allocator.h Sat Apr 3 07:51:10 2010 (r206124) @@ -200,7 +200,7 @@ public: while (Slab) { char *End = Slab == Allocator.CurSlab ? Allocator.CurPtr : (char *)Slab + Slab->Size; - for (char *Ptr = (char*)Slab+1; Ptr < End; Ptr += sizeof(T)) { + for (char *Ptr = (char*)(Slab+1); Ptr < End; Ptr += sizeof(T)) { Ptr = Allocator.AlignPtr(Ptr, alignof()); if (Ptr + sizeof(T) <= End) reinterpret_cast(Ptr)->~T(); Modified: vendor/llvm/dist/include/llvm/Support/DebugLoc.h ============================================================================== --- vendor/llvm/dist/include/llvm/Support/DebugLoc.h Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/include/llvm/Support/DebugLoc.h Sat Apr 3 07:51:10 2010 (r206124) @@ -12,11 +12,8 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_DEBUGLOC_H -#define LLVM_DEBUGLOC_H - -#include "llvm/ADT/DenseMap.h" -#include +#ifndef LLVM_SUPPORT_DEBUGLOC_H +#define LLVM_SUPPORT_DEBUGLOC_H namespace llvm { class MDNode; @@ -25,7 +22,7 @@ namespace llvm { /// DebugLoc - Debug location id. This is carried by Instruction, SDNode, /// and MachineInstr to compactly encode file/line/scope information for an /// operation. - class NewDebugLoc { + class DebugLoc { /// LineCol - This 32-bit value encodes the line and column number for the /// location, encoded as 24-bits for line and 8 bits for col. A value of 0 /// for either means unknown. @@ -35,15 +32,15 @@ namespace llvm { /// decoded by LLVMContext. 0 is unknown. int ScopeIdx; public: - NewDebugLoc() : LineCol(0), ScopeIdx(0) {} // Defaults to unknown. + DebugLoc() : LineCol(0), ScopeIdx(0) {} // Defaults to unknown. /// get - Get a new DebugLoc that corresponds to the specified line/col /// scope/inline location. - static NewDebugLoc get(unsigned Line, unsigned Col, - MDNode *Scope, MDNode *InlinedAt = 0); + static DebugLoc get(unsigned Line, unsigned Col, + MDNode *Scope, MDNode *InlinedAt = 0); - /// getFromDILocation - Translate the DILocation quad into a NewDebugLoc. - static NewDebugLoc getFromDILocation(MDNode *N); + /// getFromDILocation - Translate the DILocation quad into a DebugLoc. + static DebugLoc getFromDILocation(MDNode *N); /// isUnknown - Return true if this is an unknown location. bool isUnknown() const { return ScopeIdx == 0; } @@ -73,48 +70,11 @@ namespace llvm { /// DILocation compatible MDNode. MDNode *getAsMDNode(const LLVMContext &Ctx) const; - bool operator==(const NewDebugLoc &DL) const { + bool operator==(const DebugLoc &DL) const { return LineCol == DL.LineCol && ScopeIdx == DL.ScopeIdx; } - bool operator!=(const NewDebugLoc &DL) const { return !(*this == DL); } - }; - - - - /// DebugLoc - Debug location id. This is carried by SDNode and MachineInstr - /// to index into a vector of unique debug location tuples. - class DebugLoc { - unsigned Idx; - public: - DebugLoc() : Idx(~0U) {} // Defaults to invalid. - - static DebugLoc getUnknownLoc() { DebugLoc L; L.Idx = ~0U; return L; } - static DebugLoc get(unsigned idx) { DebugLoc L; L.Idx = idx; return L; } - - unsigned getIndex() const { return Idx; } - - /// isUnknown - Return true if there is no debug info for the SDNode / - /// MachineInstr. - bool isUnknown() const { return Idx == ~0U; } - - bool operator==(const DebugLoc &DL) const { return Idx == DL.Idx; } bool operator!=(const DebugLoc &DL) const { return !(*this == DL); } }; - - /// DebugLocTracker - This class tracks debug location information. - /// - struct DebugLocTracker { - /// DebugLocations - A vector of unique DebugLocTuple's. - /// - std::vector DebugLocations; - - /// DebugIdMap - This maps DebugLocTuple's to indices into the - /// DebugLocations vector. - DenseMap DebugIdMap; - - DebugLocTracker() {} - }; - } // end namespace llvm #endif /* LLVM_DEBUGLOC_H */ Modified: vendor/llvm/dist/include/llvm/Support/IRBuilder.h ============================================================================== --- vendor/llvm/dist/include/llvm/Support/IRBuilder.h Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/include/llvm/Support/IRBuilder.h Sat Apr 3 07:51:10 2010 (r206124) @@ -40,7 +40,7 @@ protected: /// IRBuilderBase - Common base class shared among various IRBuilders. class IRBuilderBase { - NewDebugLoc CurDbgLocation; + DebugLoc CurDbgLocation; protected: BasicBlock *BB; BasicBlock::iterator InsertPt; @@ -82,13 +82,13 @@ public: /// SetCurrentDebugLocation - Set location information used by debugging /// information. - void SetCurrentDebugLocation(const NewDebugLoc &L) { + void SetCurrentDebugLocation(const DebugLoc &L) { CurDbgLocation = L; } /// getCurrentDebugLocation - Get location information used by debugging /// information. - const NewDebugLoc &getCurrentDebugLocation() const { return CurDbgLocation; } + const DebugLoc &getCurrentDebugLocation() const { return CurDbgLocation; } /// SetInstDebugLocation - If this builder has a current debug location, set /// it on the specified instruction. Modified: vendor/llvm/dist/include/llvm/Support/MathExtras.h ============================================================================== --- vendor/llvm/dist/include/llvm/Support/MathExtras.h Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/include/llvm/Support/MathExtras.h Sat Apr 3 07:51:10 2010 (r206124) @@ -457,6 +457,18 @@ inline int64_t abs64(int64_t x) { return (x < 0) ? -x : x; } +/// SignExtend32 - Sign extend B-bit number x to 32-bit int. +/// Usage int32_t r = SignExtend32<5>(x); +template inline int32_t SignExtend32(int32_t x) { + return (x << (32 - B)) >> (32 - B); +} + +/// SignExtend64 - Sign extend B-bit number x to 64-bit int. +/// Usage int64_t r = SignExtend64<5>(x); +template inline int64_t SignExtend64(int32_t x) { + return (x << (64 - B)) >> (64 - B); +} + } // End llvm namespace #endif Modified: vendor/llvm/dist/include/llvm/Support/SlowOperationInformer.h ============================================================================== --- vendor/llvm/dist/include/llvm/Support/SlowOperationInformer.h Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/include/llvm/Support/SlowOperationInformer.h Sat Apr 3 07:51:10 2010 (r206124) @@ -41,7 +41,7 @@ namespace llvm { SlowOperationInformer(const SlowOperationInformer&); // DO NOT IMPLEMENT void operator=(const SlowOperationInformer&); // DO NOT IMPLEMENT public: - SlowOperationInformer(const std::string &Name); + explicit SlowOperationInformer(const std::string &Name); ~SlowOperationInformer(); /// progress - Clients should periodically call this method when they can Modified: vendor/llvm/dist/include/llvm/Target/TargetLowering.h ============================================================================== --- vendor/llvm/dist/include/llvm/Target/TargetLowering.h Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/include/llvm/Target/TargetLowering.h Sat Apr 3 07:51:10 2010 (r206124) @@ -633,15 +633,19 @@ public: } /// getOptimalMemOpType - Returns the target specific optimal type for load - /// and store operations as a result of memset, memcpy, and memmove lowering. - /// If DstAlign is zero that means it's safe to destination alignment can - /// satisfy any constraint. Similarly if SrcAlign is zero it means there isn't - /// a need to check it against alignment requirement, probably because the - /// source does not need to be loaded. It returns EVT::Other if SelectionDAG - /// should be responsible for determining it. + /// and store operations as a result of memset, memcpy, and memmove + /// lowering. If DstAlign is zero that means it's safe to destination + /// alignment can satisfy any constraint. Similarly if SrcAlign is zero it + /// means there isn't a need to check it against alignment requirement, + /// probably because the source does not need to be loaded. If + /// 'NonScalarIntSafe' is true, that means it's safe to return a + /// non-scalar-integer type, e.g. empty string source, constant, or loaded + /// from memory. It returns EVT::Other if SelectionDAG should be responsible + /// for determining it. virtual EVT getOptimalMemOpType(uint64_t Size, unsigned DstAlign, unsigned SrcAlign, - bool SafeToUseFP, SelectionDAG &DAG) const { + bool NonScalarIntSafe, + SelectionDAG &DAG) const { return MVT::Other; } Modified: vendor/llvm/dist/include/llvm/Transforms/Utils/SSAUpdater.h ============================================================================== --- vendor/llvm/dist/include/llvm/Transforms/Utils/SSAUpdater.h Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/include/llvm/Transforms/Utils/SSAUpdater.h Sat Apr 3 07:51:10 2010 (r206124) @@ -27,28 +27,22 @@ namespace llvm { /// transformation wants to rewrite a set of uses of one value with uses of a /// set of values. class SSAUpdater { -public: - class BBInfo; - -private: /// AvailableVals - This keeps track of which value to use on a per-block - /// basis. When we insert PHI nodes, we keep track of them here. - //typedef DenseMap AvailableValsTy; + /// basis. When we insert PHI nodes, we keep track of them here. We use + /// TrackingVH's for the value of the map because we RAUW PHI nodes when we + /// eliminate them, and want the TrackingVH's to track this. + //typedef DenseMap > AvailableValsTy; void *AV; /// PrototypeValue is an arbitrary representative value, which we derive names /// and a type for PHI nodes. Value *PrototypeValue; - /// BBMap - The GetValueAtEndOfBlock method maintains this mapping from - /// basic blocks to BBInfo structures. - /// typedef DenseMap BBMapTy; - void *BM; - - /// Allocator - The GetValueAtEndOfBlock method uses this BumpPtrAllocator to - /// hold its internal data. The allocator and its storage is created and - /// discarded for each invocation of GetValueAtEndOfBlock. - void *BPA; + /// IncomingPredInfo - We use this as scratch space when doing our recursive + /// walk. This should only be used in GetValueInBlockInternal, normally it + /// should be empty. + //std::vector > > IncomingPredInfo; + void *IPI; /// InsertedPHIs - If this is non-null, the SSAUpdater adds all PHI nodes that /// it creates to the vector. @@ -105,14 +99,6 @@ public: private: Value *GetValueAtEndOfBlockInternal(BasicBlock *BB); - void FindPHIPlacement(BasicBlock *BB, BBInfo *Info, bool &Changed, - unsigned Counter); - void FindAvailableVal(BasicBlock *BB, BBInfo *Info, unsigned Counter); - void FindExistingPHI(BasicBlock *BB); - bool CheckIfPHIMatches(PHINode *PHI); - void RecordMatchingPHI(PHINode *PHI); - void ClearPHITags(PHINode *PHI); - void operator=(const SSAUpdater&); // DO NOT IMPLEMENT SSAUpdater(const SSAUpdater&); // DO NOT IMPLEMENT }; Modified: vendor/llvm/dist/lib/Analysis/DebugInfo.cpp ============================================================================== --- vendor/llvm/dist/lib/Analysis/DebugInfo.cpp Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/lib/Analysis/DebugInfo.cpp Sat Apr 3 07:51:10 2010 (r206124) @@ -24,7 +24,6 @@ #include "llvm/ADT/SmallPtrSet.h" #include "llvm/Support/Debug.h" #include "llvm/Support/Dwarf.h" -#include "llvm/Support/DebugLoc.h" #include "llvm/Support/raw_ostream.h" using namespace llvm; using namespace llvm::dwarf; @@ -1147,16 +1146,31 @@ Instruction *DIFactory::InsertDbgValueIn /// processModule - Process entire module and collect debug info. void DebugInfoFinder::processModule(Module &M) { - unsigned MDDbgKind = M.getMDKindID("dbg"); - for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) for (Function::iterator FI = (*I).begin(), FE = (*I).end(); FI != FE; ++FI) for (BasicBlock::iterator BI = (*FI).begin(), BE = (*FI).end(); BI != BE; ++BI) { - if (DbgDeclareInst *DDI = dyn_cast(BI)) + if (DbgDeclareInst *DDI = dyn_cast(BI)) { processDeclare(DDI); - else if (MDNode *L = BI->getMetadata(MDDbgKind)) - processLocation(DILocation(L)); + continue; + } + + DebugLoc Loc = BI->getDebugLoc(); + if (Loc.isUnknown()) + continue; + + LLVMContext &Ctx = BI->getContext(); + DIDescriptor Scope(Loc.getScope(Ctx)); + + if (Scope.isCompileUnit()) + addCompileUnit(DICompileUnit(Scope.getNode())); + else if (Scope.isSubprogram()) + processSubprogram(DISubprogram(Scope.getNode())); + else if (Scope.isLexicalBlock()) + processLexicalBlock(DILexicalBlock(Scope.getNode())); + + if (MDNode *IA = Loc.getInlinedAt(Ctx)) + processLocation(DILocation(IA)); } NamedMDNode *NMD = M.getNamedMetadata("llvm.dbg.gv"); @@ -1372,23 +1386,6 @@ bool llvm::getLocationInfo(const Value * return true; } -/// ExtractDebugLocation - Extract debug location information -/// from DILocation. -DebugLoc llvm::ExtractDebugLocation(DILocation &Loc, - DebugLocTracker &DebugLocInfo) { - DenseMap::iterator II - = DebugLocInfo.DebugIdMap.find(Loc.getNode()); - if (II != DebugLocInfo.DebugIdMap.end()) - return DebugLoc::get(II->second); - - // Add a new location entry. - unsigned Id = DebugLocInfo.DebugLocations.size(); - DebugLocInfo.DebugLocations.push_back(Loc.getNode()); - DebugLocInfo.DebugIdMap[Loc.getNode()] = Id; - - return DebugLoc::get(Id); -} - /// getDISubprogram - Find subprogram that is enclosing this scope. DISubprogram llvm::getDISubprogram(MDNode *Scope) { DIDescriptor D(Scope); Modified: vendor/llvm/dist/lib/Analysis/IPA/CallGraphSCCPass.cpp ============================================================================== --- vendor/llvm/dist/lib/Analysis/IPA/CallGraphSCCPass.cpp Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/lib/Analysis/IPA/CallGraphSCCPass.cpp Sat Apr 3 07:51:10 2010 (r206124) @@ -87,10 +87,40 @@ private: bool IsCheckingMode); }; +/// PrintCallGraphPass - Print a Module corresponding to a call graph. +/// +class PrintCallGraphPass : public CallGraphSCCPass { +private: + std::string Banner; + raw_ostream &Out; // raw_ostream to print on. + +public: + static char ID; + PrintCallGraphPass() : CallGraphSCCPass(&ID), Out(dbgs()) {} + PrintCallGraphPass(const std::string &B, raw_ostream &o) + : CallGraphSCCPass(&ID), Banner(B), Out(o) {} + + virtual void getAnalysisUsage(AnalysisUsage &AU) const { + AU.setPreservesAll(); + } + + bool runOnSCC(std::vector &SCC) { + Out << Banner; + for (std::vector::iterator n = SCC.begin(), ne = SCC.end(); + n != ne; + ++n) { + (*n)->getFunction()->print(Out); + } + return false; + } +}; + } // end anonymous namespace. char CGPassManager::ID = 0; +char PrintCallGraphPass::ID = 0; + bool CGPassManager::RunPassOnSCC(Pass *P, std::vector &CurSCC, CallGraph &CG, bool &CallGraphUpToDate) { bool Changed = false; @@ -396,6 +426,11 @@ bool CGPassManager::doFinalization(CallG return Changed; } +Pass *CallGraphSCCPass::createPrinterPass(raw_ostream &O, + const std::string &Banner) const { + return new PrintCallGraphPass(Banner, O); +} + /// Assign pass manager to manage this pass. void CallGraphSCCPass::assignPassManager(PMStack &PMS, PassManagerType PreferredType) { Modified: vendor/llvm/dist/lib/Analysis/LoopPass.cpp ============================================================================== --- vendor/llvm/dist/lib/Analysis/LoopPass.cpp Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/lib/Analysis/LoopPass.cpp Sat Apr 3 07:51:10 2010 (r206124) @@ -14,9 +14,44 @@ //===----------------------------------------------------------------------===// #include "llvm/Analysis/LoopPass.h" +#include "llvm/Assembly/PrintModulePass.h" +#include "llvm/Support/Debug.h" #include "llvm/Support/Timer.h" using namespace llvm; +namespace { + +/// PrintLoopPass - Print a Function corresponding to a Loop. +/// +class PrintLoopPass : public LoopPass { +private: + std::string Banner; + raw_ostream &Out; // raw_ostream to print on. + +public: + static char ID; + PrintLoopPass() : LoopPass(&ID), Out(dbgs()) {} + PrintLoopPass(const std::string &B, raw_ostream &o) + : LoopPass(&ID), Banner(B), Out(o) {} + + virtual void getAnalysisUsage(AnalysisUsage &AU) const { + AU.setPreservesAll(); + } + + bool runOnLoop(Loop *L, LPPassManager &) { + Out << Banner; + for (Loop::block_iterator b = L->block_begin(), be = L->block_end(); + b != be; + ++b) { + (*b)->print(Out); + } + return false; + } +}; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Apr 3 07:51:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 251BC106564A; Sat, 3 Apr 2010 07:51:35 +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 0F9888FC16; Sat, 3 Apr 2010 07:51: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 o337pYAd022300; Sat, 3 Apr 2010 07:51:34 GMT (envelope-from rdivacky@svn.freebsd.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o337pYnc022275; Sat, 3 Apr 2010 07:51:34 GMT (envelope-from rdivacky@svn.freebsd.org) Message-Id: <201004030751.o337pYnc022275@svn.freebsd.org> From: Roman Divacky Date: Sat, 3 Apr 2010 07:51:34 +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: r206125 - in vendor/clang/dist: include/clang/AST include/clang/Basic include/clang/Driver lib/AST lib/Basic lib/CodeGen lib/Parse lib/Sema test/CodeGen test/CodeGenCXX test/Parser test... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 03 Apr 2010 07:51:35 -0000 Author: rdivacky Date: Sat Apr 3 07:51:34 2010 New Revision: 206125 URL: http://svn.freebsd.org/changeset/base/206125 Log: Update clang to r100285. Added: vendor/clang/dist/test/CodeGenCXX/copy-initialization.cpp vendor/clang/dist/test/SemaObjC/class-extension-after-implementation.m Deleted: vendor/clang/dist/test/CodeGen/rdr-6098585-default-after-caserange.c vendor/clang/dist/test/CodeGen/rdr-6098585-default-fallthrough-to-caserange.c vendor/clang/dist/test/CodeGen/rdr-6098585-empty-case-range.c vendor/clang/dist/test/CodeGen/rdr-6098585-fallthrough-to-empty-range.c vendor/clang/dist/test/CodeGen/rdr-6098585-unsigned-caserange.c Modified: vendor/clang/dist/include/clang/AST/DeclObjC.h vendor/clang/dist/include/clang/AST/Expr.h vendor/clang/dist/include/clang/Basic/DiagnosticParseKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td vendor/clang/dist/include/clang/Driver/Options.td vendor/clang/dist/lib/AST/ASTImporter.cpp vendor/clang/dist/lib/AST/DeclObjC.cpp vendor/clang/dist/lib/AST/Expr.cpp vendor/clang/dist/lib/Basic/Targets.cpp vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp vendor/clang/dist/lib/CodeGen/CGExprCXX.cpp vendor/clang/dist/lib/CodeGen/CGObjCMac.cpp vendor/clang/dist/lib/CodeGen/CGVtable.cpp vendor/clang/dist/lib/Parse/ParseObjc.cpp vendor/clang/dist/lib/Sema/SemaDecl.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/SemaInit.cpp vendor/clang/dist/lib/Sema/SemaObjCProperty.cpp vendor/clang/dist/test/CodeGen/enum.c vendor/clang/dist/test/CodeGen/indirect-goto.c vendor/clang/dist/test/CodeGen/switch.c vendor/clang/dist/test/CodeGenCXX/derived-to-base-conv.cpp vendor/clang/dist/test/CodeGenCXX/virt.cpp vendor/clang/dist/test/CodeGenCXX/vtable-linkage.cpp vendor/clang/dist/test/Parser/check-syntax-1.m vendor/clang/dist/test/SemaCXX/conditional-expr.cpp vendor/clang/dist/test/SemaCXX/copy-initialization.cpp vendor/clang/dist/test/SemaObjC/default-synthesize.m Modified: vendor/clang/dist/include/clang/AST/DeclObjC.h ============================================================================== --- vendor/clang/dist/include/clang/AST/DeclObjC.h Sat Apr 3 07:51:10 2010 (r206124) +++ vendor/clang/dist/include/clang/AST/DeclObjC.h Sat Apr 3 07:51:34 2010 (r206125) @@ -624,17 +624,23 @@ public: }; private: - ObjCIvarDecl(DeclContext *DC, SourceLocation L, IdentifierInfo *Id, + ObjCIvarDecl(ObjCContainerDecl *DC, SourceLocation L, IdentifierInfo *Id, QualType T, TypeSourceInfo *TInfo, AccessControl ac, Expr *BW) : FieldDecl(ObjCIvar, DC, L, Id, T, TInfo, BW, /*Mutable=*/false), DeclAccess(ac) {} public: - static ObjCIvarDecl *Create(ASTContext &C, DeclContext *DC, SourceLocation L, - IdentifierInfo *Id, QualType T, + static ObjCIvarDecl *Create(ASTContext &C, ObjCContainerDecl *DC, + SourceLocation L, IdentifierInfo *Id, QualType T, TypeSourceInfo *TInfo, AccessControl ac, Expr *BW = NULL); + /// \brief Return the class interface that this ivar is logically contained + /// in; this is either the interface where the ivar was declared, or the + /// interface the ivar is conceptually a part of in the case of synthesized + /// ivars. + const ObjCInterfaceDecl *getContainingInterface() const; + void setAccessControl(AccessControl ac) { DeclAccess = ac; } AccessControl getAccessControl() const { return AccessControl(DeclAccess); } Modified: vendor/clang/dist/include/clang/AST/Expr.h ============================================================================== --- vendor/clang/dist/include/clang/AST/Expr.h Sat Apr 3 07:51:10 2010 (r206124) +++ vendor/clang/dist/include/clang/AST/Expr.h Sat Apr 3 07:51:34 2010 (r206125) @@ -322,6 +322,15 @@ public: /// the expression is a default argument. bool isDefaultArgument() const; + /// \brief Determine whether this expression directly creates a + /// temporary object (of class type). + bool isTemporaryObject() const { return getTemporaryObject() != 0; } + + /// \brief If this expression directly creates a temporary object of + /// class type, return the expression that actually constructs that + /// temporary object. + const Expr *getTemporaryObject() const; + const Expr* IgnoreParens() const { return const_cast(this)->IgnoreParens(); } Modified: vendor/clang/dist/include/clang/Basic/DiagnosticParseKinds.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/DiagnosticParseKinds.td Sat Apr 3 07:51:10 2010 (r206124) +++ vendor/clang/dist/include/clang/Basic/DiagnosticParseKinds.td Sat Apr 3 07:51:34 2010 (r206125) @@ -182,6 +182,8 @@ def err_unexected_colon_in_nested_name_s "unexpected ':' in nested name specifier">; /// Objective-C parser diagnostics +def err_expected_minus_or_plus : Error< + "method type specifier must start with '-' or '+'">; def err_objc_no_attributes_on_category : Error< "attributes may not be specified on a category">; def err_objc_missing_end : Error<"missing @end">; Modified: vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td Sat Apr 3 07:51:10 2010 (r206124) +++ vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td Sat Apr 3 07:51:34 2010 (r206125) @@ -256,6 +256,10 @@ def warn_property_attribute : Warning< def warn_property_types_are_incompatible : Warning< "property type %0 is incompatible with type %1 inherited from %2">; def err_undef_interface : Error<"cannot find interface declaration for %0">; +def err_class_extension_after_impl : Error< + "cannot declare class extension for %0 after class implementation">; +def note_implementation_declared : Note< + "class implementation is declared here">; def warn_dup_category_def : Warning< "duplicate definition of category %1 on interface %0">; def err_conflicting_super_class : Error<"conflicting super class name %0">; Modified: vendor/clang/dist/include/clang/Driver/Options.td ============================================================================== --- vendor/clang/dist/include/clang/Driver/Options.td Sat Apr 3 07:51:10 2010 (r206124) +++ vendor/clang/dist/include/clang/Driver/Options.td Sat Apr 3 07:51:34 2010 (r206125) @@ -431,6 +431,7 @@ def mno_sse4_1 : Flag<"-mno-sse4.1">, Gr def mno_sse4_2 : Flag<"-mno-sse4.2">, Group; def mno_sse : Flag<"-mno-sse">, Group; def mno_ssse3 : Flag<"-mno-ssse3">, Group; +def mno_aes : Flag<"-mno-aes">, Group; def mno_thumb : Flag<"-mno-thumb">, Group; def marm : Flag<"-marm">, Alias; @@ -447,6 +448,7 @@ def msse4_1 : Flag<"-msse4.1">, Group, Group; def msse : Flag<"-msse">, Group; def mssse3 : Flag<"-mssse3">, Group; +def maes : Flag<"-maes">, Group; def mthumb : Flag<"-mthumb">, Group; def mtune_EQ : Joined<"-mtune=">, Group; def multi__module : Flag<"-multi_module">; Modified: vendor/clang/dist/lib/AST/ASTImporter.cpp ============================================================================== --- vendor/clang/dist/lib/AST/ASTImporter.cpp Sat Apr 3 07:51:10 2010 (r206124) +++ vendor/clang/dist/lib/AST/ASTImporter.cpp Sat Apr 3 07:51:34 2010 (r206125) @@ -2013,7 +2013,8 @@ Decl *ASTNodeImporter::VisitObjCIvarDecl if (!BitWidth && D->getBitWidth()) return 0; - ObjCIvarDecl *ToIvar = ObjCIvarDecl::Create(Importer.getToContext(), DC, + ObjCIvarDecl *ToIvar = ObjCIvarDecl::Create(Importer.getToContext(), + cast(DC), Loc, Name.getAsIdentifierInfo(), T, TInfo, D->getAccessControl(), BitWidth); Modified: vendor/clang/dist/lib/AST/DeclObjC.cpp ============================================================================== --- vendor/clang/dist/lib/AST/DeclObjC.cpp Sat Apr 3 07:51:10 2010 (r206124) +++ vendor/clang/dist/lib/AST/DeclObjC.cpp Sat Apr 3 07:51:34 2010 (r206125) @@ -561,14 +561,53 @@ bool ObjCInterfaceDecl::ClassImplementsP // ObjCIvarDecl //===----------------------------------------------------------------------===// -ObjCIvarDecl *ObjCIvarDecl::Create(ASTContext &C, DeclContext *DC, +ObjCIvarDecl *ObjCIvarDecl::Create(ASTContext &C, ObjCContainerDecl *DC, SourceLocation L, IdentifierInfo *Id, QualType T, TypeSourceInfo *TInfo, AccessControl ac, Expr *BW) { + if (DC) { + // Ivar's can only appear in interfaces, implementations (via synthesized + // properties), and class extensions (via direct declaration, or synthesized + // properties). + // + // FIXME: This should really be asserting this: + // (isa(DC) && + // cast(DC)->IsClassExtension())) + // but unfortunately we sometimes place ivars into non-class extension + // categories on error. This breaks an AST invariant, and should not be + // fixed. + assert((isa(DC) || isa(DC) || + isa(DC)) && + "Invalid ivar decl context!"); + } + return new (C) ObjCIvarDecl(DC, L, Id, T, TInfo, ac, BW); } +const ObjCInterfaceDecl *ObjCIvarDecl::getContainingInterface() const { + const ObjCContainerDecl *DC = cast(getDeclContext()); + + switch (DC->getKind()) { + default: + case ObjCCategoryImpl: + case ObjCProtocol: + assert(0 && "invalid ivar container!"); + return 0; + + // Ivars can only appear in class extension categories. + case ObjCCategory: { + const ObjCCategoryDecl *CD = cast(DC); + assert(CD->IsClassExtension() && "invalid container for ivar!"); + return CD->getClassInterface(); + } + case ObjCImplementation: + return cast(DC)->getClassInterface(); + + case ObjCInterface: + return cast(DC); + } +} //===----------------------------------------------------------------------===// // ObjCAtDefsFieldDecl Modified: vendor/clang/dist/lib/AST/Expr.cpp ============================================================================== --- vendor/clang/dist/lib/AST/Expr.cpp Sat Apr 3 07:51:10 2010 (r206124) +++ vendor/clang/dist/lib/AST/Expr.cpp Sat Apr 3 07:51:34 2010 (r206125) @@ -1476,6 +1476,71 @@ bool Expr::isDefaultArgument() const { return isa(E); } +/// \brief Skip over any no-op casts and any temporary-binding +/// expressions. +static const Expr *skipTemporaryBindingsAndNoOpCasts(const Expr *E) { + while (const ImplicitCastExpr *ICE = dyn_cast(E)) { + if (ICE->getCastKind() == CastExpr::CK_NoOp) + E = ICE->getSubExpr(); + else + break; + } + + while (const CXXBindTemporaryExpr *BE = dyn_cast(E)) + E = BE->getSubExpr(); + + while (const ImplicitCastExpr *ICE = dyn_cast(E)) { + if (ICE->getCastKind() == CastExpr::CK_NoOp) + E = ICE->getSubExpr(); + else + break; + } + + return E; +} + +const Expr *Expr::getTemporaryObject() const { + const Expr *E = skipTemporaryBindingsAndNoOpCasts(this); + + // A cast can produce a temporary object. The object's construction + // is represented as a CXXConstructExpr. + if (const CastExpr *Cast = dyn_cast(E)) { + // Only user-defined and constructor conversions can produce + // temporary objects. + if (Cast->getCastKind() != CastExpr::CK_ConstructorConversion && + Cast->getCastKind() != CastExpr::CK_UserDefinedConversion) + return 0; + + // Strip off temporary bindings and no-op casts. + const Expr *Sub = skipTemporaryBindingsAndNoOpCasts(Cast->getSubExpr()); + + // If this is a constructor conversion, see if we have an object + // construction. + if (Cast->getCastKind() == CastExpr::CK_ConstructorConversion) + return dyn_cast(Sub); + + // If this is a user-defined conversion, see if we have a call to + // a function that itself returns a temporary object. + if (Cast->getCastKind() == CastExpr::CK_UserDefinedConversion) + if (const CallExpr *CE = dyn_cast(Sub)) + if (CE->getCallReturnType()->isRecordType()) + return CE; + + return 0; + } + + // A call returning a class type returns a temporary. + if (const CallExpr *CE = dyn_cast(E)) { + if (CE->getCallReturnType()->isRecordType()) + return CE; + + return 0; + } + + // Explicit temporary object constructors create temporaries. + return dyn_cast(E); +} + /// hasAnyTypeDependentArguments - Determines if any of the expressions /// in Exprs is type-dependent. bool Expr::hasAnyTypeDependentArguments(Expr** Exprs, unsigned NumExprs) { Modified: vendor/clang/dist/lib/Basic/Targets.cpp ============================================================================== --- vendor/clang/dist/lib/Basic/Targets.cpp Sat Apr 3 07:51:10 2010 (r206124) +++ vendor/clang/dist/lib/Basic/Targets.cpp Sat Apr 3 07:51:34 2010 (r206125) @@ -765,9 +765,12 @@ class X86TargetInfo : public TargetInfo NoAMD3DNow, AMD3DNow, AMD3DNowAthlon } AMD3DNowLevel; + bool HasAES; + public: X86TargetInfo(const std::string& triple) - : TargetInfo(triple), SSELevel(NoMMXSSE), AMD3DNowLevel(NoAMD3DNow) { + : TargetInfo(triple), SSELevel(NoMMXSSE), AMD3DNowLevel(NoAMD3DNow), + HasAES(false) { LongDoubleFormat = &llvm::APFloat::x87DoubleExtended; } virtual void getTargetBuiltins(const Builtin::Info *&Records, @@ -813,6 +816,7 @@ void X86TargetInfo::getDefaultFeatures(c Features["ssse3"] = false; Features["sse41"] = false; Features["sse42"] = false; + Features["aes"] = false; // LLVM does not currently recognize this. // Features["sse4a"] = false; @@ -841,8 +845,10 @@ void X86TargetInfo::getDefaultFeatures(c Features["sse42"] = false; } else if (CPU == "atom") setFeatureEnabled(Features, "sse3", true); - else if (CPU == "corei7") + else if (CPU == "corei7") { setFeatureEnabled(Features, "sse4", true); + setFeatureEnabled(Features, "aes", true); + } else if (CPU == "k6" || CPU == "winchip-c6") setFeatureEnabled(Features, "mmx", true); else if (CPU == "k6-2" || CPU == "k6-3" || CPU == "athlon" || @@ -892,6 +898,8 @@ bool X86TargetInfo::setFeatureEnabled(ll Features["3dnowa"] = true; else if (Name == "3dnowa") Features["3dnow"] = Features["3dnowa"] = true; + else if (Name == "aes") + Features["aes"] = true; } else { if (Name == "mmx") Features["mmx"] = Features["sse"] = Features["sse2"] = Features["sse3"] = @@ -917,6 +925,8 @@ bool X86TargetInfo::setFeatureEnabled(ll Features["3dnow"] = Features["3dnowa"] = false; else if (Name == "3dnowa") Features["3dnowa"] = false; + else if (Name == "aes") + Features["aes"] = false; } return true; @@ -931,6 +941,11 @@ void X86TargetInfo::HandleTargetFeatures if (Features[i][0] == '-') continue; + if (Features[i].substr(1) == "aes") { + HasAES = true; + continue; + } + assert(Features[i][0] == '+' && "Invalid target feature!"); X86SSEEnum Level = llvm::StringSwitch(Features[i].substr(1)) .Case("sse42", SSE42) @@ -969,6 +984,9 @@ void X86TargetInfo::getTargetDefines(con DefineStd(Builder, "i386", Opts); } + if (HasAES) + Builder.defineMacro("__AES__"); + // Target properties. Builder.defineMacro("__LITTLE_ENDIAN__"); Modified: vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp Sat Apr 3 07:51:10 2010 (r206124) +++ vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp Sat Apr 3 07:51:34 2010 (r206125) @@ -1390,9 +1390,9 @@ void CGDebugInfo::EmitStopPoint(llvm::Fu PresumedLoc PLoc = SM.getPresumedLoc(CurLoc); llvm::MDNode *Scope = RegionStack.back(); - Builder.SetCurrentDebugLocation(llvm::NewDebugLoc::get(PLoc.getLine(), - PLoc.getColumn(), - Scope)); + Builder.SetCurrentDebugLocation(llvm::DebugLoc::get(PLoc.getLine(), + PLoc.getColumn(), + Scope)); } /// EmitRegionStart- Constructs the debug code for entering a declarative @@ -1596,7 +1596,7 @@ void CGDebugInfo::EmitDeclare(const VarD DebugFactory.InsertDeclare(Storage, D, Builder.GetInsertBlock()); llvm::MDNode *Scope = RegionStack.back(); - Call->setDebugLoc(llvm::NewDebugLoc::get(Line, Column, Scope)); + Call->setDebugLoc(llvm::DebugLoc::get(Line, Column, Scope)); } /// EmitDeclare - Emit local variable declaration debug info. @@ -1660,7 +1660,7 @@ void CGDebugInfo::EmitDeclare(const Bloc DebugFactory.InsertDeclare(Storage, D, Builder.GetInsertBlock()); llvm::MDNode *Scope = RegionStack.back(); - Call->setDebugLoc(llvm::NewDebugLoc::get(Line, PLoc.getColumn(), Scope)); + Call->setDebugLoc(llvm::DebugLoc::get(Line, PLoc.getColumn(), Scope)); } void CGDebugInfo::EmitDeclareOfAutoVariable(const VarDecl *VD, Modified: vendor/clang/dist/lib/CodeGen/CGExprCXX.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGExprCXX.cpp Sat Apr 3 07:51:10 2010 (r206124) +++ vendor/clang/dist/lib/CodeGen/CGExprCXX.cpp Sat Apr 3 07:51:34 2010 (r206125) @@ -307,23 +307,7 @@ CodeGenFunction::EmitCXXConstructExpr(ll // Code gen optimization to eliminate copy constructor and return // its first argument instead. if (getContext().getLangOptions().ElideConstructors && E->isElidable()) { - const Expr *Arg = E->getArg(0); - - if (const ImplicitCastExpr *ICE = dyn_cast(Arg)) { - assert((ICE->getCastKind() == CastExpr::CK_NoOp || - ICE->getCastKind() == CastExpr::CK_ConstructorConversion || - ICE->getCastKind() == CastExpr::CK_UserDefinedConversion) && - "Unknown implicit cast kind in constructor elision"); - Arg = ICE->getSubExpr(); - } - - if (const CXXFunctionalCastExpr *FCE = dyn_cast(Arg)) - Arg = FCE->getSubExpr(); - - if (const CXXBindTemporaryExpr *BindExpr = - dyn_cast(Arg)) - Arg = BindExpr->getSubExpr(); - + const Expr *Arg = E->getArg(0)->getTemporaryObject(); EmitAggExpr(Arg, Dest, false); return; } Modified: vendor/clang/dist/lib/CodeGen/CGObjCMac.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGObjCMac.cpp Sat Apr 3 07:51:10 2010 (r206124) +++ vendor/clang/dist/lib/CodeGen/CGObjCMac.cpp Sat Apr 3 07:51:34 2010 (r206125) @@ -42,41 +42,15 @@ using namespace CodeGen; // don't belong in CGObjCRuntime either so we will live with it for // now. -/// FindIvarInterface - Find the interface containing the ivar. -/// -/// FIXME: We shouldn't need to do this, the containing context should -/// be fixed. -static const ObjCInterfaceDecl *FindIvarInterface(ASTContext &Context, - const ObjCInterfaceDecl *OID, - const ObjCIvarDecl *OIVD, - unsigned &Index) { - // FIXME: The index here is closely tied to how - // ASTContext::getObjCLayout is implemented. This should be fixed to - // get the information from the layout directly. - Index = 0; - llvm::SmallVector Ivars; - Context.ShallowCollectObjCIvars(OID, Ivars); - for (unsigned k = 0, e = Ivars.size(); k != e; ++k) { - if (OIVD == Ivars[k]) - return OID; - ++Index; - } - - // Otherwise check in the super class. - if (const ObjCInterfaceDecl *Super = OID->getSuperClass()) - return FindIvarInterface(Context, Super, OIVD, Index); - - return 0; -} - static uint64_t LookupFieldBitOffset(CodeGen::CodeGenModule &CGM, const ObjCInterfaceDecl *OID, const ObjCImplementationDecl *ID, const ObjCIvarDecl *Ivar) { - unsigned Index; - const ObjCInterfaceDecl *Container = - FindIvarInterface(CGM.getContext(), OID, Ivar, Index); - assert(Container && "Unable to find ivar container"); + const ObjCInterfaceDecl *Container = Ivar->getContainingInterface(); + + // FIXME: We should eliminate the need to have ObjCImplementationDecl passed + // in here; it should never be necessary because that should be the lexical + // decl context for the ivar. // If we know have an implementation (and the ivar is in it) then // look up in the implementation layout. @@ -85,6 +59,22 @@ static uint64_t LookupFieldBitOffset(Cod RL = &CGM.getContext().getASTObjCImplementationLayout(ID); else RL = &CGM.getContext().getASTObjCInterfaceLayout(Container); + + // Compute field index. + // + // FIXME: The index here is closely tied to how ASTContext::getObjCLayout is + // implemented. This should be fixed to get the information from the layout + // directly. + unsigned Index = 0; + llvm::SmallVector Ivars; + CGM.getContext().ShallowCollectObjCIvars(Container, Ivars); + for (unsigned k = 0, e = Ivars.size(); k != e; ++k) { + if (Ivar == Ivars[k]) + break; + ++Index; + } + assert(Index != Ivars.size() && "Ivar is not inside container!"); + return RL->getFieldOffset(Index); } @@ -4727,14 +4717,10 @@ llvm::Constant *CGObjCNonFragileABIMac:: /// ObjCIvarOffsetVariable - Returns the ivar offset variable for /// the given ivar. -llvm::GlobalVariable * CGObjCNonFragileABIMac::ObjCIvarOffsetVariable( - const ObjCInterfaceDecl *ID, - const ObjCIvarDecl *Ivar) { - // FIXME: We shouldn't need to do this lookup. - unsigned Index; - const ObjCInterfaceDecl *Container = - FindIvarInterface(CGM.getContext(), ID, Ivar, Index); - assert(Container && "Unable to find ivar container!"); +llvm::GlobalVariable * +CGObjCNonFragileABIMac::ObjCIvarOffsetVariable(const ObjCInterfaceDecl *ID, + const ObjCIvarDecl *Ivar) { + const ObjCInterfaceDecl *Container = Ivar->getContainingInterface(); std::string Name = "OBJC_IVAR_$_" + Container->getNameAsString() + '.' + Ivar->getNameAsString(); llvm::GlobalVariable *IvarOffsetGV = @@ -4749,10 +4735,10 @@ llvm::GlobalVariable * CGObjCNonFragileA return IvarOffsetGV; } -llvm::Constant * CGObjCNonFragileABIMac::EmitIvarOffsetVar( - const ObjCInterfaceDecl *ID, - const ObjCIvarDecl *Ivar, - unsigned long int Offset) { +llvm::Constant * +CGObjCNonFragileABIMac::EmitIvarOffsetVar(const ObjCInterfaceDecl *ID, + const ObjCIvarDecl *Ivar, + unsigned long int Offset) { llvm::GlobalVariable *IvarOffsetGV = ObjCIvarOffsetVariable(ID, Ivar); IvarOffsetGV->setInitializer(llvm::ConstantInt::get(ObjCTypes.LongTy, Offset)); Modified: vendor/clang/dist/lib/CodeGen/CGVtable.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGVtable.cpp Sat Apr 3 07:51:10 2010 (r206124) +++ vendor/clang/dist/lib/CodeGen/CGVtable.cpp Sat Apr 3 07:51:34 2010 (r206125) @@ -3146,11 +3146,16 @@ void CodeGenVTables::EmitVTableRelatedDa if (KeyFunction->getCanonicalDecl() != MD->getCanonicalDecl()) return; } else { + // If we have no key funcion and this is a explicit instantiation declaration, + // we will produce a vtable at the explicit instantiation. We don't need one + // here. + if (RDKind == clang::TSK_ExplicitInstantiationDeclaration) + return; + // If this is an explicit instantiation of a method, we don't need a vtable. // Since we have no key function, we will emit the vtable when we see // a use, and just defining a function is not an use. - if ((RDKind == TSK_ImplicitInstantiation || - RDKind == TSK_ExplicitInstantiationDeclaration) && + if (RDKind == TSK_ImplicitInstantiation && MDKind == TSK_ExplicitInstantiationDefinition) return; } Modified: vendor/clang/dist/lib/Parse/ParseObjc.cpp ============================================================================== --- vendor/clang/dist/lib/Parse/ParseObjc.cpp Sat Apr 3 07:51:10 2010 (r206124) +++ vendor/clang/dist/lib/Parse/ParseObjc.cpp Sat Apr 3 07:51:34 2010 (r206125) @@ -142,12 +142,11 @@ Parser::DeclPtrTy Parser::ParseObjCAtInt // We have a class or category name - consume it. IdentifierInfo *nameId = Tok.getIdentifierInfo(); SourceLocation nameLoc = ConsumeToken(); - + bool Err = false; if (Tok.is(tok::l_paren)) { // we have a category. SourceLocation lparenLoc = ConsumeParen(); SourceLocation categoryLoc, rparenLoc; IdentifierInfo *categoryId = 0; - if (Tok.is(tok::code_completion)) { Actions.CodeCompleteObjCInterfaceCategory(CurScope, nameId); ConsumeToken(); @@ -157,7 +156,14 @@ Parser::DeclPtrTy Parser::ParseObjCAtInt if (Tok.is(tok::identifier)) { categoryId = Tok.getIdentifierInfo(); categoryLoc = ConsumeToken(); - } else if (!getLang().ObjC2) { + } + else if (isKnownToBeTypeSpecifier(Tok)) { + // Fall thru after diagnosing for better error recovery. + Diag(Tok, diag::err_expected_minus_or_plus); + ConsumeToken(); + Err = true; + } + else if (!getLang().ObjC2) { Diag(Tok, diag::err_expected_ident); // missing category name. return DeclPtrTy(); } @@ -167,33 +173,34 @@ Parser::DeclPtrTy Parser::ParseObjCAtInt return DeclPtrTy(); } rparenLoc = ConsumeParen(); - - // Next, we need to check for any protocol references. - SourceLocation LAngleLoc, EndProtoLoc; - llvm::SmallVector ProtocolRefs; - llvm::SmallVector ProtocolLocs; - if (Tok.is(tok::less) && - ParseObjCProtocolReferences(ProtocolRefs, ProtocolLocs, true, + if (!Err) { + // Next, we need to check for any protocol references. + SourceLocation LAngleLoc, EndProtoLoc; + llvm::SmallVector ProtocolRefs; + llvm::SmallVector ProtocolLocs; + if (Tok.is(tok::less) && + ParseObjCProtocolReferences(ProtocolRefs, ProtocolLocs, true, LAngleLoc, EndProtoLoc)) - return DeclPtrTy(); + return DeclPtrTy(); - if (attrList) // categories don't support attributes. - Diag(Tok, diag::err_objc_no_attributes_on_category); + if (attrList) // categories don't support attributes. + Diag(Tok, diag::err_objc_no_attributes_on_category); - DeclPtrTy CategoryType = - Actions.ActOnStartCategoryInterface(atLoc, - nameId, nameLoc, - categoryId, categoryLoc, - ProtocolRefs.data(), - ProtocolRefs.size(), - ProtocolLocs.data(), - EndProtoLoc); - if (Tok.is(tok::l_brace)) + DeclPtrTy CategoryType = + Actions.ActOnStartCategoryInterface(atLoc, + nameId, nameLoc, + categoryId, categoryLoc, + ProtocolRefs.data(), + ProtocolRefs.size(), + ProtocolLocs.data(), + EndProtoLoc); + if (Tok.is(tok::l_brace)) ParseObjCClassInstanceVariables(CategoryType, tok::objc_private, atLoc); - ParseObjCInterfaceDeclList(CategoryType, tok::objc_not_keyword); - return CategoryType; + ParseObjCInterfaceDeclList(CategoryType, tok::objc_not_keyword); + return CategoryType; + } } // Parse a class interface. IdentifierInfo *superClassId = 0; @@ -235,7 +242,7 @@ Parser::DeclPtrTy Parser::ParseObjCAtInt ParseObjCClassInstanceVariables(ClsType, tok::objc_protected, atLoc); ParseObjCInterfaceDeclList(ClsType, tok::objc_interface); - return ClsType; + return Err ? DeclPtrTy() : ClsType; } /// The Objective-C property callback. This should be defined where @@ -328,7 +335,14 @@ void Parser::ParseObjCInterfaceDeclList( "", tok::semi); continue; } - + if (Tok.is(tok::l_paren)) { + Diag(Tok, diag::err_expected_minus_or_plus); + DeclPtrTy methodPrototype = ParseObjCMethodDecl(Tok.getLocation(), + tok::minus, + interfaceDecl, + MethodImplKind); + continue; + } // Ignore excess semicolons. if (Tok.is(tok::semi)) { ConsumeToken(); Modified: vendor/clang/dist/lib/Sema/SemaDecl.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaDecl.cpp Sat Apr 3 07:51:10 2010 (r206124) +++ vendor/clang/dist/lib/Sema/SemaDecl.cpp Sat Apr 3 07:51:34 2010 (r206125) @@ -5740,17 +5740,15 @@ Sema::DeclPtrTy Sema::ActOnIvar(Scope *S Visibility != tok::objc_not_keyword ? TranslateIvarVisibility(Visibility) : ObjCIvarDecl::None; // Must set ivar's DeclContext to its enclosing interface. - Decl *EnclosingDecl = IntfDecl.getAs(); - DeclContext *EnclosingContext; + ObjCContainerDecl *EnclosingDecl = IntfDecl.getAs(); + ObjCContainerDecl *EnclosingContext; if (ObjCImplementationDecl *IMPDecl = dyn_cast(EnclosingDecl)) { // Case of ivar declared in an implementation. Context is that of its class. - ObjCInterfaceDecl* IDecl = IMPDecl->getClassInterface(); - assert(IDecl && "No class- ActOnIvar"); - EnclosingContext = cast_or_null(IDecl); + EnclosingContext = IMPDecl->getClassInterface(); + assert(EnclosingContext && "Implementation has no class interface!"); } else - EnclosingContext = dyn_cast(EnclosingDecl); - assert(EnclosingContext && "null DeclContext for ivar - ActOnIvar"); + EnclosingContext = EnclosingDecl; // Construct the decl. ObjCIvarDecl *NewID = ObjCIvarDecl::Create(Context, Modified: vendor/clang/dist/lib/Sema/SemaDeclCXX.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaDeclCXX.cpp Sat Apr 3 07:51:10 2010 (r206124) +++ vendor/clang/dist/lib/Sema/SemaDeclCXX.cpp Sat Apr 3 07:51:34 2010 (r206125) @@ -3965,33 +3965,21 @@ Sema::BuildCXXConstructExpr(SourceLocati bool BaseInitialization) { bool Elidable = false; - // C++ [class.copy]p15: - // Whenever a temporary class object is copied using a copy constructor, and - // this object and the copy have the same cv-unqualified type, an - // implementation is permitted to treat the original and the copy as two - // different ways of referring to the same object and not perform a copy at - // all, even if the class copy constructor or destructor have side effects. - - // FIXME: Is this enough? - if (Constructor->isCopyConstructor()) { - Expr *E = ((Expr **)ExprArgs.get())[0]; - if (ImplicitCastExpr *ICE = dyn_cast(E)) - if (ICE->getCastKind() == CastExpr::CK_NoOp) - E = ICE->getSubExpr(); - if (CXXFunctionalCastExpr *FCE = dyn_cast(E)) - E = FCE->getSubExpr(); - while (CXXBindTemporaryExpr *BE = dyn_cast(E)) - E = BE->getSubExpr(); - if (ImplicitCastExpr *ICE = dyn_cast(E)) - if (ICE->getCastKind() == CastExpr::CK_NoOp) - E = ICE->getSubExpr(); - - if (CallExpr *CE = dyn_cast(E)) - Elidable = !CE->getCallReturnType()->isReferenceType(); - else if (isa(E)) - Elidable = true; - else if (isa(E)) - Elidable = true; + // C++0x [class.copy]p34: + // When certain criteria are met, an implementation is allowed to + // omit the copy/move construction of a class object, even if the + // copy/move constructor and/or destructor for the object have + // side effects. [...] + // - when a temporary class object that has not been bound to a + // reference (12.2) would be copied/moved to a class object + // with the same cv-unqualified type, the copy/move operation + // can be omitted by constructing the temporary object + // directly into the target of the omitted copy/move + if (Constructor->isCopyConstructor() && ExprArgs.size() >= 1) { + Expr *SubExpr = ((Expr **)ExprArgs.get())[0]; + Elidable = SubExpr->isTemporaryObject() && + Context.hasSameUnqualifiedType(SubExpr->getType(), + Context.getTypeDeclType(Constructor->getParent())); } return BuildCXXConstructExpr(ConstructLoc, DeclInitType, Constructor, Modified: vendor/clang/dist/lib/Sema/SemaDeclObjC.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaDeclObjC.cpp Sat Apr 3 07:51:10 2010 (r206124) +++ vendor/clang/dist/lib/Sema/SemaDeclObjC.cpp Sat Apr 3 07:51:34 2010 (r206125) @@ -431,6 +431,11 @@ ActOnStartCategoryInterface(SourceLocati // Class extensions require a special treatment. Use an existing one. // Note that 'getClassExtension()' can return NULL. CDecl = IDecl->getClassExtension(); + if (IDecl->getImplementation()) { + Diag(ClassLoc, diag::err_class_extension_after_impl) << ClassName; + Diag(IDecl->getImplementation()->getLocation(), + diag::note_implementation_declared); + } } if (!CDecl) { Modified: vendor/clang/dist/lib/Sema/SemaExpr.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaExpr.cpp Sat Apr 3 07:51:10 2010 (r206124) +++ vendor/clang/dist/lib/Sema/SemaExpr.cpp Sat Apr 3 07:51:34 2010 (r206125) @@ -1345,11 +1345,6 @@ Sema::LookupInObjCMethod(LookupResult &L } } } - if (LangOpts.ObjCNonFragileABI2 && LookForIvars && Lookup.empty()) { - ObjCIvarDecl *Ivar = SynthesizeNewPropertyIvar(IFace, II); - if (Ivar) - return LookupInObjCMethod(Lookup, S, II, AllowBuiltinCreation); - } // Sentinel value saying that we didn't do anything special. return Owned((Expr*) 0); } Modified: vendor/clang/dist/lib/Sema/SemaInit.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaInit.cpp Sat Apr 3 07:51:10 2010 (r206124) +++ vendor/clang/dist/lib/Sema/SemaInit.cpp Sat Apr 3 07:51:34 2010 (r206125) @@ -2583,10 +2583,7 @@ static void TryConstructorInitialization Expr **Args, unsigned NumArgs, QualType DestType, InitializationSequence &Sequence) { - if (Kind.getKind() == InitializationKind::IK_Copy) - Sequence.setSequenceKind(InitializationSequence::UserDefinedConversion); - else - Sequence.setSequenceKind(InitializationSequence::ConstructorInitialization); + Sequence.setSequenceKind(InitializationSequence::ConstructorInitialization); // Build the candidate set directly in the initialization sequence // structure, so that it will persist if we fail. @@ -2597,7 +2594,7 @@ static void TryConstructorInitialization // explicit conversion operators. bool AllowExplicit = (Kind.getKind() == InitializationKind::IK_Direct || Kind.getKind() == InitializationKind::IK_Value || - Kind.getKind() == InitializationKind::IK_Default); + Kind.getKind() == InitializationKind::IK_Default); // The type we're converting to is a class type. Enumerate its constructors // to see if one is suitable. @@ -2661,14 +2658,10 @@ static void TryConstructorInitialization // Add the constructor initialization step. Any cv-qualification conversion is // subsumed by the initialization. - if (Kind.getKind() == InitializationKind::IK_Copy) { - Sequence.AddUserConversionStep(Best->Function, Best->FoundDecl, DestType); - } else { - Sequence.AddConstructorInitializationStep( + Sequence.AddConstructorInitializationStep( cast(Best->Function), Best->FoundDecl.getAccess(), DestType); - } } /// \brief Attempt value initialization (C++ [dcl.init]p7). @@ -3085,14 +3078,11 @@ getAssignmentAction(const InitializedEnt return Sema::AA_Converting; } -static bool shouldBindAsTemporary(const InitializedEntity &Entity, - bool IsCopy) { +static bool shouldBindAsTemporary(const InitializedEntity &Entity) { switch (Entity.getKind()) { - case InitializedEntity::EK_Result: case InitializedEntity::EK_ArrayElement: case InitializedEntity::EK_Member: - return !IsCopy; - + case InitializedEntity::EK_Result: case InitializedEntity::EK_New: case InitializedEntity::EK_Variable: case InitializedEntity::EK_Base: @@ -3108,21 +3098,38 @@ static bool shouldBindAsTemporary(const llvm_unreachable("missed an InitializedEntity kind?"); } -/// \brief If we need to perform an additional copy of the initialized object -/// for this kind of entity (e.g., the result of a function or an object being -/// thrown), make the copy. -static Sema::OwningExprResult CopyIfRequiredForEntity(Sema &S, - const InitializedEntity &Entity, - const InitializationKind &Kind, - Sema::OwningExprResult CurInit) { +static Sema::OwningExprResult CopyObject(Sema &S, + const InitializedEntity &Entity, + const InitializationKind &Kind, + Sema::OwningExprResult CurInit) { + // Determine which class type we're copying. Expr *CurInitExpr = (Expr *)CurInit.get(); - + CXXRecordDecl *Class = 0; + if (const RecordType *Record = CurInitExpr->getType()->getAs()) + Class = cast(Record->getDecl()); + if (!Class) + return move(CurInit); + + // C++0x [class.copy]p34: + // When certain criteria are met, an implementation is allowed to + // omit the copy/move construction of a class object, even if the + // copy/move constructor and/or destructor for the object have + // side effects. [...] + // - when a temporary class object that has not been bound to a + // reference (12.2) would be copied/moved to a class object + // with the same cv-unqualified type, the copy/move operation + // can be omitted by constructing the temporary object + // directly into the target of the omitted copy/move + // + // Note that the other three bullets are handled elsewhere. Copy + // elision for return statements and throw expressions are (FIXME: + // not yet) handled as part of constructor initialization, while + // copy elision for exception handlers is handled by the run-time. + bool Elidable = CurInitExpr->isTemporaryObject() && + S.Context.hasSameUnqualifiedType(Entity.getType(), CurInitExpr->getType()); SourceLocation Loc; - switch (Entity.getKind()) { case InitializedEntity::EK_Result: - if (Entity.getType()->isReferenceType()) - return move(CurInit); Loc = Entity.getReturnLoc(); break; @@ -3131,38 +3138,20 @@ static Sema::OwningExprResult CopyIfRequ break; case InitializedEntity::EK_Variable: - if (Entity.getType()->isReferenceType() || - Kind.getKind() != InitializationKind::IK_Copy) - return move(CurInit); Loc = Entity.getDecl()->getLocation(); break; case InitializedEntity::EK_ArrayElement: case InitializedEntity::EK_Member: - if (Entity.getType()->isReferenceType() || - Kind.getKind() != InitializationKind::IK_Copy) - return move(CurInit); - Loc = CurInitExpr->getLocStart(); - break; - case InitializedEntity::EK_Parameter: - // FIXME: Do we need this initialization for a parameter? - return move(CurInit); - - case InitializedEntity::EK_New: case InitializedEntity::EK_Temporary: + case InitializedEntity::EK_New: case InitializedEntity::EK_Base: case InitializedEntity::EK_VectorElement: - // We don't need to copy for any of these initialized entities. - return move(CurInit); + Loc = CurInitExpr->getLocStart(); + break; } - - CXXRecordDecl *Class = 0; - if (const RecordType *Record = CurInitExpr->getType()->getAs()) - Class = cast(Record->getDecl()); - if (!Class) - return move(CurInit); - + // Perform overload resolution using the class's copy constructors. DeclarationName ConstructorName = S.Context.DeclarationNames.getCXXConstructorName( @@ -3171,7 +3160,7 @@ static Sema::OwningExprResult CopyIfRequ OverloadCandidateSet CandidateSet(Loc); for (llvm::tie(Con, ConEnd) = Class->lookup(ConstructorName); Con != ConEnd; ++Con) { - // Find the constructor (which may be a template). + // Only consider copy constructors. CXXConstructorDecl *Constructor = dyn_cast(*Con); if (!Constructor || Constructor->isInvalidDecl() || !Constructor->isCopyConstructor()) @@ -3181,7 +3170,7 @@ static Sema::OwningExprResult CopyIfRequ = DeclAccessPair::make(Constructor, Constructor->getAccess()); S.AddOverloadCandidate(Constructor, FoundDecl, &CurInitExpr, 1, CandidateSet); - } + } OverloadCandidateSet::iterator Best; switch (S.BestViableFunction(CandidateSet, Loc, Best)) { @@ -3218,9 +3207,9 @@ static Sema::OwningExprResult CopyIfRequ Best->FoundDecl.getAccess()); CurInit.release(); - return S.BuildCXXConstructExpr(Loc, CurInitExpr->getType(), + return S.BuildCXXConstructExpr(Loc, Entity.getType().getNonReferenceType(), cast(Best->Function), - /*Elidable=*/true, + Elidable, Sema::MultiExprArg(S, (void**)&CurInitExpr, 1)); } @@ -3474,7 +3463,9 @@ InitializationSequence::Perform(Sema &S, CastKind = CastExpr::CK_UserDefinedConversion; } - if (shouldBindAsTemporary(Entity, IsCopy)) + bool RequiresCopy = !IsCopy && + getKind() != InitializationSequence::ReferenceBinding; + if (RequiresCopy || shouldBindAsTemporary(Entity)) CurInit = S.MaybeBindToTemporary(CurInit.takeAs()); CurInitExpr = CurInit.takeAs(); @@ -3483,8 +3474,8 @@ InitializationSequence::Perform(Sema &S, CurInitExpr, IsLvalue)); - if (!IsCopy) - CurInit = CopyIfRequiredForEntity(S, Entity, Kind, move(CurInit)); + if (RequiresCopy) + CurInit = CopyObject(S, Entity, Kind, move(CurInit)); break; } @@ -3560,13 +3551,9 @@ InitializationSequence::Perform(Sema &S, S.CheckConstructorAccess(Loc, Constructor, Step->Function.FoundDecl.getAccess()); - bool Elidable - = cast((Expr *)CurInit.get())->isElidable(); - if (shouldBindAsTemporary(Entity, Elidable)) + if (shouldBindAsTemporary(Entity)) CurInit = S.MaybeBindToTemporary(CurInit.takeAs()); - - if (!Elidable) - CurInit = CopyIfRequiredForEntity(S, Entity, Kind, move(CurInit)); + break; } Modified: vendor/clang/dist/lib/Sema/SemaObjCProperty.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaObjCProperty.cpp Sat Apr 3 07:51:10 2010 (r206124) +++ vendor/clang/dist/lib/Sema/SemaObjCProperty.cpp Sat Apr 3 07:51:34 2010 (r206125) @@ -281,7 +281,7 @@ Sema::DeclPtrTy Sema::ActOnPropertyImplD DeclPtrTy ClassCatImpDecl, IdentifierInfo *PropertyId, IdentifierInfo *PropertyIvar) { - Decl *ClassImpDecl = ClassCatImpDecl.getAs(); + ObjCContainerDecl *ClassImpDecl = ClassCatImpDecl.getAs(); // Make sure we have a context for the property implementation declaration. if (!ClassImpDecl) { Diag(AtLoc, diag::error_missing_property_context); @@ -353,14 +353,11 @@ Sema::DeclPtrTy Sema::ActOnPropertyImplD ObjCInterfaceDecl *ClassDeclared; Ivar = IDecl->lookupInstanceVariable(PropertyIvar, ClassDeclared); if (!Ivar) { - DeclContext *EnclosingContext = cast_or_null(ClassImpDecl); - assert(EnclosingContext && - "null DeclContext for synthesized ivar - ActOnPropertyImplDecl"); - Ivar = ObjCIvarDecl::Create(Context, EnclosingContext, PropertyLoc, + Ivar = ObjCIvarDecl::Create(Context, ClassImpDecl, PropertyLoc, PropertyIvar, PropType, /*Dinfo=*/0, ObjCIvarDecl::Public, (Expr *)0); - EnclosingContext->addDecl(Ivar); + ClassImpDecl->addDecl(Ivar); IDecl->makeDeclVisibleInContext(Ivar, false); property->setPropertyIvarDecl(Ivar); @@ -1072,15 +1069,10 @@ Sema::SynthesizeNewPropertyIvar(ObjCInte ObjCIvarDecl *Ivar = 0; ObjCPropertyDecl *Prop = LookupPropertyDecl(IDecl, NameII); if (Prop && !Prop->isInvalidDecl()) { - DeclContext *EnclosingContext = cast_or_null(IDecl); QualType PropType = Context.getCanonicalType(Prop->getType()); - assert(EnclosingContext && - "null DeclContext for synthesized ivar - SynthesizeNewPropertyIvar"); - Ivar = ObjCIvarDecl::Create(Context, EnclosingContext, - Prop->getLocation(), - NameII, PropType, /*Dinfo=*/0, - ObjCIvarDecl::Public, - (Expr *)0); + Ivar = ObjCIvarDecl::Create(Context, IDecl, Prop->getLocation(), NameII, + PropType, /*Dinfo=*/0, + ObjCIvarDecl::Public, (Expr *)0); Ivar->setLexicalDeclContext(IDecl); IDecl->addDecl(Ivar); Prop->setPropertyIvarDecl(Ivar); Modified: vendor/clang/dist/test/CodeGen/enum.c ============================================================================== --- vendor/clang/dist/test/CodeGen/enum.c Sat Apr 3 07:51:10 2010 (r206124) +++ vendor/clang/dist/test/CodeGen/enum.c Sat Apr 3 07:51:34 2010 (r206125) @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -triple i386-unknown-unknown %s -emit-llvm-bc -o - | opt -std-compile-opts | llvm-dis | grep 'ret i32 6' -// RUN: %clang_cc1 -triple i386-unknown-unknown -x c++ %s -emit-llvm-bc -o - | opt -std-compile-opts | llvm-dis | grep 'ret i32 7' +// RUN: %clang_cc1 -triple i386-unknown-unknown %s -O3 -emit-llvm -o - | grep 'ret i32 6' +// RUN: %clang_cc1 -triple i386-unknown-unknown -x c++ %s -O3 -emit-llvm -o - | grep 'ret i32 7' static enum { foo, bar = 1U } z; Modified: vendor/clang/dist/test/CodeGen/indirect-goto.c ============================================================================== --- vendor/clang/dist/test/CodeGen/indirect-goto.c Sat Apr 3 07:51:10 2010 (r206124) +++ vendor/clang/dist/test/CodeGen/indirect-goto.c Sat Apr 3 07:51:34 2010 (r206125) @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm-bc -o - %s | opt -std-compile-opts -S | grep "ret i32 2520" +// RUN: %clang_cc1 -triple i386-unknown-unknown -O3 -emit-llvm -o - %s | grep "ret i32 2520" static int foo(unsigned i) { void *addrs[] = { &&L1, &&L2, &&L3, &&L4, &&L5 }; Modified: vendor/clang/dist/test/CodeGen/switch.c ============================================================================== --- vendor/clang/dist/test/CodeGen/switch.c Sat Apr 3 07:51:10 2010 (r206124) +++ vendor/clang/dist/test/CodeGen/switch.c Sat Apr 3 07:51:34 2010 (r206125) @@ -100,3 +100,97 @@ void foo7(){ } } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Apr 3 08:25:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 87E07106564A; Sat, 3 Apr 2010 08:25:04 +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 77B7F8FC15; Sat, 3 Apr 2010 08:25: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 o338P4bE029803; Sat, 3 Apr 2010 08:25:04 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o338P4Bd029801; Sat, 3 Apr 2010 08:25:04 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004030825.o338P4Bd029801@svn.freebsd.org> From: Andriy Gapon Date: Sat, 3 Apr 2010 08:25: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: r206128 - head/sys/ufs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Apr 2010 08:25:04 -0000 Author: avg Date: Sat Apr 3 08:25:04 2010 New Revision: 206128 URL: http://svn.freebsd.org/changeset/base/206128 Log: ffs_mount: remove redundant assignment of geom consumer to devvp.v_bufobj The assignment is already done in g_vfs_open. Redundant assignment is harmless, but can become a problem if g_vfs_open logic is changed. MFC after: 1 week Modified: head/sys/ufs/ffs/ffs_vfsops.c Modified: head/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vfsops.c Sat Apr 3 08:24:28 2010 (r206127) +++ head/sys/ufs/ffs/ffs_vfsops.c Sat Apr 3 08:25:04 2010 (r206128) @@ -665,7 +665,6 @@ ffs_mountfs(devvp, mp, td) if (mp->mnt_iosize_max > MAXPHYS) mp->mnt_iosize_max = MAXPHYS; - devvp->v_bufobj.bo_private = cp; devvp->v_bufobj.bo_ops = &ffs_ops; fs = NULL; From owner-svn-src-all@FreeBSD.ORG Sat Apr 3 08:39:00 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F05D2106566B; Sat, 3 Apr 2010 08:39: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 E007A8FC12; Sat, 3 Apr 2010 08:39: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 o338d0kt032830; Sat, 3 Apr 2010 08:39:00 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o338d0VV032828; Sat, 3 Apr 2010 08:39:00 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004030839.o338d0VV032828@svn.freebsd.org> From: Andriy Gapon Date: Sat, 3 Apr 2010 08:39: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: r206129 - 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: Sat, 03 Apr 2010 08:39:01 -0000 Author: avg Date: Sat Apr 3 08:39:00 2010 New Revision: 206129 URL: http://svn.freebsd.org/changeset/base/206129 Log: vn_stat: take into account va_blocksize when setting st_blksize As currently st_blksize is always PAGE_SIZE, it is playing safe to not use any smaller value. For some cases this might not be optimal, but at least nothing should get broken. Generally I don't expect this commit to change much for the following reasons (in case of VREG, VDIR): - application I/O and physical I/O are sufficiently decoupled by filesystem code, buffer cache code, cluster and read-ahead logic - not all applications use st_blksize as a hint, some use f_iosize, some use fixed block sizes I expect writes to the middle of files on ZFS to benefit the most from this change. Silence from: fs@ MFC after: 2 weeks Modified: head/sys/kern/vfs_vnops.c Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Sat Apr 3 08:25:04 2010 (r206128) +++ head/sys/kern/vfs_vnops.c Sat Apr 3 08:39:00 2010 (r206129) @@ -792,11 +792,10 @@ vn_stat(vp, sb, active_cred, file_cred, * "a filesystem-specific preferred I/O block size for this * object. In some filesystem types, this may vary from file * to file" - * Default to PAGE_SIZE after much discussion. - * XXX: min(PAGE_SIZE, vp->v_bufobj.bo_bsize) may be more correct. + * Use miminum/default of PAGE_SIZE (e.g. for VCHR). */ - sb->st_blksize = PAGE_SIZE; + sb->st_blksize = max(PAGE_SIZE, vap->va_blocksize); sb->st_flags = vap->va_flags; if (priv_check(td, PRIV_VFS_GENERATION)) From owner-svn-src-all@FreeBSD.ORG Sat Apr 3 08:53:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E4111065672; Sat, 3 Apr 2010 08:53:54 +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 1DF738FC13; Sat, 3 Apr 2010 08:53: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 o338rsV4036113; Sat, 3 Apr 2010 08:53:54 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o338rrYB036111; Sat, 3 Apr 2010 08:53:53 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004030853.o338rrYB036111@svn.freebsd.org> From: Andriy Gapon Date: Sat, 3 Apr 2010 08:53:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206130 - head/sys/geom X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 03 Apr 2010 08:53:54 -0000 Author: avg Date: Sat Apr 3 08:53:53 2010 New Revision: 206130 URL: http://svn.freebsd.org/changeset/base/206130 Log: g_vfs_open: allow only one mount per device vnode In other words, deny multiple read-only mounts of the same device. Shared read-only mounts should theoretically be possible, but, unfortunately, can not be implemented correctly using current buffer cache code/interface and results in an eventual system crash. Also, using nullfs seems to be a more efficient way to achieve the same goal. This gets us back to where we were before GEOM and where other BSDs are. Submitted by: pjd (idea for checking for shared mounting) Discussed with: phk, pjd Silence from: fs@, geom@ MFC after: 2 weeks Modified: head/sys/geom/geom_vfs.c Modified: head/sys/geom/geom_vfs.c ============================================================================== --- head/sys/geom/geom_vfs.c Sat Apr 3 08:39:00 2010 (r206129) +++ head/sys/geom/geom_vfs.c Sat Apr 3 08:53:53 2010 (r206130) @@ -161,6 +161,10 @@ g_vfs_open(struct vnode *vp, struct g_co g_topology_assert(); *cpp = NULL; + bo = &vp->v_bufobj; + if (bo->bo_private != vp) + return (EBUSY); + pp = g_dev_getprovider(vp->v_rdev); if (pp == NULL) return (ENOENT); @@ -176,7 +180,7 @@ g_vfs_open(struct vnode *vp, struct g_co vnode_create_vobject(vp, pp->mediasize, curthread); VFS_UNLOCK_GIANT(vfslocked); *cpp = cp; - bo = &vp->v_bufobj; + cp->private = vp; bo->bo_ops = g_vfs_bufops; bo->bo_private = cp; bo->bo_bsize = pp->sectorsize; @@ -196,5 +200,6 @@ g_vfs_close(struct g_consumer *cp) gp = cp->geom; bo = gp->softc; bufobj_invalbuf(bo, V_SAVE, 0, 0); + bo->bo_private = cp->private; g_wither_geom_close(gp, ENXIO); } From owner-svn-src-all@FreeBSD.ORG Sat Apr 3 10:07:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 063911065675; Sat, 3 Apr 2010 10:07:11 +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 981228FC0C; Sat, 3 Apr 2010 10:07: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 o33A7Axw052175; Sat, 3 Apr 2010 10:07:10 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o33A7AG4052173; Sat, 3 Apr 2010 10:07:10 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201004031007.o33A7AG4052173@svn.freebsd.org> From: Hiroki Sato Date: Sat, 3 Apr 2010 10:07:10 +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: r206131 - stable/7/release/doc/en_US.ISO8859-1/errata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 03 Apr 2010 10:07:11 -0000 Author: hrs Date: Sat Apr 3 10:07:10 2010 New Revision: 206131 URL: http://svn.freebsd.org/changeset/base/206131 Log: - Typo (s/-p flag/-d flag/) in a ps(1) entry. [*] - Use &man.*; wherever possible. Spotted by: pluknet gmail.com [*] PR: docs/145059 [*] Modified: stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml Modified: stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml ============================================================================== --- stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml Sat Apr 3 08:53:53 2010 (r206130) +++ stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml Sat Apr 3 10:07:10 2010 (r206131) @@ -167,6 +167,18 @@ Late-Breaking News and Corrections + [20100402] The &os; 7.3-RELEASE Release Notes incorrectly + mentioned that a flag has been added to the + &man.ps.1; utility. It should have been a + flag. The correct entry is: + +
+ The &man.ps.1; command now supports a new flag + . This displays descendant info with the + output similar to Linux's (or + ). +
+ [20100330] The libc of &os; 7.3-RELEASE has the &man.fdopendir.3; function but <dirent.h> header file does not @@ -188,9 +200,9 @@ planned. [20100323] The &os; 7.3-RELEASE Release Notes incorrectly - mentioned that the hwpmc(4) driver has been added though this + mentioned that the &man.hwpmc.4; driver has been added though this driver has already been added in 7.0-RELEASE. The changes in - 7.3-RELEASE are that pmcannotate(8) utility and support for + 7.3-RELEASE are that &man.pmcannotate.8; utility and support for Intel Core 2 and Core i7 have been added.
From owner-svn-src-all@FreeBSD.ORG Sat Apr 3 10:55:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C27801065672; Sat, 3 Apr 2010 10:55:11 +0000 (UTC) (envelope-from flz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B1C198FC0A; Sat, 3 Apr 2010 10:55: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 o33AtBhm065798; Sat, 3 Apr 2010 10:55:11 GMT (envelope-from flz@svn.freebsd.org) Received: (from flz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o33AtBI7065797; Sat, 3 Apr 2010 10:55:11 GMT (envelope-from flz@svn.freebsd.org) Message-Id: <201004031055.o33AtBI7065797@svn.freebsd.org> From: Florent Thoumie Date: Sat, 3 Apr 2010 10:55: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: r206132 - head/usr.sbin/pkg_install/lib X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Apr 2010 10:55:11 -0000 Author: flz Date: Sat Apr 3 10:55:11 2010 New Revision: 206132 URL: http://svn.freebsd.org/changeset/base/206132 Log: Fix pkg_delete, check if the file we're trying to delete is a symlink before complaining that it doesn't exist. Typical case would be a leftover library symlink that's left over after the actual library has been removed. Reported by: tabthorpe Modified: head/usr.sbin/pkg_install/lib/plist.c Modified: head/usr.sbin/pkg_install/lib/plist.c ============================================================================== --- head/usr.sbin/pkg_install/lib/plist.c Sat Apr 3 10:07:10 2010 (r206131) +++ head/usr.sbin/pkg_install/lib/plist.c Sat Apr 3 10:55:11 2010 (r206132) @@ -551,7 +551,7 @@ delete_hierarchy(const char *dir, Boolea char *cp1, *cp2; cp1 = cp2 = strdup(dir); - if (!fexists(dir)) { + if (!fexists(dir) && !issymlink(dir)) { if (!ign_err) warnx("%s '%s' doesn't exist", isdir(dir) ? "directory" : "file", dir); From owner-svn-src-all@FreeBSD.ORG Sat Apr 3 10:57:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3653A1065670; Sat, 3 Apr 2010 10:57:14 +0000 (UTC) (envelope-from flz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 25ED38FC1B; Sat, 3 Apr 2010 10:57: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 o33AvEKx066304; Sat, 3 Apr 2010 10:57:14 GMT (envelope-from flz@svn.freebsd.org) Received: (from flz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o33AvEeW066302; Sat, 3 Apr 2010 10:57:14 GMT (envelope-from flz@svn.freebsd.org) Message-Id: <201004031057.o33AvEeW066302@svn.freebsd.org> From: Florent Thoumie Date: Sat, 3 Apr 2010 10:57: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: r206133 - head/usr.sbin/pkg_install/lib X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Apr 2010 10:57:14 -0000 Author: flz Date: Sat Apr 3 10:57:13 2010 New Revision: 206133 URL: http://svn.freebsd.org/changeset/base/206133 Log: Bump PKG_INSTALL_VERSION to 20100403. Modified: head/usr.sbin/pkg_install/lib/lib.h Modified: head/usr.sbin/pkg_install/lib/lib.h ============================================================================== --- head/usr.sbin/pkg_install/lib/lib.h Sat Apr 3 10:55:11 2010 (r206132) +++ head/usr.sbin/pkg_install/lib/lib.h Sat Apr 3 10:57:13 2010 (r206133) @@ -99,7 +99,7 @@ * Version of the package tools - increase whenever you make a change * in the code that is not cosmetic only. */ -#define PKG_INSTALL_VERSION 20100401 +#define PKG_INSTALL_VERSION 20100403 #define PKG_WRAPCONF_FNAME "/var/db/pkg_install.conf" #define main(argc, argv) real_main(argc, argv) From owner-svn-src-all@FreeBSD.ORG Sat Apr 3 11:15:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A069106564A; Sat, 3 Apr 2010 11:15:55 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6978C8FC08; Sat, 3 Apr 2010 11:15: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 o33BFt8B070408; Sat, 3 Apr 2010 11:15:55 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o33BFtg3070406; Sat, 3 Apr 2010 11:15:55 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201004031115.o33BFtg3070406@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Sat, 3 Apr 2010 11:15:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206134 - 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: Sat, 03 Apr 2010 11:15:55 -0000 Author: pjd Date: Sat Apr 3 11:15:55 2010 New Revision: 206134 URL: http://svn.freebsd.org/changeset/base/206134 Log: Add missing mnt_kern_flag flags in 'show mount' output. Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Sat Apr 3 10:57:13 2010 (r206133) +++ head/sys/kern/vfs_subr.c Sat Apr 3 11:15:55 2010 (r206134) @@ -2839,14 +2839,18 @@ DB_SHOW_COMMAND(mount, db_show_mount) MNT_KERN_FLAG(MNTK_ASYNC); MNT_KERN_FLAG(MNTK_SOFTDEP); MNT_KERN_FLAG(MNTK_NOINSMNTQ); + MNT_KERN_FLAG(MNTK_DRAINING); + MNT_KERN_FLAG(MNTK_REFEXPIRE); + MNT_KERN_FLAG(MNTK_EXTENDED_SHARED); + MNT_KERN_FLAG(MNTK_SHARED_WRITES); MNT_KERN_FLAG(MNTK_UNMOUNT); MNT_KERN_FLAG(MNTK_MWAIT); MNT_KERN_FLAG(MNTK_SUSPEND); MNT_KERN_FLAG(MNTK_SUSPEND2); MNT_KERN_FLAG(MNTK_SUSPENDED); MNT_KERN_FLAG(MNTK_MPSAFE); - MNT_KERN_FLAG(MNTK_NOKNOTE); MNT_KERN_FLAG(MNTK_LOOKUP_SHARED); + MNT_KERN_FLAG(MNTK_NOKNOTE); #undef MNT_KERN_FLAG if (flags != 0) { if (buf[0] != '\0') From owner-svn-src-all@FreeBSD.ORG Sat Apr 3 11:19:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2AC2F1065672; Sat, 3 Apr 2010 11:19:21 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 19A358FC12; Sat, 3 Apr 2010 11: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 o33BJKJQ071195; Sat, 3 Apr 2010 11:19:20 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o33BJKCU071193; Sat, 3 Apr 2010 11:19:20 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201004031119.o33BJKCU071193@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Sat, 3 Apr 2010 11:19: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: r206135 - 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: Sat, 03 Apr 2010 11:19:21 -0000 Author: pjd Date: Sat Apr 3 11:19:20 2010 New Revision: 206135 URL: http://svn.freebsd.org/changeset/base/206135 Log: Fix some whitespace nits. Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Sat Apr 3 11:15:55 2010 (r206134) +++ head/sys/kern/vfs_subr.c Sat Apr 3 11:19:20 2010 (r206135) @@ -1378,7 +1378,7 @@ restartsync: /* * buf_splay() - splay tree core for the clean/dirty list of buffers in - * a vnode. + * a vnode. * * NOTE: We have to deal with the special case of a background bitmap * buffer, a situation where two buffers will have the same logical @@ -2100,13 +2100,13 @@ vget(struct vnode *vp, int flags, struct /* Upgrade our holdcnt to a usecount. */ v_upgrade_usecount(vp); /* - * We don't guarantee that any particular close will + * We don't guarantee that any particular close will * trigger inactive processing so just make a best effort * here at preventing a reference to a removed file. If * we don't succeed no harm is done. */ if (vp->v_iflag & VI_OWEINACT) { - if (VOP_ISLOCKED(vp) == LK_EXCLUSIVE && + if (VOP_ISLOCKED(vp) == LK_EXCLUSIVE && (flags & LK_NOWAIT) == 0) vinactive(vp, td); vp->v_iflag &= ~VI_OWEINACT; @@ -2362,7 +2362,7 @@ SYSCTL_INT(_debug, OID_AUTO, busyprt, CT #endif int -vflush( struct mount *mp, int rootrefs, int flags, struct thread *td) +vflush(struct mount *mp, int rootrefs, int flags, struct thread *td) { struct vnode *vp, *mvp, *rootvp = NULL; struct vattr vattr; @@ -2383,12 +2383,10 @@ vflush( struct mount *mp, int rootrefs, return (error); } vput(rootvp); - } MNT_ILOCK(mp); loop: MNT_VNODE_FOREACH(vp, mp, mvp) { - VI_LOCK(vp); vholdl(vp); MNT_IUNLOCK(mp); @@ -3530,7 +3528,7 @@ vaccess(enum vtype type, mode_t file_mod KASSERT((accmode & ~(VEXEC | VWRITE | VREAD | VADMIN | VAPPEND)) == 0, ("invalid bit in accmode")); KASSERT((accmode & VAPPEND) == 0 || (accmode & VWRITE), - ("VAPPEND without VWRITE")); + ("VAPPEND without VWRITE")); /* * Look for a normal, non-privileged way to access the file/directory From owner-svn-src-all@FreeBSD.ORG Sat Apr 3 11:32:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4ABA0106564A for ; Sat, 3 Apr 2010 11:32:20 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-qy0-f181.google.com (mail-qy0-f181.google.com [209.85.221.181]) by mx1.freebsd.org (Postfix) with ESMTP id 026D58FC15 for ; Sat, 3 Apr 2010 11:32:15 +0000 (UTC) Received: by qyk11 with SMTP id 11so2752041qyk.13 for ; Sat, 03 Apr 2010 04:32:15 -0700 (PDT) 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:received:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=sP8d+0BugD50+36rNWUOBvJ3k6bnQMdDGo8GZZW0I80=; b=EuOHbA97D8EJquj5LHKNVU6jWsRzhQaTtnJMAf7zi5AmQIpHED63JUbykP/FFpH1v0 HIy4kjdkzwfodRzl2OK5o/4mjTRrh09vNeCL3cvZCQ1IqHrM/HdlgU4xm+P4E8qZCD1o V08qYULrwkTVHd8ulY2Gge5GoSJCddlQWbDYc= 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=dqBDJlXP+qDoFM1gsTNTOptEO7l39rjxHaCUbEQ6ndzBgfbRjLuoilUG9FxcoAc9Mg L4kpWfKzMCZCj7PNHnlr1j6U5PEU9N+7s5VAsVeMfdnBms41pPlQ9DMAjXUkAKI64Cbe sA1ekDXKJlyVA8ehmTOI9oOhz/SDB+FHtB6sg= MIME-Version: 1.0 Received: by 10.229.33.72 with HTTP; Sat, 3 Apr 2010 04:32:15 -0700 (PDT) In-Reply-To: <20100402001231.GA16732@britannica.bec.de> References: <201004011427.o31ERTaT056824@svn.freebsd.org> <20100402001231.GA16732@britannica.bec.de> Date: Sat, 3 Apr 2010 04:32:15 -0700 Received: by 10.229.234.68 with SMTP id kb4mr1209428qcb.103.1270294335250; Sat, 03 Apr 2010 04:32:15 -0700 (PDT) Message-ID: From: Garrett Cooper To: Joerg Sonnenberger Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-all@freebsd.org Subject: Re: svn commit: r206043 - in head/usr.sbin/pkg_install: add delete lib version X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 03 Apr 2010 11:32:20 -0000 On Thu, Apr 1, 2010 at 5:12 PM, Joerg Sonnenberger wrote: > On Thu, Apr 01, 2010 at 05:02:34PM -0700, Garrett Cooper wrote: >> =A0 =A0 1. FILENAME_MAX could be less than PATH_MAX, and actually is on >> the BSDs (256 vs 1024). PATH_MAX allows for duplicate slashes and all >> sorts of whacky path crud and probably should be used more liberally >> in the pkg_install code. This however isn't always true in the NetBSD >> case because they're aiming for portability of pkg_install, however >> PATH_MAX is always guaranteed to be at least as large as FILENAME_MAX. > > Well, I've been slowly working on eliminating the use of PATH_MAX in the > NetBSD/pkgsrc version of pkg_install. The performance gain from using > fixed stack space is minimal and the error handling generally > incompletely at best. > > Joerg Hi Joerg! I'm sorry but I'm a little bit confused by this statement: do you mean that you're replacing PATH_MAX sized buffers to FILENAME_MAX sized buffers? If so this may cause an issue because several of the variables used in constructing the file paths in pkg_install aren't necessarily correct in overflow cases. We need to avoid introducing potential functional flaws with filename truncation like this. I appreciate the work that you've done on the new version of pkg_install -- hopefully we can cross-pollinate some useful pieces with pkg_install in the near future. Thanks, -Garrett From owner-svn-src-all@FreeBSD.ORG Sat Apr 3 11:42:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3887B1065672 for ; Sat, 3 Apr 2010 11:42:28 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from www.sonnenberger.org (www.sonnenberger.org [92.79.50.50]) by mx1.freebsd.org (Postfix) with ESMTP id ED94D8FC16 for ; Sat, 3 Apr 2010 11:42:27 +0000 (UTC) Received: from britannica.bec.de (www.sonnenberger.org [192.168.1.10]) by www.sonnenberger.org (Postfix) with ESMTP id 52F166665D for ; Sat, 3 Apr 2010 13:42:26 +0200 (CEST) Received: by britannica.bec.de (Postfix, from userid 1000) id C840715C64; Sat, 3 Apr 2010 13:40:55 +0200 (CEST) Date: Sat, 3 Apr 2010 13:40:55 +0200 From: Joerg Sonnenberger To: svn-src-all@freebsd.org Message-ID: <20100403114055.GC23007@britannica.bec.de> References: <201004011427.o31ERTaT056824@svn.freebsd.org> <20100402001231.GA16732@britannica.bec.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Subject: Re: svn commit: r206043 - in head/usr.sbin/pkg_install: add delete lib version X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 03 Apr 2010 11:42:28 -0000 On Sat, Apr 03, 2010 at 04:32:15AM -0700, Garrett Cooper wrote: > I'm sorry but I'm a little bit confused by this statement: do you > mean that you're replacing PATH_MAX sized buffers to FILENAME_MAX > sized buffers? If so this may cause an issue because several of the > variables used in constructing the file paths in pkg_install aren't > necessarily correct in overflow cases. We need to avoid introducing > potential functional flaws with filename truncation like this. No, I am replacing fixed size buffers with variable size buffers. The extraction code should generally be able to support arbitrary deep path names, for the rest the kernel can complain. Joerg From owner-svn-src-all@FreeBSD.ORG Sat Apr 3 11:53:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 274381065674 for ; Sat, 3 Apr 2010 11:53:58 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.26]) by mx1.freebsd.org (Postfix) with ESMTP id C4A328FC1E for ; Sat, 3 Apr 2010 11:53:57 +0000 (UTC) Received: by qw-out-2122.google.com with SMTP id 3so946995qwe.7 for ; Sat, 03 Apr 2010 04:53:57 -0700 (PDT) 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:received:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=qzx8WZjyhXFPOG+qP/JhGn63qE9/cWor32rV7vAEwME=; b=f7slFcPIj59EnvW+tGe0vCIKpR4bRU16dD3xyFiyAhqbJ1lALNmD+kSoEaEsrUWRsG AT6x0UpUD8Ns/lsCvPWbDfJIiD2b1xpR4tGFpCqO/8zh60tIhNqMeVKDdtwgmbQMJXeM T2mDi0gHso012WycIsmozmyRFoBZutD73SVCs= 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=xM/xHD5ejeBBA50lsaheLkzL6uUNDrfMhcH3/+AyDZ3IrSX9pkihwj5UKO/4HW/L1H 4lhl8mUuRvcm2sTSEjCEYQGte9YSknwofbzIfKZg3EcJ4DnrxFv9nymnjHfnNks14rra kshXmephd8gbSuDJKp7HDzZzrlZ4N+ZO49U24= MIME-Version: 1.0 Received: by 10.229.33.72 with HTTP; Sat, 3 Apr 2010 04:53:51 -0700 (PDT) In-Reply-To: <20100403114055.GC23007@britannica.bec.de> References: <201004011427.o31ERTaT056824@svn.freebsd.org> <20100402001231.GA16732@britannica.bec.de> <20100403114055.GC23007@britannica.bec.de> Date: Sat, 3 Apr 2010 04:53:51 -0700 Received: by 10.229.224.133 with SMTP id io5mr5470068qcb.37.1270295632106; Sat, 03 Apr 2010 04:53:52 -0700 (PDT) Message-ID: From: Garrett Cooper To: Joerg Sonnenberger Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-all@freebsd.org Subject: Re: svn commit: r206043 - in head/usr.sbin/pkg_install: add delete lib version X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 03 Apr 2010 11:53:58 -0000 On Sat, Apr 3, 2010 at 4:40 AM, Joerg Sonnenberger wrote: > On Sat, Apr 03, 2010 at 04:32:15AM -0700, Garrett Cooper wrote: >> =A0 =A0I'm sorry but I'm a little bit confused by this statement: do you >> mean that you're replacing PATH_MAX sized buffers to FILENAME_MAX >> sized buffers? If so this may cause an issue because several of the >> variables used in constructing the file paths in pkg_install aren't >> necessarily correct in overflow cases. We need to avoid introducing >> potential functional flaws with filename truncation like this. > > No, I am replacing fixed size buffers with variable size buffers. The > extraction code should generally be able to support arbitrary deep path > names, for the rest the kernel can complain. Depending on how this is implemented, this could either be a minor functional issue, or a really bad security issue then waiting to happen because people can craft paths such that things aren't properly are either incorrect in the best case scenario, or could provide a back door to circumvent some points in how packages are installed, etc. Furthermore dynamic heap allocation and deallocation turns into a pain with pkg_install (for instance in its current incarnation on FreeBSD) because there are a number of exit points in the system that need to be covered in order to do things correctly and properly. sysinstall and pkg_install [in FreeBSD] are enough of a mess without introducing new potential functional and security flaws, and unnecessary complexity. I'd rather not do down this road especially when we know the limitations of the operating systems' filesystems via well-defined and well-known constants, and when these buffers are small enough and spread far enough in-between that it shouldn't necessarily be a scalability issue. Thanks, -Garrett From owner-svn-src-all@FreeBSD.ORG Sat Apr 3 12:34:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC496106566C; Sat, 3 Apr 2010 12:34:32 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9B8418FC1A; Sat, 3 Apr 2010 12:34: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 o33CYWZO087690; Sat, 3 Apr 2010 12:34:32 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o33CYWSa087688; Sat, 3 Apr 2010 12:34:32 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201004031234.o33CYWSa087688@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 3 Apr 2010 12:34: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: r206136 - head/sys/compat/ia32 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 03 Apr 2010 12:34:32 -0000 Author: bz Date: Sat Apr 3 12:34:32 2010 New Revision: 206136 URL: http://svn.freebsd.org/changeset/base/206136 Log: Add a forward declaration to silence a warning when compiling ia32_genassym.c. Reviewed by: kib MFC after: 3 days Modified: head/sys/compat/ia32/ia32_signal.h Modified: head/sys/compat/ia32/ia32_signal.h ============================================================================== --- head/sys/compat/ia32/ia32_signal.h Sat Apr 3 11:19:20 2010 (r206135) +++ head/sys/compat/ia32/ia32_signal.h Sat Apr 3 12:34:32 2010 (r206136) @@ -180,6 +180,7 @@ struct ia32_sigframe3 { #endif struct ksiginfo; +struct image_params; extern char ia32_sigcode[]; extern char freebsd4_ia32_sigcode[]; extern int sz_ia32_sigcode; From owner-svn-src-all@FreeBSD.ORG Sat Apr 3 15:19:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1AF781065672; Sat, 3 Apr 2010 15:19:46 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 0A1B98FC21; Sat, 3 Apr 2010 15:19:43 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id SAA14703; Sat, 03 Apr 2010 18:19:42 +0300 (EEST) (envelope-from avg@freebsd.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1Ny58P-0008xu-UM; Sat, 03 Apr 2010 18:19:41 +0300 Message-ID: <4BB75C8D.8070607@freebsd.org> Date: Sat, 03 Apr 2010 18:19:41 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.24 (X11/20100321) MIME-Version: 1.0 To: Xin LI References: <201003160048.o2G0mReg025652@svn.freebsd.org> In-Reply-To: <201003160048.o2G0mReg025652@svn.freebsd.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Pawel Jakub Dawidek , =?UTF-8?B?TWFydGluIE1hdHXFoWth?= Subject: Re: svn commit: r205198 - in head/cddl/contrib/opensolaris: cmd/zfs lib/libzfs/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: Sat, 03 Apr 2010 15:19:46 -0000 on 16/03/2010 02:48 Xin LI said the following: > Author: delphij > Date: Tue Mar 16 00:48:27 2010 > New Revision: 205198 > URL: http://svn.freebsd.org/changeset/base/205198 > > Log: > Merge OpenSolaris revision 8802:010b31dd4c53: > > 6773366 "zfs list" memory consumption can be further reduced > > PR: bin/144720 > Submitted by: mm > Approved by: pjd > Obtained from: OpenSolaris > MFC after: 1 month It seems that this commit causes a crash in zfs(1) when e.g. 'zfs list' is executed and one of the filesystems has a user property set on it. The crash is in zfs_prune_proplist function at cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c:4291. Relevant code snippet: 4286 4287 while (curr) { 4288 zfs_prop_t zfs_prop = zfs_name_to_prop(nvpair_name(curr)); 4289 nvpair_t *next = nvlist_next_nvpair(zhp->zfs_props, curr); 4290 4291 if (props[zfs_prop] == B_FALSE) 4292 (void) nvlist_remove(zhp->zfs_props, 4293 nvpair_name(curr), nvpair_type(curr)); 4294 curr = next; 4295 } zfs_prop is (-1) and nvpair_name(curr) is my custom property "avg:nobackup". Not sure if this was fixed in OpenSolaris or what. -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Sat Apr 3 15:29:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6FE67106566B; Sat, 3 Apr 2010 15:29:55 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 6D0A78FC0A; Sat, 3 Apr 2010 15:29:53 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id SAA14783; Sat, 03 Apr 2010 18:29:52 +0300 (EEST) (envelope-from avg@freebsd.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1Ny5IF-0008yc-Jz; Sat, 03 Apr 2010 18:29:51 +0300 Message-ID: <4BB75EEF.8060201@freebsd.org> Date: Sat, 03 Apr 2010 18:29:51 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.24 (X11/20100321) MIME-Version: 1.0 To: Xin LI References: <201003160048.o2G0mReg025652@svn.freebsd.org> <4BB75C8D.8070607@freebsd.org> In-Reply-To: <4BB75C8D.8070607@freebsd.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Pawel Jakub Dawidek , =?UTF-8?B?TWFydGluIE1hdHXFoWth?= Subject: Re: svn commit: r205198 - in head/cddl/contrib/opensolaris: cmd/zfs lib/libzfs/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: Sat, 03 Apr 2010 15:29:55 -0000 on 03/04/2010 18:19 Andriy Gapon said the following: > It seems that this commit causes a crash in zfs(1) when e.g. 'zfs list' is > executed and one of the filesystems has a user property set on it. > > The crash is in zfs_prune_proplist function at > cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c:4291. > > Relevant code snippet: > 4286 > 4287 while (curr) { > 4288 zfs_prop_t zfs_prop = zfs_name_to_prop(nvpair_name(curr)); > 4289 nvpair_t *next = nvlist_next_nvpair(zhp->zfs_props, curr); > 4290 > 4291 if (props[zfs_prop] == B_FALSE) > 4292 (void) nvlist_remove(zhp->zfs_props, > 4293 nvpair_name(curr), nvpair_type(curr)); > 4294 curr = next; > 4295 } > > zfs_prop is (-1) and nvpair_name(curr) is my custom property "avg:nobackup". > Not sure if this was fixed in OpenSolaris or what. BTW, I use this simplistic change for time being, not sure if this is a correct fix. --- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c +++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c @@ -4288,7 +4288,7 @@ zfs_prune_proplist(zfs_handle_t *zhp, uint8_t *props) zfs_prop_t zfs_prop = zfs_name_to_prop(nvpair_name(curr)); nvpair_t *next = nvlist_next_nvpair(zhp->zfs_props, curr); - if (props[zfs_prop] == B_FALSE) + if (zfs_prop != ZPROP_INVAL && props[zfs_prop] == B_FALSE) (void) nvlist_remove(zhp->zfs_props, nvpair_name(curr), nvpair_type(curr)); curr = next; -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Sat Apr 3 15:40:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 86F10106564A; Sat, 3 Apr 2010 15:40:14 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 749278FC17; Sat, 3 Apr 2010 15:40: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 o33FeE2W028457; Sat, 3 Apr 2010 15:40:14 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o33FeEmT028434; Sat, 3 Apr 2010 15:40:14 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201004031540.o33FeEmT028434@svn.freebsd.org> From: Michael Tuexen Date: Sat, 3 Apr 2010 15:40: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: r206137 - in head/sys: netinet 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: Sat, 03 Apr 2010 15:40:14 -0000 Author: tuexen Date: Sat Apr 3 15:40:14 2010 New Revision: 206137 URL: http://svn.freebsd.org/changeset/base/206137 Log: * Fix some race condition in SACK/NR-SACK processing. * Fix handling of mapping arrays when draining mbufs or processing FORWARD-TSN chunks. * Cleanup code (no duplicate code anymore for SACKs and NR-SACKs). Part of this code was developed together with rrs. MFC after: 2 weeks. Modified: head/sys/netinet/sctp_asconf.c head/sys/netinet/sctp_constants.h head/sys/netinet/sctp_indata.c head/sys/netinet/sctp_indata.h head/sys/netinet/sctp_input.c head/sys/netinet/sctp_output.c head/sys/netinet/sctp_output.h head/sys/netinet/sctp_pcb.c head/sys/netinet/sctp_pcb.h head/sys/netinet/sctp_structs.h head/sys/netinet/sctp_usrreq.c head/sys/netinet/sctp_var.h head/sys/netinet/sctputil.c head/sys/netinet/sctputil.h head/sys/netinet6/sctp6_usrreq.c Modified: head/sys/netinet/sctp_asconf.c ============================================================================== --- head/sys/netinet/sctp_asconf.c Sat Apr 3 12:34:32 2010 (r206136) +++ head/sys/netinet/sctp_asconf.c Sat Apr 3 15:40:14 2010 (r206137) @@ -556,9 +556,9 @@ sctp_process_asconf_set_primary(struct m * PRIMARY with DELETE IP ADDRESS of the previous primary * destination, unacknowledged DATA are retransmitted * immediately to the new primary destination for seamless - * handover. If the destination is UNCONFIRMED and marked - * to REQ_PRIM, The retransmission occur when reception of - * the HEARTBEAT-ACK. (See sctp_handle_heartbeat_ack in + * handover. If the destination is UNCONFIRMED and marked to + * REQ_PRIM, The retransmission occur when reception of the + * HEARTBEAT-ACK. (See sctp_handle_heartbeat_ack in * sctp_input.c) Also, when change of the primary * destination, it is better that all subsequent new DATA * containing already queued DATA are transmitted to the new @@ -1166,7 +1166,7 @@ sctp_path_check_and_react(struct sctp_tc /* * If number of local valid addresses is 1, the valid address is - * probably newly added address. Several valid addresses in this + * probably newly added address. Several valid addresses in this * association. A source address may not be changed. Additionally, * they can be configured on a same interface as "alias" addresses. * (by micchie) @@ -1210,7 +1210,7 @@ sctp_path_check_and_react(struct sctp_tc /* * Check if the nexthop is corresponding to the new address. * If the new address is corresponding to the current - * nexthop, the path will be changed. If the new address is + * nexthop, the path will be changed. If the new address is * NOT corresponding to the current nexthop, the path will * not be changed. */ Modified: head/sys/netinet/sctp_constants.h ============================================================================== --- head/sys/netinet/sctp_constants.h Sat Apr 3 12:34:32 2010 (r206136) +++ head/sys/netinet/sctp_constants.h Sat Apr 3 15:40:14 2010 (r206137) @@ -544,13 +544,7 @@ __FBSDID("$FreeBSD$"); #define SCTP_INITIAL_MAPPING_ARRAY 16 /* how much we grow the mapping array each call */ #define SCTP_MAPPING_ARRAY_INCR 32 -/* EY 05/13/08 - nr_sack version of the previous 3 constants */ -/* Maximum the nr mapping array will grow to (TSN mapping array) */ -#define SCTP_NR_MAPPING_ARRAY 512 -/* size of the inital malloc on the nr mapping array */ -#define SCTP_INITIAL_NR_MAPPING_ARRAY 16 -/* how much we grow the nr mapping array each call */ -#define SCTP_NR_MAPPING_ARRAY_INCR 32 + /* * Here we define the timer types used by the implementation as arguments in * the set/get timer type calls. @@ -933,6 +927,13 @@ __FBSDID("$FreeBSD$"); #define SCTP_IS_TSN_PRESENT(arry, gap) ((arry[(gap >> 3)] >> (gap & 0x07)) & 0x01) #define SCTP_SET_TSN_PRESENT(arry, gap) (arry[(gap >> 3)] |= (0x01 << ((gap & 0x07)))) #define SCTP_UNSET_TSN_PRESENT(arry, gap) (arry[(gap >> 3)] &= ((~(0x01 << ((gap & 0x07)))) & 0xff)) +#define SCTP_CALC_TSN_TO_GAP(gap, tsn, mapping_tsn) do { \ + if (tsn >= mapping_tsn) { \ + gap = tsn - mapping_tsn; \ + } else { \ + gap = (MAX_TSN - mapping_tsn) + tsn + 1; \ + } \ + } while(0) #define SCTP_RETRAN_DONE -1 Modified: head/sys/netinet/sctp_indata.c ============================================================================== --- head/sys/netinet/sctp_indata.c Sat Apr 3 12:34:32 2010 (r206136) +++ head/sys/netinet/sctp_indata.c Sat Apr 3 15:40:14 2010 (r206137) @@ -45,13 +45,6 @@ __FBSDID("$FreeBSD$"); #include #include -#define SCTP_CALC_TSN_TO_GAP(gap, tsn, mapping_tsn) do { \ - if (tsn >= mapping_tsn) { \ - gap = tsn - mapping_tsn; \ - } else { \ - gap = (MAX_TSN - mapping_tsn) + tsn + 1; \ - } \ - } while(0) /* * NOTES: On the outbound side of things I need to check the sack timer to @@ -303,13 +296,13 @@ sctp_mark_non_revokable(struct sctp_asso return; } SCTP_CALC_TSN_TO_GAP(gap, tsn, asoc->mapping_array_base_tsn); -#ifdef INVARIANTS if (!SCTP_IS_TSN_PRESENT(asoc->mapping_array, gap)) { printf("gap:%x tsn:%x\n", gap, tsn); sctp_print_mapping_array(asoc); +#ifdef INVARIANTS panic("Things are really messed up now!!"); - } #endif + } SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, gap); SCTP_UNSET_TSN_PRESENT(asoc->mapping_array, gap); if (compare_with_wrap(tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN)) { @@ -317,7 +310,8 @@ sctp_mark_non_revokable(struct sctp_asso } if (tsn == asoc->highest_tsn_inside_map) { /* We must back down to see what the new highest is */ - for (i = tsn - 1; compare_with_wrap(i, asoc->mapping_array_base_tsn, MAX_TSN); i--) { + for (i = tsn - 1; (compare_with_wrap(i, asoc->mapping_array_base_tsn, MAX_TSN) || + (i == asoc->mapping_array_base_tsn)); i--) { SCTP_CALC_TSN_TO_GAP(gap, i, asoc->mapping_array_base_tsn); if (SCTP_IS_TSN_PRESENT(asoc->mapping_array, gap)) { asoc->highest_tsn_inside_map = i; @@ -411,6 +405,7 @@ abandon: end = 1; else end = 0; + sctp_mark_non_revokable(asoc, chk->rec.data.TSN_seq); sctp_add_to_readq(stcb->sctp_ep, stcb, control, &stcb->sctp_socket->so_rcv, end, SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED); @@ -420,6 +415,7 @@ abandon: end = 1; else end = 0; + sctp_mark_non_revokable(asoc, chk->rec.data.TSN_seq); if (sctp_append_to_readq(stcb->sctp_ep, stcb, stcb->asoc.control_pdapi, chk->data, end, chk->rec.data.TSN_seq, @@ -454,7 +450,6 @@ abandon: } /* pull it we did it */ TAILQ_REMOVE(&asoc->reasmqueue, chk, sctp_next); - sctp_mark_non_revokable(asoc, chk->rec.data.TSN_seq); if (chk->rec.data.rcv_flags & SCTP_DATA_LAST_FRAG) { asoc->fragmented_delivery_inprogress = 0; if ((chk->rec.data.rcv_flags & SCTP_DATA_UNORDERED) == 0) { @@ -501,11 +496,11 @@ abandon: asoc->size_on_all_streams -= ctl->length; sctp_ucount_decr(asoc->cnt_on_all_streams); strm->last_sequence_delivered++; + sctp_mark_non_revokable(asoc, ctl->sinfo_tsn); sctp_add_to_readq(stcb->sctp_ep, stcb, ctl, &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED); - sctp_mark_non_revokable(asoc, ctl->sinfo_tsn); ctl = ctlat; } else { break; @@ -616,11 +611,11 @@ protocol_error: sctp_ucount_decr(asoc->cnt_on_all_streams); strm->last_sequence_delivered++; + sctp_mark_non_revokable(asoc, control->sinfo_tsn); sctp_add_to_readq(stcb->sctp_ep, stcb, control, &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED); - sctp_mark_non_revokable(asoc, control->sinfo_tsn); control = TAILQ_FIRST(&strm->inqueue); while (control != NULL) { /* all delivered */ @@ -641,13 +636,12 @@ protocol_error: sctp_log_strm_del(control, NULL, SCTP_STR_LOG_FROM_IMMED_DEL); } - /* EY will be used to calculate nr-gap */ + sctp_mark_non_revokable(asoc, control->sinfo_tsn); sctp_add_to_readq(stcb->sctp_ep, stcb, control, &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED); - sctp_mark_non_revokable(asoc, control->sinfo_tsn); control = at; continue; } @@ -965,8 +959,7 @@ sctp_queue_data_for_reasm(struct sctp_tc *abort_flag = 1; } else if ((asoc->fragment_flags & SCTP_DATA_UNORDERED) != SCTP_DATA_UNORDERED && - chk->rec.data.stream_seq != - asoc->ssn_of_pdapi) { + chk->rec.data.stream_seq != asoc->ssn_of_pdapi) { /* Got to be the right STR Seq */ SCTPDBG(SCTP_DEBUG_INDATA1, "Gak, Evil plot, it IS not same stream seq %d vs %d\n", chk->rec.data.stream_seq, @@ -1623,7 +1616,6 @@ sctp_process_a_data_chunk(struct sctp_tc } SCTP_STAT_INCR(sctps_badsid); SCTP_TCB_LOCK_ASSERT(stcb); - SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, gap); if (compare_with_wrap(tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN)) { asoc->highest_tsn_inside_nr_map = tsn; @@ -1787,6 +1779,7 @@ sctp_process_a_data_chunk(struct sctp_tc SCTP_STR_LOG_FROM_EXPRS_DEL); } control = NULL; + SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, gap); if (compare_with_wrap(tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN)) { asoc->highest_tsn_inside_nr_map = tsn; @@ -1853,10 +1846,6 @@ failed_express_del: need_reasm_check = 1; } } - SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, gap); - if (compare_with_wrap(tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN)) { - asoc->highest_tsn_inside_nr_map = tsn; - } control = NULL; goto finish_express_del; } @@ -2059,10 +2048,10 @@ failed_pdapi_express_del: /* ok, if we reach here we have passed the sanity checks */ if (chunk_flags & SCTP_DATA_UNORDERED) { /* queue directly into socket buffer */ + sctp_mark_non_revokable(asoc, control->sinfo_tsn); sctp_add_to_readq(stcb->sctp_ep, stcb, control, &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED); - } else { /* * Special check for when streams are resetting. We @@ -2134,10 +2123,6 @@ failed_pdapi_express_del: } } finish_express_del: - if (tsn == (asoc->cumulative_tsn + 1)) { - /* Update cum-ack */ - asoc->cumulative_tsn = tsn; - } if (last_chunk) { *m = NULL; } @@ -2215,43 +2200,43 @@ finish_express_del: } int8_t sctp_map_lookup_tab[256] = { - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 3, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 4, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 3, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 5, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 3, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 4, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 3, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 6, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 3, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 4, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 3, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 5, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 3, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 4, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 3, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 7, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 4, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 5, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 4, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 6, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 4, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 5, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 4, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 7, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 4, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 5, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 4, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 6, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 4, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 5, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 4, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 8 }; void -sctp_sack_check(struct sctp_tcb *stcb, int ok_to_sack, int was_a_gap, int *abort_flag) +sctp_slide_mapping_arrays(struct sctp_tcb *stcb) { /* * Now we also need to check the mapping array in a couple of ways. @@ -2259,7 +2244,6 @@ sctp_sack_check(struct sctp_tcb *stcb, i */ struct sctp_association *asoc; int at; - int last_all_ones = 0; int slide_from, slide_end, lgap, distance; /* EY nr_mapping array variables */ @@ -2279,19 +2263,16 @@ sctp_sack_check(struct sctp_tcb *stcb, i * offset of the current cum-ack as the starting point. */ at = 0; - for (slide_from = 0; slide_from < stcb->asoc.nr_mapping_array_size; slide_from++) { + for (slide_from = 0; slide_from < stcb->asoc.mapping_array_size; slide_from++) { if (asoc->nr_mapping_array[slide_from] == 0xff) { at += 8; - last_all_ones = 1; } else { /* there is a 0 bit */ at += sctp_map_lookup_tab[asoc->nr_mapping_array[slide_from]]; - last_all_ones = 0; break; } } - asoc->cumulative_tsn = asoc->nr_mapping_array_base_tsn + (at - last_all_ones); - at++; + asoc->cumulative_tsn = asoc->mapping_array_base_tsn + (at - 1); if (compare_with_wrap(asoc->cumulative_tsn, asoc->highest_tsn_inside_map, MAX_TSN) && compare_with_wrap(asoc->cumulative_tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN) @@ -2320,18 +2301,22 @@ sctp_sack_check(struct sctp_tcb *stcb, i if ((asoc->cumulative_tsn == highest_tsn) && (at >= 8)) { /* The complete array was completed by a single FR */ /* highest becomes the cum-ack */ - int clr; + int clr, i; /* clear the array */ - clr = (at >> 3) + 1; + clr = ((at + 7) >> 3); if (clr > asoc->mapping_array_size) { clr = asoc->mapping_array_size; } memset(asoc->mapping_array, 0, clr); memset(asoc->nr_mapping_array, 0, clr); - + for (i = 0; i < asoc->mapping_array_size; i++) { + if ((asoc->mapping_array[i]) || (asoc->nr_mapping_array[i])) { + printf("Error Mapping array's not clean at clear\n"); + sctp_print_mapping_array(asoc); + } + } asoc->mapping_array_base_tsn = asoc->cumulative_tsn + 1; - asoc->nr_mapping_array_base_tsn = asoc->cumulative_tsn + 1; asoc->highest_tsn_inside_nr_map = asoc->highest_tsn_inside_map = asoc->cumulative_tsn; } else if (at >= 8) { /* we can slide the mapping array down */ @@ -2393,12 +2378,11 @@ sctp_sack_check(struct sctp_tcb *stcb, i asoc->nr_mapping_array[slide_from + ii]; } - for (ii = distance; ii <= slide_end; ii++) { + for (ii = distance; ii <= asoc->mapping_array_size; ii++) { asoc->mapping_array[ii] = 0; asoc->nr_mapping_array[ii] = 0; } asoc->mapping_array_base_tsn += (slide_from << 3); - asoc->nr_mapping_array_base_tsn += (slide_from << 3); if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MAP_LOGGING_ENABLE) { sctp_log_map(asoc->mapping_array_base_tsn, asoc->cumulative_tsn, asoc->highest_tsn_inside_map, @@ -2406,95 +2390,95 @@ sctp_sack_check(struct sctp_tcb *stcb, i } } } +} + + +void +sctp_sack_check(struct sctp_tcb *stcb, int was_a_gap, int *abort_flag) +{ + struct sctp_association *asoc; + uint32_t highest_tsn; + + asoc = &stcb->asoc; + if (compare_with_wrap(asoc->highest_tsn_inside_nr_map, + asoc->highest_tsn_inside_map, + MAX_TSN)) { + highest_tsn = asoc->highest_tsn_inside_nr_map; + } else { + highest_tsn = asoc->highest_tsn_inside_map; + } + /* * Now we need to see if we need to queue a sack or just start the * timer (if allowed). */ - if (ok_to_sack) { - if (SCTP_GET_STATE(asoc) == SCTP_STATE_SHUTDOWN_SENT) { - /* - * Ok special case, in SHUTDOWN-SENT case. here we - * maker sure SACK timer is off and instead send a - * SHUTDOWN and a SACK - */ - if (SCTP_OS_TIMER_PENDING(&stcb->asoc.dack_timer.timer)) { - sctp_timer_stop(SCTP_TIMER_TYPE_RECV, - stcb->sctp_ep, stcb, NULL, SCTP_FROM_SCTP_INDATA + SCTP_LOC_18); - } - sctp_send_shutdown(stcb, stcb->asoc.primary_destination); - /* - * EY if nr_sacks used then send an nr-sack , a sack - * otherwise - */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && stcb->asoc.peer_supports_nr_sack) - sctp_send_nr_sack(stcb); - else - sctp_send_sack(stcb); - } else { - int is_a_gap; + if (SCTP_GET_STATE(asoc) == SCTP_STATE_SHUTDOWN_SENT) { + /* + * Ok special case, in SHUTDOWN-SENT case. here we maker + * sure SACK timer is off and instead send a SHUTDOWN and a + * SACK + */ + if (SCTP_OS_TIMER_PENDING(&stcb->asoc.dack_timer.timer)) { + sctp_timer_stop(SCTP_TIMER_TYPE_RECV, + stcb->sctp_ep, stcb, NULL, SCTP_FROM_SCTP_INDATA + SCTP_LOC_18); + } + sctp_send_shutdown(stcb, stcb->asoc.primary_destination); + sctp_send_sack(stcb); + } else { + int is_a_gap; - /* is there a gap now ? */ - is_a_gap = compare_with_wrap(highest_tsn, stcb->asoc.cumulative_tsn, MAX_TSN); + /* is there a gap now ? */ + is_a_gap = compare_with_wrap(highest_tsn, stcb->asoc.cumulative_tsn, MAX_TSN); - /* - * CMT DAC algorithm: increase number of packets - * received since last ack - */ - stcb->asoc.cmt_dac_pkts_rcvd++; + /* + * CMT DAC algorithm: increase number of packets received + * since last ack + */ + stcb->asoc.cmt_dac_pkts_rcvd++; - if ((stcb->asoc.send_sack == 1) || /* We need to send a - * SACK */ - ((was_a_gap) && (is_a_gap == 0)) || /* was a gap, but no - * longer is one */ - (stcb->asoc.numduptsns) || /* we have dup's */ - (is_a_gap) || /* is still a gap */ - (stcb->asoc.delayed_ack == 0) || /* Delayed sack disabled */ - (stcb->asoc.data_pkts_seen >= stcb->asoc.sack_freq) /* hit limit of pkts */ - ) { + if ((stcb->asoc.send_sack == 1) || /* We need to send a + * SACK */ + ((was_a_gap) && (is_a_gap == 0)) || /* was a gap, but no + * longer is one */ + (stcb->asoc.numduptsns) || /* we have dup's */ + (is_a_gap) || /* is still a gap */ + (stcb->asoc.delayed_ack == 0) || /* Delayed sack disabled */ + (stcb->asoc.data_pkts_seen >= stcb->asoc.sack_freq) /* hit limit of pkts */ + ) { - if ((SCTP_BASE_SYSCTL(sctp_cmt_on_off)) && - (SCTP_BASE_SYSCTL(sctp_cmt_use_dac)) && - (stcb->asoc.send_sack == 0) && - (stcb->asoc.numduptsns == 0) && - (stcb->asoc.delayed_ack) && - (!SCTP_OS_TIMER_PENDING(&stcb->asoc.dack_timer.timer))) { + if ((SCTP_BASE_SYSCTL(sctp_cmt_on_off)) && + (SCTP_BASE_SYSCTL(sctp_cmt_use_dac)) && + (stcb->asoc.send_sack == 0) && + (stcb->asoc.numduptsns == 0) && + (stcb->asoc.delayed_ack) && + (!SCTP_OS_TIMER_PENDING(&stcb->asoc.dack_timer.timer))) { - /* - * CMT DAC algorithm: With CMT, - * delay acks even in the face of - * - * reordering. Therefore, if acks that - * do not have to be sent because of - * the above reasons, will be - * delayed. That is, acks that would - * have been sent due to gap reports - * will be delayed with DAC. Start - * the delayed ack timer. - */ - sctp_timer_start(SCTP_TIMER_TYPE_RECV, - stcb->sctp_ep, stcb, NULL); - } else { - /* - * Ok we must build a SACK since the - * timer is pending, we got our - * first packet OR there are gaps or - * duplicates. - */ - (void)SCTP_OS_TIMER_STOP(&stcb->asoc.dack_timer.timer); - /* - * EY if nr_sacks used then send an - * nr-sack , a sack otherwise - */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && stcb->asoc.peer_supports_nr_sack) - sctp_send_nr_sack(stcb); - else - sctp_send_sack(stcb); - } + /* + * CMT DAC algorithm: With CMT, delay acks + * even in the face of + * + * reordering. Therefore, if acks that do not + * have to be sent because of the above + * reasons, will be delayed. That is, acks + * that would have been sent due to gap + * reports will be delayed with DAC. Start + * the delayed ack timer. + */ + sctp_timer_start(SCTP_TIMER_TYPE_RECV, + stcb->sctp_ep, stcb, NULL); } else { - if (!SCTP_OS_TIMER_PENDING(&stcb->asoc.dack_timer.timer)) { - sctp_timer_start(SCTP_TIMER_TYPE_RECV, - stcb->sctp_ep, stcb, NULL); - } + /* + * Ok we must build a SACK since the timer + * is pending, we got our first packet OR + * there are gaps or duplicates. + */ + (void)SCTP_OS_TIMER_STOP(&stcb->asoc.dack_timer.timer); + sctp_send_sack(stcb); + } + } else { + if (!SCTP_OS_TIMER_PENDING(&stcb->asoc.dack_timer.timer)) { + sctp_timer_start(SCTP_TIMER_TYPE_RECV, + stcb->sctp_ep, stcb, NULL); } } } @@ -2834,14 +2818,7 @@ sctp_process_data(struct mbuf **mm, int if (SCTP_OS_TIMER_PENDING(&stcb->asoc.dack_timer.timer)) { (void)SCTP_OS_TIMER_STOP(&stcb->asoc.dack_timer.timer); } - /* - * EY if nr_sacks used then send an nr-sack , a sack - * otherwise - */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && stcb->asoc.peer_supports_nr_sack) - sctp_send_nr_sack(stcb); - else - sctp_send_sack(stcb); + sctp_send_sack(stcb); } else { if (!SCTP_OS_TIMER_PENDING(&stcb->asoc.dack_timer.timer)) { sctp_timer_start(SCTP_TIMER_TYPE_RECV, @@ -2849,7 +2826,7 @@ sctp_process_data(struct mbuf **mm, int } } } else { - sctp_sack_check(stcb, 1, was_a_gap, &abort_flag); + sctp_sack_check(stcb, was_a_gap, &abort_flag); } if (abort_flag) return (2); @@ -2867,7 +2844,7 @@ sctp_process_segment_range(struct sctp_t { struct sctp_tmit_chunk *tp1; unsigned int theTSN; - int j, wake_him = 0; + int j, wake_him = 0, circled = 0; /* Recover the tp1 we last saw */ tp1 = *p_tp1; @@ -3045,12 +3022,6 @@ sctp_process_segment_range(struct sctp_t } /* NR Sack code here */ if (nr_sacking) { - if (tp1->sent != SCTP_FORWARD_TSN_SKIP) - tp1->sent = SCTP_DATAGRAM_NR_MARKED; - /* - * TAILQ_REMOVE(&asoc->sent_q - * ueue, tp1, sctp_next); - */ if (tp1->data) { /* * sa_ignore @@ -3058,13 +3029,8 @@ sctp_process_segment_range(struct sctp_t */ sctp_free_bufspace(stcb, &stcb->asoc, tp1, 1); sctp_m_freem(tp1->data); + tp1->data = NULL; } - tp1->data = NULL; - /* asoc->sent_queue_cnt--; */ - /* - * sctp_free_a_chunk(stcb, - * tp1); - */ wake_him++; } } @@ -3075,11 +3041,16 @@ sctp_process_segment_range(struct sctp_t break; tp1 = TAILQ_NEXT(tp1, sctp_next); + if ((tp1 == NULL) && (circled == 0)) { + circled++; + tp1 = TAILQ_FIRST(&stcb->asoc.sent_queue); + } } /* end while (tp1) */ - /* In case the fragments were not in order we must reset */ if (tp1 == NULL) { + circled = 0; tp1 = TAILQ_FIRST(&stcb->asoc.sent_queue); } + /* In case the fragments were not in order we must reset */ } /* end for (j = fragStart */ *p_tp1 = tp1; return (wake_him); /* Return value only used for nr-sack */ @@ -3158,6 +3129,9 @@ sctp_handle_segments(struct mbuf *m, int } else { non_revocable = 1; } + if (i == num_seg) { + tp1 = NULL; + } if (sctp_process_segment_range(stcb, &tp1, last_tsn, frag_strt, frag_end, non_revocable, &num_frs, biggest_newly_acked_tsn, this_sack_lowest_newack, ecn_seg_sums)) { @@ -3961,6 +3935,7 @@ sctp_express_handle_sack(struct sctp_tcb #ifdef INVARIANTS panic("Impossible sack 1"); #else + *abort_now = 1; /* XXX */ oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + sizeof(uint32_t)), @@ -4439,50 +4414,6 @@ again: } } -/* EY- nr_sack */ -/* Identifies the non-renegable tsns that are revoked*/ -static void -sctp_check_for_nr_revoked(struct sctp_tcb *stcb, - struct sctp_association *asoc, uint32_t cumack, - uint32_t biggest_tsn_acked) -{ - struct sctp_tmit_chunk *tp1; - - for (tp1 = TAILQ_FIRST(&asoc->sent_queue); tp1; tp1 = TAILQ_NEXT(tp1, sctp_next)) { - if (compare_with_wrap(tp1->rec.data.TSN_seq, cumack, - MAX_TSN)) { - /* - * ok this guy is either ACK or MARKED. If it is - * ACKED it has been previously acked but not this - * time i.e. revoked. If it is MARKED it was ACK'ed - * again. - */ - if (compare_with_wrap(tp1->rec.data.TSN_seq, biggest_tsn_acked, - MAX_TSN)) - break; - - - if (tp1->sent == SCTP_DATAGRAM_NR_ACKED) { - /* - * EY! a non-renegable TSN is revoked, need - * to abort the association - */ - /* - * EY TODO: put in the code to abort the - * assoc. - */ - return; - } else if (tp1->sent == SCTP_DATAGRAM_NR_MARKED) { - /* it has been re-acked in this SACK */ - tp1->sent = SCTP_DATAGRAM_NR_ACKED; - } - } - if (tp1->sent == SCTP_DATAGRAM_UNSENT) - break; - } - return; -} - void sctp_handle_sack(struct mbuf *m, int offset_seg, int offset_dup, struct sctp_tcb *stcb, struct sctp_nets *net_from, @@ -4588,22 +4519,23 @@ sctp_handle_sack(struct mbuf *m, int off sctpchunk_listhead); send_s = tp1->rec.data.TSN_seq + 1; } else { + tp1 = NULL; send_s = asoc->sending_seq; } if (cum_ack == send_s || compare_with_wrap(cum_ack, send_s, MAX_TSN)) { -#ifndef INVARIANTS struct mbuf *oper; -#endif -#ifdef INVARIANTS - hopeless_peer: - panic("Impossible sack 1"); -#else /* * no way, we have not even sent this TSN out yet. * Peer is hopelessly messed up with us. */ + printf("NEW cum_ack:%x send_s:%x is smaller or equal\n", + cum_ack, send_s); + if (tp1) { + printf("Got send_s from tsn:%x + 1 of tp1:%p\n", + tp1->rec.data.TSN_seq, tp1); + } hopeless_peer: *abort_now = 1; /* XXX */ @@ -4624,7 +4556,6 @@ sctp_handle_sack(struct mbuf *m, int off stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_25; sctp_abort_an_association(stcb->sctp_ep, stcb, SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); return; -#endif } } /**********************/ @@ -4844,6 +4775,10 @@ sctp_handle_sack(struct mbuf *m, int off * peer is either confused or we are under * attack. We must abort. */ + printf("Hopeless peer! biggest_tsn_acked:%x largest seq:%x\n", + biggest_tsn_acked, + send_s); + goto hopeless_peer; } } @@ -4991,15 +4926,9 @@ done_with_it: */ if ((tp1->sent == SCTP_DATAGRAM_NR_ACKED) || (tp1->sent == SCTP_DATAGRAM_NR_MARKED)) { - /* - * EY! - TODO: Something previously - * nr_gapped is reneged, abort the - * association - */ - return; + continue; } - if ((tp1->sent > SCTP_DATAGRAM_RESEND) && - (tp1->sent < SCTP_FORWARD_TSN_SKIP)) { + if (tp1->sent == SCTP_DATAGRAM_ACKED) { tp1->sent = SCTP_DATAGRAM_SENT; if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_FLIGHT_LOGGING_ENABLE) { sctp_misc_ints(SCTP_FLIGHT_LOG_UP_REVOKE, @@ -5028,15 +4957,11 @@ done_with_it: } asoc->saw_sack_with_frags = 0; } - if (num_seg) + if (num_seg || num_nr_seg) asoc->saw_sack_with_frags = 1; else asoc->saw_sack_with_frags = 0; - /* EY! - not sure about if there should be an IF */ - if (num_nr_seg > 0) - sctp_check_for_nr_revoked(stcb, asoc, cum_ack, biggest_tsn_acked); - /* JRS - Use the congestion control given in the CC module */ asoc->cc_functions.sctp_cwnd_update_after_sack(stcb, asoc, accum_moved, reneged_all, will_exit_fast_recovery); @@ -5457,11 +5382,10 @@ sctp_kick_prsctp_reorder_queue(struct sc sctp_ucount_decr(asoc->cnt_on_all_streams); /* deliver it to at least the delivery-q */ if (stcb->sctp_socket) { - /* EY need the tsn info for calculating nr */ + sctp_mark_non_revokable(asoc, ctl->sinfo_tsn); sctp_add_to_readq(stcb->sctp_ep, stcb, ctl, &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_HELD, SCTP_SO_NOT_LOCKED); - sctp_mark_non_revokable(asoc, ctl->sinfo_tsn); } } else { /* no more delivery now. */ @@ -5486,10 +5410,10 @@ sctp_kick_prsctp_reorder_queue(struct sc /* deliver it to at least the delivery-q */ strmin->last_sequence_delivered = ctl->sinfo_ssn; if (stcb->sctp_socket) { + sctp_mark_non_revokable(asoc, ctl->sinfo_tsn); sctp_add_to_readq(stcb->sctp_ep, stcb, ctl, &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_HELD, SCTP_SO_NOT_LOCKED); - sctp_mark_non_revokable(asoc, ctl->sinfo_tsn); } tt = strmin->last_sequence_delivered + 1; @@ -5593,7 +5517,8 @@ sctp_flush_reassm_for_str_seq(struct sct void sctp_handle_forward_tsn(struct sctp_tcb *stcb, - struct sctp_forward_tsn_chunk *fwd, int *abort_flag, struct mbuf *m, int offset) + struct sctp_forward_tsn_chunk *fwd, + int *abort_flag, struct mbuf *m, int offset) { /* * ISSUES that MUST be fixed for ECN! When we are the sender of the @@ -5619,8 +5544,8 @@ sctp_handle_forward_tsn(struct sctp_tcb * report where we are. */ struct sctp_association *asoc; - uint32_t new_cum_tsn, gap; - unsigned int i, fwd_sz, cumack_set_flag, m_size; + uint32_t new_cum_tsn, tsn, gap; + unsigned int i, fwd_sz, cumack_set_flag, m_size, fnd = 0; uint32_t str_seq; struct sctp_stream_in *strm; struct sctp_tmit_chunk *chk, *at; @@ -5657,7 +5582,7 @@ sctp_handle_forward_tsn(struct sctp_tcb * now we know the new TSN is more advanced, let's find the actual * gap */ - SCTP_CALC_TSN_TO_GAP(gap, new_cum_tsn, asoc->nr_mapping_array_base_tsn); + SCTP_CALC_TSN_TO_GAP(gap, new_cum_tsn, asoc->mapping_array_base_tsn); asoc->cumulative_tsn = new_cum_tsn; if (gap >= m_size) { if ((long)gap > sctp_sbspace(&stcb->asoc, &stcb->sctp_socket->so_rcv)) { @@ -5697,8 +5622,7 @@ sctp_handle_forward_tsn(struct sctp_tcb asoc->mapping_array_base_tsn = new_cum_tsn + 1; asoc->highest_tsn_inside_map = new_cum_tsn; - memset(stcb->asoc.nr_mapping_array, 0, stcb->asoc.nr_mapping_array_size); - asoc->nr_mapping_array_base_tsn = new_cum_tsn + 1; + memset(stcb->asoc.nr_mapping_array, 0, stcb->asoc.mapping_array_size); asoc->highest_tsn_inside_nr_map = new_cum_tsn; if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MAP_LOGGING_ENABLE) { @@ -5710,14 +5634,32 @@ sctp_handle_forward_tsn(struct sctp_tcb for (i = 0; i <= gap; i++) { SCTP_UNSET_TSN_PRESENT(asoc->mapping_array, i); SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, i); + /* FIX ME add something to set up highest TSN in map */ + } + if (compare_with_wrap(new_cum_tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN)) { + asoc->highest_tsn_inside_nr_map = new_cum_tsn; + } + if (compare_with_wrap(new_cum_tsn, asoc->highest_tsn_inside_map, MAX_TSN) || + new_cum_tsn == asoc->highest_tsn_inside_map) { + /* We must back down to see what the new highest is */ + for (tsn = new_cum_tsn; (compare_with_wrap(tsn, asoc->mapping_array_base_tsn, MAX_TSN) || + (tsn == asoc->mapping_array_base_tsn)); tsn--) { + SCTP_CALC_TSN_TO_GAP(gap, tsn, asoc->mapping_array_base_tsn); + if (SCTP_IS_TSN_PRESENT(asoc->mapping_array, gap)) { + asoc->highest_tsn_inside_map = tsn; + fnd = 1; + break; + } + } + if (!fnd) { + asoc->highest_tsn_inside_map = asoc->mapping_array_base_tsn - 1; + } } /* * Now after marking all, slide thing forward but no sack * please. */ - sctp_sack_check(stcb, 0, 0, abort_flag); - if (*abort_flag) - return; + sctp_slide_mapping_arrays(stcb); } /*************************************************************/ /* 2. Clear up re-assembly queue */ Modified: head/sys/netinet/sctp_indata.h ============================================================================== --- head/sys/netinet/sctp_indata.h Sat Apr 3 12:34:32 2010 (r206136) +++ head/sys/netinet/sctp_indata.h Sat Apr 3 15:40:14 2010 (r206137) @@ -121,7 +121,9 @@ sctp_process_data(struct mbuf **, int, i struct sctp_inpcb *, struct sctp_tcb *, struct sctp_nets *, uint32_t *); -void sctp_sack_check(struct sctp_tcb *, int, int, int *); +void sctp_slide_mapping_arrays(struct sctp_tcb *stcb); + +void sctp_sack_check(struct sctp_tcb *, int, int *); #endif #endif Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Sat Apr 3 12:34:32 2010 (r206136) +++ head/sys/netinet/sctp_input.c Sat Apr 3 15:40:14 2010 (r206137) @@ -343,11 +343,6 @@ sctp_process_init(struct sctp_init_chunk asoc->str_reset_seq_in = asoc->asconf_seq_in + 1; asoc->mapping_array_base_tsn = ntohl(init->initial_tsn); - /* - * EY 05/13/08 - nr_sack: initialize nr_mapping array's base tsn - * like above - */ - asoc->nr_mapping_array_base_tsn = ntohl(init->initial_tsn); asoc->tsn_last_delivered = asoc->cumulative_tsn = asoc->asconf_seq_in; asoc->last_echo_tsn = asoc->asconf_seq_in; asoc->advanced_peer_ack_point = asoc->last_acked_seq; @@ -1862,7 +1857,7 @@ sctp_process_cookie_existing(struct mbuf } if (asoc->nr_mapping_array) { memset(asoc->nr_mapping_array, 0, - asoc->nr_mapping_array_size); + asoc->mapping_array_size); } SCTP_TCB_UNLOCK(stcb); SCTP_INP_INFO_WLOCK(); @@ -2027,7 +2022,7 @@ sctp_process_cookie_new(struct mbuf *m, * socket is unbound and we must do an implicit bind. Since we are * getting a cookie, we cannot be unbound. */ - stcb = sctp_aloc_assoc(inp, init_src, 0, &error, + stcb = sctp_aloc_assoc(inp, init_src, &error, ntohl(initack_cp->init.initiate_tag), vrf_id, (struct thread *)NULL ); @@ -3236,13 +3231,10 @@ process_chunk_drop(struct sctp_tcb *stcb } break; case SCTP_SELECTIVE_ACK: + case SCTP_NR_SELECTIVE_ACK: /* resend the sack */ sctp_send_sack(stcb); break; - /* EY for nr_sacks */ - case SCTP_NR_SELECTIVE_ACK: - sctp_send_nr_sack(stcb); /* EY resend the nr-sack */ - break; case SCTP_HEARTBEAT_REQUEST: /* resend a demand HB */ if ((stcb->asoc.overall_error_count + 3) < stcb->asoc.max_send_times) { @@ -3514,8 +3506,7 @@ sctp_handle_stream_reset_response(struct memset(stcb->asoc.mapping_array, 0, stcb->asoc.mapping_array_size); stcb->asoc.highest_tsn_inside_nr_map = stcb->asoc.highest_tsn_inside_map; - stcb->asoc.nr_mapping_array_base_tsn = stcb->asoc.mapping_array_base_tsn; - memset(stcb->asoc.nr_mapping_array, 0, stcb->asoc.nr_mapping_array_size); + memset(stcb->asoc.nr_mapping_array, 0, stcb->asoc.mapping_array_size); stcb->asoc.sending_seq = ntohl(resp->receivers_next_tsn); stcb->asoc.last_acked_seq = stcb->asoc.cumulative_tsn; @@ -3624,8 +3615,7 @@ sctp_handle_str_reset_request_tsn(struct stcb->asoc.mapping_array_base_tsn = stcb->asoc.highest_tsn_inside_map + 1; memset(stcb->asoc.mapping_array, 0, stcb->asoc.mapping_array_size); stcb->asoc.highest_tsn_inside_nr_map = stcb->asoc.highest_tsn_inside_map; - stcb->asoc.nr_mapping_array_base_tsn = stcb->asoc.highest_tsn_inside_map + 1; - memset(stcb->asoc.nr_mapping_array, 0, stcb->asoc.nr_mapping_array_size); + memset(stcb->asoc.nr_mapping_array, 0, stcb->asoc.mapping_array_size); atomic_add_int(&stcb->asoc.sending_seq, 1); /* save off historical data for retrans */ stcb->asoc.last_sending_seq[1] = stcb->asoc.last_sending_seq[0]; @@ -5636,7 +5626,7 @@ sctp_common_input_processing(struct mbuf was_a_gap = 1; } stcb->asoc.send_sack = 1; - sctp_sack_check(stcb, 1, was_a_gap, &abort_flag); + sctp_sack_check(stcb, was_a_gap, &abort_flag); if (abort_flag) { /* Again, we aborted so NO UNLOCK needed */ goto out_now; Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Sat Apr 3 12:34:32 2010 (r206136) +++ head/sys/netinet/sctp_output.c Sat Apr 3 15:40:14 2010 (r206137) @@ -9003,6 +9003,11 @@ sctp_chunk_retransmission(struct sctp_in /* No, not sent to this net or not ready for rtx */ continue; } + if (chk->data == NULL) { + printf("TSN:%x chk->snd_count:%d chk->sent:%d can't retran - no data\n", + chk->rec.data.TSN_seq, chk->snd_count, chk->sent); + continue; + } if ((SCTP_BASE_SYSCTL(sctp_max_retran_chunk)) && (chk->snd_count >= SCTP_BASE_SYSCTL(sctp_max_retran_chunk))) { /* Gak, we have exceeded max unlucky retran, abort! */ @@ -9426,14 +9431,7 @@ sctp_chunk_output(struct sctp_inpcb *inp * running, if so piggy-back the sack. */ if (SCTP_OS_TIMER_PENDING(&stcb->asoc.dack_timer.timer)) { - /* - * EY if nr_sacks used then send an nr-sack , a sack - * otherwise - */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Apr 3 15:43:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C8291065674; Sat, 3 Apr 2010 15:43:28 +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 7B9748FC1A; Sat, 3 Apr 2010 15:43: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 o33FhSeK029189; Sat, 3 Apr 2010 15:43:28 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o33FhSAG029187; Sat, 3 Apr 2010 15:43:28 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201004031543.o33FhSAG029187@svn.freebsd.org> From: Alan Cox Date: Sat, 3 Apr 2010 15:43:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206138 - stable/8/sys/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: Sat, 03 Apr 2010 15:43:28 -0000 Author: alc Date: Sat Apr 3 15:43:28 2010 New Revision: 206138 URL: http://svn.freebsd.org/changeset/base/206138 Log: MFC r205652 A ptrace(2) by one process may trigger a page size promotion in the address space of another process. Modify pmap_promote_pde() to handle this. Modified: stable/8/sys/i386/i386/pmap.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/i386/i386/pmap.c ============================================================================== --- stable/8/sys/i386/i386/pmap.c Sat Apr 3 15:40:14 2010 (r206137) +++ stable/8/sys/i386/i386/pmap.c Sat Apr 3 15:43:28 2010 (r206138) @@ -2999,7 +2999,7 @@ pmap_promote_pde(pmap_t pmap, pd_entry_t * either invalid, unused, or does not map the first 4KB physical page * within a 2- or 4MB page. */ - firstpte = vtopte(trunc_4mpage(va)); + firstpte = pmap_pte_quick(pmap, trunc_4mpage(va)); setpde: newpde = *firstpte; if ((newpde & ((PG_FRAME & PDRMASK) | PG_A | PG_V)) != (PG_A | PG_V)) { From owner-svn-src-all@FreeBSD.ORG Sat Apr 3 15:52:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CDE3F106564A; Sat, 3 Apr 2010 15:52:32 +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 BCDC48FC1A; Sat, 3 Apr 2010 15:52: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 o33FqWPK031217; Sat, 3 Apr 2010 15:52:32 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o33FqW7F031215; Sat, 3 Apr 2010 15:52:32 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201004031552.o33FqW7F031215@svn.freebsd.org> From: Alan Cox Date: Sat, 3 Apr 2010 15:52: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: r206139 - stable/7/sys/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: Sat, 03 Apr 2010 15:52:32 -0000 Author: alc Date: Sat Apr 3 15:52:32 2010 New Revision: 206139 URL: http://svn.freebsd.org/changeset/base/206139 Log: MFC r205652 A ptrace(2) by one process may trigger a page size promotion in the address space of another process. Modify pmap_promote_pde() to handle this. Modified: stable/7/sys/i386/i386/pmap.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/i386/i386/pmap.c ============================================================================== --- stable/7/sys/i386/i386/pmap.c Sat Apr 3 15:43:28 2010 (r206138) +++ stable/7/sys/i386/i386/pmap.c Sat Apr 3 15:52:32 2010 (r206139) @@ -2990,7 +2990,7 @@ pmap_promote_pde(pmap_t pmap, pd_entry_t * either invalid, unused, or does not map the first 4KB physical page * within a 2- or 4MB page. */ - firstpte = vtopte(trunc_4mpage(va)); + firstpte = pmap_pte_quick(pmap, trunc_4mpage(va)); setpde: newpde = *firstpte; if ((newpde & ((PG_FRAME & PDRMASK) | PG_A | PG_V)) != (PG_A | PG_V)) { From owner-svn-src-all@FreeBSD.ORG Sat Apr 3 16:20:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CBEDE1065688; Sat, 3 Apr 2010 16:20:22 +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 BBF058FC13; Sat, 3 Apr 2010 16:20:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o33GKMnZ037334; Sat, 3 Apr 2010 16:20:22 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o33GKM0n037332; Sat, 3 Apr 2010 16:20:22 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201004031620.o33GKM0n037332@svn.freebsd.org> From: Alan Cox Date: Sat, 3 Apr 2010 16:20:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206140 - 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: Sat, 03 Apr 2010 16:20:22 -0000 Author: alc Date: Sat Apr 3 16:20:22 2010 New Revision: 206140 URL: http://svn.freebsd.org/changeset/base/206140 Log: Re-enable the call to pmap_release() by vmspace_dofree(). The accounting problem that is described in the comment has been addressed. Submitted by: kib Tested by: pho (a few months ago) MFC after: 6 weeks Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Sat Apr 3 15:52:32 2010 (r206139) +++ head/sys/vm/vm_map.c Sat Apr 3 16:20:22 2010 (r206140) @@ -313,6 +313,7 @@ vm_init2(void) static inline void vmspace_dofree(struct vmspace *vm) { + CTR1(KTR_VM, "vmspace_free: %p", vm); /* @@ -329,12 +330,8 @@ vmspace_dofree(struct vmspace *vm) (void)vm_map_remove(&vm->vm_map, vm->vm_map.min_offset, vm->vm_map.max_offset); - /* - * XXX Comment out the pmap_release call for now. The - * vmspace_zone is marked as UMA_ZONE_NOFREE, and bugs cause - * pmap.resident_count to be != 0 on exit sometimes. - */ -/* pmap_release(vmspace_pmap(vm)); */ + pmap_release(vmspace_pmap(vm)); + vm->vm_map.pmap = NULL; uma_zfree(vmspace_zone, vm); } From owner-svn-src-all@FreeBSD.ORG Sat Apr 3 17:22:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D76BD106564A; Sat, 3 Apr 2010 17:22:28 +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 C77528FC15; Sat, 3 Apr 2010 17:22: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 o33HMSRE050946; Sat, 3 Apr 2010 17:22:28 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o33HMSZh050945; Sat, 3 Apr 2010 17:22:28 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201004031722.o33HMSZh050945@svn.freebsd.org> From: Ed Schouten Date: Sat, 3 Apr 2010 17:22: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: r206141 - head/sys/teken X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 03 Apr 2010 17:22:28 -0000 Author: ed Date: Sat Apr 3 17:22:28 2010 New Revision: 206141 URL: http://svn.freebsd.org/changeset/base/206141 Log: Just use instead of . We don't need it here. Modified: head/sys/teken/teken.c Modified: head/sys/teken/teken.c ============================================================================== --- head/sys/teken/teken.c Sat Apr 3 16:20:22 2010 (r206140) +++ head/sys/teken/teken.c Sat Apr 3 17:22:28 2010 (r206141) @@ -36,7 +36,7 @@ #else /* !(__FreeBSD__ && _KERNEL) */ #include #include -#include +#include #include #include #define teken_assert(x) assert(x) From owner-svn-src-all@FreeBSD.ORG Sat Apr 3 19:07:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37ABE106564A; Sat, 3 Apr 2010 19:07: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 2657A8FC0A; Sat, 3 Apr 2010 19:07: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 o33J76Kr073750; Sat, 3 Apr 2010 19:07:06 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o33J76Ck073746; Sat, 3 Apr 2010 19:07:06 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201004031907.o33J76Ck073746@svn.freebsd.org> From: Alan Cox Date: Sat, 3 Apr 2010 19:07: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: r206142 - in head/sys: kern 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: Sat, 03 Apr 2010 19:07:06 -0000 Author: alc Date: Sat Apr 3 19:07:05 2010 New Revision: 206142 URL: http://svn.freebsd.org/changeset/base/206142 Log: Make _vm_map_init() the one place where the vm map's pmap field is initialized. Reviewed by: kib Modified: head/sys/kern/init_main.c head/sys/vm/vm_map.c head/sys/vm/vm_map.h Modified: head/sys/kern/init_main.c ============================================================================== --- head/sys/kern/init_main.c Sat Apr 3 17:22:28 2010 (r206141) +++ head/sys/kern/init_main.c Sat Apr 3 19:07:05 2010 (r206142) @@ -510,9 +510,8 @@ proc0_init(void *dummy __unused) * proc0 is not expected to enter usermode, so there is no special * handling for sv_minuser here, like is done for exec_new_vmspace(). */ - vm_map_init(&vmspace0.vm_map, p->p_sysent->sv_minuser, - p->p_sysent->sv_maxuser); - vmspace0.vm_map.pmap = vmspace_pmap(&vmspace0); + vm_map_init(&vmspace0.vm_map, vmspace_pmap(&vmspace0), + p->p_sysent->sv_minuser, p->p_sysent->sv_maxuser); /*- * call the init and ctor for the new thread and proc Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Sat Apr 3 17:22:28 2010 (r206141) +++ head/sys/vm/vm_map.c Sat Apr 3 19:07:05 2010 (r206142) @@ -126,7 +126,8 @@ static int vmspace_zinit(void *mem, int static void vmspace_zfini(void *mem, int size); static int vm_map_zinit(void *mem, int ize, int flags); static void vm_map_zfini(void *mem, int size); -static void _vm_map_init(vm_map_t map, vm_offset_t min, vm_offset_t max); +static void _vm_map_init(vm_map_t map, pmap_t pmap, vm_offset_t min, + vm_offset_t max); static void vm_map_entry_dispose(vm_map_t map, vm_map_entry_t entry); #ifdef INVARIANTS static void vm_map_zdtor(void *mem, int size, void *arg); @@ -281,8 +282,7 @@ vmspace_alloc(min, max) return (NULL); } CTR1(KTR_VM, "vmspace_alloc: %p", vm); - _vm_map_init(&vm->vm_map, min, max); - vm->vm_map.pmap = vmspace_pmap(vm); /* XXX */ + _vm_map_init(&vm->vm_map, vmspace_pmap(vm), min, max); vm->vm_refcnt = 1; vm->vm_shm = NULL; vm->vm_swrss = 0; @@ -678,23 +678,22 @@ vm_map_create(pmap_t pmap, vm_offset_t m result = uma_zalloc(mapzone, M_WAITOK); CTR1(KTR_VM, "vm_map_create: %p", result); - _vm_map_init(result, min, max); - result->pmap = pmap; + _vm_map_init(result, pmap, min, max); return (result); } /* * Initialize an existing vm_map structure * such as that in the vmspace structure. - * The pmap is set elsewhere. */ static void -_vm_map_init(vm_map_t map, vm_offset_t min, vm_offset_t max) +_vm_map_init(vm_map_t map, pmap_t pmap, vm_offset_t min, vm_offset_t max) { map->header.next = map->header.prev = &map->header; map->needs_wakeup = FALSE; map->system_map = 0; + map->pmap = pmap; map->min_offset = min; map->max_offset = max; map->flags = 0; @@ -704,9 +703,10 @@ _vm_map_init(vm_map_t map, vm_offset_t m } void -vm_map_init(vm_map_t map, vm_offset_t min, vm_offset_t max) +vm_map_init(vm_map_t map, pmap_t pmap, vm_offset_t min, vm_offset_t max) { - _vm_map_init(map, min, max); + + _vm_map_init(map, pmap, min, max); mtx_init(&map->system_mtx, "system map", NULL, MTX_DEF | MTX_DUPOK); sx_init(&map->lock, "user map"); } Modified: head/sys/vm/vm_map.h ============================================================================== --- head/sys/vm/vm_map.h Sat Apr 3 17:22:28 2010 (r206141) +++ head/sys/vm/vm_map.h Sat Apr 3 19:07:05 2010 (r206142) @@ -346,7 +346,7 @@ int vm_map_fixed(vm_map_t, vm_object_t, vm_prot_t, vm_prot_t, int); int vm_map_findspace (vm_map_t, vm_offset_t, vm_size_t, vm_offset_t *); int vm_map_inherit (vm_map_t, vm_offset_t, vm_offset_t, vm_inherit_t); -void vm_map_init (struct vm_map *, vm_offset_t, vm_offset_t); +void vm_map_init(vm_map_t, pmap_t, vm_offset_t, vm_offset_t); int vm_map_insert (vm_map_t, vm_object_t, vm_ooffset_t, vm_offset_t, vm_offset_t, vm_prot_t, vm_prot_t, int); int vm_map_lookup (vm_map_t *, vm_offset_t, vm_prot_t, vm_map_entry_t *, vm_object_t *, vm_pindex_t *, vm_prot_t *, boolean_t *); From owner-svn-src-all@FreeBSD.ORG Sat Apr 3 20:14:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2819A1065670; Sat, 3 Apr 2010 20:14:11 +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 0BA1F8FC0A; Sat, 3 Apr 2010 20:14: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 o33KEA0G088376; Sat, 3 Apr 2010 20:14:10 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o33KEA2O088375; Sat, 3 Apr 2010 20:14:10 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201004032014.o33KEA2O088375@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 3 Apr 2010 20:14: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: r206143 - head/tools/regression/bin/sh/expansion X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 03 Apr 2010 20:14:11 -0000 Author: jilles Date: Sat Apr 3 20:14:10 2010 New Revision: 206143 URL: http://svn.freebsd.org/changeset/base/206143 Log: sh: Add some testcases for the working parts of ${v%...} and ${v#...}. Added: head/tools/regression/bin/sh/expansion/trim1.0 (contents, props changed) Added: head/tools/regression/bin/sh/expansion/trim1.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/expansion/trim1.0 Sat Apr 3 20:14:10 2010 (r206143) @@ -0,0 +1,85 @@ +# $FreeBSD$ + +e= q='?' a='*' t=texttext s='ast*que?non' p='/et[c]/' w='a b c' b='{{(#)}}' +h='##' +failures='' +ok='' + +testcase() { + code="$1" + expected="$2" + oIFS="$IFS" + eval "$code" + IFS='|' + result="$#|$*" + IFS="$oIFS" + if [ "x$result" = "x$expected" ]; then + ok=x$ok + else + failures=x$failures + echo "For $code, expected $expected actual $result" + fi +} + +testcase 'set -- ${t%t}' '1|texttex' +testcase 'set -- "${t%t}"' '1|texttex' +testcase 'set -- ${t%e*}' '1|textt' +testcase 'set -- "${t%e*}"' '1|textt' +testcase 'set -- ${t%%e*}' '1|t' +testcase 'set -- "${t%%e*}"' '1|t' +testcase 'set -- ${t%%*}' '0|' +testcase 'set -- "${t%%*}"' '1|' +testcase 'set -- ${t#t}' '1|exttext' +testcase 'set -- "${t#t}"' '1|exttext' +testcase 'set -- ${t#*x}' '1|ttext' +testcase 'set -- "${t#*x}"' '1|ttext' +testcase 'set -- ${t##*x}' '1|t' +testcase 'set -- "${t##*x}"' '1|t' +testcase 'set -- ${t##*}' '0|' +testcase 'set -- "${t##*}"' '1|' +testcase 'set -- ${t%e$a}' '1|textt' + +set -f +testcase 'set -- ${s%[?]*}' '1|ast*que' +testcase 'set -- "${s%[?]*}"' '1|ast*que' +testcase 'set -- ${s%[*]*}' '1|ast' +testcase 'set -- "${s%[*]*}"' '1|ast' +set +f + +testcase 'set -- $b' '1|{{(#)}}' +testcase 'set -- ${b%\}}' '1|{{(#)}' +testcase 'set -- ${b#{}' '1|{(#)}}' +testcase 'set -- "${b#{}"' '1|{(#)}}' +# Parentheses are special in ksh, check that they can be escaped +testcase 'set -- ${b%\)*}' '1|{{(#' +testcase 'set -- ${b#{}' '1|{(#)}}' +testcase 'set -- $h' '1|##' +testcase 'set -- ${h#\#}' '1|#' +testcase 'set -- ${h###}' '1|#' +testcase 'set -- "${h###}"' '1|#' +testcase 'set -- ${h%#}' '1|#' +testcase 'set -- "${h%#}"' '1|#' + +set -f +testcase 'set -- ${s%"${s#?}"}' '1|a' +testcase 'set -- ${s%"${s#????}"}' '1|ast*' +testcase 'set -- ${s%"${s#????????}"}' '1|ast*que?' +testcase 'set -- ${s#"${s%?}"}' '1|n' +testcase 'set -- ${s#"${s%????}"}' '1|?non' +testcase 'set -- ${s#"${s%????????}"}' '1|*que?non' +set +f +testcase 'set -- "${s%"${s#?}"}"' '1|a' +testcase 'set -- "${s%"${s#????}"}"' '1|ast*' +testcase 'set -- "${s%"${s#????????}"}"' '1|ast*que?' +testcase 'set -- "${s#"${s%?}"}"' '1|n' +testcase 'set -- "${s#"${s%????}"}"' '1|?non' +testcase 'set -- "${s#"${s%????????}"}"' '1|*que?non' +testcase 'set -- ${p#${p}}' '1|/etc/' +testcase 'set -- "${p#${p}}"' '1|/et[c]/' +testcase 'set -- ${p#*[[]}' '1|c]/' +testcase 'set -- "${p#*[[]}"' '1|c]/' +testcase 'set -- ${p#*\[}' '1|c]/' +testcase 'set -- ${p#*"["}' '1|c]/' +testcase 'set -- "${p#*"["}"' '1|c]/' + +test "x$failures" = x From owner-svn-src-all@FreeBSD.ORG Sat Apr 3 20:35:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84D5E106564A; Sat, 3 Apr 2010 20:35: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 73C418FC12; Sat, 3 Apr 2010 20: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 o33KZdC2093114; Sat, 3 Apr 2010 20:35:39 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o33KZdoS093112; Sat, 3 Apr 2010 20:35:39 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201004032035.o33KZdoS093112@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 3 Apr 2010 20:35:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206144 - 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: Sat, 03 Apr 2010 20:35:39 -0000 Author: jilles Date: Sat Apr 3 20:35:39 2010 New Revision: 206144 URL: http://svn.freebsd.org/changeset/base/206144 Log: sh: Treat unexpected newlines in substitutions as a syntax error. The old approach was wrong because PS2 was not used and seems unlikely to parse extensions (ksh93's ${ COMMAND} may well fail to parse). Exp-run done by: erwin (with some other sh(1) changes) Modified: head/bin/sh/parser.c Modified: head/bin/sh/parser.c ============================================================================== --- head/bin/sh/parser.c Sat Apr 3 20:14:10 2010 (r206143) +++ head/bin/sh/parser.c Sat Apr 3 20:35:39 2010 (r206144) @@ -1401,6 +1401,8 @@ parsesub: { subtype = VSERROR; if (c == '}') pungetc(); + else if (c == '\n' || c == PEOF) + synerror("Unexpected end of line in substitution"); else USTPUTC(c, out); } else { @@ -1417,6 +1419,8 @@ parsesub: { default: p = strchr(types, c); if (p == NULL) { + if (c == '\n' || c == PEOF) + synerror("Unexpected end of line in substitution"); if (flags == VSNUL) STPUTC(':', out); STPUTC(c, out); From owner-svn-src-all@FreeBSD.ORG Sat Apr 3 20:55:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 144F31065672; Sat, 3 Apr 2010 20:55:57 +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 014128FC1B; Sat, 3 Apr 2010 20:55: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 o33Ktvxg097602; Sat, 3 Apr 2010 20:55:57 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o33KtvTr097599; Sat, 3 Apr 2010 20:55:57 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201004032055.o33KtvTr097599@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 3 Apr 2010 20:55: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: r206145 - in head: bin/sh tools/regression/bin/sh/expansion tools/regression/bin/sh/parser X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 03 Apr 2010 20:55:57 -0000 Author: jilles Date: Sat Apr 3 20:55:56 2010 New Revision: 206145 URL: http://svn.freebsd.org/changeset/base/206145 Log: sh: Fix various things about expansions: * remove the backslash from \} inside double quotes inside +-=? substitutions, e.g. "${$+\}a}" * maintain separate double-quote state for ${v#...} and ${v%...}; single and double quotes are special inside, even in a double-quoted string or here document * keep track of correct order of substitutions and arithmetic This is different from dash's approach, which does not track individual double quotes in the parser, trying to fix this up during expansion. This treats single quotes inside "${v#...}" incorrectly, however. This is similar to NetBSD's approach (as submitted in PR bin/57554), but recognizes the difference between +-=? and #% substitutions hinted at in POSIX and is more refined for arithmetic expansion and here documents. PR: bin/57554 Exp-run done by: erwin (with some other sh(1) changes) Added: head/tools/regression/bin/sh/expansion/plus-minus2.0 (contents, props changed) head/tools/regression/bin/sh/parser/heredoc2.0 (contents, props changed) Modified: head/bin/sh/parser.c Modified: head/bin/sh/parser.c ============================================================================== --- head/bin/sh/parser.c Sat Apr 3 20:35:39 2010 (r206144) +++ head/bin/sh/parser.c Sat Apr 3 20:55:56 2010 (r206145) @@ -79,6 +79,10 @@ struct heredoc { int striptabs; /* if set, strip leading tabs */ }; +struct parser_temp { + struct parser_temp *next; + void *data; +}; STATIC struct heredoc *heredoclist; /* list of here documents to read */ @@ -94,6 +98,7 @@ STATIC struct heredoc *heredoc; STATIC int quoteflag; /* set if (part of) last token was quoted */ STATIC int startlinno; /* line # where last token started */ STATIC int funclinno; /* line # where the current function started */ +STATIC struct parser_temp *parser_temp; /* XXX When 'noaliases' is set to one, no alias expansion takes place. */ static int noaliases = 0; @@ -117,6 +122,73 @@ STATIC void synerror(const char *); STATIC void setprompt(int); +STATIC void * +parser_temp_alloc(size_t len) +{ + struct parser_temp *t; + + INTOFF; + t = ckmalloc(sizeof(*t)); + t->data = NULL; + t->next = parser_temp; + parser_temp = t; + t->data = ckmalloc(len); + INTON; + return t->data; +} + + +STATIC void * +parser_temp_realloc(void *ptr, size_t len) +{ + struct parser_temp *t; + + INTOFF; + t = parser_temp; + if (ptr != t->data) + error("bug: parser_temp_realloc misused"); + t->data = ckrealloc(t->data, len); + INTON; + return t->data; +} + + +STATIC void +parser_temp_free_upto(void *ptr) +{ + struct parser_temp *t; + int done = 0; + + INTOFF; + while (parser_temp != NULL && !done) { + t = parser_temp; + parser_temp = t->next; + done = t->data == ptr; + ckfree(t->data); + ckfree(t); + } + INTON; + if (!done) + error("bug: parser_temp_free_upto misused"); +} + + +STATIC void +parser_temp_free_all(void) +{ + struct parser_temp *t; + + INTOFF; + while (parser_temp != NULL) { + t = parser_temp; + parser_temp = t->next; + ckfree(t->data); + ckfree(t); + } + INTON; +} + + /* * Read and parse a command. Returns NEOF on end of file. (NULL is a * valid parse tree indicating a blank line.) @@ -127,6 +199,11 @@ parsecmd(int interact) { int t; + /* This assumes the parser is not re-entered, + * which could happen if we add command substitution on PS1/PS2. + */ + parser_temp_free_all(); + tokpushback = 0; doprompt = interact; if (doprompt) @@ -863,6 +940,21 @@ breakloop: } +#define MAXNEST_STATIC 8 +struct tokenstate +{ + const char *syntax; /* *SYNTAX */ + int parenlevel; /* levels of parentheses in arithmetic */ + enum tokenstate_category + { + TSTATE_TOP, + TSTATE_VAR_OLD, /* ${var+-=?}, inherits dquotes */ + TSTATE_VAR_NEW, /* other ${var...}, own dquote state */ + TSTATE_ARITH + } category; +}; + + /* * Called to parse command substitutions. */ @@ -1040,7 +1132,7 @@ done: #define PARSEARITH() {goto parsearith; parsearith_return:;} STATIC int -readtoken1(int firstc, char const *syntax, char *eofmark, int striptabs) +readtoken1(int firstc, char const *initialsyntax, char *eofmark, int striptabs) { int c = firstc; char *out; @@ -1048,22 +1140,21 @@ readtoken1(int firstc, char const *synta char line[EOFMARKLEN + 1]; struct nodelist *bqlist; int quotef; - int dblquote; - int varnest; /* levels of variables expansion */ - int arinest; /* levels of arithmetic expansion */ - int parenlevel; /* levels of parens in arithmetic */ - char const *prevsyntax; /* syntax before arithmetic */ + int newvarnest; + int level; int synentry; + struct tokenstate state_static[MAXNEST_STATIC]; + int maxnest = MAXNEST_STATIC; + struct tokenstate *state = state_static; startlinno = plinno; - dblquote = 0; - if (syntax == DQSYNTAX) - dblquote = 1; quotef = 0; bqlist = NULL; - varnest = 0; - arinest = 0; - parenlevel = 0; + newvarnest = 0; + level = 0; + state[level].syntax = initialsyntax; + state[level].parenlevel = 0; + state[level].category = TSTATE_TOP; STARTSTACKSTR(out); loop: { /* for each line, until end of word */ @@ -1071,11 +1162,11 @@ readtoken1(int firstc, char const *synta for (;;) { /* until end of line or end of word */ CHECKSTRSPACE(3, out); /* permit 3 calls to USTPUTC */ - synentry = syntax[c]; + synentry = state[level].syntax[c]; switch(synentry) { case CNL: /* '\n' */ - if (syntax == BASESYNTAX) + if (state[level].syntax == BASESYNTAX) goto endword; /* exit outer loop */ USTPUTC(c, out); plinno++; @@ -1089,7 +1180,7 @@ readtoken1(int firstc, char const *synta USTPUTC(c, out); break; case CCTL: - if (eofmark == NULL || dblquote) + if (eofmark == NULL || initialsyntax != SQSYNTAX) USTPUTC(CTLESC, out); USTPUTC(c, out); break; @@ -1105,41 +1196,37 @@ readtoken1(int firstc, char const *synta else setprompt(0); } else { - if (dblquote && c != '\\' && - c != '`' && c != '$' && - (c != '"' || eofmark != NULL)) + if (state[level].syntax == DQSYNTAX && + c != '\\' && c != '`' && c != '$' && + (c != '"' || (eofmark != NULL && + newvarnest == 0)) && + (c != '}' || state[level].category != TSTATE_VAR_OLD)) USTPUTC('\\', out); if (SQSYNTAX[c] == CCTL) USTPUTC(CTLESC, out); - else if (eofmark == NULL) + else if (eofmark == NULL || + newvarnest > 0) USTPUTC(CTLQUOTEMARK, out); USTPUTC(c, out); quotef++; } break; case CSQUOTE: - if (eofmark == NULL) - USTPUTC(CTLQUOTEMARK, out); - syntax = SQSYNTAX; + USTPUTC(CTLQUOTEMARK, out); + state[level].syntax = SQSYNTAX; break; case CDQUOTE: - if (eofmark == NULL) - USTPUTC(CTLQUOTEMARK, out); - syntax = DQSYNTAX; - dblquote = 1; + USTPUTC(CTLQUOTEMARK, out); + state[level].syntax = DQSYNTAX; break; case CENDQUOTE: - if (eofmark != NULL && arinest == 0 && - varnest == 0) { + if (eofmark != NULL && newvarnest == 0) USTPUTC(c, out); - } else { - if (arinest) { - syntax = ARISYNTAX; - dblquote = 0; - } else if (eofmark == NULL) { - syntax = BASESYNTAX; - dblquote = 0; - } + else { + if (state[level].category == TSTATE_ARITH) + state[level].syntax = ARISYNTAX; + else + state[level].syntax = BASESYNTAX; quotef++; } break; @@ -1147,30 +1234,33 @@ readtoken1(int firstc, char const *synta PARSESUB(); /* parse substitution */ break; case CENDVAR: /* '}' */ - if (varnest > 0) { - varnest--; + if (level > 0 && + (state[level].category == TSTATE_VAR_OLD || + state[level].category == TSTATE_VAR_NEW)) { + if (state[level].category == TSTATE_VAR_OLD) + state[level - 1].syntax = state[level].syntax; + else + newvarnest--; + level--; USTPUTC(CTLENDVAR, out); } else { USTPUTC(c, out); } break; case CLP: /* '(' in arithmetic */ - parenlevel++; + state[level].parenlevel++; USTPUTC(c, out); break; case CRP: /* ')' in arithmetic */ - if (parenlevel > 0) { + if (state[level].parenlevel > 0) { USTPUTC(c, out); - --parenlevel; + --state[level].parenlevel; } else { if (pgetc() == ')') { - if (--arinest == 0) { + if (level > 0 && + state[level].category == TSTATE_ARITH) { + level--; USTPUTC(CTLENDARI, out); - syntax = prevsyntax; - if (syntax == DQSYNTAX) - dblquote = 1; - else - dblquote = 0; } else USTPUTC(')', out); } else { @@ -1184,13 +1274,15 @@ readtoken1(int firstc, char const *synta } break; case CBQUOTE: /* '`' */ - out = parsebackq(out, &bqlist, 1, dblquote, - arinest || dblquote); + out = parsebackq(out, &bqlist, 1, + state[level].syntax == DQSYNTAX && + (eofmark == NULL || newvarnest > 0), + state[level].syntax == DQSYNTAX || state[level].syntax == ARISYNTAX); break; case CEOF: goto endword; /* exit outer loop */ default: - if (varnest == 0) + if (level == 0) goto endword; /* exit outer loop */ USTPUTC(c, out); } @@ -1198,14 +1290,17 @@ readtoken1(int firstc, char const *synta } } endword: - if (syntax == ARISYNTAX) + if (state[level].syntax == ARISYNTAX) synerror("Missing '))'"); - if (syntax != BASESYNTAX && eofmark == NULL) + if (state[level].syntax != BASESYNTAX && eofmark == NULL) synerror("Unterminated quoted string"); - if (varnest != 0) { + if (state[level].category == TSTATE_VAR_OLD || + state[level].category == TSTATE_VAR_NEW) { startlinno = plinno; synerror("Missing '}'"); } + if (state != state_static) + parser_temp_free_upto(state); USTPUTC('\0', out); len = out - stackblock(); out = stackblock(); @@ -1228,7 +1323,6 @@ endword: /* end of readtoken routine */ - /* * Check to see whether we are at the end of the here document. When this * is called, c is set to the first character of the next input line. If @@ -1345,8 +1439,11 @@ parsesub: { PARSEARITH(); } else { pungetc(); - out = parsebackq(out, &bqlist, 0, dblquote, - arinest || dblquote); + out = parsebackq(out, &bqlist, 0, + state[level].syntax == DQSYNTAX && + (eofmark == NULL || newvarnest > 0), + state[level].syntax == DQSYNTAX || + state[level].syntax == ARISYNTAX); } } else { USTPUTC(CTLVAR, out); @@ -1446,11 +1543,44 @@ parsesub: { pungetc(); } STPUTC('=', out); - if (subtype != VSLENGTH && (dblquote || arinest)) + if (subtype != VSLENGTH && (state[level].syntax == DQSYNTAX || + state[level].syntax == ARISYNTAX)) flags |= VSQUOTE; *(stackblock() + typeloc) = subtype | flags; - if (subtype != VSNORMAL) - varnest++; + if (subtype != VSNORMAL) { + if (level + 1 >= maxnest) { + maxnest *= 2; + if (state == state_static) { + state = parser_temp_alloc( + maxnest * sizeof(*state)); + memcpy(state, state_static, + MAXNEST_STATIC * sizeof(*state)); + } else + state = parser_temp_realloc(state, + maxnest * sizeof(*state)); + } + level++; + state[level].parenlevel = 0; + if (subtype == VSMINUS || subtype == VSPLUS || + subtype == VSQUESTION || subtype == VSASSIGN) { + /* + * For operators that were in the Bourne shell, + * inherit the double-quote state. + */ + state[level].syntax = state[level - 1].syntax; + state[level].category = TSTATE_VAR_OLD; + } else { + /* + * The other operators take a pattern, + * so go to BASESYNTAX. + * Also, ' and " are now special, even + * in here documents. + */ + state[level].syntax = BASESYNTAX; + state[level].category = TSTATE_VAR_NEW; + newvarnest++; + } + } } goto parsesub_return; } @@ -1461,21 +1591,26 @@ parsesub: { */ parsearith: { - if (++arinest == 1) { - prevsyntax = syntax; - syntax = ARISYNTAX; - USTPUTC(CTLARI, out); - if (dblquote) - USTPUTC('"',out); - else - USTPUTC(' ',out); - } else { - /* - * we collapse embedded arithmetic expansion to - * parenthesis, which should be equivalent - */ - USTPUTC('(', out); + if (level + 1 >= maxnest) { + maxnest *= 2; + if (state == state_static) { + state = parser_temp_alloc( + maxnest * sizeof(*state)); + memcpy(state, state_static, + MAXNEST_STATIC * sizeof(*state)); + } else + state = parser_temp_realloc(state, + maxnest * sizeof(*state)); } + level++; + state[level].syntax = ARISYNTAX; + state[level].parenlevel = 0; + state[level].category = TSTATE_ARITH; + USTPUTC(CTLARI, out); + if (state[level - 1].syntax == DQSYNTAX) + USTPUTC('"',out); + else + USTPUTC(' ',out); goto parsearith_return; } Added: head/tools/regression/bin/sh/expansion/plus-minus2.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/expansion/plus-minus2.0 Sat Apr 3 20:55:56 2010 (r206145) @@ -0,0 +1,4 @@ +# $FreeBSD$ + +e= +test "${e:-\}}" = '}' Added: head/tools/regression/bin/sh/parser/heredoc2.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/parser/heredoc2.0 Sat Apr 3 20:55:56 2010 (r206145) @@ -0,0 +1,44 @@ +# $FreeBSD$ + +failures=0 + +check() { + if ! eval "[ $* ]"; then + echo "Failed: $*" + : $((failures += 1)) + fi +} + +s='ast*que?non' sq=\' dq=\" + +check '"$(cat < Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6067C106566B; Sat, 3 Apr 2010 21:01:01 +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 4F6588FC14; Sat, 3 Apr 2010 21:01: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 o33L11hi098767; Sat, 3 Apr 2010 21:01:01 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o33L111r098764; Sat, 3 Apr 2010 21:01:01 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201004032101.o33L111r098764@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 3 Apr 2010 21:01: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: r206146 - 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: Sat, 03 Apr 2010 21:01:01 -0000 Author: jilles Date: Sat Apr 3 21:01:01 2010 New Revision: 206146 URL: http://svn.freebsd.org/changeset/base/206146 Log: sh: Remove special handling for ' and " in arithmetic. They will be treated like normal characters, resulting in a runtime arithmetic expression error. Exp-run done by: erwin (with some other sh(1) changes) Modified: head/bin/sh/mksyntax.c head/bin/sh/parser.c Modified: head/bin/sh/mksyntax.c ============================================================================== --- head/bin/sh/mksyntax.c Sat Apr 3 20:55:56 2010 (r206145) +++ head/bin/sh/mksyntax.c Sat Apr 3 21:01:01 2010 (r206146) @@ -232,8 +232,6 @@ main(int argc __unused, char **argv __un add("\n", "CNL"); add("\\", "CBACK"); add("`", "CBQUOTE"); - add("'", "CSQUOTE"); - add("\"", "CDQUOTE"); add("$", "CVAR"); add("}", "CENDVAR"); add("(", "CLP"); Modified: head/bin/sh/parser.c ============================================================================== --- head/bin/sh/parser.c Sat Apr 3 20:55:56 2010 (r206145) +++ head/bin/sh/parser.c Sat Apr 3 21:01:01 2010 (r206146) @@ -1223,10 +1223,7 @@ readtoken1(int firstc, char const *initi if (eofmark != NULL && newvarnest == 0) USTPUTC(c, out); else { - if (state[level].category == TSTATE_ARITH) - state[level].syntax = ARISYNTAX; - else - state[level].syntax = BASESYNTAX; + state[level].syntax = BASESYNTAX; quotef++; } break; From owner-svn-src-all@FreeBSD.ORG Sat Apr 3 21:07:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 02889106566B; Sat, 3 Apr 2010 21:07:51 +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 CAF358FC15; Sat, 3 Apr 2010 21:07: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 o33L7okK000407; Sat, 3 Apr 2010 21:07:50 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o33L7os9000404; Sat, 3 Apr 2010 21:07:50 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201004032107.o33L7os9000404@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 3 Apr 2010 21:07: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: r206147 - in head: bin/sh tools/regression/bin/sh/expansion X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 03 Apr 2010 21:07:51 -0000 Author: jilles Date: Sat Apr 3 21:07:50 2010 New Revision: 206147 URL: http://svn.freebsd.org/changeset/base/206147 Log: sh: Allow quoting pattern match characters in ${v%pat} and ${v#pat}. Note that this depends on r206145 for allowing pattern match characters to have their special meaning inside a double-quoted expansion like "${v%pat}". PR: bin/117748 Exp-run done by: erwin (with some other sh(1) changes) Added: head/tools/regression/bin/sh/expansion/trim2.0 (contents, props changed) Modified: head/bin/sh/expand.c Modified: head/bin/sh/expand.c ============================================================================== --- head/bin/sh/expand.c Sat Apr 3 21:01:01 2010 (r206146) +++ head/bin/sh/expand.c Sat Apr 3 21:07:50 2010 (r206147) @@ -506,7 +506,9 @@ subevalvar(char *p, char *str, int strlo int amount; herefd = -1; - argstr(p, 0); + argstr(p, subtype == VSTRIMLEFT || subtype == VSTRIMLEFTMAX || + subtype == VSTRIMRIGHT || subtype == VSTRIMRIGHTMAX ? + EXP_CASE : 0); STACKSTRNUL(expdest); herefd = saveherefd; argbackq = saveargbackq; Added: head/tools/regression/bin/sh/expansion/trim2.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/expansion/trim2.0 Sat Apr 3 21:07:50 2010 (r206147) @@ -0,0 +1,55 @@ +# $FreeBSD$ + +e= q='?' a='*' t=texttext s='ast*que?non' p='/et[c]/' w='a b c' b='{{(#)}}' +h='##' +failures='' +ok='' + +testcase() { + code="$1" + expected="$2" + oIFS="$IFS" + eval "$code" + IFS='|' + result="$#|$*" + IFS="$oIFS" + if [ "x$result" = "x$expected" ]; then + ok=x$ok + else + failures=x$failures + echo "For $code, expected $expected actual $result" + fi +} + +set -f +testcase 'set -- $s' '1|ast*que?non' +testcase 'set -- ${s%\?*}' '1|ast*que' +testcase 'set -- "${s%\?*}"' '1|ast*que' +testcase 'set -- ${s%\**}' '1|ast' +testcase 'set -- "${s%\**}"' '1|ast' +testcase 'set -- ${s%"$q"*}' '1|ast*que' +testcase 'set -- "${s%"$q"*}"' '1|ast*que' +testcase 'set -- ${s%"$a"*}' '1|ast' +testcase 'set -- "${s%"$a"*}"' '1|ast' +testcase 'set -- ${s%"$q"$a}' '1|ast*que' +testcase 'set -- "${s%"$q"$a}"' '1|ast*que' +testcase 'set -- ${s%"$a"$a}' '1|ast' +testcase 'set -- "${s%"$a"$a}"' '1|ast' +set +f + +testcase 'set -- "${b%\}}"' '1|{{(#)}' +# Parentheses are special in ksh, check that they can be escaped +testcase 'set -- "${b%\)*}"' '1|{{(#' +testcase 'set -- "${h#\#}"' '1|#' + +testcase 'set -- ${p%"${p#?}"}' '1|/' +testcase 'set -- ${p%"${p#??????}"}' '1|/etc' +testcase 'set -- ${p%"${p#???????}"}' '1|/etc/' +testcase 'set -- "${p%"${p#?}"}"' '1|/' +testcase 'set -- "${p%"${p#??????}"}"' '1|/et[c]' +testcase 'set -- "${p%"${p#???????}"}"' '1|/et[c]/' +testcase 'set -- ${p#"${p}"}' '0|' +testcase 'set -- "${p#"${p}"}"' '1|' +testcase 'set -- "${p#*\[}"' '1|c]/' + +test "x$failures" = x From owner-svn-src-all@FreeBSD.ORG Sat Apr 3 21:32:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56CA21065672; Sat, 3 Apr 2010 21:32:22 +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 455FE8FC17; Sat, 3 Apr 2010 21:32:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o33LWMCd005733; Sat, 3 Apr 2010 21:32:22 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o33LWMTN005731; Sat, 3 Apr 2010 21:32:22 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201004032132.o33LWMTN005731@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 3 Apr 2010 21:32:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206148 - head/tools/regression/bin/sh/expansion X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 03 Apr 2010 21:32:22 -0000 Author: jilles Date: Sat Apr 3 21:32:22 2010 New Revision: 206148 URL: http://svn.freebsd.org/changeset/base/206148 Log: sh: Add some testcases for the working parts of tilde expansion. Added: head/tools/regression/bin/sh/expansion/tilde1.0 (contents, props changed) Added: head/tools/regression/bin/sh/expansion/tilde1.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/expansion/tilde1.0 Sat Apr 3 21:32:22 2010 (r206148) @@ -0,0 +1,56 @@ +# $FreeBSD$ + +HOME=/tmp +roothome=~root +if [ "$roothome" = "~root" ]; then + echo "~root is not expanded!" + exit 2 +fi + +testcase() { + code="$1" + expected="$2" + oIFS="$IFS" + eval "$code" + IFS='|' + result="$#|$*" + IFS="$oIFS" + if [ "x$result" = "x$expected" ]; then + ok=x$ok + else + failures=x$failures + echo "For $code, expected $expected actual $result" + fi +} + +testcase 'set -- ~' '1|/tmp' +testcase 'set -- ~/foo' '1|/tmp/foo' +testcase 'set -- x~' '1|x~' +testcase 'set -- ~root' "1|$roothome" +h=~ +testcase 'set -- "$h"' '1|/tmp' +oIFS=$IFS +IFS=m +testcase 'set -- ~' '1|/tmp' +testcase 'set -- ~/foo' '1|/tmp/foo' +testcase 'set -- $h' '2|/t|p' +IFS=$oIFS +t=\~ +testcase 'set -- $t' '1|~' +r=$(cat < Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A6FB31065673; Sat, 3 Apr 2010 21:56:24 +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 95ABE8FC13; Sat, 3 Apr 2010 21:56: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 o33LuOMr011168; Sat, 3 Apr 2010 21:56:24 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o33LuOgg011166; Sat, 3 Apr 2010 21:56:24 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201004032156.o33LuOgg011166@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 3 Apr 2010 21:56: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: r206149 - head/tools/regression/bin/sh/expansion X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 03 Apr 2010 21:56:24 -0000 Author: jilles Date: Sat Apr 3 21:56:24 2010 New Revision: 206149 URL: http://svn.freebsd.org/changeset/base/206149 Log: sh: Fix duplicate variable name in test. Modified: head/tools/regression/bin/sh/expansion/tilde1.0 Modified: head/tools/regression/bin/sh/expansion/tilde1.0 ============================================================================== --- head/tools/regression/bin/sh/expansion/tilde1.0 Sat Apr 3 21:32:22 2010 (r206148) +++ head/tools/regression/bin/sh/expansion/tilde1.0 Sat Apr 3 21:56:24 2010 (r206149) @@ -29,12 +29,12 @@ testcase 'set -- x~' '1|x~' testcase 'set -- ~root' "1|$roothome" h=~ testcase 'set -- "$h"' '1|/tmp' -oIFS=$IFS +ooIFS=$IFS IFS=m testcase 'set -- ~' '1|/tmp' testcase 'set -- ~/foo' '1|/tmp/foo' testcase 'set -- $h' '2|/t|p' -IFS=$oIFS +IFS=$ooIFS t=\~ testcase 'set -- $t' '1|~' r=$(cat < Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 484ED106566B; Sat, 3 Apr 2010 22:04:45 +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 36B2E8FC12; Sat, 3 Apr 2010 22:04: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 o33M4jAl013345; Sat, 3 Apr 2010 22:04:45 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o33M4jh4013342; Sat, 3 Apr 2010 22:04:45 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201004032204.o33M4jh4013342@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 3 Apr 2010 22:04: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: r206150 - in head: bin/sh tools/regression/bin/sh/expansion X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 03 Apr 2010 22:04:45 -0000 Author: jilles Date: Sat Apr 3 22:04:44 2010 New Revision: 206150 URL: http://svn.freebsd.org/changeset/base/206150 Log: sh: Do tilde expansion in substitutions. This applies to word in ${v-word}, ${v+word}, ${v=word}, ${v?word} (which inherits quoting from the outside) and in ${v%word}, ${v%%word}, ${v#word}, ${v##word} (which does not inherit any quoting). In all cases tilde expansion is only attempted at the start of word, even if word contains spaces. This agrees with POSIX and other shells. This is the last part of the patch tested in the exp-run. Exp-run done by: erwin (with some other sh(1) changes) Added: head/tools/regression/bin/sh/expansion/tilde2.0 (contents, props changed) Modified: head/bin/sh/expand.c Modified: head/bin/sh/expand.c ============================================================================== --- head/bin/sh/expand.c Sat Apr 3 21:56:24 2010 (r206149) +++ head/bin/sh/expand.c Sat Apr 3 22:04:44 2010 (r206150) @@ -273,7 +273,6 @@ exptilde(char *p, int flag) switch(c) { case CTLESC: /* This means CTL* are always considered quoted. */ case CTLVAR: - case CTLENDVAR: case CTLBACKQ: case CTLBACKQ | CTLQUOTE: case CTLARI: @@ -285,6 +284,7 @@ exptilde(char *p, int flag) goto done; break; case '/': + case CTLENDVAR: goto done; } p++; @@ -506,9 +506,9 @@ subevalvar(char *p, char *str, int strlo int amount; herefd = -1; - argstr(p, subtype == VSTRIMLEFT || subtype == VSTRIMLEFTMAX || + argstr(p, (subtype == VSTRIMLEFT || subtype == VSTRIMLEFTMAX || subtype == VSTRIMRIGHT || subtype == VSTRIMRIGHTMAX ? - EXP_CASE : 0); + EXP_CASE : 0) | EXP_TILDE); STACKSTRNUL(expdest); herefd = saveherefd; argbackq = saveargbackq; Added: head/tools/regression/bin/sh/expansion/tilde2.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/expansion/tilde2.0 Sat Apr 3 22:04:44 2010 (r206150) @@ -0,0 +1,90 @@ +# $FreeBSD$ + +HOME=/tmp +roothome=~root +if [ "$roothome" = "~root" ]; then + echo "~root is not expanded!" + exit 2 +fi + +testcase() { + code="$1" + expected="$2" + oIFS="$IFS" + eval "$code" + IFS='|' + result="$#|$*" + IFS="$oIFS" + if [ "x$result" = "x$expected" ]; then + ok=x$ok + else + failures=x$failures + echo "For $code, expected $expected actual $result" + fi +} + +testcase 'set -- ${$+~}' '1|/tmp' +testcase 'set -- ${$+~/}' '1|/tmp/' +testcase 'set -- ${$+~/foo}' '1|/tmp/foo' +testcase 'set -- ${$+x~}' '1|x~' +testcase 'set -- ${$+~root}' "1|$roothome" +testcase 'set -- ${$+"~"}' '1|~' +testcase 'set -- ${$+"~/"}' '1|~/' +testcase 'set -- ${$+"~/foo"}' '1|~/foo' +testcase 'set -- ${$+"x~"}' '1|x~' +testcase 'set -- ${$+"~root"}' "1|~root" +testcase 'set -- "${$+~}"' '1|~' +testcase 'set -- "${$+~/}"' '1|~/' +testcase 'set -- "${$+~/foo}"' '1|~/foo' +testcase 'set -- "${$+x~}"' '1|x~' +testcase 'set -- "${$+~root}"' "1|~root" +testcase 'set -- ${HOME#~}' '0|' +h=~ +testcase 'set -- "$h"' '1|/tmp' +f=~/foo +testcase 'set -- "$f"' '1|/tmp/foo' +testcase 'set -- ${f#~}' '1|/foo' +testcase 'set -- ${f#~/}' '1|foo' + +ooIFS=$IFS +IFS=m +testcase 'set -- ${$+~}' '1|/tmp' +testcase 'set -- ${$+~/foo}' '1|/tmp/foo' +testcase 'set -- ${$+$h}' '2|/t|p' +testcase 'set -- ${HOME#~}' '0|' +IFS=$ooIFS + +t=\~ +testcase 'set -- ${$+$t}' '1|~' +r=$(cat < Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2FF471065673; Sat, 3 Apr 2010 23:51:42 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1E3358FC13; Sat, 3 Apr 2010 23:51: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 o33NpggS037180; Sat, 3 Apr 2010 23:51:42 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o33Npf9p037178; Sat, 3 Apr 2010 23:51:41 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201004032351.o33Npf9p037178@svn.freebsd.org> From: Michael Tuexen Date: Sat, 3 Apr 2010 23:51:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206151 - 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: Sat, 03 Apr 2010 23:51:42 -0000 Author: tuexen Date: Sat Apr 3 23:51:41 2010 New Revision: 206151 URL: http://svn.freebsd.org/changeset/base/206151 Log: Use also SCTP/IPv6 checksum offloading in special cases. MFC after: 2 weeks Modified: head/sys/netinet/sctp_output.c Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Sat Apr 3 22:04:44 2010 (r206150) +++ head/sys/netinet/sctp_output.c Sat Apr 3 23:51:41 2010 (r206151) @@ -3709,7 +3709,7 @@ sctp_lowlevel_chunk_output(struct sctp_i (stcb) && (stcb->asoc.loopback_scope))) { m->m_pkthdr.csum_flags = CSUM_SCTP; - m->m_pkthdr.csum_data = 0; /* FIXME MT */ + m->m_pkthdr.csum_data = 0; SCTP_STAT_INCR(sctps_sendhwcrc); } else { SCTP_STAT_INCR(sctps_sendnocrc); @@ -4021,7 +4021,7 @@ sctp_lowlevel_chunk_output(struct sctp_i (stcb) && (stcb->asoc.loopback_scope))) { m->m_pkthdr.csum_flags = CSUM_SCTP; - m->m_pkthdr.csum_data = 0; /* FIXME MT */ + m->m_pkthdr.csum_data = 0; SCTP_STAT_INCR(sctps_sendhwcrc); } else { SCTP_STAT_INCR(sctps_sendnocrc); @@ -10542,7 +10542,7 @@ sctp_send_shutdown_complete2(struct mbuf SCTP_ENABLE_UDP_CSUM(mout); } else { mout->m_pkthdr.csum_flags = CSUM_SCTP; - mout->m_pkthdr.csum_data = 0; /* FIXME MT */ + mout->m_pkthdr.csum_data = 0; SCTP_STAT_INCR(sctps_sendhwcrc); } SCTP_ATTACH_CHAIN(o_pak, mout, mlen); @@ -10566,14 +10566,29 @@ sctp_send_shutdown_complete2(struct mbuf if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LAST_PACKET_TRACING) sctp_packet_log(mout, mlen); #endif - comp_cp->sh.checksum = sctp_calculate_cksum(mout, offset_out); - SCTP_STAT_INCR(sctps_sendswcrc); SCTP_ATTACH_CHAIN(o_pak, mout, mlen); if (port) { - if ((udp->uh_sum = in6_cksum(o_pak, IPPROTO_UDP, sizeof(struct ip6_hdr), - sizeof(struct sctp_shutdown_complete_msg) + sizeof(struct udphdr))) == 0) { + if (!(SCTP_BASE_SYSCTL(sctp_no_csum_on_loopback) && + (stcb) && + (stcb->asoc.loopback_scope))) { + comp_cp->sh.checksum = sctp_calculate_cksum(mout, sizeof(struct ip6_hdr) + sizeof(struct udphdr)); + SCTP_STAT_INCR(sctps_sendswcrc); + } else { + SCTP_STAT_INCR(sctps_sendnocrc); + } + if ((udp->uh_sum = in6_cksum(o_pak, IPPROTO_UDP, sizeof(struct ip6_hdr), mlen - sizeof(struct ip6_hdr))) == 0) { udp->uh_sum = 0xffff; } + } else { + if (!(SCTP_BASE_SYSCTL(sctp_no_csum_on_loopback) && + (stcb) && + (stcb->asoc.loopback_scope))) { + mout->m_pkthdr.csum_flags = CSUM_SCTP; + mout->m_pkthdr.csum_data = 0; + SCTP_STAT_INCR(sctps_sendhwcrc); + } else { + SCTP_STAT_INCR(sctps_sendnocrc); + } } SCTP_IP6_OUTPUT(ret, o_pak, &ro, &ifp, stcb, vrf_id); @@ -11593,7 +11608,7 @@ sctp_send_abort(struct mbuf *m, int iphl SCTP_ENABLE_UDP_CSUM(o_pak); } else { mout->m_pkthdr.csum_flags = CSUM_SCTP; - mout->m_pkthdr.csum_data = 0; /* FIXME MT */ + mout->m_pkthdr.csum_data = 0; SCTP_STAT_INCR(sctps_sendhwcrc); } SCTP_IP_OUTPUT(ret, o_pak, &ro, stcb, vrf_id); @@ -11621,13 +11636,29 @@ sctp_send_abort(struct mbuf *m, int iphl if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LAST_PACKET_TRACING) sctp_packet_log(mout, len); #endif - abm->sh.checksum = sctp_calculate_cksum(mout, iphlen_out); - SCTP_STAT_INCR(sctps_sendswcrc); SCTP_ATTACH_CHAIN(o_pak, mout, len); if (port) { + if (!(SCTP_BASE_SYSCTL(sctp_no_csum_on_loopback) && + (stcb) && + (stcb->asoc.loopback_scope))) { + abm->sh.checksum = sctp_calculate_cksum(mout, sizeof(struct ip6_hdr) + sizeof(struct udphdr)); + SCTP_STAT_INCR(sctps_sendswcrc); + } else { + SCTP_STAT_INCR(sctps_sendnocrc); + } if ((udp->uh_sum = in6_cksum(o_pak, IPPROTO_UDP, sizeof(struct ip6_hdr), len - sizeof(struct ip6_hdr))) == 0) { udp->uh_sum = 0xffff; } + } else { + if (!(SCTP_BASE_SYSCTL(sctp_no_csum_on_loopback) && + (stcb) && + (stcb->asoc.loopback_scope))) { + mout->m_pkthdr.csum_flags = CSUM_SCTP; + mout->m_pkthdr.csum_data = 0; + SCTP_STAT_INCR(sctps_sendhwcrc); + } else { + SCTP_STAT_INCR(sctps_sendnocrc); + } } SCTP_IP6_OUTPUT(ret, o_pak, &ro, &ifp, stcb, vrf_id); @@ -11815,7 +11846,7 @@ sctp_send_operr_to(struct mbuf *m, int i SCTP_ENABLE_UDP_CSUM(o_pak); } else { mout->m_pkthdr.csum_flags = CSUM_SCTP; - mout->m_pkthdr.csum_data = 0; /* FIXME MT */ + mout->m_pkthdr.csum_data = 0; SCTP_STAT_INCR(sctps_sendhwcrc); } SCTP_IP_OUTPUT(ret, o_pak, &ro, stcb, vrf_id); @@ -11841,13 +11872,29 @@ sctp_send_operr_to(struct mbuf *m, int i if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LAST_PACKET_TRACING) sctp_packet_log(mout, len); #endif - sh_out->checksum = sctp_calculate_cksum(mout, iphlen_out); - SCTP_STAT_INCR(sctps_sendswcrc); SCTP_ATTACH_CHAIN(o_pak, mout, len); if (port) { + if (!(SCTP_BASE_SYSCTL(sctp_no_csum_on_loopback) && + (stcb) && + (stcb->asoc.loopback_scope))) { + sh_out->checksum = sctp_calculate_cksum(mout, sizeof(struct ip6_hdr) + sizeof(struct udphdr)); + SCTP_STAT_INCR(sctps_sendswcrc); + } else { + SCTP_STAT_INCR(sctps_sendnocrc); + } if ((udp->uh_sum = in6_cksum(o_pak, IPPROTO_UDP, sizeof(struct ip6_hdr), len - sizeof(struct ip6_hdr))) == 0) { udp->uh_sum = 0xffff; } + } else { + if (!(SCTP_BASE_SYSCTL(sctp_no_csum_on_loopback) && + (stcb) && + (stcb->asoc.loopback_scope))) { + mout->m_pkthdr.csum_flags = CSUM_SCTP; + mout->m_pkthdr.csum_data = 0; + SCTP_STAT_INCR(sctps_sendhwcrc); + } else { + SCTP_STAT_INCR(sctps_sendnocrc); + } } SCTP_IP6_OUTPUT(ret, o_pak, &ro, &ifp, stcb, vrf_id);