From owner-svn-src-stable-7@FreeBSD.ORG Sun Dec 6 02:44:56 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 044BA106566B; Sun, 6 Dec 2009 02:44:56 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CD11F8FC0A; Sun, 6 Dec 2009 02:44:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB62itf1007961; Sun, 6 Dec 2009 02:44:55 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB62itqR007958; Sun, 6 Dec 2009 02:44:55 GMT (envelope-from np@svn.freebsd.org) Message-Id: <200912060244.nB62itqR007958@svn.freebsd.org> From: Navdeep Parhar Date: Sun, 6 Dec 2009 02:44:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r200177 - in stable/7/sys/dev/cxgb: . common X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Dec 2009 02:44:56 -0000 Author: np Date: Sun Dec 6 02:44:55 2009 New Revision: 200177 URL: http://svn.freebsd.org/changeset/base/200177 Log: MFC r199237, r199238 sc->rev and is_offload(sc) will always be 0 during probe. Wait till attach to get correct values. Make sure *some* edc is setup even for an unknown transceiver (assume it is optical). Modified: stable/7/sys/dev/cxgb/common/cxgb_ael1002.c stable/7/sys/dev/cxgb/cxgb_main.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/cxgb/common/cxgb_ael1002.c ============================================================================== --- stable/7/sys/dev/cxgb/common/cxgb_ael1002.c Sun Dec 6 01:59:06 2009 (r200176) +++ stable/7/sys/dev/cxgb/common/cxgb_ael1002.c Sun Dec 6 02:44:55 2009 (r200177) @@ -1250,7 +1250,7 @@ static int ael2005_reset(struct cphy *ph return err; phy->modtype = (u8)err; - if (err == phy_modtype_none || err == phy_modtype_unknown) + if (err == phy_modtype_none) err = 0; else if (err == phy_modtype_twinax || err == phy_modtype_twinax_long) err = ael2005_setup_twinax_edc(phy, err); Modified: stable/7/sys/dev/cxgb/cxgb_main.c ============================================================================== --- stable/7/sys/dev/cxgb/cxgb_main.c Sun Dec 6 01:59:06 2009 (r200176) +++ stable/7/sys/dev/cxgb/cxgb_main.c Sun Dec 6 02:44:55 2009 (r200177) @@ -356,7 +356,6 @@ cxgb_controller_probe(device_t dev) const struct adapter_info *ai; char *ports, buf[80]; int nports; - struct adapter *sc = device_get_softc(dev); ai = cxgb_get_adapter_info(dev); if (ai == NULL) @@ -368,9 +367,7 @@ cxgb_controller_probe(device_t dev) else ports = "ports"; - snprintf(buf, sizeof(buf), "%s %sNIC, rev: %d nports: %d %s", - ai->desc, is_offload(sc) ? "R" : "", - sc->params.rev, nports, ports); + snprintf(buf, sizeof(buf), "%s, %d %s", ai->desc, nports, ports); device_set_desc_copy(dev, buf); return (BUS_PROBE_DEFAULT); } @@ -663,8 +660,8 @@ cxgb_controller_attach(device_t dev) G_FW_VERSION_MAJOR(vers), G_FW_VERSION_MINOR(vers), G_FW_VERSION_MICRO(vers)); - snprintf(buf, sizeof(buf), "%s\t E/C: %s S/N: %s", - ai->desc, + snprintf(buf, sizeof(buf), "%s %sNIC\t E/C: %s S/N: %s", + ai->desc, is_offload(sc) ? "R" : "", sc->params.vpd.ec, sc->params.vpd.sn); device_set_desc_copy(dev, buf); From owner-svn-src-stable-7@FreeBSD.ORG Mon Dec 7 13:38:11 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60B73106566B; Mon, 7 Dec 2009 13:38:11 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 500F58FC14; Mon, 7 Dec 2009 13:38:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB7DcBQi055383; Mon, 7 Dec 2009 13:38:11 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB7DcB3l055382; Mon, 7 Dec 2009 13:38:11 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <200912071338.nB7DcB3l055382@svn.freebsd.org> From: Jaakko Heinonen Date: Mon, 7 Dec 2009 13:38: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: r200212 - stable/7/sys/nfsserver X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2009 13:38:11 -0000 Author: jh Date: Mon Dec 7 13:38:10 2009 New Revision: 200212 URL: http://svn.freebsd.org/changeset/base/200212 Log: MFC r197525: Ensure that tv_sec is between INT32_MIN and INT32_MAX, so ZFS won't object. This completes the fix from r185586. Approved by: trasz (mentor) Modified: stable/7/sys/nfsserver/nfs_serv.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/nfsserver/nfs_serv.c ============================================================================== --- stable/7/sys/nfsserver/nfs_serv.c Mon Dec 7 08:38:44 2009 (r200211) +++ stable/7/sys/nfsserver/nfs_serv.c Mon Dec 7 13:38:10 2009 (r200212) @@ -1743,7 +1743,7 @@ nfsrv_create(struct nfsrv_descript *nfsd tl = nfsm_dissect_nonblock(u_int32_t *, NFSX_V3CREATEVERF); /* Unique bytes, endianness is not important. */ - cverf.tv_sec = tl[0]; + cverf.tv_sec = (int32_t)tl[0]; cverf.tv_nsec = tl[1]; exclusive_flag = 1; break; From owner-svn-src-stable-7@FreeBSD.ORG Mon Dec 7 17:15:36 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E27B0106568B; Mon, 7 Dec 2009 17:15:36 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CF8BC8FC1B; Mon, 7 Dec 2009 17:15:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB7HFaTN060300; Mon, 7 Dec 2009 17:15:36 GMT (envelope-from rnoland@svn.freebsd.org) Received: (from rnoland@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB7HFaHv060295; Mon, 7 Dec 2009 17:15:36 GMT (envelope-from rnoland@svn.freebsd.org) Message-Id: <200912071715.nB7HFaHv060295@svn.freebsd.org> From: Robert Noland Date: Mon, 7 Dec 2009 17:15: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: r200221 - in stable/7/sys/boot: . i386 i386/loader i386/zfsboot i386/zfsloader X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2009 17:15:37 -0000 Author: rnoland Date: Mon Dec 7 17:15:36 2009 New Revision: 200221 URL: http://svn.freebsd.org/changeset/base/200221 Log: MFC 199714 Create a seperate ZFS enabled loader. This adds zfsloader which will be called by zfsboot/gptzfsboot code rather than the tradional loader. This eliminates the need to set the LOADER_ZFS_SUPPORT variable in order to get a ZFS enabled loader. Note however, that you must reinstall your bootcode (zfsboot/gptzfsboot) in order for the boot process to use the new loader. New installations will no longer be required to build a ZFS enabled loader for a working ZFS boot system. Installing zfsboot/gptzfsboot is sufficient for acknowledging the use of CDDL code and therefore the ZFS enabled loader. Added: stable/7/sys/boot/i386/zfsloader/ - copied from r199714, head/sys/boot/i386/zfsloader/ Modified: stable/7/sys/boot/Makefile stable/7/sys/boot/i386/Makefile stable/7/sys/boot/i386/loader/Makefile stable/7/sys/boot/i386/zfsboot/zfsboot.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/boot/Makefile ============================================================================== --- stable/7/sys/boot/Makefile Mon Dec 7 16:37:02 2009 (r200220) +++ stable/7/sys/boot/Makefile Mon Dec 7 17:15:36 2009 (r200221) @@ -17,7 +17,7 @@ SUBDIR+= efi SUBDIR+= ofw .endif -.if ${MK_ZFS} != "no" +.if ${MACHINE_ARCH} == "amd64" || ${MACHINE} == "i386" SUBDIR+= zfs .endif Modified: stable/7/sys/boot/i386/Makefile ============================================================================== --- stable/7/sys/boot/i386/Makefile Mon Dec 7 16:37:02 2009 (r200220) +++ stable/7/sys/boot/i386/Makefile Mon Dec 7 17:15:36 2009 (r200221) @@ -1,8 +1,8 @@ # $FreeBSD$ .include -SUBDIR= mbr pmbr boot0 boot0sio btx boot2 cdboot gptboot \ - zfsboot gptzfsboot kgzldr libi386 libfirewire loader +SUBDIR= mbr pmbr boot0 boot0sio btx boot2 cdboot gptboot zfsboot \ + gptzfsboot kgzldr libi386 libfirewire loader zfsloader # special boot programs, 'self-extracting boot2+loader' SUBDIR+= pxeldr Modified: stable/7/sys/boot/i386/loader/Makefile ============================================================================== --- stable/7/sys/boot/i386/loader/Makefile Mon Dec 7 16:37:02 2009 (r200220) +++ stable/7/sys/boot/i386/loader/Makefile Mon Dec 7 17:15:36 2009 (r200221) @@ -2,9 +2,10 @@ .include -PROG= loader.sym +LOADER?= loader +PROG= ${LOADER}.sym INTERNALPROG= -NEWVERSWHAT= "bootstrap loader" i386 +NEWVERSWHAT?= "bootstrap loader" i386 # architecture-specific loader code SRCS= main.c conf.c vers.c @@ -15,7 +16,7 @@ CFLAGS+= -DLOADER_FIREWIRE_SUPPORT LIBFIREWIRE= ${.OBJDIR}/../libfirewire/libfirewire.a .endif -# Put LOADER_ZFS_SUPPORT=yes in /etc/make.conf for ZFS support +# Set by zfsloader Makefile #.if ${MK_ZFS} != "no" #CFLAGS+= -DLOADER_ZFS_SUPPORT #LIBZFS= ${.OBJDIR}/../../zfs/libzfsboot.a @@ -60,7 +61,7 @@ CFLAGS+= -DLOADER_GPT_SUPPORT CFLAGS+= -I${.CURDIR}/../../common CFLAGS+= -I. -CLEANFILES= vers.c loader loader.bin loader.help +CLEANFILES= vers.c ${LOADER} ${LOADER}.bin loader.help CFLAGS+= -Wall LDFLAGS= -static -Ttext 0x0 @@ -79,30 +80,35 @@ CFLAGS+= -I${.CURDIR}/../btx/lib # Pick up ../Makefile.inc early. .include -vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version - sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT} +vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../loader/version + sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../loader/version \ + ${NEWVERSWHAT} -loader: loader.bin ${BTXLDR} ${BTXKERN} +${LOADER}: ${LOADER}.bin ${BTXLDR} ${BTXKERN} btxld -v -f aout -e ${LOADER_ADDRESS} -o ${.TARGET} -l ${BTXLDR} \ - -b ${BTXKERN} loader.bin + -b ${BTXKERN} ${LOADER}.bin -loader.bin: loader.sym +${LOADER}.bin: ${LOADER}.sym cp ${.ALLSRC} ${.TARGET} strip -R .comment -R .note ${.TARGET} loader.help: help.common help.i386 cat ${.ALLSRC} | awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET} +FILES= ${LOADER} +# XXX INSTALLFLAGS_loader= -b +FILESMODE_${LOADER}= ${BINMODE} -b + +.if !defined(LOADER_ONLY) .PATH: ${.CURDIR}/../../forth -FILES= loader loader.help loader.4th support.4th loader.conf +FILES+= loader.help loader.4th support.4th loader.conf FILES+= screen.4th frames.4th beastie.4th -# XXX INSTALLFLAGS_loader= -b -FILESMODE_loader= ${BINMODE} -b FILESDIR_loader.conf= /boot/defaults .if !exists(${DESTDIR}/boot/loader.rc) FILES+= loader.rc .endif +.endif # XXX crt0.o needs to be first for pxeboot(8) to work OBJS= ${BTXCRT} Modified: stable/7/sys/boot/i386/zfsboot/zfsboot.c ============================================================================== --- stable/7/sys/boot/i386/zfsboot/zfsboot.c Mon Dec 7 16:37:02 2009 (r200220) +++ stable/7/sys/boot/i386/zfsboot/zfsboot.c Mon Dec 7 17:15:36 2009 (r200221) @@ -84,7 +84,7 @@ __FBSDID("$FreeBSD$"); #define KARGS_FLAGS_ZFS 0x4 #define PATH_CONFIG "/boot.config" -#define PATH_BOOT3 "/boot/loader" +#define PATH_BOOT3 "/boot/zfsloader" #define PATH_KERNEL "/boot/kernel/kernel" #define ARGS 0x900 From owner-svn-src-stable-7@FreeBSD.ORG Mon Dec 7 19:07:59 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 179F51065696; Mon, 7 Dec 2009 19:07:59 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 055228FC14; Mon, 7 Dec 2009 19:07:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB7J7w2U062892; Mon, 7 Dec 2009 19:07:58 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB7J7wpY062890; Mon, 7 Dec 2009 19:07:58 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200912071907.nB7J7wpY062890@svn.freebsd.org> From: John Baldwin Date: Mon, 7 Dec 2009 19:07:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r200225 - stable/7/lib/libc/rpc X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2009 19:07:59 -0000 Author: jhb Date: Mon Dec 7 19:07:58 2009 New Revision: 200225 URL: http://svn.freebsd.org/changeset/base/200225 Log: MFC 200061: The fd_mask type is an unsigned long, not an int, so treat the mask as a long instead of an int when examining the results of select() to look for RPC requests. Previously this routine would ignore RPC requests to sockets whose file descriptor mod 64 was greater than 31 on a 64-bit platform. Modified: stable/7/lib/libc/rpc/svc.c Directory Properties: stable/7/lib/libc/ (props changed) Modified: stable/7/lib/libc/rpc/svc.c ============================================================================== --- stable/7/lib/libc/rpc/svc.c Mon Dec 7 19:07:45 2009 (r200224) +++ stable/7/lib/libc/rpc/svc.c Mon Dec 7 19:07:58 2009 (r200225) @@ -596,8 +596,8 @@ svc_getreqset(readfds) maskp = readfds->fds_bits; for (sock = 0; sock < FD_SETSIZE; sock += NFDBITS) { - for (mask = *maskp++; (bit = ffs(mask)) != 0; - mask ^= (1 << (bit - 1))) { + for (mask = *maskp++; (bit = ffsl(mask)) != 0; + mask ^= (1ul << (bit - 1))) { /* sock has input waiting */ fd = sock + bit - 1; svc_getreq_common(fd); From owner-svn-src-stable-7@FreeBSD.ORG Mon Dec 7 20:46:22 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8BA12106566C; Mon, 7 Dec 2009 20:46:22 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7964E8FC13; Mon, 7 Dec 2009 20:46:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB7KkMvp065538; Mon, 7 Dec 2009 20:46:22 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB7KkMNP065536; Mon, 7 Dec 2009 20:46:22 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <200912072046.nB7KkMNP065536@svn.freebsd.org> From: Fabien Thomas Date: Mon, 7 Dec 2009 20:46:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r200234 - stable/7/sys/dev/hwpmc X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2009 20:46:22 -0000 Author: fabient Date: Mon Dec 7 20:46:22 2009 New Revision: 200234 URL: http://svn.freebsd.org/changeset/base/200234 Log: MFC 198432: Only claim that the PMC_CLASS_IAF PMCs are supported by a CPU if there are PMCs on the CPU that belong to the class. Modified: stable/7/sys/dev/hwpmc/hwpmc_core.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/7/sys/dev/hwpmc/hwpmc_core.c Mon Dec 7 20:44:43 2009 (r200233) +++ stable/7/sys/dev/hwpmc/hwpmc_core.c Mon Dec 7 20:46:22 2009 (r200234) @@ -1954,11 +1954,21 @@ pmc_core_initialize(struct pmc_mdep *md, core_iaf_npmc = cpuid[CORE_CPUID_EDX] & 0x1F; core_iaf_width = (cpuid[CORE_CPUID_EDX] >> 5) & 0xFF; - iaf_initialize(md, maxcpu, core_iaf_npmc, core_iaf_width); - - core_pmcmask |= ((1ULL << core_iaf_npmc) - 1) << - IAF_OFFSET; - + if (core_iaf_npmc > 0) { + iaf_initialize(md, maxcpu, core_iaf_npmc, + core_iaf_width); + core_pmcmask |= ((1ULL << core_iaf_npmc) - 1) << + IAF_OFFSET; + } else { + /* + * Adjust the number of classes exported to + * user space. + */ + md->pmd_nclass--; + KASSERT(md->pmd_nclass == 2, + ("[core,%d] unexpected nclass %d", __LINE__, + md->pmd_nclass)); + } } PMCDBG(MDP,INI,1,"core-init pmcmask=0x%jx iafri=%d", core_pmcmask, From owner-svn-src-stable-7@FreeBSD.ORG Mon Dec 7 20:47:33 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 83E44106566C; Mon, 7 Dec 2009 20:47:33 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 71C6F8FC08; Mon, 7 Dec 2009 20:47:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB7KlXxQ065612; Mon, 7 Dec 2009 20:47:33 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB7KlXVp065610; Mon, 7 Dec 2009 20:47:33 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <200912072047.nB7KlXVp065610@svn.freebsd.org> From: Fabien Thomas Date: Mon, 7 Dec 2009 20:47:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r200235 - stable/7/lib/libpmc X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2009 20:47:33 -0000 Author: fabient Date: Mon Dec 7 20:47:33 2009 New Revision: 200235 URL: http://svn.freebsd.org/changeset/base/200235 Log: MFC 198433: Not all Intel Core (TM) CPUs implement PMC_CLASS_IAF fixed-function counters. For such CPUs, use an alternate mapping of convenience names to events supported by PMC_CLASS_IAP programmable counters. Modified: stable/7/lib/libpmc/libpmc.c Directory Properties: stable/7/lib/libpmc/ (props changed) Modified: stable/7/lib/libpmc/libpmc.c ============================================================================== --- stable/7/lib/libpmc/libpmc.c Mon Dec 7 20:46:22 2009 (r200234) +++ stable/7/lib/libpmc/libpmc.c Mon Dec 7 20:47:33 2009 (r200235) @@ -442,6 +442,10 @@ static struct pmc_event_alias core_alias /* * Intel Core2 (Family 6, Model F), Core2Extreme (Family 6, Model 17H) * and Atom (Family 6, model 1CH) PMCs. + * + * We map aliases to events on the fixed-function counters if these + * are present. Note that not all CPUs in this family contain fixed-function + * counters. */ static struct pmc_event_alias core2_aliases[] = { @@ -454,8 +458,22 @@ static struct pmc_event_alias core2_alia EV_ALIAS("unhalted-cycles", "iaf-cpu-clk-unhalted.core"), EV_ALIAS(NULL, NULL) }; -#define atom_aliases core2_aliases -#define corei7_aliases core2_aliases + +static struct pmc_event_alias core2_aliases_without_iaf[] = { + EV_ALIAS("branches", "iap-br-inst-retired.any"), + EV_ALIAS("branch-mispredicts", "iap-br-inst-retired.mispred"), + EV_ALIAS("cycles", "tsc-tsc"), + EV_ALIAS("ic-misses", "iap-l1i-misses"), + EV_ALIAS("instructions", "iap-inst-retired.any_p"), + EV_ALIAS("interrupts", "iap-hw-int-rcv"), + EV_ALIAS("unhalted-cycles", "iap-cpu-clk-unhalted.core_p"), + EV_ALIAS(NULL, NULL) +}; + +#define atom_aliases core2_aliases +#define atom_aliases_without_iaf core2_aliases_without_iaf +#define corei7_aliases core2_aliases +#define corei7_aliases_without_iaf core2_aliases_without_iaf #define IAF_KW_OS "os" #define IAF_KW_USR "usr" @@ -2379,6 +2397,10 @@ pmc_init(void) uint32_t abi_version; struct module_stat pmc_modstat; struct pmc_op_getcpuinfo op_cpu_info; +#if defined(__amd64__) || defined(__i386__) + int cpu_has_iaf_counters; + unsigned int t; +#endif if (pmc_syscall != -1) /* already inited */ return (0); @@ -2420,6 +2442,8 @@ pmc_init(void) if (pmc_class_table == NULL) return (-1); + for (n = 0; n < PMC_CLASS_TABLE_SIZE; n++) + pmc_class_table[n] = NULL; /* * Fill in the class table. @@ -2427,6 +2451,14 @@ pmc_init(void) n = 0; #if defined(__amd64__) || defined(__i386__) pmc_class_table[n++] = &tsc_class_table_descr; + + /* + * Check if this CPU has fixed function counters. + */ + cpu_has_iaf_counters = 0; + for (t = 0; t < cpu_info.pm_nclass; t++) + if (cpu_info.pm_classes[t].pm_class == PMC_CLASS_IAF) + cpu_has_iaf_counters = 1; #endif #define PMC_MDEP_INIT(C) do { \ @@ -2436,6 +2468,16 @@ pmc_init(void) PMC_TABLE_SIZE(C##_pmc_classes); \ } while (0) +#define PMC_MDEP_INIT_INTEL_V2(C) do { \ + PMC_MDEP_INIT(C); \ + if (cpu_has_iaf_counters) \ + pmc_class_table[n++] = &iaf_class_table_descr; \ + else \ + pmc_mdep_event_aliases = \ + C##_aliases_without_iaf; \ + pmc_class_table[n] = &C##_class_table_descr; \ + } while (0) + /* Configure the event name parser. */ switch (cpu_info.pm_cputype) { #if defined(__i386__) @@ -2461,24 +2503,17 @@ pmc_init(void) pmc_class_table[n] = &k8_class_table_descr; break; case PMC_CPU_INTEL_ATOM: - PMC_MDEP_INIT(atom); - pmc_class_table[n++] = &iaf_class_table_descr; - pmc_class_table[n] = &atom_class_table_descr; + PMC_MDEP_INIT_INTEL_V2(atom); break; case PMC_CPU_INTEL_CORE: PMC_MDEP_INIT(core); - pmc_class_table[n] = &core_class_table_descr; break; case PMC_CPU_INTEL_CORE2: case PMC_CPU_INTEL_CORE2EXTREME: - PMC_MDEP_INIT(core2); - pmc_class_table[n++] = &iaf_class_table_descr; - pmc_class_table[n] = &core2_class_table_descr; + PMC_MDEP_INIT_INTEL_V2(core2); break; case PMC_CPU_INTEL_COREI7: - PMC_MDEP_INIT(corei7); - pmc_class_table[n++] = &iaf_class_table_descr; - pmc_class_table[n] = &corei7_class_table_descr; + PMC_MDEP_INIT_INTEL_V2(corei7); break; case PMC_CPU_INTEL_PIV: PMC_MDEP_INIT(p4); From owner-svn-src-stable-7@FreeBSD.ORG Mon Dec 7 20:51:19 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C5D31065672; Mon, 7 Dec 2009 20:51:19 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6A6A98FC0C; Mon, 7 Dec 2009 20:51:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB7KpJxU065782; Mon, 7 Dec 2009 20:51:19 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB7KpJ85065780; Mon, 7 Dec 2009 20:51:19 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <200912072051.nB7KpJ85065780@svn.freebsd.org> From: Fabien Thomas Date: Mon, 7 Dec 2009 20:51:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r200237 - stable/7/sys/dev/hwpmc X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2009 20:51:19 -0000 Author: fabient Date: Mon Dec 7 20:51:19 2009 New Revision: 200237 URL: http://svn.freebsd.org/changeset/base/200237 Log: MFC 200060: Use a better check for a valid kernel stack address when capturing kernel call chains. Modified: stable/7/sys/dev/hwpmc/hwpmc_x86.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/hwpmc/hwpmc_x86.c ============================================================================== --- stable/7/sys/dev/hwpmc/hwpmc_x86.c Mon Dec 7 20:49:49 2009 (r200236) +++ stable/7/sys/dev/hwpmc/hwpmc_x86.c Mon Dec 7 20:51:19 2009 (r200237) @@ -176,7 +176,8 @@ pmc_save_kernel_callchain(uintptr_t *cc, stackend = (uintptr_t) td->td_kstack + td->td_kstack_pages * PAGE_SIZE; if (PMC_IN_TRAP_HANDLER(pc) || - !PMC_IN_KERNEL(pc) || !PMC_IN_KERNEL(r) || + !PMC_IN_KERNEL(pc) || + !PMC_IN_KERNEL_STACK(r, stackstart, stackend) || !PMC_IN_KERNEL_STACK(sp, stackstart, stackend) || !PMC_IN_KERNEL_STACK(fp, stackstart, stackend)) return (1); @@ -221,7 +222,7 @@ pmc_save_kernel_callchain(uintptr_t *cc, r = fp + sizeof(uintptr_t); if (!PMC_IN_KERNEL_STACK(fp, stackstart, stackend) || - !PMC_IN_KERNEL(r)) + !PMC_IN_KERNEL_STACK(r, stackstart, stackend)) break; pc = *(uintptr_t *) r; fp = *(uintptr_t *) fp; From owner-svn-src-stable-7@FreeBSD.ORG Tue Dec 8 15:16:48 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A6D3C106566B; Tue, 8 Dec 2009 15:16:48 +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 9562C8FC19; Tue, 8 Dec 2009 15:16:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB8FGmsm091556; Tue, 8 Dec 2009 15:16:48 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB8FGmYQ091554; Tue, 8 Dec 2009 15:16:48 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <200912081516.nB8FGmYQ091554@svn.freebsd.org> From: Andriy Gapon Date: Tue, 8 Dec 2009 15:16: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: r200259 - stable/7/sys/dev/ichsmb X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2009 15:16:48 -0000 Author: avg Date: Tue Dec 8 15:16:48 2009 New Revision: 200259 URL: http://svn.freebsd.org/changeset/base/200259 Log: MFC r200052: ichsmb: add pci ids for some newer supported hardware Modified: stable/7/sys/dev/ichsmb/ichsmb_pci.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/ichsmb/ichsmb_pci.c ============================================================================== --- stable/7/sys/dev/ichsmb/ichsmb_pci.c Tue Dec 8 15:14:55 2009 (r200258) +++ stable/7/sys/dev/ichsmb/ichsmb_pci.c Tue Dec 8 15:16:48 2009 (r200259) @@ -75,6 +75,9 @@ __FBSDID("$FreeBSD$"); #define ID_82801EB 0x24D38086 #define ID_82801FB 0x266A8086 #define ID_82801GB 0x27da8086 +#define ID_82801H 0x283e8086 +#define ID_82801I 0x29308086 +#define ID_82801JI 0x3a308086 #define ID_6300ESB 0x25a48086 #define ID_631xESB 0x269b8086 @@ -152,6 +155,15 @@ ichsmb_pci_probe(device_t dev) case ID_82801GB: device_set_desc(dev, "Intel 82801GB (ICH7) SMBus controller"); break; + case ID_82801H: + device_set_desc(dev, "Intel 82801H (ICH8) SMBus controller"); + break; + case ID_82801I: + device_set_desc(dev, "Intel 82801I (ICH9) SMBus controller"); + break; + case ID_82801JI: + device_set_desc(dev, "Intel 82801JI (ICH10) SMBus controller"); + break; case ID_6300ESB: device_set_desc(dev, "Intel 6300ESB (ICH) SMBus controller"); break; From owner-svn-src-stable-7@FreeBSD.ORG Tue Dec 8 15:24:37 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B12A51065676; Tue, 8 Dec 2009 15:24:37 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9FA748FC25; Tue, 8 Dec 2009 15:24:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB8FOb6j091903; Tue, 8 Dec 2009 15:24:37 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB8FOblF091900; Tue, 8 Dec 2009 15:24:37 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <200912081524.nB8FOblF091900@svn.freebsd.org> From: Andriy Gapon Date: Tue, 8 Dec 2009 15:24:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r200261 - in stable/7/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2009 15:24:37 -0000 Author: avg Date: Tue Dec 8 15:24:37 2009 New Revision: 200261 URL: http://svn.freebsd.org/changeset/base/200261 Log: MFC r199184: reflect that pg_ps_enabled is a tunable Modified: stable/7/sys/amd64/amd64/pmap.c stable/7/sys/i386/i386/pmap.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/amd64/amd64/pmap.c ============================================================================== --- stable/7/sys/amd64/amd64/pmap.c Tue Dec 8 15:21:39 2009 (r200260) +++ stable/7/sys/amd64/amd64/pmap.c Tue Dec 8 15:24:37 2009 (r200261) @@ -181,7 +181,7 @@ pt_entry_t pg_nx; SYSCTL_NODE(_vm, OID_AUTO, pmap, CTLFLAG_RD, 0, "VM/pmap parameters"); static int pg_ps_enabled; -SYSCTL_INT(_vm_pmap, OID_AUTO, pg_ps_enabled, CTLFLAG_RD, &pg_ps_enabled, 0, +SYSCTL_INT(_vm_pmap, OID_AUTO, pg_ps_enabled, CTLFLAG_RDTUN, &pg_ps_enabled, 0, "Are large page mappings enabled?"); static u_int64_t KPTphys; /* phys addr of kernel level 1 */ Modified: stable/7/sys/i386/i386/pmap.c ============================================================================== --- stable/7/sys/i386/i386/pmap.c Tue Dec 8 15:21:39 2009 (r200260) +++ stable/7/sys/i386/i386/pmap.c Tue Dec 8 15:24:37 2009 (r200261) @@ -214,7 +214,7 @@ static uma_zone_t pdptzone; SYSCTL_NODE(_vm, OID_AUTO, pmap, CTLFLAG_RD, 0, "VM/pmap parameters"); static int pg_ps_enabled; -SYSCTL_INT(_vm_pmap, OID_AUTO, pg_ps_enabled, CTLFLAG_RD, &pg_ps_enabled, 0, +SYSCTL_INT(_vm_pmap, OID_AUTO, pg_ps_enabled, CTLFLAG_RDTUN, &pg_ps_enabled, 0, "Are large page mappings enabled?"); /* From owner-svn-src-stable-7@FreeBSD.ORG Tue Dec 8 15:29:12 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2FF21065693; Tue, 8 Dec 2009 15:29:12 +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 978638FC19; Tue, 8 Dec 2009 15:29:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB8FTCwZ092094; Tue, 8 Dec 2009 15:29:12 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB8FTC22092089; Tue, 8 Dec 2009 15:29:12 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <200912081529.nB8FTC22092089@svn.freebsd.org> From: Andriy Gapon Date: Tue, 8 Dec 2009 15:29:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r200263 - in stable/7/sys: amd64/amd64 amd64/include i386/i386 i386/include X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2009 15:29:12 -0000 Author: avg Date: Tue Dec 8 15:29:12 2009 New Revision: 200263 URL: http://svn.freebsd.org/changeset/base/200263 Log: MFC r199968: x86 cpu features: add MOVBE reporting and flag Modified: stable/7/sys/amd64/amd64/identcpu.c stable/7/sys/amd64/include/specialreg.h stable/7/sys/i386/i386/identcpu.c stable/7/sys/i386/include/specialreg.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/amd64/amd64/identcpu.c ============================================================================== --- stable/7/sys/amd64/amd64/identcpu.c Tue Dec 8 15:27:06 2009 (r200262) +++ stable/7/sys/amd64/amd64/identcpu.c Tue Dec 8 15:29:12 2009 (r200263) @@ -259,7 +259,7 @@ printcpuinfo(void) "\024SSE4.1" "\025SSE4.2" "\026x2APIC" /* xAPIC Extensions */ - "\027" + "\027MOVBE" "\030POPCNT" "\031" "\032" Modified: stable/7/sys/amd64/include/specialreg.h ============================================================================== --- stable/7/sys/amd64/include/specialreg.h Tue Dec 8 15:27:06 2009 (r200262) +++ stable/7/sys/amd64/include/specialreg.h Tue Dec 8 15:29:12 2009 (r200263) @@ -129,6 +129,7 @@ #define CPUID2_SSE41 0x00080000 #define CPUID2_SSE42 0x00100000 #define CPUID2_X2APIC 0x00200000 +#define CPUID2_MOVBE 0x00400000 #define CPUID2_POPCNT 0x00800000 /* Modified: stable/7/sys/i386/i386/identcpu.c ============================================================================== --- stable/7/sys/i386/i386/identcpu.c Tue Dec 8 15:27:06 2009 (r200262) +++ stable/7/sys/i386/i386/identcpu.c Tue Dec 8 15:29:12 2009 (r200263) @@ -747,7 +747,7 @@ printcpuinfo(void) "\024SSE4.1" "\025SSE4.2" "\026x2APIC" /* xAPIC Extensions */ - "\027" + "\027MOVBE" "\030POPCNT" "\031" "\032" Modified: stable/7/sys/i386/include/specialreg.h ============================================================================== --- stable/7/sys/i386/include/specialreg.h Tue Dec 8 15:27:06 2009 (r200262) +++ stable/7/sys/i386/include/specialreg.h Tue Dec 8 15:29:12 2009 (r200263) @@ -126,6 +126,7 @@ #define CPUID2_SSE41 0x00080000 #define CPUID2_SSE42 0x00100000 #define CPUID2_X2APIC 0x00200000 +#define CPUID2_MOVBE 0x00400000 #define CPUID2_POPCNT 0x00800000 /* From owner-svn-src-stable-7@FreeBSD.ORG Tue Dec 8 18:35:58 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 464D3106566B; Tue, 8 Dec 2009 18:35:58 +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 345988FC1B; Tue, 8 Dec 2009 18:35:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB8IZwGu096130; Tue, 8 Dec 2009 18:35:58 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB8IZwRE096125; Tue, 8 Dec 2009 18:35:58 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <200912081835.nB8IZwRE096125@svn.freebsd.org> From: Xin LI Date: Tue, 8 Dec 2009 18:35:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r200267 - in stable/7: etc/defaults etc/rc.d share/man/man5 X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2009 18:35:58 -0000 Author: delphij Date: Tue Dec 8 18:35:57 2009 New Revision: 200267 URL: http://svn.freebsd.org/changeset/base/200267 Log: MFC revisions 196550 and 196552: Add a new rc.d script, static_arp, which enables the administrator to statically bind IPv4 <-> MAC address at boot time. In order to use this, the administrator needs to configure the following rc.conf(5) variable: - static_arp_pairs: A list of names for static bind pairs, and, - a series of static_arp_(name): the arguments that is being passed to ``arp -S'' operation. Example: static_arp_pairs="gw" static_arp_gw="192.168.1.1 00:01:02:03:04:05" See the rc.conf(5) manual page for more details. Added: stable/7/etc/rc.d/static_arp - copied, changed from r196550, head/etc/rc.d/static_arp Modified: stable/7/etc/defaults/rc.conf stable/7/etc/rc.d/Makefile stable/7/share/man/man5/rc.conf.5 (contents, props changed) Directory Properties: stable/7/etc/ (props changed) stable/7/share/man/man5/ (props changed) Modified: stable/7/etc/defaults/rc.conf ============================================================================== --- stable/7/etc/defaults/rc.conf Tue Dec 8 18:23:52 2009 (r200266) +++ stable/7/etc/defaults/rc.conf Tue Dec 8 18:35:57 2009 (r200267) @@ -344,6 +344,7 @@ bsnmpd_flags="" # Flags for bsnmpd. ### Network routing options: ### defaultrouter="NO" # Set to default gateway (or NO). +static_arp_pairs="" # Set to static ARP list (or leave empty). static_routes="" # Set to static route list (or leave empty). natm_static_routes="" # Set to static route list for NATM (or leave empty). gateway_enable="NO" # Set to YES if this host will be a gateway. Modified: stable/7/etc/rc.d/Makefile ============================================================================== --- stable/7/etc/rc.d/Makefile Tue Dec 8 18:23:52 2009 (r200266) +++ stable/7/etc/rc.d/Makefile Tue Dec 8 18:35:57 2009 (r200267) @@ -32,7 +32,7 @@ FILES= DAEMON FILESYSTEMS LOGIN NETWORKI random rarpd resolv rfcomm_pppd_server root \ route6d routed routing rpcbind rtadvd rwho \ savecore sdpd securelevel sendmail \ - serial sppp statd swap1 \ + serial sppp statd static_arp swap1 \ syscons sysctl syslogd \ timed tmp \ ugidfw \ Copied and modified: stable/7/etc/rc.d/static_arp (from r196550, head/etc/rc.d/static_arp) ============================================================================== --- head/etc/rc.d/static_arp Tue Aug 25 19:07:26 2009 (r196550, copy source) +++ stable/7/etc/rc.d/static_arp Tue Dec 8 18:35:57 2009 (r200267) @@ -41,10 +41,11 @@ stop_cmd="static_arp_stop" static_arp_start() { + local e arp_args + if [ -n "${static_arp_pairs}" ]; then echo -n 'Binding static ARP pair(s):' for e in ${static_arp_pairs}; do - local arp_args echo -n " ${e}" eval arp_args=\$static_arp_${e} arp -S ${arp_args} >/dev/null 2>&1 @@ -55,10 +56,11 @@ static_arp_start() static_arp_stop() { + local e arp_args + if [ -n "${static_arp_pairs}" ]; then echo -n 'Unbinding static ARP pair(s):' for e in ${static_arp_pairs}; do - local arp_args echo -n " ${e}" eval arp_args=\$static_arp_${e} arp -d ${arp_args%%[ ]*} > /dev/null 2>&1 Modified: stable/7/share/man/man5/rc.conf.5 ============================================================================== --- stable/7/share/man/man5/rc.conf.5 Tue Dec 8 18:23:52 2009 (r200266) +++ stable/7/share/man/man5/rc.conf.5 Tue Dec 8 18:35:57 2009 (r200267) @@ -2193,6 +2193,22 @@ name server!). .Pq Vt str The IPv6 equivalent of .Va defaultrouter . +.It Va static_arp_pairs +.Pq Vt str +Set to the list of static ARP pairs that are to be added at system +boot time. +For each whitespace separated +.Ar element +in the value, a +.Va static_arp_ Ns Aq Ar element +variable is assumed to exist whose contents will later be passed to a +.Dq Nm arp Cm -S +operation. +For example +.Bd -literal +static_arp_pairs="gw" +static_arp_gw="192.168.1.1 00:01:02:03:04:05" +.Ed .It Va static_routes .Pq Vt str Set to the list of static routes that are to be added at system From owner-svn-src-stable-7@FreeBSD.ORG Tue Dec 8 19:01:05 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8562A10656A6; Tue, 8 Dec 2009 19:01:05 +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 741C58FC2A; Tue, 8 Dec 2009 19:01:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB8J15Xp096983; Tue, 8 Dec 2009 19:01:05 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB8J15Y5096981; Tue, 8 Dec 2009 19:01:05 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <200912081901.nB8J15Y5096981@svn.freebsd.org> From: Jilles Tjoelker Date: Tue, 8 Dec 2009 19:01: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: r200269 - stable/7/bin/sh X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2009 19:01:05 -0000 Author: jilles Date: Tue Dec 8 19:01:05 2009 New Revision: 200269 URL: http://svn.freebsd.org/changeset/base/200269 Log: MFC r198963: sh: Fix memory leak when using a variable in arithmetic like $((x)). Modified: stable/7/bin/sh/arith_lex.l Directory Properties: stable/7/bin/sh/ (props changed) Modified: stable/7/bin/sh/arith_lex.l ============================================================================== --- stable/7/bin/sh/arith_lex.l Tue Dec 8 18:54:37 2009 (r200268) +++ stable/7/bin/sh/arith_lex.l Tue Dec 8 19:01:05 2009 (r200269) @@ -51,6 +51,13 @@ __FBSDID("$FreeBSD$"); int yylex(void); +struct varname +{ + struct varname *next; + char name[1]; +}; +static struct varname *varnames; + #undef YY_INPUT #define YY_INPUT(buf,result,max) \ result = (*buf = *arith_buf++) ? 1 : YY_NULL; @@ -80,11 +87,14 @@ int yylex(void); * If variable doesn't exist, we should initialize * it to zero. */ - char *temp; + struct varname *temp; if (lookupvar(yytext) == NULL) setvarsafe(yytext, "0", 0); - temp = (char *)ckmalloc(strlen(yytext) + 1); - yylval.s_value = strcpy(temp, yytext); + temp = ckmalloc(sizeof(struct varname) + + strlen(yytext)); + temp->next = varnames; + varnames = temp; + yylval.s_value = strcpy(temp->name, yytext); return ARITH_VAR; } @@ -130,5 +140,15 @@ int yylex(void); void arith_lex_reset(void) { + struct varname *name, *next; + YY_NEW_FILE; + + name = varnames; + while (name != NULL) { + next = name->next; + ckfree(name); + name = next; + } + varnames = NULL; } From owner-svn-src-stable-7@FreeBSD.ORG Tue Dec 8 19:18:32 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 87AC810656A6; Tue, 8 Dec 2009 19:18:32 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7639C8FC12; Tue, 8 Dec 2009 19:18:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB8JIWRT097455; Tue, 8 Dec 2009 19:18:32 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB8JIWv9097453; Tue, 8 Dec 2009 19:18:32 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <200912081918.nB8JIWv9097453@svn.freebsd.org> From: Fabien Thomas Date: Tue, 8 Dec 2009 19:18:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r200271 - stable/7/sys/kern X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2009 19:18:32 -0000 Author: fabient Date: Tue Dec 8 19:18:32 2009 New Revision: 200271 URL: http://svn.freebsd.org/changeset/base/200271 Log: MFC 198464: Inform hwpmc(4) of a thread's impending demise prior to invoking sched_throw(). Modified: stable/7/sys/kern/kern_thread.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/kern/kern_thread.c ============================================================================== --- stable/7/sys/kern/kern_thread.c Tue Dec 8 19:12:38 2009 (r200270) +++ stable/7/sys/kern/kern_thread.c Tue Dec 8 19:18:32 2009 (r200271) @@ -26,6 +26,8 @@ * DAMAGE. */ +#include "opt_hwpmc_hooks.h" + #include __FBSDID("$FreeBSD$"); @@ -44,6 +46,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#ifdef HWPMC_HOOKS +#include +#endif #include @@ -497,6 +502,14 @@ thread_exit(void) panic ("thread_exit: Last thread exiting on its own"); } } +#ifdef HWPMC_HOOKS + /* + * If this thread is part of a process that is being tracked by hwpmc(4), + * inform the module of the thread's impending exit. + */ + if (PMC_PROC_IS_USING_PMCS(td->td_proc)) + PMC_SWITCH_CONTEXT(td, PMC_FN_CSW_OUT); +#endif PROC_UNLOCK(p); thread_lock(td); /* Save our tick information with both the thread and proc locked */ From owner-svn-src-stable-7@FreeBSD.ORG Tue Dec 8 21:46:30 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 566CF106568B; Tue, 8 Dec 2009 21:46: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 447F88FC21; Tue, 8 Dec 2009 21:46:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB8LkU7j001000; Tue, 8 Dec 2009 21:46:30 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB8LkU4C000998; Tue, 8 Dec 2009 21:46:30 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <200912082146.nB8LkU4C000998@svn.freebsd.org> From: Xin LI Date: Tue, 8 Dec 2009 21:46: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: r200276 - stable/7/sys/geom/virstor X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2009 21:46:30 -0000 Author: delphij Date: Tue Dec 8 21:46:30 2009 New Revision: 200276 URL: http://svn.freebsd.org/changeset/base/200276 Log: MFC r180120: Avoid NULL deference. Modified: stable/7/sys/geom/virstor/g_virstor.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/geom/virstor/g_virstor.c ============================================================================== --- stable/7/sys/geom/virstor/g_virstor.c Tue Dec 8 21:42:04 2009 (r200275) +++ stable/7/sys/geom/virstor/g_virstor.c Tue Dec 8 21:46:30 2009 (r200276) @@ -225,6 +225,11 @@ virstor_ctl_stop(struct gctl_req *req, s sprintf(param, "arg%d", i); name = gctl_get_asciiparam(req, param); + if (name == NULL) { + gctl_error(req, "No 'arg%d' argument", i); + g_topology_unlock(); + return; + } sc = virstor_find_geom(cp, name); LOG_MSG(LVL_INFO, "Stopping %s by the userland command", sc->geom->name); From owner-svn-src-stable-7@FreeBSD.ORG Tue Dec 8 22:37:08 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31BB9106566C; Tue, 8 Dec 2009 22:37:08 +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 1E0428FC0C; Tue, 8 Dec 2009 22:37:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB8Mb8bG003385; Tue, 8 Dec 2009 22:37:08 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB8Mb72q003377; Tue, 8 Dec 2009 22:37:07 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <200912082237.nB8Mb72q003377@svn.freebsd.org> From: Jilles Tjoelker Date: Tue, 8 Dec 2009 22:37: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: r200279 - in stable/7: bin/sh tools/regression/bin/sh/execution X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2009 22:37:08 -0000 Author: jilles Date: Tue Dec 8 22:37:07 2009 New Revision: 200279 URL: http://svn.freebsd.org/changeset/base/200279 Log: MFC r196483,r196634: sh: Fix crash when undefining or redefining a currently executing function Add a reference count to function definitions. Memory may leak if a SIGINT arrives in interactive mode at exactly the wrong time. PR: bin/137640 Added: stable/7/tools/regression/bin/sh/execution/ stable/7/tools/regression/bin/sh/execution/func1.0 - copied unchanged from r196483, head/tools/regression/bin/sh/execution/func1.0 stable/7/tools/regression/bin/sh/execution/func2.0 - copied unchanged from r196634, head/tools/regression/bin/sh/execution/func2.0 Modified: stable/7/bin/sh/eval.c stable/7/bin/sh/exec.c stable/7/bin/sh/exec.h stable/7/bin/sh/mknodes.c stable/7/bin/sh/nodes.c.pat Directory Properties: stable/7/bin/sh/ (props changed) stable/7/tools/regression/bin/sh/ (props changed) Modified: stable/7/bin/sh/eval.c ============================================================================== --- stable/7/bin/sh/eval.c Tue Dec 8 22:35:39 2009 (r200278) +++ stable/7/bin/sh/eval.c Tue Dec 8 22:37:07 2009 (r200279) @@ -773,6 +773,7 @@ evalcommand(union node *cmd, int flags, INTOFF; savelocalvars = localvars; localvars = NULL; + reffunc(cmdentry.u.func); INTON; if (setjmp(jmploc.loc)) { if (exception == EXSHELLPROC) @@ -781,6 +782,7 @@ evalcommand(union node *cmd, int flags, freeparam(&shellparam); shellparam = saveparam; } + unreffunc(cmdentry.u.func); poplocalvars(); localvars = savelocalvars; handler = savehandler; @@ -792,11 +794,12 @@ evalcommand(union node *cmd, int flags, mklocal(sp->text); funcnest++; if (flags & EV_TESTED) - evaltree(cmdentry.u.func, EV_TESTED); + evaltree(getfuncnode(cmdentry.u.func), EV_TESTED); else - evaltree(cmdentry.u.func, 0); + evaltree(getfuncnode(cmdentry.u.func), 0); funcnest--; INTOFF; + unreffunc(cmdentry.u.func); poplocalvars(); localvars = savelocalvars; freeparam(&shellparam); Modified: stable/7/bin/sh/exec.c ============================================================================== --- stable/7/bin/sh/exec.c Tue Dec 8 22:35:39 2009 (r200278) +++ stable/7/bin/sh/exec.c Tue Dec 8 22:37:07 2009 (r200279) @@ -285,7 +285,7 @@ printentry(struct tblentry *cmdp, int ve out1fmt("function %s", cmdp->cmdname); if (verbose) { INTOFF; - name = commandtext(cmdp->param.func); + name = commandtext(getfuncnode(cmdp->param.func)); out1c(' '); out1str(name); ckfree(name); @@ -582,7 +582,7 @@ deletefuncs(void) while ((cmdp = *pp) != NULL) { if (cmdp->cmdtype == CMDFUNCTION) { *pp = cmdp->next; - freefunc(cmdp->param.func); + unreffunc(cmdp->param.func); ckfree(cmdp); } else { pp = &cmdp->next; @@ -669,7 +669,7 @@ addcmdentry(char *name, struct cmdentry INTOFF; cmdp = cmdlookup(name, 1); if (cmdp->cmdtype == CMDFUNCTION) { - freefunc(cmdp->param.func); + unreffunc(cmdp->param.func); } cmdp->cmdtype = entry->cmdtype; cmdp->param = entry->u; @@ -704,7 +704,7 @@ unsetfunc(char *name) struct tblentry *cmdp; if ((cmdp = cmdlookup(name, 0)) != NULL && cmdp->cmdtype == CMDFUNCTION) { - freefunc(cmdp->param.func); + unreffunc(cmdp->param.func); delete_cmd_entry(); return (0); } Modified: stable/7/bin/sh/exec.h ============================================================================== --- stable/7/bin/sh/exec.h Tue Dec 8 22:35:39 2009 (r200278) +++ stable/7/bin/sh/exec.h Tue Dec 8 22:37:07 2009 (r200279) @@ -46,11 +46,12 @@ enum { TYPECMD_TYPE /* type */ }; +union node; struct cmdentry { int cmdtype; union param { int index; - union node *func; + struct funcdef *func; } u; int special; }; Modified: stable/7/bin/sh/mknodes.c ============================================================================== --- stable/7/bin/sh/mknodes.c Tue Dec 8 22:35:39 2009 (r200278) +++ stable/7/bin/sh/mknodes.c Tue Dec 8 22:37:07 2009 (r200279) @@ -248,8 +248,11 @@ output(char *file) fputs("\tstruct nodelist *next;\n", hfile); fputs("\tunion node *n;\n", hfile); fputs("};\n\n\n", hfile); - fputs("union node *copyfunc(union node *);\n", hfile); - fputs("void freefunc(union node *);\n", hfile); + fputs("struct funcdef;\n", hfile); + fputs("struct funcdef *copyfunc(union node *);\n", hfile); + fputs("union node *getfuncnode(struct funcdef *);\n", hfile); + fputs("void reffunc(struct funcdef *);\n", hfile); + fputs("void unreffunc(struct funcdef *);\n", hfile); fputs(writer, cfile); while (fgets(line, sizeof line, patfile) != NULL) { Modified: stable/7/bin/sh/nodes.c.pat ============================================================================== --- stable/7/bin/sh/nodes.c.pat Tue Dec 8 22:35:39 2009 (r200278) +++ stable/7/bin/sh/nodes.c.pat Tue Dec 8 22:37:07 2009 (r200279) @@ -35,6 +35,7 @@ #include #include +#include /* * Routine for dealing with parsed shell commands. */ @@ -60,25 +61,40 @@ STATIC struct nodelist *copynodelist(str STATIC char *nodesavestr(char *); +struct funcdef { + unsigned int refcount; + union node n; +}; /* * Make a copy of a parse tree. */ -union node * +struct funcdef * copyfunc(union node *n) { + struct funcdef *fn; + if (n == NULL) return NULL; - funcblocksize = 0; + funcblocksize = offsetof(struct funcdef, n); funcstringsize = 0; calcsize(n); - funcblock = ckmalloc(funcblocksize + funcstringsize); - funcstring = (char *)funcblock + funcblocksize; - return copynode(n); + fn = ckmalloc(funcblocksize + funcstringsize); + fn->refcount = 1; + funcblock = (char *)fn + offsetof(struct funcdef, n); + funcstring = (char *)fn + funcblocksize; + copynode(n); + return fn; } +union node * +getfuncnode(struct funcdef *fn) +{ + return fn == NULL ? NULL : &fn->n; +} + STATIC void calcsize(union node *n) @@ -144,14 +160,26 @@ nodesavestr(char *s) } +void +reffunc(struct funcdef *fn) +{ + if (fn) + fn->refcount++; +} + /* - * Free a parse tree. + * Decrement the reference count of a function definition, freeing it + * if it falls to 0. */ void -freefunc(union node *n) +unreffunc(struct funcdef *fn) { - if (n) - ckfree(n); + if (fn) { + fn->refcount--; + if (fn->refcount > 0) + return; + ckfree(fn); + } } Copied: stable/7/tools/regression/bin/sh/execution/func1.0 (from r196483, head/tools/regression/bin/sh/execution/func1.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/tools/regression/bin/sh/execution/func1.0 Tue Dec 8 22:37:07 2009 (r200279, copy of r196483, head/tools/regression/bin/sh/execution/func1.0) @@ -0,0 +1,4 @@ +# $FreeBSD$ + +MALLOC_OPTIONS=J sh -c 'g() { g() { :; }; :; }; g' && +MALLOC_OPTIONS=J sh -c 'g() { unset -f g; :; }; g' Copied: stable/7/tools/regression/bin/sh/execution/func2.0 (from r196634, head/tools/regression/bin/sh/execution/func2.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/tools/regression/bin/sh/execution/func2.0 Tue Dec 8 22:37:07 2009 (r200279, copy of r196634, head/tools/regression/bin/sh/execution/func2.0) @@ -0,0 +1,11 @@ +# $FreeBSD$ + +f() { } +f +hash -v f >/dev/null +f() { { }; } +f +hash -v f >/dev/null +f() { { } } +f +hash -v f >/dev/null From owner-svn-src-stable-7@FreeBSD.ORG Tue Dec 8 23:34:34 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 638871065676; Tue, 8 Dec 2009 23:34:34 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 512028FC1A; Tue, 8 Dec 2009 23:34:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB8NYYFX005214; Tue, 8 Dec 2009 23:34:34 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB8NYYhY005211; Tue, 8 Dec 2009 23:34:34 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200912082334.nB8NYYhY005211@svn.freebsd.org> From: Alexander Motin Date: Tue, 8 Dec 2009 23:34:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r200286 - stable/7/sys/geom/mirror X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2009 23:34:34 -0000 Author: mav Date: Tue Dec 8 23:34:34 2009 New Revision: 200286 URL: http://svn.freebsd.org/changeset/base/200286 Log: MFC r200086: Change 'load' balancing mode algorithm: - Instead of measuring last request execution time for each drive and choosing one with smallest time, use averaged number of requests, running on each drive. This information is more accurate and timely. It allows to distribute load between drives in more even and predictable way. - For each drive track offset of the last submitted request. If new request offset matches previous one or close for some drive, prefer that drive. It allows to significantly speedup simultaneous sequential reads. PR: kern/113885 Modified: stable/7/sys/geom/mirror/g_mirror.c stable/7/sys/geom/mirror/g_mirror.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/geom/mirror/g_mirror.c ============================================================================== --- stable/7/sys/geom/mirror/g_mirror.c Tue Dec 8 23:23:45 2009 (r200285) +++ stable/7/sys/geom/mirror/g_mirror.c Tue Dec 8 23:34:34 2009 (r200286) @@ -451,9 +451,6 @@ g_mirror_init_disk(struct g_mirror_softc disk->d_id = md->md_did; disk->d_state = G_MIRROR_DISK_STATE_NONE; disk->d_priority = md->md_priority; - disk->d_delay.sec = 0; - disk->d_delay.frac = 0; - binuptime(&disk->d_last_used); disk->d_flags = md->md_dflags; if (md->md_provider[0] != '\0') disk->d_flags |= G_MIRROR_DISK_FLAG_HARDCODED; @@ -863,16 +860,6 @@ bintime_cmp(struct bintime *bt1, struct } static void -g_mirror_update_delay(struct g_mirror_disk *disk, struct bio *bp) -{ - - if (disk->d_softc->sc_balance != G_MIRROR_BALANCE_LOAD) - return; - binuptime(&disk->d_delay); - bintime_sub(&disk->d_delay, &bp->bio_t0); -} - -static void g_mirror_done(struct bio *bp) { struct g_mirror_softc *sc; @@ -904,8 +891,6 @@ g_mirror_regular_request(struct bio *bp) g_topology_lock(); g_mirror_kill_consumer(sc, bp->bio_from); g_topology_unlock(); - } else { - g_mirror_update_delay(disk, bp); } pbp->bio_inbed++; @@ -1465,30 +1450,35 @@ g_mirror_request_round_robin(struct g_mi g_io_request(cbp, cp); } +#define TRACK_SIZE (1 * 1024 * 1024) +#define LOAD_SCALE 256 +#define ABS(x) (((x) >= 0) ? (x) : (-(x))) + static void g_mirror_request_load(struct g_mirror_softc *sc, struct bio *bp) { struct g_mirror_disk *disk, *dp; struct g_consumer *cp; struct bio *cbp; - struct bintime curtime; + int prio, best; - binuptime(&curtime); - /* - * Find a disk which the smallest load. - */ + /* Find a disk with the smallest load. */ disk = NULL; + best = INT_MAX; LIST_FOREACH(dp, &sc->sc_disks, d_next) { if (dp->d_state != G_MIRROR_DISK_STATE_ACTIVE) continue; - /* If disk wasn't used for more than 2 sec, use it. */ - if (curtime.sec - dp->d_last_used.sec >= 2) { - disk = dp; - break; - } - if (disk == NULL || - bintime_cmp(&dp->d_delay, &disk->d_delay) < 0) { + prio = dp->load; + /* If disk head is precisely in position - highly prefer it. */ + if (dp->d_last_offset == bp->bio_offset) + prio -= 2 * LOAD_SCALE; + else + /* If disk head is close to position - prefer it. */ + if (ABS(dp->d_last_offset - bp->bio_offset) < TRACK_SIZE) + prio -= 1 * LOAD_SCALE; + if (prio <= best) { disk = dp; + best = prio; } } KASSERT(disk != NULL, ("NULL disk for %s.", sc->sc_name)); @@ -1505,12 +1495,18 @@ g_mirror_request_load(struct g_mirror_so cp = disk->d_consumer; cbp->bio_done = g_mirror_done; cbp->bio_to = cp->provider; - binuptime(&disk->d_last_used); G_MIRROR_LOGREQ(3, cbp, "Sending request."); KASSERT(cp->acr >= 1 && cp->acw >= 1 && cp->ace >= 1, ("Consumer %s not opened (r%dw%de%d).", cp->provider->name, cp->acr, cp->acw, cp->ace)); cp->index++; + /* Remember last head position */ + disk->d_last_offset = bp->bio_offset + bp->bio_length; + /* Update loads. */ + LIST_FOREACH(dp, &sc->sc_disks, d_next) { + dp->load = (dp->d_consumer->index * LOAD_SCALE + + dp->load * 7) / 8; + } g_io_request(cbp, cp); } Modified: stable/7/sys/geom/mirror/g_mirror.h ============================================================================== --- stable/7/sys/geom/mirror/g_mirror.h Tue Dec 8 23:23:45 2009 (r200285) +++ stable/7/sys/geom/mirror/g_mirror.h Tue Dec 8 23:34:34 2009 (r200286) @@ -133,8 +133,8 @@ struct g_mirror_disk { struct g_mirror_softc *d_softc; /* Back-pointer to softc. */ int d_state; /* Disk state. */ u_int d_priority; /* Disk priority. */ - struct bintime d_delay; /* Disk delay. */ - struct bintime d_last_used; /* When disk was last used. */ + u_int load; /* Averaged queue length */ + off_t d_last_offset; /* Last read offset */ uint64_t d_flags; /* Additional flags. */ u_int d_genid; /* Disk's generation ID. */ struct g_mirror_disk_sync d_sync;/* Sync information. */ From owner-svn-src-stable-7@FreeBSD.ORG Wed Dec 9 08:16:12 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8302C106566B; Wed, 9 Dec 2009 08:16:12 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5783F8FC0C; Wed, 9 Dec 2009 08:16:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB98GC9b016411; Wed, 9 Dec 2009 08:16:12 GMT (envelope-from scottl@svn.freebsd.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB98GCuI016408; Wed, 9 Dec 2009 08:16:12 GMT (envelope-from scottl@svn.freebsd.org) Message-Id: <200912090816.nB98GCuI016408@svn.freebsd.org> From: Scott Long Date: Wed, 9 Dec 2009 08:16:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r200289 - in stable/7/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2009 08:16:12 -0000 Author: scottl Date: Wed Dec 9 08:16:12 2009 New Revision: 200289 URL: http://svn.freebsd.org/changeset/base/200289 Log: MFC: fix alignment calculation for situations where alignment needs to be exactly on page boundary or less. Modified: stable/7/sys/amd64/amd64/busdma_machdep.c stable/7/sys/i386/i386/busdma_machdep.c Modified: stable/7/sys/amd64/amd64/busdma_machdep.c ============================================================================== --- stable/7/sys/amd64/amd64/busdma_machdep.c Wed Dec 9 08:09:25 2009 (r200288) +++ stable/7/sys/amd64/amd64/busdma_machdep.c Wed Dec 9 08:16:12 2009 (r200289) @@ -597,7 +597,7 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dm * Count the number of bounce pages * needed in order to complete this transfer */ - vaddr = trunc_page((vm_offset_t)buf); + vaddr = (vm_offset_t)buf; vendaddr = (vm_offset_t)buf + buflen; while (vaddr < vendaddr) { @@ -607,7 +607,7 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dm paddr = pmap_kextract(vaddr); if (run_filter(dmat, paddr) != 0) map->pagesneeded++; - vaddr += PAGE_SIZE; + vaddr += (PAGE_SIZE - ((vm_offset_t)vaddr & PAGE_MASK)); } CTR1(KTR_BUSDMA, "pagesneeded= %d\n", map->pagesneeded); } Modified: stable/7/sys/i386/i386/busdma_machdep.c ============================================================================== --- stable/7/sys/i386/i386/busdma_machdep.c Wed Dec 9 08:09:25 2009 (r200288) +++ stable/7/sys/i386/i386/busdma_machdep.c Wed Dec 9 08:16:12 2009 (r200289) @@ -584,7 +584,7 @@ _bus_dmamap_count_pages(bus_dma_tag_t dm * Count the number of bounce pages * needed in order to complete this transfer */ - vaddr = trunc_page((vm_offset_t)buf); + vaddr = (vm_offset_t)buf; vendaddr = (vm_offset_t)buf + buflen; while (vaddr < vendaddr) { @@ -596,7 +596,7 @@ _bus_dmamap_count_pages(bus_dma_tag_t dm run_filter(dmat, paddr) != 0) { map->pagesneeded++; } - vaddr += PAGE_SIZE; + vaddr += (PAGE_SIZE - ((vm_offset_t)vaddr & PAGE_MASK)); } CTR1(KTR_BUSDMA, "pagesneeded= %d\n", map->pagesneeded); } From owner-svn-src-stable-7@FreeBSD.ORG Wed Dec 9 17:23:09 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 454BF1065692; Wed, 9 Dec 2009 17:23:09 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 33ED98FC17; Wed, 9 Dec 2009 17:23:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB9HN9tr031981; Wed, 9 Dec 2009 17:23:09 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB9HN9Ld031979; Wed, 9 Dec 2009 17:23:09 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200912091723.nB9HN9Ld031979@svn.freebsd.org> From: Alexander Motin Date: Wed, 9 Dec 2009 17:23:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r200298 - stable/7/sys/dev/ata X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2009 17:23:09 -0000 Author: mav Date: Wed Dec 9 17:23:08 2009 New Revision: 200298 URL: http://svn.freebsd.org/changeset/base/200298 Log: MFC r200121: Do not ignore device interrupt if bus mastering is still active. It is normal in case of media read error and some ATAPI cases, when transfer size is unknown beforehand. PCI ATA BM specification tells that in case of such underrun driver should just manually stop DMA engine. DMA engine should same time guarantie that all bus mastering transfers completed at the moment when driver reads interrupt flag asserted. This change fixes interrupt storms and command timeouts in many cases. PR: kern/103602, sparc64/121539, kern/133122, kern/139654 Modified: stable/7/sys/dev/ata/ata-pci.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/ata/ata-pci.c ============================================================================== --- stable/7/sys/dev/ata/ata-pci.c Wed Dec 9 17:20:10 2009 (r200297) +++ stable/7/sys/dev/ata/ata-pci.c Wed Dec 9 17:23:08 2009 (r200298) @@ -445,8 +445,7 @@ ata_pci_status(device_t dev) (ch->dma->flags & ATA_DMA_ACTIVE))) { int bmstat = ATA_IDX_INB(ch, ATA_BMSTAT_PORT) & ATA_BMSTAT_MASK; - if ((bmstat & (ATA_BMSTAT_ACTIVE | ATA_BMSTAT_INTERRUPT)) != - ATA_BMSTAT_INTERRUPT) + if ((bmstat & ATA_BMSTAT_INTERRUPT) == 0) return 0; ATA_IDX_OUTB(ch, ATA_BMSTAT_PORT, bmstat & ~ATA_BMSTAT_ERROR); DELAY(1); From owner-svn-src-stable-7@FreeBSD.ORG Thu Dec 10 06:24:16 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9AA5E1065670; Thu, 10 Dec 2009 06:24:16 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6ECD98FC08; Thu, 10 Dec 2009 06:24:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBA6OGOt053247; Thu, 10 Dec 2009 06:24:16 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBA6OG9K053244; Thu, 10 Dec 2009 06:24:16 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <200912100624.nBA6OG9K053244@svn.freebsd.org> From: Marcel Moolenaar Date: Thu, 10 Dec 2009 06:24: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: r200350 - in stable/7/sys/dev: puc uart X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Dec 2009 06:24:16 -0000 Author: marcel Date: Thu Dec 10 06:24:16 2009 New Revision: 200350 URL: http://svn.freebsd.org/changeset/base/200350 Log: MFC rev 200230: Add support for the NetMos NM9865 family of Serial/Parallel ports. Modified: stable/7/sys/dev/puc/pucdata.c stable/7/sys/dev/uart/uart_bus_pci.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/puc/pucdata.c ============================================================================== --- stable/7/sys/dev/puc/pucdata.c Thu Dec 10 05:45:40 2009 (r200349) +++ stable/7/sys/dev/puc/pucdata.c Thu Dec 10 06:24:16 2009 (r200350) @@ -168,10 +168,10 @@ const struct puc_cfg puc_pci_devices[] = { 0x10e8, 0x818e, 0xffff, 0, "Applied Micro Circuits 8 Port UART", - DEFAULT_RCLK, - PUC_PORT_8S, 0x14, -1, -1, + DEFAULT_RCLK, + PUC_PORT_8S, 0x14, -1, -1, .config_function = puc_config_amc - }, + }, { 0x11fe, 0x8010, 0xffff, 0, "Comtrol RocketPort 550/8 RJ11 part A", @@ -773,6 +773,42 @@ const struct puc_cfg puc_pci_devices[] = PUC_PORT_4S1P, 0x10, 4, 0, }, + { 0x9710, 0x9865, 0xa000, 0x3002, + "NetMos NM9865 Dual UART", + DEFAULT_RCLK, + PUC_PORT_2S, 0x10, 4, 0, + }, + + { 0x9710, 0x9865, 0xa000, 0x3003, + "NetMos NM9865 Triple UART", + DEFAULT_RCLK, + PUC_PORT_3S, 0x10, 4, 0, + }, + + { 0x9710, 0x9865, 0xa000, 0x3004, + "NetMos NM9865 Quad UART", + DEFAULT_RCLK, + PUC_PORT_4S, 0x10, 4, 0,0 + }, + + { 0x9710, 0x9865, 0xa000, 0x3011, + "NetMos NM9865 Single UART and 1284 Printer port", + DEFAULT_RCLK, + PUC_PORT_1S1P, 0x10, 4, 0, + }, + + { 0x9710, 0x9865, 0xa000, 0x3012, + "NetMos NM9865 Dual UART and 1284 Printer port", + DEFAULT_RCLK, + PUC_PORT_2S1P, 0x10, 4, 0, + }, + + { 0x9710, 0x9865, 0xa000, 0x3020, + "NetMos NM9865 Dual 1284 Printer port", + DEFAULT_RCLK, + PUC_PORT_2P, 0x10, 4, 0, + }, + { 0xb00c, 0x021c, 0xffff, 0, "IC Book Labs Gunboat x4 Lite", DEFAULT_RCLK, Modified: stable/7/sys/dev/uart/uart_bus_pci.c ============================================================================== --- stable/7/sys/dev/uart/uart_bus_pci.c Thu Dec 10 05:45:40 2009 (r200349) +++ stable/7/sys/dev/uart/uart_bus_pci.c Thu Dec 10 06:24:16 2009 (r200350) @@ -110,6 +110,7 @@ static struct pci_id pci_ns8250_ids[] = 0x10, 16384000 }, { 0x151f, 0x0000, 0xffff, 0, "TOPIC Semiconductor TP560 56k modem", 0x10 }, { 0x9710, 0x9835, 0x1000, 1, "NetMos NM9835 Serial Port", 0x10 }, +{ 0x9710, 0x9865, 0xa000, 0x1000, "NetMos NM9865 Serial Port", 0x10 }, { 0xdeaf, 0x9051, 0xffff, 0, "Middle Digital PC Weasel Serial Port", 0x10 }, { 0xffff, 0, 0xffff, 0, NULL, 0, 0} }; From owner-svn-src-stable-7@FreeBSD.ORG Fri Dec 11 00:00:19 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E418106566B; Fri, 11 Dec 2009 00:00:19 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D7C3D8FC13; Fri, 11 Dec 2009 00:00:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBB00Is9078931; Fri, 11 Dec 2009 00:00:18 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBB00InE078928; Fri, 11 Dec 2009 00:00:18 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200912110000.nBB00InE078928@svn.freebsd.org> From: Alexander Motin Date: Fri, 11 Dec 2009 00:00: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: r200374 - stable/7/sbin/geom/class/mirror X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2009 00:00:19 -0000 Author: mav Date: Fri Dec 11 00:00:18 2009 New Revision: 200374 URL: http://svn.freebsd.org/changeset/base/200374 Log: MFC r200282, r200290: Change gmirror default balance algorithm from "split" to improved "load". "split" is very ineffective for devices with rotating media as HDDs. To be effective, it needs that transfer time reduction due to block splitting was bigger then access time increase due to non-sequential access. For modern HDDs I was able to reproduce it only with read sizes of 2MB and above, which is almost not applicable in real life. "load" algorithm same time is more universal and effective now. Modified: stable/7/sbin/geom/class/mirror/geom_mirror.c stable/7/sbin/geom/class/mirror/gmirror.8 Directory Properties: stable/7/sbin/geom/ (props changed) stable/7/sbin/geom/class/label/ (props changed) stable/7/sbin/geom/class/part/ (props changed) stable/7/sbin/geom/misc/ (props changed) Modified: stable/7/sbin/geom/class/mirror/geom_mirror.c ============================================================================== --- stable/7/sbin/geom/class/mirror/geom_mirror.c Thu Dec 10 23:51:24 2009 (r200373) +++ stable/7/sbin/geom/class/mirror/geom_mirror.c Fri Dec 11 00:00:18 2009 (r200374) @@ -45,7 +45,7 @@ __FBSDID("$FreeBSD$"); uint32_t lib_version = G_LIB_VERSION; uint32_t version = G_MIRROR_VERSION; -static char label_balance[] = "split", configure_balance[] = "none"; +static char label_balance[] = "load", configure_balance[] = "none"; static intmax_t label_slice = 4096, configure_slice = -1; static intmax_t insert_priority = 0; Modified: stable/7/sbin/geom/class/mirror/gmirror.8 ============================================================================== --- stable/7/sbin/geom/class/mirror/gmirror.8 Thu Dec 10 23:51:24 2009 (r200373) +++ stable/7/sbin/geom/class/mirror/gmirror.8 Fri Dec 11 00:00:18 2009 (r200374) @@ -129,6 +129,7 @@ Specifies balance algorithm to use, one .Bl -tag -width ".Cm round-robin" .It Cm load Read from the component with the lowest load. +This is the default balance algorithm. .It Cm prefer Read from the component with the biggest priority. .It Cm round-robin @@ -136,7 +137,6 @@ Use round-robin algorithm when choosing .It Cm split Split read requests, which are bigger than or equal to slice size on N pieces, where N is the number of active components. -This is the default balance algorithm. .El .It Fl F Do not synchronize after a power failure or system crash. From owner-svn-src-stable-7@FreeBSD.ORG Fri Dec 11 01:11:56 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5190106566C; Fri, 11 Dec 2009 01:11:56 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 79BCD8FC17; Fri, 11 Dec 2009 01:11:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBB1BucE080880; Fri, 11 Dec 2009 01:11:56 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBB1Bu1H080876; Fri, 11 Dec 2009 01:11:56 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200912110111.nBB1Bu1H080876@svn.freebsd.org> From: Alexander Motin Date: Fri, 11 Dec 2009 01:11:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r200379 - stable/7/sys/dev/sound/pci/hda X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2009 01:11:56 -0000 Author: mav Date: Fri Dec 11 01:11:56 2009 New Revision: 200379 URL: http://svn.freebsd.org/changeset/base/200379 Log: MFC r196762: Improve HDA controller capabilities logging. Modified: stable/7/sys/dev/sound/pci/hda/hdac.c stable/7/sys/dev/sound/pci/hda/hdac_private.h stable/7/sys/dev/sound/pci/hda/hdac_reg.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- stable/7/sys/dev/sound/pci/hda/hdac.c Fri Dec 11 01:06:30 2009 (r200378) +++ stable/7/sys/dev/sound/pci/hda/hdac.c Fri Dec 11 01:11:56 2009 (r200379) @@ -1516,7 +1516,7 @@ hdac_get_capabilities(struct hdac_softc sc->num_iss = HDAC_GCAP_ISS(gcap); sc->num_oss = HDAC_GCAP_OSS(gcap); sc->num_bss = HDAC_GCAP_BSS(gcap); - + sc->num_sdo = HDAC_GCAP_NSDO(gcap); sc->support_64bit = HDA_FLAG_MATCH(gcap, HDAC_GCAP_64OK); corbsize = HDAC_READ_1(&sc->mem, HDAC_CORBSIZE); @@ -1551,11 +1551,12 @@ hdac_get_capabilities(struct hdac_softc return (ENXIO); } - HDA_BOOTHVERBOSE( - device_printf(sc->dev, " CORB size: %d\n", sc->corb_size); - device_printf(sc->dev, " RIRB size: %d\n", sc->rirb_size); - device_printf(sc->dev, " Streams: ISS=%d OSS=%d BSS=%d\n", - sc->num_iss, sc->num_oss, sc->num_bss); + HDA_BOOTVERBOSE( + device_printf(sc->dev, "Caps: OSS %d, ISS %d, BSS %d, " + "NSDO %d%s, CORB %d, RIRB %d\n", + sc->num_oss, sc->num_iss, sc->num_bss, 1 << sc->num_sdo, + sc->support_64bit ? ", 64bit" : "", + sc->corb_size, sc->rirb_size); ); return (0); Modified: stable/7/sys/dev/sound/pci/hda/hdac_private.h ============================================================================== --- stable/7/sys/dev/sound/pci/hda/hdac_private.h Fri Dec 11 01:06:30 2009 (r200378) +++ stable/7/sys/dev/sound/pci/hda/hdac_private.h Fri Dec 11 01:11:56 2009 (r200379) @@ -339,6 +339,7 @@ struct hdac_softc { int num_iss; int num_oss; int num_bss; + int num_sdo; int support_64bit; int streamcnt; Modified: stable/7/sys/dev/sound/pci/hda/hdac_reg.h ============================================================================== --- stable/7/sys/dev/sound/pci/hda/hdac_reg.h Fri Dec 11 01:06:30 2009 (r200378) +++ stable/7/sys/dev/sound/pci/hda/hdac_reg.h Fri Dec 11 01:11:56 2009 (r200379) @@ -136,6 +136,8 @@ (((gcap) & HDAC_GCAP_ISS_MASK) >> HDAC_GCAP_ISS_SHIFT) #define HDAC_GCAP_OSS(gcap) \ (((gcap) & HDAC_GCAP_OSS_MASK) >> HDAC_GCAP_OSS_SHIFT) +#define HDAC_GCAP_NSDO(gcap) \ + (((gcap) & HDAC_GCAP_NSDO_MASK) >> HDAC_GCAP_NSDO_SHIFT) /* GCTL - Global Control */ #define HDAC_GCTL_CRST 0x00000001 From owner-svn-src-stable-7@FreeBSD.ORG Fri Dec 11 01:13:48 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD344106568B; Fri, 11 Dec 2009 01:13:48 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A211A8FC18; Fri, 11 Dec 2009 01:13:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBB1DmYK080979; Fri, 11 Dec 2009 01:13:48 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBB1DmI6080977; Fri, 11 Dec 2009 01:13:48 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200912110113.nBB1DmI6080977@svn.freebsd.org> From: Alexander Motin Date: Fri, 11 Dec 2009 01:13: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: r200380 - stable/7/sys/dev/sound/pci/hda X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2009 01:13:48 -0000 Author: mav Date: Fri Dec 11 01:13:48 2009 New Revision: 200380 URL: http://svn.freebsd.org/changeset/base/200380 Log: MFC r197017, r197018 Add Intel 82801JD (one more ICH10) HDA controller ID. Add NVidia MCP89 HDA controller IDs. Modified: stable/7/sys/dev/sound/pci/hda/hdac.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- stable/7/sys/dev/sound/pci/hda/hdac.c Fri Dec 11 01:11:56 2009 (r200379) +++ stable/7/sys/dev/sound/pci/hda/hdac.c Fri Dec 11 01:13:48 2009 (r200380) @@ -142,7 +142,8 @@ SND_DECLARE_FILE("$FreeBSD$"); #define HDA_INTEL_82801G HDA_MODEL_CONSTRUCT(INTEL, 0x27d8) #define HDA_INTEL_82801H HDA_MODEL_CONSTRUCT(INTEL, 0x284b) #define HDA_INTEL_82801I HDA_MODEL_CONSTRUCT(INTEL, 0x293e) -#define HDA_INTEL_82801J HDA_MODEL_CONSTRUCT(INTEL, 0x3a3e) +#define HDA_INTEL_82801JI HDA_MODEL_CONSTRUCT(INTEL, 0x3a3e) +#define HDA_INTEL_82801JD HDA_MODEL_CONSTRUCT(INTEL, 0x3a6e) #define HDA_INTEL_PCH HDA_MODEL_CONSTRUCT(INTEL, 0x3b56) #define HDA_INTEL_SCH HDA_MODEL_CONSTRUCT(INTEL, 0x811b) #define HDA_INTEL_ALL HDA_MODEL_CONSTRUCT(INTEL, 0xffff) @@ -167,6 +168,10 @@ SND_DECLARE_FILE("$FreeBSD$"); #define HDA_NVIDIA_MCP79_2 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0ac1) #define HDA_NVIDIA_MCP79_3 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0ac2) #define HDA_NVIDIA_MCP79_4 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0ac3) +#define HDA_NVIDIA_MCP89_1 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0d94) +#define HDA_NVIDIA_MCP89_2 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0d95) +#define HDA_NVIDIA_MCP89_3 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0d96) +#define HDA_NVIDIA_MCP89_4 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0d97) #define HDA_NVIDIA_ALL HDA_MODEL_CONSTRUCT(NVIDIA, 0xffff) /* ATI */ @@ -482,7 +487,8 @@ static const struct { { HDA_INTEL_82801G, "Intel 82801G", 0 }, { HDA_INTEL_82801H, "Intel 82801H", 0 }, { HDA_INTEL_82801I, "Intel 82801I", 0 }, - { HDA_INTEL_82801J, "Intel 82801J", 0 }, + { HDA_INTEL_82801JI, "Intel 82801JI", 0 }, + { HDA_INTEL_82801JD, "Intel 82801JD", 0 }, { HDA_INTEL_PCH, "Intel PCH", 0 }, { HDA_INTEL_SCH, "Intel SCH", 0 }, { HDA_NVIDIA_MCP51, "NVidia MCP51", HDAC_NO_MSI }, @@ -503,6 +509,10 @@ static const struct { { HDA_NVIDIA_MCP79_2, "NVidia MCP79", 0 }, { HDA_NVIDIA_MCP79_3, "NVidia MCP79", 0 }, { HDA_NVIDIA_MCP79_4, "NVidia MCP79", 0 }, + { HDA_NVIDIA_MCP89_1, "NVidia MCP89", 0 }, + { HDA_NVIDIA_MCP89_2, "NVidia MCP89", 0 }, + { HDA_NVIDIA_MCP89_3, "NVidia MCP89", 0 }, + { HDA_NVIDIA_MCP89_4, "NVidia MCP89", 0 }, { HDA_ATI_SB450, "ATI SB450", 0 }, { HDA_ATI_SB600, "ATI SB600", 0 }, { HDA_ATI_RS600, "ATI RS600", 0 }, From owner-svn-src-stable-7@FreeBSD.ORG Fri Dec 11 01:15:53 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE8DE106566B; Fri, 11 Dec 2009 01:15:53 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9BF218FC17; Fri, 11 Dec 2009 01:15:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBB1FrSg081082; Fri, 11 Dec 2009 01:15:53 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBB1FrVD081079; Fri, 11 Dec 2009 01:15:53 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200912110115.nBB1FrVD081079@svn.freebsd.org> From: Alexander Motin Date: Fri, 11 Dec 2009 01:15:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r200381 - stable/7/sys/dev/sound/pci/hda X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2009 01:15:53 -0000 Author: mav Date: Fri Dec 11 01:15:53 2009 New Revision: 200381 URL: http://svn.freebsd.org/changeset/base/200381 Log: MFC r197611, r197640: Add some bits of HDMI/DisplayPort support from later specification updates. It may be not enough to make them work, but at least should give some information about these beasts. Add Realtek ALC887 codec ID. Modified: stable/7/sys/dev/sound/pci/hda/hda_reg.h stable/7/sys/dev/sound/pci/hda/hdac.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/sound/pci/hda/hda_reg.h ============================================================================== --- stable/7/sys/dev/sound/pci/hda/hda_reg.h Fri Dec 11 01:13:48 2009 (r200380) +++ stable/7/sys/dev/sound/pci/hda/hda_reg.h Fri Dec 11 01:15:53 2009 (r200381) @@ -660,13 +660,49 @@ #define HDA_CMD_VERB_GET_STRIPE_CONTROL 0xf24 #define HDA_CMD_VERB_SET_STRIPE_CONTROL 0x724 -#define HDA_CMD_SET_STRIPE_CONTROL(cad, nid) \ +#define HDA_CMD_GET_STRIPE_CONTROL(cad, nid) \ (HDA_CMD_12BIT((cad), (nid), \ HDA_CMD_VERB_GET_STRIPE_CONTROL, 0x0)) -#define HDA_CMD_GET_STRIPE_CONTROL(cad, nid, payload) \ +#define HDA_CMD_SET_STRIPE_CONTROL(cad, nid, payload) \ (HDA_CMD_12BIT((cad), (nid), \ HDA_CMD_VERB_SET_STRIPE_CONTROL, (payload))) +/* Channel Count Control */ +#define HDA_CMD_VERB_GET_CONV_CHAN_COUNT 0xf2d +#define HDA_CMD_VERB_SET_CONV_CHAN_COUNT 0x72d + +#define HDA_CMD_GET_CONV_CHAN_COUNT(cad, nid) \ + (HDA_CMD_12BIT((cad), (nid), \ + HDA_CMD_VERB_GET_CONV_CHAN_COUNT, 0x0)) +#define HDA_CMD_SET_CONV_CHAN_COUNT(cad, nid, payload) \ + (HDA_CMD_12BIT((cad), (nid), \ + HDA_CMD_VERB_SET_CONV_CHAN_COUNT, (payload))) + +#define HDA_CMD_VERB_GET_HDMI_DIP_SIZE 0xf2e +#define HDA_CMD_VERB_GET_HDMI_ELDD 0xf2f + +#define HDA_CMD_VERB_GET_HDMI_DIP_INDEX 0xf30 +#define HDA_CMD_VERB_SET_HDMI_DIP_INDEX 0x730 + +#define HDA_CMD_VERB_GET_HDMI_DIP_DATA 0xf31 +#define HDA_CMD_VERB_SET_HDMI_DIP_DATA 0x731 + +#define HDA_CMD_VERB_GET_HDMI_DIP_XMIT 0xf32 +#define HDA_CMD_VERB_SET_HDMI_DIP_XMIT 0x732 + +#define HDA_CMD_VERB_GET_HDMI_CP_CTRL 0xf33 +#define HDA_CMD_VERB_SET_HDMI_CP_CTRL 0x733 + +#define HDA_CMD_VERB_GET_HDMI_CHAN_SLOT 0xf34 +#define HDA_CMD_VERB_SET_HDMI_CHAN_SLOT 0x734 + +#define HDA_CMD_GET_HDMI_CHAN_SLOT(cad, nid) \ + (HDA_CMD_12BIT((cad), (nid), \ + HDA_CMD_VERB_GET_HDMI_CHAN_SLOT, 0x0)) +#define HDA_CMD_SET_HDMI_CHAN_SLOT(cad, nid, payload) \ + (HDA_CMD_12BIT((cad), (nid), \ + HDA_CMD_VERB_SET_HDMI_CHAN_SLOT, (payload))) + /* Function Reset */ #define HDA_CMD_VERB_FUNCTION_RESET 0x7ff @@ -779,6 +815,10 @@ #define HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_SHIFT 20 #define HDA_PARAM_AUDIO_WIDGET_CAP_DELAY_MASK 0x000f0000 #define HDA_PARAM_AUDIO_WIDGET_CAP_DELAY_SHIFT 16 +#define HDA_PARAM_AUDIO_WIDGET_CAP_CC_EXT_MASK 0x0000e000 +#define HDA_PARAM_AUDIO_WIDGET_CAP_CC_EXT_SHIFT 13 +#define HDA_PARAM_AUDIO_WIDGET_CAP_CP_MASK 0x00001000 +#define HDA_PARAM_AUDIO_WIDGET_CAP_CP_SHIFT 12 #define HDA_PARAM_AUDIO_WIDGET_CAP_LR_SWAP_MASK 0x00000800 #define HDA_PARAM_AUDIO_WIDGET_CAP_LR_SWAP_SHIFT 11 #define HDA_PARAM_AUDIO_WIDGET_CAP_POWER_CTRL_MASK 0x00000400 @@ -810,6 +850,14 @@ #define HDA_PARAM_AUDIO_WIDGET_CAP_DELAY(param) \ (((param) & HDA_PARAM_AUDIO_WIDGET_CAP_DELAY_MASK) >> \ HDA_PARAM_AUDIO_WIDGET_CAP_DELAY_SHIFT) +#define HDA_PARAM_AUDIO_WIDGET_CAP_CC(param) \ + ((((param) & HDA_PARAM_AUDIO_WIDGET_CAP_CC_EXT_MASK) >> \ + (HDA_PARAM_AUDIO_WIDGET_CAP_CC_EXT_SHIFT - 1)) | \ + (((param) & HDA_PARAM_AUDIO_WIDGET_CAP_STEREO_MASK) >> \ + HDA_PARAM_AUDIO_WIDGET_CAP_STEREO_SHIFT)) +#define HDA_PARAM_AUDIO_WIDGET_CAP_CP(param) \ + (((param) & HDA_PARAM_AUDIO_WIDGET_CAP_CP_MASK) >> \ + HDA_PARAM_AUDIO_WIDGET_CAP_CP_SHIFT) #define HDA_PARAM_AUDIO_WIDGET_CAP_LR_SWAP(param) \ (((param) & HDA_PARAM_AUDIO_WIDGET_CAP_LR_SWAP_MASK) >> \ HDA_PARAM_AUDIO_WIDGET_CAP_LR_SWAP_SHIFT) @@ -971,6 +1019,10 @@ /* Pin Capabilities */ #define HDA_PARAM_PIN_CAP 0x0c +#define HDA_PARAM_PIN_CAP_HBR_MASK 0x08000000 +#define HDA_PARAM_PIN_CAP_HBR_SHIFT 27 +#define HDA_PARAM_PIN_CAP_DP_MASK 0x01000000 +#define HDA_PARAM_PIN_CAP_DP_SHIFT 24 #define HDA_PARAM_PIN_CAP_EAPD_CAP_MASK 0x00010000 #define HDA_PARAM_PIN_CAP_EAPD_CAP_SHIFT 16 #define HDA_PARAM_PIN_CAP_VREF_CTRL_MASK 0x0000ff00 @@ -985,6 +1037,8 @@ #define HDA_PARAM_PIN_CAP_VREF_CTRL_50_SHIFT 9 #define HDA_PARAM_PIN_CAP_VREF_CTRL_HIZ_MASK 0x00000100 #define HDA_PARAM_PIN_CAP_VREF_CTRL_HIZ_SHIFT 8 +#define HDA_PARAM_PIN_CAP_HDMI_MASK 0x00000080 +#define HDA_PARAM_PIN_CAP_HDMI_SHIFT 7 #define HDA_PARAM_PIN_CAP_BALANCED_IO_PINS_MASK 0x00000040 #define HDA_PARAM_PIN_CAP_BALANCED_IO_PINS_SHIFT 6 #define HDA_PARAM_PIN_CAP_INPUT_CAP_MASK 0x00000020 @@ -1000,6 +1054,12 @@ #define HDA_PARAM_PIN_CAP_IMP_SENSE_CAP_MASK 0x00000001 #define HDA_PARAM_PIN_CAP_IMP_SENSE_CAP_SHIFT 0 +#define HDA_PARAM_PIN_CAP_HBR(param) \ + (((param) & HDA_PARAM_PIN_CAP_HBR_MASK) >> \ + HDA_PARAM_PIN_CAP_HBR_SHIFT) +#define HDA_PARAM_PIN_CAP_DP(param) \ + (((param) & HDA_PARAM_PIN_CAP_DP_MASK) >> \ + HDA_PARAM_PIN_CAP_DP_SHIFT) #define HDA_PARAM_PIN_CAP_EAPD_CAP(param) \ (((param) & HDA_PARAM_PIN_CAP_EAPD_CAP_MASK) >> \ HDA_PARAM_PIN_CAP_EAPD_CAP_SHIFT) @@ -1021,6 +1081,9 @@ #define HDA_PARAM_PIN_CAP_VREF_CTRL_HIZ(param) \ (((param) & HDA_PARAM_PIN_CAP_VREF_CTRL_HIZ_MASK) >> \ HDA_PARAM_PIN_CAP_VREF_CTRL_HIZ_SHIFT) +#define HDA_PARAM_PIN_CAP_HDMI(param) \ + (((param) & HDA_PARAM_PIN_CAP_HDMI_MASK) >> \ + HDA_PARAM_PIN_CAP_HDMI_SHIFT) #define HDA_PARAM_PIN_CAP_BALANCED_IO_PINS(param) \ (((param) & HDA_PARAM_PIN_CAP_BALANCED_IO_PINS_MASK) >> \ HDA_PARAM_PIN_CAP_BALANCED_IO_PINS_SHIFT) Modified: stable/7/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- stable/7/sys/dev/sound/pci/hda/hdac.c Fri Dec 11 01:13:48 2009 (r200380) +++ stable/7/sys/dev/sound/pci/hda/hdac.c Fri Dec 11 01:15:53 2009 (r200381) @@ -38,7 +38,6 @@ * 2) HDA Codecs support, which may include * - HDA * - Modem - * - HDMI * 3) Widget parser - the real magic of why this driver works on so * many hardwares with minimal vendor specific quirk. The original * parser was written using Ruby and can be found at @@ -83,7 +82,7 @@ #include "mixer_if.h" -#define HDA_DRV_TEST_REV "20090624_0136" +#define HDA_DRV_TEST_REV "20090929_0137" SND_DECLARE_FILE("$FreeBSD$"); @@ -619,6 +618,7 @@ static const struct { #define HDA_CODEC_ALC882 HDA_CODEC_CONSTRUCT(REALTEK, 0x0882) #define HDA_CODEC_ALC883 HDA_CODEC_CONSTRUCT(REALTEK, 0x0883) #define HDA_CODEC_ALC885 HDA_CODEC_CONSTRUCT(REALTEK, 0x0885) +#define HDA_CODEC_ALC887 HDA_CODEC_CONSTRUCT(REALTEK, 0x0887) #define HDA_CODEC_ALC888 HDA_CODEC_CONSTRUCT(REALTEK, 0x0888) #define HDA_CODEC_ALC889 HDA_CODEC_CONSTRUCT(REALTEK, 0x0889) #define HDA_CODEC_ALCXXXX HDA_CODEC_CONSTRUCT(REALTEK, 0xffff) @@ -804,6 +804,7 @@ static const struct { { HDA_CODEC_ALC882, "Realtek ALC882" }, { HDA_CODEC_ALC883, "Realtek ALC883" }, { HDA_CODEC_ALC885, "Realtek ALC885" }, + { HDA_CODEC_ALC887, "Realtek ALC887" }, { HDA_CODEC_ALC888, "Realtek ALC888" }, { HDA_CODEC_ALC889, "Realtek ALC889" }, { HDA_CODEC_AD1882, "Analog Devices AD1882" }, @@ -3484,6 +3485,14 @@ hdac_stream_setup(struct hdac_chan *ch) } hdac_command(sc, HDA_CMD_SET_CONV_STREAM_CHAN(cad, ch->io[i], c), cad); +#if 0 + hdac_command(sc, + HDA_CMD_SET_CONV_CHAN_COUNT(cad, ch->io[i], 1), cad); + hdac_command(sc, + HDA_CMD_SET_HDMI_CHAN_SLOT(cad, ch->io[i], 0x00), cad); + hdac_command(sc, + HDA_CMD_SET_HDMI_CHAN_SLOT(cad, ch->io[i], 0x11), cad); +#endif chn += HDA_PARAM_AUDIO_WIDGET_CAP_STEREO(w->param.widget_cap) ? 2 : 1; @@ -4491,7 +4500,7 @@ hdac_audio_as_parse(struct hdac_devinfo for (i = 0; i < max; i++) { as[i].hpredir = -1; as[i].chan = -1; - as[i].digital = 1; + as[i].digital = 0; } /* Scan associations skipping as=0. */ @@ -4546,8 +4555,14 @@ hdac_audio_as_parse(struct hdac_devinfo __func__, w->nid, j); as[cnt].enable = 0; } - if (!HDA_PARAM_AUDIO_WIDGET_CAP_DIGITAL(w->param.widget_cap)) - as[cnt].digital = 0; + if (HDA_PARAM_AUDIO_WIDGET_CAP_DIGITAL(w->param.widget_cap)) { + if (HDA_PARAM_PIN_CAP_DP(w->wclass.pin.cap)) + as[cnt].digital = 3; + else if (HDA_PARAM_PIN_CAP_HDMI(w->wclass.pin.cap)) + as[cnt].digital = 2; + else + as[cnt].digital = 1; + } /* Headphones with seq=15 may mean redirection. */ if (type == HDA_CONFIG_DEFAULTCONF_DEVICE_HP_OUT && seq == 15) @@ -6544,15 +6559,15 @@ hdac_create_pcms(struct hdac_devinfo *de devinfo->function.audio.devs[i].devinfo = devinfo; devinfo->function.audio.devs[i].play = -1; devinfo->function.audio.devs[i].rec = -1; - devinfo->function.audio.devs[i].digital = 2; + devinfo->function.audio.devs[i].digital = 255; } for (i = 0; i < devinfo->function.audio.ascnt; i++) { if (as[i].enable == 0) continue; for (j = 0; j < devinfo->function.audio.num_devs; j++) { - if (devinfo->function.audio.devs[j].digital != 2 && - devinfo->function.audio.devs[j].digital != - as[i].digital) + if (devinfo->function.audio.devs[j].digital != 255 && + (!devinfo->function.audio.devs[j].digital) != + (!as[i].digital)) continue; if (as[i].dir == HDA_CTL_IN) { if (devinfo->function.audio.devs[j].rec >= 0) @@ -6728,6 +6743,8 @@ hdac_dump_pin(struct hdac_softc *sc, str printf(" IN"); if (HDA_PARAM_PIN_CAP_BALANCED_IO_PINS(pincap)) printf(" BAL"); + if (HDA_PARAM_PIN_CAP_HDMI(pincap)) + printf(" HDMI"); if (HDA_PARAM_PIN_CAP_VREF_CTRL(pincap)) { printf(" VREF["); if (HDA_PARAM_PIN_CAP_VREF_CTRL_50(pincap)) @@ -6744,6 +6761,10 @@ hdac_dump_pin(struct hdac_softc *sc, str } if (HDA_PARAM_PIN_CAP_EAPD_CAP(pincap)) printf(" EAPD"); + if (HDA_PARAM_PIN_CAP_DP(pincap)) + printf(" DP"); + if (HDA_PARAM_PIN_CAP_HBR(pincap)) + printf(" HBR"); printf("\n"); device_printf(sc->dev, " Pin config: 0x%08x\n", w->wclass.pin.config); @@ -6851,8 +6872,11 @@ hdac_dump_nodes(struct hdac_devinfo *dev printf(" PROC"); if (HDA_PARAM_AUDIO_WIDGET_CAP_STRIPE(w->param.widget_cap)) printf(" STRIPE"); - if (HDA_PARAM_AUDIO_WIDGET_CAP_STEREO(w->param.widget_cap)) + j = HDA_PARAM_AUDIO_WIDGET_CAP_CC(w->param.widget_cap); + if (j == 1) printf(" STEREO"); + else if (j > 1) + printf(" %dCH", j + 1); printf("\n"); } if (w->bindas != -1) { @@ -7957,7 +7981,9 @@ hdac_pcm_probe(device_t dev) snprintf(buf, sizeof(buf), "HDA %s PCM #%d %s", hdac_codec_name(pdevinfo->devinfo->codec), pdevinfo->index, - pdevinfo->digital?"Digital":"Analog"); + (pdevinfo->digital == 3)?"DisplayPort": + ((pdevinfo->digital == 2)?"HDMI": + ((pdevinfo->digital)?"Digital":"Analog"))); device_set_desc_copy(dev, buf); return (0); } From owner-svn-src-stable-7@FreeBSD.ORG Fri Dec 11 01:17:49 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 74460106566B; Fri, 11 Dec 2009 01:17:49 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5E9A48FC0C; Fri, 11 Dec 2009 01:17:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBB1HnME081176; Fri, 11 Dec 2009 01:17:49 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBB1Hnif081174; Fri, 11 Dec 2009 01:17:49 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200912110117.nBB1Hnif081174@svn.freebsd.org> From: Alexander Motin Date: Fri, 11 Dec 2009 01:17:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r200382 - stable/7/sys/dev/sound/pci/hda X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2009 01:17:49 -0000 Author: mav Date: Fri Dec 11 01:17:49 2009 New Revision: 200382 URL: http://svn.freebsd.org/changeset/base/200382 Log: MFC r199258, r199846: Add more codec IDs. Add two Cirrus Logic codec IDs. Add GPIO setting quirk for Apple MacBookPro5,5. Modified: stable/7/sys/dev/sound/pci/hda/hdac.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- stable/7/sys/dev/sound/pci/hda/hdac.c Fri Dec 11 01:15:53 2009 (r200381) +++ stable/7/sys/dev/sound/pci/hda/hdac.c Fri Dec 11 01:17:49 2009 (r200382) @@ -82,7 +82,7 @@ #include "mixer_if.h" -#define HDA_DRV_TEST_REV "20090929_0137" +#define HDA_DRV_TEST_REV "20091113_0138" SND_DECLARE_FILE("$FreeBSD$"); @@ -311,6 +311,7 @@ SND_DECLARE_FILE("$FreeBSD$"); * (see HDA_CODEC_STAC9221 below). */ #define APPLE_INTEL_MAC 0x76808384 +#define APPLE_MACBOOKPRO55 0xcb7910de /* LG Electronics */ #define LG_VENDORID 0x1854 @@ -601,6 +602,11 @@ static const struct { #define HDA_CODEC_CONSTRUCT(vendor, id) \ (((uint32_t)(vendor##_VENDORID) << 16) | ((id) & 0xffff)) +/* Cirrus Logic */ +#define CIRRUSLOGIC_VENDORID 0x1013 +#define HDA_CODEC_CS4206 HDA_CODEC_CONSTRUCT(CIRRUSLOGIC, 0x4206) +#define HDA_CODEC_CS4207 HDA_CODEC_CONSTRUCT(CIRRUSLOGIC, 0x4207) + /* Realtek */ #define REALTEK_VENDORID 0x10ec #define HDA_CODEC_ALC260 HDA_CODEC_CONSTRUCT(REALTEK, 0x0260) @@ -760,6 +766,16 @@ static const struct { #define HDA_CODEC_VT1702_5 HDA_CODEC_CONSTRUCT(VIA, 0x5398) #define HDA_CODEC_VT1702_6 HDA_CODEC_CONSTRUCT(VIA, 0x6398) #define HDA_CODEC_VT1702_7 HDA_CODEC_CONSTRUCT(VIA, 0x7398) +#define HDA_CODEC_VT1716S_0 HDA_CODEC_CONSTRUCT(VIA, 0x0433) +#define HDA_CODEC_VT1716S_1 HDA_CODEC_CONSTRUCT(VIA, 0xa721) +#define HDA_CODEC_VT1718S_0 HDA_CODEC_CONSTRUCT(VIA, 0x0428) +#define HDA_CODEC_VT1718S_1 HDA_CODEC_CONSTRUCT(VIA, 0x4428) +#define HDA_CODEC_VT1812 HDA_CODEC_CONSTRUCT(VIA, 0x0448) +#define HDA_CODEC_VT1818S HDA_CODEC_CONSTRUCT(VIA, 0x0440) +#define HDA_CODEC_VT1828S HDA_CODEC_CONSTRUCT(VIA, 0x4441) +#define HDA_CODEC_VT2002P_0 HDA_CODEC_CONSTRUCT(VIA, 0x0438) +#define HDA_CODEC_VT2002P_1 HDA_CODEC_CONSTRUCT(VIA, 0x4438) +#define HDA_CODEC_VT2020 HDA_CODEC_CONSTRUCT(VIA, 0x0441) #define HDA_CODEC_VTXXXX HDA_CODEC_CONSTRUCT(VIA, 0xffff) /* ATI */ @@ -782,6 +798,7 @@ static const struct { #define HDA_CODEC_INTELG45_2 HDA_CODEC_CONSTRUCT(INTEL, 0x2802) #define HDA_CODEC_INTELG45_3 HDA_CODEC_CONSTRUCT(INTEL, 0x2803) #define HDA_CODEC_INTELG45_4 HDA_CODEC_CONSTRUCT(INTEL, 0x29fb) +#define HDA_CODEC_INTELQ57 HDA_CODEC_CONSTRUCT(INTEL, 0x0054) #define HDA_CODEC_INTELXXXX HDA_CODEC_CONSTRUCT(INTEL, 0xffff) /* Codecs */ @@ -789,6 +806,8 @@ static const struct { uint32_t id; char *name; } hdac_codecs[] = { + { HDA_CODEC_CS4206, "Cirrus Logic CS4206" }, + { HDA_CODEC_CS4207, "Cirrus Logic CS4207" }, { HDA_CODEC_ALC260, "Realtek ALC260" }, { HDA_CODEC_ALC262, "Realtek ALC262" }, { HDA_CODEC_ALC267, "Realtek ALC267" }, @@ -913,6 +932,16 @@ static const struct { { HDA_CODEC_VT1702_5, "VIA VT1702_5" }, { HDA_CODEC_VT1702_6, "VIA VT1702_6" }, { HDA_CODEC_VT1702_7, "VIA VT1702_7" }, + { HDA_CODEC_VT1716S_0, "VIA VT1716S_0" }, + { HDA_CODEC_VT1716S_1, "VIA VT1716S_1" }, + { HDA_CODEC_VT1718S_0, "VIA VT1718S_0" }, + { HDA_CODEC_VT1718S_1, "VIA VT1718S_1" }, + { HDA_CODEC_VT1812, "VIA VT1812" }, + { HDA_CODEC_VT1818S, "VIA VT1818S" }, + { HDA_CODEC_VT1828S, "VIA VT1828S" }, + { HDA_CODEC_VT2002P_0, "VIA VT2002P_0" }, + { HDA_CODEC_VT2002P_1, "VIA VT2002P_1" }, + { HDA_CODEC_VT2020, "VIA VT2020" }, { HDA_CODEC_ATIRS600_1,"ATI RS600 HDMI" }, { HDA_CODEC_ATIRS600_2,"ATI RS600 HDMI" }, { HDA_CODEC_ATIRS690, "ATI RS690/780 HDMI" }, @@ -926,6 +955,7 @@ static const struct { { HDA_CODEC_INTELG45_2, "Intel G45 HDMI" }, { HDA_CODEC_INTELG45_3, "Intel G45 HDMI" }, { HDA_CODEC_INTELG45_4, "Intel G45 HDMI" }, + { HDA_CODEC_INTELQ57, "Intel Q57 HDMI" }, { HDA_CODEC_SII1390, "Silicon Image SiI1390 HDMI" }, { HDA_CODEC_SII1392, "Silicon Image SiI1392 HDMI" }, /* Unknown codec */ @@ -4644,6 +4674,8 @@ static const struct { HDA_QUIRK_GPIO0 | HDA_QUIRK_OVREF50, 0}, { APPLE_INTEL_MAC, HDA_CODEC_STAC9221, HDA_QUIRK_GPIO0 | HDA_QUIRK_GPIO1, 0 }, + { APPLE_MACBOOKPRO55, HDA_CODEC_CS4206, + HDA_QUIRK_GPIO1 | HDA_QUIRK_GPIO3, 0 }, { DELL_D630_SUBVENDOR, HDA_CODEC_STAC9205X, HDA_QUIRK_GPIO0, 0 }, { DELL_V1400_SUBVENDOR, HDA_CODEC_STAC9228X, From owner-svn-src-stable-7@FreeBSD.ORG Fri Dec 11 01:25:10 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 651EC1065670; Fri, 11 Dec 2009 01:25:10 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 535D28FC15; Fri, 11 Dec 2009 01:25:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBB1PATQ081604; Fri, 11 Dec 2009 01:25:10 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBB1PALt081602; Fri, 11 Dec 2009 01:25:10 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200912110125.nBB1PALt081602@svn.freebsd.org> From: Alexander Motin Date: Fri, 11 Dec 2009 01:25: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: r200384 - stable/7/share/man/man4 X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2009 01:25:10 -0000 Author: mav Date: Fri Dec 11 01:25:10 2009 New Revision: 200384 URL: http://svn.freebsd.org/changeset/base/200384 Log: MFC r188512: Fix spelling a bit. Modified: stable/7/share/man/man4/snd_hda.4 Directory Properties: stable/7/share/man/man4/ (props changed) Modified: stable/7/share/man/man4/snd_hda.4 ============================================================================== --- stable/7/share/man/man4/snd_hda.4 Fri Dec 11 01:23:58 2009 (r200383) +++ stable/7/share/man/man4/snd_hda.4 Fri Dec 11 01:25:10 2009 (r200384) @@ -298,7 +298,7 @@ All codec pins are reversible (could be .Pp So high codec uniformity and flexibility allow driver to configure it in many different ways, depending on requested pins usage decribed by pins configuration. -Driver reports such default pin configuration when verbose messages enabled: +The driver reports such default pin configuration when verbose messages enabled: .Bd -literal hdac0: nid 20 0x01014020 as 2 seq 0 Line-out Jack jack 1 loc 1 color Green misc 0 hdac0: nid 21 0x99130110 as 1 seq 0 Speaker Fixed jack 3 loc 25 color Unknown misc 1 @@ -313,8 +313,8 @@ hdac0: nid 30 0x411111f0 as 15 seq 0 hdac0: nid 31 0x411111f0 as 15 seq 0 Speaker None jack 1 loc 1 color Black misc 1 .Ed .Pp -Here we can see, that the nodes with ID (nid) 25 and 27 are front pannel -connectors (Jack, loc 2), nids 20, 24 and 26 are rear pannel connectors +Here we can see, that the nodes with ID (nid) 25 and 27 are front panel +connectors (Jack, loc 2), nids 20, 24 and 26 are rear panel connectors (Jack, loc 1) and nid 21 is a built-in speaker (Fixed, loc 25). Pins with nids 22, 23, 28, 30 and 31 will be disabled by driver due to "None" connectivity. So the pin count and description matches to connectors that From owner-svn-src-stable-7@FreeBSD.ORG Fri Dec 11 01:26:09 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF4021065672; Fri, 11 Dec 2009 01:26:09 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BDB2B8FC1D; Fri, 11 Dec 2009 01:26:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBB1Q9Vf081667; Fri, 11 Dec 2009 01:26:09 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBB1Q9WA081665; Fri, 11 Dec 2009 01:26:09 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200912110126.nBB1Q9WA081665@svn.freebsd.org> From: Alexander Motin Date: Fri, 11 Dec 2009 01:26:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r200385 - stable/7/share/man/man4 X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2009 01:26:09 -0000 Author: mav Date: Fri Dec 11 01:26:09 2009 New Revision: 200385 URL: http://svn.freebsd.org/changeset/base/200385 Log: MFC r199247: Remove part that HDMI is not implemented. It had different meaning and confuse users. Extend BUGS section. Add some supported chipsets. Modified: stable/7/share/man/man4/snd_hda.4 Directory Properties: stable/7/share/man/man4/ (props changed) Modified: stable/7/share/man/man4/snd_hda.4 ============================================================================== --- stable/7/share/man/man4/snd_hda.4 Fri Dec 11 01:25:10 2009 (r200384) +++ stable/7/share/man/man4/snd_hda.4 Fri Dec 11 01:26:09 2009 (r200385) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 7, 2009 +.Dd November 13, 2009 .Dt SND_HDA 4 .Os .Sh NAME @@ -59,7 +59,7 @@ driver that allows the generic audio dri to be used with this hardware. Only audio functions are supported by .Nm . -Modem, HDMI and other possible functions are not implemented. +Modem and other possible functions are not implemented. .Pp The .Nm @@ -500,6 +500,14 @@ nVidia MCP68 .It nVidia MCP69 .It +nVidia MCP73 +.It +nVidia MCP78 +.It +nVidia MCP79 +.It +nVidia MCP89 +.It SiS 966 .It VIA VT8251/8237A @@ -626,5 +634,11 @@ trying to fix problem that way, make sur and the PCM audio device you are using really corresponds to expected audio connector. .Pp +Some vendors use non-standardized General Purpose I/O (GPIO) pins of codec +to control external amplifiers. In some cases setting proper combination of +GPIO bits may be needed to make sound work on specific device. +.Pp +HDMI and DisplayPort audio may also require support from video driver. +.Pp Due to OSS limitation multichannel (not multidevice) playback is not supported. From owner-svn-src-stable-7@FreeBSD.ORG Fri Dec 11 02:00:18 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA3ED106566B; Fri, 11 Dec 2009 02:00:18 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7F2D98FC15; Fri, 11 Dec 2009 02:00:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBB20IwJ082584; Fri, 11 Dec 2009 02:00:18 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBB20I14082583; Fri, 11 Dec 2009 02:00:18 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200912110200.nBB20I14082583@svn.freebsd.org> From: Doug Barton Date: Fri, 11 Dec 2009 02:00: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: r200389 - in stable/7/contrib/bind9: . lib/dns X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2009 02:00:18 -0000 Author: dougb Date: Fri Dec 11 02:00:18 2009 New Revision: 200389 URL: http://svn.freebsd.org/changeset/base/200389 Log: The mergeinfo on these 3 files has already been committed to contrib/bind9, so remove it from the individual files. Modified: Directory Properties: stable/7/contrib/bind9/CHANGES (props changed) stable/7/contrib/bind9/lib/dns/validator.c (props changed) stable/7/contrib/bind9/version (props changed) From owner-svn-src-stable-7@FreeBSD.ORG Fri Dec 11 02:23:04 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 92EE7106568B; Fri, 11 Dec 2009 02:23:04 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7F8D08FC20; Fri, 11 Dec 2009 02:23:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBB2N4t6083297; Fri, 11 Dec 2009 02:23:04 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBB2N4hM083287; Fri, 11 Dec 2009 02:23:04 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200912110223.nBB2N4hM083287@svn.freebsd.org> From: Doug Barton Date: Fri, 11 Dec 2009 02:23:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r200393 - in stable/7/contrib/bind9: . bin/named lib/dns lib/dns/include/dns X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2009 02:23:04 -0000 Author: dougb Date: Fri Dec 11 02:23:04 2009 New Revision: 200393 URL: http://svn.freebsd.org/changeset/base/200393 Log: Update to version 9.4.3-P4. The vulnerability this is designed to fix is related to DNSSEC validation on a resolving name server that allows access to untrusted users. If your system does not fall into all 3 of these categories you do not need to update immediately. Modified: stable/7/contrib/bind9/CHANGES stable/7/contrib/bind9/bin/named/query.c stable/7/contrib/bind9/lib/dns/api stable/7/contrib/bind9/lib/dns/include/dns/types.h stable/7/contrib/bind9/lib/dns/masterdump.c stable/7/contrib/bind9/lib/dns/rbtdb.c stable/7/contrib/bind9/lib/dns/resolver.c stable/7/contrib/bind9/lib/dns/validator.c stable/7/contrib/bind9/version Directory Properties: stable/7/contrib/bind9/ (props changed) Modified: stable/7/contrib/bind9/CHANGES ============================================================================== --- stable/7/contrib/bind9/CHANGES Fri Dec 11 02:09:46 2009 (r200392) +++ stable/7/contrib/bind9/CHANGES Fri Dec 11 02:23:04 2009 (r200393) @@ -1,3 +1,9 @@ + --- 9.4.3-P4 released --- + +2772. [security] When validating, track whether pending data was from + the additional section or not and only return it if + validates as secure. [RT #20438] + --- 9.4.3-P3 released --- 2640. [security] A specially crafted update packet will cause named Modified: stable/7/contrib/bind9/bin/named/query.c ============================================================================== --- stable/7/contrib/bind9/bin/named/query.c Fri Dec 11 02:09:46 2009 (r200392) +++ stable/7/contrib/bind9/bin/named/query.c Fri Dec 11 02:23:04 2009 (r200393) @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: query.c,v 1.257.18.46 2008/10/15 22:33:01 marka Exp $ */ +/* $Id: query.c,v 1.257.18.46.2.1 2009/11/19 00:25:17 marka Exp $ */ /*! \file */ @@ -109,6 +109,8 @@ #define DNS_GETDB_NOLOG 0x02U #define DNS_GETDB_PARTIAL 0x04U +#define PENDINGOK(x) (((x) & DNS_DBFIND_PENDINGOK) != 0) + typedef struct client_additionalctx { ns_client_t *client; dns_rdataset_t *rdataset; @@ -1721,8 +1723,8 @@ query_addadditional2(void *arg, dns_name */ if (result == ISC_R_SUCCESS && additionaltype == dns_rdatasetadditional_fromcache && - (rdataset->trust == dns_trust_pending || - rdataset->trust == dns_trust_glue) && + (DNS_TRUST_PENDING(rdataset->trust) || + DNS_TRUST_GLUE(rdataset->trust)) && !validate(client, db, fname, rdataset, sigrdataset)) { dns_rdataset_disassociate(rdataset); if (dns_rdataset_isassociated(sigrdataset)) @@ -1761,8 +1763,8 @@ query_addadditional2(void *arg, dns_name */ if (result == ISC_R_SUCCESS && additionaltype == dns_rdatasetadditional_fromcache && - (rdataset->trust == dns_trust_pending || - rdataset->trust == dns_trust_glue) && + (DNS_TRUST_PENDING(rdataset->trust) || + DNS_TRUST_GLUE(rdataset->trust)) && !validate(client, db, fname, rdataset, sigrdataset)) { dns_rdataset_disassociate(rdataset); if (dns_rdataset_isassociated(sigrdataset)) @@ -2547,14 +2549,14 @@ query_addbestns(ns_client_t *client) { /* * Attempt to validate RRsets that are pending or that are glue. */ - if ((rdataset->trust == dns_trust_pending || - (sigrdataset != NULL && sigrdataset->trust == dns_trust_pending)) + if ((DNS_TRUST_PENDING(rdataset->trust) || + (sigrdataset != NULL && DNS_TRUST_PENDING(sigrdataset->trust))) && !validate(client, db, fname, rdataset, sigrdataset) && - (client->query.dboptions & DNS_DBFIND_PENDINGOK) == 0) + !PENDINGOK(client->query.dboptions)) goto cleanup; - if ((rdataset->trust == dns_trust_glue || - (sigrdataset != NULL && sigrdataset->trust == dns_trust_glue)) && + if ((DNS_TRUST_GLUE(rdataset->trust) || + (sigrdataset != NULL && DNS_TRUST_GLUE(sigrdataset->trust))) && !validate(client, db, fname, rdataset, sigrdataset) && SECURE(client) && WANTDNSSEC(client)) goto cleanup; @@ -3344,6 +3346,8 @@ query_find(ns_client_t *client, dns_fetc isc_boolean_t empty_wild; dns_rdataset_t *noqname; isc_boolean_t resuming; + dns_rdataset_t tmprdataset; + unsigned int dboptions; CTRACE("query_find"); @@ -3555,9 +3559,49 @@ query_find(ns_client_t *client, dns_fetc /* * Now look for an answer in the database. */ + dboptions = client->query.dboptions; + if (sigrdataset == NULL && client->view->enablednssec) { + /* + * If the client doesn't want DNSSEC we still want to + * look for any data pending validation to save a remote + * lookup if possible. + */ + dns_rdataset_init(&tmprdataset); + sigrdataset = &tmprdataset; + dboptions |= DNS_DBFIND_PENDINGOK; + } + refind: result = dns_db_find(db, client->query.qname, version, type, - client->query.dboptions, client->now, - &node, fname, rdataset, sigrdataset); + dboptions, client->now, &node, fname, + rdataset, sigrdataset); + /* + * If we have found pending data try to validate it. + * If the data does not validate as secure and we can't + * use the unvalidated data requery the database with + * pending disabled to prevent infinite looping. + */ + if (result != ISC_R_SUCCESS || !DNS_TRUST_PENDING(rdataset->trust)) + goto validation_done; + if (validate(client, db, fname, rdataset, sigrdataset)) + goto validation_done; + if (rdataset->trust != dns_trust_pending_answer || + !PENDINGOK(client->query.dboptions)) { + dns_rdataset_disassociate(rdataset); + if (sigrdataset != NULL && + dns_rdataset_isassociated(sigrdataset)) + dns_rdataset_disassociate(sigrdataset); + if (sigrdataset == &tmprdataset) + sigrdataset = NULL; + dns_db_detachnode(db, &node); + dboptions &= ~DNS_DBFIND_PENDINGOK; + goto refind; + } + validation_done: + if (sigrdataset == &tmprdataset) { + if (dns_rdataset_isassociated(sigrdataset)) + dns_rdataset_disassociate(sigrdataset); + sigrdataset = NULL; + } resume: CTRACE("query_find: resume"); Modified: stable/7/contrib/bind9/lib/dns/api ============================================================================== --- stable/7/contrib/bind9/lib/dns/api Fri Dec 11 02:09:46 2009 (r200392) +++ stable/7/contrib/bind9/lib/dns/api Fri Dec 11 02:23:04 2009 (r200393) @@ -1,3 +1,3 @@ -LIBINTERFACE = 36 -LIBREVISION = 2 +LIBINTERFACE = 38 +LIBREVISION = 0 LIBAGE = 0 Modified: stable/7/contrib/bind9/lib/dns/include/dns/types.h ============================================================================== --- stable/7/contrib/bind9/lib/dns/include/dns/types.h Fri Dec 11 02:09:46 2009 (r200392) +++ stable/7/contrib/bind9/lib/dns/include/dns/types.h Fri Dec 11 02:23:04 2009 (r200393) @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: types.h,v 1.109.18.12 2006/05/02 12:55:31 shane Exp $ */ +/* $Id: types.h,v 1.109.18.12.68.1 2009/11/19 00:25:18 marka Exp $ */ #ifndef DNS_TYPES_H #define DNS_TYPES_H 1 @@ -241,40 +241,52 @@ enum { dns_trust_none = 0, #define dns_trust_none ((dns_trust_t)dns_trust_none) - /*% Subject to DNSSEC validation but has not yet been validated */ - dns_trust_pending = 1, -#define dns_trust_pending ((dns_trust_t)dns_trust_pending) - + /*% + * Subject to DNSSEC validation but has not yet been validated + * dns_trust_pending_additional (from the additional section). + */ + dns_trust_pending_additional = 1, +#define dns_trust_pending_additional \ + ((dns_trust_t)dns_trust_pending_additional) + + dns_trust_pending_answer = 2, +#define dns_trust_pending_answer ((dns_trust_t)dns_trust_pending_answer) + /*% Received in the additional section of a response. */ - dns_trust_additional = 2, + dns_trust_additional = 3, #define dns_trust_additional ((dns_trust_t)dns_trust_additional) - - /* Received in a referral response. */ - dns_trust_glue = 3, + + /* Received in a referral response. */ + dns_trust_glue = 4, #define dns_trust_glue ((dns_trust_t)dns_trust_glue) - - /* Answser from a non-authoritative server */ - dns_trust_answer = 4, + + /* Answer from a non-authoritative server */ + dns_trust_answer = 5, #define dns_trust_answer ((dns_trust_t)dns_trust_answer) - + /* Received in the authority section as part of an authoritative response */ - dns_trust_authauthority = 5, + dns_trust_authauthority = 6, #define dns_trust_authauthority ((dns_trust_t)dns_trust_authauthority) - /* Answser from an authoritative server */ - dns_trust_authanswer = 6, + /* Answer from an authoritative server */ + dns_trust_authanswer = 7, #define dns_trust_authanswer ((dns_trust_t)dns_trust_authanswer) - - /* Successfully DNSSEC validated */ - dns_trust_secure = 7, + + /* Successfully DNSSEC validated */ + dns_trust_secure = 8, #define dns_trust_secure ((dns_trust_t)dns_trust_secure) /* This server is authoritative */ - dns_trust_ultimate = 8 + dns_trust_ultimate = 9 #define dns_trust_ultimate ((dns_trust_t)dns_trust_ultimate) }; +#define DNS_TRUST_PENDING(x) ((x) == dns_trust_pending_answer || \ + (x) == dns_trust_pending_additional) +#define DNS_TRUST_GLUE(x) ((x) == dns_trust_glue) + + /*% * Name checking severites. */ Modified: stable/7/contrib/bind9/lib/dns/masterdump.c ============================================================================== --- stable/7/contrib/bind9/lib/dns/masterdump.c Fri Dec 11 02:09:46 2009 (r200392) +++ stable/7/contrib/bind9/lib/dns/masterdump.c Fri Dec 11 02:23:04 2009 (r200393) @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: masterdump.c,v 1.73.18.16 2008/08/13 23:46:04 tbox Exp $ */ +/* $Id: masterdump.c,v 1.73.18.16.2.1 2009/11/19 00:25:17 marka Exp $ */ /*! \file */ @@ -774,7 +774,8 @@ dump_order_compare(const void *a, const static const char *trustnames[] = { "none", - "pending", + "pending-additional", + "pending-answer", "additional", "glue", "answer", Modified: stable/7/contrib/bind9/lib/dns/rbtdb.c ============================================================================== --- stable/7/contrib/bind9/lib/dns/rbtdb.c Fri Dec 11 02:09:46 2009 (r200392) +++ stable/7/contrib/bind9/lib/dns/rbtdb.c Fri Dec 11 02:23:04 2009 (r200393) @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: rbtdb.c,v 1.196.18.53 2008/01/31 23:46:05 tbox Exp $ */ +/* $Id: rbtdb.c,v 1.196.18.53.4.1 2009/11/19 00:25:17 marka Exp $ */ /*! \file */ @@ -3072,7 +3072,7 @@ cache_zonecut_callback(dns_rbtnode_t *no } if (dname_header != NULL && - (dname_header->trust != dns_trust_pending || + (!DNS_TRUST_PENDING(dname_header->trust) || (search->options & DNS_DBFIND_PENDINGOK) != 0)) { /* * We increment the reference count on node to ensure that @@ -3586,7 +3586,7 @@ cache_find(dns_db_t *db, dns_name_t *nam if (found == NULL || (found->trust == dns_trust_glue && ((options & DNS_DBFIND_GLUEOK) == 0)) || - (found->trust == dns_trust_pending && + (DNS_TRUST_PENDING(found->trust) && ((options & DNS_DBFIND_PENDINGOK) == 0))) { /* * If there is an NS rdataset at this node, then this is the Modified: stable/7/contrib/bind9/lib/dns/resolver.c ============================================================================== --- stable/7/contrib/bind9/lib/dns/resolver.c Fri Dec 11 02:09:46 2009 (r200392) +++ stable/7/contrib/bind9/lib/dns/resolver.c Fri Dec 11 02:23:04 2009 (r200393) @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: resolver.c,v 1.284.18.79 2008/10/17 22:02:13 jinmei Exp $ */ +/* $Id: resolver.c,v 1.284.18.79.2.1 2009/11/19 00:25:17 marka Exp $ */ /*! \file */ @@ -3887,6 +3887,7 @@ cache_name(fetchctx_t *fctx, dns_name_t * for it, unless it is glue. */ if (secure_domain && rdataset->trust != dns_trust_glue) { + dns_trust_t trust; /* * RRSIGs are validated as part of validating the * type they cover. @@ -3923,12 +3924,34 @@ cache_name(fetchctx_t *fctx, dns_name_t } /* + * Reject out of bailiwick additional records + * without RRSIGs as they can't possibly validate + * as "secure" and as we will never never want to + * store these as "answers" after validation. + */ + if (rdataset->trust == dns_trust_additional && + sigrdataset == NULL && EXTERNAL(rdataset)) + continue; + + /* + * XXXMPA: If we store as "answer" after validating + * then we need to do bailiwick processing and + * also need to track whether RRsets are in or + * out of bailiwick. This will require a another + * pending trust level. + * * Cache this rdataset/sigrdataset pair as - * pending data. + * pending data. Track whether it was additional + * or not. */ - rdataset->trust = dns_trust_pending; + if (rdataset->trust == dns_trust_additional) + trust = dns_trust_pending_additional; + else + trust = dns_trust_pending_answer; + + rdataset->trust = trust; if (sigrdataset != NULL) - sigrdataset->trust = dns_trust_pending; + sigrdataset->trust = trust; if (!need_validation) addedrdataset = ardataset; else @@ -4276,7 +4299,7 @@ ncache_message(fetchctx_t *fctx, dns_adb for (trdataset = ISC_LIST_HEAD(tname->list); trdataset != NULL; trdataset = ISC_LIST_NEXT(trdataset, link)) - trdataset->trust = dns_trust_pending; + trdataset->trust = dns_trust_pending_answer; result = dns_message_nextname(fctx->rmessage, DNS_SECTION_AUTHORITY); } Modified: stable/7/contrib/bind9/lib/dns/validator.c ============================================================================== --- stable/7/contrib/bind9/lib/dns/validator.c Fri Dec 11 02:09:46 2009 (r200392) +++ stable/7/contrib/bind9/lib/dns/validator.c Fri Dec 11 02:23:04 2009 (r200393) @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: validator.c,v 1.119.18.41.2.1 2009/03/17 02:23:49 marka Exp $ */ +/* $Id: validator.c,v 1.119.18.41.2.2 2009/11/19 00:25:18 marka Exp $ */ /*! \file */ @@ -1174,7 +1174,7 @@ get_key(dns_validator_t *val, dns_rdata_ * We have an rrset for the given keyname. */ val->keyset = &val->frdataset; - if (val->frdataset.trust == dns_trust_pending && + if (DNS_TRUST_PENDING(val->frdataset.trust) && dns_rdataset_isassociated(&val->fsigrdataset)) { /* @@ -1189,7 +1189,7 @@ get_key(dns_validator_t *val, dns_rdata_ if (result != ISC_R_SUCCESS) return (result); return (DNS_R_WAIT); - } else if (val->frdataset.trust == dns_trust_pending) { + } else if (DNS_TRUST_PENDING(val->frdataset.trust)) { /* * Having a pending key with no signature means that * something is broken. @@ -1805,7 +1805,7 @@ validatezonekey(dns_validator_t *val) { * We have DS records. */ val->dsset = &val->frdataset; - if (val->frdataset.trust == dns_trust_pending && + if (DNS_TRUST_PENDING(val->frdataset.trust) && dns_rdataset_isassociated(&val->fsigrdataset)) { result = create_validator(val, @@ -1818,7 +1818,7 @@ validatezonekey(dns_validator_t *val) { if (result != ISC_R_SUCCESS) return (result); return (DNS_R_WAIT); - } else if (val->frdataset.trust == dns_trust_pending) { + } else if (DNS_TRUST_PENDING(val->frdataset.trust)) { /* * There should never be an unsigned DS. */ @@ -2667,7 +2667,7 @@ proveunsecure(dns_validator_t *val, isc_ * There is no DS. If this is a delegation, * we maybe done. */ - if (val->frdataset.trust == dns_trust_pending) { + if (DNS_TRUST_PENDING(val->frdataset.trust)) { result = create_fetch(val, tname, dns_rdatatype_ds, dsfetched2, Modified: stable/7/contrib/bind9/version ============================================================================== --- stable/7/contrib/bind9/version Fri Dec 11 02:09:46 2009 (r200392) +++ stable/7/contrib/bind9/version Fri Dec 11 02:23:04 2009 (r200393) @@ -1,4 +1,4 @@ -# $Id: version,v 1.29.134.23.2.3 2009/07/28 13:57:27 marka Exp $ +# $Id: version,v 1.29.134.23.2.4 2009/11/19 00:25:17 marka Exp $ # # This file must follow /bin/sh rules. It is imported directly via # configure. @@ -7,4 +7,4 @@ MAJORVER=9 MINORVER=4 PATCHVER=3 RELEASETYPE=-P -RELEASEVER=3 +RELEASEVER=4 From owner-svn-src-stable-7@FreeBSD.ORG Fri Dec 11 12:38:16 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76D9810656A6; Fri, 11 Dec 2009 12:38:16 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4C1418FC2D; Fri, 11 Dec 2009 12:38:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBBCcG2P008708; Fri, 11 Dec 2009 12:38:16 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBBCcGIs008705; Fri, 11 Dec 2009 12:38:16 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <200912111238.nBBCcGIs008705@svn.freebsd.org> From: Fabien Thomas Date: Fri, 11 Dec 2009 12:38: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: r200408 - stable/7/sys/dev/hwpmc X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2009 12:38:16 -0000 Author: fabient Date: Fri Dec 11 12:38:15 2009 New Revision: 200408 URL: http://svn.freebsd.org/changeset/base/200408 Log: MFC 196739: Add counters for the i7 architecture which were accidentally left out of the original commit of i7 support. These are all the counters on pages A-32 and A-33 of the _Intel(R) 64 and IA32 Architectures Software Developer's Manual Vol 3B_, June 2009. Almost all of these counters relate to operations on the L2 cache. Modified: stable/7/sys/dev/hwpmc/hwpmc_core.c stable/7/sys/dev/hwpmc/pmc_events.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/7/sys/dev/hwpmc/hwpmc_core.c Fri Dec 11 12:36:59 2009 (r200407) +++ stable/7/sys/dev/hwpmc/hwpmc_core.c Fri Dec 11 12:38:15 2009 (r200408) @@ -1182,6 +1182,29 @@ static struct iap_event_descr iap_events IAPDESCR(DBH_01H, 0xDB, 0x01, IAP_F_FM | IAP_F_I7), IAPDESCR(E4H_01H, 0xE4, 0x01, IAP_F_FM | IAP_F_I7), IAPDESCR(E5H_01H, 0xE5, 0x01, IAP_F_FM | IAP_F_I7), + IAPDESCR(E6H_01H, 0xE6, 0x01, IAP_F_FM | IAP_F_I7), + IAPDESCR(E6H_02H, 0xE6, 0x02, IAP_F_FM | IAP_F_I7), + IAPDESCR(E8H_01H, 0xE8, 0x01, IAP_F_FM | IAP_F_I7), + IAPDESCR(E8H_02H, 0xE8, 0x02, IAP_F_FM | IAP_F_I7), + IAPDESCR(E8H_03H, 0xE8, 0x03, IAP_F_FM | IAP_F_I7), + IAPDESCR(F0H_01H, 0xF0, 0x01, IAP_F_FM | IAP_F_I7), + IAPDESCR(F0H_02H, 0xF0, 0x02, IAP_F_FM | IAP_F_I7), + IAPDESCR(F0H_04H, 0xF0, 0x04, IAP_F_FM | IAP_F_I7), + IAPDESCR(F0H_08H, 0xF0, 0x08, IAP_F_FM | IAP_F_I7), + IAPDESCR(F0H_10H, 0xF0, 0x10, IAP_F_FM | IAP_F_I7), + IAPDESCR(F0H_20H, 0xF0, 0x20, IAP_F_FM | IAP_F_I7), + IAPDESCR(F0H_40H, 0xF0, 0x40, IAP_F_FM | IAP_F_I7), + IAPDESCR(F0H_80H, 0xF0, 0x80, IAP_F_FM | IAP_F_I7), + IAPDESCR(F1H_02H, 0xF1, 0x02, IAP_F_FM | IAP_F_I7), + IAPDESCR(F1H_04H, 0xF1, 0x04, IAP_F_FM | IAP_F_I7), + IAPDESCR(F1H_07H, 0xF1, 0x07, IAP_F_FM | IAP_F_I7), + IAPDESCR(F2H_01H, 0xF2, 0x01, IAP_F_FM | IAP_F_I7), + IAPDESCR(F2H_02H, 0xF2, 0x02, IAP_F_FM | IAP_F_I7), + IAPDESCR(F2H_04H, 0xF2, 0x04, IAP_F_FM | IAP_F_I7), + IAPDESCR(F2H_08H, 0xF2, 0x08, IAP_F_FM | IAP_F_I7), + IAPDESCR(F2H_0FH, 0xF2, 0x0F, IAP_F_FM | IAP_F_I7), + IAPDESCR(F3H_01H, 0xF3, 0x01, IAP_F_FM | IAP_F_I7), + IAPDESCR(F3H_02H, 0xF3, 0x02, IAP_F_FM | IAP_F_I7), IAPDESCR(F3H_04H, 0xF3, 0x04, IAP_F_FM | IAP_F_I7), IAPDESCR(F3H_08H, 0xF3, 0x08, IAP_F_FM | IAP_F_I7), IAPDESCR(F3H_10H, 0xF3, 0x10, IAP_F_FM | IAP_F_I7), Modified: stable/7/sys/dev/hwpmc/pmc_events.h ============================================================================== --- stable/7/sys/dev/hwpmc/pmc_events.h Fri Dec 11 12:36:59 2009 (r200407) +++ stable/7/sys/dev/hwpmc/pmc_events.h Fri Dec 11 12:38:15 2009 (r200408) @@ -29,8 +29,18 @@ #ifndef _DEV_HWPMC_PMC_EVENTS_H_ #define _DEV_HWPMC_PMC_EVENTS_H_ -/* - * PMC event codes. +/* + * Note: Documentation on adding events can be found both in + * the source tree at src/share/doc/papers/hwpmc/hwpmc.ms + * as well as on-line at: + * + * http://wiki.freebsd.org/PmcTools/PmcHardwareHowTo + * + * Please refer to those resources before you attempt to modify + * this file or the hwpmc driver/subsystem. + */ + +/* * PMC event codes. * * __PMC_EV(CLASS, SYMBOLIC-NAME) * @@ -973,7 +983,30 @@ __PMC_EV(IAP, EVENT_FDH_04H) \ __PMC_EV(IAP, EVENT_FDH_08H) \ __PMC_EV(IAP, EVENT_FDH_10H) \ __PMC_EV(IAP, EVENT_FDH_20H) \ -__PMC_EV(IAP, EVENT_FDH_40H) +__PMC_EV(IAP, EVENT_FDH_40H) \ +__PMC_EV(IAP, EVENT_E6H_02H) \ +__PMC_EV(IAP, EVENT_E8H_01H) \ +__PMC_EV(IAP, EVENT_E8H_02H) \ +__PMC_EV(IAP, EVENT_E8H_03H) \ +__PMC_EV(IAP, EVENT_F0H_01H) \ +__PMC_EV(IAP, EVENT_F0H_02H) \ +__PMC_EV(IAP, EVENT_F0H_04H) \ +__PMC_EV(IAP, EVENT_F0H_08H) \ +__PMC_EV(IAP, EVENT_F0H_10H) \ +__PMC_EV(IAP, EVENT_F0H_20H) \ +__PMC_EV(IAP, EVENT_F0H_40H) \ +__PMC_EV(IAP, EVENT_F0H_80H) \ +__PMC_EV(IAP, EVENT_F1H_02H) \ +__PMC_EV(IAP, EVENT_F1H_04H) \ +__PMC_EV(IAP, EVENT_F1H_07H) \ +__PMC_EV(IAP, EVENT_F2H_01H) \ +__PMC_EV(IAP, EVENT_F2H_02H) \ +__PMC_EV(IAP, EVENT_F2H_04H) \ +__PMC_EV(IAP, EVENT_F2H_08H) \ +__PMC_EV(IAP, EVENT_F2H_0FH) \ +__PMC_EV(IAP, EVENT_F3H_01H) \ +__PMC_EV(IAP, EVENT_F3H_02H) + #define PMC_EV_IAP_FIRST PMC_EV_IAP_EVENT_02H_81H #define PMC_EV_IAP_LAST PMC_EV_IAP_EVENT_FDH_40H @@ -1894,6 +1927,29 @@ __PMC_EV_ALIAS("UOP_UNFUSION", IAP_EV __PMC_EV_ALIAS("BR_INST_DECODED", IAP_EVENT_E0H_01H) \ __PMC_EV_ALIAS("BOGUS_BR", IAP_EVENT_E4H_01H) \ __PMC_EV_ALIAS("BPU_MISSED_CALL_RET", IAP_EVENT_E5H_01H) \ +__PMC_EV_ALIAS("BACLEAR.CLEAR", IAP_EVENT_E6H_01H) \ +__PMC_EV_ALIAS("BACLEAR.BAD_TARGET", IAP_EVENT_E6H_02H) \ +__PMC_EV_ALIAS("BPU_CLEARS.EARLY", IAP_EVENT_E8H_01H) \ +__PMC_EV_ALIAS("BPU_CLEARS.LATE", IAP_EVENT_E8H_02H) \ +__PMC_EV_ALIAS("BPU_CLEARS.ANY", IAP_EVENT_E8H_03H) \ +__PMC_EV_ALIAS("L2_TRANSACTIONS.LOAD", IAP_EVENT_F0H_01H) \ +__PMC_EV_ALIAS("L2_TRANSACTIONS.RFO", IAP_EVENT_F0H_02H) \ +__PMC_EV_ALIAS("L2_TRANSACTIONS.IFETCH", IAP_EVENT_F0H_04H) \ +__PMC_EV_ALIAS("L2_TRANSACTIONS.PREFETCH", IAP_EVENT_F0H_08H) \ +__PMC_EV_ALIAS("L2_TRANSACTIONS.L1D_WB", IAP_EVENT_F0H_10H) \ +__PMC_EV_ALIAS("L2_TRANSACTIONS.FILL", IAP_EVENT_F0H_20H) \ +__PMC_EV_ALIAS("L2_TRANSACTIONS.WB", IAP_EVENT_F0H_40H) \ +__PMC_EV_ALIAS("L2_TRANSACTIONS.ANY", IAP_EVENT_F0H_80H) \ +__PMC_EV_ALIAS("L2_LINES_IN.S_STATE", IAP_EVENT_F1H_02H) \ +__PMC_EV_ALIAS("L2_LINES_IN.E_STATE", IAP_EVENT_F1H_04H) \ +__PMC_EV_ALIAS("L2_LINES_IN.ANY", IAP_EVENT_F1H_07H) \ +__PMC_EV_ALIAS("L2_LINES_OUT.DEMAND_CLEAN", IAP_EVENT_F2H_01H) \ +__PMC_EV_ALIAS("L2_LINES_OUT.DEMAND_DIRTY", IAP_EVENT_F2H_02H) \ +__PMC_EV_ALIAS("L2_LINES_OUT.PREFETCH_CLEAN", IAP_EVENT_F2H_04H) \ +__PMC_EV_ALIAS("L2_LINES_OUT.PREFETCH_DIRTY", IAP_EVENT_F2H_08H) \ +__PMC_EV_ALIAS("L2_LINES_OUT.ANY", IAP_EVENT_F2H_0FH) \ +__PMC_EV_ALIAS("L2_HW_PREFETCH.HIT", IAP_EVENT_F3H_01H) \ +__PMC_EV_ALIAS("L2_HW_PREFETCH.ALLOC", IAP_EVENT_F3H_02H) \ __PMC_EV_ALIAS("L2_HW_PREFETCH.DATA_TRIGGER", IAP_EVENT_F3H_04H) \ __PMC_EV_ALIAS("L2_HW_PREFETCH.CODE_TRIGGER", IAP_EVENT_F3H_08H) \ __PMC_EV_ALIAS("L2_HW_PREFETCH.DCA_TRIGGER", IAP_EVENT_F3H_10H) \ From owner-svn-src-stable-7@FreeBSD.ORG Fri Dec 11 12:46:41 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D3D28106566B; Fri, 11 Dec 2009 12:46:41 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A84658FC17; Fri, 11 Dec 2009 12:46:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBBCkfdp009132; Fri, 11 Dec 2009 12:46:41 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBBCkfJ3009130; Fri, 11 Dec 2009 12:46:41 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <200912111246.nBBCkfJ3009130@svn.freebsd.org> From: Fabien Thomas Date: Fri, 11 Dec 2009 12:46: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: r200410 - stable/7/lib/libpmc X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2009 12:46:41 -0000 Author: fabient Date: Fri Dec 11 12:46:41 2009 New Revision: 200410 URL: http://svn.freebsd.org/changeset/base/200410 Log: MFC 193809: Fix parsing of Core2 event qualifiers. Modified: stable/7/lib/libpmc/libpmc.c Directory Properties: stable/7/lib/libpmc/ (props changed) Modified: stable/7/lib/libpmc/libpmc.c ============================================================================== --- stable/7/lib/libpmc/libpmc.c Fri Dec 11 12:44:44 2009 (r200409) +++ stable/7/lib/libpmc/libpmc.c Fri Dec 11 12:46:41 2009 (r200410) @@ -609,22 +609,22 @@ iap_allocate_pmc(enum pmc_event pe, char pmc_config->pm_caps |= PMC_CAP_USER; } else if (KWMATCH(p, IAP_KW_ANYTHREAD)) { pmc_config->pm_md.pm_iap.pm_iap_config |= IAP_ANY; - } else if (KWMATCH(p, IAP_KW_CORE)) { + } else if (KWPREFIXMATCH(p, IAP_KW_CORE "=")) { n = pmc_parse_mask(iap_core_mask, p, &evmask); if (n != 1) return (-1); - } else if (KWMATCH(p, IAP_KW_AGENT)) { + } else if (KWPREFIXMATCH(p, IAP_KW_AGENT "=")) { n = pmc_parse_mask(iap_agent_mask, p, &evmask); if (n != 1) return (-1); - } else if (KWMATCH(p, IAP_KW_PREFETCH)) { + } else if (KWPREFIXMATCH(p, IAP_KW_PREFETCH "=")) { n = pmc_parse_mask(iap_prefetch_mask, p, &evmask); if (n != 1) return (-1); - } else if (KWMATCH(p, IAP_KW_CACHESTATE)) { + } else if (KWPREFIXMATCH(p, IAP_KW_CACHESTATE "=")) { n = pmc_parse_mask(iap_cachestate_mask, p, &cachestate); } else if (cpu_info.pm_cputype == PMC_CPU_INTEL_CORE && - KWMATCH(p, IAP_KW_TRANSITION)) { + KWPREFIXMATCH(p, IAP_KW_TRANSITION "=")) { n = pmc_parse_mask(iap_transition_mask, p, &evmask); if (n != 1) return (-1); @@ -632,10 +632,10 @@ iap_allocate_pmc(enum pmc_event pe, char cpu_info.pm_cputype == PMC_CPU_INTEL_CORE2 || cpu_info.pm_cputype == PMC_CPU_INTEL_CORE2EXTREME || cpu_info.pm_cputype == PMC_CPU_INTEL_COREI7) { - if (KWMATCH(p, IAP_KW_SNOOPRESPONSE)) { + if (KWPREFIXMATCH(p, IAP_KW_SNOOPRESPONSE "=")) { n = pmc_parse_mask(iap_snoopresponse_mask, p, &evmask); - } else if (KWMATCH(p, IAP_KW_SNOOPTYPE)) { + } else if (KWPREFIXMATCH(p, IAP_KW_SNOOPTYPE "=")) { n = pmc_parse_mask(iap_snooptype_mask, p, &evmask); } else