From owner-svn-src-stable-8@FreeBSD.ORG Sun Jul 11 08:41:31 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09B36106564A; Sun, 11 Jul 2010 08:41:31 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ECD588FC17; Sun, 11 Jul 2010 08:41:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6B8fUjZ025435; Sun, 11 Jul 2010 08:41:30 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6B8fUqI025432; Sun, 11 Jul 2010 08:41:30 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201007110841.o6B8fUqI025432@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 11 Jul 2010 08:41:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209894 - stable/8/sys/compat/freebsd32 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 08:41:31 -0000 Author: kib Date: Sun Jul 11 08:41:30 2010 New Revision: 209894 URL: http://svn.freebsd.org/changeset/base/209894 Log: MFC r209687: Constify source argument for siginfo_to_siginfo32(). Modified: stable/8/sys/compat/freebsd32/freebsd32_misc.c stable/8/sys/compat/freebsd32/freebsd32_signal.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- stable/8/sys/compat/freebsd32/freebsd32_misc.c Sun Jul 11 05:13:38 2010 (r209893) +++ stable/8/sys/compat/freebsd32/freebsd32_misc.c Sun Jul 11 08:41:30 2010 (r209894) @@ -2208,7 +2208,7 @@ freebsd32_thr_suspend(struct thread *td, } void -siginfo_to_siginfo32(siginfo_t *src, struct siginfo32 *dst) +siginfo_to_siginfo32(const siginfo_t *src, struct siginfo32 *dst) { bzero(dst, sizeof(*dst)); dst->si_signo = src->si_signo; Modified: stable/8/sys/compat/freebsd32/freebsd32_signal.h ============================================================================== --- stable/8/sys/compat/freebsd32/freebsd32_signal.h Sun Jul 11 05:13:38 2010 (r209893) +++ stable/8/sys/compat/freebsd32/freebsd32_signal.h Sun Jul 11 08:41:30 2010 (r209894) @@ -96,6 +96,6 @@ struct sigevent32 { } _sigev_un; }; -void siginfo_to_siginfo32(siginfo_t *src, struct siginfo32 *dst); +void siginfo_to_siginfo32(const siginfo_t *src, struct siginfo32 *dst); #endif /* !_COMPAT_FREEBSD32_SIGNAL_H_ */ From owner-svn-src-stable-8@FreeBSD.ORG Sun Jul 11 08:43:31 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7DF48106564A; Sun, 11 Jul 2010 08:43:31 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6D0EA8FC19; Sun, 11 Jul 2010 08:43:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6B8hVqN025941; Sun, 11 Jul 2010 08:43:31 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6B8hV1L025939; Sun, 11 Jul 2010 08:43:31 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201007110843.o6B8hV1L025939@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 11 Jul 2010 08:43:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209895 - stable/8/sys/dev/agp X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 08:43:31 -0000 Author: kib Date: Sun Jul 11 08:43:30 2010 New Revision: 209895 URL: http://svn.freebsd.org/changeset/base/209895 Log: MFC r209793: Do not mention VM_ALLOC_RETRY in comment, and normalize the terminology (blocking -> sleeping). Modified: stable/8/sys/dev/agp/agp.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/agp/agp.c ============================================================================== --- stable/8/sys/dev/agp/agp.c Sun Jul 11 08:41:30 2010 (r209894) +++ stable/8/sys/dev/agp/agp.c Sun Jul 11 08:43:30 2010 (r209895) @@ -537,8 +537,8 @@ agp_generic_bind_memory(device_t dev, st /* * Allocate the pages early, before acquiring the lock, - * because vm_page_grab() used with VM_ALLOC_RETRY may - * block and we can't hold a mutex while blocking. + * because vm_page_grab() may sleep and we can't hold a mutex + * while sleeping. */ VM_OBJECT_LOCK(mem->am_obj); for (i = 0; i < mem->am_size; i += PAGE_SIZE) { From owner-svn-src-stable-8@FreeBSD.ORG Sun Jul 11 09:37:35 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F7041065670; Sun, 11 Jul 2010 09:37:35 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1E40E8FC13; Sun, 11 Jul 2010 09:37:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6B9bZbF037721; Sun, 11 Jul 2010 09:37:35 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6B9bYAu037716; Sun, 11 Jul 2010 09:37:34 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201007110937.o6B9bYAu037716@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 11 Jul 2010 09:37:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209896 - stable/8/sys/vm X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 09:37:35 -0000 Author: kib Date: Sun Jul 11 09:37:34 2010 New Revision: 209896 URL: http://svn.freebsd.org/changeset/base/209896 Log: MFC r209685: Introduce a helper function vm_page_find_least(). Use it in several places, which inline the function. Modified: stable/8/sys/vm/vm_map.c stable/8/sys/vm/vm_object.c stable/8/sys/vm/vm_page.c stable/8/sys/vm/vm_page.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/vm/vm_map.c ============================================================================== --- stable/8/sys/vm/vm_map.c Sun Jul 11 08:43:30 2010 (r209895) +++ stable/8/sys/vm/vm_map.c Sun Jul 11 09:37:34 2010 (r209896) @@ -1740,13 +1740,7 @@ vm_map_pmap_enter(vm_map_t map, vm_offse start = 0; p_start = NULL; - if ((p = TAILQ_FIRST(&object->memq)) != NULL) { - if (p->pindex < pindex) { - p = vm_page_splay(pindex, object->root); - if ((object->root = p)->pindex < pindex) - p = TAILQ_NEXT(p, listq); - } - } + p = vm_page_find_least(object, pindex); /* * Assert: the variable p is either (1) the page with the * least pindex greater than or equal to the parameter pindex Modified: stable/8/sys/vm/vm_object.c ============================================================================== --- stable/8/sys/vm/vm_object.c Sun Jul 11 08:43:30 2010 (r209895) +++ stable/8/sys/vm/vm_object.c Sun Jul 11 09:37:34 2010 (r209896) @@ -1398,13 +1398,7 @@ vm_object_split(vm_map_entry_t entry) orig_object->charge -= ptoa(size); } retry: - if ((m = TAILQ_FIRST(&orig_object->memq)) != NULL) { - if (m->pindex < offidxstart) { - m = vm_page_splay(offidxstart, orig_object->root); - if ((orig_object->root = m)->pindex < offidxstart) - m = TAILQ_NEXT(m, listq); - } - } + m = vm_page_find_least(orig_object, offidxstart); vm_page_lock_queues(); for (; m != NULL && (idx = m->pindex - offidxstart) < size; m = m_next) { @@ -1909,13 +1903,7 @@ vm_object_page_remove(vm_object_t object vm_object_pip_add(object, 1); again: - if ((p = TAILQ_FIRST(&object->memq)) != NULL) { - if (p->pindex < start) { - p = vm_page_splay(start, object->root); - if ((object->root = p)->pindex < start) - p = TAILQ_NEXT(p, listq); - } - } + p = vm_page_find_least(object, start); vm_page_lock_queues(); /* * Assert: the variable p is either (1) the page with the Modified: stable/8/sys/vm/vm_page.c ============================================================================== --- stable/8/sys/vm/vm_page.c Sun Jul 11 08:43:30 2010 (r209895) +++ stable/8/sys/vm/vm_page.c Sun Jul 11 09:37:34 2010 (r209896) @@ -786,6 +786,31 @@ vm_page_lookup(vm_object_t object, vm_pi } /* + * vm_page_find_least: + * + * Returns the page associated with the object with least pindex + * greater than or equal to the parameter pindex, or NULL. + * + * The object must be locked. + * The routine may not block. + */ +vm_page_t +vm_page_find_least(vm_object_t object, vm_pindex_t pindex) +{ + vm_page_t m; + + VM_OBJECT_LOCK_ASSERT(object, MA_OWNED); + if ((m = TAILQ_FIRST(&object->memq)) != NULL) { + if (m->pindex < pindex) { + m = vm_page_splay(pindex, object->root); + if ((object->root = m)->pindex < pindex) + m = TAILQ_NEXT(m, listq); + } + } + return (m); +} + +/* * vm_page_rename: * * Move the given memory entry from its Modified: stable/8/sys/vm/vm_page.h ============================================================================== --- stable/8/sys/vm/vm_page.h Sun Jul 11 08:43:30 2010 (r209895) +++ stable/8/sys/vm/vm_page.h Sun Jul 11 09:37:34 2010 (r209896) @@ -312,6 +312,7 @@ int vm_page_try_to_cache (vm_page_t); int vm_page_try_to_free (vm_page_t); void vm_page_dontneed(vm_page_t); void vm_page_deactivate (vm_page_t); +vm_page_t vm_page_find_least(vm_object_t, vm_pindex_t); void vm_page_insert (vm_page_t, vm_object_t, vm_pindex_t); vm_page_t vm_page_lookup (vm_object_t, vm_pindex_t); void vm_page_remove (vm_page_t); From owner-svn-src-stable-8@FreeBSD.ORG Sun Jul 11 11:58:47 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1EBCF106566B; Sun, 11 Jul 2010 11:58:47 +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 0CED38FC16; Sun, 11 Jul 2010 11:58:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6BBwkhP069924; Sun, 11 Jul 2010 11:58:46 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6BBwkiK069922; Sun, 11 Jul 2010 11:58:46 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007111158.o6BBwkiK069922@svn.freebsd.org> From: Alexander Motin Date: Sun, 11 Jul 2010 11:58:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209897 - stable/8/sys/dev/acpica X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 11:58:47 -0000 Author: mav Date: Sun Jul 11 11:58:46 2010 New Revision: 209897 URL: http://svn.freebsd.org/changeset/base/209897 Log: MFC r209328,r209330: While we indeed can't precisely measure time spent in C1, we can consider measured interval as upper bound. It should be more precise then just assuming 1/(2*hz). For idle CPU it should be quite precise, for busy - not worse then before. Modified: stable/8/sys/dev/acpica/acpi_cpu.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/acpica/acpi_cpu.c ============================================================================== --- stable/8/sys/dev/acpica/acpi_cpu.c Sun Jul 11 09:37:34 2010 (r209896) +++ stable/8/sys/dev/acpica/acpi_cpu.c Sun Jul 11 11:58:46 2010 (r209897) @@ -930,12 +930,16 @@ acpi_cpu_idle() /* * Execute HLT (or equivalent) and wait for an interrupt. We can't - * calculate the time spent in C1 since the place we wake up is an - * ISR. Assume we slept half of quantum and return. + * precisely calculate the time spent in C1 since the place we wake up + * is an ISR. Assume we slept no more then half of quantum. */ if (cx_next->type == ACPI_STATE_C1) { - sc->cpu_prev_sleep = (sc->cpu_prev_sleep * 3 + 500000 / hz) / 4; + AcpiHwRead(&start_time, &AcpiGbl_FADT.XPmTimerBlock); acpi_cpu_c1(); + AcpiHwRead(&end_time, &AcpiGbl_FADT.XPmTimerBlock); + end_time = acpi_TimerDelta(end_time, start_time); + sc->cpu_prev_sleep = (sc->cpu_prev_sleep * 3 + + min(PM_USEC(end_time), 500000 / hz)) / 4; return; } From owner-svn-src-stable-8@FreeBSD.ORG Sun Jul 11 12:06:43 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69E1A106564A; Sun, 11 Jul 2010 12:06:43 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 58CBD8FC1A; Sun, 11 Jul 2010 12:06:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6BC6hZc071782; Sun, 11 Jul 2010 12:06:43 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6BC6h7i071780; Sun, 11 Jul 2010 12:06:43 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007111206.o6BC6h7i071780@svn.freebsd.org> From: Alexander Motin Date: Sun, 11 Jul 2010 12:06:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209898 - stable/8/usr.sbin/moused X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 12:06:43 -0000 Author: mav Date: Sun Jul 11 12:06:42 2010 New Revision: 209898 URL: http://svn.freebsd.org/changeset/base/209898 Log: MFC r209214: When Emulate3Button is active, do not set select() timeout in states when it is not needed. No need to kick CPU every 20ms without a purpose. Modified: stable/8/usr.sbin/moused/moused.c Directory Properties: stable/8/usr.sbin/moused/ (props changed) Modified: stable/8/usr.sbin/moused/moused.c ============================================================================== --- stable/8/usr.sbin/moused/moused.c Sun Jul 11 11:58:46 2010 (r209897) +++ stable/8/usr.sbin/moused/moused.c Sun Jul 11 12:06:42 2010 (r209898) @@ -1090,7 +1090,8 @@ moused(void) FD_SET(rodent.mremcfd, &fds); c = select(FD_SETSIZE, &fds, NULL, NULL, - (rodent.flags & Emulate3Button) ? &timeout : NULL); + ((rodent.flags & Emulate3Button) && + S_DELAYED(mouse_button_state)) ? &timeout : NULL); if (c < 0) { /* error */ logwarn("failed to read from mouse"); continue; From owner-svn-src-stable-8@FreeBSD.ORG Sun Jul 11 15:32:21 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 06717106564A; Sun, 11 Jul 2010 15:32:21 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E87828FC0A; Sun, 11 Jul 2010 15:32:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6BFWKGx016920; Sun, 11 Jul 2010 15:32:20 GMT (envelope-from jamie@svn.freebsd.org) Received: (from jamie@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6BFWKQC016918; Sun, 11 Jul 2010 15:32:20 GMT (envelope-from jamie@svn.freebsd.org) Message-Id: <201007111532.o6BFWKQC016918@svn.freebsd.org> From: Jamie Gritton Date: Sun, 11 Jul 2010 15:32:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209899 - stable/8/usr.sbin/jls X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 15:32:21 -0000 Author: jamie Date: Sun Jul 11 15:32:20 2010 New Revision: 209899 URL: http://svn.freebsd.org/changeset/base/209899 Log: MFC r209820: Properly recognize a number followed by non-digits as a jail name. Call "0" a name because zero is used to indicate no specified jid. Modified: stable/8/usr.sbin/jls/jls.c Directory Properties: stable/8/usr.sbin/jls/ (props changed) Modified: stable/8/usr.sbin/jls/jls.c ============================================================================== --- stable/8/usr.sbin/jls/jls.c Sun Jul 11 12:06:42 2010 (r209898) +++ stable/8/usr.sbin/jls/jls.c Sun Jul 11 15:32:20 2010 (r209899) @@ -84,8 +84,10 @@ main(int argc, char **argv) break; case 'j': jid = strtoul(optarg, &ep, 10); - if (!*optarg || *ep) + if (!jid || *ep) { + jid = 0; jname = optarg; + } break; case 'h': pflags = (pflags & ~(PRINT_SKIP | PRINT_VERBOSE)) | From owner-svn-src-stable-8@FreeBSD.ORG Sun Jul 11 21:47:39 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3CFDD1065672; Sun, 11 Jul 2010 21:47:39 +0000 (UTC) (envelope-from brian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 22C2F8FC1A; Sun, 11 Jul 2010 21:47:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6BLlcio099695; Sun, 11 Jul 2010 21:47:38 GMT (envelope-from brian@svn.freebsd.org) Received: (from brian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6BLlcPS099692; Sun, 11 Jul 2010 21:47:38 GMT (envelope-from brian@svn.freebsd.org) Message-Id: <201007112147.o6BLlcPS099692@svn.freebsd.org> From: Brian Somers Date: Sun, 11 Jul 2010 21:47:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209911 - stable/8/usr.bin/du X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 21:47:39 -0000 Author: brian Date: Sun Jul 11 21:47:38 2010 New Revision: 209911 URL: http://svn.freebsd.org/changeset/base/209911 Log: MFC r209362: Add a -t switch for masking output based on size. PR: 144192 Submitted by: gk Modified: stable/8/usr.bin/du/du.1 stable/8/usr.bin/du/du.c Directory Properties: stable/8/usr.bin/du/ (props changed) Modified: stable/8/usr.bin/du/du.1 ============================================================================== --- stable/8/usr.bin/du/du.1 Sun Jul 11 21:12:42 2010 (r209910) +++ stable/8/usr.bin/du/du.1 Sun Jul 11 21:47:38 2010 (r209911) @@ -42,7 +42,7 @@ .Nm .Op Fl A .Op Fl H | L | P -.Op Fl a | s | d Ar depth +.Op Fl a | s | d Ar depth | Fl t Ar threshold .Op Fl c .Op Fl l .Op Fl h | k | m | B Ar blocksize @@ -107,6 +107,14 @@ This option exists solely for conformanc Display an entry for each specified file. (Equivalent to .Fl d Li 0 ) +.It Fl t Ar threshold +Display only entries for which size exceeds +.Ar threshold . +If +.Ar threshold +is negative, display only entries for which size is less than the absolute +value of +.Ar threshold . .It Fl d Ar depth Display an entry for all files and directories .Ar depth Modified: stable/8/usr.bin/du/du.c ============================================================================== --- stable/8/usr.bin/du/du.c Sun Jul 11 21:12:42 2010 (r209910) +++ stable/8/usr.bin/du/du.c Sun Jul 11 21:47:38 2010 (r209911) @@ -90,6 +90,7 @@ main(int argc, char *argv[]) FTS *fts; FTSENT *p; off_t savednumber, curblocks; + off_t threshold, threshold_sign; int ftsoptions; int listall; int depth; @@ -106,12 +107,14 @@ main(int argc, char *argv[]) save = argv; ftsoptions = 0; savednumber = 0; + threshold = 0; + threshold_sign = 1; cblocksize = DEV_BSIZE; blocksize = 0; depth = INT_MAX; SLIST_INIT(&ignores); - while ((ch = getopt(argc, argv, "AB:HI:LPasd:chklmnrx")) != -1) + while ((ch = getopt(argc, argv, "AB:HI:LPasd:chklmnrt:x")) != -1) switch (ch) { case 'A': Aflag = 1; @@ -179,6 +182,14 @@ main(int argc, char *argv[]) break; case 'r': /* Compatibility. */ break; + case 't' : + if (expand_number(optarg, &threshold) != 0 || + threshold == 0) { + warnx("invalid threshold: %s", optarg); + usage(); + } else if (threshold < 0) + threshold_sign = -1; + break; case 'x': ftsoptions |= FTS_XDEV; break; @@ -248,6 +259,10 @@ main(int argc, char *argv[]) blocksize /= DEV_BSIZE; } + if (threshold != 0) + threshold = howmany(threshold / DEV_BSIZE * cblocksize, + blocksize); + rval = 0; (void)signal(SIGINFO, siginfo); @@ -271,7 +286,9 @@ main(int argc, char *argv[]) p->fts_parent->fts_bignum += p->fts_bignum += curblocks; - if (p->fts_level <= depth) { + if (p->fts_level <= depth && threshold <= + threshold_sign * howmany(p->fts_bignum * + cblocksize, blocksize)) { if (hflag) { prthumanval(p->fts_bignum); (void)printf("\t%s\n", p->fts_path); From owner-svn-src-stable-8@FreeBSD.ORG Sun Jul 11 21:50:06 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E1EC1065673; Sun, 11 Jul 2010 21:50:06 +0000 (UTC) (envelope-from brian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2EC8A8FC13; Sun, 11 Jul 2010 21:50:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6BLo679000378; Sun, 11 Jul 2010 21:50:06 GMT (envelope-from brian@svn.freebsd.org) Received: (from brian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6BLo6sG000375; Sun, 11 Jul 2010 21:50:06 GMT (envelope-from brian@svn.freebsd.org) Message-Id: <201007112150.o6BLo6sG000375@svn.freebsd.org> From: Brian Somers Date: Sun, 11 Jul 2010 21:50:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209912 - stable/8/bin/pkill X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 21:50:06 -0000 Author: brian Date: Sun Jul 11 21:50:05 2010 New Revision: 209912 URL: http://svn.freebsd.org/changeset/base/209912 Log: MFC r209363: Recognise the -l switch in pkill. PR: 143558 Submitted by: eitanadlerlist at gmail dot com Modified: stable/8/bin/pkill/pkill.1 stable/8/bin/pkill/pkill.c Directory Properties: stable/8/bin/pkill/ (props changed) Modified: stable/8/bin/pkill/pkill.1 ============================================================================== --- stable/8/bin/pkill/pkill.1 Sun Jul 11 21:47:38 2010 (r209911) +++ stable/8/bin/pkill/pkill.1 Sun Jul 11 21:50:05 2010 (r209912) @@ -163,14 +163,16 @@ The value matches processes not in jail. .It Fl l Long output. -Print the process name in addition to the process ID for each matching +For +.Nm pgrep , +print the process name in addition to the process ID for each matching process. If used in conjunction with .Fl f , print the process ID and the full argument list for each matching process. -This option can only be used with the -.Nm pgrep -command. +For +.Nm pkill , +display the kill command used for each process killed. .It Fl n Select only the newest (most recently started) of the matching processes. .It Fl o Modified: stable/8/bin/pkill/pkill.c ============================================================================== --- stable/8/bin/pkill/pkill.c Sun Jul 11 21:47:38 2010 (r209911) +++ stable/8/bin/pkill/pkill.c Sun Jul 11 21:50:05 2010 (r209912) @@ -133,7 +133,7 @@ main(int argc, char **argv) { char buf[_POSIX2_LINE_MAX], *mstr, **pargv, *p, *q, *pidfile; const char *execf, *coref; - int ancestors, debug_opt; + int ancestors, debug_opt, did_action; int i, ch, bestidx, rv, criteria, pidfromfile, pidfilelock; size_t jsz; int (*action)(const struct kinfo_proc *); @@ -246,8 +246,6 @@ main(int argc, char **argv) criteria = 1; break; case 'l': - if (!pgrep) - usage(); longfmt = 1; break; case 'n': @@ -529,16 +527,24 @@ main(int argc, char **argv) /* * Take the appropriate action for each matched process, if any. */ + did_action = 0; for (i = 0, rv = 0, kp = plist; i < nproc; i++, kp++) { if (PSKIP(kp)) continue; if (selected[i]) { + if (longfmt && !pgrep) { + did_action = 1; + printf("kill -%d %d\n", signum, kp->ki_pid); + } if (inverse) continue; } else if (!inverse) continue; rv |= (*action)(kp); } + if (!did_action && !pgrep && longfmt) + fprintf(stderr, + "No matching processes belonging to you were found\n"); exit(rv ? STATUS_MATCH : STATUS_NOMATCH); } @@ -551,7 +557,7 @@ usage(void) if (pgrep) ustr = "[-LSfilnovx] [-d delim]"; else - ustr = "[-signal] [-ILfinovx]"; + ustr = "[-signal] [-ILfilnovx]"; fprintf(stderr, "usage: %s %s [-F pidfile] [-G gid] [-M core] [-N system]\n" From owner-svn-src-stable-8@FreeBSD.ORG Sun Jul 11 22:00:40 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9DDC5106567B; Sun, 11 Jul 2010 22:00:40 +0000 (UTC) (envelope-from brian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8BDBF8FC08; Sun, 11 Jul 2010 22:00:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6BM0evY002860; Sun, 11 Jul 2010 22:00:40 GMT (envelope-from brian@svn.freebsd.org) Received: (from brian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6BM0eOr002854; Sun, 11 Jul 2010 22:00:40 GMT (envelope-from brian@svn.freebsd.org) Message-Id: <201007112200.o6BM0eOr002854@svn.freebsd.org> From: Brian Somers Date: Sun, 11 Jul 2010 22:00:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209914 - stable/8/sbin/fsck_msdosfs X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 22:00:40 -0000 Author: brian Date: Sun Jul 11 22:00:40 2010 New Revision: 209914 URL: http://svn.freebsd.org/changeset/base/209914 Log: MFC r209364: Fix some (not all) style(9) and casting errors. PR: 209364 Submitted by: giffunip at tutopia dot com Obtained from: NetBSD Modified: stable/8/sbin/fsck_msdosfs/Makefile stable/8/sbin/fsck_msdosfs/boot.c stable/8/sbin/fsck_msdosfs/check.c stable/8/sbin/fsck_msdosfs/dir.c stable/8/sbin/fsck_msdosfs/fat.c Directory Properties: stable/8/sbin/fsck_msdosfs/ (props changed) Modified: stable/8/sbin/fsck_msdosfs/Makefile ============================================================================== --- stable/8/sbin/fsck_msdosfs/Makefile Sun Jul 11 21:57:18 2010 (r209913) +++ stable/8/sbin/fsck_msdosfs/Makefile Sun Jul 11 22:00:40 2010 (r209914) @@ -9,6 +9,6 @@ MAN= fsck_msdosfs.8 SRCS= main.c check.c boot.c fat.c dir.c fsutil.c CFLAGS+= -I${FSCK} -WARNS?= 0 +WARNS?= 2 .include Modified: stable/8/sbin/fsck_msdosfs/boot.c ============================================================================== --- stable/8/sbin/fsck_msdosfs/boot.c Sun Jul 11 21:57:18 2010 (r209913) +++ stable/8/sbin/fsck_msdosfs/boot.c Sun Jul 11 22:00:40 2010 (r209914) @@ -48,13 +48,14 @@ readboot(int dosfs, struct bootblock *bo int ret = FSOK; int i; - if ((size_t)read(dosfs, block, sizeof block) != sizeof block) { + if (read(dosfs, block, sizeof block) != sizeof block) { perror("could not read boot block"); return FSFATAL; } if (block[510] != 0x55 || block[511] != 0xaa) { - pfatal("Invalid signature in boot block: %02x%02x", block[511], block[510]); + pfatal("Invalid signature in boot block: %02x%02x", + block[511], block[510]); return FSFATAL; } @@ -72,8 +73,10 @@ readboot(int dosfs, struct bootblock *bo boot->bpbFATsmall = block[22] + (block[23] << 8); boot->SecPerTrack = block[24] + (block[25] << 8); boot->bpbHeads = block[26] + (block[27] << 8); - boot->bpbHiddenSecs = block[28] + (block[29] << 8) + (block[30] << 16) + (block[31] << 24); - boot->bpbHugeSectors = block[32] + (block[33] << 8) + (block[34] << 16) + (block[35] << 24); + boot->bpbHiddenSecs = block[28] + (block[29] << 8) + + (block[30] << 16) + (block[31] << 24); + boot->bpbHugeSectors = block[32] + (block[33] << 8) + + (block[34] << 16) + (block[35] << 24); boot->FATsecs = boot->bpbFATsmall; @@ -97,10 +100,9 @@ readboot(int dosfs, struct bootblock *bo boot->bpbFSInfo = block[48] + (block[49] << 8); boot->bpbBackup = block[50] + (block[51] << 8); - if (lseek(dosfs, boot->bpbFSInfo * boot->bpbBytesPerSec, SEEK_SET) - != boot->bpbFSInfo * boot->bpbBytesPerSec - || read(dosfs, fsinfo, sizeof fsinfo) - != sizeof fsinfo) { + if (lseek(dosfs, boot->bpbFSInfo * boot->bpbBytesPerSec, + SEEK_SET) != boot->bpbFSInfo * boot->bpbBytesPerSec + || read(dosfs, fsinfo, sizeof fsinfo) != sizeof fsinfo) { perror("could not read fsinfo block"); return FSFATAL; } @@ -124,7 +126,8 @@ readboot(int dosfs, struct bootblock *bo fsinfo[0x3fc] = fsinfo[0x3fd] = 0; fsinfo[0x3fe] = 0x55; fsinfo[0x3ff] = 0xaa; - if (lseek(dosfs, boot->bpbFSInfo * boot->bpbBytesPerSec, SEEK_SET) + if (lseek(dosfs, boot->bpbFSInfo * + boot->bpbBytesPerSec, SEEK_SET) != boot->bpbFSInfo * boot->bpbBytesPerSec || write(dosfs, fsinfo, sizeof fsinfo) != sizeof fsinfo) { @@ -144,7 +147,8 @@ readboot(int dosfs, struct bootblock *bo + (fsinfo[0x1ef] << 24); } - if (lseek(dosfs, boot->bpbBackup * boot->bpbBytesPerSec, SEEK_SET) + if (lseek(dosfs, boot->bpbBackup * boot->bpbBytesPerSec, + SEEK_SET) != boot->bpbBackup * boot->bpbBytesPerSec || read(dosfs, backup, sizeof backup) != sizeof backup) { perror("could not read backup bootblock"); @@ -172,11 +176,10 @@ readboot(int dosfs, struct bootblock *bo /* Check backup bpbFSInfo? XXX */ } - boot->ClusterOffset = (boot->bpbRootDirEnts * 32 + boot->bpbBytesPerSec - 1) - / boot->bpbBytesPerSec - + boot->bpbResSectors - + boot->bpbFATs * boot->FATsecs - - CLUST_FIRST * boot->bpbSecPerClust; + boot->ClusterOffset = (boot->bpbRootDirEnts * 32 + + boot->bpbBytesPerSec - 1) / boot->bpbBytesPerSec + + boot->bpbResSectors + boot->bpbFATs * boot->FATsecs - + CLUST_FIRST * boot->bpbSecPerClust; if (boot->bpbBytesPerSec % DOSBOOTBLOCKSIZE != 0) { pfatal("Invalid sector size: %u", boot->bpbBytesPerSec); @@ -191,7 +194,8 @@ readboot(int dosfs, struct bootblock *bo boot->NumSectors = boot->bpbSectors; } else boot->NumSectors = boot->bpbHugeSectors; - boot->NumClusters = (boot->NumSectors - boot->ClusterOffset) / boot->bpbSecPerClust; + boot->NumClusters = (boot->NumSectors - boot->ClusterOffset) / + boot->bpbSecPerClust; if (boot->flags&FAT32) boot->ClustMask = CLUST32_MASK; Modified: stable/8/sbin/fsck_msdosfs/check.c ============================================================================== --- stable/8/sbin/fsck_msdosfs/check.c Sun Jul 11 21:57:18 2010 (r209913) +++ stable/8/sbin/fsck_msdosfs/check.c Sun Jul 11 22:00:40 2010 (r209914) @@ -98,7 +98,7 @@ checkfilesys(const char *fname) } if (boot.ValidFat < 0) - for (i = 1; i < (int)boot.bpbFATs; i++) { + for (i = 1; i < boot.bpbFATs; i++) { struct fatEntry *currentFat; mod |= readfat(dosfs, &boot, i, ¤tFat); Modified: stable/8/sbin/fsck_msdosfs/dir.c ============================================================================== --- stable/8/sbin/fsck_msdosfs/dir.c Sun Jul 11 21:57:18 2010 (r209913) +++ stable/8/sbin/fsck_msdosfs/dir.c Sun Jul 11 22:00:40 2010 (r209914) @@ -242,7 +242,8 @@ resetDosDirSection(struct bootblock *boo memset(rootDir, 0, sizeof *rootDir); if (boot->flags & FAT32) { - if (boot->bpbRootClust < CLUST_FIRST || boot->bpbRootClust >= boot->NumClusters) { + if (boot->bpbRootClust < CLUST_FIRST || + boot->bpbRootClust >= boot->NumClusters) { pfatal("Root directory starts with cluster out of range(%u)", boot->bpbRootClust); return FSFATAL; @@ -356,7 +357,8 @@ removede(int f, struct bootblock *boot, pwarn("Invalid long filename entry for %s\n", path); break; case 1: - pwarn("Invalid long filename entry at end of directory %s\n", path); + pwarn("Invalid long filename entry at end of directory %s\n", + path); break; case 2: pwarn("Invalid long filename entry for volume label\n"); @@ -418,7 +420,8 @@ checksize(struct bootblock *boot, struct cl_t cl; u_int32_t sz = 0; - for (cl = dir->head; (sz += boot->ClusterSize) < dir->size;) + for (cl = dir->head; (sz += boot->ClusterSize) < + dir->size;) cl = fat[cl].next; clearchain(boot, fat, fat[cl].next); fat[cl].next = CLUST_EOF; @@ -462,7 +465,8 @@ readDosDirSection(int f, struct bootbloc do { if (!(boot->flags & FAT32) && !dir->parent) { last = boot->bpbRootDirEnts * 32; - off = boot->bpbResSectors + boot->bpbFATs * boot->FATsecs; + off = boot->bpbResSectors + boot->bpbFATs * + boot->FATsecs; } else { last = boot->bpbSecPerClust * boot->bpbBytesPerSec; off = cl * boot->bpbSecPerClust + boot->ClusterOffset; @@ -547,7 +551,8 @@ readDosDirSection(int f, struct bootbloc } lidx = *p & LRNOMASK; t = longName + --lidx * 13; - for (k = 1; k < 11 && t < longName + sizeof(longName); k += 2) { + for (k = 1; k < 11 && t < longName + + sizeof(longName); k += 2) { if (!p[k] && !p[k + 1]) break; *t++ = p[k]; Modified: stable/8/sbin/fsck_msdosfs/fat.c ============================================================================== --- stable/8/sbin/fsck_msdosfs/fat.c Sun Jul 11 21:57:18 2010 (r209913) +++ stable/8/sbin/fsck_msdosfs/fat.c Sun Jul 11 22:00:40 2010 (r209914) @@ -87,7 +87,8 @@ checkdirty(int fs, struct bootblock *boo goto err; } - if (read(fs, buffer, boot->bpbBytesPerSec) != boot->bpbBytesPerSec) { + if ((size_t)read(fs, buffer, boot->bpbBytesPerSec) != + boot->bpbBytesPerSec) { perror("Unable to read FAT"); goto err; } From owner-svn-src-stable-8@FreeBSD.ORG Sun Jul 11 22:21:57 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC6ED1065673; Sun, 11 Jul 2010 22:21:57 +0000 (UTC) (envelope-from prvs=1801176ddd=brian@FreeBSD.org) Received: from idcmail-mo1so.shaw.ca (idcmail-mo1so.shaw.ca [24.71.223.10]) by mx1.freebsd.org (Postfix) with ESMTP id 5D4F58FC1D; Sun, 11 Jul 2010 22:21:57 +0000 (UTC) Received: from pd2ml2so-ssvc.prod.shaw.ca ([10.0.141.134]) by pd4mo1so-svcs.prod.shaw.ca with ESMTP; 11 Jul 2010 16:06:55 -0600 X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.0 c=1 a=mCksn8_hFU4A:10 a=GQCbJdZ--msA:10 a=VphdPIyG4kEA:10 a=MJPcHhXccCG8eBs0us8XwA==:17 a=6I5d2MoRAAAA:8 a=MMwg4So0AAAA:8 a=bd7IDAi0-ZDYeuW7M-UA:9 a=F9igkWxnUqcy4EHKhtmOcIYkDzcA:4 a=CjuIK1q_8ugA:10 a=SV7veod9ZcQA:10 a=WJ3hkfHDukgA:10 a=G6Xa6MHMmJWYdZj8RcwA:9 a=zpWoPG6VeUw2chfNiS9WS18IvPoA:4 Received: from unknown (HELO store.lan.Awfulhak.org) ([70.79.162.198]) by pd2ml2so-dmz.prod.shaw.ca with ESMTP; 11 Jul 2010 16:06:55 -0600 Received: from store.lan.Awfulhak.org (localhost.localdomain [127.0.0.1]) by localhost (Email Security Appliance) with SMTP id 199C7C433AB_C3A407FB; Sun, 11 Jul 2010 22:06:55 +0000 (GMT) Received: from gw.Awfulhak.org (gw.lan.Awfulhak.org [172.16.0.1]) by store.lan.Awfulhak.org (Sophos Email Appliance) with ESMTP id BCB6CC460F7_C3A4076F; Sun, 11 Jul 2010 22:06:46 +0000 (GMT) Received: from dev.lan.Awfulhak.org (brian@dev.lan.Awfulhak.org [172.16.0.5]) by gw.Awfulhak.org (8.14.4/8.14.4) with ESMTP id o6BM6kXK086266; Sun, 11 Jul 2010 15:06:46 -0700 (PDT) (envelope-from brian@FreeBSD.org) Date: Sun, 11 Jul 2010 15:06:39 -0700 From: Brian Somers To: Brian Somers Message-ID: <20100711150639.33332f50@dev.lan.Awfulhak.org> In-Reply-To: <201007112200.o6BM0eOr002854@svn.freebsd.org> References: <201007112200.o6BM0eOr002854@svn.freebsd.org> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.20.1; i386-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/7gYmYysv1mGm9zA3O8OSqS1"; protocol="application/pgp-signature" Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-8@FreeBSD.org Subject: Re: svn commit: r209914 - stable/8/sbin/fsck_msdosfs X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 22:21:57 -0000 --Sig_/7gYmYysv1mGm9zA3O8OSqS1 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Sun, 11 Jul 2010 22:00:40 +0000 (UTC) Brian Somers w= rote: > Author: brian > Date: Sun Jul 11 22:00:40 2010 > New Revision: 209914 > URL: http://svn.freebsd.org/changeset/base/209914 >=20 > Log: > MFC r209364: Fix some (not all) style(9) and casting errors. > =20 > PR: 209364 > Submitted by: giffunip at tutopia dot com > Obtained from: NetBSD Oops, that would be PR 142384 --=20 Brian Somers Don't _EVER_ lose your sense of humour ! --Sig_/7gYmYysv1mGm9zA3O8OSqS1 Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iQCVAwUBTDpAdQ7tvOdmanQhAQI4sQP8DuZyBJwdbbzZCHH2NlzAflL/ZGOF2tym CO/WcuoT8cm+P04g+RaSkaZrIPhpSMUh4Q6XIoHcOBNE1GdtanXbPnFfP2Qy++j8 RsVlk6kbwdpoJ56Pyn0sUMqJyW2eoKtAHbmCpyIO55ouVUOWcsjUefy3Qo3JH8MV m1rRaHjVmkY= =ACB4 -----END PGP SIGNATURE----- --Sig_/7gYmYysv1mGm9zA3O8OSqS1-- From owner-svn-src-stable-8@FreeBSD.ORG Mon Jul 12 01:15:57 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E6144106564A; Mon, 12 Jul 2010 01:15:57 +0000 (UTC) (envelope-from jhellenthal@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 96D148FC0C; Mon, 12 Jul 2010 01:15:57 +0000 (UTC) Received: by iwn35 with SMTP id 35so5124843iwn.13 for ; Sun, 11 Jul 2010 18:15:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:openpgp:content-type:content-transfer-encoding; bh=kxRV5reksyCK7BnPcWGmzDpfYGB+hsak6yEIMSY1FrY=; b=MOhaXphWdPcklHY/62XkYuzhQV3Vm1sjAMroMcgwgUUf+Nvru0ra5am2uwzvCxg746 Yp/ivQDFOWeZSdqFlACwC9BoTsjeAcOwNlP8gBuNdkz2fnAy35GTF3yhnKMcsla7EZ34 rDRHLTtOxk0jj1P8moCS79/5+sUV4jTgScwH4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:openpgp:content-type :content-transfer-encoding; b=ikViI/ZBsGsh8337gn9APGMpuaU7ylUdJ3eCZBuBmuc7z2g7ppfd75aohXxyzqkg+3 W5TscgIVBvcNYLcpfjtfnzJpkVZB3eDY0BvhPEDDLSqsB7o7RZ+DgXfoCZozVtrxVgGm NGEIbmiPXKW1wE9/iMTCCojlffTtVgOFTOaaM= Received: by 10.231.176.74 with SMTP id bd10mr14343653ibb.38.1278895952530; Sun, 11 Jul 2010 17:52:32 -0700 (PDT) Received: from centel.dataix.local (adsl-99-181-132-254.dsl.klmzmi.sbcglobal.net [99.181.132.254]) by mx.google.com with ESMTPS id h8sm16859750ibk.15.2010.07.11.17.52.31 (version=SSLv3 cipher=RC4-MD5); Sun, 11 Jul 2010 17:52:31 -0700 (PDT) Sender: "J. Hellenthal" Message-ID: <4C3A6751.10706@dataix.net> Date: Sun, 11 Jul 2010 20:52:33 -0400 From: jhell User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.10) Gecko/20100626 Thunderbird MIME-Version: 1.0 To: Brian Somers References: <201007112150.o6BLo6sG000375@svn.freebsd.org> In-Reply-To: <201007112150.o6BLo6sG000375@svn.freebsd.org> X-Enigmail-Version: 1.0.1 OpenPGP: id=89D8547E Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r209912 - stable/8/bin/pkill X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 01:15:58 -0000 On 07/11/2010 17:50, Brian Somers wrote: > Author: brian > Date: Sun Jul 11 21:50:05 2010 > New Revision: 209912 > URL: http://svn.freebsd.org/changeset/base/209912 > > Log: > MFC r209363: Recognise the -l switch in pkill. > > PR: 143558 > Submitted by: eitanadlerlist at gmail dot com > > Modified: > stable/8/bin/pkill/pkill.1 > stable/8/bin/pkill/pkill.c > Directory Properties: > stable/8/bin/pkill/ (props changed) > pkill.1 seems to be missing this: Index: bin/pkill/pkill.1 =================================================================== --- bin/pkill/pkill.1 (revision 209914) +++ bin/pkill/pkill.1 (working copy) @@ -60,7 +60,7 @@ .Ar pattern ... .Nm pkill .Op Fl Ar signal -.Op Fl ILafinovx +.Op Fl ILafilnovx .Op Fl F Ar pidfile .Op Fl G Ar gid .Op Fl M Ar core Regards, -- +-+-+-+-+-+ |j|h|e|l|l| +-+-+-+-+-+ From owner-svn-src-stable-8@FreeBSD.ORG Mon Jul 12 02:14:58 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 697861065672; Mon, 12 Jul 2010 02:14:58 +0000 (UTC) (envelope-from prvs=1802c963e0=brian@FreeBSD.org) Received: from idcmail-mo1so.shaw.ca (idcmail-mo1so.shaw.ca [24.71.223.10]) by mx1.freebsd.org (Postfix) with ESMTP id 0633D8FC12; Mon, 12 Jul 2010 02:14:57 +0000 (UTC) Received: from pd3ml2so-ssvc.prod.shaw.ca ([10.0.141.138]) by pd4mo1so-svcs.prod.shaw.ca with ESMTP; 11 Jul 2010 19:59:55 -0600 X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.0 c=1 a=C6e8xTDxqcAA:10 a=ood2b7iyd8MA:10 a=VphdPIyG4kEA:10 a=MJPcHhXccCG8eBs0us8XwA==:17 a=M0VwM5ZyAAAA:8 a=6I5d2MoRAAAA:8 a=MMwg4So0AAAA:8 a=Gci9jjv9tJG093HpwtEA:9 a=SZwgGkJAXgEfl1eD0sIA:7 a=siBKn-I81DD3d6GDyzl5tM_mYuMA:4 a=CjuIK1q_8ugA:10 a=Xclt7nbD0wcA:10 a=WJ3hkfHDukgA:10 a=SV7veod9ZcQA:10 a=VY_0lvSfBLkAIJH0FLAA:9 a=I-pMi3SnrkagR67ZpxZ7sAeC5WEA:4 Received: from unknown (HELO store.lan.Awfulhak.org) ([70.79.162.198]) by pd3ml2so-dmz.prod.shaw.ca with ESMTP; 11 Jul 2010 19:59:55 -0600 Received: from store.lan.Awfulhak.org (localhost.localdomain [127.0.0.1]) by localhost (Email Security Appliance) with SMTP id 250D4C433AB_C3A771BB; Mon, 12 Jul 2010 01:59:55 +0000 (GMT) Received: from gw.Awfulhak.org (gw.lan.Awfulhak.org [172.16.0.1]) by store.lan.Awfulhak.org (Sophos Email Appliance) with ESMTP id C5203C460FA_C3A7712F; Mon, 12 Jul 2010 01:59:46 +0000 (GMT) Received: from dev.lan.Awfulhak.org (brian@dev.lan.Awfulhak.org [172.16.0.5]) by gw.Awfulhak.org (8.14.4/8.14.4) with ESMTP id o6C1xkaJ095691; Sun, 11 Jul 2010 18:59:46 -0700 (PDT) (envelope-from brian@FreeBSD.org) Date: Sun, 11 Jul 2010 18:59:39 -0700 From: Brian Somers To: jhell Message-ID: <20100711185939.07ed26f8@dev.lan.Awfulhak.org> In-Reply-To: <4C3A6751.10706@dataix.net> References: <201007112150.o6BLo6sG000375@svn.freebsd.org> <4C3A6751.10706@dataix.net> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.20.1; i386-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/uXOrbyiUdVxNZpTWQO5X9MB"; protocol="application/pgp-signature" Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-8@FreeBSD.org Subject: Re: svn commit: r209912 - stable/8/bin/pkill X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 02:14:58 -0000 --Sig_/uXOrbyiUdVxNZpTWQO5X9MB Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Oops, thanks for the heads up. I've updated head and will merge the change back into 8 in three days. Chers. On Sun, 11 Jul 2010 20:52:33 -0400 jhell wrote: > On 07/11/2010 17:50, Brian Somers wrote: > > Author: brian > > Date: Sun Jul 11 21:50:05 2010 > > New Revision: 209912 > > URL: http://svn.freebsd.org/changeset/base/209912 > >=20 > > Log: > > MFC r209363: Recognise the -l switch in pkill. > > =20 > > PR: 143558 > > Submitted by: eitanadlerlist at gmail dot com > >=20 > > Modified: > > stable/8/bin/pkill/pkill.1 > > stable/8/bin/pkill/pkill.c > > Directory Properties: > > stable/8/bin/pkill/ (props changed) > >=20 >=20 > pkill.1 seems to be missing this: >=20 > Index: bin/pkill/pkill.1 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- bin/pkill/pkill.1 (revision 209914) > +++ bin/pkill/pkill.1 (working copy) > @@ -60,7 +60,7 @@ > .Ar pattern ... > .Nm pkill > .Op Fl Ar signal > -.Op Fl ILafinovx > +.Op Fl ILafilnovx > .Op Fl F Ar pidfile > .Op Fl G Ar gid > .Op Fl M Ar core >=20 >=20 > Regards, >=20 > --=20 >=20 > +-+-+-+-+-+ > |j|h|e|l|l| > +-+-+-+-+-+ >=20 --=20 Brian Somers Don't _EVER_ lose your sense of humour ! --Sig_/uXOrbyiUdVxNZpTWQO5X9MB Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iQCVAwUBTDp3EQ7tvOdmanQhAQLuPQQAnYKCdMeHr9RL+XSpjDI2ft3OWes7g+ru cjX5ciSxChd7o55Wt1wspP7Mqq2QLgdRHwAQbLphp8fhWb1rJ1dBQJnPQZ/nNz8j QALM14C+LPzJqY8tQb+IAXfAnr2sMAtU4UDYzQl10FdJlcJ3571uP+P2UVzHfM6a pryJb8zJKZ4= =+mS2 -----END PGP SIGNATURE----- --Sig_/uXOrbyiUdVxNZpTWQO5X9MB-- From owner-svn-src-stable-8@FreeBSD.ORG Mon Jul 12 10:11:10 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ABDA3106566B; Mon, 12 Jul 2010 10:11:10 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 815F88FC1C; Mon, 12 Jul 2010 10:11:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6CABA1w065236; Mon, 12 Jul 2010 10:11:10 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6CABAng065234; Mon, 12 Jul 2010 10:11:10 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201007121011.o6CABAng065234@svn.freebsd.org> From: Attilio Rao Date: Mon, 12 Jul 2010 10:11:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209931 - stable/8/sys/kern X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 10:11:10 -0000 Author: attilio Date: Mon Jul 12 10:11:10 2010 New Revision: 209931 URL: http://svn.freebsd.org/changeset/base/209931 Log: MFC r209577, r209761: - Fix a lock leak in case the ticks wrapped up - Simplify the logic for handling ticks wrap-ups - Fix a bug where a thread may be in sleepign state but not on a sleepqueue chain still. Sponsored by: Sandvine Incorporated Modified: stable/8/sys/kern/kern_clock.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/kern/kern_clock.c ============================================================================== --- stable/8/sys/kern/kern_clock.c Mon Jul 12 09:38:44 2010 (r209930) +++ stable/8/sys/kern/kern_clock.c Mon Jul 12 10:11:10 2010 (r209931) @@ -202,8 +202,14 @@ deadlkres(void) FOREACH_PROC_IN_SYSTEM(p) { PROC_LOCK(p); FOREACH_THREAD_IN_PROC(p, td) { + + /* + * Once a thread is found in "interesting" + * state a possible ticks wrap-up needs to be + * checked. + */ thread_lock(td); - if (TD_ON_LOCK(td)) { + if (TD_ON_LOCK(td) && ticks < td->td_blktick) { /* * The thread should be blocked on a @@ -212,9 +218,6 @@ deadlkres(void) */ MPASS(td->td_blocked != NULL); - /* Handle ticks wrap-up. */ - if (ticks < td->td_blktick) - continue; tticks = ticks - td->td_blktick; thread_unlock(td); if (tticks > blkticks) { @@ -230,11 +233,9 @@ deadlkres(void) panic("%s: possible deadlock detected for %p, blocked for %d ticks\n", __func__, td, tticks); } - } else if (TD_IS_SLEEPING(td)) { - - /* Handle ticks wrap-up. */ - if (ticks < td->td_blktick) - continue; + } else if (TD_IS_SLEEPING(td) && + TD_ON_SLEEPQ(td) && + ticks < td->td_blktick) { /* * Check if the thread is sleeping on a From owner-svn-src-stable-8@FreeBSD.ORG Mon Jul 12 14:24:21 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F38E1065672; Mon, 12 Jul 2010 14:24:21 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1DE758FC15; Mon, 12 Jul 2010 14:24:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6CEOKhm021753; Mon, 12 Jul 2010 14:24:20 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6CEOKY7021751; Mon, 12 Jul 2010 14:24:20 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201007121424.o6CEOKY7021751@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 12 Jul 2010 14:24:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209947 - stable/8/sys/powerpc/aim X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 14:24:21 -0000 Author: nwhitehorn Date: Mon Jul 12 14:24:20 2010 New Revision: 209947 URL: http://svn.freebsd.org/changeset/base/209947 Log: MFC r209853: The number after 2 is 3, not 4. Modified: stable/8/sys/powerpc/aim/platform_chrp.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/powerpc/aim/platform_chrp.c ============================================================================== --- stable/8/sys/powerpc/aim/platform_chrp.c Mon Jul 12 14:19:23 2010 (r209946) +++ stable/8/sys/powerpc/aim/platform_chrp.c Mon Jul 12 14:24:20 2010 (r209947) @@ -241,7 +241,7 @@ chrp_smp_start_cpu(platform_t plat, stru case 2: reset += 0x0f; break; - case 4: + case 3: reset += 0x10; break; default: From owner-svn-src-stable-8@FreeBSD.ORG Mon Jul 12 17:46:20 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7339C106564A; Mon, 12 Jul 2010 17:46:20 +0000 (UTC) (envelope-from remko@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 48C178FC0C; Mon, 12 Jul 2010 17:46:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6CHkKQm067211; Mon, 12 Jul 2010 17:46:20 GMT (envelope-from remko@svn.freebsd.org) Received: (from remko@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6CHkKuI067210; Mon, 12 Jul 2010 17:46:20 GMT (envelope-from remko@svn.freebsd.org) Message-Id: <201007121746.o6CHkKuI067210@svn.freebsd.org> From: Remko Lodder Date: Mon, 12 Jul 2010 17:46:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209952 - stable/8/sys/dev/ichwd X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 17:46:20 -0000 Author: remko Date: Mon Jul 12 17:46:19 2010 New Revision: 209952 URL: http://svn.freebsd.org/changeset/base/209952 Log: MFC r202917 Add support for the NM10 chipset. PR: kern/143118 Submitted by: Koshin sumitani Approved by: imp (mentor, implicit) MFC after: 3 days Modified: stable/8/sys/dev/ichwd/ichwd.c stable/8/sys/dev/ichwd/ichwd.h Directory Properties: stable/8/etc/ (props changed) stable/8/libexec/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ichwd/ichwd.c ============================================================================== --- stable/8/sys/dev/ichwd/ichwd.c Mon Jul 12 17:18:58 2010 (r209951) +++ stable/8/sys/dev/ichwd/ichwd.c Mon Jul 12 17:46:19 2010 (r209952) @@ -93,6 +93,7 @@ static struct ichwd_device ichwd_devices { DEVICEID_ICH7DH, "Intel ICH7DH watchdog timer", 7 }, { DEVICEID_ICH7M, "Intel ICH7M watchdog timer", 7 }, { DEVICEID_ICH7MDH, "Intel ICH7MDH watchdog timer", 7 }, + { DEVICEID_NM10, "Intel NM10 watchdog timer", 7 }, { DEVICEID_ICH8, "Intel ICH8 watchdog timer", 8 }, { DEVICEID_ICH8DH, "Intel ICH8DH watchdog timer", 8 }, { DEVICEID_ICH8DO, "Intel ICH8DO watchdog timer", 8 }, Modified: stable/8/sys/dev/ichwd/ichwd.h ============================================================================== --- stable/8/sys/dev/ichwd/ichwd.h Mon Jul 12 17:18:58 2010 (r209951) +++ stable/8/sys/dev/ichwd/ichwd.h Mon Jul 12 17:46:19 2010 (r209952) @@ -83,6 +83,7 @@ struct ichwd_softc { #define DEVICEID_ICH7 0x27b8 #define DEVICEID_ICH7DH 0x27b0 #define DEVICEID_ICH7M 0x27b9 +#define DEVICEID_NM10 0x27bc #define DEVICEID_ICH7MDH 0x27bd #define DEVICEID_ICH8 0x2810 #define DEVICEID_ICH8DH 0x2812 From owner-svn-src-stable-8@FreeBSD.ORG Tue Jul 13 02:45:19 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA4FB1065676; Tue, 13 Jul 2010 02:45:19 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D63778FC1D; Tue, 13 Jul 2010 02:45:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6D2jJ3P091971; Tue, 13 Jul 2010 02:45:19 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6D2jJsq091969; Tue, 13 Jul 2010 02:45:19 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201007130245.o6D2jJsq091969@svn.freebsd.org> From: Colin Percival Date: Tue, 13 Jul 2010 02:45:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209964 - head/sys/kern releng/7.1 releng/7.1/sys/conf releng/7.1/sys/kern releng/7.3 releng/7.3/sys/conf releng/7.3/sys/kern releng/8.0 releng/8.0/sys/conf releng/8.0/sys/kern releng/8... X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 02:45:20 -0000 Author: cperciva Date: Tue Jul 13 02:45:17 2010 New Revision: 209964 URL: http://svn.freebsd.org/changeset/base/209964 Log: Correctly copy the M_RDONLY flag when duplicating a reference to an mbuf external buffer. Approved by: so (cperciva) Approved by: re (kensmith) Security: FreeBSD-SA-10:07.mbuf Modified: stable/8/sys/kern/uipc_mbuf.c Changes in other areas also in this revision: Modified: head/sys/kern/uipc_mbuf.c releng/7.1/UPDATING releng/7.1/sys/conf/newvers.sh releng/7.1/sys/kern/uipc_mbuf.c releng/7.3/UPDATING releng/7.3/sys/conf/newvers.sh releng/7.3/sys/kern/uipc_mbuf.c releng/8.0/UPDATING releng/8.0/sys/conf/newvers.sh releng/8.0/sys/kern/uipc_mbuf.c releng/8.1/UPDATING releng/8.1/sys/kern/uipc_mbuf.c stable/7/sys/kern/uipc_mbuf.c Modified: stable/8/sys/kern/uipc_mbuf.c ============================================================================== --- stable/8/sys/kern/uipc_mbuf.c Tue Jul 13 01:24:02 2010 (r209963) +++ stable/8/sys/kern/uipc_mbuf.c Tue Jul 13 02:45:17 2010 (r209964) @@ -302,6 +302,7 @@ mb_dupcl(struct mbuf *n, struct mbuf *m) n->m_ext.ref_cnt = m->m_ext.ref_cnt; n->m_ext.ext_type = m->m_ext.ext_type; n->m_flags |= M_EXT; + n->m_flags |= m->m_flags & M_RDONLY; } /* From owner-svn-src-stable-8@FreeBSD.ORG Tue Jul 13 05:12:15 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 24305106564A; Tue, 13 Jul 2010 05:12:15 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1302C8FC1A; Tue, 13 Jul 2010 05:12:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6D5CEVk025155; Tue, 13 Jul 2010 05:12:14 GMT (envelope-from maxim@svn.freebsd.org) Received: (from maxim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6D5CE69025154; Tue, 13 Jul 2010 05:12:14 GMT (envelope-from maxim@svn.freebsd.org) Message-Id: <201007130512.o6D5CE69025154@svn.freebsd.org> From: Maxim Konovalov Date: Tue, 13 Jul 2010 05:12:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209974 - stable/8/include/arpa X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 05:12:15 -0000 Author: maxim Date: Tue Jul 13 05:12:14 2010 New Revision: 209974 URL: http://svn.freebsd.org/changeset/base/209974 Log: MFC r209715: addr2ascii(3) was removed ages ago. Fix the comment. Modified: stable/8/include/arpa/inet.h Directory Properties: stable/8/include/ (props changed) Modified: stable/8/include/arpa/inet.h ============================================================================== --- stable/8/include/arpa/inet.h Tue Jul 13 04:31:19 2010 (r209973) +++ stable/8/include/arpa/inet.h Tue Jul 13 05:12:14 2010 (r209974) @@ -62,7 +62,7 @@ #ifndef _ARPA_INET_H_ #define _ARPA_INET_H_ -/* External definitions for functions in inet(3), addr2ascii(3) */ +/* External definitions for functions in inet(3). */ #include #include From owner-svn-src-stable-8@FreeBSD.ORG Tue Jul 13 08:43:29 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 292B21065670; Tue, 13 Jul 2010 08:43:29 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 18EEB8FC22; Tue, 13 Jul 2010 08:43:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6D8hS0x072253; Tue, 13 Jul 2010 08:43:28 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6D8hSrB072251; Tue, 13 Jul 2010 08:43:28 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201007130843.o6D8hSrB072251@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 13 Jul 2010 08:43:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209983 - stable/8/sys/kern X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 08:43:29 -0000 Author: kib Date: Tue Jul 13 08:43:28 2010 New Revision: 209983 URL: http://svn.freebsd.org/changeset/base/209983 Log: MFC r209742: In revoke(), verify that VCHR vnode indeed belongs to devfs. Modified: stable/8/sys/kern/vfs_syscalls.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/kern/vfs_syscalls.c ============================================================================== --- stable/8/sys/kern/vfs_syscalls.c Tue Jul 13 08:23:46 2010 (r209982) +++ stable/8/sys/kern/vfs_syscalls.c Tue Jul 13 08:43:28 2010 (r209983) @@ -4209,7 +4209,7 @@ revoke(td, uap) vfslocked = NDHASGIANT(&nd); vp = nd.ni_vp; NDFREE(&nd, NDF_ONLY_PNBUF); - if (vp->v_type != VCHR) { + if (vp->v_type != VCHR || vp->v_rdev == NULL) { error = EINVAL; goto out; } From owner-svn-src-stable-8@FreeBSD.ORG Tue Jul 13 08:45:50 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F17B31065672; Tue, 13 Jul 2010 08:45:50 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E14148FC1F; Tue, 13 Jul 2010 08:45:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6D8joOe072821; Tue, 13 Jul 2010 08:45:50 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6D8jo9f072819; Tue, 13 Jul 2010 08:45:50 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201007130845.o6D8jo9f072819@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 13 Jul 2010 08:45:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209984 - stable/8/sys/dev/md X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 08:45:51 -0000 Author: kib Date: Tue Jul 13 08:45:50 2010 New Revision: 209984 URL: http://svn.freebsd.org/changeset/base/209984 Log: MFC r209743: Calculate nshift only once. Modified: stable/8/sys/dev/md/md.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/md/md.c ============================================================================== --- stable/8/sys/dev/md/md.c Tue Jul 13 08:43:28 2010 (r209983) +++ stable/8/sys/dev/md/md.c Tue Jul 13 08:45:50 2010 (r209984) @@ -255,7 +255,7 @@ dimension(off_t size) { off_t rcnt; struct indir *ip; - int i, layer; + int layer; rcnt = size; layer = 0; @@ -263,9 +263,6 @@ dimension(off_t size) rcnt /= NINDIR; layer++; } - /* figure out log2(NINDIR) */ - for (i = NINDIR, nshift = -1; i; nshift++) - i >>= 1; /* * XXX: the top layer is probably not fully populated, so we allocate @@ -1220,6 +1217,11 @@ g_md_init(struct g_class *mp __unused) caddr_t c; u_char *ptr, *name, *type; unsigned len; + int i; + + /* figure out log2(NINDIR) */ + for (i = NINDIR, nshift = -1; i; nshift++) + i >>= 1; mod = NULL; sx_init(&md_sx, "MD config lock"); From owner-svn-src-stable-8@FreeBSD.ORG Tue Jul 13 11:04:46 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 75A3D1065673; Tue, 13 Jul 2010 11:04:46 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6B43D8FC13; Tue, 13 Jul 2010 11:04:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6DB4kSh005424; Tue, 13 Jul 2010 11:04:46 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DB4kF8005422; Tue, 13 Jul 2010 11:04:46 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201007131104.o6DB4kF8005422@svn.freebsd.org> From: Ed Schouten Date: Tue, 13 Jul 2010 11:04:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209989 - stable/8/sys/kern X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 11:04:46 -0000 Author: ed Date: Tue Jul 13 11:04:46 2010 New Revision: 209989 URL: http://svn.freebsd.org/changeset/base/209989 Log: MFC r209718: Fix a race condition, where a TTY could be destroyed twice. There are special cases where tty_rel_free() can be called twice in a row, namely when closing and revoking the TTY at the same moment. Only call destroy_dev_sched_cb() once. Reported by: Jeremie Le Hen Modified: stable/8/sys/kern/tty.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/kern/tty.c ============================================================================== --- stable/8/sys/kern/tty.c Tue Jul 13 10:32:43 2010 (r209988) +++ stable/8/sys/kern/tty.c Tue Jul 13 11:04:46 2010 (r209989) @@ -1020,7 +1020,8 @@ tty_rel_free(struct tty *tp) tp->t_dev = NULL; tty_unlock(tp); - destroy_dev_sched_cb(dev, tty_dealloc, tp); + if (dev != NULL) + destroy_dev_sched_cb(dev, tty_dealloc, tp); } void From owner-svn-src-stable-8@FreeBSD.ORG Wed Jul 14 18:55:35 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B1F91065670; Wed, 14 Jul 2010 18:55:35 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3A2B18FC17; Wed, 14 Jul 2010 18:55:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6EItZNw051037; Wed, 14 Jul 2010 18:55:35 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6EItZZX051035; Wed, 14 Jul 2010 18:55:35 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201007141855.o6EItZZX051035@svn.freebsd.org> From: John Baldwin Date: Wed, 14 Jul 2010 18:55:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210070 - stable/8/share/man/man3 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2010 18:55:35 -0000 Author: jhb Date: Wed Jul 14 18:55:34 2010 New Revision: 210070 URL: http://svn.freebsd.org/changeset/base/210070 Log: MFC 209588: - The ETIMEDOUT error applies to pthread_timedjoin_np(), not pthread_join(). - Tweak wording in history section for pthread_timedjoin_np(). Modified: stable/8/share/man/man3/pthread_join.3 Directory Properties: stable/8/share/man/man3/ (props changed) Modified: stable/8/share/man/man3/pthread_join.3 ============================================================================== --- stable/8/share/man/man3/pthread_join.3 Wed Jul 14 18:43:27 2010 (r210069) +++ stable/8/share/man/man3/pthread_join.3 Wed Jul 14 18:55:34 2010 (r210070) @@ -116,7 +116,7 @@ The implementation detected that another .El .Pp Additionally, the -.Fn pthread_join +.Fn pthread_timedjoin_np function will fail if: .Bl -tag -width Er .It Bq Er ETIMEDOUT @@ -134,7 +134,7 @@ function conforms to .St -p1003.1-96 . The .Fn pthread_timedjoin_np -is +is a .Fx -extension, first appeared in +extension which first appeared in .Fx 6.1 . From owner-svn-src-stable-8@FreeBSD.ORG Wed Jul 14 19:00:45 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B9E51065675; Wed, 14 Jul 2010 19:00:45 +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 EEB808FC0A; Wed, 14 Jul 2010 19:00:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6EJ0i9T052317; Wed, 14 Jul 2010 19:00:44 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6EJ0igJ052314; Wed, 14 Jul 2010 19:00:44 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201007141900.o6EJ0igJ052314@svn.freebsd.org> From: John Baldwin Date: Wed, 14 Jul 2010 19:00:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210072 - stable/8/sys/kern X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2010 19:00:45 -0000 Author: jhb Date: Wed Jul 14 19:00:44 2010 New Revision: 210072 URL: http://svn.freebsd.org/changeset/base/210072 Log: MFC 208787: Assert that the thread lock is held in sched_pctcpu() instead of recursively acquiring it. All of the current callers already hold the lock. Modified: stable/8/sys/kern/sched_4bsd.c stable/8/sys/kern/sched_ule.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/kern/sched_4bsd.c ============================================================================== --- stable/8/sys/kern/sched_4bsd.c Wed Jul 14 18:55:45 2010 (r210071) +++ stable/8/sys/kern/sched_4bsd.c Wed Jul 14 19:00:44 2010 (r210072) @@ -1523,6 +1523,7 @@ sched_pctcpu(struct thread *td) { struct td_sched *ts; + THREAD_LOCK_ASSERT(td, MA_OWNED); ts = td->td_sched; return (ts->ts_pctcpu); } Modified: stable/8/sys/kern/sched_ule.c ============================================================================== --- stable/8/sys/kern/sched_ule.c Wed Jul 14 18:55:45 2010 (r210071) +++ stable/8/sys/kern/sched_ule.c Wed Jul 14 19:00:44 2010 (r210072) @@ -2367,7 +2367,7 @@ sched_pctcpu(struct thread *td) if (ts == NULL) return (0); - thread_lock(td); + THREAD_LOCK_ASSERT(td, MA_OWNED); if (ts->ts_ticks) { int rtick; @@ -2376,7 +2376,6 @@ sched_pctcpu(struct thread *td) rtick = min(SCHED_TICK_HZ(ts) / SCHED_TICK_SECS, hz); pctcpu = (FSCALE * ((FSCALE * rtick)/hz)) >> FSHIFT; } - thread_unlock(td); return (pctcpu); } From owner-svn-src-stable-8@FreeBSD.ORG Wed Jul 14 21:10:15 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76F231065672; Wed, 14 Jul 2010 21:10:15 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 637EE8FC14; Wed, 14 Jul 2010 21:10:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6ELAFB5081100; Wed, 14 Jul 2010 21:10:15 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6ELAEYi081085; Wed, 14 Jul 2010 21:10:14 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201007142110.o6ELAEYi081085@svn.freebsd.org> From: John Baldwin Date: Wed, 14 Jul 2010 21:10:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210079 - in stable/8/sys: amd64/amd64 amd64/include i386/i386 i386/include X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2010 21:10:15 -0000 Author: jhb Date: Wed Jul 14 21:10:14 2010 New Revision: 210079 URL: http://svn.freebsd.org/changeset/base/210079 Log: MFC 208507,208556,208621: Add support for corrected machine check interrupts. CMCI is a new local APIC interrupt that fires when a threshold of corrected machine check events is reached. CMCI also includes a count of events when reporting corrected errors in the bank's status register. Note that individual banks may or may not support CMCI. If they do, each bank includes its own threshold register that determines when the interrupt fires. Currently the code uses a very simple strategy where it doubles the threshold on each interrupt until it succeeds in throttling the interrupt to occur only once a minute (this interval can be tuned via sysctl). The threshold is also adjusted on each hourly poll which will lower the threshold once events stop occurring. Modified: stable/8/sys/amd64/amd64/apic_vector.S stable/8/sys/amd64/amd64/local_apic.c stable/8/sys/amd64/amd64/machdep.c stable/8/sys/amd64/amd64/mca.c stable/8/sys/amd64/include/apicreg.h stable/8/sys/amd64/include/apicvar.h stable/8/sys/amd64/include/mca.h stable/8/sys/amd64/include/pcpu.h stable/8/sys/amd64/include/specialreg.h stable/8/sys/i386/i386/apic_vector.s stable/8/sys/i386/i386/local_apic.c stable/8/sys/i386/i386/machdep.c stable/8/sys/i386/i386/mca.c stable/8/sys/i386/include/apicreg.h stable/8/sys/i386/include/apicvar.h stable/8/sys/i386/include/mca.h stable/8/sys/i386/include/pcpu.h stable/8/sys/i386/include/specialreg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/amd64/amd64/apic_vector.S ============================================================================== --- stable/8/sys/amd64/amd64/apic_vector.S Wed Jul 14 20:55:45 2010 (r210078) +++ stable/8/sys/amd64/amd64/apic_vector.S Wed Jul 14 21:10:14 2010 (r210079) @@ -105,6 +105,18 @@ IDTVEC(timerint) jmp doreti /* + * Local APIC CMCI handler. + */ + .text + SUPERALIGN_TEXT +IDTVEC(cmcint) + PUSH_FRAME + FAKE_MCOUNT(TF_RIP(%rsp)) + call lapic_handle_cmc + MEXITCOUNT + jmp doreti + +/* * Local APIC error interrupt handler. */ .text Modified: stable/8/sys/amd64/amd64/local_apic.c ============================================================================== --- stable/8/sys/amd64/amd64/local_apic.c Wed Jul 14 20:55:45 2010 (r210078) +++ stable/8/sys/amd64/amd64/local_apic.c Wed Jul 14 21:10:14 2010 (r210079) @@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -123,6 +124,7 @@ static struct lvt lvts[LVT_MAX + 1] = { { 1, 1, 0, 1, APIC_LVT_DM_FIXED, APIC_ERROR_INT }, /* Error */ { 1, 1, 1, 1, APIC_LVT_DM_NMI, 0 }, /* PMC */ { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_THERMAL_INT }, /* Thermal */ + { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_CMC_INT }, /* CMCI */ }; static inthand_t *ioint_handlers[] = { @@ -227,6 +229,9 @@ lapic_init(vm_paddr_t addr) setidt(APIC_ERROR_INT, IDTVEC(errorint), SDT_SYSIGT, SEL_KPL, 0); /* XXX: Thermal interrupt */ + + /* Local APIC CMCI. */ + setidt(APIC_CMC_INT, IDTVEC(cmcint), SDT_SYSIGT, SEL_KPL, 0); } /* @@ -252,7 +257,7 @@ lapic_create(u_int apic_id, int boot_cpu */ lapics[apic_id].la_present = 1; lapics[apic_id].la_id = apic_id; - for (i = 0; i < LVT_MAX; i++) { + for (i = 0; i <= LVT_MAX; i++) { lapics[apic_id].la_lvts[i] = lvts[i]; lapics[apic_id].la_lvts[i].lvt_active = 0; } @@ -282,6 +287,7 @@ lapic_dump(const char* str) printf(" timer: 0x%08x therm: 0x%08x err: 0x%08x pmc: 0x%08x\n", lapic->lvt_timer, lapic->lvt_thermal, lapic->lvt_error, lapic->lvt_pcint); + printf(" cmci: 0x%08x\n", lapic->lvt_cmci); } void @@ -333,6 +339,10 @@ lapic_setup(int boot) /* XXX: Thermal LVT */ + /* Program the CMCI LVT entry if present. */ + if (maxlvt >= LVT_CMCI) + lapic->lvt_cmci = lvt_mode(la, LVT_CMCI, lapic->lvt_cmci); + intr_restore(eflags); } @@ -857,6 +867,34 @@ lapic_timer_enable_intr(void) } void +lapic_handle_cmc(void) +{ + + lapic_eoi(); + cmc_intr(); +} + +/* + * Called from the mca_init() to activate the CMC interrupt if this CPU is + * responsible for monitoring any MC banks for CMC events. Since mca_init() + * is called prior to lapic_setup() during boot, this just needs to unmask + * this CPU's LVT_CMCI entry. + */ +void +lapic_enable_cmc(void) +{ + u_int apic_id; + + apic_id = PCPU_GET(apic_id); + KASSERT(lapics[apic_id].la_present, + ("%s: missing APIC %u", __func__, apic_id)); + lapics[apic_id].la_lvts[LVT_CMCI].lvt_masked = 0; + lapics[apic_id].la_lvts[LVT_CMCI].lvt_active = 1; + if (bootverbose) + printf("lapic%u: CMCI unmasked\n", apic_id); +} + +void lapic_handle_error(void) { u_int32_t esr; Modified: stable/8/sys/amd64/amd64/machdep.c ============================================================================== --- stable/8/sys/amd64/amd64/machdep.c Wed Jul 14 20:55:45 2010 (r210078) +++ stable/8/sys/amd64/amd64/machdep.c Wed Jul 14 21:10:14 2010 (r210079) @@ -283,7 +283,6 @@ cpu_startup(dummy) vm_pager_bufferinit(); cpu_setregs(); - mca_init(); } /* Modified: stable/8/sys/amd64/amd64/mca.c ============================================================================== --- stable/8/sys/amd64/amd64/mca.c Wed Jul 14 20:55:45 2010 (r210078) +++ stable/8/sys/amd64/amd64/mca.c Wed Jul 14 21:10:14 2010 (r210079) @@ -33,6 +33,8 @@ __FBSDID("$FreeBSD$"); #include +#include +#include #include #include #include @@ -43,11 +45,29 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include #include #include +/* Modes for mca_scan() */ +enum scan_mode { + POLLED, + MCE, + CMCI, +}; + +/* + * State maintained for each monitored MCx bank to control the + * corrected machine check interrupt threshold. + */ +struct cmc_state { + int max_threshold; + int last_intr; +}; + struct mca_internal { struct mca_record rec; int logged; @@ -79,19 +99,22 @@ static struct callout mca_timer; static int mca_ticks = 3600; /* Check hourly by default. */ static struct task mca_task; static struct mtx mca_lock; +static struct cmc_state **cmc_state; /* Indexed by cpuid, bank */ +static int cmc_banks; +static int cmc_throttle = 60; /* Time in seconds to throttle CMCI. */ static int -sysctl_mca_ticks(SYSCTL_HANDLER_ARGS) +sysctl_positive_int(SYSCTL_HANDLER_ARGS) { int error, value; - value = mca_ticks; + value = *(int *)arg1; error = sysctl_handle_int(oidp, &value, 0, req); if (error || req->newptr == NULL) return (error); if (value <= 0) return (EINVAL); - mca_ticks = value; + *(int *)arg1 = value; return (0); } @@ -401,31 +424,112 @@ mca_record_entry(const struct mca_record } /* + * Update the interrupt threshold for a CMCI. The strategy is to use + * a low trigger that interrupts as soon as the first event occurs. + * However, if a steady stream of events arrive, the threshold is + * increased until the interrupts are throttled to once every + * cmc_throttle seconds or the periodic scan. If a periodic scan + * finds that the threshold is too high, it is lowered. + */ +static void +cmci_update(enum scan_mode mode, int bank, int valid, struct mca_record *rec) +{ + struct cmc_state *cc; + uint64_t ctl; + u_int delta; + int count, limit; + + /* Fetch the current limit for this bank. */ + cc = &cmc_state[PCPU_GET(cpuid)][bank]; + ctl = rdmsr(MSR_MC_CTL2(bank)); + count = (rec->mr_status & MC_STATUS_COR_COUNT) >> 38; + delta = (u_int)(ticks - cc->last_intr); + + /* + * If an interrupt was received less than cmc_throttle seconds + * since the previous interrupt and the count from the current + * event is greater than or equal to the current threshold, + * double the threshold up to the max. + */ + if (mode == CMCI && valid) { + limit = ctl & MC_CTL2_THRESHOLD; + if (delta < cmc_throttle && count >= limit && + limit < cc->max_threshold) { + limit = min(limit << 1, cc->max_threshold); + ctl &= ~MC_CTL2_THRESHOLD; + ctl |= limit; + wrmsr(MSR_MC_CTL2(bank), limit); + } + cc->last_intr = ticks; + return; + } + + /* + * When the banks are polled, check to see if the threshold + * should be lowered. + */ + if (mode != POLLED) + return; + + /* If a CMCI occured recently, do nothing for now. */ + if (delta < cmc_throttle) + return; + + /* + * Compute a new limit based on the average rate of events per + * cmc_throttle seconds since the last interrupt. + */ + if (valid) { + count = (rec->mr_status & MC_STATUS_COR_COUNT) >> 38; + limit = count * cmc_throttle / delta; + if (limit <= 0) + limit = 1; + else if (limit > cc->max_threshold) + limit = cc->max_threshold; + } else + limit = 1; + if ((ctl & MC_CTL2_THRESHOLD) != limit) { + ctl &= ~MC_CTL2_THRESHOLD; + ctl |= limit; + wrmsr(MSR_MC_CTL2(bank), limit); + } +} + +/* * This scans all the machine check banks of the current CPU to see if * there are any machine checks. Any non-recoverable errors are * reported immediately via mca_log(). The current thread must be - * pinned when this is called. The 'mcip' parameter indicates if we - * are being called from the MC exception handler. In that case this - * function returns true if the system is restartable. Otherwise, it - * returns a count of the number of valid MC records found. + * pinned when this is called. The 'mode' parameter indicates if we + * are being called from the MC exception handler, the CMCI handler, + * or the periodic poller. In the MC exception case this function + * returns true if the system is restartable. Otherwise, it returns a + * count of the number of valid MC records found. */ static int -mca_scan(int mcip) +mca_scan(enum scan_mode mode) { struct mca_record rec; uint64_t mcg_cap, ucmask; - int count, i, recoverable; + int count, i, recoverable, valid; count = 0; recoverable = 1; ucmask = MC_STATUS_UC | MC_STATUS_PCC; /* When handling a MCE#, treat the OVER flag as non-restartable. */ - if (mcip) + if (mode == MCE) ucmask |= MC_STATUS_OVER; mcg_cap = rdmsr(MSR_MCG_CAP); for (i = 0; i < (mcg_cap & MCG_CAP_COUNT); i++) { - if (mca_check_status(i, &rec)) { + /* + * For a CMCI, only check banks this CPU is + * responsible for. + */ + if (mode == CMCI && !(PCPU_GET(cmci_mask) & 1 << i)) + continue; + + valid = mca_check_status(i, &rec); + if (valid) { count++; if (rec.mr_status & ucmask) { recoverable = 0; @@ -433,8 +537,15 @@ mca_scan(int mcip) } mca_record_entry(&rec); } + + /* + * If this is a bank this CPU monitors via CMCI, + * update the threshold. + */ + if (PCPU_GET(cmci_mask) & (1 << i)) + cmci_update(mode, i, valid, &rec); } - return (mcip ? recoverable : count); + return (mode == MCE ? recoverable : count); } /* @@ -457,7 +568,7 @@ mca_scan_cpus(void *context, int pending continue; sched_bind(td, cpu); thread_unlock(td); - count += mca_scan(0); + count += mca_scan(POLLED); thread_lock(td); sched_unbind(td); } @@ -511,7 +622,24 @@ mca_startup(void *dummy) SYSINIT(mca_startup, SI_SUB_SMP, SI_ORDER_ANY, mca_startup, NULL); static void -mca_setup(void) +cmci_setup(uint64_t mcg_cap) +{ + int i; + + cmc_state = malloc((mp_maxid + 1) * sizeof(struct cmc_state **), + M_MCA, M_WAITOK); + cmc_banks = mcg_cap & MCG_CAP_COUNT; + for (i = 0; i <= mp_maxid; i++) + cmc_state[i] = malloc(sizeof(struct cmc_state) * cmc_banks, + M_MCA, M_WAITOK | M_ZERO); + SYSCTL_ADD_PROC(NULL, SYSCTL_STATIC_CHILDREN(_hw_mca), OID_AUTO, + "cmc_throttle", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, + &cmc_throttle, 0, sysctl_positive_int, "I", + "Interval in seconds to throttle corrected MC interrupts"); +} + +static void +mca_setup(uint64_t mcg_cap) { mtx_init(&mca_lock, "mca", NULL, MTX_SPIN); @@ -522,13 +650,62 @@ mca_setup(void) "count", CTLFLAG_RD, &mca_count, 0, "Record count"); SYSCTL_ADD_PROC(NULL, SYSCTL_STATIC_CHILDREN(_hw_mca), OID_AUTO, "interval", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, &mca_ticks, - 0, sysctl_mca_ticks, "I", + 0, sysctl_positive_int, "I", "Periodic interval in seconds to scan for machine checks"); SYSCTL_ADD_NODE(NULL, SYSCTL_STATIC_CHILDREN(_hw_mca), OID_AUTO, "records", CTLFLAG_RD, sysctl_mca_records, "Machine check records"); SYSCTL_ADD_PROC(NULL, SYSCTL_STATIC_CHILDREN(_hw_mca), OID_AUTO, "force_scan", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, 0, sysctl_mca_scan, "I", "Force an immediate scan for machine checks"); + if (mcg_cap & MCG_CAP_CMCI_P) + cmci_setup(mcg_cap); +} + +/* + * See if we should monitor CMCI for this bank. If CMCI_EN is already + * set in MC_CTL2, then another CPU is responsible for this bank, so + * ignore it. If CMCI_EN returns zero after being set, then this bank + * does not support CMCI_EN. If this CPU sets CMCI_EN, then it should + * now monitor this bank. + */ +static void +cmci_monitor(int i) +{ + struct cmc_state *cc; + uint64_t ctl; + + KASSERT(i < cmc_banks, ("CPU %d has more MC banks", PCPU_GET(cpuid))); + + ctl = rdmsr(MSR_MC_CTL2(i)); + if (ctl & MC_CTL2_CMCI_EN) + /* Already monitored by another CPU. */ + return; + + /* Set the threshold to one event for now. */ + ctl &= ~MC_CTL2_THRESHOLD; + ctl |= MC_CTL2_CMCI_EN | 1; + wrmsr(MSR_MC_CTL2(i), ctl); + ctl = rdmsr(MSR_MC_CTL2(i)); + if (!(ctl & MC_CTL2_CMCI_EN)) + /* This bank does not support CMCI. */ + return; + + cc = &cmc_state[PCPU_GET(cpuid)][i]; + + /* Determine maximum threshold. */ + ctl &= ~MC_CTL2_THRESHOLD; + ctl |= 0x7fff; + wrmsr(MSR_MC_CTL2(i), ctl); + ctl = rdmsr(MSR_MC_CTL2(i)); + cc->max_threshold = ctl & MC_CTL2_THRESHOLD; + + /* Start off with a threshold of 1. */ + ctl &= ~MC_CTL2_THRESHOLD; + ctl |= 1; + wrmsr(MSR_MC_CTL2(i), ctl); + + /* Mark this bank as monitored. */ + PCPU_SET(cmci_mask, PCPU_GET(cmci_mask) | 1 << i); } /* Must be executed on each CPU. */ @@ -554,14 +731,14 @@ mca_init(void) workaround_erratum383 = 1; if (cpu_feature & CPUID_MCA) { - if (PCPU_GET(cpuid) == 0) - mca_setup(); + PCPU_SET(cmci_mask, 0); - sched_pin(); mcg_cap = rdmsr(MSR_MCG_CAP); if (mcg_cap & MCG_CAP_CTL_P) /* Enable MCA features. */ wrmsr(MSR_MCG_CTL, MCG_CTL_ENABLE); + if (PCPU_GET(cpuid) == 0) + mca_setup(mcg_cap); /* * Disable logging of level one TLB parity (L1TP) errors by @@ -597,15 +774,34 @@ mca_init(void) if (!skip) wrmsr(MSR_MC_CTL(i), ctl); + + if (mcg_cap & MCG_CAP_CMCI_P) + cmci_monitor(i); + /* Clear all errors. */ wrmsr(MSR_MC_STATUS(i), 0); } - sched_unpin(); + + if (PCPU_GET(cmci_mask) != 0) + lapic_enable_cmc(); } load_cr4(rcr4() | CR4_MCE); } +/* + * The machine check registers for the BSP cannot be initialized until + * the local APIC is initialized. This happens at SI_SUB_CPU, + * SI_ORDER_SECOND. + */ +static void +mca_init_bsp(void *arg __unused) +{ + + mca_init(); +} +SYSINIT(mca_init_bsp, SI_SUB_CPU, SI_ORDER_ANY, mca_init_bsp, NULL); + /* Called when a machine check exception fires. */ int mca_intr(void) @@ -624,7 +820,7 @@ mca_intr(void) } /* Scan the banks and check for any non-recoverable errors. */ - recoverable = mca_scan(1); + recoverable = mca_scan(MCE); mcg_status = rdmsr(MSR_MCG_STATUS); if (!(mcg_status & MCG_STATUS_RIPV)) recoverable = 0; @@ -633,3 +829,31 @@ mca_intr(void) wrmsr(MSR_MCG_STATUS, mcg_status & ~MCG_STATUS_MCIP); return (recoverable); } + +/* Called for a CMCI (correctable machine check interrupt). */ +void +cmc_intr(void) +{ + struct mca_internal *mca; + int count; + + /* + * Serialize MCA bank scanning to prevent collisions from + * sibling threads. + */ + count = mca_scan(CMCI); + + /* If we found anything, log them to the console. */ + if (count != 0) { + mtx_lock_spin(&mca_lock); + STAILQ_FOREACH(mca, &mca_records, link) { + if (!mca->logged) { + mca->logged = 1; + mtx_unlock_spin(&mca_lock); + mca_log(&mca->rec); + mtx_lock_spin(&mca_lock); + } + } + mtx_unlock_spin(&mca_lock); + } +} Modified: stable/8/sys/amd64/include/apicreg.h ============================================================================== --- stable/8/sys/amd64/include/apicreg.h Wed Jul 14 20:55:45 2010 (r210078) +++ stable/8/sys/amd64/include/apicreg.h Wed Jul 14 21:10:14 2010 (r210079) @@ -89,7 +89,7 @@ * 2C0 Reserved * 2D0 Reserved * 2E0 Reserved - * 2F0 Reserved + * 2F0 Local Vector Table (CMCI) R/W * 300 ICR_LOW Interrupt Command Reg. (0-31) R/W * 310 ICR_HI Interrupt Command Reg. (32-63) R/W * 320 Local Vector Table (Timer) R/W @@ -172,7 +172,7 @@ struct LAPIC { /* reserved */ PAD4; /* reserved */ PAD4; /* reserved */ PAD4; - /* reserved */ PAD4; + u_int32_t lvt_cmci; PAD3; u_int32_t icr_lo; PAD3; u_int32_t icr_hi; PAD3; u_int32_t lvt_timer; PAD3; Modified: stable/8/sys/amd64/include/apicvar.h ============================================================================== --- stable/8/sys/amd64/include/apicvar.h Wed Jul 14 20:55:45 2010 (r210078) +++ stable/8/sys/amd64/include/apicvar.h Wed Jul 14 21:10:14 2010 (r210079) @@ -108,8 +108,9 @@ #define APIC_LOCAL_INTS 240 #define APIC_ERROR_INT APIC_LOCAL_INTS #define APIC_THERMAL_INT (APIC_LOCAL_INTS + 1) +#define APIC_CMC_INT (APIC_LOCAL_INTS + 2) -#define APIC_IPI_INTS (APIC_LOCAL_INTS + 2) +#define APIC_IPI_INTS (APIC_LOCAL_INTS + 3) #define IPI_RENDEZVOUS (APIC_IPI_INTS) /* Inter-CPU rendezvous. */ #define IPI_INVLTLB (APIC_IPI_INTS + 1) /* TLB Shootdown IPIs */ #define IPI_INVLPG (APIC_IPI_INTS + 2) @@ -143,7 +144,8 @@ #define LVT_ERROR 3 #define LVT_PMC 4 #define LVT_THERMAL 5 -#define LVT_MAX LVT_THERMAL +#define LVT_CMCI 6 +#define LVT_MAX LVT_CMCI #ifndef LOCORE @@ -179,8 +181,8 @@ struct apic_enumerator { inthand_t IDTVEC(apic_isr1), IDTVEC(apic_isr2), IDTVEC(apic_isr3), IDTVEC(apic_isr4), IDTVEC(apic_isr5), IDTVEC(apic_isr6), - IDTVEC(apic_isr7), IDTVEC(errorint), IDTVEC(spuriousint), - IDTVEC(timerint); + IDTVEC(apic_isr7), IDTVEC(cmcint), IDTVEC(errorint), + IDTVEC(spuriousint), IDTVEC(timerint); extern vm_paddr_t lapic_paddr; extern int apic_cpuids[]; @@ -210,6 +212,7 @@ void lapic_create(u_int apic_id, int boo void lapic_disable(void); void lapic_disable_pmc(void); void lapic_dump(const char *str); +void lapic_enable_cmc(void); int lapic_enable_pmc(void); void lapic_eoi(void); int lapic_id(void); @@ -218,6 +221,7 @@ int lapic_intr_pending(u_int vector); void lapic_ipi_raw(register_t icrlo, u_int dest); void lapic_ipi_vectored(u_int vector, int dest); int lapic_ipi_wait(int delay); +void lapic_handle_cmc(void); void lapic_handle_error(void); void lapic_handle_intr(int vector, struct trapframe *frame); void lapic_handle_timer(struct trapframe *frame); Modified: stable/8/sys/amd64/include/mca.h ============================================================================== --- stable/8/sys/amd64/include/mca.h Wed Jul 14 20:55:45 2010 (r210078) +++ stable/8/sys/amd64/include/mca.h Wed Jul 14 21:10:14 2010 (r210079) @@ -46,6 +46,7 @@ struct mca_record { #ifdef _KERNEL +void cmc_intr(void); void mca_init(void); int mca_intr(void); Modified: stable/8/sys/amd64/include/pcpu.h ============================================================================== --- stable/8/sys/amd64/include/pcpu.h Wed Jul 14 20:55:45 2010 (r210078) +++ stable/8/sys/amd64/include/pcpu.h Wed Jul 14 21:10:14 2010 (r210079) @@ -75,7 +75,8 @@ /* Pointer to the CPU LDT descriptor */ \ struct system_segment_descriptor *pc_ldt; \ /* Pointer to the CPU TSS descriptor */ \ - struct system_segment_descriptor *pc_tss \ + struct system_segment_descriptor *pc_tss; \ + u_int pc_cmci_mask /* MCx banks for CMCI */ \ PCPU_XEN_FIELDS #ifdef _KERNEL Modified: stable/8/sys/amd64/include/specialreg.h ============================================================================== --- stable/8/sys/amd64/include/specialreg.h Wed Jul 14 20:55:45 2010 (r210078) +++ stable/8/sys/amd64/include/specialreg.h Wed Jul 14 21:10:14 2010 (r210079) @@ -385,7 +385,7 @@ #define MC_STATUS_VAL 0x8000000000000000 #define MC_MISC_RA_LSB 0x000000000000003f /* If MCG_CAP_SER_P */ #define MC_MISC_ADDRESS_MODE 0x00000000000001c0 /* If MCG_CAP_SER_P */ -#define MC_CTL2_THRESHOLD 0x0000000000003fff +#define MC_CTL2_THRESHOLD 0x0000000000007fff #define MC_CTL2_CMCI_EN 0x0000000040000000 /* Modified: stable/8/sys/i386/i386/apic_vector.s ============================================================================== --- stable/8/sys/i386/i386/apic_vector.s Wed Jul 14 20:55:45 2010 (r210078) +++ stable/8/sys/i386/i386/apic_vector.s Wed Jul 14 21:10:14 2010 (r210079) @@ -113,6 +113,19 @@ IDTVEC(timerint) jmp doreti /* + * Local APIC CMCI handler. + */ + .text + SUPERALIGN_TEXT +IDTVEC(cmcint) + PUSH_FRAME + SET_KERNEL_SREGS + FAKE_MCOUNT(TF_EIP(%esp)) + call lapic_handle_cmc + MEXITCOUNT + jmp doreti + +/* * Local APIC error interrupt handler. */ .text Modified: stable/8/sys/i386/i386/local_apic.c ============================================================================== --- stable/8/sys/i386/i386/local_apic.c Wed Jul 14 20:55:45 2010 (r210078) +++ stable/8/sys/i386/i386/local_apic.c Wed Jul 14 21:10:14 2010 (r210079) @@ -60,6 +60,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -124,6 +125,7 @@ static struct lvt lvts[LVT_MAX + 1] = { { 1, 1, 0, 1, APIC_LVT_DM_FIXED, APIC_ERROR_INT }, /* Error */ { 1, 1, 1, 1, APIC_LVT_DM_NMI, 0 }, /* PMC */ { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_THERMAL_INT }, /* Thermal */ + { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_CMC_INT }, /* CMCI */ }; static inthand_t *ioint_handlers[] = { @@ -231,6 +233,10 @@ lapic_init(vm_paddr_t addr) GSEL(GCODE_SEL, SEL_KPL)); /* XXX: Thermal interrupt */ + + /* Local APIC CMCI. */ + setidt(APIC_CMC_INT, IDTVEC(cmcint), SDT_SYS386TGT, SEL_KPL, + GSEL(GCODE_SEL, SEL_KPL)); } /* @@ -256,7 +262,7 @@ lapic_create(u_int apic_id, int boot_cpu */ lapics[apic_id].la_present = 1; lapics[apic_id].la_id = apic_id; - for (i = 0; i < LVT_MAX; i++) { + for (i = 0; i <= LVT_MAX; i++) { lapics[apic_id].la_lvts[i] = lvts[i]; lapics[apic_id].la_lvts[i].lvt_active = 0; } @@ -286,6 +292,7 @@ lapic_dump(const char* str) printf(" timer: 0x%08x therm: 0x%08x err: 0x%08x pmc: 0x%08x\n", lapic->lvt_timer, lapic->lvt_thermal, lapic->lvt_error, lapic->lvt_pcint); + printf(" cmci: 0x%08x\n", lapic->lvt_cmci); } void @@ -337,6 +344,10 @@ lapic_setup(int boot) /* XXX: Thermal LVT */ + /* Program the CMCI LVT entry if present. */ + if (maxlvt >= LVT_CMCI) + lapic->lvt_cmci = lvt_mode(la, LVT_CMCI, lapic->lvt_cmci); + intr_restore(eflags); } @@ -858,6 +869,34 @@ lapic_timer_enable_intr(void) } void +lapic_handle_cmc(void) +{ + + lapic_eoi(); + cmc_intr(); +} + +/* + * Called from the mca_init() to activate the CMC interrupt if this CPU is + * responsible for monitoring any MC banks for CMC events. Since mca_init() + * is called prior to lapic_setup() during boot, this just needs to unmask + * this CPU's LVT_CMCI entry. + */ +void +lapic_enable_cmc(void) +{ + u_int apic_id; + + apic_id = PCPU_GET(apic_id); + KASSERT(lapics[apic_id].la_present, + ("%s: missing APIC %u", __func__, apic_id)); + lapics[apic_id].la_lvts[LVT_CMCI].lvt_masked = 0; + lapics[apic_id].la_lvts[LVT_CMCI].lvt_active = 1; + if (bootverbose) + printf("lapic%u: CMCI unmasked\n", apic_id); +} + +void lapic_handle_error(void) { u_int32_t esr; Modified: stable/8/sys/i386/i386/machdep.c ============================================================================== --- stable/8/sys/i386/i386/machdep.c Wed Jul 14 20:55:45 2010 (r210078) +++ stable/8/sys/i386/i386/machdep.c Wed Jul 14 21:10:14 2010 (r210079) @@ -328,7 +328,6 @@ cpu_startup(dummy) #ifndef XEN cpu_setregs(); #endif - mca_init(); } /* Modified: stable/8/sys/i386/i386/mca.c ============================================================================== --- stable/8/sys/i386/i386/mca.c Wed Jul 14 20:55:45 2010 (r210078) +++ stable/8/sys/i386/i386/mca.c Wed Jul 14 21:10:14 2010 (r210079) @@ -32,7 +32,11 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_apic.h" + #include +#include +#include #include #include #include @@ -43,11 +47,31 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include #include #include +/* Modes for mca_scan() */ +enum scan_mode { + POLLED, + MCE, + CMCI, +}; + +#ifdef DEV_APIC +/* + * State maintained for each monitored MCx bank to control the + * corrected machine check interrupt threshold. + */ +struct cmc_state { + int max_threshold; + int last_intr; +}; +#endif + struct mca_internal { struct mca_record rec; int logged; @@ -80,18 +104,24 @@ static int mca_ticks = 3600; /* Check ho static struct task mca_task; static struct mtx mca_lock; +#ifdef DEV_APIC +static struct cmc_state **cmc_state; /* Indexed by cpuid, bank */ +static int cmc_banks; +static int cmc_throttle = 60; /* Time in seconds to throttle CMCI. */ +#endif + static int -sysctl_mca_ticks(SYSCTL_HANDLER_ARGS) +sysctl_positive_int(SYSCTL_HANDLER_ARGS) { int error, value; - value = mca_ticks; + value = *(int *)arg1; error = sysctl_handle_int(oidp, &value, 0, req); if (error || req->newptr == NULL) return (error); if (value <= 0) return (EINVAL); - mca_ticks = value; + *(int *)arg1 = value; return (0); } @@ -400,32 +430,117 @@ mca_record_entry(const struct mca_record mtx_unlock_spin(&mca_lock); } +#ifdef DEV_APIC +/* + * Update the interrupt threshold for a CMCI. The strategy is to use + * a low trigger that interrupts as soon as the first event occurs. + * However, if a steady stream of events arrive, the threshold is + * increased until the interrupts are throttled to once every + * cmc_throttle seconds or the periodic scan. If a periodic scan + * finds that the threshold is too high, it is lowered. + */ +static void +cmci_update(enum scan_mode mode, int bank, int valid, struct mca_record *rec) +{ + struct cmc_state *cc; + uint64_t ctl; + u_int delta; + int count, limit; + + /* Fetch the current limit for this bank. */ + cc = &cmc_state[PCPU_GET(cpuid)][bank]; + ctl = rdmsr(MSR_MC_CTL2(bank)); + count = (rec->mr_status & MC_STATUS_COR_COUNT) >> 38; + delta = (u_int)(ticks - cc->last_intr); + + /* + * If an interrupt was received less than cmc_throttle seconds + * since the previous interrupt and the count from the current + * event is greater than or equal to the current threshold, + * double the threshold up to the max. + */ + if (mode == CMCI && valid) { + limit = ctl & MC_CTL2_THRESHOLD; + if (delta < cmc_throttle && count >= limit && + limit < cc->max_threshold) { + limit = min(limit << 1, cc->max_threshold); + ctl &= ~MC_CTL2_THRESHOLD; + ctl |= limit; + wrmsr(MSR_MC_CTL2(bank), limit); + } + cc->last_intr = ticks; + return; + } + + /* + * When the banks are polled, check to see if the threshold + * should be lowered. + */ + if (mode != POLLED) + return; + + /* If a CMCI occured recently, do nothing for now. */ + if (delta < cmc_throttle) + return; + + /* + * Compute a new limit based on the average rate of events per + * cmc_throttle seconds since the last interrupt. + */ + if (valid) { + count = (rec->mr_status & MC_STATUS_COR_COUNT) >> 38; + limit = count * cmc_throttle / delta; + if (limit <= 0) + limit = 1; + else if (limit > cc->max_threshold) + limit = cc->max_threshold; + } else + limit = 1; + if ((ctl & MC_CTL2_THRESHOLD) != limit) { + ctl &= ~MC_CTL2_THRESHOLD; + ctl |= limit; + wrmsr(MSR_MC_CTL2(bank), limit); + } +} +#endif + /* * This scans all the machine check banks of the current CPU to see if * there are any machine checks. Any non-recoverable errors are * reported immediately via mca_log(). The current thread must be - * pinned when this is called. The 'mcip' parameter indicates if we - * are being called from the MC exception handler. In that case this - * function returns true if the system is restartable. Otherwise, it - * returns a count of the number of valid MC records found. + * pinned when this is called. The 'mode' parameter indicates if we + * are being called from the MC exception handler, the CMCI handler, + * or the periodic poller. In the MC exception case this function + * returns true if the system is restartable. Otherwise, it returns a + * count of the number of valid MC records found. */ static int -mca_scan(int mcip) +mca_scan(enum scan_mode mode) { struct mca_record rec; uint64_t mcg_cap, ucmask; - int count, i, recoverable; + int count, i, recoverable, valid; count = 0; recoverable = 1; ucmask = MC_STATUS_UC | MC_STATUS_PCC; /* When handling a MCE#, treat the OVER flag as non-restartable. */ - if (mcip) + if (mode == MCE) ucmask |= MC_STATUS_OVER; mcg_cap = rdmsr(MSR_MCG_CAP); for (i = 0; i < (mcg_cap & MCG_CAP_COUNT); i++) { - if (mca_check_status(i, &rec)) { +#ifdef DEV_APIC + /* + * For a CMCI, only check banks this CPU is + * responsible for. + */ + if (mode == CMCI && !(PCPU_GET(cmci_mask) & 1 << i)) + continue; +#endif + + valid = mca_check_status(i, &rec); + if (valid) { count++; if (rec.mr_status & ucmask) { recoverable = 0; @@ -433,8 +548,17 @@ mca_scan(int mcip) } mca_record_entry(&rec); } + +#ifdef DEV_APIC + /* + * If this is a bank this CPU monitors via CMCI, + * update the threshold. + */ + if (PCPU_GET(cmci_mask) & (1 << i)) + cmci_update(mode, i, valid, &rec); +#endif } - return (mcip ? recoverable : count); + return (mode == MCE ? recoverable : count); } /* @@ -457,7 +581,7 @@ mca_scan_cpus(void *context, int pending continue; sched_bind(td, cpu); thread_unlock(td); - count += mca_scan(0); + count += mca_scan(POLLED); thread_lock(td); sched_unbind(td); } @@ -510,8 +634,27 @@ mca_startup(void *dummy) } SYSINIT(mca_startup, SI_SUB_SMP, SI_ORDER_ANY, mca_startup, NULL); +#ifdef DEV_APIC static void -mca_setup(void) +cmci_setup(uint64_t mcg_cap) +{ + int i; + + cmc_state = malloc((mp_maxid + 1) * sizeof(struct cmc_state **), + M_MCA, M_WAITOK); + cmc_banks = mcg_cap & MCG_CAP_COUNT; + for (i = 0; i <= mp_maxid; i++) + cmc_state[i] = malloc(sizeof(struct cmc_state) * cmc_banks, + M_MCA, M_WAITOK | M_ZERO); + SYSCTL_ADD_PROC(NULL, SYSCTL_STATIC_CHILDREN(_hw_mca), OID_AUTO, + "cmc_throttle", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, + &cmc_throttle, 0, sysctl_positive_int, "I", + "Interval in seconds to throttle corrected MC interrupts"); +} +#endif + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-8@FreeBSD.ORG Wed Jul 14 21:22:37 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 396081065675; Wed, 14 Jul 2010 21:22:37 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 843668FC15; Wed, 14 Jul 2010 21:22:36 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o6ELMVMI012958 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 15 Jul 2010 00:22:31 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id o6ELMVgE048578; Thu, 15 Jul 2010 00:22:31 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o6ELMVQU048577; Thu, 15 Jul 2010 00:22:31 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 15 Jul 2010 00:22:31 +0300 From: Kostik Belousov To: John Baldwin Message-ID: <20100714212231.GS2381@deviant.kiev.zoral.com.ua> References: <201007142110.o6ELAEYi081085@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jesV4P1FjH8FXPjZ" Content-Disposition: inline In-Reply-To: <201007142110.o6ELAEYi081085@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_20, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r210079 - in stable/8/sys: amd64/amd64 amd64/include i386/i386 i386/include X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2010 21:22:37 -0000 --jesV4P1FjH8FXPjZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 14, 2010 at 09:10:14PM +0000, John Baldwin wrote: > Author: jhb > Date: Wed Jul 14 21:10:14 2010 > New Revision: 210079 > URL: http://svn.freebsd.org/changeset/base/210079 > Modified: stable/8/sys/i386/i386/apic_vector.s > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- stable/8/sys/i386/i386/apic_vector.s Wed Jul 14 20:55:45 2010 (r21007= 8) > +++ stable/8/sys/i386/i386/apic_vector.s Wed Jul 14 21:10:14 2010 (r21007= 9) > @@ -113,6 +113,19 @@ IDTVEC(timerint) > jmp doreti > =20 > /* > + * Local APIC CMCI handler. > + */ > + .text > + SUPERALIGN_TEXT > +IDTVEC(cmcint) > + PUSH_FRAME > + SET_KERNEL_SREGS I think cld is missed right there. > + FAKE_MCOUNT(TF_EIP(%esp)) > + call lapic_handle_cmc > + MEXITCOUNT > + jmp doreti > + > +/* > * Local APIC error interrupt handler. > */ --jesV4P1FjH8FXPjZ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkw+KpYACgkQC3+MBN1Mb4ia5ACghfJBgBNYilvCrGB+h7LsY5Pi kmcAn2NPEhvFqwzbIZWjfe8X4psI1Bo8 =40yk -----END PGP SIGNATURE----- --jesV4P1FjH8FXPjZ-- From owner-svn-src-stable-8@FreeBSD.ORG Wed Jul 14 21:48:16 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E46001065707; Wed, 14 Jul 2010 21:48:16 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D23558FC19; Wed, 14 Jul 2010 21:48:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6ELmGU3089746; Wed, 14 Jul 2010 21:48:16 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6ELmGwA089743; Wed, 14 Jul 2010 21:48:16 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201007142148.o6ELmGwA089743@svn.freebsd.org> From: John Baldwin Date: Wed, 14 Jul 2010 21:48:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210084 - in stable/8/sys: kern sys X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2010 21:48:17 -0000 Author: jhb Date: Wed Jul 14 21:48:16 2010 New Revision: 210084 URL: http://svn.freebsd.org/changeset/base/210084 Log: Partially MFC 209592: Add a tdksignal() routine that mirrors pksignal() except that it accepts a thread instead of a process. As an extension, if a NULL ksiginfo_t is passed in, setup a ksiginfo_t on the stack similar to psignal(). This provides semantics matching the new tdsignal() function in 9 while preserving the existing ABI. Modified: stable/8/sys/kern/kern_sig.c stable/8/sys/sys/signalvar.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/kern/kern_sig.c ============================================================================== --- stable/8/sys/kern/kern_sig.c Wed Jul 14 21:47:49 2010 (r210083) +++ stable/8/sys/kern/kern_sig.c Wed Jul 14 21:48:16 2010 (r210084) @@ -1987,6 +1987,24 @@ psignal_event(struct proc *p, struct sig return (tdsignal(p, td, ksi->ksi_signo, ksi)); } +void +tdksignal(struct thread *td, int sig, ksiginfo_t *ksi) +{ + ksiginfo_t ksi_thunk; + + /* + * If ksi is NULL, use ksi_thunk and provide semantics + * identical to tdsignal() in 9.0+. + */ + if (ksi == NULL) { + ksi = &ksi_thunk; + ksiginfo_init(ksi); + ksi->ksi_signo = sig; + ksi->ksi_code = SI_KERNEL; + } + (void) tdsignal(td->td_proc, td, sig, ksi); +} + int tdsignal(struct proc *p, struct thread *td, int sig, ksiginfo_t *ksi) { Modified: stable/8/sys/sys/signalvar.h ============================================================================== --- stable/8/sys/sys/signalvar.h Wed Jul 14 21:47:49 2010 (r210083) +++ stable/8/sys/sys/signalvar.h Wed Jul 14 21:48:16 2010 (r210084) @@ -345,6 +345,7 @@ void sigexit(struct thread *td, int sign int sig_ffs(sigset_t *set); void siginit(struct proc *p); void signotify(struct thread *td); +void tdksignal(struct thread *td, int sig, ksiginfo_t *ksi); void tdsigcleanup(struct thread *td); int tdsignal(struct proc *p, struct thread *td, int sig, ksiginfo_t *ksi); From owner-svn-src-stable-8@FreeBSD.ORG Wed Jul 14 21:52:03 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 71819106566B; Wed, 14 Jul 2010 21:52:03 +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 46C0D8FC13; Wed, 14 Jul 2010 21:52:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6ELq3ZY090624; Wed, 14 Jul 2010 21:52:03 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6ELq3o0090620; Wed, 14 Jul 2010 21:52:03 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201007142152.o6ELq3o0090620@svn.freebsd.org> From: John Baldwin Date: Wed, 14 Jul 2010 21:52:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210085 - stable/8/sys/kern X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2010 21:52:03 -0000 Author: jhb Date: Wed Jul 14 21:52:02 2010 New Revision: 210085 URL: http://svn.freebsd.org/changeset/base/210085 Log: MFC 209595: Send SIGPIPE to the thread that issued the offending system call rather than to the entire process. Modified: stable/8/sys/kern/sys_generic.c stable/8/sys/kern/sys_socket.c stable/8/sys/kern/uipc_syscalls.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/kern/sys_generic.c ============================================================================== --- stable/8/sys/kern/sys_generic.c Wed Jul 14 21:48:16 2010 (r210084) +++ stable/8/sys/kern/sys_generic.c Wed Jul 14 21:52:02 2010 (r210085) @@ -532,7 +532,7 @@ dofilewrite(td, fd, fp, auio, offset, fl /* Socket layer is responsible for issuing SIGPIPE. */ if (fp->f_type != DTYPE_SOCKET && error == EPIPE) { PROC_LOCK(td->td_proc); - psignal(td->td_proc, SIGPIPE); + tdksignal(td, SIGPIPE, NULL); PROC_UNLOCK(td->td_proc); } } Modified: stable/8/sys/kern/sys_socket.c ============================================================================== --- stable/8/sys/kern/sys_socket.c Wed Jul 14 21:48:16 2010 (r210084) +++ stable/8/sys/kern/sys_socket.c Wed Jul 14 21:52:02 2010 (r210085) @@ -102,7 +102,7 @@ soo_write(struct file *fp, struct uio *u error = sosend(so, 0, uio, 0, 0, 0, uio->uio_td); if (error == EPIPE && (so->so_options & SO_NOSIGPIPE) == 0) { PROC_LOCK(uio->uio_td->td_proc); - psignal(uio->uio_td->td_proc, SIGPIPE); + tdksignal(uio->uio_td, SIGPIPE, NULL); PROC_UNLOCK(uio->uio_td->td_proc); } return (error); Modified: stable/8/sys/kern/uipc_syscalls.c ============================================================================== --- stable/8/sys/kern/uipc_syscalls.c Wed Jul 14 21:48:16 2010 (r210084) +++ stable/8/sys/kern/uipc_syscalls.c Wed Jul 14 21:52:02 2010 (r210085) @@ -794,7 +794,7 @@ kern_sendit(td, s, mp, flags, control, s if (error == EPIPE && !(so->so_options & SO_NOSIGPIPE) && !(flags & MSG_NOSIGNAL)) { PROC_LOCK(td->td_proc); - psignal(td->td_proc, SIGPIPE); + tdksignal(td, SIGPIPE, NULL); PROC_UNLOCK(td->td_proc); } } @@ -2448,7 +2448,7 @@ sctp_generic_sendmsg (td, uap) if (error == EPIPE && !(so->so_options & SO_NOSIGPIPE) && !(uap->flags & MSG_NOSIGNAL)) { PROC_LOCK(td->td_proc); - psignal(td->td_proc, SIGPIPE); + tdksignal(td, SIGPIPE, NULL); PROC_UNLOCK(td->td_proc); } } @@ -2566,7 +2566,7 @@ sctp_generic_sendmsg_iov(td, uap) if (error == EPIPE && !(so->so_options & SO_NOSIGPIPE) && !(uap->flags & MSG_NOSIGNAL)) { PROC_LOCK(td->td_proc); - psignal(td->td_proc, SIGPIPE); + tdksignal(td, SIGPIPE, NULL); PROC_UNLOCK(td->td_proc); } } From owner-svn-src-stable-8@FreeBSD.ORG Thu Jul 15 07:14:59 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 763AB1065672; Thu, 15 Jul 2010 07:14:59 +0000 (UTC) (envelope-from brian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 656B38FC08; Thu, 15 Jul 2010 07:14:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6F7EwJ0015328; Thu, 15 Jul 2010 07:14:58 GMT (envelope-from brian@svn.freebsd.org) Received: (from brian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6F7Ewog015326; Thu, 15 Jul 2010 07:14:58 GMT (envelope-from brian@svn.freebsd.org) Message-Id: <201007150714.o6F7Ewog015326@svn.freebsd.org> From: Brian Somers Date: Thu, 15 Jul 2010 07:14:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210106 - stable/8/bin/pkill X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 07:14:59 -0000 Author: brian Date: Thu Jul 15 07:14:57 2010 New Revision: 210106 URL: http://svn.freebsd.org/changeset/base/210106 Log: MFC r209924; Add -l to the synopsis Submitted by: jhell at dataix dot net Modified: stable/8/bin/pkill/pkill.1 Directory Properties: stable/8/bin/pkill/ (props changed) Modified: stable/8/bin/pkill/pkill.1 ============================================================================== --- stable/8/bin/pkill/pkill.1 Thu Jul 15 03:56:08 2010 (r210105) +++ stable/8/bin/pkill/pkill.1 Thu Jul 15 07:14:57 2010 (r210106) @@ -60,7 +60,7 @@ .Ar pattern ... .Nm pkill .Op Fl Ar signal -.Op Fl ILafinovx +.Op Fl ILafilnovx .Op Fl F Ar pidfile .Op Fl G Ar gid .Op Fl M Ar core From owner-svn-src-stable-8@FreeBSD.ORG Thu Jul 15 12:17:17 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC3DF1065688; Thu, 15 Jul 2010 12:17:17 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CB00B8FC15; Thu, 15 Jul 2010 12:17:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6FCHHuG083541; Thu, 15 Jul 2010 12:17:17 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6FCHHEE083539; Thu, 15 Jul 2010 12:17:17 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201007151217.o6FCHHEE083539@svn.freebsd.org> From: John Baldwin Date: Thu, 15 Jul 2010 12:17:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210115 - stable/8/sys/i386/i386 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 12:17:18 -0000 Author: jhb Date: Thu Jul 15 12:17:17 2010 New Revision: 210115 URL: http://svn.freebsd.org/changeset/base/210115 Log: MFC part of 209483: Clear DF bit in cmcint interrupt handler. Submitted by: kib Modified: stable/8/sys/i386/i386/apic_vector.s Modified: stable/8/sys/i386/i386/apic_vector.s ============================================================================== --- stable/8/sys/i386/i386/apic_vector.s Thu Jul 15 11:52:20 2010 (r210114) +++ stable/8/sys/i386/i386/apic_vector.s Thu Jul 15 12:17:17 2010 (r210115) @@ -120,6 +120,7 @@ IDTVEC(timerint) IDTVEC(cmcint) PUSH_FRAME SET_KERNEL_SREGS + cld FAKE_MCOUNT(TF_EIP(%esp)) call lapic_handle_cmc MEXITCOUNT From owner-svn-src-stable-8@FreeBSD.ORG Thu Jul 15 12:34:42 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8FF801065674; Thu, 15 Jul 2010 12:34:42 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 5F3F78FC19; Thu, 15 Jul 2010 12:34:42 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 0E4DE46B03; Thu, 15 Jul 2010 08:34:42 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 447798A04E; Thu, 15 Jul 2010 08:34:41 -0400 (EDT) From: John Baldwin To: Kostik Belousov Date: Thu, 15 Jul 2010 08:21:45 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20100217; KDE/4.4.5; amd64; ; ) References: <201007142110.o6ELAEYi081085@svn.freebsd.org> <20100714212231.GS2381@deviant.kiev.zoral.com.ua> In-Reply-To: <20100714212231.GS2381@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Message-Id: <201007150821.45947.jhb@freebsd.org> Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Thu, 15 Jul 2010 08:34:41 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r210079 - in stable/8/sys: amd64/amd64 amd64/include i386/i386 i386/include X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 12:34:42 -0000 On Wednesday, July 14, 2010 5:22:31 pm Kostik Belousov wrote: > On Wed, Jul 14, 2010 at 09:10:14PM +0000, John Baldwin wrote: > > Author: jhb > > Date: Wed Jul 14 21:10:14 2010 > > New Revision: 210079 > > URL: http://svn.freebsd.org/changeset/base/210079 > > > Modified: stable/8/sys/i386/i386/apic_vector.s > > ============================================================================== > > --- stable/8/sys/i386/i386/apic_vector.s Wed Jul 14 20:55:45 2010 (r210078) > > +++ stable/8/sys/i386/i386/apic_vector.s Wed Jul 14 21:10:14 2010 (r210079) > > @@ -113,6 +113,19 @@ IDTVEC(timerint) > > jmp doreti > > > > /* > > + * Local APIC CMCI handler. > > + */ > > + .text > > + SUPERALIGN_TEXT > > +IDTVEC(cmcint) > > + PUSH_FRAME > > + SET_KERNEL_SREGS > I think cld is missed right there. Oops, crossed commits. :( Should be fixed, thanks. -- John Baldwin From owner-svn-src-stable-8@FreeBSD.ORG Thu Jul 15 22:34:30 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8DB81065674; Thu, 15 Jul 2010 22:34:30 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9DA498FC17; Thu, 15 Jul 2010 22:34:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6FMYUBH021109; Thu, 15 Jul 2010 22:34:30 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6FMYUwV021107; Thu, 15 Jul 2010 22:34:30 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007152234.o6FMYUwV021107@svn.freebsd.org> From: Warner Losh Date: Thu, 15 Jul 2010 22:34:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210145 - stable/8/usr.sbin/config X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 22:34:30 -0000 Author: imp Date: Thu Jul 15 22:34:30 2010 New Revision: 210145 URL: http://svn.freebsd.org/changeset/base/210145 Log: MFC: r209135 r209135 | imp | 2010-06-13 10:54:11 -0600 (Sun, 13 Jun 2010) | 9 lines style(9) fixes: o make cmd scoped to the whole do_rules function, since it really is scoped to the whole fucnion. Making it static was the wrong way to fix referencing it outside of the block in which it was declared (and conforms to the style of the rest of the file). o remove a couple of meaningless blank lines o properly wrap one line. Modified: stable/8/usr.sbin/config/mkmakefile.c Directory Properties: stable/8/usr.sbin/config/ (props changed) Modified: stable/8/usr.sbin/config/mkmakefile.c ============================================================================== --- stable/8/usr.sbin/config/mkmakefile.c Thu Jul 15 22:28:19 2010 (r210144) +++ stable/8/usr.sbin/config/mkmakefile.c Thu Jul 15 22:34:30 2010 (r210145) @@ -683,6 +683,7 @@ do_rules(FILE *f) char *cp, *np, och; struct file_list *ftp; char *compilewith; + char cmd[128]; STAILQ_FOREACH(ftp, &ftab, f_next) { if (ftp->f_warn) @@ -720,25 +721,24 @@ do_rules(FILE *f) compilewith = ftp->f_compilewith; if (compilewith == 0) { const char *ftype = NULL; - static char cmd[128]; switch (ftp->f_type) { - case NORMAL: ftype = "NORMAL"; break; - case PROFILING: if (!profiling) continue; ftype = "PROFILE"; break; - default: printf("config: don't know rules for %s\n", np); break; } - snprintf(cmd, sizeof(cmd), "${%s_%c%s}\n.if defined(NORMAL_CTFCONVERT) && !empty(NORMAL_CTFCONVERT)\n\t${NORMAL_CTFCONVERT}\n.endif", ftype, + snprintf(cmd, sizeof(cmd), + "${%s_%c%s}\n.if defined(NORMAL_CTFCONVERT) && " + "!empty(NORMAL_CTFCONVERT)\n" + "\t${NORMAL_CTFCONVERT}\n.endif", ftype, toupper(och), ftp->f_flags & NOWERROR ? "_NOWERROR" : ""); compilewith = cmd; From owner-svn-src-stable-8@FreeBSD.ORG Thu Jul 15 22:35:51 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3CEAC1065672; Thu, 15 Jul 2010 22:35:51 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2AE578FC08; Thu, 15 Jul 2010 22:35:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6FMZpHL021460; Thu, 15 Jul 2010 22:35:51 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6FMZp6O021455; Thu, 15 Jul 2010 22:35:51 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007152235.o6FMZp6O021455@svn.freebsd.org> From: Warner Losh Date: Thu, 15 Jul 2010 22:35:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210146 - stable/8/usr.sbin/config X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 22:35:51 -0000 Author: imp Date: Thu Jul 15 22:35:50 2010 New Revision: 210146 URL: http://svn.freebsd.org/changeset/base/210146 Log: MFC: r209969 r209969 | nwhitehorn | 2010-07-12 22:08:08 -0600 (Mon, 12 Jul 2010) | 13 lines Enhance config to handle MACHINEs with multiple architectures: - Passing -m to config will now print the MACHINE and MACHINE_ARCH given in the passed kernel configuration file and then exit. - If an option is defined in options.MACHINE with the same name as the architecture of the kernel being configured, that option will be considered set. This allows conditional compilation based on CPU architecture. Config version is now 600010. Reviewed by: imp Modified: stable/8/usr.sbin/config/config.8 stable/8/usr.sbin/config/configvers.h stable/8/usr.sbin/config/main.c stable/8/usr.sbin/config/mkoptions.c Directory Properties: stable/8/usr.sbin/config/ (props changed) Modified: stable/8/usr.sbin/config/config.8 ============================================================================== --- stable/8/usr.sbin/config/config.8 Thu Jul 15 22:34:30 2010 (r210145) +++ stable/8/usr.sbin/config/config.8 Thu Jul 15 22:35:50 2010 (r210146) @@ -78,6 +78,9 @@ Note that does not append .Ar SYSTEM_NAME to the directory given. +.It Fl m +Print the MACHINE and MACHINE_ARCH values for this +kernel and exit. .It Fl g Configure a system for debugging. .It Fl x Ar kernel Modified: stable/8/usr.sbin/config/configvers.h ============================================================================== --- stable/8/usr.sbin/config/configvers.h Thu Jul 15 22:34:30 2010 (r210145) +++ stable/8/usr.sbin/config/configvers.h Thu Jul 15 22:35:50 2010 (r210146) @@ -49,5 +49,5 @@ * * $FreeBSD$ */ -#define CONFIGVERS 600009 +#define CONFIGVERS 600010 #define MAJOR_VERS(x) ((x) / 100000) Modified: stable/8/usr.sbin/config/main.c ============================================================================== --- stable/8/usr.sbin/config/main.c Thu Jul 15 22:34:30 2010 (r210145) +++ stable/8/usr.sbin/config/main.c Thu Jul 15 22:35:50 2010 (r210146) @@ -110,13 +110,18 @@ main(int argc, char **argv) char *p; char xxx[MAXPATHLEN]; char *kernfile; + int printmachine; + printmachine = 0; kernfile = NULL; - while ((ch = getopt(argc, argv, "Cd:gpVx:")) != -1) + while ((ch = getopt(argc, argv, "Cd:gmpVx:")) != -1) switch (ch) { case 'C': filebased = 1; break; + case 'm': + printmachine = 1; + break; case 'd': if (*destdir == '\0') strlcpy(destdir, optarg, sizeof(destdir)); @@ -171,13 +176,6 @@ main(int argc, char **argv) strlcat(destdir, PREFIX, sizeof(destdir)); } - p = path((char *)NULL); - if (stat(p, &buf)) { - if (mkdir(p, 0777)) - err(2, "%s", p); - } else if (!S_ISDIR(buf.st_mode)) - errx(EXIT_FAILURE, "%s isn't a directory", p); - SLIST_INIT(&cputype); SLIST_INIT(&mkopt); SLIST_INIT(&opt); @@ -207,6 +205,19 @@ main(int argc, char **argv) } checkversion(); + if (printmachine) { + printf("%s\t%s\n",machinename,machinearch); + exit(0); + } + + /* Make compile directory */ + p = path((char *)NULL); + if (stat(p, &buf)) { + if (mkdir(p, 0777)) + err(2, "%s", p); + } else if (!S_ISDIR(buf.st_mode)) + errx(EXIT_FAILURE, "%s isn't a directory", p); + /* * make symbolic links in compilation directory * for "sys" (to make genassym.c work along with #include ) @@ -280,7 +291,7 @@ static void usage(void) { - fprintf(stderr, "usage: config [-CgpV] [-d destdir] sysname\n"); + fprintf(stderr, "usage: config [-CgmpV] [-d destdir] sysname\n"); fprintf(stderr, " config -x kernel\n"); exit(EX_USAGE); } Modified: stable/8/usr.sbin/config/mkoptions.c ============================================================================== --- stable/8/usr.sbin/config/mkoptions.c Thu Jul 15 22:34:30 2010 (r210145) +++ stable/8/usr.sbin/config/mkoptions.c Thu Jul 15 22:35:50 2010 (r210146) @@ -94,6 +94,20 @@ options(void) SLIST_INSERT_HEAD(&opt, op, op_next); read_options(); + + /* Fake the value of MACHINE_ARCH as an option if necessary */ + SLIST_FOREACH(ol, &otab, o_next) { + if (strcasecmp(ol->o_name, machinearch) != 0) + continue; + + op = (struct opt *)calloc(1, sizeof(*op)); + if (op == NULL) + err(EXIT_FAILURE, "calloc"); + op->op_name = ns(ol->o_name); + SLIST_INSERT_HEAD(&opt, op, op_next); + break; + } + SLIST_FOREACH(op, &opt, op_next) { SLIST_FOREACH(ol, &otab, o_next) { if (eq(op->op_name, ol->o_name) && From owner-svn-src-stable-8@FreeBSD.ORG Thu Jul 15 22:52:36 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A32A106566C; Thu, 15 Jul 2010 22:52:36 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5F2618FC1A; Thu, 15 Jul 2010 22:52:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6FMqaoU025296; Thu, 15 Jul 2010 22:52:36 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6FMqaCQ025295; Thu, 15 Jul 2010 22:52:36 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007152252.o6FMqaCQ025295@svn.freebsd.org> From: Warner Losh Date: Thu, 15 Jul 2010 22:52:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210147 - stable/8/usr.sbin/config X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 22:52:36 -0000 Author: imp Date: Thu Jul 15 22:52:36 2010 New Revision: 210147 URL: http://svn.freebsd.org/changeset/base/210147 Log: MFC r201227: record the fact Modified: Directory Properties: stable/8/usr.sbin/config/ (props changed) From owner-svn-src-stable-8@FreeBSD.ORG Fri Jul 16 09:08:16 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ACC16106566C; Fri, 16 Jul 2010 09:08:16 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9B6F18FC14; Fri, 16 Jul 2010 09:08:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6G98GHC061750; Fri, 16 Jul 2010 09:08:16 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6G98GL9061748; Fri, 16 Jul 2010 09:08:16 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007160908.o6G98GL9061748@svn.freebsd.org> From: Alexander Motin Date: Fri, 16 Jul 2010 09:08:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210162 - stable/8/sys/dev/ata/chipsets X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 09:08:16 -0000 Author: mav Date: Fri Jul 16 09:08:16 2010 New Revision: 210162 URL: http://svn.freebsd.org/changeset/base/210162 Log: MFC r208820: Fix use after free on error. Modified: stable/8/sys/dev/ata/chipsets/ata-acerlabs.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ata/chipsets/ata-acerlabs.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-acerlabs.c Fri Jul 16 06:35:17 2010 (r210161) +++ stable/8/sys/dev/ata/chipsets/ata-acerlabs.c Fri Jul 16 09:08:16 2010 (r210162) @@ -133,6 +133,7 @@ ata_ali_chipinit(device_t dev) bus_release_resource(dev, SYS_RES_IOPORT, PCIR_BAR(i), res->bars[i]); free(res, M_TEMP); + return ENXIO; } } ctlr->chipset_data = res; From owner-svn-src-stable-8@FreeBSD.ORG Fri Jul 16 09:10:12 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2109D1065678; Fri, 16 Jul 2010 09:10:12 +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 103878FC1B; Fri, 16 Jul 2010 09:10:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6G9ABgf062236; Fri, 16 Jul 2010 09:10:11 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6G9ABuB062234; Fri, 16 Jul 2010 09:10:11 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007160910.o6G9ABuB062234@svn.freebsd.org> From: Alexander Motin Date: Fri, 16 Jul 2010 09:10:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210163 - stable/8/sys/dev/ata X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 09:10:12 -0000 Author: mav Date: Fri Jul 16 09:10:11 2010 New Revision: 210163 URL: http://svn.freebsd.org/changeset/base/210163 Log: MFC r208822: Fix possible use after free. Modified: stable/8/sys/dev/ata/atapi-cam.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ata/atapi-cam.c ============================================================================== --- stable/8/sys/dev/ata/atapi-cam.c Fri Jul 16 09:08:16 2010 (r210162) +++ stable/8/sys/dev/ata/atapi-cam.c Fri Jul 16 09:10:11 2010 (r210163) @@ -868,11 +868,11 @@ free_hcb(struct atapi_hcb *hcb) static void free_softc(struct atapi_xpt_softc *scp) { - struct atapi_hcb *hcb; + struct atapi_hcb *hcb, *thcb; if (scp != NULL) { mtx_lock(&scp->state_lock); - TAILQ_FOREACH(hcb, &scp->pending_hcbs, chain) { + TAILQ_FOREACH_SAFE(hcb, &scp->pending_hcbs, chain, thcb) { free_hcb_and_ccb_done(hcb, CAM_UNREC_HBA_ERROR); } if (scp->path != NULL) { From owner-svn-src-stable-8@FreeBSD.ORG Fri Jul 16 09:12:48 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 083401065674; Fri, 16 Jul 2010 09:12:48 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EA5A08FC20; Fri, 16 Jul 2010 09:12:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6G9CleE062854; Fri, 16 Jul 2010 09:12:47 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6G9ClHr062851; Fri, 16 Jul 2010 09:12:47 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007160912.o6G9ClHr062851@svn.freebsd.org> From: Alexander Motin Date: Fri, 16 Jul 2010 09:12:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210164 - stable/8/sys/dev/ata X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 09:12:48 -0000 Author: mav Date: Fri Jul 16 09:12:47 2010 New Revision: 210164 URL: http://svn.freebsd.org/changeset/base/210164 Log: MFC r209664: Add ata(4) ability to limit initial ATA mode for devices via device hints. After boot this mode can be changed with atacontrol/camcontrol as usual. It works for both legacy and ATA_CAM wrapper mode. PR: kern/123980 Modified: stable/8/sys/dev/ata/ata-all.c stable/8/sys/dev/ata/ata-all.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ata/ata-all.c ============================================================================== --- stable/8/sys/dev/ata/ata-all.c Fri Jul 16 09:10:11 2010 (r210163) +++ stable/8/sys/dev/ata/ata-all.c Fri Jul 16 09:12:47 2010 (r210164) @@ -133,7 +133,9 @@ ata_attach(device_t dev) int error, rid; #ifdef ATA_CAM struct cam_devq *devq; - int i; + const char *res; + char buf[64]; + int i, mode; #endif /* check that we have a virgin channel to attach */ @@ -152,6 +154,17 @@ ata_attach(device_t dev) #ifdef ATA_CAM for (i = 0; i < 16; i++) { ch->user[i].mode = 0; + snprintf(buf, sizeof(buf), "dev%d.mode", i); + if (resource_string_value(device_get_name(dev), + device_get_unit(dev), buf, &res) == 0) + mode = ata_str2mode(res); + else if (resource_string_value(device_get_name(dev), + device_get_unit(dev), "mode", &res) == 0) + mode = ata_str2mode(res); + else + mode = -1; + if (mode >= 0) + ch->user[i].mode = mode; if (ch->flags & ATA_SATA) ch->user[i].bytecount = 8192; else @@ -826,8 +839,10 @@ ata_getparam(struct ata_device *atadev, { struct ata_channel *ch = device_get_softc(device_get_parent(atadev->dev)); struct ata_request *request; + const char *res; + char buf[64]; u_int8_t command = 0; - int error = ENOMEM, retries = 2; + int error = ENOMEM, retries = 2, mode = -1; if (ch->devices & (ATA_ATA_MASTER << atadev->unit)) command = ATA_ATA_IDENTIFY; @@ -907,6 +922,15 @@ ata_getparam(struct ata_device *atadev, ata_wmode(&atadev->param) > 0)) atadev->mode = ATA_DMA_MAX; } + snprintf(buf, sizeof(buf), "dev%d.mode", atadev->unit); + if (resource_string_value(device_get_name(ch->dev), + device_get_unit(ch->dev), buf, &res) == 0) + mode = ata_str2mode(res); + else if (resource_string_value(device_get_name(ch->dev), + device_get_unit(ch->dev), "mode", &res) == 0) + mode = ata_str2mode(res); + if (mode >= 0) + atadev->mode = mode; } } else { @@ -1163,6 +1187,35 @@ ata_mode2str(int mode) } } +int +ata_str2mode(const char *str) +{ + + if (!strcasecmp(str, "PIO0")) return (ATA_PIO0); + if (!strcasecmp(str, "PIO1")) return (ATA_PIO1); + if (!strcasecmp(str, "PIO2")) return (ATA_PIO2); + if (!strcasecmp(str, "PIO3")) return (ATA_PIO3); + if (!strcasecmp(str, "PIO4")) return (ATA_PIO4); + if (!strcasecmp(str, "WDMA0")) return (ATA_WDMA0); + if (!strcasecmp(str, "WDMA1")) return (ATA_WDMA1); + if (!strcasecmp(str, "WDMA2")) return (ATA_WDMA2); + if (!strcasecmp(str, "UDMA0")) return (ATA_UDMA0); + if (!strcasecmp(str, "UDMA16")) return (ATA_UDMA0); + if (!strcasecmp(str, "UDMA1")) return (ATA_UDMA1); + if (!strcasecmp(str, "UDMA25")) return (ATA_UDMA1); + if (!strcasecmp(str, "UDMA2")) return (ATA_UDMA2); + if (!strcasecmp(str, "UDMA33")) return (ATA_UDMA2); + if (!strcasecmp(str, "UDMA3")) return (ATA_UDMA3); + if (!strcasecmp(str, "UDMA44")) return (ATA_UDMA3); + if (!strcasecmp(str, "UDMA4")) return (ATA_UDMA4); + if (!strcasecmp(str, "UDMA66")) return (ATA_UDMA4); + if (!strcasecmp(str, "UDMA5")) return (ATA_UDMA5); + if (!strcasecmp(str, "UDMA100")) return (ATA_UDMA5); + if (!strcasecmp(str, "UDMA6")) return (ATA_UDMA6); + if (!strcasecmp(str, "UDMA133")) return (ATA_UDMA6); + return (-1); +} + const char * ata_satarev2str(int rev) { Modified: stable/8/sys/dev/ata/ata-all.h ============================================================================== --- stable/8/sys/dev/ata/ata-all.h Fri Jul 16 09:10:11 2010 (r210163) +++ stable/8/sys/dev/ata/ata-all.h Fri Jul 16 09:12:47 2010 (r210164) @@ -625,6 +625,7 @@ void ata_modify_if_48bit(struct ata_requ void ata_udelay(int interval); char *ata_unit2str(struct ata_device *atadev); const char *ata_mode2str(int mode); +int ata_str2mode(const char *str); const char *ata_satarev2str(int rev); int ata_atapi(device_t dev, int target); int ata_pmode(struct ata_params *ap); From owner-svn-src-stable-8@FreeBSD.ORG Fri Jul 16 14:31:24 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA5471065672; Fri, 16 Jul 2010 14:31:24 +0000 (UTC) (envelope-from ivoras@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C93A18FC0C; Fri, 16 Jul 2010 14:31:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6GEVOxC034779; Fri, 16 Jul 2010 14:31:24 GMT (envelope-from ivoras@svn.freebsd.org) Received: (from ivoras@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6GEVOM6034778; Fri, 16 Jul 2010 14:31:24 GMT (envelope-from ivoras@svn.freebsd.org) Message-Id: <201007161431.o6GEVOM6034778@svn.freebsd.org> From: Ivan Voras Date: Fri, 16 Jul 2010 14:31:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210166 - stable/8/sys/kern X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 14:31:25 -0000 Author: ivoras Date: Fri Jul 16 14:31:24 2010 New Revision: 210166 URL: http://svn.freebsd.org/changeset/base/210166 Log: MFC r208982,r208983,r210117 : cosmetic changes to kern.sched.topology_spec XML Modified: stable/8/sys/kern/sched_ule.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/kern/sched_ule.c ============================================================================== --- stable/8/sys/kern/sched_ule.c Fri Jul 16 10:05:00 2010 (r210165) +++ stable/8/sys/kern/sched_ule.c Fri Jul 16 14:31:24 2010 (r210166) @@ -2658,14 +2658,16 @@ sysctl_kern_sched_topology_spec_internal } sbuf_printf(sb, "\n"); - sbuf_printf(sb, "%*s ", indent, ""); if (cg->cg_flags != 0) { + sbuf_printf(sb, "%*s ", indent, ""); if ((cg->cg_flags & CG_FLAG_HTT) != 0) - sbuf_printf(sb, "HTT group\n"); + sbuf_printf(sb, "HTT group"); + if ((cg->cg_flags & CG_FLAG_THREAD) != 0) + sbuf_printf(sb, "THREAD group"); if ((cg->cg_flags & CG_FLAG_SMT) != 0) - sbuf_printf(sb, "SMT group\n"); + sbuf_printf(sb, "SMT group"); + sbuf_printf(sb, "\n"); } - sbuf_printf(sb, "\n"); if (cg->cg_children > 0) { sbuf_printf(sb, "%*s \n", indent, ""); From owner-svn-src-stable-8@FreeBSD.ORG Sat Jul 17 04:35:03 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 27B70106566C; Sat, 17 Jul 2010 04:35:03 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 168338FC08; Sat, 17 Jul 2010 04:35:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6H4Z2AL020879; Sat, 17 Jul 2010 04:35:02 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6H4Z2sm020877; Sat, 17 Jul 2010 04:35:02 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <201007170435.o6H4Z2sm020877@svn.freebsd.org> From: Ken Smith Date: Sat, 17 Jul 2010 04:35:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210185 - stable/8 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jul 2010 04:35:03 -0000 Author: kensmith Date: Sat Jul 17 04:35:02 2010 New Revision: 210185 URL: http://svn.freebsd.org/changeset/base/210185 Log: Predict the date we'll be ready to announce 8.1-RELEASE. While here add the entry for 8.0-RELEASE which was added to releng/8.0/UPDATING during the 8.0-RELEASE cycle but not to stable/8/UPDATING at that time. Modified: stable/8/UPDATING Modified: stable/8/UPDATING ============================================================================== --- stable/8/UPDATING Sat Jul 17 03:39:50 2010 (r210184) +++ stable/8/UPDATING Sat Jul 17 04:35:02 2010 (r210185) @@ -15,6 +15,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. debugging tools present in HEAD were left in place because sun4v support still needs work to become production ready. +20100720: + 8.1-RELEASE. + 20100502: The config(8) command has been updated to maintain compatibility with config files from 8.0-RELEASE. You will need a new version @@ -56,6 +59,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. via the DEADLKRES option, see NOTES for more details) and the sleepq_type() function for sleepqueues. +20091125: + 8.0-RELEASE. + 20090929: 802.11s D3.03 support was committed. This is incompatible with the previous code, which was based on D3.0. From owner-svn-src-stable-8@FreeBSD.ORG Sat Jul 17 07:56:01 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84CB9106564A; Sat, 17 Jul 2010 07:56:01 +0000 (UTC) (envelope-from keramida@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 734138FC1D; Sat, 17 Jul 2010 07:56:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6H7u1og065134; Sat, 17 Jul 2010 07:56:01 GMT (envelope-from keramida@svn.freebsd.org) Received: (from keramida@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6H7u10U065132; Sat, 17 Jul 2010 07:56:01 GMT (envelope-from keramida@svn.freebsd.org) Message-Id: <201007170756.o6H7u10U065132@svn.freebsd.org> From: Giorgos Keramidas Date: Sat, 17 Jul 2010 07:56:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210189 - stable/8/usr.sbin/fifolog/lib X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jul 2010 07:56:01 -0000 Author: keramida (doc committer) Date: Sat Jul 17 07:56:01 2010 New Revision: 210189 URL: http://svn.freebsd.org/changeset/base/210189 Log: MFC r209871 from /head Fix reading of empty fifolog files. When we don't have anything to inflate, skip the rest of the fifolog reader code to avoid hitting the assert about Z_OK a bit further down. Modified: stable/8/usr.sbin/fifolog/lib/fifolog_reader.c Directory Properties: stable/8/usr.sbin/fifolog/ (props changed) Modified: stable/8/usr.sbin/fifolog/lib/fifolog_reader.c ============================================================================== --- stable/8/usr.sbin/fifolog/lib/fifolog_reader.c Sat Jul 17 05:41:01 2010 (r210188) +++ stable/8/usr.sbin/fifolog/lib/fifolog_reader.c Sat Jul 17 07:56:01 2010 (r210189) @@ -304,8 +304,10 @@ fifolog_reader_process(struct fifolog_re if (i == Z_STREAM_END) { i = inflateReset(zs); } - if (i != Z_OK) + if (i != Z_OK) { fprintf(stderr, "inflate = %d\n", i); + exit (250); + } assert(i == Z_OK); if (zs->avail_out != fr->olen) { q = fr->obuf + (fr->olen - zs->avail_out); From owner-svn-src-stable-8@FreeBSD.ORG Sat Jul 17 15:47:24 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F3FC1065673; Sat, 17 Jul 2010 15:47:24 +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 1E34B8FC17; Sat, 17 Jul 2010 15:47:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6HFlO6o071066; Sat, 17 Jul 2010 15:47:24 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6HFlOcK071064; Sat, 17 Jul 2010 15:47:24 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201007171547.o6HFlOcK071064@svn.freebsd.org> From: Marius Strobl Date: Sat, 17 Jul 2010 15:47:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210195 - stable/8/sys/dev/mpt X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jul 2010 15:47:24 -0000 Author: marius Date: Sat Jul 17 15:47:23 2010 New Revision: 210195 URL: http://svn.freebsd.org/changeset/base/210195 Log: MFC: r209961 Correct inverted parent DMA tag parameters. Reviewed by: ken Modified: stable/8/sys/dev/mpt/mpt_pci.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/mpt/mpt_pci.c ============================================================================== --- stable/8/sys/dev/mpt/mpt_pci.c Sat Jul 17 15:45:20 2010 (r210194) +++ stable/8/sys/dev/mpt/mpt_pci.c Sat Jul 17 15:47:23 2010 (r210195) @@ -757,8 +757,8 @@ mpt_dma_mem_alloc(struct mpt_softc *mpt) /*alignment*/1, /*boundary*/0, /*lowaddr*/BUS_SPACE_MAXADDR, /*highaddr*/BUS_SPACE_MAXADDR, /*filter*/NULL, /*filterarg*/NULL, /*maxsize*/BUS_SPACE_MAXSIZE_32BIT, - /*nsegments*/BUS_SPACE_MAXSIZE_32BIT, - /*maxsegsz*/BUS_SPACE_UNRESTRICTED, /*flags*/0, + /*nsegments*/BUS_SPACE_UNRESTRICTED, + /*maxsegsz*/BUS_SPACE_MAXSIZE_32BIT, /*flags*/0, &mpt->parent_dmat) != 0) { mpt_prt(mpt, "cannot create parent dma tag\n"); return (1);