From owner-svn-src-stable@FreeBSD.ORG Sun Jul 5 06:24:06 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EFD761065670; Sun, 5 Jul 2009 06:24:06 +0000 (UTC) (envelope-from brian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DD9BD8FC1B; Sun, 5 Jul 2009 06:24:06 +0000 (UTC) (envelope-from brian@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n656O68L038993; Sun, 5 Jul 2009 06:24:06 GMT (envelope-from brian@svn.freebsd.org) Received: (from brian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n656O6MF038991; Sun, 5 Jul 2009 06:24:06 GMT (envelope-from brian@svn.freebsd.org) Message-Id: <200907050624.n656O6MF038991@svn.freebsd.org> From: Brian Somers Date: Sun, 5 Jul 2009 06:24:06 +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: r195347 - in stable/7/gnu/usr.bin/man: . apropos X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2009 06:24:07 -0000 Author: brian Date: Sun Jul 5 06:24:06 2009 New Revision: 195347 URL: http://svn.freebsd.org/changeset/base/195347 Log: MFC: Don't set $PATH - if the caller doesn't have /bin and /usr/bin in their PATH then they can expect things to break. PR: 135417 Modified: stable/7/gnu/usr.bin/man/ (props changed) stable/7/gnu/usr.bin/man/apropos/apropos.sh Modified: stable/7/gnu/usr.bin/man/apropos/apropos.sh ============================================================================== --- stable/7/gnu/usr.bin/man/apropos/apropos.sh Sun Jul 5 06:14:59 2009 (r195346) +++ stable/7/gnu/usr.bin/man/apropos/apropos.sh Sun Jul 5 06:24:06 2009 (r195347) @@ -18,7 +18,6 @@ # $FreeBSD$ -PATH=/bin:/usr/bin:$PATH db=whatis # name of whatis data base grepopt='' From owner-svn-src-stable@FreeBSD.ORG Sun Jul 5 06:28:24 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 34568106564A; Sun, 5 Jul 2009 06:28:24 +0000 (UTC) (envelope-from brian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 089C38FC19; Sun, 5 Jul 2009 06:28:24 +0000 (UTC) (envelope-from brian@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n656SNoE039126; Sun, 5 Jul 2009 06:28:23 GMT (envelope-from brian@svn.freebsd.org) Received: (from brian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n656SNch039124; Sun, 5 Jul 2009 06:28:23 GMT (envelope-from brian@svn.freebsd.org) Message-Id: <200907050628.n656SNch039124@svn.freebsd.org> From: Brian Somers Date: Sun, 5 Jul 2009 06:28:23 +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: r195348 - stable/7/etc X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2009 06:28:24 -0000 Author: brian Date: Sun Jul 5 06:28:23 2009 New Revision: 195348 URL: http://svn.freebsd.org/changeset/base/195348 Log: MFC: Remove HOME= PR: 132135 Modified: stable/7/etc/ (props changed) stable/7/etc/crontab Modified: stable/7/etc/crontab ============================================================================== --- stable/7/etc/crontab Sun Jul 5 06:24:06 2009 (r195347) +++ stable/7/etc/crontab Sun Jul 5 06:28:23 2009 (r195348) @@ -4,7 +4,6 @@ # SHELL=/bin/sh PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin -HOME=/var/log # #minute hour mday month wday who command # From owner-svn-src-stable@FreeBSD.ORG Sun Jul 5 06:32:10 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA7D91065677; Sun, 5 Jul 2009 06:32:10 +0000 (UTC) (envelope-from brian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BE41A8FC25; Sun, 5 Jul 2009 06:32:10 +0000 (UTC) (envelope-from brian@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n656WAMf039328; Sun, 5 Jul 2009 06:32:10 GMT (envelope-from brian@svn.freebsd.org) Received: (from brian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n656WAYV039325; Sun, 5 Jul 2009 06:32:10 GMT (envelope-from brian@svn.freebsd.org) Message-Id: <200907050632.n656WAYV039325@svn.freebsd.org> From: Brian Somers Date: Sun, 5 Jul 2009 06:32: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: r195349 - in stable/7/usr.sbin/lpr: . lp X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2009 06:32:11 -0000 Author: brian Date: Sun Jul 5 06:32:10 2009 New Revision: 195349 URL: http://svn.freebsd.org/changeset/base/195349 Log: MFC: Add -m and -t options. PR: 129554 Modified: stable/7/usr.sbin/lpr/ (props changed) stable/7/usr.sbin/lpr/lp/lp.1 stable/7/usr.sbin/lpr/lp/lp.sh Modified: stable/7/usr.sbin/lpr/lp/lp.1 ============================================================================== --- stable/7/usr.sbin/lpr/lp/lp.1 Sun Jul 5 06:28:23 2009 (r195348) +++ stable/7/usr.sbin/lpr/lp/lp.1 Sun Jul 5 06:32:10 2009 (r195349) @@ -78,6 +78,8 @@ or .Ev PRINTER (with this precedence) are taken as the destination printer. +.It Fl m +Send mail upon completion. .It Fl n Ar num Specify that .Ar num @@ -91,6 +93,9 @@ Silent operation. Not supported, provided only as a compatibility option for .St -susv2 . +.It Fl t Ar title +Set the job title to +.Ar title . .El .Sh ENVIRONMENT As described above, the variables Modified: stable/7/usr.sbin/lpr/lp/lp.sh ============================================================================== --- stable/7/usr.sbin/lpr/lp/lp.sh Sun Jul 5 06:28:23 2009 (r195348) +++ stable/7/usr.sbin/lpr/lp/lp.sh Sun Jul 5 06:32:10 2009 (r195349) @@ -41,6 +41,8 @@ ncopies="" symlink="-s" +mailafter="" +title="" # Posix says LPDEST gets precedence over PRINTER dest=${LPDEST:-${PRINTER:-lp}} @@ -51,7 +53,7 @@ dest=${LPDEST:-${PRINTER:-lp}} # XXX We include the -s flag as a dummy. SUSv2 requires it, # although we do not yet emit the affected messages. # -while getopts "cd:n:o:s" option +while getopts "cd:mn:o:st:" option do case $option in @@ -59,12 +61,16 @@ do symlink="";; d) # destination dest="${OPTARG}";; + m) # mail after job + mailafter="-m";; n) # number of copies ncopies="-#${OPTARG}";; o) # (printer option) : ;; s) # (silent option) : ;; + t) # title for banner page + title="-J${OPTARG}";; *) # (error msg printed by getopts) exit 2;; esac @@ -72,4 +78,4 @@ done shift $(($OPTIND - 1)) -exec /usr/bin/lpr "-P${dest}" ${symlink} ${ncopies} "$@" +exec /usr/bin/lpr "-P${dest}" ${symlink} ${ncopies} ${mailafter} "${title}" "$@" From owner-svn-src-stable@FreeBSD.ORG Sun Jul 5 13:17:19 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E6C1106566C; Sun, 5 Jul 2009 13:17:19 +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 F03368FC14; Sun, 5 Jul 2009 13:17:18 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n65DHI8K050161; Sun, 5 Jul 2009 13:17:18 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n65DHIk6050159; Sun, 5 Jul 2009 13:17:18 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <200907051317.n65DHIk6050159@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 5 Jul 2009 13:17: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: r195361 - stable/7/usr.bin/ipcs X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2009 13:17:19 -0000 Author: jilles Date: Sun Jul 5 13:17:18 2009 New Revision: 195361 URL: http://svn.freebsd.org/changeset/base/195361 Log: MFC ipcs(1) part of r189283 by kib This fixes display of shared memory segment sizes greater than 2 GB in ipcs -b. PR: kern/136226 Approved by: ed (mentor) Modified: stable/7/usr.bin/ipcs/ (props changed) stable/7/usr.bin/ipcs/ipcs.c Modified: stable/7/usr.bin/ipcs/ipcs.c ============================================================================== --- stable/7/usr.bin/ipcs/ipcs.c Sun Jul 5 08:40:26 2009 (r195360) +++ stable/7/usr.bin/ipcs/ipcs.c Sun Jul 5 13:17:18 2009 (r195361) @@ -452,8 +452,8 @@ print_kshmptr(int i, int option, struct kshmptr->u.shm_nattch); if (option & BIGGEST) - printf(" %12d", - kshmptr->u.shm_segsz); + printf(" %12zu", + kshmptr->shm_bsegsz); if (option & PID) printf(" %12d %12d", From owner-svn-src-stable@FreeBSD.ORG Mon Jul 6 01:04:45 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E5A6B106564A; Mon, 6 Jul 2009 01:04:45 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D1F1C8FC14; Mon, 6 Jul 2009 01:04:45 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n6614jnB064207; Mon, 6 Jul 2009 01:04:45 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6614jfk064205; Mon, 6 Jul 2009 01:04:45 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200907060104.n6614jfk064205@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 6 Jul 2009 01:04: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: r195387 - in stable/7/sys: . contrib/pf dev/ale X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2009 01:04:46 -0000 Author: yongari Date: Mon Jul 6 01:04:45 2009 New Revision: 195387 URL: http://svn.freebsd.org/changeset/base/195387 Log: MFC r195153: Disable Rx checksum offload until I find more clue why it breaks under certain environments. However give users chance to override it when he/she surely knows his/her hardware works with Rx checksum offload. Reported by: Ulrich Spoerlein ( uqs <> spoerlein dot net ) Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ale/if_ale.c Modified: stable/7/sys/dev/ale/if_ale.c ============================================================================== --- stable/7/sys/dev/ale/if_ale.c Sun Jul 5 21:47:39 2009 (r195386) +++ stable/7/sys/dev/ale/if_ale.c Mon Jul 6 01:04:45 2009 (r195387) @@ -620,6 +620,14 @@ ale_attach(device_t dev) ifp->if_capabilities |= IFCAP_VLAN_MTU; ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_HWCSUM; ifp->if_capenable = ifp->if_capabilities; + /* + * Even though controllers supported by ale(3) have Rx checksum + * offload bug the workaround for fragmented frames seemed to + * work so far. However it seems Rx checksum offload does not + * work under certain conditions. So disable Rx checksum offload + * until I find more clue about it but allow users to override it. + */ + ifp->if_capenable &= ~IFCAP_RXCSUM; /* Tell the upper layer(s) we support long frames. */ ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header); From owner-svn-src-stable@FreeBSD.ORG Mon Jul 6 01:32:30 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 42A751065675; Mon, 6 Jul 2009 01:32:30 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 152688FC13; Mon, 6 Jul 2009 01:32:30 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n661WTQt064917; Mon, 6 Jul 2009 01:32:29 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n661WT0L064915; Mon, 6 Jul 2009 01:32:29 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <200907060132.n661WT0L064915@svn.freebsd.org> From: Brooks Davis Date: Mon, 6 Jul 2009 01:32:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195388 - stable/7/usr.bin/catman X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2009 01:32:31 -0000 Author: brooks Date: Mon Jul 6 01:32:29 2009 New Revision: 195388 URL: http://svn.freebsd.org/changeset/base/195388 Log: MFC r194493 and r194548 When checking if we can write to a file, use access() instead of a manual permission check based on stat output. Also, get rid of the executability check since it is not used. Modified: stable/7/usr.bin/catman/ (props changed) stable/7/usr.bin/catman/catman.c Modified: stable/7/usr.bin/catman/catman.c ============================================================================== --- stable/7/usr.bin/catman/catman.c Mon Jul 6 01:04:45 2009 (r195387) +++ stable/7/usr.bin/catman/catman.c Mon Jul 6 01:32:29 2009 (r195388) @@ -57,7 +57,6 @@ __FBSDID("$FreeBSD$"); #define TEST_FILE 0x04 #define TEST_READABLE 0x08 #define TEST_WRITABLE 0x10 -#define TEST_EXECUTABLE 0x20 static int verbose; /* -v flag: be verbose with warnings */ static int pretend; /* -n, -p flags: print out what would be done @@ -93,8 +92,6 @@ static const char *locale_device[] = { enum Ziptype {NONE, BZIP, GZIP}; static uid_t uid; -static gid_t gids[NGROUPS_MAX]; -static int ngids; static int starting_dir; static char tmp_file[MAXPATHLEN]; struct stat test_st; @@ -320,23 +317,10 @@ test_path(char *name, time_t *mod_time) result |= TEST_DIR; else if (S_ISREG(test_st.st_mode)) result |= TEST_FILE; - if (test_st.st_uid == uid) { - test_st.st_mode >>= 6; - } else { - int i; - for (i = 0; i < ngids; i++) { - if (test_st.st_gid == gids[i]) { - test_st.st_mode >>= 3; - break; - } - } - } - if (test_st.st_mode & S_IROTH) + if (access(name, R_OK)) result |= TEST_READABLE; - if (test_st.st_mode & S_IWOTH) + if (access(name, W_OK)) result |= TEST_WRITABLE; - if (test_st.st_mode & S_IXOTH) - result |= TEST_EXECUTABLE; return result; } @@ -789,7 +773,6 @@ main(int argc, char **argv) /* NOTREACHED */ } } - ngids = getgroups(NGROUPS_MAX, gids); if ((starting_dir = open(".", 0)) < 0) { err(1, "."); } From owner-svn-src-stable@FreeBSD.ORG Mon Jul 6 09:07:36 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 39B2A1065675; Mon, 6 Jul 2009 09:07:36 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2772B8FC1A; Mon, 6 Jul 2009 09:07:36 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n6697auu074006; Mon, 6 Jul 2009 09:07:36 GMT (envelope-from n_hibma@svn.freebsd.org) Received: (from n_hibma@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6697a22074004; Mon, 6 Jul 2009 09:07:36 GMT (envelope-from n_hibma@svn.freebsd.org) Message-Id: <200907060907.n6697a22074004@svn.freebsd.org> From: Nick Hibma Date: Mon, 6 Jul 2009 09:07: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: r195402 - stable/7/sys/dev/usb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2009 09:07:37 -0000 Author: n_hibma Date: Mon Jul 6 09:07:35 2009 New Revision: 195402 URL: http://svn.freebsd.org/changeset/base/195402 Log: bugfix: Clear the out endpoint on a stall on the written endpoint, not *in*. Modified: stable/7/sys/dev/usb/ucom.c Modified: stable/7/sys/dev/usb/ucom.c ============================================================================== --- stable/7/sys/dev/usb/ucom.c Mon Jul 6 08:16:25 2009 (r195401) +++ stable/7/sys/dev/usb/ucom.c Mon Jul 6 09:07:35 2009 (r195402) @@ -693,7 +693,7 @@ ucomwritecb(usbd_xfer_handle xfer, usbd_ printf("%s: ucomwritecb: %s\n", device_get_nameunit(sc->sc_dev), usbd_errstr(status)); if (status == USBD_STALLED) - usbd_clear_endpoint_stall_async(sc->sc_bulkin_pipe); + usbd_clear_endpoint_stall_async(sc->sc_bulkout_pipe); /* XXX we should restart after some delay. */ goto error; } From owner-svn-src-stable@FreeBSD.ORG Wed Jul 8 01:41:42 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D99A1065674; Wed, 8 Jul 2009 01:41:42 +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 0AB618FC0A; Wed, 8 Jul 2009 01:41:42 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n681ffu2034577; Wed, 8 Jul 2009 01:41:41 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n681ffiI034575; Wed, 8 Jul 2009 01:41:41 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <200907080141.n681ffiI034575@svn.freebsd.org> From: Xin LI Date: Wed, 8 Jul 2009 01:41:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195431 - in stable/7/lib/libc: . rpc X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2009 01:41:42 -0000 Author: delphij Date: Wed Jul 8 01:41:41 2009 New Revision: 195431 URL: http://svn.freebsd.org/changeset/base/195431 Log: MFC r194932 Lock around access to nc_file and netconfig_info ("ni"). The RPC part of libc is still not thread safe but this would at least reduce the problems we have. PR: threads/118544 Submitted by: Changming Sun Modified: stable/7/lib/libc/ (props changed) stable/7/lib/libc/rpc/getnetconfig.c Modified: stable/7/lib/libc/rpc/getnetconfig.c ============================================================================== --- stable/7/lib/libc/rpc/getnetconfig.c Wed Jul 8 01:09:12 2009 (r195430) +++ stable/7/lib/libc/rpc/getnetconfig.c Wed Jul 8 01:41:41 2009 (r195431) @@ -130,7 +130,11 @@ static struct netconfig *dup_ncp(struct static FILE *nc_file; /* for netconfig db */ +static pthread_mutex_t nc_file_lock = PTHREAD_MUTEX_INITIALIZER; + static struct netconfig_info ni = { 0, 0, NULL, NULL}; +static pthread_mutex_t ni_lock = PTHREAD_MUTEX_INITIALIZER; + #define MAXNETCONFIGLINE 1000 @@ -204,14 +208,24 @@ setnetconfig() * For multiple calls, i.e. nc_file is not NULL, we just return the * handle without reopening the netconfig db. */ + mutex_lock(&ni_lock); ni.ref++; + mutex_unlock(&ni_lock); + + mutex_lock(&nc_file_lock); if ((nc_file != NULL) || (nc_file = fopen(NETCONFIG, "r")) != NULL) { nc_vars->valid = NC_VALID; nc_vars->flag = 0; nc_vars->nc_configs = ni.head; + mutex_unlock(&nc_file_lock); return ((void *)nc_vars); } + mutex_unlock(&nc_file_lock); + + mutex_lock(&ni_lock); ni.ref--; + mutex_unlock(&ni_lock); + nc_error = NC_NONETCONFIG; free(nc_vars); return (NULL); @@ -234,14 +248,18 @@ void *handlep; char *stringp; /* tmp string pointer */ struct netconfig_list *list; struct netconfig *np; + struct netconfig *result; /* * Verify that handle is valid */ + mutex_lock(&nc_file_lock); if (ncp == NULL || nc_file == NULL) { nc_error = NC_NOTINIT; + mutex_unlock(&nc_file_lock); return (NULL); } + mutex_unlock(&nc_file_lock); switch (ncp->valid) { case NC_VALID: @@ -255,7 +273,9 @@ void *handlep; */ if (ncp->flag == 0) { /* first time */ ncp->flag = 1; + mutex_lock(&ni_lock); ncp->nc_configs = ni.head; + mutex_unlock(&ni_lock); if (ncp->nc_configs != NULL) /* entry already exist */ return(ncp->nc_configs->ncp); } @@ -268,7 +288,13 @@ void *handlep; * If we cannot find the entry in the list and is end of file, * we give up. */ - if (ni.eof == 1) return(NULL); + mutex_lock(&ni_lock); + if (ni.eof == 1) { + mutex_unlock(&ni_lock); + return(NULL); + } + mutex_unlock(&ni_lock); + break; default: nc_error = NC_NOTINIT; @@ -289,13 +315,18 @@ void *handlep; /* * Read a line from netconfig file. */ + mutex_lock(&nc_file_lock); do { if (fgets(stringp, MAXNETCONFIGLINE, nc_file) == NULL) { free(stringp); + mutex_lock(&ni_lock); ni.eof = 1; + mutex_unlock(&ni_lock); + mutex_unlock(&nc_file_lock); return (NULL); } } while (*stringp == '#'); + mutex_unlock(&nc_file_lock); list = (struct netconfig_list *) malloc(sizeof (struct netconfig_list)); if (list == NULL) { @@ -325,6 +356,7 @@ void *handlep; * Reposition the current pointer of the handle to the last entry * in the list. */ + mutex_lock(&ni_lock); if (ni.head == NULL) { /* first entry */ ni.head = ni.tail = list; } @@ -333,7 +365,9 @@ void *handlep; ni.tail = ni.tail->next; } ncp->nc_configs = ni.tail; - return(ni.tail->ncp); + result = ni.tail->ncp; + mutex_unlock(&ni_lock); + return(result); } } @@ -367,7 +401,9 @@ void *handlep; nc_handlep->valid = NC_INVALID; nc_handlep->flag = 0; nc_handlep->nc_configs = NULL; + mutex_lock(&ni_lock); if (--ni.ref > 0) { + mutex_unlock(&ni_lock); free(nc_handlep); return(0); } @@ -380,6 +416,8 @@ void *handlep; ni.eof = ni.ref = 0; ni.head = NULL; ni.tail = NULL; + mutex_unlock(&ni_lock); + while (q) { p = q->next; if (q->ncp->nc_lookups != NULL) free(q->ncp->nc_lookups); @@ -390,8 +428,11 @@ void *handlep; } free(nc_handlep); + mutex_lock(&nc_file_lock); fclose(nc_file); nc_file = NULL; + mutex_unlock(&nc_file_lock); + return (0); } @@ -439,15 +480,20 @@ getnetconfigent(netid) * If all the netconfig db has been read and placed into the list and * there is no match for the netid, return NULL. */ + mutex_lock(&ni_lock); if (ni.head != NULL) { for (list = ni.head; list; list = list->next) { if (strcmp(list->ncp->nc_netid, netid) == 0) { + mutex_unlock(&ni_lock); return(dup_ncp(list->ncp)); } } - if (ni.eof == 1) /* that's all the entries */ + if (ni.eof == 1) { /* that's all the entries */ + mutex_unlock(&ni_lock); return(NULL); + } } + mutex_unlock(&ni_lock); if ((file = fopen(NETCONFIG, "r")) == NULL) { From owner-svn-src-stable@FreeBSD.ORG Wed Jul 8 01:43:47 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B644C1065673; Wed, 8 Jul 2009 01:43:47 +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 A35038FC1C; Wed, 8 Jul 2009 01:43:47 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n681hlKb034675; Wed, 8 Jul 2009 01:43:47 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n681hl1M034673; Wed, 8 Jul 2009 01:43:47 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <200907080143.n681hl1M034673@svn.freebsd.org> From: Xin LI Date: Wed, 8 Jul 2009 01:43:47 +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: r195432 - in stable/6/lib/libc: . rpc X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2009 01:43:48 -0000 Author: delphij Date: Wed Jul 8 01:43:47 2009 New Revision: 195432 URL: http://svn.freebsd.org/changeset/base/195432 Log: MFC r194932 Lock around access to nc_file and netconfig_info ("ni"). The RPC part of libc is still not thread safe but this would at least reduce the problems we have. PR: threads/118544 Submitted by: Changming Sun Modified: stable/6/lib/libc/ (props changed) stable/6/lib/libc/rpc/getnetconfig.c Modified: stable/6/lib/libc/rpc/getnetconfig.c ============================================================================== --- stable/6/lib/libc/rpc/getnetconfig.c Wed Jul 8 01:41:41 2009 (r195431) +++ stable/6/lib/libc/rpc/getnetconfig.c Wed Jul 8 01:43:47 2009 (r195432) @@ -130,7 +130,11 @@ static struct netconfig *dup_ncp(struct static FILE *nc_file; /* for netconfig db */ +static pthread_mutex_t nc_file_lock = PTHREAD_MUTEX_INITIALIZER; + static struct netconfig_info ni = { 0, 0, NULL, NULL}; +static pthread_mutex_t ni_lock = PTHREAD_MUTEX_INITIALIZER; + #define MAXNETCONFIGLINE 1000 @@ -204,14 +208,24 @@ setnetconfig() * For multiple calls, i.e. nc_file is not NULL, we just return the * handle without reopening the netconfig db. */ + mutex_lock(&ni_lock); ni.ref++; + mutex_unlock(&ni_lock); + + mutex_lock(&nc_file_lock); if ((nc_file != NULL) || (nc_file = fopen(NETCONFIG, "r")) != NULL) { nc_vars->valid = NC_VALID; nc_vars->flag = 0; nc_vars->nc_configs = ni.head; + mutex_unlock(&nc_file_lock); return ((void *)nc_vars); } + mutex_unlock(&nc_file_lock); + + mutex_lock(&ni_lock); ni.ref--; + mutex_unlock(&ni_lock); + nc_error = NC_NONETCONFIG; free(nc_vars); return (NULL); @@ -234,14 +248,18 @@ void *handlep; char *stringp; /* tmp string pointer */ struct netconfig_list *list; struct netconfig *np; + struct netconfig *result; /* * Verify that handle is valid */ + mutex_lock(&nc_file_lock); if (ncp == NULL || nc_file == NULL) { nc_error = NC_NOTINIT; + mutex_unlock(&nc_file_lock); return (NULL); } + mutex_unlock(&nc_file_lock); switch (ncp->valid) { case NC_VALID: @@ -255,7 +273,9 @@ void *handlep; */ if (ncp->flag == 0) { /* first time */ ncp->flag = 1; + mutex_lock(&ni_lock); ncp->nc_configs = ni.head; + mutex_unlock(&ni_lock); if (ncp->nc_configs != NULL) /* entry already exist */ return(ncp->nc_configs->ncp); } @@ -268,7 +288,13 @@ void *handlep; * If we cannot find the entry in the list and is end of file, * we give up. */ - if (ni.eof == 1) return(NULL); + mutex_lock(&ni_lock); + if (ni.eof == 1) { + mutex_unlock(&ni_lock); + return(NULL); + } + mutex_unlock(&ni_lock); + break; default: nc_error = NC_NOTINIT; @@ -289,13 +315,18 @@ void *handlep; /* * Read a line from netconfig file. */ + mutex_lock(&nc_file_lock); do { if (fgets(stringp, MAXNETCONFIGLINE, nc_file) == NULL) { free(stringp); + mutex_lock(&ni_lock); ni.eof = 1; + mutex_unlock(&ni_lock); + mutex_unlock(&nc_file_lock); return (NULL); } } while (*stringp == '#'); + mutex_unlock(&nc_file_lock); list = (struct netconfig_list *) malloc(sizeof (struct netconfig_list)); if (list == NULL) { @@ -325,6 +356,7 @@ void *handlep; * Reposition the current pointer of the handle to the last entry * in the list. */ + mutex_lock(&ni_lock); if (ni.head == NULL) { /* first entry */ ni.head = ni.tail = list; } @@ -333,7 +365,9 @@ void *handlep; ni.tail = ni.tail->next; } ncp->nc_configs = ni.tail; - return(ni.tail->ncp); + result = ni.tail->ncp; + mutex_unlock(&ni_lock); + return(result); } } @@ -367,7 +401,9 @@ void *handlep; nc_handlep->valid = NC_INVALID; nc_handlep->flag = 0; nc_handlep->nc_configs = NULL; + mutex_lock(&ni_lock); if (--ni.ref > 0) { + mutex_unlock(&ni_lock); free(nc_handlep); return(0); } @@ -380,6 +416,8 @@ void *handlep; ni.eof = ni.ref = 0; ni.head = NULL; ni.tail = NULL; + mutex_unlock(&ni_lock); + while (q) { p = q->next; if (q->ncp->nc_lookups != NULL) free(q->ncp->nc_lookups); @@ -390,8 +428,11 @@ void *handlep; } free(nc_handlep); + mutex_lock(&nc_file_lock); fclose(nc_file); nc_file = NULL; + mutex_unlock(&nc_file_lock); + return (0); } @@ -439,15 +480,20 @@ getnetconfigent(netid) * If all the netconfig db has been read and placed into the list and * there is no match for the netid, return NULL. */ + mutex_lock(&ni_lock); if (ni.head != NULL) { for (list = ni.head; list; list = list->next) { if (strcmp(list->ncp->nc_netid, netid) == 0) { + mutex_unlock(&ni_lock); return(dup_ncp(list->ncp)); } } - if (ni.eof == 1) /* that's all the entries */ + if (ni.eof == 1) { /* that's all the entries */ + mutex_unlock(&ni_lock); return(NULL); + } } + mutex_unlock(&ni_lock); if ((file = fopen(NETCONFIG, "r")) == NULL) { From owner-svn-src-stable@FreeBSD.ORG Wed Jul 8 07:29:32 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D219106566C; Wed, 8 Jul 2009 07:29:32 +0000 (UTC) (envelope-from makc@issp.ac.ru) Received: from mail.issp.ac.ru (mail.issp.ac.ru [77.236.34.3]) by mx1.freebsd.org (Postfix) with ESMTP id CE1528FC12; Wed, 8 Jul 2009 07:29:30 +0000 (UTC) (envelope-from makc@issp.ac.ru) Received: from lqc.issp.ac.ru [77.236.34.156:49350] (HELO/EHLO lqc.issp.ac.ru, authenticated with PLAIN) by mail.issp.ac.ru with ESMTP/inet id n6875dQp055842 (using TLSv1/SSLv3, with cipher DHE-RSA-AES256-SHA (256 bits), verified NO) Wed, 8 Jul 2009 11:05:39 +0400 (MSD) From: Max Brazhnikov Organization: ISSP RAS To: svn-src-stable-7@freebsd.org Date: Wed, 8 Jul 2009 11:04:28 +0400 User-Agent: KMail/1.11.4 (FreeBSD/7.2-STABLE; KDE/4.2.4; i386; ; ) References: <200906301710.n5UHA8b0086710@svn.freebsd.org> In-Reply-To: <200906301710.n5UHA8b0086710@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907081104.29163.makc@issp.ac.ru> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-3.0 (mail.issp.ac.ru [77.236.34.3]); Wed, 08 Jul 2009 11:05:39 +0400 (MSD) X-Virus-Scanned: ClamAV 0.94.1/9541/Tue Jul 7 21:31:53 2009 on mail.issp.ac.ru X-Virus-Status: Clean Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Andriy Gapon Subject: Re: svn commit: r195197 - in stable/7/sys: . amd64/amd64 amd64/include contrib/pf dev/coretemp dev/hwpmc i386/cpufreq i386/i386 i386/include X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2009 07:29:33 -0000 On Tue, 30 Jun 2009 17:10:08 +0000 (UTC)Tue Jun 30 17:10:08 2009, Andriy Gapon wrote: > Author: avg > Date: Tue Jun 30 17:10:08 2009 > New Revision: 195197 > URL: http://svn.freebsd.org/changeset/base/195197 > > Log: > MFC 185295, 185341, 185343: cpu identification improvements > > Goal of this MFC is to minimize unnecessary code differences between > head and the branch, and to improve/fix invariant TSC detection for > a wide range of CPUs. > > 185295 by takawata: Honor AMDPM_TSC_INVARIANT for Intel CPUs (i386 only) > 185341 by jkim: Introduce cpu_vendor_id... > 185343 by jkim: Use newly introduced cpu_vendor_id... > > These revision are bundled together because all intermediate revisions > have one or more of the following deficiencies: > o AMDPM_TSC_INVARIANT bit (CPUID.0x80000007.EDX[8]) is not honored for > Intel CPUs; > o AMD-specific CPU model/revision checks are performed on Intel CPUs. > > Nod from: jkim > > Modified: > stable/7/sys/ (props changed) > stable/7/sys/amd64/amd64/amd64_mem.c > stable/7/sys/amd64/amd64/identcpu.c > stable/7/sys/amd64/amd64/initcpu.c > stable/7/sys/amd64/amd64/local_apic.c > stable/7/sys/amd64/amd64/mp_machdep.c > stable/7/sys/amd64/amd64/msi.c > stable/7/sys/amd64/include/cputypes.h > stable/7/sys/amd64/include/md_var.h > stable/7/sys/amd64/include/specialreg.h > stable/7/sys/contrib/pf/ (props changed) > stable/7/sys/dev/coretemp/coretemp.c > stable/7/sys/dev/hwpmc/hwpmc_intel.c > stable/7/sys/dev/hwpmc/hwpmc_piv.c > stable/7/sys/dev/hwpmc/hwpmc_ppro.c > stable/7/sys/dev/hwpmc/hwpmc_x86.c > stable/7/sys/i386/cpufreq/est.c > stable/7/sys/i386/i386/i686_mem.c > stable/7/sys/i386/i386/identcpu.c > stable/7/sys/i386/i386/initcpu.c > stable/7/sys/i386/i386/k6_mem.c > stable/7/sys/i386/i386/local_apic.c > stable/7/sys/i386/i386/longrun.c > stable/7/sys/i386/i386/mp_machdep.c > stable/7/sys/i386/i386/msi.c > stable/7/sys/i386/include/cputypes.h > stable/7/sys/i386/include/md_var.h > stable/7/sys/i386/include/specialreg.h > > Modified: stable/7/sys/amd64/amd64/amd64_mem.c > =========================================================================== >=== --- stable/7/sys/amd64/amd64/amd64_mem.c Tue Jun 30 15:23:16 > 2009 (r195196) +++ stable/7/sys/amd64/amd64/amd64_mem.c Tue Jun 30 17:10:08 > 2009 (r195197) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > > +#include > #include > #include > > @@ -677,8 +678,8 @@ amd64_mem_drvinit(void *unused) > return; > if ((cpu_id & 0xf00) != 0x600 && (cpu_id & 0xf00) != 0xf00) > return; > - if ((strcmp(cpu_vendor, "GenuineIntel") != 0) && > - (strcmp(cpu_vendor, "AuthenticAMD") != 0)) > + if (cpu_vendor_id != CPU_VENDOR_INTEL && > + cpu_vendor_id != CPU_VENDOR_AMD) > return; > mem_range_softc.mr_op = &amd64_mrops; > } > > Modified: stable/7/sys/amd64/amd64/identcpu.c > =========================================================================== >=== --- stable/7/sys/amd64/amd64/identcpu.c Tue Jun 30 15:23:16 > 2009 (r195196) +++ stable/7/sys/amd64/amd64/identcpu.c Tue Jun 30 17:10:08 > 2009 (r195197) @@ -69,6 +69,7 @@ void identify_cpu(void); > void earlysetcpuclass(void); > void panicifcpuunsupported(void); > > +static u_int find_cpu_vendor_id(void); > static void print_AMD_info(void); > static void print_AMD_assoc(int i); > > @@ -95,6 +96,14 @@ static struct { > { "Sledgehammer", CPUCLASS_K8 }, /* CPU_SLEDGEHAMMER */ > }; > > +static struct { > + char *vendor; > + u_int vendor_id; > +} cpu_vendors[] = { > + { INTEL_VENDOR_ID, CPU_VENDOR_INTEL }, /* GenuineIntel */ > + { AMD_VENDOR_ID, CPU_VENDOR_AMD }, /* AuthenticAMD */ > +}; > + > void > printcpuinfo(void) > { > @@ -115,10 +124,10 @@ printcpuinfo(void) > } > } > > - if (strcmp(cpu_vendor, "GenuineIntel") == 0) { > + if (cpu_vendor_id == CPU_VENDOR_INTEL) { > /* Please make up your mind folks! */ > strcat(cpu_model, "EM64T"); > - } else if (strcmp(cpu_vendor, "AuthenticAMD") == 0) { > + } else if (cpu_vendor_id == CPU_VENDOR_AMD) { > /* > * Values taken from AMD Processor Recognition > * http://www.amd.com/K6/k6docs/pdf/20734g.pdf > @@ -158,13 +167,13 @@ printcpuinfo(void) > printf("Unknown"); /* will panic below... */ > } > printf("-class CPU)\n"); > - if(*cpu_vendor) > - printf(" Origin = \"%s\"",cpu_vendor); > - if(cpu_id) > + if (*cpu_vendor) > + printf(" Origin = \"%s\"", cpu_vendor); > + if (cpu_id) > printf(" Id = 0x%x", cpu_id); > > - if (strcmp(cpu_vendor, "GenuineIntel") == 0 || > - strcmp(cpu_vendor, "AuthenticAMD") == 0) { > + if (cpu_vendor_id == CPU_VENDOR_INTEL || > + cpu_vendor_id == CPU_VENDOR_AMD) { > printf(" Stepping = %u", cpu_id & 0xf); > if (cpu_high > 0) { > u_int cmp = 1, htt = 1; > @@ -336,22 +345,28 @@ printcpuinfo(void) > ); > } > > - if (cpu_feature & CPUID_HTT && strcmp(cpu_vendor, > - "AuthenticAMD") == 0) > + if ((cpu_feature & CPUID_HTT) && > + cpu_vendor_id == CPU_VENDOR_AMD) > cpu_feature &= ~CPUID_HTT; > > /* > * If this CPU supports P-state invariant TSC then > * mention the capability. > */ > - if (!tsc_is_invariant && > - (strcmp(cpu_vendor, "AuthenticAMD") == 0 && > - ((amd_pminfo & AMDPM_TSC_INVARIANT) != 0 || > - AMD64_CPU_FAMILY(cpu_id) >= 0x10 || > - cpu_id == 0x60fb2))) { > - tsc_is_invariant = 1; > - printf("\n TSC: P-state invariant"); > + switch (cpu_vendor_id) { > + case CPU_VENDOR_AMD: > + if ((amd_pminfo & AMDPM_TSC_INVARIANT) || > + AMD64_CPU_FAMILY(cpu_id) >= 0x10 || > + cpu_id == 0x60fb2) > + tsc_is_invariant = 1; > + break; > + case CPU_VENDOR_INTEL: > + if (amd_pminfo & AMDPM_TSC_INVARIANT) > + tsc_is_invariant = 1; > + break; > } > + if (tsc_is_invariant) > + printf("\n TSC: P-state invariant"); > > /* > * If this CPU supports HTT or CMP then mention the > @@ -359,10 +374,10 @@ printcpuinfo(void) > */ > if (cpu_feature & CPUID_HTT) > htt = (cpu_procinfo & CPUID_HTT_CORES) >> 16; > - if (strcmp(cpu_vendor, "AuthenticAMD") == 0 && > + if (cpu_vendor_id == CPU_VENDOR_AMD && > (amd_feature2 & AMDID2_CMP)) > cmp = (cpu_procinfo2 & AMDID_CMP_CORES) + 1; > - else if (strcmp(cpu_vendor, "GenuineIntel") == 0 && > + else if (cpu_vendor_id == CPU_VENDOR_INTEL && > (cpu_high >= 4)) { > cpuid_count(4, 0, regs); > if ((regs[0] & 0x1f) != 0) > @@ -382,7 +397,7 @@ printcpuinfo(void) > if (!bootverbose) > return; > > - if (strcmp(cpu_vendor, "AuthenticAMD") == 0) > + if (cpu_vendor_id == CPU_VENDOR_AMD) > print_AMD_info(); > } > > @@ -441,6 +456,7 @@ identify_cpu(void) > ((u_int *)&cpu_vendor)[1] = regs[3]; > ((u_int *)&cpu_vendor)[2] = regs[2]; > cpu_vendor[12] = '\0'; > + cpu_vendor_id = find_cpu_vendor_id(); > > do_cpuid(1, regs); > cpu_id = regs[0]; > @@ -448,8 +464,8 @@ identify_cpu(void) > cpu_feature = regs[3]; > cpu_feature2 = regs[2]; > > - if (strcmp(cpu_vendor, "GenuineIntel") == 0 || > - strcmp(cpu_vendor, "AuthenticAMD") == 0) { > + if (cpu_vendor_id == CPU_VENDOR_INTEL || > + cpu_vendor_id == CPU_VENDOR_AMD) { > do_cpuid(0x80000000, regs); > cpu_exthigh = regs[0]; > } > @@ -471,6 +487,17 @@ identify_cpu(void) > cpu = CPU_CLAWHAMMER; > } > > +static u_int > +find_cpu_vendor_id(void) > +{ > + int i; > + > + for (i = 0; i < sizeof(cpu_vendors) / sizeof(cpu_vendors[0]); i++) > + if (strcmp(cpu_vendor, cpu_vendors[i].vendor) == 0) > + return (cpu_vendors[i].vendor_id); > + return (0); > +} > + > static void > print_AMD_assoc(int i) > { > > Modified: stable/7/sys/amd64/amd64/initcpu.c > =========================================================================== >=== --- stable/7/sys/amd64/amd64/initcpu.c Tue Jun 30 15:23:16 > 2009 (r195196) +++ stable/7/sys/amd64/amd64/initcpu.c Tue Jun 30 17:10:08 > 2009 (r195197) @@ -60,6 +60,7 @@ u_int cpu_id; /* Stepping ID */ > u_int cpu_procinfo; /* HyperThreading Info / Brand Index / CLFUSH */ > u_int cpu_procinfo2; /* Multicore info */ > char cpu_vendor[20]; /* CPU Origin code */ > +u_int cpu_vendor_id; /* CPU vendor ID */ > u_int cpu_fxsr; /* SSE enabled */ > u_int cpu_mxcsr_mask; /* Valid bits in mxcsr */ > > > Modified: stable/7/sys/amd64/amd64/local_apic.c > =========================================================================== >=== --- stable/7/sys/amd64/amd64/local_apic.c Tue Jun 30 15:23:16 > 2009 (r195196) +++ stable/7/sys/amd64/amd64/local_apic.c Tue Jun 30 > 17:10:08 2009 (r195197) @@ -323,7 +323,7 @@ lapic_setup(int boot) > > /* XXX: Error and thermal LVTs */ > > - if (strcmp(cpu_vendor, "AuthenticAMD") == 0) { > + if (cpu_vendor_id == CPU_VENDOR_AMD) { > /* > * Detect the presence of C1E capability mostly on latest > * dual-cores (or future) k8 family. This feature renders > > Modified: stable/7/sys/amd64/amd64/mp_machdep.c > =========================================================================== >=== --- stable/7/sys/amd64/amd64/mp_machdep.c Tue Jun 30 15:23:16 > 2009 (r195196) +++ stable/7/sys/amd64/amd64/mp_machdep.c Tue Jun 30 > 17:10:08 2009 (r195197) @@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$"); > #include > > #include > +#include > #include > #include > #include > @@ -376,8 +377,7 @@ cpu_mp_start(void) > * First determine if this is an Intel processor which claims > * to have hyperthreading support. > */ > - if ((cpu_feature & CPUID_HTT) && > - (strcmp(cpu_vendor, "GenuineIntel") == 0)) { > + if ((cpu_feature & CPUID_HTT) && cpu_vendor_id == CPU_VENDOR_INTEL) { > /* > * If the "deterministic cache parameters" cpuid calls > * are available, use them. > > Modified: stable/7/sys/amd64/amd64/msi.c > =========================================================================== >=== --- stable/7/sys/amd64/amd64/msi.c Tue Jun 30 15:23:16 2009 (r195196) > +++ stable/7/sys/amd64/amd64/msi.c Tue Jun 30 17:10:08 2009 (r195197) @@ > -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > #include > #include > @@ -211,8 +212,8 @@ msi_init(void) > { > > /* Check if we have a supported CPU. */ > - if (!(strcmp(cpu_vendor, "GenuineIntel") == 0 || > - strcmp(cpu_vendor, "AuthenticAMD") == 0)) > + if (!(cpu_vendor_id == CPU_VENDOR_INTEL || > + cpu_vendor_id == CPU_VENDOR_AMD)) > return; > > msi_enabled = 1; > > Modified: stable/7/sys/amd64/include/cputypes.h > =========================================================================== >=== --- stable/7/sys/amd64/include/cputypes.h Tue Jun 30 15:23:16 > 2009 (r195196) +++ stable/7/sys/amd64/include/cputypes.h Tue Jun 30 > 17:10:08 2009 (r195197) @@ -33,15 +33,21 @@ > /* > * Classes of processor. > */ > -#define CPUCLASS_X86 0 /* X86 */ > -#define CPUCLASS_K8 1 /* K8 AMD64 class */ > +#define CPUCLASS_X86 0 /* X86 */ > +#define CPUCLASS_K8 1 /* K8 AMD64 class */ > > /* > * Kinds of processor. > */ > -#define CPU_X86 0 /* Intel */ > -#define CPU_CLAWHAMMER 1 /* AMD Clawhammer */ > -#define CPU_SLEDGEHAMMER 2 /* AMD Sledgehammer */ > +#define CPU_X86 0 /* Intel */ > +#define CPU_CLAWHAMMER 1 /* AMD Clawhammer */ > +#define CPU_SLEDGEHAMMER 2 /* AMD Sledgehammer */ > + > +/* > + * Vendors of processor. > + */ > +#define CPU_VENDOR_AMD 0x1022 /* AMD */ > +#define CPU_VENDOR_INTEL 0x8086 /* Intel */ > > #ifndef LOCORE > extern int cpu; > > Modified: stable/7/sys/amd64/include/md_var.h > =========================================================================== >=== --- stable/7/sys/amd64/include/md_var.h Tue Jun 30 15:23:16 > 2009 (r195196) +++ stable/7/sys/amd64/include/md_var.h Tue Jun 30 17:10:08 > 2009 (r195197) @@ -52,6 +52,7 @@ extern u_int cpu_mxcsr_mask; > extern u_int cpu_procinfo; > extern u_int cpu_procinfo2; > extern char cpu_vendor[]; > +extern u_int cpu_vendor_id; > extern char kstack[]; > extern char sigcode[]; > extern int szsigcode; > > Modified: stable/7/sys/amd64/include/specialreg.h > =========================================================================== >=== --- stable/7/sys/amd64/include/specialreg.h Tue Jun 30 15:23:16 > 2009 (r195196) +++ stable/7/sys/amd64/include/specialreg.h Tue Jun 30 > 17:10:08 2009 (r195197) @@ -204,8 +204,8 @@ > /* > * CPUID manufacturers identifiers > */ > -#define INTEL_VENDOR_ID "GenuineIntel" > -#define AMD_VENDOR_ID "AuthenticAMD" > +#define AMD_VENDOR_ID "AuthenticAMD" > +#define INTEL_VENDOR_ID "GenuineIntel" > > /* > * Model-specific registers for the i386 family > > Modified: stable/7/sys/dev/coretemp/coretemp.c > =========================================================================== >=== --- stable/7/sys/dev/coretemp/coretemp.c Tue Jun 30 15:23:16 > 2009 (r195196) +++ stable/7/sys/dev/coretemp/coretemp.c Tue Jun 30 17:10:08 > 2009 (r195197) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); > > #include > #include > +#include > #include > > struct coretemp_softc { > @@ -94,7 +95,7 @@ coretemp_identify(driver_t *driver, devi > return; > > /* Check that CPUID 0x06 is supported and the vendor is Intel.*/ > - if (cpu_high < 6 || strcmp(cpu_vendor, "GenuineIntel")) > + if (cpu_high < 6 || cpu_vendor_id != CPU_VENDOR_INTEL) > return; > /* > * CPUID 0x06 returns 1 if the processor has on-die thermal > > Modified: stable/7/sys/dev/hwpmc/hwpmc_intel.c > =========================================================================== >=== --- stable/7/sys/dev/hwpmc/hwpmc_intel.c Tue Jun 30 15:23:16 > 2009 (r195196) +++ stable/7/sys/dev/hwpmc/hwpmc_intel.c Tue Jun 30 17:10:08 > 2009 (r195197) @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); > #include > > #include > +#include > #include > #include > > @@ -79,7 +80,7 @@ pmc_intel_initialize(void) > enum pmc_cputype cputype; > int error, model, nclasses, ncpus; > > - KASSERT(strcmp(cpu_vendor, "GenuineIntel") == 0, > + KASSERT(cpu_vendor_id == CPU_VENDOR_INTEL, > ("[intel,%d] Initializing non-intel processor", __LINE__)); > > PMCDBG(MDP,INI,0, "intel-initialize cpuid=0x%x", cpu_id); > > Modified: stable/7/sys/dev/hwpmc/hwpmc_piv.c > =========================================================================== >=== --- stable/7/sys/dev/hwpmc/hwpmc_piv.c Tue Jun 30 15:23:16 > 2009 (r195196) +++ stable/7/sys/dev/hwpmc/hwpmc_piv.c Tue Jun 30 17:10:08 > 2009 (r195197) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); > > #include > #include > +#include > #include > #include > > @@ -1610,7 +1611,7 @@ pmc_p4_initialize(struct pmc_mdep *md, i > struct p4_event_descr *pe; > > KASSERT(md != NULL, ("[p4,%d] md is NULL", __LINE__)); > - KASSERT(strcmp(cpu_vendor, "GenuineIntel") == 0, > + KASSERT(cpu_vendor_id == CPU_VENDOR_INTEL, > ("[p4,%d] Initializing non-intel processor", __LINE__)); > > PMCDBG(MDP,INI,1, "%s", "p4-initialize"); > > Modified: stable/7/sys/dev/hwpmc/hwpmc_ppro.c > =========================================================================== >=== --- stable/7/sys/dev/hwpmc/hwpmc_ppro.c Tue Jun 30 15:23:16 > 2009 (r195196) +++ stable/7/sys/dev/hwpmc/hwpmc_ppro.c Tue Jun 30 17:10:08 > 2009 (r195197) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); > > #include > #include > +#include > #include > #include > #include > @@ -781,7 +782,7 @@ pmc_p6_initialize(struct pmc_mdep *md, i > { > struct pmc_classdep *pcd; > > - KASSERT(strcmp(cpu_vendor, "GenuineIntel") == 0, > + KASSERT(cpu_vendor_id == CPU_VENDOR_INTEL, > ("[p6,%d] Initializing non-intel processor", __LINE__)); > > PMCDBG(MDP,INI,1, "%s", "p6-initialize"); > > Modified: stable/7/sys/dev/hwpmc/hwpmc_x86.c > =========================================================================== >=== --- stable/7/sys/dev/hwpmc/hwpmc_x86.c Tue Jun 30 15:23:16 > 2009 (r195196) +++ stable/7/sys/dev/hwpmc/hwpmc_x86.c Tue Jun 30 17:10:08 > 2009 (r195197) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); > #include > > #include > +#include > #include > #include > #include > @@ -252,9 +253,9 @@ pmc_md_initialize() > > /* determine the CPU kind */ > md = NULL; > - if (strcmp(cpu_vendor, "AuthenticAMD") == 0) > + if (cpu_vendor_id == CPU_VENDOR_AMD) > md = pmc_amd_initialize(); > - else if (strcmp(cpu_vendor, "GenuineIntel") == 0) > + else if (cpu_vendor_id == CPU_VENDOR_INTEL) > md = pmc_intel_initialize(); > else > KASSERT(0, ("[x86,%d] Unknown vendor", __LINE__)); > @@ -270,9 +271,9 @@ pmc_md_initialize() > void > pmc_md_finalize(struct pmc_mdep *md) > { > - if (strcmp(cpu_vendor, "AuthenticAMD") == 0) > + if (cpu_vendor_id == CPU_VENDOR_AMD) > pmc_amd_finalize(md); > - else if (strcmp(cpu_vendor, "GenuineIntel") == 0) > + else if (cpu_vendor_id == CPU_VENDOR_INTEL) > pmc_intel_finalize(md); > else > KASSERT(0, ("[x86,%d] Unknown vendor", __LINE__)); > > Modified: stable/7/sys/i386/cpufreq/est.c > =========================================================================== >=== --- stable/7/sys/i386/cpufreq/est.c Tue Jun 30 15:23:16 2009 (r195196) > +++ stable/7/sys/i386/cpufreq/est.c Tue Jun 30 17:10:08 2009 (r195197) @@ > -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); > > #include "cpufreq_if.h" > #include > +#include > #include > #include > > @@ -54,6 +55,10 @@ __FBSDID("$FreeBSD$"); > #define MSR_MISC_ENABLE 0x1a0 > #define MSR_SS_ENABLE (1<<16) > > +#ifndef CPU_VENDOR_CENTAUR > +#define CPU_VENDOR_CENTAUR 0x111d > +#endif > + > /* Frequency and MSR control values. */ > typedef struct { > uint16_t freq; > @@ -64,7 +69,7 @@ typedef struct { > > /* Identifying characteristics of a processor and supported frequencies. > */ typedef struct { > - const char *vendor; > + const u_int vendor_id; > uint32_t id32; > freq_info *freqtab; > } cpu_info; > @@ -88,12 +93,10 @@ struct est_softc { > #define FREQ_INFO(MHz, mV, bus_clk) \ > FREQ_INFO_PWR(MHz, mV, bus_clk, CPUFREQ_VAL_UNKNOWN) > #define INTEL(tab, zhi, vhi, zlo, vlo, bus_clk) \ > - { intel_id, ID32(zhi, vhi, zlo, vlo, bus_clk), tab } > + { CPU_VENDOR_INTEL, ID32(zhi, vhi, zlo, vlo, bus_clk), tab } > #define CENTAUR(tab, zhi, vhi, zlo, vlo, bus_clk) \ > - { centaur_id, ID32(zhi, vhi, zlo, vlo, bus_clk), tab } > + { CPU_VENDOR_CENTAUR, ID32(zhi, vhi, zlo, vlo, bus_clk), tab } > > -const char intel_id[] = "GenuineIntel"; > -const char centaur_id[] = "CentaurHauls"; > static int msr_info_enabled = 0; > TUNABLE_INT("hw.est.msr_info", &msr_info_enabled); > > @@ -891,7 +894,7 @@ static cpu_info ESTprocs[] = { > CENTAUR(C7M_772_ULV, 1200, 844, 400, 796, 100), > CENTAUR(C7M_779_ULV, 1000, 796, 400, 796, 100), > CENTAUR(C7M_770_ULV, 1000, 844, 400, 796, 100), > - { NULL, 0, NULL }, > + { 0, 0, NULL }, > }; > > static void est_identify(driver_t *driver, device_t parent); > @@ -958,8 +961,8 @@ est_identify(driver_t *driver, device_t > return; > > /* Check that CPUID is supported and the vendor is Intel.*/ > - if (cpu_high == 0 || (strcmp(cpu_vendor, intel_id) != 0 && > - strcmp(cpu_vendor, centaur_id) != 0)) > + if (cpu_high == 0 || (cpu_vendor_id != CPU_VENDOR_INTEL && > + cpu_vendor_id != CPU_VENDOR_CENTAUR)) > return; > > /* > @@ -1159,7 +1162,7 @@ est_table_info(device_t dev, uint64_t ms > /* Find a table which matches (vendor, id32). */ > id = msr >> 32; > for (p = ESTprocs; p->id32 != 0; p++) { > - if (strcmp(p->vendor, cpu_vendor) == 0 && p->id32 == id) > + if (p->vendor_id == cpu_vendor_id && p->id32 == id) > break; > } > if (p->id32 == 0) > > Modified: stable/7/sys/i386/i386/i686_mem.c > =========================================================================== >=== --- stable/7/sys/i386/i386/i686_mem.c Tue Jun 30 15:23:16 2009 (r195196) > +++ stable/7/sys/i386/i386/i686_mem.c Tue Jun 30 17:10:08 2009 (r195197) @@ > -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > > +#include > #include > #include > > @@ -677,8 +678,8 @@ i686_mem_drvinit(void *unused) > return; > if ((cpu_id & 0xf00) != 0x600 && (cpu_id & 0xf00) != 0xf00) > return; > - if ((strcmp(cpu_vendor, "GenuineIntel") != 0) && > - (strcmp(cpu_vendor, "AuthenticAMD") != 0)) > + if (cpu_vendor_id != CPU_VENDOR_INTEL && > + cpu_vendor_id != CPU_VENDOR_AMD) > return; > mem_range_softc.mr_op = &i686_mrops; > } > > Modified: stable/7/sys/i386/i386/identcpu.c > =========================================================================== >=== --- stable/7/sys/i386/i386/identcpu.c Tue Jun 30 15:23:16 2009 (r195196) > +++ stable/7/sys/i386/i386/identcpu.c Tue Jun 30 17:10:08 2009 (r195197) @@ > -77,6 +77,7 @@ void panicifcpuunsupported(void); > > static void identifycyrix(void); > static void init_exthigh(void); > +static u_int find_cpu_vendor_id(void); > static void print_AMD_info(void); > static void print_INTEL_info(void); > static void print_INTEL_TLB(u_int data); > @@ -138,6 +139,26 @@ static struct { > { "Pentium 4", CPUCLASS_686 }, /* CPU_P4 */ > }; > > +static struct { > + char *vendor; > + u_int vendor_id; > +} cpu_vendors[] = { > + { INTEL_VENDOR_ID, CPU_VENDOR_INTEL }, /* GenuineIntel */ > + { AMD_VENDOR_ID, CPU_VENDOR_AMD }, /* AuthenticAMD */ > + { CENTAUR_VENDOR_ID, CPU_VENDOR_CENTAUR }, /* CentaurHauls */ > + { NSC_VENDOR_ID, CPU_VENDOR_NSC }, /* Geode by NSC */ > + { CYRIX_VENDOR_ID, CPU_VENDOR_CYRIX }, /* CyrixInstead */ > + { TRANSMETA_VENDOR_ID, CPU_VENDOR_TRANSMETA }, /* GenuineTMx86 */ > + { SIS_VENDOR_ID, CPU_VENDOR_SIS }, /* SiS SiS SiS */ > + { UMC_VENDOR_ID, CPU_VENDOR_UMC }, /* UMC UMC UMC */ > + { NEXGEN_VENDOR_ID, CPU_VENDOR_NEXGEN }, /* NexGenDriven */ > + { RISE_VENDOR_ID, CPU_VENDOR_RISE }, /* RiseRiseRise */ > +#if 0 > + /* XXX CPUID 8000_0000h and 8086_0000h, not 0000_0000h */ > + { "TransmetaCPU", CPU_VENDOR_TRANSMETA }, > +#endif > +}; > + > #if defined(I586_CPU) && !defined(NO_F00F_HACK) > int has_f00f_bug = 0; /* Initialized so that it can be patched. */ > #endif > @@ -150,12 +171,11 @@ init_exthigh(void) > > if (done == 0) { > if (cpu_high > 0 && > - (strcmp(cpu_vendor, "GenuineIntel") == 0 || > - strcmp(cpu_vendor, "AuthenticAMD") == 0 || > - strcmp(cpu_vendor, "GenuineTMx86") == 0 || > - strcmp(cpu_vendor, "TransmetaCPU") == 0 || > - strcmp(cpu_vendor, "CentaurHauls") == 0 || > - strcmp(cpu_vendor, "Geode by NSC") == 0)) { > + (cpu_vendor_id == CPU_VENDOR_INTEL || > + cpu_vendor_id == CPU_VENDOR_AMD || > + cpu_vendor_id == CPU_VENDOR_TRANSMETA || > + cpu_vendor_id == CPU_VENDOR_CENTAUR || > + cpu_vendor_id == CPU_VENDOR_NSC)) { > do_cpuid(0x80000000, regs); > if (regs[0] >= 0x80000000) > cpu_exthigh = regs[0]; > @@ -186,7 +206,7 @@ printcpuinfo(void) > } > } > > - if (strcmp(cpu_vendor, "GenuineIntel") == 0) { > + if (cpu_vendor_id == CPU_VENDOR_INTEL) { > if ((cpu_id & 0xf00) > 0x300) { > u_int brand_index; > u_int model; > @@ -330,7 +350,7 @@ printcpuinfo(void) > cpu_brandtable[brand_index]); > } > } > - } else if (strcmp(cpu_vendor, "AuthenticAMD") == 0) { > + } else if (cpu_vendor_id == CPU_VENDOR_AMD) { > /* > * Values taken from AMD Processor Recognition > * http://www.amd.com/K6/k6docs/pdf/20734g.pdf > @@ -410,7 +430,7 @@ printcpuinfo(void) > enable_K6_wt_alloc(); > } > #endif > - } else if (strcmp(cpu_vendor, "CyrixInstead") == 0) { > + } else if (cpu_vendor_id == CPU_VENDOR_CYRIX) { > strcpy(cpu_model, "Cyrix "); > switch (cpu_id & 0xff0) { > case 0x440: > @@ -546,7 +566,7 @@ printcpuinfo(void) > } > break; > } > - } else if (strcmp(cpu_vendor, "RiseRiseRise") == 0) { > + } else if (cpu_vendor_id == CPU_VENDOR_RISE) { > strcpy(cpu_model, "Rise "); > switch (cpu_id & 0xff0) { > case 0x500: > @@ -555,7 +575,7 @@ printcpuinfo(void) > default: > strcat(cpu_model, "Unknown"); > } > - } else if (strcmp(cpu_vendor, "CentaurHauls") == 0) { > + } else if (cpu_vendor_id == CPU_VENDOR_CENTAUR) { > switch (cpu_id & 0xff0) { > case 0x540: > strcpy(cpu_model, "IDT WinChip C6"); > @@ -586,9 +606,9 @@ printcpuinfo(void) > default: > strcpy(cpu_model, "VIA/IDT Unknown"); > } > - } else if (strcmp(cpu_vendor, "IBM") == 0) { > + } else if (cpu_vendor_id == CPU_VENDOR_IBM) { > strcpy(cpu_model, "Blue Lightning CPU"); > - } else if (strcmp(cpu_vendor, "Geode by NSC") == 0) { > + } else if (cpu_vendor_id == CPU_VENDOR_NSC) { > switch (cpu_id & 0xfff) { > case 0x540: > strcpy(cpu_model, "Geode SC1100"); > @@ -652,17 +672,16 @@ printcpuinfo(void) > if(cpu_id) > printf(" Id = 0x%x", cpu_id); > > - if (strcmp(cpu_vendor, "GenuineIntel") == 0 || > - strcmp(cpu_vendor, "AuthenticAMD") == 0 || > - strcmp(cpu_vendor, "GenuineTMx86") == 0 || > - strcmp(cpu_vendor, "TransmetaCPU") == 0 || > - strcmp(cpu_vendor, "RiseRiseRise") == 0 || > - strcmp(cpu_vendor, "CentaurHauls") == 0 || > - strcmp(cpu_vendor, "Geode by NSC") == 0 || > - ((strcmp(cpu_vendor, "CyrixInstead") == 0) && > + if (cpu_vendor_id == CPU_VENDOR_INTEL || > + cpu_vendor_id == CPU_VENDOR_AMD || > + cpu_vendor_id == CPU_VENDOR_TRANSMETA || > + cpu_vendor_id == CPU_VENDOR_RISE || > + cpu_vendor_id == CPU_VENDOR_CENTAUR || > + cpu_vendor_id == CPU_VENDOR_NSC || > + (cpu_vendor_id == CPU_VENDOR_CYRIX && > ((cpu_id & 0xf00) > 0x500))) { > printf(" Stepping = %u", cpu_id & 0xf); > - if (strcmp(cpu_vendor, "CyrixInstead") == 0) > + if (cpu_vendor_id == CPU_VENDOR_CYRIX) > printf(" DIR=0x%04x", cyrix_did); > if (cpu_high > 0) { > u_int cmp = 1, htt = 1; > @@ -834,22 +853,28 @@ printcpuinfo(void) > ); > } > > - if (cpu_feature & CPUID_HTT && strcmp(cpu_vendor, > - "AuthenticAMD") == 0) > + if ((cpu_feature & CPUID_HTT) && > + cpu_vendor_id == CPU_VENDOR_AMD) > cpu_feature &= ~CPUID_HTT; > > /* > * If this CPU supports P-state invariant TSC then > * mention the capability. > */ > - if (!tsc_is_invariant && > - (strcmp(cpu_vendor, "AuthenticAMD") == 0 && > - ((amd_pminfo & AMDPM_TSC_INVARIANT) != 0 || > - I386_CPU_FAMILY(cpu_id) >= 0x10 || > - cpu_id == 0x60fb2))) { > - tsc_is_invariant = 1; > - printf("\n TSC: P-state invariant"); > + switch (cpu_vendor_id) { > + case CPU_VENDOR_AMD: > + if ((amd_pminfo & AMDPM_TSC_INVARIANT) || > + I386_CPU_FAMILY(cpu_id) >= 0x10 || > + cpu_id == 0x60fb2) > + tsc_is_invariant = 1; > + break; > + case CPU_VENDOR_INTEL: > + if (amd_pminfo & AMDPM_TSC_INVARIANT) > + tsc_is_invariant = 1; > + break; > } > + if (tsc_is_invariant) > + printf("\n TSC: P-state invariant"); > > /* > * If this CPU supports HTT or CMP then mention the > @@ -857,10 +882,10 @@ printcpuinfo(void) > */ > if (cpu_feature & CPUID_HTT) > htt = (cpu_procinfo & CPUID_HTT_CORES) >> 16; > - if (strcmp(cpu_vendor, "AuthenticAMD") == 0 && > + if (cpu_vendor_id == CPU_VENDOR_AMD && > (amd_feature2 & AMDID2_CMP)) > cmp = (cpu_procinfo2 & AMDID_CMP_CORES) + 1; > - else if (strcmp(cpu_vendor, "GenuineIntel") == 0 && > + else if (cpu_vendor_id == CPU_VENDOR_INTEL && > (cpu_high >= 4)) { > cpuid_count(4, 0, regs); > if ((regs[0] & 0x1f) != 0) > @@ -872,7 +897,7 @@ printcpuinfo(void) > printf("\n Logical CPUs per core: %d", > htt / cmp); > } > - } else if (strcmp(cpu_vendor, "CyrixInstead") == 0) { > + } else if (cpu_vendor_id == CPU_VENDOR_CYRIX) { > printf(" DIR=0x%04x", cyrix_did); > printf(" Stepping=%u", (cyrix_did & 0xf000) >> 12); > printf(" Revision=%u", (cyrix_did & 0x0f00) >> 8); > @@ -881,7 +906,7 @@ printcpuinfo(void) > printf("\n CPU cache: write-through mode"); > #endif > } > - if (strcmp(cpu_vendor, "CentaurHauls") == 0) > + if (cpu_vendor_id == CPU_VENDOR_CENTAUR) > print_via_padlock_info(); > > /* Avoid ugly blank lines: only print newline when we have to. */ > @@ -891,12 +916,11 @@ printcpuinfo(void) > if (!bootverbose) > return; > > - if (strcmp(cpu_vendor, "AuthenticAMD") == 0) > + if (cpu_vendor_id == CPU_VENDOR_AMD) > print_AMD_info(); > - else if (strcmp(cpu_vendor, "GenuineIntel") == 0) > + else if (cpu_vendor_id == CPU_VENDOR_INTEL) > print_INTEL_info(); > - else if (strcmp(cpu_vendor, "GenuineTMx86") == 0 || > - strcmp(cpu_vendor, "TransmetaCPU") == 0) > + else if (cpu_vendor_id == CPU_VENDOR_TRANSMETA) > print_transmeta_info(); > } > > @@ -1091,9 +1115,11 @@ finishidentcpu(void) > u_char ccr3; > u_int regs[4]; > > + cpu_vendor_id = find_cpu_vendor_id(); > + > /* Detect AMD features (PTE no-execute bit, 3dnow, 64 bit mode etc) */ > - if (strcmp(cpu_vendor, "GenuineIntel") == 0 || > - strcmp(cpu_vendor, "AuthenticAMD") == 0) { > + if (cpu_vendor_id == CPU_VENDOR_INTEL || > + cpu_vendor_id == CPU_VENDOR_AMD) { > init_exthigh(); > if (cpu_exthigh >= 0x80000001) { > do_cpuid(0x80000001, regs); > @@ -1108,7 +1134,7 @@ finishidentcpu(void) > do_cpuid(0x80000008, regs); > cpu_procinfo2 = regs[2]; > } > - } else if (strcmp(cpu_vendor, "CyrixInstead") == 0) { > + } else if (cpu_vendor_id == CPU_VENDOR_CYRIX) { > if (cpu == CPU_486) { > /* > * These conditions are equivalent to: > @@ -1118,6 +1144,7 @@ finishidentcpu(void) > isblue = identblue(); > if (isblue == IDENTBLUE_IBMCPU) { > strcpy(cpu_vendor, "IBM"); > + cpu_vendor_id = CPU_VENDOR_IBM; > cpu = CPU_BLUE; > return; > } > @@ -1191,12 +1218,24 @@ finishidentcpu(void) > isblue = identblue(); > if (isblue == IDENTBLUE_IBMCPU) { > strcpy(cpu_vendor, "IBM"); > + cpu_vendor_id = CPU_VENDOR_IBM; > cpu = CPU_BLUE; > return; > } > } > } > > +static u_int > +find_cpu_vendor_id(void) > +{ > + int i; > + > + for (i = 0; i < sizeof(cpu_vendors) / sizeof(cpu_vendors[0]); i++) > + if (strcmp(cpu_vendor, cpu_vendors[i].vendor) == 0) > + return (cpu_vendors[i].vendor_id); > + return (0); > +} > + > static void > print_AMD_assoc(int i) > { > > Modified: stable/7/sys/i386/i386/initcpu.c > =========================================================================== >=== --- stable/7/sys/i386/i386/initcpu.c Tue Jun 30 15:23:16 2009 (r195196) > +++ stable/7/sys/i386/i386/initcpu.c Tue Jun 30 17:10:08 2009 (r195197) @@ > -90,6 +90,7 @@ u_int cpu_id = 0; /* Stepping ID */ > u_int cpu_procinfo = 0; /* HyperThreading Info / Brand Index / CLFUSH */ > u_int cpu_procinfo2 = 0; /* Multicore info */ > char cpu_vendor[20] = ""; /* CPU Origin code */ > +u_int cpu_vendor_id = 0; /* CPU vendor ID */ > > SYSCTL_UINT(_hw, OID_AUTO, via_feature_rng, CTLFLAG_RD, > &via_feature_rng, 0, "VIA C3/C7 RNG feature available in CPU"); > > Modified: stable/7/sys/i386/i386/k6_mem.c > =========================================================================== >=== --- stable/7/sys/i386/i386/k6_mem.c Tue Jun 30 15:23:16 2009 (r195196) > +++ stable/7/sys/i386/i386/k6_mem.c Tue Jun 30 17:10:08 2009 (r195197) @@ > -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > > +#include > #include > #include > > @@ -175,7 +176,7 @@ static void > k6_mem_drvinit(void *unused) > { > > - if (strcmp(cpu_vendor, "AuthenticAMD") != 0) > + if (cpu_vendor_id != CPU_VENDOR_AMD) > return; > if ((cpu_id & 0xf00) != 0x500) > return; > > Modified: stable/7/sys/i386/i386/local_apic.c > =========================================================================== >=== --- stable/7/sys/i386/i386/local_apic.c Tue Jun 30 15:23:16 > 2009 (r195196) +++ stable/7/sys/i386/i386/local_apic.c Tue Jun 30 17:10:08 > 2009 (r195197) @@ -325,7 +325,7 @@ lapic_setup(int boot) > > /* XXX: Error and thermal LVTs */ > > - if (strcmp(cpu_vendor, "AuthenticAMD") == 0) { > + if (cpu_vendor_id == CPU_VENDOR_AMD) { > /* > * Detect the presence of C1E capability mostly on latest > * dual-cores (or future) k8 family. This feature renders > @@ -1073,7 +1073,7 @@ apic_init(void *dummy __unused) > * CPUs during early startup. We need to turn the local APIC back > * on on such CPUs now. > */ > - if (cpu == CPU_686 && strcmp(cpu_vendor, "GenuineIntel") == 0 && > + if (cpu == CPU_686 && cpu_vendor_id == CPU_VENDOR_INTEL && > (cpu_id & 0xff0) == 0x610) { > apic_base = rdmsr(MSR_APICBASE); > apic_base |= APICBASE_ENABLED; > > Modified: stable/7/sys/i386/i386/longrun.c > =========================================================================== >=== --- stable/7/sys/i386/i386/longrun.c Tue Jun 30 15:23:16 2009 (r195196) > +++ stable/7/sys/i386/i386/longrun.c Tue Jun 30 17:10:08 2009 (r195197) @@ > -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > > +#include > #include > #include > > @@ -262,8 +263,8 @@ tmx86_longrun_profile_sysctl(SYSCTL_HAND > static void > setup_tmx86_longrun(void *dummy __unused) > { > - if (strcmp(cpu_vendor, "GenuineTMx86") != 0 && > - strcmp(cpu_vendor, "TransmetaCPU") != 0) > + > + if (cpu_vendor_id != CPU_VENDOR_TRANSMETA) > return; > > crusoe_longrun = tmx86_get_longrun_mode(); > > Modified: stable/7/sys/i386/i386/mp_machdep.c > =========================================================================== >=== --- stable/7/sys/i386/i386/mp_machdep.c Tue Jun 30 15:23:16 > 2009 (r195196) +++ stable/7/sys/i386/i386/mp_machdep.c Tue Jun 30 17:10:08 > 2009 (r195197) @@ -72,6 +72,7 @@ __FBSDID("$FreeBSD$"); > #include > > #include > +#include > #include > #include > #include > @@ -425,8 +426,7 @@ cpu_mp_start(void) > * First determine if this is an Intel processor which claims > * to have hyperthreading support. > */ > - if ((cpu_feature & CPUID_HTT) && > - (strcmp(cpu_vendor, "GenuineIntel") == 0)) { > + if ((cpu_feature & CPUID_HTT) && cpu_vendor_id == CPU_VENDOR_INTEL) { > /* > * If the "deterministic cache parameters" cpuid calls > * are available, use them. > > Modified: stable/7/sys/i386/i386/msi.c > =========================================================================== >=== --- stable/7/sys/i386/i386/msi.c Tue Jun 30 15:23:16 2009 (r195196) +++ > stable/7/sys/i386/i386/msi.c Tue Jun 30 17:10:08 2009 (r195197) @@ -46,6 > +46,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > #include > #include > @@ -211,8 +212,8 @@ msi_init(void) > { > > /* Check if we have a supported CPU. */ > - if (!(strcmp(cpu_vendor, "GenuineIntel") == 0 || > - strcmp(cpu_vendor, "AuthenticAMD") == 0)) > + if (!(cpu_vendor_id == CPU_VENDOR_INTEL || > + cpu_vendor_id == CPU_VENDOR_AMD)) > return; > > msi_enabled = 1; > > Modified: stable/7/sys/i386/include/cputypes.h > =========================================================================== >=== --- stable/7/sys/i386/include/cputypes.h Tue Jun 30 15:23:16 > 2009 (r195196) +++ stable/7/sys/i386/include/cputypes.h Tue Jun 30 17:10:08 > 2009 (r195197) @@ -33,33 +33,49 @@ > /* > * Classes of processor. > */ > -#define CPUCLASS_286 0 > -#define CPUCLASS_386 1 > -#define CPUCLASS_486 2 > -#define CPUCLASS_586 3 > -#define CPUCLASS_686 4 > +#define CPUCLASS_286 0 > +#define CPUCLASS_386 1 > +#define CPUCLASS_486 2 > +#define CPUCLASS_586 3 > +#define CPUCLASS_686 4 > > /* > * Kinds of processor. > */ > -#define CPU_286 0 /* Intel 80286 */ > -#define CPU_386SX 1 /* Intel 80386SX */ > -#define CPU_386 2 /* Intel 80386DX */ > -#define CPU_486SX 3 /* Intel 80486SX */ > -#define CPU_486 4 /* Intel 80486DX */ > -#define CPU_586 5 /* Intel P.....m (I hate lawyers; it's TM) */ > -#define CPU_486DLC 6 /* Cyrix 486DLC */ > -#define CPU_686 7 /* Pentium Pro */ > -#define CPU_M1SC 8 /* Cyrix M1sc (aka 5x86) */ > -#define CPU_M1 9 /* Cyrix M1 (aka 6x86) */ > -#define CPU_BLUE 10 /* IBM BlueLighting CPU */ > -#define CPU_M2 11 /* Cyrix M2 (aka enhanced 6x86 with MMX */ > -#define CPU_NX586 12 /* NexGen (now AMD) 586 */ > -#define CPU_CY486DX 13 /* Cyrix 486S/DX/DX2/DX4 */ > -#define CPU_PII 14 /* Intel Pentium II */ > -#define CPU_PIII 15 /* Intel Pentium III */ > -#define CPU_P4 16 /* Intel Pentium 4 */ > -#define CPU_GEODE1100 17 /* NS Geode SC1100 */ > +#define CPU_286 0 /* Intel 80286 */ > +#define CPU_386SX 1 /* Intel 80386SX */ > +#define CPU_386 2 /* Intel 80386DX */ > +#define CPU_486SX 3 /* Intel 80486SX */ > +#define CPU_486 4 /* Intel 80486DX */ > +#define CPU_586 5 /* Intel Pentium */ > +#define CPU_486DLC 6 /* Cyrix 486DLC */ > +#define CPU_686 7 /* Pentium Pro */ > +#define CPU_M1SC 8 /* Cyrix M1sc (aka 5x86) */ > +#define CPU_M1 9 /* Cyrix M1 (aka 6x86) */ > +#define CPU_BLUE 10 /* IBM BlueLighting CPU */ > +#define CPU_M2 11 /* Cyrix M2 (enhanced 6x86 with MMX) */ > +#define CPU_NX586 12 /* NexGen (now AMD) 586 */ > +#define CPU_CY486DX 13 /* Cyrix 486S/DX/DX2/DX4 */ > +#define CPU_PII 14 /* Intel Pentium II */ > +#define CPU_PIII 15 /* Intel Pentium III */ > +#define CPU_P4 16 /* Intel Pentium 4 */ > +#define CPU_GEODE1100 17 /* NS Geode SC1100 */ > + > +/* > + * Vendors of processor. > + */ > +#define CPU_VENDOR_NSC 0x100b /* NSC */ > +#define CPU_VENDOR_IBM 0x1014 /* IBM */ > +#define CPU_VENDOR_AMD 0x1022 /* AMD */ > +#define CPU_VENDOR_SIS 0x1039 /* SiS */ > +#define CPU_VENDOR_UMC 0x1060 /* UMC */ > +#define CPU_VENDOR_NEXGEN 0x1074 /* Nexgen */ > +#define CPU_VENDOR_CYRIX 0x1078 /* Cyrix */ > +#define CPU_VENDOR_IDT 0x111d /* Centaur/IDT/VIA */ > +#define CPU_VENDOR_TRANSMETA 0x1279 /* Transmeta */ > +#define CPU_VENDOR_INTEL 0x8086 /* Intel */ > +#define CPU_VENDOR_RISE 0xdead2bad /* Rise */ > +#define CPU_VENDOR_CENTAUR CPU_VENDOR_IDT > > #ifndef LOCORE > extern int cpu; > > Modified: stable/7/sys/i386/include/md_var.h > =========================================================================== >=== --- stable/7/sys/i386/include/md_var.h Tue Jun 30 15:23:16 > 2009 (r195196) +++ stable/7/sys/i386/include/md_var.h Tue Jun 30 17:10:08 > 2009 (r195197) @@ -59,6 +59,7 @@ extern u_int cpu_mxcsr_mask; > extern u_int cpu_procinfo; > extern u_int cpu_procinfo2; > extern char cpu_vendor[]; > +extern u_int cpu_vendor_id; > extern u_int cyrix_did; > extern char kstack[]; > extern char sigcode[]; > > Modified: stable/7/sys/i386/include/specialreg.h > =========================================================================== >=== --- stable/7/sys/i386/include/specialreg.h Tue Jun 30 15:23:16 > 2009 (r195196) +++ stable/7/sys/i386/include/specialreg.h Tue Jun 30 > 17:10:08 2009 (r195197) @@ -203,8 +203,16 @@ > /* > * CPUID manufacturers identifiers > */ > -#define INTEL_VENDOR_ID "GenuineIntel" > -#define AMD_VENDOR_ID "AuthenticAMD" > +#define AMD_VENDOR_ID "AuthenticAMD" > +#define CENTAUR_VENDOR_ID "CentaurHauls" > +#define CYRIX_VENDOR_ID "CyrixInstead" > +#define INTEL_VENDOR_ID "GenuineIntel" > +#define NEXGEN_VENDOR_ID "NexGenDriven" > +#define NSC_VENDOR_ID "Geode by NSC" > +#define RISE_VENDOR_ID "RiseRiseRise" > +#define SIS_VENDOR_ID "SiS SiS SiS " > +#define TRANSMETA_VENDOR_ID "GenuineTMx86" > +#define UMC_VENDOR_ID "UMC UMC UMC " > > /* > * Model-specific registers for the i386 family buildkernel fails for me with latest stable: ===> coretemp (all) cc -O2 -fno-strict-aliasing -pipe -march=prescott -D_KERNEL -DKLD_MODULE - std=c99 -nostdinc -DHAVE_KERNEL_OPTION_HEADERS -include /usr/obj/usr/src/sys/LQC/opt_global.h -I. -I@ -I@/contrib/altq -finline- limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 - fno-common -g -I/usr/obj/usr/src/sys/LQC -mno-align-long-strings -mpreferred- stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 - ffreestanding -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes - Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno- pointer-sign -fformat-extensions -c /usr/src/sys/modules/coretemp/../../dev/coretemp/coretemp.c /usr/src/sys/modules/coretemp/../../dev/coretemp/coretemp.c: In function 'coretemp_identify': /usr/src/sys/modules/coretemp/../../dev/coretemp/coretemp.c:98: error: 'cpu_vendor_id' undeclared (first use in this function) /usr/src/sys/modules/coretemp/../../dev/coretemp/coretemp.c:98: error: (Each undeclared identifier is reported only once /usr/src/sys/modules/coretemp/../../dev/coretemp/coretemp.c:98: error: for each function it appears in.) /usr/src/sys/modules/coretemp/../../dev/coretemp/coretemp.c:98: error: 'CPU_VENDOR_INTEL' undeclared (first use in this function) *** Error code 1 Stop in /usr/src/sys/modules/coretemp. *** Error code 1 Stop in /usr/src/sys/modules. *** Error code 1 Stop in /usr/obj/usr/src/sys/LQC. *** Error code 1 Stop in /usr/src. *** Error code 1 Stop in /usr/src. From owner-svn-src-stable@FreeBSD.ORG Wed Jul 8 08:43:21 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 21B741065672; Wed, 8 Jul 2009 08:43:21 +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 268778FC0A; Wed, 8 Jul 2009 08:43:19 +0000 (UTC) (envelope-from avg@freebsd.org) 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 LAA10528; Wed, 08 Jul 2009 11:27:34 +0300 (EEST) (envelope-from avg@freebsd.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1] helo=edge.pp.kiev.ua) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1MOSV4-000CCQ-Lo; Wed, 08 Jul 2009 11:27:34 +0300 Message-ID: <4A545875.1080401@freebsd.org> Date: Wed, 08 Jul 2009 11:27:33 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.21 (X11/20090406) MIME-Version: 1.0 To: Max Brazhnikov References: <200906301710.n5UHA8b0086710@svn.freebsd.org> <200907081104.29163.makc@issp.ac.ru> In-Reply-To: <200907081104.29163.makc@issp.ac.ru> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, svn-src-stable-7@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r195197 - in stable/7/sys: . amd64/amd64 amd64/include contrib/pf dev/coretemp dev/hwpmc i386/cpufreq i386/i386 i386/include X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2009 08:43:21 -0000 on 08/07/2009 10:04 Max Brazhnikov said the following: > > buildkernel fails for me with latest stable: I almost missed your message - so much of the original commit message you quoted :-) I can not reproduce this build failure here. What arch is this (I assumed i386)? What method of obtaining/updating sources? What non-standard/non-default flags? > ===> coretemp (all) > cc -O2 -fno-strict-aliasing -pipe -march=prescott -D_KERNEL -DKLD_MODULE - > std=c99 -nostdinc -DHAVE_KERNEL_OPTION_HEADERS -include > /usr/obj/usr/src/sys/LQC/opt_global.h -I. -I@ -I@/contrib/altq -finline- > limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 - > fno-common -g -I/usr/obj/usr/src/sys/LQC -mno-align-long-strings -mpreferred- > stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 - > ffreestanding -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes - > Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno- > pointer-sign -fformat-extensions -c > /usr/src/sys/modules/coretemp/../../dev/coretemp/coretemp.c > /usr/src/sys/modules/coretemp/../../dev/coretemp/coretemp.c: In function > 'coretemp_identify': > /usr/src/sys/modules/coretemp/../../dev/coretemp/coretemp.c:98: error: > 'cpu_vendor_id' undeclared (first use in this function) > /usr/src/sys/modules/coretemp/../../dev/coretemp/coretemp.c:98: error: (Each > undeclared identifier is reported only once > /usr/src/sys/modules/coretemp/../../dev/coretemp/coretemp.c:98: error: for > each function it appears in.) > /usr/src/sys/modules/coretemp/../../dev/coretemp/coretemp.c:98: error: > 'CPU_VENDOR_INTEL' undeclared (first use in this function) > *** Error code 1 > > Stop in /usr/src/sys/modules/coretemp. > *** Error code 1 -- Andriy Gapon From owner-svn-src-stable@FreeBSD.ORG Wed Jul 8 10:03:46 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D85C106566C; Wed, 8 Jul 2009 10:03:46 +0000 (UTC) (envelope-from makc@issp.ac.ru) Received: from mail.issp.ac.ru (mail.issp.ac.ru [77.236.34.3]) by mx1.freebsd.org (Postfix) with ESMTP id 932408FC14; Wed, 8 Jul 2009 10:03:45 +0000 (UTC) (envelope-from makc@issp.ac.ru) Received: from lqc.issp.ac.ru [77.236.34.156:43986] (HELO/EHLO lqc.issp.ac.ru, authenticated with PLAIN) by mail.issp.ac.ru with ESMTP/inet id n68A4sAs063954 (using TLSv1/SSLv3, with cipher DHE-RSA-AES256-SHA (256 bits), verified NO) Wed, 8 Jul 2009 14:04:54 +0400 (MSD) From: Max Brazhnikov Organization: ISSP RAS To: Andriy Gapon Date: Wed, 8 Jul 2009 14:03:43 +0400 User-Agent: KMail/1.11.4 (FreeBSD/7.2-STABLE; KDE/4.2.4; i386; ; ) References: <200906301710.n5UHA8b0086710@svn.freebsd.org> <200907081104.29163.makc@issp.ac.ru> <4A545875.1080401@freebsd.org> In-Reply-To: <4A545875.1080401@freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907081403.44169.makc@issp.ac.ru> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-3.0 (mail.issp.ac.ru [77.236.34.3]); Wed, 08 Jul 2009 14:04:54 +0400 (MSD) X-Virus-Scanned: ClamAV 0.94.1/9542/Wed Jul 8 11:20:12 2009 on mail.issp.ac.ru X-Virus-Status: Clean Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r195197 - in stable/7/sys: . amd64/amd64 amd64/include contrib/pf dev/coretemp dev/hwpmc i386/cpufreq i386/i386 i386/include X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2009 10:03:46 -0000 On Wed, 08 Jul 2009 11:27:33 +0300, Andriy Gapon wrote: > on 08/07/2009 10:04 Max Brazhnikov said the following: > > buildkernel fails for me with latest stable: > > I almost missed your message - so much of the original commit message you > quoted :-) I can not reproduce this build failure here. > > What arch is this (I assumed i386)? FreeBSD lqc.issp.ac.ru 7.2-STABLE FreeBSD 7.2-STABLE #2: Fri May 8 13:35:40 MSD 2009 root@lqc.issp.ac.ru:/usr/obj/usr/src/sys/LQC i386 > What method of obtaining/updating sources? via cvsup7.ru.FreeBSD.org > What non-standard/non-default flags? only CPUTYPE?=core2, however GENERIC fails also even without CPUTYPE: ===> coretemp (all) cc -O2 -fno-strict-aliasing -pipe -D_KERNEL -DKLD_MODULE -std=c99 -nostdinc -DHAVE_KERNEL_OPTION_HEADERS -include /usr/obj/usr/src/sys/GENERIC/opt_global.h -I. -I@ -I@/contrib/altq -finline- limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 - fno-common -g -I/usr/obj/usr/src/sys/GENERIC -mno-align-long-strings - mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -ffreestanding -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes - Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno- pointer-sign -fformat-extensions -c /usr/src/sys/modules/coretemp/../../dev/coretemp/coretemp.c /usr/src/sys/modules/coretemp/../../dev/coretemp/coretemp.c: In function 'coretemp_identify': /usr/src/sys/modules/coretemp/../../dev/coretemp/coretemp.c:98: error: 'cpu_vendor_id' undeclared (first use in this function) /usr/src/sys/modules/coretemp/../../dev/coretemp/coretemp.c:98: error: (Each undeclared identifier is reported only once /usr/src/sys/modules/coretemp/../../dev/coretemp/coretemp.c:98: error: for each function it appears in.) /usr/src/sys/modules/coretemp/../../dev/coretemp/coretemp.c:98: error: 'CPU_VENDOR_INTEL' undeclared (first use in this function) *** Error code 1 1 error From owner-svn-src-stable@FreeBSD.ORG Wed Jul 8 10:35:38 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 004311065672; Wed, 8 Jul 2009 10:35: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 7B15F8FC08; Wed, 8 Jul 2009 10:35:36 +0000 (UTC) (envelope-from avg@freebsd.org) 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 NAA13212; Wed, 08 Jul 2009 13:35:14 +0300 (EEST) (envelope-from avg@freebsd.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1] helo=edge.pp.kiev.ua) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1MOUUb-000COb-Lo; Wed, 08 Jul 2009 13:35:13 +0300 Message-ID: <4A547660.4060600@freebsd.org> Date: Wed, 08 Jul 2009 13:35:12 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.21 (X11/20090406) MIME-Version: 1.0 To: Max Brazhnikov References: <200906301710.n5UHA8b0086710@svn.freebsd.org> <200907081104.29163.makc@issp.ac.ru> <4A545875.1080401@freebsd.org> <200907081403.44169.makc@issp.ac.ru> In-Reply-To: <200907081403.44169.makc@issp.ac.ru> X-Enigmail-Version: 0.95.7 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 Subject: Re: svn commit: r195197 - in stable/7/sys: . amd64/amd64 amd64/include contrib/pf dev/coretemp dev/hwpmc i386/cpufreq i386/i386 i386/include X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2009 10:35:38 -0000 on 08/07/2009 13:03 Max Brazhnikov said the following: > On Wed, 08 Jul 2009 11:27:33 +0300, Andriy Gapon wrote: >> on 08/07/2009 10:04 Max Brazhnikov said the following: >>> buildkernel fails for me with latest stable: >> I almost missed your message - so much of the original commit message you >> quoted :-) I can not reproduce this build failure here. >> >> What arch is this (I assumed i386)? > FreeBSD lqc.issp.ac.ru 7.2-STABLE FreeBSD 7.2-STABLE #2: Fri May 8 13:35:40 > MSD 2009 root@lqc.issp.ac.ru:/usr/obj/usr/src/sys/LQC i386 > >> What method of obtaining/updating sources? > via cvsup7.ru.FreeBSD.org I haven't checked but I guess that there is either some issue with svn-cvs bridge or this cvsup server. I built pristine GENERIC with all modules and did not get this error. Tinderbox is silent too. I realize advantages of cvsup approach, but it seems that recently people using it had more troubles than those who use svn. -- Andriy Gapon From owner-svn-src-stable@FreeBSD.ORG Wed Jul 8 12:07:22 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C0FA10656A4; Wed, 8 Jul 2009 12:07:22 +0000 (UTC) (envelope-from makc@issp.ac.ru) Received: from mail.issp.ac.ru (mail.issp.ac.ru [77.236.34.3]) by mx1.freebsd.org (Postfix) with ESMTP id 88A0F8FC14; Wed, 8 Jul 2009 12:07:21 +0000 (UTC) (envelope-from makc@issp.ac.ru) Received: from lqc.issp.ac.ru [77.236.34.156:3267] (HELO/EHLO lqc.issp.ac.ru, authenticated with PLAIN) by mail.issp.ac.ru with ESMTP/inet id n68C8Umb069600 (using TLSv1/SSLv3, with cipher DHE-RSA-AES256-SHA (256 bits), verified NO) Wed, 8 Jul 2009 16:08:30 +0400 (MSD) From: Max Brazhnikov Organization: ISSP RAS To: Andriy Gapon Date: Wed, 8 Jul 2009 16:07:19 +0400 User-Agent: KMail/1.11.4 (FreeBSD/7.2-STABLE; KDE/4.2.4; i386; ; ) References: <200906301710.n5UHA8b0086710@svn.freebsd.org> <200907081403.44169.makc@issp.ac.ru> <4A547660.4060600@freebsd.org> In-Reply-To: <4A547660.4060600@freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907081607.19834.makc@issp.ac.ru> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-3.0 (mail.issp.ac.ru [77.236.34.3]); Wed, 08 Jul 2009 16:08:30 +0400 (MSD) X-Virus-Scanned: ClamAV 0.94.1/9544/Wed Jul 8 14:57:48 2009 on mail.issp.ac.ru X-Virus-Status: Clean Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r195197 - in stable/7/sys: . amd64/amd64 amd64/include contrib/pf dev/coretemp dev/hwpmc i386/cpufreq i386/i386 i386/include X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2009 12:07:24 -0000 On Wed, 08 Jul 2009 13:35:12 +0300, Andriy Gapon wrote: > on 08/07/2009 13:03 Max Brazhnikov said the following: > > On Wed, 08 Jul 2009 11:27:33 +0300, Andriy Gapon wrote: > >> on 08/07/2009 10:04 Max Brazhnikov said the following: > >>> buildkernel fails for me with latest stable: > >> > >> I almost missed your message - so much of the original commit message > >> you quoted :-) I can not reproduce this build failure here. > >> > >> What arch is this (I assumed i386)? > > > > FreeBSD lqc.issp.ac.ru 7.2-STABLE FreeBSD 7.2-STABLE #2: Fri May 8 > > 13:35:40 MSD 2009 root@lqc.issp.ac.ru:/usr/obj/usr/src/sys/LQC i386 > > > >> What method of obtaining/updating sources? > > > > via cvsup7.ru.FreeBSD.org > > I haven't checked but I guess that there is either some issue with svn-cvs > bridge or this cvsup server. I built pristine GENERIC with all modules and > did not get this error. > Tinderbox is silent too. > > I realize advantages of cvsup approach, but it seems that recently people > using it had more troubles than those who use svn. it seems cvsup7.ru.FreeBSD.org is out of sync. I've switched to another server, kernel builds fine now. From owner-svn-src-stable@FreeBSD.ORG Thu Jul 9 09:12:17 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0453210656FA; Thu, 9 Jul 2009 09:12: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 E21738FC48; Thu, 9 Jul 2009 09:12:16 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n699CGjL077583; Thu, 9 Jul 2009 09:12:16 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n699CGx0077581; Thu, 9 Jul 2009 09:12:16 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200907090912.n699CGx0077581@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 9 Jul 2009 09:12: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: r195485 - in stable/7/sys: . contrib/pf kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2009 09:12:22 -0000 Author: kib Date: Thu Jul 9 09:12:16 2009 New Revision: 195485 URL: http://svn.freebsd.org/changeset/base/195485 Log: MFC r194993: In lf_iteratelocks_vnode, increment state->ls_threads around iterating of the vnode advisory lock list. This prevents deallocation of state while inside the loop. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/kern/kern_lockf.c Modified: stable/7/sys/kern/kern_lockf.c ============================================================================== --- stable/7/sys/kern/kern_lockf.c Thu Jul 9 01:58:59 2009 (r195484) +++ stable/7/sys/kern/kern_lockf.c Thu Jul 9 09:12:16 2009 (r195485) @@ -1937,9 +1937,14 @@ lf_iteratelocks_vnode(struct vnode *vp, * make sure it doesn't go away before we are finished. */ STAILQ_INIT(&locks); + VI_LOCK(vp); ls = vp->v_lockf; - if (!ls) + if (!ls) { + VI_UNLOCK(vp); return (0); + } + ls->ls_threads++; + VI_UNLOCK(vp); sx_xlock(&ls->ls_lock); LIST_FOREACH(lf, &ls->ls_active, lf_link) { @@ -1960,6 +1965,10 @@ lf_iteratelocks_vnode(struct vnode *vp, STAILQ_INSERT_TAIL(&locks, ldesc, link); } sx_xunlock(&ls->ls_lock); + VI_LOCK(vp); + ls->ls_threads--; + wakeup(ls); + VI_UNLOCK(vp); /* * Call the iterator function for each lock in turn. If the From owner-svn-src-stable@FreeBSD.ORG Thu Jul 9 13:48:07 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 55EA2106566B; Thu, 9 Jul 2009 13:48:07 +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 3A7E18FC2A; Thu, 9 Jul 2009 13:48:07 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n69Dm7lT086804; Thu, 9 Jul 2009 13:48:07 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n69Dm7ON086801; Thu, 9 Jul 2009 13:48:07 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <200907091348.n69Dm7ON086801@svn.freebsd.org> From: Andriy Gapon Date: Thu, 9 Jul 2009 13:48: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: r195492 - in stable/7/sys: . cddl/dev/dtrace/amd64 contrib/pf X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2009 13:48:08 -0000 Author: avg Date: Thu Jul 9 13:48:06 2009 New Revision: 195492 URL: http://svn.freebsd.org/changeset/base/195492 Log: MFC 194850: dtrace/amd64: fix virtual address checks Modified: stable/7/sys/ (props changed) stable/7/sys/cddl/dev/dtrace/amd64/dtrace_isa.c stable/7/sys/cddl/dev/dtrace/amd64/dtrace_subr.c stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/cddl/dev/dtrace/amd64/dtrace_isa.c ============================================================================== --- stable/7/sys/cddl/dev/dtrace/amd64/dtrace_isa.c Thu Jul 9 13:42:18 2009 (r195491) +++ stable/7/sys/cddl/dev/dtrace/amd64/dtrace_isa.c Thu Jul 9 13:48:06 2009 (r195492) @@ -42,8 +42,6 @@ #include #include -extern uintptr_t kernbase; -uintptr_t kernelbase = (uintptr_t) &kernbase; uint8_t dtrace_fuword8_nocheck(void *); uint16_t dtrace_fuword16_nocheck(void *); @@ -524,9 +522,9 @@ dtrace_getreg(struct regs *rp, uint_t re static int dtrace_copycheck(uintptr_t uaddr, uintptr_t kaddr, size_t size) { - ASSERT(kaddr >= kernelbase && kaddr + size >= kaddr); + ASSERT(INKERNEL(kaddr) && kaddr + size >= kaddr); - if (uaddr + size >= kernelbase || uaddr + size < uaddr) { + if (uaddr + size > VM_MAXUSER_ADDRESS || uaddr + size < uaddr) { DTRACE_CPUFLAG_SET(CPU_DTRACE_BADADDR); cpu_core[curcpu].cpuc_dtrace_illval = uaddr; return (0); @@ -570,7 +568,7 @@ dtrace_copyoutstr(uintptr_t kaddr, uintp uint8_t dtrace_fuword8(void *uaddr) { - if ((uintptr_t)uaddr >= kernelbase) { + if ((uintptr_t)uaddr > VM_MAXUSER_ADDRESS) { DTRACE_CPUFLAG_SET(CPU_DTRACE_BADADDR); cpu_core[curcpu].cpuc_dtrace_illval = (uintptr_t)uaddr; return (0); @@ -581,7 +579,7 @@ dtrace_fuword8(void *uaddr) uint16_t dtrace_fuword16(void *uaddr) { - if ((uintptr_t)uaddr >= kernelbase) { + if ((uintptr_t)uaddr > VM_MAXUSER_ADDRESS) { DTRACE_CPUFLAG_SET(CPU_DTRACE_BADADDR); cpu_core[curcpu].cpuc_dtrace_illval = (uintptr_t)uaddr; return (0); @@ -592,7 +590,7 @@ dtrace_fuword16(void *uaddr) uint32_t dtrace_fuword32(void *uaddr) { - if ((uintptr_t)uaddr >= kernelbase) { + if ((uintptr_t)uaddr > VM_MAXUSER_ADDRESS) { DTRACE_CPUFLAG_SET(CPU_DTRACE_BADADDR); cpu_core[curcpu].cpuc_dtrace_illval = (uintptr_t)uaddr; return (0); @@ -603,7 +601,7 @@ dtrace_fuword32(void *uaddr) uint64_t dtrace_fuword64(void *uaddr) { - if ((uintptr_t)uaddr >= kernelbase) { + if ((uintptr_t)uaddr > VM_MAXUSER_ADDRESS) { DTRACE_CPUFLAG_SET(CPU_DTRACE_BADADDR); cpu_core[curcpu].cpuc_dtrace_illval = (uintptr_t)uaddr; return (0); Modified: stable/7/sys/cddl/dev/dtrace/amd64/dtrace_subr.c ============================================================================== --- stable/7/sys/cddl/dev/dtrace/amd64/dtrace_subr.c Thu Jul 9 13:42:18 2009 (r195491) +++ stable/7/sys/cddl/dev/dtrace/amd64/dtrace_subr.c Thu Jul 9 13:48:06 2009 (r195492) @@ -40,7 +40,6 @@ #include #include -extern uintptr_t kernelbase; extern uintptr_t dtrace_in_probe_addr; extern int dtrace_in_probe; From owner-svn-src-stable@FreeBSD.ORG Thu Jul 9 14:53:05 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C54C1106567C; Thu, 9 Jul 2009 14:53:05 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B2C518FC21; Thu, 9 Jul 2009 14:53:05 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n69Er5aO088220; Thu, 9 Jul 2009 14:53:05 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n69Er5iF088218; Thu, 9 Jul 2009 14:53:05 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <200907091453.n69Er5iF088218@svn.freebsd.org> From: Andriy Gapon Date: Thu, 9 Jul 2009 14:53: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: r195493 - stable/7/sys/amd64/amd64 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2009 14:53:06 -0000 Author: avg Date: Thu Jul 9 14:53:05 2009 New Revision: 195493 URL: http://svn.freebsd.org/changeset/base/195493 Log: dtrace/amd64: remove duplicate definition of dtrace_gethrtime function Primary (and enhanced) definition of this function is in sys/cddl/dev/dtrace/amd64/dtrace_subr.c. This is a direct commit to the branch, because this instance of the function was added to the branch in rev 182231, which claimed to be dtrace MFH, but in fact the code in question never existed in head. And does not exist now. Another reason for this de-duplication is that there is only one instance of this function for i386 arch. Briefly discussed with: jhb Silence from: jb Modified: stable/7/sys/amd64/amd64/tsc.c Modified: stable/7/sys/amd64/amd64/tsc.c ============================================================================== --- stable/7/sys/amd64/amd64/tsc.c Thu Jul 9 13:48:06 2009 (r195492) +++ stable/7/sys/amd64/amd64/tsc.c Thu Jul 9 14:53:05 2009 (r195493) @@ -234,18 +234,3 @@ tsc_get_timecount(struct timecounter *tc { return (rdtsc()); } - -#ifdef KDTRACE_HOOKS -/* - * DTrace needs a high resolution time function which can - * be called from a probe context and guaranteed not to have - * instrumented with probes itself. - * - * Returns nanoseconds since boot. - */ -uint64_t -dtrace_gethrtime() -{ - return (rdtsc() * (uint64_t) 1000000000 / tsc_freq); -} -#endif From owner-svn-src-stable@FreeBSD.ORG Thu Jul 9 15:27:07 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA7C710656BA; Thu, 9 Jul 2009 15:27:07 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C8B008FC13; Thu, 9 Jul 2009 15:27:07 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n69FR7d8089170; Thu, 9 Jul 2009 15:27:07 GMT (envelope-from n_hibma@svn.freebsd.org) Received: (from n_hibma@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n69FR7Kg089168; Thu, 9 Jul 2009 15:27:07 GMT (envelope-from n_hibma@svn.freebsd.org) Message-Id: <200907091527.n69FR7Kg089168@svn.freebsd.org> From: Nick Hibma Date: Thu, 9 Jul 2009 15:27: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: r195498 - stable/7/sys/dev/usb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2009 15:27:08 -0000 Author: n_hibma Date: Thu Jul 9 15:27:07 2009 New Revision: 195498 URL: http://svn.freebsd.org/changeset/base/195498 Log: Errors we would like to see during debugging. Modified: stable/7/sys/dev/usb/ohci.c Modified: stable/7/sys/dev/usb/ohci.c ============================================================================== --- stable/7/sys/dev/usb/ohci.c Thu Jul 9 15:05:50 2009 (r195497) +++ stable/7/sys/dev/usb/ohci.c Thu Jul 9 15:27:07 2009 (r195498) @@ -1381,7 +1381,7 @@ ohci_softintr(void *v) */ opipe = (struct ohci_pipe *)xfer->pipe; - DPRINTFN(15,("ohci_process_done: error cc=%d (%s)\n", + DPRINTF(("ohci_process_done: error cc=%d (%s)\n", OHCI_TD_GET_CC(le32toh(std->td.td_flags)), ohci_cc_strs[OHCI_TD_GET_CC(le32toh(std->td.td_flags))])); callout_stop(&xfer->timeout_handle); From owner-svn-src-stable@FreeBSD.ORG Thu Jul 9 15:29:27 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 13F441065690; Thu, 9 Jul 2009 15:29:27 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 01D4D8FC0C; Thu, 9 Jul 2009 15:29:27 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n69FTQcR089254; Thu, 9 Jul 2009 15:29:26 GMT (envelope-from n_hibma@svn.freebsd.org) Received: (from n_hibma@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n69FTQ71089251; Thu, 9 Jul 2009 15:29:26 GMT (envelope-from n_hibma@svn.freebsd.org) Message-Id: <200907091529.n69FTQ71089251@svn.freebsd.org> From: Nick Hibma Date: Thu, 9 Jul 2009 15:29:26 +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: r195499 - stable/7/sys/dev/usb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2009 15:29:27 -0000 Author: n_hibma Date: Thu Jul 9 15:29:26 2009 New Revision: 195499 URL: http://svn.freebsd.org/changeset/base/195499 Log: Improve the debugging output: Make it switchable through a sysctl for ucom and u3g. Try to reset the device if it produces ucomwritecb and ucomreadcb errors. Modified: stable/7/sys/dev/usb/u3g.c stable/7/sys/dev/usb/ucom.c Modified: stable/7/sys/dev/usb/u3g.c ============================================================================== --- stable/7/sys/dev/usb/u3g.c Thu Jul 9 15:27:07 2009 (r195498) +++ stable/7/sys/dev/usb/u3g.c Thu Jul 9 15:29:26 2009 (r195499) @@ -39,6 +39,7 @@ #include #include #include +#include #include #include @@ -51,16 +52,13 @@ #endif #include "usbdevs.h" -//#define U3G_DEBUG -#ifdef U3G_DEBUG -#define DPRINTF(x...) device_printf(sc->sc_dev, ##x) -#define bootverbose (1) -#else -#define DPRINTF(x...) /* nop */ -#endif +static int u3gdebug = 1; +SYSCTL_NODE(_hw_usb, OID_AUTO, u3g, CTLFLAG_RW, 0, "USB u3g"); +SYSCTL_INT(_hw_usb_u3g, OID_AUTO, debug, CTLFLAG_RW, + &u3gdebug, 0, "u3g debug level"); +#define DPRINTF(x...) if (u3gdebug) device_printf(sc->sc_dev, ##x) -#define U3G_MAXPORTS 4 -#define U3G_CONFIG_INDEX 0 +#define U3G_MAXPORTS 6 struct u3g_softc { struct ucom_softc sc_ucom[U3G_MAXPORTS]; @@ -258,6 +256,9 @@ u3g_attach(device_t self) sprintf(devnamefmt,"U%d.%%d", device_get_unit(self)); int portno = 0; for (i = 0; i < uaa->nifaces && portno < U3G_MAXPORTS; i++) { + DPRINTF("Interface %d of %d, %sin use\n", + i, uaa->nifaces, + (uaa->ifaces[i]? "not ":"")); if (uaa->ifaces[i] == NULL) continue; @@ -268,7 +269,7 @@ u3g_attach(device_t self) * Claim the first umass device (cdX) as it contains * only Windows drivers anyway (CD-ROM), hiding it. */ - if (!bootverbose) + if (!(bootverbose || u3gdebug)) if (uaa->vendor == USB_VENDOR_HUAWEI) if (id->bInterfaceNumber == 2) uaa->ifaces[i] = NULL; @@ -279,6 +280,9 @@ u3g_attach(device_t self) int claim_iface = 0; for (n = 0; n < id->bNumEndpoints && portno < U3G_MAXPORTS; n++) { ed = usbd_interface2endpoint_descriptor(uaa->ifaces[i], n); + DPRINTF(" Endpoint %d of %d%s\n", + n, id->bNumEndpoints, + (ed? "":"no descriptor")); if (ed == NULL) continue; if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN @@ -585,7 +589,7 @@ u3gstub_BBB_cmd(struct u3gstub_softc *sc usbd_errstr(err)); } } else if (err != USBD_NORMAL_COMPLETION) { - if (bootverbose) + if (u3gdebug) device_printf(sc->sc_dev, "Failed to retrieve CSW to " "change to modem mode: %s\n", @@ -609,13 +613,10 @@ u3gstub_sierra_init(struct u3gstub_softc USETW(req.wLength, 0); err = usbd_do_request(sc->sc_udev, &req, 0); - if (bootverbose) { - if (err) { - device_printf(sc->sc_dev, - "Failed to send Sierra request: %s\n", - usbd_errstr(err)); - } - } + if (err && u3gdebug) + device_printf(sc->sc_dev, + "Failed to send Sierra request: %s\n", + usbd_errstr(err)); return 1; } @@ -633,13 +634,10 @@ u3gstub_huawei_init(struct u3gstub_softc USETW(req.wLength, 0); err = usbd_do_request(sc->sc_udev, &req, 0); - if (bootverbose) { - if (err) { - device_printf(sc->sc_dev, - "Failed to send Huawei request: %s\n", - usbd_errstr(err)); - } - } + if (err && u3gdebug) + device_printf(sc->sc_dev, + "Failed to send Huawei request: %s\n", + usbd_errstr(err)); return 1; } @@ -659,19 +657,19 @@ u3gstub_do_init(void *priv) u3g_dev_type = u3g_lookup(sc->sc_vendor, sc->sc_product); switch (u3g_dev_type->init) { case U3GINIT_HUAWEI: - if (bootverbose) + if (bootverbose || u3gdebug) device_printf(sc->sc_dev, "changing Huawei modem to modem mode\n"); u3gstub_huawei_init(sc); break; case U3GINIT_SIERRA: - if (bootverbose) + if (bootverbose || u3gdebug) device_printf(sc->sc_dev, "changing Sierra modem to modem mode\n"); u3gstub_sierra_init(sc); break; case U3GINIT_EJECT: - if (bootverbose) + if (bootverbose || u3gdebug) device_printf(sc->sc_dev, "sending CD eject command to change to modem mode\n"); while (!sc->sc_dying @@ -680,20 +678,20 @@ u3gstub_do_init(void *priv) ; /* nop */ break; case U3GINIT_ZTESTOR: - if (bootverbose) + if (bootverbose || u3gdebug) device_printf(sc->sc_dev, "changing ZTE STOR modem to modem mode\n"); u3gstub_BBB_cmd(sc, ztestor_cmd); break; case U3GINIT_CMOTECH: - if (bootverbose) + if (bootverbose || u3gdebug) device_printf(sc->sc_dev, "changing CMOTECH modem to modem mode\n"); u3gstub_BBB_cmd(sc, cmotech_cmd); break; case U3GINIT_WAIT: default: - if (bootverbose) + if (bootverbose || u3gdebug) device_printf(sc->sc_dev, "waiting for modem to change to modem mode\n"); /* nop */ @@ -726,7 +724,7 @@ u3gstub_match(device_t self) id = usbd_get_interface_descriptor(uaa->iface); if (id && id->bInterfaceNumber == 0 && id->bInterfaceClass == UICLASS_MASS) { - if (!bootverbose) + if (u3gdebug == 0) device_quiet(self); return UMATCH_VENDOR_PRODUCT; @@ -745,7 +743,7 @@ u3gstub_attach(device_t self) usb_endpoint_descriptor_t *ed; int i, err; - if (!bootverbose) + if (u3gdebug == 0) device_quiet(self); for (i = 0; i < uaa->nifaces; i++) Modified: stable/7/sys/dev/usb/ucom.c ============================================================================== --- stable/7/sys/dev/usb/ucom.c Thu Jul 9 15:27:07 2009 (r195498) +++ stable/7/sys/dev/usb/ucom.c Thu Jul 9 15:29:26 2009 (r195499) @@ -95,7 +95,6 @@ __FBSDID("$FreeBSD$"); #include -#ifdef USB_DEBUG static int ucomdebug = 0; SYSCTL_NODE(_hw_usb, OID_AUTO, ucom, CTLFLAG_RW, 0, "USB ucom"); SYSCTL_INT(_hw_usb_ucom, OID_AUTO, debug, CTLFLAG_RW, @@ -109,10 +108,6 @@ SYSCTL_INT(_hw_usb_ucom, OID_AUTO, debug if (ucomdebug > (n)) \ printf x; \ } while (0) -#else -#define DPRINTF(x) -#define DPRINTFN(n, x) -#endif static int ucom_modevent(module_t, int, void *); static void ucom_cleanup(struct ucom_softc *); @@ -690,11 +685,19 @@ ucomwritecb(usbd_xfer_handle xfer, usbd_ goto error; if (status != USBD_NORMAL_COMPLETION) { - printf("%s: ucomwritecb: %s\n", - device_get_nameunit(sc->sc_dev), usbd_errstr(status)); - if (status == USBD_STALLED) + if (status == USBD_STALLED) { + printf("%s: ucomwritecb: STALLED; clearing.\n", + device_get_nameunit(sc->sc_dev)); usbd_clear_endpoint_stall_async(sc->sc_bulkout_pipe); - /* XXX we should restart after some delay. */ + } else if (status == USBD_IOERROR) { + printf("%s: ucomwritecb: IOERROR; resetting device.\n", + device_get_nameunit(sc->sc_dev)); + usbd_reset_device(sc->sc_udev); + } else if (status != USBD_CANCELLED) { + printf("%s: ucomwritecb: %s\n", + device_get_nameunit(sc->sc_dev), + usbd_errstr(status)); + } goto error; } @@ -774,7 +777,21 @@ ucomreadcb(usbd_xfer_handle xfer, usbd_p sc->sc_state |= UCS_RXSTOP; if (status == USBD_STALLED) usbd_clear_endpoint_stall_async(sc->sc_bulkin_pipe); - /* XXX we should restart after some delay. */ + else if (status == USBD_IOERROR) + usbd_reset_device(sc->sc_udev); + if (status == USBD_STALLED) { + printf("%s: ucomreadcb: STALLED; clearing.\n", + device_get_nameunit(sc->sc_dev)); + usbd_clear_endpoint_stall_async(sc->sc_bulkin_pipe); + } else if (status == USBD_IOERROR) { + printf("%s: ucomreadcb: IOERROR; resetting device.\n", + device_get_nameunit(sc->sc_dev)); + usbd_reset_device(sc->sc_udev); + } else if (status != USBD_CANCELLED) { + printf("%s: ucomreadcb: %s\n", + device_get_nameunit(sc->sc_dev), + usbd_errstr(status)); + } return; } sc->sc_state |= UCS_RXSTOP; From owner-svn-src-stable@FreeBSD.ORG Thu Jul 9 18:00:16 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A99D31065675; Thu, 9 Jul 2009 18:00:16 +0000 (UTC) (envelope-from prvs=1434654274=brian@Awfulhak.org) Received: from idcmail-mo2no.shaw.ca (idcmail-mo2no.shaw.ca [64.59.134.9]) by mx1.freebsd.org (Postfix) with ESMTP id 4C0228FC0C; Thu, 9 Jul 2009 18:00:16 +0000 (UTC) (envelope-from prvs=1434654274=brian@Awfulhak.org) Received: from pd7ml2no-ssvc.prod.shaw.ca ([10.0.153.162]) by pd6mo1no-svcs.prod.shaw.ca with ESMTP; 09 Jul 2009 11:31:25 -0600 X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.0 c=0 a=6I5d2MoRAAAA:8 a=1YLkyMYI2MGb24YtbzMA:9 a=SqbEZiGvDLxhBybAys0A:7 a=GpQ67uUgEPVBYj78KlVyTLSf4NEA:4 a=SV7veod9ZcQA:10 a=WJ3hkfHDukgA:10 a=0wvbOQHW_X4A:10 Received: from unknown (HELO store.lan.Awfulhak.org) ([174.7.23.140]) by pd7ml2no-dmz.prod.shaw.ca with ESMTP; 09 Jul 2009 11:31:25 -0600 Received: from store.lan.Awfulhak.org (localhost.localdomain [127.0.0.1]) by localhost (Email Security Appliance) with SMTP id C1DE2C433AD_A5629A7B; Thu, 9 Jul 2009 17:32:23 +0000 (GMT) Received: from gw.Awfulhak.org (gw.lan.Awfulhak.org [172.16.0.1]) by store.lan.Awfulhak.org (Sophos Email Appliance) with ESMTP id 722F9C460F2_A56299FF; Thu, 9 Jul 2009 17:32:14 +0000 (GMT) Received: from localhost (brian@gw.lan.Awfulhak.org [172.16.0.1]) by gw.Awfulhak.org (8.14.3/8.14.3) with ESMTP id n69HVEmL019994; Thu, 9 Jul 2009 10:31:14 -0700 (PDT) (envelope-from brian@Awfulhak.org) Date: Thu, 9 Jul 2009 10:31:26 -0700 From: Brian Somers To: Konstantin Belousov Message-ID: <20090709103126.02bf7206@Awfulhak.org> In-Reply-To: <200907090912.n699CGx0077581@svn.freebsd.org> References: <200907090912.n699CGx0077581@svn.freebsd.org> X-Mailer: Claws Mail 3.7.2 (GTK+ 2.16.4; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-7@FreeBSD.org Subject: Re: svn commit: r195485 - in stable/7/sys: . contrib/pf kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2009 18:00:17 -0000 On Thu, 9 Jul 2009 09:12:16 +0000 (UTC), Konstantin Belousov wrote: > Author: kib > Date: Thu Jul 9 09:12:16 2009 > New Revision: 195485 > URL: http://svn.freebsd.org/changeset/base/195485 > > Log: > MFC r194993: > In lf_iteratelocks_vnode, increment state->ls_threads around iterating > of the vnode advisory lock list. This prevents deallocation of state > while inside the loop. > > Modified: > stable/7/sys/ (props changed) > stable/7/sys/contrib/pf/ (props changed) > stable/7/sys/kern/kern_lockf.c Just picking on this commit.... Are the properties on stable/7/sys/contrib/pf intentional or should they merged into stable/7/sys (a no-op hopefully) and removed? -- Brian Somers Don't _EVER_ lose your sense of humour ! From owner-svn-src-stable@FreeBSD.ORG Thu Jul 9 20:48:35 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6AFCA10656B2 for ; Thu, 9 Jul 2009 20:48:35 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.177]) by mx1.freebsd.org (Postfix) with ESMTP id D49178FC28 for ; Thu, 9 Jul 2009 20:48:34 +0000 (UTC) (envelope-from max@love2party.net) Received: from vampire.homelinux.org (dslb-088-066-043-124.pools.arcor-ip.net [88.66.43.124]) by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis) id 0MKv1o-1MP0LW3zZa-00095q; Thu, 09 Jul 2009 22:35:59 +0200 Received: (qmail 81029 invoked from network); 9 Jul 2009 20:35:58 -0000 Received: from kvm.laiers.local (HELO kvm.localnet) (192.168.4.200) by router.laiers.local with SMTP; 9 Jul 2009 20:35:58 -0000 From: Max Laier Organization: FreeBSD To: Brian Somers Date: Thu, 9 Jul 2009 22:35:18 +0200 User-Agent: KMail/1.11.3 (Linux/2.6.30-rc5-ARCH; KDE/4.2.3; x86_64; ; ) References: <200907090912.n699CGx0077581@svn.freebsd.org> <20090709103126.02bf7206@Awfulhak.org> In-Reply-To: <20090709103126.02bf7206@Awfulhak.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907092235.18828.max@love2party.net> X-Provags-ID: V01U2FsdGVkX1+1HYrYccpGZ4fY3FRaiV87d2VRGRl4HLWwOa9 CBu3WBy0SlZLQ8sbVLuA6iiMDY5pYx8jU51IdzzkwT512D5VRF KEtvu2Ts3in4tBkVa/rRg== Cc: svn-src-stable-7@freebsd.org, svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Konstantin Belousov Subject: Re: svn commit: r195485 - in stable/7/sys: . contrib/pf kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2009 20:48:36 -0000 On Thursday 09 July 2009 19:31:26 Brian Somers wrote: > On Thu, 9 Jul 2009 09:12:16 +0000 (UTC), Konstantin Belousov wrote: > > Author: kib > > Date: Thu Jul 9 09:12:16 2009 > > New Revision: 195485 > > URL: http://svn.freebsd.org/changeset/base/195485 > > > > Log: > > MFC r194993: > > In lf_iteratelocks_vnode, increment state->ls_threads around iterating > > of the vnode advisory lock list. This prevents deallocation of state > > while inside the loop. > > > > Modified: > > stable/7/sys/ (props changed) > > stable/7/sys/contrib/pf/ (props changed) > > stable/7/sys/kern/kern_lockf.c > > Just picking on this commit.... > > Are the properties on stable/7/sys/contrib/pf intentional or should > they merged into stable/7/sys (a no-op hopefully) and removed? No it shouldn't[*]. The problem is that contrib/pf is - as the path suggests - backed by contributed code and thus has vendor specific merge info. [*] That being said, I don't really care about the merge info in there - as it turns out, subversion's automerging capabilities are rather poor anyway and I can't see the benefit of the mergeinfo in dealing with vendor code. It's always easy enough to figure out the revisions you want merged and you don't really need the mergeinfo for that. OTOH, it is valuable meta-information that should be recorded - as I recall that's one reason why we switched to subversion in the first place. One way out - which I proposed several times before but never got feedback on - would be to change the hierarchies in vendor-sys to have an extra sys/contrib prefix (e.g. vendor-sys/pf/dist/*sys/contrib*/pf/...). This way we can record the mergeinfo in src/sys as well and get rid of the extra info in contrib/* I'd need some feedback from svn-savvy people to go this road, though. Before somebody asks why pf is the only offender - simply because it's the only sys/contrib source with a post-cvs merge of vendor code to the releng. -- /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News From owner-svn-src-stable@FreeBSD.ORG Fri Jul 10 06:55:30 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C7BFC1065670; Fri, 10 Jul 2009 06:55:30 +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 B56518FC0A; Fri, 10 Jul 2009 06:55:30 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n6A6tUNT009992; Fri, 10 Jul 2009 06:55:30 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6A6tUaW009989; Fri, 10 Jul 2009 06:55:30 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <200907100655.n6A6tUaW009989@svn.freebsd.org> From: Xin LI Date: Fri, 10 Jul 2009 06:55:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195528 - in stable/7/sys: . contrib/pf dev/usb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2009 06:55:31 -0000 Author: delphij Date: Fri Jul 10 06:55:30 2009 New Revision: 195528 URL: http://svn.freebsd.org/changeset/base/195528 Log: MFC r195080 (technically this is not really a MFC but an new implementation of the original patch to apply against 7-STABLE). Add quirks for Actions MP4 player. Submitted by: John Hixson Approved by: re (kib) Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/usb/umass.c stable/7/sys/dev/usb/usbdevs Modified: stable/7/sys/dev/usb/umass.c ============================================================================== --- stable/7/sys/dev/usb/umass.c Fri Jul 10 02:19:57 2009 (r195527) +++ stable/7/sys/dev/usb/umass.c Fri Jul 10 06:55:30 2009 (r195528) @@ -887,6 +887,10 @@ static struct umass_devdescr_t umass_dev UMASS_PROTO_SCSI | UMASS_PROTO_BBB, NO_INQUIRY | NO_SYNCHRONIZE_CACHE }, + { USB_VENDOR_ACTIONS, USB_PRODUCT_ACTIONS_MP4, RID_WILDCARD, + UMASS_PROTO_SCSI | UMASS_PROTO_BBB, + NO_SYNCHRONIZE_CACHE + }, { VID_EOT, PID_EOT, RID_EOT, 0, 0 } }; Modified: stable/7/sys/dev/usb/usbdevs ============================================================================== --- stable/7/sys/dev/usb/usbdevs Fri Jul 10 02:19:57 2009 (r195527) +++ stable/7/sys/dev/usb/usbdevs Fri Jul 10 06:55:30 2009 (r195528) @@ -552,6 +552,7 @@ vendor USI 0x10ab USI vendor PLX 0x10b5 PLX vendor ASANTE 0x10bd Asante vendor SILABS 0x10c4 Silicon Labs +vendor ACTIONS 0x10d6 Actions vendor ANALOG 0x1110 Analog Devices vendor TENX 0x1130 Ten X Technology, Inc. vendor ISSC 0x1131 Integrated System Solution Corp. @@ -2471,6 +2472,9 @@ product WESTERN EXTHDD 0x0400 External product WESTERN HUB 0x0500 USB HUB product WESTERN MYBOOK 0x0901 MyBook External HDD +/* Wilson Co. Ltd products */ +product ACTIONS MP4 0x1101 Mp4 Player + /* Windbond Electronics */ product WINBOND UH104 0x5518 4-port USB Hub From owner-svn-src-stable@FreeBSD.ORG Fri Jul 10 06:57:01 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28E02106567B; Fri, 10 Jul 2009 06:57: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 16AAA8FC14; Fri, 10 Jul 2009 06:57:01 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n6A6v01m010065; Fri, 10 Jul 2009 06:57:00 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6A6v0lK010063; Fri, 10 Jul 2009 06:57:00 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <200907100657.n6A6v0lK010063@svn.freebsd.org> From: Xin LI Date: Fri, 10 Jul 2009 06:57: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: r195529 - in stable/7/sys: . contrib/pf i386/isa X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2009 06:57:02 -0000 Author: delphij Date: Fri Jul 10 06:57:00 2009 New Revision: 195529 URL: http://svn.freebsd.org/changeset/base/195529 Log: MFC r193790: Add line width calculations for 15/16 and 24/32 bit modes in case the "Get Scan Line Length" function fails, as it does in Parallels (in Version 2.2, Build 2112 at least). PR: i386/127367 Obtained from: DragonFly Submitted by: Pedro Giffuni Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/i386/isa/vesa.c Modified: stable/7/sys/i386/isa/vesa.c ============================================================================== --- stable/7/sys/i386/isa/vesa.c Fri Jul 10 06:55:30 2009 (r195528) +++ stable/7/sys/i386/isa/vesa.c Fri Jul 10 06:57:00 2009 (r195529) @@ -1111,6 +1111,14 @@ vesa_set_mode(video_adapter_t *adp, int default: /* shouldn't happen */ vesa_adp->va_line_width = info.vi_width; break; + case 15: + case 16: + vesa_adp->va_line_width = info.vi_width*2; + break; + case 24: + case 32: + vesa_adp->va_line_width = info.vi_width*4; + break; } } else { vesa_adp->va_line_width = info.vi_width; From owner-svn-src-stable@FreeBSD.ORG Fri Jul 10 09:01:55 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2BBF3106566C; Fri, 10 Jul 2009 09:01:55 +0000 (UTC) (envelope-from prvs=1435d1a1eb=brian@FreeBSD.org) Received: from idcmail-mo1so.shaw.ca (idcmail-mo1so.shaw.ca [24.71.223.10]) by mx1.freebsd.org (Postfix) with ESMTP id AAE3F8FC19; Fri, 10 Jul 2009 09:01:54 +0000 (UTC) (envelope-from prvs=1435d1a1eb=brian@FreeBSD.org) Received: from pd2ml2so-ssvc.prod.shaw.ca ([10.0.141.134]) by pd4mo1so-svcs.prod.shaw.ca with ESMTP; 10 Jul 2009 02:33:02 -0600 X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.0 c=1 a=0wvbOQHW_X4A:10 a=4Z0QP1WVBuUwHZGQKe2N1A==:17 a=27BTIGBgAAAA:8 a=6I5d2MoRAAAA:8 a=MMwg4So0AAAA:8 a=WalxI9PLPnwHhWfnXLQA:9 a=PgzLLtScnHhelxcWAe0A:7 a=sSXPXt5biKByYQFK8xRSD45BiAEA:4 a=L4ceHOG9r0gA:10 a=SV7veod9ZcQA:10 a=WJ3hkfHDukgA:10 a=clesq3LJ7767UxsK2kcA:9 a=v52IL87XUYfgkvc_3eNa3bLN4bUA:4 Received: from unknown (HELO store.lan.Awfulhak.org) ([174.7.23.140]) by pd2ml2so-dmz.prod.shaw.ca with ESMTP; 10 Jul 2009 02:33:02 -0600 Received: from store.lan.Awfulhak.org (localhost.localdomain [127.0.0.1]) by localhost (Email Security Appliance) with SMTP id A928FC433AD_A56FCF9B; Fri, 10 Jul 2009 08:34:01 +0000 (GMT) Received: from gw.Awfulhak.org (gw.lan.Awfulhak.org [172.16.0.1]) by store.lan.Awfulhak.org (Sophos Email Appliance) with ESMTP id 67821C460F2_A56FCEEF; Fri, 10 Jul 2009 08:33:50 +0000 (GMT) Received: from dev.lan.Awfulhak.org (brian@dev.lan.Awfulhak.org [172.16.0.5]) by gw.Awfulhak.org (8.14.3/8.14.3) with ESMTP id n6A8WnkU055951; Fri, 10 Jul 2009 01:32:50 -0700 (PDT) (envelope-from brian@FreeBSD.org) Date: Fri, 10 Jul 2009 01:32:43 -0700 From: Brian Somers To: Max Laier Message-ID: <20090710013243.68775e75@dev.lan.Awfulhak.org> In-Reply-To: <200907092235.18828.max@love2party.net> References: <200907090912.n699CGx0077581@svn.freebsd.org> <20090709103126.02bf7206@Awfulhak.org> <200907092235.18828.max@love2party.net> X-Mailer: Claws Mail 3.7.1 (GTK+ 2.16.4; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/rFctUl0UDsGXPXkb74725ab"; protocol="application/pgp-signature" Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Konstantin Belousov , svn-src-stable-7@FreeBSD.org Subject: Re: svn commit: r195485 - in stable/7/sys: . contrib/pf kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2009 09:01:55 -0000 --Sig_/rFctUl0UDsGXPXkb74725ab Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Thu, 9 Jul 2009 22:35:18 +0200 Max Laier wrote: > On Thursday 09 July 2009 19:31:26 Brian Somers wrote: > > On Thu, 9 Jul 2009 09:12:16 +0000 (UTC), Konstantin Belousov=20 > wrote: > > > Author: kib > > > Date: Thu Jul 9 09:12:16 2009 > > > New Revision: 195485 > > > URL: http://svn.freebsd.org/changeset/base/195485 > > > > > > Log: > > > MFC r194993: > > > In lf_iteratelocks_vnode, increment state->ls_threads around iterat= ing > > > of the vnode advisory lock list. This prevents deallocation of state > > > while inside the loop. > > > > > > Modified: > > > stable/7/sys/ (props changed) > > > stable/7/sys/contrib/pf/ (props changed) > > > stable/7/sys/kern/kern_lockf.c > > > > Just picking on this commit.... > > > > Are the properties on stable/7/sys/contrib/pf intentional or should > > they merged into stable/7/sys (a no-op hopefully) and removed? >=20 > No it shouldn't[*]. The problem is that contrib/pf is - as the path sugg= ests=20 > - backed by contributed code and thus has vendor specific merge info. >=20 > [*] That being said, I don't really care about the merge info in there - = as it=20 > turns out, subversion's automerging capabilities are rather poor anyway a= nd I=20 > can't see the benefit of the mergeinfo in dealing with vendor code. It's= =20 > always easy enough to figure out the revisions you want merged and you do= n't=20 > really need the mergeinfo for that. OTOH, it is valuable meta-informatio= n=20 > that should be recorded - as I recall that's one reason why we switched t= o=20 > subversion in the first place. >=20 > One way out - which I proposed several times before but never got feedbac= k on=20 > - would be to change the hierarchies in vendor-sys to have an extra=20 > sys/contrib prefix (e.g. vendor-sys/pf/dist/*sys/contrib*/pf/...). This = way=20 > we can record the mergeinfo in src/sys as well and get rid of the extra i= nfo=20 > in contrib/* I'd need some feedback from svn-savvy people to go this roa= d,=20 > though. >=20 > Before somebody asks why pf is the only offender - simply because it's th= e=20 > only sys/contrib source with a post-cvs merge of vendor code to the relen= g. Yes, I was thinking along the same lines. AFAICT this would work fine with the caveat that it may be necessary to import some vendor code in pieces. If for example a vendor distributed some-package/etc/config-file some-package/bin/program some-package/kernel/driver we might need to import it in two pieces so that we can maintain the contrib/some-package part of the hierarchy when merging sys/, even though the other two hierarchies can be merged directly into src/etc and usr.bin/program directly. However, the bit that I don't understand about the original commit and its update of the contrib/pf mergeinfo is why it's updated at all by svn - it just seems wrong. When I do: cd svn/stable/7/sys svn merge -c NNNNN ^/head/sys given that change NNNNN has nothing to do with pf, I don't understand why subversion updates stable/7/sys/contrib/pf's mergeinfo. Is the "special" thing about sys/contrib/pf just that it already has mergeinfo associated with it? And if so, why does that make it special. Surely having NNNNN in sys's mergeinfo implies that it's been merged to every part beneath sys. Having said all that, svn's --depth switch allows partially sparse tree checkouts, and it's always possible to svn revert part of a merge before committing. This implies that the only way svn could successfully maintain mergeinfo would be to store it at least against every node with a merged modification. Depending on how people branch and merge, this would become very unwieldy very quickly (certainly in other environments if not in ours (we would get away with it because we eventually forget about old branches)). So I guess I'm probably just re-iterating other people's suggestions that svn's merge capabilities are somewhat dysfunctional by design. --=20 Brian Somers Don't _EVER_ lose your sense of humour ! --Sig_/rFctUl0UDsGXPXkb74725ab Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (FreeBSD) iQCVAwUBSlb8sQ7tvOdmanQhAQKWEgP+IurTl/qMrTDE6WZmhfpdOiDuWOHxcr9l r7FUI0PS8sxinwlGBunkaDyQSZbx4UDojhZQuAw/mnuzOZjitEmEs1ERlDSMCCOB ihH0JQKvVZxYjXp4LF+cAL2H8qVNoXG79hnaHGH9Cykrv3jfegGK7qonktSixUCV cUNJxz+S7Js= =UxkA -----END PGP SIGNATURE----- --Sig_/rFctUl0UDsGXPXkb74725ab-- From owner-svn-src-stable@FreeBSD.ORG Fri Jul 10 11:19:21 2009 Return-Path: Delivered-To: svn-src-stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4BC71065675; Fri, 10 Jul 2009 11:19:21 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 7410F8FC08; Fri, 10 Jul 2009 11:19:21 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id B81726D418; Fri, 10 Jul 2009 13:19:20 +0200 (CEST) Received: by ds4.des.no (Postfix, from userid 1001) id 8BDD2844B5; Fri, 10 Jul 2009 13:19:20 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Brian Somers References: <200907090912.n699CGx0077581@svn.freebsd.org> <20090709103126.02bf7206@Awfulhak.org> <200907092235.18828.max@love2party.net> <20090710013243.68775e75@dev.lan.Awfulhak.org> Date: Fri, 10 Jul 2009 13:19:20 +0200 In-Reply-To: <20090710013243.68775e75@dev.lan.Awfulhak.org> (Brian Somers's message of "Fri, 10 Jul 2009 01:32:43 -0700") Message-ID: <86ws6gu6o7.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: src-committers@FreeBSD.org, svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-stable-7@FreeBSD.org, Konstantin Belousov , Max Laier Subject: Re: svn commit: r195485 - in stable/7/sys: . contrib/pf kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2009 11:19:25 -0000 Brian Somers writes: > However, the bit that I don't understand about the original commit and > its update of the contrib/pf mergeinfo is why it's updated at all > [...] Because svn needs to record that the revision you merged into sys was also merged into sys/contrib/pf. > Having said all that, svn's --depth switch allows partially sparse tree > checkouts, and it's always possible to svn revert part of a merge > before committing. Don't. You'd just make things worse. Read http://wiki.freebsd.org/SubversionPrimer and its subpages. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-stable@FreeBSD.ORG Fri Jul 10 19:43:08 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D021106566B; Fri, 10 Jul 2009 19:43:08 +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 39F9F8FC13; Fri, 10 Jul 2009 19:43:08 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n6AJh88r030253; Fri, 10 Jul 2009 19:43:08 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6AJh8SX030247; Fri, 10 Jul 2009 19:43:08 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200907101943.n6AJh8SX030247@svn.freebsd.org> From: Kip Macy Date: Fri, 10 Jul 2009 19:43: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: r195586 - in stable/7/sys: . kern netgraph sys X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2009 19:43:08 -0000 Author: kmacy Date: Fri Jul 10 19:43:07 2009 New Revision: 195586 URL: http://svn.freebsd.org/changeset/base/195586 Log: propagate MFC of 195148 to -STABLE: - Turn the third (islocked) argument of the knote call into flags parameter. Introduce the new flag KNF_NOKQLOCK to allow event callers to be called without KQ_LOCK mtx held. - Modify VFS knote calls to always use KNF_NOKQLOCK flag. This is required for ZFS as its getattr implementation may sleep. Modified: stable/7/sys/ (props changed) stable/7/sys/kern/kern_event.c stable/7/sys/netgraph/ng_ksocket.c stable/7/sys/sys/event.h stable/7/sys/sys/mount.h stable/7/sys/sys/vnode.h Modified: stable/7/sys/kern/kern_event.c ============================================================================== --- stable/7/sys/kern/kern_event.c Fri Jul 10 19:31:05 2009 (r195585) +++ stable/7/sys/kern/kern_event.c Fri Jul 10 19:43:07 2009 (r195586) @@ -1608,17 +1608,18 @@ kqueue_wakeup(struct kqueue *kq) * first. */ void -knote(struct knlist *list, long hint, int islocked) +knote(struct knlist *list, long hint, int lockflags) { struct kqueue *kq; struct knote *kn; + int error; if (list == NULL) return; - KNL_ASSERT_LOCK(list, islocked); + KNL_ASSERT_LOCK(list, lockflags & KNF_LISTLOCKED); - if (!islocked) + if ((lockflags & KNF_LISTLOCKED) == 0) list->kl_lock(list->kl_lockarg); /* @@ -1633,17 +1634,28 @@ knote(struct knlist *list, long hint, in kq = kn->kn_kq; if ((kn->kn_status & KN_INFLUX) != KN_INFLUX) { KQ_LOCK(kq); - if ((kn->kn_status & KN_INFLUX) != KN_INFLUX) { + if ((kn->kn_status & KN_INFLUX) == KN_INFLUX) { + KQ_UNLOCK(kq); + } else if ((lockflags & KNF_NOKQLOCK) != 0) { + kn->kn_status |= KN_INFLUX; + KQ_UNLOCK(kq); + error = kn->kn_fop->f_event(kn, hint); + KQ_LOCK(kq); + kn->kn_status &= ~KN_INFLUX; + if (error) + KNOTE_ACTIVATE(kn, 1); + KQ_UNLOCK_FLUX(kq); + } else { kn->kn_status |= KN_HASKQLOCK; if (kn->kn_fop->f_event(kn, hint)) KNOTE_ACTIVATE(kn, 1); kn->kn_status &= ~KN_HASKQLOCK; + KQ_UNLOCK(kq); } - KQ_UNLOCK(kq); } kq = NULL; } - if (!islocked) + if ((lockflags & KNF_LISTLOCKED) == 0) list->kl_unlock(list->kl_lockarg); } Modified: stable/7/sys/netgraph/ng_ksocket.c ============================================================================== --- stable/7/sys/netgraph/ng_ksocket.c Fri Jul 10 19:31:05 2009 (r195585) +++ stable/7/sys/netgraph/ng_ksocket.c Fri Jul 10 19:43:07 2009 (r195586) @@ -1214,7 +1214,7 @@ ng_ksocket_finish_accept(priv_p priv) SOCK_UNLOCK(so); ACCEPT_UNLOCK(); - /* XXX KNOTE(&head->so_rcv.sb_sel.si_note, 0); */ + /* XXX KNOTE_UNLOCKED(&head->so_rcv.sb_sel.si_note, 0); */ soaccept(so, &sa); Modified: stable/7/sys/sys/event.h ============================================================================== --- stable/7/sys/sys/event.h Fri Jul 10 19:31:05 2009 (r195585) +++ stable/7/sys/sys/event.h Fri Jul 10 19:43:07 2009 (r195586) @@ -135,8 +135,14 @@ struct knlist { MALLOC_DECLARE(M_KQUEUE); #endif -#define KNOTE(list, hist, lock) knote(list, hist, lock) -#define KNOTE_LOCKED(list, hint) knote(list, hint, 1) +/* + * Flags for knote call + */ +#define KNF_LISTLOCKED 0x0001 /* knlist is locked */ +#define KNF_NOKQLOCK 0x0002 /* do not keep KQ_LOCK */ + +#define KNOTE(list, hist, flags) knote(list, hist, flags) +#define KNOTE_LOCKED(list, hint) knote(list, hint, KNF_LISTLOCKED) #define KNOTE_UNLOCKED(list, hint) knote(list, hint, 0) #define KNLIST_EMPTY(list) SLIST_EMPTY(&(list)->kl_list) @@ -204,7 +210,7 @@ struct thread; struct proc; struct knlist; -extern void knote(struct knlist *list, long hint, int islocked); +extern void knote(struct knlist *list, long hint, int lockflags); extern void knote_fork(struct knlist *list, int pid); extern void knlist_add(struct knlist *knl, struct knote *kn, int islocked); extern void knlist_remove(struct knlist *knl, struct knote *kn, int islocked); Modified: stable/7/sys/sys/mount.h ============================================================================== --- stable/7/sys/sys/mount.h Fri Jul 10 19:31:05 2009 (r195585) +++ stable/7/sys/sys/mount.h Fri Jul 10 19:43:07 2009 (r195586) @@ -633,7 +633,7 @@ extern int mpsafe_vfs; #define VFS_KNOTE_LOCKED(vp, hint) do \ { \ if (((vp)->v_vflag & VV_NOKNOTE) == 0) \ - VN_KNOTE((vp), (hint), 1); \ + VN_KNOTE((vp), (hint), KNF_LISTLOCKED); \ } while (0) #define VFS_KNOTE_UNLOCKED(vp, hint) do \ Modified: stable/7/sys/sys/vnode.h ============================================================================== --- stable/7/sys/sys/vnode.h Fri Jul 10 19:31:05 2009 (r195585) +++ stable/7/sys/sys/vnode.h Fri Jul 10 19:43:07 2009 (r195586) @@ -222,9 +222,10 @@ struct xvnode { #define VN_KNOTE(vp, b, a) \ do { \ if (!VN_KNLIST_EMPTY(vp)) \ - KNOTE(&vp->v_pollinfo->vpi_selinfo.si_note, (b), (a)); \ + KNOTE(&vp->v_pollinfo->vpi_selinfo.si_note, (b), \ + (a) | KNF_NOKQLOCK); \ } while (0) -#define VN_KNOTE_LOCKED(vp, b) VN_KNOTE(vp, b, 1) +#define VN_KNOTE_LOCKED(vp, b) VN_KNOTE(vp, b, KNF_LISTLOCKED) #define VN_KNOTE_UNLOCKED(vp, b) VN_KNOTE(vp, b, 0) /* From owner-svn-src-stable@FreeBSD.ORG Sat Jul 11 08:24:52 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 729781065672; Sat, 11 Jul 2009 08:24:52 +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 455508FC0A; Sat, 11 Jul 2009 08:24:52 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n6B8OqU7046804; Sat, 11 Jul 2009 08:24:52 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6B8Oq24046802; Sat, 11 Jul 2009 08:24:52 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200907110824.n6B8Oq24046802@svn.freebsd.org> From: Doug Barton Date: Sat, 11 Jul 2009 08:24: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: r195615 - stable/7/usr.sbin/mergemaster X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2009 08:24:53 -0000 Author: dougb Date: Sat Jul 11 08:24:51 2009 New Revision: 195615 URL: http://svn.freebsd.org/changeset/base/195615 Log: MFC r193853, update -U message when there is no mtree db, dramatically reduce the size of the saved mtree db, streamline find command for the main loop, and remove a spurious comment. Modified: stable/7/usr.sbin/mergemaster/ (props changed) stable/7/usr.sbin/mergemaster/mergemaster.sh Modified: stable/7/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- stable/7/usr.sbin/mergemaster/mergemaster.sh Sat Jul 11 08:10:18 2009 (r195614) +++ stable/7/usr.sbin/mergemaster/mergemaster.sh Sat Jul 11 08:24:51 2009 (r195615) @@ -353,7 +353,8 @@ case "${AUTO_UPGRADE}" in *) if [ ! -s "${DESTDIR}${MTREEFILE}" ]; then echo '' - echo "*** Unable to find mtree database. Skipping auto-upgrade." + echo "*** Unable to find mtree database. Skipping auto-upgrade on this run." + echo " It will be created for the next run when this one is complete." echo '' press_to_continue unset AUTO_UPGRADE @@ -674,8 +675,11 @@ rm -f ${TEMPROOT}/etc/*.db ${TEMPROOT}/e # We only need to compare things like freebsd.cf once find ${TEMPROOT}/usr/obj -type f -delete 2>/dev/null -# Delete 0 length files to make the mtree database as small as possible. +# Delete stuff we do not need to keep the mtree database small, +# and to make the actual comparison faster. +find ${TEMPROOT}/usr -type l -delete 2>/dev/null find ${TEMPROOT} -type f -size 0 -delete 2>/dev/null +find -d ${TEMPROOT} -type d -empty -delete 2>/dev/null # Build the mtree database in a temporary location. MTREENEW=`mktemp -t mergemaster.mtree` @@ -963,11 +967,7 @@ if [ -r "${MM_PRE_COMPARE_SCRIPT}" ]; th . "${MM_PRE_COMPARE_SCRIPT}" fi -# Using -size +0 avoids uselessly checking the empty log files created -# by ${SOURCEDIR}/etc/Makefile and the device entries in ./dev, but does -# check the scripts in ./dev, as we'd like (assuming no devfs of course). -# -for COMPFILE in `find . -type f -size +0`; do +for COMPFILE in `find . -type f`; do # First, check to see if the file exists in DESTDIR. If not, the # diff_loop function knows how to handle it. From owner-svn-src-stable@FreeBSD.ORG Sat Jul 11 08:25:44 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 133C41065679; Sat, 11 Jul 2009 08:25:44 +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 DA3C48FC25; Sat, 11 Jul 2009 08:25:43 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n6B8PhXB046875; Sat, 11 Jul 2009 08:25:43 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6B8PhD1046873; Sat, 11 Jul 2009 08:25:43 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200907110825.n6B8PhD1046873@svn.freebsd.org> From: Doug Barton Date: Sat, 11 Jul 2009 08:25:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195616 - stable/6/usr.sbin/mergemaster X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2009 08:25:45 -0000 Author: dougb Date: Sat Jul 11 08:25:43 2009 New Revision: 195616 URL: http://svn.freebsd.org/changeset/base/195616 Log: MFC r193853, update -U message when there is no mtree db, dramatically reduce the size of the saved mtree db, streamline find command for the main loop, and remove a spurious comment. Modified: stable/6/usr.sbin/mergemaster/ (props changed) stable/6/usr.sbin/mergemaster/mergemaster.sh Modified: stable/6/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- stable/6/usr.sbin/mergemaster/mergemaster.sh Sat Jul 11 08:24:51 2009 (r195615) +++ stable/6/usr.sbin/mergemaster/mergemaster.sh Sat Jul 11 08:25:43 2009 (r195616) @@ -353,7 +353,8 @@ case "${AUTO_UPGRADE}" in *) if [ ! -s "${DESTDIR}${MTREEFILE}" ]; then echo '' - echo "*** Unable to find mtree database. Skipping auto-upgrade." + echo "*** Unable to find mtree database. Skipping auto-upgrade on this run." + echo " It will be created for the next run when this one is complete." echo '' press_to_continue unset AUTO_UPGRADE @@ -668,8 +669,11 @@ rm -f ${TEMPROOT}/etc/*.db ${TEMPROOT}/e # We only need to compare things like freebsd.cf once find ${TEMPROOT}/usr/obj -type f -delete 2>/dev/null -# Delete 0 length files to make the mtree database as small as possible. +# Delete stuff we do not need to keep the mtree database small, +# and to make the actual comparison faster. +find ${TEMPROOT}/usr -type l -delete 2>/dev/null find ${TEMPROOT} -type f -size 0 -delete 2>/dev/null +find -d ${TEMPROOT} -type d -empty -delete 2>/dev/null # Build the mtree database in a temporary location. MTREENEW=`mktemp -t mergemaster.mtree` @@ -957,11 +961,7 @@ if [ -r "${MM_PRE_COMPARE_SCRIPT}" ]; th . "${MM_PRE_COMPARE_SCRIPT}" fi -# Using -size +0 avoids uselessly checking the empty log files created -# by ${SOURCEDIR}/etc/Makefile and the device entries in ./dev, but does -# check the scripts in ./dev, as we'd like (assuming no devfs of course). -# -for COMPFILE in `find . -type f -size +0`; do +for COMPFILE in `find . -type f`; do # First, check to see if the file exists in DESTDIR. If not, the # diff_loop function knows how to handle it. From owner-svn-src-stable@FreeBSD.ORG Sat Jul 11 08:27:48 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B43B6106564A; Sat, 11 Jul 2009 08:27:48 +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 A1B748FC1E; Sat, 11 Jul 2009 08:27:48 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n6B8RmrU046953; Sat, 11 Jul 2009 08:27:48 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6B8Rm1K046951; Sat, 11 Jul 2009 08:27:48 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200907110827.n6B8Rm1K046951@svn.freebsd.org> From: Doug Barton Date: Sat, 11 Jul 2009 08:27: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: r195617 - stable/7/sys/geom/label X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2009 08:27:49 -0000 Author: dougb Date: Sat Jul 11 08:27:48 2009 New Revision: 195617 URL: http://svn.freebsd.org/changeset/base/195617 Log: MFC r193131, Crank the debug level necessary to display the "Label foo is removed" and "Label for provider ..." messages up from 0 to 1. Modified: stable/7/sys/geom/label/ (props changed) stable/7/sys/geom/label/g_label.c (contents, props changed) Modified: stable/7/sys/geom/label/g_label.c ============================================================================== --- stable/7/sys/geom/label/g_label.c Sat Jul 11 08:25:43 2009 (r195616) +++ stable/7/sys/geom/label/g_label.c Sat Jul 11 08:27:48 2009 (r195617) @@ -104,7 +104,7 @@ static void g_label_orphan(struct g_consumer *cp) { - G_LABEL_DEBUG(0, "Label %s removed.", + G_LABEL_DEBUG(1, "Label %s removed.", LIST_FIRST(&cp->geom->provider)->name); g_slice_orphan(cp); } @@ -113,7 +113,7 @@ static void g_label_spoiled(struct g_consumer *cp) { - G_LABEL_DEBUG(0, "Label %s removed.", + G_LABEL_DEBUG(1, "Label %s removed.", LIST_FIRST(&cp->geom->provider)->name); g_slice_spoiled(cp); } @@ -181,7 +181,7 @@ g_label_create(struct gctl_req *req, str g_access(cp, -1, 0, 0); g_slice_config(gp, 0, G_SLICE_CONFIG_SET, (off_t)0, mediasize, pp->sectorsize, name); - G_LABEL_DEBUG(0, "Label for provider %s is %s.", pp->name, name); + G_LABEL_DEBUG(1, "Label for provider %s is %s.", pp->name, name); return (gp); } @@ -203,7 +203,7 @@ g_label_destroy(struct g_geom *gp, boole return (EBUSY); } } else { - G_LABEL_DEBUG(0, "Label %s removed.", + G_LABEL_DEBUG(1, "Label %s removed.", LIST_FIRST(&gp->provider)->name); } g_slice_spoiled(LIST_FIRST(&gp->consumer));