From owner-svn-src-stable-9@FreeBSD.ORG Sun Oct 14 07:17:55 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C8943B37; Sun, 14 Oct 2012 07:17:55 +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 AE99F8FC08; Sun, 14 Oct 2012 07:17:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9E7Ht4U012161; Sun, 14 Oct 2012 07:17:55 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9E7HtRQ012159; Sun, 14 Oct 2012 07:17:55 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210140717.q9E7HtRQ012159@svn.freebsd.org> From: Andriy Gapon Date: Sun, 14 Oct 2012 07:17:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241524 - stable/9/sys/dev/acpica X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Oct 2012 07:17:55 -0000 Author: avg Date: Sun Oct 14 07:17:55 2012 New Revision: 241524 URL: http://svn.freebsd.org/changeset/base/241524 Log: MFC r240634: acpi_cpu: explicitly notify userland about c-state changes Modified: stable/9/sys/dev/acpica/acpi_cpu.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/acpica/acpi_cpu.c ============================================================================== --- stable/9/sys/dev/acpica/acpi_cpu.c Sun Oct 14 06:52:49 2012 (r241523) +++ stable/9/sys/dev/acpica/acpi_cpu.c Sun Oct 14 07:17:55 2012 (r241524) @@ -1053,6 +1053,8 @@ acpi_cpu_notify(ACPI_HANDLE h, UINT32 no ACPI_SERIAL_BEGIN(cpu); acpi_cpu_set_cx_lowest(sc); ACPI_SERIAL_END(cpu); + + acpi_UserNotify("PROCESSOR", sc->cpu_handle, notify); } static int From owner-svn-src-stable-9@FreeBSD.ORG Sun Oct 14 07:28:21 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E11601FD; Sun, 14 Oct 2012 07:28:21 +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 C867E8FC08; Sun, 14 Oct 2012 07:28:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9E7SLF8013870; Sun, 14 Oct 2012 07:28:21 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9E7SLl8013868; Sun, 14 Oct 2012 07:28:21 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210140728.q9E7SLl8013868@svn.freebsd.org> From: Andriy Gapon Date: Sun, 14 Oct 2012 07:28:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241528 - stable/9/crypto/openssl/crypto X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Oct 2012 07:28:22 -0000 Author: avg Date: Sun Oct 14 07:28:21 2012 New Revision: 241528 URL: http://svn.freebsd.org/changeset/base/241528 Log: MFC r240339: openssl: change SHLIB_VERSION_NUMBER to reflect the reality Modified: stable/9/crypto/openssl/crypto/opensslv.h Directory Properties: stable/9/crypto/openssl/ (props changed) Modified: stable/9/crypto/openssl/crypto/opensslv.h ============================================================================== --- stable/9/crypto/openssl/crypto/opensslv.h Sun Oct 14 07:22:56 2012 (r241527) +++ stable/9/crypto/openssl/crypto/opensslv.h Sun Oct 14 07:28:21 2012 (r241528) @@ -83,7 +83,7 @@ * should only keep the versions that are binary compatible with the current. */ #define SHLIB_VERSION_HISTORY "" -#define SHLIB_VERSION_NUMBER "0.9.8" +#define SHLIB_VERSION_NUMBER "6" #endif /* HEADER_OPENSSLV_H */ From owner-svn-src-stable-9@FreeBSD.ORG Sun Oct 14 07:45:41 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2E1E270C; Sun, 14 Oct 2012 07:45:41 +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 14AFD8FC0A; Sun, 14 Oct 2012 07:45:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9E7jelA016611; Sun, 14 Oct 2012 07:45:40 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9E7jeaC016609; Sun, 14 Oct 2012 07:45:40 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210140745.q9E7jeaC016609@svn.freebsd.org> From: Andriy Gapon Date: Sun, 14 Oct 2012 07:45:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241530 - stable/9/sys/boot/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Oct 2012 07:45:41 -0000 Author: avg Date: Sun Oct 14 07:45:40 2012 New Revision: 241530 URL: http://svn.freebsd.org/changeset/base/241530 Log: MFC r241290: boot/zfs: a small whitespace cleanup Modified: stable/9/sys/boot/zfs/zfs.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/boot/ (props changed) Modified: stable/9/sys/boot/zfs/zfs.c ============================================================================== --- stable/9/sys/boot/zfs/zfs.c Sun Oct 14 07:28:42 2012 (r241529) +++ stable/9/sys/boot/zfs/zfs.c Sun Oct 14 07:45:40 2012 (r241530) @@ -452,7 +452,7 @@ zfs_dev_open(struct open_file *f, ...) return (0); } -static int +static int zfs_dev_close(struct open_file *f) { @@ -461,7 +461,7 @@ zfs_dev_close(struct open_file *f) return (0); } -static int +static int zfs_dev_strategy(void *devdata, int rw, daddr_t dblk, size_t size, char *buf, size_t *rsize) { From owner-svn-src-stable-9@FreeBSD.ORG Sun Oct 14 07:52:26 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 50F70A4F; Sun, 14 Oct 2012 07:52:26 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 38A518FC08; Sun, 14 Oct 2012 07:52:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9E7qQfG017719; Sun, 14 Oct 2012 07:52:26 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9E7qQfA017717; Sun, 14 Oct 2012 07:52:26 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210140752.q9E7qQfA017717@svn.freebsd.org> From: Andriy Gapon Date: Sun, 14 Oct 2012 07:52:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241532 - stable/9/sys/boot/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Oct 2012 07:52:26 -0000 Author: avg Date: Sun Oct 14 07:52:25 2012 New Revision: 241532 URL: http://svn.freebsd.org/changeset/base/241532 Log: MFC r241282: zfs boot: chose a "first" pool if none is explicitly requested Modified: stable/9/sys/boot/zfs/zfs.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/boot/ (props changed) Modified: stable/9/sys/boot/zfs/zfs.c ============================================================================== --- stable/9/sys/boot/zfs/zfs.c Sun Oct 14 07:45:46 2012 (r241531) +++ stable/9/sys/boot/zfs/zfs.c Sun Oct 14 07:52:25 2012 (r241532) @@ -429,7 +429,10 @@ zfs_dev_open(struct open_file *f, ...) dev = va_arg(args, struct zfs_devdesc *); va_end(args); - spa = spa_find_by_guid(dev->pool_guid); + if (dev->pool_guid == 0) + spa = STAILQ_FIRST(&zfs_pools); + else + spa = spa_find_by_guid(dev->pool_guid); if (!spa) return (ENXIO); rv = zfs_spa_init(spa); @@ -543,7 +546,10 @@ zfs_fmtdev(void *vdev) if (dev->d_type != DEVT_ZFS) return (buf); - spa = spa_find_by_guid(dev->pool_guid); + if (dev->pool_guid == 0) + spa = STAILQ_FIRST(&zfs_pools); + else + spa = spa_find_by_guid(dev->pool_guid); if (spa == NULL) { printf("ZFS: can't find pool by guid\n"); return (buf); From owner-svn-src-stable-9@FreeBSD.ORG Sun Oct 14 07:54:55 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0464ED16; Sun, 14 Oct 2012 07:54:55 +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 E0A048FC0C; Sun, 14 Oct 2012 07:54:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9E7ssUX018206; Sun, 14 Oct 2012 07:54:54 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9E7ssaY018204; Sun, 14 Oct 2012 07:54:54 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210140754.q9E7ssaY018204@svn.freebsd.org> From: Andriy Gapon Date: Sun, 14 Oct 2012 07:54:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241534 - stable/9/lib/libkvm X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Oct 2012 07:54:55 -0000 Author: avg Date: Sun Oct 14 07:54:54 2012 New Revision: 241534 URL: http://svn.freebsd.org/changeset/base/241534 Log: MFC r241302: kvm_proclist: ignore processes in larvae state Modified: stable/9/lib/libkvm/kvm_proc.c Directory Properties: stable/9/lib/libkvm/ (props changed) Modified: stable/9/lib/libkvm/kvm_proc.c ============================================================================== --- stable/9/lib/libkvm/kvm_proc.c Sun Oct 14 07:52:38 2012 (r241533) +++ stable/9/lib/libkvm/kvm_proc.c Sun Oct 14 07:54:54 2012 (r241534) @@ -144,6 +144,8 @@ kvm_proclist(kvm_t *kd, int what, int ar _kvm_err(kd, kd->program, "can't read proc at %p", p); return (-1); } + if (proc.p_state == PRS_NEW) + continue; if (proc.p_state != PRS_ZOMBIE) { if (KREAD(kd, (u_long)TAILQ_FIRST(&proc.p_threads), &mtd)) { From owner-svn-src-stable-9@FreeBSD.ORG Mon Oct 15 01:09:34 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 65BA4A20; Mon, 15 Oct 2012 01:09:34 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4DB678FC0C; Mon, 15 Oct 2012 01:09:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9F19YiS081204; Mon, 15 Oct 2012 01:09:34 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9F19YDW081202; Mon, 15 Oct 2012 01:09:34 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201210150109.q9F19YDW081202@svn.freebsd.org> From: Rick Macklem Date: Mon, 15 Oct 2012 01:09:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241570 - stable/9/sys/rpc/rpcsec_gss X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Oct 2012 01:09:34 -0000 Author: rmacklem Date: Mon Oct 15 01:09:33 2012 New Revision: 241570 URL: http://svn.freebsd.org/changeset/base/241570 Log: MFC: r241097 Attila Bogar and Herbert Poeckl both reported similar problems w.r.t. a Linux NFS client doing a krb5 NFS mount against the FreeBSD server. We determined this was a Linux bug: http://www.spinics.net/lists/linux-nfs/msg32466.html, however the mount failed to work, because the Destroy operation with a bogus encrypted checksum destroyed the authenticator handle. This patch changes the rpcsec_gss code so that it doesn't Destroy the authenticator handle for this case and, as such, the Linux mount will work. Modified: stable/9/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c ============================================================================== --- stable/9/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Mon Oct 15 00:24:23 2012 (r241569) +++ stable/9/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Mon Oct 15 01:09:33 2012 (r241570) @@ -984,7 +984,7 @@ svc_rpc_gss_accept_sec_context(struct sv static bool_t svc_rpc_gss_validate(struct svc_rpc_gss_client *client, struct rpc_msg *msg, - gss_qop_t *qop) + gss_qop_t *qop, rpc_gss_proc_t gcproc) { struct opaque_auth *oa; gss_buffer_desc rpcbuf, checksum; @@ -1024,7 +1024,8 @@ svc_rpc_gss_validate(struct svc_rpc_gss_ if (maj_stat != GSS_S_COMPLETE) { rpc_gss_log_status("gss_verify_mic", client->cl_mech, maj_stat, min_stat); - client->cl_state = CLIENT_STALE; + if (gcproc != RPCSEC_GSS_DESTROY) + client->cl_state = CLIENT_STALE; return (FALSE); } @@ -1358,7 +1359,7 @@ svc_rpc_gss(struct svc_req *rqst, struct break; } - if (!svc_rpc_gss_validate(client, msg, &qop)) { + if (!svc_rpc_gss_validate(client, msg, &qop, gc.gc_proc)) { result = RPCSEC_GSS_CREDPROBLEM; break; } From owner-svn-src-stable-9@FreeBSD.ORG Mon Oct 15 06:41:55 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2A1D7108; Mon, 15 Oct 2012 06:41:55 +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 070EA8FC0C; Mon, 15 Oct 2012 06:41:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9F6fscY032275; Mon, 15 Oct 2012 06:41:54 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9F6fsFx032268; Mon, 15 Oct 2012 06:41:54 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201210150641.q9F6fsFx032268@svn.freebsd.org> From: Navdeep Parhar Date: Mon, 15 Oct 2012 06:41:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241573 - in stable/9/sys/dev/cxgbe: . common X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Oct 2012 06:41:55 -0000 Author: np Date: Mon Oct 15 06:41:54 2012 New Revision: 241573 URL: http://svn.freebsd.org/changeset/base/241573 Log: MFC r241397-241399, r241409, r241493-24194. r241397: Remove unused item. cxgbe's rx queue's lock was removed a long time ago. r241398: There is no need to report the same error twice. r241399: Add a driver ioctl to read a byte from any device on a port's i2c bus. This lets userspace read arbitrary information from the SFP+ modules etc. on this bus. Reading multiple bytes in the same transaction isn't possible right now. I'll update the driver once the chip's firmware supports this. r241409: Add a driver ioctl to clear a port's MAC statistics. r241493: Use global knob in the TP_PARA_REG3 register to disable congestion drops if the user has chosen this behaviour. r241494: Temporary fix for kern/172364. Modified: stable/9/sys/dev/cxgbe/adapter.h stable/9/sys/dev/cxgbe/common/common.h stable/9/sys/dev/cxgbe/common/t4_hw.c stable/9/sys/dev/cxgbe/t4_ioctl.h stable/9/sys/dev/cxgbe/t4_main.c stable/9/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/9/sys/dev/cxgbe/adapter.h Mon Oct 15 04:10:49 2012 (r241572) +++ stable/9/sys/dev/cxgbe/adapter.h Mon Oct 15 06:41:54 2012 (r241573) @@ -282,7 +282,6 @@ struct sge_iq { bus_dma_tag_t desc_tag; bus_dmamap_t desc_map; bus_addr_t ba; /* bus address of descriptor ring */ - char lockname[16]; uint32_t flags; uint16_t abs_id; /* absolute SGE id for the iq */ int8_t intr_pktc_idx; /* packet count threshold index */ Modified: stable/9/sys/dev/cxgbe/common/common.h ============================================================================== --- stable/9/sys/dev/cxgbe/common/common.h Mon Oct 15 04:10:49 2012 (r241572) +++ stable/9/sys/dev/cxgbe/common/common.h Mon Oct 15 06:41:54 2012 (r241573) @@ -521,6 +521,8 @@ int t4_enable_vi(struct adapter *adap, u bool rx_en, bool tx_en); int t4_identify_port(struct adapter *adap, unsigned int mbox, unsigned int viid, unsigned int nblinks); +int t4_i2c_rd(struct adapter *adap, unsigned int mbox, unsigned int port_id, + u8 dev_addr, u8 offset, u8 *valp); int t4_mdio_rd(struct adapter *adap, unsigned int mbox, unsigned int phy_addr, unsigned int mmd, unsigned int reg, unsigned int *valp); int t4_mdio_wr(struct adapter *adap, unsigned int mbox, unsigned int phy_addr, Modified: stable/9/sys/dev/cxgbe/common/t4_hw.c ============================================================================== --- stable/9/sys/dev/cxgbe/common/t4_hw.c Mon Oct 15 04:10:49 2012 (r241572) +++ stable/9/sys/dev/cxgbe/common/t4_hw.c Mon Oct 15 06:41:54 2012 (r241573) @@ -3885,6 +3885,36 @@ int t4_fwaddrspace_write(struct adapter } /** + * t4_i2c_rd - read a byte from an i2c addressable device + * @adap: the adapter + * @mbox: mailbox to use for the FW command + * @port_id: the port id + * @dev_addr: the i2c device address + * @offset: the byte offset to read from + * @valp: where to store the value + */ +int t4_i2c_rd(struct adapter *adap, unsigned int mbox, unsigned int port_id, + u8 dev_addr, u8 offset, u8 *valp) +{ + int ret; + struct fw_ldst_cmd c; + + memset(&c, 0, sizeof(c)); + c.op_to_addrspace = htonl(V_FW_CMD_OP(FW_LDST_CMD) | F_FW_CMD_REQUEST | + F_FW_CMD_READ | + V_FW_LDST_CMD_ADDRSPACE(FW_LDST_ADDRSPC_FUNC_I2C)); + c.cycles_to_len16 = htonl(FW_LEN16(c)); + c.u.i2c.pid_pkd = V_FW_LDST_CMD_PID(port_id); + c.u.i2c.base = dev_addr; + c.u.i2c.boffset = offset; + + ret = t4_wr_mbox(adap, mbox, &c, sizeof(c), &c); + if (ret == 0) + *valp = c.u.i2c.data; + return ret; +} + +/** * t4_mdio_rd - read a PHY register through MDIO * @adap: the adapter * @mbox: mailbox to use for the FW command Modified: stable/9/sys/dev/cxgbe/t4_ioctl.h ============================================================================== --- stable/9/sys/dev/cxgbe/t4_ioctl.h Mon Oct 15 04:10:49 2012 (r241572) +++ stable/9/sys/dev/cxgbe/t4_ioctl.h Mon Oct 15 06:41:54 2012 (r241573) @@ -49,6 +49,8 @@ enum { T4_GET_SGE_CONTEXT, /* get SGE context for a queue */ T4_LOAD_FW, /* flash firmware */ T4_GET_MEM, /* read memory */ + T4_GET_I2C, /* read from i2c addressible device */ + T4_CLEAR_STATS, /* clear a port's MAC statistics */ }; struct t4_reg { @@ -69,6 +71,14 @@ struct t4_data { uint8_t *data; }; +struct t4_i2c_data { + uint8_t port_id; + uint8_t dev_addr; + uint8_t offset; + uint8_t len; + uint8_t data[8]; +}; + /* * A hardware filter is some valid combination of these. */ @@ -224,4 +234,6 @@ struct t4_mem_range { struct t4_sge_context) #define CHELSIO_T4_LOAD_FW _IOW('f', T4_LOAD_FW, struct t4_data) #define CHELSIO_T4_GET_MEM _IOW('f', T4_GET_MEM, struct t4_mem_range) +#define CHELSIO_T4_GET_I2C _IOWR('f', T4_GET_I2C, struct t4_i2c_data) +#define CHELSIO_T4_CLEAR_STATS _IOW('f', T4_CLEAR_STATS, uint32_t) #endif Modified: stable/9/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/9/sys/dev/cxgbe/t4_main.c Mon Oct 15 04:10:49 2012 (r241572) +++ stable/9/sys/dev/cxgbe/t4_main.c Mon Oct 15 06:41:54 2012 (r241573) @@ -349,6 +349,7 @@ static int set_filter_wr(struct adapter static int del_filter_wr(struct adapter *, int); static int get_sge_context(struct adapter *, struct t4_sge_context *); static int read_card_mem(struct adapter *, struct t4_mem_range *); +static int read_i2c(struct adapter *, struct t4_i2c_data *); #ifdef TCP_OFFLOAD static int toe_capability(struct port_info *, int); #endif @@ -526,10 +527,6 @@ t4_attach(device_t dev) t4_write_reg(sc, A_ULP_RX_TDDP_PSZ, V_HPZ0(0) | V_HPZ1(2) | V_HPZ2(4) | V_HPZ3(6)); t4_set_reg_field(sc, A_ULP_RX_CTL, F_TDDPTAGTCB, F_TDDPTAGTCB); - t4_set_reg_field(sc, A_TP_PARA_REG3, F_TUNNELCNGDROP0 | - F_TUNNELCNGDROP1 | F_TUNNELCNGDROP2 | F_TUNNELCNGDROP3, - F_TUNNELCNGDROP0 | F_TUNNELCNGDROP1 | F_TUNNELCNGDROP2 | - F_TUNNELCNGDROP3); t4_set_reg_field(sc, A_TP_PARA_REG5, V_INDICATESIZE(M_INDICATESIZE) | F_REARMDDPOFFSET | F_RESETDDPOFFSET, @@ -2995,7 +2992,7 @@ cxgbe_vlan_config(void *arg, struct ifne { struct ifnet *vlan; - if (arg != ifp) + if (arg != ifp || ifp->if_type != IFT_ETHER) return; vlan = VLAN_DEVAT(ifp, vid); @@ -5170,6 +5167,27 @@ proceed: return (rc); } +static int +read_i2c(struct adapter *sc, struct t4_i2c_data *i2cd) +{ + int rc; + + ADAPTER_LOCK_ASSERT_OWNED(sc); /* for mbox */ + + if (i2cd->len == 0 || i2cd->port_id >= sc->params.nports) + return (EINVAL); + + if (i2cd->len > 1) { + /* XXX: need fw support for longer reads in one go */ + return (ENOTSUP); + } + + rc = -t4_i2c_rd(sc, sc->mbox, i2cd->port_id, i2cd->dev_addr, + i2cd->offset, &i2cd->data[0]); + + return (rc); +} + int t4_os_find_pci_capability(struct adapter *sc, int cap) { @@ -5373,6 +5391,20 @@ t4_ioctl(struct cdev *dev, unsigned long case CHELSIO_T4_GET_MEM: rc = read_card_mem(sc, (struct t4_mem_range *)data); break; + case CHELSIO_T4_GET_I2C: + ADAPTER_LOCK(sc); + rc = read_i2c(sc, (struct t4_i2c_data *)data); + ADAPTER_UNLOCK(sc); + break; + case CHELSIO_T4_CLEAR_STATS: { + u_int port_id = *(uint32_t *)data; + + if (port_id >= sc->params.nports) + return (EINVAL); + + t4_clr_port_stats(sc, port_id); + break; + } default: rc = EINVAL; } Modified: stable/9/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/9/sys/dev/cxgbe/t4_sge.c Mon Oct 15 04:10:49 2012 (r241572) +++ stable/9/sys/dev/cxgbe/t4_sge.c Mon Oct 15 06:41:54 2012 (r241573) @@ -120,7 +120,7 @@ static struct mbuf *get_fl_payload(struc int *); static int t4_eth_rx(struct sge_iq *, const struct rss_header *, struct mbuf *); static inline void init_iq(struct sge_iq *, struct adapter *, int, int, int, - int, char *); + int); static inline void init_fl(struct sge_fl *, int, int, char *); static inline void init_eq(struct sge_eq *, int, int, uint8_t, uint16_t, char *); @@ -319,6 +319,12 @@ t4_sge_init(struct adapter *sc) t4_write_reg(sc, A_SGE_TIMER_VALUE_4_AND_5, V_TIMERVALUE4(us_to_core_ticks(sc, intr_timer[4])) | V_TIMERVALUE5(us_to_core_ticks(sc, intr_timer[5]))); + + if (cong_drop == 0) { + t4_set_reg_field(sc, A_TP_PARA_REG3, F_TUNNELCNGDROP0 | + F_TUNNELCNGDROP1 | F_TUNNELCNGDROP2 | + F_TUNNELCNGDROP3, 0); + } } v = t4_read_reg(sc, A_SGE_CONTROL); @@ -417,22 +423,14 @@ t4_setup_adapter_queues(struct adapter * * Firmware event queue */ rc = alloc_fwq(sc); - if (rc != 0) { - device_printf(sc->dev, - "failed to create firmware event queue: %d\n", rc); + if (rc != 0) return (rc); - } /* * Management queue. This is just a control queue that uses the fwq as * its associated iq. */ rc = alloc_mgmtq(sc); - if (rc != 0) { - device_printf(sc->dev, - "failed to create management queue: %d\n", rc); - return (rc); - } return (rc); } @@ -595,10 +593,8 @@ t4_setup_port_queues(struct port_info *p */ for_each_rxq(pi, i, rxq) { - snprintf(name, sizeof(name), "%s rxq%d-iq", - device_get_nameunit(pi->dev), i); init_iq(&rxq->iq, sc, pi->tmr_idx, pi->pktc_idx, pi->qsize_rxq, - RX_IQ_ESIZE, name); + RX_IQ_ESIZE); snprintf(name, sizeof(name), "%s rxq%d-fl", device_get_nameunit(pi->dev), i); @@ -620,10 +616,8 @@ t4_setup_port_queues(struct port_info *p #ifdef TCP_OFFLOAD for_each_ofld_rxq(pi, i, ofld_rxq) { - snprintf(name, sizeof(name), "%s ofld_rxq%d-iq", - device_get_nameunit(pi->dev), i); init_iq(&ofld_rxq->iq, sc, pi->tmr_idx, pi->pktc_idx, - pi->qsize_rxq, RX_IQ_ESIZE, name); + pi->qsize_rxq, RX_IQ_ESIZE); snprintf(name, sizeof(name), "%s ofld_rxq%d-fl", device_get_nameunit(pi->dev), i); @@ -1478,7 +1472,7 @@ can_resume_tx(struct sge_eq *eq) static inline void init_iq(struct sge_iq *iq, struct adapter *sc, int tmr_idx, int pktc_idx, - int qsize, int esize, char *name) + int qsize, int esize) { KASSERT(tmr_idx >= 0 && tmr_idx < SGE_NTIMERS, ("%s: bad tmr_idx %d", __func__, tmr_idx)); @@ -1495,7 +1489,6 @@ init_iq(struct sge_iq *iq, struct adapte } iq->qsize = roundup(qsize, 16); /* See FW_IQ_CMD/iqsize */ iq->esize = max(esize, 16); /* See FW_IQ_CMD/iqesize */ - strlcpy(iq->lockname, name, sizeof(iq->lockname)); } static inline void @@ -1793,12 +1786,10 @@ alloc_fwq(struct adapter *sc) { int rc, intr_idx; struct sge_iq *fwq = &sc->sge.fwq; - char name[16]; struct sysctl_oid *oid = device_get_sysctl_tree(sc->dev); struct sysctl_oid_list *children = SYSCTL_CHILDREN(oid); - snprintf(name, sizeof(name), "%s fwq", device_get_nameunit(sc->dev)); - init_iq(fwq, sc, 0, 0, FW_IQ_QSIZE, FW_IQ_ESIZE, name); + init_iq(fwq, sc, 0, 0, FW_IQ_QSIZE, FW_IQ_ESIZE); fwq->flags |= IQ_INTR; /* always */ intr_idx = sc->intr_count > 1 ? 1 : 0; rc = alloc_iq_fl(sc->port[0], fwq, NULL, intr_idx, -1); From owner-svn-src-stable-9@FreeBSD.ORG Mon Oct 15 06:48:51 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F132E322; Mon, 15 Oct 2012 06:48:50 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D81E98FC14; Mon, 15 Oct 2012 06:48:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9F6morh033354; Mon, 15 Oct 2012 06:48:50 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9F6moui033352; Mon, 15 Oct 2012 06:48:50 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201210150648.q9F6moui033352@svn.freebsd.org> From: Navdeep Parhar Date: Mon, 15 Oct 2012 06:48:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241574 - stable/9/tools/tools/cxgbetool X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Oct 2012 06:48:51 -0000 Author: np Date: Mon Oct 15 06:48:50 2012 New Revision: 241574 URL: http://svn.freebsd.org/changeset/base/241574 Log: MFC r241401, r241416. r241401: Add an "i2c" subcommand to cxgbetool. You can use this to read information from the transceivers connected to the ports of a cxgbe(4) based card. # cxgbetool t4nex0 i2c [] For example: # cxgbetool t4nex0 i2c 0 0xa0 3 0x10 [16] (As per SFF-8472 the SFP+ module is at 0xa0 and bit 4 in the value at address 3 indicates it's a 10Gbase-SR module, which it is.) r241416: Add a "clearstats" subcommand to cxgbetool that lets you clear the MAC statistics for any port. For example: # cxgbetool t4nex0 clearstats 0 Modified: stable/9/tools/tools/cxgbetool/cxgbetool.c Directory Properties: stable/9/tools/tools/cxgbetool/ (props changed) Modified: stable/9/tools/tools/cxgbetool/cxgbetool.c ============================================================================== --- stable/9/tools/tools/cxgbetool/cxgbetool.c Mon Oct 15 06:41:54 2012 (r241573) +++ stable/9/tools/tools/cxgbetool/cxgbetool.c Mon Oct 15 06:48:50 2012 (r241574) @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -81,11 +82,13 @@ usage(FILE *fp) { fprintf(fp, "Usage: %s [operation]\n", progname); fprintf(fp, + "\tclearstats clear port statistics\n" "\tcontext show an SGE context\n" "\tfilter [ ] ... set a filter\n" "\tfilter delete|clear delete a filter\n" "\tfilter list list all filters\n" "\tfilter mode [] ... get/set global filter mode\n" + "\ti2c [] read from i2c device\n" "\tloadfw install firmware\n" "\tmemdump dump a memory range\n" "\treg
[=] read/write register\n" @@ -1522,6 +1525,82 @@ read_tcb(int argc, const char *argv[]) } static int +read_i2c(int argc, const char *argv[]) +{ + char *p; + long l; + struct t4_i2c_data i2cd; + int rc, i; + + if (argc < 3 || argc > 4) { + warnx("incorrect number of arguments."); + return (EINVAL); + } + + p = str_to_number(argv[0], &l, NULL); + if (*p || l > UCHAR_MAX) { + warnx("invalid port id \"%s\"", argv[0]); + return (EINVAL); + } + i2cd.port_id = l; + + p = str_to_number(argv[1], &l, NULL); + if (*p || l > UCHAR_MAX) { + warnx("invalid i2c device address \"%s\"", argv[1]); + return (EINVAL); + } + i2cd.dev_addr = l; + + p = str_to_number(argv[2], &l, NULL); + if (*p || l > UCHAR_MAX) { + warnx("invalid byte offset \"%s\"", argv[2]); + return (EINVAL); + } + i2cd.offset = l; + + if (argc == 4) { + p = str_to_number(argv[3], &l, NULL); + if (*p || l > sizeof(i2cd.data)) { + warnx("invalid number of bytes \"%s\"", argv[3]); + return (EINVAL); + } + i2cd.len = l; + } else + i2cd.len = 1; + + rc = doit(CHELSIO_T4_GET_I2C, &i2cd); + if (rc != 0) + return (rc); + + for (i = 0; i < i2cd.len; i++) + printf("0x%x [%u]\n", i2cd.data[i], i2cd.data[i]); + + return (0); +} + +static int +clearstats(int argc, const char *argv[]) +{ + char *p; + long l; + uint32_t port; + + if (argc != 1) { + warnx("incorrect number of arguments."); + return (EINVAL); + } + + p = str_to_number(argv[0], &l, NULL); + if (*p) { + warnx("invalid port id \"%s\"", argv[0]); + return (EINVAL); + } + port = l; + + return doit(CHELSIO_T4_CLEAR_STATS, &port); +} + +static int run_cmd(int argc, const char *argv[]) { int rc = -1; @@ -1547,6 +1626,10 @@ run_cmd(int argc, const char *argv[]) rc = memdump(argc, argv); else if (!strcmp(cmd, "tcb")) rc = read_tcb(argc, argv); + else if (!strcmp(cmd, "i2c")) + rc = read_i2c(argc, argv); + else if (!strcmp(cmd, "clearstats")) + rc = clearstats(argc, argv); else { rc = EINVAL; warnx("invalid command \"%s\"", cmd); From owner-svn-src-stable-9@FreeBSD.ORG Mon Oct 15 14:14:48 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7CDEBB79; Mon, 15 Oct 2012 14:14:48 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6464B8FC14; Mon, 15 Oct 2012 14:14:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9FEEmVn005367; Mon, 15 Oct 2012 14:14:48 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9FEEm4x005364; Mon, 15 Oct 2012 14:14:48 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201210151414.q9FEEm4x005364@svn.freebsd.org> From: Peter Wemm Date: Mon, 15 Oct 2012 14:14:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241584 - stable/9/etc/sendmail X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Oct 2012 14:14:48 -0000 Author: peter Date: Mon Oct 15 14:14:47 2012 New Revision: 241584 URL: http://svn.freebsd.org/changeset/base/241584 Log: mx1 -> smarthost.ysv Modified: stable/9/etc/sendmail/freefall.mc Modified: stable/9/etc/sendmail/freefall.mc ============================================================================== --- stable/9/etc/sendmail/freefall.mc Mon Oct 15 14:14:21 2012 (r241583) +++ stable/9/etc/sendmail/freefall.mc Mon Oct 15 14:14:47 2012 (r241584) @@ -43,5 +43,5 @@ divert(0)dnl VERSIONID(`$FreeBSD$') OSTYPE(freebsd6) -FEATURE(nullclient, mx1.$m) +FEATURE(nullclient, smarthost.ysv.$m) MASQUERADE_AS(FreeBSD.org) From owner-svn-src-stable-9@FreeBSD.ORG Mon Oct 15 21:53:27 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 012A2544; Mon, 15 Oct 2012 21:53:27 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DD1F18FC08; Mon, 15 Oct 2012 21:53:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9FLrQQu081345; Mon, 15 Oct 2012 21:53:26 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9FLrQgk081342; Mon, 15 Oct 2012 21:53:26 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201210152153.q9FLrQgk081342@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 15 Oct 2012 21:53:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241599 - in stable/9: . lib/clang/include X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Oct 2012 21:53:27 -0000 Author: jkim Date: Mon Oct 15 21:53:26 2012 New Revision: 241599 URL: http://svn.freebsd.org/changeset/base/241599 Log: MFC: r241214 Do not install incomplete unwind.h from clang. Modified: stable/9/ObsoleteFiles.inc stable/9/lib/clang/include/Makefile Directory Properties: stable/9/lib/clang/include/ (props changed) Modified: stable/9/ObsoleteFiles.inc ============================================================================== --- stable/9/ObsoleteFiles.inc Mon Oct 15 20:19:57 2012 (r241598) +++ stable/9/ObsoleteFiles.inc Mon Oct 15 21:53:26 2012 (r241599) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20121015: remove incomplete unwind.h +OLD_FILES+=usr/include/clang/3.1/unwind.h # 20120713: auth.conf removed OLD_FILES+=etc/auth.conf OLD_FILES+=usr/share/examples/etc/auth.conf Modified: stable/9/lib/clang/include/Makefile ============================================================================== --- stable/9/lib/clang/include/Makefile Mon Oct 15 20:19:57 2012 (r241598) +++ stable/9/lib/clang/include/Makefile Mon Oct 15 21:53:26 2012 (r241599) @@ -23,7 +23,6 @@ INCS= altivec.h \ popcntintrin.h \ smmintrin.h \ tmmintrin.h \ - unwind.h \ wmmintrin.h \ x86intrin.h \ xmmintrin.h From owner-svn-src-stable-9@FreeBSD.ORG Tue Oct 16 01:37:18 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 69A08BFA; Tue, 16 Oct 2012 01:37:18 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4F5978FC08; Tue, 16 Oct 2012 01:37:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9G1bIsn016749; Tue, 16 Oct 2012 01:37:18 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9G1bIWm016746; Tue, 16 Oct 2012 01:37:18 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201210160137.q9G1bIWm016746@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Tue, 16 Oct 2012 01:37:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241601 - in stable/9: lib/libc/rpc sys/rpc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Oct 2012 01:37:18 -0000 Author: pfg Date: Tue Oct 16 01:37:17 2012 New Revision: 241601 URL: http://svn.freebsd.org/changeset/base/241601 Log: MFC r241143: rpc: be sure to free cl_netid and cl_tp. When creating a client with clnt_tli_create, it uses strdup to copy strings for these fields if nconf is passed in. clnt_dg_destroy frees these strings already. Make sure clnt_vc_destroy frees them in the same way. Tested by: David Wolfskill Obtained from: Bull GNU/Linux NFSv4 Project (libtirpc) Modified: stable/9/lib/libc/rpc/clnt_vc.c stable/9/sys/rpc/clnt_vc.c Modified: stable/9/lib/libc/rpc/clnt_vc.c ============================================================================== --- stable/9/lib/libc/rpc/clnt_vc.c Tue Oct 16 01:10:43 2012 (r241600) +++ stable/9/lib/libc/rpc/clnt_vc.c Tue Oct 16 01:37:17 2012 (r241601) @@ -672,6 +672,10 @@ clnt_vc_destroy(cl) if (ct->ct_addr.buf) free(ct->ct_addr.buf); mem_free(ct, sizeof(struct ct_data)); + if (cl->cl_netid && cl->cl_netid[0]) + mem_free(cl->cl_netid, strlen(cl->cl_netid) +1); + if (cl->cl_tp && cl->cl_tp[0]) + mem_free(cl->cl_tp, strlen(cl->cl_tp) +1); mem_free(cl, sizeof(CLIENT)); mutex_unlock(&clnt_fd_lock); thr_sigsetmask(SIG_SETMASK, &(mask), NULL); Modified: stable/9/sys/rpc/clnt_vc.c ============================================================================== --- stable/9/sys/rpc/clnt_vc.c Tue Oct 16 01:10:43 2012 (r241600) +++ stable/9/sys/rpc/clnt_vc.c Tue Oct 16 01:37:17 2012 (r241601) @@ -836,6 +836,10 @@ clnt_vc_destroy(CLIENT *cl) soclose(so); } mem_free(ct, sizeof(struct ct_data)); + if (cl->cl_netid && cl->cl_netid[0]) + mem_free(cl->cl_netid, strlen(cl->cl_netid) +1); + if (cl->cl_tp && cl->cl_tp[0]) + mem_free(cl->cl_tp, strlen(cl->cl_tp) +1); mem_free(cl, sizeof(CLIENT)); } From owner-svn-src-stable-9@FreeBSD.ORG Tue Oct 16 13:27:21 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 64105FE2; Tue, 16 Oct 2012 13:27:21 +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 48B608FC14; Tue, 16 Oct 2012 13:27:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9GDRLKA048195; Tue, 16 Oct 2012 13:27:21 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9GDRLTC048190; Tue, 16 Oct 2012 13:27:21 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201210161327.q9GDRLTC048190@svn.freebsd.org> From: Fabien Thomas Date: Tue, 16 Oct 2012 13:27:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241609 - in stable/9: lib/libpmc sys/dev/hwpmc sys/sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Oct 2012 13:27:21 -0000 Author: fabient Date: Tue Oct 16 13:27:20 2012 New Revision: 241609 URL: http://svn.freebsd.org/changeset/base/241609 Log: MFC r240164, r240203: Add Intel Ivy Bridge support to hwpmc(9). Update offcore RSP token for Sandy Bridge. Note: No uncore support. Added: stable/9/lib/libpmc/pmc.ivybridge.3 - copied unchanged from r240164, head/lib/libpmc/pmc.ivybridge.3 Modified: stable/9/lib/libpmc/Makefile stable/9/lib/libpmc/libpmc.c stable/9/lib/libpmc/pmc.sandybridge.3 stable/9/sys/dev/hwpmc/hwpmc_core.c stable/9/sys/dev/hwpmc/hwpmc_core.h stable/9/sys/dev/hwpmc/hwpmc_intel.c stable/9/sys/dev/hwpmc/pmc_events.h stable/9/sys/sys/pmc.h Directory Properties: stable/9/lib/libpmc/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/lib/libpmc/Makefile ============================================================================== --- stable/9/lib/libpmc/Makefile Tue Oct 16 10:09:21 2012 (r241608) +++ stable/9/lib/libpmc/Makefile Tue Oct 16 13:27:20 2012 (r241609) @@ -28,6 +28,7 @@ MAN+= pmc.atom.3 MAN+= pmc.core.3 MAN+= pmc.core2.3 MAN+= pmc.iaf.3 +MAN+= pmc.ivybridge.3 MAN+= pmc.ucf.3 MAN+= pmc.k7.3 MAN+= pmc.k8.3 Modified: stable/9/lib/libpmc/libpmc.c ============================================================================== --- stable/9/lib/libpmc/libpmc.c Tue Oct 16 10:09:21 2012 (r241608) +++ stable/9/lib/libpmc/libpmc.c Tue Oct 16 13:27:20 2012 (r241609) @@ -182,6 +182,11 @@ static const struct pmc_event_descr core __PMC_EV_ALIAS_COREI7() }; +static const struct pmc_event_descr ivybridge_event_table[] = +{ + __PMC_EV_ALIAS_IVYBRIDGE() +}; + static const struct pmc_event_descr sandybridge_event_table[] = { __PMC_EV_ALIAS_SANDYBRIDGE() @@ -221,6 +226,7 @@ PMC_MDEP_TABLE(atom, IAP, PMC_CLASS_SOFT PMC_MDEP_TABLE(core, IAP, PMC_CLASS_SOFT, PMC_CLASS_TSC); PMC_MDEP_TABLE(core2, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC); PMC_MDEP_TABLE(corei7, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); +PMC_MDEP_TABLE(ivybridge, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC); PMC_MDEP_TABLE(sandybridge, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); PMC_MDEP_TABLE(westmere, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); PMC_MDEP_TABLE(k7, K7, PMC_CLASS_SOFT, PMC_CLASS_TSC); @@ -257,6 +263,7 @@ PMC_CLASS_TABLE_DESC(atom, IAP, atom, ia PMC_CLASS_TABLE_DESC(core, IAP, core, iap); PMC_CLASS_TABLE_DESC(core2, IAP, core2, iap); PMC_CLASS_TABLE_DESC(corei7, IAP, corei7, iap); +PMC_CLASS_TABLE_DESC(ivybridge, IAP, ivybridge, iap); PMC_CLASS_TABLE_DESC(sandybridge, IAP, sandybridge, iap); PMC_CLASS_TABLE_DESC(westmere, IAP, westmere, iap); PMC_CLASS_TABLE_DESC(ucf, UCF, ucf, ucf); @@ -362,14 +369,14 @@ static struct pmc_op_getdyneventinfo sof /* Event masks for events */ struct pmc_masks { const char *pm_name; - const uint32_t pm_value; + const uint64_t pm_value; }; #define PMCMASK(N,V) { .pm_name = #N, .pm_value = (V) } #define NULLMASK { .pm_name = NULL } #if defined(__amd64__) || defined(__i386__) static int -pmc_parse_mask(const struct pmc_masks *pmask, char *p, uint32_t *evmask) +pmc_parse_mask(const struct pmc_masks *pmask, char *p, uint64_t *evmask) { const struct pmc_masks *pm; char *q, *r; @@ -558,6 +565,8 @@ static struct pmc_event_alias core2_alia #define atom_aliases_without_iaf core2_aliases_without_iaf #define corei7_aliases core2_aliases #define corei7_aliases_without_iaf core2_aliases_without_iaf +#define ivybridge_aliases core2_aliases +#define ivybridge_aliases_without_iaf core2_aliases_without_iaf #define sandybridge_aliases core2_aliases #define sandybridge_aliases_without_iaf core2_aliases_without_iaf #define westmere_aliases core2_aliases @@ -660,7 +669,7 @@ static struct pmc_masks iap_transition_m NULLMASK }; -static struct pmc_masks iap_rsp_mask[] = { +static struct pmc_masks iap_rsp_mask_i7_wm[] = { PMCMASK(DMND_DATA_RD, (1 << 0)), PMCMASK(DMND_RFO, (1 << 1)), PMCMASK(DMND_IFETCH, (1 << 2)), @@ -679,12 +688,43 @@ static struct pmc_masks iap_rsp_mask[] = NULLMASK }; +static struct pmc_masks iap_rsp_mask_sb_ib[] = { + PMCMASK(REQ_DMND_DATA_RD, (1ULL << 0)), + PMCMASK(REQ_DMND_RFO, (1ULL << 1)), + PMCMASK(REQ_DMND_IFETCH, (1ULL << 2)), + PMCMASK(REQ_WB, (1ULL << 3)), + PMCMASK(REQ_PF_DATA_RD, (1ULL << 4)), + PMCMASK(REQ_PF_RFO, (1ULL << 5)), + PMCMASK(REQ_PF_IFETCH, (1ULL << 6)), + PMCMASK(REQ_PF_LLC_DATA_RD, (1ULL << 7)), + PMCMASK(REQ_PF_LLC_RFO, (1ULL << 8)), + PMCMASK(REQ_PF_LLC_IFETCH, (1ULL << 9)), + PMCMASK(REQ_BUS_LOCKS, (1ULL << 10)), + PMCMASK(REQ_STRM_ST, (1ULL << 11)), + PMCMASK(REQ_OTHER, (1ULL << 15)), + PMCMASK(RES_ANY, (1ULL << 16)), + PMCMASK(RES_SUPPLIER_SUPP, (1ULL << 17)), + PMCMASK(RES_SUPPLIER_LLC_HITM, (1ULL << 18)), + PMCMASK(RES_SUPPLIER_LLC_HITE, (1ULL << 19)), + PMCMASK(RES_SUPPLIER_LLC_HITS, (1ULL << 20)), + PMCMASK(RES_SUPPLIER_LLC_HITF, (1ULL << 21)), + PMCMASK(RES_SUPPLIER_LOCAL, (1ULL << 22)), + PMCMASK(RES_SNOOP_SNPI_NONE, (1ULL << 31)), + PMCMASK(RES_SNOOP_SNP_NO_NEEDED,(1ULL << 32)), + PMCMASK(RES_SNOOP_SNP_MISS, (1ULL << 33)), + PMCMASK(RES_SNOOP_HIT_NO_FWD, (1ULL << 34)), + PMCMASK(RES_SNOOP_HIT_FWD, (1ULL << 35)), + PMCMASK(RES_SNOOP_HITM, (1ULL << 36)), + PMCMASK(RES_NON_DRAM, (1ULL << 37)), + NULLMASK +}; + static int iap_allocate_pmc(enum pmc_event pe, char *ctrspec, struct pmc_op_pmcallocate *pmc_config) { char *e, *p, *q; - uint32_t cachestate, evmask, rsp; + uint64_t cachestate, evmask, rsp; int count, n; pmc_config->pm_caps |= (PMC_CAP_READ | PMC_CAP_WRITE | @@ -750,7 +790,13 @@ iap_allocate_pmc(enum pmc_event pe, char } else if (cpu_info.pm_cputype == PMC_CPU_INTEL_COREI7 || cpu_info.pm_cputype == PMC_CPU_INTEL_WESTMERE) { if (KWPREFIXMATCH(p, IAP_KW_RSP "=")) { - n = pmc_parse_mask(iap_rsp_mask, p, &rsp); + n = pmc_parse_mask(iap_rsp_mask_i7_wm, p, &rsp); + } else + return (-1); + } else if (cpu_info.pm_cputype == PMC_CPU_INTEL_SANDYBRIDGE || + cpu_info.pm_cputype == PMC_CPU_INTEL_IVYBRIDGE) { + if (KWPREFIXMATCH(p, IAP_KW_RSP "=")) { + n = pmc_parse_mask(iap_rsp_mask_sb_ib, p, &rsp); } else return (-1); } else @@ -1069,7 +1115,8 @@ k8_allocate_pmc(enum pmc_event pe, char { char *e, *p, *q; int n; - uint32_t count, evmask; + uint32_t count; + uint64_t evmask; const struct pmc_masks *pm, *pmask; pmc_config->pm_caps |= (PMC_CAP_READ | PMC_CAP_WRITE); @@ -1551,7 +1598,8 @@ p4_allocate_pmc(enum pmc_event pe, char char *e, *p, *q; int count, has_tag, has_busreqtype, n; - uint32_t evmask, cccractivemask; + uint32_t cccractivemask; + uint64_t evmask; const struct pmc_masks *pm, *pmask; pmc_config->pm_caps |= (PMC_CAP_READ | PMC_CAP_WRITE); @@ -1979,7 +2027,7 @@ p6_allocate_pmc(enum pmc_event pe, char struct pmc_op_pmcallocate *pmc_config) { char *e, *p, *q; - uint32_t evmask; + uint64_t evmask; int count, n; const struct pmc_masks *pm, *pmask; @@ -2611,6 +2659,10 @@ pmc_event_names_of_class(enum pmc_class ev = corei7_event_table; count = PMC_EVENT_TABLE_SIZE(corei7); break; + case PMC_CPU_INTEL_IVYBRIDGE: + ev = ivybridge_event_table; + count = PMC_EVENT_TABLE_SIZE(ivybridge); + break; case PMC_CPU_INTEL_SANDYBRIDGE: ev = sandybridge_event_table; count = PMC_EVENT_TABLE_SIZE(sandybridge); @@ -2899,6 +2951,9 @@ pmc_init(void) pmc_class_table[n++] = &corei7uc_class_table_descr; PMC_MDEP_INIT_INTEL_V2(corei7); break; + case PMC_CPU_INTEL_IVYBRIDGE: + PMC_MDEP_INIT_INTEL_V2(ivybridge); + break; case PMC_CPU_INTEL_SANDYBRIDGE: pmc_class_table[n++] = &ucf_class_table_descr; pmc_class_table[n++] = &sandybridgeuc_class_table_descr; @@ -3030,6 +3085,10 @@ _pmc_name_of_event(enum pmc_event pe, en ev = corei7_event_table; evfence = corei7_event_table + PMC_EVENT_TABLE_SIZE(corei7); break; + case PMC_CPU_INTEL_IVYBRIDGE: + ev = ivybridge_event_table; + evfence = ivybridge_event_table + PMC_EVENT_TABLE_SIZE(ivybridge); + break; case PMC_CPU_INTEL_SANDYBRIDGE: ev = sandybridge_event_table; evfence = sandybridge_event_table + PMC_EVENT_TABLE_SIZE(sandybridge); Copied: stable/9/lib/libpmc/pmc.ivybridge.3 (from r240164, head/lib/libpmc/pmc.ivybridge.3) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/lib/libpmc/pmc.ivybridge.3 Tue Oct 16 13:27:20 2012 (r241609, copy of r240164, head/lib/libpmc/pmc.ivybridge.3) @@ -0,0 +1,880 @@ +.\" Copyright (c) 2012 Fabien Thomas. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd August 24, 2012 +.Dt PMC.IVYBRIDGE 3 +.Os +.Sh NAME +.Nm pmc.ivybridge +.Nd measurement events for +.Tn Intel +.Tn Ivy Bridge +family CPUs +.Sh LIBRARY +.Lb libpmc +.Sh SYNOPSIS +.In pmc.h +.Sh DESCRIPTION +.Tn Intel +.Tn "Ivy Bridge" +CPUs contain PMCs conforming to version 2 of the +.Tn Intel +performance measurement architecture. +These CPUs may contain up to three classes of PMCs: +.Bl -tag -width "Li PMC_CLASS_IAP" +.It Li PMC_CLASS_IAF +Fixed-function counters that count only one hardware event per counter. +.It Li PMC_CLASS_IAP +Programmable counters that may be configured to count one of a defined +set of hardware events. +.El +.Pp +The number of PMCs available in each class and their widths need to be +determined at run time by calling +.Xr pmc_cpuinfo 3 . +.Pp +Intel Ivy Bridge PMCs are documented in +.Rs +.%B "Intel(R) 64 and IA-32 Architectures Software Developer's Manual" +Intel(R) 64 and IA-32 Architectures Software Developers Manual" +.%T "Volume 3B: System Programming Guide, Part 2" +.%N "Order Number: 253669-043US" +.%D May 2012 +.%Q "Intel Corporation" +.Re +.Ss IVYBRIDGE FIXED FUNCTION PMCS +These PMCs and their supported events are documented in +.Xr pmc.iaf 3 . +.Ss IVYBRIDGE PROGRAMMABLE PMCS +The programmable PMCs support the following capabilities: +.Bl -column "PMC_CAP_INTERRUPT" "Support" +.It Em Capability Ta Em Support +.It PMC_CAP_CASCADE Ta \&No +.It PMC_CAP_EDGE Ta Yes +.It PMC_CAP_INTERRUPT Ta Yes +.It PMC_CAP_INVERT Ta Yes +.It PMC_CAP_READ Ta Yes +.It PMC_CAP_PRECISE Ta \&No +.It PMC_CAP_SYSTEM Ta Yes +.It PMC_CAP_TAGGING Ta \&No +.It PMC_CAP_THRESHOLD Ta Yes +.It PMC_CAP_USER Ta Yes +.It PMC_CAP_WRITE Ta Yes +.El +.Ss Event Qualifiers +Event specifiers for these PMCs support the following common +qualifiers: +.Bl -tag -width indent +.It Li rsp= Ns Ar value +Configure the Off-core Response bits. +.Bl -tag -width indent +.It Li REQ_DMND_DATA_RD +Counts the number of demand and DCU prefetch data reads of full and partial +cachelines as well as demand data page table entry cacheline reads. Does not +count L2 data read prefetches or instruction fetches. +.It Li REQ_DMND_RFO +Counts the number of demand and DCU prefetch reads for ownership (RFO) +requests generated by a write to data cacheline. Does not count L2 RFO +prefetches. +.It Li REQ_DMND_IFETCH +Counts the number of demand and DCU prefetch instruction cacheline reads. +Does not count L2 code read prefetches. +.It Li REQ_WB +Counts the number of writeback (modified to exclusive) transactions. +.It Li REQ_PF_DATA_RD +Counts the number of data cacheline reads generated by L2 prefetchers. +.It Li REQ_PF_RFO +Counts the number of RFO requests generated by L2 prefetchers. +.It Li REQ_PF_IFETCH +Counts the number of code reads generated by L2 prefetchers. +.It Li REQ_PF_LLC_DATA_RD +L2 prefetcher to L3 for loads. +.It Li REQ_PF_LLC_RFO +RFO requests generated by L2 prefetcher +.It Li REQ_PF_LLC_IFETCH +L2 prefetcher to L3 for instruction fetches. +.It Li REQ_BUS_LOCKS +Bus lock and split lock requests. +.It Li REQ_STRM_ST +Streaming store requests. +.It Li REQ_OTHER +Any other request that crosses IDI, including I/O. +.It Li RES_ANY +Catch all value for any response types. +.It Li RES_SUPPLIER_NO_SUPP +No Supplier Information available. +.It Li RES_SUPPLIER_LLC_HITM +M-state initial lookup stat in L3. +.It Li RES_SUPPLIER_LLC_HITE +E-state. +.It Li RES_SUPPLIER_LLC_HITS +S-state. +.It Li RES_SUPPLIER_LLC_HITF +F-state. +.It Li RES_SUPPLIER_LOCAL +Local DRAM Controller. +.It Li RES_SNOOP_SNPI_NONE +No details on snoop-related information. +.It Li RES_SNOOP_SNP_NO_NEEDED +No snoop was needed to satisfy the request. +.It Li RES_SNOOP_SNP_MISS +A snoop was needed and it missed all snooped caches: +-For LLC Hit, ReslHitl was returned by all cores +-For LLC Miss, Rspl was returned by all sockets and data was returned from +DRAM. +.It Li RES_SNOOP_HIT_NO_FWD +A snoop was needed and it hits in at least one snooped cache. Hit denotes a +cache-line was valid before snoop effect. This includes: +-Snoop Hit w/ Invalidation (LLC Hit, RFO) +-Snoop Hit, Left Shared (LLC Hit/Miss, IFetch/Data_RD) +-Snoop Hit w/ Invalidation and No Forward (LLC Miss, RFO Hit S) +In the LLC Miss case, data is returned from DRAM. +.It Li RES_SNOOP_HIT_FWD +A snoop was needed and data was forwarded from a remote socket. +This includes: +-Snoop Forward Clean, Left Shared (LLC Hit/Miss, IFetch/Data_RD/RFT). +.It Li RES_SNOOP_HITM +A snoop was needed and it HitM-ed in local or remote cache. HitM denotes a +cache-line was in modified state before effect as a results of snoop. This +includes: +-Snoop HitM w/ WB (LLC miss, IFetch/Data_RD) +-Snoop Forward Modified w/ Invalidation (LLC Hit/Miss, RFO) +-Snoop MtoS (LLC Hit, IFetch/Data_RD). +.It Li RES_NON_DRAM +Target was non-DRAM system address. This includes MMIO transactions. +.El +.It Li cmask= Ns Ar value +Configure the PMC to increment only if the number of configured +events measured in a cycle is greater than or equal to +.Ar value . +.It Li edge +Configure the PMC to count the number of de-asserted to asserted +transitions of the conditions expressed by the other qualifiers. +If specified, the counter will increment only once whenever a +condition becomes true, irrespective of the number of clocks during +which the condition remains true. +.It Li inv +Invert the sense of comparison when the +.Dq Li cmask +qualifier is present, making the counter increment when the number of +events per cycle is less than the value specified by the +.Dq Li cmask +qualifier. +.It Li os +Configure the PMC to count events happening at processor privilege +level 0. +.It Li usr +Configure the PMC to count events occurring at privilege levels 1, 2 +or 3. +.El +.Pp +If neither of the +.Dq Li os +or +.Dq Li usr +qualifiers are specified, the default is to enable both. +.Ss Event Specifiers (Programmable PMCs) +Ivy Bridge programmable PMCs support the following events: +.Bl -tag -width indent +.It Li LD_BLOCKS.STORE_FORWARD +.Pq Event 03H , Umask 02H +loads blocked by overlapping with store buffer that cannot be forwarded . +.It Li MISALIGN_MEM_REF.LOADS +.Pq Event 05H , Umask 01H +Speculative cache-line split load uops dispatched to L1D. +.It Li MISALIGN_MEM_REF.STORES +.Pq Event 05H , Umask 02H +Speculative cache-line split Store- address uops dispatched to L1D. +.It Li LD_BLOCKS_PARTIAL.ADDRESS_ALIAS +.Pq Event 07H , Umask 01H +False dependencies in MOB due to partial compare on address. +.It Li DTLB_LOAD_MISSES.DEMAND_LD_MISS_CAUSES_A_WALK +.Pq Event 08H , Umask 81H +Misses in all TLB levels that cause a page walk of any page size from demand loads. +.It Li DTLB_LOAD_MISSES.DEMAND_LD_WALK_COMPLETED +.Pq Event 08H , Umask 82H +Misses in all TLB levels that caused page walk completed of any size by demand loads. +.It Li DTLB_LOAD_MISSES.DEMAND_LD_WALK_DURATION +.Pq Event 08H , Umask 84H +Cycle PMH is busy with a walk due to demand loads. +.It Li UOPS_ISSUED.ANY +.Pq Event 0EH , Umask 01H +Increments each cycle the # of Uops issued by the RAT to RS. +Set Cmask = 1, Inv = 1to count stalled cycles. +Set Cmask = 1, Inv = 1, Any= 1to count stalled cycles of this core. +.It Li UOPS_ISSUED.FLAGS_MERGE +.Pq Event 0EH , Umask 10H +Number of flags-merge uops allocated. Such uops adds delay. +.It Li UOPS_ISSUED.SLOW_LEA +.Pq Event 0EH , Umask 20H +Number of slow LEA or similar uops allocated. Such uop has 3 sources (e.g. 2 +sources + immediate) regardless if as a result of LEA instruction or not. +.It Li UOPS_ISSUED.SINGLE_MUL +.Pq Event 0EH , Umask 40H +Number of multiply packed/scalar single precision uops allocated. +.It Li ARITH.FPU_DIV_ACTIVE +.Pq Event 14H , Umask 01H +Cycles that the divider is active, includes INT and FP. Set 'edge =1, +cmask=1' to count the number of divides. +.It Li L2_RQSTS.DEMAND_DATA_RD_HIT +.Pq Event 24H , Umask 01H +Demand Data Read requests that hit L2 cache. +.It Li L2_RQSTS.ALL_DEMAND_DATA_RD +.Pq Event 24H , Umask 03H +Counts any demand and L1 HW prefetch data load requests to L2. +.It Li L2_RQSTS.RFO_HITS +.Pq Event 24H , Umask 04H +Counts the number of store RFO requests that hit the L2 cache. +.It Li L2_RQSTS.RFO_MISS +.Pq Event 24H , Umask 08H +Counts the number of store RFO requests that miss the L2 cache. +.It Li L2_RQSTS.ALL_RFO +.Pq Event 24H , Umask 0CH +Counts all L2 store RFO requests. +.It Li L2_RQSTS.CODE_RD_HIT +.Pq Event 24H , Umask 10H +Number of instruction fetches that hit the L2 cache. +.It Li L2_RQSTS.CODE_RD_MISS +.Pq Event 24H , Umask 20H +Number of instruction fetches that missed the L2 cache. +.It Li L2_RQSTS.ALL_CODE_RD +.Pq Event 24H , Umask 30H +Counts all L2 code requests. +.It Li L2_RQSTS.PF_HIT +.Pq Event 24H , Umask 40H +Counts all L2 HW prefetcher requests that hit L2. +.It Li L2_RQSTS.PF_MISS +.Pq Event 24H , Umask 80H +Counts all L2 HW prefetcher requests that missed L2. +.It Li L2_RQSTS.ALL_PF +.Pq Event 24H , Umask C0H +Counts all L2 HW prefetcher requests. +.It Li L2_STORE_LOCK_RQSTS.MISS +.Pq Event 27H , Umask 01H +RFOs that miss cache lines. +.It Li L2_STORE_LOCK_RQSTS.HIT_M +.Pq Event 27H , Umask 08H +RFOs that hit cache lines in M state. +.It Li L2_STORE_LOCK_RQSTS.ALL +.Pq Event 27H , Umask 0FH +RFOs that access cache lines in any state. +.It Li L2_L1D_WB_RQSTS.MISS +.Pq Event 28H , Umask 01H +Not rejected writebacks that missed LLC. +.It Li L2_L1D_WB_RQSTS.HIT_E +.Pq Event 28H , Umask 04H +Not rejected writebacks from L1D to L2 cache lines in E state. +.It Li L2_L1D_WB_RQSTS.HIT_M +.Pq Event 28H , Umask 08H +Not rejected writebacks from L1D to L2 cache lines in M state. +.It Li L2_L1D_WB_RQSTS.ALL +.Pq Event 28H , Umask 0FH +Not rejected writebacks from L1D to L2 cache lines in any state. +.It Li LONGEST_LAT_CACHE.REFERENCE +.Pq Event 2EH , Umask 4FH +This event counts requests originating from the core that reference a cache +line in the last level cache. +.It Li LONGEST_LAT_CACHE.MISS +.Pq Event 2EH , Umask 41H +This event counts each cache miss condition for references to the last level +cache. +.It Li CPU_CLK_UNHALTED.THREAD_P +.Pq Event 3CH , Umask 00H +Counts the number of thread cycles while the thread is not in a halt state. +The thread enters the halt state when it is running the HLT instruction. The +core frequency may change from time to time due to power or thermal +throttling. +.It Li CPU_CLK_THREAD_UNHALTED.REF_XCLK +.Pq Event 3CH , Umask 01H +Increments at the frequency of XCLK (100 MHz) when not halted. +.It Li L1D_PEND_MISS.PENDING +.Pq Event 48H , Umask 01H +Increments the number of outstanding L1D misses every cycle. Set Cmaks = 1 +and Edge =1 to count occurrences. +Counter 2 only. +Set Cmask = 1 to count cycles. +.It Li DTLB_STORE_MISSES.MISS_CAUSES_A_WALK +.Pq Event 49H , Umask 01H +Miss in all TLB levels causes an page walk of any page size (4K/2M/4M/1G). +.It Li DTLB_STORE_MISSES.WALK_COMPLETED +.Pq Event 49H , Umask 02H +Miss in all TLB levels causes a page walk that completes of any page size +(4K/2M/4M/1G). +.It Li DTLB_STORE_MISSES.WALK_DURATION +.Pq Event 49H , Umask 04H +Cycles PMH is busy with this walk. +.It Li DTLB_STORE_MISSES.STLB_HIT +.Pq Event 49H , Umask 10H +Store operations that miss the first TLB level but hit the second and do not +cause page walks. +.It Li LOAD_HIT_PRE.SW_PF +.Pq Event 4CH , Umask 01H +Non-SW-prefetch load dispatches that hit fill buffer allocated for S/W prefetch. +.It Li LOAD_HIT_PRE.HW_PF +.Pq Event 4CH , Umask 02H +Non-SW-prefetch load dispatches that hit fill buffer allocated for H/W prefetch. +.It Li L1D.REPLACEMENT +.Pq Event 51H , Umask 01H +Counts the number of lines brought into the L1 data cache. +.It Li MOVE_ELIMINATION.INT_NOT_ELIMINATED +.Pq Event 58H , Umask 01H +Number of integer Move Elimination candidate uops that were not eliminated. +.It Li MOVE_ELIMINATION.SIMD_NOT_ELIMINATED +.Pq Event 58H , Umask 02H +Number of SIMD Move Elimination candidate uops that were not eliminated. +.It Li MOVE_ELIMINATION.INT_ELIMINATED +.Pq Event 58H , Umask 04H +Number of integer Move Elimination candidate uops that were eliminated. +.It Li MOVE_ELIMINATION.SIMD_ELIMINATED +.Pq Event 58H , Umask 08H +Number of SIMD Move Elimination candidate uops that were eliminated. +.It Li CPL_CYCLES.RING0 +.Pq Event 5CH , Umask 01H +Unhalted core cycles when the thread is in ring 0. +Use Edge to count transition. +.It Li CPL_CYCLES.RING123 +.Pq Event 5CH , Umask 02H +Unhalted core cycles when the thread is not in ring 0. +.It Li RS_EVENTS.EMPTY_CYCLES +.Pq Event 5EH , Umask 01H +Cycles the RS is empty for the thread. +.It Li TLB_ACCESS.LOAD_STLB_HIT +.Pq Event 5FH , Umask 01H +Counts load operations that missed 1st level DTLB but hit the 2nd level. +.It Li OFFCORE_REQUESTS_OUTSTANDING.DEMAND_DATA_RD +.Pq Event 60H , Umask 01H +Offcore outstanding Demand Data Read transactions in SQ to uncore. Set +Cmask=1 to count cycles. +.It Li OFFCORE_REQUESTS_OUTSTANDING.DEMAND_CODE_RD +.Pq Event 60H , Umask 02H +Offcore outstanding Demand Code Read transactions in SQ to uncore. Set +Cmask=1 to count cycles. +.It Li OFFCORE_REQUESTS_OUTSTANDING.DEMAND_RFO +.Pq Event 60H , Umask 04H +Offcore outstanding RFO store transactions in SQ to uncore. Set Cmask=1 to +count cycles. +.It Li OFFCORE_REQUESTS_OUTSTANDING.ALL_DATA_RD +.Pq Event 60H , Umask 08H +Offcore outstanding cacheable data read transactions in SQ to uncore. Set +Cmask=1 to count cycles. +.It Li LOCK_CYCLES.SPLIT_LOCK_UC_LOCK_DURATION +.Pq Event 63H , Umask 01H +Cycles in which the L1D and L2 are locked, due to a UC lock or split lock. +.It Li LOCK_CYCLES.CACHE_LOCK_DURATION +.Pq Event 63H , Umask 02H +Cycles in which the L1D is locked. +.It Li IDQ.EMPTY +.Pq Event 79H , Umask 02H +Counts cycles the IDQ is empty. +.It Li IDQ.MITE_UOPS +.Pq Event 79H , Umask 04H +Increment each cycle # of uops delivered to IDQ from MITE path. +Can combine Umask 04H and 20H. +Set Cmask = 1 to count cycles. +.It Li IDQ.DSB_UOPS +.Pq Event 79H , Umask 08H +Increment each cycle. # of uops delivered to IDQ from DSB path. +Can combine Umask 08H and 10H +Set Cmask = 1 to count cycles. +.It Li IDQ.MS_DSB_UOPS +.Pq Event 79H , Umask 10H +Increment each cycle # of uops delivered to IDQ when MS_busy by DSB. Set +Cmask = 1 to count cycles. Add Edge=1 to count # of delivery. +Can combine Umask 04H, 08H. +.It Li IDQ.MS_MITE_UOPS +.Pq Event 79H , Umask 20H +Increment each cycle # of uops delivered to IDQ when MS_busy by MITE. Set +Cmask = 1 to count cycles. +Can combine Umask 04H, 08H. +.It Li IDQ.MS_UOPS +.Pq Event 79H , Umask 30H +Increment each cycle # of uops delivered to IDQ from MS by either DSB or +MITE. Set Cmask = 1 to count cycles. +Can combine Umask 04H, 08H. +.It Li IDQ.ALL_DSB_CYCLES_ANY_UOPS +.Pq Event 79H , Umask 18H +Counts cycles DSB is delivered at least one uops. Set Cmask = 1. +.It Li IDQ.ALL_DSB_CYCLES_4_UOPS +.Pq Event 79H , Umask 18H +Counts cycles DSB is delivered four uops. Set Cmask = 4. +.It Li IDQ.ALL_MITE_CYCLES_ANY_UOPS +.Pq Event 79H , Umask 24H +Counts cycles MITE is delivered at least one uops. Set Cmask = 1. +.It Li IDQ.ALL_MITE_CYCLES_4_UOPS +.Pq Event 79H , Umask 24H +Counts cycles MITE is delivered four uops. Set Cmask = 4. +.It Li IDQ.MITE_ALL_UOPS +.Pq Event 79H , Umask 3CH +# of uops delivered to IDQ from any path. +.It Li ICACHE.MISSES +.Pq Event 80H , Umask 02H +Number of Instruction Cache, Streaming Buffer and Victim Cache Misses. +Includes UC accesses. +.It Li ITLB_MISSES.MISS_CAUSES_A_WALK +.Pq Event 85H , Umask 01H +Misses in all ITLB levels that cause page walks. +.It Li ITLB_MISSES.WALK_COMPLETED +.Pq Event 85H , Umask 02H +Misses in all ITLB levels that cause completed page walks. +.It Li ITLB_MISSES.WALK_DURATION +.Pq Event 85H , Umask 04H +Cycle PMH is busy with a walk. +.It Li ITLB_MISSES.STLB_HIT +.Pq Event 85H , Umask 10H +Number of cache load STLB hits. No page walk. +.It Li ILD_STALL.LCP +.Pq Event 87H , Umask 01H +Stalls caused by changing prefix length of the instruction. +.It Li ILD_STALL.IQ_FULL +.Pq Event 87H , Umask 04H +Stall cycles due to IQ is full. +.It Li BR_INST_EXEC.COND +.Pq Event 88H , Umask 01H +Qualify conditional near branch instructions executed, but not necessarily +retired. +Must combine with umask 40H, 80H. +.It Li BR_INST_EXEC.DIRECT_JMP +.Pq Event 88H , Umask 02H +Qualify all unconditional near branch instructions excluding calls and +indirect branches. +Must combine with umask 80H. +.It Li BR_INST_EXEC.INDIRECT_JMP_NON_CALL_RET +.Pq Event 88H , Umask 04H +Qualify executed indirect near branch instructions that are not calls nor +returns. +Must combine with umask 80H. +.It Li BR_INST_EXEC.RETURN_NEAR +.Pq Event 88H , Umask 08H +Qualify indirect near branches that have a return mnemonic. +Must combine with umask 80H. +.It Li BR_INST_EXEC.DIRECT_NEAR_CALL +.Pq Event 88H , Umask 10H +Qualify unconditional near call branch instructions, excluding non call +branch, executed. +Must combine with umask 80H. +.It Li BR_INST_EXEC.INDIRECT_NEAR_CALL +.Pq Event 88H , Umask 20H +Qualify indirect near calls, including both register and memory indirect, +executed. +Must combine with umask 80H. +.It Li BR_INST_EXEC.NONTAKEN +.Pq Event 88H , Umask 40H +Qualify non-taken near branches executed. +Applicable to umask 01H only. +.It Li BR_INST_EXEC.TAKEN +.Pq Event 88H , Umask 80H +Qualify taken near branches executed. Must combine with 01H,02H, 04H, 08H, +10H, 20H. +.It Li BR_INST_EXEC.ALL_BRANCHES +.Pq Event 88H , Umask FFH +Counts all near executed branches (not necessarily retired). +.It Li BR_MISP_EXEC.COND +.Pq Event 89H , Umask 01H +Qualify conditional near branch instructions mispredicted. +Must combine with umask 40H, 80H. +.It Li BR_MISP_EXEC.INDIRECT_JMP_NON_CALL_RET +.Pq Event 89H , Umask 04H +Qualify mispredicted indirect near branch instructions that are not calls +nor returns. +Must combine with umask 80H. +.It Li BR_MISP_EXEC.RETURN_NEAR +.Pq Event 89H , Umask 08H +Qualify mispredicted indirect near branches that have a return mnemonic. +Must combine with umask 80H. +.It Li BR_MISP_EXEC.DIRECT_NEAR_CALL +.Pq Event 89H , Umask 10H +Qualify mispredicted unconditional near call branch instructions, excluding +non call branch, executed. +Must combine with umask 80H. +.It Li BR_MISP_EXEC.INDIRECT_NEAR_CALL +.Pq Event 89H , Umask 20H +Qualify mispredicted indirect near calls, including both register and memory +indirect, executed. +Must combine with umask 80H. +.It Li BR_MISP_EXEC.NONTAKEN +.Pq Event 89H , Umask 40H +Qualify mispredicted non-taken near branches executed. +Applicable to umask 01H only. +.It Li BR_MISP_EXEC.TAKEN +.Pq Event 89H , Umask 80H +Qualify mispredicted taken near branches executed. Must combine with +01H,02H, 04H, 08H, 10H, 20H. +.It Li BR_MISP_EXEC.ALL_BRANCHES +.Pq Event 89H , Umask FFH +Counts all near executed branches (not necessarily retired). +.It Li IDQ_UOPS_NOT_DELIVERED.CORE +.Pq Event 9CH , Umask 01H +Count number of non-delivered uops to RAT per thread. +Use Cmask to qualify uop b/w. +.It Li UOPS_DISPATCHED_PORT.PORT_0 +.Pq Event A1H , Umask 01H +Cycles which a Uop is dispatched on port 0. +.It Li UOPS_DISPATCHED_PORT.PORT_1 +.Pq Event A1H , Umask 02H +Cycles which a Uop is dispatched on port 1. +.It Li UOPS_DISPATCHED_PORT.PORT_2_LD +.Pq Event A1H , Umask 04H +Cycles which a load uop is dispatched on port 2. +.It Li UOPS_DISPATCHED_PORT.PORT_2_STA +.Pq Event A1H , Umask 08H +Cycles which a store address uop is dispatched on port 2. +.It Li UOPS_DISPATCHED_PORT.PORT_2 +.Pq Event A1H , Umask 0CH +Cycles which a Uop is dispatched on port 2. +.It Li UOPS_DISPATCHED_PORT.PORT_3_LD +.Pq Event A1H , Umask 10H +Cycles which a load uop is dispatched on port 3. +.It Li UOPS_DISPATCHED_PORT.PORT_3_STA +.Pq Event A1H , Umask 20H +Cycles which a store address uop is dispatched on port 3. +.It Li UOPS_DISPATCHED_PORT.PORT_3 +.Pq Event A1H , Umask 30H +Cycles which a Uop is dispatched on port 3. +.It Li UOPS_DISPATCHED_PORT.PORT_4 +.Pq Event A1H , Umask 40H +Cycles which a Uop is dispatched on port 4. +.It Li UOPS_DISPATCHED_PORT.PORT_5 +.Pq Event A1H , Umask 80H +Cycles which a Uop is dispatched on port 5. +.It Li RESOURCE_STALLS.ANY +.Pq Event A2H , Umask 01H +Cycles Allocation is stalled due to Resource Related reason. +.It Li RESOURCE_STALLS.RS +.Pq Event A2H , Umask 04H +Cycles stalled due to no eligible RS entry available. +.It Li RESOURCE_STALLS.SB +.Pq Event A2H , Umask 08H +Cycles stalled due to no store buffers available. (not including draining +form sync). +.It Li RESOURCE_STALLS.ROB +.Pq Event A2H , Umask 10H +Cycles stalled due to re-order buffer full. +.It Li DSB2MITE_SWITCHES.COUNT +.Pq Event ABH , Umask 01H +Number of DSB to MITE switches. +.It Li DSB2MITE_SWITCHES.PENALTY_CYCLES +.Pq Event ABH , Umask 02H +Cycles DSB to MITE switches caused delay. +.It Li DSB_FILL.EXCEED_DSB_LINES +.Pq Event ACH , Umask 08H +DSB Fill encountered > 3 DSB lines. +.It Li ITLB.ITLB_FLUSH +.Pq Event AEH , Umask 01H +Counts the number of ITLB flushes, includes 4k/2M/4M pages. +.It Li OFFCORE_REQUESTS.DEMAND_DATA_RD +.Pq Event B0H , Umask 01H +Demand data read requests sent to uncore. +.It Li OFFCORE_REQUESTS.DEMAND_CODE_RD +.Pq Event B0H , Umask 02H +Demand code read requests sent to uncore. +.It Li OFFCORE_REQUESTS.DEMAND_RFO +.Pq Event B0H , Umask 04H +Demand RFO read requests sent to uncore, including regular RFOs, locks, +ItoM. +.It Li OFFCORE_REQUESTS.ALL_DATA_RD +.Pq Event B0H , Umask 08H +Data read requests sent to uncore (demand and prefetch). +.It Li UOPS_EXECUTED.THREAD +.Pq Event B1H , Umask 01H +Counts total number of uops to be executed per-thread each cycle. Set Cmask += 1, INV =1 to count stall cycles. +.It Li UOPS_EXECUTED.CORE +.Pq Event B1H , Umask 02H +Counts total number of uops to be executed per-core each cycle. +Do not need to set ANY. +.It Li OFF_CORE_RESPONSE_0 +.Pq Event B7H , Umask 01H +Off-core Response Performance Monitoring. +PMC0 only. +Requires programming MSR 01A6H. +.It Li OFF_CORE_RESPONSE_1 +.Pq Event BBH , Umask 01H +Off-core Response Performance Monitoring. +PMC3 only. +Requires programming MSR 01A7H. +.It Li TLB_FLUSH.DTLB_THREAD +.Pq Event BDH , Umask 01H +DTLB flush attempts of the thread- specific entries. +.It Li TLB_FLUSH.STLB_ANY +.Pq Event BDH , Umask 20H +Count number of STLB flush attempts. +.It Li INST_RETIRED.ANY_P +.Pq Event C0H , Umask 00H +Number of instructions at retirement. +.It Li INST_RETIRED.ALL +.Pq Event C0H , Umask 01H +Precise instruction retired event with HW to reduce effect of PEBS shadow in +IP distribution. +PMC1 only. +Must quiesce other PMCs. +.It Li OTHER_ASSISTS.AVX_STORE +.Pq Event C1H , Umask 08H +Number of assists associated with 256-bit AVX store operations. +.It Li OTHER_ASSISTS.AVX_TO_SSE +.Pq Event C1H , Umask 10H +Number of transitions from AVX- 256 to legacy SSE when penalty applicable. +.It Li OTHER_ASSISTS.SSE_TO_AVX +.Pq Event C1H , Umask 20H +Number of transitions from SSE to AVX-256 when penalty applicable. +.It Li UOPS_RETIRED.ALL +.Pq Event C2H , Umask 01H +Counts the number of micro-ops retired, Use cmask=1 and invert to count +active cycles or stalled cycles. +Supports PEBS, use Any=1 for core granular. +.It Li UOPS_RETIRED.RETIRE_SLOTS +.Pq Event C2H , Umask 02H +Counts the number of retirement slots used each cycle. +.It Li MACHINE_CLEARS.MEMORY_ORDERING +.Pq Event C3H , Umask 02H +Counts the number of machine clears due to memory order conflicts. +.It Li MACHINE_CLEARS.SMC +.Pq Event C3H , Umask 04H +Number of self-modifying-code machine clears detected. +.It Li MACHINE_CLEARS.MASKMOV +.Pq Event C3H , Umask 20H +Counts the number of executed AVX masked load operations that refer to an +illegal address range with the mask bits set to 0. +.It Li BR_INST_RETIRED.ALL_BRANCHES +.Pq Event C4H , Umask 00H +Branch instructions at retirement. +.It Li BR_INST_RETIRED.CONDITIONAL +.Pq Event C4H , Umask 01H +Counts the number of conditional branch instructions retired. +Supports PEBS. +.It Li BR_INST_RETIRED.NEAR_CALL +.Pq Event C4H , Umask 02H +Direct and indirect near call instructions retired. +.It Li BR_INST_RETIRED.ALL_BRANCHES +.Pq Event C4H , Umask 04H +Counts the number of branch instructions retired. +.It Li BR_INST_RETIRED.NEAR_RETURN +.Pq Event C4H , Umask 08H +Counts the number of near return instructions retired. +.It Li BR_INST_RETIRED.NOT_TAKEN +.Pq Event C4H , Umask 10H +Counts the number of not taken branch instructions retired. +.It Li BR_INST_RETIRED.NEAR_TAKEN +.Pq Event C4H , Umask 20H +Number of near taken branches retired. +.It Li BR_INST_RETIRED.FAR_BRANCH +.Pq Event C4H , Umask 40H +Number of far branches retired. +.It Li BR_MISP_RETIRED.ALL_BRANCHES +.Pq Event C5H , Umask 00H +Mispredicted branch instructions at retirement. +.It Li BR_MISP_RETIRED.CONDITIONAL +.Pq Event C5H , Umask 01H +Mispredicted conditional branch instructions retired. +Supports PEBS. +.It Li BR_MISP_RETIRED.NEAR_CALL +.Pq Event C5H , Umask 02H +Direct and indirect mispredicted near call instructions retired. +.It Li BR_MISP_RETIRED.ALL_BRANCHES +.Pq Event C5H , Umask 04H +Mispredicted macro branch instructions retired. +.It Li BR_MISP_RETIRED.NOT_TAKEN +.Pq Event C5H , Umask 10H +Mispredicted not taken branch instructions retired. +.It Li BR_MISP_RETIRED.TAKEN +.Pq Event C5H , Umask 20H +Mispredicted taken branch instructions retired. +.It Li FP_ASSIST.X87_OUTPUT +.Pq Event CAH , Umask 02H +Number of X87 FP assists due to Output values. +.It Li FP_ASSIST.X87_INPUT +.Pq Event CAH , Umask 04H +Number of X87 FP assists due to input values. +.It Li FP_ASSIST.SIMD_OUTPUT +.Pq Event CAH , Umask 08H +Number of SIMD FP assists due to Output values. +.It Li FP_ASSIST.SIMD_INPUT +.Pq Event CAH , Umask 10H +Number of SIMD FP assists due to input values. +.It Li FP_ASSIST.ANY +.Pq Event CAH , Umask 1EH +Cycles with any input/output SSE* or FP assists. +.It Li ROB_MISC_EVENTS.LBR_INSERTS +.Pq Event CCH , Umask 20H +Count cases of saving new LBR records by hardware. +.It Li MEM_TRANS_RETIRED.LOAD_LATENCY +.Pq Event CDH , Umask 01H +Sample loads with specified latency threshold. +PMC3 only. +Specify threshold in MSR 0x3F6. +.It Li MEM_TRANS_RETIRED.PRECISE_STORE +.Pq Event CDH , Umask 02H +Sample stores and collect precise store operation via PEBS record. +PMC3 only. +.It Li MEM_UOP_RETIRED.LOADS +.Pq Event D0H , Umask 01H +Qualify retired memory uops that are loads. Combine with umask 10H, 20H, +40H, 80H. +Supports PEBS. +.It Li MEM_UOP_RETIRED.STORES +.Pq Event D0H , Umask 02H +Qualify retired memory uops that are stores. Combine with umask 10H, 20H, +40H, 80H. +.It Li MEM_UOP_RETIRED.STLB_MISS +.Pq Event D0H , Umask 10H +Qualify retired memory uops with STLB miss. Must combine with umask 01H, +02H, to produce counts. +.It Li MEM_UOP_RETIRED.LOCK +.Pq Event D0H , Umask 20H +Qualify retired memory uops with lock. Must combine with umask 01H, 02H, to +produce counts. +.It Li MEM_UOP_RETIRED.SPLIT +.Pq Event D0H , Umask 40H +Qualify retired memory uops with line split. Must combine with umask 01H, +02H, to produce counts. +.It Li MEM_UOP_RETIRED.ALL +.Pq Event D0H , Umask 80H +Qualify any retired memory uops. Must combine with umask 01H, 02H, to +produce counts. +.It Li MEM_LOAD_UOPS_RETIRED.L1_HIT +.Pq Event D1H , Umask 01H +Retired load uops with L1 cache hits as data sources. +Supports PEBS. +.It Li MEM_LOAD_UOPS_RETIRED.L2_HIT +.Pq Event D1H , Umask 02H +Retired load uops with L2 cache hits as data sources. +.It Li MEM_LOAD_UOPS_RETIRED.LLC_HIT +.Pq Event D1H , Umask 04H +Retired load uops with LLC cache hits as data sources. +.It Li MEM_LOAD_UOPS_RETIRED.HIT_LFB +.Pq Event D1H , Umask 40H +Retired load uops which data sources were load uops missed L1 but hit FB due +to preceding miss to the same cache line with data not ready. +.It Li MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_MISS +.Pq Event D2H , Umask 01H +Retired load uops which data sources were LLC hit and cross-core snoop +missed in on-pkg core cache. +Supports PEBS. +.It Li MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HIT +.Pq Event D2H , Umask 02H +Retired load uops which data sources were LLC and cross-core snoop hits in +on-pkg core cache. +Supports PEBS. +.It Li MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HITM +.Pq Event D2H , Umask 04H +Retired load uops which data sources were HitM responses from shared LLC. +.It Li MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_NONE +.Pq Event D2H , Umask 08H +Retired load uops which data sources were hits in LLC without snoops +required. +.It Li MEM_LOAD_UOPS_LLC_MISS_RETIRED.LOCAL_DRAM +.Pq Event D3H , Umask 01H +Retired load uops which data sources missed LLC but serviced from local +dram. +Supports PEBS. +.It Li L2_TRANS.DEMAND_DATA_RD +.Pq Event F0H , Umask 01H +Demand Data Read requests that access L2 cache. +.It Li L2_TRANS.RFO +.Pq Event F0H , Umask 02H +RFO requests that access L2 cache. +.It Li L2_TRANS.CODE_RD +.Pq Event F0H , Umask 04H +L2 cache accesses when fetching instructions. +.It Li L2_TRANS.ALL_PF +.Pq Event F0H , Umask 08H *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-9@FreeBSD.ORG Tue Oct 16 13:37:01 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8AFE95CE; Tue, 16 Oct 2012 13:37:01 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-jnhn.mail.uoguelph.ca (esa-jnhn.mail.uoguelph.ca [131.104.91.44]) by mx1.freebsd.org (Postfix) with ESMTP id E671B8FC0A; Tue, 16 Oct 2012 13:37:00 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ap4EAG9ifVCDaFvO/2dsb2JhbABFhhK6eIIgAQEEASMEUgUWFAQCAg0ZAlkGiBEGC6hxgjuQTIEhii6FK4ESA5VrkDKDCYF7 X-IronPort-AV: E=Sophos;i="4.80,594,1344225600"; d="scan'208";a="183828218" Received: from erie.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.206]) by esa-jnhn-pri.mail.uoguelph.ca with ESMTP; 16 Oct 2012 09:36:54 -0400 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id 2EDA4B4041; Tue, 16 Oct 2012 09:36:54 -0400 (EDT) Date: Tue, 16 Oct 2012 09:36:54 -0400 (EDT) From: Rick Macklem To: "Pedro F. Giffuni" Message-ID: <765985284.2313601.1350394614176.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: <201210160137.q9G1bIWm016746@svn.freebsd.org> Subject: Re: svn commit: r241601 - in stable/9: lib/libc/rpc sys/rpc MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.91.202] X-Mailer: Zimbra 6.0.10_GA_2692 (ZimbraWebClient - IE7 (Win)/6.0.10_GA_2692) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Oct 2012 13:37:01 -0000 Pedro F. Giffuni wrote: > Author: pfg > Date: Tue Oct 16 01:37:17 2012 > New Revision: 241601 > URL: http://svn.freebsd.org/changeset/base/241601 > > Log: > MFC r241143: > > rpc: be sure to free cl_netid and cl_tp. > > When creating a client with clnt_tli_create, it uses strdup to copy > strings for these fields if nconf is passed in. clnt_dg_destroy frees > these strings already. Make sure clnt_vc_destroy frees them in the > same > way. > I think the patch is fine. However, just fyi, there is no clnt_tli_create() in the kernel and nothing in the kernel currently sets cl_netid or cl_tp non-NULL, as far as I can see. rick > Tested by: David Wolfskill > Obtained from: Bull GNU/Linux NFSv4 Project (libtirpc) > > Modified: > stable/9/lib/libc/rpc/clnt_vc.c > stable/9/sys/rpc/clnt_vc.c > > Modified: stable/9/lib/libc/rpc/clnt_vc.c > ============================================================================== > --- stable/9/lib/libc/rpc/clnt_vc.c Tue Oct 16 01:10:43 2012 (r241600) > +++ stable/9/lib/libc/rpc/clnt_vc.c Tue Oct 16 01:37:17 2012 (r241601) > @@ -672,6 +672,10 @@ clnt_vc_destroy(cl) > if (ct->ct_addr.buf) > free(ct->ct_addr.buf); > mem_free(ct, sizeof(struct ct_data)); > + if (cl->cl_netid && cl->cl_netid[0]) > + mem_free(cl->cl_netid, strlen(cl->cl_netid) +1); > + if (cl->cl_tp && cl->cl_tp[0]) > + mem_free(cl->cl_tp, strlen(cl->cl_tp) +1); > mem_free(cl, sizeof(CLIENT)); > mutex_unlock(&clnt_fd_lock); > thr_sigsetmask(SIG_SETMASK, &(mask), NULL); > > Modified: stable/9/sys/rpc/clnt_vc.c > ============================================================================== > --- stable/9/sys/rpc/clnt_vc.c Tue Oct 16 01:10:43 2012 (r241600) > +++ stable/9/sys/rpc/clnt_vc.c Tue Oct 16 01:37:17 2012 (r241601) > @@ -836,6 +836,10 @@ clnt_vc_destroy(CLIENT *cl) > soclose(so); > } > mem_free(ct, sizeof(struct ct_data)); > + if (cl->cl_netid && cl->cl_netid[0]) > + mem_free(cl->cl_netid, strlen(cl->cl_netid) +1); > + if (cl->cl_tp && cl->cl_tp[0]) > + mem_free(cl->cl_tp, strlen(cl->cl_tp) +1); > mem_free(cl, sizeof(CLIENT)); > } From owner-svn-src-stable-9@FreeBSD.ORG Tue Oct 16 15:33:54 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 930ECF3A for ; Tue, 16 Oct 2012 15:33:54 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm31-vm2.bullet.mail.gq1.yahoo.com (nm31-vm2.bullet.mail.gq1.yahoo.com [98.136.216.209]) by mx1.freebsd.org (Postfix) with ESMTP id 2C30E8FC0C for ; Tue, 16 Oct 2012 15:33:54 +0000 (UTC) Received: from [98.137.12.58] by nm31.bullet.mail.gq1.yahoo.com with NNFMP; 16 Oct 2012 15:33:46 -0000 Received: from [208.71.42.211] by tm3.bullet.mail.gq1.yahoo.com with NNFMP; 16 Oct 2012 15:33:46 -0000 Received: from [127.0.0.1] by smtp222.mail.gq1.yahoo.com with NNFMP; 16 Oct 2012 15:33:46 -0000 X-Yahoo-Newman-Id: 731742.66271.bm@smtp222.mail.gq1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: bppjZxUVM1kmpvMJ7prrdliZUEYroUm82CbZiX8zd9tq7C0 avrVgh2UFHQeY_ljoRU9VjoQyG0Rq_7X7ouZ36iCy_SRBLBoJKVayEmRqd25 uR48mSnUxXhmFA.lS7keLWfFlvrn6LF_wDvCU6MtFcF4lIJpiV7um.FCb0Qz 4Hoh52gtQR.vrh9FIPclvRB4HGKXRqvjhqDGM28284puOg_s6cxz18GS0Y8v ysLPQzgMAVpck9QkX8IU1BhP9f_4GRsQjSzr9MdPkJGI0TnM2M.SaDCPGeBL duIXKdpZLYjRzEhAGXQb346i_pDvmIZVnOs30DBa5ZpM63F521lnYfKneSaT YSeNQqLeqmS1ldpXz6dbrDu3qB4CUmR6QItFOIA3NXTEKXqupbCrYiiaAZpo .kemojH4uhwE4X1s2Tdphk5QrEzglQt.WYyzyJ9rMYgOYrImZXTJjP83u3jC yEEGrPN..NHtbZhoLyCqHlBRgi3IPVTVMb_qqZX1g_iIC.ZP3BgLxmI0PJEp A6ITt0YHhHSn60roC412X7ulPkLG2Jue6.pbbF_4vRwdhHZ6_71RxkZMZpQo - X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Received: from [192.168.10.101] (pfg@200.118.157.7 with plain) by smtp222.mail.gq1.yahoo.com with SMTP; 16 Oct 2012 08:33:46 -0700 PDT Message-ID: <507D7E60.90204@FreeBSD.org> Date: Tue, 16 Oct 2012 10:33:52 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:13.0) Gecko/20120621 Thunderbird/13.0.1 MIME-Version: 1.0 To: Rick Macklem Subject: Re: svn commit: r241601 - in stable/9: lib/libc/rpc sys/rpc References: <765985284.2313601.1350394614176.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: <765985284.2313601.1350394614176.JavaMail.root@erie.cs.uoguelph.ca> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Oct 2012 15:33:54 -0000 Thank you for the note Rick; On 10/16/2012 08:36, Rick Macklem wrote: > Pedro F. Giffuni wrote: >> Author: pfg >> Date: Tue Oct 16 01:37:17 2012 >> New Revision: 241601 >> URL: http://svn.freebsd.org/changeset/base/241601 >> >> Log: >> MFC r241143: >> >> rpc: be sure to free cl_netid and cl_tp. >> >> When creating a client with clnt_tli_create, it uses strdup to copy >> strings for these fields if nconf is passed in. clnt_dg_destroy frees >> these strings already. Make sure clnt_vc_destroy frees them in the >> same >> way. >> > I think the patch is fine. However, just fyi, there is no clnt_tli_create() > in the kernel and nothing in the kernel currently sets cl_netid or cl_tp non-NULL, as > far as I can see. The sys/ part is indeed there only to keep consistency with the libc version from which it was derived. According to OpenGrok though: clnt_tli_create() is declared extern in sys/rpc/clnt.h and used in lines 328 and 423 in sys/rpc/rpc_clnt.c. This can all be dead code but JIC it seems good to keep the check. Cheers, Pedro. From owner-svn-src-stable-9@FreeBSD.ORG Tue Oct 16 19:58:16 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EA4C2B38; Tue, 16 Oct 2012 19:58:15 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B32E48FC12; Tue, 16 Oct 2012 19:58:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9GJwF5j010125; Tue, 16 Oct 2012 19:58:15 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9GJwF4S010122; Tue, 16 Oct 2012 19:58:15 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201210161958.q9GJwF4S010122@svn.freebsd.org> From: Martin Matuska Date: Tue, 16 Oct 2012 19:58:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241614 - stable/9/cddl/contrib/opensolaris/cmd/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Oct 2012 19:58:16 -0000 Author: mm Date: Tue Oct 16 19:58:15 2012 New Revision: 241614 URL: http://svn.freebsd.org/changeset/base/241614 Log: MFC r240955 (partial): Remove unsupported "-r" option from zfs send. Illumos issued covered: 2811 missing implementation: zfs send -r PR: kern/171761 Modified: stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs.8 stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Directory Properties: stable/9/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Tue Oct 16 17:49:14 2012 (r241613) +++ stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Tue Oct 16 19:58:15 2012 (r241614) @@ -169,7 +169,7 @@ .Fl a | Ar filesystem Ns | Ns Ar mountpoint .Nm .Cm send -.Op Fl DnPpRrv +.Op Fl DnPpRv .Op Fl i Ar snapshot | Fl I Ar snapshot .Ar snapshot .Nm @@ -2179,7 +2179,7 @@ file system shared on the system. .It Xo .Nm .Cm send -.Op Fl DnPpRrv +.Op Fl DnPpRv .Op Fl i Ar snapshot | Fl I Ar snapshot .Ar snapshot .Xc @@ -2252,13 +2252,6 @@ be used regardless of the dataset's property, but performance will be much better if the filesystem uses a dedup-capable checksum (eg. .Sy sha256 ) . -.It Fl r -Recursively send all descendant snapshots. This is similar to the -.Fl R -flag, but information about deleted and renamed datasets is not included, and -property information is only included if the -.Fl p -flag is specified. .It Fl p Include the dataset's properties in the stream. This flag is implicit when .Fl R Modified: stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Tue Oct 16 17:49:14 2012 (r241613) +++ stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Tue Oct 16 19:58:15 2012 (r241614) @@ -267,7 +267,7 @@ get_usage(zfs_help_t idx) case HELP_ROLLBACK: return (gettext("\trollback [-rRf] \n")); case HELP_SEND: - return (gettext("\tsend [-DnPpRrv] " + return (gettext("\tsend [-DnPpRv] " "[-i snapshot | -I snapshot] \n")); case HELP_SET: return (gettext("\tset " From owner-svn-src-stable-9@FreeBSD.ORG Wed Oct 17 00:27:30 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 68334221; Wed, 17 Oct 2012 00:27:30 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4F6B48FC08; Wed, 17 Oct 2012 00:27:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9H0RUHK053147; Wed, 17 Oct 2012 00:27:30 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9H0RUKo053145; Wed, 17 Oct 2012 00:27:30 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210170027.q9H0RUKo053145@svn.freebsd.org> From: Eitan Adler Date: Wed, 17 Oct 2012 00:27:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241620 - stable/9/share/man/man5 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Oct 2012 00:27:30 -0000 Author: eadler Date: Wed Oct 17 00:27:29 2012 New Revision: 241620 URL: http://svn.freebsd.org/changeset/base/241620 Log: MFC r241542: Don't document the PORTSSUPFILE variable. Even though this still works, try to discourage users from depending on it. Approved by: cperciva (implicit) Modified: stable/9/share/man/man5/make.conf.5 Directory Properties: stable/9/share/man/man5/ (props changed) Modified: stable/9/share/man/man5/make.conf.5 ============================================================================== --- stable/9/share/man/man5/make.conf.5 Tue Oct 16 22:43:14 2012 (r241619) +++ stable/9/share/man/man5/make.conf.5 Wed Oct 17 00:27:29 2012 (r241620) @@ -267,14 +267,6 @@ Set this to not update the ports tree du .Pq Vt bool Set this to not update the www tree during .Dq Li "make update" . -.It Va PORTSSUPFILE -.Pq Vt str -The ports -.Ar supfile -to use when doing a -.Dq Li "make update" . -For example, -.Pa /usr/share/examples/cvsup/ports-supfile . .It Va SUP .Pq Vt str The location of the From owner-svn-src-stable-9@FreeBSD.ORG Wed Oct 17 00:30:34 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0AE293B0; Wed, 17 Oct 2012 00:30:34 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E573F8FC12; Wed, 17 Oct 2012 00:30:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9H0UXa4053707; Wed, 17 Oct 2012 00:30:33 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9H0UXCa053704; Wed, 17 Oct 2012 00:30:33 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210170030.q9H0UXCa053704@svn.freebsd.org> From: Eitan Adler Date: Wed, 17 Oct 2012 00:30:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241622 - in stable/9/sys/dev/usb: . quirk X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Oct 2012 00:30:34 -0000 Author: eadler Date: Wed Oct 17 00:30:33 2012 New Revision: 241622 URL: http://svn.freebsd.org/changeset/base/241622 Log: MFC r241551: Add support for the Buffalo RUF2 flash drive. PR: usb/166848 Approved by: cperciva (implicit) Modified: stable/9/sys/dev/usb/quirk/usb_quirk.c stable/9/sys/dev/usb/usbdevs Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- stable/9/sys/dev/usb/quirk/usb_quirk.c Wed Oct 17 00:30:33 2012 (r241621) +++ stable/9/sys/dev/usb/quirk/usb_quirk.c Wed Oct 17 00:30:33 2012 (r241622) @@ -177,6 +177,7 @@ static struct usb_quirk_entry usb_quirks UQ_MSC_FORCE_PROTO_SCSI), USB_QUIRK(DMI, CFSM_RW, 0x0000, 0xffff, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_GETMAXLUN), + USB_QUIRK(EMTEC, RUF2PS, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(EPSON, STYLUS_875DC, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY), USB_QUIRK(EPSON, STYLUS_895, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, Modified: stable/9/sys/dev/usb/usbdevs ============================================================================== --- stable/9/sys/dev/usb/usbdevs Wed Oct 17 00:30:33 2012 (r241621) +++ stable/9/sys/dev/usb/usbdevs Wed Oct 17 00:30:33 2012 (r241622) @@ -1588,6 +1588,9 @@ product ELV USBI2C 0xe00f USB-I2C inter /* EMS products */ product EMS DUAL_SHOOTER 0x0003 PSX gun controller converter +/* Emtec products */ +product EMTEC RUF2PS 0x2240 Flash Drive + /* Encore products */ product ENCORE RT3070_1 0x1480 RT3070 product ENCORE RT3070_2 0x14a1 RT3070 From owner-svn-src-stable-9@FreeBSD.ORG Wed Oct 17 00:33:11 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4680C864; Wed, 17 Oct 2012 00:33:11 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2DF2E8FC12; Wed, 17 Oct 2012 00:33:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9H0XB2T054214; Wed, 17 Oct 2012 00:33:11 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9H0XAiF054209; Wed, 17 Oct 2012 00:33:10 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210170033.q9H0XAiF054209@svn.freebsd.org> From: Eitan Adler Date: Wed, 17 Oct 2012 00:33:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241624 - in stable/9/sys/dev/usb: . quirk X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Oct 2012 00:33:11 -0000 Author: eadler Date: Wed Oct 17 00:33:10 2012 New Revision: 241624 URL: http://svn.freebsd.org/changeset/base/241624 Log: MFC r241552: Add support for Feiya Elango USB MicroSD PR: usb/153599 Approved by: cperciva (implicit) Modified: stable/9/sys/dev/usb/quirk/usb_quirk.c stable/9/sys/dev/usb/usbdevs Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- stable/9/sys/dev/usb/quirk/usb_quirk.c Wed Oct 17 00:33:10 2012 (r241623) +++ stable/9/sys/dev/usb/quirk/usb_quirk.c Wed Oct 17 00:33:10 2012 (r241624) @@ -184,6 +184,7 @@ static struct usb_quirk_entry usb_quirks UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_GETMAXLUN), USB_QUIRK(FEIYA, 5IN1, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI), + USB_QUIRK(FEIYA, ELANGO, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(FREECOM, DVD, 0x0000, 0xffff, UQ_MSC_FORCE_PROTO_SCSI), USB_QUIRK(FUJIPHOTO, MASS0100, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI_I, UQ_MSC_FORCE_PROTO_ATAPI, UQ_MSC_NO_RS_CLEAR_UA, UQ_MSC_NO_SYNC_CACHE), Modified: stable/9/sys/dev/usb/usbdevs ============================================================================== --- stable/9/sys/dev/usb/usbdevs Wed Oct 17 00:33:10 2012 (r241623) +++ stable/9/sys/dev/usb/usbdevs Wed Oct 17 00:33:10 2012 (r241624) @@ -1673,6 +1673,7 @@ product FALCOM SAMBA 0x0005 FTDI compat /* FEIYA products */ product FEIYA DUMMY 0x0000 Dummy product product FEIYA 5IN1 0x1132 5-in-1 Card Reader +product FEIYA ELANGO 0x6200 MicroSDHC Card Reader product FEIYA AC110 0x6300 AC-110 Card Reader /* Festo */ From owner-svn-src-stable-9@FreeBSD.ORG Wed Oct 17 11:24:07 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 33B56BB8; Wed, 17 Oct 2012 11:24:07 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1BADE8FC14; Wed, 17 Oct 2012 11:24:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9HBO6No059032; Wed, 17 Oct 2012 11:24:06 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9HBO6Vo059029; Wed, 17 Oct 2012 11:24:06 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210171124.q9HBO6Vo059029@svn.freebsd.org> From: Andriy Gapon Date: Wed, 17 Oct 2012 11:24:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241630 - stable/9/sys/boot/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Oct 2012 11:24:07 -0000 Author: avg Date: Wed Oct 17 11:24:06 2012 New Revision: 241630 URL: http://svn.freebsd.org/changeset/base/241630 Log: MFC r241291: zfs boot spa_status: print bootfs for each reported pool Modified: stable/9/sys/boot/zfs/zfsimpl.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/boot/ (props changed) Modified: stable/9/sys/boot/zfs/zfsimpl.c ============================================================================== --- stable/9/sys/boot/zfs/zfsimpl.c Wed Oct 17 11:16:17 2012 (r241629) +++ stable/9/sys/boot/zfs/zfsimpl.c Wed Oct 17 11:24:06 2012 (r241630) @@ -64,6 +64,8 @@ static char *zfs_temp_buf, *zfs_temp_end #define TEMP_SIZE (1024 * 1024) static int zio_read(const spa_t *spa, const blkptr_t *bp, void *buf); +static int zfs_get_root(const spa_t *spa, uint64_t *objid); +static int zfs_rlookup(const spa_t *spa, uint64_t objnum, char *result); static void zfs_init(void) @@ -726,11 +728,20 @@ vdev_status(vdev_t *vdev, int indent) static void spa_status(spa_t *spa) { + static char bootfs[ZFS_MAXNAMELEN]; + uint64_t rootid; vdev_t *vdev; int good_kids, bad_kids, degraded_kids; vdev_state_t state; pager_printf(" pool: %s\n", spa->spa_name); + if (zfs_get_root(spa, &rootid) == 0 && + zfs_rlookup(spa, rootid, bootfs) == 0) { + if (bootfs[0] == '\0') + pager_printf("bootfs: %s\n", spa->spa_name); + else + pager_printf("bootfs: %s/%s\n", spa->spa_name, bootfs); + } pager_printf("config:\n\n"); pager_printf(STATUS_FORMAT, "NAME", "STATE"); From owner-svn-src-stable-9@FreeBSD.ORG Wed Oct 17 11:26:28 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 615C7EB0; Wed, 17 Oct 2012 11:26:28 +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 49EAA8FC0A; Wed, 17 Oct 2012 11:26:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9HBQSDK059497; Wed, 17 Oct 2012 11:26:28 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9HBQSwd059495; Wed, 17 Oct 2012 11:26:28 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210171126.q9HBQSwd059495@svn.freebsd.org> From: Andriy Gapon Date: Wed, 17 Oct 2012 11:26:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241632 - stable/9/lib/libkvm X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Oct 2012 11:26:28 -0000 Author: avg Date: Wed Oct 17 11:26:27 2012 New Revision: 241632 URL: http://svn.freebsd.org/changeset/base/241632 Log: MFC r241303: kvm_getprocs: gracefully handle errors from kvm_deadprocs Modified: stable/9/lib/libkvm/kvm_proc.c Directory Properties: stable/9/lib/libkvm/ (props changed) Modified: stable/9/lib/libkvm/kvm_proc.c ============================================================================== --- stable/9/lib/libkvm/kvm_proc.c Wed Oct 17 11:24:19 2012 (r241631) +++ stable/9/lib/libkvm/kvm_proc.c Wed Oct 17 11:26:27 2012 (r241632) @@ -593,9 +593,15 @@ liveout: nprocs = kvm_deadprocs(kd, op, arg, nl[1].n_value, nl[2].n_value, nprocs); + if (nprocs <= 0) { + _kvm_freeprocs(kd); + nprocs = 0; + } #ifdef notdef - size = nprocs * sizeof(struct kinfo_proc); - (void)realloc(kd->procbase, size); + else { + size = nprocs * sizeof(struct kinfo_proc); + kd->procbase = realloc(kd->procbase, size); + } #endif } *cnt = nprocs; From owner-svn-src-stable-9@FreeBSD.ORG Wed Oct 17 11:28:22 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 090211F2; Wed, 17 Oct 2012 11:28:22 +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 DAA1C8FC08; Wed, 17 Oct 2012 11:28:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9HBSLeT059879; Wed, 17 Oct 2012 11:28:21 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9HBSL1r059877; Wed, 17 Oct 2012 11:28:21 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210171128.q9HBSL1r059877@svn.freebsd.org> From: Andriy Gapon Date: Wed, 17 Oct 2012 11:28:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241634 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Oct 2012 11:28:22 -0000 Author: avg Date: Wed Oct 17 11:28:21 2012 New Revision: 241634 URL: http://svn.freebsd.org/changeset/base/241634 Log: MFC r240831: zfs: allow a zvol to be used as a pool vdev, again Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Wed Oct 17 11:26:48 2012 (r241633) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Wed Oct 17 11:28:21 2012 (r241634) @@ -874,27 +874,36 @@ zvol_open(struct g_provider *pp, int fla { zvol_state_t *zv; int err = 0; + boolean_t locked = B_FALSE; - if (MUTEX_HELD(&spa_namespace_lock)) { - /* - * If the spa_namespace_lock is being held, it means that ZFS - * is trying to open ZVOL as its VDEV. This is not supported. - */ - return (EOPNOTSUPP); + /* + * Protect against recursively entering spa_namespace_lock + * when spa_open() is used for a pool on a (local) ZVOL(s). + * This is needed since we replaced upstream zfsdev_state_lock + * with spa_namespace_lock in the ZVOL code. + * We are using the same trick as spa_open(). + * Note that calls in zvol_first_open which need to resolve + * pool name to a spa object will enter spa_open() + * recursively, but that function already has all the + * necessary protection. + */ + if (!MUTEX_HELD(&spa_namespace_lock)) { + mutex_enter(&spa_namespace_lock); + locked = B_TRUE; } - mutex_enter(&spa_namespace_lock); - zv = pp->private; if (zv == NULL) { - mutex_exit(&spa_namespace_lock); + if (locked) + mutex_exit(&spa_namespace_lock); return (ENXIO); } if (zv->zv_total_opens == 0) err = zvol_first_open(zv); if (err) { - mutex_exit(&spa_namespace_lock); + if (locked) + mutex_exit(&spa_namespace_lock); return (err); } if ((flag & FWRITE) && (zv->zv_flags & ZVOL_RDONLY)) { @@ -916,13 +925,15 @@ zvol_open(struct g_provider *pp, int fla #endif zv->zv_total_opens += count; - mutex_exit(&spa_namespace_lock); + if (locked) + mutex_exit(&spa_namespace_lock); return (err); out: if (zv->zv_total_opens == 0) zvol_last_close(zv); - mutex_exit(&spa_namespace_lock); + if (locked) + mutex_exit(&spa_namespace_lock); return (err); } @@ -932,12 +943,18 @@ zvol_close(struct g_provider *pp, int fl { zvol_state_t *zv; int error = 0; + boolean_t locked = B_FALSE; - mutex_enter(&spa_namespace_lock); + /* See comment in zvol_open(). */ + if (!MUTEX_HELD(&spa_namespace_lock)) { + mutex_enter(&spa_namespace_lock); + locked = B_TRUE; + } zv = pp->private; if (zv == NULL) { - mutex_exit(&spa_namespace_lock); + if (locked) + mutex_exit(&spa_namespace_lock); return (ENXIO); } @@ -960,7 +977,8 @@ zvol_close(struct g_provider *pp, int fl if (zv->zv_total_opens == 0) zvol_last_close(zv); - mutex_exit(&spa_namespace_lock); + if (locked) + mutex_exit(&spa_namespace_lock); return (error); } From owner-svn-src-stable-9@FreeBSD.ORG Wed Oct 17 11:30:14 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CBE3463E; Wed, 17 Oct 2012 11:30:14 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B385B8FC08; Wed, 17 Oct 2012 11:30:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9HBUEgw060363; Wed, 17 Oct 2012 11:30:14 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9HBUEt4060361; Wed, 17 Oct 2012 11:30:14 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210171130.q9HBUEt4060361@svn.freebsd.org> From: Andriy Gapon Date: Wed, 17 Oct 2012 11:30:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241637 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Oct 2012 11:30:14 -0000 Author: avg Date: Wed Oct 17 11:30:14 2012 New Revision: 241637 URL: http://svn.freebsd.org/changeset/base/241637 Log: MFC r241295: cngetc: use cpu_spinwait to ease the cncheckc loop a tiny bit Modified: stable/9/sys/kern/kern_cons.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_cons.c ============================================================================== --- stable/9/sys/kern/kern_cons.c Wed Oct 17 11:30:00 2012 (r241636) +++ stable/9/sys/kern/kern_cons.c Wed Oct 17 11:30:14 2012 (r241637) @@ -384,7 +384,7 @@ cngetc(void) if (cn_mute) return (-1); while ((c = cncheckc()) == -1) - ; + cpu_spinwait(); if (c == '\r') c = '\n'; /* console input is always ICRNL */ return (c); From owner-svn-src-stable-9@FreeBSD.ORG Wed Oct 17 11:33:32 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A0A93AB6; Wed, 17 Oct 2012 11:33:32 +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 876E38FC14; Wed, 17 Oct 2012 11:33:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9HBXWKK061045; Wed, 17 Oct 2012 11:33:32 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9HBXWAR061043; Wed, 17 Oct 2012 11:33:32 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210171133.q9HBXWAR061043@svn.freebsd.org> From: Andriy Gapon Date: Wed, 17 Oct 2012 11:33:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241639 - stable/9/lib/libprocstat X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Oct 2012 11:33:32 -0000 Author: avg Date: Wed Oct 17 11:33:32 2012 New Revision: 241639 URL: http://svn.freebsd.org/changeset/base/241639 Log: MFC r241304: procstat_getprocs: honor kvm_getprocs interface - cnt is signed Modified: stable/9/lib/libprocstat/libprocstat.c Directory Properties: stable/9/lib/libprocstat/ (props changed) Modified: stable/9/lib/libprocstat/libprocstat.c ============================================================================== --- stable/9/lib/libprocstat/libprocstat.c Wed Oct 17 11:30:25 2012 (r241638) +++ stable/9/lib/libprocstat/libprocstat.c Wed Oct 17 11:33:32 2012 (r241639) @@ -184,15 +184,18 @@ procstat_getprocs(struct procstat *procs struct kinfo_proc *p0, *p; size_t len; int name[4]; + int cnt; int error; assert(procstat); assert(count); p = NULL; if (procstat->type == PROCSTAT_KVM) { - p0 = kvm_getprocs(procstat->kd, what, arg, count); - if (p0 == NULL || count == 0) + *count = 0; + p0 = kvm_getprocs(procstat->kd, what, arg, &cnt); + if (p0 == NULL || cnt <= 0) return (NULL); + *count = cnt; len = *count * sizeof(*p); p = malloc(len); if (p == NULL) { From owner-svn-src-stable-9@FreeBSD.ORG Wed Oct 17 11:35:07 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9555EC78; Wed, 17 Oct 2012 11:35:07 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7CC708FC08; Wed, 17 Oct 2012 11:35:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9HBZ7MJ061367; Wed, 17 Oct 2012 11:35:07 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9HBZ7WF061365; Wed, 17 Oct 2012 11:35:07 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210171135.q9HBZ7WF061365@svn.freebsd.org> From: Andriy Gapon Date: Wed, 17 Oct 2012 11:35:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241640 - stable/9/sys/cam/ata X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Oct 2012 11:35:07 -0000 Author: avg Date: Wed Oct 17 11:35:06 2012 New Revision: 241640 URL: http://svn.freebsd.org/changeset/base/241640 Log: MFC r241305: ata_da: set disk::d_ident from serial number Modified: stable/9/sys/cam/ata/ata_da.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/ata/ata_da.c ============================================================================== --- stable/9/sys/cam/ata/ata_da.c Wed Oct 17 11:33:32 2012 (r241639) +++ stable/9/sys/cam/ata/ata_da.c Wed Oct 17 11:35:06 2012 (r241640) @@ -1064,6 +1064,8 @@ adaregister(struct cam_periph *periph, v softc->disk->d_flags |= DISKFLAG_CANDELETE; strlcpy(softc->disk->d_descr, cgd->ident_data.model, MIN(sizeof(softc->disk->d_descr), sizeof(cgd->ident_data.model))); + strlcpy(softc->disk->d_ident, cgd->ident_data.serial, + MIN(sizeof(softc->disk->d_ident), sizeof(cgd->ident_data.serial))); softc->disk->d_hba_vendor = cpi.hba_vendor; softc->disk->d_hba_device = cpi.hba_device; softc->disk->d_hba_subvendor = cpi.hba_subvendor; From owner-svn-src-stable-9@FreeBSD.ORG Thu Oct 18 01:12:16 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 20E1DF0E; Thu, 18 Oct 2012 01:12:16 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 096DB8FC12; Thu, 18 Oct 2012 01:12:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9I1CFv7007042; Thu, 18 Oct 2012 01:12:15 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9I1CFlc007040; Thu, 18 Oct 2012 01:12:15 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210180112.q9I1CFlc007040@svn.freebsd.org> From: Eitan Adler Date: Thu, 18 Oct 2012 01:12:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241667 - stable/9/sys/cam/scsi X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Oct 2012 01:12:16 -0000 Author: eadler Date: Thu Oct 18 01:12:15 2012 New Revision: 241667 URL: http://svn.freebsd.org/changeset/base/241667 Log: MFC r241580: Add support for the USB DISK Pro PMAP. This patch has sit for 6 years in the PR database. PR: usb/96381 Approved by: cperciva (implicit) Modified: stable/9/sys/cam/scsi/scsi_da.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_da.c Thu Oct 18 01:12:15 2012 (r241666) +++ stable/9/sys/cam/scsi/scsi_da.c Thu Oct 18 01:12:15 2012 (r241667) @@ -381,6 +381,15 @@ static struct da_quirk_entry da_quirk_ta }, { /* + * USB DISK Pro PMAP + * Reported by: jhs + * PR: usb/96381 + */ + {T_DIRECT, SIP_MEDIA_REMOVABLE, " ", "USB DISK Pro", "PMAP"}, + /*quirks*/ DA_Q_NO_SYNC_CACHE + }, + { + /* * Motorola E398 Mobile Phone (TransFlash memory card). * Reported by: Wojciech A. Koszek * PR: usb/89889 From owner-svn-src-stable-9@FreeBSD.ORG Thu Oct 18 01:14:23 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 307C43DC; Thu, 18 Oct 2012 01:14:23 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 17D888FC16; Thu, 18 Oct 2012 01:14:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9I1EM1g007514; Thu, 18 Oct 2012 01:14:22 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9I1EMxE007510; Thu, 18 Oct 2012 01:14:22 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210180114.q9I1EMxE007510@svn.freebsd.org> From: Eitan Adler Date: Thu, 18 Oct 2012 01:14:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241671 - stable/9/sbin/mount X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Oct 2012 01:14:23 -0000 Author: eadler Date: Thu Oct 18 01:14:22 2012 New Revision: 241671 URL: http://svn.freebsd.org/changeset/base/241671 Log: MFC r241581: Fix minor nits: use a comma after "i.e." sentences begin on new lines. No .Dd bump for trivial modification. Approved by: cperciva (implicit) Modified: stable/9/sbin/mount/getmntopts.3 stable/9/sbin/mount/mount.8 Directory Properties: stable/9/sbin/mount/ (props changed) Modified: stable/9/sbin/mount/getmntopts.3 ============================================================================== --- stable/9/sbin/mount/getmntopts.3 Thu Oct 18 01:14:22 2012 (r241670) +++ stable/9/sbin/mount/getmntopts.3 Thu Oct 18 01:14:22 2012 (r241671) @@ -70,8 +70,8 @@ has the following format: .Bd -literal struct mntopt { char *m_option; /* option name */ - int m_inverse; /* is this a negative option, e.g. "dev" */ - int m_flag; /* bit to set, e.g. MNT_RDONLY */ + int m_inverse; /* is this a negative option, e.g., "dev" */ + int m_flag; /* bit to set, e.g., MNT_RDONLY */ int m_altloc; /* non-zero to use altflagp rather than flagp */ }; .Ed Modified: stable/9/sbin/mount/mount.8 ============================================================================== --- stable/9/sbin/mount/mount.8 Thu Oct 18 01:14:22 2012 (r241670) +++ stable/9/sbin/mount/mount.8 Thu Oct 18 01:14:22 2012 (r241671) @@ -176,7 +176,8 @@ Force .Nm to use the specified program to mount the file system, instead of calling .Xr nmount 2 -directly. For example: +directly. +For example: .Bd -literal mount -t foofs -o mountprog=/mydir/fooprog /dev/acd0 /mnt .Ed From owner-svn-src-stable-9@FreeBSD.ORG Thu Oct 18 12:06:27 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 383AE486; Thu, 18 Oct 2012 12:06:27 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1DAF28FC12; Thu, 18 Oct 2012 12:06:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9IC6QXV029889; Thu, 18 Oct 2012 12:06:26 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9IC6Qbc029881; Thu, 18 Oct 2012 12:06:26 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201210181206.q9IC6Qbc029881@svn.freebsd.org> From: Marius Strobl Date: Thu, 18 Oct 2012 12:06:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241681 - in stable/9/sys: dev/esp kern sparc64/include sparc64/sparc64 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Oct 2012 12:06:27 -0000 Author: marius Date: Thu Oct 18 12:06:26 2012 New Revision: 241681 URL: http://svn.freebsd.org/changeset/base/241681 Log: MFC: r239864 - Unlike cache invalidation and TLB demapping IPIs, reading registers from other CPUs doesn't require locking so get rid of it. As the latter is used for the timecounter on certain machine models, using a spin lock in this case can lead to a deadlock with the upcoming callout(9) rework. - Merge r134227/r167250 from x86: Avoid cross-IPI SMP deadlock by using the smp_ipi_mtx spin lock not only for smp_rendezvous_cpus() but also for the MD cache invalidation and TLB demapping IPIs. - Mark some unused function arguments as such. Modified: stable/9/sys/dev/esp/ncr53c9x.c stable/9/sys/kern/subr_witness.c stable/9/sys/sparc64/include/smp.h stable/9/sys/sparc64/sparc64/mp_machdep.c stable/9/sys/sparc64/sparc64/tick.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) stable/9/sys/dev/isp/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) stable/9/sys/dev/puc/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/dev/esp/ncr53c9x.c ============================================================================== --- stable/9/sys/dev/esp/ncr53c9x.c Thu Oct 18 12:04:56 2012 (r241680) +++ stable/9/sys/dev/esp/ncr53c9x.c Thu Oct 18 12:06:26 2012 (r241681) @@ -26,7 +26,7 @@ * */ -/* $NetBSD: ncr53c9x.c,v 1.143 2011/07/31 18:39:00 jakllsch Exp $ */ +/* $NetBSD: ncr53c9x.c,v 1.145 2012/06/18 21:23:56 martin Exp $ */ /*- * Copyright (c) 1998, 2002 The NetBSD Foundation, Inc. @@ -256,7 +256,7 @@ ncr53c9x_attach(struct ncr53c9x_softc *s return (EINVAL); } - device_printf(sc->sc_dev, "%s, %dMHz, SCSI ID %d\n", + device_printf(sc->sc_dev, "%s, %d MHz, SCSI ID %d\n", ncr53c9x_variant_names[sc->sc_rev], sc->sc_freq, sc->sc_id); sc->sc_ntarg = (sc->sc_rev == NCR_VARIANT_FAS366) ? 16 : 8; @@ -890,11 +890,8 @@ ncr53c9x_select(struct ncr53c9x_softc *s sc->sc_cmdp = cmd; error = NCRDMA_SETUP(sc, &sc->sc_cmdp, &sc->sc_cmdlen, 0, &dmasize); - if (error != 0) { - sc->sc_cmdlen = 0; - sc->sc_cmdp = NULL; + if (error != 0) goto cmd; - } /* Program the SCSI counter. */ NCR_SET_COUNT(sc, dmasize); @@ -920,6 +917,7 @@ cmd: */ /* Now get the command into the FIFO. */ + sc->sc_cmdlen = 0; ncr53c9x_wrfifo(sc, cmd, clen); /* And get the target's attention. */ @@ -1771,7 +1769,7 @@ ncr53c9x_msgin(struct ncr53c9x_softc *sc struct ncr53c9x_linfo *li; struct ncr53c9x_tinfo *ti; uint8_t *pb; - int lun, plen; + int len, lun; NCR_LOCK_ASSERT(sc, MA_OWNED); @@ -1818,15 +1816,15 @@ ncr53c9x_msgin(struct ncr53c9x_softc *sc */ case NCR_RESELECTED: pb = sc->sc_imess + 1; - plen = sc->sc_imlen - 1; + len = sc->sc_imlen - 1; break; default: pb = sc->sc_imess; - plen = sc->sc_imlen; + len = sc->sc_imlen; } - if (__verify_msg_format(pb, plen)) + if (__verify_msg_format(pb, len)) goto gotit; } @@ -1963,6 +1961,29 @@ gotit: sc->sc_dleft = ecb->dleft; break; + case MSG_IGN_WIDE_RESIDUE: + NCR_MSGS(("ignore wide residue (%d bytes)", + sc->sc_imess[1])); + if (sc->sc_imess[1] != 1) { + xpt_print_path(ecb->ccb->ccb_h.path); + printf("unexpected MESSAGE IGNORE WIDE " + "RESIDUE (%d bytes); sending REJECT\n", + sc->sc_imess[1]); + goto reject; + } + /* + * If there was a last transfer of an even number of + * bytes, wipe the "done" memory and adjust by one + * byte (sc->sc_imess[1]). + */ + len = sc->sc_dleft - ecb->dleft; + if (len != 0 && (len & 1) == 0) { + ecb->flags &= ~ECB_TENTATIVE_DONE; + sc->sc_dp = (char *)sc->sc_dp - 1; + sc->sc_dleft--; + } + break; + case MSG_EXTENDED: NCR_MSGS(("extended(%x) ", sc->sc_imess[2])); switch (sc->sc_imess[2]) { @@ -2272,6 +2293,7 @@ cmd: /* * XXX FIFO size */ + sc->sc_cmdlen = 0; ncr53c9x_flushfifo(sc); ncr53c9x_wrfifo(sc, sc->sc_omp, sc->sc_omlen); NCRCMD(sc, NCRCMD_TRANS); @@ -2811,9 +2833,10 @@ again: * (Timing problems?) */ if (sc->sc_features & NCR_F_DMASELECT) { - if (sc->sc_cmdlen == 0) + if (sc->sc_cmdlen == 0) { /* Hope for the best... */ break; + } } else if ((NCR_READ_REG(sc, NCR_FFLAG) & NCRFIFO_FF) == 0) { /* Hope for the best... */ @@ -2986,11 +3009,8 @@ msgin: sc->sc_cmdp = (void *)&ecb->cmd.cmd; error = NCRDMA_SETUP(sc, &sc->sc_cmdp, &sc->sc_cmdlen, 0, &size); - if (error != 0) { - sc->sc_cmdlen = 0; - sc->sc_cmdp = NULL; + if (error != 0) goto cmd; - } /* Program the SCSI counter. */ NCR_SET_COUNT(sc, size); @@ -3005,6 +3025,7 @@ msgin: break; } cmd: + sc->sc_cmdlen = 0; ncr53c9x_wrfifo(sc, (uint8_t *)&ecb->cmd.cmd, ecb->clen); NCRCMD(sc, NCRCMD_TRANS); sc->sc_prevphase = COMMAND_PHASE; @@ -3046,7 +3067,7 @@ setup_xfer: goto finish; } - /* Target returned to data phase: wipe "done" memory */ + /* Target returned to data phase: wipe "done" memory. */ ecb->flags &= ~ECB_TENTATIVE_DONE; /* Program the SCSI counter. */ @@ -3105,8 +3126,8 @@ shortcut: * overhead to pay. For example, selecting, sending a message * and command and then doing some work can be done in one "pass". * - * The delay is a heuristic. It is 2 when at 20MHz, 2 at 25MHz and 1 - * at 40MHz. This needs testing. + * The delay is a heuristic. It is 2 when at 20 MHz, 2 at 25 MHz and + * 1 at 40 MHz. This needs testing. */ microtime(&wait); wait.tv_usec += 50 / sc->sc_freq; @@ -3191,8 +3212,7 @@ ncr53c9x_callout(void *arg) ncr53c9x_abort(sc, ecb); /* Disable sync mode if stuck in a data phase. */ - if (ecb == sc->sc_nexus && - ti->curr.offset != 0 && + if (ecb == sc->sc_nexus && ti->curr.offset != 0 && (sc->sc_phase & (MSGI | CDI)) == 0) { /* XXX ASYNC CALLBACK! */ ti->goal.offset = 0; Modified: stable/9/sys/kern/subr_witness.c ============================================================================== --- stable/9/sys/kern/subr_witness.c Thu Oct 18 12:04:56 2012 (r241680) +++ stable/9/sys/kern/subr_witness.c Thu Oct 18 12:06:26 2012 (r241681) @@ -668,9 +668,6 @@ static struct witness_order_list_entry o */ { "intrcnt", &lock_class_mtx_spin }, { "icu", &lock_class_mtx_spin }, -#if defined(SMP) && defined(__sparc64__) - { "ipi", &lock_class_mtx_spin }, -#endif #ifdef __i386__ { "allpmaps", &lock_class_mtx_spin }, { "descriptor tables", &lock_class_mtx_spin }, Modified: stable/9/sys/sparc64/include/smp.h ============================================================================== --- stable/9/sys/sparc64/include/smp.h Thu Oct 18 12:04:56 2012 (r241680) +++ stable/9/sys/sparc64/include/smp.h Thu Oct 18 12:06:26 2012 (r241681) @@ -109,7 +109,6 @@ extern cpu_ipi_single_t *cpu_ipi_single; void mp_init(u_int cpu_impl); -extern struct mtx ipi_mtx; extern struct ipi_cache_args ipi_cache_args; extern struct ipi_rd_args ipi_rd_args; extern struct ipi_tlb_args ipi_tlb_args; @@ -169,7 +168,7 @@ ipi_dcache_page_inval(void *func, vm_pad return (NULL); sched_pin(); ica = &ipi_cache_args; - mtx_lock_spin(&ipi_mtx); + mtx_lock_spin(&smp_ipi_mtx); ica->ica_mask = all_cpus; CPU_CLR(PCPU_GET(cpuid), &ica->ica_mask); ica->ica_pa = pa; @@ -186,7 +185,7 @@ ipi_icache_page_inval(void *func, vm_pad return (NULL); sched_pin(); ica = &ipi_cache_args; - mtx_lock_spin(&ipi_mtx); + mtx_lock_spin(&smp_ipi_mtx); ica->ica_mask = all_cpus; CPU_CLR(PCPU_GET(cpuid), &ica->ica_mask); ica->ica_pa = pa; @@ -203,7 +202,6 @@ ipi_rd(u_int cpu, void *func, u_long *va return (NULL); sched_pin(); ira = &ipi_rd_args; - mtx_lock_spin(&ipi_mtx); CPU_SETOF(cpu, &ira->ira_mask); ira->ira_val = val; cpu_ipi_single(cpu, 0, (u_long)func, (u_long)ira); @@ -227,7 +225,7 @@ ipi_tlb_context_demap(struct pmap *pm) return (NULL); } ita = &ipi_tlb_args; - mtx_lock_spin(&ipi_mtx); + mtx_lock_spin(&smp_ipi_mtx); ita->ita_mask = cpus; ita->ita_pmap = pm; cpu_ipi_selected(cpus, 0, (u_long)tl_ipi_tlb_context_demap, @@ -252,7 +250,7 @@ ipi_tlb_page_demap(struct pmap *pm, vm_o return (NULL); } ita = &ipi_tlb_args; - mtx_lock_spin(&ipi_mtx); + mtx_lock_spin(&smp_ipi_mtx); ita->ita_mask = cpus; ita->ita_pmap = pm; ita->ita_va = va; @@ -277,7 +275,7 @@ ipi_tlb_range_demap(struct pmap *pm, vm_ return (NULL); } ita = &ipi_tlb_args; - mtx_lock_spin(&ipi_mtx); + mtx_lock_spin(&smp_ipi_mtx); ita->ita_mask = cpus; ita->ita_pmap = pm; ita->ita_start = start; @@ -295,7 +293,19 @@ ipi_wait(void *cookie) if ((mask = cookie) != NULL) { while (!CPU_EMPTY(mask)) ; - mtx_unlock_spin(&ipi_mtx); + mtx_unlock_spin(&smp_ipi_mtx); + sched_unpin(); + } +} + +static __inline void +ipi_wait_unlocked(void *cookie) +{ + volatile cpuset_t *mask; + + if ((mask = cookie) != NULL) { + while (!CPU_EMPTY(mask)) + ; sched_unpin(); } } @@ -352,7 +362,13 @@ ipi_tlb_range_demap(struct pmap *pm __un } static __inline void -ipi_wait(void *cookie) +ipi_wait(void *cookie __unused) +{ + +} + +static __inline void +ipi_wait_unlocked(void *cookie __unused) { } Modified: stable/9/sys/sparc64/sparc64/mp_machdep.c ============================================================================== --- stable/9/sys/sparc64/sparc64/mp_machdep.c Thu Oct 18 12:04:56 2012 (r241680) +++ stable/9/sys/sparc64/sparc64/mp_machdep.c Thu Oct 18 12:06:26 2012 (r241681) @@ -113,8 +113,6 @@ struct ipi_rd_args ipi_rd_args; struct ipi_tlb_args ipi_tlb_args; struct pcb stoppcbs[MAXCPU]; -struct mtx ipi_mtx; - cpu_ipi_selected_t *cpu_ipi_selected; cpu_ipi_single_t *cpu_ipi_single; @@ -280,8 +278,6 @@ void cpu_mp_start(void) { - mtx_init(&ipi_mtx, "ipi", NULL, MTX_SPIN); - intr_setup(PIL_AST, cpu_ipi_ast, -1, NULL, NULL); intr_setup(PIL_RENDEZVOUS, (ih_func_t *)smp_rendezvous_action, -1, NULL, NULL); @@ -503,13 +499,13 @@ cpu_mp_shutdown(void) } static void -cpu_ipi_ast(struct trapframe *tf) +cpu_ipi_ast(struct trapframe *tf __unused) { } static void -cpu_ipi_stop(struct trapframe *tf) +cpu_ipi_stop(struct trapframe *tf __unused) { u_int cpuid; Modified: stable/9/sys/sparc64/sparc64/tick.c ============================================================================== --- stable/9/sys/sparc64/sparc64/tick.c Thu Oct 18 12:04:56 2012 (r241680) +++ stable/9/sys/sparc64/sparc64/tick.c Thu Oct 18 12:06:26 2012 (r241681) @@ -332,7 +332,7 @@ stick_get_timecount_mp(struct timecounte if (curcpu == 0) stick = rdstick(); else - ipi_wait(ipi_rd(0, tl_ipi_stick_rd, &stick)); + ipi_wait_unlocked(ipi_rd(0, tl_ipi_stick_rd, &stick)); sched_unpin(); return (stick); } @@ -346,7 +346,7 @@ tick_get_timecount_mp(struct timecounter if (curcpu == 0) tick = rd(tick); else - ipi_wait(ipi_rd(0, tl_ipi_tick_rd, &tick)); + ipi_wait_unlocked(ipi_rd(0, tl_ipi_tick_rd, &tick)); sched_unpin(); return (tick); } From owner-svn-src-stable-9@FreeBSD.ORG Thu Oct 18 12:22:13 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8C432E32; Thu, 18 Oct 2012 12:22:13 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6A6008FC1A; Thu, 18 Oct 2012 12:22:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9ICMDuQ032974; Thu, 18 Oct 2012 12:22:13 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9ICMDBn032972; Thu, 18 Oct 2012 12:22:13 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201210181222.q9ICMDBn032972@svn.freebsd.org> From: Marius Strobl Date: Thu, 18 Oct 2012 12:22:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241683 - stable/9/sys/dev/esp X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Oct 2012 12:22:13 -0000 Author: marius Date: Thu Oct 18 12:22:12 2012 New Revision: 241683 URL: http://svn.freebsd.org/changeset/base/241683 Log: Revert unintended part of r241681. Modified: stable/9/sys/dev/esp/ncr53c9x.c Modified: stable/9/sys/dev/esp/ncr53c9x.c ============================================================================== --- stable/9/sys/dev/esp/ncr53c9x.c Thu Oct 18 12:11:13 2012 (r241682) +++ stable/9/sys/dev/esp/ncr53c9x.c Thu Oct 18 12:22:12 2012 (r241683) @@ -26,7 +26,7 @@ * */ -/* $NetBSD: ncr53c9x.c,v 1.145 2012/06/18 21:23:56 martin Exp $ */ +/* $NetBSD: ncr53c9x.c,v 1.143 2011/07/31 18:39:00 jakllsch Exp $ */ /*- * Copyright (c) 1998, 2002 The NetBSD Foundation, Inc. @@ -256,7 +256,7 @@ ncr53c9x_attach(struct ncr53c9x_softc *s return (EINVAL); } - device_printf(sc->sc_dev, "%s, %d MHz, SCSI ID %d\n", + device_printf(sc->sc_dev, "%s, %dMHz, SCSI ID %d\n", ncr53c9x_variant_names[sc->sc_rev], sc->sc_freq, sc->sc_id); sc->sc_ntarg = (sc->sc_rev == NCR_VARIANT_FAS366) ? 16 : 8; @@ -890,8 +890,11 @@ ncr53c9x_select(struct ncr53c9x_softc *s sc->sc_cmdp = cmd; error = NCRDMA_SETUP(sc, &sc->sc_cmdp, &sc->sc_cmdlen, 0, &dmasize); - if (error != 0) + if (error != 0) { + sc->sc_cmdlen = 0; + sc->sc_cmdp = NULL; goto cmd; + } /* Program the SCSI counter. */ NCR_SET_COUNT(sc, dmasize); @@ -917,7 +920,6 @@ cmd: */ /* Now get the command into the FIFO. */ - sc->sc_cmdlen = 0; ncr53c9x_wrfifo(sc, cmd, clen); /* And get the target's attention. */ @@ -1769,7 +1771,7 @@ ncr53c9x_msgin(struct ncr53c9x_softc *sc struct ncr53c9x_linfo *li; struct ncr53c9x_tinfo *ti; uint8_t *pb; - int len, lun; + int lun, plen; NCR_LOCK_ASSERT(sc, MA_OWNED); @@ -1816,15 +1818,15 @@ ncr53c9x_msgin(struct ncr53c9x_softc *sc */ case NCR_RESELECTED: pb = sc->sc_imess + 1; - len = sc->sc_imlen - 1; + plen = sc->sc_imlen - 1; break; default: pb = sc->sc_imess; - len = sc->sc_imlen; + plen = sc->sc_imlen; } - if (__verify_msg_format(pb, len)) + if (__verify_msg_format(pb, plen)) goto gotit; } @@ -1961,29 +1963,6 @@ gotit: sc->sc_dleft = ecb->dleft; break; - case MSG_IGN_WIDE_RESIDUE: - NCR_MSGS(("ignore wide residue (%d bytes)", - sc->sc_imess[1])); - if (sc->sc_imess[1] != 1) { - xpt_print_path(ecb->ccb->ccb_h.path); - printf("unexpected MESSAGE IGNORE WIDE " - "RESIDUE (%d bytes); sending REJECT\n", - sc->sc_imess[1]); - goto reject; - } - /* - * If there was a last transfer of an even number of - * bytes, wipe the "done" memory and adjust by one - * byte (sc->sc_imess[1]). - */ - len = sc->sc_dleft - ecb->dleft; - if (len != 0 && (len & 1) == 0) { - ecb->flags &= ~ECB_TENTATIVE_DONE; - sc->sc_dp = (char *)sc->sc_dp - 1; - sc->sc_dleft--; - } - break; - case MSG_EXTENDED: NCR_MSGS(("extended(%x) ", sc->sc_imess[2])); switch (sc->sc_imess[2]) { @@ -2293,7 +2272,6 @@ cmd: /* * XXX FIFO size */ - sc->sc_cmdlen = 0; ncr53c9x_flushfifo(sc); ncr53c9x_wrfifo(sc, sc->sc_omp, sc->sc_omlen); NCRCMD(sc, NCRCMD_TRANS); @@ -2833,10 +2811,9 @@ again: * (Timing problems?) */ if (sc->sc_features & NCR_F_DMASELECT) { - if (sc->sc_cmdlen == 0) { + if (sc->sc_cmdlen == 0) /* Hope for the best... */ break; - } } else if ((NCR_READ_REG(sc, NCR_FFLAG) & NCRFIFO_FF) == 0) { /* Hope for the best... */ @@ -3009,8 +2986,11 @@ msgin: sc->sc_cmdp = (void *)&ecb->cmd.cmd; error = NCRDMA_SETUP(sc, &sc->sc_cmdp, &sc->sc_cmdlen, 0, &size); - if (error != 0) + if (error != 0) { + sc->sc_cmdlen = 0; + sc->sc_cmdp = NULL; goto cmd; + } /* Program the SCSI counter. */ NCR_SET_COUNT(sc, size); @@ -3025,7 +3005,6 @@ msgin: break; } cmd: - sc->sc_cmdlen = 0; ncr53c9x_wrfifo(sc, (uint8_t *)&ecb->cmd.cmd, ecb->clen); NCRCMD(sc, NCRCMD_TRANS); sc->sc_prevphase = COMMAND_PHASE; @@ -3067,7 +3046,7 @@ setup_xfer: goto finish; } - /* Target returned to data phase: wipe "done" memory. */ + /* Target returned to data phase: wipe "done" memory */ ecb->flags &= ~ECB_TENTATIVE_DONE; /* Program the SCSI counter. */ @@ -3126,8 +3105,8 @@ shortcut: * overhead to pay. For example, selecting, sending a message * and command and then doing some work can be done in one "pass". * - * The delay is a heuristic. It is 2 when at 20 MHz, 2 at 25 MHz and - * 1 at 40 MHz. This needs testing. + * The delay is a heuristic. It is 2 when at 20MHz, 2 at 25MHz and 1 + * at 40MHz. This needs testing. */ microtime(&wait); wait.tv_usec += 50 / sc->sc_freq; @@ -3212,7 +3191,8 @@ ncr53c9x_callout(void *arg) ncr53c9x_abort(sc, ecb); /* Disable sync mode if stuck in a data phase. */ - if (ecb == sc->sc_nexus && ti->curr.offset != 0 && + if (ecb == sc->sc_nexus && + ti->curr.offset != 0 && (sc->sc_phase & (MSGI | CDI)) == 0) { /* XXX ASYNC CALLBACK! */ ti->goal.offset = 0; From owner-svn-src-stable-9@FreeBSD.ORG Thu Oct 18 15:20:38 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 12481DB0; Thu, 18 Oct 2012 15:20:38 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E3E588FC12; Thu, 18 Oct 2012 15:20:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9IFKbSB065292; Thu, 18 Oct 2012 15:20:37 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9IFKbPt065290; Thu, 18 Oct 2012 15:20:37 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201210181520.q9IFKbPt065290@svn.freebsd.org> From: Marius Strobl Date: Thu, 18 Oct 2012 15:20:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241692 - stable/9/sys/dev/esp X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Oct 2012 15:20:38 -0000 Author: marius Date: Thu Oct 18 15:20:37 2012 New Revision: 241692 URL: http://svn.freebsd.org/changeset/base/241692 Log: MFC: r239089 - Merge from NetBSD: When issuing a non-DMA command, make sure to set the "remaining length of command to be transferred via DMA" (sc_cmdlen) to zero up-front, otherwise we might get confused on command competition interrupt (no DMA active but still data left to transfer). - Implement handling of MSG_IGN_WIDE_RESIDUE which some targets produce, as just rejecting these leads to a resend and disconnect loop. Reported and tested by: mjacob Modified: stable/9/sys/dev/esp/ncr53c9x.c Modified: stable/9/sys/dev/esp/ncr53c9x.c ============================================================================== --- stable/9/sys/dev/esp/ncr53c9x.c Thu Oct 18 15:14:13 2012 (r241691) +++ stable/9/sys/dev/esp/ncr53c9x.c Thu Oct 18 15:20:37 2012 (r241692) @@ -26,7 +26,7 @@ * */ -/* $NetBSD: ncr53c9x.c,v 1.143 2011/07/31 18:39:00 jakllsch Exp $ */ +/* $NetBSD: ncr53c9x.c,v 1.145 2012/06/18 21:23:56 martin Exp $ */ /*- * Copyright (c) 1998, 2002 The NetBSD Foundation, Inc. @@ -256,7 +256,7 @@ ncr53c9x_attach(struct ncr53c9x_softc *s return (EINVAL); } - device_printf(sc->sc_dev, "%s, %dMHz, SCSI ID %d\n", + device_printf(sc->sc_dev, "%s, %d MHz, SCSI ID %d\n", ncr53c9x_variant_names[sc->sc_rev], sc->sc_freq, sc->sc_id); sc->sc_ntarg = (sc->sc_rev == NCR_VARIANT_FAS366) ? 16 : 8; @@ -890,11 +890,8 @@ ncr53c9x_select(struct ncr53c9x_softc *s sc->sc_cmdp = cmd; error = NCRDMA_SETUP(sc, &sc->sc_cmdp, &sc->sc_cmdlen, 0, &dmasize); - if (error != 0) { - sc->sc_cmdlen = 0; - sc->sc_cmdp = NULL; + if (error != 0) goto cmd; - } /* Program the SCSI counter. */ NCR_SET_COUNT(sc, dmasize); @@ -920,6 +917,7 @@ cmd: */ /* Now get the command into the FIFO. */ + sc->sc_cmdlen = 0; ncr53c9x_wrfifo(sc, cmd, clen); /* And get the target's attention. */ @@ -1771,7 +1769,7 @@ ncr53c9x_msgin(struct ncr53c9x_softc *sc struct ncr53c9x_linfo *li; struct ncr53c9x_tinfo *ti; uint8_t *pb; - int lun, plen; + int len, lun; NCR_LOCK_ASSERT(sc, MA_OWNED); @@ -1818,15 +1816,15 @@ ncr53c9x_msgin(struct ncr53c9x_softc *sc */ case NCR_RESELECTED: pb = sc->sc_imess + 1; - plen = sc->sc_imlen - 1; + len = sc->sc_imlen - 1; break; default: pb = sc->sc_imess; - plen = sc->sc_imlen; + len = sc->sc_imlen; } - if (__verify_msg_format(pb, plen)) + if (__verify_msg_format(pb, len)) goto gotit; } @@ -1963,6 +1961,29 @@ gotit: sc->sc_dleft = ecb->dleft; break; + case MSG_IGN_WIDE_RESIDUE: + NCR_MSGS(("ignore wide residue (%d bytes)", + sc->sc_imess[1])); + if (sc->sc_imess[1] != 1) { + xpt_print_path(ecb->ccb->ccb_h.path); + printf("unexpected MESSAGE IGNORE WIDE " + "RESIDUE (%d bytes); sending REJECT\n", + sc->sc_imess[1]); + goto reject; + } + /* + * If there was a last transfer of an even number of + * bytes, wipe the "done" memory and adjust by one + * byte (sc->sc_imess[1]). + */ + len = sc->sc_dleft - ecb->dleft; + if (len != 0 && (len & 1) == 0) { + ecb->flags &= ~ECB_TENTATIVE_DONE; + sc->sc_dp = (char *)sc->sc_dp - 1; + sc->sc_dleft--; + } + break; + case MSG_EXTENDED: NCR_MSGS(("extended(%x) ", sc->sc_imess[2])); switch (sc->sc_imess[2]) { @@ -2272,6 +2293,7 @@ cmd: /* * XXX FIFO size */ + sc->sc_cmdlen = 0; ncr53c9x_flushfifo(sc); ncr53c9x_wrfifo(sc, sc->sc_omp, sc->sc_omlen); NCRCMD(sc, NCRCMD_TRANS); @@ -2811,9 +2833,10 @@ again: * (Timing problems?) */ if (sc->sc_features & NCR_F_DMASELECT) { - if (sc->sc_cmdlen == 0) + if (sc->sc_cmdlen == 0) { /* Hope for the best... */ break; + } } else if ((NCR_READ_REG(sc, NCR_FFLAG) & NCRFIFO_FF) == 0) { /* Hope for the best... */ @@ -2986,11 +3009,8 @@ msgin: sc->sc_cmdp = (void *)&ecb->cmd.cmd; error = NCRDMA_SETUP(sc, &sc->sc_cmdp, &sc->sc_cmdlen, 0, &size); - if (error != 0) { - sc->sc_cmdlen = 0; - sc->sc_cmdp = NULL; + if (error != 0) goto cmd; - } /* Program the SCSI counter. */ NCR_SET_COUNT(sc, size); @@ -3005,6 +3025,7 @@ msgin: break; } cmd: + sc->sc_cmdlen = 0; ncr53c9x_wrfifo(sc, (uint8_t *)&ecb->cmd.cmd, ecb->clen); NCRCMD(sc, NCRCMD_TRANS); sc->sc_prevphase = COMMAND_PHASE; @@ -3046,7 +3067,7 @@ setup_xfer: goto finish; } - /* Target returned to data phase: wipe "done" memory */ + /* Target returned to data phase: wipe "done" memory. */ ecb->flags &= ~ECB_TENTATIVE_DONE; /* Program the SCSI counter. */ @@ -3105,8 +3126,8 @@ shortcut: * overhead to pay. For example, selecting, sending a message * and command and then doing some work can be done in one "pass". * - * The delay is a heuristic. It is 2 when at 20MHz, 2 at 25MHz and 1 - * at 40MHz. This needs testing. + * The delay is a heuristic. It is 2 when at 20 MHz, 2 at 25 MHz and + * 1 at 40 MHz. This needs testing. */ microtime(&wait); wait.tv_usec += 50 / sc->sc_freq; @@ -3191,8 +3212,7 @@ ncr53c9x_callout(void *arg) ncr53c9x_abort(sc, ecb); /* Disable sync mode if stuck in a data phase. */ - if (ecb == sc->sc_nexus && - ti->curr.offset != 0 && + if (ecb == sc->sc_nexus && ti->curr.offset != 0 && (sc->sc_phase & (MSGI | CDI)) == 0) { /* XXX ASYNC CALLBACK! */ ti->goal.offset = 0; From owner-svn-src-stable-9@FreeBSD.ORG Thu Oct 18 15:24:43 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D1F6DC1; Thu, 18 Oct 2012 15:24:43 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B7E9B8FC14; Thu, 18 Oct 2012 15:24:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9IFOhm0066158; Thu, 18 Oct 2012 15:24:43 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9IFOh6Z066153; Thu, 18 Oct 2012 15:24:43 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201210181524.q9IFOh6Z066153@svn.freebsd.org> From: Marius Strobl Date: Thu, 18 Oct 2012 15:24:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241693 - in stable/9/sys/sparc64: include pci sparc64 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Oct 2012 15:24:43 -0000 Author: marius Date: Thu Oct 18 15:24:43 2012 New Revision: 241693 URL: http://svn.freebsd.org/changeset/base/241693 Log: MFC: r239941 Add a global MD macro for the VIS block size instead of duplicating it and using magic values all over the place. Modified: stable/9/sys/sparc64/include/fsr.h stable/9/sys/sparc64/pci/fire.c stable/9/sys/sparc64/pci/schizo.c stable/9/sys/sparc64/sparc64/support.S Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/sparc64/include/fsr.h ============================================================================== --- stable/9/sys/sparc64/include/fsr.h Thu Oct 18 15:20:37 2012 (r241692) +++ stable/9/sys/sparc64/include/fsr.h Thu Oct 18 15:24:43 2012 (r241693) @@ -31,6 +31,8 @@ #define FPRS_DU (1 << 1) #define FPRS_FEF (1 << 2) +#define VIS_BLOCKSIZE 64 + #ifndef LOCORE #define FSR_EXC_BITS 5 Modified: stable/9/sys/sparc64/pci/fire.c ============================================================================== --- stable/9/sys/sparc64/pci/fire.c Thu Oct 18 15:20:37 2012 (r241692) +++ stable/9/sys/sparc64/pci/fire.c Thu Oct 18 15:24:43 2012 (r241693) @@ -1503,8 +1503,6 @@ fire_read_ivar(device_t dev, device_t ch return (ENOENT); } -#define VIS_BLOCKSIZE 64 - static void fire_dmamap_sync(bus_dma_tag_t dt __unused, bus_dmamap_t map, bus_dmasync_op_t op) Modified: stable/9/sys/sparc64/pci/schizo.c ============================================================================== --- stable/9/sys/sparc64/pci/schizo.c Thu Oct 18 15:20:37 2012 (r241692) +++ stable/9/sys/sparc64/pci/schizo.c Thu Oct 18 15:24:43 2012 (r241693) @@ -1214,8 +1214,6 @@ schizo_dmamap_sync(bus_dma_tag_t dt, bus membar(Sync); } -#define VIS_BLOCKSIZE 64 - static void ichip_dmamap_sync(bus_dma_tag_t dt, bus_dmamap_t map, bus_dmasync_op_t op) { Modified: stable/9/sys/sparc64/sparc64/support.S ============================================================================== --- stable/9/sys/sparc64/sparc64/support.S Thu Oct 18 15:20:37 2012 (r241692) +++ stable/9/sys/sparc64/sparc64/support.S Thu Oct 18 15:24:43 2012 (r241693) @@ -33,7 +33,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -591,10 +590,10 @@ ENTRY(spitfire_block_copy) andcc %o5, FPRS_FEF, %g0 bz,a,pt %xcc, 1f nop - stda %f0, [PCB_REG + PCB_UFP + (0 * 64)] %asi - stda %f16, [PCB_REG + PCB_UFP + (1 * 64)] %asi - stda %f32, [PCB_REG + PCB_UFP + (2 * 64)] %asi - stda %f48, [PCB_REG + PCB_UFP + (3 * 64)] %asi + stda %f0, [PCB_REG + PCB_UFP + (0 * VIS_BLOCKSIZE)] %asi + stda %f16, [PCB_REG + PCB_UFP + (1 * VIS_BLOCKSIZE)] %asi + stda %f32, [PCB_REG + PCB_UFP + (2 * VIS_BLOCKSIZE)] %asi + stda %f48, [PCB_REG + PCB_UFP + (3 * VIS_BLOCKSIZE)] %asi membar #Sync andn %o5, FPRS_FEF, %o5 @@ -606,8 +605,8 @@ ENTRY(spitfire_block_copy) 1: wrpr %o3, 0, %pstate ldda [%o0] %asi, %f0 - add %o0, 64, %o0 - sub %o2, 64, %o2 + add %o0, VIS_BLOCKSIZE, %o0 + sub %o2, VIS_BLOCKSIZE, %o2 2: ldda [%o0] %asi, %f16 fsrc1 %f0, %f32 @@ -619,10 +618,10 @@ ENTRY(spitfire_block_copy) fsrc1 %f12, %f44 fsrc1 %f14, %f46 stda %f32, [%o1] %asi - add %o0, 64, %o0 - subcc %o2, 64, %o2 + add %o0, VIS_BLOCKSIZE, %o0 + subcc %o2, VIS_BLOCKSIZE, %o2 bz,pn %xcc, 3f - add %o1, 64, %o1 + add %o1, VIS_BLOCKSIZE, %o1 ldda [%o0] %asi, %f0 fsrc1 %f16, %f32 fsrc1 %f18, %f34 @@ -633,10 +632,10 @@ ENTRY(spitfire_block_copy) fsrc1 %f28, %f44 fsrc1 %f30, %f46 stda %f32, [%o1] %asi - add %o0, 64, %o0 - sub %o2, 64, %o2 + add %o0, VIS_BLOCKSIZE, %o0 + sub %o2, VIS_BLOCKSIZE, %o2 ba,pt %xcc, 2b - add %o1, 64, %o1 + add %o1, VIS_BLOCKSIZE, %o1 3: membar #Sync @@ -651,7 +650,7 @@ END(spitfire_block_copy) * void zeus_block_copy(void *src, void *dst, size_t len) */ ENTRY(zeus_block_copy) - prefetch [%o0 + (0 * 64)], 0 + prefetch [%o0 + (0 * VIS_BLOCKSIZE)], 0 rdpr %pstate, %o3 wrpr %g0, PSTATE_NORMAL, %pstate @@ -664,10 +663,10 @@ ENTRY(zeus_block_copy) andcc %o5, FPRS_FEF, %g0 bz,a,pt %xcc, 1f nop - stda %f0, [PCB_REG + PCB_UFP + (0 * 64)] %asi - stda %f16, [PCB_REG + PCB_UFP + (1 * 64)] %asi - stda %f32, [PCB_REG + PCB_UFP + (2 * 64)] %asi - stda %f48, [PCB_REG + PCB_UFP + (3 * 64)] %asi + stda %f0, [PCB_REG + PCB_UFP + (0 * VIS_BLOCKSIZE)] %asi + stda %f16, [PCB_REG + PCB_UFP + (1 * VIS_BLOCKSIZE)] %asi + stda %f32, [PCB_REG + PCB_UFP + (2 * VIS_BLOCKSIZE)] %asi + stda %f48, [PCB_REG + PCB_UFP + (3 * VIS_BLOCKSIZE)] %asi membar #Sync andn %o5, FPRS_FEF, %o5 @@ -679,32 +678,32 @@ ENTRY(zeus_block_copy) 1: wrpr %o3, 0, %pstate ldd [%o0 + (0 * 8)], %f0 - prefetch [%o0 + (1 * 64)], 0 + prefetch [%o0 + (1 * VIS_BLOCKSIZE)], 0 ldd [%o0 + (1 * 8)], %f2 - prefetch [%o0 + (2 * 64)], 0 + prefetch [%o0 + (2 * VIS_BLOCKSIZE)], 0 fmovd %f0, %f32 ldd [%o0 + (2 * 8)], %f4 - prefetch [%o0 + (3 * 64)], 0 + prefetch [%o0 + (3 * VIS_BLOCKSIZE)], 0 fmovd %f2, %f34 ldd [%o0 + (3 * 8)], %f6 - prefetch [%o0 + (4 * 64)], 1 + prefetch [%o0 + (4 * VIS_BLOCKSIZE)], 1 fmovd %f4, %f36 ldd [%o0 + (4 * 8)], %f8 - prefetch [%o0 + (8 * 64)], 1 + prefetch [%o0 + (8 * VIS_BLOCKSIZE)], 1 fmovd %f6, %f38 ldd [%o0 + (5 * 8)], %f10 - prefetch [%o0 + (12 * 64)], 1 + prefetch [%o0 + (12 * VIS_BLOCKSIZE)], 1 fmovd %f8, %f40 ldd [%o0 + (6 * 8)], %f12 - prefetch [%o0 + (16 * 64)], 1 + prefetch [%o0 + (16 * VIS_BLOCKSIZE)], 1 fmovd %f10, %f42 ldd [%o0 + (7 * 8)], %f14 ldd [%o0 + (8 * 8)], %f0 - sub %o2, 64, %o2 - add %o0, 64, %o0 - prefetch [%o0 + (19 * 64)], 1 + sub %o2, VIS_BLOCKSIZE, %o2 + add %o0, VIS_BLOCKSIZE, %o0 + prefetch [%o0 + (19 * VIS_BLOCKSIZE)], 1 ba,pt %xcc, 2f - prefetch [%o0 + (23 * 64)], 1 + prefetch [%o0 + (23 * VIS_BLOCKSIZE)], 1 .align 32 2: ldd [%o0 + (1 * 8)], %f2 @@ -724,14 +723,14 @@ ENTRY(zeus_block_copy) fmovd %f8, %f40 ldd [%o0 + (8 * 8)], %f0 fmovd %f10, %f42 - sub %o2, 64, %o2 - prefetch [%o0 + (3 * 64)], 0 - add %o1, 64, %o1 - prefetch [%o0 + (24 * 64)], 1 - add %o0, 64, %o0 - cmp %o2, 64 + 8 + sub %o2, VIS_BLOCKSIZE, %o2 + prefetch [%o0 + (3 * VIS_BLOCKSIZE)], 0 + add %o1, VIS_BLOCKSIZE, %o1 + prefetch [%o0 + (24 * VIS_BLOCKSIZE)], 1 + add %o0, VIS_BLOCKSIZE, %o0 + cmp %o2, VIS_BLOCKSIZE + 8 bgu,pt %xcc, 2b - prefetch [%o0 + (12 * 64)], 1 + prefetch [%o0 + (12 * VIS_BLOCKSIZE)], 1 ldd [%o0 + (1 * 8)], %f2 fsrc1 %f12, %f44 ldd [%o0 + (2 * 8)], %f4 @@ -747,7 +746,7 @@ ENTRY(zeus_block_copy) fsrc1 %f6, %f38 ldd [%o0 + (7 * 8)], %f14 fsrc1 %f8, %f40 - add %o1, 64, %o1 + add %o1, VIS_BLOCKSIZE, %o1 fsrc1 %f10, %f42 fsrc1 %f12, %f44 fsrc1 %f14, %f46 @@ -775,10 +774,10 @@ ENTRY(spitfire_block_zero) andcc %o5, FPRS_FEF, %g0 bz,a,pt %xcc, 1f nop - stda %f0, [PCB_REG + PCB_UFP + (0 * 64)] %asi - stda %f16, [PCB_REG + PCB_UFP + (1 * 64)] %asi - stda %f32, [PCB_REG + PCB_UFP + (2 * 64)] %asi - stda %f48, [PCB_REG + PCB_UFP + (3 * 64)] %asi + stda %f0, [PCB_REG + PCB_UFP + (0 * VIS_BLOCKSIZE)] %asi + stda %f16, [PCB_REG + PCB_UFP + (1 * VIS_BLOCKSIZE)] %asi + stda %f32, [PCB_REG + PCB_UFP + (2 * VIS_BLOCKSIZE)] %asi + stda %f48, [PCB_REG + PCB_UFP + (3 * VIS_BLOCKSIZE)] %asi membar #Sync andn %o5, FPRS_FEF, %o5 @@ -798,13 +797,13 @@ ENTRY(spitfire_block_zero) fzero %f12 fzero %f14 -1: stda %f0, [%o0] %asi - stda %f0, [%o0 + 64] %asi - stda %f0, [%o0 + 128] %asi - stda %f0, [%o0 + 192] %asi - sub %o1, 256, %o1 +1: stda %f0, [%o0 + (0 * VIS_BLOCKSIZE)] %asi + stda %f0, [%o0 + (1 * VIS_BLOCKSIZE)] %asi + stda %f0, [%o0 + (2 * VIS_BLOCKSIZE)] %asi + stda %f0, [%o0 + (3 * VIS_BLOCKSIZE)] %asi + sub %o1, (4 * VIS_BLOCKSIZE), %o1 brnz,pt %o1, 1b - add %o0, 256, %o0 + add %o0, (4 * VIS_BLOCKSIZE), %o0 membar #Sync retl From owner-svn-src-stable-9@FreeBSD.ORG Fri Oct 19 00:22:10 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AD92CD10; Fri, 19 Oct 2012 00:22:10 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 924E68FC0A; Fri, 19 Oct 2012 00:22:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9J0MA2J052699; Fri, 19 Oct 2012 00:22:10 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9J0MATq052687; Fri, 19 Oct 2012 00:22:10 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201210190022.q9J0MATq052687@svn.freebsd.org> From: John Baldwin Date: Fri, 19 Oct 2012 00:22:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241711 - in stable/9: . share/man/man7 share/mk sys/conf usr.sbin/config X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Oct 2012 00:22:10 -0000 Author: jhb Date: Fri Oct 19 00:22:09 2012 New Revision: 241711 URL: http://svn.freebsd.org/changeset/base/241711 Log: MFC 227429,228121,228124,228137,228140,228141,228147,228153,228158,228311, 241395,241396: Various fixes to WITH_CTF: - Conditionalize ctfconvert/ctfmerge runs on make level (.if/.endif) instead of executing a shell on every object or executable/library file. - CTF knob is now implemented using common scheme: MK_CTF=yes/no is defined based on WITH/WITHOUT_CTF settings, default is WITHOUT_CTF, NO_CTF overrides WITH_CTF (used by Makefile.inc1) - Add missing calls to ctfconvert/ctfmerge for various edge cases. Modified: stable/9/Makefile.inc1 (contents, props changed) stable/9/share/man/man7/build.7 stable/9/share/mk/bsd.lib.mk stable/9/share/mk/bsd.own.mk stable/9/share/mk/bsd.prog.mk stable/9/share/mk/sys.mk stable/9/sys/conf/kern.mk stable/9/sys/conf/kern.post.mk stable/9/sys/conf/kern.pre.mk stable/9/sys/conf/kmod.mk stable/9/usr.sbin/config/mkmakefile.c Directory Properties: stable/9/share/man/man7/ (props changed) stable/9/share/mk/ (props changed) stable/9/sys/ (props changed) stable/9/sys/conf/ (props changed) stable/9/usr.sbin/config/ (props changed) Modified: stable/9/Makefile.inc1 ============================================================================== --- stable/9/Makefile.inc1 Thu Oct 18 22:22:01 2012 (r241710) +++ stable/9/Makefile.inc1 Fri Oct 19 00:22:09 2012 (r241711) @@ -59,8 +59,6 @@ SUBDIR+=games .endif .if ${MK_CDDL} != "no" SUBDIR+=cddl -.else -NO_CTF=1 .endif SUBDIR+=gnu include .if ${MK_KERBEROS} != "no" Modified: stable/9/share/man/man7/build.7 ============================================================================== --- stable/9/share/man/man7/build.7 Thu Oct 18 22:22:01 2012 (r241710) +++ stable/9/share/man/man7/build.7 Fri Oct 19 00:22:09 2012 (r241711) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 2, 2012 +.Dd October 10, 2012 .Dt BUILD 7 .Os .Sh NAME @@ -382,12 +382,6 @@ even if the makefile says otherwise. .It Va WITH_CTF If defined, the build process will run the DTrace CTF conversion tools on built objects. -Please note that this WITH_ option is handled differently than all -other WITH_ options (there is no -.Va WITHOUT_CTF , -or corresponding -.Va MK_CTF -in the build system). .El .Pp Additionally, builds in Modified: stable/9/share/mk/bsd.lib.mk ============================================================================== --- stable/9/share/mk/bsd.lib.mk Thu Oct 18 22:22:01 2012 (r241710) +++ stable/9/share/mk/bsd.lib.mk Fri Oct 19 00:22:09 2012 (r241711) @@ -33,15 +33,10 @@ CFLAGS+= -DNDEBUG NO_WERROR= .endif -# Enable CTF conversion on request. -.if defined(WITH_CTF) -.undef NO_CTF -.endif - .if defined(DEBUG_FLAGS) CFLAGS+= ${DEBUG_FLAGS} -.if !defined(NO_CTF) && (${DEBUG_FLAGS:M-g} != "") +.if ${MK_CTF} != "no" && ${DEBUG_FLAGS:M-g} != "" CTFFLAGS+= -g .endif .endif @@ -69,21 +64,15 @@ PO_FLAG=-pg .c.o: ${CC} ${STATIC_CFLAGS} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) + ${CTFCONVERT_CMD} .c.po: ${CC} ${PO_FLAG} ${STATIC_CFLAGS} ${PO_CFLAGS} -c ${.IMPSRC} -o ${.TARGET} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) + ${CTFCONVERT_CMD} .c.So: ${CC} ${PICFLAG} -DPIC ${SHARED_CFLAGS} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) + ${CTFCONVERT_CMD} .cc.o .C.o .cpp.o .cxx.o: ${CXX} ${STATIC_CXXFLAGS} ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET} @@ -96,47 +85,33 @@ PO_FLAG=-pg .f.po: ${FC} -pg ${FFLAGS} -o ${.TARGET} -c ${.IMPSRC} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) + ${CTFCONVERT_CMD} .f.So: ${FC} ${PICFLAG} -DPIC ${FFLAGS} -o ${.TARGET} -c ${.IMPSRC} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) + ${CTFCONVERT_CMD} .s.po .s.So: ${AS} ${AFLAGS} -o ${.TARGET} ${.IMPSRC} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) + ${CTFCONVERT_CMD} .asm.po: ${CC} -x assembler-with-cpp -DPROF ${PO_CFLAGS} ${ACFLAGS} \ -c ${.IMPSRC} -o ${.TARGET} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) + ${CTFCONVERT_CMD} .asm.So: ${CC} -x assembler-with-cpp ${PICFLAG} -DPIC ${CFLAGS} ${ACFLAGS} \ -c ${.IMPSRC} -o ${.TARGET} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) + ${CTFCONVERT_CMD} .S.po: ${CC} -DPROF ${PO_CFLAGS} ${ACFLAGS} -c ${.IMPSRC} -o ${.TARGET} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) + ${CTFCONVERT_CMD} .S.So: ${CC} ${PICFLAG} -DPIC ${CFLAGS} ${ACFLAGS} -c ${.IMPSRC} -o ${.TARGET} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) + ${CTFCONVERT_CMD} all: objwarn @@ -216,9 +191,9 @@ ${SHLIB_NAME}: ${SOBJS} -o ${.TARGET} -Wl,-soname,${SONAME} \ `NM='${NM}' lorder ${SOBJS} | tsort -q` ${LDADD} .endif - @[ -z "${CTFMERGE}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SOBJS} && \ - ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SOBJS}) +.if ${MK_CTF} != "no" + ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SOBJS} +.endif .endif .if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) && ${MK_TOOLCHAIN} != "no" Modified: stable/9/share/mk/bsd.own.mk ============================================================================== --- stable/9/share/mk/bsd.own.mk Thu Oct 18 22:22:01 2012 (r241710) +++ stable/9/share/mk/bsd.own.mk Fri Oct 19 00:22:09 2012 (r241711) @@ -203,6 +203,7 @@ COMPRESS_EXT?= .gz # regardless of user's setting). # .for var in \ + CTF \ INSTALLLIB \ MAN \ PROFILE @@ -415,6 +416,7 @@ __DEFAULT_NO_OPTIONS = \ BIND_XML \ CLANG_EXTRAS \ CLANG_IS_CC \ + CTF \ HESIOD \ ICONV \ IDEA \ @@ -518,6 +520,7 @@ MK_SOURCELESS_UCODE:= no .if ${MK_CDDL} == "no" MK_ZFS:= no +MK_CTF:= no .endif .if ${MK_CLANG} == "no" @@ -630,6 +633,14 @@ MK_${vv:H}:= ${MK_${vv:T}} .endif .endfor +.if ${MK_CTF} != "no" +CTFCONVERT_CMD= ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.elif ${MAKE_VERSION} >= 5201111300 +CTFCONVERT_CMD= +.else +CTFCONVERT_CMD= @: +.endif + .endif # !_WITHOUT_SRCCONF .endif # !target(____) Modified: stable/9/share/mk/bsd.prog.mk ============================================================================== --- stable/9/share/mk/bsd.prog.mk Thu Oct 18 22:22:01 2012 (r241710) +++ stable/9/share/mk/bsd.prog.mk Fri Oct 19 00:22:09 2012 (r241711) @@ -15,16 +15,11 @@ CFLAGS+= -DNDEBUG NO_WERROR= .endif -# Enable CTF conversion on request. -.if defined(WITH_CTF) -.undef NO_CTF -.endif - .if defined(DEBUG_FLAGS) CFLAGS+=${DEBUG_FLAGS} CXXFLAGS+=${DEBUG_FLAGS} -.if !defined(NO_CTF) && (${DEBUG_FLAGS:M-g} != "") +.if ${MK_CTF} != "no" && ${DEBUG_FLAGS:M-g} != "" CTFFLAGS+= -g .endif .endif @@ -60,9 +55,9 @@ ${PROG}: ${OBJS} .else ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD} .endif - @[ -z "${CTFMERGE}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} && \ - ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS}) +.if ${MK_CTF} != "no" + ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} +.endif .else # !defined(SRCS) @@ -90,9 +85,9 @@ ${PROG}: ${OBJS} .else ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD} .endif - @[ -z "${CTFMERGE}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} && \ - ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS}) +.if ${MK_CTF} != "no" + ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} +.endif .endif .endif Modified: stable/9/share/mk/sys.mk ============================================================================== --- stable/9/share/mk/sys.mk Thu Oct 18 22:22:01 2012 (r241710) +++ stable/9/share/mk/sys.mk Fri Oct 19 00:22:09 2012 (r241711) @@ -59,12 +59,6 @@ CFLAGS += -fno-strict-aliasing .endif PO_CFLAGS ?= ${CFLAGS} -# Turn CTF conversion off by default for now. This default could be -# changed later if DTrace becomes popular. -.if !defined(WITH_CTF) -NO_CTF = 1 -.endif - # C Type Format data is required for DTrace CTFFLAGS ?= -L VERSION @@ -158,15 +152,11 @@ YFLAGS ?= -d # SINGLE SUFFIX RULES .c: ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.IMPSRC} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) + ${CTFCONVERT_CMD} .f: ${FC} ${FFLAGS} ${LDFLAGS} -o ${.TARGET} ${.IMPSRC} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) + ${CTFCONVERT_CMD} .sh: cp -f ${.IMPSRC} ${.TARGET} @@ -176,33 +166,25 @@ YFLAGS ?= -d .c.o: ${CC} ${CFLAGS} -c ${.IMPSRC} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) + ${CTFCONVERT_CMD} .f.o: ${FC} ${FFLAGS} -c ${.IMPSRC} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) + ${CTFCONVERT_CMD} .y.o: ${YACC} ${YFLAGS} ${.IMPSRC} ${CC} ${CFLAGS} -c y.tab.c rm -f y.tab.c mv y.tab.o ${.TARGET} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) + ${CTFCONVERT_CMD} .l.o: ${LEX} ${LFLAGS} ${.IMPSRC} ${CC} ${CFLAGS} -c lex.yy.c rm -f lex.yy.c mv lex.yy.o ${.TARGET} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) + ${CTFCONVERT_CMD} .y.c: ${YACC} ${YFLAGS} ${.IMPSRC} @@ -240,15 +222,11 @@ YFLAGS ?= -d .c: ${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) + ${CTFCONVERT_CMD} .c.o: ${CC} ${CFLAGS} -c ${.IMPSRC} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) + ${CTFCONVERT_CMD} .cc .cpp .cxx .C: ${CXX} ${CXXFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} @@ -258,15 +236,11 @@ YFLAGS ?= -d .m.o: ${OBJC} ${OBJCFLAGS} -c ${.IMPSRC} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) + ${CTFCONVERT_CMD} .p.o: ${PC} ${PFLAGS} -c ${.IMPSRC} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) + ${CTFCONVERT_CMD} .e .r .F .f: ${FC} ${RFLAGS} ${EFLAGS} ${FFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} \ @@ -277,38 +251,28 @@ YFLAGS ?= -d .S.o: ${CC} ${CFLAGS} ${ACFLAGS} -c ${.IMPSRC} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) + ${CTFCONVERT_CMD} .asm.o: ${CC} -x assembler-with-cpp ${CFLAGS} ${ACFLAGS} -c ${.IMPSRC} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) + ${CTFCONVERT_CMD} .s.o: ${AS} ${AFLAGS} -o ${.TARGET} ${.IMPSRC} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) + ${CTFCONVERT_CMD} # XXX not -j safe .y.o: ${YACC} ${YFLAGS} ${.IMPSRC} ${CC} ${CFLAGS} -c y.tab.c -o ${.TARGET} rm -f y.tab.c - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) + ${CTFCONVERT_CMD} .l.o: ${LEX} -t ${LFLAGS} ${.IMPSRC} > ${.PREFIX}.tmp.c ${CC} ${CFLAGS} -c ${.PREFIX}.tmp.c -o ${.TARGET} rm -f ${.PREFIX}.tmp.c - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) + ${CTFCONVERT_CMD} # XXX not -j safe .y.c: @@ -320,34 +284,26 @@ YFLAGS ?= -d .s.out .c.out .o.out: ${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) + ${CTFCONVERT_CMD} .f.out .F.out .r.out .e.out: ${FC} ${EFLAGS} ${RFLAGS} ${FFLAGS} ${LDFLAGS} ${.IMPSRC} \ ${LDLIBS} -o ${.TARGET} rm -f ${.PREFIX}.o - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) + ${CTFCONVERT_CMD} # XXX not -j safe .y.out: ${YACC} ${YFLAGS} ${.IMPSRC} ${CC} ${CFLAGS} ${LDFLAGS} y.tab.c ${LDLIBS} -ly -o ${.TARGET} rm -f y.tab.c - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) + ${CTFCONVERT_CMD} .l.out: ${LEX} -t ${LFLAGS} ${.IMPSRC} > ${.PREFIX}.tmp.c ${CC} ${CFLAGS} ${LDFLAGS} ${.PREFIX}.tmp.c ${LDLIBS} -ll -o ${.TARGET} rm -f ${.PREFIX}.tmp.c - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) + ${CTFCONVERT_CMD} # FreeBSD build pollution. Hide it in the non-POSIX part of the ifdef. __MAKE_CONF?=/etc/make.conf Modified: stable/9/sys/conf/kern.mk ============================================================================== --- stable/9/sys/conf/kern.mk Thu Oct 18 22:22:01 2012 (r241710) +++ stable/9/sys/conf/kern.mk Fri Oct 19 00:22:09 2012 (r241711) @@ -145,10 +145,3 @@ CFLAGS+= -ffreestanding ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" CFLAGS+= -fstack-protector .endif - -# -# Enable CTF conversation on request -# -.if defined(WITH_CTF) -.undef NO_CTF -.endif Modified: stable/9/sys/conf/kern.post.mk ============================================================================== --- stable/9/sys/conf/kern.post.mk Thu Oct 18 22:22:01 2012 (r241710) +++ stable/9/sys/conf/kern.post.mk Fri Oct 19 00:22:09 2012 (r241711) @@ -125,7 +125,9 @@ ${FULLKERNEL}: ${SYSTEM_DEP} vers.o @rm -f ${.TARGET} @echo linking ${.TARGET} ${SYSTEM_LD} - @${SYSTEM_CTFMERGE} +.if ${MK_CTF} != "no" + ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SYSTEM_OBJS} vers.o +.endif .if !defined(DEBUG) ${OBJCOPY} --strip-debug ${.TARGET} .endif @@ -278,7 +280,7 @@ kernel-reinstall: config.o env.o hints.o vers.o vnode_if.o: ${NORMAL_C} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + ${NORMAL_CTFCONVERT} config.ln env.ln hints.ln vers.ln vnode_if.ln: ${NORMAL_LINT} Modified: stable/9/sys/conf/kern.pre.mk ============================================================================== --- stable/9/sys/conf/kern.pre.mk Thu Oct 18 22:22:01 2012 (r241710) +++ stable/9/sys/conf/kern.pre.mk Fri Oct 19 00:22:09 2012 (r241711) @@ -136,8 +136,13 @@ NORMAL_FW= uudecode -o ${.TARGET} ${.ALL NORMAL_FWO= ${LD} -b binary --no-warn-mismatch -d -warn-common -r \ -o ${.TARGET} ${.ALLSRC:M*.fw} -NORMAL_CTFCONVERT= [ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.if ${MK_CTF} != "no" +NORMAL_CTFCONVERT= ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.elif ${MAKE_VERSION} >= 5201111300 +NORMAL_CTFCONVERT= +.else +NORMAL_CTFCONVERT= @: +.endif NORMAL_LINT= ${LINT} ${LINTFLAGS} ${CFLAGS:M-[DIU]*} ${.IMPSRC} @@ -155,7 +160,6 @@ SYSTEM_DEP= Makefile ${SYSTEM_OBJS} SYSTEM_OBJS= locore.o ${MDOBJS} ${OBJS} SYSTEM_OBJS+= ${SYSTEM_CFILES:.c=.o} SYSTEM_OBJS+= hack.So -SYSTEM_CTFMERGE= [ -z "${CTFMERGE}" -o -n "${NO_CTF}" ] || ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SYSTEM_OBJS} vers.o SYSTEM_LD= @${LD} -Bdynamic -T ${LDSCRIPT} --no-warn-mismatch \ -warn-common -export-dynamic -dynamic-linker /red/herring \ -o ${.TARGET} -X ${SYSTEM_OBJS} vers.o Modified: stable/9/sys/conf/kmod.mk ============================================================================== --- stable/9/sys/conf/kmod.mk Thu Oct 18 22:22:01 2012 (r241710) +++ stable/9/sys/conf/kmod.mk Fri Oct 19 00:22:09 2012 (r241711) @@ -72,11 +72,6 @@ OBJCOPY?= objcopy .error "Do not use KMODDEPS on 5.0+; use MODULE_VERSION/MODULE_DEPEND" .endif -# Enable CTF conversion on request. -.if defined(WITH_CTF) -.undef NO_CTF -.endif - .include .SUFFIXES: .out .o .c .cc .cxx .C .y .l .s .S @@ -206,7 +201,9 @@ ${KMOD}.kld: ${OBJS} ${FULLPROG}: ${OBJS} .endif ${LD} ${LDFLAGS} -r -d -o ${.TARGET} ${OBJS} - @[ -z "${CTFMERGE}" -o -n "${NO_CTF}" ] || ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} +.if defined(MK_CTF) && ${MK_CTF} != "no" + ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} +.endif .if defined(EXPORT_SYMS) .if ${EXPORT_SYMS} != YES .if ${EXPORT_SYMS} == NO Modified: stable/9/usr.sbin/config/mkmakefile.c ============================================================================== --- stable/9/usr.sbin/config/mkmakefile.c Thu Oct 18 22:22:01 2012 (r241710) +++ stable/9/usr.sbin/config/mkmakefile.c Fri Oct 19 00:22:09 2012 (r241711) @@ -431,7 +431,7 @@ nextparam: next_quoted_word(fp, wd); if (wd == 0) { fprintf(stderr, - "%s: %s missing compile command string.\n", + "%s: %s missing dependency string.\n", fname, this); exit(1); } @@ -762,16 +762,21 @@ do_rules(FILE *f) break; } snprintf(cmd, sizeof(cmd), - "${%s_%c%s}\n\t@${NORMAL_CTFCONVERT}", ftype, + "${%s_%c%s}", ftype, toupper(och), ftp->f_flags & NOWERROR ? "_NOWERROR" : ""); compilewith = cmd; } *cp = och; if (strlen(ftp->f_objprefix)) - fprintf(f, "\t%s $S/%s\n\n", compilewith, np); + fprintf(f, "\t%s $S/%s\n", compilewith, np); + else + fprintf(f, "\t%s\n", compilewith); + + if (!(ftp->f_flags & NO_OBJ)) + fprintf(f, "\t${NORMAL_CTFCONVERT}\n\n"); else - fprintf(f, "\t%s\n\n", compilewith); + fprintf(f, "\n"); } } From owner-svn-src-stable-9@FreeBSD.ORG Fri Oct 19 00:26:18 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AA418EA8; Fri, 19 Oct 2012 00:26:18 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 914438FC08; Fri, 19 Oct 2012 00:26:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9J0QIbr053374; Fri, 19 Oct 2012 00:26:18 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9J0QIZr053372; Fri, 19 Oct 2012 00:26:18 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210190026.q9J0QIZr053372@svn.freebsd.org> From: Eitan Adler Date: Fri, 19 Oct 2012 00:26:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241712 - stable/9/share/examples/csh X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Oct 2012 00:26:18 -0000 Author: eadler Date: Fri Oct 19 00:26:18 2012 New Revision: 241712 URL: http://svn.freebsd.org/changeset/base/241712 Log: MFC r241602: Add a bunch more example completions. Approved by: cperciva (implicit) Modified: stable/9/share/examples/csh/dot.cshrc Directory Properties: stable/9/share/examples/csh/ (props changed) Modified: stable/9/share/examples/csh/dot.cshrc ============================================================================== --- stable/9/share/examples/csh/dot.cshrc Fri Oct 19 00:22:09 2012 (r241711) +++ stable/9/share/examples/csh/dot.cshrc Fri Oct 19 00:26:18 2012 (r241712) @@ -25,29 +25,99 @@ bindkey "^[[3~" delete-char-or-list-or-e # Make the Ins key work bindkey "\e[2~" overwrite-mode -# Aliases used for completions -alias _PKGS_PkGs_PoRtS_ 'awk -F\| \{sub\(\"\/usr\/ports\/\"\,\"\"\,\$2\)\;print\ \$2\} /usr/ports/INDEX-name -r | cut -d . -f 1' -alias _PKGS_PkGs_PoRtS_ 'awk -F\| \{sub\(\"\/usr\/ports\/\"\,\"\"\,\$2\)\;print\ \$2\} /usr/ports/INDEX-`uname -r | cut -d . -f 1`&& pkg_info -E \*' - # Some common completions +complete cd 'p/1/d/' complete chown 'p/1/u/' complete dd 'c/[io]f=/f/ n/*/"(if of ibs obs bs skip seek count)"/=' +complete find 'n/-fstype/"(nfs 4.2)"/' 'n/-name/f/' \ + 'n/-type/(c b d f p l s)/' \ + 'n/-user/u/ n/-group/g/' \ + 'n/-exec/c/' 'n/-ok/c/' \ + 'n/-cpio/f/' \ + 'n/-ncpio/f/' \ + 'n/-newer/f/' \ + 'c/-/(fstype name perm prune type user nouser group nogroup size inum atime mtime ctime exec \ + ok print ls cpio ncpio newer xdev depth daystart follow maxdepth mindepth noleaf version \ + anewer cnewer amin cmin mmin true false uid gid ilname iname ipath iregex links lname empty path \ + regex used xtype fprint fprint0 fprintf print0 printf not a and o or)/' \ + 'n/*/d/' +complete fg 'c/%/j/' +complete gpart 'p/1/(add backup bootcode commit create delete destroy modify recover resize restore set show undo unset)/' \ + 'n/add/x:-t type [-a alignment] [-b start] [-s size] [-i index] [-l label] -f flags geom/' \ + 'n/backup/x:geom/' \ + 'n/bootcode/x:[-b bootcode] [-p partcode -i index] [-f flags] geom/' \ + 'n/commit/x:geom/' \ + 'n/create/x:-s scheme [-n entries] [-f flags] provider/' \ + 'n/delete/x:-i index [-f flags] geom/' \ + 'n/destroy/x:[-F] [-f flags] geom/' \ + 'n/modify/x:-i index [-l label] [-t type] [-f flags] geom/' \ + 'n/recover/x:[-f flags] geom/' \ + 'n/resize/x:-i index [-a alignment] [-s size] [-f flags] geom/' \ + 'n/restore/x:[-lF] [-f flags] provider [...]/' \ + 'n/set/x:-a attrib -i index [-f flags] geom/' \ + 'n/show/x:[-l | -r] [-p] [geom ...]/' \ + 'n/undo/x:geom/' \ + 'n/unset/x:-a attrib -i index [-f flags] geom/' +complete grep 'c/-*A/x:<#_lines_after>/' \ + 'c/-*B/x:<#_lines_before>/' \ + 'c/--/(extended-regexp fixed-regexp basic-regexp regexp file ignore-case word-regexp line-regexp \ + no-messages revert-match version help byte-offset line-number with-filename no-filename quiet silent \ + text directories recursive files-without-match files-with-matches count before-context after-context \ + context binary unix-byte-offsets)/' \ + 'c/-/(A a B b C c d E e F f G H h i L l n q r s U u V v w x)/' \ + 'p/1/x:/ N/-*e/f/' \ + 'n/-*e/x:/' \ + 'n/-*f/f/' \ + 'n/*/f/' +complete ifconfig 'p@1@`ifconfig -l`@' \ + 'n/*/(range phase link netmask mtu vlandev vlan metric mediaopt down delete broadcast arp debug)/' + 'c/%/j/' \ + 'n/*/`ps -ax | awk '"'"'{print $1}'"'"'`/' complete kill 'c/-/S/' 'c/%/j/' 'n/*/`ps -ax | awk '"'"'{print $1}'"'"'`/' complete killall 'c/-/S/' 'c/%/j/' 'n/*/`ps -ax | awk '"'"'{print $5}'"'"'`/' -complete kldunload 'n@*@`kldstat | awk \{sub\(\/\.ko\/,\"\",\$NF\)\;print\ \$NF\} | grep -v Name` @' -complete make 'n@*@`make -pn | sed -n -E "/^[#_.\/[:blank:]]+/d; /=/d; s/[[:blank:]]*:.*//gp;"`@' -complete man 'C/*/c/' +complete kldload 'n@*@`ls -1 /boot/modules/ /boot/kernel/ | awk -F/ \$NF\ \~\ \".ko\"\ \{sub\(\/\.ko\/,\"\",\$NF\)\;print\ \$NF\}`@' +complete kldunload 'n@*@`kldstat | awk \{sub\(\/\.ko\/,\"\",\$NF\)\;print\ \$NF\} | grep -v Name`@' +complete make 'p@1@`make -pn | sed -n -E "/^[#_.\/[:blank:]]+/d; /=/d; s/[[:blank:]]*:.*//gp;"`@' \ + 'n@-V@`make -ndv | & grep Global: | sed -E -e "s/^Global://" -e "s/ .*//" -e "/^[[:lower:]]/d" | sort | uniq`@' +complete man 'C/*/c/' +complete netstat 'n@-I@`ifconfig -l`@' complete pkg_delete 'c/-/(i v D n p d f G x X r)/' 'n@*@`ls /var/db/pkg`@' complete pkg_info 'c/-/(a b v p q Q c d D f g i I j k K r R m L s o G O x X e E l t V P)/' 'n@*@`\ls -1 /var/db/pkg | sed s%/var/db/pkg/%%`@' -complete portmaster 'c/--/(always-fetch check-depends check-port-dbdir clean-distfiles \ - clean-packages delete-build-only delete-packages force-config help \ - index index-first index-only list-origins local-packagedir no-confirm \ - no-index-fetch no-term-title packages packages-build packages-if-newer \ - packages-local packages-only show-work update-if-newer version)/' \ - 'c/-/(a b B C d D e f F g G h H i l L m n o p r R s t u v w x)/' \ - 'n@*@`_PKGS_PkGs_PoRtS_`@' +complete ping 'p/1/$hosts/' +complete pkill 'c/-/S/' \ + 'n@*@`ps -axc -o command="" | sort | uniq`@' +complete portmaster 'c/--/(always-fetch check-depends check-port-dbdir clean-distfiles clean-packages delete-build-only \ + delete-packages force-config help index index-first index-only list-origins local-packagedir \ + no-confirm no-index-fetch no-term-title packages packages-build packages-if-newer packages-local \ + packages-only show-work update-if-newer version)/' \ + 'c/-/(a b B C d D e f F g G h H i l L m n o p r R s t u v w x)/' \ + 'n@*@`pkg_info -E \*`@' +complete rsync "c,*:/,F:/," \ + "c,*:,F:$HOME," \ + 'c/*@/$hosts/:/' +complete scp "c,*:/,F:/," \ + "c,*:,F:$HOME," \ + 'c/*@/$hosts/:/' complete service 'c/-/(e l r v)/' 'p/1/`service -l`/' 'n/*/(start stop reload restart status rcvar onestart onestop)/' +complete svn 'C@file:///@`'"${HOME}/etc/tcsh/complete.d/svn"'`@@' \ + 'n@ls@(file:/// svn+ssh:// svn://)@@' \ + 'n@help@(add blame cat checkout cleanup commit copy delete export help import info list ls lock log merge mkdir move propdel \ + propedit propget proplist propset resolved revert status switch unlock update)@' 'p@1@(add blame cat checkout cleanup commit \ + copy delete export help import info list ls lock log merge mkdir move propdel propedit propget proplist propset resolved \ + revert status switch unlock update)@' +complete ssh 'p/1/$hosts/' \ + 'c/-/(l n)/' \ + 'n/-l/u/ N/-l/c/ n/-/c/ p/2/c/ p/*/f/' complete sysctl 'n/*/`sysctl -Na`/' +complete tmux 'n/*/(attach detach has kill-server kill-session lsc lscm ls lockc locks new refresh rename showmsgs source start suspendc switchc)/' +complete which 'C/*/c/' + +if ( -f /etc/printcap ) then + set printers=(`sed -n -e "/^[^ #].*:/s/:.*//p" /etc/printcap`) + complete lpr 'c/-P/$printers/' + complete lpq 'c/-P/$printers/' + complete lprm 'c/-P/$printers/' +endif # Alternate prompts set prompt = '#' From owner-svn-src-stable-9@FreeBSD.ORG Fri Oct 19 00:32:17 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D8EB5384; Fri, 19 Oct 2012 00:32:17 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C0D0D8FC0A; Fri, 19 Oct 2012 00:32:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9J0WH1U054412; Fri, 19 Oct 2012 00:32:17 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9J0WHlP054408; Fri, 19 Oct 2012 00:32:17 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210190032.q9J0WHlP054408@svn.freebsd.org> From: Eitan Adler Date: Fri, 19 Oct 2012 00:32:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241715 - stable/9/sys/cam/scsi X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Oct 2012 00:32:17 -0000 Author: eadler Date: Fri Oct 19 00:32:17 2012 New Revision: 241715 URL: http://svn.freebsd.org/changeset/base/241715 Log: MFC r241613: Add support for samsung HM250JI PR: usb/121474 Approved by: cperciva (implicit) Modified: stable/9/sys/cam/scsi/scsi_da.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_da.c Fri Oct 19 00:26:22 2012 (r241714) +++ stable/9/sys/cam/scsi/scsi_da.c Fri Oct 19 00:32:17 2012 (r241715) @@ -838,6 +838,15 @@ static struct da_quirk_entry da_quirk_ta {T_DIRECT, SIP_MEDIA_REMOVABLE, "USB 2.0", "(HS) Flash Disk", "*"}, /*quirks*/ DA_Q_NO_SYNC_CACHE }, + { + /* + * LaCie external 250GB Hard drive des by Porsche + * Submitted by: Ben Stuyts + * PR: 121474 + */ + {T_DIRECT, SIP_MEDIA_FIXED, "SAMSUNG", "HM250JI", "*"}, + /*quirks*/ DA_Q_NO_SYNC_CACHE + }, }; static disk_strategy_t dastrategy; From owner-svn-src-stable-9@FreeBSD.ORG Fri Oct 19 17:39:15 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DC009E43; Fri, 19 Oct 2012 17:39:15 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C1D418FC08; Fri, 19 Oct 2012 17:39:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9JHdFOx044085; Fri, 19 Oct 2012 17:39:15 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9JHdFJ8044083; Fri, 19 Oct 2012 17:39:15 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210191739.q9JHdFJ8044083@svn.freebsd.org> From: Alexander Motin Date: Fri, 19 Oct 2012 17:39:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241742 - stable/9/sys/dev/sound/pci/hda X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Oct 2012 17:39:16 -0000 Author: mav Date: Fri Oct 19 17:39:15 2012 New Revision: 241742 URL: http://svn.freebsd.org/changeset/base/241742 Log: MFC r241375: Cast vendor-specific spell on VIA VT1818S codecs alike to VT1708S to make analog input loopback and dual-stream playback work by enabling signal mixing by nid 22, as it should be according to info returned by the CODEC. Otherwise pin nid 28 receives only signal from DAC nid 16. PR: kern/169124 Modified: stable/9/sys/dev/sound/pci/hda/hdaa_patches.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/sound/pci/hda/hdaa_patches.c ============================================================================== --- stable/9/sys/dev/sound/pci/hda/hdaa_patches.c Fri Oct 19 17:21:10 2012 (r241741) +++ stable/9/sys/dev/sound/pci/hda/hdaa_patches.c Fri Oct 19 17:39:15 2012 (r241742) @@ -608,6 +608,8 @@ hdaa_patch_direct(struct hdaa_devinfo *d /* Enable Mic Boost Volume controls. */ hda_command(dev, HDA_CMD_12BIT(0, devinfo->nid, 0xf98, 0x01)); + /* Fall though */ + case HDA_CODEC_VT1818S: /* Don't bypass mixer. */ hda_command(dev, HDA_CMD_12BIT(0, devinfo->nid, 0xf88, 0xc0)); From owner-svn-src-stable-9@FreeBSD.ORG Fri Oct 19 19:27:34 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9BE7DF3B; Fri, 19 Oct 2012 19:27: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 810C48FC08; Fri, 19 Oct 2012 19:27:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9JJRYGL061173; Fri, 19 Oct 2012 19:27:34 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9JJRYlD061171; Fri, 19 Oct 2012 19:27:34 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210191927.q9JJRYlD061171@svn.freebsd.org> From: Alexander Motin Date: Fri, 19 Oct 2012 19:27:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241749 - stable/9/sys/cam X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Oct 2012 19:27:34 -0000 Author: mav Date: Fri Oct 19 19:27:33 2012 New Revision: 241749 URL: http://svn.freebsd.org/changeset/base/241749 Log: MFC r241444: Increase device CCB queue array size by CAM_RL_VALUES - 1 (4) elements. It is required to store extra recovery requests in case of bus resets. On ATA/SATA this fixes assertion panics on HEAD with INVARIANTS enabled or possible memory corruptions otherwise if timeout/reset happens when device CCB queue is already full. Modified: stable/9/sys/cam/cam_queue.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/cam_queue.c ============================================================================== --- stable/9/sys/cam/cam_queue.c Fri Oct 19 19:17:43 2012 (r241748) +++ stable/9/sys/cam/cam_queue.c Fri Oct 19 19:27:33 2012 (r241749) @@ -316,7 +316,8 @@ cam_ccbq_resize(struct cam_ccbq *ccbq, i * same size once the outstanding entries have been processed. */ if (space_left < 0 - || camq_resize(&ccbq->queue, new_size) == CAM_REQ_CMP) { + || camq_resize(&ccbq->queue, new_size + (CAM_RL_VALUES - 1)) == + CAM_REQ_CMP) { ccbq->devq_openings += delta; ccbq->dev_openings += delta; return (CAM_REQ_CMP); @@ -329,7 +330,7 @@ int cam_ccbq_init(struct cam_ccbq *ccbq, int openings) { bzero(ccbq, sizeof(*ccbq)); - if (camq_init(&ccbq->queue, openings) != 0) { + if (camq_init(&ccbq->queue, openings + (CAM_RL_VALUES - 1)) != 0) { return (1); } ccbq->devq_openings = openings; From owner-svn-src-stable-9@FreeBSD.ORG Sat Oct 20 07:38:42 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CFEBFE81; Sat, 20 Oct 2012 07:38:42 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B42578FC14; Sat, 20 Oct 2012 07:38:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9K7cgBb078579; Sat, 20 Oct 2012 07:38:42 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9K7cgQN078573; Sat, 20 Oct 2012 07:38:42 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201210200738.q9K7cgQN078573@svn.freebsd.org> From: Xin LI Date: Sat, 20 Oct 2012 07:38:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241762 - stable/9/sys/dev/tws X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Oct 2012 07:38:42 -0000 Author: delphij Date: Sat Oct 20 07:38:42 2012 New Revision: 241762 URL: http://svn.freebsd.org/changeset/base/241762 Log: MFC r241753: Integrate changes from LSI vendor driver 10.80.00.005 to FreeBSD. PR: kern/172833 Submitted by: "Charles O'Donnell" Modified: stable/9/sys/dev/tws/tws.c stable/9/sys/dev/tws/tws.h stable/9/sys/dev/tws/tws_cam.c stable/9/sys/dev/tws/tws_hdm.h stable/9/sys/dev/tws/tws_user.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/tws/tws.c ============================================================================== --- stable/9/sys/dev/tws/tws.c Sat Oct 20 01:48:49 2012 (r241761) +++ stable/9/sys/dev/tws/tws.c Sat Oct 20 07:38:42 2012 (r241762) @@ -405,6 +405,8 @@ tws_detach(device_t dev) free(sc->reqs, M_TWS); free(sc->sense_bufs, M_TWS); free(sc->scan_ccb, M_TWS); + if (sc->ioctl_data_mem) + bus_dmamem_free(sc->data_tag, sc->ioctl_data_mem, sc->ioctl_data_map); free(sc->aen_q.q, M_TWS); free(sc->trace_q.q, M_TWS); mtx_destroy(&sc->q_lock); @@ -609,6 +611,11 @@ tws_init(struct tws_softc *sc) TWS_TRACE_DEBUG(sc, "ccb malloc failed", 0, sc->is64bit); return(ENOMEM); } + if (bus_dmamem_alloc(sc->data_tag, (void **)&sc->ioctl_data_mem, + (BUS_DMA_NOWAIT | BUS_DMA_ZERO), &sc->ioctl_data_map)) { + device_printf(sc->tws_dev, "Cannot allocate ioctl data mem\n"); + return(ENOMEM); + } if ( !tws_ctlr_ready(sc) ) if( !tws_ctlr_reset(sc) ) Modified: stable/9/sys/dev/tws/tws.h ============================================================================== --- stable/9/sys/dev/tws/tws.h Sat Oct 20 01:48:49 2012 (r241761) +++ stable/9/sys/dev/tws/tws.h Sat Oct 20 07:38:42 2012 (r241762) @@ -65,7 +65,7 @@ MALLOC_DECLARE(M_TWS); extern int tws_queue_depth; -#define TWS_DRIVER_VERSION_STRING "10.80.00.003" +#define TWS_DRIVER_VERSION_STRING "10.80.00.005" #define TWS_MAX_NUM_UNITS 65 #define TWS_MAX_NUM_LUNS 16 #define TWS_MAX_IRQS 2 @@ -247,7 +247,7 @@ struct tws_softc { struct mtx io_lock; /* IO lock */ struct tws_ioctl_lock ioctl_lock; /* ioctl lock */ u_int32_t seq_id; /* Sequence id */ - int chan; /* wait channel */ + void *chan; /* IOCTL req wait channel */ struct tws_circular_q aen_q; /* aen q */ struct tws_circular_q trace_q; /* trace q */ struct tws_stats stats; /* I/O stats */ @@ -260,6 +260,8 @@ struct tws_softc { void *dma_mem; /* pointer to dmable memory */ u_int64_t dma_mem_phys; /* phy addr */ bus_dma_tag_t data_tag; /* data DMA tag */ + void *ioctl_data_mem; /* ioctl dmable memory */ + bus_dmamap_t ioctl_data_map; /* ioctl data map */ struct tws_request *reqs; /* pointer to requests */ struct tws_sense *sense_bufs; /* pointer to sense buffers */ boolean obfl_q_overrun; /* OBFL overrun flag */ Modified: stable/9/sys/dev/tws/tws_cam.c ============================================================================== --- stable/9/sys/dev/tws/tws_cam.c Sat Oct 20 01:48:49 2012 (r241761) +++ stable/9/sys/dev/tws/tws_cam.c Sat Oct 20 07:38:42 2012 (r241762) @@ -970,6 +970,7 @@ tws_map_request(struct tws_softc *sc, st if (error == EINPROGRESS) { TWS_TRACE(sc, "in progress", 0, error); tws_freeze_simq(sc, req); + error = 0; // EINPROGRESS is not a fatal error. } } else { /* no data involved */ error = tws_submit_command(sc, req); @@ -989,6 +990,10 @@ tws_dmamap_data_load_cbfn(void *arg, bus struct tws_cmd_generic *gcmd; + if ( error ) { + TWS_TRACE(sc, "SOMETHING BAD HAPPENED! error = %d\n", error, 0); + } + if ( error == EFBIG ) { TWS_TRACE(sc, "not enough data segs", 0, nseg); req->error_code = error; @@ -1010,12 +1015,12 @@ tws_dmamap_data_load_cbfn(void *arg, bus gcmd = &req->cmd_pkt->cmd.pkt_g.generic; sgl_ptr = (u_int32_t *)(gcmd) + gcmd->size; gcmd->size += sgls * - ((req->sc->is64bit && !tws_use_32bit_sgls) ? 4 :2 ); + ((req->sc->is64bit && !tws_use_32bit_sgls) ? 4 : 2 ); tws_fill_sg_list(req->sc, (void *)segs, sgl_ptr, sgls); } else { tws_fill_sg_list(req->sc, (void *)segs, - (void *)req->cmd_pkt->cmd.pkt_a.sg_list, sgls); + (void *)&(req->cmd_pkt->cmd.pkt_a.sg_list), sgls); req->cmd_pkt->cmd.pkt_a.lun_h4__sgl_entries |= sgls ; } } @@ -1318,10 +1323,7 @@ tws_reinit(void *arg) tws_turn_on_interrupts(sc); - if ( sc->chan ) { - sc->chan = 0; - wakeup_one((void *)&sc->chan); - } + wakeup_one(sc->chan); } Modified: stable/9/sys/dev/tws/tws_hdm.h ============================================================================== --- stable/9/sys/dev/tws/tws_hdm.h Sat Oct 20 01:48:49 2012 (r241761) +++ stable/9/sys/dev/tws/tws_hdm.h Sat Oct 20 07:38:42 2012 (r241762) @@ -174,7 +174,7 @@ enum tws_sense_severity { #define TWS_FW_CMD_INIT_CONNECTION 0x01 #define TWS_FW_CMD_EXECUTE_SCSI 0x10 -#define TWS_FW_CMD_ATA_PASSTHROUGH 0x11 +#define TWS_FW_CMD_ATA_PASSTHROUGH 0x11 // This is really a PASSTHROUGH for both ATA and SCSI commands. #define TWS_FW_CMD_GET_PARAM 0x12 #define TWS_FW_CMD_SET_PARAM 0x13 Modified: stable/9/sys/dev/tws/tws_user.c ============================================================================== --- stable/9/sys/dev/tws/tws_user.c Sat Oct 20 01:48:49 2012 (r241761) +++ stable/9/sys/dev/tws/tws_user.c Sat Oct 20 07:38:42 2012 (r241762) @@ -94,41 +94,46 @@ tws_passthru(struct tws_softc *sc, void int error; u_int16_t lun4; + if ( tws_get_state(sc) != TWS_ONLINE) { return(EBUSY); } + //============================================================================================== + // Get a command + // do { req = tws_get_request(sc, TWS_REQ_TYPE_PASSTHRU); if ( !req ) { - sc->chan = 1; - error = tsleep((void *)&sc->chan, 0, - "tws_sleep", TWS_IOCTL_TIMEOUT*hz); + sc->chan = (void *)sc; + error = tsleep(sc->chan, 0, "tws_sleep", TWS_IOCTL_TIMEOUT*hz); if ( error == EWOULDBLOCK ) { return(ETIMEDOUT); } } else { + // Make sure we are still ready for new commands... + if ( tws_get_state(sc) != TWS_ONLINE) { + return(EBUSY); + } break; } - }while(1); + } while(1); - req->length = ubuf->driver_pkt.buffer_length; + req->length = (ubuf->driver_pkt.buffer_length + 511) & ~511; TWS_TRACE_DEBUG(sc, "datal,rid", req->length, req->request_id); if ( req->length ) { - req->data = malloc(req->length, M_TWS, M_WAITOK | M_ZERO); - if ( !req->data ) { - TWS_TRACE_DEBUG(sc, "malloc failed", 0, req->request_id); - req->state = TWS_REQ_STATE_FREE; - ubuf->driver_pkt.os_status = ENOMEM; - if ( sc->chan ) { - sc->chan = 0; - wakeup_one((void *)&sc->chan); - } - return(ENOMEM); - } - bzero(req->data, req->length); + req->data = sc->ioctl_data_mem; + req->dma_map = sc->ioctl_data_map; + + //========================================================================================== + // Copy data in from user space + // error = copyin(ubuf->pdata, req->data, req->length); } + + //============================================================================================== + // Set command fields + // req->flags = TWS_DIR_IN | TWS_DIR_OUT; req->cb = tws_passthru_complete; @@ -141,16 +146,22 @@ tws_passthru(struct tws_softc *sc, void req->cmd_pkt->cmd.pkt_a.lun_l4__req_id = lun4 | req->request_id; } else { req->cmd_pkt->cmd.pkt_g.generic.request_id = (u_int8_t) req->request_id; - } + //============================================================================================== + // Send command to controller + // error = tws_map_request(sc, req); if (error) { ubuf->driver_pkt.os_status = error; - goto out; + goto out_data; + } + + if ( req->state == TWS_REQ_STATE_COMPLETE ) { + ubuf->driver_pkt.os_status = req->error_code; + goto out_unmap; } -//================================================================================================== mtx_lock(&sc->gen_lock); error = mtx_sleep(req, &sc->gen_lock, 0, "tws_passthru", TWS_IOCTL_TIMEOUT*hz); mtx_unlock(&sc->gen_lock); @@ -159,6 +170,7 @@ tws_passthru(struct tws_softc *sc, void tws_timeout((void*) req); } +out_unmap: if ( req->error_code == TWS_REQ_RET_RESET ) { error = EBUSY; req->error_code = EBUSY; @@ -167,15 +179,20 @@ tws_passthru(struct tws_softc *sc, void tws_unmap_request(sc, req); + //============================================================================================== + // Return command status to user space + // memcpy(&ubuf->cmd_pkt.hdr, &req->cmd_pkt->hdr, sizeof(struct tws_command_apache)); memcpy(&ubuf->cmd_pkt.cmd, &req->cmd_pkt->cmd, sizeof(struct tws_command_apache)); - if ( !error && req->length ) { - error = copyout(req->data, ubuf->pdata, req->length); - } -//================================================================================================== -out: - free(req->data, M_TWS); +out_data: + if ( req->length ) { + //========================================================================================== + // Copy data out to user space + // + if ( !error ) + error = copyout(req->data, ubuf->pdata, ubuf->driver_pkt.buffer_length); + } if ( error ) TWS_TRACE_DEBUG(sc, "errored", error, 0); @@ -183,12 +200,13 @@ out: if ( req->error_code != TWS_REQ_RET_SUBMIT_SUCCESS ) ubuf->driver_pkt.os_status = error; + //============================================================================================== + // Free command + // req->state = TWS_REQ_STATE_FREE; - if ( sc->chan && (tws_get_state(sc) == TWS_ONLINE) ) { - sc->chan = 0; - wakeup_one((void *)&sc->chan); - } + wakeup_one(sc->chan); + return(error); } From owner-svn-src-stable-9@FreeBSD.ORG Sat Oct 20 09:22:58 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A077DD90; Sat, 20 Oct 2012 09:22:58 +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 84DE08FC17; Sat, 20 Oct 2012 09:22:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9K9MwiJ095771; Sat, 20 Oct 2012 09:22:58 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9K9MwDg095769; Sat, 20 Oct 2012 09:22:58 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210200922.q9K9MwDg095769@svn.freebsd.org> From: Andriy Gapon Date: Sat, 20 Oct 2012 09:22:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241767 - stable/9/usr.bin/make X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Oct 2012 09:22:58 -0000 Author: avg Date: Sat Oct 20 09:22:57 2012 New Revision: 241767 URL: http://svn.freebsd.org/changeset/base/241767 Log: MFC r241280: make: report :M or :N pattern in debug mode Modified: stable/9/usr.bin/make/var.c Directory Properties: stable/9/usr.bin/make/ (props changed) Modified: stable/9/usr.bin/make/var.c ============================================================================== --- stable/9/usr.bin/make/var.c Sat Oct 20 08:23:05 2012 (r241766) +++ stable/9/usr.bin/make/var.c Sat Oct 20 09:22:57 2012 (r241767) @@ -1421,6 +1421,7 @@ modifier_M(VarParser *vp, const char val vp->ptr++; } *ptr = '\0'; + DEBUGF(VAR, ("Pattern :%s\n", patt)); if (modifier == 'M') { newValue = VarModify(value, VarMatch, patt); From owner-svn-src-stable-9@FreeBSD.ORG Sat Oct 20 09:25:29 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 278C61E9; Sat, 20 Oct 2012 09:25:29 +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 0B2B48FC0A; Sat, 20 Oct 2012 09:25:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9K9PSlZ096254; Sat, 20 Oct 2012 09:25:28 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9K9PSUu096252; Sat, 20 Oct 2012 09:25:28 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210200925.q9K9PSUu096252@svn.freebsd.org> From: Andriy Gapon Date: Sat, 20 Oct 2012 09:25:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241769 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Oct 2012 09:25:29 -0000 Author: avg Date: Sat Oct 20 09:25:28 2012 New Revision: 241769 URL: http://svn.freebsd.org/changeset/base/241769 Log: MFC r241297: zvol: set mediasize in geom provider right upon its creation Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Sat Oct 20 09:23:13 2012 (r241768) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Sat Oct 20 09:25:28 2012 (r241769) @@ -481,6 +481,7 @@ zvol_create_minor(const char *name) zvol_state_t *zv; objset_t *os; dmu_object_info_t doi; + uint64_t volsize; int error; ZFS_LOG(1, "Creating ZVOL %s...", name); @@ -541,9 +542,20 @@ zvol_create_minor(const char *name) zv = zs->zss_data = kmem_zalloc(sizeof (zvol_state_t), KM_SLEEP); #else /* !sun */ + error = zap_lookup(os, ZVOL_ZAP_OBJ, "size", 8, 1, &volsize); + if (error) { + ASSERT(error == 0); + dmu_objset_disown(os, zvol_tag); + mutex_exit(&spa_namespace_lock); + return (error); + } + DROP_GIANT(); g_topology_lock(); zv = zvol_geom_create(name); + zv->zv_volsize = volsize; + zv->zv_provider->mediasize = zv->zv_volsize; + #endif /* !sun */ (void) strlcpy(zv->zv_name, name, MAXPATHLEN); From owner-svn-src-stable-9@FreeBSD.ORG Sat Oct 20 17:27:58 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 07EE9A20; Sat, 20 Oct 2012 17:27:58 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E23738FC08; Sat, 20 Oct 2012 17:27:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9KHRvbe075378; Sat, 20 Oct 2012 17:27:57 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9KHRvKE075376; Sat, 20 Oct 2012 17:27:57 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201210201727.q9KHRvKE075376@svn.freebsd.org> From: Hajimu UMEMOTO Date: Sat, 20 Oct 2012 17:27:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241786 - stable/9/etc/periodic/daily X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Oct 2012 17:27:58 -0000 Author: ume Date: Sat Oct 20 17:27:57 2012 New Revision: 241786 URL: http://svn.freebsd.org/changeset/base/241786 Log: MFC r241507: Make a command for pkg_info changeable like pkg_version in /etc/periodic/weekly/400.status-pkg to be friendly with pkgng. Modified: stable/9/etc/periodic/daily/490.status-pkg-changes Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/periodic/daily/490.status-pkg-changes ============================================================================== --- stable/9/etc/periodic/daily/490.status-pkg-changes Sat Oct 20 16:57:23 2012 (r241785) +++ stable/9/etc/periodic/daily/490.status-pkg-changes Sat Oct 20 17:27:57 2012 (r241786) @@ -23,7 +23,7 @@ case "$daily_status_pkg_changes_enable" if [ -f $bak/pkg_info.bak ]; then mv -f $bak/pkg_info.bak $bak/pkg_info.bak2 fi - /usr/sbin/pkg_info > $bak/pkg_info.bak + ${pkg_info:-/usr/sbin/pkg_info} > $bak/pkg_info.bak cmp -sz $bak/pkg_info.bak $bak/pkg_info.bak2 if [ $? -eq 1 ]; then