From owner-svn-src-stable-10@FreeBSD.ORG Sun Aug 31 10:42:52 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B63289E5; Sun, 31 Aug 2014 10:42:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8433C1771; Sun, 31 Aug 2014 10:42:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7VAgqV5061333; Sun, 31 Aug 2014 10:42:52 GMT (envelope-from akiyama@FreeBSD.org) Received: (from akiyama@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7VAgqcv061332; Sun, 31 Aug 2014 10:42:52 GMT (envelope-from akiyama@FreeBSD.org) Message-Id: <201408311042.s7VAgqcv061332@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: akiyama set sender to akiyama@FreeBSD.org using -f From: Shunsuke Akiyama Date: Sun, 31 Aug 2014 10:42:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270873 - stable/10/sys/x86/acpica X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 10:42:52 -0000 Author: akiyama Date: Sun Aug 31 10:42:52 2014 New Revision: 270873 URL: http://svnweb.freebsd.org/changeset/base/270873 Log: MFC r263859: Change default logic to CONFORM because this routine is shared with SCI polarity setting. Reviewed by: jhb MFC r269184: Add missing newline to output dmesg properly. Modified: stable/10/sys/x86/acpica/madt.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/x86/acpica/madt.c ============================================================================== --- stable/10/sys/x86/acpica/madt.c Sun Aug 31 10:28:31 2014 (r270872) +++ stable/10/sys/x86/acpica/madt.c Sun Aug 31 10:42:52 2014 (r270873) @@ -298,6 +298,9 @@ interrupt_polarity(UINT16 IntiFlags, UIN { switch (IntiFlags & ACPI_MADT_POLARITY_MASK) { + default: + printf("WARNING: Bogus Interrupt Polarity. Assume CONFORMS\n"); + /* FALLTHROUGH*/ case ACPI_MADT_POLARITY_CONFORMS: if (Source == AcpiGbl_FADT.SciInterrupt) return (INTR_POLARITY_LOW); @@ -306,11 +309,8 @@ interrupt_polarity(UINT16 IntiFlags, UIN case ACPI_MADT_POLARITY_ACTIVE_HIGH: return (INTR_POLARITY_HIGH); case ACPI_MADT_POLARITY_ACTIVE_LOW: - break; - default: - printf("WARNING: Bogus Interrupt Polarity. Assume POLALITY LOW"); + return (INTR_POLARITY_LOW); } - return (INTR_POLARITY_LOW); } static enum intr_trigger @@ -318,6 +318,9 @@ interrupt_trigger(UINT16 IntiFlags, UINT { switch (IntiFlags & ACPI_MADT_TRIGGER_MASK) { + default: + printf("WARNING: Bogus Interrupt Trigger Mode. Assume CONFORMS.\n"); + /*FALLTHROUGH*/ case ACPI_MADT_TRIGGER_CONFORMS: if (Source == AcpiGbl_FADT.SciInterrupt) return (INTR_TRIGGER_LEVEL); @@ -326,13 +329,8 @@ interrupt_trigger(UINT16 IntiFlags, UINT case ACPI_MADT_TRIGGER_EDGE: return (INTR_TRIGGER_EDGE); case ACPI_MADT_TRIGGER_LEVEL: - break; - default: - printf("WARNING: Bogus Interrupt Trigger Mode. Assume Level trigger."); - - break; + return (INTR_TRIGGER_LEVEL); } - return (INTR_TRIGGER_LEVEL); } /* From owner-svn-src-stable-10@FreeBSD.ORG Sun Aug 31 20:21:13 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 04799BBA; Sun, 31 Aug 2014 20:21:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E104B1511; Sun, 31 Aug 2014 20:21:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7VKLC5b047790; Sun, 31 Aug 2014 20:21:12 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7VKL9ZF047771; Sun, 31 Aug 2014 20:21:09 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201408312021.s7VKL9ZF047771@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 31 Aug 2014 20:21:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270888 - in stable/10: sys/dev/iscsi usr.bin/iscsictl usr.sbin/ctld usr.sbin/iscsid X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 20:21:13 -0000 Author: trasz Date: Sun Aug 31 20:21:08 2014 New Revision: 270888 URL: http://svnweb.freebsd.org/changeset/base/270888 Log: MFC r270279: Make the iSCSI stack use __FBSDID() properly. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/iscsi/icl.c stable/10/sys/dev/iscsi/icl_proxy.c stable/10/sys/dev/iscsi/iscsi.c stable/10/usr.bin/iscsictl/iscsictl.c stable/10/usr.sbin/ctld/ctld.c stable/10/usr.sbin/ctld/discovery.c stable/10/usr.sbin/ctld/kernel.c stable/10/usr.sbin/ctld/keys.c stable/10/usr.sbin/ctld/log.c stable/10/usr.sbin/ctld/login.c stable/10/usr.sbin/ctld/pdu.c stable/10/usr.sbin/iscsid/discovery.c stable/10/usr.sbin/iscsid/iscsid.c stable/10/usr.sbin/iscsid/keys.c stable/10/usr.sbin/iscsid/log.c stable/10/usr.sbin/iscsid/login.c stable/10/usr.sbin/iscsid/pdu.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/iscsi/icl.c ============================================================================== --- stable/10/sys/dev/iscsi/icl.c Sun Aug 31 20:14:22 2014 (r270887) +++ stable/10/sys/dev/iscsi/icl.c Sun Aug 31 20:21:08 2014 (r270888) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ */ /* @@ -34,6 +33,9 @@ * and receive iSCSI PDUs. */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include Modified: stable/10/sys/dev/iscsi/icl_proxy.c ============================================================================== --- stable/10/sys/dev/iscsi/icl_proxy.c Sun Aug 31 20:14:22 2014 (r270887) +++ stable/10/sys/dev/iscsi/icl_proxy.c Sun Aug 31 20:21:08 2014 (r270888) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ */ /*- * Copyright (c) 1982, 1986, 1989, 1990, 1993 @@ -68,6 +67,9 @@ #ifdef ICL_KERNEL_PROXY +#include +__FBSDID("$FreeBSD$"); + #include #include #include Modified: stable/10/sys/dev/iscsi/iscsi.c ============================================================================== --- stable/10/sys/dev/iscsi/iscsi.c Sun Aug 31 20:14:22 2014 (r270887) +++ stable/10/sys/dev/iscsi/iscsi.c Sun Aug 31 20:21:08 2014 (r270888) @@ -26,9 +26,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include Modified: stable/10/usr.bin/iscsictl/iscsictl.c ============================================================================== --- stable/10/usr.bin/iscsictl/iscsictl.c Sun Aug 31 20:14:22 2014 (r270887) +++ stable/10/usr.bin/iscsictl/iscsictl.c Sun Aug 31 20:21:08 2014 (r270888) @@ -26,9 +26,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include Modified: stable/10/usr.sbin/ctld/ctld.c ============================================================================== --- stable/10/usr.sbin/ctld/ctld.c Sun Aug 31 20:14:22 2014 (r270887) +++ stable/10/usr.sbin/ctld/ctld.c Sun Aug 31 20:21:08 2014 (r270888) @@ -26,9 +26,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include Modified: stable/10/usr.sbin/ctld/discovery.c ============================================================================== --- stable/10/usr.sbin/ctld/discovery.c Sun Aug 31 20:14:22 2014 (r270887) +++ stable/10/usr.sbin/ctld/discovery.c Sun Aug 31 20:21:08 2014 (r270888) @@ -26,9 +26,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include Modified: stable/10/usr.sbin/ctld/kernel.c ============================================================================== --- stable/10/usr.sbin/ctld/kernel.c Sun Aug 31 20:14:22 2014 (r270887) +++ stable/10/usr.sbin/ctld/kernel.c Sun Aug 31 20:21:08 2014 (r270888) @@ -32,9 +32,11 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGES. * - * $FreeBSD$ */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include Modified: stable/10/usr.sbin/ctld/keys.c ============================================================================== --- stable/10/usr.sbin/ctld/keys.c Sun Aug 31 20:14:22 2014 (r270887) +++ stable/10/usr.sbin/ctld/keys.c Sun Aug 31 20:21:08 2014 (r270888) @@ -26,9 +26,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include Modified: stable/10/usr.sbin/ctld/log.c ============================================================================== --- stable/10/usr.sbin/ctld/log.c Sun Aug 31 20:14:22 2014 (r270887) +++ stable/10/usr.sbin/ctld/log.c Sun Aug 31 20:21:08 2014 (r270888) @@ -26,9 +26,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include Modified: stable/10/usr.sbin/ctld/login.c ============================================================================== --- stable/10/usr.sbin/ctld/login.c Sun Aug 31 20:14:22 2014 (r270887) +++ stable/10/usr.sbin/ctld/login.c Sun Aug 31 20:21:08 2014 (r270888) @@ -26,9 +26,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include Modified: stable/10/usr.sbin/ctld/pdu.c ============================================================================== --- stable/10/usr.sbin/ctld/pdu.c Sun Aug 31 20:14:22 2014 (r270887) +++ stable/10/usr.sbin/ctld/pdu.c Sun Aug 31 20:21:08 2014 (r270888) @@ -26,9 +26,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include Modified: stable/10/usr.sbin/iscsid/discovery.c ============================================================================== --- stable/10/usr.sbin/iscsid/discovery.c Sun Aug 31 20:14:22 2014 (r270887) +++ stable/10/usr.sbin/iscsid/discovery.c Sun Aug 31 20:21:08 2014 (r270888) @@ -26,9 +26,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include Modified: stable/10/usr.sbin/iscsid/iscsid.c ============================================================================== --- stable/10/usr.sbin/iscsid/iscsid.c Sun Aug 31 20:14:22 2014 (r270887) +++ stable/10/usr.sbin/iscsid/iscsid.c Sun Aug 31 20:21:08 2014 (r270888) @@ -26,9 +26,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include Modified: stable/10/usr.sbin/iscsid/keys.c ============================================================================== --- stable/10/usr.sbin/iscsid/keys.c Sun Aug 31 20:14:22 2014 (r270887) +++ stable/10/usr.sbin/iscsid/keys.c Sun Aug 31 20:21:08 2014 (r270888) @@ -26,9 +26,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include Modified: stable/10/usr.sbin/iscsid/log.c ============================================================================== --- stable/10/usr.sbin/iscsid/log.c Sun Aug 31 20:14:22 2014 (r270887) +++ stable/10/usr.sbin/iscsid/log.c Sun Aug 31 20:21:08 2014 (r270888) @@ -26,9 +26,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include Modified: stable/10/usr.sbin/iscsid/login.c ============================================================================== --- stable/10/usr.sbin/iscsid/login.c Sun Aug 31 20:14:22 2014 (r270887) +++ stable/10/usr.sbin/iscsid/login.c Sun Aug 31 20:21:08 2014 (r270888) @@ -26,9 +26,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include Modified: stable/10/usr.sbin/iscsid/pdu.c ============================================================================== --- stable/10/usr.sbin/iscsid/pdu.c Sun Aug 31 20:14:22 2014 (r270887) +++ stable/10/usr.sbin/iscsid/pdu.c Sun Aug 31 20:21:08 2014 (r270888) @@ -26,9 +26,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include From owner-svn-src-stable-10@FreeBSD.ORG Sun Aug 31 20:34:07 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3EDE6306; Sun, 31 Aug 2014 20:34:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2990B1788; Sun, 31 Aug 2014 20:34:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7VKY7aj053864; Sun, 31 Aug 2014 20:34:07 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7VKY7PG053863; Sun, 31 Aug 2014 20:34:07 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201408312034.s7VKY7PG053863@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 31 Aug 2014 20:34:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270890 - stable/10/usr.bin/pathchk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 20:34:07 -0000 Author: jilles Date: Sun Aug 31 20:34:06 2014 New Revision: 270890 URL: http://svnweb.freebsd.org/changeset/base/270890 Log: MFC r256800: pathchk: Ensure bytes >= 128 are considered non-portable characters. This was not broken on architectures such as ARM where char is unsigned. Also, remove the first non-portable character from the output. POSIX does not require this, and printing the first byte may yield an invalid byte sequence with UTF-8. PR: 165988 Reported by: Nicolas Rachinsky Relnotes: yes Modified: stable/10/usr.bin/pathchk/pathchk.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/pathchk/pathchk.c ============================================================================== --- stable/10/usr.bin/pathchk/pathchk.c Sun Aug 31 20:23:56 2014 (r270889) +++ stable/10/usr.bin/pathchk/pathchk.c Sun Aug 31 20:34:06 2014 (r270890) @@ -98,7 +98,7 @@ check(const char *path) { struct stat sb; long complen, namemax, pathmax, svnamemax; - int badch, last; + int last; char *end, *p, *pathd; if ((pathd = strdup(path)) == NULL) @@ -142,9 +142,9 @@ check(const char *path) goto bad; } - if (pflag && (badch = portable(p)) >= 0) { + if (pflag && !portable(p)) { warnx("%s: %s: component contains non-portable " - "character `%c'", path, p, badch); + "character", path, p); goto bad; } @@ -183,8 +183,7 @@ bad: free(pathd); } /* - * Check whether a path component contains only portable characters. Return - * the first non-portable character found. + * Check whether a path component contains only portable characters. */ static int portable(const char *path) @@ -197,7 +196,7 @@ portable(const char *path) s = strspn(path, charset); if (path[s] != '\0') - return (path[s]); + return (0); - return (-1); + return (1); } From owner-svn-src-stable-10@FreeBSD.ORG Sun Aug 31 20:47:12 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2E065670; Sun, 31 Aug 2014 20:47:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F25681888; Sun, 31 Aug 2014 20:47:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7VKlBN0058979; Sun, 31 Aug 2014 20:47:11 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7VKlBkX058974; Sun, 31 Aug 2014 20:47:11 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201408312047.s7VKlBkX058974@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 31 Aug 2014 20:47:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270891 - in stable/10/sys: cam/ctl dev/iscsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 20:47:12 -0000 Author: trasz Date: Sun Aug 31 20:47:10 2014 New Revision: 270891 URL: http://svnweb.freebsd.org/changeset/base/270891 Log: MFC r270282: Use proper include paths in kernel iSCSI code. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c stable/10/sys/dev/iscsi/icl.c stable/10/sys/dev/iscsi/icl_proxy.c stable/10/sys/dev/iscsi/iscsi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Sun Aug 31 20:34:06 2014 (r270890) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Sun Aug 31 20:47:10 2014 (r270891) @@ -67,9 +67,9 @@ __FBSDID("$FreeBSD$"); #include #include -#include "../../dev/iscsi/icl.h" -#include "../../dev/iscsi/iscsi_proto.h" -#include "ctl_frontend_iscsi.h" +#include +#include +#include #ifdef ICL_KERNEL_PROXY #include Modified: stable/10/sys/dev/iscsi/icl.c ============================================================================== --- stable/10/sys/dev/iscsi/icl.c Sun Aug 31 20:34:06 2014 (r270890) +++ stable/10/sys/dev/iscsi/icl.c Sun Aug 31 20:47:10 2014 (r270891) @@ -58,8 +58,8 @@ __FBSDID("$FreeBSD$"); #include #include -#include "icl.h" -#include "iscsi_proto.h" +#include +#include SYSCTL_NODE(_kern, OID_AUTO, icl, CTLFLAG_RD, 0, "iSCSI Common Layer"); static int debug = 1; Modified: stable/10/sys/dev/iscsi/icl_proxy.c ============================================================================== --- stable/10/sys/dev/iscsi/icl_proxy.c Sun Aug 31 20:34:06 2014 (r270890) +++ stable/10/sys/dev/iscsi/icl_proxy.c Sun Aug 31 20:47:10 2014 (r270891) @@ -87,7 +87,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include "icl.h" +#include static int debug = 1; Modified: stable/10/sys/dev/iscsi/iscsi.c ============================================================================== --- stable/10/sys/dev/iscsi/iscsi.c Sun Aug 31 20:34:06 2014 (r270890) +++ stable/10/sys/dev/iscsi/iscsi.c Sun Aug 31 20:47:10 2014 (r270891) @@ -58,10 +58,10 @@ __FBSDID("$FreeBSD$"); #include #include -#include "iscsi_ioctl.h" -#include "iscsi.h" -#include "icl.h" -#include "iscsi_proto.h" +#include +#include +#include +#include #ifdef ICL_KERNEL_PROXY #include From owner-svn-src-stable-10@FreeBSD.ORG Sun Aug 31 21:18:28 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 78D3CDBB; Sun, 31 Aug 2014 21:18:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 580B71AFD; Sun, 31 Aug 2014 21:18:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7VLISvK073299; Sun, 31 Aug 2014 21:18:28 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7VLINnW073272; Sun, 31 Aug 2014 21:18:23 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201408312118.s7VLINnW073272@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 31 Aug 2014 21:18:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270892 - in stable/10: etc etc/autofs etc/defaults etc/mtree etc/rc.d sbin/mount share/man/man5 sys/conf sys/fs/autofs sys/kern sys/libkern sys/modules sys/modules/autofs sys/sys usr.s... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 21:18:28 -0000 Author: trasz Date: Sun Aug 31 21:18:23 2014 New Revision: 270892 URL: http://svnweb.freebsd.org/changeset/base/270892 Log: MFC r270096: Bring in the new automounter, similar to what's provided in most other UNIX systems, eg. MacOS X and Solaris. It uses Sun-compatible map format, has proper kernel support, and LDAP integration. There are still a few outstanding problems; they will be fixed shortly. Reviewed by: allanjude@, emaste@, kib@, wblock@ (earlier versions) Phabric: D523 Relnotes: yes Sponsored by: The FreeBSD Foundation Added: stable/10/etc/auto_master - copied unchanged from r270096, head/etc/auto_master stable/10/etc/autofs/ - copied from r270096, head/etc/autofs/ stable/10/etc/rc.d/automount - copied unchanged from r270096, head/etc/rc.d/automount stable/10/etc/rc.d/automountd - copied unchanged from r270096, head/etc/rc.d/automountd stable/10/etc/rc.d/autounmountd - copied unchanged from r270096, head/etc/rc.d/autounmountd stable/10/share/man/man5/autofs.5 - copied unchanged from r270096, head/share/man/man5/autofs.5 stable/10/sys/fs/autofs/ - copied from r270096, head/sys/fs/autofs/ stable/10/sys/libkern/strndup.c - copied unchanged from r270096, head/sys/libkern/strndup.c stable/10/sys/modules/autofs/ - copied from r270096, head/sys/modules/autofs/ stable/10/usr.sbin/autofs/ - copied from r270096, head/usr.sbin/autofs/ Modified: stable/10/etc/Makefile stable/10/etc/defaults/rc.conf stable/10/etc/mtree/BSD.root.dist stable/10/etc/rc.d/Makefile stable/10/sbin/mount/mntopts.h stable/10/sbin/mount/mount.c stable/10/share/man/man5/Makefile stable/10/sys/conf/NOTES stable/10/sys/conf/files stable/10/sys/conf/options stable/10/sys/kern/vfs_mount.c stable/10/sys/modules/Makefile stable/10/sys/sys/libkern.h stable/10/sys/sys/mount.h stable/10/usr.sbin/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/Makefile ============================================================================== --- stable/10/etc/Makefile Sun Aug 31 20:47:10 2014 (r270891) +++ stable/10/etc/Makefile Sun Aug 31 21:18:23 2014 (r270892) @@ -11,7 +11,8 @@ SUBDIR= sendmail SUBDIR+=tests .endif -BIN1= crontab \ +BIN1= auto_master \ + crontab \ devd.conf \ devfs.conf \ ddb.conf \ @@ -225,6 +226,7 @@ distribution: echo "./etc/spwd.db type=file mode=0600 uname=root gname=wheel"; \ ) | ${METALOG.add} .endif + ${_+_}cd ${.CURDIR}/autofs; ${MAKE} install .if ${MK_BLUETOOTH} != "no" ${_+_}cd ${.CURDIR}/bluetooth; ${MAKE} install .endif Copied: stable/10/etc/auto_master (from r270096, head/etc/auto_master) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/etc/auto_master Sun Aug 31 21:18:23 2014 (r270892, copy of r270096, head/etc/auto_master) @@ -0,0 +1,5 @@ +# $FreeBSD$ +# +# Automounter master map, see auto_master(5) for details. +# +/net -hosts -nosuid Modified: stable/10/etc/defaults/rc.conf ============================================================================== --- stable/10/etc/defaults/rc.conf Sun Aug 31 20:47:10 2014 (r270891) +++ stable/10/etc/defaults/rc.conf Sun Aug 31 21:18:23 2014 (r270892) @@ -311,6 +311,7 @@ amd_enable="NO" # Run amd service with amd_program="/usr/sbin/amd" # path to amd, if you want a different one. amd_flags="-a /.amd_mnt -l syslog /host /etc/amd.map /net /etc/amd.map" amd_map_program="NO" # Can be set to "ypcat -k amd.master" +autofs_enable="NO" # Run automountd(8) nfs_client_enable="NO" # This host is an NFS client (or NO). nfs_access_cache="60" # Client cache timeout in seconds nfs_server_enable="NO" # This host is an NFS server (or NO). Modified: stable/10/etc/mtree/BSD.root.dist ============================================================================== --- stable/10/etc/mtree/BSD.root.dist Sun Aug 31 20:47:10 2014 (r270891) +++ stable/10/etc/mtree/BSD.root.dist Sun Aug 31 21:18:23 2014 (r270892) @@ -24,6 +24,8 @@ etc X11 .. + autofs + .. bluetooth .. defaults Modified: stable/10/etc/rc.d/Makefile ============================================================================== --- stable/10/etc/rc.d/Makefile Sun Aug 31 20:47:10 2014 (r270891) +++ stable/10/etc/rc.d/Makefile Sun Aug 31 21:18:23 2014 (r270892) @@ -20,6 +20,9 @@ FILES= DAEMON \ atm3 \ auditd \ auditdistd \ + automount \ + automountd \ + autounmountd \ bgfsck \ ${_bluetooth} \ bootparams \ Copied: stable/10/etc/rc.d/automount (from r270096, head/etc/rc.d/automount) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/etc/rc.d/automount Sun Aug 31 21:18:23 2014 (r270892, copy of r270096, head/etc/rc.d/automount) @@ -0,0 +1,31 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: automount +# REQUIRE: nfsclient +# KEYWORD: nojail shutdown + +. /etc/rc.subr + +name="automount" +rcvar="autofs_enable" +start_cmd="automount_start" +stop_cmd="automount_stop" +required_modules="autofs" + +automount_start() +{ + + /usr/sbin/automount +} + +automount_stop() +{ + + /sbin/umount -At autofs +} + +load_rc_config $name +run_rc_command "$1" Copied: stable/10/etc/rc.d/automountd (from r270096, head/etc/rc.d/automountd) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/etc/rc.d/automountd Sun Aug 31 21:18:23 2014 (r270892, copy of r270096, head/etc/rc.d/automountd) @@ -0,0 +1,19 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: automountd +# REQUIRE: automount +# KEYWORD: nojail + +. /etc/rc.subr + +name="automountd" +rcvar="autofs_enable" +pidfile="/var/run/${name}.pid" +command="/usr/sbin/${name}" +required_modules="autofs" + +load_rc_config $name +run_rc_command "$1" Copied: stable/10/etc/rc.d/autounmountd (from r270096, head/etc/rc.d/autounmountd) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/etc/rc.d/autounmountd Sun Aug 31 21:18:23 2014 (r270892, copy of r270096, head/etc/rc.d/autounmountd) @@ -0,0 +1,18 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: autounmountd +# REQUIRE: nfsclient +# KEYWORD: nojail + +. /etc/rc.subr + +name="autounmountd" +rcvar="autofs_enable" +pidfile="/var/run/${name}.pid" +command="/usr/sbin/${name}" + +load_rc_config $name +run_rc_command "$1" Modified: stable/10/sbin/mount/mntopts.h ============================================================================== --- stable/10/sbin/mount/mntopts.h Sun Aug 31 20:47:10 2014 (r270891) +++ stable/10/sbin/mount/mntopts.h Sun Aug 31 21:18:23 2014 (r270892) @@ -33,7 +33,7 @@ struct mntopt { const char *m_option; /* option name */ int m_inverse; /* if a negative option, e.g. "atime" */ - int m_flag; /* bit to set, e.g. MNT_RDONLY */ + long long m_flag; /* bit to set, e.g. MNT_RDONLY */ int m_altloc; /* 1 => set bit in altflags */ }; @@ -55,6 +55,7 @@ struct mntopt { #define MOPT_MULTILABEL { "multilabel", 0, MNT_MULTILABEL, 0 } #define MOPT_ACLS { "acls", 0, MNT_ACLS, 0 } #define MOPT_NFS4ACLS { "nfsv4acls", 0, MNT_NFS4ACLS, 0 } +#define MOPT_AUTOMOUNTED { "automounted",0, MNT_AUTOMOUNTED, 0 } /* Control flags. */ #define MOPT_FORCE { "force", 0, MNT_FORCE, 0 } @@ -89,7 +90,8 @@ struct mntopt { MOPT_NOCLUSTERW, \ MOPT_MULTILABEL, \ MOPT_ACLS, \ - MOPT_NFS4ACLS + MOPT_NFS4ACLS, \ + MOPT_AUTOMOUNTED void getmntopts(const char *, const struct mntopt *, int *, int *); void rmslashes(char *, char *); Modified: stable/10/sbin/mount/mount.c ============================================================================== --- stable/10/sbin/mount/mount.c Sun Aug 31 20:47:10 2014 (r270891) +++ stable/10/sbin/mount/mount.c Sun Aug 31 21:18:23 2014 (r270892) @@ -114,6 +114,7 @@ static struct opt { { MNT_ACLS, "acls" }, { MNT_NFS4ACLS, "nfsv4acls" }, { MNT_GJOURNAL, "gjournal" }, + { MNT_AUTOMOUNTED, "automounted" }, { 0, NULL } }; Modified: stable/10/share/man/man5/Makefile ============================================================================== --- stable/10/share/man/man5/Makefile Sun Aug 31 20:47:10 2014 (r270891) +++ stable/10/share/man/man5/Makefile Sun Aug 31 21:18:23 2014 (r270892) @@ -7,6 +7,7 @@ MAN= acct.5 \ ar.5 \ a.out.5 \ + autofs.5 \ bluetooth.device.conf.5 \ bluetooth.hosts.5 \ bluetooth.protocols.5 \ Copied: stable/10/share/man/man5/autofs.5 (from r270096, head/share/man/man5/autofs.5) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/share/man/man5/autofs.5 Sun Aug 31 21:18:23 2014 (r270892, copy of r270096, head/share/man/man5/autofs.5) @@ -0,0 +1,99 @@ +.\" Copyright (c) 2014 The FreeBSD Foundation +.\" All rights reserved. +.\" +.\" This software was developed by Edward Tomasz Napierala under sponsorship +.\" from the FreeBSD Foundation. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd July 14, 2014 +.Dt AUTOFS 5 +.Os +.Sh NAME +.Nm autofs +.Nd "automounter filesystem" +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following line in the +kernel configuration file: +.Bd -ragged -offset indent +.Cd "options AUTOFS" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +autofs_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver is the kernel component of the automounter infrastructure. +Its job is to pass mount requests to the +.Xr automountd 8 +daemon, and pause the processes trying to access the automounted filesystem +until the mount is completed. +It is mounted by the +.Xr automount 8 . +.Sh OPTIONS +These options are available when +mounting +.Nm +file systems: +.Bl -tag -width indent +.It Cm master_options +Mount options for all filesystems specified in the map entry. +.It Cm master_prefix +Filesystem mountpoint prefix. +.El +.Sh EXAMPLES +To unmount all mounted +.Nm +filesystems: +.Pp +.Dl "umount -At autofs" +.Pp +To mount +.Nm +filesystems specified in +.Xr auto_master 5 : +.Pp +.Dl "automount" +.Sh SEE ALSO +.Xr auto_master 5 , +.Xr automount 8 , +.Xr automountd 8 , +.Xr autounmountd 8 +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 10.2 . +.Sh AUTHORS +The +.Nm +was developed by +.An Edward Tomasz Napierala Aq Mt trasz@FreeBSD.org +under sponsorship from the FreeBSD Foundation. Modified: stable/10/sys/conf/NOTES ============================================================================== --- stable/10/sys/conf/NOTES Sun Aug 31 20:47:10 2014 (r270891) +++ stable/10/sys/conf/NOTES Sun Aug 31 21:18:23 2014 (r270892) @@ -1017,6 +1017,7 @@ options FFS #Fast filesystem options NFSCLIENT #Network File System client # The rest are optional: +options AUTOFS #Automounter filesystem options CD9660 #ISO 9660 filesystem options FDESCFS #File descriptor filesystem options FUSE #FUSE support module Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Sun Aug 31 20:47:10 2014 (r270891) +++ stable/10/sys/conf/files Sun Aug 31 21:18:23 2014 (r270892) @@ -2589,6 +2589,9 @@ dev/xen/xenpci/xenpci.c optional xenpci dev/xen/timer/timer.c optional xen | xenhvm dev/xl/if_xl.c optional xl pci dev/xl/xlphy.c optional xl pci +fs/autofs/autofs.c optional autofs +fs/autofs/autofs_vfsops.c optional autofs +fs/autofs/autofs_vnops.c optional autofs fs/deadfs/dead_vnops.c standard fs/devfs/devfs_devs.c standard fs/devfs/devfs_dir.c standard @@ -3125,6 +3128,7 @@ libkern/strcmp.c standard libkern/strcpy.c standard libkern/strcspn.c standard libkern/strdup.c standard +libkern/strndup.c standard libkern/strlcat.c standard libkern/strlcpy.c standard libkern/strlen.c standard Modified: stable/10/sys/conf/options ============================================================================== --- stable/10/sys/conf/options Sun Aug 31 20:47:10 2014 (r270891) +++ stable/10/sys/conf/options Sun Aug 31 21:18:23 2014 (r270892) @@ -218,6 +218,7 @@ INCLUDE_CONFIG_FILE opt_config.h # time, since the corresponding lkms cannot work if there are any static # dependencies. Unusability is enforced by hiding the defines for the # options in a never-included header. +AUTOFS opt_dontuse.h CD9660 opt_dontuse.h EXT2FS opt_dontuse.h FDESCFS opt_dontuse.h Modified: stable/10/sys/kern/vfs_mount.c ============================================================================== --- stable/10/sys/kern/vfs_mount.c Sun Aug 31 20:47:10 2014 (r270891) +++ stable/10/sys/kern/vfs_mount.c Sun Aug 31 21:18:23 2014 (r270892) @@ -649,6 +649,10 @@ vfs_donmount(struct thread *td, uint64_t fsflags |= MNT_SYNCHRONOUS; else if (strcmp(opt->name, "union") == 0) fsflags |= MNT_UNION; + else if (strcmp(opt->name, "automounted") == 0) { + fsflags |= MNT_AUTOMOUNTED; + vfs_freeopt(optlist, opt); + } } /* Copied: stable/10/sys/libkern/strndup.c (from r270096, head/sys/libkern/strndup.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/libkern/strndup.c Sun Aug 31 21:18:23 2014 (r270892, copy of r270096, head/sys/libkern/strndup.c) @@ -0,0 +1,51 @@ +/*- + * Copyright (c) 2003 Networks Associates Technology, Inc. + * All rights reserved. + * + * This software was developed for the FreeBSD Project by Network + * Associates Laboratories, the Security Research Division of Network + * Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 + * ("CBOSS"), as part of the DARPA CHATS research program. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +char * +strndup(const char *string, size_t maxlen, struct malloc_type *type) +{ + size_t len; + char *copy; + + len = strnlen(string, maxlen) + 1; + copy = malloc(len, type, M_WAITOK); + bcopy(string, copy, len); + copy[len - 1] = '\0'; + return (copy); +} Modified: stable/10/sys/modules/Makefile ============================================================================== --- stable/10/sys/modules/Makefile Sun Aug 31 20:47:10 2014 (r270891) +++ stable/10/sys/modules/Makefile Sun Aug 31 21:18:23 2014 (r270892) @@ -44,6 +44,7 @@ SUBDIR= \ ata \ ath \ ath_pci \ + autofs \ ${_auxio} \ ${_bce} \ bfe \ Modified: stable/10/sys/sys/libkern.h ============================================================================== --- stable/10/sys/sys/libkern.h Sun Aug 31 20:47:10 2014 (r270891) +++ stable/10/sys/sys/libkern.h Sun Aug 31 21:18:23 2014 (r270892) @@ -117,6 +117,7 @@ int strcmp(const char *, const char *); char *strcpy(char * __restrict, const char * __restrict); size_t strcspn(const char * __restrict, const char * __restrict) __pure; char *strdup(const char *__restrict, struct malloc_type *); +char *strndup(const char *__restrict, size_t, struct malloc_type *); size_t strlcat(char *, const char *, size_t); size_t strlcpy(char *, const char *, size_t); size_t strlen(const char *); Modified: stable/10/sys/sys/mount.h ============================================================================== --- stable/10/sys/sys/mount.h Sun Aug 31 20:47:10 2014 (r270891) +++ stable/10/sys/sys/mount.h Sun Aug 31 21:18:23 2014 (r270892) @@ -260,6 +260,7 @@ void __mnt_vnode_markerfree_act #define MNT_NOCLUSTERR 0x0000000040000000ULL /* disable cluster read */ #define MNT_NOCLUSTERW 0x0000000080000000ULL /* disable cluster write */ #define MNT_SUJ 0x0000000100000000ULL /* using journaled soft updates */ +#define MNT_AUTOMOUNTED 0x0000000200000000ULL /* mounted by automountd(8) */ /* * NFS export related mount flags. @@ -296,7 +297,7 @@ void __mnt_vnode_markerfree_act MNT_NOCLUSTERW | MNT_SUIDDIR | MNT_SOFTDEP | \ MNT_IGNORE | MNT_EXPUBLIC | MNT_NOSYMFOLLOW | \ MNT_GJOURNAL | MNT_MULTILABEL | MNT_ACLS | \ - MNT_NFS4ACLS) + MNT_NFS4ACLS | MNT_AUTOMOUNTED) /* Mask of flags that can be updated. */ #define MNT_UPDATEMASK (MNT_NOSUID | MNT_NOEXEC | \ @@ -304,7 +305,8 @@ void __mnt_vnode_markerfree_act MNT_NOATIME | \ MNT_NOSYMFOLLOW | MNT_IGNORE | \ MNT_NOCLUSTERR | MNT_NOCLUSTERW | MNT_SUIDDIR | \ - MNT_ACLS | MNT_USER | MNT_NFS4ACLS) + MNT_ACLS | MNT_USER | MNT_NFS4ACLS | \ + MNT_AUTOMOUNTED) /* * External filesystem command modifier flags. Modified: stable/10/usr.sbin/Makefile ============================================================================== --- stable/10/usr.sbin/Makefile Sun Aug 31 20:47:10 2014 (r270891) +++ stable/10/usr.sbin/Makefile Sun Aug 31 21:18:23 2014 (r270892) @@ -5,6 +5,7 @@ SUBDIR= adduser \ arp \ + autofs \ binmiscctl \ bootparamd \ bsdconfig \ From owner-svn-src-stable-10@FreeBSD.ORG Sun Aug 31 21:43:29 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0647C561; Sun, 31 Aug 2014 21:43:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CCB8A1D8C; Sun, 31 Aug 2014 21:43:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7VLhSiU086755; Sun, 31 Aug 2014 21:43:28 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7VLhSFV086754; Sun, 31 Aug 2014 21:43:28 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201408312143.s7VLhSFV086754@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 31 Aug 2014 21:43:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270894 - stable/10/sys/fs/autofs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 21:43:29 -0000 Author: trasz Date: Sun Aug 31 21:43:28 2014 New Revision: 270894 URL: http://svnweb.freebsd.org/changeset/base/270894 Log: MFC r270207: Rework ".." lookup; previous one failed to properly busy the mountpoint. Reviewed by: kib@ Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/fs/autofs/autofs_vnops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/autofs/autofs_vnops.c ============================================================================== --- stable/10/sys/fs/autofs/autofs_vnops.c Sun Aug 31 21:38:03 2014 (r270893) +++ stable/10/sys/fs/autofs/autofs_vnops.c Sun Aug 31 21:43:28 2014 (r270894) @@ -198,6 +198,15 @@ mounted: } static int +autofs_vget_callback(struct mount *mp, void *arg, int lkflags __unused, + struct vnode **vpp) +{ + + + return (autofs_node_vn(arg, mp, vpp)); +} + +static int autofs_lookup(struct vop_lookup_args *ap) { struct vnode *dvp, *newvp, **vpp; @@ -217,24 +226,19 @@ autofs_lookup(struct vop_lookup_args *ap if (cnp->cn_flags & ISDOTDOT) { KASSERT(anp->an_parent != NULL, ("NULL parent")); /* - * Note that in this case, dvp is the child vnode, and we are - * looking up the parent vnode - exactly reverse from normal - * operation. To preserve lock order, we unlock the child - * (dvp), obtain the lock on parent (*vpp) in autofs_node_vn(), - * then relock the child. We use vhold()/vdrop() to prevent - * dvp from being freed in the meantime. + * Note that in this case, dvp is the child vnode, and we + * are looking up the parent vnode - exactly reverse from + * normal operation. Unlocking dvp requires some rather + * tricky unlock/relock dance to prevent mp from being freed; + * use vn_vget_ino_gen() which takes care of all that. */ - lock_flags = VOP_ISLOCKED(dvp); - vhold(dvp); - VOP_UNLOCK(dvp, 0); - error = autofs_node_vn(anp->an_parent, mp, vpp); + error = vn_vget_ino_gen(dvp, autofs_vget_callback, + anp->an_parent, 0, vpp); if (error != 0) { - AUTOFS_WARN("autofs_node_vn() failed with error %d", + AUTOFS_WARN("vn_vget_ino_gen() failed with error %d", error); + return (error); } - vn_lock(dvp, lock_flags | LK_RETRY); - vdrop(dvp); - return (error); } From owner-svn-src-stable-10@FreeBSD.ORG Sun Aug 31 21:45:08 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4B1B7694; Sun, 31 Aug 2014 21:45:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 346191D94; Sun, 31 Aug 2014 21:45:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7VLj7S6087097; Sun, 31 Aug 2014 21:45:07 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7VLj77F087096; Sun, 31 Aug 2014 21:45:07 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201408312145.s7VLj77F087096@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 31 Aug 2014 21:45:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270895 - stable/10/sbin/mount X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 21:45:08 -0000 Author: trasz Date: Sun Aug 31 21:45:07 2014 New Revision: 270895 URL: http://svnweb.freebsd.org/changeset/base/270895 Log: MFC r270209: Add description for the "automounted" mount flag. Reviewed by: emaste@ Sponsored by: The FreeBSD Foundation Modified: stable/10/sbin/mount/mount.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/mount/mount.8 ============================================================================== --- stable/10/sbin/mount/mount.8 Sun Aug 31 21:43:28 2014 (r270894) +++ stable/10/sbin/mount/mount.8 Sun Aug 31 21:45:07 2014 (r270895) @@ -28,7 +28,7 @@ .\" @(#)mount.8 8.8 (Berkeley) 6/16/94 .\" $FreeBSD$ .\" -.Dd June 6, 2011 +.Dd August 20, 2014 .Dt MOUNT 8 .Os .Sh NAME @@ -150,6 +150,11 @@ For this reason, the .Cm async flag should be used sparingly, and only when some data recovery mechanism is present. +.It Cm automounted +This flag indicates that the file system was mounted by +.Xr automountd 8 . +Automounted file systems are automatically unmounted by +.Xr autounmountd 8 . .It Cm current When used with the .Fl u From owner-svn-src-stable-10@FreeBSD.ORG Sun Aug 31 21:46:33 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 853F67D0; Sun, 31 Aug 2014 21:46:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 701F61DA0; Sun, 31 Aug 2014 21:46:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7VLkX2f087330; Sun, 31 Aug 2014 21:46:33 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7VLkXTD087329; Sun, 31 Aug 2014 21:46:33 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201408312146.s7VLkXTD087329@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 31 Aug 2014 21:46:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270896 - stable/10/usr.sbin/autofs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 21:46:33 -0000 Author: trasz Date: Sun Aug 31 21:46:32 2014 New Revision: 270896 URL: http://svnweb.freebsd.org/changeset/base/270896 Log: MFC r270210: Remove useless - and buggy, it resulted in spurious warnings in logs - code. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/autofs/autounmountd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/autofs/autounmountd.c ============================================================================== --- stable/10/usr.sbin/autofs/autounmountd.c Sun Aug 31 21:45:07 2014 (r270895) +++ stable/10/usr.sbin/autofs/autounmountd.c Sun Aug 31 21:46:32 2014 (r270896) @@ -182,7 +182,6 @@ expire_automounted(double expiration_tim time_t now; double mounted_for, mounted_max = 0; int error; - bool unmounted = false; now = time(NULL); @@ -211,20 +210,9 @@ expire_automounted(double expiration_tim if (error != 0) { if (mounted_for > mounted_max) mounted_max = mounted_for; - } else { - unmounted = true; } } - if (unmounted) { - /* - * Successful unmount of a filesystem could unbusy its parent - * filesystem that can now be unmounted. - */ - log_debugx("filesystem got unmounted; go around"); - return (expire_automounted(expiration_time)); - } - return (mounted_max); } From owner-svn-src-stable-10@FreeBSD.ORG Sun Aug 31 21:48:15 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9422F926; Sun, 31 Aug 2014 21:48:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7E0CA1DAC; Sun, 31 Aug 2014 21:48:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7VLmFNC087620; Sun, 31 Aug 2014 21:48:15 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7VLmDCb087604; Sun, 31 Aug 2014 21:48:13 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201408312148.s7VLmDCb087604@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 31 Aug 2014 21:48:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270897 - in stable/10: sys/fs/autofs usr.sbin/autofs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 21:48:15 -0000 Author: trasz Date: Sun Aug 31 21:48:12 2014 New Revision: 270897 URL: http://svnweb.freebsd.org/changeset/base/270897 Log: MFC r270276: Use __FBSDID() properly. Suggested by: pluknet@ Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/fs/autofs/autofs.c stable/10/sys/fs/autofs/autofs.h stable/10/sys/fs/autofs/autofs_vfsops.c stable/10/sys/fs/autofs/autofs_vnops.c stable/10/usr.sbin/autofs/automount.c stable/10/usr.sbin/autofs/automountd.c stable/10/usr.sbin/autofs/autounmountd.c stable/10/usr.sbin/autofs/common.c stable/10/usr.sbin/autofs/defined.c stable/10/usr.sbin/autofs/log.c stable/10/usr.sbin/autofs/popen.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/autofs/autofs.c ============================================================================== --- stable/10/sys/fs/autofs/autofs.c Sun Aug 31 21:46:32 2014 (r270896) +++ stable/10/sys/fs/autofs/autofs.c Sun Aug 31 21:48:12 2014 (r270897) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ */ /*- * Copyright (c) 1989, 1991, 1993, 1995 @@ -61,6 +60,9 @@ * */ +#include + __FBSDID("$FreeBSD$"); + #include #include #include Modified: stable/10/sys/fs/autofs/autofs.h ============================================================================== --- stable/10/sys/fs/autofs/autofs.h Sun Aug 31 21:46:32 2014 (r270896) +++ stable/10/sys/fs/autofs/autofs.h Sun Aug 31 21:48:12 2014 (r270897) @@ -32,9 +32,6 @@ #ifndef AUTOFS_H #define AUTOFS_H -#include -__FBSDID("$FreeBSD$"); - #define VFSTOAUTOFS(mp) ((struct autofs_mount *)((mp)->mnt_data)) MALLOC_DECLARE(M_AUTOFS); Modified: stable/10/sys/fs/autofs/autofs_vfsops.c ============================================================================== --- stable/10/sys/fs/autofs/autofs_vfsops.c Sun Aug 31 21:46:32 2014 (r270896) +++ stable/10/sys/fs/autofs/autofs_vfsops.c Sun Aug 31 21:48:12 2014 (r270897) @@ -26,9 +26,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ */ +#include + __FBSDID("$FreeBSD$"); + #include #include #include Modified: stable/10/sys/fs/autofs/autofs_vnops.c ============================================================================== --- stable/10/sys/fs/autofs/autofs_vnops.c Sun Aug 31 21:46:32 2014 (r270896) +++ stable/10/sys/fs/autofs/autofs_vnops.c Sun Aug 31 21:48:12 2014 (r270897) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ */ #include Modified: stable/10/usr.sbin/autofs/automount.c ============================================================================== --- stable/10/usr.sbin/autofs/automount.c Sun Aug 31 21:46:32 2014 (r270896) +++ stable/10/usr.sbin/autofs/automount.c Sun Aug 31 21:48:12 2014 (r270897) @@ -26,9 +26,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include Modified: stable/10/usr.sbin/autofs/automountd.c ============================================================================== --- stable/10/usr.sbin/autofs/automountd.c Sun Aug 31 21:46:32 2014 (r270896) +++ stable/10/usr.sbin/autofs/automountd.c Sun Aug 31 21:48:12 2014 (r270897) @@ -26,9 +26,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include Modified: stable/10/usr.sbin/autofs/autounmountd.c ============================================================================== --- stable/10/usr.sbin/autofs/autounmountd.c Sun Aug 31 21:46:32 2014 (r270896) +++ stable/10/usr.sbin/autofs/autounmountd.c Sun Aug 31 21:48:12 2014 (r270897) @@ -26,9 +26,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include Modified: stable/10/usr.sbin/autofs/common.c ============================================================================== --- stable/10/usr.sbin/autofs/common.c Sun Aug 31 21:46:32 2014 (r270896) +++ stable/10/usr.sbin/autofs/common.c Sun Aug 31 21:48:12 2014 (r270897) @@ -26,9 +26,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include Modified: stable/10/usr.sbin/autofs/defined.c ============================================================================== --- stable/10/usr.sbin/autofs/defined.c Sun Aug 31 21:46:32 2014 (r270896) +++ stable/10/usr.sbin/autofs/defined.c Sun Aug 31 21:48:12 2014 (r270897) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ */ /* @@ -34,6 +33,9 @@ * such as ${OSNAME}, in maps. */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include Modified: stable/10/usr.sbin/autofs/log.c ============================================================================== --- stable/10/usr.sbin/autofs/log.c Sun Aug 31 21:46:32 2014 (r270896) +++ stable/10/usr.sbin/autofs/log.c Sun Aug 31 21:48:12 2014 (r270897) @@ -26,9 +26,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include Modified: stable/10/usr.sbin/autofs/popen.c ============================================================================== --- stable/10/usr.sbin/autofs/popen.c Sun Aug 31 21:46:32 2014 (r270896) +++ stable/10/usr.sbin/autofs/popen.c Sun Aug 31 21:48:12 2014 (r270897) @@ -34,9 +34,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include From owner-svn-src-stable-10@FreeBSD.ORG Sun Aug 31 21:49:46 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 483C2B37; Sun, 31 Aug 2014 21:49:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 191EF1DB9; Sun, 31 Aug 2014 21:49:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7VLnjUV088001; Sun, 31 Aug 2014 21:49:45 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7VLnjab087998; Sun, 31 Aug 2014 21:49:45 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201408312149.s7VLnjab087998@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 31 Aug 2014 21:49:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270898 - stable/10/sys/fs/autofs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 21:49:46 -0000 Author: trasz Date: Sun Aug 31 21:49:45 2014 New Revision: 270898 URL: http://svnweb.freebsd.org/changeset/base/270898 Log: MFC r270281: Fix includes. Suggested by: pluknet@ Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/fs/autofs/autofs.c stable/10/sys/fs/autofs/autofs_vfsops.c stable/10/sys/fs/autofs/autofs_vnops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/autofs/autofs.c ============================================================================== --- stable/10/sys/fs/autofs/autofs.c Sun Aug 31 21:48:12 2014 (r270897) +++ stable/10/sys/fs/autofs/autofs.c Sun Aug 31 21:49:45 2014 (r270898) @@ -80,8 +80,8 @@ #include #include -#include "autofs.h" -#include "autofs_ioctl.h" +#include +#include MALLOC_DEFINE(M_AUTOFS, "autofs", "Automounter filesystem"); Modified: stable/10/sys/fs/autofs/autofs_vfsops.c ============================================================================== --- stable/10/sys/fs/autofs/autofs_vfsops.c Sun Aug 31 21:48:12 2014 (r270897) +++ stable/10/sys/fs/autofs/autofs_vfsops.c Sun Aug 31 21:49:45 2014 (r270898) @@ -42,7 +42,7 @@ #include #include -#include "autofs.h" +#include static const char *autofs_opts[] = { "from", "master_options", "master_prefix", NULL Modified: stable/10/sys/fs/autofs/autofs_vnops.c ============================================================================== --- stable/10/sys/fs/autofs/autofs_vnops.c Sun Aug 31 21:48:12 2014 (r270897) +++ stable/10/sys/fs/autofs/autofs_vnops.c Sun Aug 31 21:49:45 2014 (r270898) @@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include "autofs.h" +#include static int autofs_trigger_vn(struct vnode *vp, const char *path, int pathlen, struct vnode **newvp); From owner-svn-src-stable-10@FreeBSD.ORG Sun Aug 31 21:51:02 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3362CC65; Sun, 31 Aug 2014 21:51:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1E7971DC1; Sun, 31 Aug 2014 21:51:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7VLp1H4088740; Sun, 31 Aug 2014 21:51:01 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7VLp1Ka088739; Sun, 31 Aug 2014 21:51:01 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201408312151.s7VLp1Ka088739@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 31 Aug 2014 21:51:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270899 - stable/10/sys/fs/autofs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 21:51:02 -0000 Author: trasz Date: Sun Aug 31 21:51:01 2014 New Revision: 270899 URL: http://svnweb.freebsd.org/changeset/base/270899 Log: MFC r270399: Add comment explaining one of the quirks in autofs. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/fs/autofs/autofs.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/autofs/autofs.c ============================================================================== --- stable/10/sys/fs/autofs/autofs.c Sun Aug 31 21:49:45 2014 (r270898) +++ stable/10/sys/fs/autofs/autofs.c Sun Aug 31 21:51:01 2014 (r270899) @@ -595,6 +595,14 @@ autofs_open(struct cdev *dev, int flags, { sx_xlock(&sc->sc_lock); + /* + * We must never block automountd(8) and its descendants, and we use + * session ID to determine that: we store session id of the process + * that opened the device, and then compare it with session ids + * of triggering processes. This means running a second automountd(8) + * instance would break the previous one. The check below prevents + * it from happening. + */ if (sc->sc_dev_opened) { sx_xunlock(&sc->sc_lock); return (EBUSY); From owner-svn-src-stable-10@FreeBSD.ORG Sun Aug 31 21:52:27 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9C880DA4; Sun, 31 Aug 2014 21:52:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6CBCD1E58; Sun, 31 Aug 2014 21:52:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7VLqRu1091813; Sun, 31 Aug 2014 21:52:27 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7VLqQX0091808; Sun, 31 Aug 2014 21:52:26 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201408312152.s7VLqQX0091808@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 31 Aug 2014 21:52:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270900 - stable/10/sys/fs/autofs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 21:52:27 -0000 Author: trasz Date: Sun Aug 31 21:52:26 2014 New Revision: 270900 URL: http://svnweb.freebsd.org/changeset/base/270900 Log: MFC r270402: Autofs softc needs to be global anyway, so don't pass it as a local variable, and don't store in autofs_mount. Also rename it from 'sc' to 'autofs_softc', since it's global and extern. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/fs/autofs/autofs.c stable/10/sys/fs/autofs/autofs.h stable/10/sys/fs/autofs/autofs_vfsops.c stable/10/sys/fs/autofs/autofs_vnops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/autofs/autofs.c ============================================================================== --- stable/10/sys/fs/autofs/autofs.c Sun Aug 31 21:51:01 2014 (r270899) +++ stable/10/sys/fs/autofs/autofs.c Sun Aug 31 21:52:26 2014 (r270900) @@ -115,7 +115,7 @@ int autofs_sig_set[] = { SIGQUIT }; -struct autofs_softc *sc; +struct autofs_softc *autofs_softc; SYSCTL_NODE(_vfs, OID_AUTO, autofs, CTLFLAG_RD, 0, "Automounter filesystem"); int autofs_debug = 1; @@ -153,7 +153,11 @@ autofs_init(struct vfsconf *vfsp) { int error; - sc = malloc(sizeof(*sc), M_AUTOFS, M_WAITOK | M_ZERO); + KASSERT(autofs_softc == NULL, + ("softc %p, should be NULL", autofs_softc)); + + autofs_softc = malloc(sizeof(*autofs_softc), M_AUTOFS, + M_WAITOK | M_ZERO); autofs_request_zone = uma_zcreate("autofs_request", sizeof(struct autofs_request), NULL, NULL, NULL, NULL, @@ -162,18 +166,21 @@ autofs_init(struct vfsconf *vfsp) sizeof(struct autofs_node), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); - TAILQ_INIT(&sc->sc_requests); - cv_init(&sc->sc_cv, "autofscv"); - sx_init(&sc->sc_lock, "autofslk"); + TAILQ_INIT(&autofs_softc->sc_requests); + cv_init(&autofs_softc->sc_cv, "autofscv"); + sx_init(&autofs_softc->sc_lock, "autofslk"); - error = make_dev_p(MAKEDEV_CHECKNAME, &sc->sc_cdev, &autofs_cdevsw, - NULL, UID_ROOT, GID_WHEEL, 0600, "autofs"); + error = make_dev_p(MAKEDEV_CHECKNAME, &autofs_softc->sc_cdev, + &autofs_cdevsw, NULL, UID_ROOT, GID_WHEEL, 0600, "autofs"); if (error != 0) { AUTOFS_WARN("failed to create device node, error %d", error); - free(sc, M_AUTOFS); + uma_zdestroy(autofs_request_zone); + uma_zdestroy(autofs_node_zone); + free(autofs_softc, M_AUTOFS); + return (error); } - sc->sc_cdev->si_drv1 = sc; + autofs_softc->sc_cdev->si_drv1 = autofs_softc; return (0); } @@ -182,22 +189,22 @@ int autofs_uninit(struct vfsconf *vfsp) { - sx_xlock(&sc->sc_lock); - if (sc->sc_dev_opened) { - sx_xunlock(&sc->sc_lock); + sx_xlock(&autofs_softc->sc_lock); + if (autofs_softc->sc_dev_opened) { + sx_xunlock(&autofs_softc->sc_lock); return (EBUSY); } - if (sc->sc_cdev != NULL) - destroy_dev(sc->sc_cdev); + if (autofs_softc->sc_cdev != NULL) + destroy_dev(autofs_softc->sc_cdev); uma_zdestroy(autofs_request_zone); uma_zdestroy(autofs_node_zone); - sx_xunlock(&sc->sc_lock); + sx_xunlock(&autofs_softc->sc_lock); /* * XXX: Race with open? */ - free(sc, M_AUTOFS); + free(autofs_softc, M_AUTOFS); return (0); } @@ -209,11 +216,11 @@ autofs_ignore_thread(const struct thread p = td->td_proc; - if (sc->sc_dev_opened == false) + if (autofs_softc->sc_dev_opened == false) return (false); PROC_LOCK(p); - if (p->p_session->s_sid == sc->sc_dev_sid) { + if (p->p_session->s_sid == autofs_softc->sc_dev_sid) { PROC_UNLOCK(p); return (true); } @@ -256,12 +263,10 @@ static void autofs_callout(void *context) { struct autofs_request *ar; - struct autofs_softc *sc; ar = context; - sc = ar->ar_mount->am_softc; - sx_xlock(&sc->sc_lock); + sx_xlock(&autofs_softc->sc_lock); AUTOFS_WARN("request %d for %s timed out after %d seconds", ar->ar_id, ar->ar_path, autofs_timeout); /* @@ -270,8 +275,8 @@ autofs_callout(void *context) ar->ar_error = ETIMEDOUT; ar->ar_done = true; ar->ar_in_progress = false; - cv_broadcast(&sc->sc_cv); - sx_xunlock(&sc->sc_lock); + cv_broadcast(&autofs_softc->sc_cv); + sx_xunlock(&autofs_softc->sc_lock); } bool @@ -356,16 +361,14 @@ autofs_trigger_one(struct autofs_node *a { sigset_t oldset; struct autofs_mount *amp; - struct autofs_softc *sc; struct autofs_node *firstanp; struct autofs_request *ar; char *key, *path; int error = 0, request_error, last; amp = VFSTOAUTOFS(anp->an_vnode->v_mount); - sc = amp->am_softc; - sx_assert(&sc->sc_lock, SA_XLOCKED); + sx_assert(&autofs_softc->sc_lock, SA_XLOCKED); if (anp->an_parent == NULL) { key = strndup(component, componentlen, M_AUTOFS); @@ -378,7 +381,7 @@ autofs_trigger_one(struct autofs_node *a path = autofs_path(anp); - TAILQ_FOREACH(ar, &sc->sc_requests, ar_next) { + TAILQ_FOREACH(ar, &autofs_softc->sc_requests, ar_next) { if (strcmp(ar->ar_path, path) != 0) continue; if (strcmp(ar->ar_key, key) != 0) @@ -402,7 +405,8 @@ autofs_trigger_one(struct autofs_node *a ar = uma_zalloc(autofs_request_zone, M_WAITOK | M_ZERO); ar->ar_mount = amp; - ar->ar_id = atomic_fetchadd_int(&sc->sc_last_request_id, 1); + ar->ar_id = + atomic_fetchadd_int(&autofs_softc->sc_last_request_id, 1); strlcpy(ar->ar_from, amp->am_from, sizeof(ar->ar_from)); strlcpy(ar->ar_path, path, sizeof(ar->ar_path)); strlcpy(ar->ar_prefix, amp->am_prefix, sizeof(ar->ar_prefix)); @@ -414,14 +418,15 @@ autofs_trigger_one(struct autofs_node *a callout_reset(&ar->ar_callout, autofs_timeout * hz, autofs_callout, ar); refcount_init(&ar->ar_refcount, 1); - TAILQ_INSERT_TAIL(&sc->sc_requests, ar, ar_next); + TAILQ_INSERT_TAIL(&autofs_softc->sc_requests, ar, ar_next); } - cv_broadcast(&sc->sc_cv); + cv_broadcast(&autofs_softc->sc_cv); while (ar->ar_done == false) { if (autofs_interruptible != 0) { autofs_set_sigmask(&oldset); - error = cv_wait_sig(&sc->sc_cv, &sc->sc_lock); + error = cv_wait_sig(&autofs_softc->sc_cv, + &autofs_softc->sc_lock); autofs_restore_sigmask(&oldset); if (error != 0) { /* @@ -434,7 +439,7 @@ autofs_trigger_one(struct autofs_node *a break; } } else { - cv_wait(&sc->sc_cv, &sc->sc_lock); + cv_wait(&autofs_softc->sc_cv, &autofs_softc->sc_lock); } } @@ -446,13 +451,13 @@ autofs_trigger_one(struct autofs_node *a last = refcount_release(&ar->ar_refcount); if (last) { - TAILQ_REMOVE(&sc->sc_requests, ar, ar_next); + TAILQ_REMOVE(&autofs_softc->sc_requests, ar, ar_next); /* * XXX: Is it safe? */ - sx_xunlock(&sc->sc_lock); + sx_xunlock(&autofs_softc->sc_lock); callout_drain(&ar->ar_callout); - sx_xlock(&sc->sc_lock); + sx_xlock(&autofs_softc->sc_lock); uma_zfree(autofs_request_zone, ar); } @@ -507,21 +512,21 @@ autofs_trigger(struct autofs_node *anp, AUTOFS_DEBUG("trigger failed with error %d; will retry in " "%d seconds, %d attempts left", error, autofs_retry_delay, autofs_retry_attempts - anp->an_retries); - sx_xunlock(&sc->sc_lock); + sx_xunlock(&autofs_softc->sc_lock); pause("autofs_retry", autofs_retry_delay * hz); - sx_xlock(&sc->sc_lock); + sx_xlock(&autofs_softc->sc_lock); } } static int -autofs_ioctl_request(struct autofs_softc *sc, struct autofs_daemon_request *adr) +autofs_ioctl_request(struct autofs_daemon_request *adr) { struct autofs_request *ar; int error; - sx_xlock(&sc->sc_lock); + sx_xlock(&autofs_softc->sc_lock); for (;;) { - TAILQ_FOREACH(ar, &sc->sc_requests, ar_next) { + TAILQ_FOREACH(ar, &autofs_softc->sc_requests, ar_next) { if (ar->ar_done) continue; if (ar->ar_in_progress) @@ -533,21 +538,22 @@ autofs_ioctl_request(struct autofs_softc if (ar != NULL) break; - error = cv_wait_sig(&sc->sc_cv, &sc->sc_lock); + error = cv_wait_sig(&autofs_softc->sc_cv, + &autofs_softc->sc_lock); if (error != 0) { /* * XXX: For some reson this returns -1 instead * of EINTR, wtf?! */ error = EINTR; - sx_xunlock(&sc->sc_lock); + sx_xunlock(&autofs_softc->sc_lock); AUTOFS_DEBUG("failed with error %d", error); return (error); } } ar->ar_in_progress = true; - sx_xunlock(&sc->sc_lock); + sx_xunlock(&autofs_softc->sc_lock); adr->adr_id = ar->ar_id; strlcpy(adr->adr_from, ar->ar_from, sizeof(adr->adr_from)); @@ -557,25 +563,25 @@ autofs_ioctl_request(struct autofs_softc strlcpy(adr->adr_options, ar->ar_options, sizeof(adr->adr_options)); PROC_LOCK(curproc); - sc->sc_dev_sid = curproc->p_session->s_sid; + autofs_softc->sc_dev_sid = curproc->p_session->s_sid; PROC_UNLOCK(curproc); return (0); } static int -autofs_ioctl_done(struct autofs_softc *sc, struct autofs_daemon_done *add) +autofs_ioctl_done(struct autofs_daemon_done *add) { struct autofs_request *ar; - sx_xlock(&sc->sc_lock); - TAILQ_FOREACH(ar, &sc->sc_requests, ar_next) { + sx_xlock(&autofs_softc->sc_lock); + TAILQ_FOREACH(ar, &autofs_softc->sc_requests, ar_next) { if (ar->ar_id == add->add_id) break; } if (ar == NULL) { - sx_xunlock(&sc->sc_lock); + sx_xunlock(&autofs_softc->sc_lock); AUTOFS_DEBUG("id %d not found", add->add_id); return (ESRCH); } @@ -583,9 +589,9 @@ autofs_ioctl_done(struct autofs_softc *s ar->ar_error = add->add_error; ar->ar_done = true; ar->ar_in_progress = false; - cv_broadcast(&sc->sc_cv); + cv_broadcast(&autofs_softc->sc_cv); - sx_xunlock(&sc->sc_lock); + sx_xunlock(&autofs_softc->sc_lock); return (0); } @@ -594,7 +600,7 @@ static int autofs_open(struct cdev *dev, int flags, int fmt, struct thread *td) { - sx_xlock(&sc->sc_lock); + sx_xlock(&autofs_softc->sc_lock); /* * We must never block automountd(8) and its descendants, and we use * session ID to determine that: we store session id of the process @@ -603,13 +609,13 @@ autofs_open(struct cdev *dev, int flags, * instance would break the previous one. The check below prevents * it from happening. */ - if (sc->sc_dev_opened) { - sx_xunlock(&sc->sc_lock); + if (autofs_softc->sc_dev_opened) { + sx_xunlock(&autofs_softc->sc_lock); return (EBUSY); } - sc->sc_dev_opened = true; - sx_xunlock(&sc->sc_lock); + autofs_softc->sc_dev_opened = true; + sx_xunlock(&autofs_softc->sc_lock); return (0); } @@ -618,10 +624,10 @@ static int autofs_close(struct cdev *dev, int flag, int fmt, struct thread *td) { - sx_xlock(&sc->sc_lock); - KASSERT(sc->sc_dev_opened, ("not opened?")); - sc->sc_dev_opened = false; - sx_xunlock(&sc->sc_lock); + sx_xlock(&autofs_softc->sc_lock); + KASSERT(autofs_softc->sc_dev_opened, ("not opened?")); + autofs_softc->sc_dev_opened = false; + sx_xunlock(&autofs_softc->sc_lock); return (0); } @@ -631,14 +637,14 @@ autofs_ioctl(struct cdev *dev, u_long cm struct thread *td) { - KASSERT(sc->sc_dev_opened, ("not opened?")); + KASSERT(autofs_softc->sc_dev_opened, ("not opened?")); switch (cmd) { case AUTOFSREQUEST: - return (autofs_ioctl_request(sc, + return (autofs_ioctl_request( (struct autofs_daemon_request *)arg)); case AUTOFSDONE: - return (autofs_ioctl_done(sc, + return (autofs_ioctl_done( (struct autofs_daemon_done *)arg)); default: AUTOFS_DEBUG("invalid cmd %lx", cmd); Modified: stable/10/sys/fs/autofs/autofs.h ============================================================================== --- stable/10/sys/fs/autofs/autofs.h Sun Aug 31 21:51:01 2014 (r270899) +++ stable/10/sys/fs/autofs/autofs.h Sun Aug 31 21:52:26 2014 (r270900) @@ -75,7 +75,6 @@ struct autofs_node { struct autofs_mount { TAILQ_ENTRY(autofs_mount) am_next; - struct autofs_softc *am_softc; struct autofs_node *am_root; struct mount *am_mp; struct sx am_lock; Modified: stable/10/sys/fs/autofs/autofs_vfsops.c ============================================================================== --- stable/10/sys/fs/autofs/autofs_vfsops.c Sun Aug 31 21:51:01 2014 (r270899) +++ stable/10/sys/fs/autofs/autofs_vfsops.c Sun Aug 31 21:52:26 2014 (r270900) @@ -48,7 +48,7 @@ static const char *autofs_opts[] = { "from", "master_options", "master_prefix", NULL }; -extern struct autofs_softc *sc; +extern struct autofs_softc *autofs_softc; static int autofs_mount(struct mount *mp) @@ -78,7 +78,6 @@ autofs_mount(struct mount *mp) amp = malloc(sizeof(*amp), M_AUTOFS, M_WAITOK | M_ZERO); mp->mnt_data = amp; amp->am_mp = mp; - amp->am_softc = sc; strlcpy(amp->am_from, from, sizeof(amp->am_from)); strlcpy(amp->am_mountpoint, fspath, sizeof(amp->am_mountpoint)); strlcpy(amp->am_options, options, sizeof(amp->am_options)); @@ -129,8 +128,8 @@ autofs_unmount(struct mount *mp, int mnt */ for (;;) { found = false; - sx_xlock(&sc->sc_lock); - TAILQ_FOREACH(ar, &sc->sc_requests, ar_next) { + sx_xlock(&autofs_softc->sc_lock); + TAILQ_FOREACH(ar, &autofs_softc->sc_requests, ar_next) { if (ar->ar_mount != amp) continue; ar->ar_error = ENXIO; @@ -138,11 +137,11 @@ autofs_unmount(struct mount *mp, int mnt ar->ar_in_progress = false; found = true; } - sx_xunlock(&sc->sc_lock); + sx_xunlock(&autofs_softc->sc_lock); if (found == false) break; - cv_broadcast(&sc->sc_cv); + cv_broadcast(&autofs_softc->sc_cv); pause("autofs_umount", 1); } Modified: stable/10/sys/fs/autofs/autofs_vnops.c ============================================================================== --- stable/10/sys/fs/autofs/autofs_vnops.c Sun Aug 31 21:51:01 2014 (r270899) +++ stable/10/sys/fs/autofs/autofs_vnops.c Sun Aug 31 21:52:26 2014 (r270900) @@ -51,6 +51,8 @@ __FBSDID("$FreeBSD$"); static int autofs_trigger_vn(struct vnode *vp, const char *path, int pathlen, struct vnode **newvp); +extern struct autofs_softc *autofs_softc; + static int autofs_access(struct vop_access_args *ap) { @@ -134,12 +136,10 @@ autofs_trigger_vn(struct vnode *vp, cons { struct autofs_node *anp; struct autofs_mount *amp; - struct autofs_softc *sc; int error, lock_flags; anp = vp->v_data; amp = VFSTOAUTOFS(vp->v_mount); - sc = amp->am_softc; /* * Release the vnode lock, so that other operations, in partcular @@ -151,7 +151,7 @@ autofs_trigger_vn(struct vnode *vp, cons vref(vp); VOP_UNLOCK(vp, 0); - sx_xlock(&sc->sc_lock); + sx_xlock(&autofs_softc->sc_lock); /* * XXX: Workaround for mounting the same thing multiple times; revisit. @@ -163,7 +163,7 @@ autofs_trigger_vn(struct vnode *vp, cons error = autofs_trigger(anp, path, pathlen); mounted: - sx_xunlock(&sc->sc_lock); + sx_xunlock(&autofs_softc->sc_lock); vn_lock(vp, lock_flags | LK_RETRY); vunref(vp); if ((vp->v_iflag & VI_DOOMED) != 0) { From owner-svn-src-stable-10@FreeBSD.ORG Sun Aug 31 21:53:43 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 06077EDA; Sun, 31 Aug 2014 21:53:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E4FC51E63; Sun, 31 Aug 2014 21:53:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7VLrgCs092021; Sun, 31 Aug 2014 21:53:42 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7VLrgQl092020; Sun, 31 Aug 2014 21:53:42 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201408312153.s7VLrgQl092020@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 31 Aug 2014 21:53:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270901 - stable/10/usr.sbin/autofs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 21:53:43 -0000 Author: trasz Date: Sun Aug 31 21:53:42 2014 New Revision: 270901 URL: http://svnweb.freebsd.org/changeset/base/270901 Log: MFC r270405: Don't fail on executable maps that return no entries. This turns useless error message into useful one. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/autofs/common.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/autofs/common.c ============================================================================== --- stable/10/usr.sbin/autofs/common.c Sun Aug 31 21:52:26 2014 (r270900) +++ stable/10/usr.sbin/autofs/common.c Sun Aug 31 21:53:42 2014 (r270901) @@ -716,7 +716,13 @@ parse_map_yyin(struct node *parent, cons for (;;) { ret = yylex(); if (ret == 0 || ret == NEWLINE) { - if (key != NULL || options != NULL) { + /* + * In case of executable map, the key is always + * non-NULL, even if the map is empty. So, make sure + * we don't fail empty maps here. + */ + if ((key != NULL && executable_key == NULL) || + options != NULL) { log_errx(1, "truncated entry at %s, line %d", map, lineno); } From owner-svn-src-stable-10@FreeBSD.ORG Sun Aug 31 21:55:10 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1298493; Sun, 31 Aug 2014 21:55:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E64BD1E6C; Sun, 31 Aug 2014 21:55:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7VLt96A092327; Sun, 31 Aug 2014 21:55:09 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7VLt9Wf092323; Sun, 31 Aug 2014 21:55:09 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201408312155.s7VLt9Wf092323@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 31 Aug 2014 21:55:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270902 - in stable/10: etc usr.sbin/autofs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 21:55:10 -0000 Author: trasz Date: Sun Aug 31 21:55:08 2014 New Revision: 270902 URL: http://svnweb.freebsd.org/changeset/base/270902 Log: MFC r270406: Add "nobrowse" option. Previously automountd(8) always behaved as if it was set, now it's conditional. PR: 192862 Sponsored by: The FreeBSD Foundation Modified: stable/10/etc/auto_master stable/10/usr.sbin/autofs/auto_master.5 stable/10/usr.sbin/autofs/automountd.c stable/10/usr.sbin/autofs/common.c Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/auto_master ============================================================================== --- stable/10/etc/auto_master Sun Aug 31 21:53:42 2014 (r270901) +++ stable/10/etc/auto_master Sun Aug 31 21:55:08 2014 (r270902) @@ -2,4 +2,4 @@ # # Automounter master map, see auto_master(5) for details. # -/net -hosts -nosuid +/net -hosts -nobrowse,nosuid Modified: stable/10/usr.sbin/autofs/auto_master.5 ============================================================================== --- stable/10/usr.sbin/autofs/auto_master.5 Sun Aug 31 21:53:42 2014 (r270901) +++ stable/10/usr.sbin/autofs/auto_master.5 Sun Aug 31 21:55:08 2014 (r270902) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 31, 2014 +.Dd August 23, 2014 .Dt AUTO_MASTER 5 .Os .Sh NAME @@ -134,6 +134,10 @@ is used to specify filesystem type. It is not passed to the mount program as an option. Instead, it is passed as argument to .Cm "mount -t". +The special option +.Li nobrowse +is used to disable creation of top-level directories for special +and executable maps. .Pp The optional .Pa mountpoint Modified: stable/10/usr.sbin/autofs/automountd.c ============================================================================== --- stable/10/usr.sbin/autofs/automountd.c Sun Aug 31 21:53:42 2014 (r270901) +++ stable/10/usr.sbin/autofs/automountd.c Sun Aug 31 21:55:08 2014 (r270902) @@ -182,7 +182,7 @@ handle_request(const struct autofs_daemo const char *map; struct node *root, *parent, *node; FILE *f; - char *options, *fstype, *retrycnt, *tmp; + char *options, *fstype, *nobrowse, *retrycnt, *tmp; int error; log_debugx("got request %d: from %s, path %s, prefix \"%s\", " @@ -222,6 +222,28 @@ handle_request(const struct autofs_daemo log_debugx("found node defined at %s:%d; not a mountpoint", node->n_config_file, node->n_config_line); + options = node_options(node); + + /* + * Prepend options passed via automountd(8) command line. + */ + if (cmdline_options != NULL) { + options = + separated_concat(cmdline_options, options, ','); + } + + nobrowse = pick_option("nobrowse", &options); + if (nobrowse != NULL && adr->adr_key[0] == '\0') { + log_debugx("skipping map %s due to \"nobrowse\" " + "option; exiting", map); + done(0); + + /* + * Exit without calling exit_callback(). + */ + quick_exit(0); + } + /* * Not a mountpoint; create directories in the autofs mount * and complete the request. @@ -239,9 +261,9 @@ handle_request(const struct autofs_daemo if (node != NULL) create_subtree(node, false); } - done(0); log_debugx("nothing to mount; exiting"); + done(0); /* * Exit without calling exit_callback(). @@ -274,6 +296,11 @@ handle_request(const struct autofs_daemo options = separated_concat(options, "automounted", ','); /* + * Remove "nobrowse", mount(8) doesn't understand it. + */ + pick_option("nobrowse", &options); + + /* * Figure out fstype. */ fstype = pick_option("fstype=", &options); @@ -309,8 +336,8 @@ handle_request(const struct autofs_daemo if (error != 0) log_errx(1, "mount failed"); - done(0); log_debugx("mount done; exiting"); + done(0); /* * Exit without calling exit_callback(). Modified: stable/10/usr.sbin/autofs/common.c ============================================================================== --- stable/10/usr.sbin/autofs/common.c Sun Aug 31 21:53:42 2014 (r270901) +++ stable/10/usr.sbin/autofs/common.c Sun Aug 31 21:55:08 2014 (r270902) @@ -856,6 +856,36 @@ again: } } +/* + * Parse output of a special map called without argument. This is just + * a list of keys. + */ +static void +parse_map_keys_yyin(struct node *parent, const char *map) +{ + char *key = NULL; + int ret; + + lineno = 1; + + for (;;) { + ret = yylex(); + + if (ret == NEWLINE) + continue; + + if (ret == 0) { + /* + * End of file. + */ + break; + } + + key = checked_strdup(yytext); + node_new(parent, key, NULL, NULL, map, lineno); + } +} + static bool file_is_executable(const char *path) { @@ -882,11 +912,6 @@ parse_special_map(struct node *parent, c assert(map[0] == '-'); - if (key == NULL) { - log_debugx("skipping map %s due to forced -nobrowse", map); - return; - } - /* * +1 to skip leading "-" in map name. */ @@ -897,7 +922,11 @@ parse_special_map(struct node *parent, c yyin = auto_popen(path, key, NULL); assert(yyin != NULL); - parse_map_yyin(parent, map, key); + if (key == NULL) { + parse_map_keys_yyin(parent, map); + } else { + parse_map_yyin(parent, map, key); + } error = auto_pclose(yyin); yyin = NULL; From owner-svn-src-stable-10@FreeBSD.ORG Sun Aug 31 21:56:42 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D1B221CB; Sun, 31 Aug 2014 21:56:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A286F1E7B; Sun, 31 Aug 2014 21:56:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7VLugmm092581; Sun, 31 Aug 2014 21:56:42 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7VLugr1092580; Sun, 31 Aug 2014 21:56:42 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201408312156.s7VLugr1092580@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 31 Aug 2014 21:56:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270903 - stable/10/usr.sbin/autofs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 21:56:42 -0000 Author: trasz Date: Sun Aug 31 21:56:42 2014 New Revision: 270903 URL: http://svnweb.freebsd.org/changeset/base/270903 Log: MFC r270454: Fix handling of keys in executable maps. Previously it was broken for keys containing whitespace. PR: 192947 Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/autofs/common.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/autofs/common.c ============================================================================== --- stable/10/usr.sbin/autofs/common.c Sun Aug 31 21:55:08 2014 (r270902) +++ stable/10/usr.sbin/autofs/common.c Sun Aug 31 21:56:42 2014 (r270903) @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#define _WITH_GETLINE #include #include #include @@ -213,6 +214,7 @@ node_new(struct node *parent, char *key, TAILQ_INIT(&n->n_children); assert(key != NULL); + assert(key[0] != '\0'); n->n_key = key; if (options != NULL) n->n_options = options; @@ -243,6 +245,7 @@ node_new_map(struct node *parent, char * TAILQ_INIT(&n->n_children); assert(key != NULL); + assert(key[0] != '\0'); n->n_key = key; if (options != NULL) n->n_options = options; @@ -565,6 +568,7 @@ node_path_x(const struct node *n, char * return (x); } + assert(n->n_key[0] != '\0'); path = separated_concat(n->n_key, x, '/'); free(x); @@ -857,33 +861,44 @@ again: } /* - * Parse output of a special map called without argument. This is just - * a list of keys. + * Parse output of a special map called without argument. It is a list + * of keys, separated by newlines. They can contain whitespace, so use + * getline(3) instead of lexer used for maps. */ static void parse_map_keys_yyin(struct node *parent, const char *map) { - char *key = NULL; - int ret; + char *line = NULL, *key; + size_t linecap = 0; + ssize_t linelen; lineno = 1; for (;;) { - ret = yylex(); - - if (ret == NEWLINE) - continue; - - if (ret == 0) { + linelen = getline(&line, &linecap, yyin); + if (linelen < 0) { /* * End of file. */ break; } + if (linelen <= 1) { + /* + * Empty line, consisting of just the newline. + */ + continue; + } + + /* + * "-1" to strip the trailing newline. + */ + key = strndup(line, linelen - 1); - key = checked_strdup(yytext); + log_debugx("adding key \"%s\"", key); node_new(parent, key, NULL, NULL, map, lineno); + lineno++; } + free(line); } static bool From owner-svn-src-stable-10@FreeBSD.ORG Sun Aug 31 21:58:08 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3B520314; Sun, 31 Aug 2014 21:58:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 261FF1E90; Sun, 31 Aug 2014 21:58:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7VLw8RI092842; Sun, 31 Aug 2014 21:58:08 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7VLw8ZE092841; Sun, 31 Aug 2014 21:58:08 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201408312158.s7VLw8ZE092841@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 31 Aug 2014 21:58:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270904 - stable/10/sys/fs/autofs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 21:58:08 -0000 Author: trasz Date: Sun Aug 31 21:58:07 2014 New Revision: 270904 URL: http://svnweb.freebsd.org/changeset/base/270904 Log: MFC r270507: Fix bug that, assuming a/ is a root of NFS filesystem mounted on autofs, prevented "mv a/from a/to" from working, while "cd a && mv from to" was ok. PR: 192948 Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/fs/autofs/autofs_vnops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/autofs/autofs_vnops.c ============================================================================== --- stable/10/sys/fs/autofs/autofs_vnops.c Sun Aug 31 21:56:42 2014 (r270903) +++ stable/10/sys/fs/autofs/autofs_vnops.c Sun Aug 31 21:58:07 2014 (r270904) @@ -276,9 +276,6 @@ autofs_lookup(struct vop_lookup_args *ap } } - if (cnp->cn_nameiop == RENAME) - return (EOPNOTSUPP); - AUTOFS_LOCK(amp); error = autofs_node_find(anp, cnp->cn_nameptr, cnp->cn_namelen, &child); if (error != 0) { From owner-svn-src-stable-10@FreeBSD.ORG Sun Aug 31 23:09:26 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2FEB3D18; Sun, 31 Aug 2014 23:09:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0FBD115B5; Sun, 31 Aug 2014 23:09:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7VN9PLC026552; Sun, 31 Aug 2014 23:09:25 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7VN9NuI026535; Sun, 31 Aug 2014 23:09:23 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201408312309.s7VN9NuI026535@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 31 Aug 2014 23:09:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270905 - in stable/10: . contrib/atf contrib/atf/atf-c contrib/atf/atf-c++ contrib/atf/atf-sh etc/mtree lib/atf/libatf-c lib/atf/libatf-c++ lib/atf/libatf-c++/tests lib/atf/libatf-c/te... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 23:09:26 -0000 Author: ngie Date: Sun Aug 31 23:09:23 2014 New Revision: 270905 URL: http://svnweb.freebsd.org/changeset/base/270905 Log: MFC r266650, r267172 (both by jmmv): r266650: Change libatf-c and libatf-c++ to be private libraries. We should not be leaking these interfaces to the outside world given that it's much easier for third-party components to use the devel/atf package from ports. As a side-effect, we can also drop the ATF pkgconfig and aclocal files from the base system. Nothing in the base system needs these, and it was quite ugly to have to get them installed only so that a few ports could build. The offending ports have been fixed to depend on devel/atf explicitly. Reviewed by: bapt r267172: Homogenize libatf-* version numbers with upstream. The libatf-* major version numbers in FreeBSD were one version ahead of upstream because, when atf was first imported into FreeBSD, the upstream numbers were not respected. This is just confusing and bound to cause problems down the road. Fix this by taking advantage of the fact that libatf-* are now private and that atf is not yet built by default. However, and unfortunately, a clean build is needed for tests to continue working once "make delete-old-libs" has been run; hence the note in UPDATING. Phabric: D701 Approved by: jmmv (maintainer, mentor) Deleted: stable/10/contrib/atf/atf-c++/atf-c++.m4 stable/10/contrib/atf/atf-c++/atf-c++.pc.in stable/10/contrib/atf/atf-c/atf-c.m4 stable/10/contrib/atf/atf-c/atf-c.pc.in stable/10/contrib/atf/atf-c/atf-common.m4 stable/10/contrib/atf/atf-sh/atf-sh.m4 stable/10/contrib/atf/atf-sh/atf-sh.pc.in Modified: stable/10/UPDATING stable/10/contrib/atf/FREEBSD-Xlist stable/10/etc/mtree/BSD.tests.dist stable/10/lib/atf/libatf-c++/Makefile stable/10/lib/atf/libatf-c++/tests/Makefile stable/10/lib/atf/libatf-c/Makefile stable/10/lib/atf/libatf-c/tests/Makefile stable/10/libexec/atf/atf-check/Makefile stable/10/share/mk/atf.test.mk stable/10/share/mk/bsd.libnames.mk stable/10/tools/build/mk/OptionalObsoleteFiles.inc stable/10/usr.bin/atf/atf-sh/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/UPDATING ============================================================================== --- stable/10/UPDATING Sun Aug 31 21:58:07 2014 (r270904) +++ stable/10/UPDATING Sun Aug 31 23:09:23 2014 (r270905) @@ -16,6 +16,22 @@ from older versions of FreeBSD, try WITH stable/10, and then rebuild without this option. The bootstrap process from older version of current is a bit fragile. +20140831: + The libatf-c and libatf-c++ major versions were downgraded to 0 and + 1 respectively to match the upstream numbers. They were out of + sync because, when they were originally added to FreeBSD, the + upstream versions were not respected. These libraries are private + and not yet built by default, so renumbering them should be a + non-issue. However, unclean source trees will yield broken test + programs once the operator executes "make delete-old-libs" after a + "make installworld". + + If you are using WITH_TESTS=yes (not the default), wipe the object + tree and rebuild from scratch to prevent spurious test failures. + This is only needed once: the old, misnumbered libraries have been + added to OptionalObsoleteFiles.inc so they will be removed during a + clean upgrade. + 20140814: The ixgbe tunables now match their sysctl counterparts, for example: hw.ixgbe.enable_aim => hw.ix.enable_aim Modified: stable/10/contrib/atf/FREEBSD-Xlist ============================================================================== --- stable/10/contrib/atf/FREEBSD-Xlist Sun Aug 31 21:58:07 2014 (r270904) +++ stable/10/contrib/atf/FREEBSD-Xlist Sun Aug 31 23:09:23 2014 (r270905) @@ -2,6 +2,8 @@ */*/Makefile* */Atffile */Makefile* +*/*.m4 +*/*.pc.in Atffile INSTALL Makefile* Modified: stable/10/etc/mtree/BSD.tests.dist ============================================================================== --- stable/10/etc/mtree/BSD.tests.dist Sun Aug 31 21:58:07 2014 (r270904) +++ stable/10/etc/mtree/BSD.tests.dist Sun Aug 31 23:09:23 2014 (r270905) @@ -12,8 +12,6 @@ .. .. share - aclocal - .. atf .. doc Modified: stable/10/lib/atf/libatf-c++/Makefile ============================================================================== --- stable/10/lib/atf/libatf-c++/Makefile Sun Aug 31 21:58:07 2014 (r270904) +++ stable/10/lib/atf/libatf-c++/Makefile Sun Aug 31 23:09:23 2014 (r270905) @@ -28,7 +28,8 @@ .include LIB= atf-c++ -SHLIB_MAJOR= 2 +PRIVATELIB= true +SHLIB_MAJOR= 1 # libatf-c++ depends on the C version of the ATF library to build. DPADD= ${LIBATF_C} @@ -72,20 +73,6 @@ INCSDIR_atf-c++.hpp= ${INCLUDEDIR} MAN= atf-c++-api.3 -all: atf-c++.pc -atf-c++.pc: atf-c++.pc.in atf-version - sed -e 's,__CXX__,${CXX},g' \ - -e 's,__INCLUDEDIR__,${INCLUDEDIR},g' \ - -e 's,__LIBDIR__,${LIBDIR},g' \ - -e "s,__ATF_VERSION__,$$(cat atf-version),g" \ - <${ATF}/atf-c++/atf-c++.pc.in >atf-c++.pc - -beforeinstall: - ${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ - atf-c++.pc ${DESTDIR}${LIBDATADIR}/pkgconfig - ${INSTALL} -C -o ${SHAREOWN} -g ${SHAREGRP} -m ${SHAREMODE} \ - ${ATF}/atf-c++/atf-c++.m4 ${DESTDIR}${SHAREDIR}/aclocal - .if ${MK_TESTS} != "no" SUBDIR= tests .endif Modified: stable/10/lib/atf/libatf-c++/tests/Makefile ============================================================================== --- stable/10/lib/atf/libatf-c++/tests/Makefile Sun Aug 31 21:58:07 2014 (r270904) +++ stable/10/lib/atf/libatf-c++/tests/Makefile Sun Aug 31 23:09:23 2014 (r270905) @@ -26,6 +26,4 @@ ATF_TESTS_CXX+= ${_T} SRCS.${_T}= ${_T}.cpp test_helpers.cpp .endfor -ATF_TESTS_SH= pkg_config_test - .include Modified: stable/10/lib/atf/libatf-c/Makefile ============================================================================== --- stable/10/lib/atf/libatf-c/Makefile Sun Aug 31 21:58:07 2014 (r270904) +++ stable/10/lib/atf/libatf-c/Makefile Sun Aug 31 23:09:23 2014 (r270905) @@ -28,7 +28,8 @@ .include LIB= atf-c -SHLIB_MAJOR= 1 +PRIVATELIB= true +SHLIB_MAJOR= 0 ATF= ${.CURDIR:H:H:H}/contrib/atf .PATH: ${ATF} @@ -74,22 +75,6 @@ INCSDIR_atf-c.h= ${INCLUDEDIR} MAN= atf-c-api.3 -all: atf-c.pc -atf-c.pc: atf-c.pc.in atf-version - sed -e 's,__CC__,${CC},g' \ - -e 's,__INCLUDEDIR__,${INCLUDEDIR},g' \ - -e 's,__LIBDIR__,${LIBDIR},g' \ - -e "s,__ATF_VERSION__,$$(cat atf-version),g" \ - <${ATF}/atf-c/atf-c.pc.in >atf-c.pc - -beforeinstall: - ${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ - atf-c.pc ${DESTDIR}${LIBDATADIR}/pkgconfig - ${INSTALL} -C -o ${SHAREOWN} -g ${SHAREGRP} -m ${SHAREMODE} \ - ${ATF}/atf-c/atf-common.m4 ${DESTDIR}${SHAREDIR}/aclocal - ${INSTALL} -C -o ${SHAREOWN} -g ${SHAREGRP} -m ${SHAREMODE} \ - ${ATF}/atf-c/atf-c.m4 ${DESTDIR}${SHAREDIR}/aclocal - .if ${MK_TESTS} != "no" SUBDIR= tests .endif Modified: stable/10/lib/atf/libatf-c/tests/Makefile ============================================================================== --- stable/10/lib/atf/libatf-c/tests/Makefile Sun Aug 31 21:58:07 2014 (r270904) +++ stable/10/lib/atf/libatf-c/tests/Makefile Sun Aug 31 23:09:23 2014 (r270905) @@ -33,6 +33,4 @@ ATF_TESTS_C+= ${_T} SRCS.${_T}= ${_T}.c test_helpers.c .endfor -ATF_TESTS_SH= pkg_config_test - .include Modified: stable/10/libexec/atf/atf-check/Makefile ============================================================================== --- stable/10/libexec/atf/atf-check/Makefile Sun Aug 31 21:58:07 2014 (r270904) +++ stable/10/libexec/atf/atf-check/Makefile Sun Aug 31 23:09:23 2014 (r270905) @@ -37,11 +37,11 @@ MAN= atf-check.1 CFLAGS+= -I${ATF} -DPADD+= ${LIBATF_CXX} ${LIBATF_C} - LDFLAGS+= -L${.OBJDIR}/../../../lib/atf/libatf-c++ LDFLAGS+= -L${.OBJDIR}/../../../lib/atf/libatf-c +DPADD+= ${LIBATF_CXX} ${LIBATF_C} LDADD+= -latf-c++ -latf-c +USEPRIVATELIB= atf-c++ atf-c .if ${MK_TESTS} != "no" SUBDIR+= tests Modified: stable/10/share/mk/atf.test.mk ============================================================================== --- stable/10/share/mk/atf.test.mk Sun Aug 31 21:58:07 2014 (r270904) +++ stable/10/share/mk/atf.test.mk Sun Aug 31 23:09:23 2014 (r270905) @@ -72,6 +72,7 @@ MAN.${_T}?= # empty SRCS.${_T}?= ${_T}.c DPADD.${_T}+= ${LIBATF_C} LDADD.${_T}+= -latf-c +USEPRIVATELIB+= atf-c TEST_INTERFACE.${_T}= atf .endfor .endif @@ -85,6 +86,7 @@ MAN.${_T}?= # empty SRCS.${_T}?= ${_T}${CXX_SUFFIX:U.cc} DPADD.${_T}+= ${LIBATF_CXX} ${LIBATF_C} LDADD.${_T}+= -latf-c++ -latf-c +USEPRIVATELIB+= atf-c++ TEST_INTERFACE.${_T}= atf .endfor .endif Modified: stable/10/share/mk/bsd.libnames.mk ============================================================================== --- stable/10/share/mk/bsd.libnames.mk Sun Aug 31 21:58:07 2014 (r270904) +++ stable/10/share/mk/bsd.libnames.mk Sun Aug 31 23:09:23 2014 (r270905) @@ -13,8 +13,8 @@ LIBCRT0?= ${DESTDIR}${LIBDIR}/crt0.o LIBALIAS?= ${DESTDIR}${LIBDIR}/libalias.a LIBARCHIVE?= ${DESTDIR}${LIBDIR}/libarchive.a LIBASN1?= ${DESTDIR}${LIBDIR}/libasn1.a -LIBATF_C?= ${DESTDIR}${LIBDIR}/libatf-c.a -LIBATF_CXX?= ${DESTDIR}${LIBDIR}/libatf-c++.a +LIBATF_C?= ${DESTDIR}${LIBPRIVATEDIR}/libatf-c.a +LIBATF_CXX?= ${DESTDIR}${LIBPRIVATEDIR}/libatf-c++.a LIBATM?= ${DESTDIR}${LIBDIR}/libatm.a LIBAUDITD?= ${DESTDIR}${LIBDIR}/libauditd.a LIBAVL?= ${DESTDIR}${LIBDIR}/libavl.a Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Sun Aug 31 21:58:07 2014 (r270904) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Sun Aug 31 23:09:23 2014 (r270905) @@ -4070,7 +4070,38 @@ OLD_FILES+=usr/share/man/man8/telnetd.8. .endif .if ${MK_TESTS} == yes +OLD_LIBS+=usr/lib/libatf-c++.a +OLD_LIBS+=usr/lib/libatf-c++.so OLD_LIBS+=usr/lib/libatf-c++.so.1 +OLD_LIBS+=usr/lib/libatf-c++.so.2 +OLD_LIBS+=usr/lib/libatf-c++_p.a +OLD_LIBS+=usr/lib/libatf-c.a +OLD_LIBS+=usr/lib/libatf-c.so +OLD_LIBS+=usr/lib/libatf-c.so.1 +OLD_LIBS+=usr/lib/libatf-c_p.a +OLD_LIBS+=usr/lib/private/libatf-c.so.1 +OLD_LIBS+=usr/lib/private/libatf-c++.so.2 +.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64" +OLD_LIBS+=usr/lib32/libatf-c++.a +OLD_LIBS+=usr/lib32/libatf-c++.so +OLD_LIBS+=usr/lib32/libatf-c++.so.1 +OLD_LIBS+=usr/lib32/libatf-c++.so.2 +OLD_LIBS+=usr/lib32/libatf-c++_p.a +OLD_LIBS+=usr/lib32/libatf-c.a +OLD_LIBS+=usr/lib32/libatf-c.so +OLD_LIBS+=usr/lib32/libatf-c.so.1 +OLD_LIBS+=usr/lib32/libatf-c_p.a +OLD_LIBS+=usr/lib32/private/libatf-c.so.1 +OLD_LIBS+=usr/lib32/private/libatf-c++.so.2 +.endif +OLD_FILES+=usr/libdata/pkgconfig/atf-c++.pc +OLD_FILES+=usr/libdata/pkgconfig/atf-c.pc +OLD_FILES+=usr/libdata/pkgconfig/atf-sh.pc +OLD_FILES+=usr/share/aclocal/atf-c++.m4 +OLD_FILES+=usr/share/aclocal/atf-c.m4 +OLD_FILES+=usr/share/aclocal/atf-common.m4 +OLD_FILES+=usr/share/aclocal/atf-sh.m4 +OLD_DIRS+=usr/share/aclocal OLD_FILES+=usr/tests/bin/date/legacy_test OLD_FILES+=usr/tests/lib/atf/libatf-c/test_helpers_test OLD_FILES+=usr/tests/lib/atf/test-programs/fork_test @@ -4085,6 +4116,7 @@ OLD_FILES+=usr/tests/lib/atf/libatf-c++/ OLD_FILES+=usr/tests/lib/atf/libatf-c++/parser_test OLD_FILES+=usr/tests/lib/atf/libatf-c++/process_test OLD_FILES+=usr/tests/lib/atf/libatf-c++/sanity_test +OLD_FILES+=usr/tests/lib/atf/libatf-c++/pkg_config_test OLD_FILES+=usr/tests/lib/atf/libatf-c++/text_test OLD_FILES+=usr/tests/lib/atf/libatf-c++/ui_test OLD_FILES+=usr/tests/lib/atf/libatf-c/dynstr_test @@ -4092,6 +4124,7 @@ OLD_FILES+=usr/tests/lib/atf/libatf-c/en OLD_FILES+=usr/tests/lib/atf/libatf-c/fs_test OLD_FILES+=usr/tests/lib/atf/libatf-c/list_test OLD_FILES+=usr/tests/lib/atf/libatf-c/map_test +OLD_FILES+=usr/tests/lib/atf/libatf-c/pkg_config_test OLD_FILES+=usr/tests/lib/atf/libatf-c/process_helpers OLD_FILES+=usr/tests/lib/atf/libatf-c/process_test OLD_FILES+=usr/tests/lib/atf/libatf-c/sanity_test Modified: stable/10/usr.bin/atf/atf-sh/Makefile ============================================================================== --- stable/10/usr.bin/atf/atf-sh/Makefile Sun Aug 31 21:58:07 2014 (r270904) +++ stable/10/usr.bin/atf/atf-sh/Makefile Sun Aug 31 23:09:23 2014 (r270905) @@ -39,24 +39,13 @@ CFLAGS+= -I${ATF} DPADD+= ${LIBATF_C} ${LIBATF_CXX} LDADD+= -latf-c++ -latf-c +USEPRIVATELIB= atf-c++ atf-c FILESGROUPS= SUBR SUBRDIR= ${SHAREDIR}/atf SUBR= libatf-sh.subr -all: atf-sh.pc -atf-sh.pc: atf-sh.pc.in atf-version - sed -e 's,__EXEC_PREFIX__,/usr,g' \ - -e "s,__ATF_VERSION__,$$(cat atf-version),g" \ - <${ATF}/atf-sh/atf-sh.pc.in >atf-sh.pc - -beforeinstall: - ${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ - atf-sh.pc ${DESTDIR}${LIBDATADIR}/pkgconfig - ${INSTALL} -C -o ${SHAREOWN} -g ${SHAREGRP} -m ${SHAREMODE} \ - ${ATF}/atf-sh/atf-sh.m4 ${DESTDIR}${SHAREDIR}/aclocal - .if ${MK_TESTS} != "no" SUBDIR+= tests .endif From owner-svn-src-stable-10@FreeBSD.ORG Mon Sep 1 01:39:21 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A9ABDDDC; Mon, 1 Sep 2014 01:39:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 949EF146F; Mon, 1 Sep 2014 01:39:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s811dL10096686; Mon, 1 Sep 2014 01:39:21 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s811dLPd096684; Mon, 1 Sep 2014 01:39:21 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201409010139.s811dLPd096684@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 1 Sep 2014 01:39:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270907 - stable/10/usr.bin/iscsictl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 01:39:21 -0000 Author: ngie Date: Mon Sep 1 01:39:20 2014 New Revision: 270907 URL: http://svnweb.freebsd.org/changeset/base/270907 Log: MFC r270432: Fix "make checkdpadd" in usr.bin/iscsictl by removing -lfl dependency Approved by: rpaulo (mentor) MFC after: 1 week Modified: stable/10/usr.bin/iscsictl/Makefile stable/10/usr.bin/iscsictl/token.l Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/iscsictl/Makefile ============================================================================== --- stable/10/usr.bin/iscsictl/Makefile Sun Aug 31 23:51:09 2014 (r270906) +++ stable/10/usr.bin/iscsictl/Makefile Mon Sep 1 01:39:20 2014 (r270907) @@ -7,7 +7,7 @@ CFLAGS+= -I${.CURDIR}/../../sys/dev/iscs MAN= iscsictl.8 DPADD= ${LIBCAM} ${LIBUTIL} -LDADD= -lcam -lfl -lutil +LDADD= -lcam -lutil YFLAGS+= -v LFLAGS+= -i Modified: stable/10/usr.bin/iscsictl/token.l ============================================================================== --- stable/10/usr.bin/iscsictl/token.l Sun Aug 31 23:51:09 2014 (r270906) +++ stable/10/usr.bin/iscsictl/token.l Mon Sep 1 01:39:20 2014 (r270907) @@ -46,6 +46,7 @@ extern int yylex(void); %option noinput %option nounput +%option noyywrap %% HeaderDigest { return HEADER_DIGEST; } From owner-svn-src-stable-10@FreeBSD.ORG Mon Sep 1 02:53:32 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C30E2463; Mon, 1 Sep 2014 02:53:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE7EC1C4A; Mon, 1 Sep 2014 02:53:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s812rWL2032415; Mon, 1 Sep 2014 02:53:32 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s812rWG7032414; Mon, 1 Sep 2014 02:53:32 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201409010253.s812rWG7032414@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 1 Sep 2014 02:53:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270908 - stable/10/lib/clang X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 02:53:32 -0000 Author: ngie Date: Mon Sep 1 02:53:32 2014 New Revision: 270908 URL: http://svnweb.freebsd.org/changeset/base/270908 Log: MFC r270145: Replace DPADD with DPSRCS to fix "make checkdpadd" Phabric: D625 Approved by: jmmv (mentor) Reviewed by: dim PR: 192734 Modified: stable/10/lib/clang/clang.build.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/clang/clang.build.mk ============================================================================== --- stable/10/lib/clang/clang.build.mk Mon Sep 1 01:39:20 2014 (r270907) +++ stable/10/lib/clang/clang.build.mk Mon Sep 1 02:53:32 2014 (r270908) @@ -233,5 +233,5 @@ Checkers.inc.h: ${CLANG_SRCS}/lib/Static .endfor SRCS+= ${TGHDRS:C/$/.inc.h/} -DPADD+= ${TGHDRS:C/$/.inc.h/} +DPSRCS+= ${TGHDRS:C/$/.inc.h/} CLEANFILES+= ${TGHDRS:C/$/.inc.h/} ${TGHDRS:C/$/.inc.d/} From owner-svn-src-stable-10@FreeBSD.ORG Mon Sep 1 03:05:00 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0994B88D; Mon, 1 Sep 2014 03:05:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E90FF1E21; Mon, 1 Sep 2014 03:04:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8134xFb038269; Mon, 1 Sep 2014 03:04:59 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8134xBS038268; Mon, 1 Sep 2014 03:04:59 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201409010304.s8134xBS038268@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 1 Sep 2014 03:04:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270909 - stable/10/usr.sbin/iscsid X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 03:05:00 -0000 Author: ngie Date: Mon Sep 1 03:04:59 2014 New Revision: 270909 URL: http://svnweb.freebsd.org/changeset/base/270909 Log: MFC r270146: Add LIBCRYPTO and LIBSSL to DPADD This fixes "make checkdpadd" Phabric: D621 PR: 192761 Approved by: rpaulo (mentor) Modified: stable/10/usr.sbin/iscsid/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/iscsid/Makefile ============================================================================== --- stable/10/usr.sbin/iscsid/Makefile Mon Sep 1 02:53:32 2014 (r270908) +++ stable/10/usr.sbin/iscsid/Makefile Mon Sep 1 03:04:59 2014 (r270909) @@ -8,7 +8,7 @@ CFLAGS+= -I${.CURDIR}/../../sys/dev/iscs #CFLAGS+= -DICL_KERNEL_PROXY MAN= iscsid.8 -DPADD= ${LIBUTIL} +DPADD= ${LIBCRYPTO} ${LIBSSL} ${LIBUTIL} LDADD= -lcrypto -lssl -lutil WARNS= 6 From owner-svn-src-stable-10@FreeBSD.ORG Mon Sep 1 03:20:11 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7D918B46; Mon, 1 Sep 2014 03:20:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6950F1F28; Mon, 1 Sep 2014 03:20:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s813KBKw045471; Mon, 1 Sep 2014 03:20:11 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s813KBAJ045470; Mon, 1 Sep 2014 03:20:11 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201409010320.s813KBAJ045470@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 1 Sep 2014 03:20:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270910 - stable/10/sbin/hastd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 03:20:11 -0000 Author: ngie Date: Mon Sep 1 03:20:10 2014 New Revision: 270910 URL: http://svnweb.freebsd.org/changeset/base/270910 Log: MFC r270117: Add -ll to LDADD to fix "make checkdpadd" Phabric: D622 Approved by: rpaulo (mentor) Modified: stable/10/sbin/hastd/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/hastd/Makefile ============================================================================== --- stable/10/sbin/hastd/Makefile Mon Sep 1 03:04:59 2014 (r270909) +++ stable/10/sbin/hastd/Makefile Mon Sep 1 03:20:10 2014 (r270910) @@ -31,7 +31,7 @@ CFLAGS+=-DINET6 .endif DPADD= ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} ${LIBL} ${LIBPTHREAD} ${LIBUTIL} -LDADD= -lgeom -lbsdxml -lsbuf -lpthread -lutil +LDADD= -lgeom -lbsdxml -lsbuf -ll -lpthread -lutil .if ${MK_OPENSSL} != "no" DPADD+= ${LIBCRYPTO} LDADD+= -lcrypto From owner-svn-src-stable-10@FreeBSD.ORG Mon Sep 1 03:22:48 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 78833CCD; Mon, 1 Sep 2014 03:22:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6480A1FE9; Mon, 1 Sep 2014 03:22:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s813Mm4N047320; Mon, 1 Sep 2014 03:22:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s813Mmqr047319; Mon, 1 Sep 2014 03:22:48 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201409010322.s813Mmqr047319@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 1 Sep 2014 03:22:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270911 - stable/10/sbin/hastd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 03:22:48 -0000 Author: ngie Date: Mon Sep 1 03:22:47 2014 New Revision: 270911 URL: http://svnweb.freebsd.org/changeset/base/270911 Log: MFC r270433: Garbage collect libl dependency The application links and runs without libl Approved by: rpaulo (mentor) Phabric: D673 Submitted by: trociny Modified: stable/10/sbin/hastd/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/hastd/Makefile ============================================================================== --- stable/10/sbin/hastd/Makefile Mon Sep 1 03:20:10 2014 (r270910) +++ stable/10/sbin/hastd/Makefile Mon Sep 1 03:22:47 2014 (r270911) @@ -30,8 +30,8 @@ CFLAGS+=-DINET CFLAGS+=-DINET6 .endif -DPADD= ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} ${LIBL} ${LIBPTHREAD} ${LIBUTIL} -LDADD= -lgeom -lbsdxml -lsbuf -ll -lpthread -lutil +DPADD= ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} ${LIBPTHREAD} ${LIBUTIL} +LDADD= -lgeom -lbsdxml -lsbuf -lpthread -lutil .if ${MK_OPENSSL} != "no" DPADD+= ${LIBCRYPTO} LDADD+= -lcrypto From owner-svn-src-stable-10@FreeBSD.ORG Mon Sep 1 07:34:17 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A475F9DB; Mon, 1 Sep 2014 07:34:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 75C6A1222; Mon, 1 Sep 2014 07:34:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s817YH18063112; Mon, 1 Sep 2014 07:34:17 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s817YHcK063111; Mon, 1 Sep 2014 07:34:17 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201409010734.s817YHcK063111@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Mon, 1 Sep 2014 07:34:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270917 - stable/10/sys/boot/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 07:34:17 -0000 Author: ae Date: Mon Sep 1 07:34:16 2014 New Revision: 270917 URL: http://svnweb.freebsd.org/changeset/base/270917 Log: MFC r270445: The size of the GPT table can not be less than one sector. MFC r270521: Since the size of GPT entry may differ from the sizeof(struct gpt_ent), use the size from GPT header to iterate entries. Modified: stable/10/sys/boot/common/part.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/common/part.c ============================================================================== --- stable/10/sys/boot/common/part.c Mon Sep 1 05:35:55 2014 (r270916) +++ stable/10/sys/boot/common/part.c Mon Sep 1 07:34:16 2014 (r270917) @@ -212,8 +212,8 @@ gpt_checktbl(const struct gpt_hdr *hdr, return (-1); } } - ent = (struct gpt_ent *)tbl; - for (i = 0; i < cnt; i++, ent++) { + for (i = 0; i < cnt; i++) { + ent = (struct gpt_ent *)(tbl + i * hdr->hdr_entsz); uuid_letoh(&ent->ent_type); if (uuid_equal(&ent->ent_type, &gpt_uuid_unused, NULL)) continue; @@ -254,8 +254,8 @@ ptable_gptread(struct ptable *table, voi table->sectorsize); if (phdr != NULL) { /* Read the primary GPT table. */ - size = MIN(MAXTBLSZ, - phdr->hdr_entries * phdr->hdr_entsz / table->sectorsize); + size = MIN(MAXTBLSZ, (phdr->hdr_entries * phdr->hdr_entsz + + table->sectorsize - 1) / table->sectorsize); if (dread(dev, tbl, size, phdr->hdr_lba_table) == 0 && gpt_checktbl(phdr, tbl, size * table->sectorsize, table->sectors - 1) == 0) { @@ -287,8 +287,9 @@ ptable_gptread(struct ptable *table, voi hdr.hdr_entsz != phdr->hdr_entsz || hdr.hdr_crc_table != phdr->hdr_crc_table) { /* Read the backup GPT table. */ - size = MIN(MAXTBLSZ, phdr->hdr_entries * - phdr->hdr_entsz / table->sectorsize); + size = MIN(MAXTBLSZ, (phdr->hdr_entries * + phdr->hdr_entsz + table->sectorsize - 1) / + table->sectorsize); if (dread(dev, tbl, size, phdr->hdr_lba_table) == 0 && gpt_checktbl(phdr, tbl, size * table->sectorsize, table->sectors - 1) == 0) { @@ -302,10 +303,10 @@ ptable_gptread(struct ptable *table, voi table->type = PTABLE_NONE; goto out; } - ent = (struct gpt_ent *)tbl; size = MIN(hdr.hdr_entries * hdr.hdr_entsz, MAXTBLSZ * table->sectorsize); - for (i = 0; i < size / hdr.hdr_entsz; i++, ent++) { + for (i = 0; i < size / hdr.hdr_entsz; i++) { + ent = (struct gpt_ent *)(tbl + i * hdr.hdr_entsz); if (uuid_equal(&ent->ent_type, &gpt_uuid_unused, NULL)) continue; entry = malloc(sizeof(*entry)); From owner-svn-src-stable-10@FreeBSD.ORG Mon Sep 1 07:54:33 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 56C9F3A9; Mon, 1 Sep 2014 07:54:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 40382144A; Mon, 1 Sep 2014 07:54:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s817sXr3072471; Mon, 1 Sep 2014 07:54:33 GMT (envelope-from jfv@FreeBSD.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s817sVdO072460; Mon, 1 Sep 2014 07:54:31 GMT (envelope-from jfv@FreeBSD.org) Message-Id: <201409010754.s817sVdO072460@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jfv set sender to jfv@FreeBSD.org using -f From: Jack F Vogel Date: Mon, 1 Sep 2014 07:54:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270919 - in stable/10/sys: conf dev/ixl modules X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 07:54:33 -0000 Author: jfv Date: Mon Sep 1 07:54:30 2014 New Revision: 270919 URL: http://svnweb.freebsd.org/changeset/base/270919 Log: MFC of 270755, 270772, 270773, 270775, 270799, 270806, 270807, 270820 Enable the build of the Intel XL710 drivers, and fixes for that build. Modified: stable/10/sys/conf/NOTES stable/10/sys/dev/ixl/README stable/10/sys/dev/ixl/i40e_alloc.h stable/10/sys/dev/ixl/i40e_common.c stable/10/sys/dev/ixl/i40e_osdep.h stable/10/sys/dev/ixl/if_ixl.c stable/10/sys/dev/ixl/if_ixlv.c stable/10/sys/dev/ixl/ixl.h stable/10/sys/dev/ixl/ixl_txrx.c stable/10/sys/modules/Makefile Modified: stable/10/sys/conf/NOTES ============================================================================== --- stable/10/sys/conf/NOTES Mon Sep 1 07:34:36 2014 (r270918) +++ stable/10/sys/conf/NOTES Mon Sep 1 07:54:30 2014 (r270919) @@ -2089,6 +2089,8 @@ device em # Intel Pro/1000 Gigabit Eth device igb # Intel Pro/1000 PCIE Gigabit Ethernet device ixgb # Intel Pro/10Gbe PCI-X Ethernet device ixgbe # Intel Pro/10Gbe PCIE Ethernet +device ixl # Intel XL710 40Gbe PCIE Ethernet +device ixlv # Intel XL710 40Gbe VF PCIE Ethernet device le # AMD Am7900 LANCE and Am79C9xx PCnet device mxge # Myricom Myri-10G 10GbE NIC device nxge # Neterion Xframe 10GbE Server/Storage Adapter Modified: stable/10/sys/dev/ixl/README ============================================================================== --- stable/10/sys/dev/ixl/README Mon Sep 1 07:34:36 2014 (r270918) +++ stable/10/sys/dev/ixl/README Mon Sep 1 07:54:30 2014 (r270919) @@ -1,9 +1,10 @@ -ixl FreeBSD* Base Driver for the IntelŽ XL710 Ethernet Controller Family + ixl FreeBSD* Base Driver and ixlv VF Driver for the + Intel XL710 Ethernet Controller Family /*$FreeBSD$*/ ================================================================ -July 21, 2014 +August 26, 2014 Contents @@ -11,6 +12,7 @@ Contents - Overview - Supported Adapters +- The VF Driver - Building and Installation - Additional Configurations - Known Limitations @@ -19,15 +21,21 @@ Contents Overview ======== -This file describes the IXL FreeBSD* Base driver for the XL710 Ethernet Family of Adapters. The Driver has been developed for use with FreeBSD 10.0 or later, but should be compatible with any supported release. - -For questions related to hardware requirements, refer to the documentation supplied with your Intel XL710 adapter. All hardware requirements listed apply for use with FreeBSD. +This file describes the IXL FreeBSD* Base driver and the IXLV VF Driver +for the XL710 Ethernet Family of Adapters. The Driver has been developed +for use with FreeBSD 10.0 or later, but should be compatible with any +supported release. + +For questions related to hardware requirements, refer to the documentation +supplied with your Intel XL710 adapter. All hardware requirements listed +apply for use with FreeBSD. Supported Adapters ================== -The driver in this release is compatible with XL710 and X710-based Intel Ethernet Network Connections. +The drivers in this release are compatible with XL710 and X710-based +Intel Ethernet Network Connections. SFP+ Devices with Pluggable Optics @@ -49,18 +57,45 @@ QSFP+ Modules Intel TRIPLE RATE 1G/10G/40G QSFP+ LR (bailed) E40GQSFPLR QSFP+ 1G speed is not supported on XL710 based devices. -X710/XL710 Based SFP+ adapters support all passive and active limiting direct attach cables that comply with SFF-8431 v4.1 and SFF-8472 v10.4 specifications. +X710/XL710 Based SFP+ adapters support all passive and active limiting direct +attach cables that comply with SFF-8431 v4.1 and SFF-8472 v10.4 specifications. +The VF Driver +================== +The VF driver is normally used in a virtualized environment where a host +driver manages SRIOV, and provides a VF device to the guest. With this +first release the only host environment tested was using Linux QEMU/KVM. +Support is planned for Xen and VMWare hosts at a later time. + +In the FreeBSD guest the IXLV driver would be loaded and will function +using the VF device assigned to it. + +The VF driver provides most of the same functionality as the CORE driver, +but is actually a slave to the Host, access to many controls are actually +accomplished by a request to the Host via what is called the "Admin queue". +These are startup and initialization events however, once in operation +the device is self-contained and should achieve near native performance. + +Some notable limitations of the VF environment: for security reasons +the driver is never permitted to be promiscuous, therefore a tcpdump +will not behave the same with the interface. Second, media info is not +available from the PF, so it will always appear as auto. -Building and Installation +Tarball Building and Installation ========================= -NOTE: You must have kernel sources installed to compile the driver module. +NOTE: You must have kernel sources installed to compile the driver tarball. + +These instructions assume a standalone driver tarball, building the driver +already in the kernel source is simply a matter of adding the device entry +to the kernel config file, or building in the ixl or ixlv module directory. In the instructions below, x.x.x is the driver version -as indicated in thename of the driver tar. +as indicated in the name of the driver tarball. The example is +for ixl, the same procedure applies for ixlv. -1. Move the base driver tar file to the directory of your choice. For example, use /home/username/ixl or /usr/local/src/ixl. +1. Move the base driver tar file to the directory of your choice. + For example, use /home/username/ixl or /usr/local/src/ixl. 2. Untar/unzip the archive: tar xfz ixl-x.x.x.tar.gz @@ -76,7 +111,9 @@ as indicated in thename of the driver ta 5. To assign an IP address to the interface, enter the following: ifconfig ixl -6. Verify that the interface works. Enter the following, where is the IP address for another machine on the same subnet as the interface that is being tested: +6. Verify that the interface works. Enter the following, where + is the IP address for another machine on the same subnet as the interface + that is being tested: ping @@ -105,7 +142,7 @@ as indicated in thename of the driver ta Configuration and Tuning ========================= -The driver supports Transmit/Receive Checksum Offload for IPv4 and IPv6, +Both drivers supports Transmit/Receive Checksum Offload for IPv4 and IPv6, TSO forIPv4 and IPv6, LRO, and Jumbo Frames on all 40 Gigabit adapters. Jumbo Frames @@ -240,7 +277,7 @@ TSO forIPv4 and IPv6, LRO, and Jumbo Fra ifconfig ixl lro -Flow Control +Flow Control (IXL only) ------------ Flow control is disabled by default. To change flow control settings use sysctl. @@ -263,19 +300,25 @@ To disable flow control: NOTE: You must have a flow control capable link partner. +NOTE: The VF driver does not have access to flow control, it must be + managed from the host side. Important system configuration changes: ======================================= - -Change the file /etc/sysctl.conf, and add the line: hw.intr_storm_threshold: 0 (the default is 1000) -Best throughput results are seen with a large MTU; use 9706 if possible. --The default number of descriptors per ring is 1024, increasing this may improve performance depending on the use case. +-The default number of descriptors per ring is 1024, increasing this may +improve performance depending on the use case. + +-The VF driver uses a relatively large buf ring, this was found to eliminate + UDP transmit errors, it is a tuneable, and if no UDP traffic is used it can + be reduced. It is memory used per queue. Known Limitations @@ -283,7 +326,11 @@ Known Limitations Network Memory Buffer allocation -------------------------------- - FreeBSD may have a low number of network memory buffers (mbufs) by default. Ifyour mbuf value is too low, it may cause the driver to fail to initialize and/orcause the system to become unresponsive. You can check to see if the system is mbuf-starved by running 'netstat -m'. Increase the number of mbufs by editing the lines below in /etc/sysctl.conf: + FreeBSD may have a low number of network memory buffers (mbufs) by default. +If your mbuf value is too low, it may cause the driver to fail to initialize +and/or cause the system to become unresponsive. You can check to see if the +system is mbuf-starved by running 'netstat -m'. Increase the number of mbufs +by editing the lines below in /etc/sysctl.conf: kern.ipc.nmbclusters kern.ipc.nmbjumbop @@ -291,9 +338,11 @@ Network Memory Buffer allocation kern.ipc.nmbjumbo16 kern.ipc.nmbufs -The amount of memory that you allocate is system specific, and may require some trial and error. +The amount of memory that you allocate is system specific, and may +require some trial and error. -Also, increasing the follwing in /etc/sysctl.conf could help increase network performance: +Also, increasing the follwing in /etc/sysctl.conf could help increase +network performance: kern.ipc.maxsockbuf net.inet.tcp.sendspace @@ -304,7 +353,10 @@ Also, increasing the follwing in /etc/sy UDP Stress Test Dropped Packet Issue ------------------------------------ - Under small packet UDP stress test with the ixl driver, the FreeBSD system will drop UDP packets due to the fullness of socket buffers. You may want to change the driver's Flow Control variables to the minimum value for controlling packet reception. +Under small packet UDP stress test with the ixl driver, the FreeBSD system +may drop UDP packets due to the fullness of socket buffers. You may want to +change the driver's Flow Control variables to the minimum value for +controlling packet reception. Disable LRO when routing/bridging @@ -314,11 +366,20 @@ LRO must be turned off when forwarding t Lower than expected performance ------------------------------- - Some PCIe x8 slots are actually configured as x4 slots. These slots have insufficient bandwidth for full line rate with dual port and quad port devices. In addition, if you put a PCIe Generation 3-capable adapter into a PCIe Generation 2 slot, you cannot get full bandwidth. The driver detects this situation and writes the following message in the system log: - - "PCI-Express bandwidth available for this card is not sufficient for optimal performance. For optimal performance a x8 PCI-Express slot is required." +Some PCIe x8 slots are actually configured as x4 slots. These slots have +insufficient bandwidth for full line rate with dual port and quad port +devices. + +In addition, if you put a PCIe Generation 3-capable adapter into a PCIe +Generation 2 slot, you cannot get full bandwidth. The driver detects this +situation and writes the following message in the system log: + + "PCI-Express bandwidth available for this card is not sufficient for + optimal performance. For optimal performance a x8 PCI-Express slot + is required." -If this error occurs, moving your adapter to a true PCIe Generation 3 x8 slot will resolve the issue. +If this error occurs, moving your adapter to a true PCIe Generation 3 x8 +slot will resolve the issue. Support @@ -328,14 +389,21 @@ For general information and support, go http://support.intel.com -If an issue is identified with the released source code on the supported kernel with a supported adapter, email the specific information related to the issue tofreebsdnic@mailbox.intel.com. +If an issue is identified with the released source code on the supported kernel +with a supported adapter, email the specific information related to the issue +to freebsdnic@mailbox.intel.com. License ======= -This software program is released under the terms of a license agreement betweenyou ('Licensee') and Intel. Do not use or load this software or any associated materials (collectively, the 'Software') until you have carefully read the full terms and conditions of the LICENSE located in this software package. By loadingor using the Software, you agree to the terms of this Agreement. If you do not -agree with the terms of this Agreement, do not install or use the Software. +This software program is released under the terms of a license agreement +between you ('Licensee') and Intel. Do not use or load this software or any +associated materials (collectively, the 'Software') until you have carefully +read the full terms and conditions of the LICENSE located in this software +package. By loadingor using the Software, you agree to the terms of this +Agreement. If you do not agree with the terms of this Agreement, do not +install or use the Software. * Other names and brands may be claimed as the property of others. Modified: stable/10/sys/dev/ixl/i40e_alloc.h ============================================================================== --- stable/10/sys/dev/ixl/i40e_alloc.h Mon Sep 1 07:34:36 2014 (r270918) +++ stable/10/sys/dev/ixl/i40e_alloc.h Mon Sep 1 07:54:30 2014 (r270919) @@ -51,16 +51,15 @@ enum i40e_memory_type { }; /* prototype for functions used for dynamic memory allocation */ -enum i40e_status_code i40e_allocate_dma_mem(struct i40e_hw *hw, +enum i40e_status_code i40e_allocate_dma(struct i40e_hw *hw, struct i40e_dma_mem *mem, - enum i40e_memory_type type, - u64 size, u32 alignment); -enum i40e_status_code i40e_free_dma_mem(struct i40e_hw *hw, + bus_size_t size, u32 alignment); +enum i40e_status_code i40e_free_dma(struct i40e_hw *hw, struct i40e_dma_mem *mem); -enum i40e_status_code i40e_allocate_virt_mem(struct i40e_hw *hw, +enum i40e_status_code i40e_allocate_virt(struct i40e_hw *hw, struct i40e_virt_mem *mem, u32 size); -enum i40e_status_code i40e_free_virt_mem(struct i40e_hw *hw, +enum i40e_status_code i40e_free_virt(struct i40e_hw *hw, struct i40e_virt_mem *mem); #endif /* _I40E_ALLOC_H_ */ Modified: stable/10/sys/dev/ixl/i40e_common.c ============================================================================== --- stable/10/sys/dev/ixl/i40e_common.c Mon Sep 1 07:34:36 2014 (r270918) +++ stable/10/sys/dev/ixl/i40e_common.c Mon Sep 1 07:54:30 2014 (r270919) @@ -4375,8 +4375,8 @@ enum i40e_status_code i40e_aq_alternate_ cmd_resp->address = CPU_TO_LE32(addr); cmd_resp->length = CPU_TO_LE32(dw_count); - cmd_resp->addr_high = CPU_TO_LE32(I40E_HI_WORD((u64)buffer)); - cmd_resp->addr_low = CPU_TO_LE32(I40E_LO_DWORD((u64)buffer)); + cmd_resp->addr_high = CPU_TO_LE32(I40E_HI_WORD((u64)(uintptr_t)buffer)); + cmd_resp->addr_low = CPU_TO_LE32(I40E_LO_DWORD((u64)(uintptr_t)buffer)); status = i40e_asq_send_command(hw, &desc, buffer, I40E_LO_DWORD(4*dw_count), NULL); @@ -4458,8 +4458,8 @@ enum i40e_status_code i40e_aq_alternate_ cmd_resp->address = CPU_TO_LE32(addr); cmd_resp->length = CPU_TO_LE32(dw_count); - cmd_resp->addr_high = CPU_TO_LE32(I40E_HI_DWORD((u64)buffer)); - cmd_resp->addr_low = CPU_TO_LE32(I40E_LO_DWORD((u64)buffer)); + cmd_resp->addr_high = CPU_TO_LE32(I40E_HI_DWORD((u64)(uintptr_t)buffer)); + cmd_resp->addr_low = CPU_TO_LE32(I40E_LO_DWORD((u64)(uintptr_t)buffer)); status = i40e_asq_send_command(hw, &desc, buffer, I40E_LO_DWORD(4*dw_count), NULL); Modified: stable/10/sys/dev/ixl/i40e_osdep.h ============================================================================== --- stable/10/sys/dev/ixl/i40e_osdep.h Mon Sep 1 07:34:36 2014 (r270918) +++ stable/10/sys/dev/ixl/i40e_osdep.h Mon Sep 1 07:54:30 2014 (r270919) @@ -137,11 +137,15 @@ struct i40e_spinlock { #define le16_to_cpu +#if defined(__amd64__) || defined(i386) static __inline void prefetch(void *x) { __asm volatile("prefetcht0 %0" :: "m" (*(unsigned long *)x)); } +#else +#define prefetch(x) +#endif struct i40e_osdep { @@ -191,7 +195,7 @@ rd32_osdep(struct i40e_osdep *osdep, uin KASSERT(reg < osdep->mem_bus_space_size, ("ixl: register offset %#jx too large (max is %#jx", - (uintmax_t)a, (uintmax_t)osdep->mem_bus_space_size)); + (uintmax_t)reg, (uintmax_t)osdep->mem_bus_space_size)); return (bus_space_read_4(osdep->mem_bus_space_tag, osdep->mem_bus_space_handle, reg)); @@ -203,7 +207,7 @@ wr32_osdep(struct i40e_osdep *osdep, uin KASSERT(reg < osdep->mem_bus_space_size, ("ixl: register offset %#jx too large (max is %#jx", - (uintmax_t)a, (uintmax_t)osdep->mem_bus_space_size)); + (uintmax_t)reg, (uintmax_t)osdep->mem_bus_space_size)); bus_space_write_4(osdep->mem_bus_space_tag, osdep->mem_bus_space_handle, reg, value); Modified: stable/10/sys/dev/ixl/if_ixl.c ============================================================================== --- stable/10/sys/dev/ixl/if_ixl.c Mon Sep 1 07:34:36 2014 (r270918) +++ stable/10/sys/dev/ixl/if_ixl.c Mon Sep 1 07:54:30 2014 (r270919) @@ -276,10 +276,6 @@ int ixl_atr_rate = 20; TUNABLE_INT("hw.ixl.atr_rate", &ixl_atr_rate); #endif -#ifdef DEV_NETMAP -#include -#endif /* DEV_NETMAP */ - static char *ixl_fc_string[6] = { "None", "Rx", @@ -652,10 +648,6 @@ ixl_attach(device_t dev) vsi->vlan_detach = EVENTHANDLER_REGISTER(vlan_unconfig, ixl_unregister_vlan, vsi, EVENTHANDLER_PRI_FIRST); -#ifdef DEV_NETMAP - ixl_netmap_attach(pf); -#endif /* DEV_NETMAP */ - INIT_DEBUGOUT("ixl_attach: end"); return (0); @@ -733,10 +725,6 @@ ixl_detach(device_t dev) ether_ifdetach(vsi->ifp); callout_drain(&pf->timer); -#ifdef DEV_NETMAP - netmap_detach(vsi->ifp); -#endif /* DEV_NETMAP */ - ixl_free_pci_resources(pf); bus_generic_detach(dev); if_free(vsi->ifp); @@ -2300,7 +2288,7 @@ ixl_setup_interface(device_t dev, struct /* * Tell the upper layer(s) we support long frames. */ - ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header); + ifp->if_hdrlen = sizeof(struct ether_vlan_header); ifp->if_capabilities |= IFCAP_HWCSUM; ifp->if_capabilities |= IFCAP_HWCSUM_IPV6; @@ -2552,12 +2540,6 @@ ixl_initialize_vsi(struct ixl_vsi *vsi) rctx.tphdata_ena = 0; rctx.tphhead_ena = 0; rctx.lrxqthresh = 2; -#ifdef DEV_NETMAP - /* "CRC strip in netmap is conditional" */ - if (vsi->ifp->if_capenable & IFCAP_NETMAP && !ixl_crcstrip) - rctx.crcstrip = 0; - else -#endif /* DEV_NETMAP */ rctx.crcstrip = 1; rctx.l2tsel = 1; rctx.showiv = 1; @@ -2581,21 +2563,6 @@ ixl_initialize_vsi(struct ixl_vsi *vsi) break; } wr32(vsi->hw, I40E_QRX_TAIL(que->me), 0); -#ifdef DEV_NETMAP - /* TODO appropriately comment - * Code based on netmap code in ixgbe_init_locked() - * Messes with what the software sets as queue - * descriptor tail in hardware. - */ - if (vsi->ifp->if_capenable & IFCAP_NETMAP) - { - struct netmap_adapter *na = NA(vsi->ifp); - struct netmap_kring *kring = &na->rx_rings[que->me]; - int t = na->num_rx_desc - 1 - kring->nr_hwavail; - - wr32(vsi->hw, I40E_QRX_TAIL(que->me), t); - } else -#endif /* DEV_NETMAP */ wr32(vsi->hw, I40E_QRX_TAIL(que->me), que->num_desc - 1); } return (err); @@ -4016,11 +3983,11 @@ ixl_print_debug_info(struct ixl_pf *pf) u32 reg; - printf("Queue irqs = %lx\n", que->irqs); - printf("AdminQ irqs = %lx\n", pf->admin_irq); + printf("Queue irqs = %jx\n", (uintmax_t)que->irqs); + printf("AdminQ irqs = %jx\n", (uintmax_t)pf->admin_irq); printf("RX next check = %x\n", rxr->next_check); - printf("RX not ready = %lx\n", rxr->not_done); - printf("RX packets = %lx\n", rxr->rx_packets); + printf("RX not ready = %jx\n", (uintmax_t)rxr->not_done); + printf("RX packets = %jx\n", (uintmax_t)rxr->rx_packets); printf("TX desc avail = %x\n", txr->avail); reg = rd32(hw, I40E_GLV_GORCL(0xc)); @@ -4161,7 +4128,7 @@ ixl_stat_update48(struct i40e_hw *hw, u3 { u64 new_data; -#if __FreeBSD__ >= 10 && __amd64__ +#if defined(__FreeBSD__) && (__FreeBSD_version >= 1000000) && defined(__amd64__) new_data = rd64(hw, loreg); #else /* Modified: stable/10/sys/dev/ixl/if_ixlv.c ============================================================================== --- stable/10/sys/dev/ixl/if_ixlv.c Mon Sep 1 07:34:36 2014 (r270918) +++ stable/10/sys/dev/ixl/if_ixlv.c Mon Sep 1 07:54:30 2014 (r270919) @@ -1367,7 +1367,7 @@ ixlv_setup_interface(device_t dev, struc /* * Tell the upper layer(s) we support long frames. */ - ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header); + ifp->if_hdrlen = sizeof(struct ether_vlan_header); ifp->if_capabilities |= IFCAP_HWCSUM; ifp->if_capabilities |= IFCAP_HWCSUM_IPV6; @@ -2311,7 +2311,7 @@ ixlv_update_link_status(struct ixlv_sc * static void ixlv_stop(struct ixlv_sc *sc) { - mtx_assert(&sc->sc_mtx, MA_OWNED); + mtx_assert(&sc->mtx, MA_OWNED); INIT_DBG_IF(&sc->vsi->ifp, "begin"); Modified: stable/10/sys/dev/ixl/ixl.h ============================================================================== --- stable/10/sys/dev/ixl/ixl.h Mon Sep 1 07:34:36 2014 (r270918) +++ stable/10/sys/dev/ixl/ixl.h Mon Sep 1 07:54:30 2014 (r270919) @@ -47,8 +47,10 @@ #include #include #include +#include #include +#include #include #include #include @@ -293,9 +295,6 @@ struct ixl_rx_buf { struct mbuf *fmp; bus_dmamap_t hmap; bus_dmamap_t pmap; -#ifdef DEV_NETMAP - u64 addr; -#endif }; /* Modified: stable/10/sys/dev/ixl/ixl_txrx.c ============================================================================== --- stable/10/sys/dev/ixl/ixl_txrx.c Mon Sep 1 07:34:36 2014 (r270918) +++ stable/10/sys/dev/ixl/ixl_txrx.c Mon Sep 1 07:54:30 2014 (r270919) @@ -454,17 +454,9 @@ ixl_init_tx_ring(struct ixl_queue *que) { struct tx_ring *txr = &que->txr; struct ixl_tx_buf *buf; -#ifdef DEV_NETMAP - struct ixl_vsi *vsi = que->vsi; - struct netmap_adapter *na = NA(vsi->ifp); - struct netmap_slot *slot; -#endif /* DEV_NETMAP */ /* Clear the old ring contents */ IXL_TX_LOCK(txr); -#ifdef DEV_NETMAP - slot = netmap_reset(na, NR_TX, que->me, 0); -#endif bzero((void *)txr->base, (sizeof(struct i40e_tx_desc)) * que->num_desc); @@ -488,13 +480,6 @@ ixl_init_tx_ring(struct ixl_queue *que) m_freem(buf->m_head); buf->m_head = NULL; } -#ifdef DEV_NETMAP - if (slot) - { - int si = netmap_idx_n2k(&na->tx_rings[que->me], i); - netmap_load_map(txr->tag, buf->map, NMB(slot + si)); - } -#endif /* Clear the EOP index */ buf->eop_index = -1; } @@ -573,9 +558,13 @@ ixl_tx_setup_offload(struct ixl_queue *q struct mbuf *mp, u32 *cmd, u32 *off) { struct ether_vlan_header *eh; +#ifdef INET struct ip *ip = NULL; +#endif struct tcphdr *th = NULL; +#ifdef INET6 struct ip6_hdr *ip6; +#endif int elen, ip_hlen = 0, tcp_hlen; u16 etype; u8 ipproto = 0; @@ -606,6 +595,7 @@ ixl_tx_setup_offload(struct ixl_queue *q } switch (etype) { +#ifdef INET case ETHERTYPE_IP: ip = (struct ip *)(mp->m_data + elen); ip_hlen = ip->ip_hl << 2; @@ -617,13 +607,16 @@ ixl_tx_setup_offload(struct ixl_queue *q else *cmd |= I40E_TX_DESC_CMD_IIPT_IPV4; break; +#endif +#ifdef INET6 case ETHERTYPE_IPV6: ip6 = (struct ip6_hdr *)(mp->m_data + elen); ip_hlen = sizeof(struct ip6_hdr); ipproto = ip6->ip6_nxt; th = (struct tcphdr *)((caddr_t)ip6 + ip_hlen); *cmd |= I40E_TX_DESC_CMD_IIPT_IPV6; - /* Falls thru */ + break; +#endif default: break; } @@ -681,9 +674,15 @@ ixl_tso_setup(struct ixl_queue *que, str u16 etype; int idx, elen, ip_hlen, tcp_hlen; struct ether_vlan_header *eh; +#ifdef INET struct ip *ip; +#endif +#ifdef INET6 struct ip6_hdr *ip6; +#endif +#if defined(INET6) || defined(INET) struct tcphdr *th; +#endif u64 type_cmd_tso_mss; /* @@ -725,9 +724,9 @@ ixl_tso_setup(struct ixl_queue *que, str break; #endif default: - panic("%s: CSUM_TSO but no supported IP version (0x%04x)", + printf("%s: CSUM_TSO but no supported IP version (0x%04x)", __func__, ntohs(etype)); - break; + return FALSE; } /* Ensure we have at least the IP+TCP header in the first mbuf. */ @@ -794,36 +793,6 @@ ixl_txeof(struct ixl_queue *que) mtx_assert(&txr->mtx, MA_OWNED); -#ifdef DEV_NETMAP - if (ifp->if_capenable & IFCAP_NETMAP) { - struct netmap_adapter *na = NA(ifp); - struct netmap_kring *kring = &na->tx_rings[que->me]; - tx_desc = txr->base; - bus_dmamap_sync(txr->dma.tag, txr->dma.map, - BUS_DMASYNC_POSTREAD); - if (!netmap_mitigate || - (kring->nr_kflags < kring->nkr_num_slots && - tx_desc[kring->nr_kflags].cmd_type_offset_bsz & - htole32(I40E_TX_DESC_DTYPE_DESC_DONE))) - { -#if NETMAP_API < 4 - struct ixl_pf *pf = vsi->pf; - kring->nr_kflags = kring->nkr_num_slots; - selwakeuppri(&na->tx_rings[que->me].si, PI_NET); - IXL_TX_UNLOCK(txr); - IXL_PF_LOCK(pf); - selwakeuppri(&na->tx_si, PI_NET); - IXL_PF_UNLOCK(pf); - IXL_TX_LOCK(txr); -#else /* NETMAP_API >= 4 */ - netmap_tx_irq(ifp, txr->que->me); -#endif /* NETMAP_API */ - } - // XXX guessing there is no more work to be done - return FALSE; - } -#endif /* DEV_NETMAP */ - /* These are not the descriptors you seek, move along :) */ if (txr->avail == que->num_desc) { que->busy = 0; @@ -1011,12 +980,8 @@ no_split: buf->m_pack = mp; bus_dmamap_sync(rxr->ptag, buf->pmap, BUS_DMASYNC_PREREAD); -#ifdef DEV_NETMAP - rxr->base[i].read.pkt_addr = buf->addr; -#else /* !DEV_NETMAP */ rxr->base[i].read.pkt_addr = htole64(pseg[0].ds_addr); -#endif /* DEV_NETMAP */ /* Used only when doing header split */ rxr->base[i].read.hdr_addr = 0; @@ -1127,15 +1092,8 @@ ixl_init_rx_ring(struct ixl_queue *que) struct ixl_rx_buf *buf; bus_dma_segment_t pseg[1], hseg[1]; int rsize, nsegs, error = 0; -#ifdef DEV_NETMAP - struct netmap_adapter *na = NA(ifp); - struct netmap_slot *slot; -#endif /* DEV_NETMAP */ IXL_RX_LOCK(rxr); -#ifdef DEV_NETMAP - slot = netmap_reset(na, NR_RX, que->me, 0); -#endif /* Clear the ring contents */ rsize = roundup2(que->num_desc * sizeof(union i40e_rx_desc), DBA_ALIGN); @@ -1169,21 +1127,6 @@ ixl_init_rx_ring(struct ixl_queue *que) struct mbuf *mh, *mp; buf = &rxr->buffers[j]; -#ifdef DEV_NETMAP - if (slot) - { - int sj = netmap_idx_n2k(&na->rx_rings[que->me], j); - u64 paddr; - void *addr; - - addr = PNMB(slot + sj, &paddr); - netmap_load_map(rxr->ptag, buf->pmap, addr); - /* Update descriptor and cached value */ - rxr->base[j].read.pkt_addr = htole64(paddr); - buf->addr = htole64(paddr); - continue; - } -#endif /* DEV_NETMAP */ /* ** Don't allocate mbufs if not ** doing header split, its wasteful @@ -1416,29 +1359,6 @@ ixl_rxeof(struct ixl_queue *que, int cou IXL_RX_LOCK(rxr); -#ifdef DEV_NETMAP -#if NETMAP_API < 4 - if (ifp->if_capenable & IFCAP_NETMAP) - { - struct netmap_adapter *na = NA(ifp); - - na->rx_rings[que->me].nr_kflags |= NKR_PENDINTR; - selwakeuppri(&na->rx_rings[que->me].si, PI_NET); - IXL_RX_UNLOCK(rxr); - IXL_PF_LOCK(vsi->pf); - selwakeuppri(&na->rx_si, PI_NET); - IXL_PF_UNLOCK(vsi->pf); - return (FALSE); - } -#else /* NETMAP_API >= 4 */ - if (netmap_rx_irq(ifp, que->me, &processed)) - { - IXL_RX_UNLOCK(rxr); - return (FALSE); - } -#endif /* NETMAP_API */ -#endif /* DEV_NETMAP */ - for (i = rxr->next_check; count != 0;) { struct mbuf *sendmp, *mh, *mp; u32 rsc, status, error; Modified: stable/10/sys/modules/Makefile ============================================================================== --- stable/10/sys/modules/Makefile Mon Sep 1 07:34:36 2014 (r270918) +++ stable/10/sys/modules/Makefile Mon Sep 1 07:54:30 2014 (r270919) @@ -176,6 +176,8 @@ SUBDIR= \ ${_iwnfw} \ ${_ixgb} \ ${_ixgbe} \ + ${_ixl} \ + ${_ixlv} \ jme \ joy \ kbdmux \ @@ -721,6 +723,8 @@ _iwnfw= iwnfw .endif _ixgb= ixgb _ixgbe= ixgbe +_ixl= ixl +_ixlv= ixlv _lindev= lindev _linprocfs= linprocfs _linsysfs= linsysfs From owner-svn-src-stable-10@FreeBSD.ORG Mon Sep 1 07:58:18 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A1F59533; Mon, 1 Sep 2014 07:58:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 89635149A; Mon, 1 Sep 2014 07:58:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s817wI8l073027; Mon, 1 Sep 2014 07:58:18 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s817wFHH073009; Mon, 1 Sep 2014 07:58:15 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201409010758.s817wFHH073009@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 1 Sep 2014 07:58:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270920 - in stable/10: . share/man/man9 sys/amd64/amd64 sys/arm/arm sys/i386/i386 sys/i386/xen sys/ia64/ia64 sys/mips/mips sys/powerpc/aim sys/powerpc/booke sys/powerpc/powerpc sys/spa... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 07:58:18 -0000 Author: kib Date: Mon Sep 1 07:58:15 2014 New Revision: 270920 URL: http://svnweb.freebsd.org/changeset/base/270920 Log: Fix a leak of the wired pages when unwiring of the PROT_NONE-mapped wired region. Rework the handling of unwire to do the it in batch, both at pmap and object level. All commits below are by alc. MFC r268327: Introduce pmap_unwire(). MFC r268591: Implement pmap_unwire() for powerpc. MFC r268776: Implement pmap_unwire() for arm. MFC r268806: pmap_unwire(9) man page. MFC r269134: When unwiring a region of an address space, do not assume that the underlying physical pages are mapped by the pmap. This fixes a leak of the wired pages on the unwiring of the region mapped with no access allowed. MFC r269339: In the implementation of the new function pmap_unwire(), the call to MOEA64_PVO_TO_PTE() must be performed before any changes are made to the PVO. Otherwise, MOEA64_PVO_TO_PTE() will panic. MFC r269365: Correct a long-standing problem in moea{,64}_pvo_enter() that was revealed by the combination of r268591 and r269134: When we attempt to add the wired attribute to an existing mapping, moea{,64}_pvo_enter() do nothing. (They only set the wired attribute on newly created mappings.) MFC r269433: Handle wiring failures in vm_map_wire() with the new functions pmap_unwire() and vm_object_unwire(). Retire vm_fault_{un,}wire(), since they are no longer used. MFC r269438: Rewrite a loop in vm_map_wire() so that gcc doesn't think that the variable "rv" is uninitialized. MFC r269485: Retire pmap_change_wiring(). Reviewed by: alc Added: stable/10/share/man/man9/pmap_unwire.9 - copied unchanged from r268806, head/share/man/man9/pmap_unwire.9 Modified: stable/10/ObsoleteFiles.inc stable/10/share/man/man9/Makefile stable/10/share/man/man9/pmap.9 stable/10/sys/amd64/amd64/pmap.c stable/10/sys/arm/arm/pmap-v6.c stable/10/sys/arm/arm/pmap.c stable/10/sys/i386/i386/pmap.c stable/10/sys/i386/xen/pmap.c stable/10/sys/ia64/ia64/pmap.c stable/10/sys/mips/mips/pmap.c stable/10/sys/powerpc/aim/mmu_oea.c stable/10/sys/powerpc/aim/mmu_oea64.c stable/10/sys/powerpc/booke/pmap.c stable/10/sys/powerpc/powerpc/mmu_if.m stable/10/sys/powerpc/powerpc/pmap_dispatch.c stable/10/sys/sparc64/sparc64/pmap.c stable/10/sys/vm/pmap.h stable/10/sys/vm/vm_extern.h stable/10/sys/vm/vm_fault.c stable/10/sys/vm/vm_map.c stable/10/sys/vm/vm_object.c stable/10/sys/vm/vm_object.h Directory Properties: stable/10/ (props changed) Modified: stable/10/ObsoleteFiles.inc ============================================================================== --- stable/10/ObsoleteFiles.inc Mon Sep 1 07:54:30 2014 (r270919) +++ stable/10/ObsoleteFiles.inc Mon Sep 1 07:58:15 2014 (r270920) @@ -47,6 +47,8 @@ OLD_FILES+=usr/share/man/man1/otp-sha.1. # 20140812: example files removed OLD_FILES+=usr/share/examples/libusb20/aux.c OLD_FILES+=usr/share/examples/libusb20/aux.h +# 20140803: Remove an obsolete man page +OLD_FILES+=usr/share/man/man9/pmap_change_wiring.9.gz # 20140728: Remove an obsolete man page OLD_FILES+=usr/share/man/man9/VOP_GETVOBJECT.9.gz OLD_FILES+=usr/share/man/man9/VOP_CREATEVOBJECT.9.gz Modified: stable/10/share/man/man9/Makefile ============================================================================== --- stable/10/share/man/man9/Makefile Mon Sep 1 07:54:30 2014 (r270919) +++ stable/10/share/man/man9/Makefile Mon Sep 1 07:58:15 2014 (r270920) @@ -197,7 +197,6 @@ MAN= accept_filter.9 \ physio.9 \ pmap.9 \ pmap_activate.9 \ - pmap_change_wiring.9 \ pmap_clear_modify.9 \ pmap_copy.9 \ pmap_enter.9 \ @@ -217,6 +216,7 @@ MAN= accept_filter.9 \ pmap_release.9 \ pmap_remove.9 \ pmap_resident_count.9 \ + pmap_unwire.9 \ pmap_zero_page.9 \ printf.9 \ prison_check.9 \ Modified: stable/10/share/man/man9/pmap.9 ============================================================================== --- stable/10/share/man/man9/pmap.9 Mon Sep 1 07:54:30 2014 (r270919) +++ stable/10/share/man/man9/pmap.9 Mon Sep 1 07:58:15 2014 (r270920) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 21, 2003 +.Dd July 18, 2014 .Dt PMAP 9 .Os .Sh NAME @@ -89,7 +89,6 @@ operation. .Sh SEE ALSO .Xr pmap 9 , .Xr pmap_activate 9 , -.Xr pmap_change_wiring 9 , .Xr pmap_clear_modify 9 , .Xr pmap_clear_reference 9 , .Xr pmap_copy 9 , @@ -120,6 +119,7 @@ operation. .Xr pmap_remove_pages 9 , .Xr pmap_resident_count 9 , .Xr pmap_ts_modified 9 , +.Xr pmap_unwire 9 , .Xr pmap_wired_count 9 , .Xr pmap_zero_area 9 , .Xr pmap_zero_idle 9 , Copied: stable/10/share/man/man9/pmap_unwire.9 (from r268806, head/share/man/man9/pmap_unwire.9) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/share/man/man9/pmap_unwire.9 Mon Sep 1 07:58:15 2014 (r270920, copy of r268806, head/share/man/man9/pmap_unwire.9) @@ -0,0 +1,66 @@ +.\" +.\" Copyright (c) 2014 Alan L. Cox +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd July 17, 2014 +.Dt PMAP_UNWIRE 9 +.Os +.Sh NAME +.Nm pmap_unwire +.Nd unwire a range of virtual pages +.Sh SYNOPSIS +.In sys/param.h +.In vm/vm.h +.In vm/pmap.h +.Ft void +.Fo pmap_unwire +.Fa "pmap_t pmap" "vm_offset_t start" "vm_offset_t end" +.Fc +.Sh DESCRIPTION +.Pp +The function +.Fn pmap_unwire +removes the wired attribute from each of the virtual-to-physical page mappings +within the virtual address range from +.Fa start +to +.Fa end +of the physical map +.Fa pmap . +Every valid mapping within that range is required to have the wired attribute +set. +Invalid mappings are ignored, since they cannot have the wired attribute set. +.Sh NOTES +Only the function +.Xr pmap_enter 9 +can be used to set the wired attribute of a virtual-to-physical page mapping. +.Sh SEE ALSO +.Xr pmap 9 , +.Xr pmap_enter 9 , +.Xr pmap_wired_count 9 +.Sh AUTHORS +This manual page was written by +.An Alan L. Cox Aq alc@rice.edu . Modified: stable/10/sys/amd64/amd64/pmap.c ============================================================================== --- stable/10/sys/amd64/amd64/pmap.c Mon Sep 1 07:54:30 2014 (r270919) +++ stable/10/sys/amd64/amd64/pmap.c Mon Sep 1 07:58:15 2014 (r270920) @@ -4704,52 +4704,96 @@ pmap_object_init_pt(pmap_t pmap, vm_offs } /* - * Routine: pmap_change_wiring - * Function: Change the wiring attribute for a map/virtual-address - * pair. - * In/out conditions: - * The mapping must already exist in the pmap. + * Clear the wired attribute from the mappings for the specified range of + * addresses in the given pmap. Every valid mapping within that range + * must have the wired attribute set. In contrast, invalid mappings + * cannot have the wired attribute set, so they are ignored. + * + * The wired attribute of the page table entry is not a hardware feature, + * so there is no need to invalidate any TLB entries. */ void -pmap_change_wiring(pmap_t pmap, vm_offset_t va, boolean_t wired) +pmap_unwire(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) { + vm_offset_t va_next; + pml4_entry_t *pml4e; + pdp_entry_t *pdpe; pd_entry_t *pde; - pt_entry_t *pte; + pt_entry_t *pte, PG_V; boolean_t pv_lists_locked; + PG_V = pmap_valid_bit(pmap); pv_lists_locked = FALSE; - - /* - * Wiring is not a hardware characteristic so there is no need to - * invalidate TLB. - */ -retry: +resume: PMAP_LOCK(pmap); - pde = pmap_pde(pmap, va); - if ((*pde & PG_PS) != 0) { - if (!wired != ((*pde & PG_W) == 0)) { - if (!pv_lists_locked) { - pv_lists_locked = TRUE; - if (!rw_try_rlock(&pvh_global_lock)) { - PMAP_UNLOCK(pmap); - rw_rlock(&pvh_global_lock); - goto retry; + for (; sva < eva; sva = va_next) { + pml4e = pmap_pml4e(pmap, sva); + if ((*pml4e & PG_V) == 0) { + va_next = (sva + NBPML4) & ~PML4MASK; + if (va_next < sva) + va_next = eva; + continue; + } + pdpe = pmap_pml4e_to_pdpe(pml4e, sva); + if ((*pdpe & PG_V) == 0) { + va_next = (sva + NBPDP) & ~PDPMASK; + if (va_next < sva) + va_next = eva; + continue; + } + va_next = (sva + NBPDR) & ~PDRMASK; + if (va_next < sva) + va_next = eva; + pde = pmap_pdpe_to_pde(pdpe, sva); + if ((*pde & PG_V) == 0) + continue; + if ((*pde & PG_PS) != 0) { + if ((*pde & PG_W) == 0) + panic("pmap_unwire: pde %#jx is missing PG_W", + (uintmax_t)*pde); + + /* + * Are we unwiring the entire large page? If not, + * demote the mapping and fall through. + */ + if (sva + NBPDR == va_next && eva >= va_next) { + atomic_clear_long(pde, PG_W); + pmap->pm_stats.wired_count -= NBPDR / + PAGE_SIZE; + continue; + } else { + if (!pv_lists_locked) { + pv_lists_locked = TRUE; + if (!rw_try_rlock(&pvh_global_lock)) { + PMAP_UNLOCK(pmap); + rw_rlock(&pvh_global_lock); + /* Repeat sva. */ + goto resume; + } } + if (!pmap_demote_pde(pmap, pde, sva)) + panic("pmap_unwire: demotion failed"); } - if (!pmap_demote_pde(pmap, pde, va)) - panic("pmap_change_wiring: demotion failed"); - } else - goto out; - } - pte = pmap_pde_to_pte(pde, va); - if (wired && (*pte & PG_W) == 0) { - pmap->pm_stats.wired_count++; - atomic_set_long(pte, PG_W); - } else if (!wired && (*pte & PG_W) != 0) { - pmap->pm_stats.wired_count--; - atomic_clear_long(pte, PG_W); + } + if (va_next > eva) + va_next = eva; + for (pte = pmap_pde_to_pte(pde, sva); sva != va_next; pte++, + sva += PAGE_SIZE) { + if ((*pte & PG_V) == 0) + continue; + if ((*pte & PG_W) == 0) + panic("pmap_unwire: pte %#jx is missing PG_W", + (uintmax_t)*pte); + + /* + * PG_W must be cleared atomically. Although the pmap + * lock synchronizes access to PG_W, another processor + * could be setting PG_M and/or PG_A concurrently. + */ + atomic_clear_long(pte, PG_W); + pmap->pm_stats.wired_count--; + } } -out: if (pv_lists_locked) rw_runlock(&pvh_global_lock); PMAP_UNLOCK(pmap); Modified: stable/10/sys/arm/arm/pmap-v6.c ============================================================================== --- stable/10/sys/arm/arm/pmap-v6.c Mon Sep 1 07:54:30 2014 (r270919) +++ stable/10/sys/arm/arm/pmap-v6.c Mon Sep 1 07:58:15 2014 (r270920) @@ -3264,53 +3264,76 @@ pmap_enter_quick(pmap_t pmap, vm_offset_ } /* - * Routine: pmap_change_wiring - * Function: Change the wiring attribute for a map/virtual-address - * pair. - * In/out conditions: - * The mapping must already exist in the pmap. + * Clear the wired attribute from the mappings for the specified range of + * addresses in the given pmap. Every valid mapping within that range + * must have the wired attribute set. In contrast, invalid mappings + * cannot have the wired attribute set, so they are ignored. + * + * XXX Wired mappings of unmanaged pages cannot be counted by this pmap + * implementation. */ void -pmap_change_wiring(pmap_t pmap, vm_offset_t va, boolean_t wired) +pmap_unwire(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) { struct l2_bucket *l2b; struct md_page *pvh; - struct pv_entry *pve; - pd_entry_t *pl1pd, l1pd; + pd_entry_t l1pd; pt_entry_t *ptep, pte; + pv_entry_t pv; + vm_offset_t next_bucket; + vm_paddr_t pa; vm_page_t m; - + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); - pl1pd = &pmap->pm_l1->l1_kva[L1_IDX(va)]; - l1pd = *pl1pd; - if ((l1pd & L1_TYPE_MASK) == L1_S_PROTO) { - m = PHYS_TO_VM_PAGE(l1pd & L1_S_FRAME); - KASSERT((m != NULL) && ((m->oflags & VPO_UNMANAGED) == 0), - ("pmap_change_wiring: unmanaged superpage should not " - "be changed")); - KASSERT(pmap != pmap_kernel(), - ("pmap_change_wiring: managed kernel superpage " - "should not exist")); - pvh = pa_to_pvh(l1pd & L1_S_FRAME); - pve = pmap_find_pv(pvh, pmap, trunc_1mpage(va)); - if (!wired != ((pve->pv_flags & PVF_WIRED) == 0)) { - if (!pmap_demote_section(pmap, va)) - panic("pmap_change_wiring: demotion failed"); - } else - goto out; + while (sva < eva) { + next_bucket = L2_NEXT_BUCKET(sva); + l1pd = pmap->pm_l1->l1_kva[L1_IDX(sva)]; + if ((l1pd & L1_TYPE_MASK) == L1_S_PROTO) { + pa = l1pd & L1_S_FRAME; + m = PHYS_TO_VM_PAGE(pa); + KASSERT(m != NULL && (m->oflags & VPO_UNMANAGED) == 0, + ("pmap_unwire: unmanaged 1mpage %p", m)); + pvh = pa_to_pvh(pa); + pv = pmap_find_pv(pvh, pmap, trunc_1mpage(sva)); + if ((pv->pv_flags & PVF_WIRED) == 0) + panic("pmap_unwire: pv %p isn't wired", pv); + + /* + * Are we unwiring the entire large page? If not, + * demote the mapping and fall through. + */ + if (sva + L1_S_SIZE == next_bucket && + eva >= next_bucket) { + pv->pv_flags &= ~PVF_WIRED; + pmap->pm_stats.wired_count -= L2_PTE_NUM_TOTAL; + sva = next_bucket; + continue; + } else if (!pmap_demote_section(pmap, sva)) + panic("pmap_unwire: demotion failed"); + } + if (next_bucket > eva) + next_bucket = eva; + l2b = pmap_get_l2_bucket(pmap, sva); + if (l2b == NULL) { + sva = next_bucket; + continue; + } + for (ptep = &l2b->l2b_kva[l2pte_index(sva)]; sva < next_bucket; + sva += PAGE_SIZE, ptep++) { + if ((pte = *ptep) == 0 || + (m = PHYS_TO_VM_PAGE(l2pte_pa(pte))) == NULL || + (m->oflags & VPO_UNMANAGED) != 0) + continue; + pv = pmap_find_pv(&m->md, pmap, sva); + if ((pv->pv_flags & PVF_WIRED) == 0) + panic("pmap_unwire: pv %p isn't wired", pv); + pv->pv_flags &= ~PVF_WIRED; + pmap->pm_stats.wired_count--; + } } - l2b = pmap_get_l2_bucket(pmap, va); - KASSERT(l2b, ("No l2b bucket in pmap_change_wiring")); - ptep = &l2b->l2b_kva[l2pte_index(va)]; - pte = *ptep; - m = PHYS_TO_VM_PAGE(l2pte_pa(pte)); - if (m != NULL) - pmap_modify_pv(m, pmap, va, PVF_WIRED, - wired == TRUE ? PVF_WIRED : 0); -out: rw_wunlock(&pvh_global_lock); - PMAP_UNLOCK(pmap); + PMAP_UNLOCK(pmap); } Modified: stable/10/sys/arm/arm/pmap.c ============================================================================== --- stable/10/sys/arm/arm/pmap.c Mon Sep 1 07:54:30 2014 (r270919) +++ stable/10/sys/arm/arm/pmap.c Mon Sep 1 07:58:15 2014 (r270920) @@ -3542,28 +3542,47 @@ pmap_enter_quick(pmap_t pmap, vm_offset_ } /* - * Routine: pmap_change_wiring - * Function: Change the wiring attribute for a map/virtual-address - * pair. - * In/out conditions: - * The mapping must already exist in the pmap. + * Clear the wired attribute from the mappings for the specified range of + * addresses in the given pmap. Every valid mapping within that range + * must have the wired attribute set. In contrast, invalid mappings + * cannot have the wired attribute set, so they are ignored. + * + * XXX Wired mappings of unmanaged pages cannot be counted by this pmap + * implementation. */ void -pmap_change_wiring(pmap_t pmap, vm_offset_t va, boolean_t wired) +pmap_unwire(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) { struct l2_bucket *l2b; pt_entry_t *ptep, pte; - vm_page_t pg; - + pv_entry_t pv; + vm_offset_t next_bucket; + vm_page_t m; + rw_wlock(&pvh_global_lock); - PMAP_LOCK(pmap); - l2b = pmap_get_l2_bucket(pmap, va); - KASSERT(l2b, ("No l2b bucket in pmap_change_wiring")); - ptep = &l2b->l2b_kva[l2pte_index(va)]; - pte = *ptep; - pg = PHYS_TO_VM_PAGE(l2pte_pa(pte)); - if (pg) - pmap_modify_pv(pg, pmap, va, PVF_WIRED, wired ? PVF_WIRED : 0); + PMAP_LOCK(pmap); + while (sva < eva) { + next_bucket = L2_NEXT_BUCKET(sva); + if (next_bucket > eva) + next_bucket = eva; + l2b = pmap_get_l2_bucket(pmap, sva); + if (l2b == NULL) { + sva = next_bucket; + continue; + } + for (ptep = &l2b->l2b_kva[l2pte_index(sva)]; sva < next_bucket; + sva += PAGE_SIZE, ptep++) { + if ((pte = *ptep) == 0 || + (m = PHYS_TO_VM_PAGE(l2pte_pa(pte))) == NULL || + (m->oflags & VPO_UNMANAGED) != 0) + continue; + pv = pmap_find_pv(m, pmap, sva); + if ((pv->pv_flags & PVF_WIRED) == 0) + panic("pmap_unwire: pv %p isn't wired", pv); + pv->pv_flags &= ~PVF_WIRED; + pmap->pm_stats.wired_count--; + } + } rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); } Modified: stable/10/sys/i386/i386/pmap.c ============================================================================== --- stable/10/sys/i386/i386/pmap.c Mon Sep 1 07:54:30 2014 (r270919) +++ stable/10/sys/i386/i386/pmap.c Mon Sep 1 07:58:15 2014 (r270920) @@ -3968,59 +3968,100 @@ pmap_object_init_pt(pmap_t pmap, vm_offs } /* - * Routine: pmap_change_wiring - * Function: Change the wiring attribute for a map/virtual-address - * pair. - * In/out conditions: - * The mapping must already exist in the pmap. + * Clear the wired attribute from the mappings for the specified range of + * addresses in the given pmap. Every valid mapping within that range + * must have the wired attribute set. In contrast, invalid mappings + * cannot have the wired attribute set, so they are ignored. + * + * The wired attribute of the page table entry is not a hardware feature, + * so there is no need to invalidate any TLB entries. */ void -pmap_change_wiring(pmap_t pmap, vm_offset_t va, boolean_t wired) +pmap_unwire(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) { + vm_offset_t pdnxt; pd_entry_t *pde; pt_entry_t *pte; - boolean_t are_queues_locked; + boolean_t pv_lists_locked; - are_queues_locked = FALSE; -retry: + if (pmap_is_current(pmap)) + pv_lists_locked = FALSE; + else { + pv_lists_locked = TRUE; +resume: + rw_wlock(&pvh_global_lock); + sched_pin(); + } PMAP_LOCK(pmap); - pde = pmap_pde(pmap, va); - if ((*pde & PG_PS) != 0) { - if (!wired != ((*pde & PG_W) == 0)) { - if (!are_queues_locked) { - are_queues_locked = TRUE; - if (!rw_try_wlock(&pvh_global_lock)) { - PMAP_UNLOCK(pmap); - rw_wlock(&pvh_global_lock); - goto retry; + for (; sva < eva; sva = pdnxt) { + pdnxt = (sva + NBPDR) & ~PDRMASK; + if (pdnxt < sva) + pdnxt = eva; + pde = pmap_pde(pmap, sva); + if ((*pde & PG_V) == 0) + continue; + if ((*pde & PG_PS) != 0) { + if ((*pde & PG_W) == 0) + panic("pmap_unwire: pde %#jx is missing PG_W", + (uintmax_t)*pde); + + /* + * Are we unwiring the entire large page? If not, + * demote the mapping and fall through. + */ + if (sva + NBPDR == pdnxt && eva >= pdnxt) { + /* + * Regardless of whether a pde (or pte) is 32 + * or 64 bits in size, PG_W is among the least + * significant 32 bits. + */ + atomic_clear_int((u_int *)pde, PG_W); + pmap->pm_stats.wired_count -= NBPDR / + PAGE_SIZE; + continue; + } else { + if (!pv_lists_locked) { + pv_lists_locked = TRUE; + if (!rw_try_wlock(&pvh_global_lock)) { + PMAP_UNLOCK(pmap); + /* Repeat sva. */ + goto resume; + } + sched_pin(); } + if (!pmap_demote_pde(pmap, pde, sva)) + panic("pmap_unwire: demotion failed"); } - if (!pmap_demote_pde(pmap, pde, va)) - panic("pmap_change_wiring: demotion failed"); - } else - goto out; - } - pte = pmap_pte(pmap, va); - - if (wired && !pmap_pte_w(pte)) - pmap->pm_stats.wired_count++; - else if (!wired && pmap_pte_w(pte)) - pmap->pm_stats.wired_count--; + } + if (pdnxt > eva) + pdnxt = eva; + for (pte = pmap_pte_quick(pmap, sva); sva != pdnxt; pte++, + sva += PAGE_SIZE) { + if ((*pte & PG_V) == 0) + continue; + if ((*pte & PG_W) == 0) + panic("pmap_unwire: pte %#jx is missing PG_W", + (uintmax_t)*pte); - /* - * Wiring is not a hardware characteristic so there is no need to - * invalidate TLB. - */ - pmap_pte_set_w(pte, wired); - pmap_pte_release(pte); -out: - if (are_queues_locked) + /* + * PG_W must be cleared atomically. Although the pmap + * lock synchronizes access to PG_W, another processor + * could be setting PG_M and/or PG_A concurrently. + * + * PG_W is among the least significant 32 bits. + */ + atomic_clear_int((u_int *)pte, PG_W); + pmap->pm_stats.wired_count--; + } + } + if (pv_lists_locked) { + sched_unpin(); rw_wunlock(&pvh_global_lock); + } PMAP_UNLOCK(pmap); } - /* * Copy the range specified by src_addr/len * from the source map to the range dst_addr/len Modified: stable/10/sys/i386/xen/pmap.c ============================================================================== --- stable/10/sys/i386/xen/pmap.c Mon Sep 1 07:54:30 2014 (r270919) +++ stable/10/sys/i386/xen/pmap.c Mon Sep 1 07:58:15 2014 (r270920) @@ -3169,40 +3169,58 @@ pmap_object_init_pt(pmap_t pmap, vm_offs } /* - * Routine: pmap_change_wiring - * Function: Change the wiring attribute for a map/virtual-address - * pair. - * In/out conditions: - * The mapping must already exist in the pmap. + * Clear the wired attribute from the mappings for the specified range of + * addresses in the given pmap. Every valid mapping within that range + * must have the wired attribute set. In contrast, invalid mappings + * cannot have the wired attribute set, so they are ignored. + * + * The wired attribute of the page table entry is not a hardware feature, + * so there is no need to invalidate any TLB entries. */ void -pmap_change_wiring(pmap_t pmap, vm_offset_t va, boolean_t wired) +pmap_unwire(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) { + vm_offset_t pdnxt; + pd_entry_t *pde; pt_entry_t *pte; + CTR3(KTR_PMAP, "pmap_unwire: pmap=%p sva=0x%x eva=0x%x", pmap, sva, + eva); rw_wlock(&pvh_global_lock); + sched_pin(); PMAP_LOCK(pmap); - pte = pmap_pte(pmap, va); - - if (wired && !pmap_pte_w(pte)) { - PT_SET_VA_MA((pte), *(pte) | PG_W, TRUE); - pmap->pm_stats.wired_count++; - } else if (!wired && pmap_pte_w(pte)) { - PT_SET_VA_MA((pte), *(pte) & ~PG_W, TRUE); - pmap->pm_stats.wired_count--; + for (; sva < eva; sva = pdnxt) { + pdnxt = (sva + NBPDR) & ~PDRMASK; + if (pdnxt < sva) + pdnxt = eva; + pde = pmap_pde(pmap, sva); + if ((*pde & PG_V) == 0) + continue; + if ((*pde & PG_PS) != 0) + panic("pmap_unwire: unexpected PG_PS in pde %#jx", + (uintmax_t)*pde); + if (pdnxt > eva) + pdnxt = eva; + for (pte = pmap_pte_quick(pmap, sva); sva != pdnxt; pte++, + sva += PAGE_SIZE) { + if ((*pte & PG_V) == 0) + continue; + if ((*pte & PG_W) == 0) + panic("pmap_unwire: pte %#jx is missing PG_W", + (uintmax_t)*pte); + PT_SET_VA_MA(pte, *pte & ~PG_W, FALSE); + pmap->pm_stats.wired_count--; + } } - - /* - * Wiring is not a hardware characteristic so there is no need to - * invalidate TLB. - */ - pmap_pte_release(pte); - PMAP_UNLOCK(pmap); + if (*PMAP1) + PT_CLEAR_VA(PMAP1, FALSE); + PT_UPDATES_FLUSH(); + sched_unpin(); rw_wunlock(&pvh_global_lock); + PMAP_UNLOCK(pmap); } - /* * Copy the range specified by src_addr/len * from the source map to the range dst_addr/len Modified: stable/10/sys/ia64/ia64/pmap.c ============================================================================== --- stable/10/sys/ia64/ia64/pmap.c Mon Sep 1 07:54:30 2014 (r270919) +++ stable/10/sys/ia64/ia64/pmap.c Mon Sep 1 07:58:15 2014 (r270920) @@ -1946,34 +1946,33 @@ pmap_object_init_pt(pmap_t pmap, vm_offs } /* - * Routine: pmap_change_wiring - * Function: Change the wiring attribute for a map/virtual-address - * pair. - * In/out conditions: - * The mapping must already exist in the pmap. + * Clear the wired attribute from the mappings for the specified range of + * addresses in the given pmap. Every valid mapping within that range + * must have the wired attribute set. In contrast, invalid mappings + * cannot have the wired attribute set, so they are ignored. + * + * The wired attribute of the page table entry is not a hardware feature, + * so there is no need to invalidate any TLB entries. */ void -pmap_change_wiring(pmap_t pmap, vm_offset_t va, boolean_t wired) +pmap_unwire(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) { pmap_t oldpmap; struct ia64_lpte *pte; - CTR4(KTR_PMAP, "%s(pm=%p, va=%#lx, wired=%u)", __func__, pmap, va, - wired); + CTR4(KTR_PMAP, "%s(%p, %#x, %#x)", __func__, pmap, sva, eva); PMAP_LOCK(pmap); oldpmap = pmap_switch(pmap); - - pte = pmap_find_vhpt(va); - KASSERT(pte != NULL, ("pte")); - if (wired && !pmap_wired(pte)) { - pmap->pm_stats.wired_count++; - pmap_set_wired(pte); - } else if (!wired && pmap_wired(pte)) { + for (; sva < eva; sva += PAGE_SIZE) { + pte = pmap_find_vhpt(sva); + if (pte == NULL) + continue; + if (!pmap_wired(pte)) + panic("pmap_unwire: pte %p isn't wired", pte); pmap->pm_stats.wired_count--; pmap_clear_wired(pte); } - pmap_switch(oldpmap); PMAP_UNLOCK(pmap); } Modified: stable/10/sys/mips/mips/pmap.c ============================================================================== --- stable/10/sys/mips/mips/pmap.c Mon Sep 1 07:54:30 2014 (r270919) +++ stable/10/sys/mips/mips/pmap.c Mon Sep 1 07:58:15 2014 (r270920) @@ -2426,33 +2426,51 @@ pmap_object_init_pt(pmap_t pmap, vm_offs } /* - * Routine: pmap_change_wiring - * Function: Change the wiring attribute for a map/virtual-address - * pair. - * In/out conditions: - * The mapping must already exist in the pmap. + * Clear the wired attribute from the mappings for the specified range of + * addresses in the given pmap. Every valid mapping within that range + * must have the wired attribute set. In contrast, invalid mappings + * cannot have the wired attribute set, so they are ignored. + * + * The wired attribute of the page table entry is not a hardware feature, + * so there is no need to invalidate any TLB entries. */ void -pmap_change_wiring(pmap_t pmap, vm_offset_t va, boolean_t wired) +pmap_unwire(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) { + pd_entry_t *pde, *pdpe; pt_entry_t *pte; + vm_offset_t va_next; PMAP_LOCK(pmap); - pte = pmap_pte(pmap, va); - - if (wired && !pte_test(pte, PTE_W)) - pmap->pm_stats.wired_count++; - else if (!wired && pte_test(pte, PTE_W)) - pmap->pm_stats.wired_count--; - - /* - * Wiring is not a hardware characteristic so there is no need to - * invalidate TLB. - */ - if (wired) - pte_set(pte, PTE_W); - else - pte_clear(pte, PTE_W); + for (; sva < eva; sva = va_next) { + pdpe = pmap_segmap(pmap, sva); +#ifdef __mips_n64 + if (*pdpe == NULL) { + va_next = (sva + NBSEG) & ~SEGMASK; + if (va_next < sva) + va_next = eva; + continue; + } +#endif + va_next = (sva + NBPDR) & ~PDRMASK; + if (va_next < sva) + va_next = eva; + pde = pmap_pdpe_to_pde(pdpe, sva); + if (*pde == NULL) + continue; + if (va_next > eva) + va_next = eva; + for (pte = pmap_pde_to_pte(pde, sva); sva != va_next; pte++, + sva += PAGE_SIZE) { + if (!pte_test(pte, PTE_V)) + continue; + if (!pte_test(pte, PTE_W)) + panic("pmap_unwire: pte %#jx is missing PG_W", + (uintmax_t)*pte); + pte_clear(pte, PTE_W); + pmap->pm_stats.wired_count--; + } + } PMAP_UNLOCK(pmap); } Modified: stable/10/sys/powerpc/aim/mmu_oea.c ============================================================================== --- stable/10/sys/powerpc/aim/mmu_oea.c Mon Sep 1 07:54:30 2014 (r270919) +++ stable/10/sys/powerpc/aim/mmu_oea.c Mon Sep 1 07:58:15 2014 (r270920) @@ -269,7 +269,6 @@ int moea_pte_spill(vm_offset_t); /* * Kernel MMU interface */ -void moea_change_wiring(mmu_t, pmap_t, vm_offset_t, boolean_t); void moea_clear_modify(mmu_t, vm_page_t); void moea_copy_page(mmu_t, vm_page_t, vm_page_t); void moea_copy_pages(mmu_t mmu, vm_page_t *ma, vm_offset_t a_offset, @@ -298,6 +297,7 @@ void moea_release(mmu_t, pmap_t); void moea_remove(mmu_t, pmap_t, vm_offset_t, vm_offset_t); void moea_remove_all(mmu_t, vm_page_t); void moea_remove_write(mmu_t, vm_page_t); +void moea_unwire(mmu_t, pmap_t, vm_offset_t, vm_offset_t); void moea_zero_page(mmu_t, vm_page_t); void moea_zero_page_area(mmu_t, vm_page_t, int, int); void moea_zero_page_idle(mmu_t, vm_page_t); @@ -319,7 +319,6 @@ vm_offset_t moea_dumpsys_map(mmu_t mmu, struct pmap_md * moea_scan_md(mmu_t mmu, struct pmap_md *prev); static mmu_method_t moea_methods[] = { - MMUMETHOD(mmu_change_wiring, moea_change_wiring), MMUMETHOD(mmu_clear_modify, moea_clear_modify), MMUMETHOD(mmu_copy_page, moea_copy_page), MMUMETHOD(mmu_copy_pages, moea_copy_pages), @@ -346,6 +345,7 @@ static mmu_method_t moea_methods[] = { MMUMETHOD(mmu_remove_all, moea_remove_all), MMUMETHOD(mmu_remove_write, moea_remove_write), MMUMETHOD(mmu_sync_icache, moea_sync_icache), + MMUMETHOD(mmu_unwire, moea_unwire), MMUMETHOD(mmu_zero_page, moea_zero_page), MMUMETHOD(mmu_zero_page_area, moea_zero_page_area), MMUMETHOD(mmu_zero_page_idle, moea_zero_page_idle), @@ -1015,23 +1015,19 @@ moea_deactivate(mmu_t mmu, struct thread } void -moea_change_wiring(mmu_t mmu, pmap_t pm, vm_offset_t va, boolean_t wired) +moea_unwire(mmu_t mmu, pmap_t pm, vm_offset_t sva, vm_offset_t eva) { - struct pvo_entry *pvo; + struct pvo_entry key, *pvo; PMAP_LOCK(pm); - pvo = moea_pvo_find_va(pm, va & ~ADDR_POFF, NULL); - - if (pvo != NULL) { - if (wired) { - if ((pvo->pvo_vaddr & PVO_WIRED) == 0) - pm->pm_stats.wired_count++; - pvo->pvo_vaddr |= PVO_WIRED; - } else { - if ((pvo->pvo_vaddr & PVO_WIRED) != 0) - pm->pm_stats.wired_count--; - pvo->pvo_vaddr &= ~PVO_WIRED; - } + key.pvo_vaddr = sva; + for (pvo = RB_NFIND(pvo_tree, &pm->pmap_pvo, &key); + pvo != NULL && PVO_VADDR(pvo) < eva; + pvo = RB_NEXT(pvo_tree, &pm->pmap_pvo, pvo)) { + if ((pvo->pvo_vaddr & PVO_WIRED) == 0) + panic("moea_unwire: pvo %p is missing PVO_WIRED", pvo); + pvo->pvo_vaddr &= ~PVO_WIRED; + pm->pm_stats.wired_count--; } PMAP_UNLOCK(pm); } @@ -1941,7 +1937,21 @@ moea_pvo_enter(pmap_t pm, uma_zone_t zon if ((pvo->pvo_pte.pte.pte_lo & PTE_RPGN) == pa && (pvo->pvo_pte.pte.pte_lo & PTE_PP) == (pte_lo & PTE_PP)) { + /* + * The PTE is not changing. Instead, this may + * be a request to change the mapping's wired + * attribute. + */ mtx_unlock(&moea_table_mutex); + if ((flags & PVO_WIRED) != 0 && + (pvo->pvo_vaddr & PVO_WIRED) == 0) { + pvo->pvo_vaddr |= PVO_WIRED; + pm->pm_stats.wired_count++; + } else if ((flags & PVO_WIRED) == 0 && + (pvo->pvo_vaddr & PVO_WIRED) != 0) { + pvo->pvo_vaddr &= ~PVO_WIRED; + pm->pm_stats.wired_count--; + } return (0); } moea_pvo_remove(pvo, -1); Modified: stable/10/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- stable/10/sys/powerpc/aim/mmu_oea64.c Mon Sep 1 07:54:30 2014 (r270919) +++ stable/10/sys/powerpc/aim/mmu_oea64.c Mon Sep 1 07:58:15 2014 (r270920) @@ -283,7 +283,6 @@ static void moea64_syncicache(mmu_t, pm /* * Kernel MMU interface */ -void moea64_change_wiring(mmu_t, pmap_t, vm_offset_t, boolean_t); void moea64_clear_modify(mmu_t, vm_page_t); void moea64_copy_page(mmu_t, vm_page_t, vm_page_t); void moea64_copy_pages(mmu_t mmu, vm_page_t *ma, vm_offset_t a_offset, @@ -313,6 +312,7 @@ void moea64_remove(mmu_t, pmap_t, vm_off void moea64_remove_pages(mmu_t, pmap_t); void moea64_remove_all(mmu_t, vm_page_t); void moea64_remove_write(mmu_t, vm_page_t); +void moea64_unwire(mmu_t, pmap_t, vm_offset_t, vm_offset_t); void moea64_zero_page(mmu_t, vm_page_t); void moea64_zero_page_area(mmu_t, vm_page_t, int, int); void moea64_zero_page_idle(mmu_t, vm_page_t); @@ -332,7 +332,6 @@ vm_offset_t moea64_dumpsys_map(mmu_t mmu struct pmap_md * moea64_scan_md(mmu_t mmu, struct pmap_md *prev); static mmu_method_t moea64_methods[] = { - MMUMETHOD(mmu_change_wiring, moea64_change_wiring), MMUMETHOD(mmu_clear_modify, moea64_clear_modify), MMUMETHOD(mmu_copy_page, moea64_copy_page), MMUMETHOD(mmu_copy_pages, moea64_copy_pages), @@ -360,6 +359,7 @@ static mmu_method_t moea64_methods[] = { MMUMETHOD(mmu_remove_all, moea64_remove_all), MMUMETHOD(mmu_remove_write, moea64_remove_write), MMUMETHOD(mmu_sync_icache, moea64_sync_icache), + MMUMETHOD(mmu_unwire, moea64_unwire), MMUMETHOD(mmu_zero_page, moea64_zero_page), MMUMETHOD(mmu_zero_page_area, moea64_zero_page_area), MMUMETHOD(mmu_zero_page_idle, moea64_zero_page_idle), @@ -1025,55 +1025,38 @@ moea64_deactivate(mmu_t mmu, struct thre } void -moea64_change_wiring(mmu_t mmu, pmap_t pm, vm_offset_t va, boolean_t wired) +moea64_unwire(mmu_t mmu, pmap_t pm, vm_offset_t sva, vm_offset_t eva) { - struct pvo_entry *pvo; + struct pvo_entry key, *pvo; uintptr_t pt; - uint64_t vsid; - int i, ptegidx; - LOCK_TABLE_WR(); + LOCK_TABLE_RD(); PMAP_LOCK(pm); - pvo = moea64_pvo_find_va(pm, va & ~ADDR_POFF); - - if (pvo != NULL) { + key.pvo_vaddr = sva; + for (pvo = RB_NFIND(pvo_tree, &pm->pmap_pvo, &key); + pvo != NULL && PVO_VADDR(pvo) < eva; + pvo = RB_NEXT(pvo_tree, &pm->pmap_pvo, pvo)) { pt = MOEA64_PVO_TO_PTE(mmu, pvo); - - if (wired) { - if ((pvo->pvo_vaddr & PVO_WIRED) == 0) - pm->pm_stats.wired_count++; - pvo->pvo_vaddr |= PVO_WIRED; - pvo->pvo_pte.lpte.pte_hi |= LPTE_WIRED; - } else { - if ((pvo->pvo_vaddr & PVO_WIRED) != 0) - pm->pm_stats.wired_count--; - pvo->pvo_vaddr &= ~PVO_WIRED; - pvo->pvo_pte.lpte.pte_hi &= ~LPTE_WIRED; - } - + if ((pvo->pvo_vaddr & PVO_WIRED) == 0) + panic("moea64_unwire: pvo %p is missing PVO_WIRED", + pvo); + pvo->pvo_vaddr &= ~PVO_WIRED; + if ((pvo->pvo_pte.lpte.pte_hi & LPTE_WIRED) == 0) + panic("moea64_unwire: pte %p is missing LPTE_WIRED", + &pvo->pvo_pte.lpte); + pvo->pvo_pte.lpte.pte_hi &= ~LPTE_WIRED; if (pt != -1) { - /* Update wiring flag in page table. */ - MOEA64_PTE_CHANGE(mmu, pt, &pvo->pvo_pte.lpte, - pvo->pvo_vpn); - } else if (wired) { /* - * If we are wiring the page, and it wasn't in the - * page table before, add it. + * The PTE's wired attribute is not a hardware + * feature, so there is no need to invalidate any TLB + * entries. */ - vsid = PVO_VSID(pvo); - ptegidx = va_to_pteg(vsid, PVO_VADDR(pvo), - pvo->pvo_vaddr & PVO_LARGE); - - i = MOEA64_PTE_INSERT(mmu, ptegidx, &pvo->pvo_pte.lpte); - - if (i >= 0) { - PVO_PTEGIDX_CLR(pvo); - PVO_PTEGIDX_SET(pvo, i); - } + MOEA64_PTE_CHANGE(mmu, pt, &pvo->pvo_pte.lpte, + pvo->pvo_vpn); } - + pm->pm_stats.wired_count--; } - UNLOCK_TABLE_WR(); + UNLOCK_TABLE_RD(); PMAP_UNLOCK(pm); } @@ -2207,6 +2190,7 @@ moea64_pvo_enter(mmu_t mmu, pmap_t pm, u uint64_t pte_lo, int flags, int8_t psind __unused) { struct pvo_entry *pvo; + uintptr_t pt; uint64_t vsid; int first; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-10@FreeBSD.ORG Mon Sep 1 08:02:24 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2661A9AD; Mon, 1 Sep 2014 08:02:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 11B8215CE; Mon, 1 Sep 2014 08:02:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8182N07077193; Mon, 1 Sep 2014 08:02:23 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8182NuY077192; Mon, 1 Sep 2014 08:02:23 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201409010802.s8182NuY077192@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 1 Sep 2014 08:02:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270921 - stable/10/libexec/rtld-elf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 08:02:24 -0000 Author: kib Date: Mon Sep 1 08:02:23 2014 New Revision: 270921 URL: http://svnweb.freebsd.org/changeset/base/270921 Log: MFC r270803: Document the whole settings needed to build a debug version of rtld. Modified: stable/10/libexec/rtld-elf/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/libexec/rtld-elf/Makefile ============================================================================== --- stable/10/libexec/rtld-elf/Makefile Mon Sep 1 07:58:15 2014 (r270920) +++ stable/10/libexec/rtld-elf/Makefile Mon Sep 1 08:02:23 2014 (r270921) @@ -1,5 +1,9 @@ # $FreeBSD$ +# Use the following command to build local debug version of dynamic +# linker: +# make DEBUG_FLAGS=-g DEBUG=-DDEBUG MK_TESTS=no all + .include MK_SSP= no From owner-svn-src-stable-10@FreeBSD.ORG Mon Sep 1 08:08:33 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0B305B67; Mon, 1 Sep 2014 08:08:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D096C1746; Mon, 1 Sep 2014 08:08:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8188WEP077999; Mon, 1 Sep 2014 08:08:32 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8188Wjt077998; Mon, 1 Sep 2014 08:08:32 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201409010808.s8188Wjt077998@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 1 Sep 2014 08:08:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270922 - stable/10/share/examples/autofs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 08:08:33 -0000 Author: trasz Date: Mon Sep 1 08:08:32 2014 New Revision: 270922 URL: http://svnweb.freebsd.org/changeset/base/270922 Log: MFC r270135: Remove vestiges of previous autofs. Discussed with: alfred@ Sponsored by: The FreeBSD Foundation Deleted: stable/10/share/examples/autofs/ Modified: Directory Properties: stable/10/ (props changed) From owner-svn-src-stable-10@FreeBSD.ORG Mon Sep 1 08:33:39 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2D40F1A3; Mon, 1 Sep 2014 08:33:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0012719FF; Mon, 1 Sep 2014 08:33:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s818XcLk091398; Mon, 1 Sep 2014 08:33:38 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s818XchH091397; Mon, 1 Sep 2014 08:33:38 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201409010833.s818XchH091397@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Mon, 1 Sep 2014 08:33:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270923 - stable/10/sys/netinet6 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 08:33:39 -0000 Author: ae Date: Mon Sep 1 08:33:38 2014 New Revision: 270923 URL: http://svnweb.freebsd.org/changeset/base/270923 Log: MFC r257985: Fix panic with RADIX_MPATH, when RTFREE_LOCKED() called for already unlocked route. Use in6_rtalloc() instead of in6_rtalloc1. This helps simplify the code and remove several now unused variables. PR: 156283 Modified: stable/10/sys/netinet6/nd6_nbr.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet6/nd6_nbr.c ============================================================================== --- stable/10/sys/netinet6/nd6_nbr.c Mon Sep 1 08:08:32 2014 (r270922) +++ stable/10/sys/netinet6/nd6_nbr.c Mon Sep 1 08:33:38 2014 (r270923) @@ -232,41 +232,28 @@ nd6_ns_input(struct mbuf *m, int off, in /* (2) check. */ if (ifa == NULL) { - struct rtentry *rt; - struct sockaddr_in6 tsin6; - int need_proxy; -#ifdef RADIX_MPATH struct route_in6 ro; -#endif + int need_proxy; - bzero(&tsin6, sizeof tsin6); - tsin6.sin6_len = sizeof(struct sockaddr_in6); - tsin6.sin6_family = AF_INET6; - tsin6.sin6_addr = taddr6; + bzero(&ro, sizeof(ro)); + ro.ro_dst.sin6_len = sizeof(struct sockaddr_in6); + ro.ro_dst.sin6_family = AF_INET6; + ro.ro_dst.sin6_addr = taddr6; /* Always use the default FIB. */ #ifdef RADIX_MPATH - bzero(&ro, sizeof(ro)); - ro.ro_dst = tsin6; rtalloc_mpath_fib((struct route *)&ro, RTF_ANNOUNCE, RT_DEFAULT_FIB); - rt = ro.ro_rt; #else - rt = in6_rtalloc1((struct sockaddr *)&tsin6, 0, 0, - RT_DEFAULT_FIB); + in6_rtalloc(&ro, RT_DEFAULT_FIB); #endif - need_proxy = (rt && (rt->rt_flags & RTF_ANNOUNCE) != 0 && - rt->rt_gateway->sa_family == AF_LINK); - if (rt != NULL) { - /* - * Make a copy while we can be sure that rt_gateway - * is still stable before unlocking to avoid lock - * order problems. proxydl will only be used if - * proxy will be set in the next block. - */ + need_proxy = (ro.ro_rt && + (ro.ro_rt->rt_flags & RTF_ANNOUNCE) != 0 && + ro.ro_rt->rt_gateway->sa_family == AF_LINK); + if (ro.ro_rt != NULL) { if (need_proxy) - proxydl = *SDL(rt->rt_gateway); - RTFREE_LOCKED(rt); + proxydl = *SDL(ro.ro_rt->rt_gateway); + RTFREE(ro.ro_rt); } if (need_proxy) { /* From owner-svn-src-stable-10@FreeBSD.ORG Mon Sep 1 08:34:39 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DC949429; Mon, 1 Sep 2014 08:34:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C847F1A16; Mon, 1 Sep 2014 08:34:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s818YdOj091668; Mon, 1 Sep 2014 08:34:39 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s818YdW7091665; Mon, 1 Sep 2014 08:34:39 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201409010834.s818YdW7091665@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Mon, 1 Sep 2014 08:34:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270925 - stable/10/sys/netpfil/pf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 08:34:40 -0000 Author: glebius Date: Mon Sep 1 08:34:39 2014 New Revision: 270925 URL: http://svnweb.freebsd.org/changeset/base/270925 Log: Fix ABI broken in r270576. This is direct commit to stable/10. Reported by: kib Modified: stable/10/sys/netpfil/pf/pf.c stable/10/sys/netpfil/pf/pf.h Modified: stable/10/sys/netpfil/pf/pf.c ============================================================================== --- stable/10/sys/netpfil/pf/pf.c Mon Sep 1 08:33:52 2014 (r270924) +++ stable/10/sys/netpfil/pf/pf.c Mon Sep 1 08:34:39 2014 (r270925) @@ -3522,7 +3522,7 @@ pf_create_state(struct pf_rule *r, struc if (r->rt && r->rt != PF_FASTROUTE) { if (pf_map_addr(pd->af, r, pd->src, &s->rt_addr, NULL, &sn)) { - REASON_SET(&reason, PFRES_MAPFAILED); + REASON_SET(&reason, PFRES_BADSTATE); pf_src_tree_remove_state(s); STATE_DEC_COUNTERS(s); uma_zfree(V_pf_state_z, s); Modified: stable/10/sys/netpfil/pf/pf.h ============================================================================== --- stable/10/sys/netpfil/pf/pf.h Mon Sep 1 08:33:52 2014 (r270924) +++ stable/10/sys/netpfil/pf/pf.h Mon Sep 1 08:34:39 2014 (r270925) @@ -125,8 +125,7 @@ enum { PF_ADDR_ADDRMASK, PF_ADDR_NOROUTE #define PFRES_MAXSTATES 12 /* State limit */ #define PFRES_SRCLIMIT 13 /* Source node/conn limit */ #define PFRES_SYNPROXY 14 /* SYN proxy */ -#define PFRES_MAPFAILED 15 /* pf_map_addr() failed */ -#define PFRES_MAX 16 /* total+1 */ +#define PFRES_MAX 15 /* total+1 */ #define PFRES_NAMES { \ "match", \ @@ -144,7 +143,6 @@ enum { PF_ADDR_ADDRMASK, PF_ADDR_NOROUTE "state-limit", \ "src-limit", \ "synproxy", \ - "map-failed", \ NULL \ } From owner-svn-src-stable-10@FreeBSD.ORG Tue Sep 2 15:49:34 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 531A0BBD; Tue, 2 Sep 2014 15:49:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2010C1ABF; Tue, 2 Sep 2014 15:49:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s82FnXTh005771; Tue, 2 Sep 2014 15:49:33 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s82FnXbn005769; Tue, 2 Sep 2014 15:49:33 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409021549.s82FnXbn005769@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 2 Sep 2014 15:49:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270969 - in stable/10: sys/sys usr.bin/elfdump X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2014 15:49:34 -0000 Author: emaste Date: Tue Sep 2 15:49:33 2014 New Revision: 270969 URL: http://svnweb.freebsd.org/changeset/base/270969 Log: MFC elfdump improvements r269092: Improve section type reporting The SHT range 0x70000000-0x7fffffff is processor-specific. Pass the ELF machine type header to sh_types so the section header type name can be reported correctly for the given processor. For all ranges report the actual value for unknown types. Add MIPS-specific type SHT_MIPS_OPTIONS. r269143 (andreast): Further improvements on elfdump, to follow up r269092: - Add ARM specific section header types. - Add SHT_GNU_HASH section header type. - Improve reporting of undefined tags in d_tags. - Add DT_GNU_HASH tag. Reviewed by: emaste r269337: add EM_AARCH64 64-bit ARM machine architecture r269338: use existing ELF constants where available r270303: Rename DT_FEATURE_1 to DT_FEATURE This provides a minor cleanup in elfdump; there are otherwise no consumers in the tree. Old SUN documentation can be found for either variant, but GNU binutils switched to DT_FEATURE around 2000. r270304: Remove extraneous _SUNW_ in reported DT_ names Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/sys/elf_common.h stable/10/usr.bin/elfdump/elfdump.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/sys/elf_common.h ============================================================================== --- stable/10/sys/sys/elf_common.h Tue Sep 2 14:27:12 2014 (r270968) +++ stable/10/sys/sys/elf_common.h Tue Sep 2 15:49:33 2014 (r270969) @@ -237,6 +237,7 @@ typedef struct { #define EM_ARCA 109 /* Arca RISC Microprocessor. */ #define EM_UNICORE 110 /* Microprocessor series from PKU-Unity Ltd. and MPRC of Peking University */ +#define EM_AARCH64 183 /* AArch64 (64-bit ARM) */ /* Non-standard or deprecated. */ #define EM_486 6 /* Intel i486. */ @@ -424,7 +425,7 @@ typedef struct { #define DT_PLTPADSZ 0x6ffffdf9 /* pltpadding size */ #define DT_MOVEENT 0x6ffffdfa /* move table entry size */ #define DT_MOVESZ 0x6ffffdfb /* move table size */ -#define DT_FEATURE_1 0x6ffffdfc /* feature holder */ +#define DT_FEATURE 0x6ffffdfc /* feature holder */ #define DT_POSFLAG_1 0x6ffffdfd /* flags for DT_* entries, effecting */ /* the following DT_* entry. */ /* See DF_P1_* definitions */ Modified: stable/10/usr.bin/elfdump/elfdump.c ============================================================================== --- stable/10/usr.bin/elfdump/elfdump.c Tue Sep 2 14:27:12 2014 (r270968) +++ stable/10/usr.bin/elfdump/elfdump.c Tue Sep 2 15:49:33 2014 (r270969) @@ -167,77 +167,83 @@ static int elf64_offsets[] = { /* http://www.sco.com/developers/gabi/latest/ch5.dynamic.html#tag_encodings */ static const char * -d_tags(u_int64_t tag) { +d_tags(u_int64_t tag) +{ + static char unknown_tag[48]; + switch (tag) { - case 0: return "DT_NULL"; - case 1: return "DT_NEEDED"; - case 2: return "DT_PLTRELSZ"; - case 3: return "DT_PLTGOT"; - case 4: return "DT_HASH"; - case 5: return "DT_STRTAB"; - case 6: return "DT_SYMTAB"; - case 7: return "DT_RELA"; - case 8: return "DT_RELASZ"; - case 9: return "DT_RELAENT"; - case 10: return "DT_STRSZ"; - case 11: return "DT_SYMENT"; - case 12: return "DT_INIT"; - case 13: return "DT_FINI"; - case 14: return "DT_SONAME"; - case 15: return "DT_RPATH"; - case 16: return "DT_SYMBOLIC"; - case 17: return "DT_REL"; - case 18: return "DT_RELSZ"; - case 19: return "DT_RELENT"; - case 20: return "DT_PLTREL"; - case 21: return "DT_DEBUG"; - case 22: return "DT_TEXTREL"; - case 23: return "DT_JMPREL"; - case 24: return "DT_BIND_NOW"; - case 25: return "DT_INIT_ARRAY"; - case 26: return "DT_FINI_ARRAY"; - case 27: return "DT_INIT_ARRAYSZ"; - case 28: return "DT_FINI_ARRAYSZ"; - case 29: return "DT_RUNPATH"; - case 30: return "DT_FLAGS"; - case 32: return "DT_PREINIT_ARRAY"; /* XXX: DT_ENCODING */ - case 33: return "DT_PREINIT_ARRAYSZ"; + case DT_NULL: return "DT_NULL"; + case DT_NEEDED: return "DT_NEEDED"; + case DT_PLTRELSZ: return "DT_PLTRELSZ"; + case DT_PLTGOT: return "DT_PLTGOT"; + case DT_HASH: return "DT_HASH"; + case DT_STRTAB: return "DT_STRTAB"; + case DT_SYMTAB: return "DT_SYMTAB"; + case DT_RELA: return "DT_RELA"; + case DT_RELASZ: return "DT_RELASZ"; + case DT_RELAENT: return "DT_RELAENT"; + case DT_STRSZ: return "DT_STRSZ"; + case DT_SYMENT: return "DT_SYMENT"; + case DT_INIT: return "DT_INIT"; + case DT_FINI: return "DT_FINI"; + case DT_SONAME: return "DT_SONAME"; + case DT_RPATH: return "DT_RPATH"; + case DT_SYMBOLIC: return "DT_SYMBOLIC"; + case DT_REL: return "DT_REL"; + case DT_RELSZ: return "DT_RELSZ"; + case DT_RELENT: return "DT_RELENT"; + case DT_PLTREL: return "DT_PLTREL"; + case DT_DEBUG: return "DT_DEBUG"; + case DT_TEXTREL: return "DT_TEXTREL"; + case DT_JMPREL: return "DT_JMPREL"; + case DT_BIND_NOW: return "DT_BIND_NOW"; + case DT_INIT_ARRAY: return "DT_INIT_ARRAY"; + case DT_FINI_ARRAY: return "DT_FINI_ARRAY"; + case DT_INIT_ARRAYSZ: return "DT_INIT_ARRAYSZ"; + case DT_FINI_ARRAYSZ: return "DT_FINI_ARRAYSZ"; + case DT_RUNPATH: return "DT_RUNPATH"; + case DT_FLAGS: return "DT_FLAGS"; + case DT_PREINIT_ARRAY: return "DT_PREINIT_ARRAY"; /* XXX DT_ENCODING */ + case DT_PREINIT_ARRAYSZ:return "DT_PREINIT_ARRAYSZ"; /* 0x6000000D - 0x6ffff000 operating system-specific semantics */ - case 0x6ffffdf5: return "DT_GNU_PRELINKED"; - case 0x6ffffdf6: return "DT_GNU_CONFLICTSZ"; - case 0x6ffffdf7: return "DT_GNU_LIBLISTSZ"; - case 0x6ffffdf8: return "DT_SUNW_CHECKSUM"; - case 0x6ffffdf9: return "DT_PLTPADSZ"; - case 0x6ffffdfa: return "DT_MOVEENT"; - case 0x6ffffdfb: return "DT_MOVESZ"; - case 0x6ffffdfc: return "DT_FEATURE"; - case 0x6ffffdfd: return "DT_POSFLAG_1"; - case 0x6ffffdfe: return "DT_SYMINSZ"; - case 0x6ffffdff: return "DT_SYMINENT (DT_VALRNGHI)"; - case 0x6ffffe00: return "DT_ADDRRNGLO"; - case 0x6ffffef8: return "DT_GNU_CONFLICT"; - case 0x6ffffef9: return "DT_GNU_LIBLIST"; - case 0x6ffffefa: return "DT_SUNW_CONFIG"; - case 0x6ffffefb: return "DT_SUNW_DEPAUDIT"; - case 0x6ffffefc: return "DT_SUNW_AUDIT"; - case 0x6ffffefd: return "DT_SUNW_PLTPAD"; - case 0x6ffffefe: return "DT_SUNW_MOVETAB"; - case 0x6ffffeff: return "DT_SYMINFO (DT_ADDRRNGHI)"; - case 0x6ffffff9: return "DT_RELACOUNT"; - case 0x6ffffffa: return "DT_RELCOUNT"; - case 0x6ffffffb: return "DT_FLAGS_1"; - case 0x6ffffffc: return "DT_VERDEF"; - case 0x6ffffffd: return "DT_VERDEFNUM"; - case 0x6ffffffe: return "DT_VERNEED"; - case 0x6fffffff: return "DT_VERNEEDNUM"; - case 0x6ffffff0: return "DT_GNU_VERSYM"; + case 0x6ffffdf5: return "DT_GNU_PRELINKED"; + case 0x6ffffdf6: return "DT_GNU_CONFLICTSZ"; + case 0x6ffffdf7: return "DT_GNU_LIBLISTSZ"; + case 0x6ffffdf8: return "DT_SUNW_CHECKSUM"; + case DT_PLTPADSZ: return "DT_PLTPADSZ"; + case DT_MOVEENT: return "DT_MOVEENT"; + case DT_MOVESZ: return "DT_MOVESZ"; + case DT_FEATURE: return "DT_FEATURE"; + case DT_POSFLAG_1: return "DT_POSFLAG_1"; + case DT_SYMINSZ: return "DT_SYMINSZ"; + case DT_SYMINENT : return "DT_SYMINENT (DT_VALRNGHI)"; + case DT_ADDRRNGLO: return "DT_ADDRRNGLO"; + case DT_GNU_HASH: return "DT_GNU_HASH"; + case 0x6ffffef8: return "DT_GNU_CONFLICT"; + case 0x6ffffef9: return "DT_GNU_LIBLIST"; + case DT_CONFIG: return "DT_CONFIG"; + case DT_DEPAUDIT: return "DT_DEPAUDIT"; + case DT_AUDIT: return "DT_AUDIT"; + case DT_PLTPAD: return "DT_PLTPAD"; + case DT_MOVETAB: return "DT_MOVETAB"; + case DT_SYMINFO : return "DT_SYMINFO (DT_ADDRRNGHI)"; + case DT_RELACOUNT: return "DT_RELACOUNT"; + case DT_RELCOUNT: return "DT_RELCOUNT"; + case DT_FLAGS_1: return "DT_FLAGS_1"; + case DT_VERDEF: return "DT_VERDEF"; + case DT_VERDEFNUM: return "DT_VERDEFNUM"; + case DT_VERNEED: return "DT_VERNEED"; + case DT_VERNEEDNUM: return "DT_VERNEEDNUM"; + case 0x6ffffff0: return "DT_GNU_VERSYM"; /* 0x70000000 - 0x7fffffff processor-specific semantics */ - case 0x70000000: return "DT_IA_64_PLT_RESERVE"; - case 0x7ffffffd: return "DT_SUNW_AUXILIARY"; - case 0x7ffffffe: return "DT_SUNW_USED"; - case 0x7fffffff: return "DT_SUNW_FILTER"; - default: return "ERROR: TAG NOT DEFINED"; - } + case 0x70000000: return "DT_IA_64_PLT_RESERVE"; + case 0x7ffffffd: return "DT_SUNW_AUXILIARY"; + case 0x7ffffffe: return "DT_SUNW_USED"; + case 0x7fffffff: return "DT_SUNW_FILTER"; + } + snprintf(unknown_tag, sizeof(unknown_tag), + "ERROR: TAG NOT DEFINED -- tag 0x%jx", (uintmax_t)tag); + return (unknown_tag); } static const char * @@ -261,6 +267,7 @@ e_machines(u_int mach) case EM_SPARCV9:return "EM_SPARCV9"; case EM_IA_64: return "EM_IA_64"; case EM_X86_64: return "EM_X86_64"; + case EM_AARCH64:return "EM_AARCH64"; } snprintf(machdesc, sizeof(machdesc), "(unknown machine) -- type 0x%x", mach); @@ -303,40 +310,88 @@ static const char *p_flags[] = { /* http://www.sco.com/developers/gabi/latest/ch4.sheader.html#sh_type */ static const char * -sh_types(u_int64_t sht) { - switch (sht) { - case 0: return "SHT_NULL"; - case 1: return "SHT_PROGBITS"; - case 2: return "SHT_SYMTAB"; - case 3: return "SHT_STRTAB"; - case 4: return "SHT_RELA"; - case 5: return "SHT_HASH"; - case 6: return "SHT_DYNAMIC"; - case 7: return "SHT_NOTE"; - case 8: return "SHT_NOBITS"; - case 9: return "SHT_REL"; - case 10: return "SHT_SHLIB"; - case 11: return "SHT_DYNSYM"; - case 14: return "SHT_INIT_ARRAY"; - case 15: return "SHT_FINI_ARRAY"; - case 16: return "SHT_PREINIT_ARRAY"; - case 17: return "SHT_GROUP"; - case 18: return "SHT_SYMTAB_SHNDX"; - /* 0x60000000 - 0x6fffffff operating system-specific semantics */ - case 0x6ffffff0: return "XXX:VERSYM"; - case 0x6ffffff4: return "SHT_SUNW_dof"; - case 0x6ffffff7: return "SHT_GNU_LIBLIST"; - case 0x6ffffffc: return "XXX:VERDEF"; - case 0x6ffffffd: return "SHT_SUNW(GNU)_verdef"; - case 0x6ffffffe: return "SHT_SUNW(GNU)_verneed"; - case 0x6fffffff: return "SHT_SUNW(GNU)_versym"; - /* 0x70000000 - 0x7fffffff processor-specific semantics */ - case 0x70000000: return "SHT_IA_64_EXT"; - case 0x70000001: return "SHT_IA_64_UNWIND"; - case 0x7ffffffd: return "XXX:AUXILIARY"; - case 0x7fffffff: return "XXX:FILTER"; - /* 0x80000000 - 0xffffffff application programs */ - default: return "ERROR: SHT NOT DEFINED"; +sh_types(uint64_t machine, uint64_t sht) { + static char unknown_buf[64]; + + if (sht < 0x60000000) { + switch (sht) { + case SHT_NULL: return "SHT_NULL"; + case SHT_PROGBITS: return "SHT_PROGBITS"; + case SHT_SYMTAB: return "SHT_SYMTAB"; + case SHT_STRTAB: return "SHT_STRTAB"; + case SHT_RELA: return "SHT_RELA"; + case SHT_HASH: return "SHT_HASH"; + case SHT_DYNAMIC: return "SHT_DYNAMIC"; + case SHT_NOTE: return "SHT_NOTE"; + case SHT_NOBITS: return "SHT_NOBITS"; + case SHT_REL: return "SHT_REL"; + case SHT_SHLIB: return "SHT_SHLIB"; + case SHT_DYNSYM: return "SHT_DYNSYM"; + case SHT_INIT_ARRAY: return "SHT_INIT_ARRAY"; + case SHT_FINI_ARRAY: return "SHT_FINI_ARRAY"; + case SHT_PREINIT_ARRAY: return "SHT_PREINIT_ARRAY"; + case SHT_GROUP: return "SHT_GROUP"; + case SHT_SYMTAB_SHNDX: return "SHT_SYMTAB_SHNDX"; + } + snprintf(unknown_buf, sizeof(unknown_buf), + "ERROR: SHT %ju NOT DEFINED", (uintmax_t)sht); + return (unknown_buf); + } else if (sht < 0x70000000) { + /* 0x60000000-0x6fffffff operating system-specific semantics */ + switch (sht) { + case 0x6ffffff0: return "XXX:VERSYM"; + case SHT_SUNW_dof: return "SHT_SUNW_dof"; + case SHT_GNU_HASH: return "SHT_GNU_HASH"; + case 0x6ffffff7: return "SHT_GNU_LIBLIST"; + case 0x6ffffffc: return "XXX:VERDEF"; + case SHT_SUNW_verdef: return "SHT_SUNW(GNU)_verdef"; + case SHT_SUNW_verneed: return "SHT_SUNW(GNU)_verneed"; + case SHT_SUNW_versym: return "SHT_SUNW(GNU)_versym"; + } + snprintf(unknown_buf, sizeof(unknown_buf), + "ERROR: OS-SPECIFIC SHT 0x%jx NOT DEFINED", + (uintmax_t)sht); + return (unknown_buf); + } else if (sht < 0x80000000) { + /* 0x70000000-0x7fffffff processor-specific semantics */ + switch (machine) { + case EM_ARM: + switch (sht) { + case SHT_ARM_EXIDX: return "SHT_ARM_EXIDX"; + case SHT_ARM_PREEMPTMAP:return "SHT_ARM_PREEMPTMAP"; + case SHT_ARM_ATTRIBUTES:return "SHT_ARM_ATTRIBUTES"; + case SHT_ARM_DEBUGOVERLAY: + return "SHT_ARM_DEBUGOVERLAY"; + case SHT_ARM_OVERLAYSECTION: + return "SHT_ARM_OVERLAYSECTION"; + } + break; + case EM_IA_64: + switch (sht) { + case 0x70000000: return "SHT_IA_64_EXT"; + case 0x70000001: return "SHT_IA_64_UNWIND"; + } + break; + case EM_MIPS: + switch (sht) { + case SHT_MIPS_OPTIONS: return "SHT_MIPS_OPTIONS"; + } + break; + } + switch (sht) { + case 0x7ffffffd: return "XXX:AUXILIARY"; + case 0x7fffffff: return "XXX:FILTER"; + } + snprintf(unknown_buf, sizeof(unknown_buf), + "ERROR: PROCESSOR-SPECIFIC SHT 0x%jx NOT DEFINED", + (uintmax_t)sht); + return (unknown_buf); + } else { + /* 0x80000000-0xffffffff application programs */ + snprintf(unknown_buf, sizeof(unknown_buf), + "ERROR: SHT 0x%jx NOT DEFINED", + (uintmax_t)sht); + return (unknown_buf); } } @@ -704,6 +759,7 @@ elf_print_shdr(Elf32_Ehdr *e, void *sh) u_int64_t info; u_int64_t addralign; u_int64_t entsize; + u_int64_t machine; void *v; int i; @@ -712,6 +768,7 @@ elf_print_shdr(Elf32_Ehdr *e, void *sh) return; } + machine = elf_get_quarter(e, e, E_MACHINE); shentsize = elf_get_quarter(e, e, E_SHENTSIZE); shnum = elf_get_shnum(e, sh); fprintf(out, "\nsection header:\n"); @@ -730,7 +787,7 @@ elf_print_shdr(Elf32_Ehdr *e, void *sh) fprintf(out, "\n"); fprintf(out, "entry: %d\n", i); fprintf(out, "\tsh_name: %s\n", shstrtab + name); - fprintf(out, "\tsh_type: %s\n", sh_types(type)); + fprintf(out, "\tsh_type: %s\n", sh_types(machine, type)); fprintf(out, "\tsh_flags: %s\n", sh_flags[flags & 0x7]); fprintf(out, "\tsh_addr: %#jx\n", addr); fprintf(out, "\tsh_offset: %jd\n", (intmax_t)offset); From owner-svn-src-stable-10@FreeBSD.ORG Tue Sep 2 16:14:17 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3267E8BB; Tue, 2 Sep 2014 16:14:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1DB731DEC; Tue, 2 Sep 2014 16:14:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s82GEGu1020141; Tue, 2 Sep 2014 16:14:16 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s82GEGbq020140; Tue, 2 Sep 2014 16:14:16 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201409021614.s82GEGbq020140@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 2 Sep 2014 16:14:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270970 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2014 16:14:17 -0000 Author: ngie Date: Tue Sep 2 16:14:16 2014 New Revision: 270970 URL: http://svnweb.freebsd.org/changeset/base/270970 Log: MFC r270179: Add missing libraries to DPADD; sort DPADD so DPADD and LDADD match up This fixes "make checkdpadd" Approved by: jmmv (mentor) Phabric: D630 PR: 192765 Modified: stable/10/usr.sbin/ctld/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ctld/Makefile ============================================================================== --- stable/10/usr.sbin/ctld/Makefile Tue Sep 2 15:49:33 2014 (r270969) +++ stable/10/usr.sbin/ctld/Makefile Tue Sep 2 16:14:16 2014 (r270970) @@ -9,8 +9,8 @@ CFLAGS+= -I${.CURDIR}/../../sys/dev/iscs #CFLAGS+= -DICL_KERNEL_PROXY MAN= ctld.8 ctl.conf.5 -DPADD= ${LIBCAM} ${LIBSBUF} ${LIBBSDXML} ${LIBUTIL} -LDADD= -lbsdxml -lcam -lcrypto -lfl -lsbuf -lssl -lutil +DPADD= ${LIBBSDXML} ${LIBCAM} ${LIBCRYPTO} ${LIBL} ${LIBSBUF} ${LIBSSL} ${LIBUTIL} +LDADD= -lbsdxml -lcam -lcrypto -ll -lsbuf -lssl -lutil YFLAGS+= -v CLEANFILES= y.tab.c y.tab.h y.output From owner-svn-src-stable-10@FreeBSD.ORG Tue Sep 2 18:54:41 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A32A03C4; Tue, 2 Sep 2014 18:54:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 744D11381; Tue, 2 Sep 2014 18:54:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s82Isfxh098224; Tue, 2 Sep 2014 18:54:41 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s82IsffF098222; Tue, 2 Sep 2014 18:54:41 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409021854.s82IsffF098222@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 2 Sep 2014 18:54:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270974 - in stable/10/sys: amd64/include dev/vt/hw/efifb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2014 18:54:41 -0000 Author: emaste Date: Tue Sep 2 18:54:40 2014 New Revision: 270974 URL: http://svnweb.freebsd.org/changeset/base/270974 Log: MFC r263826: Update EFI framebuffer handoff from loader Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/amd64/include/metadata.h stable/10/sys/dev/vt/hw/efifb/efifb.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/include/metadata.h ============================================================================== --- stable/10/sys/amd64/include/metadata.h Tue Sep 2 18:32:41 2014 (r270973) +++ stable/10/sys/amd64/include/metadata.h Tue Sep 2 18:54:40 2014 (r270974) @@ -33,11 +33,24 @@ #define MODINFOMD_SMAP_XATTR 0x1002 #define MODINFOMD_DTBP 0x1003 #define MODINFOMD_EFI_MAP 0x1004 +#define MODINFOMD_EFI_FB 0x1005 -struct efi_map_header { +struct efi_map_header { size_t memory_size; size_t descriptor_size; uint32_t descriptor_version; }; +struct efi_fb { + uint64_t fb_addr; + uint64_t fb_size; + int fb_height; + int fb_width; + int fb_stride; + uint32_t fb_mask_red; + uint32_t fb_mask_green; + uint32_t fb_mask_blue; + uint32_t fb_mask_reserved; +}; + #endif /* !_MACHINE_METADATA_H_ */ Modified: stable/10/sys/dev/vt/hw/efifb/efifb.c ============================================================================== --- stable/10/sys/dev/vt/hw/efifb/efifb.c Tue Sep 2 18:32:41 2014 (r270973) +++ stable/10/sys/dev/vt/hw/efifb/efifb.c Tue Sep 2 18:54:40 2014 (r270974) @@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$"); #include "opt_platform.h" -#include #include #include #include @@ -107,8 +106,8 @@ vt_efifb_init(struct vt_device *vd) kmdp = preload_search_by_type("elf kernel"); if (kmdp == NULL) kmdp = preload_search_by_type("elf64 kernel"); - efifb = (struct efi_fb *)preload_search_info(kmdp, - MODINFO_METADATA | MODINFOMD_EFI_FB); + efifb = (struct efi_fb *)preload_search_info(kmdp, + MODINFO_METADATA | MODINFOMD_EFI_FB); if (efifb == NULL) return (CN_DEAD); From owner-svn-src-stable-10@FreeBSD.ORG Tue Sep 2 19:14:34 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1B8D0EB6; Tue, 2 Sep 2014 19:14:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0728E175E; Tue, 2 Sep 2014 19:14:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s82JEXKI008182; Tue, 2 Sep 2014 19:14:33 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s82JEX8w008181; Tue, 2 Sep 2014 19:14:33 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409021914.s82JEX8w008181@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 2 Sep 2014 19:14:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270977 - stable/10/sys/amd64/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2014 19:14:34 -0000 Author: emaste Date: Tue Sep 2 19:14:33 2014 New Revision: 270977 URL: http://svnweb.freebsd.org/changeset/base/270977 Log: Revert r268372 - enable vt_efifb vt(4) driver again. It was disabled as some parts of UEFI support had not yet been merged to stable/10. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/amd64/conf/GENERIC Modified: stable/10/sys/amd64/conf/GENERIC ============================================================================== --- stable/10/sys/amd64/conf/GENERIC Tue Sep 2 19:05:34 2014 (r270976) +++ stable/10/sys/amd64/conf/GENERIC Tue Sep 2 19:14:33 2014 (r270977) @@ -179,6 +179,7 @@ options SC_PIXEL_MODE # add support fo # vt is the new video console driver device vt device vt_vga +device vt_efifb device agp # support several AGP chipsets From owner-svn-src-stable-10@FreeBSD.ORG Tue Sep 2 19:36:19 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 33E2F6E0; Tue, 2 Sep 2014 19:36:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 052D019C7; Tue, 2 Sep 2014 19:36:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s82JaI3r017767; Tue, 2 Sep 2014 19:36:18 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s82JaIad017766; Tue, 2 Sep 2014 19:36:18 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409021936.s82JaIad017766@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 2 Sep 2014 19:36:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270978 - stable/10/sys/dev/vt/hw/efifb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2014 19:36:19 -0000 Author: emaste Date: Tue Sep 2 19:36:18 2014 New Revision: 270978 URL: http://svnweb.freebsd.org/changeset/base/270978 Log: MFC r268624 by nwhitehorn: On my Lenovo laptop, the firmware maps the EFI framebuffer with MTRRs set to uncacheable. This leads to execrable console performance. Once PMAP is up, remap the framebuffer as write-combining. This reduces boot time on my laptop by 60% when booting with EFI. Modified: stable/10/sys/dev/vt/hw/efifb/efifb.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/vt/hw/efifb/efifb.c ============================================================================== --- stable/10/sys/dev/vt/hw/efifb/efifb.c Tue Sep 2 19:14:33 2014 (r270977) +++ stable/10/sys/dev/vt/hw/efifb/efifb.c Tue Sep 2 19:36:18 2014 (r270978) @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); static vd_init_t vt_efifb_init; static vd_probe_t vt_efifb_probe; +static void vt_efifb_remap(void *efifb_data); static struct vt_driver vt_efifb_driver = { .vd_name = "efifb", @@ -68,6 +69,8 @@ static struct vt_driver vt_efifb_driver static struct fb_info local_info; VT_DRIVER_DECLARE(vt_efifb, vt_efifb_driver); +SYSINIT(efifb_remap, SI_SUB_KMEM, SI_ORDER_ANY, vt_efifb_remap, &local_info); + static int vt_efifb_probe(struct vt_device *vd) { @@ -133,9 +136,9 @@ vt_efifb_init(struct vt_device *vd) info->fb_size = info->fb_height * info->fb_stride; info->fb_pbase = efifb->fb_addr; /* - * We could use pmap_mapdev here except that the kernel pmap - * hasn't been created yet and hence any attempt to lock it will - * fail. + * Use the direct map as a crutch until pmap is available. Once pmap + * is online, the framebuffer will be remapped by vt_efifb_remap() + * using pmap_mapdev_attr(). */ info->fb_vbase = PHYS_TO_DMAP(efifb->fb_addr); @@ -163,3 +166,22 @@ vt_efifb_init(struct vt_device *vd) return (CN_INTERNAL); } + +static void +vt_efifb_remap(void *xinfo) +{ + struct fb_info *info = xinfo; + + if (info->fb_pbase == 0) + return; + + /* + * Remap as write-combining. This massively improves performance and + * happens very early in kernel initialization, when everything is + * still single-threaded and interrupts are off, so replacing the + * mapping address is safe. + */ + info->fb_vbase = (intptr_t)pmap_mapdev_attr(info->fb_pbase, + info->fb_size, VM_MEMATTR_WRITE_COMBINING); +} + From owner-svn-src-stable-10@FreeBSD.ORG Tue Sep 2 19:48:38 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 603AFBD2; Tue, 2 Sep 2014 19:48:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4AE1C1ADD; Tue, 2 Sep 2014 19:48:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s82JmcBE022999; Tue, 2 Sep 2014 19:48:38 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s82JmcVP022998; Tue, 2 Sep 2014 19:48:38 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409021948.s82JmcVP022998@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 2 Sep 2014 19:48:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270979 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2014 19:48:38 -0000 Author: emaste Date: Tue Sep 2 19:48:37 2014 New Revision: 270979 URL: http://svnweb.freebsd.org/changeset/base/270979 Log: MFC part of r267973: remove redundant "" assignment for string in BSS. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/kern/kern_cons.c Modified: stable/10/sys/kern/kern_cons.c ============================================================================== --- stable/10/sys/kern/kern_cons.c Tue Sep 2 19:36:18 2014 (r270978) +++ stable/10/sys/kern/kern_cons.c Tue Sep 2 19:48:37 2014 (r270979) @@ -652,7 +652,7 @@ sysbeep(int pitch __unused, int period _ /* * Temporary support for sc(4) to vt(4) transition. */ -static char vty_name[16] = ""; +static char vty_name[16]; SYSCTL_STRING(_kern, OID_AUTO, vty, CTLFLAG_RDTUN, vty_name, 0, "Console vty driver"); From owner-svn-src-stable-10@FreeBSD.ORG Tue Sep 2 19:56:38 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 92D50E79; Tue, 2 Sep 2014 19:56:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7CF7E1BE0; Tue, 2 Sep 2014 19:56:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s82JucQS027573; Tue, 2 Sep 2014 19:56:38 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s82Jub4G027568; Tue, 2 Sep 2014 19:56:37 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409021956.s82Jub4G027568@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 2 Sep 2014 19:56:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270980 - in stable/10/sys: dev/fb dev/vt/hw/fb sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2014 19:56:38 -0000 Author: emaste Date: Tue Sep 2 19:56:37 2014 New Revision: 270980 URL: http://svnweb.freebsd.org/changeset/base/270980 Log: MFC r268771, r268796 by nwhitehorn: r268771: Allow console drivers active from early boot to be used with xf86-video-scfb, rather than only drivers attached later on. This involves a small amount of code duplication with dev/fb/fbd.c, which will fixed later on. Also improve performance of vt_blank() by making it not read from the framebuffer unnecessarily. r268796: Fix embarassing typos I made. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/fb/fbd.c stable/10/sys/dev/vt/hw/fb/vt_fb.c stable/10/sys/dev/vt/hw/fb/vt_fb.h stable/10/sys/sys/fbio.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/fb/fbd.c ============================================================================== --- stable/10/sys/dev/fb/fbd.c Tue Sep 2 19:48:37 2014 (r270979) +++ stable/10/sys/dev/fb/fbd.c Tue Sep 2 19:56:37 2014 (r270980) @@ -257,9 +257,6 @@ fb_probe(struct fb_info *info) } else if (info->fb_vbase != 0) { if (info->fb_pbase == 0) { info->fb_flags |= FB_FLAG_NOMMAP; - } else { - if (info->fb_mmap == NULL) - info->fb_mmap = &fb_mmap; } info->wr1 = &vt_fb_mem_wr1; info->wr2 = &vt_fb_mem_wr2; @@ -268,10 +265,6 @@ fb_probe(struct fb_info *info) } else return (ENXIO); - if (info->fb_ioctl == NULL) - info->fb_ioctl = &fb_ioctl; - - return (0); } Modified: stable/10/sys/dev/vt/hw/fb/vt_fb.c ============================================================================== --- stable/10/sys/dev/vt/hw/fb/vt_fb.c Tue Sep 2 19:48:37 2014 (r270979) +++ stable/10/sys/dev/vt/hw/fb/vt_fb.c Tue Sep 2 19:56:37 2014 (r270980) @@ -41,10 +41,6 @@ __FBSDID("$FreeBSD$"); #include #include -static int vt_fb_ioctl(struct vt_device *vd, u_long cmd, caddr_t data, - struct thread *td); -static int vt_fb_mmap(struct vt_device *vd, vm_ooffset_t offset, - vm_paddr_t *paddr, int prot, vm_memattr_t *memattr); void vt_fb_drawrect(struct vt_device *vd, int x1, int y1, int x2, int y2, int fill, term_color_t color); void vt_fb_setpixel(struct vt_device *vd, int x, int y, term_color_t color); @@ -65,20 +61,47 @@ static struct vt_driver vt_fb_driver = { VT_DRIVER_DECLARE(vt_fb, vt_fb_driver); -static int +int vt_fb_ioctl(struct vt_device *vd, u_long cmd, caddr_t data, struct thread *td) { struct fb_info *info; + int error = 0; info = vd->vd_softc; - if (info->fb_ioctl == NULL) - return (-1); + switch (cmd) { + case FBIOGTYPE: + bcopy(info, (struct fbtype *)data, sizeof(struct fbtype)); + break; + + case FBIO_GETWINORG: /* get frame buffer window origin */ + *(u_int *)data = 0; + break; + + case FBIO_GETDISPSTART: /* get display start address */ + ((video_display_start_t *)data)->x = 0; + ((video_display_start_t *)data)->y = 0; + break; + + case FBIO_GETLINEWIDTH: /* get scan line width in bytes */ + *(u_int *)data = info->fb_stride; + break; - return (info->fb_ioctl(info->fb_cdev, cmd, data, 0, td)); + case FBIO_BLANK: /* blank display */ + if (vd->vd_driver->vd_blank == NULL) + return (ENODEV); + vd->vd_driver->vd_blank(vd, TC_BLACK); + break; + + default: + error = ENOIOCTL; + break; + } + + return (error); } -static int +int vt_fb_mmap(struct vt_device *vd, vm_ooffset_t offset, vm_paddr_t *paddr, int prot, vm_memattr_t *memattr) { @@ -86,10 +109,18 @@ vt_fb_mmap(struct vt_device *vd, vm_ooff info = vd->vd_softc; - if (info->fb_ioctl == NULL) - return (ENXIO); + if (info->fb_flags & FB_FLAG_NOMMAP) + return (ENODEV); - return (info->fb_mmap(info->fb_cdev, offset, paddr, prot, memattr)); + if (offset >= 0 && offset < info->fb_size) { + *paddr = info->fb_pbase + offset; + #ifdef VM_MEMATTR_WRITE_COMBINING + *memattr = VM_MEMATTR_WRITE_COMBINING; + #endif + return (0); + } + + return (EINVAL); } void @@ -147,41 +178,42 @@ vt_fb_blank(struct vt_device *vd, term_c { struct fb_info *info; uint32_t c; - u_int o; + u_int o, h; info = vd->vd_softc; c = info->fb_cmap[color]; switch (FBTYPE_GET_BYTESPP(info)) { case 1: - for (o = 0; o < info->fb_stride; o++) - info->wr1(info, o, c); + for (h = 0; h < info->fb_height; h++) + for (o = 0; o < info->fb_stride; o++) + info->wr1(info, h*info->fb_stride + o, c); break; case 2: - for (o = 0; o < info->fb_stride; o += 2) - info->wr2(info, o, c); + for (h = 0; h < info->fb_height; h++) + for (o = 0; o < info->fb_stride; o += 2) + info->wr2(info, h*info->fb_stride + o, c); break; case 3: - /* line 0 */ - for (o = 0; o < info->fb_stride; o += 3) { - info->wr1(info, o, (c >> 16) & 0xff); - info->wr1(info, o + 1, (c >> 8) & 0xff); - info->wr1(info, o + 2, c & 0xff); - } + for (h = 0; h < info->fb_height; h++) + for (o = 0; o < info->fb_stride; o += 3) { + info->wr1(info, h*info->fb_stride + o, + (c >> 16) & 0xff); + info->wr1(info, h*info->fb_stride + o + 1, + (c >> 8) & 0xff); + info->wr1(info, h*info->fb_stride + o + 2, + c & 0xff); + } break; case 4: - for (o = 0; o < info->fb_stride; o += 4) - info->wr4(info, o, c); + for (h = 0; h < info->fb_height; h++) + for (o = 0; o < info->fb_stride; o += 4) + info->wr4(info, h*info->fb_stride + o, c); break; default: /* panic? */ return; } - /* Copy line0 to all other lines. */ - /* XXX will copy with borders. */ - for (o = info->fb_stride; o < info->fb_size; o += info->fb_stride) { - info->copy(info, o, 0, info->fb_stride); - } } void Modified: stable/10/sys/dev/vt/hw/fb/vt_fb.h ============================================================================== --- stable/10/sys/dev/vt/hw/fb/vt_fb.h Tue Sep 2 19:48:37 2014 (r270979) +++ stable/10/sys/dev/vt/hw/fb/vt_fb.h Tue Sep 2 19:56:37 2014 (r270980) @@ -43,5 +43,7 @@ vd_blank_t vt_fb_blank; vd_bitbltchr_t vt_fb_bitbltchr; vd_maskbitbltchr_t vt_fb_maskbitbltchr; vd_postswitch_t vt_fb_postswitch; +vd_fb_ioctl_t vt_fb_ioctl; +vd_fb_mmap_t vt_fb_mmap; #endif /* _DEV_VT_HW_FB_VT_FB_H_ */ Modified: stable/10/sys/sys/fbio.h ============================================================================== --- stable/10/sys/sys/fbio.h Tue Sep 2 19:48:37 2014 (r270979) +++ stable/10/sys/sys/fbio.h Tue Sep 2 19:56:37 2014 (r270980) @@ -141,8 +141,6 @@ struct fb_info { /* Methods. */ fb_write_t *fb_write; /* if NULL, direct mem write. */ fb_read_t *fb_read; /* if NULL, direct mem read. */ - fb_ioctl_t *fb_ioctl; /* Can be NULL. */ - fb_mmap_t *fb_mmap; /* Can be NULL. */ struct cdev *fb_cdev; From owner-svn-src-stable-10@FreeBSD.ORG Tue Sep 2 19:57:33 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E41ECFB3; Tue, 2 Sep 2014 19:57:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF7061BEC; Tue, 2 Sep 2014 19:57:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s82JvXqT027750; Tue, 2 Sep 2014 19:57:33 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s82JvXXi027749; Tue, 2 Sep 2014 19:57:33 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409021957.s82JvXXi027749@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 2 Sep 2014 19:57:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270981 - stable/10/sys/dev/vt/hw/efifb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2014 19:57:34 -0000 Author: emaste Date: Tue Sep 2 19:57:33 2014 New Revision: 270981 URL: http://svnweb.freebsd.org/changeset/base/270981 Log: MFC r268772 by nwhitehorn: Allow efifb to be used with xf86-video-scfb. This is important for EFI systems without either a CSM or real graphics drivers, such as my Lenovo Haswell laptop. This provides working X with the small complication of a console cursor permanently overlaid on the upper-left corner of the screen that will be dealt with later. Also remove some redundant screen clearing. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/vt/hw/efifb/efifb.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/vt/hw/efifb/efifb.c ============================================================================== --- stable/10/sys/dev/vt/hw/efifb/efifb.c Tue Sep 2 19:56:37 2014 (r270980) +++ stable/10/sys/dev/vt/hw/efifb/efifb.c Tue Sep 2 19:57:33 2014 (r270981) @@ -62,6 +62,8 @@ static struct vt_driver vt_efifb_driver .vd_blank = vt_fb_blank, .vd_bitbltchr = vt_fb_bitbltchr, .vd_maskbitbltchr = vt_fb_maskbitbltchr, + .vd_fb_ioctl = vt_fb_ioctl, + .vd_fb_mmap = vt_fb_mmap, /* Better than VGA, but still generic driver. */ .vd_priority = VD_PRIORITY_GENERIC + 1, }; @@ -97,7 +99,7 @@ vt_efifb_probe(struct vt_device *vd) static int vt_efifb_init(struct vt_device *vd) { - int depth, d, i, len; + int depth, d; struct fb_info *info; struct efi_fb *efifb; caddr_t kmdp; @@ -142,12 +144,6 @@ vt_efifb_init(struct vt_device *vd) */ info->fb_vbase = PHYS_TO_DMAP(efifb->fb_addr); - /* blank full size */ - len = info->fb_size / 4; - for (i = 0; i < len; i++) { - ((uint32_t *)info->fb_vbase)[i] = 0; - } - /* Get pixel storage size. */ info->fb_bpp = info->fb_stride / info->fb_width * 8; From owner-svn-src-stable-10@FreeBSD.ORG Tue Sep 2 21:05:46 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 662A94D8; Tue, 2 Sep 2014 21:05:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 376E41356; Tue, 2 Sep 2014 21:05:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s82L5kcn061079; Tue, 2 Sep 2014 21:05:46 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s82L5jSL061076; Tue, 2 Sep 2014 21:05:45 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409022105.s82L5jSL061076@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 2 Sep 2014 21:05:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270983 - stable/10/sys/dev/vt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2014 21:05:46 -0000 Author: emaste Date: Tue Sep 2 21:05:45 2014 New Revision: 270983 URL: http://svnweb.freebsd.org/changeset/base/270983 Log: MFC r269185 by ray@: Remove unused macro VT_CONSDEV_DECLARE. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/vt/vt.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/vt/vt.h ============================================================================== --- stable/10/sys/dev/vt/vt.h Tue Sep 2 20:46:18 2014 (r270982) +++ stable/10/sys/dev/vt/vt.h Tue Sep 2 21:05:45 2014 (r270983) @@ -348,54 +348,6 @@ void vt_upgrade(struct vt_device *vd); #define VT_FB_DEFAULT_HEIGHT 1200 #endif -#define VT_CONSDEV_DECLARE(driver, width, height, softc) \ -static struct terminal driver ## _consterm; \ -static struct vt_window driver ## _conswindow; \ -static struct vt_device driver ## _consdev = { \ - .vd_driver = &driver, \ - .vd_softc = (softc), \ - .vd_flags = VDF_INVALID, \ - .vd_windows = { [VT_CONSWINDOW] = &driver ## _conswindow, }, \ - .vd_curwindow = &driver ## _conswindow, \ - .vd_markedwin = NULL, \ - .vd_kbstate = 0, \ -}; \ -static term_char_t driver ## _constextbuf[(width) * \ - (VBF_DEFAULT_HISTORY_SIZE)]; \ -static term_char_t *driver ## _constextbufrows[ \ - VBF_DEFAULT_HISTORY_SIZE]; \ -static struct vt_window driver ## _conswindow = { \ - .vw_number = VT_CONSWINDOW, \ - .vw_flags = VWF_CONSOLE, \ - .vw_buf = { \ - .vb_buffer = driver ## _constextbuf, \ - .vb_rows = driver ## _constextbufrows, \ - .vb_history_size = VBF_DEFAULT_HISTORY_SIZE, \ - .vb_curroffset = 0, \ - .vb_roffset = 0, \ - .vb_flags = VBF_STATIC, \ - .vb_mark_start = { \ - .tp_row = 0, \ - .tp_col = 0, \ - }, \ - .vb_mark_end = { \ - .tp_row = 0, \ - .tp_col = 0, \ - }, \ - .vb_scr_size = { \ - .tp_row = height, \ - .tp_col = width, \ - }, \ - }, \ - .vw_device = &driver ## _consdev, \ - .vw_terminal = &driver ## _consterm, \ - .vw_kbdmode = K_XLATE, \ -}; \ -TERMINAL_DECLARE_EARLY(driver ## _consterm, vt_termclass, \ - &driver ## _conswindow); \ -SYSINIT(vt_early_cons, SI_SUB_INT_CONFIG_HOOKS, SI_ORDER_ANY, \ - vt_upgrade, &driver ## _consdev) - /* name argument is not used yet. */ #define VT_DRIVER_DECLARE(name, drv) DATA_SET(vt_drv_set, drv) From owner-svn-src-stable-10@FreeBSD.ORG Tue Sep 2 21:50:15 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 52D5C290; Tue, 2 Sep 2014 21:50:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3DF961941; Tue, 2 Sep 2014 21:50:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s82LoFDa081578; Tue, 2 Sep 2014 21:50:15 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s82LoFMQ081577; Tue, 2 Sep 2014 21:50:15 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409022150.s82LoFMQ081577@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 2 Sep 2014 21:50:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270986 - stable/10/sys/dev/vt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2014 21:50:15 -0000 Author: emaste Date: Tue Sep 2 21:50:14 2014 New Revision: 270986 URL: http://svnweb.freebsd.org/changeset/base/270986 Log: MFC r269186 by ray@: Remove useless debug string. Fix indent. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/vt/vt_core.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/vt/vt_core.c ============================================================================== --- stable/10/sys/dev/vt/vt_core.c Tue Sep 2 21:49:02 2014 (r270985) +++ stable/10/sys/dev/vt/vt_core.c Tue Sep 2 21:50:14 2014 (r270986) @@ -2025,9 +2025,8 @@ vt_upgrade(struct vt_device *vd) vd->vd_curwindow = vd->vd_windows[VT_CONSWINDOW]; if (!(vd->vd_flags & VDF_ASYNC)) { - /* Attach keyboard. */ - vt_allocate_keyboard(vd); - DPRINTF(20, "%s: vd_keyboard = %d\n", __func__, vd->vd_keyboard); + /* Attach keyboard. */ + vt_allocate_keyboard(vd); /* Init 25 Hz timer. */ callout_init_mtx(&vd->vd_timer, &vd->vd_lock, 0); From owner-svn-src-stable-10@FreeBSD.ORG Tue Sep 2 22:01:15 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BE4EEDB0; Tue, 2 Sep 2014 22:01:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9EA9E1AEB; Tue, 2 Sep 2014 22:01:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s82M1F3Y087487; Tue, 2 Sep 2014 22:01:15 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s82M1F4e087482; Tue, 2 Sep 2014 22:01:15 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409022201.s82M1F4e087482@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 2 Sep 2014 22:01:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270988 - in stable/10/sys: amd64/amd64 kern sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2014 22:01:16 -0000 Author: emaste Date: Tue Sep 2 22:01:14 2014 New Revision: 270988 URL: http://svnweb.freebsd.org/changeset/base/270988 Log: MFC automatic vt(4) selection for UEFI boot r268158: Prefer vt(4) for UEFI boot The UEFI framebuffer driver vt_efifb requires vt(4), so add a mechanism for the startup routine to set the preferred console. This change is ugly because console init happens very early in the boot, making a cleaner interface difficult. This change is intended only to facilitate the sc(4) / vt(4) transition, and can be reverted once vt(4) is the default. r268160: Fix typos in VTY constant names from r268158 r268982: Don't pass null kmdp to preload_search_info On Xen PVH guests kmdp == NULL. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/amd64/amd64/machdep.c stable/10/sys/kern/kern_cons.c stable/10/sys/sys/cons.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/machdep.c ============================================================================== --- stable/10/sys/amd64/amd64/machdep.c Tue Sep 2 21:59:24 2014 (r270987) +++ stable/10/sys/amd64/amd64/machdep.c Tue Sep 2 22:01:14 2014 (r270988) @@ -1909,6 +1909,14 @@ hammer_time(u_int64_t modulep, u_int64_t i8254_init(); /* + * Use vt(4) by default for UEFI boot (during the sc(4)/vt(4) + * transition). + */ + if (kmdp != NULL && preload_search_info(kmdp, + MODINFO_METADATA | MODINFOMD_EFI_MAP) != NULL) + vty_set_preferred(VTY_VT); + + /* * Initialize the console before we print anything out. */ cninit(); Modified: stable/10/sys/kern/kern_cons.c ============================================================================== --- stable/10/sys/kern/kern_cons.c Tue Sep 2 21:59:24 2014 (r270987) +++ stable/10/sys/kern/kern_cons.c Tue Sep 2 22:01:14 2014 (r270988) @@ -652,6 +652,7 @@ sysbeep(int pitch __unused, int period _ /* * Temporary support for sc(4) to vt(4) transition. */ +static unsigned vty_prefer; static char vty_name[16]; SYSCTL_STRING(_kern, OID_AUTO, vty, CTLFLAG_RDTUN, vty_name, 0, "Console vty driver"); @@ -676,6 +677,10 @@ vty_enabled(unsigned vty) break; } #endif + if (vty_prefer != 0) { + vty_selected = vty_prefer; + break; + } #if defined(DEV_SC) vty_selected = VTY_SC; #elif defined(DEV_VT) @@ -691,3 +696,16 @@ vty_enabled(unsigned vty) return ((vty_selected & vty) != 0); } +void +vty_set_preferred(unsigned vty) +{ + + vty_prefer = vty; +#if !defined(DEV_SC) + vty_prefer &= ~VTY_SC; +#endif +#if !defined(DEV_VT) + vty_prefer &= ~VTY_VT; +#endif +} + Modified: stable/10/sys/sys/cons.h ============================================================================== --- stable/10/sys/sys/cons.h Tue Sep 2 21:59:24 2014 (r270987) +++ stable/10/sys/sys/cons.h Tue Sep 2 22:01:14 2014 (r270988) @@ -137,6 +137,7 @@ void constty_clear(void); #define VTY_SC 0x01 #define VTY_VT 0x02 int vty_enabled(unsigned int); +void vty_set_preferred(unsigned int); #endif /* _KERNEL */ From owner-svn-src-stable-10@FreeBSD.ORG Wed Sep 3 06:47:06 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 913579A1; Wed, 3 Sep 2014 06:47:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 62E7615A1; Wed, 3 Sep 2014 06:47:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s836l6fC042382; Wed, 3 Sep 2014 06:47:06 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s836l6ew042380; Wed, 3 Sep 2014 06:47:06 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201409030647.s836l6ew042380@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Wed, 3 Sep 2014 06:47:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270995 - stable/10/sys/vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 06:47:06 -0000 Author: alc Date: Wed Sep 3 06:47:05 2014 New Revision: 270995 URL: http://svnweb.freebsd.org/changeset/base/270995 Log: MFC r270666 Back in the days when the kernel was single threaded, testing "vm_paging_target() > 0" was a reasonable way of determining if the inactive queue scan met its target. However, now that other threads can be allocating pages while the inactive queue scan is running, it's an unreliable method. The effect of it being unreliable is that we can start swapping out processes when we didn't intend to. This issue has existed since the kernel was multithreaded, but the changes to the inactive queue target in 10.0-RELEASE have made its effects visible. This change introduces a more direct method for determining if the inactive queue scan met its target that is not affected by the actions of other threads. Modified: stable/10/sys/vm/vm_pageout.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_pageout.c ============================================================================== --- stable/10/sys/vm/vm_pageout.c Wed Sep 3 06:34:16 2014 (r270994) +++ stable/10/sys/vm/vm_pageout.c Wed Sep 3 06:47:05 2014 (r270995) @@ -1308,6 +1308,23 @@ relock_queues: } vm_pagequeue_unlock(pq); +#if !defined(NO_SWAPPING) + /* + * Wakeup the swapout daemon if we didn't cache or free the targeted + * number of pages. + */ + if (vm_swap_enabled && page_shortage > 0) + vm_req_vmdaemon(VM_SWAP_NORMAL); +#endif + + /* + * Wakeup the sync daemon if we skipped a vnode in a writeable object + * and we didn't cache or free enough pages. + */ + if (vnodes_skipped > 0 && page_shortage > vm_cnt.v_free_target - + vm_cnt.v_free_min) + (void)speedup_syncer(); + /* * Compute the number of pages we want to try to move from the * active queue to the inactive queue. @@ -1418,20 +1435,6 @@ relock_queues: } } #endif - - /* - * If we didn't get enough free pages, and we have skipped a vnode - * in a writeable object, wakeup the sync daemon. And kick swapout - * if we did not get enough free pages. - */ - if (vm_paging_target() > 0) { - if (vnodes_skipped && vm_page_count_min()) - (void) speedup_syncer(); -#if !defined(NO_SWAPPING) - if (vm_swap_enabled && vm_page_count_target()) - vm_req_vmdaemon(VM_SWAP_NORMAL); -#endif - } /* * If we are critically low on one of RAM or swap and low on From owner-svn-src-stable-10@FreeBSD.ORG Wed Sep 3 07:20:10 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C686011C; Wed, 3 Sep 2014 07:20:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B1ABE19C4; Wed, 3 Sep 2014 07:20:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s837KA13056734; Wed, 3 Sep 2014 07:20:10 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s837KAQm056733; Wed, 3 Sep 2014 07:20:10 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201409030720.s837KAQm056733@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Wed, 3 Sep 2014 07:20:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270996 - stable/10/sys/vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 07:20:10 -0000 Author: alc Date: Wed Sep 3 07:20:09 2014 New Revision: 270996 URL: http://svnweb.freebsd.org/changeset/base/270996 Log: This is a direct commit to account for the renaming of 'cnt' to 'vm_cnt' in HEAD but not stable/10. Modified: stable/10/sys/vm/vm_pageout.c Modified: stable/10/sys/vm/vm_pageout.c ============================================================================== --- stable/10/sys/vm/vm_pageout.c Wed Sep 3 06:47:05 2014 (r270995) +++ stable/10/sys/vm/vm_pageout.c Wed Sep 3 07:20:09 2014 (r270996) @@ -1321,8 +1321,8 @@ relock_queues: * Wakeup the sync daemon if we skipped a vnode in a writeable object * and we didn't cache or free enough pages. */ - if (vnodes_skipped > 0 && page_shortage > vm_cnt.v_free_target - - vm_cnt.v_free_min) + if (vnodes_skipped > 0 && page_shortage > cnt.v_free_target - + cnt.v_free_min) (void)speedup_syncer(); /* From owner-svn-src-stable-10@FreeBSD.ORG Wed Sep 3 08:03:27 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 77DCBAA3; Wed, 3 Sep 2014 08:03:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 62C931E36; Wed, 3 Sep 2014 08:03:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8383RxS079227; Wed, 3 Sep 2014 08:03:27 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8383Rt2079226; Wed, 3 Sep 2014 08:03:27 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201409030803.s8383Rt2079226@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 3 Sep 2014 08:03:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270997 - stable/10/rescue/rescue X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 08:03:27 -0000 Author: delphij Date: Wed Sep 3 08:03:26 2014 New Revision: 270997 URL: http://svnweb.freebsd.org/changeset/base/270997 Log: MFC r270189: Add zdb into rescue environment. On amd64, this would increase the binary size by 1.1MiB and make it possible to examine zpool status offline, useful for recovery and diagnostic purposes. Submitted by: sef Obtained from: FreeNAS Modified: stable/10/rescue/rescue/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/rescue/rescue/Makefile ============================================================================== --- stable/10/rescue/rescue/Makefile Wed Sep 3 07:20:09 2014 (r270996) +++ stable/10/rescue/rescue/Makefile Wed Sep 3 08:03:26 2014 (r270997) @@ -113,6 +113,7 @@ CRUNCH_PROGS_sbin+= ipf .if ${MK_ZFS} != "no" CRUNCH_PROGS_sbin+= zfs CRUNCH_PROGS_sbin+= zpool +CRUNCH_PROGS_usr.sbin+= zdb .endif # crunchgen does not like C++ programs; this should be fixed someday @@ -123,7 +124,7 @@ CRUNCH_LIBS+= -lalias -lcam -lcurses -ld CRUNCH_LIBS+= -lipx .endif .if ${MK_ZFS} != "no" -CRUNCH_LIBS+= -lavl -lzfs_core -lzfs -lnvpair -lpthread -luutil -lumem +CRUNCH_LIBS+= -lavl -lzpool -lzfs_core -lzfs -lnvpair -lpthread -luutil -lumem .endif CRUNCH_LIBS+= -lgeom -lbsdxml -lkiconv .if ${MK_OPENSSL} == "no" @@ -165,6 +166,7 @@ CRUNCH_SRCDIR_ipf= $(.CURDIR)/../../sbin .if ${MK_ZFS} != "no" CRUNCH_SRCDIR_zfs= ${.CURDIR}/../../cddl/sbin/zfs CRUNCH_SRCDIR_zpool= ${.CURDIR}/../../cddl/sbin/zpool +CRUNCH_SRCDIR_zdb= ${.CURDIR}/../../cddl/usr.sbin/zdb .endif CRUNCH_ALIAS_reboot= fastboot halt fasthalt CRUNCH_ALIAS_restore= rrestore @@ -215,7 +217,7 @@ CRUNCH_ALIAS_id= groups whoami # CRUNCH_SRCDIRS+= usr.sbin -CRUNCH_PROGS_usr.sbin= chroot +CRUNCH_PROGS_usr.sbin+= chroot CRUNCH_PROGS_usr.sbin+= chown CRUNCH_ALIAS_chown= chgrp From owner-svn-src-stable-10@FreeBSD.ORG Wed Sep 3 08:13:47 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E95CFE80; Wed, 3 Sep 2014 08:13:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D3E741F1F; Wed, 3 Sep 2014 08:13:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s838DlFN084137; Wed, 3 Sep 2014 08:13:47 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s838Dlvm084132; Wed, 3 Sep 2014 08:13:47 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201409030813.s838Dlvm084132@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 3 Sep 2014 08:13:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270998 - in stable/10/sys/cddl/contrib/opensolaris/uts/common: dtrace os sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 08:13:48 -0000 Author: delphij Date: Wed Sep 3 08:13:46 2014 New Revision: 270998 URL: http://svnweb.freebsd.org/changeset/base/270998 Log: MFC r270239: MFV r270193: Illumos issues: 5042 stop using deprecated atomic functions Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/systrace.c stable/10/sys/cddl/contrib/opensolaris/uts/common/os/fm.c stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/bitmap.h stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/cpuvar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/systrace.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/systrace.c Wed Sep 3 08:03:26 2014 (r270997) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/systrace.c Wed Sep 3 08:13:46 2014 (r270998) @@ -165,11 +165,11 @@ systrace_enable(void *arg, dtrace_id_t i return; } - (void) casptr(&sysent[sysnum].sy_callc, + (void) atomic_cas_ptr(&sysent[sysnum].sy_callc, (void *)systrace_sysent[sysnum].stsy_underlying, (void *)dtrace_systrace_syscall); #ifdef _SYSCALL32_IMPL - (void) casptr(&sysent32[sysnum].sy_callc, + (void) atomic_cas_ptr(&sysent32[sysnum].sy_callc, (void *)systrace_sysent32[sysnum].stsy_underlying, (void *)dtrace_systrace_syscall32); #endif @@ -184,12 +184,12 @@ systrace_disable(void *arg, dtrace_id_t systrace_sysent[sysnum].stsy_return == DTRACE_IDNONE); if (disable) { - (void) casptr(&sysent[sysnum].sy_callc, + (void) atomic_cas_ptr(&sysent[sysnum].sy_callc, (void *)dtrace_systrace_syscall, (void *)systrace_sysent[sysnum].stsy_underlying); #ifdef _SYSCALL32_IMPL - (void) casptr(&sysent32[sysnum].sy_callc, + (void) atomic_cas_ptr(&sysent32[sysnum].sy_callc, (void *)dtrace_systrace_syscall32, (void *)systrace_sysent32[sysnum].stsy_underlying); #endif Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/os/fm.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/os/fm.c Wed Sep 3 08:03:26 2014 (r270997) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/os/fm.c Wed Sep 3 08:13:46 2014 (r270998) @@ -379,7 +379,7 @@ fm_panic(const char *format, ...) { va_list ap; - (void) casptr((void *)&fm_panicstr, NULL, (void *)format); + (void) atomic_cas_ptr((void *)&fm_panicstr, NULL, (void *)format); #if defined(__i386) || defined(__amd64) fastreboot_disable_highpil(); #endif /* __i386 || __amd64 */ Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/bitmap.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/bitmap.h Wed Sep 3 08:03:26 2014 (r270997) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/bitmap.h Wed Sep 3 08:13:46 2014 (r270998) @@ -171,9 +171,9 @@ extern int odd_parity(ulong_t); * to 0 otherwise. */ #define BT_ATOMIC_SET(bitmap, bitindex) \ - { atomic_or_long(&(BT_WIM(bitmap, bitindex)), BT_BIW(bitindex)); } + { atomic_or_ulong(&(BT_WIM(bitmap, bitindex)), BT_BIW(bitindex)); } #define BT_ATOMIC_CLEAR(bitmap, bitindex) \ - { atomic_and_long(&(BT_WIM(bitmap, bitindex)), ~BT_BIW(bitindex)); } + { atomic_and_ulong(&(BT_WIM(bitmap, bitindex)), ~BT_BIW(bitindex)); } #define BT_ATOMIC_SET_EXCL(bitmap, bitindex, result) \ { result = atomic_set_long_excl(&(BT_WIM(bitmap, bitindex)), \ Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/cpuvar.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/cpuvar.h Wed Sep 3 08:03:26 2014 (r270997) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/cpuvar.h Wed Sep 3 08:13:46 2014 (r270998) @@ -524,8 +524,8 @@ typedef ulong_t cpuset_t; /* a set of CP largest = (uint_t)(highbit(set) - 1); \ } -#define CPUSET_ATOMIC_DEL(set, cpu) atomic_and_long(&(set), ~CPUSET(cpu)) -#define CPUSET_ATOMIC_ADD(set, cpu) atomic_or_long(&(set), CPUSET(cpu)) +#define CPUSET_ATOMIC_DEL(set, cpu) atomic_and_ulong(&(set), ~CPUSET(cpu)) +#define CPUSET_ATOMIC_ADD(set, cpu) atomic_or_ulong(&(set), CPUSET(cpu)) #define CPUSET_ATOMIC_XADD(set, cpu, result) \ { result = atomic_set_long_excl(&(set), (cpu)); } From owner-svn-src-stable-10@FreeBSD.ORG Wed Sep 3 08:18:12 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 37EDA38F; Wed, 3 Sep 2014 08:18:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 205AB1F4A; Wed, 3 Sep 2014 08:18:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s838ICSE084899; Wed, 3 Sep 2014 08:18:12 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s838I9ni084887; Wed, 3 Sep 2014 08:18:09 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201409030818.s838I9ni084887@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 3 Sep 2014 08:18:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271001 - in stable/10/sys/cddl/contrib/opensolaris/uts: common/dtrace common/fs/zfs common/fs/zfs/sys common/os sparc/dtrace X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 08:18:12 -0000 Author: delphij Date: Wed Sep 3 08:18:09 2014 New Revision: 271001 URL: http://svnweb.freebsd.org/changeset/base/271001 Log: MFC r270247: MFV r270195: Illumos issue: 5045 use atomic_{inc,dec}_* instead of atomic_add_* Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/profile.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/refcount.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_cache.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_inject.c stable/10/sys/cddl/contrib/opensolaris/uts/common/os/fm.c stable/10/sys/cddl/contrib/opensolaris/uts/sparc/dtrace/fasttrap_isa.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Wed Sep 3 08:18:07 2014 (r271000) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Wed Sep 3 08:18:09 2014 (r271001) @@ -1467,7 +1467,7 @@ fasttrap_proc_lookup(pid_t pid) mutex_enter(&fprc->ftpc_mtx); mutex_exit(&bucket->ftb_mtx); fprc->ftpc_rcount++; - atomic_add_64(&fprc->ftpc_acount, 1); + atomic_inc_64(&fprc->ftpc_acount); ASSERT(fprc->ftpc_acount <= fprc->ftpc_rcount); mutex_exit(&fprc->ftpc_mtx); @@ -1501,7 +1501,7 @@ fasttrap_proc_lookup(pid_t pid) mutex_enter(&fprc->ftpc_mtx); mutex_exit(&bucket->ftb_mtx); fprc->ftpc_rcount++; - atomic_add_64(&fprc->ftpc_acount, 1); + atomic_inc_64(&fprc->ftpc_acount); ASSERT(fprc->ftpc_acount <= fprc->ftpc_rcount); mutex_exit(&fprc->ftpc_mtx); @@ -1738,7 +1738,7 @@ fasttrap_provider_free(fasttrap_provider * count of active providers on the associated process structure. */ if (!provider->ftp_retired) { - atomic_add_64(&provider->ftp_proc->ftpc_acount, -1); + atomic_dec_64(&provider->ftp_proc->ftpc_acount); ASSERT(provider->ftp_proc->ftpc_acount < provider->ftp_proc->ftpc_rcount); } @@ -1814,7 +1814,7 @@ fasttrap_provider_retire(pid_t pid, cons * bucket lock therefore protects the integrity of the provider hash * table. */ - atomic_add_64(&fp->ftp_proc->ftpc_acount, -1); + atomic_dec_64(&fp->ftp_proc->ftpc_acount); ASSERT(fp->ftp_proc->ftpc_acount < fp->ftp_proc->ftpc_rcount); fp->ftp_retired = 1; @@ -1910,10 +1910,10 @@ fasttrap_add_probe(fasttrap_probe_spec_t pdata->ftps_mod, pdata->ftps_func, name_str) != 0) continue; - atomic_add_32(&fasttrap_total, 1); + atomic_inc_32(&fasttrap_total); if (fasttrap_total > fasttrap_max) { - atomic_add_32(&fasttrap_total, -1); + atomic_dec_32(&fasttrap_total); goto no_mem; } Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/profile.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/profile.c Wed Sep 3 08:18:07 2014 (r271000) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/profile.c Wed Sep 3 08:18:09 2014 (r271001) @@ -169,9 +169,9 @@ profile_create(hrtime_t interval, const if (dtrace_probe_lookup(profile_id, NULL, NULL, name) != 0) return; - atomic_add_32(&profile_total, 1); + atomic_inc_32(&profile_total); if (profile_total > profile_max) { - atomic_add_32(&profile_total, -1); + atomic_dec_32(&profile_total); return; } @@ -326,7 +326,7 @@ profile_destroy(void *arg, dtrace_id_t i kmem_free(prof, sizeof (profile_probe_t)); ASSERT(profile_total >= 1); - atomic_add_32(&profile_total, -1); + atomic_dec_32(&profile_total); } /*ARGSUSED*/ Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Wed Sep 3 08:18:07 2014 (r271000) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Wed Sep 3 08:18:09 2014 (r271001) @@ -176,7 +176,7 @@ dbuf_hash_insert(dmu_buf_impl_t *db) db->db_hash_next = h->hash_table[idx]; h->hash_table[idx] = db; mutex_exit(DBUF_HASH_MUTEX(h, idx)); - atomic_add_64(&dbuf_hash_count, 1); + atomic_inc_64(&dbuf_hash_count); return (NULL); } @@ -210,7 +210,7 @@ dbuf_hash_remove(dmu_buf_impl_t *db) *dbp = db->db_hash_next; db->db_hash_next = NULL; mutex_exit(DBUF_HASH_MUTEX(h, idx)); - atomic_add_64(&dbuf_hash_count, -1); + atomic_dec_64(&dbuf_hash_count); } static arc_evict_func_t dbuf_do_evict; Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Wed Sep 3 08:18:07 2014 (r271000) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Wed Sep 3 08:18:09 2014 (r271001) @@ -1873,9 +1873,9 @@ spa_load_verify_done(zio_t *zio) if (error) { if ((BP_GET_LEVEL(bp) != 0 || DMU_OT_IS_METADATA(type)) && type != DMU_OT_INTENT_LOG) - atomic_add_64(&sle->sle_meta_count, 1); + atomic_inc_64(&sle->sle_meta_count); else - atomic_add_64(&sle->sle_data_count, 1); + atomic_inc_64(&sle->sle_data_count); } zio_data_buf_free(zio->io_data, zio->io_size); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/refcount.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/refcount.h Wed Sep 3 08:18:07 2014 (r271000) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/refcount.h Wed Sep 3 08:18:09 2014 (r271001) @@ -89,8 +89,8 @@ typedef struct refcount { #define refcount_destroy_many(rc, number) ((rc)->rc_count = 0) #define refcount_is_zero(rc) ((rc)->rc_count == 0) #define refcount_count(rc) ((rc)->rc_count) -#define refcount_add(rc, holder) atomic_add_64_nv(&(rc)->rc_count, 1) -#define refcount_remove(rc, holder) atomic_add_64_nv(&(rc)->rc_count, -1) +#define refcount_add(rc, holder) atomic_inc_64_nv(&(rc)->rc_count) +#define refcount_remove(rc, holder) atomic_dec_64_nv(&(rc)->rc_count) #define refcount_add_many(rc, number, holder) \ atomic_add_64_nv(&(rc)->rc_count, number) #define refcount_remove_many(rc, number, holder) \ Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_cache.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_cache.c Wed Sep 3 08:18:07 2014 (r271000) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_cache.c Wed Sep 3 08:18:09 2014 (r271001) @@ -114,7 +114,7 @@ static vdc_stats_t vdc_stats = { { "misses", KSTAT_DATA_UINT64 } }; -#define VDCSTAT_BUMP(stat) atomic_add_64(&vdc_stats.stat.value.ui64, 1); +#define VDCSTAT_BUMP(stat) atomic_inc_64(&vdc_stats.stat.value.ui64); static int vdev_cache_offset_compare(const void *a1, const void *a2) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c Wed Sep 3 08:18:07 2014 (r271000) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c Wed Sep 3 08:18:09 2014 (r271001) @@ -992,7 +992,7 @@ vdev_uberblock_sync_done(zio_t *zio) uint64_t *good_writes = zio->io_private; if (zio->io_error == 0 && zio->io_vd->vdev_top->vdev_ms_array != 0) - atomic_add_64(good_writes, 1); + atomic_inc_64(good_writes); } /* @@ -1067,7 +1067,7 @@ vdev_label_sync_done(zio_t *zio) uint64_t *good_writes = zio->io_private; if (zio->io_error == 0) - atomic_add_64(good_writes, 1); + atomic_inc_64(good_writes); } /* Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Wed Sep 3 08:18:07 2014 (r271000) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Wed Sep 3 08:18:09 2014 (r271001) @@ -1234,7 +1234,7 @@ out: dmu_objset_disown(zfsvfs->z_os, zfsvfs); zfsvfs_free(zfsvfs); } else { - atomic_add_32(&zfs_active_fs_count, 1); + atomic_inc_32(&zfs_active_fs_count); } return (error); @@ -2325,7 +2325,7 @@ zfs_freevfs(vfs_t *vfsp) zfsvfs_free(zfsvfs); - atomic_add_32(&zfs_active_fs_count, -1); + atomic_dec_32(&zfs_active_fs_count); } #ifdef __i386__ Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_inject.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_inject.c Wed Sep 3 08:18:07 2014 (r271000) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_inject.c Wed Sep 3 08:18:09 2014 (r271001) @@ -426,7 +426,7 @@ zio_inject_fault(char *name, int flags, handler->zi_spa = spa; handler->zi_record = *record; list_insert_tail(&inject_handlers, handler); - atomic_add_32(&zio_injection_enabled, 1); + atomic_inc_32(&zio_injection_enabled); rw_exit(&inject_lock); } @@ -503,7 +503,7 @@ zio_clear_fault(int id) spa_inject_delref(handler->zi_spa); kmem_free(handler, sizeof (inject_handler_t)); - atomic_add_32(&zio_injection_enabled, -1); + atomic_dec_32(&zio_injection_enabled); return (0); } Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/os/fm.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/os/fm.c Wed Sep 3 08:18:07 2014 (r271000) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/os/fm.c Wed Sep 3 08:18:09 2014 (r271001) @@ -524,20 +524,20 @@ fm_ereport_post(nvlist_t *ereport, int e (void) nvlist_size(ereport, &nvl_size, NV_ENCODE_NATIVE); if (nvl_size > ERPT_DATA_SZ || nvl_size == 0) { - atomic_add_64(&erpt_kstat_data.erpt_dropped.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.erpt_dropped.value.ui64); return; } #ifdef sun if (sysevent_evc_bind(FM_ERROR_CHAN, &error_chan, EVCH_CREAT|EVCH_HOLD_PEND) != 0) { - atomic_add_64(&erpt_kstat_data.erpt_dropped.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.erpt_dropped.value.ui64); return; } if (sysevent_evc_publish(error_chan, EC_FM, ESC_FM_ERROR, SUNW_VENDOR, FM_PUB, ereport, evc_flag) != 0) { - atomic_add_64(&erpt_kstat_data.erpt_dropped.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.erpt_dropped.value.ui64); (void) sysevent_evc_unbind(error_chan); return; } @@ -803,8 +803,7 @@ fm_payload_set(nvlist_t *payload, ...) va_end(ap); if (ret) - atomic_add_64( - &erpt_kstat_data.payload_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.payload_set_failed.value.ui64); } /* @@ -837,24 +836,24 @@ fm_ereport_set(nvlist_t *ereport, int ve int ret; if (version != FM_EREPORT_VERS0) { - atomic_add_64(&erpt_kstat_data.erpt_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.erpt_set_failed.value.ui64); return; } (void) snprintf(ereport_class, FM_MAX_CLASS, "%s.%s", FM_EREPORT_CLASS, erpt_class); if (nvlist_add_string(ereport, FM_CLASS, ereport_class) != 0) { - atomic_add_64(&erpt_kstat_data.erpt_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.erpt_set_failed.value.ui64); return; } if (nvlist_add_uint64(ereport, FM_EREPORT_ENA, ena)) { - atomic_add_64(&erpt_kstat_data.erpt_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.erpt_set_failed.value.ui64); } if (nvlist_add_nvlist(ereport, FM_EREPORT_DETECTOR, (nvlist_t *)detector) != 0) { - atomic_add_64(&erpt_kstat_data.erpt_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.erpt_set_failed.value.ui64); } va_start(ap, detector); @@ -863,7 +862,7 @@ fm_ereport_set(nvlist_t *ereport, int ve va_end(ap); if (ret) - atomic_add_64(&erpt_kstat_data.erpt_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.erpt_set_failed.value.ui64); } /* @@ -886,19 +885,19 @@ static int fm_fmri_hc_set_common(nvlist_t *fmri, int version, const nvlist_t *auth) { if (version != FM_HC_SCHEME_VERSION) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); return (0); } if (nvlist_add_uint8(fmri, FM_VERSION, version) != 0 || nvlist_add_string(fmri, FM_FMRI_SCHEME, FM_FMRI_SCHEME_HC) != 0) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); return (0); } if (auth != NULL && nvlist_add_nvlist(fmri, FM_FMRI_AUTHORITY, (nvlist_t *)auth) != 0) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); return (0); } @@ -930,22 +929,22 @@ fm_fmri_hc_set(nvlist_t *fmri, int versi pairs[i] = fm_nvlist_create(nva); if (nvlist_add_string(pairs[i], FM_FMRI_HC_NAME, name) != 0 || nvlist_add_string(pairs[i], FM_FMRI_HC_ID, idstr) != 0) { - atomic_add_64( - &erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64( + &erpt_kstat_data.fmri_set_failed.value.ui64); } } va_end(ap); if (nvlist_add_nvlist_array(fmri, FM_FMRI_HC_LIST, pairs, npairs) != 0) - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); for (i = 0; i < npairs; i++) fm_nvlist_destroy(pairs[i], FM_NVA_RETAIN); if (snvl != NULL) { if (nvlist_add_nvlist(fmri, FM_FMRI_HC_SPECIFIC, snvl) != 0) { - atomic_add_64( - &erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64( + &erpt_kstat_data.fmri_set_failed.value.ui64); } } } @@ -970,7 +969,7 @@ fm_fmri_dev_set(nvlist_t *fmri_dev, int int err = 0; if (version != DEV_SCHEME_VERSION0) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); return; } @@ -991,7 +990,7 @@ fm_fmri_dev_set(nvlist_t *fmri_dev, int err |= nvlist_add_string(fmri_dev, FM_FMRI_DEV_TGTPTLUN0, tpl0); if (err) - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); } @@ -1016,35 +1015,35 @@ fm_fmri_cpu_set(nvlist_t *fmri_cpu, int uint64_t *failedp = &erpt_kstat_data.fmri_set_failed.value.ui64; if (version < CPU_SCHEME_VERSION1) { - atomic_add_64(failedp, 1); + atomic_inc_64(failedp); return; } if (nvlist_add_uint8(fmri_cpu, FM_VERSION, version) != 0) { - atomic_add_64(failedp, 1); + atomic_inc_64(failedp); return; } if (nvlist_add_string(fmri_cpu, FM_FMRI_SCHEME, FM_FMRI_SCHEME_CPU) != 0) { - atomic_add_64(failedp, 1); + atomic_inc_64(failedp); return; } if (auth != NULL && nvlist_add_nvlist(fmri_cpu, FM_FMRI_AUTHORITY, (nvlist_t *)auth) != 0) - atomic_add_64(failedp, 1); + atomic_inc_64(failedp); if (nvlist_add_uint32(fmri_cpu, FM_FMRI_CPU_ID, cpu_id) != 0) - atomic_add_64(failedp, 1); + atomic_inc_64(failedp); if (cpu_maskp != NULL && nvlist_add_uint8(fmri_cpu, FM_FMRI_CPU_MASK, *cpu_maskp) != 0) - atomic_add_64(failedp, 1); + atomic_inc_64(failedp); if (serial_idp == NULL || nvlist_add_string(fmri_cpu, FM_FMRI_CPU_SERIAL_ID, (char *)serial_idp) != 0) - atomic_add_64(failedp, 1); + atomic_inc_64(failedp); } /* @@ -1065,49 +1064,47 @@ fm_fmri_mem_set(nvlist_t *fmri, int vers const char *unum, const char *serial, uint64_t offset) { if (version != MEM_SCHEME_VERSION0) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); return; } if (!serial && (offset != (uint64_t)-1)) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); return; } if (nvlist_add_uint8(fmri, FM_VERSION, version) != 0) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); return; } if (nvlist_add_string(fmri, FM_FMRI_SCHEME, FM_FMRI_SCHEME_MEM) != 0) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); return; } if (auth != NULL) { if (nvlist_add_nvlist(fmri, FM_FMRI_AUTHORITY, (nvlist_t *)auth) != 0) { - atomic_add_64( - &erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64( + &erpt_kstat_data.fmri_set_failed.value.ui64); } } if (nvlist_add_string(fmri, FM_FMRI_MEM_UNUM, unum) != 0) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); } if (serial != NULL) { if (nvlist_add_string_array(fmri, FM_FMRI_MEM_SERIAL_ID, (char **)&serial, 1) != 0) { - atomic_add_64( - &erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64( + &erpt_kstat_data.fmri_set_failed.value.ui64); } - if (offset != (uint64_t)-1) { - if (nvlist_add_uint64(fmri, FM_FMRI_MEM_OFFSET, - offset) != 0) { - atomic_add_64(&erpt_kstat_data. - fmri_set_failed.value.ui64, 1); - } + if (offset != (uint64_t)-1 && nvlist_add_uint64(fmri, + FM_FMRI_MEM_OFFSET, offset) != 0) { + atomic_inc_64( + &erpt_kstat_data.fmri_set_failed.value.ui64); } } } @@ -1117,28 +1114,28 @@ fm_fmri_zfs_set(nvlist_t *fmri, int vers uint64_t vdev_guid) { if (version != ZFS_SCHEME_VERSION0) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); return; } if (nvlist_add_uint8(fmri, FM_VERSION, version) != 0) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); return; } if (nvlist_add_string(fmri, FM_FMRI_SCHEME, FM_FMRI_SCHEME_ZFS) != 0) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); return; } if (nvlist_add_uint64(fmri, FM_FMRI_ZFS_POOL, pool_guid) != 0) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); } if (vdev_guid != 0) { if (nvlist_add_uint64(fmri, FM_FMRI_ZFS_VDEV, vdev_guid) != 0) { - atomic_add_64( - &erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64( + &erpt_kstat_data.fmri_set_failed.value.ui64); } } } @@ -1322,20 +1319,20 @@ fm_fmri_hc_create(nvlist_t *fmri, int ve */ if (nvlist_lookup_nvlist_array(bboard, FM_FMRI_HC_LIST, &hcl, &n) != 0) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); return; } for (i = 0; i < n; i++) { if (nvlist_lookup_string(hcl[i], FM_FMRI_HC_NAME, &hcname) != 0) { - atomic_add_64( - &erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64( + &erpt_kstat_data.fmri_set_failed.value.ui64); return; } if (nvlist_lookup_string(hcl[i], FM_FMRI_HC_ID, &hcid) != 0) { - atomic_add_64( - &erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64( + &erpt_kstat_data.fmri_set_failed.value.ui64); return; } @@ -1347,8 +1344,8 @@ fm_fmri_hc_create(nvlist_t *fmri, int ve fm_nvlist_destroy(pairs[j], FM_NVA_RETAIN); } - atomic_add_64( - &erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64( + &erpt_kstat_data.fmri_set_failed.value.ui64); return; } } @@ -1372,8 +1369,8 @@ fm_fmri_hc_create(nvlist_t *fmri, int ve fm_nvlist_destroy(pairs[j], FM_NVA_RETAIN); } - atomic_add_64( - &erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64( + &erpt_kstat_data.fmri_set_failed.value.ui64); return; } } @@ -1384,7 +1381,7 @@ fm_fmri_hc_create(nvlist_t *fmri, int ve */ if (nvlist_add_nvlist_array(fmri, FM_FMRI_HC_LIST, pairs, npairs + n) != 0) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); return; } @@ -1394,8 +1391,8 @@ fm_fmri_hc_create(nvlist_t *fmri, int ve if (snvl != NULL) { if (nvlist_add_nvlist(fmri, FM_FMRI_HC_SPECIFIC, snvl) != 0) { - atomic_add_64( - &erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64( + &erpt_kstat_data.fmri_set_failed.value.ui64); return; } } Modified: stable/10/sys/cddl/contrib/opensolaris/uts/sparc/dtrace/fasttrap_isa.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/sparc/dtrace/fasttrap_isa.c Wed Sep 3 08:18:07 2014 (r271000) +++ stable/10/sys/cddl/contrib/opensolaris/uts/sparc/dtrace/fasttrap_isa.c Wed Sep 3 08:18:09 2014 (r271001) @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include #include #include @@ -1410,7 +1408,7 @@ fasttrap_getreg(struct regs *rp, uint_t value = dtrace_getreg_win(reg, 1); dtrace_interrupt_enable(cookie); - atomic_add_64(&fasttrap_getreg_fast_cnt, 1); + atomic_inc_64(&fasttrap_getreg_fast_cnt); return (value); } @@ -1435,7 +1433,7 @@ fasttrap_getreg(struct regs *rp, uint_t if ((long)mpcb->mpcb_spbuf[i] != rp->r_sp) continue; - atomic_add_64(&fasttrap_getreg_mpcb_cnt, 1); + atomic_inc_64(&fasttrap_getreg_mpcb_cnt); return (rwin[i].rw_local[reg - 16]); } while (i > 0); } @@ -1455,7 +1453,7 @@ fasttrap_getreg(struct regs *rp, uint_t if ((long)mpcb->mpcb_spbuf[i] != rp->r_sp) continue; - atomic_add_64(&fasttrap_getreg_mpcb_cnt, 1); + atomic_inc_64(&fasttrap_getreg_mpcb_cnt); return (rwin[i].rw_local[reg - 16]); } while (i > 0); } @@ -1466,7 +1464,7 @@ fasttrap_getreg(struct regs *rp, uint_t v32[0] = 0; } - atomic_add_64(&fasttrap_getreg_slow_cnt, 1); + atomic_inc_64(&fasttrap_getreg_slow_cnt); return (value); err: @@ -1505,7 +1503,7 @@ fasttrap_putreg(struct regs *rp, uint_t if (dtrace_getotherwin() > 0) { dtrace_putreg_win(reg, value); dtrace_interrupt_enable(cookie); - atomic_add_64(&fasttrap_putreg_fast_cnt, 1); + atomic_inc_64(&fasttrap_putreg_fast_cnt); return; } dtrace_interrupt_enable(cookie); @@ -1536,7 +1534,7 @@ fasttrap_putreg(struct regs *rp, uint_t continue; rwin[i].rw_local[reg - 16] = value; - atomic_add_64(&fasttrap_putreg_mpcb_cnt, 1); + atomic_inc_64(&fasttrap_putreg_mpcb_cnt); return; } while (i > 0); } @@ -1549,7 +1547,7 @@ fasttrap_putreg(struct regs *rp, uint_t rwin[mpcb->mpcb_wbcnt].rw_local[reg - 16] = value; mpcb->mpcb_spbuf[mpcb->mpcb_wbcnt] = (caddr_t)rp->r_sp; mpcb->mpcb_wbcnt++; - atomic_add_64(&fasttrap_putreg_mpcb_cnt, 1); + atomic_inc_64(&fasttrap_putreg_mpcb_cnt); return; } } else { @@ -1567,7 +1565,7 @@ fasttrap_putreg(struct regs *rp, uint_t continue; rwin[i].rw_local[reg - 16] = v32; - atomic_add_64(&fasttrap_putreg_mpcb_cnt, 1); + atomic_inc_64(&fasttrap_putreg_mpcb_cnt); return; } while (i > 0); } @@ -1580,12 +1578,12 @@ fasttrap_putreg(struct regs *rp, uint_t rwin[mpcb->mpcb_wbcnt].rw_local[reg - 16] = v32; mpcb->mpcb_spbuf[mpcb->mpcb_wbcnt] = (caddr_t)rp->r_sp; mpcb->mpcb_wbcnt++; - atomic_add_64(&fasttrap_putreg_mpcb_cnt, 1); + atomic_inc_64(&fasttrap_putreg_mpcb_cnt); return; } } - atomic_add_64(&fasttrap_putreg_slow_cnt, 1); + atomic_inc_64(&fasttrap_putreg_slow_cnt); return; err: From owner-svn-src-stable-10@FreeBSD.ORG Wed Sep 3 08:21:22 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9EF2752F; Wed, 3 Sep 2014 08:21:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6F73C1F72; Wed, 3 Sep 2014 08:21:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s838LMjc086439; Wed, 3 Sep 2014 08:21:22 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s838LMdS086437; Wed, 3 Sep 2014 08:21:22 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201409030821.s838LMdS086437@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 3 Sep 2014 08:21:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271002 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 08:21:22 -0000 Author: delphij Date: Wed Sep 3 08:21:21 2014 New Revision: 271002 URL: http://svnweb.freebsd.org/changeset/base/271002 Log: MFC r270248: MFV r270196: Illumos issue: 5047 don't use atomic_*_nv if you discard the return value Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Wed Sep 3 08:18:09 2014 (r271001) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Wed Sep 3 08:21:21 2014 (r271002) @@ -1603,7 +1603,7 @@ dbuf_clear(dmu_buf_impl_t *db) dndb = dn->dn_dbuf; if (db->db_blkid != DMU_BONUS_BLKID && MUTEX_HELD(&dn->dn_dbufs_mtx)) { avl_remove(&dn->dn_dbufs, db); - (void) atomic_dec_32_nv(&dn->dn_dbufs_count); + atomic_dec_32(&dn->dn_dbufs_count); membar_producer(); DB_DNODE_EXIT(db); /* @@ -1779,7 +1779,7 @@ dbuf_create(dnode_t *dn, uint8_t level, ASSERT(dn->dn_object == DMU_META_DNODE_OBJECT || refcount_count(&dn->dn_holds) > 0); (void) refcount_add(&dn->dn_holds, db); - (void) atomic_inc_32_nv(&dn->dn_dbufs_count); + atomic_inc_32(&dn->dn_dbufs_count); dprintf_dbuf(db, "db=%p\n", db); @@ -1825,7 +1825,7 @@ dbuf_destroy(dmu_buf_impl_t *db) dn = DB_DNODE(db); mutex_enter(&dn->dn_dbufs_mtx); avl_remove(&dn->dn_dbufs, db); - (void) atomic_dec_32_nv(&dn->dn_dbufs_count); + atomic_dec_32(&dn->dn_dbufs_count); mutex_exit(&dn->dn_dbufs_mtx); DB_DNODE_EXIT(db); /* @@ -2109,7 +2109,7 @@ dbuf_rele_and_unlock(dmu_buf_impl_t *db, * until the move completes. */ DB_DNODE_ENTER(db); - (void) atomic_dec_32_nv(&DB_DNODE(db)->dn_dbufs_count); + atomic_dec_32(&DB_DNODE(db)->dn_dbufs_count); DB_DNODE_EXIT(db); /* * The bonus buffer's dnode hold is no longer discounted Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Wed Sep 3 08:18:09 2014 (r271001) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Wed Sep 3 08:21:21 2014 (r271002) @@ -288,7 +288,7 @@ dmu_bonus_hold(objset_t *os, uint64_t ob /* as long as the bonus buf is held, the dnode will be held */ if (refcount_add(&db->db_holds, tag) == 1) { VERIFY(dnode_add_ref(dn, db)); - (void) atomic_inc_32_nv(&dn->dn_dbufs_count); + atomic_inc_32(&dn->dn_dbufs_count); } /* From owner-svn-src-stable-10@FreeBSD.ORG Wed Sep 3 08:24:12 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0F0AD7CB; Wed, 3 Sep 2014 08:24:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EDBBC105B; Wed, 3 Sep 2014 08:24:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s838OBpC089128; Wed, 3 Sep 2014 08:24:11 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s838OBs9089127; Wed, 3 Sep 2014 08:24:11 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201409030824.s838OBs9089127@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 3 Sep 2014 08:24:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271003 - stable/10/sys/cddl/compat/opensolaris/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 08:24:12 -0000 Author: delphij Date: Wed Sep 3 08:24:11 2014 New Revision: 271003 URL: http://svnweb.freebsd.org/changeset/base/271003 Log: MFC r270260: Provide compatibility shim for atomic_dec_64_nv. Modified: stable/10/sys/cddl/compat/opensolaris/sys/atomic.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/compat/opensolaris/sys/atomic.h ============================================================================== --- stable/10/sys/cddl/compat/opensolaris/sys/atomic.h Wed Sep 3 08:21:21 2014 (r271002) +++ stable/10/sys/cddl/compat/opensolaris/sys/atomic.h Wed Sep 3 08:24:11 2014 (r271003) @@ -117,6 +117,12 @@ atomic_inc_64_nv(volatile uint64_t *targ return (atomic_add_64_nv(target, 1)); } +static __inline uint64_t +atomic_dec_64_nv(volatile uint64_t *target) +{ + return (atomic_add_64_nv(target, -1)); +} + #if !defined(COMPAT_32BIT) && defined(__LP64__) static __inline void * atomic_cas_ptr(volatile void *target, void *cmp, void *newval) From owner-svn-src-stable-10@FreeBSD.ORG Wed Sep 3 08:27:06 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 67A94AA0; Wed, 3 Sep 2014 08:27:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 38A9810A6; Wed, 3 Sep 2014 08:27:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s838R6ZG089652; Wed, 3 Sep 2014 08:27:06 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s838R6lH089651; Wed, 3 Sep 2014 08:27:06 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201409030827.s838R6lH089651@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 3 Sep 2014 08:27:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271004 - stable/10/contrib/libarchive/tar X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 08:27:06 -0000 Author: ae Date: Wed Sep 3 08:27:05 2014 New Revision: 271004 URL: http://svnweb.freebsd.org/changeset/base/271004 Log: MFC r270661: Remove leading '/' from hardlink name when removing them from the regular file name. This fixes the problem, when bsdtar can not create hardlinks to extracted files. Modified: stable/10/contrib/libarchive/tar/util.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/libarchive/tar/util.c ============================================================================== --- stable/10/contrib/libarchive/tar/util.c Wed Sep 3 08:24:11 2014 (r271003) +++ stable/10/contrib/libarchive/tar/util.c Wed Sep 3 08:27:05 2014 (r271004) @@ -372,6 +372,21 @@ strip_components(const char *p, int elem } } +static const char* +strip_leading_slashes(const char *p) +{ + + /* Remove leading "/../", "//", etc. */ + while (p[0] == '/' || p[0] == '\\') { + if (p[1] == '.' && p[2] == '.' && ( + p[3] == '/' || p[3] == '\\')) { + p += 3; /* Remove "/..", leave "/" for next pass. */ + } else + p += 1; /* Remove "/". */ + } + return (p); +} + /* * Handle --strip-components and any future path-rewriting options. * Returns non-zero if the pathname should not be extracted. @@ -474,16 +489,7 @@ edit_pathname(struct bsdtar *bsdtar, str p += 2; slashonly = 0; } - /* Remove leading "/../", "//", etc. */ - while (p[0] == '/' || p[0] == '\\') { - if (p[1] == '.' && p[2] == '.' && - (p[3] == '/' || p[3] == '\\')) { - p += 3; /* Remove "/..", leave "/" - * for next pass. */ - slashonly = 0; - } else - p += 1; /* Remove "/". */ - } + p = strip_leading_slashes(p); } while (rp != p); if (p != name && !bsdtar->warned_lead_slash) { @@ -504,6 +510,19 @@ edit_pathname(struct bsdtar *bsdtar, str name = "."; else name = p; + + p = archive_entry_hardlink(entry); + if (p != NULL) { + rp = strip_leading_slashes(p); + if (rp == '\0') + return (1); + if (rp != p) { + char *linkname = strdup(rp); + + archive_entry_copy_hardlink(entry, linkname); + free(linkname); + } + } } else { /* Strip redundant leading '/' characters. */ while (name[0] == '/' && name[1] == '/') From owner-svn-src-stable-10@FreeBSD.ORG Wed Sep 3 09:05:17 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D7924E90; Wed, 3 Sep 2014 09:05:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A2E0A1764; Wed, 3 Sep 2014 09:05:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8395H0t008819; Wed, 3 Sep 2014 09:05:17 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8395H7r008817; Wed, 3 Sep 2014 09:05:17 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201409030905.s8395H7r008817@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 3 Sep 2014 09:05:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271010 - stable/10/sys/compat/freebsd32 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 09:05:18 -0000 Author: kib Date: Wed Sep 3 09:05:16 2014 New Revision: 271010 URL: http://svnweb.freebsd.org/changeset/base/271010 Log: MFC r270691: Fix handling of the third argument for fcntl(2). The native syscall uses long for arg, which needs translation. Modified: stable/10/sys/compat/freebsd32/freebsd32_misc.c stable/10/sys/compat/freebsd32/syscalls.master Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32_misc.c Wed Sep 3 08:45:58 2014 (r271009) +++ stable/10/sys/compat/freebsd32/freebsd32_misc.c Wed Sep 3 09:05:16 2014 (r271010) @@ -3072,3 +3072,28 @@ freebsd32_procctl(struct thread *td, str return (kern_procctl(td, uap->idtype, PAIR32TO64(id_t, uap->id), uap->com, data)); } + +int +freebsd32_fcntl(struct thread *td, struct freebsd32_fcntl_args *uap) +{ + intptr_t tmp; + + switch (uap->cmd) { + /* + * Do unsigned conversion for arg when operation + * interprets it as flags or pointer. + */ + case F_SETLK_REMOTE: + case F_SETLKW: + case F_SETLK: + case F_GETLK: + case F_SETFD: + case F_SETFL: + tmp = (unsigned int)(uap->arg); + break; + default: + tmp = uap->arg; + break; + } + return (kern_fcntl(td, uap->fd, uap->cmd, tmp)); +} Modified: stable/10/sys/compat/freebsd32/syscalls.master ============================================================================== --- stable/10/sys/compat/freebsd32/syscalls.master Wed Sep 3 08:45:58 2014 (r271009) +++ stable/10/sys/compat/freebsd32/syscalls.master Wed Sep 3 09:05:16 2014 (r271010) @@ -200,7 +200,8 @@ 89 AUE_GETDTABLESIZE NOPROTO { int getdtablesize(void); } 90 AUE_DUP2 NOPROTO { int dup2(u_int from, u_int to); } 91 AUE_NULL UNIMPL getdopt -92 AUE_FCNTL NOPROTO { int fcntl(int fd, int cmd, long arg); } +92 AUE_FCNTL STD { int freebsd32_fcntl(int fd, int cmd, \ + int arg); } 93 AUE_SELECT STD { int freebsd32_select(int nd, fd_set *in, \ fd_set *ou, fd_set *ex, \ struct timeval32 *tv); } From owner-svn-src-stable-10@FreeBSD.ORG Wed Sep 3 09:05:38 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 86EB1FD2; Wed, 3 Sep 2014 09:05:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 66C09176F; Wed, 3 Sep 2014 09:05:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8395cxH008901; Wed, 3 Sep 2014 09:05:38 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8395bwM008896; Wed, 3 Sep 2014 09:05:37 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201409030905.s8395bwM008896@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 3 Sep 2014 09:05:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271011 - stable/10/sys/compat/freebsd32 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 09:05:38 -0000 Author: kib Date: Wed Sep 3 09:05:37 2014 New Revision: 271011 URL: http://svnweb.freebsd.org/changeset/base/271011 Log: Regen. Modified: stable/10/sys/compat/freebsd32/freebsd32_proto.h stable/10/sys/compat/freebsd32/freebsd32_syscall.h stable/10/sys/compat/freebsd32/freebsd32_syscalls.c stable/10/sys/compat/freebsd32/freebsd32_sysent.c stable/10/sys/compat/freebsd32/freebsd32_systrace_args.c Modified: stable/10/sys/compat/freebsd32/freebsd32_proto.h ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32_proto.h Wed Sep 3 09:05:16 2014 (r271010) +++ stable/10/sys/compat/freebsd32/freebsd32_proto.h Wed Sep 3 09:05:37 2014 (r271011) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 255708 2013-09-19 18:53:42Z jhb + * created from FreeBSD: stable/10/sys/compat/freebsd32/syscalls.master 271010 2014-09-03 09:05:16Z kib */ #ifndef _FREEBSD32_SYSPROTO_H_ @@ -92,6 +92,11 @@ struct freebsd32_getitimer_args { char which_l_[PADL_(u_int)]; u_int which; char which_r_[PADR_(u_int)]; char itv_l_[PADL_(struct itimerval32 *)]; struct itimerval32 * itv; char itv_r_[PADR_(struct itimerval32 *)]; }; +struct freebsd32_fcntl_args { + char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; + char cmd_l_[PADL_(int)]; int cmd; char cmd_r_[PADR_(int)]; + char arg_l_[PADL_(int)]; int arg; char arg_r_[PADR_(int)]; +}; struct freebsd32_select_args { char nd_l_[PADL_(int)]; int nd; char nd_r_[PADR_(int)]; char in_l_[PADL_(fd_set *)]; fd_set * in; char in_r_[PADR_(fd_set *)]; @@ -701,6 +706,7 @@ int freebsd32_execve(struct thread *, st int freebsd32_mprotect(struct thread *, struct freebsd32_mprotect_args *); int freebsd32_setitimer(struct thread *, struct freebsd32_setitimer_args *); int freebsd32_getitimer(struct thread *, struct freebsd32_getitimer_args *); +int freebsd32_fcntl(struct thread *, struct freebsd32_fcntl_args *); int freebsd32_select(struct thread *, struct freebsd32_select_args *); int freebsd32_gettimeofday(struct thread *, struct freebsd32_gettimeofday_args *); int freebsd32_getrusage(struct thread *, struct freebsd32_getrusage_args *); @@ -1106,6 +1112,7 @@ int freebsd7_freebsd32_shmctl(struct thr #define FREEBSD32_SYS_AUE_freebsd32_mprotect AUE_MPROTECT #define FREEBSD32_SYS_AUE_freebsd32_setitimer AUE_SETITIMER #define FREEBSD32_SYS_AUE_freebsd32_getitimer AUE_GETITIMER +#define FREEBSD32_SYS_AUE_freebsd32_fcntl AUE_FCNTL #define FREEBSD32_SYS_AUE_freebsd32_select AUE_SELECT #define FREEBSD32_SYS_AUE_ofreebsd32_sigreturn AUE_NULL #define FREEBSD32_SYS_AUE_ofreebsd32_sigvec AUE_O_SIGVEC Modified: stable/10/sys/compat/freebsd32/freebsd32_syscall.h ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32_syscall.h Wed Sep 3 09:05:16 2014 (r271010) +++ stable/10/sys/compat/freebsd32/freebsd32_syscall.h Wed Sep 3 09:05:37 2014 (r271011) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 255708 2013-09-19 18:53:42Z jhb + * created from FreeBSD: stable/10/sys/compat/freebsd32/syscalls.master 271010 2014-09-03 09:05:16Z kib */ #define FREEBSD32_SYS_syscall 0 @@ -97,7 +97,7 @@ /* 88 is obsolete osethostname */ #define FREEBSD32_SYS_getdtablesize 89 #define FREEBSD32_SYS_dup2 90 -#define FREEBSD32_SYS_fcntl 92 +#define FREEBSD32_SYS_freebsd32_fcntl 92 #define FREEBSD32_SYS_freebsd32_select 93 #define FREEBSD32_SYS_fsync 95 #define FREEBSD32_SYS_setpriority 96 Modified: stable/10/sys/compat/freebsd32/freebsd32_syscalls.c ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32_syscalls.c Wed Sep 3 09:05:16 2014 (r271010) +++ stable/10/sys/compat/freebsd32/freebsd32_syscalls.c Wed Sep 3 09:05:37 2014 (r271011) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 255708 2013-09-19 18:53:42Z jhb + * created from FreeBSD: stable/10/sys/compat/freebsd32/syscalls.master 271010 2014-09-03 09:05:16Z kib */ const char *freebsd32_syscallnames[] = { @@ -102,7 +102,7 @@ const char *freebsd32_syscallnames[] = { "getdtablesize", /* 89 = getdtablesize */ "dup2", /* 90 = dup2 */ "#91", /* 91 = getdopt */ - "fcntl", /* 92 = fcntl */ + "freebsd32_fcntl", /* 92 = freebsd32_fcntl */ "freebsd32_select", /* 93 = freebsd32_select */ "#94", /* 94 = setdopt */ "fsync", /* 95 = fsync */ Modified: stable/10/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32_sysent.c Wed Sep 3 09:05:16 2014 (r271010) +++ stable/10/sys/compat/freebsd32/freebsd32_sysent.c Wed Sep 3 09:05:37 2014 (r271011) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 255708 2013-09-19 18:53:42Z jhb + * created from FreeBSD: stable/10/sys/compat/freebsd32/syscalls.master 271010 2014-09-03 09:05:16Z kib */ #include "opt_compat.h" @@ -139,7 +139,7 @@ struct sysent freebsd32_sysent[] = { { 0, (sy_call_t *)sys_getdtablesize, AUE_GETDTABLESIZE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 89 = getdtablesize */ { AS(dup2_args), (sy_call_t *)sys_dup2, AUE_DUP2, NULL, 0, 0, 0, SY_THR_STATIC }, /* 90 = dup2 */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 91 = getdopt */ - { AS(fcntl_args), (sy_call_t *)sys_fcntl, AUE_FCNTL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 92 = fcntl */ + { AS(freebsd32_fcntl_args), (sy_call_t *)freebsd32_fcntl, AUE_FCNTL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 92 = freebsd32_fcntl */ { AS(freebsd32_select_args), (sy_call_t *)freebsd32_select, AUE_SELECT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 93 = freebsd32_select */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 94 = setdopt */ { AS(fsync_args), (sy_call_t *)sys_fsync, AUE_FSYNC, NULL, 0, 0, 0, SY_THR_STATIC }, /* 95 = fsync */ Modified: stable/10/sys/compat/freebsd32/freebsd32_systrace_args.c ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32_systrace_args.c Wed Sep 3 09:05:16 2014 (r271010) +++ stable/10/sys/compat/freebsd32/freebsd32_systrace_args.c Wed Sep 3 09:05:37 2014 (r271011) @@ -557,12 +557,12 @@ systrace_args(int sysnum, void *params, *n_args = 2; break; } - /* fcntl */ + /* freebsd32_fcntl */ case 92: { - struct fcntl_args *p = params; + struct freebsd32_fcntl_args *p = params; iarg[0] = p->fd; /* int */ iarg[1] = p->cmd; /* int */ - iarg[2] = p->arg; /* long */ + iarg[2] = p->arg; /* int */ *n_args = 3; break; } @@ -4161,7 +4161,7 @@ systrace_entry_setargdesc(int sysnum, in break; }; break; - /* fcntl */ + /* freebsd32_fcntl */ case 92: switch(ndx) { case 0: @@ -4171,7 +4171,7 @@ systrace_entry_setargdesc(int sysnum, in p = "int"; break; case 2: - p = "long"; + p = "int"; break; default: break; @@ -9208,7 +9208,7 @@ systrace_return_setargdesc(int sysnum, i if (ndx == 0 || ndx == 1) p = "int"; break; - /* fcntl */ + /* freebsd32_fcntl */ case 92: if (ndx == 0 || ndx == 1) p = "int"; From owner-svn-src-stable-10@FreeBSD.ORG Wed Sep 3 13:17:44 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CDE2B13E; Wed, 3 Sep 2014 13:17:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B87871736; Wed, 3 Sep 2014 13:17:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83DHibV026829; Wed, 3 Sep 2014 13:17:44 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83DHib9026828; Wed, 3 Sep 2014 13:17:44 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409031317.s83DHib9026828@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 3 Sep 2014 13:17:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271019 - stable/10/sys/dev/vt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 13:17:45 -0000 Author: emaste Date: Wed Sep 3 13:17:44 2014 New Revision: 271019 URL: http://svnweb.freebsd.org/changeset/base/271019 Log: MFC vt(4) work from ray@: r269188: [Rework vb_buffer and vb_rows assignment] r269192: Remove special handling of console window size. It's done in vt_upgrade() for all windows. r269193: Update comments. r269194: Revise font initialization handling. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/vt/vt_core.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/vt/vt_core.c ============================================================================== --- stable/10/sys/dev/vt/vt_core.c Wed Sep 3 13:15:16 2014 (r271018) +++ stable/10/sys/dev/vt/vt_core.c Wed Sep 3 13:17:44 2014 (r271019) @@ -166,8 +166,8 @@ static struct vt_window vt_conswindow = .vw_number = VT_CONSWINDOW, .vw_flags = VWF_CONSOLE, .vw_buf = { - .vb_buffer = vt_constextbuf, - .vb_rows = vt_constextbufrows, + .vb_buffer = &vt_constextbuf[0], + .vb_rows = &vt_constextbufrows[0], .vb_history_size = VBF_DEFAULT_HISTORY_SIZE, .vb_curroffset = 0, .vb_roffset = 0, @@ -996,7 +996,7 @@ vtterm_cnprobe(struct terminal *tm, stru sprintf(cp->cn_name, "ttyv%r", VT_UNIT(vw)); /* Attach default font if not in TEXTMODE. */ - if (!(vd->vd_flags & VDF_TEXTMODE)) + if ((vd->vd_flags & VDF_TEXTMODE) == 0) vw->vw_font = vtfont_ref(&vt_font_default); vtbuf_init_early(&vw->vw_buf); @@ -1147,7 +1147,7 @@ vt_change_font(struct vt_window *vw, str VT_UNLOCK(vd); return (EBUSY); } - if (vw->vw_font == NULL) { + if (vd->vd_flags & VDF_TEXTMODE) { /* Our device doesn't need fonts. */ VT_UNLOCK(vd); return (ENOTTY); @@ -1169,8 +1169,14 @@ vt_change_font(struct vt_window *vw, str /* Actually apply the font to the current window. */ VT_LOCK(vd); - vtfont_unref(vw->vw_font); - vw->vw_font = vtfont_ref(vf); + if (vw->vw_font != vf) { + /* + * In case vt_change_font called to update size we don't need + * to update font link. + */ + vtfont_unref(vw->vw_font); + vw->vw_font = vtfont_ref(vf); + } /* Force a full redraw the next timer tick. */ if (vd->vd_curwindow == vw) @@ -1978,7 +1984,7 @@ vt_allocate_window(struct vt_device *vd, vw->vw_number = window; vw->vw_kbdmode = K_XLATE; - if (!(vd->vd_flags & VDF_TEXTMODE)) + if ((vd->vd_flags & VDF_TEXTMODE) == 0) vw->vw_font = vtfont_ref(&vt_font_default); vt_termsize(vd, vw->vw_font, &size); @@ -2056,7 +2062,10 @@ vt_resize(struct vt_device *vd) vw->vw_font = vtfont_ref(&vt_font_default); VT_UNLOCK(vd); /* Resize terminal windows */ - vt_change_font(vw, vw->vw_font); + while (vt_change_font(vw, vw->vw_font) == EBUSY) { + DPRINTF(100, "%s: vt_change_font() is busy, " + "window %d\n", __func__, i); + } } } @@ -2064,7 +2073,6 @@ void vt_allocate(struct vt_driver *drv, void *softc) { struct vt_device *vd; - struct winsize wsz; if (!vty_enabled(VTY_VT)) return; @@ -2112,6 +2120,7 @@ vt_allocate(struct vt_driver *drv, void vd->vd_driver->vd_init(vd); VT_UNLOCK(vd); + /* Update windows sizes and initialize last items. */ vt_upgrade(vd); #ifdef DEV_SPLASH @@ -2120,16 +2129,17 @@ vt_allocate(struct vt_driver *drv, void #endif if (vd->vd_flags & VDF_ASYNC) { + /* Allow to put chars now. */ terminal_mute(vd->vd_curwindow->vw_terminal, 0); + /* Rerun timer for screen updates. */ callout_schedule(&vd->vd_timer, hz / VT_TIMERFREQ); } + /* + * Register as console. If it already registered, cnadd() will ignore + * it. + */ termcn_cnregister(vd->vd_windows[VT_CONSWINDOW]->vw_terminal); - - /* Update console window sizes to actual. */ - vt_winsize(vd, vd->vd_windows[VT_CONSWINDOW]->vw_font, &wsz); - terminal_set_winsize_blank(vd->vd_windows[VT_CONSWINDOW]->vw_terminal, - &wsz, 0, NULL); } void From owner-svn-src-stable-10@FreeBSD.ORG Wed Sep 3 13:22:50 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9DA245D2; Wed, 3 Sep 2014 13:22:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 887CA1820; Wed, 3 Sep 2014 13:22:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83DMob7031413; Wed, 3 Sep 2014 13:22:50 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83DMoKf031412; Wed, 3 Sep 2014 13:22:50 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409031322.s83DMoKf031412@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 3 Sep 2014 13:22:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271020 - stable/10/sys/dev/vt/hw/fb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 13:22:50 -0000 Author: emaste Date: Wed Sep 3 13:22:50 2014 New Revision: 271020 URL: http://svnweb.freebsd.org/changeset/base/271020 Log: MFC r269437 by nwhitehorn: Don't assume that the framebuffer driver is using vt_fb_blank() when blanking the screen during init. Modified: stable/10/sys/dev/vt/hw/fb/vt_fb.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/vt/hw/fb/vt_fb.c ============================================================================== --- stable/10/sys/dev/vt/hw/fb/vt_fb.c Wed Sep 3 13:17:44 2014 (r271019) +++ stable/10/sys/dev/vt/hw/fb/vt_fb.c Wed Sep 3 13:22:50 2014 (r271020) @@ -401,7 +401,7 @@ vt_fb_init(struct vt_device *vd) } /* Clear the screen. */ - vt_fb_blank(vd, TC_BLACK); + vd->vd_driver->vd_blank(vd, TC_BLACK); /* Wakeup screen. KMS need this. */ vt_fb_postswitch(vd); From owner-svn-src-stable-10@FreeBSD.ORG Wed Sep 3 13:31:09 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7B7DFAC5; Wed, 3 Sep 2014 13:31:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 667B3188F; Wed, 3 Sep 2014 13:31:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83DV916035636; Wed, 3 Sep 2014 13:31:09 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83DV99U035635; Wed, 3 Sep 2014 13:31:09 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409031331.s83DV99U035635@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 3 Sep 2014 13:31:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271021 - stable/10/sys/dev/vt/font X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 13:31:09 -0000 Author: emaste Date: Wed Sep 3 13:31:08 2014 New Revision: 271021 URL: http://svnweb.freebsd.org/changeset/base/271021 Log: MFC r270265 by dumbbell: vt(4): Fix an inconsistency between the mouse cursor bitmap and its mask Modified: stable/10/sys/dev/vt/font/vt_mouse_cursor.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/vt/font/vt_mouse_cursor.c ============================================================================== --- stable/10/sys/dev/vt/font/vt_mouse_cursor.c Wed Sep 3 13:22:50 2014 (r271020) +++ stable/10/sys/dev/vt/font/vt_mouse_cursor.c Wed Sep 3 13:31:08 2014 (r271021) @@ -43,7 +43,7 @@ struct mouse_cursor vt_default_mouse_poi 0x7c, /* "_*****_ " */ 0x7e, /* "_******_" */ 0x68, /* "_**_****" */ - 0x4c, /* "_*__**__" */ + 0x4c, /* "_*__**_ " */ 0x0c, /* " _ _**_ " */ 0x06, /* " _**_" */ 0x06, /* " _**_" */ @@ -58,8 +58,8 @@ struct mouse_cursor vt_default_mouse_poi 0xfe, /* "_______ " */ 0xff, /* "________" */ 0xff, /* "________" */ - 0xff, /* "________" */ - 0x1e, /* " ____ " */ + 0xfe, /* "_______ " */ + 0x5e, /* " _ ____ " */ 0x0f, /* " ____" */ 0x0f, /* " ____" */ 0x0f, /* " ____" */ From owner-svn-src-stable-10@FreeBSD.ORG Wed Sep 3 13:40:03 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 67CBEDF5; Wed, 3 Sep 2014 13:40:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 491531978; Wed, 3 Sep 2014 13:40:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83De3jm037566; Wed, 3 Sep 2014 13:40:03 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83De2qs037559; Wed, 3 Sep 2014 13:40:02 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409031340.s83De2qs037559@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 3 Sep 2014 13:40:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271022 - stable/10/sys/dev/vt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 13:40:03 -0000 Author: emaste Date: Wed Sep 3 13:40:02 2014 New Revision: 271022 URL: http://svnweb.freebsd.org/changeset/base/271022 Log: MFC vt(4) mouse cursor improvements from dumbbell: r270269: vt(4): Handle global and per-window mouse cursor toggle in one place Before the global flag was set/unset using the CONS_MOUSECTL ioctl, and the per-window flag through the MOUSE_SETLEVEL or MOUSE_SETMODE ioctls. Also, if the cursor is already enabled/disabled, return immediatly. This avoids to reset the cursor's position to the center of the screen. This matches syscons' behavior. While here, remove a trailing space and a redundant variable declaration. r270271: vt(4): Mark cursor old position as dirty before reading the dirty area Otherwise, the redraw is done during the next vt_flush run. r270272: vt(4): If the cursor is globally disabled, don't mark its position as dirty This avoids unnecessary redraw. In particular, during boot, where the cursor is disabled and its fake position is [0;0], this triggered a refresh of the whole screen each time vt_flush() is called. r270273: vt(4): If the cursor didn't move, don't mark its position as dirty Currently, this has no effect, because the cursor is always redrawn anyway. But this will be useful after improvements to the vd_bitbltchr_t callback API. The vt_device structure members used to store the position of the cursor as of the last redraw are renamed from vd_mdirty{x,y} to vd_mold{x,y}. The associated comment is fixed too. Also, their value is now expressed in pixels, not in character columns/row. r270275: vt(4): Mark the current cursor position as dirty Like r270273, this has no effect for now, because the cursor is always drawn. This is in preparation of future changes to vd_bitbltchr_t API. r270278: vt(4): Mark cursor position as dirty when we enable/disable it Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/vt/vt.h stable/10/sys/dev/vt/vt_core.c stable/10/sys/dev/vt/vt_sysmouse.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/vt/vt.h ============================================================================== --- stable/10/sys/dev/vt/vt.h Wed Sep 3 13:31:08 2014 (r271021) +++ stable/10/sys/dev/vt/vt.h Wed Sep 3 13:40:02 2014 (r271022) @@ -117,10 +117,10 @@ struct vt_device { struct vt_window *vd_markedwin; /* (?) Copy/paste buf owner. */ const struct vt_driver *vd_driver; /* (c) Graphics driver. */ void *vd_softc; /* (u) Driver data. */ - uint16_t vd_mx; /* (?) Mouse X. */ - uint16_t vd_my; /* (?) Mouse Y. */ - vt_axis_t vd_mdirtyx; /* (?) Screen width. */ - vt_axis_t vd_mdirtyy; /* (?) Screen height. */ + uint16_t vd_mx; /* (?) Current mouse X. */ + uint16_t vd_my; /* (?) current mouse Y. */ + vt_axis_t vd_moldx; /* (?) Mouse X as of last redraw. */ + vt_axis_t vd_moldy; /* (?) Mouse Y as of last redraw. */ uint32_t vd_mstate; /* (?) Mouse state. */ term_pos_t vd_offset; /* (?) Pixel offset. */ vt_axis_t vd_width; /* (?) Screen width. */ Modified: stable/10/sys/dev/vt/vt_core.c ============================================================================== --- stable/10/sys/dev/vt/vt_core.c Wed Sep 3 13:31:08 2014 (r271021) +++ stable/10/sys/dev/vt/vt_core.c Wed Sep 3 13:40:02 2014 (r271022) @@ -825,6 +825,45 @@ vt_flush(struct vt_device *vd) if (vd->vd_flags & VDF_SPLASH || vw->vw_flags & VWF_BUSY) return; +#ifndef SC_NO_CUTPASTE + if ((vd->vd_flags & VDF_MOUSECURSOR) && /* Mouse support enabled. */ + !(vw->vw_flags & VWF_MOUSE_HIDE)) { /* Cursor displayed. */ + if (vd->vd_moldx != vd->vd_mx || + vd->vd_moldy != vd->vd_my) { + /* + * Mark last mouse position as dirty to erase. + * + * FIXME: The font size could be different among + * all windows, so the column/row calculation + * below isn't correct for all windows. + * + * FIXME: The cursor can span more than one + * character cell. vtbuf_mouse_cursor_position + * marks surrounding cells as dirty. But due + * to font size possibly inconsistent across + * windows, this may not be sufficient. This + * causes part of the cursor to not be erased. + * + * FIXME: The vt_buf lock is acquired twice in a + * row. + */ + vtbuf_mouse_cursor_position(&vw->vw_buf, + vd->vd_moldx / vf->vf_width, + vd->vd_moldy / vf->vf_height); + vtbuf_mouse_cursor_position(&vw->vw_buf, + vd->vd_mx / vf->vf_width, + vd->vd_my / vf->vf_height); + + /* + * Save point of last mouse cursor to erase it + * later. + */ + vd->vd_moldx = vd->vd_mx; + vd->vd_moldy = vd->vd_my; + } + } +#endif + vtbuf_undirty(&vw->vw_buf, &tarea, &tmask); vt_termsize(vd, vf, &size); @@ -837,14 +876,6 @@ vt_flush(struct vt_device *vd) vd->vd_flags &= ~VDF_INVALID; } -#ifndef SC_NO_CUTPASTE - if ((vw->vw_flags & VWF_MOUSE_HIDE) == 0) { - /* Mark last mouse position as dirty to erase. */ - vtbuf_mouse_cursor_position(&vw->vw_buf, vd->vd_mdirtyx, - vd->vd_mdirtyy); - } -#endif - for (row = tarea.tr_begin.tp_row; row < tarea.tr_end.tp_row; row++) { if (!VTBUF_DIRTYROW(&tmask, row)) continue; @@ -884,9 +915,6 @@ vt_flush(struct vt_device *vd) vd->vd_offset.tp_row + vd->vd_my, vd->vd_offset.tp_col + vd->vd_mx, w, h, TC_WHITE, TC_BLACK); - /* Save point of last mouse cursor to erase it later. */ - vd->vd_mdirtyx = vd->vd_mx / vf->vf_width; - vd->vd_mdirtyy = vd->vd_my / vf->vf_height; } #endif } @@ -1524,6 +1552,15 @@ vt_mouse_state(int show) vw->vw_flags &= ~VWF_MOUSE_HIDE; break; } + + /* + * Mark mouse position as dirty. + * + * FIXME: See comments in vt_flush(). + */ + vtbuf_mouse_cursor_position(&vw->vw_buf, + vd->vd_mx / vw->vw_font->vf_width, + vd->vd_my / vw->vw_font->vf_height); } #endif @@ -1696,7 +1733,7 @@ skip_thunk: /* XXX: other fields! */ return (0); } - case CONS_GETVERS: + case CONS_GETVERS: *(int *)data = 0x200; return (0); case CONS_MODEINFO: @@ -1706,20 +1743,28 @@ skip_thunk: mouse_info_t *mouse = (mouse_info_t*)data; /* - * This has no effect on vt(4). We don't draw any mouse - * cursor. Just ignore MOUSE_HIDE and MOUSE_SHOW to - * prevent excessive errors. All the other commands + * All the commands except MOUSE_SHOW nd MOUSE_HIDE * should not be applied to individual TTYs, but only to * consolectl. */ switch (mouse->operation) { case MOUSE_HIDE: - vd->vd_flags &= ~VDF_MOUSECURSOR; + if (vd->vd_flags & VDF_MOUSECURSOR) { + vd->vd_flags &= ~VDF_MOUSECURSOR; +#ifndef SC_NO_CUTPASTE + vt_mouse_state(VT_MOUSE_HIDE); +#endif + } return (0); case MOUSE_SHOW: - vd->vd_mx = vd->vd_width / 2; - vd->vd_my = vd->vd_height / 2; - vd->vd_flags |= VDF_MOUSECURSOR; + if (!(vd->vd_flags & VDF_MOUSECURSOR)) { + vd->vd_flags |= VDF_MOUSECURSOR; + vd->vd_mx = vd->vd_width / 2; + vd->vd_my = vd->vd_height / 2; +#ifndef SC_NO_CUTPASTE + vt_mouse_state(VT_MOUSE_SHOW); +#endif + } return (0); default: return (EINVAL); @@ -1742,7 +1787,6 @@ skip_thunk: } case GIO_SCRNMAP: { scrmap_t *sm = (scrmap_t *)data; - int i; /* We don't have screen maps, so return a handcrafted one. */ for (i = 0; i < 256; i++) Modified: stable/10/sys/dev/vt/vt_sysmouse.c ============================================================================== --- stable/10/sys/dev/vt/vt_sysmouse.c Wed Sep 3 13:31:08 2014 (r271021) +++ stable/10/sys/dev/vt/vt_sysmouse.c Wed Sep 3 13:40:02 2014 (r271022) @@ -347,9 +347,6 @@ sysmouse_ioctl(struct cdev *dev, u_long return (EINVAL); sysmouse_level = level; -#ifndef SC_NO_CUTPASTE - vt_mouse_state((level == 0)?VT_MOUSE_SHOW:VT_MOUSE_HIDE); -#endif return (0); } case MOUSE_SETMODE: { @@ -362,10 +359,6 @@ sysmouse_ioctl(struct cdev *dev, u_long case 0: case 1: sysmouse_level = mode->level; -#ifndef SC_NO_CUTPASTE - vt_mouse_state((mode->level == 0)?VT_MOUSE_SHOW: - VT_MOUSE_HIDE); -#endif break; default: return (EINVAL); From owner-svn-src-stable-10@FreeBSD.ORG Wed Sep 3 14:00:38 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D7BCFD72; Wed, 3 Sep 2014 14:00:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C2E051D24; Wed, 3 Sep 2014 14:00:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83E0b5G049812; Wed, 3 Sep 2014 14:00:37 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83E0bK6049810; Wed, 3 Sep 2014 14:00:37 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409031400.s83E0bK6049810@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 3 Sep 2014 14:00:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271023 - stable/10/sys/dev/vt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 14:00:38 -0000 Author: emaste Date: Wed Sep 3 14:00:37 2014 New Revision: 271023 URL: http://svnweb.freebsd.org/changeset/base/271023 Log: MFC r270280 by dumbbell: vt(4): Pause the flush timer while swithing window This fixes bad looking refresh when switching window: squares instead of text, flashing screen, and so on. In the worst case, vt_flush() came at a very inappropriate timing and the screen was not refreshed at all (leaving squares all over the place). This doesn't fix the flickering of the screen with vt_vga, because the sync signal is temporarily stopped and the video memory is cleared. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/vt/vt.h stable/10/sys/dev/vt/vt_core.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/vt/vt.h ============================================================================== --- stable/10/sys/dev/vt/vt.h Wed Sep 3 13:40:02 2014 (r271022) +++ stable/10/sys/dev/vt/vt.h Wed Sep 3 14:00:37 2014 (r271023) @@ -128,6 +128,7 @@ struct vt_device { struct mtx vd_lock; /* Per-device lock. */ struct cv vd_winswitch; /* (d) Window switch notify. */ struct callout vd_timer; /* (d) Display timer. */ + volatile unsigned int vd_timer_armed;/* (?) Display timer started.*/ int vd_flags; /* (d) Device flags. */ #define VDF_TEXTMODE 0x01 /* Do text mode rendering. */ #define VDF_SPLASH 0x02 /* Splash screen active. */ Modified: stable/10/sys/dev/vt/vt_core.c ============================================================================== --- stable/10/sys/dev/vt/vt_core.c Wed Sep 3 13:40:02 2014 (r271022) +++ stable/10/sys/dev/vt/vt_core.c Wed Sep 3 14:00:37 2014 (r271023) @@ -225,6 +225,37 @@ vt_update_static(void *dummy) } static void +vt_schedule_flush(struct vt_device *vd, int ms) +{ + + if (ms <= 0) + /* Default to initial value. */ + ms = 1000 / VT_TIMERFREQ; + + callout_schedule(&vd->vd_timer, hz / (1000 / ms)); +} + +static void +vt_resume_flush_timer(struct vt_device *vd, int ms) +{ + + if (!atomic_cmpset_int(&vd->vd_timer_armed, 0, 1)) + return; + + vt_schedule_flush(vd, ms); +} + +static void +vt_suspend_flush_timer(struct vt_device *vd) +{ + + if (!atomic_cmpset_int(&vd->vd_timer_armed, 1, 0)) + return; + + callout_drain(&vd->vd_timer); +} + +static void vt_switch_timer(void *arg) { @@ -327,6 +358,8 @@ vt_window_switch(struct vt_window *vw) return (EINVAL); } + vt_suspend_flush_timer(vd); + vd->vd_curwindow = vw; vd->vd_flags |= VDF_INVALID; cv_broadcast(&vd->vd_winswitch); @@ -335,6 +368,8 @@ vt_window_switch(struct vt_window *vw) if (vd->vd_driver->vd_postswitch) vd->vd_driver->vd_postswitch(vd); + vt_resume_flush_timer(vd, 0); + /* Restore per-window keyboard mode. */ mtx_lock(&Giant); kbd = kbd_get_keyboard(vd->vd_keyboard); @@ -929,7 +964,7 @@ vt_timer(void *arg) vt_flush(vd); /* Schedule for next update. */ - callout_schedule(&vd->vd_timer, hz / VT_TIMERFREQ); + vt_schedule_flush(vd, 0); } static void @@ -2084,6 +2119,7 @@ vt_upgrade(struct vt_device *vd) /* Start timer when everything ready. */ vd->vd_flags |= VDF_ASYNC; callout_reset(&vd->vd_timer, hz / VT_TIMERFREQ, vt_timer, vd); + vd->vd_timer_armed = 1; } VT_UNLOCK(vd); @@ -2145,7 +2181,7 @@ vt_allocate(struct vt_driver *drv, void if (vd->vd_flags & VDF_ASYNC) { /* Stop vt_flush periodic task. */ - callout_drain(&vd->vd_timer); + vt_suspend_flush_timer(vd); /* * Mute current terminal until we done. vt_change_font (called * from vt_resize) will unmute it. @@ -2176,7 +2212,7 @@ vt_allocate(struct vt_driver *drv, void /* Allow to put chars now. */ terminal_mute(vd->vd_curwindow->vw_terminal, 0); /* Rerun timer for screen updates. */ - callout_schedule(&vd->vd_timer, hz / VT_TIMERFREQ); + vt_resume_flush_timer(vd, 0); } /* From owner-svn-src-stable-10@FreeBSD.ORG Wed Sep 3 14:06:12 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CD275CC; Wed, 3 Sep 2014 14:06:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B82DA1D87; Wed, 3 Sep 2014 14:06:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83E6CJe051619; Wed, 3 Sep 2014 14:06:12 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83E6CaC051617; Wed, 3 Sep 2014 14:06:12 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409031406.s83E6CaC051617@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 3 Sep 2014 14:06:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271024 - stable/10/sys/dev/vt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 14:06:12 -0000 Author: emaste Date: Wed Sep 3 14:06:12 2014 New Revision: 271024 URL: http://svnweb.freebsd.org/changeset/base/271024 Log: MFC r270288 by dumbbell: vt(4): Constify vt_buf argument of vtbuf_iscursor() Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/vt/vt.h stable/10/sys/dev/vt/vt_buf.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/vt/vt.h ============================================================================== --- stable/10/sys/dev/vt/vt.h Wed Sep 3 14:00:37 2014 (r271023) +++ stable/10/sys/dev/vt/vt.h Wed Sep 3 14:06:12 2014 (r271024) @@ -192,7 +192,7 @@ void vtbuf_cursor_position(struct vt_buf void vtbuf_scroll_mode(struct vt_buf *vb, int yes); void vtbuf_undirty(struct vt_buf *, term_rect_t *, struct vt_bufmask *); void vtbuf_sethistory_size(struct vt_buf *, int); -int vtbuf_iscursor(struct vt_buf *vb, int row, int col); +int vtbuf_iscursor(const struct vt_buf *vb, int row, int col); void vtbuf_cursor_visibility(struct vt_buf *, int); #ifndef SC_NO_CUTPASTE void vtbuf_mouse_cursor_position(struct vt_buf *vb, int col, int row); Modified: stable/10/sys/dev/vt/vt_buf.c ============================================================================== --- stable/10/sys/dev/vt/vt_buf.c Wed Sep 3 14:00:37 2014 (r271023) +++ stable/10/sys/dev/vt/vt_buf.c Wed Sep 3 14:06:12 2014 (r271024) @@ -148,7 +148,7 @@ vtbuf_wth(struct vt_buf *vb, int row) /* Translate history row to current view row number. */ static int -vtbuf_htw(struct vt_buf *vb, int row) +vtbuf_htw(const struct vt_buf *vb, int row) { /* @@ -162,7 +162,7 @@ vtbuf_htw(struct vt_buf *vb, int row) } int -vtbuf_iscursor(struct vt_buf *vb, int row, int col) +vtbuf_iscursor(const struct vt_buf *vb, int row, int col) { int sc, sr, ec, er, tmp; From owner-svn-src-stable-10@FreeBSD.ORG Wed Sep 3 14:07:57 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 5A3CC217; Wed, 3 Sep 2014 14:07:57 +0000 (UTC) Date: Wed, 3 Sep 2014 14:07:57 +0000 From: Alexey Dokuchaev To: Ed Maste Subject: Re: svn commit: r271023 - stable/10/sys/dev/vt Message-ID: <20140903140757.GA7494@FreeBSD.org> References: <201409031400.s83E0bK6049810@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201409031400.s83E0bK6049810@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 14:07:57 -0000 On Wed, Sep 03, 2014 at 02:00:37PM +0000, Ed Maste wrote: > New Revision: 271023 > URL: http://svnweb.freebsd.org/changeset/base/271023 > > Log: > MFC r270280 by dumbbell: vt(4): Pause the flush timer while swithing window > > This fixes bad looking refresh when switching window: squares instead > of text, flashing screen, and so on. In the worst case, vt_flush() came > at a very inappropriate timing and the screen was not refreshed at all > (leaving squares all over the place). > > This doesn't fix the flickering of the screen with vt_vga, because the > sync signal is temporarily stopped and the video memory is cleared. Will this improve the current situation with switching ttys on the console? Right now it takes considerable time to switch, and sometimes the image is not properly restored. I'm also wondering why on PowerPC vt(4) behaves much better (switching is instant, no artifacts at all). ./danfe From owner-svn-src-stable-10@FreeBSD.ORG Wed Sep 3 14:34:42 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9232E6C1; Wed, 3 Sep 2014 14:34:42 +0000 (UTC) Received: from mail-ie0-x234.google.com (mail-ie0-x234.google.com [IPv6:2607:f8b0:4001:c03::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3A81311FA; Wed, 3 Sep 2014 14:34:42 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id rl12so9779869iec.39 for ; Wed, 03 Sep 2014 07:34:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=ZMGEXsTVvox03kySViY6Pq9luOyuxfX/dkVPjK/HsqE=; b=Fkqa0XJYsom8Qp8sEXjPAU//jDT/ilpxMZiq/GXp2DwK6Ojuvu42GrOedUHdOHYLnR hLzDGqPRKCzwioqXZhmuZFYG8igzUipnzgp2OLyyks4gY+1No60ip13rqpg+xpOYVXkx Jz+7ZjR9YEkvQTMTgYQFA1I+B3xUnYlMtByiQd4m3blfTO3mz9KDLgKZ8bWgN2/rT3Kx XLM9x9VJNqRXGH+vVXXLP0bkywEr/kAvAfCpaCEVLL85SV7C5Gjg5oUhyfwd0hYvqFyL I/7SWhN7d4DMLg0wIkzqUrPdpyy4/z7F1QKMnuPtLeN2Xqt0SZ7mt4BM0ZBcHu09JX1m cFdw== X-Received: by 10.43.136.134 with SMTP id ik6mr39008152icc.6.1409754881585; Wed, 03 Sep 2014 07:34:41 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.44.1 with HTTP; Wed, 3 Sep 2014 07:34:21 -0700 (PDT) In-Reply-To: <20140903140757.GA7494@FreeBSD.org> References: <201409031400.s83E0bK6049810@svn.freebsd.org> <20140903140757.GA7494@FreeBSD.org> From: Ed Maste Date: Wed, 3 Sep 2014 10:34:21 -0400 X-Google-Sender-Auth: mSSxTKBT5CaeCMUqJbl9pYcnXXc Message-ID: Subject: Re: svn commit: r271023 - stable/10/sys/dev/vt To: Alexey Dokuchaev Content-Type: text/plain; charset=UTF-8 Cc: svn-src-stable@freebsd.org, "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 14:34:42 -0000 On 3 September 2014 10:07, Alexey Dokuchaev wrote: > On Wed, Sep 03, 2014 at 02:00:37PM +0000, Ed Maste wrote: >> New Revision: 271023 >> URL: http://svnweb.freebsd.org/changeset/base/271023 >> >> Log: >> MFC r270280 by dumbbell: vt(4): Pause the flush timer while swithing window >> >> This fixes bad looking refresh when switching window: squares instead >> of text, flashing screen, and so on. In the worst case, vt_flush() came >> at a very inappropriate timing and the screen was not refreshed at all >> (leaving squares all over the place). >> >> This doesn't fix the flickering of the screen with vt_vga, because the >> sync signal is temporarily stopped and the video memory is cleared. > > Will this improve the current situation with switching ttys on the console? > Right now it takes considerable time to switch, and sometimes the image is > not properly restored. This should address the corruption on vt switch; I don't believe it will have an effect on the switching time. > I'm also wondering why on PowerPC vt(4) behaves much better (switching is > instant, no artifacts at all). The VGA vt(4) issues all stem from the relatively complex and arcane VGA hardware and a somewhat limited vt_vga implementation. Most of the issues have been sorted out in HEAD by dumbbell@ and those are in the pipeline to be merged. From owner-svn-src-stable-10@FreeBSD.ORG Wed Sep 3 14:57:53 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id C8FDA707; Wed, 3 Sep 2014 14:57:53 +0000 (UTC) Date: Wed, 3 Sep 2014 14:57:53 +0000 From: Alexey Dokuchaev To: Ed Maste Subject: Re: svn commit: r271023 - stable/10/sys/dev/vt Message-ID: <20140903145753.GA25935@FreeBSD.org> References: <201409031400.s83E0bK6049810@svn.freebsd.org> <20140903140757.GA7494@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-stable@freebsd.org, "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 14:57:53 -0000 On Wed, Sep 03, 2014 at 10:34:21AM -0400, Ed Maste wrote: > On 3 September 2014 10:07, Alexey Dokuchaev wrote: > > I'm also wondering why on PowerPC vt(4) behaves much better (switching is > > instant, no artifacts at all). > > The VGA vt(4) issues all stem from the relatively complex and arcane > VGA hardware and a somewhat limited vt_vga implementation. Can you elaborate a bit on the technical side of things? Particularly, it looks strange that syscons(4) was able to work just fine on "relatively complex and arcane VGA hardware", while more modern vt(4) is fighting with problems. Don't get me wrong, I greatly appreciate all of you guys' work, just want to understand better what are the challenges you're facing. Thank you, ./danfe From owner-svn-src-stable-10@FreeBSD.ORG Wed Sep 3 15:07:44 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2D43015B; Wed, 3 Sep 2014 15:07:44 +0000 (UTC) Received: from smarthost1.greenhost.nl (smarthost1.greenhost.nl [195.190.28.81]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DD68E1790; Wed, 3 Sep 2014 15:07:43 +0000 (UTC) Received: from smtp.greenhost.nl ([213.108.104.138]) by smarthost1.greenhost.nl with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1XPC9s-0005r0-Ky; Wed, 03 Sep 2014 17:07:40 +0200 Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes To: "Ed Maste" , "Alexey Dokuchaev" Subject: Re: svn commit: r271023 - stable/10/sys/dev/vt References: <201409031400.s83E0bK6049810@svn.freebsd.org> <20140903140757.GA7494@FreeBSD.org> <20140903145753.GA25935@FreeBSD.org> Date: Wed, 03 Sep 2014 17:07:39 +0200 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Ronald Klop" Message-ID: In-Reply-To: <20140903145753.GA25935@FreeBSD.org> User-Agent: Opera Mail/12.16 (FreeBSD) X-Authenticated-As-Hash: 398f5522cb258ce43cb679602f8cfe8b62a256d1 X-Virus-Scanned: by clamav at smarthost1.samage.net X-Spam-Level: / X-Spam-Score: -0.2 X-Spam-Status: No, score=-0.2 required=5.0 tests=ALL_TRUSTED, BAYES_50 autolearn=disabled version=3.3.2 X-Scan-Signature: 5a1627636b35b65657045ef62631cd80 Cc: svn-src-stable@freebsd.org, "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 15:07:44 -0000 On Wed, 03 Sep 2014 16:57:53 +0200, Alexey Dokuchaev wrote: > On Wed, Sep 03, 2014 at 10:34:21AM -0400, Ed Maste wrote: >> On 3 September 2014 10:07, Alexey Dokuchaev wrote: >> > I'm also wondering why on PowerPC vt(4) behaves much better >> (switching is >> > instant, no artifacts at all). >> >> The VGA vt(4) issues all stem from the relatively complex and arcane >> VGA hardware and a somewhat limited vt_vga implementation. > > Can you elaborate a bit on the technical side of things? Particularly, > it > looks strange that syscons(4) was able to work just fine on "relatively > complex and arcane VGA hardware", while more modern vt(4) is fighting > with > problems. AFAIK syscons works in the text mode of the BIOS. Not on VGA graphics mode. See the vt man page for textmode in vt_vga. http://www.freebsd.org/cgi/man.cgi?query=vt&manpath=FreeBSD+10.0-stable Regards. Ronald. > > Don't get me wrong, I greatly appreciate all of you guys' work, just want > to understand better what are the challenges you're facing. Thank you, > > ./danfe > _______________________________________________ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-stable-10@FreeBSD.ORG Wed Sep 3 16:46:26 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 531642F0; Wed, 3 Sep 2014 16:46:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E10513C1; Wed, 3 Sep 2014 16:46:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83GkQoJ029090; Wed, 3 Sep 2014 16:46:26 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83GkQkR029089; Wed, 3 Sep 2014 16:46:26 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409031646.s83GkQkR029089@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 3 Sep 2014 16:46:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271031 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 16:46:26 -0000 Author: gjb Date: Wed Sep 3 16:46:25 2014 New Revision: 271031 URL: http://svnweb.freebsd.org/changeset/base/271031 Log: Document r269065, iSCSI redirection handling Submitted by: trasz Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 3 15:48:07 2014 (r271030) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 3 16:46:25 2014 (r271031) @@ -552,6 +552,15 @@ significantly improved its performance and SMP scapability. + The + iSCSI initiator has been updated to + support redirection handling when an + iSCSI device is configured with multiple + IP addresses across different network + interfaces. Previously, clients connecting to + such iSCSI devices could require + additional client-side configuration. + New kernel-based iSCSI target and initiator code took many fixes and performance optimizations. From owner-svn-src-stable-10@FreeBSD.ORG Wed Sep 3 16:46:28 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 36C2A2FB; Wed, 3 Sep 2014 16:46:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 22CCF13C2; Wed, 3 Sep 2014 16:46:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83GkS44029133; Wed, 3 Sep 2014 16:46:28 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83GkR6e029132; Wed, 3 Sep 2014 16:46:28 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409031646.s83GkR6e029132@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 3 Sep 2014 16:46:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271032 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 16:46:28 -0000 Author: gjb Date: Wed Sep 3 16:46:27 2014 New Revision: 271032 URL: http://svnweb.freebsd.org/changeset/base/271032 Log: Document r265523, kern.iscsi.fail_on_disconnection Submitted by: trasz Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 3 16:46:25 2014 (r271031) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 3 16:46:27 2014 (r271032) @@ -561,6 +561,14 @@ such iSCSI devices could require additional client-side configuration. + A new + &man.sysctl.8;, + kern.iscsi.fail_on_disconnection, has + been added, which allows iSCSI clients to + remove the attached disk device when the connection to the + target is dropped, where previously I/O would stop until the + connection is restored. + New kernel-based iSCSI target and initiator code took many fixes and performance optimizations. From owner-svn-src-stable-10@FreeBSD.ORG Wed Sep 3 16:46:36 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 26D48744; Wed, 3 Sep 2014 16:46:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 125E513C8; Wed, 3 Sep 2014 16:46:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83GkZQF029326; Wed, 3 Sep 2014 16:46:35 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83GkZp8029325; Wed, 3 Sep 2014 16:46:35 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409031646.s83GkZp8029325@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 3 Sep 2014 16:46:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271036 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 16:46:36 -0000 Author: gjb Date: Wed Sep 3 16:46:35 2014 New Revision: 271036 URL: http://svnweb.freebsd.org/changeset/base/271036 Log: Remove a generalized sentence regarding iSCSI updates that should be covered by the past few commits. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 3 16:46:33 2014 (r271035) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 3 16:46:35 2014 (r271036) @@ -580,9 +580,6 @@ deferring wakeup until enough data has been received to read or write a file, reducing CPU usage and throughput performance with large I/O workloads. - - New kernel-based iSCSI target and initiator code took - many fixes and performance optimizations. From owner-svn-src-stable-10@FreeBSD.ORG Wed Sep 3 16:46:30 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7C3DD364; Wed, 3 Sep 2014 16:46:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 66B1613C3; Wed, 3 Sep 2014 16:46:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83GkUf2029176; Wed, 3 Sep 2014 16:46:30 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83GkUJd029175; Wed, 3 Sep 2014 16:46:30 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409031646.s83GkUJd029175@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 3 Sep 2014 16:46:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271033 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 16:46:30 -0000 Author: gjb Date: Wed Sep 3 16:46:29 2014 New Revision: 271033 URL: http://svnweb.freebsd.org/changeset/base/271033 Log: Document r265524, iSCSI lock contention optimizations. Submitted by: trasz Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 3 16:46:27 2014 (r271032) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 3 16:46:29 2014 (r271033) @@ -569,6 +569,11 @@ target is dropped, where previously I/O would stop until the connection is restored. + The + iSCSI transmit code has been optimized + to coalesce PDUs and avoid lock + contention. + New kernel-based iSCSI target and initiator code took many fixes and performance optimizations. From owner-svn-src-stable-10@FreeBSD.ORG Wed Sep 3 16:46:32 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8D5CC4E2; Wed, 3 Sep 2014 16:46:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48FB513C4; Wed, 3 Sep 2014 16:46:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83GkWkY029224; Wed, 3 Sep 2014 16:46:32 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83GkW2n029223; Wed, 3 Sep 2014 16:46:32 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409031646.s83GkW2n029223@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 3 Sep 2014 16:46:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271034 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 16:46:32 -0000 Author: gjb Date: Wed Sep 3 16:46:31 2014 New Revision: 271034 URL: http://svnweb.freebsd.org/changeset/base/271034 Log: Document r265524, iSCSI performance optimizations. Submitted by: trasz Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 3 16:46:29 2014 (r271033) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 3 16:46:31 2014 (r271034) @@ -574,6 +574,13 @@ to coalesce PDUs and avoid lock contention. + Several performance optimizations have been + made to the iSCSI subsystem, including + deferring wakeup until enough data has been received to + read or write a file, reducing CPU usage + and throughput performance with large I/O workloads. + New kernel-based iSCSI target and initiator code took many fixes and performance optimizations. From owner-svn-src-stable-10@FreeBSD.ORG Wed Sep 3 16:46:34 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3EA6A61B; Wed, 3 Sep 2014 16:46:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2A59F13C7; Wed, 3 Sep 2014 16:46:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83GkYn9029279; Wed, 3 Sep 2014 16:46:34 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83GkYaU029278; Wed, 3 Sep 2014 16:46:34 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409031646.s83GkYaU029278@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 3 Sep 2014 16:46:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271035 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 16:46:34 -0000 Author: gjb Date: Wed Sep 3 16:46:33 2014 New Revision: 271035 URL: http://svnweb.freebsd.org/changeset/base/271035 Log: Expand r262855 to illustrate how to enable the test suite. Submitted by: jmmv Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 3 16:46:31 2014 (r271034) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 3 16:46:33 2014 (r271035) @@ -865,7 +865,10 @@ location of the file. The ATF test - suite has been updated to version 0.20. + suite has been updated to version 0.20. The test suite is + disabled by default in &os; 10.1, and can be enabled by + adding WITH_TESTS=yes to + &man.src.conf.5;. The libucl library (Unified Configuration Library) has been merged from From owner-svn-src-stable-10@FreeBSD.ORG Wed Sep 3 16:46:38 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 42299936; Wed, 3 Sep 2014 16:46:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E311D13CD; Wed, 3 Sep 2014 16:46:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83Gkbpp029371; Wed, 3 Sep 2014 16:46:37 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83GkbYY029370; Wed, 3 Sep 2014 16:46:37 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409031646.s83GkbYY029370@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 3 Sep 2014 16:46:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271037 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 16:46:38 -0000 Author: gjb Date: Wed Sep 3 16:46:37 2014 New Revision: 271037 URL: http://svnweb.freebsd.org/changeset/base/271037 Log: Minor rewording to the r260385 entry. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 3 16:46:35 2014 (r271036) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 3 16:46:37 2014 (r271037) @@ -588,10 +588,10 @@ The &man.geom.4; subsystem has been updated to support I/O direct dispatch. When safety requirements are met, it - allows to avoid passing I/O requests to GEOM + enables avoiding passing I/O requests to GEOM g_up/g_down thread, - executing them directly in the caller context. That allows - to avoid CPU bottlenecks in + executing them directly in the caller context, avoiding + CPU bottlenecks in g_up/g_down threads, plus avoid several context switches per I/O. From owner-svn-src-stable-10@FreeBSD.ORG Wed Sep 3 16:46:40 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0FA009F1; Wed, 3 Sep 2014 16:46:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C790813CF; Wed, 3 Sep 2014 16:46:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83Gkd8n029416; Wed, 3 Sep 2014 16:46:39 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83GkdYF029415; Wed, 3 Sep 2014 16:46:39 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409031646.s83GkdYF029415@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 3 Sep 2014 16:46:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271038 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 16:46:40 -0000 Author: gjb Date: Wed Sep 3 16:46:39 2014 New Revision: 271038 URL: http://svnweb.freebsd.org/changeset/base/271038 Log: Document r270892, autofs(5) Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 3 16:46:37 2014 (r271037) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 3 16:46:39 2014 (r271038) @@ -839,6 +839,16 @@ multi-threaded soft updates. Previously, soft updates were handled by a single thread, and as of this change, now have one thread per FFS mountpoint. + + The + new filesystem automount facility, &man.autofs.5;, has been + merged from &os;-CURRENT. The new &man.autofs.5; facility + is similar to that found in other &unix;-like operating + systems, such as OS X™ and Solaris™. The + &man.autofs.5; facility uses a &sun;-compatible + &man.auto.master.5; configuration file, and is administered + with the &man.automount.8; userland utility, and the + &man.automountd.8; and &man.autounmountd.8; daemons. From owner-svn-src-stable-10@FreeBSD.ORG Wed Sep 3 16:46:44 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 81CF3C97; Wed, 3 Sep 2014 16:46:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6CC4A13D4; Wed, 3 Sep 2014 16:46:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83Gkid0029510; Wed, 3 Sep 2014 16:46:44 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83GkiAi029508; Wed, 3 Sep 2014 16:46:44 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409031646.s83GkiAi029508@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 3 Sep 2014 16:46:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271040 - in stable/10/release/doc: en_US.ISO8859-1/relnotes share/xml X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 16:46:44 -0000 Author: gjb Date: Wed Sep 3 16:46:43 2014 New Revision: 271040 URL: http://svnweb.freebsd.org/changeset/base/271040 Log: Document r270997, zdb(8) included in /rescue. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml stable/10/release/doc/share/xml/vendor.ent Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 3 16:46:41 2014 (r271039) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 3 16:46:43 2014 (r271040) @@ -1177,6 +1177,13 @@ facility has been added to the &man.pam.group.8; module. + The + &man.zdb.8; utility is now included in the set of applications + installed in the /rescue environment, making it + possible to examine &man.zfs.8; filesystems when /usr is unavailable. + <filename>/etc/rc.d</filename> Scripts Modified: stable/10/release/doc/share/xml/vendor.ent ============================================================================== --- stable/10/release/doc/share/xml/vendor.ent Wed Sep 3 16:46:41 2014 (r271039) +++ stable/10/release/doc/share/xml/vendor.ent Wed Sep 3 16:46:43 2014 (r271040) @@ -10,4 +10,6 @@ + + From owner-svn-src-stable-10@FreeBSD.ORG Wed Sep 3 16:46:42 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2B590B50; Wed, 3 Sep 2014 16:46:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1726413D2; Wed, 3 Sep 2014 16:46:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83GkfGY029464; Wed, 3 Sep 2014 16:46:41 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83GkfmC029460; Wed, 3 Sep 2014 16:46:41 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409031646.s83GkfmC029460@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 3 Sep 2014 16:46:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271039 - in stable/10/release/doc: en_US.ISO8859-1/relnotes share/xml X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 16:46:42 -0000 Author: gjb Date: Wed Sep 3 16:46:41 2014 New Revision: 271039 URL: http://svnweb.freebsd.org/changeset/base/271039 Log: Document r270810, hptnr(4) update to 1.0.1. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml stable/10/release/doc/share/xml/vendor.ent Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 3 16:46:39 2014 (r271038) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 3 16:46:41 2014 (r271039) @@ -757,6 +757,10 @@ integration for better performance. + + The &man.hptnr.4; driver has been + updated to version 1.0.1. Modified: stable/10/release/doc/share/xml/vendor.ent ============================================================================== --- stable/10/release/doc/share/xml/vendor.ent Wed Sep 3 16:46:39 2014 (r271038) +++ stable/10/release/doc/share/xml/vendor.ent Wed Sep 3 16:46:41 2014 (r271039) @@ -9,3 +9,5 @@ --> + + From owner-svn-src-stable-10@FreeBSD.ORG Wed Sep 3 16:46:46 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6A675DA5; Wed, 3 Sep 2014 16:46:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 52FDD13D6; Wed, 3 Sep 2014 16:46:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83Gkk4J029552; Wed, 3 Sep 2014 16:46:46 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83GkknR029551; Wed, 3 Sep 2014 16:46:46 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409031646.s83GkknR029551@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 3 Sep 2014 16:46:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271041 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 16:46:46 -0000 Author: gjb Date: Wed Sep 3 16:46:45 2014 New Revision: 271041 URL: http://svnweb.freebsd.org/changeset/base/271041 Log: Document r270890, pathchk(1): Ensure bytes >= 128 are considered non-portable characters. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 3 16:46:43 2014 (r271040) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 3 16:46:45 2014 (r271041) @@ -1177,6 +1177,10 @@ facility has been added to the &man.pam.group.8; module. + The &man.pathchk.1; utility has been + updated to ensure bytes greater than or equal to 128 are + considered non-portable. + The &man.zdb.8; utility is now included in the set of applications installed in the Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9F581FEB; Wed, 3 Sep 2014 16:48:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A5A1143C; Wed, 3 Sep 2014 16:48:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83GmXfZ029916; Wed, 3 Sep 2014 16:48:33 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83GmXkJ029915; Wed, 3 Sep 2014 16:48:33 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409031648.s83GmXkJ029915@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 3 Sep 2014 16:48:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271042 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 16:48:33 -0000 Author: gjb Date: Wed Sep 3 16:48:33 2014 New Revision: 271042 URL: http://svnweb.freebsd.org/changeset/base/271042 Log: Minor rewording to the r260387 entry. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 3 16:46:45 2014 (r271041) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 3 16:48:33 2014 (r271042) @@ -601,9 +601,9 @@ The &man.cam.4; subsystem has been updated to support - finer-grained locking, direct dispatch and multi-queue. - Combined with &man.geom.4; direct dispatch that allows to - reduce lock congestion and improve SMP + finer-grained locking, direct dispatch and multi-queue, + which combined with &man.geom.4; direct dispatch, reduces + lock congestion and improves SMP scalability of the SCSI/ATA stack. The &man.geom.8; From owner-svn-src-stable-10@FreeBSD.ORG Wed Sep 3 20:07:28 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B9420FA0; Wed, 3 Sep 2014 20:07:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9860E1DA8; Wed, 3 Sep 2014 20:07:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83K7S3k024567; Wed, 3 Sep 2014 20:07:28 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83K7QUw024552; Wed, 3 Sep 2014 20:07:26 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201409032007.s83K7QUw024552@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Wed, 3 Sep 2014 20:07:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271051 - in stable/10/sys: arm/broadcom/bcm2835 arm/freescale/imx arm/ti dev/sdhci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 20:07:28 -0000 Author: marius Date: Wed Sep 3 20:07:26 2014 New Revision: 271051 URL: http://svnweb.freebsd.org/changeset/base/271051 Log: MFC: r270885, r270948 - Nuke unused sdhci_softc. - Static'ize sdhci_debug local to sdhci.c. - Const'ify PCI device description strings. - Nuke redundant resource ID members from sdhci_pci_softc. - Nuke unused hw.sdhci_pci.debug tunable. - Add support for using MSI instead of INTx, controllable via the tunable hw.sdhci.enable_msi (defaulting to on) and tested with a RICOH R5CE823 SD controller. - Use NULL instead of 0 for pointers. Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c stable/10/sys/arm/freescale/imx/imx_sdhci.c stable/10/sys/arm/ti/ti_sdhci.c stable/10/sys/dev/sdhci/sdhci.c stable/10/sys/dev/sdhci/sdhci.h stable/10/sys/dev/sdhci/sdhci_fdt.c stable/10/sys/dev/sdhci/sdhci_if.m stable/10/sys/dev/sdhci/sdhci_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c ============================================================================== --- stable/10/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Wed Sep 3 19:37:41 2014 (r271050) +++ stable/10/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Wed Sep 3 20:07:26 2014 (r271051) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: stable/10/sys/arm/freescale/imx/imx_sdhci.c ============================================================================== --- stable/10/sys/arm/freescale/imx/imx_sdhci.c Wed Sep 3 19:37:41 2014 (r271050) +++ stable/10/sys/arm/freescale/imx/imx_sdhci.c Wed Sep 3 20:07:26 2014 (r271051) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: stable/10/sys/arm/ti/ti_sdhci.c ============================================================================== --- stable/10/sys/arm/ti/ti_sdhci.c Wed Sep 3 19:37:41 2014 (r271050) +++ stable/10/sys/arm/ti/ti_sdhci.c Wed Sep 3 20:07:26 2014 (r271051) @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: stable/10/sys/dev/sdhci/sdhci.c ============================================================================== --- stable/10/sys/dev/sdhci/sdhci.c Wed Sep 3 19:37:41 2014 (r271050) +++ stable/10/sys/dev/sdhci/sdhci.c Wed Sep 3 20:07:26 2014 (r271051) @@ -52,23 +52,11 @@ __FBSDID("$FreeBSD$"); #include "sdhci.h" #include "sdhci_if.h" -struct sdhci_softc; +SYSCTL_NODE(_hw, OID_AUTO, sdhci, CTLFLAG_RD, 0, "sdhci driver"); -struct sdhci_softc { - device_t dev; /* Controller device */ - struct resource *irq_res; /* IRQ resource */ - int irq_rid; - void *intrhand; /* Interrupt handle */ - - int num_slots; /* Number of slots on this controller */ - struct sdhci_slot slots[6]; -}; - -static SYSCTL_NODE(_hw, OID_AUTO, sdhci, CTLFLAG_RD, 0, "sdhci driver"); - -int sdhci_debug = 0; +static int sdhci_debug; TUNABLE_INT("hw.sdhci.debug", &sdhci_debug); -SYSCTL_INT(_hw_sdhci, OID_AUTO, debug, CTLFLAG_RW, &sdhci_debug, 0, "Debug level"); +SYSCTL_INT(_hw_sdhci, OID_AUTO, debug, CTLFLAG_RWTUN, &sdhci_debug, 0, "Debug level"); #define RD1(slot, off) SDHCI_READ_1((slot)->bus, (slot), (off)) #define RD2(slot, off) SDHCI_READ_2((slot)->bus, (slot), (off)) Modified: stable/10/sys/dev/sdhci/sdhci.h ============================================================================== --- stable/10/sys/dev/sdhci/sdhci.h Wed Sep 3 19:37:41 2014 (r271050) +++ stable/10/sys/dev/sdhci/sdhci.h Wed Sep 3 20:07:26 2014 (r271051) @@ -223,6 +223,8 @@ #define SDHCI_SPEC_200 1 #define SDHCI_SPEC_300 2 +SYSCTL_DECL(_hw_sdhci); + struct sdhci_slot { u_int quirks; /* Chip specific quirks */ u_int caps; /* Override SDHCI_CAPABILITIES */ Modified: stable/10/sys/dev/sdhci/sdhci_fdt.c ============================================================================== --- stable/10/sys/dev/sdhci/sdhci_fdt.c Wed Sep 3 19:37:41 2014 (r271050) +++ stable/10/sys/dev/sdhci/sdhci_fdt.c Wed Sep 3 20:07:26 2014 (r271051) @@ -180,7 +180,6 @@ sdhci_fdt_probe(device_t dev) if ((OF_getencprop(node, "max-frequency", &cid, sizeof(cid))) > 0) sc->max_clk = cid; - return (0); } @@ -189,7 +188,7 @@ sdhci_fdt_attach(device_t dev) { struct sdhci_fdt_softc *sc = device_get_softc(dev); int err, slots, rid, i; - + sc->dev = dev; /* Allocate IRQ. */ @@ -241,7 +240,7 @@ sdhci_fdt_attach(device_t dev) struct sdhci_slot *slot = &sc->slots[i]; sdhci_start_slot(slot); } - + return (0); } @@ -305,5 +304,6 @@ static driver_t sdhci_fdt_driver = { }; static devclass_t sdhci_fdt_devclass; -DRIVER_MODULE(sdhci_fdt, simplebus, sdhci_fdt_driver, sdhci_fdt_devclass, 0,0); +DRIVER_MODULE(sdhci_fdt, simplebus, sdhci_fdt_driver, sdhci_fdt_devclass, + NULL, NULL); MODULE_DEPEND(sdhci_fdt, sdhci, 1, 1, 1); Modified: stable/10/sys/dev/sdhci/sdhci_if.m ============================================================================== --- stable/10/sys/dev/sdhci/sdhci_if.m Wed Sep 3 19:37:41 2014 (r271050) +++ stable/10/sys/dev/sdhci/sdhci_if.m Wed Sep 3 20:07:26 2014 (r271051) @@ -62,6 +62,7 @@ #include #include #include +#include #include #include Modified: stable/10/sys/dev/sdhci/sdhci_pci.c ============================================================================== --- stable/10/sys/dev/sdhci/sdhci_pci.c Wed Sep 3 19:37:41 2014 (r271050) +++ stable/10/sys/dev/sdhci/sdhci_pci.c Wed Sep 3 20:07:26 2014 (r271051) @@ -78,7 +78,7 @@ __FBSDID("$FreeBSD$"); static const struct sdhci_device { uint32_t model; uint16_t subvendor; - char *desc; + const char *desc; u_int quirks; } sdhci_devices[] = { { 0x08221180, 0xffff, "RICOH R5C822 SD", @@ -112,20 +112,17 @@ struct sdhci_pci_softc { device_t dev; /* Controller device */ u_int quirks; /* Chip specific quirks */ struct resource *irq_res; /* IRQ resource */ - int irq_rid; void *intrhand; /* Interrupt handle */ int num_slots; /* Number of slots on this controller */ struct sdhci_slot slots[6]; struct resource *mem_res[6]; /* Memory resource */ - int mem_rid[6]; }; -static SYSCTL_NODE(_hw, OID_AUTO, sdhci_pci, CTLFLAG_RD, 0, "sdhci PCI driver"); - -int sdhci_pci_debug; -TUNABLE_INT("hw.sdhci_pci.debug", &sdhci_pci_debug); -SYSCTL_INT(_hw_sdhci_pci, OID_AUTO, debug, CTLFLAG_RW, &sdhci_pci_debug, 0, "Debug level"); +static int sdhci_enable_msi = 1; +TUNABLE_INT("hw.sdhci.enable_msi", &sdhci_enable_msi); +SYSCTL_INT(_hw_sdhci, OID_AUTO, enable_msi, CTLFLAG_RDTUN, &sdhci_enable_msi, + 0, "Enable MSI interrupts"); static uint8_t sdhci_pci_read_1(device_t dev, struct sdhci_slot *slot, bus_size_t off) @@ -232,13 +229,13 @@ sdhci_pci_probe(device_t dev) uint16_t subvendor; uint8_t class, subclass; int i, result; - + model = (uint32_t)pci_get_device(dev) << 16; model |= (uint32_t)pci_get_vendor(dev) & 0x0000ffff; subvendor = pci_get_subvendor(dev); class = pci_get_class(dev); subclass = pci_get_subclass(dev); - + result = ENXIO; for (i = 0; sdhci_devices[i].model != 0; i++) { if (sdhci_devices[i].model == model && @@ -254,7 +251,7 @@ sdhci_pci_probe(device_t dev) device_set_desc(dev, "Generic SD HCI"); result = BUS_PROBE_GENERIC; } - + return (result); } @@ -265,7 +262,7 @@ sdhci_pci_attach(device_t dev) uint32_t model; uint16_t subvendor; uint8_t class, subclass, progif; - int err, slots, bar, i; + int bar, err, rid, slots, i; sc->dev = dev; model = (uint32_t)pci_get_device(dev) << 16; @@ -296,11 +293,15 @@ sdhci_pci_attach(device_t dev) return (EINVAL); } /* Allocate IRQ. */ - sc->irq_rid = 0; - sc->irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->irq_rid, - RF_SHAREABLE | RF_ACTIVE); + i = 1; + rid = 0; + if (sdhci_enable_msi != 0 && pci_alloc_msi(dev, &i) == 0) + rid = 1; + sc->irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, + RF_ACTIVE | (rid != 0 ? 0 : RF_SHAREABLE)); if (sc->irq_res == NULL) { device_printf(dev, "Can't allocate IRQ\n"); + pci_release_msi(dev); return (ENOMEM); } /* Scan all slots. */ @@ -308,9 +309,9 @@ sdhci_pci_attach(device_t dev) struct sdhci_slot *slot = &sc->slots[sc->num_slots]; /* Allocate memory. */ - sc->mem_rid[i] = PCIR_BAR(bar + i); - sc->mem_res[i] = bus_alloc_resource(dev, - SYS_RES_MEMORY, &(sc->mem_rid[i]), 0ul, ~0ul, 0x100, RF_ACTIVE); + rid = PCIR_BAR(bar + i); + sc->mem_res[i] = bus_alloc_resource(dev, SYS_RES_MEMORY, + &rid, 0ul, ~0ul, 0x100, RF_ACTIVE); if (sc->mem_res[i] == NULL) { device_printf(dev, "Can't allocate memory for slot %d\n", i); continue; @@ -319,7 +320,6 @@ sdhci_pci_attach(device_t dev) if (sdhci_init_slot(dev, slot, i) != 0) continue; - sc->num_slots++; } device_printf(dev, "%d slot(s) allocated\n", sc->num_slots); @@ -335,7 +335,7 @@ sdhci_pci_attach(device_t dev) sdhci_start_slot(slot); } - + return (0); } @@ -347,14 +347,15 @@ sdhci_pci_detach(device_t dev) bus_teardown_intr(dev, sc->irq_res, sc->intrhand); bus_release_resource(dev, SYS_RES_IRQ, - sc->irq_rid, sc->irq_res); + rman_get_rid(sc->irq_res), sc->irq_res); + pci_release_msi(dev); for (i = 0; i < sc->num_slots; i++) { struct sdhci_slot *slot = &sc->slots[i]; sdhci_cleanup_slot(slot); bus_release_resource(dev, SYS_RES_MEMORY, - sc->mem_rid[i], sc->mem_res[i]); + rman_get_rid(sc->mem_res[i]), sc->mem_res[i]); } return (0); } @@ -369,7 +370,7 @@ sdhci_pci_suspend(device_t dev) if (err) return (err); for (i = 0; i < sc->num_slots; i++) - sdhci_generic_suspend(&sc->slots[i]); + sdhci_generic_suspend(&sc->slots[i]); return (0); } @@ -384,7 +385,6 @@ sdhci_pci_resume(device_t dev) return (bus_generic_resume(dev)); } - static void sdhci_pci_intr(void *arg) { @@ -436,5 +436,6 @@ static driver_t sdhci_pci_driver = { }; static devclass_t sdhci_pci_devclass; -DRIVER_MODULE(sdhci_pci, pci, sdhci_pci_driver, sdhci_pci_devclass, 0, 0); +DRIVER_MODULE(sdhci_pci, pci, sdhci_pci_driver, sdhci_pci_devclass, NULL, + NULL); MODULE_DEPEND(sdhci_pci, sdhci, 1, 1, 1); From owner-svn-src-stable-10@FreeBSD.ORG Wed Sep 3 20:53:12 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7E1F2635; Wed, 3 Sep 2014 20:53:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5574413BF; Wed, 3 Sep 2014 20:53:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83KrCOp057895; Wed, 3 Sep 2014 20:53:12 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83KrCPh057894; Wed, 3 Sep 2014 20:53:12 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409032053.s83KrCPh057894@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 3 Sep 2014 20:53:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271052 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 20:53:12 -0000 Author: gjb Date: Wed Sep 3 20:53:11 2014 New Revision: 271052 URL: http://svnweb.freebsd.org/changeset/base/271052 Log: Document libc updates from illumos and Apple. Submitted by: pfg Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 3 20:07:26 2014 (r271051) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 3 20:53:11 2014 (r271052) @@ -1188,6 +1188,10 @@ possible to examine &man.zfs.8; filesystems when /usr is unavailable. + Several libc improvements have been + merged from illumos™ and &apple;, providing better + internationalization support and &posix; compliance. + <filename>/etc/rc.d</filename> Scripts From owner-svn-src-stable-10@FreeBSD.ORG Wed Sep 3 23:04:24 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2D11A3CD; Wed, 3 Sep 2014 23:04:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1888913E0; Wed, 3 Sep 2014 23:04:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83N4NS7021974; Wed, 3 Sep 2014 23:04:23 GMT (envelope-from gavin@FreeBSD.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83N4N2q021973; Wed, 3 Sep 2014 23:04:23 GMT (envelope-from gavin@FreeBSD.org) Message-Id: <201409032304.s83N4N2q021973@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gavin set sender to gavin@FreeBSD.org using -f From: Gavin Atkinson Date: Wed, 3 Sep 2014 23:04:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271058 - stable/10/sbin/camcontrol X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 23:04:24 -0000 Author: gavin Date: Wed Sep 3 23:04:23 2014 New Revision: 271058 URL: http://svnweb.freebsd.org/changeset/base/271058 Log: Merge 270872 from head: Fix character case in examples for "camcontrol security" - should be "-U user" not "-u user". PR: 193179 Submitted by: milios ccsys com Modified: stable/10/sbin/camcontrol/camcontrol.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/camcontrol/camcontrol.8 ============================================================================== --- stable/10/sbin/camcontrol/camcontrol.8 Wed Sep 3 21:59:07 2014 (r271057) +++ stable/10/sbin/camcontrol/camcontrol.8 Wed Sep 3 23:04:23 2014 (r271058) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 20, 2013 +.Dd August 31, 2014 .Dt CAMCONTROL 8 .Os .Sh NAME @@ -1884,12 +1884,12 @@ camcontrol security ada0 .Pp Report security support and settings for ada0 .Bd -literal -offset indent -camcontrol security ada0 -u user -s MyPass +camcontrol security ada0 -U user -s MyPass .Ed .Pp Enable security on device ada0 with the password MyPass .Bd -literal -offset indent -camcontrol security ada0 -u user -e MyPass +camcontrol security ada0 -U user -e MyPass .Ed .Pp Secure erase ada0 which has had security enabled with user password MyPass From owner-svn-src-stable-10@FreeBSD.ORG Wed Sep 3 23:08:21 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D5D8068B; Wed, 3 Sep 2014 23:08:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C17991474; Wed, 3 Sep 2014 23:08:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83N8LY3022732; Wed, 3 Sep 2014 23:08:21 GMT (envelope-from gavin@FreeBSD.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83N8LGv022731; Wed, 3 Sep 2014 23:08:21 GMT (envelope-from gavin@FreeBSD.org) Message-Id: <201409032308.s83N8LGv022731@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gavin set sender to gavin@FreeBSD.org using -f From: Gavin Atkinson Date: Wed, 3 Sep 2014 23:08:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271060 - stable/10/sys/dev/pccbb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 23:08:22 -0000 Author: gavin Date: Wed Sep 3 23:08:21 2014 New Revision: 271060 URL: http://svnweb.freebsd.org/changeset/base/271060 Log: Merge r269488 from head: For reasons which are not clear, r254263 broke some PCMCIA and CardBus bridges in strange ways, either rendering them unable to detect insertion and removal events, or possibly unable to read from the device behind the bridge. This fixes at least one laptop, a Toshiba Tecra M5 with a Texas Instruments PCxx12 (d=0x8039 v=0c104c) bridge. The very similar Tecra M9 has the same bridge, but worked fine without this change. The bridge chip has no I/O port BAR, and there is nothing in the spec to suggest I/O decoding should be enabled; however enabling it fixes the issue. Add an XXX comment to this effect. Discussed with: jhb, imp Modified: stable/10/sys/dev/pccbb/pccbb_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/pccbb/pccbb_pci.c ============================================================================== --- stable/10/sys/dev/pccbb/pccbb_pci.c Wed Sep 3 23:06:22 2014 (r271059) +++ stable/10/sys/dev/pccbb/pccbb_pci.c Wed Sep 3 23:08:21 2014 (r271060) @@ -472,6 +472,8 @@ cbb_chipinit(struct cbb_softc *sc) /* Enable memory access */ pci_enable_busmaster(sc->dev); + /* XXX: This should not be necessary, but some chipsets require it */ + PCI_MASK_CONFIG(sc->dev, PCIR_COMMAND, | PCIM_CMD_PORTEN, 2); /* disable Legacy IO */ switch (sc->chipset) { From owner-svn-src-stable-10@FreeBSD.ORG Wed Sep 3 23:11:39 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DF36394A; Wed, 3 Sep 2014 23:11:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CA8BB1560; Wed, 3 Sep 2014 23:11:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83NBd3J026738; Wed, 3 Sep 2014 23:11:39 GMT (envelope-from gavin@FreeBSD.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83NBdX4026737; Wed, 3 Sep 2014 23:11:39 GMT (envelope-from gavin@FreeBSD.org) Message-Id: <201409032311.s83NBdX4026737@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gavin set sender to gavin@FreeBSD.org using -f From: Gavin Atkinson Date: Wed, 3 Sep 2014 23:11:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271062 - stable/10/share/man/man3 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 23:11:40 -0000 Author: gavin Date: Wed Sep 3 23:11:39 2014 New Revision: 271062 URL: http://svnweb.freebsd.org/changeset/base/271062 Log: Merge r269871 from head: Clarify descriptions of pthread_cond_wait() and pthread_cond_timedwait() Submitted by: Malcolm Douglas via freebsd-doc Reviewed by: jhb Modified: stable/10/share/man/man3/pthread.3 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man3/pthread.3 ============================================================================== --- stable/10/share/man/man3/pthread.3 Wed Sep 3 23:08:48 2014 (r271061) +++ stable/10/share/man/man3/pthread.3 Wed Sep 3 23:11:39 2014 (r271062) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 8, 2010 +.Dd August 12, 2014 .Dt PTHREAD 3 .Os .Sh NAME @@ -344,13 +344,13 @@ Unblock at least one of the threads bloc .Fa "const struct timespec *abstime" .Fc .Xc -Wait no longer than the specified time for a condition -and lock the specified mutex. +Unlock the specified mutex, wait no longer than the specified time for +a condition, and then relock the mutex. .It Xo .Ft int .Fn pthread_cond_wait "pthread_cond_t *" "pthread_mutex_t *mutex" .Xc -Wait for a condition and lock the specified mutex. +Unlock the specified mutex, wait for a condition, and relock the mutex. .El .Ss Read/Write Lock Routines .Bl -tag -width indent From owner-svn-src-stable-10@FreeBSD.ORG Wed Sep 3 23:14:27 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8AC60BD2; Wed, 3 Sep 2014 23:14:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 763C7158C; Wed, 3 Sep 2014 23:14:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83NERxo027197; Wed, 3 Sep 2014 23:14:27 GMT (envelope-from gavin@FreeBSD.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83NER2R027196; Wed, 3 Sep 2014 23:14:27 GMT (envelope-from gavin@FreeBSD.org) Message-Id: <201409032314.s83NER2R027196@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gavin set sender to gavin@FreeBSD.org using -f From: Gavin Atkinson Date: Wed, 3 Sep 2014 23:14:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271064 - stable/10/share/man/man9 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 23:14:27 -0000 Author: gavin Date: Wed Sep 3 23:14:26 2014 New Revision: 271064 URL: http://svnweb.freebsd.org/changeset/base/271064 Log: Merge r270251 from head: Fix return type of callout_init_rm() and add return type to callout_deactivate(). PR: 192520 Submitted by: ngie Modified: stable/10/share/man/man9/timeout.9 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man9/timeout.9 ============================================================================== --- stable/10/share/man/man9/timeout.9 Wed Sep 3 23:11:41 2014 (r271063) +++ stable/10/share/man/man9/timeout.9 Wed Sep 3 23:14:26 2014 (r271064) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 23, 2013 +.Dd August 21, 2014 .Dt TIMEOUT 9 .Os .Sh NAME @@ -74,7 +74,7 @@ struct callout_handle handle = CALLOUT_H .Fn callout_init "struct callout *c" "int mpsafe" .Ft void .Fn callout_init_mtx "struct callout *c" "struct mtx *mtx" "int flags" -.Fn void +.Ft void .Fn callout_init_rm "struct callout *c" "struct rmlock *rm" "int flags" .Ft void .Fn callout_init_rw "struct callout *c" "struct rwlock *rw" "int flags" @@ -103,6 +103,7 @@ struct callout_handle handle = CALLOUT_H .Fn callout_pending "struct callout *c" .Ft int .Fn callout_active "struct callout *c" +.Ft void .Fn callout_deactivate "struct callout *c" .Sh DESCRIPTION The function From owner-svn-src-stable-10@FreeBSD.ORG Wed Sep 3 23:15:54 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C9E87D47; Wed, 3 Sep 2014 23:15:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B5AA415BA; Wed, 3 Sep 2014 23:15:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83NFsCS027471; Wed, 3 Sep 2014 23:15:54 GMT (envelope-from gavin@FreeBSD.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83NFsgt027470; Wed, 3 Sep 2014 23:15:54 GMT (envelope-from gavin@FreeBSD.org) Message-Id: <201409032315.s83NFsgt027470@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gavin set sender to gavin@FreeBSD.org using -f From: Gavin Atkinson Date: Wed, 3 Sep 2014 23:15:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271065 - stable/10/sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 23:15:54 -0000 Author: gavin Date: Wed Sep 3 23:15:54 2014 New Revision: 271065 URL: http://svnweb.freebsd.org/changeset/base/271065 Log: Merge r270259 from head: Add a missing brace to callout_init_rm() to fix syntax. Modified: stable/10/sys/sys/callout.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/sys/callout.h ============================================================================== --- stable/10/sys/sys/callout.h Wed Sep 3 23:14:26 2014 (r271064) +++ stable/10/sys/sys/callout.h Wed Sep 3 23:15:54 2014 (r271065) @@ -72,7 +72,7 @@ void _callout_init_lock(struct callout * _callout_init_lock((c), ((mtx) != NULL) ? &(mtx)->lock_object : \ NULL, (flags)) #define callout_init_rm(c, rm, flags) \ - _callout_init_lock((c), ((rm != NULL) ? &(rm)->lock_object : \ + _callout_init_lock((c), ((rm) != NULL) ? &(rm)->lock_object : \ NULL, (flags)) #define callout_init_rw(c, rw, flags) \ _callout_init_lock((c), ((rw) != NULL) ? &(rw)->lock_object : \ From owner-svn-src-stable-10@FreeBSD.ORG Wed Sep 3 23:18:13 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A5DF1A2; Wed, 3 Sep 2014 23:18:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 917341731; Wed, 3 Sep 2014 23:18:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83NIDOI027885; Wed, 3 Sep 2014 23:18:13 GMT (envelope-from gavin@FreeBSD.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83NID1x027884; Wed, 3 Sep 2014 23:18:13 GMT (envelope-from gavin@FreeBSD.org) Message-Id: <201409032318.s83NID1x027884@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gavin set sender to gavin@FreeBSD.org using -f From: Gavin Atkinson Date: Wed, 3 Sep 2014 23:18:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271067 - stable/10/etc/pam.d X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 23:18:13 -0000 Author: gavin Date: Wed Sep 3 23:18:13 2014 New Revision: 271067 URL: http://svnweb.freebsd.org/changeset/base/271067 Log: Merge r270677 from head: Fix xref, pam(8) -> pam(3) PR: 193045 Submitted by: rsimmons0 gmail com Modified: stable/10/etc/pam.d/README Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/pam.d/README ============================================================================== --- stable/10/etc/pam.d/README Wed Sep 3 23:18:08 2014 (r271066) +++ stable/10/etc/pam.d/README Wed Sep 3 23:18:13 2014 (r271067) @@ -8,7 +8,7 @@ particular service, the /etc/pam.d/other file does not exist, /etc/pam.conf is searched for entries matching the specified service or, failing that, the "other" service. -See the pam(8) manual page for an explanation of the workings of the +See the pam(3) manual page for an explanation of the workings of the PAM library and descriptions of the various files and modules. Below is a summary of the format for the pam.conf and /etc/pam.d/* files. From owner-svn-src-stable-10@FreeBSD.ORG Wed Sep 3 23:29:07 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 02F1C6E7; Wed, 3 Sep 2014 23:29:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CA5031861; Wed, 3 Sep 2014 23:29:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83NT63K032906; Wed, 3 Sep 2014 23:29:06 GMT (envelope-from gavin@FreeBSD.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83NT65p032903; Wed, 3 Sep 2014 23:29:06 GMT (envelope-from gavin@FreeBSD.org) Message-Id: <201409032329.s83NT65p032903@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gavin set sender to gavin@FreeBSD.org using -f From: Gavin Atkinson Date: Wed, 3 Sep 2014 23:29:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271069 - stable/10/sys/dev/asmc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 23:29:07 -0000 Author: gavin Date: Wed Sep 3 23:29:06 2014 New Revision: 271069 URL: http://svnweb.freebsd.org/changeset/base/271069 Log: Merge r268303 from head: Add support to asmc(4) for Macmini 3,1. PR: 190195 Submitted by: fbsdbugs2 sentry.org Relnotes: yes Modified: stable/10/sys/dev/asmc/asmc.c stable/10/sys/dev/asmc/asmcvar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/asmc/asmc.c ============================================================================== --- stable/10/sys/dev/asmc/asmc.c Wed Sep 3 23:29:01 2014 (r271068) +++ stable/10/sys/dev/asmc/asmc.c Wed Sep 3 23:29:06 2014 (r271069) @@ -206,6 +206,15 @@ struct asmc_model asmc_models[] = { ASMC_MM_TEMPS, ASMC_MM_TEMPNAMES, ASMC_MM_TEMPDESCS }, + /* The Mac Mini 3,1 has no SMS */ + { + "Macmini3,1", "Apple SMC Mac Mini 3,1", + NULL, NULL, NULL, + ASMC_FAN_FUNCS, + NULL, NULL, NULL, + ASMC_MM31_TEMPS, ASMC_MM31_TEMPNAMES, ASMC_MM31_TEMPDESCS + }, + /* Idem for the MacPro */ { "MacPro2", "Apple SMC Mac Pro (8-core)", Modified: stable/10/sys/dev/asmc/asmcvar.h ============================================================================== --- stable/10/sys/dev/asmc/asmcvar.h Wed Sep 3 23:29:01 2014 (r271068) +++ stable/10/sys/dev/asmc/asmcvar.h Wed Sep 3 23:29:06 2014 (r271069) @@ -180,6 +180,25 @@ struct asmc_softc { #define ASMC_MM_TEMPDESCS { "Northbridge Point 1", \ "Northbridge Point 2" } +#define ASMC_MM31_TEMPS { "TC0D", "TC0H", \ + "TC0P", "TH0P", \ + "TN0D", "TN0P", \ + "TW0P", NULL } + +#define ASMC_MM31_TEMPNAMES { "cpu0_die", "cpu0_heatsink", \ + "cpu0_proximity", "hdd_bay", \ + "northbridge_die", \ + "northbridge_proximity", \ + "wireless_module", } + +#define ASMC_MM31_TEMPDESCS { "CPU0 Die Core Temperature", \ + "CPU0 Heatsink Temperature", \ + "CPU0 Proximity Temperature", \ + "HDD Bay Temperature", \ + "Northbridge Die Core Temperature", \ + "Northbridge Proximity Temperature", \ + "Wireless Module Temperature", } + #define ASMC_MP_TEMPS { "TA0P", "TCAG", "TCAH", "TCBG", "TCBH", \ "TC0C", "TC0D", "TC0P", "TC1C", "TC1D", \ "TC2C", "TC2D", "TC3C", "TC3D", "THTG", \ From owner-svn-src-stable-10@FreeBSD.ORG Thu Sep 4 00:40:42 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7269C995; Thu, 4 Sep 2014 00:40:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5D5EF1FA4; Thu, 4 Sep 2014 00:40:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s840egmn067675; Thu, 4 Sep 2014 00:40:42 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s840efgO067671; Thu, 4 Sep 2014 00:40:41 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201409040040.s840efgO067671@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 4 Sep 2014 00:40:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271071 - in stable/10/sys: amd64/amd64 i386/i386 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 00:40:42 -0000 Author: pfg Date: Thu Sep 4 00:40:41 2014 New Revision: 271071 URL: http://svnweb.freebsd.org/changeset/base/271071 Log: MFC r270844: Minor space/tab cleanups. Most of them were ripped from the GSoC 2104 SMAP + kpatch project (but unrelated). Only cosmetic changes. Taken from: Oliver Pinter (op@) Modified: stable/10/sys/amd64/amd64/support.S stable/10/sys/i386/i386/db_disasm.c stable/10/sys/i386/i386/support.s Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/support.S ============================================================================== --- stable/10/sys/amd64/amd64/support.S Thu Sep 4 00:10:06 2014 (r271070) +++ stable/10/sys/amd64/amd64/support.S Thu Sep 4 00:40:41 2014 (r271071) @@ -59,7 +59,7 @@ ENTRY(bzero) stosb ret END(bzero) - + /* Address: %rdi */ ENTRY(pagezero) movq $-PAGE_SIZE,%rdx @@ -137,7 +137,7 @@ ENTRY(bcopy) cld ret END(bcopy) - + /* * Note: memcpy does not support overlapping copies */ @@ -181,10 +181,10 @@ ENTRY(pagecopy) ret END(pagecopy) -/* fillw(pat, base, cnt) */ +/* fillw(pat, base, cnt) */ /* %rdi,%rsi, %rdx */ ENTRY(fillw) - movq %rdi,%rax + movq %rdi,%rax movq %rsi,%rdi movq %rdx,%rcx cld @@ -388,7 +388,7 @@ ENTRY(fuword) movq (%rdi),%rax movq $0,PCB_ONFAULT(%rcx) ret -END(fuword64) +END(fuword64) END(fuword) ENTRY(fuword32) Modified: stable/10/sys/i386/i386/db_disasm.c ============================================================================== --- stable/10/sys/i386/i386/db_disasm.c Thu Sep 4 00:10:06 2014 (r271070) +++ stable/10/sys/i386/i386/db_disasm.c Thu Sep 4 00:40:41 2014 (r271071) @@ -782,7 +782,7 @@ static const struct inst db_inst_table[2 /*c7*/ { "mov", TRUE, LONG, op2(I, E), 0 }, /*c8*/ { "enter", FALSE, NONE, op2(Iw, Ib), 0 }, -/*c9*/ { "leave", FALSE, NONE, 0, 0 }, +/*c9*/ { "leave", FALSE, NONE, 0, 0 }, /*ca*/ { "lret", FALSE, NONE, op1(Iw), 0 }, /*cb*/ { "lret", FALSE, NONE, 0, 0 }, /*cc*/ { "int", FALSE, NONE, op1(o3), 0 }, @@ -1266,7 +1266,7 @@ db_disasm(loc, altfmt) case 0xc8: i_name = "monitor"; i_size = NONE; - i_mode = 0; + i_mode = 0; break; case 0xc9: i_name = "mwait"; Modified: stable/10/sys/i386/i386/support.s ============================================================================== --- stable/10/sys/i386/i386/support.s Thu Sep 4 00:10:06 2014 (r271070) +++ stable/10/sys/i386/i386/support.s Thu Sep 4 00:40:41 2014 (r271071) @@ -62,8 +62,8 @@ ENTRY(bzero) stosb popl %edi ret -END(bzero) - +END(bzero) + ENTRY(sse2_pagezero) pushl %ebx movl 8(%esp),%ecx @@ -694,7 +694,7 @@ ENTRY(lgdt) movl 4(%esp),%eax lgdt (%eax) #endif - + /* flush the prefetch q */ jmp 1f nop @@ -740,13 +740,13 @@ END(ssdtosd) /* void reset_dbregs() */ ENTRY(reset_dbregs) - movl $0,%eax - movl %eax,%dr7 /* disable all breapoints first */ - movl %eax,%dr0 - movl %eax,%dr1 - movl %eax,%dr2 - movl %eax,%dr3 - movl %eax,%dr6 + movl $0,%eax + movl %eax,%dr7 /* disable all breakpoints first */ + movl %eax,%dr0 + movl %eax,%dr1 + movl %eax,%dr2 + movl %eax,%dr3 + movl %eax,%dr6 ret END(reset_dbregs) From owner-svn-src-stable-10@FreeBSD.ORG Thu Sep 4 01:38:32 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2A4C58C4; Thu, 4 Sep 2014 01:38:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EF9D51512; Thu, 4 Sep 2014 01:38:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s841cVhc093948; Thu, 4 Sep 2014 01:38:31 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s841cVWl093945; Thu, 4 Sep 2014 01:38:31 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201409040138.s841cVWl093945@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Thu, 4 Sep 2014 01:38:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271075 - in stable/10: sbin/mksnap_ffs sbin/shutdown usr.sbin/ppp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 01:38:32 -0000 Author: neel Date: Thu Sep 4 01:38:31 2014 New Revision: 271075 URL: http://svnweb.freebsd.org/changeset/base/271075 Log: MFC r270289: Change file permissions for some setuid executables so they are "o+r". The executable itself doesn't contain any privileged information. An example of where this is useful is when makefs(8) is creating an image that includes /sbin/shutdown. This can now be done without root privileges. Modified: stable/10/sbin/mksnap_ffs/Makefile stable/10/sbin/shutdown/Makefile stable/10/usr.sbin/ppp/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/mksnap_ffs/Makefile ============================================================================== --- stable/10/sbin/mksnap_ffs/Makefile Thu Sep 4 01:21:33 2014 (r271074) +++ stable/10/sbin/mksnap_ffs/Makefile Thu Sep 4 01:38:31 2014 (r271075) @@ -10,9 +10,9 @@ WARNS?= 2 CFLAGS+=-I${.CURDIR}/../mount .if defined(NOSUID) -BINMODE=550 +BINMODE=554 .else -BINMODE=4550 +BINMODE=4554 BINOWN= root .endif BINGRP= operator Modified: stable/10/sbin/shutdown/Makefile ============================================================================== --- stable/10/sbin/shutdown/Makefile Thu Sep 4 01:21:33 2014 (r271074) +++ stable/10/sbin/shutdown/Makefile Thu Sep 4 01:38:31 2014 (r271075) @@ -8,6 +8,6 @@ MLINKS= shutdown.8 poweroff.8 BINOWN= root BINGRP= operator -BINMODE=4550 +BINMODE=4554 .include Modified: stable/10/usr.sbin/ppp/Makefile ============================================================================== --- stable/10/usr.sbin/ppp/Makefile Thu Sep 4 01:21:33 2014 (r271074) +++ stable/10/usr.sbin/ppp/Makefile Thu Sep 4 01:38:31 2014 (r271075) @@ -33,9 +33,9 @@ PPP_NO_PAM= .endif .if defined(PPP_NO_SUID) -BINMODE=550 +BINMODE=554 .else -BINMODE=4550 +BINMODE=4554 BINOWN= root .endif BINGRP= network From owner-svn-src-stable-10@FreeBSD.ORG Thu Sep 4 02:14:54 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EEA4E1DE; Thu, 4 Sep 2014 02:14:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D9DA919C1; Thu, 4 Sep 2014 02:14:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s842ErWD012119; Thu, 4 Sep 2014 02:14:53 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s842ErBX012118; Thu, 4 Sep 2014 02:14:53 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409040214.s842ErBX012118@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 4 Sep 2014 02:14:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271079 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 02:14:54 -0000 Author: gjb Date: Thu Sep 4 02:14:53 2014 New Revision: 271079 URL: http://svnweb.freebsd.org/changeset/base/271079 Log: Document r259141, jail(8) ipv6 allocation startup bug. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Sep 4 02:06:33 2014 (r271078) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Sep 4 02:14:53 2014 (r271079) @@ -1207,6 +1207,11 @@ The &man.service.8; utility has been updated to check that the &man.rc.d.8; directory exists before traversing the directory. + + A regression introduced in + &os; 10.0-RELEASE that would prevent proper IPv6 + allocation via the &man.jail.8; &man.rc.8; startup script + has been fixed. From owner-svn-src-stable-10@FreeBSD.ORG Thu Sep 4 02:14:57 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BE39B3DB; Thu, 4 Sep 2014 02:14:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA30119C3; Thu, 4 Sep 2014 02:14:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s842EvoL012210; Thu, 4 Sep 2014 02:14:57 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s842Evg9012209; Thu, 4 Sep 2014 02:14:57 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409040214.s842Evg9012209@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 4 Sep 2014 02:14:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271081 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 02:14:57 -0000 Author: gjb Date: Thu Sep 4 02:14:57 2014 New Revision: 271081 URL: http://svnweb.freebsd.org/changeset/base/271081 Log: Document r262566, sshd(8) startup script creates ed25519 keys if ENOENT on startup. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Sep 4 02:14:55 2014 (r271080) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Sep 4 02:14:57 2014 (r271081) @@ -1216,6 +1216,11 @@ The &man.rc.8; restriction requiring &man.mdconfig.8; devices defined in &man.rc.conf.5; to be listed sequentially has been removed. + + The &man.sshd.8; &man.rc.d.8; startup + script now generates ED25519 &man.sshd.8; + host keys if keys do not already exist when + ssh_keygen_alg() is invoked. From owner-svn-src-stable-10@FreeBSD.ORG Thu Sep 4 02:14:55 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DD4C92B4; Thu, 4 Sep 2014 02:14:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C8F2919C2; Thu, 4 Sep 2014 02:14:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s842Etpa012164; Thu, 4 Sep 2014 02:14:55 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s842EtSn012163; Thu, 4 Sep 2014 02:14:55 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409040214.s842EtSn012163@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 4 Sep 2014 02:14:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271080 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 02:14:56 -0000 Author: gjb Date: Thu Sep 4 02:14:55 2014 New Revision: 271080 URL: http://svnweb.freebsd.org/changeset/base/271080 Log: Document r264438, mdconfig(8) rc.conf(5) listing is no longer required to be sequential. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Sep 4 02:14:53 2014 (r271079) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Sep 4 02:14:55 2014 (r271080) @@ -1212,6 +1212,10 @@ &os; 10.0-RELEASE that would prevent proper IPv6 allocation via the &man.jail.8; &man.rc.8; startup script has been fixed. + + The &man.rc.8; restriction requiring + &man.mdconfig.8; devices defined in &man.rc.conf.5; to be + listed sequentially has been removed. From owner-svn-src-stable-10@FreeBSD.ORG Thu Sep 4 09:05:34 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6C1F28E6; Thu, 4 Sep 2014 09:05:34 +0000 (UTC) Received: from mail.made4.biz (mail.made4.biz [IPv6:2001:41d0:2:c018::1:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 29392194A; Thu, 4 Sep 2014 09:05:34 +0000 (UTC) Received: from 2a02-8428-011b-e000-0290-f5ff-fe9d-b78c.rev.sfr.net ([2a02:8428:11b:e000:290:f5ff:fe9d:b78c] helo=magellan.dumbbell.fr) by mail.made4.biz with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.83 (FreeBSD)) (envelope-from ) id 1XPSyy-000AJE-9H; Thu, 04 Sep 2014 11:05:32 +0200 Message-ID: <54082B57.6070007@FreeBSD.org> Date: Thu, 04 Sep 2014 11:05:27 +0200 From: =?windows-1252?Q?Jean-S=E9bastien_P=E9dron?= User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: Alexey Dokuchaev , Ed Maste Subject: Re: svn commit: r271023 - stable/10/sys/dev/vt References: <201409031400.s83E0bK6049810@svn.freebsd.org> <20140903140757.GA7494@FreeBSD.org> <20140903145753.GA25935@FreeBSD.org> In-Reply-To: <20140903145753.GA25935@FreeBSD.org> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="DK2vAneQ59WJfRLHsfdJusUX13K0lB5vh" Cc: svn-src-stable@freebsd.org, "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 09:05:34 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --DK2vAneQ59WJfRLHsfdJusUX13K0lB5vh Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 03.09.2014 16:57, Alexey Dokuchaev wrote: >> The VGA vt(4) issues all stem from the relatively complex and arcane >> VGA hardware and a somewhat limited vt_vga implementation. >=20 > Can you elaborate a bit on the technical side of things? Particularly,= it > looks strange that syscons(4) was able to work just fine on "relatively= > complex and arcane VGA hardware", while more modern vt(4) is fighting w= ith > problems. VGA requires that you write 8 pixels at a time (8 pixels stored in one byte). To update one pixel, the previous version of vt_vga would read one byte so that the 8 pixels are loaded in special registers (called "latches"), then would write a new byte to the video memory. The VGA hardware would process the new byte and the content of the latches to compute the final data. That's how one pixel out of eight could be modifi= ed. Unfortunately, reading from the video memory is very expensive. The new version of vt_vga never reads from the video memory. Instead, it uses the console history to know what those 8 pixels should look like and write one byte which doesn't need further processing. One bug in vt(4) was that the mouse cursor position, even if it was invisible before moused(8) starts, was always considered "dirty" and required a redraw. The default position being [0;0], each new character written would trigger a full refresh of the screen from [0;0] to the position of this character. Those two problems combined explain the slownness of vt(4), especially with discrete GPU and virtual machines; i915 users were mostly spared. Regarding the incorrect refresh when vt-switching, it was caused by a race between the redraw thread and the switch. The redraw thread was not stopped during a switch. Therefore, if the thread ran while the switch was in progress, it could mark the screen as "up-to-date" even though it displayed the wrong data. One change did reduce the vt-switch time specifically: in vt_vga, a switch triggers a clear of the video memory. The loop did read from the video memory, then wrote 8 black pixels. The useless read was removed. --=20 Jean-S=E9bastien P=E9dron --DK2vAneQ59WJfRLHsfdJusUX13K0lB5vh Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQJ8BAEBCgBmBQJUCCtbXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2NzA4N0ZEMUFFQUUwRTEyREJDNkE2RjAz OUU5OTc2MUE1RkQ5NENDAAoJEDnpl2Gl/ZTMgQEP/068sb1oqO5Ei0IBR2hSs4qn NFlOEIiwhKQpHDiVfdLARtzCZKBRamhVGEFwJN6vbVQg4kBWmvi55gwyail6kM2Y boykexLupH1zmhJ+7sqLlbhdGyhOVffRzaGBZ7moJBdRqRn8yRLpBPjw/SSCGwxb xJw27/9lAWrAtyqhI0egZXywQEUegRKlWPjCAxkM3DAjYQexgj26Yjz+MbH4SDRa m5eKFJeQ6CM+nLHa7mepxvNFewlG45Gq/XpoRQJ3TnPH9S4+TuD3qDWwcc7RKQyh g/ctE/7Tgf8Gi0ONtrQFLCSSfBO1YD+D+RCrLYzANah2fTcgYgON8PbFKS1f6pRg kWIG2wobUGyocmblktbmzggTby/UFyxc/EvwAQyIWlR2KpBcWMH/C13wcfNncrkW GSMOpzWEsNzTYMqC/2W+HG1dXrquqi+8Y5duyxDWVolU2LNOrcmkJUnBtwwnBS2D gfBlVQTC0RLq1ftaJRm4QKJJspMlfiJiZwUkSuKkTJ9vO8l75fw+cqL0X4REx7Zr JkGJN6BZGVFlIgfDKlnNbo4fzUVUOmUd1Qcsqtpv543P2DR3OJQoB/GDQhLUqXJM eQPuwCieCIMgyzOM0HD6BnfPXa2cOMxY6JvN87dLeyBOlwqK8NeDL0TDwubnan63 UackK2RHnPvSui5FZwNu =KngB -----END PGP SIGNATURE----- --DK2vAneQ59WJfRLHsfdJusUX13K0lB5vh-- From owner-svn-src-stable-10@FreeBSD.ORG Thu Sep 4 09:42:37 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 762F86AC; Thu, 4 Sep 2014 09:42:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 609AA1CFD; Thu, 4 Sep 2014 09:42:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s849gbqW019013; Thu, 4 Sep 2014 09:42:37 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s849gbjH019012; Thu, 4 Sep 2014 09:42:37 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201409040942.s849gbjH019012@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: Jean-Sebastien Pedron Date: Thu, 4 Sep 2014 09:42:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271090 - stable/10/sys/dev/drm2/radeon X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 09:42:37 -0000 Author: dumbbell Date: Thu Sep 4 09:42:36 2014 New Revision: 271090 URL: http://svnweb.freebsd.org/changeset/base/271090 Log: drm/radeon: Fix a memory leak when radeonkms is unloaded This an MFC of r270750. Modified: stable/10/sys/dev/drm2/radeon/radeon_fb.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/drm2/radeon/radeon_fb.c ============================================================================== --- stable/10/sys/dev/drm2/radeon/radeon_fb.c Thu Sep 4 09:15:44 2014 (r271089) +++ stable/10/sys/dev/drm2/radeon/radeon_fb.c Thu Sep 4 09:42:36 2014 (r271090) @@ -291,6 +291,7 @@ static int radeon_fbdev_destroy(struct d if (rfbdev->helper.fbdev) { info = rfbdev->helper.fbdev; + free(info->fb_priv, DRM_MEM_KMS); free(info, DRM_MEM_KMS); } From owner-svn-src-stable-10@FreeBSD.ORG Thu Sep 4 11:15:38 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 927D7D06; Thu, 4 Sep 2014 11:15:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D3DE18AF; Thu, 4 Sep 2014 11:15:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84BFc6T061713; Thu, 4 Sep 2014 11:15:38 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84BFcsb061712; Thu, 4 Sep 2014 11:15:38 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409041115.s84BFcsb061712@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 4 Sep 2014 11:15:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271092 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 11:15:38 -0000 Author: gjb Date: Thu Sep 4 11:15:38 2014 New Revision: 271092 URL: http://svnweb.freebsd.org/changeset/base/271092 Log: Document r271069, Mac Mini 3,1 support added to asmc(4). Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Sep 4 09:49:21 2014 (r271091) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Sep 4 11:15:38 2014 (r271092) @@ -194,6 +194,9 @@ has been updated to implement fast path for the page fault handler. + The &man.asmc.4; driver has been updated + to support the &apple; Mac Mini 3,1. + Virtualization Support From owner-svn-src-stable-10@FreeBSD.ORG Thu Sep 4 11:20:17 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 364C9F5F for ; Thu, 4 Sep 2014 11:20:17 +0000 (UTC) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F157518E8 for ; Thu, 4 Sep 2014 11:20:16 +0000 (UTC) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by gateway2.nyi.internal (Postfix) with ESMTP id D1F4220BF7 for ; Thu, 4 Sep 2014 07:20:12 -0400 (EDT) Received: from web6 ([10.202.2.216]) by compute5.internal (MEProxy); Thu, 04 Sep 2014 07:20:12 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.net; h= message-id:from:to:cc:mime-version:content-transfer-encoding :content-type:subject:date:in-reply-to:references; s=mesmtp; bh= //Bga8PE9VdsDfjYfFHl+fLWBS4=; b=lUxOQYtCx+dS1vMOjvXtxla8Iz16TP5U HrfOC4mXthYE3NxrmhZ18F4w1p0JqzwWsXyX5l43WGSaU5g99Xa73dW+JBost6/m DIBjgsqupP9nEUkmDWP3Fg8qKCR2u/ka0nz804rV0NTifOblW2uatBwyKrjhZb2R 6ojLCjyn278= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:from:to:cc:mime-version :content-transfer-encoding:content-type:subject:date:in-reply-to :references; s=smtpout; bh=//Bga8PE9VdsDfjYfFHl+fLWBS4=; b=OaujB cObefwLdyvemW5vBkkBWGDv/hnyAMaAzMPs17fa2RLByoPYkxvn8sctHN7kY0VM8 pVkhzEr9JJOpJ4ZhQVxnt9WfiYpUNyQOHkAx3ZcMGc6Q0/BV5Mx679sKGrpynDpB 8qIw55HWpPdmWwYgLosK+gGpHkqF1NblpZzu+k= Received: by web6.nyi.internal (Postfix, from userid 99) id D101E941CE3; Thu, 4 Sep 2014 07:20:11 -0400 (EDT) Message-Id: <1409829611.1620282.163554161.0056EA09@webmail.messagingengine.com> X-Sasl-Enc: 1QUA5Df2qSQonsUHQl7yKDFGDhXvrwxb8c1v/IDYDPcg 1409829611 From: Bruce Simpson To: =?ISO-8859-1?Q?Jean-S=E9bastien=20P=E9dron?= , Alexey Dokuchaev , Ed Maste MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: MessagingEngine.com Webmail Interface - ajax-a219acad Subject: Re: svn commit: r271023 - stable/10/sys/dev/vt Date: Thu, 04 Sep 2014 12:20:11 +0100 In-Reply-To: <54082B57.6070007@FreeBSD.org> References: <201409031400.s83E0bK6049810@svn.freebsd.org> <20140903140757.GA7494@FreeBSD.org> <20140903145753.GA25935@FreeBSD.org> <54082B57.6070007@FreeBSD.org> Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 11:20:17 -0000 On Thu, 4 Sep 2014, at 10:05, Jean-S=E9bastien P=E9dron wrote: > Unfortunately, reading from the video memory is very expensive. The new > version of vt_vga never reads from the video memory. Instead, it uses > the console history to know what those 8 pixels should look like and > write one byte which doesn't need further processing. ...=20 > Those two problems combined explain the slownness of vt(4), especially > with discrete GPU and virtual machines; i915 users were mostly spared. It may be a good idea to monitor the performance of vt(4) under virtual KVM systems (e.g. Supermicro IPMI, VMware VNC, Cisco UCS etc.) for the following reasons: 1) users of FreeBSD are likely to rely on them for operations, 2) many of these systems already work along similar principles (i.e. delta compression), 3) to be sure that cascaded updates don't cause additional display latency. --=20 BMS (sent via webmail) From owner-svn-src-stable-10@FreeBSD.ORG Thu Sep 4 13:45:21 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1BF2E432; Thu, 4 Sep 2014 13:45:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EFC5C1A33; Thu, 4 Sep 2014 13:45:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84DjKXf032032; Thu, 4 Sep 2014 13:45:20 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84DjGBA032005; Thu, 4 Sep 2014 13:45:16 GMT (envelope-from se@FreeBSD.org) Message-Id: <201409041345.s84DjGBA032005@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: se set sender to se@FreeBSD.org using -f From: Stefan Esser Date: Thu, 4 Sep 2014 13:45:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271095 - in stable/10: etc/defaults etc/rc.d sbin/conscontrol share/man/man4 share/man/man5 share/man/man7 share/man/man8 tools/tools/vt/keymaps usr.bin/lock usr.sbin/bsdconfig usr.sbi... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 13:45:21 -0000 Author: se Date: Thu Sep 4 13:45:16 2014 New Revision: 271095 URL: http://svnweb.freebsd.org/changeset/base/271095 Log: MFC r270647: Add references to vt(4) and the configuration files in /usr/sha MFC r270653: Update man-pages to correctly refer to changed pathes and namin MFC r270657: More man pages that need to know about vt in addition to syscon MFC r270659: (by pluknet@) Missed comma. MFC r270660: Back-out the references to vt(4) from this man-page. It appears MFC r270933: Add references to vt(4) to further man-pages. MFC r270934: Final patches to the tools used to convert syscons keymaps for MFC r270935: Add vt(4) support to the console initialisation script, specifi Second batch of MFCs to add support for Unicode keymaps for use with vt(4). It contains the following changes: - Add references to vt(4) to relevant man-pages. - Update comment in defaults/rc.conf to mention vt - Update rc.d/syscons to warn about syscons keymaps used under vt. An attempt is made to identify the vt keymap to load instead. - Minor changes to the conversion tool based on mail comments on keymaps. Relnotes: yes Modified: stable/10/etc/defaults/rc.conf stable/10/etc/rc.d/syscons stable/10/sbin/conscontrol/conscontrol.8 stable/10/share/man/man4/atkbd.4 stable/10/share/man/man4/kbdmux.4 stable/10/share/man/man4/ukbd.4 stable/10/share/man/man4/vkbd.4 stable/10/share/man/man4/vt.4 stable/10/share/man/man5/rc.conf.5 stable/10/share/man/man7/hier.7 stable/10/share/man/man8/nanobsd.8 stable/10/tools/tools/vt/keymaps/KBDFILES.map stable/10/tools/tools/vt/keymaps/convert-keymap.pl stable/10/usr.bin/lock/lock.1 stable/10/usr.sbin/bsdconfig/bsdconfig.8 stable/10/usr.sbin/bsdinstall/bsdinstall.8 stable/10/usr.sbin/kbdcontrol/kbdcontrol.1 stable/10/usr.sbin/kbdcontrol/kbdmap.5 stable/10/usr.sbin/kbdmap/kbdmap.1 stable/10/usr.sbin/vidcontrol/vidcontrol.1 Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/defaults/rc.conf ============================================================================== --- stable/10/etc/defaults/rc.conf Thu Sep 4 13:13:42 2014 (r271094) +++ stable/10/etc/defaults/rc.conf Thu Sep 4 13:45:16 2014 (r271095) @@ -524,15 +524,15 @@ ip6addrctl_policy="AUTO" # A pre-defined ############################################################## keyboard="" # keyboard device to use (default /dev/kbd0). -keymap="NO" # keymap in /usr/share/syscons/keymaps/* (or NO). +keymap="NO" # keymap in /usr/share/{syscons,vt}/keymaps/* (or NO). keyrate="NO" # keyboard rate to: slow, normal, fast (or NO). keybell="NO" # See kbdcontrol(1) for options. Use "off" to disable. keychange="NO" # function keys default values (or NO). cursor="NO" # cursor type {normal|blink|destructive} (or NO). scrnmap="NO" # screen map in /usr/share/syscons/scrnmaps/* (or NO). -font8x16="NO" # font 8x16 from /usr/share/syscons/fonts/* (or NO). -font8x14="NO" # font 8x14 from /usr/share/syscons/fonts/* (or NO). -font8x8="NO" # font 8x8 from /usr/share/syscons/fonts/* (or NO). +font8x16="NO" # font 8x16 from /usr/share/{syscons,vt}/fonts/* (or NO). +font8x14="NO" # font 8x14 from /usr/share/{syscons,vt}/fonts/* (or NO). +font8x8="NO" # font 8x8 from /usr/share/{syscons,vt}/fonts/* (or NO). blanktime="300" # blank time (in seconds) or "NO" to turn it off. saver="NO" # screen saver: Uses /boot/kernel/${saver}_saver.ko moused_nondefault_enable="YES" # Treat non-default mice as enabled unless Modified: stable/10/etc/rc.d/syscons ============================================================================== --- stable/10/etc/rc.d/syscons Thu Sep 4 13:13:42 2014 (r271094) +++ stable/10/etc/rc.d/syscons Thu Sep 4 13:45:16 2014 (r271095) @@ -45,16 +45,122 @@ stop_cmd=":" kbddev=/dev/ttyv0 viddev=/dev/ttyv0 -_sc_config="syscons" +_sc_config= +_sc_console= _sc_initdone= +_sc_keymap_msg= sc_init() { if [ -z "${_sc_initdone}" ]; then + if [ -z "${_sc_console}" ]; then + if [ x`sysctl -n kern.vty` = x"vt" ]; then + _sc_console="vt" + else + _sc_console="syscons" + fi + _sc_config="${_sc_console}" + fi echo -n "Configuring ${_sc_config}:" _sc_initdone=yes fi } +# syscons to vt migration helper +lookup_keymap_for_vt() +{ + keymap=`basename $1 .kbd` + case $keymap in +hy.armscii-8) echo am;; +be.iso.acc) echo be.acc;; +be.iso) echo be;; +bg.bds.ctrlcaps) echo bg.bds;; +bg.phonetic.ctrlcaps) echo bg.phonetic;; +br275.iso.acc) echo br;; +br275.*) echo br.noacc;; +by.*) echo by;; +fr_CA.iso.acc) echo ca-fr;; +swissgerman.macbook.acc) echo ch.macbook.acc;; +swissgerman.iso.acc) echo ch.acc;; +swissgerman.*) echo ch;; +swissfrench.iso.acc) echo ch-fr.acc;; +swissfrench.*) echo ch-fr;; +ce.iso2) echo centraleuropean.qwerty;; +colemak.iso15.acc) echo colemak.acc;; +cs.*|cz.*) echo cz;; +german.iso.acc) echo de.acc;; +german.*) echo de;; +danish.iso.acc) echo dk.acc;; +danish.iso.macbook) echo dk.macbook;; +danish.*) echo dk;; +estonian.*) echo ee;; +spanish.dvorak) echo es.dvorak;; +spanish.iso*.acc) echo es.acc;; +spanish.iso) echo es;; +finnish.*) echo fi;; +fr.macbook.acc) echo fr.macbook;; +fr.iso.acc) echo fr.acc;; +fr.iso) echo fr;; +el.iso07) echo gr;; +gr.us101.acc) echo gr.101.acc;; +hr.iso) echo hr;; +hu.iso2.101keys) echo hu.101;; +hu.iso2.102keys) echo hu.102;; +iw.iso8) echo il;; +icelandic.iso.acc) echo is.acc;; +icelandic.iso) echo is;; +it.iso) echo it;; +jp.106x) echo jp.capsctrl;; +jp.106) echo jp;; +#?? jp.pc98.iso) echo jp.pc98;; +kk.pt154.io) echo kz.io;; +kk.pt154.kst) echo kz.kst;; +latinamerican.iso.acc) echo latinamerican.acc;; +lt.iso4) echo lt;; +norwegian.iso) echo no;; +norwegian.dvorak) echo no.dvorak;; +dutch.iso.acc) echo nl;; +eee_nordic) echo nordic.asus-eee;; +pl_PL.dvorak) echo pl.dvorak;; +pl_PL.ISO8859-2) echo pl;; +pt.iso.acc) echo pt.acc;; +pt.iso) echo pt;; +ru.koi8-r.shift) echo ru.shift;; +ru.koi8-r.win) echo ru.win;; +ru.*) echo ru;; +swedish.*) echo se;; +si.iso) echo si;; +sk.iso2) echo sk;; +tr.iso9.q) echo tr;; +ua.koi8-u.shift.alt) echo ua.shift.alt;; +ua.*) echo ua;; +uk.*-ctrl) echo uk.capsctrl;; +uk.dvorak) echo uk.dvorak;; +uk.*) echo uk;; +us.iso.acc) echo us.acc;; +us.pc-ctrl) echo us.ctrl;; +us.iso) echo us;; + esac +} + +kbdcontrol_load_keymap() +{ + errmsg=`kbdcontrol < ${kbddev} -l ${keymap} 2>&1` + if [ -n "${errmsg}" -a "${_sc_console}" = "vt" ]; then + _sc_keymap_msg="${errmsg}" + keymap_vt=`lookup_keymap_for_vt ${keymap}` + if [ -n "${keymap_vt}" ]; then + errmsg=`kbdcontrol < ${kbddev} -l ${keymap_vt} 2>&1` + if [ -z "${errmsg}" ]; then + _sc_keymap_msg="New keymap: In /etc/rc.conf replace 'keymap=${keymap}' by 'keymap=${keymap_vt}'" + fi + else + _sc_keymap_msg="No replacement found for keymap '${keymap}'. +You may try to convert your keymap file using 'convert-keymap.pl', which is +part of the system sources and located in /usr/src/tools/tools/vt/keymaps/" + fi + fi +} + # helper syscons_configure_keyboard() { @@ -65,7 +171,7 @@ syscons_configure_keyboard() ;; *) sc_init - echo -n ' keymap'; kbdcontrol < ${kbddev} -l ${keymap} + echo -n ' keymap'; kbdcontrol_load_keymap ;; esac @@ -139,10 +245,9 @@ syscons_setkeyboard() # if [ -n "${_sc_initdone}" ]; then echo '.' - _sc_config="syscons" + _sc_config="${_sc_console}" _sc_initdone= fi - } syscons_precmd() @@ -256,6 +361,12 @@ syscons_start() fi [ -n "${_sc_initdone}" ] && echo '.' + if [ -n "${_sc_keymap_msg}" ]; then + echo + echo "WARNING:" + echo "${_sc_keymap_msg}." + echo + fi } load_rc_config $name Modified: stable/10/sbin/conscontrol/conscontrol.8 ============================================================================== --- stable/10/sbin/conscontrol/conscontrol.8 Thu Sep 4 13:13:42 2014 (r271094) +++ stable/10/sbin/conscontrol/conscontrol.8 Thu Sep 4 13:45:16 2014 (r271095) @@ -104,6 +104,7 @@ This is an interface to the tty ioctl .Xr sio 4 , .Xr syscons 4 , .Xr tty 4 , +.Xr vt 4 , .Xr boot 8 , .Xr loader 8 .Sh HISTORY Modified: stable/10/share/man/man4/atkbd.4 ============================================================================== --- stable/10/share/man/man4/atkbd.4 Thu Sep 4 13:13:42 2014 (r271094) +++ stable/10/share/man/man4/atkbd.4 Thu Sep 4 13:45:16 2014 (r271095) @@ -51,7 +51,9 @@ driver, provides access to the AT 84 key which is connected to the AT keyboard controller. .Pp This driver is required for the console driver -.Xr syscons 4 . +.Xr syscons 4 +or +.Xr vt 4 . .Pp There can be only one .Nm @@ -211,6 +213,7 @@ In both cases, you also need to have fol .Xr atkbdc 4 , .Xr psm 4 , .Xr syscons 4 , +.Xr vt 4 , .Xr kbdmap 5 , .Xr loader 8 .Sh HISTORY Modified: stable/10/share/man/man4/kbdmux.4 ============================================================================== --- stable/10/share/man/man4/kbdmux.4 Thu Sep 4 13:13:42 2014 (r271094) +++ stable/10/share/man/man4/kbdmux.4 Thu Sep 4 13:45:16 2014 (r271095) @@ -34,7 +34,8 @@ utility. .Xr kbdcontrol 1 , .Xr atkbd 4 , .Xr syscons 4 , -.Xr ukbd 4 +.Xr ukbd 4 , +.Xr vt 4 .Sh HISTORY The .Nm Modified: stable/10/share/man/man4/ukbd.4 ============================================================================== --- stable/10/share/man/man4/ukbd.4 Thu Sep 4 13:13:42 2014 (r271094) +++ stable/10/share/man/man4/ukbd.4 Thu Sep 4 13:45:16 2014 (r271095) @@ -127,7 +127,9 @@ Make the keyboards available through a c The above lines will put the French ISO keymap in the ukbd driver. You can specify any keymap in .Pa /usr/share/syscons/keymaps -with this option. +or +.Pa /usr/share/vt/keymaps +(depending on the console driver being used) with this option. .Pp .D1 Cd "options KBD_DISABLE_KEYMAP_LOADING" .Pp @@ -151,6 +153,7 @@ driver to the kernel. .Xr syscons 4 , .Xr uhci 4 , .Xr usb 4 , +.Xr vt 4 , .Xr config 8 .Sh AUTHORS .An -nosplit Modified: stable/10/share/man/man4/vkbd.4 ============================================================================== --- stable/10/share/man/man4/vkbd.4 Thu Sep 4 13:13:42 2014 (r271094) +++ stable/10/share/man/man4/vkbd.4 Thu Sep 4 13:45:16 2014 (r271095) @@ -129,7 +129,8 @@ All queued scan codes are thrown away. .Xr kbdcontrol 1 , .Xr atkbdc 4 , .Xr psm 4 , -.Xr syscons 4 +.Xr syscons 4 , +.Xr vt 4 .Sh HISTORY The .Nm Modified: stable/10/share/man/man4/vt.4 ============================================================================== --- stable/10/share/man/man4/vt.4 Thu Sep 4 13:13:42 2014 (r271094) +++ stable/10/share/man/man4/vt.4 Thu Sep 4 13:45:16 2014 (r271095) @@ -197,13 +197,17 @@ If this value is not set, is used. .El .Sh FILES -.Bl -tag -width /usr/share/syscons/keymaps/* -compact +.Bl -tag -width /usr/share/vt/keymaps/* -compact .It Pa /dev/console .It Pa /dev/consolectl .It Pa /dev/ttyv* virtual terminals .It Pa /etc/ttys terminal initialization information +.It Pa /usr/share/vt/fonts/*.fnt +console fonts +.It Pa /usr/share/vt/keymaps/*.kbd +keyboard layouts .El .Sh EXAMPLES This example changes the default color of normal text to green on a @@ -229,7 +233,6 @@ on a black background, or black on a bri .Xr splash 4 , .Xr syscons 4 , .Xr ukbd 4 , -.Xr vga 4 , .Xr kbdmap 5 , .Xr rc.conf 5 , .Xr ttys 5 , Modified: stable/10/share/man/man5/rc.conf.5 ============================================================================== --- stable/10/share/man/man5/rc.conf.5 Thu Sep 4 13:13:42 2014 (r271094) +++ stable/10/share/man/man5/rc.conf.5 Thu Sep 4 13:45:16 2014 (r271095) @@ -3120,8 +3120,13 @@ set to this device. If set to .Dq Li NO , no keymap is installed, otherwise the value is used to install -the keymap file in -.Pa /usr/share/syscons/keymaps/ Ns Ao Ar value Ac Ns Pa .kbd . +the keymap file found in +.Pa /usr/share/syscons/keymaps/ Ns Ao Ar value Ac Ns Pa .kbd +(if using +.Xr syscons 4 ) or +.Pa /usr/share/vt/keymaps/ Ns Ao Ar value Ac Ns Pa .kbd +(if using +.Xr vt 4 ) . .It Va keyrate .Pq Vt str The keyboard repeat speed. @@ -3156,6 +3161,9 @@ If set to no screen map is installed, otherwise the value is used to install the screen map file in .Pa /usr/share/syscons/scrnmaps/ Ns Aq Ar value . +This parameter is ignored when using +.Xr vt 4 +as the console driver. .It Va font8x16 .Pq Vt str If set to @@ -3163,7 +3171,9 @@ If set to the default 8x16 font value is used for screen size requests, otherwise the value in .Pa /usr/share/syscons/fonts/ Ns Aq Ar value -is used. +or +.Pa /usr/share/vt/fonts/ Ns Aq Ar value +is used (depending on the console driver being used). .It Va font8x14 .Pq Vt str If set to @@ -3171,7 +3181,9 @@ If set to the default 8x14 font value is used for screen size requests, otherwise the value in .Pa /usr/share/syscons/fonts/ Ns Aq Ar value -is used. +or +.Pa /usr/share/vt/fonts/ Ns Aq Ar value +is used (depending on the console driver being used). .It Va font8x8 .Pq Vt str If set to @@ -3179,7 +3191,9 @@ If set to the default 8x8 font value is used for screen size requests, otherwise the value in .Pa /usr/share/syscons/fonts/ Ns Aq Ar value -is used. +or +.Pa /usr/share/vt/fonts/ Ns Aq Ar value +is used (depending on the console driver being used). .It Va blanktime .Pq Vt int If set to @@ -3386,6 +3400,8 @@ For example, .Dq Fl h Li 200 will set the .Xr syscons 4 +or +.Xr vt 4 scrollback (history) buffer to 200 lines. .It Va cron_enable .Pq Vt bool Modified: stable/10/share/man/man7/hier.7 ============================================================================== --- stable/10/share/man/man7/hier.7 Thu Sep 4 13:13:42 2014 (r271094) +++ stable/10/share/man/man7/hier.7 Thu Sep 4 13:45:16 2014 (r271095) @@ -640,6 +640,26 @@ timezone configuration information; see .Xr tzfile 5 .El +.It Pa vt/ +files used by vt; +see +.Xr vt 4 +.Bl -tag -width ".Pa scrnmaps/" -compact +.It Pa fonts/ +console fonts; +see +.Xr vidcontrol 1 +and +.Xr vidfont 1 +.It Pa keymaps/ +console keyboard maps; +see +.Xr kbdcontrol 1 +and +.Xr kbdmap 1 +.\" .It Pa scrnmaps/ +.\" console screen maps +.El .It Pa src/ .Bx , third-party, and/or local source files Modified: stable/10/share/man/man8/nanobsd.8 ============================================================================== --- stable/10/share/man/man8/nanobsd.8 Thu Sep 4 13:13:42 2014 (r271094) +++ stable/10/share/man/man8/nanobsd.8 Thu Sep 4 13:45:16 2014 (r271095) @@ -277,6 +277,8 @@ Disables .Xr getty 8 on the virtual .Xr syscons 4 +or +.Xr vt 4 terminals .Pq Pa /dev/ttyv* and enables the use of the first serial port as the system Modified: stable/10/tools/tools/vt/keymaps/KBDFILES.map ============================================================================== --- stable/10/tools/tools/vt/keymaps/KBDFILES.map Thu Sep 4 13:13:42 2014 (r271094) +++ stable/10/tools/tools/vt/keymaps/KBDFILES.map Thu Sep 4 13:45:16 2014 (r271095) @@ -144,6 +144,6 @@ ISO8859-1 us.emacs.kbd us.emacs.kbd ISO8859-1 us.pc-ctrl.kbd us.ctrl.kbd ISO8859-1 us.unix.kbd us.unix.kbd -ISO8859-5 ua.iso5.kbd ua.kbd.from-iso5 +#ISO8859-5 ua.iso5.kbd ua.kbd.from-iso5 KOI8-U ua.koi8-u.kbd ua.kbd KOI8-U ua.koi8-u.shift.alt.kbd ua.shift.alt.kbd Modified: stable/10/tools/tools/vt/keymaps/convert-keymap.pl ============================================================================== --- stable/10/tools/tools/vt/keymaps/convert-keymap.pl Thu Sep 4 13:13:42 2014 (r271094) +++ stable/10/tools/tools/vt/keymaps/convert-keymap.pl Thu Sep 4 13:45:16 2014 (r271095) @@ -7,7 +7,7 @@ use strict; use utf8; # command line parsing -die "Usage: $0 filename.kbd CHARSET [EURO]" +die "Usage: $0 filename.kbd charset [EURO|YEN]\n" unless ($ARGV[1]); my $inputfile = shift; # first command argument @@ -60,8 +60,8 @@ sub local_to_UCS_code $ucs_char = 0xa5 # replace with Jap. Yen character on PC kbd if $ucs_char == ord('\\') and $use_yen and $current_scancode == 125; - $ucs_char = 0xa5 # replace with Jap. Yen character on PC98x1 kbd - if $ucs_char == ord('\\') and $use_yen and $current_scancode == 13; +# $ucs_char = 0xa5 # replace with Jap. Yen character on PC98x1 kbd +# if $ucs_char == ord('\\') and $use_yen and $current_scancode == 13; return prettyprint_token($ucs_char); } Modified: stable/10/usr.bin/lock/lock.1 ============================================================================== --- stable/10/usr.bin/lock/lock.1 Thu Sep 4 13:13:42 2014 (r271094) +++ stable/10/usr.bin/lock/lock.1 Thu Sep 4 13:45:16 2014 (r271095) @@ -69,11 +69,14 @@ option of and thus has the same restrictions. It is only available if the terminal in question is a .Xr syscons 4 +or +.Xr vt 4 virtual terminal. .El .Sh SEE ALSO .Xr vidcontrol 1 , -.Xr syscons 4 +.Xr syscons 4 , +.Xr vt 4 .Sh HISTORY The .Nm Modified: stable/10/usr.sbin/bsdconfig/bsdconfig.8 ============================================================================== --- stable/10/usr.sbin/bsdconfig/bsdconfig.8 Thu Sep 4 13:13:42 2014 (r271094) +++ stable/10/usr.sbin/bsdconfig/bsdconfig.8 Thu Sep 4 13:45:16 2014 (r271095) @@ -172,16 +172,27 @@ Shortcut to the Delete menu under the Vi (startup_rcconf) of startup. .It Cm startup_rcvar Shortcut to the Toggle Startup Services menu under startup. +.\" use neutral name, e.g. console_keymap instead of syscons_keymap? +.\" font (encoding) selection not applicable to vt(4)! .It Cm syscons_font Shortcut to the Font menu under console. +.\" .It Cm console_keymap +.\" Shortcut to the Keymap menu under console. .It Cm syscons_keymap Shortcut to the Keymap menu under console. +.\" .It Cm vt_repeat +.\" Shortcut to the Repeat menu under console. .It Cm syscons_repeat Shortcut to the Repeat menu under console. +.\" .It Cm vt_saver +.\" Shortcut to the Saver menu under console. .It Cm syscons_saver Shortcut to the Saver menu under console. +.\" screenmap (encoding) selection not applicable to vt(4)! .It Cm syscons_screenmap Shortcut to the Screenmap menu under console. +.\" .It Cm vt_syscons_ttys +.\" Shortcut to the Ttys menu under console. .It Cm syscons_ttys Shortcut to the Ttys menu under console. .It Cm timezone Modified: stable/10/usr.sbin/bsdinstall/bsdinstall.8 ============================================================================== --- stable/10/usr.sbin/bsdinstall/bsdinstall.8 Thu Sep 4 13:13:42 2014 (r271094) +++ stable/10/usr.sbin/bsdinstall/bsdinstall.8 Thu Sep 4 13:45:16 2014 (r271095) @@ -95,6 +95,8 @@ for more information on this target. .It Cm keymap If the current controlling TTY is a .Xr syscons 4 +or +.Xr vt 4 console, asks the user to set the current keymap, and saves the result to the new system's .Pa rc.conf . Modified: stable/10/usr.sbin/kbdcontrol/kbdcontrol.1 ============================================================================== --- stable/10/usr.sbin/kbdcontrol/kbdcontrol.1 Thu Sep 4 13:13:42 2014 (r271094) +++ stable/10/usr.sbin/kbdcontrol/kbdcontrol.1 Thu Sep 4 13:45:16 2014 (r271095) @@ -1,5 +1,5 @@ .\" -.\" kbdcontrol - a utility for manipulating the syscons keyboard driver section +.\" kbdcontrol - a utility for manipulating the syscons or vt keyboard driver section .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -41,6 +41,8 @@ The .Nm command is used to set various keyboard related options for the .Xr syscons 4 +or +.Xr vt 4 console driver and the keyboard drivers, such as key map, keyboard repeat and delay rates, bell characteristics etc. @@ -213,7 +215,9 @@ for details. .Sh FILES .Bl -tag -width /usr/share/syscons/keymaps/foo_bar -compact .It Pa /usr/share/syscons/keymaps/* -keyboard map files +keyboard map files for syscons +.It Pa /usr/share/vt/keymaps/* +keyboard map files for vt .El .Sh EXAMPLES The following command will load the keyboard map file @@ -222,9 +226,19 @@ The following command will load the keyb .Dl kbdcontrol -l /usr/share/syscons/keymaps/ru.koi8-r.kbd .Pp So long as the keyboard map file resides in -.Pa /usr/share/syscons/keymaps , +.Pa /usr/share/syscons/keymaps +(if using +.Xr syscons 4 ) or +.Pa /usr/share/vt/keymaps +(if using +.Xr vt 4 ) , you may abbreviate the file name as .Pa ru.koi8-r . +Since +.Xr vt 4 +uses Unicode, the corresponding keyboard file names omit the encoding +and typically are just a country code, e.g.\& +.Pa ru . .Pp .Dl kbdcontrol -l ru.koi8-r .Pp @@ -268,6 +282,7 @@ kbdcontrol -k /dev/kbdmux0 < /dev/consol .Xr screen 4 , .Xr syscons 4 , .Xr ukbd 4 , +.Xr vt 4 , .Xr kbdmap 5 , .Xr rc.conf 5 .Sh AUTHORS Modified: stable/10/usr.sbin/kbdcontrol/kbdmap.5 ============================================================================== --- stable/10/usr.sbin/kbdcontrol/kbdmap.5 Thu Sep 4 13:13:42 2014 (r271094) +++ stable/10/usr.sbin/kbdcontrol/kbdmap.5 Thu Sep 4 13:45:16 2014 (r271095) @@ -313,13 +313,16 @@ for that vowel with a grave accent. .Sh FILES .Bl -tag -width /usr/share/syscons/keymaps/* -compact .It Pa /usr/share/syscons/keymaps/* -standard keyboard map files +standard keyboard map files for syscons +.It Pa /usr/share/vt/keymaps/* +standard keyboard map files for vt .El .Sh SEE ALSO .Xr kbdcontrol 1 , .Xr kbdmap 1 , .Xr keyboard 4 , .Xr syscons 4 , +.Xr vt 4 , .Xr ascii 7 .Sh HISTORY This manual page first appeared in Modified: stable/10/usr.sbin/kbdmap/kbdmap.1 ============================================================================== --- stable/10/usr.sbin/kbdmap/kbdmap.1 Thu Sep 4 13:13:42 2014 (r271094) +++ stable/10/usr.sbin/kbdmap/kbdmap.1 Thu Sep 4 13:45:16 2014 (r271095) @@ -29,7 +29,7 @@ .Sh NAME .Nm kbdmap , .Nm vidfont -.Nd front end for syscons +.Nd front end for syscons and vt .Sh SYNOPSIS .Nm .Op Fl K @@ -106,8 +106,10 @@ preferred language .Sh FILES .Bl -tag -width ".Pa /usr/share/syscons/keymaps/INDEX.keymaps" -compact .It Pa /usr/share/syscons/keymaps/INDEX.keymaps +.It Pa /usr/share/vt/keymaps/INDEX.keymaps database for keymaps .It Pa /usr/share/syscons/fonts/INDEX.fonts +.It Pa /usr/share/vt/fonts/INDEX.fonts database for fonts .It Pa /etc/rc.conf default font @@ -120,6 +122,8 @@ values .Xr dialog 1 , .Xr kbdcontrol 1 , .Xr vidcontrol 1 , +.Xr syscons 4 , +.Xr vt 4 , .Xr kbdmap 5 , .Xr rc.conf 5 .Sh HISTORY Modified: stable/10/usr.sbin/vidcontrol/vidcontrol.1 ============================================================================== --- stable/10/usr.sbin/vidcontrol/vidcontrol.1 Thu Sep 4 13:13:42 2014 (r271094) +++ stable/10/usr.sbin/vidcontrol/vidcontrol.1 Thu Sep 4 13:45:16 2014 (r271095) @@ -1,5 +1,5 @@ .\" -.\" vidcontrol - a utility for manipulating the syscons video driver +.\" vidcontrol - a utility for manipulating the syscons or vt video driver .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -48,9 +48,15 @@ The .Nm utility is used to set various options for the .Xr syscons 4 +or +.Xr vt 4 console driver, such as video mode, colors, cursor shape, screen output map, font and screen saver timeout. +Only a small subset of options is supported by +.Xr vt 4 . +Unsupported options lead to error messages, typically including +the text "Inappropriate ioctl for device". .Pp The following command line options are supported: .Bl -tag -width indent @@ -158,8 +164,11 @@ See also .Sx Video Mode Support and .Sx EXAMPLES -below and the man page for -.Xr syscons 4 . +below and the man page for either +.Xr syscons 4 +or +.Xr vt 4 +(depending on which driver you use). .It Fl g Ar geometry Set the .Ar geometry @@ -185,7 +194,10 @@ Shows the possible video modes with the Install screen output map file from .Ar screen_map . See also -.Xr syscons 4 . +.Xr syscons 4 +or +.Xr vt 4 +(depending on which driver you use). .It Fl L Install default screen output map. .It Fl M Ar char @@ -307,12 +319,18 @@ kernel with the option. See .Xr syscons 4 +or +.Xr vt 4 +(depending on which driver you use) for more details on this kernel option. .Ss Format of Video Buffer Dump The .Nm utility uses the .Xr syscons 4 +.\" is it supported on vt(4)??? +or +.Xr vt 4 .Dv CONS_SCRSHOT .Xr ioctl 2 to capture the current contents of the video buffer. @@ -453,9 +471,12 @@ for details. .Sh FILES .Bl -tag -width /usr/share/syscons/scrnmaps/foo-bar -compact .It Pa /usr/share/syscons/fonts/* +.It Pa /usr/share/vt/fonts/* font files. .It Pa /usr/share/syscons/scrnmaps/* -screen output map files. +screen output map files (relevant for +.Xr syscons 4 +only). .El .Sh EXAMPLES If you want to load @@ -467,7 +488,10 @@ as: .Dl vidcontrol -f 8x16 /usr/share/syscons/fonts/iso-8x16.fnt .Pp So long as the font file is in -.Pa /usr/share/syscons/fonts , +.Pa /usr/share/syscons/fonts +(if using syscons) or +.Pa /usr/share/vt/fonts +(if using vt), you may abbreviate the file name as .Pa iso-8x16 : .Pp @@ -521,6 +545,7 @@ to the standard output in the human read .Xr screen 4 , .Xr syscons 4 , .Xr vga 4 , +.Xr vt 4 , .Xr rc.conf 5 , .Xr kldload 8 , .Xr moused 8 , From owner-svn-src-stable-10@FreeBSD.ORG Thu Sep 4 13:47:56 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 531A75A7; Thu, 4 Sep 2014 13:47:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3DE781A59; Thu, 4 Sep 2014 13:47:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84DlucB032403; Thu, 4 Sep 2014 13:47:56 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84Dlu6a032402; Thu, 4 Sep 2014 13:47:56 GMT (envelope-from se@FreeBSD.org) Message-Id: <201409041347.s84Dlu6a032402@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: se set sender to se@FreeBSD.org using -f From: Stefan Esser Date: Thu, 4 Sep 2014 13:47:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271096 - stable/10/usr.sbin/smbmsg X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 13:47:56 -0000 Author: se Date: Thu Sep 4 13:47:55 2014 New Revision: 271096 URL: http://svnweb.freebsd.org/changeset/base/271096 Log: MFC r270931: Fix typo ("by" -> "be"). Modified: stable/10/usr.sbin/smbmsg/smbmsg.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/smbmsg/smbmsg.8 ============================================================================== --- stable/10/usr.sbin/smbmsg/smbmsg.8 Thu Sep 4 13:45:16 2014 (r271095) +++ stable/10/usr.sbin/smbmsg/smbmsg.8 Thu Sep 4 13:47:55 2014 (r271096) @@ -59,7 +59,7 @@ The first form shown in the synopsis can the devices on the SMBus. This is done by sending each valid device address one receive byte, and one quick read message, respectively. -Devices that respond to these requests will by displayed +Devices that respond to these requests will be displayed by their device address, followed by the strings .Ql r , .Ql w , From owner-svn-src-stable-10@FreeBSD.ORG Thu Sep 4 16:05:13 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 12557E1F; Thu, 4 Sep 2014 16:05:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E67D91E2E; Thu, 4 Sep 2014 16:05:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84G5CUG002944; Thu, 4 Sep 2014 16:05:12 GMT (envelope-from tijl@FreeBSD.org) Received: (from tijl@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84G5Ctf002943; Thu, 4 Sep 2014 16:05:12 GMT (envelope-from tijl@FreeBSD.org) Message-Id: <201409041605.s84G5Ctf002943@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tijl set sender to tijl@FreeBSD.org using -f From: Tijl Coosemans Date: Thu, 4 Sep 2014 16:05:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271103 - stable/10/contrib/binutils/ld/emultempl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 16:05:13 -0000 Author: tijl Date: Thu Sep 4 16:05:12 2014 New Revision: 271103 URL: http://svnweb.freebsd.org/changeset/base/271103 Log: MFC r270757: In r253839 the default behaviour of ld(1) was changed such that all libraries that need to be linked into an executable or library have to be listed on the command line explicitly. This commit fixes a bug in ld(1) where it would scan dependencies of the libraries on the command line and link them if needed if they were also found in ld.so.cache. The important bit of the patch is the initialisation of needed.by such that libraries found by scanning dependencies are marked as such and not used in the link. The patch is a backport of binutils git commit d5c8b1f8561426b41aa5330ed60f578178fe6be2 The author gave permission to use it under GPLv2 terms. PR: 192062 Modified: stable/10/contrib/binutils/ld/emultempl/elf32.em Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/binutils/ld/emultempl/elf32.em ============================================================================== --- stable/10/contrib/binutils/ld/emultempl/elf32.em Thu Sep 4 15:11:57 2014 (r271102) +++ stable/10/contrib/binutils/ld/emultempl/elf32.em Thu Sep 4 16:05:12 2014 (r271103) @@ -541,7 +541,8 @@ EOF #endif static bfd_boolean -gld${EMULATION_NAME}_check_ld_elf_hints (const char *name, int force) +gld${EMULATION_NAME}_check_ld_elf_hints (const struct bfd_link_needed_list *l, + int force) { static bfd_boolean initialized; static char *ld_elf_hints; @@ -584,10 +585,9 @@ gld${EMULATION_NAME}_check_ld_elf_hints if (ld_elf_hints == NULL) return FALSE; - needed.by = NULL; - needed.name = name; - return gld${EMULATION_NAME}_search_needed (ld_elf_hints, & needed, - force); + needed.by = l->by; + needed.name = l->name; + return gld${EMULATION_NAME}_search_needed (ld_elf_hints, &needed, force); } EOF # FreeBSD @@ -759,7 +759,8 @@ gld${EMULATION_NAME}_parse_ld_so_conf } static bfd_boolean -gld${EMULATION_NAME}_check_ld_so_conf (const char *name, int force) +gld${EMULATION_NAME}_check_ld_so_conf (const struct bfd_link_needed_list *l, + int force) { static bfd_boolean initialized; static char *ld_so_conf; @@ -794,8 +795,8 @@ gld${EMULATION_NAME}_check_ld_so_conf (c return FALSE; - needed.by = NULL; - needed.name = name; + needed.by = l->by; + needed.name = l->name; return gld${EMULATION_NAME}_search_needed (ld_so_conf, &needed, force); } @@ -1037,7 +1038,7 @@ if [ "x${USE_LIBPATH}" = xyes ] ; then case ${target} in *-*-freebsd* | *-*-dragonfly*) cat >>e${EMULATION_NAME}.c <name, force)) + if (gld${EMULATION_NAME}_check_ld_elf_hints (l, force)) break; EOF # FreeBSD @@ -1046,7 +1047,7 @@ EOF *-*-linux-* | *-*-k*bsd*-*) # Linux cat >>e${EMULATION_NAME}.c <name, force)) + if (gld${EMULATION_NAME}_check_ld_so_conf (l, force)) break; EOF From owner-svn-src-stable-10@FreeBSD.ORG Thu Sep 4 16:51:46 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 596B8577; Thu, 4 Sep 2014 16:51:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2C6BF14BD; Thu, 4 Sep 2014 16:51:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84Gpk7e027330; Thu, 4 Sep 2014 16:51:46 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84Gpj3s027328; Thu, 4 Sep 2014 16:51:45 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409041651.s84Gpj3s027328@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 4 Sep 2014 16:51:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271105 - stable/10/sys/dev/fb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 16:51:46 -0000 Author: emaste Date: Thu Sep 4 16:51:45 2014 New Revision: 271105 URL: http://svnweb.freebsd.org/changeset/base/271105 Log: MFC r260047: Clean up license text - Renumber Regents clauses - Remove clause 3 and 4 from TNF license, following upstream change Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/fb/boot_font.c stable/10/sys/dev/fb/gallant12x22.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/fb/boot_font.c ============================================================================== --- stable/10/sys/dev/fb/boot_font.c Thu Sep 4 16:40:54 2014 (r271104) +++ stable/10/sys/dev/fb/boot_font.c Thu Sep 4 16:51:45 2014 (r271105) @@ -13,13 +13,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/10/sys/dev/fb/gallant12x22.c ============================================================================== --- stable/10/sys/dev/fb/gallant12x22.c Thu Sep 4 16:40:54 2014 (r271104) +++ stable/10/sys/dev/fb/gallant12x22.c Thu Sep 4 16:51:45 2014 (r271105) @@ -17,7 +17,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * From owner-svn-src-stable-10@FreeBSD.ORG Thu Sep 4 16:55:02 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6FCDC89C; Thu, 4 Sep 2014 16:55:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5AD241511; Thu, 4 Sep 2014 16:55:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84Gt2Z3027847; Thu, 4 Sep 2014 16:55:02 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84Gt2QI027846; Thu, 4 Sep 2014 16:55:02 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201409041655.s84Gt2QI027846@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Thu, 4 Sep 2014 16:55:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271106 - stable/10/share/examples/bhyve X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 16:55:02 -0000 Author: rodrigc Date: Thu Sep 4 16:55:01 2014 New Revision: 271106 URL: http://svnweb.freebsd.org/changeset/base/271106 Log: MFC r270512 r270513 r270754 - add comments which describe exit status codes of /usr/sbin/bhyve - move bhyvectl --destroy outside of the while loop - Use "file -s" so that we can run vmrun.sh against special devces such as /dev/md memory files systems or zvols Modified: stable/10/share/examples/bhyve/vmrun.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/share/examples/bhyve/vmrun.sh ============================================================================== --- stable/10/share/examples/bhyve/vmrun.sh Thu Sep 4 16:51:45 2014 (r271105) +++ stable/10/share/examples/bhyve/vmrun.sh Thu Sep 4 16:55:01 2014 (r271106) @@ -173,13 +173,14 @@ echo "Launching virtual machine \"$vmnam virtio_diskdev="$disk_dev0" +${BHYVECTL} --vm=${vmname} --destroy > /dev/null 2>&1 + while [ 1 ]; do - ${BHYVECTL} --vm=${vmname} --destroy > /dev/null 2>&1 - file ${virtio_diskdev} | grep "boot sector" > /dev/null + file -s ${virtio_diskdev} | grep "boot sector" > /dev/null rc=$? if [ $rc -ne 0 ]; then - file ${virtio_diskdev} | grep ": Unix Fast File sys" > /dev/null + file -s ${virtio_diskdev} | grep ": Unix Fast File sys" > /dev/null rc=$? fi if [ $rc -ne 0 ]; then @@ -237,6 +238,14 @@ while [ 1 ]; do -l com1,${console} \ ${installer_opt} \ ${vmname} + + # bhyve returns the following status codes: + # 0 - VM has been reset + # 1 - VM has been powered off + # 2 - VM has been halted + # 3 - VM generated a triple fault + # all other non-zero status codes are errors + # if [ $? -ne 0 ]; then break fi From owner-svn-src-stable-10@FreeBSD.ORG Thu Sep 4 17:21:55 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7324FA18; Thu, 4 Sep 2014 17:21:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5E82719FB; Thu, 4 Sep 2014 17:21:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84HLt6U041840; Thu, 4 Sep 2014 17:21:55 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84HLt6r041839; Thu, 4 Sep 2014 17:21:55 GMT (envelope-from se@FreeBSD.org) Message-Id: <201409041721.s84HLt6r041839@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: se set sender to se@FreeBSD.org using -f From: Stefan Esser Date: Thu, 4 Sep 2014 17:21:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271109 - stable/10/tools/tools/vt/keymaps X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 17:21:55 -0000 Author: se Date: Thu Sep 4 17:21:54 2014 New Revision: 271109 URL: http://svnweb.freebsd.org/changeset/base/271109 Log: Fix debug output that has erroneously been committed with the last update. Obtained from: Jan Beich Modified: stable/10/tools/tools/vt/keymaps/convert-keymap.pl Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/tools/vt/keymaps/convert-keymap.pl ============================================================================== --- stable/10/tools/tools/vt/keymaps/convert-keymap.pl Thu Sep 4 17:19:16 2014 (r271108) +++ stable/10/tools/tools/vt/keymaps/convert-keymap.pl Thu Sep 4 17:21:54 2014 (r271109) @@ -51,7 +51,7 @@ sub local_to_UCS_code my $ucs_char = ord(Encode::decode("UTF-8", local_to_UCS_string($char))); - $current_char = lc(chr($ucs_char)), print("SETCUR: $ucs_char\n") + $current_char = lc(chr($ucs_char)) if $current_char eq ""; $ucs_char = 0x20ac # replace with Euro character From owner-svn-src-stable-10@FreeBSD.ORG Thu Sep 4 18:15:37 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 72C126D6; Thu, 4 Sep 2014 18:15:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C66D109F; Thu, 4 Sep 2014 18:15:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84IFbfs067084; Thu, 4 Sep 2014 18:15:37 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84IFawj067081; Thu, 4 Sep 2014 18:15:36 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409041815.s84IFawj067081@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 4 Sep 2014 18:15:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271111 - in stable/10/sys: conf powerpc/conf powerpc/ps3 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 18:15:37 -0000 Author: emaste Date: Thu Sep 4 18:15:36 2014 New Revision: 271111 URL: http://svnweb.freebsd.org/changeset/base/271111 Log: MFC PS3 vt(4) console support r265871 (nwhitehorn): Move the PS3 framebuffer console to use vt instead of syscons and adjust GENERIC64 for PowerPC to use vt with it. Much to my chagrin, PS3 support seems to have bitrotted somewhat since the last time I tried it. ehci panics on attach and interrupt handling seems to be faulty. This should be fixed soon... r269783 (dumbbell): Fix two files forgotten in r269783 (vt_generate_cons_palette) r268895 (nwhitehorn): Enable X11 via xf86-video-scfb on the Playstation 3. This commit made from an xterm running for the first time on said Playstation. Approved by: nwhitehorn Relnotes: yes Modified: stable/10/sys/conf/files.powerpc stable/10/sys/powerpc/conf/GENERIC64 stable/10/sys/powerpc/ps3/ps3_syscons.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/files.powerpc ============================================================================== --- stable/10/sys/conf/files.powerpc Thu Sep 4 17:36:21 2014 (r271110) +++ stable/10/sys/conf/files.powerpc Thu Sep 4 18:15:36 2014 (r271111) @@ -221,8 +221,8 @@ powerpc/ps3/ps3bus.c optional ps3 powerpc/ps3/ps3cdrom.c optional ps3 scbus powerpc/ps3/ps3disk.c optional ps3 powerpc/ps3/ps3pic.c optional ps3 -powerpc/ps3/ps3_syscons.c optional ps3 sc -powerpc/ps3/ps3-hvcall.S optional ps3 sc +powerpc/ps3/ps3_syscons.c optional ps3 vt +powerpc/ps3/ps3-hvcall.S optional ps3 powerpc/pseries/phyp-hvcall.S optional pseries powerpc64 powerpc/pseries/mmu_phyp.c optional pseries powerpc64 powerpc/pseries/phyp_console.c optional pseries powerpc64 uart Modified: stable/10/sys/powerpc/conf/GENERIC64 ============================================================================== --- stable/10/sys/powerpc/conf/GENERIC64 Thu Sep 4 17:36:21 2014 (r271110) +++ stable/10/sys/powerpc/conf/GENERIC64 Thu Sep 4 18:15:36 2014 (r271111) @@ -111,12 +111,9 @@ device sa # Sequential Access (tape et device cd # CD device pass # Passthrough device (direct ATA/SCSI access) -# syscons is the default console driver, resembling an SCO console -device sc +# vt is the default console driver, resembling an SCO console +device vt # Core console driver device kbdmux -options SC_OFWFB # OFW frame buffer -options SC_DFLT_FONT # compile font in -makeoptions SC_DFLT_FONT=cp437 # Serial (COM) ports device scc Modified: stable/10/sys/powerpc/ps3/ps3_syscons.c ============================================================================== --- stable/10/sys/powerpc/ps3/ps3_syscons.c Thu Sep 4 17:36:21 2014 (r271110) +++ stable/10/sys/powerpc/ps3/ps3_syscons.c Thu Sep 4 18:15:36 2014 (r271111) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2003 Peter Grehan + * Copyright (c) 2011-2014 Nathan Whitehorn * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,31 +29,22 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include #include #include #include #include #include -#include -#include -#include #include -#include #include #include -#include -#include #include #include -#include - -#include -#include +#include +#include +#include #include "ps3-hvcall.h" @@ -65,62 +56,12 @@ __FBSDID("$FreeBSD$"); #define L1GPU_DISPLAY_SYNC_VSYNC 2 #define L1GPU_CONTEXT_ATTRIBUTE_DISPLAY_FLIP 0x0102 -extern u_char dflt_font_16[]; -extern u_char dflt_font_14[]; -extern u_char dflt_font_8[]; - -static int ps3fb_configure(int flags); +static vd_init_t ps3fb_init; +static vd_probe_t ps3fb_probe; void ps3fb_remap(void); -static vi_probe_t ps3fb_probe; -static vi_init_t ps3fb_init; -static vi_get_info_t ps3fb_get_info; -static vi_query_mode_t ps3fb_query_mode; -static vi_set_mode_t ps3fb_set_mode; -static vi_save_font_t ps3fb_save_font; -static vi_load_font_t ps3fb_load_font; -static vi_show_font_t ps3fb_show_font; -static vi_save_palette_t ps3fb_save_palette; -static vi_load_palette_t ps3fb_load_palette; -static vi_set_border_t ps3fb_set_border; -static vi_save_state_t ps3fb_save_state; -static vi_load_state_t ps3fb_load_state; -static vi_set_win_org_t ps3fb_set_win_org; -static vi_read_hw_cursor_t ps3fb_read_hw_cursor; -static vi_set_hw_cursor_t ps3fb_set_hw_cursor; -static vi_set_hw_cursor_shape_t ps3fb_set_hw_cursor_shape; -static vi_blank_display_t ps3fb_blank_display; -static vi_mmap_t ps3fb_mmap; -static vi_ioctl_t ps3fb_ioctl; -static vi_clear_t ps3fb_clear; -static vi_fill_rect_t ps3fb_fill_rect; -static vi_bitblt_t ps3fb_bitblt; -static vi_diag_t ps3fb_diag; -static vi_save_cursor_palette_t ps3fb_save_cursor_palette; -static vi_load_cursor_palette_t ps3fb_load_cursor_palette; -static vi_copy_t ps3fb_copy; -static vi_putp_t ps3fb_putp; -static vi_putc_t ps3fb_putc; -static vi_puts_t ps3fb_puts; -static vi_putm_t ps3fb_putm; - struct ps3fb_softc { - video_adapter_t sc_va; - struct cdev *sc_si; - int sc_console; - - intptr_t sc_addr; - int sc_height; - int sc_width; - int sc_stride; - int sc_ncol; - int sc_nrow; - - int sc_xmargin; - int sc_ymargin; - - u_char *sc_font; - int sc_font_height; + struct fb_info fb_info; uint64_t sc_fbhandle; uint64_t sc_fbcontext; @@ -130,106 +71,24 @@ struct ps3fb_softc { uint64_t sc_reports_size; }; -static video_switch_t ps3fbvidsw = { - .probe = ps3fb_probe, - .init = ps3fb_init, - .get_info = ps3fb_get_info, - .query_mode = ps3fb_query_mode, - .set_mode = ps3fb_set_mode, - .save_font = ps3fb_save_font, - .load_font = ps3fb_load_font, - .show_font = ps3fb_show_font, - .save_palette = ps3fb_save_palette, - .load_palette = ps3fb_load_palette, - .set_border = ps3fb_set_border, - .save_state = ps3fb_save_state, - .load_state = ps3fb_load_state, - .set_win_org = ps3fb_set_win_org, - .read_hw_cursor = ps3fb_read_hw_cursor, - .set_hw_cursor = ps3fb_set_hw_cursor, - .set_hw_cursor_shape = ps3fb_set_hw_cursor_shape, - .blank_display = ps3fb_blank_display, - .mmap = ps3fb_mmap, - .ioctl = ps3fb_ioctl, - .clear = ps3fb_clear, - .fill_rect = ps3fb_fill_rect, - .bitblt = ps3fb_bitblt, - .diag = ps3fb_diag, - .save_cursor_palette = ps3fb_save_cursor_palette, - .load_cursor_palette = ps3fb_load_cursor_palette, - .copy = ps3fb_copy, - .putp = ps3fb_putp, - .putc = ps3fb_putc, - .puts = ps3fb_puts, - .putm = ps3fb_putm, -}; - -VIDEO_DRIVER(ps3fb, ps3fbvidsw, ps3fb_configure); - -extern sc_rndr_sw_t txtrndrsw; -RENDERER(ps3fb, 0, txtrndrsw, gfb_set); - -RENDERER_MODULE(ps3fb, gfb_set); - -/* - * Define the iso6429-1983 colormap - */ -static struct { - uint8_t red; - uint8_t green; - uint8_t blue; -} ps3fb_cmap[16] = { /* # R G B Color */ - /* - - - - ----- */ - { 0x00, 0x00, 0x00 }, /* 0 0 0 0 Black */ - { 0x00, 0x00, 0xaa }, /* 1 0 0 2/3 Blue */ - { 0x00, 0xaa, 0x00 }, /* 2 0 2/3 0 Green */ - { 0x00, 0xaa, 0xaa }, /* 3 0 2/3 2/3 Cyan */ - { 0xaa, 0x00, 0x00 }, /* 4 2/3 0 0 Red */ - { 0xaa, 0x00, 0xaa }, /* 5 2/3 0 2/3 Magenta */ - { 0xaa, 0x55, 0x00 }, /* 6 2/3 1/3 0 Brown */ - { 0xaa, 0xaa, 0xaa }, /* 7 2/3 2/3 2/3 White */ - { 0x55, 0x55, 0x55 }, /* 8 1/3 1/3 1/3 Gray */ - { 0x55, 0x55, 0xff }, /* 9 1/3 1/3 1 Bright Blue */ - { 0x55, 0xff, 0x55 }, /* 10 1/3 1 1/3 Bright Green */ - { 0x55, 0xff, 0xff }, /* 11 1/3 1 1 Bright Cyan */ - { 0xff, 0x55, 0x55 }, /* 12 1 1/3 1/3 Bright Red */ - { 0xff, 0x55, 0xff }, /* 13 1 1/3 1 Bright Magenta */ - { 0xff, 0xff, 0x80 }, /* 14 1 1 1/3 Bright Yellow */ - { 0xff, 0xff, 0xff } /* 15 1 1 1 Bright White */ +static struct vt_driver vt_ps3fb_driver = { + .vd_name = "ps3fb", + .vd_probe = ps3fb_probe, + .vd_init = ps3fb_init, + .vd_blank = vt_fb_blank, + .vd_bitbltchr = vt_fb_bitbltchr, + .vd_maskbitbltchr = vt_fb_maskbitbltchr, + .vd_fb_ioctl = vt_fb_ioctl, + .vd_fb_mmap = vt_fb_mmap, + /* Better than VGA, but still generic driver. */ + .vd_priority = VD_PRIORITY_GENERIC + 1, }; -#define TODO printf("%s: unimplemented\n", __func__) - -static u_int16_t ps3fb_static_window[ROW*COL]; - +VT_DRIVER_DECLARE(vt_ps3fb, vt_ps3fb_driver); static struct ps3fb_softc ps3fb_softc; -static __inline int -ps3fb_background(uint8_t attr) -{ - return (attr >> 4); -} - -static __inline int -ps3fb_foreground(uint8_t attr) -{ - return (attr & 0x0f); -} - -static u_int -ps3fb_pix32(int attr) -{ - u_int retval; - - retval = (ps3fb_cmap[attr].red << 16) | - (ps3fb_cmap[attr].green << 8) | - ps3fb_cmap[attr].blue; - - return (retval); -} - static int -ps3fb_configure(int flags) +ps3fb_probe(struct vt_device *vd) { struct ps3fb_softc *sc; int disable; @@ -237,17 +96,12 @@ ps3fb_configure(int flags) #if 0 phandle_t root; #endif - static int done = 0; disable = 0; TUNABLE_INT_FETCH("hw.syscons.disable", &disable); if (disable != 0) return (0); - if (done != 0) - return (0); - done = 1; - sc = &ps3fb_softc; #if 0 @@ -260,24 +114,10 @@ ps3fb_configure(int flags) #else TUNABLE_STR_FETCH("hw.platform", compatible, sizeof(compatible)); if (strcmp(compatible, "ps3") != 0) - return (0); + return (CN_DEAD); #endif - sc->sc_console = 1; - - /* XXX: get from HV repository */ - sc->sc_height = 480; - sc->sc_width = 720; - sc->sc_stride = sc->sc_width*4; - - /* - * The loader puts the FB at 0x10000000, so use that for now. - */ - - sc->sc_addr = 0x10000000; - ps3fb_init(0, &sc->sc_va, 0); - - return (0); + return (CN_INTERNAL); } void @@ -299,474 +139,62 @@ ps3fb_remap(void) 0,L1GPU_DISPLAY_SYNC_VSYNC,0,0); lv1_gpu_context_attribute(0, L1GPU_CONTEXT_ATTRIBUTE_DISPLAY_SYNC, 1,L1GPU_DISPLAY_SYNC_VSYNC,0,0); - lv1_gpu_memory_allocate(PS3FB_SIZE, 0, 0, 0, 0, &sc->sc_fbhandle, &fb_paddr); - lv1_gpu_context_allocate(sc->sc_fbhandle, 0, &sc->sc_fbcontext, &sc->sc_dma_control, - &sc->sc_driver_info, &sc->sc_reports, &sc->sc_reports_size); + lv1_gpu_memory_allocate(PS3FB_SIZE, 0, 0, 0, 0, &sc->sc_fbhandle, + &fb_paddr); + lv1_gpu_context_allocate(sc->sc_fbhandle, 0, &sc->sc_fbcontext, + &sc->sc_dma_control, &sc->sc_driver_info, &sc->sc_reports, + &sc->sc_reports_size); lv1_gpu_context_attribute(sc->sc_fbcontext, L1GPU_CONTEXT_ATTRIBUTE_DISPLAY_FLIP, 0, 0, 0, 0); lv1_gpu_context_attribute(sc->sc_fbcontext, L1GPU_CONTEXT_ATTRIBUTE_DISPLAY_FLIP, 1, 0, 0, 0); + sc->fb_info.fb_pbase = fb_paddr; for (va = 0; va < PS3FB_SIZE; va += PAGE_SIZE) pmap_kenter_attr(0x10000000 + va, fb_paddr + va, VM_MEMATTR_WRITE_COMBINING); } static int -ps3fb_probe(int unit, video_adapter_t **adp, void *arg, int flags) -{ - TODO; - return (0); -} - -static int -ps3fb_init(int unit, video_adapter_t *adp, int flags) +ps3fb_init(struct vt_device *vd) { struct ps3fb_softc *sc; - video_info_t *vi; - int cxborder, cyborder; - int font_height; - - sc = (struct ps3fb_softc *)adp; - vi = &adp->va_info; - - vid_init_struct(adp, "ps3fb", -1, unit); - - /* The default font size can be overridden by loader */ - font_height = 16; - TUNABLE_INT_FETCH("hw.syscons.fsize", &font_height); - if (font_height == 8) { - sc->sc_font = dflt_font_8; - sc->sc_font_height = 8; - } else if (font_height == 14) { - sc->sc_font = dflt_font_14; - sc->sc_font_height = 14; - } else { - /* default is 8x16 */ - sc->sc_font = dflt_font_16; - sc->sc_font_height = 16; - } - - /* The user can set a border in chars - default is 1 char width */ - cxborder = 8; - cyborder = 2; - TUNABLE_INT_FETCH("hw.syscons.xborder", &cxborder); - TUNABLE_INT_FETCH("hw.syscons.yborder", &cyborder); - - vi->vi_cheight = sc->sc_font_height; - vi->vi_width = sc->sc_width/8 - 2*cxborder; - vi->vi_height = sc->sc_height/sc->sc_font_height - 2*cyborder; - vi->vi_cwidth = 8; - - /* - * Clamp width/height to syscons maximums - */ - if (vi->vi_width > COL) - vi->vi_width = COL; - if (vi->vi_height > ROW) - vi->vi_height = ROW; - sc->sc_xmargin = (sc->sc_width - (vi->vi_width * vi->vi_cwidth)) / 2; - sc->sc_ymargin = (sc->sc_height - (vi->vi_height * vi->vi_cheight))/2; + /* Init softc */ + vd->vd_softc = sc = &ps3fb_softc; - /* - * Avoid huge amounts of conditional code in syscons by - * defining a dummy h/w text display buffer. - */ - adp->va_window = (vm_offset_t) ps3fb_static_window; + /* XXX: get from HV repository */ + sc->fb_info.fb_depth = 32; + sc->fb_info.fb_height = 480; + sc->fb_info.fb_width = 720; + sc->fb_info.fb_stride = sc->fb_info.fb_width*4; + sc->fb_info.fb_size = sc->fb_info.fb_height * sc->fb_info.fb_stride; + sc->fb_info.fb_bpp = sc->fb_info.fb_stride / sc->fb_info.fb_width * 8; /* - * Enable future font-loading and flag color support, as well as - * adding V_ADP_MODECHANGE so that we ps3fb_set_mode() gets called - * when the X server shuts down. This enables us to get the console - * back when X disappears. + * The loader puts the FB at 0x10000000, so use that for now. */ - adp->va_flags |= V_ADP_FONT | V_ADP_COLOR | V_ADP_MODECHANGE; - - ps3fb_set_mode(&sc->sc_va, 0); - vid_register(&sc->sc_va); - - return (0); -} - -static int -ps3fb_get_info(video_adapter_t *adp, int mode, video_info_t *info) -{ - bcopy(&adp->va_info, info, sizeof(*info)); - return (0); -} - -static int -ps3fb_query_mode(video_adapter_t *adp, video_info_t *info) -{ - TODO; - return (0); -} -static int -ps3fb_set_mode(video_adapter_t *adp, int mode) -{ - struct ps3fb_softc *sc; + sc->fb_info.fb_vbase = 0x10000000; - sc = (struct ps3fb_softc *)adp; - - /* XXX: no real mode setting at the moment */ - - ps3fb_blank_display(&sc->sc_va, V_DISPLAY_ON); + /* 32-bit VGA palette */ + vt_generate_cons_palette(sc->fb_info.fb_cmap, COLOR_FORMAT_RGB, + 255, 0, 255, 8, 255, 16); + /* Set correct graphics context */ lv1_gpu_context_attribute(sc->sc_fbcontext, L1GPU_CONTEXT_ATTRIBUTE_DISPLAY_FLIP, 0, 0, 0, 0); lv1_gpu_context_attribute(sc->sc_fbcontext, L1GPU_CONTEXT_ATTRIBUTE_DISPLAY_FLIP, 1, 0, 0, 0); - return (0); -} - -static int -ps3fb_save_font(video_adapter_t *adp, int page, int size, int width, - u_char *data, int c, int count) -{ - TODO; - return (0); -} - -static int -ps3fb_load_font(video_adapter_t *adp, int page, int size, int width, - u_char *data, int c, int count) -{ - struct ps3fb_softc *sc; - - sc = (struct ps3fb_softc *)adp; - - /* - * syscons code has already determined that current width/height - * are unchanged for this new font - */ - sc->sc_font = data; - return (0); -} - -static int -ps3fb_show_font(video_adapter_t *adp, int page) -{ - - return (0); -} - -static int -ps3fb_save_palette(video_adapter_t *adp, u_char *palette) -{ - /* TODO; */ - return (0); -} - -static int -ps3fb_load_palette(video_adapter_t *adp, u_char *palette) -{ - /* TODO; */ - return (0); -} - -static int -ps3fb_set_border(video_adapter_t *adp, int border) -{ - /* XXX Be lazy for now and blank entire screen */ - return (ps3fb_blank_display(adp, border)); -} - -static int -ps3fb_save_state(video_adapter_t *adp, void *p, size_t size) -{ - TODO; - return (0); -} - -static int -ps3fb_load_state(video_adapter_t *adp, void *p) -{ - TODO; - return (0); -} - -static int -ps3fb_set_win_org(video_adapter_t *adp, off_t offset) -{ - TODO; - return (0); -} + fb_probe(&sc->fb_info); + sc->fb_info.fb_flags &= ~FB_FLAG_NOMMAP; /* Set wrongly by fb_probe */ + vt_fb_init(vd); -static int -ps3fb_read_hw_cursor(video_adapter_t *adp, int *col, int *row) -{ - *col = 0; - *row = 0; - - return (0); -} - -static int -ps3fb_set_hw_cursor(video_adapter_t *adp, int col, int row) -{ - - return (0); -} - -static int -ps3fb_set_hw_cursor_shape(video_adapter_t *adp, int base, int height, - int celsize, int blink) -{ - return (0); -} - -static int -ps3fb_blank_display(video_adapter_t *adp, int mode) -{ - struct ps3fb_softc *sc; - int i; - uint32_t *addr; - - sc = (struct ps3fb_softc *)adp; - addr = (uint32_t *) sc->sc_addr; - - for (i = 0; i < (sc->sc_stride/4)*sc->sc_height; i++) - *(addr + i) = ps3fb_pix32(ps3fb_background(SC_NORM_ATTR)); - - return (0); -} - -static int -ps3fb_mmap(video_adapter_t *adp, vm_ooffset_t offset, vm_paddr_t *paddr, - int prot, vm_memattr_t *memattr) -{ - struct ps3fb_softc *sc; - - sc = (struct ps3fb_softc *)adp; - - /* - * This might be a legacy VGA mem request: if so, just point it at the - * framebuffer, since it shouldn't be touched - */ - if (offset < sc->sc_stride*sc->sc_height) { - *paddr = sc->sc_addr + offset; - return (0); - } - - return (EINVAL); -} - -static int -ps3fb_ioctl(video_adapter_t *adp, u_long cmd, caddr_t data) -{ - - return (0); -} - -static int -ps3fb_clear(video_adapter_t *adp) -{ - TODO; - return (0); -} - -static int -ps3fb_fill_rect(video_adapter_t *adp, int val, int x, int y, int cx, int cy) -{ - TODO; - return (0); -} - -static int -ps3fb_bitblt(video_adapter_t *adp, ...) -{ - TODO; - return (0); -} - -static int -ps3fb_diag(video_adapter_t *adp, int level) -{ - TODO; - return (0); -} - -static int -ps3fb_save_cursor_palette(video_adapter_t *adp, u_char *palette) -{ - TODO; - return (0); -} - -static int -ps3fb_load_cursor_palette(video_adapter_t *adp, u_char *palette) -{ - TODO; - return (0); -} - -static int -ps3fb_copy(video_adapter_t *adp, vm_offset_t src, vm_offset_t dst, int n) -{ - TODO; - return (0); -} - -static int -ps3fb_putp(video_adapter_t *adp, vm_offset_t off, uint32_t p, uint32_t a, - int size, int bpp, int bit_ltor, int byte_ltor) -{ - TODO; - return (0); -} - -static int -ps3fb_putc(video_adapter_t *adp, vm_offset_t off, uint8_t c, uint8_t a) -{ - struct ps3fb_softc *sc; - int row; - int col; - int i, j, k; - uint32_t *addr; - u_char *p; - - sc = (struct ps3fb_softc *)adp; - row = (off / adp->va_info.vi_width) * adp->va_info.vi_cheight; - col = (off % adp->va_info.vi_width) * adp->va_info.vi_cwidth; - p = sc->sc_font + c*sc->sc_font_height; - addr = (uint32_t *)sc->sc_addr - + (row + sc->sc_ymargin)*(sc->sc_stride/4) - + col + sc->sc_xmargin; - - for (i = 0; i < sc->sc_font_height; i++) { - for (j = 0, k = 7; j < 8; j++, k--) { - if ((p[i] & (1 << k)) == 0) - *(addr + j) = ps3fb_pix32(ps3fb_background(a)); - else - *(addr + j) = ps3fb_pix32(ps3fb_foreground(a)); - } - addr += (sc->sc_stride/4); - } - - return (0); -} - -static int -ps3fb_puts(video_adapter_t *adp, vm_offset_t off, u_int16_t *s, int len) -{ - int i; - - for (i = 0; i < len; i++) { - ps3fb_putc(adp, off + i, s[i] & 0xff, (s[i] & 0xff00) >> 8); - } - return (0); -} - -static int -ps3fb_putm(video_adapter_t *adp, int x, int y, uint8_t *pixel_image, - uint32_t pixel_mask, int size, int width) -{ - struct ps3fb_softc *sc; - int i, j, k; - uint32_t fg, bg; - uint32_t *addr; - - sc = (struct ps3fb_softc *)adp; - addr = (uint32_t *)sc->sc_addr - + (y + sc->sc_ymargin)*(sc->sc_stride/4) - + x + sc->sc_xmargin; - - fg = ps3fb_pix32(ps3fb_foreground(SC_NORM_ATTR)); - bg = ps3fb_pix32(ps3fb_background(SC_NORM_ATTR)); - - for (i = 0; i < size && i+y < sc->sc_height - 2*sc->sc_ymargin; i++) { - for (j = 0, k = width; j < 8; j++, k--) { - if (x + j >= sc->sc_width - 2*sc->sc_xmargin) - continue; - - if (pixel_image[i] & (1 << k)) - *(addr + j) = (*(addr + j) == fg) ? bg : fg; - } - addr += (sc->sc_stride/4); - } - - return (0); -} - -/* - * Define the syscons nexus device attachment - */ -static void -ps3fb_scidentify(driver_t *driver, device_t parent) -{ - device_t child; - - /* - * Add with a priority guaranteed to make it last on - * the device list - */ - if (strcmp(installed_platform(), "ps3") == 0) - child = BUS_ADD_CHILD(parent, INT_MAX, SC_DRIVER_NAME, 0); -} - -static int -ps3fb_scprobe(device_t dev) -{ - int error; - - if (strcmp(installed_platform(), "ps3") != 0) - return (ENXIO); - - device_set_desc(dev, "System console"); - - error = sc_probe_unit(device_get_unit(dev), - device_get_flags(dev) | SC_AUTODETECT_KBD); - if (error != 0) - return (error); - - /* This is a fake device, so make sure we added it ourselves */ - return (BUS_PROBE_NOWILDCARD); -} - -static int -ps3fb_scattach(device_t dev) -{ - return (sc_attach_unit(device_get_unit(dev), - device_get_flags(dev) | SC_AUTODETECT_KBD)); -} - -static device_method_t ps3fb_sc_methods[] = { - DEVMETHOD(device_identify, ps3fb_scidentify), - DEVMETHOD(device_probe, ps3fb_scprobe), - DEVMETHOD(device_attach, ps3fb_scattach), - { 0, 0 } -}; - -static driver_t ps3fb_sc_driver = { - SC_DRIVER_NAME, - ps3fb_sc_methods, - sizeof(sc_softc_t), -}; - -static devclass_t sc_devclass; - -DRIVER_MODULE(ps3fb, nexus, ps3fb_sc_driver, sc_devclass, 0, 0); - -/* - * Define a stub keyboard driver in case one hasn't been - * compiled into the kernel - */ -#include -#include - -static int dummy_kbd_configure(int flags); - -keyboard_switch_t ps3dummysw; - -static int -dummy_kbd_configure(int flags) -{ + /* Clear the screen. */ + vt_fb_blank(vd, TC_BLACK); - return (0); + return (CN_INTERNAL); } -KEYBOARD_DRIVER(ps3dummy, ps3dummysw, dummy_kbd_configure); From owner-svn-src-stable-10@FreeBSD.ORG Thu Sep 4 18:18:30 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 14363A33; Thu, 4 Sep 2014 18:18:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D91F5111D; Thu, 4 Sep 2014 18:18:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84IITGV067508; Thu, 4 Sep 2014 18:18:29 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84IITS8067506; Thu, 4 Sep 2014 18:18:29 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409041818.s84IITS8067506@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 4 Sep 2014 18:18:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271112 - in stable/10/sys: conf dev/fb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 18:18:30 -0000 Author: emaste Date: Thu Sep 4 18:18:29 2014 New Revision: 271112 URL: http://svnweb.freebsd.org/changeset/base/271112 Log: MFC vt(4) driver for Sun creator(4) framebuffers r269601 (nwhitehorn): Add a simple unaccelerated vt(4) framebuffer driver for Sun framebuffers handled by creator(4) (Sun Creator 3D, Elite 3D, etc.). This provides vt(4) consoles on all devices currently supported by syscons on sparc64. The driver should also be easily adaptable to support newer Sun framebuffers such as the XVR-500 and higher. Many thanks to dumbbell@ (Jean-Sebastien Pedron) for testing this remotely during development. r269783 (dumbbell): vt(4): Colors are indexed against a console palette, not a VGA palette Sponsored by: The FreeBSD Foundation Added: stable/10/sys/dev/fb/creator_vt.c - copied, changed from r269601, head/sys/dev/fb/creator_vt.c Modified: stable/10/sys/conf/files.sparc64 Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/files.sparc64 ============================================================================== --- stable/10/sys/conf/files.sparc64 Thu Sep 4 18:15:36 2014 (r271111) +++ stable/10/sys/conf/files.sparc64 Thu Sep 4 18:18:29 2014 (r271112) @@ -35,6 +35,7 @@ dev/atkbdc/psm.c optional psm atkbdc dev/auxio/auxio.c optional auxio sbus | auxio ebus dev/esp/esp_sbus.c optional esp sbus dev/fb/creator.c optional creator sc +dev/fb/creator_vt.c optional creator vt dev/fb/fb.c optional sc dev/fb/gallant12x22.c optional sc dev/fb/machfb.c optional machfb sc Copied and modified: stable/10/sys/dev/fb/creator_vt.c (from r269601, head/sys/dev/fb/creator_vt.c) ============================================================================== --- head/sys/dev/fb/creator_vt.c Tue Aug 5 18:19:51 2014 (r269601, copy source) +++ stable/10/sys/dev/fb/creator_vt.c Thu Sep 4 18:18:29 2014 (r271112) @@ -152,8 +152,9 @@ creatorfb_init(struct vt_device *vd) sc->memh = sparc64_fake_bustag(space, phys, &sc->memt[0]); /* 32-bit VGA palette */ - vt_generate_vga_palette(sc->fb.fb_cmap, COLOR_FORMAT_RGB, - 255, 16, 255, 8, 255, 0); + vt_generate_cons_palette(sc->fb.fb_cmap, COLOR_FORMAT_RGB, + 255, 0, 255, 8, 255, 16); + sc->fb.fb_cmsize = 16; vt_fb_init(vd); From owner-svn-src-stable-10@FreeBSD.ORG Thu Sep 4 18:24:48 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7B167FF8; Thu, 4 Sep 2014 18:24:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D03B1257; Thu, 4 Sep 2014 18:24:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84IOmin072435; Thu, 4 Sep 2014 18:24:48 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84IOlKi072433; Thu, 4 Sep 2014 18:24:47 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201409041824.s84IOlKi072433@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Thu, 4 Sep 2014 18:24:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271113 - in stable/10/sys/powerpc: aim powerpc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 18:24:48 -0000 Author: nwhitehorn Date: Thu Sep 4 18:24:47 2014 New Revision: 271113 URL: http://svnweb.freebsd.org/changeset/base/271113 Log: MFC r268880: Allow mappings of memory not previously direct-mapped by the kernel when calling mmap on /dev/mem and add a handler for the possible userland machine checks that may result. Remove some pointless and wrong copy/paste that has been in here for a decade as well. This results in a /dev/mem with identical semantics to the x86 version. Modified: stable/10/sys/powerpc/aim/trap.c stable/10/sys/powerpc/powerpc/mem.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/powerpc/aim/trap.c ============================================================================== --- stable/10/sys/powerpc/aim/trap.c Thu Sep 4 18:18:29 2014 (r271112) +++ stable/10/sys/powerpc/aim/trap.c Thu Sep 4 18:24:47 2014 (r271113) @@ -269,6 +269,15 @@ trap(struct trapframe *frame) } break; + case EXC_MCHK: + /* + * Note that this may not be recoverable for the user + * process, depending on the type of machine check, + * but it at least prevents the kernel from dying. + */ + sig = SIGBUS; + break; + default: trap_fatal(frame); } Modified: stable/10/sys/powerpc/powerpc/mem.c ============================================================================== --- stable/10/sys/powerpc/powerpc/mem.c Thu Sep 4 18:18:29 2014 (r271112) +++ stable/10/sys/powerpc/powerpc/mem.c Thu Sep 4 18:24:47 2014 (r271113) @@ -179,22 +179,13 @@ memmmap(struct cdev *dev, vm_ooffset_t o { int i; - /* - * /dev/mem is the only one that makes sense through this - * interface. For /dev/kmem any physaddr we return here - * could be transient and hence incorrect or invalid at - * a later time. - */ - if (dev2unit(dev) != CDEV_MINOR_MEM) - return (-1); - - /* Only direct-mapped addresses. */ - if (mem_valid(offset, 0) - && pmap_dev_direct_mapped(offset, 0)) + if (dev2unit(dev) == CDEV_MINOR_MEM) + *paddr = offset; + else if (dev2unit(dev) == CDEV_MINOR_KMEM) + *paddr = vtophys(offset); + else return (EFAULT); - *paddr = offset; - for (i = 0; i < mem_range_softc.mr_ndesc; i++) { if (!(mem_range_softc.mr_desc[i].mr_flags & MDF_ACTIVE)) continue; @@ -231,9 +222,7 @@ ppc_mrinit(struct mem_range_softc *sc) sc->mr_cap = 0; sc->mr_ndesc = 8; /* XXX: Should be dynamically expandable */ sc->mr_desc = malloc(sc->mr_ndesc * sizeof(struct mem_range_desc), - M_MEMDESC, M_NOWAIT | M_ZERO); - if (sc->mr_desc == NULL) - panic("%s: malloc returns NULL", __func__); + M_MEMDESC, M_WAITOK | M_ZERO); } static int @@ -328,3 +317,4 @@ memioctl(struct cdev *dev __unused, u_lo } return (error); } + From owner-svn-src-stable-10@FreeBSD.ORG Thu Sep 4 18:28:31 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 033C2493; Thu, 4 Sep 2014 18:28:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D716E1294; Thu, 4 Sep 2014 18:28:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84ISUhG073421; Thu, 4 Sep 2014 18:28:30 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84ISUi2073419; Thu, 4 Sep 2014 18:28:30 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201409041828.s84ISUi2073419@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Thu, 4 Sep 2014 18:28:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271114 - stable/10/sys/powerpc/ps3 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 18:28:31 -0000 Author: nwhitehorn Date: Thu Sep 4 18:28:30 2014 New Revision: 271114 URL: http://svnweb.freebsd.org/changeset/base/271114 Log: MFC r265883,268898: Repair bitrot in PS3 memory and interrupt allocation. Modified: stable/10/sys/powerpc/ps3/platform_ps3.c stable/10/sys/powerpc/ps3/ps3bus.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/powerpc/ps3/platform_ps3.c ============================================================================== --- stable/10/sys/powerpc/ps3/platform_ps3.c Thu Sep 4 18:24:47 2014 (r271113) +++ stable/10/sys/powerpc/ps3/platform_ps3.c Thu Sep 4 18:28:30 2014 (r271114) @@ -110,14 +110,6 @@ ps3_probe(platform_t plat) static int ps3_attach(platform_t plat) { - uint64_t junk; - int count; - struct mem_region avail_regions[2]; - - ps3_mem_regions(plat, NULL, NULL, avail_regions, &count); - - lv1_allocate_memory(avail_regions[1].mr_size, 24 /* 16 MB pages */, - 0, 0x04 /* any address */, &avail_regions[1].mr_start, &junk); pmap_mmu_install("mmu_ps3", BUS_PROBE_SPECIFIC); cpu_idle_hook = ps3_cpu_idle; @@ -152,6 +144,11 @@ ps3_mem_regions(platform_t plat, struct /* Convert to maximum amount we can allocate in 16 MB pages */ avail_regions[1].mr_size -= avail_regions[0].mr_size; avail_regions[1].mr_size -= avail_regions[1].mr_size % (16*1024*1024); + + /* Allocate extended memory region */ + lv1_allocate_memory(avail_regions[1].mr_size, 24 /* 16 MB pages */, + 0, 0x04 /* any address */, &avail_regions[1].mr_start, &junk); + *availsz = 2; if (phys != NULL) { Modified: stable/10/sys/powerpc/ps3/ps3bus.c ============================================================================== --- stable/10/sys/powerpc/ps3/ps3bus.c Thu Sep 4 18:24:47 2014 (r271113) +++ stable/10/sys/powerpc/ps3/ps3bus.c Thu Sep 4 18:28:30 2014 (r271114) @@ -127,6 +127,7 @@ static device_method_t ps3bus_methods[] struct ps3bus_softc { struct rman sc_mem_rman; + struct rman sc_intr_rman; struct mem_region *regions; int rcount; }; @@ -328,7 +329,11 @@ ps3bus_attach(device_t self) sc = device_get_softc(self); sc->sc_mem_rman.rm_type = RMAN_ARRAY; sc->sc_mem_rman.rm_descr = "PS3Bus Memory Mapped I/O"; + sc->sc_intr_rman.rm_type = RMAN_ARRAY; + sc->sc_intr_rman.rm_descr = "PS3Bus Interrupts"; rman_init(&sc->sc_mem_rman); + rman_init(&sc->sc_intr_rman); + rman_manage_region(&sc->sc_intr_rman, 0, ~0); /* Get memory regions for DMA */ mem_regions(&sc->regions, &sc->rcount, &sc->regions, &sc->rcount); @@ -562,8 +567,13 @@ ps3bus_alloc_resource(device_t bus, devi rm = &sc->sc_mem_rman; break; case SYS_RES_IRQ: - return (resource_list_alloc(&dinfo->resources, bus, child, - type, rid, start, end, count, flags)); + rle = resource_list_find(&dinfo->resources, SYS_RES_IRQ, + *rid); + rm = &sc->sc_intr_rman; + adjstart = rle->start; + adjcount = ulmax(count, rle->count); + adjend = ulmax(rle->end, rle->start + adjcount - 1); + break; default: device_printf(bus, "unknown resource request from %s\n", device_get_nameunit(child)); From owner-svn-src-stable-10@FreeBSD.ORG Thu Sep 4 18:30:34 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5593A7D2; Thu, 4 Sep 2014 18:30:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4011A12B2; Thu, 4 Sep 2014 18:30:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84IUYXQ074182; Thu, 4 Sep 2014 18:30:34 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84IUYRQ074181; Thu, 4 Sep 2014 18:30:34 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409041830.s84IUYRQ074181@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 4 Sep 2014 18:30:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271115 - stable/10/sys/dev/vt/hw/ofwfb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 18:30:34 -0000 Author: emaste Date: Thu Sep 4 18:30:33 2014 New Revision: 271115 URL: http://svnweb.freebsd.org/changeset/base/271115 Log: MFC r268350 (nwhitehorn): Use common vt_fb parts in ofwfb as far as we are able without sacrificing performance. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c ============================================================================== --- stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c Thu Sep 4 18:28:30 2014 (r271114) +++ stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c Thu Sep 4 18:30:33 2014 (r271115) @@ -30,8 +30,10 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include #include #include @@ -47,24 +49,17 @@ __FBSDID("$FreeBSD$"); #include struct ofwfb_softc { + struct fb_info fb; + phandle_t sc_node; + bus_space_tag_t sc_memt; struct ofw_pci_register sc_pciaddrs[8]; int sc_num_pciaddrs; - - - intptr_t sc_addr; - int sc_depth; - int sc_stride; - - bus_space_tag_t sc_memt; - - uint32_t sc_colormap[16]; }; static vd_probe_t ofwfb_probe; static vd_init_t ofwfb_init; -static vd_blank_t ofwfb_blank; static vd_bitbltchr_t ofwfb_bitbltchr; static vd_fb_mmap_t ofwfb_mmap; @@ -72,7 +67,7 @@ static const struct vt_driver vt_ofwfb_d .vd_name = "ofwfb", .vd_probe = ofwfb_probe, .vd_init = ofwfb_init, - .vd_blank = ofwfb_blank, + .vd_blank = vt_fb_blank, .vd_bitbltchr = ofwfb_bitbltchr, .vd_maskbitbltchr = ofwfb_bitbltchr, .vd_fb_mmap = ofwfb_mmap, @@ -108,36 +103,11 @@ ofwfb_probe(struct vt_device *vd) } static void -ofwfb_blank(struct vt_device *vd, term_color_t color) -{ - struct ofwfb_softc *sc = vd->vd_softc; - u_int ofs, size; - uint32_t c; - - size = sc->sc_stride * vd->vd_height; - switch (sc->sc_depth) { - case 8: - c = (color << 24) | (color << 16) | (color << 8) | color; - for (ofs = 0; ofs < size/4; ofs++) - *(uint32_t *)(sc->sc_addr + 4*ofs) = c; - break; - case 32: - c = sc->sc_colormap[color]; - for (ofs = 0; ofs < size; ofs++) - *(uint32_t *)(sc->sc_addr + 4*ofs) = c; - break; - default: - /* panic? */ - break; - } -} - -static void ofwfb_bitbltchr(struct vt_device *vd, const uint8_t *src, const uint8_t *mask, int bpl, vt_axis_t top, vt_axis_t left, unsigned int width, unsigned int height, term_color_t fg, term_color_t bg) { - struct ofwfb_softc *sc = vd->vd_softc; + struct fb_info *sc = vd->vd_softc; u_long line; uint32_t fgc, bgc; int c; @@ -147,8 +117,8 @@ ofwfb_bitbltchr(struct vt_device *vd, co uint8_t c[4]; } ch1, ch2; - fgc = sc->sc_colormap[fg]; - bgc = sc->sc_colormap[bg]; + fgc = sc->fb_cmap[fg]; + bgc = sc->fb_cmap[bg]; b = m = 0; /* Don't try to put off screen pixels */ @@ -156,8 +126,8 @@ ofwfb_bitbltchr(struct vt_device *vd, co vd->vd_height)) return; - line = (sc->sc_stride * top) + left * sc->sc_depth/8; - if (mask == NULL && sc->sc_depth == 8 && (width % 8 == 0)) { + line = (sc->fb_stride * top) + left * sc->fb_bpp/8; + if (mask == NULL && sc->fb_bpp == 8 && (width % 8 == 0)) { for (; height > 0; height--) { for (c = 0; c < width; c += 8) { b = *src++; @@ -183,11 +153,11 @@ ofwfb_bitbltchr(struct vt_device *vd, co if (b & 0x02) ch2.c[2] = fg; if (b & 0x01) ch2.c[3] = fg; - *(uint32_t *)(sc->sc_addr + line + c) = ch1.l; - *(uint32_t *)(sc->sc_addr + line + c + 4) = + *(uint32_t *)(sc->fb_vbase + line + c) = ch1.l; + *(uint32_t *)(sc->fb_vbase + line + c + 4) = ch2.l; } - line += sc->sc_stride; + line += sc->fb_stride; } } else { for (; height > 0; height--) { @@ -205,13 +175,13 @@ ofwfb_bitbltchr(struct vt_device *vd, co if ((m & 0x80) == 0) continue; } - switch(sc->sc_depth) { + switch(sc->fb_bpp) { case 8: - *(uint8_t *)(sc->sc_addr + line + c) = + *(uint8_t *)(sc->fb_vbase + line + c) = b & 0x80 ? fg : bg; break; case 32: - *(uint32_t *)(sc->sc_addr + line + 4*c) + *(uint32_t *)(sc->fb_vbase + line + 4*c) = (b & 0x80) ? fgc : bgc; break; default: @@ -219,7 +189,7 @@ ofwfb_bitbltchr(struct vt_device *vd, co break; } } - line += sc->sc_stride; + line += sc->fb_stride; } } } @@ -243,16 +213,16 @@ ofwfb_initialize(struct vt_device *vd) * Set up the color map */ - switch (sc->sc_depth) { + switch (sc->fb.fb_bpp) { case 8: - vt_generate_cons_palette(sc->sc_colormap, COLOR_FORMAT_RGB, 255, + vt_generate_cons_palette(sc->fb.fb_cmap, COLOR_FORMAT_RGB, 255, 16, 255, 8, 255, 0); for (i = 0; i < 16; i++) { OF_call_method("color!", ih, 4, 1, - (cell_t)((sc->sc_colormap[i] >> 16) & 0xff), - (cell_t)((sc->sc_colormap[i] >> 8) & 0xff), - (cell_t)((sc->sc_colormap[i] >> 0) & 0xff), + (cell_t)((sc->fb.fb_cmap[i] >> 16) & 0xff), + (cell_t)((sc->fb.fb_cmap[i] >> 8) & 0xff), + (cell_t)((sc->fb.fb_cmap[i] >> 0) & 0xff), (cell_t)i, &retval); } break; @@ -265,24 +235,23 @@ ofwfb_initialize(struct vt_device *vd) * endianness slightly different. Figure out the host-view * endianness of the frame buffer. */ - oldpix = bus_space_read_4(sc->sc_memt, sc->sc_addr, 0); - bus_space_write_4(sc->sc_memt, sc->sc_addr, 0, 0xff000000); - if (*(uint8_t *)(sc->sc_addr) == 0xff) - vt_generate_cons_palette(sc->sc_colormap, + oldpix = bus_space_read_4(sc->sc_memt, sc->fb.fb_vbase, 0); + bus_space_write_4(sc->sc_memt, sc->fb.fb_vbase, 0, 0xff000000); + if (*(uint8_t *)(sc->fb.fb_vbase) == 0xff) + vt_generate_cons_palette(sc->fb.fb_cmap, COLOR_FORMAT_RGB, 255, 0, 255, 8, 255, 16); else - vt_generate_cons_palette(sc->sc_colormap, + vt_generate_cons_palette(sc->fb.fb_cmap, COLOR_FORMAT_RGB, 255, 16, 255, 8, 255, 0); - bus_space_write_4(sc->sc_memt, sc->sc_addr, 0, oldpix); + bus_space_write_4(sc->sc_memt, sc->fb.fb_vbase, 0, oldpix); break; default: - panic("Unknown color space depth %d", sc->sc_depth); + panic("Unknown color space depth %d", sc->fb.fb_bpp); break; } - /* Clear the screen. */ - ofwfb_blank(vd, TC_BLACK); + sc->fb.fb_cmsize = 16; } static int @@ -293,7 +262,7 @@ ofwfb_init(struct vt_device *vd) phandle_t chosen; ihandle_t stdout; phandle_t node; - uint32_t depth, height, width; + uint32_t depth, height, width, stride; uint32_t fb_phys; int i, len; #ifdef __sparc64__ @@ -326,21 +295,23 @@ ofwfb_init(struct vt_device *vd) if (OF_getproplen(node, "height") != sizeof(height) || OF_getproplen(node, "width") != sizeof(width) || OF_getproplen(node, "depth") != sizeof(depth) || - OF_getproplen(node, "linebytes") != sizeof(sc->sc_stride)) + OF_getproplen(node, "linebytes") != sizeof(sc->fb.fb_stride)) return (CN_DEAD); /* Only support 8 and 32-bit framebuffers */ OF_getprop(node, "depth", &depth, sizeof(depth)); if (depth != 8 && depth != 32) return (CN_DEAD); - sc->sc_depth = depth; + sc->fb.fb_bpp = depth; OF_getprop(node, "height", &height, sizeof(height)); OF_getprop(node, "width", &width, sizeof(width)); - OF_getprop(node, "linebytes", &sc->sc_stride, sizeof(sc->sc_stride)); + OF_getprop(node, "linebytes", &stride, sizeof(stride)); - vd->vd_height = height; - vd->vd_width = width; + sc->fb.fb_height = height; + sc->fb.fb_width = width; + sc->fb.fb_stride = stride; + sc->fb.fb_size = sc->fb.fb_height * sc->fb.fb_stride; /* * Get the PCI addresses of the adapter, if present. The node may be the @@ -368,12 +339,13 @@ ofwfb_init(struct vt_device *vd) #if defined(__powerpc__) sc->sc_memt = &bs_be_tag; - bus_space_map(sc->sc_memt, fb_phys, height * sc->sc_stride, - BUS_SPACE_MAP_PREFETCHABLE, &sc->sc_addr); + bus_space_map(sc->sc_memt, fb_phys, height * sc->fb.fb_stride, + BUS_SPACE_MAP_PREFETCHABLE, &sc->fb.fb_vbase); #elif defined(__sparc64__) OF_decode_addr(node, 0, &space, &phys); sc->sc_memt = &ofwfb_memt[0]; - sc->sc_addr = sparc64_fake_bustag(space, fb_phys, sc->sc_memt); + sc->fb.fb_vbase = + sparc64_fake_bustag(space, fb_phys, sc->sc_memt); #else #error Unsupported platform! #endif @@ -388,7 +360,8 @@ ofwfb_init(struct vt_device *vd) fb_phys = sc->sc_num_pciaddrs; for (i = 0; i < sc->sc_num_pciaddrs; i++) { /* If it is too small, not the framebuffer */ - if (sc->sc_pciaddrs[i].size_lo < sc->sc_stride*height) + if (sc->sc_pciaddrs[i].size_lo < + sc->fb.fb_stride * height) continue; /* If it is not memory, it isn't either */ if (!(sc->sc_pciaddrs[i].phys_hi & @@ -408,7 +381,7 @@ ofwfb_init(struct vt_device *vd) return (CN_DEAD); #if defined(__powerpc__) - OF_decode_addr(node, fb_phys, &sc->sc_memt, &sc->sc_addr); + OF_decode_addr(node, fb_phys, &sc->sc_memt, &sc->fb.fb_vbase); #elif defined(__sparc64__) OF_decode_addr(node, fb_phys, &space, &phys); sc->sc_memt = &ofwfb_memt[0]; @@ -416,7 +389,11 @@ ofwfb_init(struct vt_device *vd) #endif } + sc->fb.fb_pbase = fb_phys; + ofwfb_initialize(vd); + fb_probe(&sc->fb); + vt_fb_init(vd); return (CN_INTERNAL); } @@ -436,6 +413,7 @@ ofwfb_mmap(struct vt_device *vd, vm_ooff if (offset >= sc->sc_pciaddrs[i].phys_lo && offset < (sc->sc_pciaddrs[i].phys_lo + sc->sc_pciaddrs[i].size_lo)) { +#ifdef VM_MEMATTR_WRITE_COMBINING /* * If this is a prefetchable BAR, we can (and should) * enable write-combining. @@ -443,6 +421,7 @@ ofwfb_mmap(struct vt_device *vd, vm_ooff if (sc->sc_pciaddrs[i].phys_hi & OFW_PCI_PHYS_HI_PREFETCHABLE) *memattr = VM_MEMATTR_WRITE_COMBINING; +#endif *paddr = offset; return (0); From owner-svn-src-stable-10@FreeBSD.ORG Thu Sep 4 18:34:23 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 231DDA48; Thu, 4 Sep 2014 18:34:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 040881360; Thu, 4 Sep 2014 18:34:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84IYMSp078130; Thu, 4 Sep 2014 18:34:22 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84IYM6F078129; Thu, 4 Sep 2014 18:34:22 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409041834.s84IYM6F078129@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 4 Sep 2014 18:34:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271116 - stable/10/sys/dev/vt/hw/ofwfb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 18:34:23 -0000 Author: emaste Date: Thu Sep 4 18:34:22 2014 New Revision: 271116 URL: http://svnweb.freebsd.org/changeset/base/271116 Log: MFC r269278 (nwhitehorn): Make mmap() of the console device when using ofwfb work like other supported framebuffer drivers. This lets ofwfb work with xf86-video-scfb and makes the driver much more generic and less PCI-centric. This changes some user-visible behavior and will require updates to the xorg-server port on PowerPC when using ATI graphics cards. Relnotes: Yes Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c ============================================================================== --- stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c Thu Sep 4 18:30:33 2014 (r271115) +++ stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c Thu Sep 4 18:34:22 2014 (r271116) @@ -52,16 +52,13 @@ struct ofwfb_softc { struct fb_info fb; phandle_t sc_node; + ihandle_t sc_handle; bus_space_tag_t sc_memt; - - struct ofw_pci_register sc_pciaddrs[8]; - int sc_num_pciaddrs; }; static vd_probe_t ofwfb_probe; static vd_init_t ofwfb_init; static vd_bitbltchr_t ofwfb_bitbltchr; -static vd_fb_mmap_t ofwfb_mmap; static const struct vt_driver vt_ofwfb_driver = { .vd_name = "ofwfb", @@ -70,7 +67,8 @@ static const struct vt_driver vt_ofwfb_d .vd_blank = vt_fb_blank, .vd_bitbltchr = ofwfb_bitbltchr, .vd_maskbitbltchr = ofwfb_bitbltchr, - .vd_fb_mmap = ofwfb_mmap, + .vd_fb_ioctl = vt_fb_ioctl, + .vd_fb_mmap = vt_fb_mmap, .vd_priority = VD_PRIORITY_GENERIC+1, }; @@ -198,17 +196,10 @@ static void ofwfb_initialize(struct vt_device *vd) { struct ofwfb_softc *sc = vd->vd_softc; - char name[64]; - ihandle_t ih; int i; cell_t retval; uint32_t oldpix; - /* Open display device, thereby initializing it */ - memset(name, 0, sizeof(name)); - OF_package_to_path(sc->sc_node, name, sizeof(name)); - ih = OF_open(name); - /* * Set up the color map */ @@ -219,7 +210,7 @@ ofwfb_initialize(struct vt_device *vd) 16, 255, 8, 255, 0); for (i = 0; i < 16; i++) { - OF_call_method("color!", ih, 4, 1, + OF_call_method("color!", sc->sc_handle, 4, 1, (cell_t)((sc->fb.fb_cmap[i] >> 16) & 0xff), (cell_t)((sc->fb.fb_cmap[i] >> 8) & 0xff), (cell_t)((sc->fb.fb_cmap[i] >> 0) & 0xff), @@ -260,7 +251,6 @@ ofwfb_init(struct vt_device *vd) struct ofwfb_softc *sc; char type[64]; phandle_t chosen; - ihandle_t stdout; phandle_t node; uint32_t depth, height, width, stride; uint32_t fb_phys; @@ -275,14 +265,15 @@ ofwfb_init(struct vt_device *vd) vd->vd_softc = sc = &ofwfb_conssoftc; chosen = OF_finddevice("/chosen"); - OF_getprop(chosen, "stdout", &stdout, sizeof(stdout)); - node = OF_instance_to_package(stdout); + OF_getprop(chosen, "stdout", &sc->sc_handle, sizeof(ihandle_t)); + node = OF_instance_to_package(sc->sc_handle); if (node == -1) { /* * The "/chosen/stdout" does not exist try * using "screen" directly. */ node = OF_finddevice("screen"); + sc->sc_handle = OF_open("screen"); } OF_getprop(node, "device_type", type, sizeof(type)); if (strcmp(type, "display") != 0) @@ -291,6 +282,13 @@ ofwfb_init(struct vt_device *vd) /* Keep track of the OF node */ sc->sc_node = node; + /* + * Try to use a 32-bit framebuffer if possible. This may be + * unimplemented and fail. That's fine -- it just means we are + * stuck with the defaults. + */ + OF_call_method("set-depth", sc->sc_handle, 1, 1, (cell_t)32, &i); + /* Make sure we have needed properties */ if (OF_getproplen(node, "height") != sizeof(height) || OF_getproplen(node, "width") != sizeof(width) || @@ -302,7 +300,7 @@ ofwfb_init(struct vt_device *vd) OF_getprop(node, "depth", &depth, sizeof(depth)); if (depth != 8 && depth != 32) return (CN_DEAD); - sc->fb.fb_bpp = depth; + sc->fb.fb_bpp = sc->fb.fb_depth = depth; OF_getprop(node, "height", &height, sizeof(height)); OF_getprop(node, "width", &width, sizeof(width)); @@ -314,21 +312,6 @@ ofwfb_init(struct vt_device *vd) sc->fb.fb_size = sc->fb.fb_height * sc->fb.fb_stride; /* - * Get the PCI addresses of the adapter, if present. The node may be the - * child of the PCI device: in that case, try the parent for - * the assigned-addresses property. - */ - len = OF_getprop(node, "assigned-addresses", sc->sc_pciaddrs, - sizeof(sc->sc_pciaddrs)); - if (len == -1) { - len = OF_getprop(OF_parent(node), "assigned-addresses", - sc->sc_pciaddrs, sizeof(sc->sc_pciaddrs)); - } - if (len == -1) - len = 0; - sc->sc_num_pciaddrs = len / sizeof(struct ofw_pci_register); - - /* * Grab the physical address of the framebuffer, and then map it * into our memory space. If the MMU is not yet up, it will be * remapped for us when relocation turns on. @@ -339,13 +322,18 @@ ofwfb_init(struct vt_device *vd) #if defined(__powerpc__) sc->sc_memt = &bs_be_tag; - bus_space_map(sc->sc_memt, fb_phys, height * sc->fb.fb_stride, + bus_space_map(sc->sc_memt, fb_phys, sc->fb.fb_size, BUS_SPACE_MAP_PREFETCHABLE, &sc->fb.fb_vbase); #elif defined(__sparc64__) OF_decode_addr(node, 0, &space, &phys); sc->sc_memt = &ofwfb_memt[0]; sc->fb.fb_vbase = sparc64_fake_bustag(space, fb_phys, sc->sc_memt); + #elif defined(__arm__) + sc->sc_memt = fdtbus_bs_tag; + bus_space_map(sc->sc_memt, sc->fb.fb_pbase, sc->fb.fb_size, + BUS_SPACE_MAP_PREFETCHABLE, + (bus_space_handle_t *)&sc->fb.fb_vbase); #else #error Unsupported platform! #endif @@ -357,14 +345,31 @@ ofwfb_init(struct vt_device *vd) * Linux does the same thing. */ - fb_phys = sc->sc_num_pciaddrs; - for (i = 0; i < sc->sc_num_pciaddrs; i++) { + struct ofw_pci_register pciaddrs[8]; + int num_pciaddrs = 0; + + /* + * Get the PCI addresses of the adapter, if present. The node + * may be the child of the PCI device: in that case, try the + * parent for the assigned-addresses property. + */ + len = OF_getprop(node, "assigned-addresses", pciaddrs, + sizeof(pciaddrs)); + if (len == -1) { + len = OF_getprop(OF_parent(node), "assigned-addresses", + pciaddrs, sizeof(pciaddrs)); + } + if (len == -1) + len = 0; + num_pciaddrs = len / sizeof(struct ofw_pci_register); + + fb_phys = num_pciaddrs; + for (i = 0; i < num_pciaddrs; i++) { /* If it is too small, not the framebuffer */ - if (sc->sc_pciaddrs[i].size_lo < - sc->fb.fb_stride * height) + if (pciaddrs[i].size_lo < sc->fb.fb_stride * height) continue; /* If it is not memory, it isn't either */ - if (!(sc->sc_pciaddrs[i].phys_hi & + if (!(pciaddrs[i].phys_hi & OFW_PCI_PHYS_HI_SPACE_MEM32)) continue; @@ -372,12 +377,11 @@ ofwfb_init(struct vt_device *vd) fb_phys = i; /* If it is prefetchable, it certainly is */ - if (sc->sc_pciaddrs[i].phys_hi & - OFW_PCI_PHYS_HI_PREFETCHABLE) + if (pciaddrs[i].phys_hi & OFW_PCI_PHYS_HI_PREFETCHABLE) break; } - if (fb_phys == sc->sc_num_pciaddrs) /* No candidates found */ + if (fb_phys == num_pciaddrs) /* No candidates found */ return (CN_DEAD); #if defined(__powerpc__) @@ -385,7 +389,10 @@ ofwfb_init(struct vt_device *vd) #elif defined(__sparc64__) OF_decode_addr(node, fb_phys, &space, &phys); sc->sc_memt = &ofwfb_memt[0]; - sc->sc_addr = sparc64_fake_bustag(space, phys, sc->sc_memt); + sc->fb.fb_vbase = sparc64_fake_bustag(space, phys, sc->sc_memt); + #else + /* No ability to interpret assigned-addresses otherwise */ + return (CN_DEAD); #endif } @@ -398,39 +405,3 @@ ofwfb_init(struct vt_device *vd) return (CN_INTERNAL); } -static int -ofwfb_mmap(struct vt_device *vd, vm_ooffset_t offset, vm_paddr_t *paddr, - int prot, vm_memattr_t *memattr) -{ - struct ofwfb_softc *sc = vd->vd_softc; - int i; - - /* - * Make sure the requested address lies within the PCI device's - * assigned addrs - */ - for (i = 0; i < sc->sc_num_pciaddrs; i++) - if (offset >= sc->sc_pciaddrs[i].phys_lo && - offset < (sc->sc_pciaddrs[i].phys_lo + sc->sc_pciaddrs[i].size_lo)) - { -#ifdef VM_MEMATTR_WRITE_COMBINING - /* - * If this is a prefetchable BAR, we can (and should) - * enable write-combining. - */ - if (sc->sc_pciaddrs[i].phys_hi & - OFW_PCI_PHYS_HI_PREFETCHABLE) - *memattr = VM_MEMATTR_WRITE_COMBINING; -#endif - - *paddr = offset; - return (0); - } - - /* - * Hack for Radeon... - */ - *paddr = offset; - return (0); -} - From owner-svn-src-stable-10@FreeBSD.ORG Thu Sep 4 18:43:42 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BCEE6E14; Thu, 4 Sep 2014 18:43:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8B7A714B1; Thu, 4 Sep 2014 18:43:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84Ihgxm082866; Thu, 4 Sep 2014 18:43:42 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84IheSV082855; Thu, 4 Sep 2014 18:43:40 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409041843.s84IheSV082855@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 4 Sep 2014 18:43:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271117 - in stable/10/sys: dev/fb dev/vt/hw/efifb dev/vt/hw/fb dev/vt/hw/ofwfb powerpc/ps3 sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 18:43:43 -0000 Author: emaste Date: Thu Sep 4 18:43:40 2014 New Revision: 271117 URL: http://svnweb.freebsd.org/changeset/base/271117 Log: MFC fbd(4) and vt_fb disentanglement: r268472 (ray): Should check fb_read method presence instead of double check for fb_write. r269620 (nwhitehorn): Retire various intertwined bits of fbd(4) and vt_fb, in particular the pixel modification indirection. No actual drivers use it and those that might (e.g. creatorfb) use custom implementations of vd_bitbltchr(). Relnotes: No Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/fb/fbd.c stable/10/sys/dev/vt/hw/efifb/efifb.c stable/10/sys/dev/vt/hw/fb/vt_early_fb.c stable/10/sys/dev/vt/hw/fb/vt_fb.c stable/10/sys/dev/vt/hw/fb/vt_fb.h stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c stable/10/sys/powerpc/ps3/ps3_syscons.c stable/10/sys/sys/fbio.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/fb/fbd.c ============================================================================== --- stable/10/sys/dev/fb/fbd.c Thu Sep 4 18:34:22 2014 (r271116) +++ stable/10/sys/dev/fb/fbd.c Thu Sep 4 18:43:40 2014 (r271117) @@ -165,6 +165,10 @@ fb_mmap(struct cdev *dev, vm_ooffset_t o struct fb_info *info; info = dev->si_drv1; + + if ((info->fb_flags & FB_FLAG_NOMMAP) || info->fb_pbase == 0) + return (ENODEV); + if (offset < info->fb_size) { *paddr = info->fb_pbase + offset; return (0); @@ -172,103 +176,6 @@ fb_mmap(struct cdev *dev, vm_ooffset_t o return (EINVAL); } - -static void -vt_fb_mem_wr1(struct fb_info *sc, uint32_t o, uint8_t v) -{ - - KASSERT((o < sc->fb_size), ("Offset %#08x out of fb size", o)); - *(uint8_t *)(sc->fb_vbase + o) = v; -} - -static void -vt_fb_mem_wr2(struct fb_info *sc, uint32_t o, uint16_t v) -{ - - KASSERT((o < sc->fb_size), ("Offset %#08x out of fb size", o)); - *(uint16_t *)(sc->fb_vbase + o) = v; -} - -static void -vt_fb_mem_wr4(struct fb_info *sc, uint32_t o, uint32_t v) -{ - - KASSERT((o < sc->fb_size), ("Offset %#08x out of fb size", o)); - *(uint32_t *)(sc->fb_vbase + o) = v; -} - -static void -vt_fb_mem_copy(struct fb_info *sc, uint32_t offset_to, uint32_t offset_from, - uint32_t size) -{ - - memmove((void *)(sc->fb_vbase + offset_to), (void *)(sc->fb_vbase + - offset_from), size); -} - -static void -vt_fb_indir_wr1(struct fb_info *sc, uint32_t o, uint8_t v) -{ - - KASSERT((o < sc->fb_size), ("Offset %#08x out of fb size", o)); - sc->fb_write(sc->fb_priv, o, &v, 1); -} - -static void -vt_fb_indir_wr2(struct fb_info *sc, uint32_t o, uint16_t v) -{ - - KASSERT((o < sc->fb_size), ("Offset %#08x out of fb size", o)); - sc->fb_write(sc->fb_priv, o, &v, 2); -} - -static void -vt_fb_indir_wr4(struct fb_info *sc, uint32_t o, uint32_t v) -{ - - KASSERT((o < sc->fb_size), ("Offset %#08x out of fb size", o)); - sc->fb_write(sc->fb_priv, o, &v, 4); -} - -static void -vt_fb_indir_copy(struct fb_info *sc, uint32_t offset_to, uint32_t offset_from, - uint32_t size) -{ - - sc->copy(sc->fb_priv, offset_to, offset_from, size); -} - -int -fb_probe(struct fb_info *info) -{ - - if (info->fb_size == 0) - return (ENXIO); - - if (info->fb_write != NULL) { - if (info->fb_write == NULL) { - return (EINVAL); - } - info->fb_flags |= FB_FLAG_NOMMAP; - info->wr1 = &vt_fb_indir_wr1; - info->wr2 = &vt_fb_indir_wr2; - info->wr4 = &vt_fb_indir_wr4; - info->copy = &vt_fb_indir_copy; - } else if (info->fb_vbase != 0) { - if (info->fb_pbase == 0) { - info->fb_flags |= FB_FLAG_NOMMAP; - } - info->wr1 = &vt_fb_mem_wr1; - info->wr2 = &vt_fb_mem_wr2; - info->wr4 = &vt_fb_mem_wr4; - info->copy = &vt_fb_mem_copy; - } else - return (ENXIO); - - return (0); -} - - static int fb_init(struct fb_list_entry *entry, int unit) { @@ -329,10 +236,6 @@ fbd_register(struct fb_info* info) return (0); } - err = fb_probe(info); - if (err) - return (err); - entry = malloc(sizeof(struct fb_list_entry), M_DEVBUF, M_WAITOK|M_ZERO); entry->fb_info = info; @@ -342,8 +245,10 @@ fbd_register(struct fb_info* info) if (err) return (err); - if (first) - vt_fb_attach(info); + if (first) { + if (vt_fb_attach(info) == CN_DEAD) + return (ENXIO); + } return (0); } Modified: stable/10/sys/dev/vt/hw/efifb/efifb.c ============================================================================== --- stable/10/sys/dev/vt/hw/efifb/efifb.c Thu Sep 4 18:34:22 2014 (r271116) +++ stable/10/sys/dev/vt/hw/efifb/efifb.c Thu Sep 4 18:43:40 2014 (r271117) @@ -154,12 +154,8 @@ vt_efifb_init(struct vt_device *vd) info->fb_width = MIN(info->fb_width, VT_FB_DEFAULT_WIDTH); info->fb_height = MIN(info->fb_height, VT_FB_DEFAULT_HEIGHT); - fb_probe(info); vt_fb_init(vd); - /* Clear the screen. */ - vt_fb_blank(vd, TC_BLACK); - return (CN_INTERNAL); } Modified: stable/10/sys/dev/vt/hw/fb/vt_early_fb.c ============================================================================== --- stable/10/sys/dev/vt/hw/fb/vt_early_fb.c Thu Sep 4 18:34:22 2014 (r271116) +++ stable/10/sys/dev/vt/hw/fb/vt_early_fb.c Thu Sep 4 18:43:40 2014 (r271117) @@ -296,7 +296,6 @@ vt_efb_init(struct vt_device *vd) #else vt_efb_initialize(info); #endif - fb_probe(info); vt_fb_init(vd); return (CN_INTERNAL); Modified: stable/10/sys/dev/vt/hw/fb/vt_fb.c ============================================================================== --- stable/10/sys/dev/vt/hw/fb/vt_fb.c Thu Sep 4 18:34:22 2014 (r271116) +++ stable/10/sys/dev/vt/hw/fb/vt_fb.c Thu Sep 4 18:43:40 2014 (r271117) @@ -61,6 +61,30 @@ static struct vt_driver vt_fb_driver = { VT_DRIVER_DECLARE(vt_fb, vt_fb_driver); +static void +vt_fb_mem_wr1(struct fb_info *sc, uint32_t o, uint8_t v) +{ + + KASSERT((o < sc->fb_size), ("Offset %#08x out of fb size", o)); + *(uint8_t *)(sc->fb_vbase + o) = v; +} + +static void +vt_fb_mem_wr2(struct fb_info *sc, uint32_t o, uint16_t v) +{ + + KASSERT((o < sc->fb_size), ("Offset %#08x out of fb size", o)); + *(uint16_t *)(sc->fb_vbase + o) = v; +} + +static void +vt_fb_mem_wr4(struct fb_info *sc, uint32_t o, uint32_t v) +{ + + KASSERT((o < sc->fb_size), ("Offset %#08x out of fb size", o)); + *(uint32_t *)(sc->fb_vbase + o) = v; +} + int vt_fb_ioctl(struct vt_device *vd, u_long cmd, caddr_t data, struct thread *td) { @@ -134,20 +158,22 @@ vt_fb_setpixel(struct vt_device *vd, int c = info->fb_cmap[color]; o = info->fb_stride * y + x * FBTYPE_GET_BYTESPP(info); + KASSERT((info->fb_vbase != 0), ("Unmapped framebuffer")); + switch (FBTYPE_GET_BYTESPP(info)) { case 1: - info->wr1(info, o, c); + vt_fb_mem_wr1(info, o, c); break; case 2: - info->wr2(info, o, c); + vt_fb_mem_wr2(info, o, c); break; case 3: - info->wr1(info, o, (c >> 16) & 0xff); - info->wr1(info, o + 1, (c >> 8) & 0xff); - info->wr1(info, o + 2, c & 0xff); + vt_fb_mem_wr1(info, o, (c >> 16) & 0xff); + vt_fb_mem_wr1(info, o + 1, (c >> 8) & 0xff); + vt_fb_mem_wr1(info, o + 2, c & 0xff); break; case 4: - info->wr4(info, o, c); + vt_fb_mem_wr4(info, o, c); break; default: /* panic? */ @@ -183,32 +209,34 @@ vt_fb_blank(struct vt_device *vd, term_c info = vd->vd_softc; c = info->fb_cmap[color]; + KASSERT((info->fb_vbase != 0), ("Unmapped framebuffer")); + switch (FBTYPE_GET_BYTESPP(info)) { case 1: for (h = 0; h < info->fb_height; h++) for (o = 0; o < info->fb_stride; o++) - info->wr1(info, h*info->fb_stride + o, c); + vt_fb_mem_wr1(info, h*info->fb_stride + o, c); break; case 2: for (h = 0; h < info->fb_height; h++) for (o = 0; o < info->fb_stride; o += 2) - info->wr2(info, h*info->fb_stride + o, c); + vt_fb_mem_wr2(info, h*info->fb_stride + o, c); break; case 3: for (h = 0; h < info->fb_height; h++) for (o = 0; o < info->fb_stride; o += 3) { - info->wr1(info, h*info->fb_stride + o, + vt_fb_mem_wr1(info, h*info->fb_stride + o, (c >> 16) & 0xff); - info->wr1(info, h*info->fb_stride + o + 1, + vt_fb_mem_wr1(info, h*info->fb_stride + o + 1, (c >> 8) & 0xff); - info->wr1(info, h*info->fb_stride + o + 2, + vt_fb_mem_wr1(info, h*info->fb_stride + o + 2, c & 0xff); } break; case 4: for (h = 0; h < info->fb_height; h++) for (o = 0; o < info->fb_stride; o += 4) - info->wr4(info, h*info->fb_stride + o, c); + vt_fb_mem_wr4(info, h*info->fb_stride + o, c); break; default: /* panic? */ @@ -241,6 +269,8 @@ vt_fb_bitbltchr(struct vt_device *vd, co info->fb_height)) return; + KASSERT((info->fb_vbase != 0), ("Unmapped framebuffer")); + line = (info->fb_stride * top) + (left * bpp); for (l = 0; l < height; l++) { ch = src; @@ -254,19 +284,19 @@ vt_fb_bitbltchr(struct vt_device *vd, co switch(bpp) { case 1: - info->wr1(info, o, cc); + vt_fb_mem_wr1(info, o, cc); break; case 2: - info->wr2(info, o, cc); + vt_fb_mem_wr2(info, o, cc); break; case 3: /* Packed mode, so unaligned. Byte access. */ - info->wr1(info, o, (cc >> 16) & 0xff); - info->wr1(info, o + 1, (cc >> 8) & 0xff); - info->wr1(info, o + 2, cc & 0xff); + vt_fb_mem_wr1(info, o, (cc >> 16) & 0xff); + vt_fb_mem_wr1(info, o + 1, (cc >> 8) & 0xff); + vt_fb_mem_wr1(info, o + 2, cc & 0xff); break; case 4: - info->wr4(info, o, cc); + vt_fb_mem_wr4(info, o, cc); break; default: /* panic? */ @@ -303,6 +333,8 @@ vt_fb_maskbitbltchr(struct vt_device *vd info->fb_height)) return; + KASSERT((info->fb_vbase != 0), ("Unmapped framebuffer")); + line = (info->fb_stride * top) + (left * bpp); for (l = 0; l < height; l++) { ch = src; @@ -325,19 +357,19 @@ vt_fb_maskbitbltchr(struct vt_device *vd switch(bpp) { case 1: - info->wr1(info, o, cc); + vt_fb_mem_wr1(info, o, cc); break; case 2: - info->wr2(info, o, cc); + vt_fb_mem_wr2(info, o, cc); break; case 3: /* Packed mode, so unaligned. Byte access. */ - info->wr1(info, o, (cc >> 16) & 0xff); - info->wr1(info, o + 1, (cc >> 8) & 0xff); - info->wr1(info, o + 2, cc & 0xff); + vt_fb_mem_wr1(info, o, (cc >> 16) & 0xff); + vt_fb_mem_wr1(info, o + 1, (cc >> 8) & 0xff); + vt_fb_mem_wr1(info, o + 2, cc & 0xff); break; case 4: - info->wr4(info, o, cc); + vt_fb_mem_wr4(info, o, cc); break; default: /* panic? */ @@ -393,6 +425,12 @@ vt_fb_init(struct vt_device *vd) vd->vd_height = info->fb_height; vd->vd_width = info->fb_width; + if (info->fb_size == 0) + return (CN_DEAD); + + if (info->fb_pbase == 0) + info->fb_flags |= FB_FLAG_NOMMAP; + if (info->fb_cmsize <= 0) { err = vt_fb_init_cmap(info->fb_cmap, FBTYPE_GET_BPP(info)); if (err) Modified: stable/10/sys/dev/vt/hw/fb/vt_fb.h ============================================================================== --- stable/10/sys/dev/vt/hw/fb/vt_fb.h Thu Sep 4 18:34:22 2014 (r271116) +++ stable/10/sys/dev/vt/hw/fb/vt_fb.h Thu Sep 4 18:43:40 2014 (r271117) @@ -36,8 +36,6 @@ int vt_fb_attach(struct fb_info *info); void vt_fb_resume(void); void vt_fb_suspend(void); -int fb_probe(struct fb_info *info); - vd_init_t vt_fb_init; vd_blank_t vt_fb_blank; vd_bitbltchr_t vt_fb_bitbltchr; Modified: stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c ============================================================================== --- stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c Thu Sep 4 18:34:22 2014 (r271116) +++ stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c Thu Sep 4 18:43:40 2014 (r271117) @@ -399,7 +399,6 @@ ofwfb_init(struct vt_device *vd) sc->fb.fb_pbase = fb_phys; ofwfb_initialize(vd); - fb_probe(&sc->fb); vt_fb_init(vd); return (CN_INTERNAL); Modified: stable/10/sys/powerpc/ps3/ps3_syscons.c ============================================================================== --- stable/10/sys/powerpc/ps3/ps3_syscons.c Thu Sep 4 18:34:22 2014 (r271116) +++ stable/10/sys/powerpc/ps3/ps3_syscons.c Thu Sep 4 18:43:40 2014 (r271117) @@ -188,12 +188,8 @@ ps3fb_init(struct vt_device *vd) lv1_gpu_context_attribute(sc->sc_fbcontext, L1GPU_CONTEXT_ATTRIBUTE_DISPLAY_FLIP, 1, 0, 0, 0); - fb_probe(&sc->fb_info); - sc->fb_info.fb_flags &= ~FB_FLAG_NOMMAP; /* Set wrongly by fb_probe */ vt_fb_init(vd); - - /* Clear the screen. */ - vt_fb_blank(vd, TC_BLACK); + sc->fb_info.fb_flags &= ~FB_FLAG_NOMMAP; /* Set wrongly by vt_fb_init */ return (CN_INTERNAL); } Modified: stable/10/sys/sys/fbio.h ============================================================================== --- stable/10/sys/sys/fbio.h Thu Sep 4 18:34:22 2014 (r271116) +++ stable/10/sys/sys/fbio.h Thu Sep 4 18:43:40 2014 (r271117) @@ -115,19 +115,6 @@ struct fb_info; typedef int fb_enter_t(void *priv); typedef int fb_leave_t(void *priv); -typedef int fb_write_t(void *priv, int offset, void *data, int size); -typedef int fb_read_t(void *priv, int offset, void *data, int size); - -/* XXX: should use priv instead of fb_info too. */ -typedef void fb_copy_t(struct fb_info *sc, uint32_t offset_to, uint32_t offset_from, - uint32_t size); -typedef void fb_wr1_t(struct fb_info *sc, uint32_t offset, uint8_t value); -typedef void fb_wr2_t(struct fb_info *sc, uint32_t offset, uint16_t value); -typedef void fb_wr4_t(struct fb_info *sc, uint32_t offset, uint32_t value); - -typedef int fb_ioctl_t(struct cdev *, u_long, caddr_t, int, struct thread *); -typedef int fb_mmap_t(struct cdev *dev, vm_ooffset_t offset, vm_paddr_t *paddr, - int prot, vm_memattr_t *memattr); struct fb_info { /* Raw copy of fbtype. Do not change. */ @@ -138,16 +125,8 @@ struct fb_info { int fb_cmsize; /* size of color map (entries) */ int fb_size; /* total size in bytes */ - /* Methods. */ - fb_write_t *fb_write; /* if NULL, direct mem write. */ - fb_read_t *fb_read; /* if NULL, direct mem read. */ - struct cdev *fb_cdev; - fb_wr1_t *wr1; - fb_wr2_t *wr2; - fb_wr4_t *wr4; - fb_copy_t *copy; fb_enter_t *enter; fb_leave_t *leave; From owner-svn-src-stable-10@FreeBSD.ORG Thu Sep 4 18:54:02 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7122C1C3; Thu, 4 Sep 2014 18:54:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C31A15DA; Thu, 4 Sep 2014 18:54:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84Is14O087749; Thu, 4 Sep 2014 18:54:01 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84Is1KC087748; Thu, 4 Sep 2014 18:54:01 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409041854.s84Is1KC087748@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 4 Sep 2014 18:54:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271118 - stable/10/sys/dev/vt/hw/ofwfb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 18:54:02 -0000 Author: emaste Date: Thu Sep 4 18:54:01 2014 New Revision: 271118 URL: http://svnweb.freebsd.org/changeset/base/271118 Log: MFC r269636 by nwhitehorn: Set fb_pbase properly on PowerPC in the case where we have to guess at the right register bank for the framebuffer. Disable the assigned- addresses path on SPARC since it is just a hack for IBM PPC systems and was neither relevant for nor worked on SPARC anyway. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c ============================================================================== --- stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c Thu Sep 4 18:43:40 2014 (r271117) +++ stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c Thu Sep 4 18:54:01 2014 (r271118) @@ -337,6 +337,8 @@ ofwfb_init(struct vt_device *vd) #else #error Unsupported platform! #endif + + sc->fb.fb_pbase = fb_phys; } else { /* * Some IBM systems don't have an address property. Try to @@ -386,17 +388,13 @@ ofwfb_init(struct vt_device *vd) #if defined(__powerpc__) OF_decode_addr(node, fb_phys, &sc->sc_memt, &sc->fb.fb_vbase); - #elif defined(__sparc64__) - OF_decode_addr(node, fb_phys, &space, &phys); - sc->sc_memt = &ofwfb_memt[0]; - sc->fb.fb_vbase = sparc64_fake_bustag(space, phys, sc->sc_memt); + sc->fb.fb_pbase = sc->fb.fb_vbase; /* 1:1 mapped */ #else /* No ability to interpret assigned-addresses otherwise */ return (CN_DEAD); #endif } - sc->fb.fb_pbase = fb_phys; ofwfb_initialize(vd); vt_fb_init(vd); From owner-svn-src-stable-10@FreeBSD.ORG Thu Sep 4 18:57:24 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 42325579; Thu, 4 Sep 2014 18:57:24 +0000 (UTC) Received: from c.mail.sonic.net (c.mail.sonic.net [64.142.111.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 26E61174A; Thu, 4 Sep 2014 18:57:23 +0000 (UTC) Received: from zeppelin.tachypleus.net (airbears2-136-152-142-27.AirBears2.Berkeley.EDU [136.152.142.27]) (authenticated bits=0) by c.mail.sonic.net (8.14.9/8.14.9) with ESMTP id s84IksGp026155 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Thu, 4 Sep 2014 11:46:55 -0700 Message-ID: <5408B39E.7030003@freebsd.org> Date: Thu, 04 Sep 2014 11:46:54 -0700 From: Nathan Whitehorn User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: Ed Maste , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r271116 - stable/10/sys/dev/vt/hw/ofwfb References: <201409041834.s84IYM6F078129@svn.freebsd.org> In-Reply-To: <201409041834.s84IYM6F078129@svn.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Sonic-CAuth: UmFuZG9tSVaRrpOMcp5whByEjR5rwdOlOdIyk9ey2FQlYOGu7pdOfUNlZhzGmItRTDjaS00/mscmsooH8b9XQKSt5RtvNWQNAqWYrkTmIzU= X-Sonic-ID: C;/ptM12M05BGiu0pcoK8kYw== M;Vt3V12M05BGiu0pcoK8kYw== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 18:57:24 -0000 There's an UPDATING entry with this commit. Could you please MFC that too? Thanks for following all of this. -Nathan On 09/04/14 11:34, Ed Maste wrote: > Author: emaste > Date: Thu Sep 4 18:34:22 2014 > New Revision: 271116 > URL: http://svnweb.freebsd.org/changeset/base/271116 > > Log: > MFC r269278 (nwhitehorn): > > Make mmap() of the console device when using ofwfb work like other > supported framebuffer drivers. This lets ofwfb work with > xf86-video-scfb and makes the driver much more generic and less > PCI-centric. This changes some user-visible behavior and will require > updates to the xorg-server port on PowerPC when using ATI graphics > cards. > > Relnotes: Yes > Sponsored by: The FreeBSD Foundation > > Modified: > stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c > Directory Properties: > stable/10/ (props changed) > > Modified: stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c > ============================================================================== > --- stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c Thu Sep 4 18:30:33 2014 (r271115) > +++ stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c Thu Sep 4 18:34:22 2014 (r271116) > @@ -52,16 +52,13 @@ struct ofwfb_softc { > struct fb_info fb; > > phandle_t sc_node; > + ihandle_t sc_handle; > bus_space_tag_t sc_memt; > - > - struct ofw_pci_register sc_pciaddrs[8]; > - int sc_num_pciaddrs; > }; > > static vd_probe_t ofwfb_probe; > static vd_init_t ofwfb_init; > static vd_bitbltchr_t ofwfb_bitbltchr; > -static vd_fb_mmap_t ofwfb_mmap; > > static const struct vt_driver vt_ofwfb_driver = { > .vd_name = "ofwfb", > @@ -70,7 +67,8 @@ static const struct vt_driver vt_ofwfb_d > .vd_blank = vt_fb_blank, > .vd_bitbltchr = ofwfb_bitbltchr, > .vd_maskbitbltchr = ofwfb_bitbltchr, > - .vd_fb_mmap = ofwfb_mmap, > + .vd_fb_ioctl = vt_fb_ioctl, > + .vd_fb_mmap = vt_fb_mmap, > .vd_priority = VD_PRIORITY_GENERIC+1, > }; > > @@ -198,17 +196,10 @@ static void > ofwfb_initialize(struct vt_device *vd) > { > struct ofwfb_softc *sc = vd->vd_softc; > - char name[64]; > - ihandle_t ih; > int i; > cell_t retval; > uint32_t oldpix; > > - /* Open display device, thereby initializing it */ > - memset(name, 0, sizeof(name)); > - OF_package_to_path(sc->sc_node, name, sizeof(name)); > - ih = OF_open(name); > - > /* > * Set up the color map > */ > @@ -219,7 +210,7 @@ ofwfb_initialize(struct vt_device *vd) > 16, 255, 8, 255, 0); > > for (i = 0; i < 16; i++) { > - OF_call_method("color!", ih, 4, 1, > + OF_call_method("color!", sc->sc_handle, 4, 1, > (cell_t)((sc->fb.fb_cmap[i] >> 16) & 0xff), > (cell_t)((sc->fb.fb_cmap[i] >> 8) & 0xff), > (cell_t)((sc->fb.fb_cmap[i] >> 0) & 0xff), > @@ -260,7 +251,6 @@ ofwfb_init(struct vt_device *vd) > struct ofwfb_softc *sc; > char type[64]; > phandle_t chosen; > - ihandle_t stdout; > phandle_t node; > uint32_t depth, height, width, stride; > uint32_t fb_phys; > @@ -275,14 +265,15 @@ ofwfb_init(struct vt_device *vd) > vd->vd_softc = sc = &ofwfb_conssoftc; > > chosen = OF_finddevice("/chosen"); > - OF_getprop(chosen, "stdout", &stdout, sizeof(stdout)); > - node = OF_instance_to_package(stdout); > + OF_getprop(chosen, "stdout", &sc->sc_handle, sizeof(ihandle_t)); > + node = OF_instance_to_package(sc->sc_handle); > if (node == -1) { > /* > * The "/chosen/stdout" does not exist try > * using "screen" directly. > */ > node = OF_finddevice("screen"); > + sc->sc_handle = OF_open("screen"); > } > OF_getprop(node, "device_type", type, sizeof(type)); > if (strcmp(type, "display") != 0) > @@ -291,6 +282,13 @@ ofwfb_init(struct vt_device *vd) > /* Keep track of the OF node */ > sc->sc_node = node; > > + /* > + * Try to use a 32-bit framebuffer if possible. This may be > + * unimplemented and fail. That's fine -- it just means we are > + * stuck with the defaults. > + */ > + OF_call_method("set-depth", sc->sc_handle, 1, 1, (cell_t)32, &i); > + > /* Make sure we have needed properties */ > if (OF_getproplen(node, "height") != sizeof(height) || > OF_getproplen(node, "width") != sizeof(width) || > @@ -302,7 +300,7 @@ ofwfb_init(struct vt_device *vd) > OF_getprop(node, "depth", &depth, sizeof(depth)); > if (depth != 8 && depth != 32) > return (CN_DEAD); > - sc->fb.fb_bpp = depth; > + sc->fb.fb_bpp = sc->fb.fb_depth = depth; > > OF_getprop(node, "height", &height, sizeof(height)); > OF_getprop(node, "width", &width, sizeof(width)); > @@ -314,21 +312,6 @@ ofwfb_init(struct vt_device *vd) > sc->fb.fb_size = sc->fb.fb_height * sc->fb.fb_stride; > > /* > - * Get the PCI addresses of the adapter, if present. The node may be the > - * child of the PCI device: in that case, try the parent for > - * the assigned-addresses property. > - */ > - len = OF_getprop(node, "assigned-addresses", sc->sc_pciaddrs, > - sizeof(sc->sc_pciaddrs)); > - if (len == -1) { > - len = OF_getprop(OF_parent(node), "assigned-addresses", > - sc->sc_pciaddrs, sizeof(sc->sc_pciaddrs)); > - } > - if (len == -1) > - len = 0; > - sc->sc_num_pciaddrs = len / sizeof(struct ofw_pci_register); > - > - /* > * Grab the physical address of the framebuffer, and then map it > * into our memory space. If the MMU is not yet up, it will be > * remapped for us when relocation turns on. > @@ -339,13 +322,18 @@ ofwfb_init(struct vt_device *vd) > > #if defined(__powerpc__) > sc->sc_memt = &bs_be_tag; > - bus_space_map(sc->sc_memt, fb_phys, height * sc->fb.fb_stride, > + bus_space_map(sc->sc_memt, fb_phys, sc->fb.fb_size, > BUS_SPACE_MAP_PREFETCHABLE, &sc->fb.fb_vbase); > #elif defined(__sparc64__) > OF_decode_addr(node, 0, &space, &phys); > sc->sc_memt = &ofwfb_memt[0]; > sc->fb.fb_vbase = > sparc64_fake_bustag(space, fb_phys, sc->sc_memt); > + #elif defined(__arm__) > + sc->sc_memt = fdtbus_bs_tag; > + bus_space_map(sc->sc_memt, sc->fb.fb_pbase, sc->fb.fb_size, > + BUS_SPACE_MAP_PREFETCHABLE, > + (bus_space_handle_t *)&sc->fb.fb_vbase); > #else > #error Unsupported platform! > #endif > @@ -357,14 +345,31 @@ ofwfb_init(struct vt_device *vd) > * Linux does the same thing. > */ > > - fb_phys = sc->sc_num_pciaddrs; > - for (i = 0; i < sc->sc_num_pciaddrs; i++) { > + struct ofw_pci_register pciaddrs[8]; > + int num_pciaddrs = 0; > + > + /* > + * Get the PCI addresses of the adapter, if present. The node > + * may be the child of the PCI device: in that case, try the > + * parent for the assigned-addresses property. > + */ > + len = OF_getprop(node, "assigned-addresses", pciaddrs, > + sizeof(pciaddrs)); > + if (len == -1) { > + len = OF_getprop(OF_parent(node), "assigned-addresses", > + pciaddrs, sizeof(pciaddrs)); > + } > + if (len == -1) > + len = 0; > + num_pciaddrs = len / sizeof(struct ofw_pci_register); > + > + fb_phys = num_pciaddrs; > + for (i = 0; i < num_pciaddrs; i++) { > /* If it is too small, not the framebuffer */ > - if (sc->sc_pciaddrs[i].size_lo < > - sc->fb.fb_stride * height) > + if (pciaddrs[i].size_lo < sc->fb.fb_stride * height) > continue; > /* If it is not memory, it isn't either */ > - if (!(sc->sc_pciaddrs[i].phys_hi & > + if (!(pciaddrs[i].phys_hi & > OFW_PCI_PHYS_HI_SPACE_MEM32)) > continue; > > @@ -372,12 +377,11 @@ ofwfb_init(struct vt_device *vd) > fb_phys = i; > > /* If it is prefetchable, it certainly is */ > - if (sc->sc_pciaddrs[i].phys_hi & > - OFW_PCI_PHYS_HI_PREFETCHABLE) > + if (pciaddrs[i].phys_hi & OFW_PCI_PHYS_HI_PREFETCHABLE) > break; > } > > - if (fb_phys == sc->sc_num_pciaddrs) /* No candidates found */ > + if (fb_phys == num_pciaddrs) /* No candidates found */ > return (CN_DEAD); > > #if defined(__powerpc__) > @@ -385,7 +389,10 @@ ofwfb_init(struct vt_device *vd) > #elif defined(__sparc64__) > OF_decode_addr(node, fb_phys, &space, &phys); > sc->sc_memt = &ofwfb_memt[0]; > - sc->sc_addr = sparc64_fake_bustag(space, phys, sc->sc_memt); > + sc->fb.fb_vbase = sparc64_fake_bustag(space, phys, sc->sc_memt); > + #else > + /* No ability to interpret assigned-addresses otherwise */ > + return (CN_DEAD); > #endif > } > > @@ -398,39 +405,3 @@ ofwfb_init(struct vt_device *vd) > return (CN_INTERNAL); > } > > -static int > -ofwfb_mmap(struct vt_device *vd, vm_ooffset_t offset, vm_paddr_t *paddr, > - int prot, vm_memattr_t *memattr) > -{ > - struct ofwfb_softc *sc = vd->vd_softc; > - int i; > - > - /* > - * Make sure the requested address lies within the PCI device's > - * assigned addrs > - */ > - for (i = 0; i < sc->sc_num_pciaddrs; i++) > - if (offset >= sc->sc_pciaddrs[i].phys_lo && > - offset < (sc->sc_pciaddrs[i].phys_lo + sc->sc_pciaddrs[i].size_lo)) > - { > -#ifdef VM_MEMATTR_WRITE_COMBINING > - /* > - * If this is a prefetchable BAR, we can (and should) > - * enable write-combining. > - */ > - if (sc->sc_pciaddrs[i].phys_hi & > - OFW_PCI_PHYS_HI_PREFETCHABLE) > - *memattr = VM_MEMATTR_WRITE_COMBINING; > -#endif > - > - *paddr = offset; > - return (0); > - } > - > - /* > - * Hack for Radeon... > - */ > - *paddr = offset; > - return (0); > -} > - > From owner-svn-src-stable-10@FreeBSD.ORG Thu Sep 4 19:13:10 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 47CF5E23; Thu, 4 Sep 2014 19:13:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2CF38195D; Thu, 4 Sep 2014 19:13:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84JDAUq097268; Thu, 4 Sep 2014 19:13:10 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84JD8YR097259; Thu, 4 Sep 2014 19:13:08 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409041913.s84JD8YR097259@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 4 Sep 2014 19:13:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271120 - in stable/10/sys: dev/fb dev/vt dev/vt/hw/efifb dev/vt/hw/fb dev/vt/hw/ofwfb dev/vt/hw/vga powerpc/ps3 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 19:13:10 -0000 Author: emaste Date: Thu Sep 4 19:13:07 2014 New Revision: 271120 URL: http://svnweb.freebsd.org/changeset/base/271120 Log: MFC r269685 (nwhitehorn): Retire vd_maskbitbltchr. The same functionality can be obtained by testing for mask != NULL in vd_bitbltchr, which all implementations of vd_bitbltchr() were doing anyway. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/fb/creator_vt.c stable/10/sys/dev/vt/hw/efifb/efifb.c stable/10/sys/dev/vt/hw/fb/vt_fb.c stable/10/sys/dev/vt/hw/fb/vt_fb.h stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c stable/10/sys/dev/vt/hw/vga/vt_vga.c stable/10/sys/dev/vt/vt.h stable/10/sys/dev/vt/vt_core.c stable/10/sys/powerpc/ps3/ps3_syscons.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/fb/creator_vt.c ============================================================================== --- stable/10/sys/dev/fb/creator_vt.c Thu Sep 4 19:09:08 2014 (r271119) +++ stable/10/sys/dev/fb/creator_vt.c Thu Sep 4 19:13:07 2014 (r271120) @@ -53,7 +53,6 @@ static const struct vt_driver vt_creator .vd_init = creatorfb_init, .vd_blank = creatorfb_blank, .vd_bitbltchr = creatorfb_bitbltchr, - .vd_maskbitbltchr = creatorfb_bitbltchr, .vd_fb_ioctl = vt_fb_ioctl, .vd_fb_mmap = vt_fb_mmap, .vd_priority = VD_PRIORITY_SPECIFIC Modified: stable/10/sys/dev/vt/hw/efifb/efifb.c ============================================================================== --- stable/10/sys/dev/vt/hw/efifb/efifb.c Thu Sep 4 19:09:08 2014 (r271119) +++ stable/10/sys/dev/vt/hw/efifb/efifb.c Thu Sep 4 19:13:07 2014 (r271120) @@ -61,7 +61,6 @@ static struct vt_driver vt_efifb_driver .vd_init = vt_efifb_init, .vd_blank = vt_fb_blank, .vd_bitbltchr = vt_fb_bitbltchr, - .vd_maskbitbltchr = vt_fb_maskbitbltchr, .vd_fb_ioctl = vt_fb_ioctl, .vd_fb_mmap = vt_fb_mmap, /* Better than VGA, but still generic driver. */ Modified: stable/10/sys/dev/vt/hw/fb/vt_fb.c ============================================================================== --- stable/10/sys/dev/vt/hw/fb/vt_fb.c Thu Sep 4 19:09:08 2014 (r271119) +++ stable/10/sys/dev/vt/hw/fb/vt_fb.c Thu Sep 4 19:13:07 2014 (r271120) @@ -50,7 +50,6 @@ static struct vt_driver vt_fb_driver = { .vd_init = vt_fb_init, .vd_blank = vt_fb_blank, .vd_bitbltchr = vt_fb_bitbltchr, - .vd_maskbitbltchr = vt_fb_maskbitbltchr, .vd_drawrect = vt_fb_drawrect, .vd_setpixel = vt_fb_setpixel, .vd_postswitch = vt_fb_postswitch, @@ -253,70 +252,6 @@ vt_fb_bitbltchr(struct vt_device *vd, co uint32_t fgc, bgc, cc, o; int c, l, bpp; u_long line; - uint8_t b; - const uint8_t *ch; - - info = vd->vd_softc; - bpp = FBTYPE_GET_BYTESPP(info); - fgc = info->fb_cmap[fg]; - bgc = info->fb_cmap[bg]; - b = 0; - if (bpl == 0) - bpl = (width + 7) >> 3; /* Bytes per sorce line. */ - - /* Don't try to put off screen pixels */ - if (((left + width) > info->fb_width) || ((top + height) > - info->fb_height)) - return; - - KASSERT((info->fb_vbase != 0), ("Unmapped framebuffer")); - - line = (info->fb_stride * top) + (left * bpp); - for (l = 0; l < height; l++) { - ch = src; - for (c = 0; c < width; c++) { - if (c % 8 == 0) - b = *ch++; - else - b <<= 1; - o = line + (c * bpp); - cc = b & 0x80 ? fgc : bgc; - - switch(bpp) { - case 1: - vt_fb_mem_wr1(info, o, cc); - break; - case 2: - vt_fb_mem_wr2(info, o, cc); - break; - case 3: - /* Packed mode, so unaligned. Byte access. */ - vt_fb_mem_wr1(info, o, (cc >> 16) & 0xff); - vt_fb_mem_wr1(info, o + 1, (cc >> 8) & 0xff); - vt_fb_mem_wr1(info, o + 2, cc & 0xff); - break; - case 4: - vt_fb_mem_wr4(info, o, cc); - break; - default: - /* panic? */ - break; - } - } - line += info->fb_stride; - src += bpl; - } -} - -void -vt_fb_maskbitbltchr(struct vt_device *vd, const uint8_t *src, const uint8_t *mask, - int bpl, vt_axis_t top, vt_axis_t left, unsigned int width, - unsigned int height, term_color_t fg, term_color_t bg) -{ - struct fb_info *info; - uint32_t fgc, bgc, cc, o; - int c, l, bpp; - u_long line; uint8_t b, m; const uint8_t *ch; Modified: stable/10/sys/dev/vt/hw/fb/vt_fb.h ============================================================================== --- stable/10/sys/dev/vt/hw/fb/vt_fb.h Thu Sep 4 19:09:08 2014 (r271119) +++ stable/10/sys/dev/vt/hw/fb/vt_fb.h Thu Sep 4 19:13:07 2014 (r271120) @@ -39,7 +39,6 @@ void vt_fb_suspend(void); vd_init_t vt_fb_init; vd_blank_t vt_fb_blank; vd_bitbltchr_t vt_fb_bitbltchr; -vd_maskbitbltchr_t vt_fb_maskbitbltchr; vd_postswitch_t vt_fb_postswitch; vd_fb_ioctl_t vt_fb_ioctl; vd_fb_mmap_t vt_fb_mmap; Modified: stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c ============================================================================== --- stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c Thu Sep 4 19:09:08 2014 (r271119) +++ stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c Thu Sep 4 19:13:07 2014 (r271120) @@ -66,7 +66,6 @@ static const struct vt_driver vt_ofwfb_d .vd_init = ofwfb_init, .vd_blank = vt_fb_blank, .vd_bitbltchr = ofwfb_bitbltchr, - .vd_maskbitbltchr = ofwfb_bitbltchr, .vd_fb_ioctl = vt_fb_ioctl, .vd_fb_mmap = vt_fb_mmap, .vd_priority = VD_PRIORITY_GENERIC+1, Modified: stable/10/sys/dev/vt/hw/vga/vt_vga.c ============================================================================== --- stable/10/sys/dev/vt/hw/vga/vt_vga.c Thu Sep 4 19:09:08 2014 (r271119) +++ stable/10/sys/dev/vt/hw/vga/vt_vga.c Thu Sep 4 19:13:07 2014 (r271120) @@ -75,7 +75,6 @@ static vd_probe_t vga_probe; static vd_init_t vga_init; static vd_blank_t vga_blank; static vd_bitbltchr_t vga_bitbltchr; -static vd_maskbitbltchr_t vga_maskbitbltchr; static vd_drawrect_t vga_drawrect; static vd_setpixel_t vga_setpixel; static vd_putchar_t vga_putchar; @@ -87,7 +86,6 @@ static const struct vt_driver vt_vga_dri .vd_init = vga_init, .vd_blank = vga_blank, .vd_bitbltchr = vga_bitbltchr, - .vd_maskbitbltchr = vga_maskbitbltchr, .vd_drawrect = vga_drawrect, .vd_setpixel = vga_setpixel, .vd_putchar = vga_putchar, Modified: stable/10/sys/dev/vt/vt.h ============================================================================== --- stable/10/sys/dev/vt/vt.h Thu Sep 4 19:09:08 2014 (r271119) +++ stable/10/sys/dev/vt/vt.h Thu Sep 4 19:13:07 2014 (r271120) @@ -286,9 +286,6 @@ typedef void vd_blank_t(struct vt_device typedef void vd_bitbltchr_t(struct vt_device *vd, const uint8_t *src, const uint8_t *mask, int bpl, vt_axis_t top, vt_axis_t left, unsigned int width, unsigned int height, term_color_t fg, term_color_t bg); -typedef void vd_maskbitbltchr_t(struct vt_device *vd, const uint8_t *src, - const uint8_t *mask, int bpl, vt_axis_t top, vt_axis_t left, - unsigned int width, unsigned int height, term_color_t fg, term_color_t bg); typedef void vd_putchar_t(struct vt_device *vd, term_char_t, vt_axis_t top, vt_axis_t left, term_color_t fg, term_color_t bg); typedef int vd_fb_ioctl_t(struct vt_device *, u_long, caddr_t, struct thread *); @@ -307,7 +304,6 @@ struct vt_driver { /* Drawing. */ vd_blank_t *vd_blank; vd_bitbltchr_t *vd_bitbltchr; - vd_maskbitbltchr_t *vd_maskbitbltchr; vd_drawrect_t *vd_drawrect; vd_setpixel_t *vd_setpixel; Modified: stable/10/sys/dev/vt/vt_core.c ============================================================================== --- stable/10/sys/dev/vt/vt_core.c Thu Sep 4 19:09:08 2014 (r271119) +++ stable/10/sys/dev/vt/vt_core.c Thu Sep 4 19:13:07 2014 (r271120) @@ -946,7 +946,7 @@ vt_flush(struct vt_device *vd) if ((vd->vd_my + m->h) > (size.tp_row * vf->vf_height)) h = (size.tp_row * vf->vf_height) - vd->vd_my - 1; - vd->vd_driver->vd_maskbitbltchr(vd, m->map, m->mask, bpl, + vd->vd_driver->vd_bitbltchr(vd, m->map, m->mask, bpl, vd->vd_offset.tp_row + vd->vd_my, vd->vd_offset.tp_col + vd->vd_mx, w, h, TC_WHITE, TC_BLACK); @@ -2176,8 +2176,6 @@ vt_allocate(struct vt_driver *drv, void } vd = main_vd; VT_LOCK(vd); - if (drv->vd_maskbitbltchr == NULL) - drv->vd_maskbitbltchr = drv->vd_bitbltchr; if (vd->vd_flags & VDF_ASYNC) { /* Stop vt_flush periodic task. */ Modified: stable/10/sys/powerpc/ps3/ps3_syscons.c ============================================================================== --- stable/10/sys/powerpc/ps3/ps3_syscons.c Thu Sep 4 19:09:08 2014 (r271119) +++ stable/10/sys/powerpc/ps3/ps3_syscons.c Thu Sep 4 19:13:07 2014 (r271120) @@ -77,7 +77,6 @@ static struct vt_driver vt_ps3fb_driver .vd_init = ps3fb_init, .vd_blank = vt_fb_blank, .vd_bitbltchr = vt_fb_bitbltchr, - .vd_maskbitbltchr = vt_fb_maskbitbltchr, .vd_fb_ioctl = vt_fb_ioctl, .vd_fb_mmap = vt_fb_mmap, /* Better than VGA, but still generic driver. */ From owner-svn-src-stable-10@FreeBSD.ORG Thu Sep 4 19:22:01 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 99FADF8; Thu, 4 Sep 2014 19:22:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 84F661A5D; Thu, 4 Sep 2014 19:22:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84JM1C5001951; Thu, 4 Sep 2014 19:22:01 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84JM1kX001950; Thu, 4 Sep 2014 19:22:01 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409041922.s84JM1kX001950@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 4 Sep 2014 19:22:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271121 - stable/10/sys/dev/vt/hw/vga X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 19:22:01 -0000 Author: emaste Date: Thu Sep 4 19:22:01 2014 New Revision: 271121 URL: http://svnweb.freebsd.org/changeset/base/271121 Log: MFC r270299 (dumbbell): vt_vga: When clearing video memory, don't read from it The goal is to clear the video memory, in case an application drew to it. So the content shouldn't be loaded in the latches, it can't be trusted anyway. This improves a bit the window switch speed. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/vt/hw/vga/vt_vga.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/vt/hw/vga/vt_vga.c ============================================================================== --- stable/10/sys/dev/vt/hw/vga/vt_vga.c Thu Sep 4 19:13:07 2014 (r271120) +++ stable/10/sys/dev/vt/hw/vga/vt_vga.c Thu Sep 4 19:22:01 2014 (r271121) @@ -609,7 +609,6 @@ vga_initialize(struct vt_device *vd, int * planes. */ for (ofs = 0; ofs < VT_VGA_MEMSIZE; ofs++) { - MEM_READ1(sc, ofs); MEM_WRITE1(sc, ofs, 0); } } From owner-svn-src-stable-10@FreeBSD.ORG Thu Sep 4 20:02:29 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 22A2C1A3; Thu, 4 Sep 2014 20:02:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0DD821E63; Thu, 4 Sep 2014 20:02:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84K2Skd022405; Thu, 4 Sep 2014 20:02:28 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84K2SKQ022404; Thu, 4 Sep 2014 20:02:28 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201409042002.s84K2SKQ022404@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Thu, 4 Sep 2014 20:02:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271125 - stable/10/gnu/lib/libgcc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 20:02:29 -0000 Author: ngie Date: Thu Sep 4 20:02:28 2014 New Revision: 271125 URL: http://svnweb.freebsd.org/changeset/base/271125 Log: MFC r270216: Add ${LIBC} to DPADD to fix "make checkdpadd" Phabric: D632 Approved by: jmmv (mentor) Modified: stable/10/gnu/lib/libgcc/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/gnu/lib/libgcc/Makefile ============================================================================== --- stable/10/gnu/lib/libgcc/Makefile Thu Sep 4 19:52:17 2014 (r271124) +++ stable/10/gnu/lib/libgcc/Makefile Thu Sep 4 20:02:28 2014 (r271125) @@ -28,6 +28,7 @@ CFLAGS+= -DIN_GCC -DIN_LIBGCC2 -D__GCC_F -I${.CURDIR}/../../usr.bin/cc/cc_tools LDFLAGS+= -nodefaultlibs +DPADD+= ${LIBC} LDADD+= -lc OBJS= # added to below in various ways depending on TARGET_CPUARCH From owner-svn-src-stable-10@FreeBSD.ORG Thu Sep 4 20:12:49 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7C56650B; Thu, 4 Sep 2014 20:12:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 62F291F5C; Thu, 4 Sep 2014 20:12:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84KCn3q027572; Thu, 4 Sep 2014 20:12:49 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84KCacX027491; Thu, 4 Sep 2014 20:12:36 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201409042012.s84KCacX027491@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 4 Sep 2014 20:12:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271127 - in stable/10/sys: contrib/rdma/krping dev/cxgb dev/cxgbe/iw_cxgbe modules/mlx4 modules/mlx4ib modules/mlxen ofed/drivers/infiniband/core ofed/drivers/infiniband/hw/mlx4 ofed/d... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 20:12:49 -0000 Author: hselasky Date: Thu Sep 4 20:12:36 2014 New Revision: 271127 URL: http://svnweb.freebsd.org/changeset/base/271127 Log: MFC r270710 and r270821: - Update the OFED Linux Emulation layer as a preparation for a hardware driver update from Mellanox Technologies. - Remove empty files from the OFED Linux Emulation layer. - Fix compile warnings related to printf() and the "%lld" and "%llx" format specifiers. - Add some missing 2-clause BSD copyrights. - Add "Mellanox Technologies, Ltd." to list of copyright holders. - Add some new compatibility files. - Fix order of uninit in the mlx4ib module to avoid crash at unload using the new module_exit_order() function. Sponsored by: Mellanox Technologies Added: stable/10/sys/ofed/include/linux/cache.h - copied unchanged from r270710, head/sys/ofed/include/linux/cache.h stable/10/sys/ofed/include/linux/etherdevice.h - copied unchanged from r270710, head/sys/ofed/include/linux/etherdevice.h stable/10/sys/ofed/include/linux/kmod.h - copied unchanged from r270710, head/sys/ofed/include/linux/kmod.h stable/10/sys/ofed/include/linux/ktime.h - copied unchanged from r270710, head/sys/ofed/include/linux/ktime.h stable/10/sys/ofed/include/linux/math64.h - copied unchanged from r270710, head/sys/ofed/include/linux/math64.h stable/10/sys/ofed/include/net/if_inet6.h - copied unchanged from r270710, head/sys/ofed/include/net/if_inet6.h Deleted: stable/10/sys/ofed/include/asm/current.h stable/10/sys/ofed/include/asm/semaphore.h stable/10/sys/ofed/include/asm/system.h stable/10/sys/ofed/include/linux/atomic.h stable/10/sys/ofed/include/linux/bitmap.h stable/10/sys/ofed/include/linux/ctype.h stable/10/sys/ofed/include/linux/init.h stable/10/sys/ofed/include/linux/rtnetlink.h stable/10/sys/ofed/include/linux/stddef.h stable/10/sys/ofed/include/net/addrconf.h stable/10/sys/ofed/include/net/arp.h stable/10/sys/ofed/include/net/ip6_route.h stable/10/sys/ofed/include/net/neighbour.h Modified: stable/10/sys/contrib/rdma/krping/krping.c stable/10/sys/dev/cxgb/cxgb_osdep.h stable/10/sys/dev/cxgbe/iw_cxgbe/cm.c stable/10/sys/dev/cxgbe/iw_cxgbe/qp.c stable/10/sys/modules/mlx4/Makefile stable/10/sys/modules/mlx4ib/Makefile stable/10/sys/modules/mlxen/Makefile stable/10/sys/ofed/drivers/infiniband/core/addr.c stable/10/sys/ofed/drivers/infiniband/core/cm.c stable/10/sys/ofed/drivers/infiniband/core/device.c stable/10/sys/ofed/drivers/infiniband/core/iwcm.c stable/10/sys/ofed/drivers/infiniband/core/sa_query.c stable/10/sys/ofed/drivers/infiniband/core/sysfs.c stable/10/sys/ofed/drivers/infiniband/core/ucm.c stable/10/sys/ofed/drivers/infiniband/core/user_mad.c stable/10/sys/ofed/drivers/infiniband/core/uverbs_cmd.c stable/10/sys/ofed/drivers/infiniband/core/uverbs_main.c stable/10/sys/ofed/drivers/infiniband/hw/mlx4/alias_GUID.c stable/10/sys/ofed/drivers/infiniband/hw/mlx4/cm.c stable/10/sys/ofed/drivers/infiniband/hw/mlx4/mad.c stable/10/sys/ofed/drivers/infiniband/hw/mlx4/main.c stable/10/sys/ofed/drivers/infiniband/hw/mlx4/mlx4_ib.h stable/10/sys/ofed/drivers/infiniband/hw/mlx4/mr.c stable/10/sys/ofed/drivers/infiniband/hw/mlx4/qp.c stable/10/sys/ofed/drivers/infiniband/hw/mlx4/sysfs.c stable/10/sys/ofed/drivers/infiniband/hw/mthca/mthca_allocator.c stable/10/sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c stable/10/sys/ofed/drivers/infiniband/hw/mthca/mthca_provider.c stable/10/sys/ofed/drivers/infiniband/hw/mthca/mthca_reset.c stable/10/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c stable/10/sys/ofed/drivers/infiniband/ulp/sdp/sdp.h stable/10/sys/ofed/drivers/net/mlx4/alloc.c stable/10/sys/ofed/drivers/net/mlx4/cmd.c stable/10/sys/ofed/drivers/net/mlx4/cq.c stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c stable/10/sys/ofed/drivers/net/mlx4/en_rx.c stable/10/sys/ofed/drivers/net/mlx4/eq.c stable/10/sys/ofed/drivers/net/mlx4/fw.c stable/10/sys/ofed/drivers/net/mlx4/main.c stable/10/sys/ofed/drivers/net/mlx4/mcg.c stable/10/sys/ofed/drivers/net/mlx4/mr.c stable/10/sys/ofed/drivers/net/mlx4/pd.c stable/10/sys/ofed/drivers/net/mlx4/qp.c stable/10/sys/ofed/drivers/net/mlx4/reset.c stable/10/sys/ofed/drivers/net/mlx4/resource_tracker.c stable/10/sys/ofed/drivers/net/mlx4/sense.c stable/10/sys/ofed/drivers/net/mlx4/srq.c stable/10/sys/ofed/drivers/net/mlx4/xrcd.c stable/10/sys/ofed/include/asm/atomic-long.h stable/10/sys/ofed/include/asm/atomic.h stable/10/sys/ofed/include/asm/byteorder.h stable/10/sys/ofed/include/asm/fcntl.h stable/10/sys/ofed/include/asm/io.h stable/10/sys/ofed/include/asm/page.h stable/10/sys/ofed/include/asm/pgtable.h stable/10/sys/ofed/include/asm/types.h stable/10/sys/ofed/include/asm/uaccess.h stable/10/sys/ofed/include/linux/bitops.h stable/10/sys/ofed/include/linux/cdev.h stable/10/sys/ofed/include/linux/clocksource.h stable/10/sys/ofed/include/linux/compat.h stable/10/sys/ofed/include/linux/compiler.h stable/10/sys/ofed/include/linux/completion.h stable/10/sys/ofed/include/linux/delay.h stable/10/sys/ofed/include/linux/device.h stable/10/sys/ofed/include/linux/dma-attrs.h stable/10/sys/ofed/include/linux/dma-mapping.h stable/10/sys/ofed/include/linux/dmapool.h stable/10/sys/ofed/include/linux/err.h stable/10/sys/ofed/include/linux/errno.h stable/10/sys/ofed/include/linux/ethtool.h stable/10/sys/ofed/include/linux/file.h stable/10/sys/ofed/include/linux/fs.h stable/10/sys/ofed/include/linux/gfp.h stable/10/sys/ofed/include/linux/hardirq.h stable/10/sys/ofed/include/linux/idr.h stable/10/sys/ofed/include/linux/if_arp.h stable/10/sys/ofed/include/linux/if_ether.h stable/10/sys/ofed/include/linux/if_vlan.h stable/10/sys/ofed/include/linux/in.h stable/10/sys/ofed/include/linux/in6.h stable/10/sys/ofed/include/linux/inet.h stable/10/sys/ofed/include/linux/inetdevice.h stable/10/sys/ofed/include/linux/interrupt.h stable/10/sys/ofed/include/linux/io-mapping.h stable/10/sys/ofed/include/linux/io.h stable/10/sys/ofed/include/linux/ioctl.h stable/10/sys/ofed/include/linux/jiffies.h stable/10/sys/ofed/include/linux/kdev_t.h stable/10/sys/ofed/include/linux/kernel.h stable/10/sys/ofed/include/linux/kobject.h stable/10/sys/ofed/include/linux/kref.h stable/10/sys/ofed/include/linux/kthread.h stable/10/sys/ofed/include/linux/linux_compat.c stable/10/sys/ofed/include/linux/linux_idr.c stable/10/sys/ofed/include/linux/linux_radix.c stable/10/sys/ofed/include/linux/list.h stable/10/sys/ofed/include/linux/lockdep.h stable/10/sys/ofed/include/linux/log2.h stable/10/sys/ofed/include/linux/miscdevice.h stable/10/sys/ofed/include/linux/mm.h stable/10/sys/ofed/include/linux/module.h stable/10/sys/ofed/include/linux/moduleparam.h stable/10/sys/ofed/include/linux/mount.h stable/10/sys/ofed/include/linux/mutex.h stable/10/sys/ofed/include/linux/net.h stable/10/sys/ofed/include/linux/netdevice.h stable/10/sys/ofed/include/linux/notifier.h stable/10/sys/ofed/include/linux/page.h stable/10/sys/ofed/include/linux/pci.h stable/10/sys/ofed/include/linux/poll.h stable/10/sys/ofed/include/linux/radix-tree.h stable/10/sys/ofed/include/linux/random.h stable/10/sys/ofed/include/linux/rbtree.h stable/10/sys/ofed/include/linux/rwlock.h stable/10/sys/ofed/include/linux/rwsem.h stable/10/sys/ofed/include/linux/scatterlist.h stable/10/sys/ofed/include/linux/sched.h stable/10/sys/ofed/include/linux/semaphore.h stable/10/sys/ofed/include/linux/slab.h stable/10/sys/ofed/include/linux/socket.h stable/10/sys/ofed/include/linux/spinlock.h stable/10/sys/ofed/include/linux/string.h stable/10/sys/ofed/include/linux/sysfs.h stable/10/sys/ofed/include/linux/timer.h stable/10/sys/ofed/include/linux/types.h stable/10/sys/ofed/include/linux/uaccess.h stable/10/sys/ofed/include/linux/vmalloc.h stable/10/sys/ofed/include/linux/wait.h stable/10/sys/ofed/include/linux/workqueue.h stable/10/sys/ofed/include/net/ip.h stable/10/sys/ofed/include/net/ipv6.h stable/10/sys/ofed/include/net/netevent.h stable/10/sys/ofed/include/net/tcp.h stable/10/sys/ofed/include/rdma/ib_umem.h stable/10/sys/ofed/include/rdma/ib_verbs.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/contrib/rdma/krping/krping.c ============================================================================== --- stable/10/sys/contrib/rdma/krping/krping.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/contrib/rdma/krping/krping.c Thu Sep 4 20:12:36 2014 (r271127) @@ -36,7 +36,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include @@ -46,7 +45,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include Modified: stable/10/sys/dev/cxgb/cxgb_osdep.h ============================================================================== --- stable/10/sys/dev/cxgb/cxgb_osdep.h Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/dev/cxgb/cxgb_osdep.h Thu Sep 4 20:12:36 2014 (r271127) @@ -91,8 +91,6 @@ struct t3_mbuf_hdr { #endif #endif -#define __read_mostly __attribute__((__section__(".data.read_mostly"))) - /* * Workaround for weird Chelsio issue */ Modified: stable/10/sys/dev/cxgbe/iw_cxgbe/cm.c ============================================================================== --- stable/10/sys/dev/cxgbe/iw_cxgbe/cm.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/dev/cxgbe/iw_cxgbe/cm.c Thu Sep 4 20:12:36 2014 (r271127) @@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include Modified: stable/10/sys/dev/cxgbe/iw_cxgbe/qp.c ============================================================================== --- stable/10/sys/dev/cxgbe/iw_cxgbe/qp.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/dev/cxgbe/iw_cxgbe/qp.c Thu Sep 4 20:12:36 2014 (r271127) @@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include Modified: stable/10/sys/modules/mlx4/Makefile ============================================================================== --- stable/10/sys/modules/mlx4/Makefile Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/modules/mlx4/Makefile Thu Sep 4 20:12:36 2014 (r271127) @@ -27,6 +27,7 @@ opt_inet6.h: .include CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS} +CFLAGS+= -fms-extensions CWARNFLAGS.mcg.c= -Wno-unused CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}} Modified: stable/10/sys/modules/mlx4ib/Makefile ============================================================================== --- stable/10/sys/modules/mlx4ib/Makefile Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/modules/mlx4ib/Makefile Thu Sep 4 20:12:36 2014 (r271127) @@ -16,6 +16,7 @@ CFLAGS+= -I${.CURDIR}/../../ofed/drivers CFLAGS+= -I${.CURDIR}/../../ofed/include/ CFLAGS+= -DCONFIG_INFINIBAND_USER_MEM CFLAGS+= -DINET6 -DINET -DOFED +CFLAGS+= -fms-extensions .if !defined(KERNBUILDDIR) .if ${MK_INET_SUPPORT} != "no" Modified: stable/10/sys/modules/mlxen/Makefile ============================================================================== --- stable/10/sys/modules/mlxen/Makefile Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/modules/mlxen/Makefile Thu Sep 4 20:12:36 2014 (r271127) @@ -10,6 +10,7 @@ SRCS += en_rx.c en_tx.c SRCS += opt_inet.h opt_inet6.h CFLAGS+= -I${.CURDIR}/../../ofed/drivers/net/mlx4 CFLAGS+= -I${.CURDIR}/../../ofed/include/ +CFLAGS+= -fms-extensions .if !defined(KERNBUILDDIR) .if ${MK_INET_SUPPORT} != "no" Modified: stable/10/sys/ofed/drivers/infiniband/core/addr.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/core/addr.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/infiniband/core/addr.c Thu Sep 4 20:12:36 2014 (r271127) @@ -36,12 +36,8 @@ #include #include #include -#include -#include #include #include -#include -#include #include MODULE_AUTHOR("Sean Hefty"); Modified: stable/10/sys/ofed/drivers/infiniband/core/cm.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/core/cm.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/infiniband/core/cm.c Thu Sep 4 20:12:36 2014 (r271127) @@ -45,6 +45,9 @@ #include #include #include +#include + +#include #include #include @@ -3890,5 +3893,5 @@ static void __exit ib_cm_cleanup(void) } module_init_order(ib_cm_init, SI_ORDER_SECOND); -module_exit(ib_cm_cleanup); +module_exit_order(ib_cm_cleanup, SI_ORDER_FIRST); Modified: stable/10/sys/ofed/drivers/infiniband/core/device.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/core/device.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/infiniband/core/device.c Thu Sep 4 20:12:36 2014 (r271127) @@ -36,7 +36,6 @@ #include #include #include -#include #include #include Modified: stable/10/sys/ofed/drivers/infiniband/core/iwcm.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/core/iwcm.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/infiniband/core/iwcm.c Thu Sep 4 20:12:36 2014 (r271127) @@ -43,6 +43,7 @@ #include #include #include +#include #include #include Modified: stable/10/sys/ofed/drivers/infiniband/core/sa_query.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/core/sa_query.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/infiniband/core/sa_query.c Thu Sep 4 20:12:36 2014 (r271127) @@ -33,7 +33,6 @@ */ #include -#include #include #include #include Modified: stable/10/sys/ofed/drivers/infiniband/core/sysfs.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/core/sysfs.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/infiniband/core/sysfs.c Thu Sep 4 20:12:36 2014 (r271127) @@ -36,6 +36,7 @@ #include #include +#include #include #include Modified: stable/10/sys/ofed/drivers/infiniband/core/ucm.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/core/ucm.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/infiniband/core/ucm.c Thu Sep 4 20:12:36 2014 (r271127) @@ -32,7 +32,6 @@ */ #include -#include #include #include #include @@ -43,6 +42,7 @@ #include #include #include +#include #include @@ -1295,7 +1295,7 @@ static void ib_ucm_remove_one(struct ib_ device_unregister(&ucm_dev->dev); } -static ssize_t show_abi_version(struct class *class, char *buf) +static ssize_t show_abi_version(struct class *class, struct class_attribute *attr, char *buf) { return sprintf(buf, "%d\n", IB_USER_CM_ABI_VERSION); } Modified: stable/10/sys/ofed/drivers/infiniband/core/user_mad.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/core/user_mad.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/infiniband/core/user_mad.c Thu Sep 4 20:12:36 2014 (r271127) @@ -34,7 +34,6 @@ */ #include -#include #include #include #include @@ -986,7 +985,7 @@ static ssize_t show_port(struct device * } static DEVICE_ATTR(port, S_IRUGO, show_port, NULL); -static ssize_t show_abi_version(struct class *class, char *buf) +static ssize_t show_abi_version(struct class *class, struct class_attribute *attr, char *buf) { return sprintf(buf, "%d\n", IB_USER_MAD_ABI_VERSION); } Modified: stable/10/sys/ofed/drivers/infiniband/core/uverbs_cmd.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/core/uverbs_cmd.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/infiniband/core/uverbs_cmd.c Thu Sep 4 20:12:36 2014 (r271127) @@ -35,6 +35,7 @@ #include #include +#include #include #include Modified: stable/10/sys/ofed/drivers/infiniband/core/uverbs_main.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/core/uverbs_main.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/infiniband/core/uverbs_main.c Thu Sep 4 20:12:36 2014 (r271127) @@ -35,7 +35,6 @@ */ #include -#include #include #include #include @@ -565,8 +564,12 @@ struct file *ib_uverbs_alloc_event_file( * system call on a uverbs file, which will already have a * module reference. */ +#ifdef __linux__ filp = alloc_file(uverbs_event_mnt, dget(uverbs_event_mnt->mnt_root), FMODE_READ, fops_get(&uverbs_event_fops)); +#else + filp = alloc_file(FMODE_READ, fops_get(&uverbs_event_fops)); +#endif if (!filp) { ret = -ENFILE; goto err_fd; @@ -767,7 +770,7 @@ static ssize_t show_dev_abi_version(stru } static DEVICE_ATTR(abi_version, S_IRUGO, show_dev_abi_version, NULL); -static ssize_t show_abi_version(struct class *class, char *buf) +static ssize_t show_abi_version(struct class *class, struct class_attribute *attr, char *buf) { return sprintf(buf, "%d\n", IB_USER_VERBS_ABI_VERSION); } Modified: stable/10/sys/ofed/drivers/infiniband/hw/mlx4/alias_GUID.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/hw/mlx4/alias_GUID.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/infiniband/hw/mlx4/alias_GUID.c Thu Sep 4 20:12:36 2014 (r271127) @@ -39,7 +39,6 @@ #include #include #include -#include #include #include #include @@ -81,7 +80,7 @@ void mlx4_ib_update_cache_on_guid_change guid_indexes = be64_to_cpu((__force __be64) dev->sriov.alias_guid. ports_guid[port_num - 1]. all_rec_per_port[block_num].guid_indexes); - pr_debug("port: %d, guid_indexes: 0x%llx\n", port_num, guid_indexes); + pr_debug("port: %d, guid_indexes: 0x%llx\n", port_num, (long long)guid_indexes); for (i = 0; i < NUM_ALIAS_GUID_IN_REC; i++) { /* The location of the specific index starts from bit number 4 @@ -145,7 +144,7 @@ void mlx4_ib_notify_slaves_on_guid_chang guid_indexes = be64_to_cpu((__force __be64) dev->sriov.alias_guid. ports_guid[port_num - 1]. all_rec_per_port[block_num].guid_indexes); - pr_debug("port: %d, guid_indexes: 0x%llx\n", port_num, guid_indexes); + pr_debug("port: %d, guid_indexes: 0x%llx\n", port_num, (long long)guid_indexes); /*calculate the slaves and notify them*/ for (i = 0; i < NUM_ALIAS_GUID_IN_REC; i++) { Modified: stable/10/sys/ofed/drivers/infiniband/hw/mlx4/cm.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/hw/mlx4/cm.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/infiniband/hw/mlx4/cm.c Thu Sep 4 20:12:36 2014 (r271127) @@ -333,7 +333,7 @@ int mlx4_ib_demux_cm_handler(struct ib_d *slave = mlx4_ib_find_real_gid(ibdev, port, gid.global.interface_id); if (*slave < 0) { mlx4_ib_warn(ibdev, "failed matching slave_id by gid (0x%llx)\n", - gid.global.interface_id); + (long long)gid.global.interface_id); return -ENOENT; } return 0; Modified: stable/10/sys/ofed/drivers/infiniband/hw/mlx4/mad.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/hw/mlx4/mad.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/infiniband/hw/mlx4/mad.c Thu Sep 4 20:12:36 2014 (r271127) @@ -1664,12 +1664,12 @@ static void mlx4_ib_tunnel_comp_worker(s (MLX4_NUM_TUNNEL_BUFS - 1)); if (ret) pr_err("Failed reposting tunnel " - "buf:%lld\n", wc.wr_id); + "buf:%lld\n", (long long)wc.wr_id); break; case IB_WC_SEND: pr_debug("received tunnel send completion:" "wrid=0x%llx, status=0x%x\n", - wc.wr_id, wc.status); + (long long)wc.wr_id, wc.status); ib_destroy_ah(tun_qp->tx_ring[wc.wr_id & (MLX4_NUM_TUNNEL_BUFS - 1)].ah); tun_qp->tx_ring[wc.wr_id & (MLX4_NUM_TUNNEL_BUFS - 1)].ah @@ -1685,7 +1685,7 @@ static void mlx4_ib_tunnel_comp_worker(s } else { pr_debug("mlx4_ib: completion error in tunnel: %d." " status = %d, wrid = 0x%llx\n", - ctx->slave, wc.status, wc.wr_id); + ctx->slave, wc.status, (long long)wc.wr_id); if (!MLX4_TUN_IS_RECV(wc.wr_id)) { ib_destroy_ah(tun_qp->tx_ring[wc.wr_id & (MLX4_NUM_TUNNEL_BUFS - 1)].ah); @@ -1837,7 +1837,7 @@ static void mlx4_ib_sqp_comp_worker(stru if (mlx4_ib_post_pv_qp_buf(ctx, sqp, wc.wr_id & (MLX4_NUM_TUNNEL_BUFS - 1))) pr_err("Failed reposting SQP " - "buf:%lld\n", wc.wr_id); + "buf:%lld\n", (long long)wc.wr_id); break; default: BUG_ON(1); @@ -1846,7 +1846,7 @@ static void mlx4_ib_sqp_comp_worker(stru } else { pr_debug("mlx4_ib: completion error in tunnel: %d." " status = %d, wrid = 0x%llx\n", - ctx->slave, wc.status, wc.wr_id); + ctx->slave, wc.status, (long long)wc.wr_id); if (!MLX4_TUN_IS_RECV(wc.wr_id)) { ib_destroy_ah(sqp->tx_ring[wc.wr_id & (MLX4_NUM_TUNNEL_BUFS - 1)].ah); Modified: stable/10/sys/ofed/drivers/infiniband/hw/mlx4/main.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/hw/mlx4/main.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/infiniband/hw/mlx4/main.c Thu Sep 4 20:12:36 2014 (r271127) @@ -37,15 +37,14 @@ #include #endif -#include #include #include #include #include -#include #include #include #include +#include #include #include Modified: stable/10/sys/ofed/drivers/infiniband/hw/mlx4/mlx4_ib.h ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/hw/mlx4/mlx4_ib.h Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/infiniband/hw/mlx4/mlx4_ib.h Thu Sep 4 20:12:36 2014 (r271127) @@ -38,6 +38,7 @@ #include #include #include +#include #include #include Modified: stable/10/sys/ofed/drivers/infiniband/hw/mlx4/mr.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/hw/mlx4/mr.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/infiniband/hw/mlx4/mr.c Thu Sep 4 20:12:36 2014 (r271127) @@ -159,7 +159,7 @@ static int mlx4_ib_umem_write_mtt_block( if (len & (mtt_size-1ULL)) { WARN(1 , "write_block: len %llx is not aligned to mtt_size %llx\n", - len, mtt_size); + (long long)len, (long long)mtt_size); return -EINVAL; } @@ -416,7 +416,7 @@ int mlx4_ib_umem_calc_optimal_mtt_size(s WARN((total_len & ((1ULL<> block_shift; end: @@ -426,7 +426,7 @@ end: */ WARN(1, "mlx4_ib_umem_calc_optimal_mtt_size - unexpected shift %lld\n", - block_shift); + (long long)block_shift); block_shift = min_shift; } Modified: stable/10/sys/ofed/drivers/infiniband/hw/mlx4/qp.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/hw/mlx4/qp.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/infiniband/hw/mlx4/qp.c Thu Sep 4 20:12:36 2014 (r271127) @@ -34,7 +34,6 @@ #include #include #include -#include #include #include Modified: stable/10/sys/ofed/drivers/infiniband/hw/mlx4/sysfs.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/hw/mlx4/sysfs.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/infiniband/hw/mlx4/sysfs.c Thu Sep 4 20:12:36 2014 (r271127) @@ -34,6 +34,7 @@ #include "mlx4_ib.h" #include #include +#include #include /*show_admin_alias_guid returns the administratively assigned value of that GUID. Modified: stable/10/sys/ofed/drivers/infiniband/hw/mthca/mthca_allocator.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/hw/mthca/mthca_allocator.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/infiniband/hw/mthca/mthca_allocator.c Thu Sep 4 20:12:36 2014 (r271127) @@ -32,7 +32,6 @@ #include #include -#include #include "mthca_dev.h" Modified: stable/10/sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c Thu Sep 4 20:12:36 2014 (r271127) @@ -33,7 +33,6 @@ */ #include -#include #include #include #include Modified: stable/10/sys/ofed/drivers/infiniband/hw/mthca/mthca_provider.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/hw/mthca/mthca_provider.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/infiniband/hw/mthca/mthca_provider.c Thu Sep 4 20:12:36 2014 (r271127) @@ -40,6 +40,7 @@ #include #include +#include #include "mthca_dev.h" #include "mthca_cmd.h" Modified: stable/10/sys/ofed/drivers/infiniband/hw/mthca/mthca_reset.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/hw/mthca/mthca_reset.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/infiniband/hw/mthca/mthca_reset.c Thu Sep 4 20:12:36 2014 (r271127) @@ -30,7 +30,6 @@ * SOFTWARE. */ -#include #include #include #include Modified: stable/10/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Thu Sep 4 20:12:36 2014 (r271127) @@ -40,7 +40,6 @@ static int ipoib_resolvemulti(struct ifn #include -#include #include #include #include Modified: stable/10/sys/ofed/drivers/infiniband/ulp/sdp/sdp.h ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/ulp/sdp/sdp.h Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/infiniband/ulp/sdp/sdp.h Thu Sep 4 20:12:36 2014 (r271127) @@ -702,6 +702,7 @@ void sdp_do_posts(struct sdp_sock *ssk); void sdp_rx_comp_full(struct sdp_sock *ssk); /* sdp_zcopy.c */ +struct kiocb; int sdp_sendmsg_zcopy(struct kiocb *iocb, struct socket *sk, struct iovec *iov); int sdp_handle_srcavail(struct sdp_sock *ssk, struct sdp_srcah *srcah); void sdp_handle_sendsm(struct sdp_sock *ssk, u32 mseq_ack); Modified: stable/10/sys/ofed/drivers/net/mlx4/alloc.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/alloc.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/net/mlx4/alloc.c Thu Sep 4 20:12:36 2014 (r271127) @@ -34,8 +34,7 @@ #include #include #include -//#include /* XXX SK probabaly not needed in freeBSD XXX */ -#include +#include #include #include Modified: stable/10/sys/ofed/drivers/net/mlx4/cmd.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/cmd.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/net/mlx4/cmd.c Thu Sep 4 20:12:36 2014 (r271127) @@ -640,7 +640,7 @@ static int mlx4_ACCESS_MEM(struct mlx4_d (slave & ~0x7f) | (size & 0xff)) { mlx4_err(dev, "Bad access mem params - slave_addr:0x%llx " "master_addr:0x%llx slave_id:%d size:%d\n", - slave_addr, master_addr, slave, size); + (long long)slave_addr, (long long)master_addr, slave, size); return -EINVAL; } @@ -1553,7 +1553,7 @@ static int mlx4_master_activate_admin_st return err; } mlx4_dbg((&(priv->dev)), "alloc mac %llx idx %d slave %d port %d\n", - vp_oper->state.mac, vp_oper->mac_idx, slave, port); + (long long)vp_oper->state.mac, vp_oper->mac_idx, slave, port); } } return 0; @@ -2117,7 +2117,7 @@ int mlx4_set_vf_mac(struct mlx4_dev *dev s_info = &priv->mfunc.master.vf_admin[vf].vport[port]; s_info->mac = mlx4_mac_to_u64(mac); mlx4_info(dev, "default mac on vf %d port %d to %llX will take afect only after vf restart\n", - vf, port, s_info->mac); + vf, port, (long long)s_info->mac); return 0; } EXPORT_SYMBOL_GPL(mlx4_set_vf_mac); Modified: stable/10/sys/ofed/drivers/net/mlx4/cq.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/cq.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/net/mlx4/cq.c Thu Sep 4 20:12:36 2014 (r271127) @@ -34,7 +34,6 @@ * SOFTWARE. */ -#include #include #include Modified: stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c Thu Sep 4 20:12:36 2014 (r271127) @@ -1580,7 +1580,7 @@ int mlx4_en_init_netdev(struct mlx4_en_d if (ILLEGAL_MAC(priv->mac)) { en_err(priv, "Port: %d, invalid mac burned: 0x%llx, quiting\n", - priv->port, priv->mac); + priv->port, (long long)priv->mac); err = -EINVAL; goto out; } Modified: stable/10/sys/ofed/drivers/net/mlx4/en_rx.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/en_rx.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/net/mlx4/en_rx.c Thu Sep 4 20:12:36 2014 (r271127) @@ -136,7 +136,7 @@ static void mlx4_en_free_rx_desc(struct frag_info = &priv->frag_info[nr]; dma = be64_to_cpu(rx_desc->data[nr].addr); - en_dbg(DRV, priv, "Unmaping buffer at dma:0x%llx\n", (u64) dma); + en_dbg(DRV, priv, "Unmaping buffer at dma:0x%llx\n", (long long) dma); pci_unmap_single(mdev->pdev, dma, frag_info->frag_size, PCI_DMA_FROMDEVICE); m_free(mb_list[nr]); Modified: stable/10/sys/ofed/drivers/net/mlx4/eq.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/eq.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/net/mlx4/eq.c Thu Sep 4 20:12:36 2014 (r271127) @@ -31,7 +31,6 @@ * SOFTWARE. */ -#include #include #include #include Modified: stable/10/sys/ofed/drivers/net/mlx4/fw.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/fw.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/net/mlx4/fw.c Thu Sep 4 20:12:36 2014 (r271127) @@ -1078,14 +1078,14 @@ int mlx4_QUERY_FW(struct mlx4_dev *dev) MLX4_GET(fw->comm_bar, outbox, QUERY_FW_COMM_BAR_OFFSET); fw->comm_bar = (fw->comm_bar >> 6) * 2; mlx4_dbg(dev, "Communication vector bar:%d offset:0x%llx\n", - fw->comm_bar, fw->comm_base); + fw->comm_bar, (long long)fw->comm_base); mlx4_dbg(dev, "FW size %d KB\n", fw->fw_pages >> 2); MLX4_GET(fw->clock_offset, outbox, QUERY_FW_CLOCK_OFFSET); MLX4_GET(fw->clock_bar, outbox, QUERY_FW_CLOCK_BAR); fw->clock_bar = (fw->clock_bar >> 6) * 2; mlx4_dbg(dev, "Internal clock bar:%d offset:0x%llx\n", - fw->comm_bar, fw->comm_base); + fw->comm_bar, (long long)fw->comm_base); /* * Round up number of system pages needed in case Modified: stable/10/sys/ofed/drivers/net/mlx4/main.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/main.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/net/mlx4/main.c Thu Sep 4 20:12:36 2014 (r271127) @@ -34,7 +34,6 @@ */ #include -#include #include #include #include @@ -42,6 +41,7 @@ #include #include #include +#include #include #include Modified: stable/10/sys/ofed/drivers/net/mlx4/mcg.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/mcg.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/net/mlx4/mcg.c Thu Sep 4 20:12:36 2014 (r271127) @@ -886,7 +886,7 @@ int mlx4_flow_detach(struct mlx4_dev *de err = mlx4_QP_FLOW_STEERING_DETACH(dev, reg_id); if (err) mlx4_err(dev, "Fail to detach network rule. registration id = 0x%llx\n", - reg_id); + (long long)reg_id); return err; } EXPORT_SYMBOL_GPL(mlx4_flow_detach); Modified: stable/10/sys/ofed/drivers/net/mlx4/mr.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/mr.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/net/mlx4/mr.c Thu Sep 4 20:12:36 2014 (r271127) @@ -32,7 +32,6 @@ * SOFTWARE. */ -#include #include #include #include Modified: stable/10/sys/ofed/drivers/net/mlx4/pd.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/pd.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/net/mlx4/pd.c Thu Sep 4 20:12:36 2014 (r271127) @@ -31,7 +31,6 @@ * SOFTWARE. */ -#include #include #include Modified: stable/10/sys/ofed/drivers/net/mlx4/qp.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/qp.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/net/mlx4/qp.c Thu Sep 4 20:12:36 2014 (r271127) @@ -33,8 +33,6 @@ * SOFTWARE. */ -#include - #include #include Modified: stable/10/sys/ofed/drivers/net/mlx4/reset.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/reset.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/net/mlx4/reset.c Thu Sep 4 20:12:36 2014 (r271127) @@ -31,7 +31,6 @@ * SOFTWARE. */ -#include #include #include #include Modified: stable/10/sys/ofed/drivers/net/mlx4/resource_tracker.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/resource_tracker.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/net/mlx4/resource_tracker.c Thu Sep 4 20:12:36 2014 (r271127) @@ -1166,7 +1166,7 @@ static int qp_res_start_move_to(struct m switch (state) { case RES_QP_BUSY: mlx4_dbg(dev, "%s: failed RES_QP, 0x%llx\n", - __func__, r->com.res_id); + __func__, (long long)r->com.res_id); err = -EBUSY; break; @@ -1174,7 +1174,7 @@ static int qp_res_start_move_to(struct m if (r->com.state == RES_QP_MAPPED && !alloc) break; - mlx4_dbg(dev, "failed RES_QP, 0x%llx\n", r->com.res_id); + mlx4_dbg(dev, "failed RES_QP, 0x%llx\n", (long long)r->com.res_id); err = -EINVAL; break; @@ -1184,7 +1184,7 @@ static int qp_res_start_move_to(struct m break; else { mlx4_dbg(dev, "failed RES_QP, 0x%llx\n", - r->com.res_id); + (long long)r->com.res_id); err = -EINVAL; } @@ -3766,7 +3766,7 @@ static int _move_all_busy(struct mlx4_de mlx4_dbg(dev, "%s id 0x%llx is busy\n", ResourceType(type), - r->res_id); + (long long)r->res_id); ++busy; } else { r->from_state = r->state; Modified: stable/10/sys/ofed/drivers/net/mlx4/sense.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/sense.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/net/mlx4/sense.c Thu Sep 4 20:12:36 2014 (r271127) @@ -53,7 +53,7 @@ int mlx4_SENSE_PORT(struct mlx4_dev *dev } if (out_param > 2) { - mlx4_err(dev, "Sense returned illegal value: 0x%llx\n", out_param); + mlx4_err(dev, "Sense returned illegal value: 0x%llx\n", (long long)out_param); return -EINVAL; } Modified: stable/10/sys/ofed/drivers/net/mlx4/srq.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/srq.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/net/mlx4/srq.c Thu Sep 4 20:12:36 2014 (r271127) @@ -31,8 +31,6 @@ * SOFTWARE. */ -#include - #include #include Modified: stable/10/sys/ofed/drivers/net/mlx4/xrcd.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/xrcd.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/net/mlx4/xrcd.c Thu Sep 4 20:12:36 2014 (r271127) @@ -31,7 +31,6 @@ * SOFTWARE. */ -#include #include #include "mlx4.h" Modified: stable/10/sys/ofed/include/asm/atomic-long.h ============================================================================== --- stable/10/sys/ofed/include/asm/atomic-long.h Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/include/asm/atomic-long.h Thu Sep 4 20:12:36 2014 (r271127) @@ -2,6 +2,7 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. + * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,6 +26,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + #ifndef _ATOMIC_LONG_H_ #define _ATOMIC_LONG_H_ Modified: stable/10/sys/ofed/include/asm/atomic.h ============================================================================== --- stable/10/sys/ofed/include/asm/atomic.h Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/include/asm/atomic.h Thu Sep 4 20:12:36 2014 (r271127) @@ -2,6 +2,7 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. + * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -32,7 +33,6 @@ #include #include #include -#include typedef struct { volatile u_int counter; @@ -90,7 +90,6 @@ static inline int atomic_add_unless(atom for (;;) { if (unlikely(c == (u))) break; - // old = atomic_cmpxchg((v), c, c + (a)); /*Linux*/ old = atomic_cmpset_int(&v->counter, c, c + (a)); if (likely(old == c)) break; Modified: stable/10/sys/ofed/include/asm/byteorder.h ============================================================================== --- stable/10/sys/ofed/include/asm/byteorder.h Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/include/asm/byteorder.h Thu Sep 4 20:12:36 2014 (r271127) @@ -2,6 +2,7 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. + * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,6 +26,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + #ifndef _ASM_BYTEORDER_H_ #define _ASM_BYTEORDER_H_ Modified: stable/10/sys/ofed/include/asm/fcntl.h ============================================================================== --- stable/10/sys/ofed/include/asm/fcntl.h Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/include/asm/fcntl.h Thu Sep 4 20:12:36 2014 (r271127) @@ -2,6 +2,7 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. + * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/10/sys/ofed/include/asm/io.h ============================================================================== --- stable/10/sys/ofed/include/asm/io.h Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/include/asm/io.h Thu Sep 4 20:12:36 2014 (r271127) @@ -1,7 +1,8 @@ -/*- +/* * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. + * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,4 +27,9 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#ifndef _ASM_IO_H_ +#define _ASM_IO_H_ + #include + +#endif /* _ASM_IO_H_ */ Modified: stable/10/sys/ofed/include/asm/page.h ============================================================================== --- stable/10/sys/ofed/include/asm/page.h Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/include/asm/page.h Thu Sep 4 20:12:36 2014 (r271127) @@ -2,6 +2,7 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. + * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,4 +27,9 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#ifndef _ASM_PAGE_H_ +#define _ASM_PAGE_H_ + #include + +#endif /*_ASM_PAGE_H_*/ Modified: stable/10/sys/ofed/include/asm/pgtable.h ============================================================================== --- stable/10/sys/ofed/include/asm/pgtable.h Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/include/asm/pgtable.h Thu Sep 4 20:12:36 2014 (r271127) @@ -2,6 +2,7 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. + * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/10/sys/ofed/include/asm/types.h ============================================================================== --- stable/10/sys/ofed/include/asm/types.h Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/include/asm/types.h Thu Sep 4 20:12:36 2014 (r271127) @@ -2,6 +2,7 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. + * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,43 +26,36 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + #ifndef _ASM_TYPES_H_ #define _ASM_TYPES_H_ -typedef unsigned short umode_t; - -typedef signed char __s8; -typedef unsigned char __u8; - -typedef signed short __s16; -typedef unsigned short __u16; - -typedef signed int __s32; -typedef unsigned int __u32; - -#if defined(__GNUC__) // && !defined(__STRICT_ANSI__) -typedef signed long long __s64; -typedef unsigned long long __u64; -#endif - #ifdef _KERNEL -typedef signed char s8; -typedef unsigned char u8; - -typedef signed short s16; -typedef unsigned short u16; - -typedef signed int s32; -typedef unsigned int u32; - -typedef signed long long s64; -typedef unsigned long long u64; +typedef uint8_t u8; +typedef uint8_t __u8; +typedef uint16_t u16; +typedef uint16_t __u16; +typedef uint32_t u32; +typedef uint32_t __u32; +typedef uint64_t u64; +typedef uint64_t __u64; + +typedef int8_t s8; +typedef int8_t __s8; +typedef int16_t s16; +typedef int16_t __s16; +typedef int32_t s32; +typedef int32_t __s32; +typedef int64_t s64; +typedef int64_t __s64; /* DMA addresses come in generic and 64-bit flavours. */ typedef vm_paddr_t dma_addr_t; typedef vm_paddr_t dma64_addr_t; +typedef unsigned short umode_t; + #endif /* _KERNEL */ #endif /* _ASM_TYPES_H_ */ Modified: stable/10/sys/ofed/include/asm/uaccess.h ============================================================================== --- stable/10/sys/ofed/include/asm/uaccess.h Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/include/asm/uaccess.h Thu Sep 4 20:12:36 2014 (r271127) @@ -2,6 +2,7 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. + * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,6 +26,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + #ifndef _ASM_UACCESS_H_ #define _ASM_UACCESS_H_ Modified: stable/10/sys/ofed/include/linux/bitops.h ============================================================================== --- stable/10/sys/ofed/include/linux/bitops.h Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/include/linux/bitops.h Thu Sep 4 20:12:36 2014 (r271127) @@ -2,6 +2,7 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. + * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -37,6 +38,8 @@ #define BITS_TO_LONGS(n) howmany((n), BITS_PER_LONG) #define BIT_WORD(nr) ((nr) / BITS_PER_LONG) +#define BITS_PER_BYTE 8 + static inline int __ffs(int mask) { @@ -463,6 +466,27 @@ bitmap_find_free_region(unsigned long *b } /** + * bitmap_allocate_region - allocate bitmap region + * @bitmap: array of unsigned longs corresponding to the bitmap + * @pos: beginning of bit region to allocate + * @order: region size (log base 2 of number of bits) to allocate + * + * Allocate (set bits in) a specified region of a bitmap. + * + * Return 0 on success, or %-EBUSY if specified region wasn't + * free (not all bits were zero). + */ + +static inline int +bitmap_allocate_region(unsigned long *bitmap, int pos, int order) +{ + if (!__reg_op(bitmap, pos, order, REG_OP_ISFREE)) + return -EBUSY; + __reg_op(bitmap, pos, order, REG_OP_ALLOC); + return 0; +} + +/** * bitmap_release_region - release allocated bitmap region * @bitmap: array of unsigned longs corresponding to the bitmap * @pos: beginning of bit region to release @@ -480,4 +504,9 @@ bitmap_release_region(unsigned long *bit } +#define for_each_set_bit(bit, addr, size) \ + for ((bit) = find_first_bit((addr), (size)); \ + (bit) < (size); \ + (bit) = find_next_bit((addr), (size), (bit) + 1)) + #endif /* _LINUX_BITOPS_H_ */ Copied: stable/10/sys/ofed/include/linux/cache.h (from r270710, head/sys/ofed/include/linux/cache.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/ofed/include/linux/cache.h Thu Sep 4 20:12:36 2014 (r271127, copy of r270710, head/sys/ofed/include/linux/cache.h) @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2010 Isilon Systems, Inc. + * Copyright (c) 2010 iX Systems, Inc. + * Copyright (c) 2010 Panasas, Inc. + * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-10@FreeBSD.ORG Thu Sep 4 20:18:10 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B18046F1; Thu, 4 Sep 2014 20:18:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 99C541FB1; Thu, 4 Sep 2014 20:18:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84KIASX028451; Thu, 4 Sep 2014 20:18:10 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84KI9Pm028441; Thu, 4 Sep 2014 20:18:09 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409042018.s84KI9Pm028441@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 4 Sep 2014 20:18:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271128 - in stable/10/sys: dev/fb dev/vt dev/vt/font dev/vt/hw/efifb dev/vt/hw/fb dev/vt/hw/ofwfb dev/vt/hw/vga powerpc/ps3 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 20:18:10 -0000 Author: emaste Date: Thu Sep 4 20:18:08 2014 New Revision: 271128 URL: http://svnweb.freebsd.org/changeset/base/271128 Log: MFC vt(4) improvements / sync with HEAD These are largely dumbbell@'s changes. Most significantly they address the extreme performance degradation with VGA hardware. SVN revisions in this MFC: 269471 270290 270293 270322 270324 270329 270331 270336 270338 270340 270341 270342 270343 270388 270390 270404 270411 270412 270413 270431 270446 270448 270485 270587 270589 270613 270618 270620 270667 270702 270707 270708 270720 270721 270785 270786 Detailed commit list: r270290: Test if the cursor is shown only once Later, we just see if the "struct mouse_cursor" pointer is set. This avoids the need to mess with all the conditions several times; this has been error prone. While here, rename the variable "m" to a more meaningful "cursor", like it's done elsewhere in the code. r270293: Rename the "mouse_cursor" structure to "vt_mouse_cursor" At the same time, "w" and "h" members are now called "width" and "height". The goal is to have a more "public" structure, because it will soon be passed as argument to a new callback, replacing vd_bitbltchr_t. r269471 (ray): Fix vt_vga driver to draw not-8-bit-aligned fonts correctly. Still one bug here: mouse left some gaps on track when moving left. r270322: Add new vd_bitblt_text_t callback, and implement it for vt_vga Compared to the deprecated vd_bitbltchr_t callback, vd_bitblt_text_t receives: o the whole text buffer o the dirty area o the mouse cursor (map, position, colors) This allows the backend to perform optimization on how to draw things. The goal is to remove vd_bitbltchr_t and vd_putchar_t, once all driver are converted (only vt_vga is included in this commit). In vt_vga, this allows to draw the text and the cursor in one pass, without ever reading from video memory (because it has all the context). The main benefit is the speed improvement: no more slideshow during boot! Other bugs fixed in vt_vga are: o left-most characters are drawn properly (the left-most pixels were missing with bold characters and some wide letters such as 'm') o no more black square around the cursor o no cursor flickering when the text is scrolling There are still many problems to fix: the known issues are marked with "FIXME" inside the code. r270411: vt_fb: Implement vd_bitblt_text_t for vt_fb and derivatives r270412: creator_fb: Implement vd_bitblt_text_t r270413: ofwfb: Implement vd_bitblt_text_t r270324: vt_vga: Clip the draw area to never draw offscreen This fixes a bug when two windows use different fonts, but a longer- term solution is required. The dirty area should be stored as pixels, not character cells, because such coordinates don't have the same meaning in all windows, when using different fonts. r270329: Mark new mouse position as dirty only when it's actually displayed r270331: Store cursor bitmap & colors in struct vt_device This removes the need to specify them to each call to vd_bitblt_text_t and, therefore, simplifies the API. r270336: Give the window to vd_bitblt_text_t callback ... instead of both the buffer and the font. Again, this simplifies the API. r270338: The offset to center the text area is per-window now The previous global offset, based on the last loaded font, had no meaning for other windows. This caused a shifted text area, often partly out-of-screen. r270341: vt_vga: Remove a "FIXME" comment; the issue was solved in r270338 r270340: Don't run vt_set_border() and vt_flush() concurrently In the case of vt_vga, the two concurrent calls were writing to the same VGA registers, causing incorrect refresh of the screen. r270342: Use the actual size of the mouse when marking its position as dirty This fixes a bug where part of the cursor was not erased. r270343: Remove "FIXME" about multiple locking of vt_buf in vt_flush() After some testing, it appears that acquiring the lock once and keeping it longer is slower than taking it multiple times. While here, fix a typo in another comment. r270388: vt_vga: Give only the character part of term_char_t to vga_get_cp437() This fixes a bug where vga_get_cp437() was called with an invalid argument. The screen was then filled with '?' instead of the actual character. r270390: Fix a crash in vt_mark_mouse_position_as_dirty() when in textmode In textmode, no font is loaded, thus the page fault in vt_mark_mouse_position_as_dirty() when it wants the font width/height. For now, create a fake area for the textmode. This needs to be modified if vt_vga gains mouse support in textmode. While here, fix a build failure when SC_NO_CUTPASTE is defined: vt_mark_mouse_position_as_dirty() must not be included in this case. r270404: Fix cursor handling in vt_flush() There were situations where the cursor was not erased/redrawn or its position was marked as dirty even though it's not displayed. The code is now more straightforward. At the same, add a function to determine if the cursor covers a given area. This is used by backends to know if they need to draw the cursor. This new function should be paired with a new state in struct vt_device, called vd_mshown, which indicates if the cursor should be displayed. This again simplifies vd_bitblt_text_t callback's API. r270431: vt(4): Add vd_bitblt_bmp_t callback The code was already there in all backends, we just expose it. This is used to display the splash screen. r270446: Remove vd_bitbltchr_t It's replaced by vd_bitblt_text_t, which gives more context to the backend and allows it to perform more efficiently when redrawing a given area. r270448: Fix order of arguments (x <-> y) when showing the splash screen r270485: vt_vga: Fix the display of the splash screen r270587: Take font offset into account in vt_is_cursor_in_area() This fixes a "General protection fault" in vt_vga, where vt_is_cursor_in_area() erroneously reported that the cursor was over the text. This led to negative integers stored in "unsigned int" and chaos. r270589: The cursor coordinates are relative to the drawn area ... not the whole screen. Don't use font offsets in vt_mark_mouse_position_as_dirty(). This fixes a bug where the mouse position wasn't marked as dirty when approaching the borders of the drawn area. r270613: Store a rectangle for the drawable area, not just the top-left corner This allows backends to verify they do not draw outside of this area. This fixes a bug in vt_vga where the text was happily drawn over the right and bottom margins, when using the Gallant font. r270618: Intialize drawable area rectangle each time a font is loaded This also fixes a problem where early in boot, the area was zero, leading to nothing displayed for a few seconds. r270620: vt_vga: Use Write Mode 0 to draw group of 8 pixels using 3 or more colors This replaces the method based on Write Mode 3, which required reads from the video memory to load the latches. r270667: When creating a window buffer, fill it entirely ... not just the visible part. This fixes a bug where, when switching from eg. vt_vga to vt_fb (ie. the resolution goes up), the originally hidden, uninitialized area of the buffer is displayed on the screen. This leads to a missing text cursor when it's over an unitialized area. This was also visible when selecting text: the uninitialized area was not highlighted. Internally, this area was zeroed: characters were all 0x00000000, meaning the foreground and background color was black. Now, everything is filled with a space with a gray foreground color, like the visible area. While here, remove the check for the mute flag and always use TERMINAL_NORM_ATTR as the character attribute (ie. gray foreground, black background). r270702: Implement basic support for KDSETMODE ioctl With the current implementation, this allows an X11 server to tell the console it switches a particular window in "graphics mode". This information is used by the mouse handling code to ignore sysmouse events in the window taken by the X server: only him should receive those events. r270707: Pause the vt_flush() timer when the screen is up-to-date The timer is restarted whenever a window buffer is marked as dirty or the mouse cursor moves. There's still room for improvement. For instance, we should not mark a window buffer as dirty when this window isn't displayed. r270708: vt(4): Recompute the drawable area when the resolution changes This was only done when the font changed. r270720: vt(4): Fix mouse cursor handling in vt_fb/creator_vt/ofwfb There were two issues: 1. The area given to vt_is_cursor_in_area() was adding the drawable area offset, something already handled by this function. 2. The cursor was shifted on the screen by the offset of this area and thus was misplaced or not erased. Furthermore, when reaching the bottom or right borders, the cursor was either totally removed or not erased correctly. r270721: vt(4): If the terminal shrinks, make sure the mouse is inside the new area r270785: vt(4): Change vb_history_size from "int" to "unsigned int" CID: 1230002, 1230003 r270786: Indicate that KDSETRAD case falls through the next case CID: 1229953 Relnotes: Yes Modified: stable/10/sys/dev/fb/creator_vt.c stable/10/sys/dev/vt/font/vt_mouse_cursor.c stable/10/sys/dev/vt/hw/efifb/efifb.c stable/10/sys/dev/vt/hw/fb/vt_early_fb.c stable/10/sys/dev/vt/hw/fb/vt_fb.c stable/10/sys/dev/vt/hw/fb/vt_fb.h stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c stable/10/sys/dev/vt/hw/vga/vt_vga.c stable/10/sys/dev/vt/vt.h stable/10/sys/dev/vt/vt_buf.c stable/10/sys/dev/vt/vt_core.c stable/10/sys/powerpc/ps3/ps3_syscons.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/fb/creator_vt.c ============================================================================== --- stable/10/sys/dev/fb/creator_vt.c Thu Sep 4 20:12:36 2014 (r271127) +++ stable/10/sys/dev/fb/creator_vt.c Thu Sep 4 20:18:08 2014 (r271128) @@ -45,14 +45,16 @@ __FBSDID("$FreeBSD$"); static vd_probe_t creatorfb_probe; static vd_init_t creatorfb_init; static vd_blank_t creatorfb_blank; -static vd_bitbltchr_t creatorfb_bitbltchr; +static vd_bitblt_text_t creatorfb_bitblt_text; +static vd_bitblt_bmp_t creatorfb_bitblt_bitmap; static const struct vt_driver vt_creatorfb_driver = { .vd_name = "creatorfb", .vd_probe = creatorfb_probe, .vd_init = creatorfb_init, .vd_blank = creatorfb_blank, - .vd_bitbltchr = creatorfb_bitbltchr, + .vd_bitblt_text = creatorfb_bitblt_text, + .vd_bitblt_bmp = creatorfb_bitblt_bitmap, .vd_fb_ioctl = vt_fb_ioctl, .vd_fb_mmap = vt_fb_mmap, .vd_priority = VD_PRIORITY_SPECIFIC @@ -176,30 +178,30 @@ creatorfb_blank(struct vt_device *vd, te } static void -creatorfb_bitbltchr(struct vt_device *vd, const uint8_t *src, - const uint8_t *mask, int bpl, vt_axis_t top, vt_axis_t left, - unsigned int width, unsigned int height, term_color_t fg, term_color_t bg) +creatorfb_bitblt_bitmap(struct vt_device *vd, const struct vt_window *vw, + const uint8_t *pattern, const uint8_t *mask, + unsigned int width, unsigned int height, + unsigned int x, unsigned int y, term_color_t fg, term_color_t bg) { struct creatorfb_softc *sc = vd->vd_softc; u_long line; uint32_t fgc, bgc; - int c; + int c, l; uint8_t b, m; fgc = sc->fb.fb_cmap[fg]; bgc = sc->fb.fb_cmap[bg]; b = m = 0; - /* Don't try to put off screen pixels */ - if (((left + width) > vd->vd_width) || ((top + height) > - vd->vd_height)) - return; - - line = (sc->fb.fb_stride * top) + 4*left; - for (; height > 0; height--) { - for (c = 0; c < width; c++) { + line = (sc->fb.fb_stride * y) + 4*x; + for (l = 0; + l < height && y + l < vw->vw_draw_area.tr_end.tp_row; + l++) { + for (c = 0; + c < width && x + c < vw->vw_draw_area.tr_end.tp_col; + c++) { if (c % 8 == 0) - b = *src++; + b = *pattern++; else b <<= 1; if (mask != NULL) { @@ -218,3 +220,55 @@ creatorfb_bitbltchr(struct vt_device *vd } } +void +creatorfb_bitblt_text(struct vt_device *vd, const struct vt_window *vw, + const term_rect_t *area) +{ + unsigned int col, row, x, y; + struct vt_font *vf; + term_char_t c; + term_color_t fg, bg; + const uint8_t *pattern; + + vf = vw->vw_font; + + for (row = area->tr_begin.tp_row; row < area->tr_end.tp_row; ++row) { + for (col = area->tr_begin.tp_col; col < area->tr_end.tp_col; + ++col) { + x = col * vf->vf_width + + vw->vw_draw_area.tr_begin.tp_col; + y = row * vf->vf_height + + vw->vw_draw_area.tr_begin.tp_row; + + c = VTBUF_GET_FIELD(&vw->vw_buf, row, col); + pattern = vtfont_lookup(vf, c); + vt_determine_colors(c, + VTBUF_ISCURSOR(&vw->vw_buf, row, col), &fg, &bg); + + creatorfb_bitblt_bitmap(vd, vw, + pattern, NULL, vf->vf_width, vf->vf_height, + x, y, fg, bg); + } + } + +#ifndef SC_NO_CUTPASTE + if (!vd->vd_mshown) + return; + + term_rect_t drawn_area; + + drawn_area.tr_begin.tp_col = area->tr_begin.tp_col * vf->vf_width; + drawn_area.tr_begin.tp_row = area->tr_begin.tp_row * vf->vf_height; + drawn_area.tr_end.tp_col = area->tr_end.tp_col * vf->vf_width; + drawn_area.tr_end.tp_row = area->tr_end.tp_row * vf->vf_height; + + if (vt_is_cursor_in_area(vd, &drawn_area)) { + creatorfb_bitblt_bitmap(vd, vw, + vd->vd_mcursor->map, vd->vd_mcursor->mask, + vd->vd_mcursor->width, vd->vd_mcursor->height, + vd->vd_mx_drawn + vw->vw_draw_area.tr_begin.tp_col, + vd->vd_my_drawn + vw->vw_draw_area.tr_begin.tp_row, + vd->vd_mcursor_fg, vd->vd_mcursor_bg); + } +#endif +} Modified: stable/10/sys/dev/vt/font/vt_mouse_cursor.c ============================================================================== --- stable/10/sys/dev/vt/font/vt_mouse_cursor.c Thu Sep 4 20:12:36 2014 (r271127) +++ stable/10/sys/dev/vt/font/vt_mouse_cursor.c Thu Sep 4 20:18:08 2014 (r271128) @@ -33,7 +33,7 @@ __FBSDID("$FreeBSD$"); #include #ifndef SC_NO_CUTPASTE -struct mouse_cursor vt_default_mouse_pointer = { +struct vt_mouse_cursor vt_default_mouse_pointer = { .map = { 0x00, /* "__ " */ 0x40, /* "_*_ " */ @@ -64,7 +64,7 @@ struct mouse_cursor vt_default_mouse_poi 0x0f, /* " ____" */ 0x0f, /* " ____" */ }, - .w = 8, - .h = 13, + .width = 8, + .height = 13, }; #endif Modified: stable/10/sys/dev/vt/hw/efifb/efifb.c ============================================================================== --- stable/10/sys/dev/vt/hw/efifb/efifb.c Thu Sep 4 20:12:36 2014 (r271127) +++ stable/10/sys/dev/vt/hw/efifb/efifb.c Thu Sep 4 20:18:08 2014 (r271128) @@ -60,7 +60,8 @@ static struct vt_driver vt_efifb_driver .vd_probe = vt_efifb_probe, .vd_init = vt_efifb_init, .vd_blank = vt_fb_blank, - .vd_bitbltchr = vt_fb_bitbltchr, + .vd_bitblt_text = vt_fb_bitblt_text, + .vd_bitblt_bmp = vt_fb_bitblt_bitmap, .vd_fb_ioctl = vt_fb_ioctl, .vd_fb_mmap = vt_fb_mmap, /* Better than VGA, but still generic driver. */ Modified: stable/10/sys/dev/vt/hw/fb/vt_early_fb.c ============================================================================== --- stable/10/sys/dev/vt/hw/fb/vt_early_fb.c Thu Sep 4 20:12:36 2014 (r271127) +++ stable/10/sys/dev/vt/hw/fb/vt_early_fb.c Thu Sep 4 20:18:08 2014 (r271128) @@ -59,7 +59,8 @@ static struct vt_driver vt_fb_early_driv .vd_probe = vt_efb_probe, .vd_init = vt_efb_init, .vd_blank = vt_fb_blank, - .vd_bitbltchr = vt_fb_bitbltchr, + .vd_bitblt_text = vt_fb_bitblt_text, + .vd_bitblt_bmp = vt_fb_bitblt_bitmap, .vd_priority = VD_PRIORITY_GENERIC, }; Modified: stable/10/sys/dev/vt/hw/fb/vt_fb.c ============================================================================== --- stable/10/sys/dev/vt/hw/fb/vt_fb.c Thu Sep 4 20:12:36 2014 (r271127) +++ stable/10/sys/dev/vt/hw/fb/vt_fb.c Thu Sep 4 20:18:08 2014 (r271128) @@ -41,15 +41,15 @@ __FBSDID("$FreeBSD$"); #include #include -void vt_fb_drawrect(struct vt_device *vd, int x1, int y1, int x2, int y2, - int fill, term_color_t color); -void vt_fb_setpixel(struct vt_device *vd, int x, int y, term_color_t color); +static vd_drawrect_t vt_fb_drawrect; +static vd_setpixel_t vt_fb_setpixel; static struct vt_driver vt_fb_driver = { .vd_name = "fb", .vd_init = vt_fb_init, .vd_blank = vt_fb_blank, - .vd_bitbltchr = vt_fb_bitbltchr, + .vd_bitblt_text = vt_fb_bitblt_text, + .vd_bitblt_bmp = vt_fb_bitblt_bitmap, .vd_drawrect = vt_fb_drawrect, .vd_setpixel = vt_fb_setpixel, .vd_postswitch = vt_fb_postswitch, @@ -146,7 +146,7 @@ vt_fb_mmap(struct vt_device *vd, vm_ooff return (EINVAL); } -void +static void vt_fb_setpixel(struct vt_device *vd, int x, int y, term_color_t color) { struct fb_info *info; @@ -181,7 +181,7 @@ vt_fb_setpixel(struct vt_device *vd, int } -void +static void vt_fb_drawrect(struct vt_device *vd, int x1, int y1, int x2, int y2, int fill, term_color_t color) { @@ -244,13 +244,14 @@ vt_fb_blank(struct vt_device *vd, term_c } void -vt_fb_bitbltchr(struct vt_device *vd, const uint8_t *src, const uint8_t *mask, - int bpl, vt_axis_t top, vt_axis_t left, unsigned int width, - unsigned int height, term_color_t fg, term_color_t bg) +vt_fb_bitblt_bitmap(struct vt_device *vd, const struct vt_window *vw, + const uint8_t *pattern, const uint8_t *mask, + unsigned int width, unsigned int height, + unsigned int x, unsigned int y, term_color_t fg, term_color_t bg) { struct fb_info *info; uint32_t fgc, bgc, cc, o; - int c, l, bpp; + int c, l, bpp, bpl; u_long line; uint8_t b, m; const uint8_t *ch; @@ -260,20 +261,18 @@ vt_fb_bitbltchr(struct vt_device *vd, co fgc = info->fb_cmap[fg]; bgc = info->fb_cmap[bg]; b = m = 0; - if (bpl == 0) - bpl = (width + 7) >> 3; /* Bytes per sorce line. */ - - /* Don't try to put off screen pixels */ - if (((left + width) > info->fb_width) || ((top + height) > - info->fb_height)) - return; + bpl = (width + 7) >> 3; /* Bytes per source line. */ KASSERT((info->fb_vbase != 0), ("Unmapped framebuffer")); - line = (info->fb_stride * top) + (left * bpp); - for (l = 0; l < height; l++) { - ch = src; - for (c = 0; c < width; c++) { + line = (info->fb_stride * y) + (x * bpp); + for (l = 0; + l < height && y + l < vw->vw_draw_area.tr_end.tp_row; + l++) { + ch = pattern; + for (c = 0; + c < width && x + c < vw->vw_draw_area.tr_end.tp_col; + c++) { if (c % 8 == 0) b = *ch++; else @@ -312,8 +311,61 @@ vt_fb_bitbltchr(struct vt_device *vd, co } } line += info->fb_stride; - src += bpl; + pattern += bpl; + } +} + +void +vt_fb_bitblt_text(struct vt_device *vd, const struct vt_window *vw, + const term_rect_t *area) +{ + unsigned int col, row, x, y; + struct vt_font *vf; + term_char_t c; + term_color_t fg, bg; + const uint8_t *pattern; + + vf = vw->vw_font; + + for (row = area->tr_begin.tp_row; row < area->tr_end.tp_row; ++row) { + for (col = area->tr_begin.tp_col; col < area->tr_end.tp_col; + ++col) { + x = col * vf->vf_width + + vw->vw_draw_area.tr_begin.tp_col; + y = row * vf->vf_height + + vw->vw_draw_area.tr_begin.tp_row; + + c = VTBUF_GET_FIELD(&vw->vw_buf, row, col); + pattern = vtfont_lookup(vf, c); + vt_determine_colors(c, + VTBUF_ISCURSOR(&vw->vw_buf, row, col), &fg, &bg); + + vt_fb_bitblt_bitmap(vd, vw, + pattern, NULL, vf->vf_width, vf->vf_height, + x, y, fg, bg); + } + } + +#ifndef SC_NO_CUTPASTE + if (!vd->vd_mshown) + return; + + term_rect_t drawn_area; + + drawn_area.tr_begin.tp_col = area->tr_begin.tp_col * vf->vf_width; + drawn_area.tr_begin.tp_row = area->tr_begin.tp_row * vf->vf_height; + drawn_area.tr_end.tp_col = area->tr_end.tp_col * vf->vf_width; + drawn_area.tr_end.tp_row = area->tr_end.tp_row * vf->vf_height; + + if (vt_is_cursor_in_area(vd, &drawn_area)) { + vt_fb_bitblt_bitmap(vd, vw, + vd->vd_mcursor->map, vd->vd_mcursor->mask, + vd->vd_mcursor->width, vd->vd_mcursor->height, + vd->vd_mx_drawn + vw->vw_draw_area.tr_begin.tp_col, + vd->vd_my_drawn + vw->vw_draw_area.tr_begin.tp_row, + vd->vd_mcursor_fg, vd->vd_mcursor_bg); } +#endif } void Modified: stable/10/sys/dev/vt/hw/fb/vt_fb.h ============================================================================== --- stable/10/sys/dev/vt/hw/fb/vt_fb.h Thu Sep 4 20:12:36 2014 (r271127) +++ stable/10/sys/dev/vt/hw/fb/vt_fb.h Thu Sep 4 20:18:08 2014 (r271128) @@ -36,11 +36,12 @@ int vt_fb_attach(struct fb_info *info); void vt_fb_resume(void); void vt_fb_suspend(void); -vd_init_t vt_fb_init; -vd_blank_t vt_fb_blank; -vd_bitbltchr_t vt_fb_bitbltchr; -vd_postswitch_t vt_fb_postswitch; -vd_fb_ioctl_t vt_fb_ioctl; -vd_fb_mmap_t vt_fb_mmap; +vd_init_t vt_fb_init; +vd_blank_t vt_fb_blank; +vd_bitblt_text_t vt_fb_bitblt_text; +vd_bitblt_bmp_t vt_fb_bitblt_bitmap; +vd_postswitch_t vt_fb_postswitch; +vd_fb_ioctl_t vt_fb_ioctl; +vd_fb_mmap_t vt_fb_mmap; #endif /* _DEV_VT_HW_FB_VT_FB_H_ */ Modified: stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c ============================================================================== --- stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c Thu Sep 4 20:12:36 2014 (r271127) +++ stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c Thu Sep 4 20:18:08 2014 (r271128) @@ -58,14 +58,16 @@ struct ofwfb_softc { static vd_probe_t ofwfb_probe; static vd_init_t ofwfb_init; -static vd_bitbltchr_t ofwfb_bitbltchr; +static vd_bitblt_text_t ofwfb_bitblt_text; +static vd_bitblt_bmp_t ofwfb_bitblt_bitmap; static const struct vt_driver vt_ofwfb_driver = { .vd_name = "ofwfb", .vd_probe = ofwfb_probe, .vd_init = ofwfb_init, .vd_blank = vt_fb_blank, - .vd_bitbltchr = ofwfb_bitbltchr, + .vd_bitblt_text = ofwfb_bitblt_text, + .vd_bitblt_bmp = ofwfb_bitblt_bitmap, .vd_fb_ioctl = vt_fb_ioctl, .vd_fb_mmap = vt_fb_mmap, .vd_priority = VD_PRIORITY_GENERIC+1, @@ -100,14 +102,15 @@ ofwfb_probe(struct vt_device *vd) } static void -ofwfb_bitbltchr(struct vt_device *vd, const uint8_t *src, const uint8_t *mask, - int bpl, vt_axis_t top, vt_axis_t left, unsigned int width, - unsigned int height, term_color_t fg, term_color_t bg) +ofwfb_bitblt_bitmap(struct vt_device *vd, const struct vt_window *vw, + const uint8_t *pattern, const uint8_t *mask, + unsigned int width, unsigned int height, + unsigned int x, unsigned int y, term_color_t fg, term_color_t bg) { struct fb_info *sc = vd->vd_softc; u_long line; uint32_t fgc, bgc; - int c; + int c, l; uint8_t b, m; union { uint32_t l; @@ -118,16 +121,16 @@ ofwfb_bitbltchr(struct vt_device *vd, co bgc = sc->fb_cmap[bg]; b = m = 0; - /* Don't try to put off screen pixels */ - if (((left + width) > vd->vd_width) || ((top + height) > - vd->vd_height)) - return; - - line = (sc->fb_stride * top) + left * sc->fb_bpp/8; + line = (sc->fb_stride * y) + x * sc->fb_bpp/8; if (mask == NULL && sc->fb_bpp == 8 && (width % 8 == 0)) { + /* Don't try to put off screen pixels */ + if (((x + width) > vd->vd_width) || ((y + height) > + vd->vd_height)) + return; + for (; height > 0; height--) { for (c = 0; c < width; c += 8) { - b = *src++; + b = *pattern++; /* * Assume that there is more background than @@ -157,10 +160,14 @@ ofwfb_bitbltchr(struct vt_device *vd, co line += sc->fb_stride; } } else { - for (; height > 0; height--) { - for (c = 0; c < width; c++) { + for (l = 0; + l < height && y + l < vw->vw_draw_area.tr_end.tp_row; + l++) { + for (c = 0; + c < width && x + c < vw->vw_draw_area.tr_end.tp_col; + c++) { if (c % 8 == 0) - b = *src++; + b = *pattern++; else b <<= 1; if (mask != NULL) { @@ -191,6 +198,59 @@ ofwfb_bitbltchr(struct vt_device *vd, co } } +void +ofwfb_bitblt_text(struct vt_device *vd, const struct vt_window *vw, + const term_rect_t *area) +{ + unsigned int col, row, x, y; + struct vt_font *vf; + term_char_t c; + term_color_t fg, bg; + const uint8_t *pattern; + + vf = vw->vw_font; + + for (row = area->tr_begin.tp_row; row < area->tr_end.tp_row; ++row) { + for (col = area->tr_begin.tp_col; col < area->tr_end.tp_col; + ++col) { + x = col * vf->vf_width + + vw->vw_draw_area.tr_begin.tp_col; + y = row * vf->vf_height + + vw->vw_draw_area.tr_begin.tp_row; + + c = VTBUF_GET_FIELD(&vw->vw_buf, row, col); + pattern = vtfont_lookup(vf, c); + vt_determine_colors(c, + VTBUF_ISCURSOR(&vw->vw_buf, row, col), &fg, &bg); + + ofwfb_bitblt_bitmap(vd, vw, + pattern, NULL, vf->vf_width, vf->vf_height, + x, y, fg, bg); + } + } + +#ifndef SC_NO_CUTPASTE + if (!vd->vd_mshown) + return; + + term_rect_t drawn_area; + + drawn_area.tr_begin.tp_col = area->tr_begin.tp_col * vf->vf_width; + drawn_area.tr_begin.tp_row = area->tr_begin.tp_row * vf->vf_height; + drawn_area.tr_end.tp_col = area->tr_end.tp_col * vf->vf_width; + drawn_area.tr_end.tp_row = area->tr_end.tp_row * vf->vf_height; + + if (vt_is_cursor_in_area(vd, &drawn_area)) { + ofwfb_bitblt_bitmap(vd, vw, + vd->vd_mcursor->map, vd->vd_mcursor->mask, + vd->vd_mcursor->width, vd->vd_mcursor->height, + vd->vd_mx_drawn + vw->vw_draw_area.tr_begin.tp_col, + vd->vd_my_drawn + vw->vw_draw_area.tr_begin.tp_row, + vd->vd_mcursor_fg, vd->vd_mcursor_bg); + } +#endif +} + static void ofwfb_initialize(struct vt_device *vd) { Modified: stable/10/sys/dev/vt/hw/vga/vt_vga.c ============================================================================== --- stable/10/sys/dev/vt/hw/vga/vt_vga.c Thu Sep 4 20:12:36 2014 (r271127) +++ stable/10/sys/dev/vt/hw/vga/vt_vga.c Thu Sep 4 20:18:08 2014 (r271128) @@ -54,7 +54,8 @@ struct vga_softc { bus_space_handle_t vga_fb_handle; bus_space_tag_t vga_reg_tag; bus_space_handle_t vga_reg_handle; - int vga_curcolor; + int vga_wmode; + term_color_t vga_curfg, vga_curbg; }; /* Convenience macros. */ @@ -71,13 +72,27 @@ struct vga_softc { #define VT_VGA_HEIGHT 480 #define VT_VGA_MEMSIZE (VT_VGA_WIDTH * VT_VGA_HEIGHT / 8) +/* + * VGA is designed to handle 8 pixels at a time (8 pixels in one byte of + * memory). + */ +#define VT_VGA_PIXELS_BLOCK 8 + +/* + * We use an off-screen addresses to: + * o store the background color; + * o store pixels pattern. + * Those addresses are then loaded in the latches once. + */ +#define VT_VGA_BGCOLOR_OFFSET VT_VGA_MEMSIZE + static vd_probe_t vga_probe; static vd_init_t vga_init; static vd_blank_t vga_blank; -static vd_bitbltchr_t vga_bitbltchr; +static vd_bitblt_text_t vga_bitblt_text; +static vd_bitblt_bmp_t vga_bitblt_bitmap; static vd_drawrect_t vga_drawrect; static vd_setpixel_t vga_setpixel; -static vd_putchar_t vga_putchar; static vd_postswitch_t vga_postswitch; static const struct vt_driver vt_vga_driver = { @@ -85,10 +100,10 @@ static const struct vt_driver vt_vga_dri .vd_probe = vga_probe, .vd_init = vga_init, .vd_blank = vga_blank, - .vd_bitbltchr = vga_bitbltchr, + .vd_bitblt_text = vga_bitblt_text, + .vd_bitblt_bmp = vga_bitblt_bitmap, .vd_drawrect = vga_drawrect, .vd_setpixel = vga_setpixel, - .vd_putchar = vga_putchar, .vd_postswitch = vga_postswitch, .vd_priority = VD_PRIORITY_GENERIC, }; @@ -101,158 +116,74 @@ static struct vga_softc vga_conssoftc; VT_DRIVER_DECLARE(vt_vga, vt_vga_driver); static inline void -vga_setcolor(struct vt_device *vd, term_color_t color) +vga_setwmode(struct vt_device *vd, int wmode) { struct vga_softc *sc = vd->vd_softc; - if (sc->vga_curcolor != color) { - REG_WRITE1(sc, VGA_GC_ADDRESS, VGA_GC_SET_RESET); - REG_WRITE1(sc, VGA_GC_DATA, color); - sc->vga_curcolor = color; - } -} + if (sc->vga_wmode == wmode) + return; -static void -vga_blank(struct vt_device *vd, term_color_t color) -{ - struct vga_softc *sc = vd->vd_softc; - u_int ofs; + REG_WRITE1(sc, VGA_GC_ADDRESS, VGA_GC_MODE); + REG_WRITE1(sc, VGA_GC_DATA, wmode); + sc->vga_wmode = wmode; - vga_setcolor(vd, color); - for (ofs = 0; ofs < VT_VGA_MEMSIZE; ofs++) - MEM_WRITE1(sc, ofs, 0xff); + switch (wmode) { + case 3: + /* Re-enable all plans. */ + REG_WRITE1(sc, VGA_SEQ_ADDRESS, VGA_SEQ_MAP_MASK); + REG_WRITE1(sc, VGA_SEQ_DATA, VGA_SEQ_MM_EM3 | VGA_SEQ_MM_EM2 | + VGA_SEQ_MM_EM1 | VGA_SEQ_MM_EM0); + break; + } } static inline void -vga_bitblt_put(struct vt_device *vd, u_long dst, term_color_t color, - uint8_t v) +vga_setfg(struct vt_device *vd, term_color_t color) { struct vga_softc *sc = vd->vd_softc; - /* Skip empty writes, in order to avoid palette changes. */ - if (v != 0x00) { - vga_setcolor(vd, color); - /* - * When this MEM_READ1() gets disabled, all sorts of - * artifacts occur. This is because this read loads the - * set of 8 pixels that are about to be changed. There - * is one scenario where we can avoid the read, namely - * if all pixels are about to be overwritten anyway. - */ - if (v != 0xff) - MEM_READ1(sc, dst); - MEM_WRITE1(sc, dst, v); - } -} - -static void -vga_setpixel(struct vt_device *vd, int x, int y, term_color_t color) -{ - - vga_bitblt_put(vd, (y * VT_VGA_WIDTH / 8) + (x / 8), color, - 0x80 >> (x % 8)); -} + vga_setwmode(vd, 3); -static void -vga_drawrect(struct vt_device *vd, int x1, int y1, int x2, int y2, int fill, - term_color_t color) -{ - int x, y; + if (sc->vga_curfg == color) + return; - for (y = y1; y <= y2; y++) { - if (fill || (y == y1) || (y == y2)) { - for (x = x1; x <= x2; x++) - vga_setpixel(vd, x, y, color); - } else { - vga_setpixel(vd, x1, y, color); - vga_setpixel(vd, x2, y, color); - } - } + REG_WRITE1(sc, VGA_GC_ADDRESS, VGA_GC_SET_RESET); + REG_WRITE1(sc, VGA_GC_DATA, color); + sc->vga_curfg = color; } static inline void -vga_bitblt_draw(struct vt_device *vd, const uint8_t *src, - u_long ldst, uint8_t shift, unsigned int width, unsigned int height, - term_color_t color, int negate) -{ - u_long dst; - int w; - uint8_t b, r, out; - - for (; height > 0; height--) { - dst = ldst; - ldst += VT_VGA_WIDTH / 8; - r = 0; - for (w = width; w > 0; w -= 8) { - b = *src++; - if (negate) { - b = ~b; - /* Don't go too far. */ - if (w < 8) - b &= 0xff << (8 - w); - } - /* Reintroduce bits from previous column. */ - out = (b >> shift) | r; - r = b << (8 - shift); - vga_bitblt_put(vd, dst++, color, out); - } - /* Print the remainder. */ - vga_bitblt_put(vd, dst, color, r); - } -} - -static void -vga_bitbltchr(struct vt_device *vd, const uint8_t *src, const uint8_t *mask, - int bpl, vt_axis_t top, vt_axis_t left, unsigned int width, - unsigned int height, term_color_t fg, term_color_t bg) +vga_setbg(struct vt_device *vd, term_color_t color) { - u_long dst, ldst; - int w; + struct vga_softc *sc = vd->vd_softc; - /* Don't try to put off screen pixels */ - if (((left + width) > VT_VGA_WIDTH) || ((top + height) > - VT_VGA_HEIGHT)) - return; + vga_setwmode(vd, 3); - dst = (VT_VGA_WIDTH * top + left) / 8; + if (sc->vga_curbg == color) + return; - for (; height > 0; height--) { - ldst = dst; - for (w = width; w > 0; w -= 8) { - vga_bitblt_put(vd, ldst, fg, *src); - vga_bitblt_put(vd, ldst, bg, ~*src); - ldst++; - src++; - } - dst += VT_VGA_WIDTH / 8; - } -} + REG_WRITE1(sc, VGA_GC_ADDRESS, VGA_GC_SET_RESET); + REG_WRITE1(sc, VGA_GC_DATA, color); -/* Bitblt with mask support. Slow. */ -static void -vga_maskbitbltchr(struct vt_device *vd, const uint8_t *src, const uint8_t *mask, - int bpl, vt_axis_t top, vt_axis_t left, unsigned int width, - unsigned int height, term_color_t fg, term_color_t bg) -{ - struct vga_softc *sc = vd->vd_softc; - u_long dst; - uint8_t shift; + /* + * Write 8 pixels using the background color to an off-screen + * byte in the video memory. + */ + MEM_WRITE1(sc, VT_VGA_BGCOLOR_OFFSET, 0xff); - dst = (VT_VGA_WIDTH * top + left) / 8; - shift = left % 8; + /* + * Read those 8 pixels back to load the background color in the + * latches register. + */ + MEM_READ1(sc, VT_VGA_BGCOLOR_OFFSET); - /* Don't try to put off screen pixels */ - if (((left + width) > VT_VGA_WIDTH) || ((top + height) > - VT_VGA_HEIGHT)) - return; + sc->vga_curbg = color; - if (sc->vga_curcolor == fg) { - vga_bitblt_draw(vd, src, dst, shift, width, height, fg, 0); - vga_bitblt_draw(vd, src, dst, shift, width, height, bg, 1); - } else { - vga_bitblt_draw(vd, src, dst, shift, width, height, bg, 1); - vga_bitblt_draw(vd, src, dst, shift, width, height, fg, 0); - } + /* + * The Set/Reset register doesn't contain the fg color anymore, + * store an invalid color. + */ + sc->vga_curfg = 0xff; } /* @@ -381,25 +312,635 @@ vga_get_cp437(term_char_t c) } static void -vga_putchar(struct vt_device *vd, term_char_t c, - vt_axis_t top, vt_axis_t left, term_color_t fg, term_color_t bg) +vga_blank(struct vt_device *vd, term_color_t color) { struct vga_softc *sc = vd->vd_softc; - uint8_t ch, attr; + u_int ofs; + + vga_setfg(vd, color); + for (ofs = 0; ofs < VT_VGA_MEMSIZE; ofs++) + MEM_WRITE1(sc, ofs, 0xff); +} + +static inline void +vga_bitblt_put(struct vt_device *vd, u_long dst, term_color_t color, + uint8_t v) +{ + struct vga_softc *sc = vd->vd_softc; + + /* Skip empty writes, in order to avoid palette changes. */ + if (v != 0x00) { + vga_setfg(vd, color); + /* + * When this MEM_READ1() gets disabled, all sorts of + * artifacts occur. This is because this read loads the + * set of 8 pixels that are about to be changed. There + * is one scenario where we can avoid the read, namely + * if all pixels are about to be overwritten anyway. + */ + if (v != 0xff) { + MEM_READ1(sc, dst); + + /* The bg color was trashed by the reads. */ + sc->vga_curbg = 0xff; + } + MEM_WRITE1(sc, dst, v); + } +} + +static void +vga_setpixel(struct vt_device *vd, int x, int y, term_color_t color) +{ + + vga_bitblt_put(vd, (y * VT_VGA_WIDTH / 8) + (x / 8), color, + 0x80 >> (x % 8)); +} + +static void +vga_drawrect(struct vt_device *vd, int x1, int y1, int x2, int y2, int fill, + term_color_t color) +{ + int x, y; + + for (y = y1; y <= y2; y++) { + if (fill || (y == y1) || (y == y2)) { + for (x = x1; x <= x2; x++) + vga_setpixel(vd, x, y, color); + } else { + vga_setpixel(vd, x1, y, color); + vga_setpixel(vd, x2, y, color); + } + } +} + +static void +vga_compute_shifted_pattern(const uint8_t *src, unsigned int bytes, + unsigned int src_x, unsigned int x_count, unsigned int dst_x, + uint8_t *pattern, uint8_t *mask) +{ + unsigned int n; + + n = src_x / 8; + + /* + * This mask has bits set, where a pixel (ether 0 or 1) + * comes from the source bitmap. + */ + if (mask != NULL) { + *mask = (0xff + >> (8 - x_count)) + << (8 - x_count - dst_x); + } + + if (n == (src_x + x_count - 1) / 8) { + /* All the pixels we want are in the same byte. */ + *pattern = src[n]; + if (dst_x >= src_x) + *pattern >>= (dst_x - src_x % 8); + else + *pattern <<= (src_x % 8 - dst_x); + } else { + /* The pixels we want are split into two bytes. */ + if (dst_x >= src_x % 8) { + *pattern = + src[n] << (8 - dst_x - src_x % 8) | + src[n + 1] >> (dst_x - src_x % 8); + } else { + *pattern = + src[n] << (src_x % 8 - dst_x) | + src[n + 1] >> (8 - src_x % 8 - dst_x); + } + } +} + +static void +vga_copy_bitmap_portion(uint8_t *pattern_2colors, uint8_t *pattern_ncolors, + const uint8_t *src, const uint8_t *src_mask, unsigned int src_width, + unsigned int src_x, unsigned int dst_x, unsigned int x_count, + unsigned int src_y, unsigned int dst_y, unsigned int y_count, + term_color_t fg, term_color_t bg, int overwrite) +{ + unsigned int i, bytes; + uint8_t pattern, relevant_bits, mask; + + bytes = (src_width + 7) / 8; + + for (i = 0; i < y_count; ++i) { + vga_compute_shifted_pattern(src + (src_y + i) * bytes, + bytes, src_x, x_count, dst_x, &pattern, &relevant_bits); + + if (src_mask == NULL) { + /* + * No src mask. Consider that all wanted bits + * from the source are "authoritative". + */ + mask = relevant_bits; + } else { + /* + * There's an src mask. We shift it the same way + * we shifted the source pattern. + */ + vga_compute_shifted_pattern( + src_mask + (src_y + i) * bytes, + bytes, src_x, x_count, dst_x, + &mask, NULL); + + /* Now, only keep the wanted bits among them. */ + mask &= relevant_bits; + } + + /* + * Clear bits from the pattern which must be + * transparent, according to the source mask. + */ + pattern &= mask; + + /* Set the bits in the 2-colors array. */ + if (overwrite) + pattern_2colors[dst_y + i] &= ~mask; + pattern_2colors[dst_y + i] |= pattern; + + if (pattern_ncolors == NULL) + continue; + + /* + * Set the same bits in the n-colors array. This one + * supports transparency, when a given bit is cleared in + * all colors. + */ + if (overwrite) { + /* + * Ensure that the pixels used by this bitmap are + * cleared in other colors. + */ + for (int j = 0; j < 16; ++j) + pattern_ncolors[(dst_y + i) * 16 + j] &= + ~mask; + } + pattern_ncolors[(dst_y + i) * 16 + fg] |= pattern; + pattern_ncolors[(dst_y + i) * 16 + bg] |= (~pattern & mask); + } +} + +static void +vga_bitblt_pixels_block_2colors(struct vt_device *vd, const uint8_t *masks, + term_color_t fg, term_color_t bg, + unsigned int x, unsigned int y, unsigned int height) +{ + unsigned int i, offset; + struct vga_softc *sc; + + /* + * The great advantage of Write Mode 3 is that we just need + * to load the foreground in the Set/Reset register, load the + * background color in the latches register (this is done + * through a write in offscreen memory followed by a read of + * that data), then write the pattern to video memory. This + * pattern indicates if the pixel should use the foreground + * color (bit set) or the background color (bit cleared). + */ + + vga_setbg(vd, bg); + vga_setfg(vd, fg); + + sc = vd->vd_softc; + offset = (VT_VGA_WIDTH * y + x) / 8; + + for (i = 0; i < height; ++i, offset += VT_VGA_WIDTH / 8) { + MEM_WRITE1(sc, offset, masks[i]); + } +} + +static void +vga_bitblt_pixels_block_ncolors(struct vt_device *vd, const uint8_t *masks, + unsigned int x, unsigned int y, unsigned int height) +{ + unsigned int i, j, plan, color, offset; + struct vga_softc *sc; + uint8_t mask, plans[height * 4]; + + sc = vd->vd_softc; + + memset(plans, 0, sizeof(plans)); + + /* + * To write a group of pixels using 3 or more colors, we select + * Write Mode 0 and write one byte to each plan separately. + */ + + /* + * We first compute each byte: each plan contains one bit of the + * color code for each of the 8 pixels. + * + * For example, if the 8 pixels are like this: + * GBBBBBBY + * where: + * G (gray) = 0b0111 + * B (black) = 0b0000 + * Y (yellow) = 0b0011 + * + * The corresponding for bytes are: + * GBBBBBBY + * Plan 0: 10000001 = 0x81 + * Plan 1: 10000001 = 0x81 + * Plan 2: 10000000 = 0x80 + * Plan 3: 00000000 = 0x00 + * | | | + * | | +-> 0b0011 (Y) + * | +-----> 0b0000 (B) + * +--------> 0b0111 (G) + */ + + for (i = 0; i < height; ++i) { + for (color = 0; color < 16; ++color) { + mask = masks[i * 16 + color]; + if (mask == 0x00) + continue; + + for (j = 0; j < 8; ++j) { + if (!((mask >> (7 - j)) & 0x1)) + continue; + + /* The pixel "j" uses color "color". */ + for (plan = 0; plan < 4; ++plan) + plans[i * 4 + plan] |= + ((color >> plan) & 0x1) << (7 - j); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-10@FreeBSD.ORG Thu Sep 4 20:21:31 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 89D94875; Thu, 4 Sep 2014 20:21:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 747FE10B0; Thu, 4 Sep 2014 20:21:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84KLV87032299; Thu, 4 Sep 2014 20:21:31 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84KLV7s032298; Thu, 4 Sep 2014 20:21:31 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409042021.s84KLV7s032298@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 4 Sep 2014 20:21:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271129 - stable/10/lib/libstand/powerpc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 20:21:31 -0000 Author: emaste Date: Thu Sep 4 20:21:30 2014 New Revision: 271129 URL: http://svnweb.freebsd.org/changeset/base/271129 Log: MFC r261591 (nwhitehorn): Make libstand setjmp work for both 64- and 32-bit ABIs. Modified: stable/10/lib/libstand/powerpc/_setjmp.S Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libstand/powerpc/_setjmp.S ============================================================================== --- stable/10/lib/libstand/powerpc/_setjmp.S Thu Sep 4 20:18:08 2014 (r271128) +++ stable/10/lib/libstand/powerpc/_setjmp.S Thu Sep 4 20:21:30 2014 (r271129) @@ -1,36 +1,115 @@ -/* $NetBSD: _setjmp.S,v 1.1 1997/03/29 20:55:53 thorpej Exp $ */ +/* $FreeBSD$ */ +/* from: NetBSD: setjmp.S,v 1.1 1998/01/27 15:13:12 sakamoto Exp $ */ +/* from: OpenBSD: setjmp.S,v 1.2 1996/12/28 06:22:18 rahnds Exp */ +/* kernel version of this file, does not have signal goop */ +/* int setjmp(jmp_buf env) */ #include -#if (defined(LIBC_SCCS) || defined(LIBC_RCS)) && !defined(lint) - .text - .asciz "$FreeBSD$" +#ifdef __powerpc64__ +#define LD_REG ld +#define ST_REG std +#define REGWIDTH 8 +#else +#define LD_REG lwz +#define ST_REG stw +#define REGWIDTH 4 #endif -/* - * C library -- _setjmp, _longjmp - * - * _longjmp(a,v) - * will generate a "return(v?v:1)" from the last call to - * _setjmp(a) - * by restoring registers from the stack. - * The previous signal state is NOT restored. - */ - -ENTRY(_setjmp) - mflr 11 - mfcr 12 - mr 10,1 - mr 9,2 - stmw 9,8(3) - li 3,0 +#define JMP_r1 1*REGWIDTH +#define JMP_r2 2*REGWIDTH +#define JMP_r14 3*REGWIDTH +#define JMP_r15 4*REGWIDTH +#define JMP_r16 5*REGWIDTH +#define JMP_r17 6*REGWIDTH +#define JMP_r18 7*REGWIDTH +#define JMP_r19 8*REGWIDTH +#define JMP_r20 9*REGWIDTH +#define JMP_r21 10*REGWIDTH +#define JMP_r22 11*REGWIDTH +#define JMP_r23 12*REGWIDTH +#define JMP_r24 13*REGWIDTH +#define JMP_r25 14*REGWIDTH +#define JMP_r26 15*REGWIDTH +#define JMP_r27 16*REGWIDTH +#define JMP_r28 17*REGWIDTH +#define JMP_r29 18*REGWIDTH +#define JMP_r30 19*REGWIDTH +#define JMP_r31 20*REGWIDTH +#define JMP_lr 21*REGWIDTH +#define JMP_cr 22*REGWIDTH +#define JMP_ctr 23*REGWIDTH +#define JMP_xer 24*REGWIDTH +#define JMP_sig 25*REGWIDTH + +ASENTRY_NOPROF(setjmp) + ST_REG 31, JMP_r31(3) + /* r1, r2, r14-r30 */ + ST_REG 1, JMP_r1 (3) + ST_REG 2, JMP_r2 (3) + ST_REG 14, JMP_r14(3) + ST_REG 15, JMP_r15(3) + ST_REG 16, JMP_r16(3) + ST_REG 17, JMP_r17(3) + ST_REG 18, JMP_r18(3) + ST_REG 19, JMP_r19(3) + ST_REG 20, JMP_r20(3) + ST_REG 21, JMP_r21(3) + ST_REG 22, JMP_r22(3) + ST_REG 23, JMP_r23(3) + ST_REG 24, JMP_r24(3) + ST_REG 25, JMP_r25(3) + ST_REG 26, JMP_r26(3) + ST_REG 27, JMP_r27(3) + ST_REG 28, JMP_r28(3) + ST_REG 29, JMP_r29(3) + ST_REG 30, JMP_r30(3) + /* cr, lr, ctr, xer */ + mfcr 0 + ST_REG 0, JMP_cr(3) + mflr 0 + ST_REG 0, JMP_lr(3) + mfctr 0 + ST_REG 0, JMP_ctr(3) + mfxer 0 + ST_REG 0, JMP_xer(3) + /* f14-f31, fpscr */ + li 3, 0 blr -ENTRY(_longjmp) - lmw 9,8(3) - mtlr 11 - mtcr 12 - mr 2,9 - mr 1,10 - mr 3,4 + +.extern sigsetmask +ASENTRY_NOPROF(longjmp) + LD_REG 31, JMP_r31(3) + /* r1, r2, r14-r30 */ + LD_REG 1, JMP_r1 (3) + LD_REG 2, JMP_r2 (3) + LD_REG 14, JMP_r14(3) + LD_REG 15, JMP_r15(3) + LD_REG 16, JMP_r16(3) + LD_REG 17, JMP_r17(3) + LD_REG 18, JMP_r18(3) + LD_REG 19, JMP_r19(3) + LD_REG 20, JMP_r20(3) + LD_REG 21, JMP_r21(3) + LD_REG 22, JMP_r22(3) + LD_REG 23, JMP_r23(3) + LD_REG 24, JMP_r24(3) + LD_REG 25, JMP_r25(3) + LD_REG 26, JMP_r26(3) + LD_REG 27, JMP_r27(3) + LD_REG 28, JMP_r28(3) + LD_REG 29, JMP_r29(3) + LD_REG 30, JMP_r30(3) + /* cr, lr, ctr, xer */ + LD_REG 0, JMP_cr(3) + mtcr 0 + LD_REG 0, JMP_lr(3) + mtlr 0 + LD_REG 0, JMP_ctr(3) + mtctr 0 + LD_REG 0, JMP_xer(3) + mtxer 0 + /* f14-f31, fpscr */ + mr 3, 4 blr From owner-svn-src-stable-10@FreeBSD.ORG Thu Sep 4 20:35:56 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8EFC6BF9; Thu, 4 Sep 2014 20:35:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 77EE41257; Thu, 4 Sep 2014 20:35:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84KZuiu037645; Thu, 4 Sep 2014 20:35:56 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84KZskQ037633; Thu, 4 Sep 2014 20:35:54 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409042035.s84KZskQ037633@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 4 Sep 2014 20:35:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271130 - in stable/10/sys/boot: . i386/efi i386/gptboot i386/gptzfsboot i386/loader i386/zfsboot libstand32 powerpc/ofw powerpc/ps3 powerpc/uboot X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 20:35:56 -0000 Author: emaste Date: Thu Sep 4 20:35:53 2014 New Revision: 271130 URL: http://svnweb.freebsd.org/changeset/base/271130 Log: r261567: Build a 32-bit libstand under sys/boot/ A 32-bit libstand is needed on 64-bit platforms for use by various bootloaders. Previously only the 32-bit version was built, installed as /usr/lib/libstand.a. A new 64-bit libstand consumer will arrive in the near future, so move the bootloader-specific 32-bit version to sys/boot/libstand32/. Explicitly link against this version in the 32-bit loaders. r261614: Build a 32-bit libstand under sys/boot/ for ppc64 This change is equivalent to r261567 for i386/amd64. Relnotes: Yes Sponsored by: The FreeBSD Foundation Added: stable/10/sys/boot/libstand32/ - copied from r261567, head/sys/boot/libstand32/ Modified: stable/10/sys/boot/Makefile.amd64 stable/10/sys/boot/Makefile.i386 stable/10/sys/boot/Makefile.powerpc stable/10/sys/boot/i386/efi/Makefile stable/10/sys/boot/i386/gptboot/Makefile stable/10/sys/boot/i386/gptzfsboot/Makefile stable/10/sys/boot/i386/loader/Makefile stable/10/sys/boot/i386/zfsboot/Makefile stable/10/sys/boot/powerpc/ofw/Makefile stable/10/sys/boot/powerpc/ps3/Makefile stable/10/sys/boot/powerpc/uboot/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/Makefile.amd64 ============================================================================== --- stable/10/sys/boot/Makefile.amd64 Thu Sep 4 20:21:30 2014 (r271129) +++ stable/10/sys/boot/Makefile.amd64 Thu Sep 4 20:35:53 2014 (r271130) @@ -1,5 +1,6 @@ # $FreeBSD$ SUBDIR+= efi +SUBDIR+= libstand32 SUBDIR+= zfs SUBDIR+= userboot Modified: stable/10/sys/boot/Makefile.i386 ============================================================================== --- stable/10/sys/boot/Makefile.i386 Thu Sep 4 20:21:30 2014 (r271129) +++ stable/10/sys/boot/Makefile.i386 Thu Sep 4 20:35:53 2014 (r271130) @@ -1,4 +1,5 @@ # $FreeBSD$ SUBDIR+= efi +SUBDIR+= libstand32 SUBDIR+= zfs Modified: stable/10/sys/boot/Makefile.powerpc ============================================================================== --- stable/10/sys/boot/Makefile.powerpc Thu Sep 4 20:21:30 2014 (r271129) +++ stable/10/sys/boot/Makefile.powerpc Thu Sep 4 20:35:53 2014 (r271130) @@ -4,5 +4,6 @@ SUBDIR+= fdt .endif +SUBDIR+= libstand32 SUBDIR+= ofw SUBDIR+= uboot Modified: stable/10/sys/boot/i386/efi/Makefile ============================================================================== --- stable/10/sys/boot/i386/efi/Makefile Thu Sep 4 20:21:30 2014 (r271129) +++ stable/10/sys/boot/i386/efi/Makefile Thu Sep 4 20:35:53 2014 (r271130) @@ -60,6 +60,7 @@ loader.efi: loader.sym --target=efi-app-ia32 ${.ALLSRC} ${.TARGET} LIBEFI= ${.OBJDIR}/../../efi/libefi/libefi.a +LIBSTAND= ${.OBJDIR}/../../libstand32/libstand.a CFLAGS+= -I${.CURDIR}/../libi386 CFLAGS+= -I${.CURDIR}/../btx/lib Modified: stable/10/sys/boot/i386/gptboot/Makefile ============================================================================== --- stable/10/sys/boot/i386/gptboot/Makefile Thu Sep 4 20:21:30 2014 (r271129) +++ stable/10/sys/boot/i386/gptboot/Makefile Thu Sep 4 20:35:53 2014 (r271130) @@ -41,6 +41,8 @@ CFLAGS.gcc+= --param max-inline-insns-si LD_FLAGS=-static -N --gc-sections +LIBSTAND= ${.OBJDIR}/../../libstand32/libstand.a + # Pick up ../Makefile.inc early. .include Modified: stable/10/sys/boot/i386/gptzfsboot/Makefile ============================================================================== --- stable/10/sys/boot/i386/gptzfsboot/Makefile Thu Sep 4 20:21:30 2014 (r271129) +++ stable/10/sys/boot/i386/gptzfsboot/Makefile Thu Sep 4 20:35:53 2014 (r271130) @@ -38,6 +38,8 @@ CFLAGS.gcc+= --param max-inline-insns-si LD_FLAGS=-static -N --gc-sections +LIBSTAND= ${.OBJDIR}/../../libstand32/libstand.a + # Pick up ../Makefile.inc early. .include Modified: stable/10/sys/boot/i386/loader/Makefile ============================================================================== --- stable/10/sys/boot/i386/loader/Makefile Thu Sep 4 20:21:30 2014 (r271129) +++ stable/10/sys/boot/i386/loader/Makefile Thu Sep 4 20:35:53 2014 (r271130) @@ -69,6 +69,8 @@ LDFLAGS= -static -Ttext 0x0 LIBI386= ${.OBJDIR}/../libi386/libi386.a CFLAGS+= -I${.CURDIR}/.. +LIBSTAND= ${.OBJDIR}/../../libstand32/libstand.a + # BTX components CFLAGS+= -I${.CURDIR}/../btx/lib Modified: stable/10/sys/boot/i386/zfsboot/Makefile ============================================================================== --- stable/10/sys/boot/i386/zfsboot/Makefile Thu Sep 4 20:21:30 2014 (r271129) +++ stable/10/sys/boot/i386/zfsboot/Makefile Thu Sep 4 20:35:53 2014 (r271130) @@ -35,6 +35,8 @@ CFLAGS.gcc+= --param max-inline-insns-si LD_FLAGS=-static -N --gc-sections +LIBSTAND= ${.OBJDIR}/../../libstand32/libstand.a + # Pick up ../Makefile.inc early. .include Modified: stable/10/sys/boot/powerpc/ofw/Makefile ============================================================================== --- stable/10/sys/boot/powerpc/ofw/Makefile Thu Sep 4 20:21:30 2014 (r271129) +++ stable/10/sys/boot/powerpc/ofw/Makefile Thu Sep 4 20:35:53 2014 (r271130) @@ -89,10 +89,11 @@ LIBOFW= ${.OBJDIR}/../../ofw/libofw/lib CFLAGS+= -I${.CURDIR}/../../ofw/libofw # where to get libstand from +LIBSTAND= ${.OBJDIR}/../../libstand32/libstand.a CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/ DPADD= ${LIBFICL} ${LIBOFW} ${LIBSTAND} -LDADD= ${LIBFICL} ${LIBOFW} -lstand +LDADD= ${LIBFICL} ${LIBOFW} ${LIBSTAND} vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT} Modified: stable/10/sys/boot/powerpc/ps3/Makefile ============================================================================== --- stable/10/sys/boot/powerpc/ps3/Makefile Thu Sep 4 20:21:30 2014 (r271129) +++ stable/10/sys/boot/powerpc/ps3/Makefile Thu Sep 4 20:35:53 2014 (r271130) @@ -95,10 +95,11 @@ CFLAGS+= -Wa,-mppc64bridge #.include "${.CURDIR}/../../ofw/common/Makefile.inc" # where to get libstand from +LIBSTAND= ${.OBJDIR}/../../libstand32/libstand.a CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/ DPADD= ${LIBFICL} ${LIBOFW} ${LIBSTAND} -LDADD= ${LIBFICL} ${LIBOFW} -lstand +LDADD= ${LIBFICL} ${LIBOFW} ${LIBSTAND} SC_DFLT_FONT=cp437 Modified: stable/10/sys/boot/powerpc/uboot/Makefile ============================================================================== --- stable/10/sys/boot/powerpc/uboot/Makefile Thu Sep 4 20:21:30 2014 (r271129) +++ stable/10/sys/boot/powerpc/uboot/Makefile Thu Sep 4 20:35:53 2014 (r271130) @@ -95,10 +95,11 @@ CFLAGS+= -I${.CURDIR}/../../uboot/lib CFLAGS+= -I${.OBJDIR}/../../uboot/lib # where to get libstand from +LIBSTAND= ${.OBJDIR}/../../libstand32/libstand.a CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/ DPADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBSTAND} -LDADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} -lstand +LDADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBSTAND} vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT} From owner-svn-src-stable-10@FreeBSD.ORG Thu Sep 4 20:44:42 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 85766DF3; Thu, 4 Sep 2014 20:44:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 70883132D; Thu, 4 Sep 2014 20:44:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84Kign7042159; Thu, 4 Sep 2014 20:44:42 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84KigO3042158; Thu, 4 Sep 2014 20:44:42 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409042044.s84KigO3042158@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 4 Sep 2014 20:44:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271131 - stable/10/sys/boot/libstand32 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 20:44:42 -0000 Author: emaste Date: Thu Sep 4 20:44:41 2014 New Revision: 271131 URL: http://svnweb.freebsd.org/changeset/base/271131 Log: MFC libstand32 clean target fixes r269029 (sbruno): Update so that clean target in sys/boot will delete the symlink created for machine r269036 (sbruno): Delete the entire cleandepend/cleanmachine target thing now that its been cleared out in r269029 Modified: stable/10/sys/boot/libstand32/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/libstand32/Makefile ============================================================================== --- stable/10/sys/boot/libstand32/Makefile Thu Sep 4 20:35:53 2014 (r271130) +++ stable/10/sys/boot/libstand32/Makefile Thu Sep 4 20:44:41 2014 (r271131) @@ -186,11 +186,8 @@ SRCS+= nandfs.c .include .if ${MACHINE_CPUARCH} == "amd64" +CLEANFILES+= machine beforedepend ${OBJS}: machine -cleandepend: cleanmachine -cleanmachine: - rm -f machine - machine: - ln -s ${.CURDIR}/../../i386/include machine + ln -fs ${.CURDIR}/../../i386/include machine .endif From owner-svn-src-stable-10@FreeBSD.ORG Thu Sep 4 20:47:16 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D2557F55; Thu, 4 Sep 2014 20:47:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B1A761342; Thu, 4 Sep 2014 20:47:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84KlGPN042614; Thu, 4 Sep 2014 20:47:16 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84KlE1i042598; Thu, 4 Sep 2014 20:47:14 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409042047.s84KlE1i042598@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 4 Sep 2014 20:47:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271132 - in stable/10/sys: boot/i386/efi boot/i386/libi386 boot/ia64/common boot/powerpc/ofw boot/powerpc/ps3 boot/sparc64/loader boot/uboot/common boot/userboot/userboot i386/xen sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 20:47:16 -0000 Author: emaste Date: Thu Sep 4 20:47:14 2014 New Revision: 271132 URL: http://svnweb.freebsd.org/changeset/base/271132 Log: MFC r263005 by royger: howto_names: unify declaration Added: stable/10/sys/sys/boot.h - copied unchanged from r263005, head/sys/sys/boot.h Modified: stable/10/sys/boot/i386/efi/bootinfo.c stable/10/sys/boot/i386/libi386/bootinfo.c stable/10/sys/boot/ia64/common/bootinfo.c stable/10/sys/boot/powerpc/ofw/metadata.c stable/10/sys/boot/powerpc/ps3/metadata.c stable/10/sys/boot/sparc64/loader/metadata.c stable/10/sys/boot/uboot/common/metadata.c stable/10/sys/boot/userboot/userboot/bootinfo.c stable/10/sys/i386/xen/xen_machdep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/i386/efi/bootinfo.c ============================================================================== --- stable/10/sys/boot/i386/efi/bootinfo.c Thu Sep 4 20:44:41 2014 (r271131) +++ stable/10/sys/boot/i386/efi/bootinfo.c Thu Sep 4 20:47:14 2014 (r271132) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -41,29 +42,6 @@ __FBSDID("$FreeBSD$"); #include "libi386.h" #include -/* - * Return a 'boothowto' value corresponding to the kernel arguments in - * (kargs) and any relevant environment variables. - */ -static struct -{ - const char *ev; - int mask; -} howto_names[] = { - { "boot_askname", RB_ASKNAME}, - { "boot_cdrom", RB_CDROM}, - { "boot_ddb", RB_KDB}, - { "boot_dfltroot", RB_DFLTROOT}, - { "boot_gdb", RB_GDB}, - { "boot_multicons", RB_MULTIPLE}, - { "boot_mute", RB_MUTE}, - { "boot_pause", RB_PAUSE}, - { "boot_serial", RB_SERIAL}, - { "boot_single", RB_SINGLE}, - { "boot_verbose", RB_VERBOSE}, - { NULL, 0} -}; - static const char howto_switches[] = "aCdrgDmphsv"; static int howto_masks[] = { RB_ASKNAME, RB_CDROM, RB_KDB, RB_DFLTROOT, RB_GDB, RB_MULTIPLE, Modified: stable/10/sys/boot/i386/libi386/bootinfo.c ============================================================================== --- stable/10/sys/boot/i386/libi386/bootinfo.c Thu Sep 4 20:44:41 2014 (r271131) +++ stable/10/sys/boot/i386/libi386/bootinfo.c Thu Sep 4 20:47:14 2014 (r271132) @@ -31,33 +31,11 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "bootstrap.h" #include "libi386.h" #include "btxv86.h" -/* - * Return a 'boothowto' value corresponding to the kernel arguments in - * (kargs) and any relevant environment variables. - */ -static struct -{ - const char *ev; - int mask; -} howto_names[] = { - {"boot_askname", RB_ASKNAME}, - {"boot_cdrom", RB_CDROM}, - {"boot_ddb", RB_KDB}, - {"boot_dfltroot", RB_DFLTROOT}, - {"boot_gdb", RB_GDB}, - {"boot_multicons", RB_MULTIPLE}, - {"boot_mute", RB_MUTE}, - {"boot_pause", RB_PAUSE}, - {"boot_serial", RB_SERIAL}, - {"boot_single", RB_SINGLE}, - {"boot_verbose", RB_VERBOSE}, - {NULL, 0} -}; - int bi_getboothowto(char *kargs) { Modified: stable/10/sys/boot/ia64/common/bootinfo.c ============================================================================== --- stable/10/sys/boot/ia64/common/bootinfo.c Thu Sep 4 20:44:41 2014 (r271131) +++ stable/10/sys/boot/ia64/common/bootinfo.c Thu Sep 4 20:47:14 2014 (r271132) @@ -33,35 +33,13 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include "libia64.h" -/* - * Return a 'boothowto' value corresponding to the kernel arguments in - * (kargs) and any relevant environment variables. - */ -static struct -{ - const char *ev; - int mask; -} howto_names[] = { - { "boot_askname", RB_ASKNAME}, - { "boot_cdrom", RB_CDROM}, - { "boot_ddb", RB_KDB}, - { "boot_dfltroot", RB_DFLTROOT}, - { "boot_gdb", RB_GDB}, - { "boot_multicons", RB_MULTIPLE}, - { "boot_mute", RB_MUTE}, - { "boot_pause", RB_PAUSE}, - { "boot_serial", RB_SERIAL}, - { "boot_single", RB_SINGLE}, - { "boot_verbose", RB_VERBOSE}, - { NULL, 0} -}; - static const char howto_switches[] = "aCdrgDmphsv"; static int howto_masks[] = { RB_ASKNAME, RB_CDROM, RB_KDB, RB_DFLTROOT, RB_GDB, RB_MULTIPLE, Modified: stable/10/sys/boot/powerpc/ofw/metadata.c ============================================================================== --- stable/10/sys/boot/powerpc/ofw/metadata.c Thu Sep 4 20:44:41 2014 (r271131) +++ stable/10/sys/boot/powerpc/ofw/metadata.c Thu Sep 4 20:47:14 2014 (r271132) @@ -33,35 +33,13 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include "bootstrap.h" #include "libofw.h" -/* - * Return a 'boothowto' value corresponding to the kernel arguments in - * (kargs) and any relevant environment variables. - */ -static struct -{ - const char *ev; - int mask; -} howto_names[] = { - {"boot_askname", RB_ASKNAME}, - {"boot_cdrom", RB_CDROM}, - {"boot_ddb", RB_KDB}, - {"boot_dfltroot", RB_DFLTROOT}, - {"boot_gdb", RB_GDB}, - {"boot_multicons", RB_MULTIPLE}, - {"boot_mute", RB_MUTE}, - {"boot_pause", RB_PAUSE}, - {"boot_serial", RB_SERIAL}, - {"boot_single", RB_SINGLE}, - {"boot_verbose", RB_VERBOSE}, - {NULL, 0} -}; - int md_getboothowto(char *kargs) { Modified: stable/10/sys/boot/powerpc/ps3/metadata.c ============================================================================== --- stable/10/sys/boot/powerpc/ps3/metadata.c Thu Sep 4 20:44:41 2014 (r271131) +++ stable/10/sys/boot/powerpc/ps3/metadata.c Thu Sep 4 20:47:14 2014 (r271132) @@ -33,34 +33,12 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include "bootstrap.h" -/* - * Return a 'boothowto' value corresponding to the kernel arguments in - * (kargs) and any relevant environment variables. - */ -static struct -{ - const char *ev; - int mask; -} howto_names[] = { - {"boot_askname", RB_ASKNAME}, - {"boot_cdrom", RB_CDROM}, - {"boot_ddb", RB_KDB}, - {"boot_dfltroot", RB_DFLTROOT}, - {"boot_gdb", RB_GDB}, - {"boot_multicons", RB_MULTIPLE}, - {"boot_mute", RB_MUTE}, - {"boot_pause", RB_PAUSE}, - {"boot_serial", RB_SERIAL}, - {"boot_single", RB_SINGLE}, - {"boot_verbose", RB_VERBOSE}, - {NULL, 0} -}; - int md_getboothowto(char *kargs) { Modified: stable/10/sys/boot/sparc64/loader/metadata.c ============================================================================== --- stable/10/sys/boot/sparc64/loader/metadata.c Thu Sep 4 20:44:41 2014 (r271131) +++ stable/10/sys/boot/sparc64/loader/metadata.c Thu Sep 4 20:47:14 2014 (r271132) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include @@ -47,29 +48,6 @@ extern int itlb_slot; static int md_bootserial(void); -/* - * Return a 'boothowto' value corresponding to the kernel arguments in - * (kargs) and any relevant environment variables. - */ -static struct -{ - const char *ev; - int mask; -} howto_names[] = { - {"boot_askname", RB_ASKNAME}, - {"boot_cdrom", RB_CDROM}, - {"boot_ddb", RB_KDB}, - {"boot_dfltroot", RB_DFLTROOT}, - {"boot_gdb", RB_GDB}, - {"boot_multicons", RB_MULTIPLE}, - {"boot_mute", RB_MUTE}, - {"boot_pause", RB_PAUSE}, - {"boot_serial", RB_SERIAL}, - {"boot_single", RB_SINGLE}, - {"boot_verbose", RB_VERBOSE}, - {NULL, 0} -}; - int md_getboothowto(char *kargs) { Modified: stable/10/sys/boot/uboot/common/metadata.c ============================================================================== --- stable/10/sys/boot/uboot/common/metadata.c Thu Sep 4 20:44:41 2014 (r271131) +++ stable/10/sys/boot/uboot/common/metadata.c Thu Sep 4 20:47:14 2014 (r271132) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -45,29 +46,6 @@ __FBSDID("$FreeBSD$"); #include "libuboot.h" #endif -/* - * Return a 'boothowto' value corresponding to the kernel arguments in - * (kargs) and any relevant environment variables. - */ -static struct -{ - const char *ev; - int mask; -} howto_names[] = { - {"boot_askname", RB_ASKNAME}, - {"boot_cdrom", RB_CDROM}, - {"boot_ddb", RB_KDB}, - {"boot_dfltroot", RB_DFLTROOT}, - {"boot_gdb", RB_GDB}, - {"boot_multicons", RB_MULTIPLE}, - {"boot_mute", RB_MUTE}, - {"boot_pause", RB_PAUSE}, - {"boot_serial", RB_SERIAL}, - {"boot_single", RB_SINGLE}, - {"boot_verbose", RB_VERBOSE}, - {NULL, 0} -}; - static int md_getboothowto(char *kargs) { Modified: stable/10/sys/boot/userboot/userboot/bootinfo.c ============================================================================== --- stable/10/sys/boot/userboot/userboot/bootinfo.c Thu Sep 4 20:44:41 2014 (r271131) +++ stable/10/sys/boot/userboot/userboot/bootinfo.c Thu Sep 4 20:47:14 2014 (r271132) @@ -31,33 +31,11 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "bootstrap.h" #include "libuserboot.h" -/* - * Return a 'boothowto' value corresponding to the kernel arguments in - * (kargs) and any relevant environment variables. - */ -static struct -{ - const char *ev; - int mask; -} howto_names[] = { - {"boot_askname", RB_ASKNAME}, - {"boot_cdrom", RB_CDROM}, - {"boot_ddb", RB_KDB}, - {"boot_dfltroot", RB_DFLTROOT}, - {"boot_gdb", RB_GDB}, - {"boot_multicons", RB_MULTIPLE}, - {"boot_mute", RB_MUTE}, - {"boot_pause", RB_PAUSE}, - {"boot_serial", RB_SERIAL}, - {"boot_single", RB_SINGLE}, - {"boot_verbose", RB_VERBOSE}, - {NULL, 0} -}; - int bi_getboothowto(char *kargs) { Modified: stable/10/sys/i386/xen/xen_machdep.c ============================================================================== --- stable/10/sys/i386/xen/xen_machdep.c Thu Sep 4 20:44:41 2014 (r271131) +++ stable/10/sys/i386/xen/xen_machdep.c Thu Sep 4 20:47:14 2014 (r271132) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include @@ -155,24 +156,6 @@ xen_setbootenv(char *cmd_line) return cmd_line; } -static struct -{ - const char *ev; - int mask; -} howto_names[] = { - {"boot_askname", RB_ASKNAME}, - {"boot_single", RB_SINGLE}, - {"boot_nosync", RB_NOSYNC}, - {"boot_halt", RB_ASKNAME}, - {"boot_serial", RB_SERIAL}, - {"boot_cdrom", RB_CDROM}, - {"boot_gdb", RB_GDB}, - {"boot_gdb_pause", RB_RESERVED1}, - {"boot_verbose", RB_VERBOSE}, - {"boot_multicons", RB_MULTIPLE}, - {NULL, 0} -}; - int xen_boothowto(char *envp) { Copied: stable/10/sys/sys/boot.h (from r263005, head/sys/sys/boot.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/sys/boot.h Thu Sep 4 20:47:14 2014 (r271132, copy of r263005, head/sys/sys/boot.h) @@ -0,0 +1,55 @@ +/*- + * Copyright (c) 2014 Roger Pau MonnĂŠ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _SYS_BOOT_H_ +#define _SYS_BOOT_H_ + +/* + * Return a 'boothowto' value corresponding to the kernel arguments in + * (kargs) and any relevant environment variables. + */ +static struct +{ + const char *ev; + int mask; +} howto_names[] = { + { "boot_askname", RB_ASKNAME}, + { "boot_cdrom", RB_CDROM}, + { "boot_ddb", RB_KDB}, + { "boot_dfltroot", RB_DFLTROOT}, + { "boot_gdb", RB_GDB}, + { "boot_multicons", RB_MULTIPLE}, + { "boot_mute", RB_MUTE}, + { "boot_pause", RB_PAUSE}, + { "boot_serial", RB_SERIAL}, + { "boot_single", RB_SINGLE}, + { "boot_verbose", RB_VERBOSE}, + { NULL, 0} +}; + +#endif /* !_SYS_BOOT_H_ */ From owner-svn-src-stable-10@FreeBSD.ORG Thu Sep 4 20:49:12 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1E197262; Thu, 4 Sep 2014 20:49:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0893C1352; Thu, 4 Sep 2014 20:49:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84KnB4N043083; Thu, 4 Sep 2014 20:49:11 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84KnBBl043081; Thu, 4 Sep 2014 20:49:11 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409042049.s84KnBBl043081@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 4 Sep 2014 20:49:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271134 - stable/10/lib/libstand X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 20:49:12 -0000 Author: emaste Date: Thu Sep 4 20:49:11 2014 New Revision: 271134 URL: http://svnweb.freebsd.org/changeset/base/271134 Log: MFC r269077 (sbruno): libstand qdivrem warning fixes libstand's qdivrem.c assumes that sizeof(int) == sizeof(long), this is not true on amd64 I'm not quite positive this is the "correct" solution for this but it does seem to compile and shut up the spew of warnings when compiling libstand for userboot. Add two _Static_asserts() so that in the future somebody will get a compile failure if an architecture develops that violates the assumptions of this code. (strongly suggested by jmg) Change commetns to indicate int types instead of long. (noted by ian in phabric review) Phabric: https://phabric.freebsd.org/D443 Modified: stable/10/lib/libstand/qdivrem.c stable/10/lib/libstand/quad.h Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libstand/qdivrem.c ============================================================================== --- stable/10/lib/libstand/qdivrem.c Thu Sep 4 20:48:16 2014 (r271133) +++ stable/10/lib/libstand/qdivrem.c Thu Sep 4 20:49:11 2014 (r271134) @@ -46,14 +46,13 @@ __FBSDID("$FreeBSD$"); #define B (1 << HALF_BITS) /* digit base */ /* Combine two `digits' to make a single two-digit number. */ -#define COMBINE(a, b) (((u_long)(a) << HALF_BITS) | (b)) +#define COMBINE(a, b) (((u_int)(a) << HALF_BITS) | (b)) + +_Static_assert(sizeof(int) / 2 == sizeof(short), + "Bitwise functions in libstand are broken on this architecture\n"); /* select a type for digits in base B: use unsigned short if they fit */ -#if ULONG_MAX == 0xffffffff && USHRT_MAX >= 0xffff typedef unsigned short digit; -#else -typedef u_long digit; -#endif /* * Shift p[0]..p[len] left `sh' bits, ignoring any bits that @@ -74,7 +73,7 @@ shl(digit *p, int len, int sh) * __qdivrem(u, v, rem) returns u/v and, optionally, sets *rem to u%v. * * We do this in base 2-sup-HALF_BITS, so that all intermediate products - * fit within u_long. As a consequence, the maximum length dividend and + * fit within u_int. As a consequence, the maximum length dividend and * divisor are 4 `digits' in this base (they are shorter if they have * leading zeros). */ @@ -85,7 +84,7 @@ __qdivrem(uq, vq, arq) union uu tmp; digit *u, *v, *q; digit v1, v2; - u_long qhat, rhat, t; + u_int qhat, rhat, t; int m, n, d, j, i; digit uspace[5], vspace[5], qspace[5]; @@ -136,7 +135,7 @@ __qdivrem(uq, vq, arq) v[4] = LHALF(tmp.ul[L]); for (n = 4; v[1] == 0; v++) { if (--n == 1) { - u_long rbj; /* r*B+u[j] (not root boy jim) */ + u_int rbj; /* r*B+u[j] (not root boy jim) */ digit q1, q2, q3, q4; /* @@ -212,7 +211,7 @@ __qdivrem(uq, vq, arq) rhat = uj1; goto qhat_too_big; } else { - u_long nn = COMBINE(uj0, uj1); + u_int nn = COMBINE(uj0, uj1); qhat = nn / v1; rhat = nn % v1; } Modified: stable/10/lib/libstand/quad.h ============================================================================== --- stable/10/lib/libstand/quad.h Thu Sep 4 20:48:16 2014 (r271133) +++ stable/10/lib/libstand/quad.h Thu Sep 4 20:49:11 2014 (r271134) @@ -54,6 +54,9 @@ #include #include +_Static_assert(sizeof(quad_t) == sizeof(int) * 2, + "Bitwise function in libstand are broken on this architecture\n"); + /* * Depending on the desired operation, we view a `long long' (aka quad_t) in * one or more of the following formats. @@ -61,8 +64,8 @@ union uu { quad_t q; /* as a (signed) quad */ quad_t uq; /* as an unsigned quad */ - long sl[2]; /* as two signed longs */ - u_long ul[2]; /* as two unsigned longs */ + int sl[2]; /* as two signed ints */ + u_int ul[2]; /* as two unsigned ints */ }; /* @@ -77,8 +80,7 @@ union uu { * and assembly. */ #define QUAD_BITS (sizeof(quad_t) * CHAR_BIT) -#define LONG_BITS (sizeof(long) * CHAR_BIT) -#define HALF_BITS (sizeof(long) * CHAR_BIT / 2) +#define HALF_BITS (sizeof(int) * CHAR_BIT / 2) /* * Extract high and low shortwords from longword, and move low shortword of From owner-svn-src-stable-10@FreeBSD.ORG Thu Sep 4 21:01:16 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4B8F061A; Thu, 4 Sep 2014 21:01:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 32C8E14AC; Thu, 4 Sep 2014 21:01:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84L1GXV051684; Thu, 4 Sep 2014 21:01:16 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84L1BXg051652; Thu, 4 Sep 2014 21:01:11 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409042101.s84L1BXg051652@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 4 Sep 2014 21:01:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271135 - in stable/10: lib/libstand sys/boot sys/boot/amd64 sys/boot/amd64/efi sys/boot/efi sys/boot/efi/include sys/boot/efi/include/amd64 sys/boot/efi/libefi sys/boot/ficl sys/boot/f... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 21:01:16 -0000 Author: emaste Date: Thu Sep 4 21:01:10 2014 New Revision: 271135 URL: http://svnweb.freebsd.org/changeset/base/271135 Log: MFC UEFI loader This MFC consists of the following SVN revisions: 258741 261568 261603 261668 263115 263117 263968 264078 264087 264088 264092 264095 264115 264132 264208 264261 264262 264263 264319 265028 265057 268974 Detailed commit messages: r258741: Note that libstand is 32-bit on amd64 and powerpc64 r261568: Build libstand as a 64-bit library on amd64 The 32-bit bootloaders now link against libstand.a in sys/boot/libstand32, so there is no need to force /usr/lib/libstand.a to be 32-bit. r261603: Don't force efi to a 32-bit build on amd64 r261668: Build libstand as a 64-bit library on ppc64 The 32-bit bootloaders now link against libstand.a in sys/boot/libstand32, so there is no need to force /usr/lib/libstand.a to be 32-bit. This is equivalent to r261568 for amd64. r263115: Add amd64 EFI headers r263117: Connect 64-bit boot ficl to the build It is not yet used, but this will ensure it doesn't get broken. r263968: Use EFI types for EFI values (silences warnings). EFI UINTN is actually a 64-bit type on 64-bit processors. r264078: Put each source file on a separate line This will simplify rebasing the amd64 UEFI patch set. r264087: Build boot/ficl as 64-bit library on amd64 The 32-bit bootloaders on amd64 now use the 32-bit version in ficl32, as is done with libstand32. The native 64-bit ficl will be used by the upcoming UEFI loader. r264088: Merge efilib changes from projects/uefi r247216: Add the ability for a device to have an "alias" handle. r247379: Fix network device registration. r247380: Adjust our load device when we boot from CD under UEFI. The process for booting from a CD under UEFI involves adding a FAT filesystem containing your loader code as an El Torito boot image. When UEFI detects this, it provides a block IO instance that points at the FAT filesystem as a child of the device that represents the CD itself. The problem being that the CD device is flagged as a "raw device" while the boot image is flagged as a "logical partition". The existing EFI partition code only looks for logical partitions and so the CD filesystem was rendered invisible. To fix this, check the type of each block IO device. If it's found to be a CD, and thus an El Torito boot image, look up its parent device and add that instead so that the loader will then load the kernel from the CD filesystem. This is done by using the handle for the boot filesystem as an alias. Something similar to this will be required for booting from other media as well as the loader will live in the EFI system partition, not on the partition containing the kernel. r247381: Remove a scatalogical debug printf that crept in. r264092: Add -fPIC for amd64 r264095: Support UEFI booting on amd64 via loader.efi This is largely the work from the projects/uefi branch, with some additional refinements. This is derived from (and replaces) the original i386 efi implementation; i386 support will be restored later. Specific revisions of note from projects/uefi: r247380: Adjust our load device when we boot from CD under UEFI. The process for booting from a CD under UEFI involves adding a FAT filesystem containing your loader code as an El Torito boot image. When UEFI detects this, it provides a block IO instance that points at the FAT filesystem as a child of the device that represents the CD itself. The problem being that the CD device is flagged as a "raw device" while the boot image is flagged as a "logical partition". The existing EFI partition code only looks for logical partitions and so the CD filesystem was rendered invisible. To fix this, check the type of each block IO device. If it's found to be a CD, and thus an El Torito boot image, look up its parent device and add that instead so that the loader will then load the kernel from the CD filesystem. This is done by using the handle for the boot filesystem as an alias. Something similar to this will be required for booting from other media as well as the loader will live in the EFI system partition, not on the partition containing the kernel. r246231: Add necessary code to hand off from loader to an amd64 kernel. r246335: Grab the EFI memory map and store it as module metadata on the kernel. This is the same approach used to provide the BIOS SMAP to the kernel. r246336: Pass the ACPI table metadata via hints so the kernel ACPI code can find them. r246608: Rework copy routines to ensure we always use memory allocated via EFI. The previous code assumed it could copy wherever it liked. This is not the case. The approach taken by this code is pretty ham-fisted in that it simply allocates a large (32MB) buffer area and stages into that, then copies the whole area into place when it's time to execute. A more elegant solution could be used but this works for now. r247214: Fix a number of problems preventing proper handover to the kernel. There were two issues at play here. Firstly, there was nothing preventing UEFI from placing the loader code above 1GB in RAM. This meant that when we switched in the page tables the kernel expects to be running on, we are suddenly unmapped and things no longer work. We solve this by making our trampoline code not dependent on being at any given position and simply copying it to a "safe" location before calling it. Secondly, UEFI could allocate our stack wherever it wants. As it happened on my PC, that was right where I was copying the kernel to. This did not cause happiness. The solution to this was to also switch to a temporary stack in a safe location before performing the final copy of the loaded kernel. r246231: Add necessary code to hand off from loader to an amd64 kernel. r246335: Grab the EFI memory map and store it as module metadata on the kernel. This is the same approach used to provide the BIOS SMAP to the kernel. r246336: Pass the ACPI table metadata via hints so the kernel ACPI code can find them. r246608: Rework copy routines to ensure we always use memory allocated via EFI. The previous code assumed it could copy wherever it liked. This is not the case. The approach taken by this code is pretty ham-fisted in that it simply allocates a large (32MB) buffer area and stages into that, then copies the whole area into place when it's time to execute. A more elegant solution could be used but this works for now. r247214: Fix a number of problems preventing proper handover to the kernel. There were two issues at play here. Firstly, there was nothing preventing UEFI from placing the loader code above 1GB in RAM. This meant that when we switched in the page tables the kernel expects to be running on, we are suddenly unmapped and things no longer work. We solve this by making our trampoline code not dependent on being at any given position and simply copying it to a "safe" location before calling it. Secondly, UEFI could allocate our stack wherever it wants. As it happened on my PC, that was right where I was copying the kernel to. This did not cause happiness. The solution to this was to also switch to a temporary stack in a safe location before performing the final copy of the loaded kernel. r247216: Use the UEFI Graphics Output Protocol to get the parameters of the framebuffer. r264115: Fix printf format mismatches r264132: Connect sys/boot/amd64 to the build r264208: Do not build the amd64 UEFI loader with GCC The UEFI loader causes buildworld to fail when building with (in-tree) GCC, due to a typedef redefinition. As it happens the in-tree GCC cannot successfully build the UEFI loader anyhow, as it does not support __attribute__((ms_abi)). Thus, just avoid trying to build it with GCC, rather than disconnecting it from the build until the underlying issue is fixed. r264261: Correct a variable's type for 64-bit Ficl FICL_INT is long. r264262: Fix printf args for 64-bit archs r264263: Add explicit casts to quiet warnings in libefi r264319: Fix EFI loader object tree creation on 9.x build hosts Previously ${COMPILER_TYPE} was checked in sys/boot/amd64, and the efi subdirectory was skipped altogether for gcc (since GCC does not support a required attribute). However, during the early buildworld stages ${COMPILER_TYPE} is the existing system compiler (i.e., gcc on 9.x build hosts), not the compiler that will eventually be used. This caused "make obj" to skip the efi subdirectory. In later build stages ${COMPILER_TYPE} is "clang", and then the efi loader would attempt to build in the source directory. r265028 (dteske): Disable the beastie menu for EFI console ... which doesn't support ANSI codes (so things like `at-xy', `clear', and other commands don't work making it impossible to generate a living menu). r265057 (nwhitehorn): Turn off various fancy instruction sets... as well as deduplicate some options. This makes the EFI loader build work with CPUTYPE=native in make.conf on my Core i5. r268974 (sbruno): Supress clang warning for FreeBSD printf %b and %D formats Relnotes: Yes Sponsored by: The FreeBSD Foundation Added: stable/10/sys/boot/amd64/ - copied from r264095, head/sys/boot/amd64/ stable/10/sys/boot/efi/include/amd64/ - copied from r263115, head/sys/boot/efi/include/amd64/ stable/10/sys/boot/efi/include/efigop.h - copied unchanged from r264095, head/sys/boot/efi/include/efigop.h stable/10/sys/boot/ficl32/ - copied from r264087, head/sys/boot/ficl32/ Deleted: stable/10/sys/boot/ficl64/ stable/10/sys/boot/i386/efi/Makefile stable/10/sys/boot/i386/efi/autoload.c stable/10/sys/boot/i386/efi/conf.c stable/10/sys/boot/i386/efi/devicename.c stable/10/sys/boot/i386/efi/ldscript.amd64 stable/10/sys/boot/i386/efi/main.c stable/10/sys/boot/i386/efi/version Modified: stable/10/lib/libstand/Makefile stable/10/sys/boot/Makefile stable/10/sys/boot/Makefile.amd64 stable/10/sys/boot/amd64/Makefile.inc stable/10/sys/boot/amd64/efi/Makefile stable/10/sys/boot/amd64/efi/copy.c stable/10/sys/boot/amd64/efi/elf64_freebsd.c stable/10/sys/boot/amd64/efi/main.c stable/10/sys/boot/efi/Makefile.inc stable/10/sys/boot/efi/include/efi.h stable/10/sys/boot/efi/include/efilib.h stable/10/sys/boot/efi/libefi/Makefile stable/10/sys/boot/efi/libefi/efinet.c stable/10/sys/boot/efi/libefi/efipart.c stable/10/sys/boot/efi/libefi/handles.c stable/10/sys/boot/ficl/Makefile stable/10/sys/boot/ficl/tools.c stable/10/sys/boot/ficl/words.c stable/10/sys/boot/forth/beastie.4th stable/10/sys/boot/forth/beastie.4th.8 stable/10/sys/boot/forth/loader.conf.5 stable/10/sys/boot/i386/libi386/Makefile stable/10/sys/boot/i386/loader/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libstand/Makefile ============================================================================== --- stable/10/lib/libstand/Makefile Thu Sep 4 20:49:11 2014 (r271134) +++ stable/10/lib/libstand/Makefile Thu Sep 4 21:01:10 2014 (r271135) @@ -21,18 +21,20 @@ CFLAGS+= -ffreestanding -Wformat CFLAGS+= -I${.CURDIR} .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" -CFLAGS.gcc+= -mpreferred-stack-boundary=2 CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float .endif +.if ${MACHINE_CPUARCH} == "i386" +CFLAGS.gcc+= -mpreferred-stack-boundary=2 +.endif +.if ${MACHINE_CPUARCH} == "amd64" +CFLAGS+= -fPIC +.endif .if ${MACHINE} == "pc98" CFLAGS+= -Os .endif .if ${MACHINE_CPUARCH} == "powerpc" CFLAGS+= -msoft-float -D_STANDALONE -DNETIF_DEBUG .endif -.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "powerpc64" -CFLAGS+= -m32 -I. -.endif .if ${MACHINE_CPUARCH} == "arm" CFLAGS+= -msoft-float -D_STANDALONE .endif @@ -103,9 +105,7 @@ SRCS+= syncicache.c SRCS+= uuid_equal.c uuid_is_nil.c # _setjmp/_longjmp -.if ${MACHINE_CPUARCH} == "amd64" -.PATH: ${.CURDIR}/i386 -.elif ${MACHINE_ARCH} == "powerpc64" +.if ${MACHINE_ARCH} == "powerpc64" .PATH: ${.CURDIR}/powerpc .else .PATH: ${.CURDIR}/${MACHINE_CPUARCH} @@ -179,12 +179,3 @@ SRCS+= nandfs.c .include -.if ${MACHINE_CPUARCH} == "amd64" -beforedepend ${OBJS}: machine -cleandepend: cleanmachine -cleanmachine: - rm -f machine - -machine: - ln -s ${.CURDIR}/../../sys/i386/include machine -.endif Modified: stable/10/sys/boot/Makefile ============================================================================== --- stable/10/sys/boot/Makefile Thu Sep 4 20:49:11 2014 (r271134) +++ stable/10/sys/boot/Makefile Thu Sep 4 21:01:10 2014 (r271135) @@ -9,9 +9,12 @@ SUBDIR+= ficl .endif # Pick the machine-dependent subdir based on the target architecture. -ADIR= ${MACHINE:S/amd64/i386/:S/powerpc64/powerpc/} +ADIR= ${MACHINE:S/powerpc64/powerpc/} .if exists(${.CURDIR}/${ADIR}/.) SUBDIR+= ${ADIR} .endif +.if ${MACHINE} == "amd64" +SUBDIR+= i386 +.endif .include Modified: stable/10/sys/boot/Makefile.amd64 ============================================================================== --- stable/10/sys/boot/Makefile.amd64 Thu Sep 4 20:49:11 2014 (r271134) +++ stable/10/sys/boot/Makefile.amd64 Thu Sep 4 21:01:10 2014 (r271135) @@ -4,3 +4,7 @@ SUBDIR+= efi SUBDIR+= libstand32 SUBDIR+= zfs SUBDIR+= userboot + +.if ${MK_FORTH} != "no" +SUBDIR+= ficl32 +.endif Modified: stable/10/sys/boot/amd64/Makefile.inc ============================================================================== --- head/sys/boot/amd64/Makefile.inc Fri Apr 4 00:16:46 2014 (r264095) +++ stable/10/sys/boot/amd64/Makefile.inc Thu Sep 4 21:01:10 2014 (r271135) @@ -4,8 +4,9 @@ BINDIR?= /boot +# See conf/kern.mk for the correct set of these CFLAGS+= -ffreestanding -CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float +CFLAGS+= -mno-mmx -mno-sse -mno-aes -mno-avx -msoft-float LDFLAGS+= -nostdlib .include "../Makefile.inc" Modified: stable/10/sys/boot/amd64/efi/Makefile ============================================================================== --- head/sys/boot/amd64/efi/Makefile Fri Apr 4 00:16:46 2014 (r264095) +++ stable/10/sys/boot/amd64/efi/Makefile Thu Sep 4 21:01:10 2014 (r271135) @@ -3,6 +3,10 @@ NO_MAN= .include + +# In-tree GCC does not support __attribute__((ms_abi)). +.if ${COMPILER_TYPE} != "gcc" + MK_SSP= no PROG= loader.sym @@ -85,6 +89,8 @@ CFLAGS+= -I${.CURDIR}/../../common DPADD= ${LIBFICL} ${LIBEFI} ${LIBSTAND} LDADD= ${LIBFICL} ${LIBEFI} ${LIBSTAND} +.endif # ${COMPILER_TYPE} != "gcc" + .include beforedepend ${OBJS}: machine x86 Modified: stable/10/sys/boot/amd64/efi/copy.c ============================================================================== --- head/sys/boot/amd64/efi/copy.c Fri Apr 4 00:16:46 2014 (r264095) +++ stable/10/sys/boot/amd64/efi/copy.c Thu Sep 4 21:01:10 2014 (r271135) @@ -51,8 +51,8 @@ x86_efi_copy_init(void) status = BS->AllocatePages(AllocateAnyPages, EfiLoaderData, STAGE_PAGES, &staging); if (EFI_ERROR(status)) { - printf("failed to allocate staging area: %d\n", - status & EFI_ERROR_MASK); + printf("failed to allocate staging area: %lu\n", + (unsigned long)(status & EFI_ERROR_MASK)); return (status); } Modified: stable/10/sys/boot/amd64/efi/elf64_freebsd.c ============================================================================== --- head/sys/boot/amd64/efi/elf64_freebsd.c Fri Apr 4 00:16:46 2014 (r264095) +++ stable/10/sys/boot/amd64/efi/elf64_freebsd.c Thu Sep 4 21:01:10 2014 (r271135) @@ -101,7 +101,7 @@ elf64_exec(struct preloaded_file *fp) rsdp = efi_get_table(&acpi_guid); } if (rsdp != NULL) { - sprintf(buf, "0x%016llx", rsdp); + sprintf(buf, "0x%016llx", (unsigned long long)rsdp); setenv("hint.acpi.0.rsdp", buf, 1); revision = rsdp->Revision; if (revision == 0) @@ -115,7 +115,8 @@ elf64_exec(struct preloaded_file *fp) setenv("hint.acpi.0.rsdt", buf, 1); if (revision >= 2) { /* XXX extended checksum? */ - sprintf(buf, "0x%016llx", rsdp->XsdtPhysicalAddress); + sprintf(buf, "0x%016llx", + (unsigned long long)rsdp->XsdtPhysicalAddress); setenv("hint.acpi.0.xsdt", buf, 1); sprintf(buf, "%d", rsdp->Length); setenv("hint.acpi.0.xsdt_length", buf, 1); Modified: stable/10/sys/boot/amd64/efi/main.c ============================================================================== --- head/sys/boot/amd64/efi/main.c Fri Apr 4 00:16:46 2014 (r264095) +++ stable/10/sys/boot/amd64/efi/main.c Thu Sep 4 21:01:10 2014 (r271135) @@ -304,7 +304,7 @@ command_mode(int argc, char *argv[]) printf("couldn't set mode %d\n", mode); return (CMD_ERROR); } - sprintf(rowenv, "%d", rows); + sprintf(rowenv, "%u", (unsigned)rows); setenv("LINES", rowenv, 1); return (CMD_OK); @@ -314,7 +314,8 @@ command_mode(int argc, char *argv[]) status = conout->QueryMode(conout, i, &cols, &rows); if (EFI_ERROR(status)) break; - printf("Mode %d: %d columns, %d rows\n", i, cols, rows); + printf("Mode %d: %u columns, %u rows\n", i, (unsigned)cols, + (unsigned)rows); } if (i != 0) Modified: stable/10/sys/boot/efi/Makefile.inc ============================================================================== --- stable/10/sys/boot/efi/Makefile.inc Thu Sep 4 20:49:11 2014 (r271134) +++ stable/10/sys/boot/efi/Makefile.inc Thu Sep 4 21:01:10 2014 (r271135) @@ -2,17 +2,10 @@ BINDIR?= /boot -.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "i386" CFLAGS+= -march=i386 .endif -.if ${MACHINE_CPUARCH} == "amd64" -CFLAGS+= -m32 -ACFLAGS+= -m32 -LDFLAGS+= -m elf_i386_fbsd -AFLAGS+= --32 -.endif - # Options used when building app-specific efi components CFLAGS+= -ffreestanding -fshort-wchar -Wformat LDFLAGS+= -nostdlib Modified: stable/10/sys/boot/efi/include/efi.h ============================================================================== --- stable/10/sys/boot/efi/include/efi.h Thu Sep 4 20:49:11 2014 (r271134) +++ stable/10/sys/boot/efi/include/efi.h Thu Sep 4 21:01:10 2014 (r271135) @@ -52,6 +52,7 @@ Revision History #include "efiapi.h" #include "efifs.h" #include "efierr.h" +#include "efigop.h" #define EFI_STRINGIZE(a) #a #define EFI_PROTOCOL_DEFINITION(a) EFI_STRINGIZE(Protocol/a/a.h) Copied: stable/10/sys/boot/efi/include/efigop.h (from r264095, head/sys/boot/efi/include/efigop.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/boot/efi/include/efigop.h Thu Sep 4 21:01:10 2014 (r271135, copy of r264095, head/sys/boot/efi/include/efigop.h) @@ -0,0 +1,122 @@ +/* $FreeBSD$ */ +/*++ + +Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved +This software and associated documentation (if any) is furnished +under a license and may only be used or copied in accordance +with the terms of the license. Except as permitted by such +license, no part of this software or documentation may be +reproduced, stored in a retrieval system, or transmitted in any +form or by any means without the express written consent of +Intel Corporation. + +Module Name: + + efigop.h + +Abstract: + Info about framebuffers + + + + +Revision History + +--*/ + +#ifndef _EFIGOP_H +#define _EFIGOP_H + +#define EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID \ + { 0x9042a9de, 0x23dc, 0x4a38, 0x96, 0xfb, 0x7a, 0xde, 0xd0, 0x80, \ + 0x51, 0x6a } + +INTERFACE_DECL(_EFI_GRAPHICS_OUTPUT); + +typedef struct { + UINT32 RedMask; + UINT32 GreenMask; + UINT32 BlueMask; + UINT32 ReservedMask; +} EFI_PIXEL_BITMASK; + +typedef enum { + PixelRedGreenBlueReserved8BitPerColor, + PixelBlueGreenRedReserved8BitPerColor, + PixelBitMask, + PixelBltOnly, + PixelFormatMax, +} EFI_GRAPHICS_PIXEL_FORMAT; + +typedef struct { + UINT32 Version; + UINT32 HorizontalResolution; + UINT32 VerticalResolution; + EFI_GRAPHICS_PIXEL_FORMAT PixelFormat; + EFI_PIXEL_BITMASK PixelInformation; + UINT32 PixelsPerScanLine; +} EFI_GRAPHICS_OUTPUT_MODE_INFORMATION; + +typedef struct { + UINT32 MaxMode; + UINT32 Mode; + EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info; + UINTN SizeOfInfo; + EFI_PHYSICAL_ADDRESS FrameBufferBase; + UINTN FrameBufferSize; +} EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE; + +typedef +EFI_STATUS +(EFIAPI *EFI_GRAPHICS_OUTPUT_PROTOCOL_QUERY_MODE) ( + IN struct _EFI_GRAPHICS_OUTPUT *This, + IN UINT32 ModeNumber, + OUT UINTN *SizeOfInfo, + OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION **Info + ); + +typedef +EFI_STATUS +(EFIAPI *EFI_GRAPHICS_OUTPUT_PROTOCOL_SET_MODE) ( + IN struct _EFI_GRAPHICS_OUTPUT *This, + IN UINT32 ModeNumber + ); + +typedef struct { + UINT8 Blue; + UINT8 Green; + UINT8 Red; + UINT8 Reserved; +} EFI_GRAPHICS_OUTPUT_BLT_PIXEL; + +typedef enum { + EfiBltVideoFill, + EfiBltVideoToBltBuffer, + EfiBltBufferToVideo, + EfiBltVideoToVideo, + EfiGraphcisOutputBltOperationMax, +} EFI_GRAPHICS_OUTPUT_BLT_OPERATION; + +typedef +EFI_STATUS +(EFIAPI *EFI_GRAPHICS_OUTPUT_PROTOCOL_BLT) ( + IN struct _EFI_GRAPHICS_OUTPUT *This, + IN OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer, + IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation, + IN UINTN SourceX, + IN UINTN SourceY, + IN UINTN DestinationX, + IN UINTN DestinationY, + IN UINTN Width, + IN UINTN Height, + IN UINTN Delta + ); + +typedef struct _EFI_GRAPHICS_OUTPUT { + EFI_GRAPHICS_OUTPUT_PROTOCOL_QUERY_MODE QueryMode; + EFI_GRAPHICS_OUTPUT_PROTOCOL_SET_MODE SetMode; + EFI_GRAPHICS_OUTPUT_PROTOCOL_BLT Blt; + EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE *Mode; +} EFI_GRAPHICS_OUTPUT; + +#endif /* _EFIGOP_H */ Modified: stable/10/sys/boot/efi/include/efilib.h ============================================================================== --- stable/10/sys/boot/efi/include/efilib.h Thu Sep 4 20:49:11 2014 (r271134) +++ stable/10/sys/boot/efi/include/efilib.h Thu Sep 4 21:01:10 2014 (r271135) @@ -41,7 +41,7 @@ extern struct netif_driver efinetif; void *efi_get_table(EFI_GUID *tbl); void efi_main(EFI_HANDLE image_handle, EFI_SYSTEM_TABLE *system_table); -int efi_register_handles(struct devsw *, EFI_HANDLE *, int); +int efi_register_handles(struct devsw *, EFI_HANDLE *, EFI_HANDLE *, int); EFI_HANDLE efi_find_handle(struct devsw *, int); int efi_handle_lookup(EFI_HANDLE, struct devsw **, int *); Modified: stable/10/sys/boot/efi/libefi/Makefile ============================================================================== --- stable/10/sys/boot/efi/libefi/Makefile Thu Sep 4 20:49:11 2014 (r271134) +++ stable/10/sys/boot/efi/libefi/Makefile Thu Sep 4 21:01:10 2014 (r271135) @@ -6,11 +6,18 @@ INTERNALLIB= SRCS= delay.c efi_console.c efinet.c efipart.c errno.c handles.c \ libefi.c time.c +.if ${MACHINE_ARCH} == "amd64" +CFLAGS+= -fPIC +.endif CFLAGS+= -I${.CURDIR}/../include -CFLAGS+= -I${.CURDIR}/../include/${MACHINE_CPUARCH:S/amd64/i386/} +CFLAGS+= -I${.CURDIR}/../include/${MACHINE_CPUARCH} CFLAGS+= -I${.CURDIR}/../../../../lib/libstand # Pick up the bootstrap header for some interface items CFLAGS+= -I${.CURDIR}/../../common + +# Suppress warning from clang for FreeBSD %b and %D formats +CFLAGS+= -fformat-extensions + .include Modified: stable/10/sys/boot/efi/libefi/efinet.c ============================================================================== --- stable/10/sys/boot/efi/libefi/efinet.c Thu Sep 4 20:49:11 2014 (r271134) +++ stable/10/sys/boot/efi/libefi/efinet.c Thu Sep 4 21:01:10 2014 (r271135) @@ -274,7 +274,7 @@ efinet_dev_init() if (EFI_ERROR(status)) return (efi_status_to_errno(status)); nifs = sz / sizeof(EFI_HANDLE); - err = efi_register_handles(&efinet_dev, handles, nifs); + err = efi_register_handles(&efinet_dev, handles, NULL, nifs); free(handles); if (err != 0) return (err); Modified: stable/10/sys/boot/efi/libefi/efipart.c ============================================================================== --- stable/10/sys/boot/efi/libefi/efipart.c Thu Sep 4 20:49:11 2014 (r271134) +++ stable/10/sys/boot/efi/libefi/efipart.c Thu Sep 4 21:01:10 2014 (r271135) @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include static EFI_GUID blkio_guid = BLOCK_IO_PROTOCOL; +static EFI_GUID devpath_guid = DEVICE_PATH_PROTOCOL; static int efipart_init(void); static int efipart_strategy(void *, int, daddr_t, size_t, char *, size_t *); @@ -62,9 +63,11 @@ static int efipart_init(void) { EFI_BLOCK_IO *blkio; - EFI_HANDLE *hin, *hout; + EFI_DEVICE_PATH *devpath, *node; + EFI_HANDLE *hin, *hout, *aliases, handle; EFI_STATUS status; UINTN sz; + CHAR16 *path; u_int n, nin, nout; int err; @@ -72,7 +75,7 @@ efipart_init(void) hin = NULL; status = BS->LocateHandle(ByProtocol, &blkio_guid, 0, &sz, 0); if (status == EFI_BUFFER_TOO_SMALL) { - hin = (EFI_HANDLE *)malloc(sz * 2); + hin = (EFI_HANDLE *)malloc(sz * 3); status = BS->LocateHandle(ByProtocol, &blkio_guid, 0, &sz, hin); if (EFI_ERROR(status)) @@ -84,19 +87,50 @@ efipart_init(void) /* Filter handles to only include FreeBSD partitions. */ nin = sz / sizeof(EFI_HANDLE); hout = hin + nin; + aliases = hout + nin; nout = 0; + bzero(aliases, nin * sizeof(EFI_HANDLE)); + for (n = 0; n < nin; n++) { - status = BS->HandleProtocol(hin[n], &blkio_guid, &blkio); + status = BS->HandleProtocol(hin[n], &devpath_guid, + (void **)&devpath); + if (EFI_ERROR(status)) { + continue; + } + node = devpath; + while (!IsDevicePathEnd(NextDevicePathNode(node))) + node = NextDevicePathNode(node); + status = BS->HandleProtocol(hin[n], &blkio_guid, + (void**)&blkio); if (EFI_ERROR(status)) continue; if (!blkio->Media->LogicalPartition) continue; - hout[nout] = hin[n]; + + /* + * If we come across a logical partition of subtype CDROM + * it doesn't refer to the CD filesystem itself, but rather + * to any usable El Torito boot image on it. In this case + * we try to find the parent device and add that instead as + * that will be the CD filesystem. + */ + if (DevicePathType(node) == MEDIA_DEVICE_PATH && + DevicePathSubType(node) == MEDIA_CDROM_DP) { + node->Type = END_DEVICE_PATH_TYPE; + node->SubType = END_ENTIRE_DEVICE_PATH_SUBTYPE; + status = BS->LocateDevicePath(&blkio_guid, &devpath, + &handle); + if (EFI_ERROR(status)) + continue; + hout[nout] = handle; + aliases[nout] = hin[n]; + } else + hout[nout] = hin[n]; nout++; } - err = efi_register_handles(&efipart_dev, hout, nout); + err = efi_register_handles(&efipart_dev, hout, aliases, nout); free(hin); return (err); } @@ -115,7 +149,7 @@ efipart_print(int verbose) sprintf(line, " %s%d:", efipart_dev.dv_name, unit); pager_output(line); - status = BS->HandleProtocol(h, &blkio_guid, &blkio); + status = BS->HandleProtocol(h, &blkio_guid, (void **)&blkio); if (!EFI_ERROR(status)) { sprintf(line, " %llu blocks", (unsigned long long)(blkio->Media->LastBlock + 1)); @@ -144,7 +178,7 @@ efipart_open(struct open_file *f, ...) if (h == NULL) return (EINVAL); - status = BS->HandleProtocol(h, &blkio_guid, &blkio); + status = BS->HandleProtocol(h, &blkio_guid, (void **)&blkio); if (EFI_ERROR(status)) return (efi_status_to_errno(status)); Modified: stable/10/sys/boot/efi/libefi/handles.c ============================================================================== --- stable/10/sys/boot/efi/libefi/handles.c Thu Sep 4 20:49:11 2014 (r271134) +++ stable/10/sys/boot/efi/libefi/handles.c Thu Sep 4 21:01:10 2014 (r271135) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); struct entry { EFI_HANDLE handle; + EFI_HANDLE alias; struct devsw *dev; int unit; }; @@ -40,7 +41,8 @@ struct entry *entry; int nentries; int -efi_register_handles(struct devsw *sw, EFI_HANDLE *handles, int count) +efi_register_handles(struct devsw *sw, EFI_HANDLE *handles, + EFI_HANDLE *aliases, int count) { size_t sz; int idx, unit; @@ -51,6 +53,10 @@ efi_register_handles(struct devsw *sw, E entry = (entry == NULL) ? malloc(sz) : realloc(entry, sz); for (unit = 0; idx < nentries; idx++, unit++) { entry[idx].handle = handles[unit]; + if (aliases != NULL) + entry[idx].alias = aliases[unit]; + else + entry[idx].alias = NULL; entry[idx].dev = sw; entry[idx].unit = unit; } @@ -78,7 +84,7 @@ efi_handle_lookup(EFI_HANDLE h, struct d int idx; for (idx = 0; idx < nentries; idx++) { - if (entry[idx].handle != h) + if (entry[idx].handle != h && entry[idx].alias != h) continue; if (dev != NULL) *dev = entry[idx].dev; Modified: stable/10/sys/boot/ficl/Makefile ============================================================================== --- stable/10/sys/boot/ficl/Makefile Thu Sep 4 20:49:11 2014 (r271134) +++ stable/10/sys/boot/ficl/Makefile Thu Sep 4 21:01:10 2014 (r271135) @@ -3,7 +3,7 @@ FICLDIR?= ${.CURDIR} -.if !defined(FICL64) +.if defined(FICL32) .PATH: ${FICLDIR}/${MACHINE_CPUARCH:S/amd64/i386/} .else .PATH: ${FICLDIR}/${MACHINE_CPUARCH} @@ -14,11 +14,12 @@ BASE_SRCS= dict.c ficl.c fileaccess.c fl SRCS= ${BASE_SRCS} sysdep.c softcore.c CLEANFILES= softcore.c testmain testmain.o CFLAGS+= -ffreestanding -.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" -.if !defined(FICL64) +.if ${MACHINE_CPUARCH} == "i386" || \ + (${MACHINE_CPUARCH} == "amd64" && defined(FICL32)) CFLAGS+= -march=i386 CFLAGS.gcc+= -mpreferred-stack-boundary=2 .endif +.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float .endif .if ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_CPUARCH} == "arm" @@ -48,22 +49,32 @@ SOFTWORDS= softcore.fr jhlocal.fr marker # Optional OO extension softwords #SOFTWORDS+= oo.fr classes.fr -.if ${MACHINE_CPUARCH} == "amd64" && !defined(FICL64) +.if ${MACHINE_CPUARCH} == "amd64" +.if defined(FICL32) CFLAGS+= -m32 -I. +.else +CFLAGS+= -fPIC +.endif .endif .if ${MACHINE_ARCH} == "powerpc64" CFLAGS+= -m32 -mcpu=powerpc -I. .endif -CFLAGS+= -I${FICLDIR} -I${FICLDIR}/${MACHINE_CPUARCH:S/amd64/i386/} \ +.if ${MACHINE_CPUARCH} == "amd64" && defined(FICL32) +FICL_CPUARCH= i386 +.else +FICL_CPUARCH= ${MACHINE_CPUARCH} +.endif + +CFLAGS+= -I${FICLDIR} -I${FICLDIR}/${FICL_CPUARCH} \ -I${FICLDIR}/../common softcore.c: ${SOFTWORDS} softcore.awk (cd ${FICLDIR}/softwords; cat ${SOFTWORDS} \ | awk -f softcore.awk -v datestamp="`LC_ALL=C date`") > ${.TARGET} -.if ${MACHINE_CPUARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "amd64" && defined(FICL32) .if !exists(machine) ${SRCS:M*.c:R:S/$/.o/g}: machine Modified: stable/10/sys/boot/ficl/tools.c ============================================================================== --- stable/10/sys/boot/ficl/tools.c Thu Sep 4 20:49:11 2014 (r271134) +++ stable/10/sys/boot/ficl/tools.c Thu Sep 4 21:01:10 2014 (r271135) @@ -201,7 +201,7 @@ static void seeColon(FICL_VM *pVM, CELL *cp++ = '>'; else *cp++ = ' '; - cp += sprintf(cp, "%3d ", pc-param0); + cp += sprintf(cp, "%3d ", (int)(pc-param0)); if (isAFiclWord(pd, pFW)) { @@ -239,40 +239,40 @@ static void seeColon(FICL_VM *pVM, CELL case IF: c = *++pc; if (c.i > 0) - sprintf(cp, "if / while (branch %d)", pc+c.i-param0); + sprintf(cp, "if / while (branch %d)", (int)(pc+c.i-param0)); else - sprintf(cp, "until (branch %d)", pc+c.i-param0); + sprintf(cp, "until (branch %d)", (int)(pc+c.i-param0)); break; case BRANCH: c = *++pc; if (c.i == 0) - sprintf(cp, "repeat (branch %d)", pc+c.i-param0); + sprintf(cp, "repeat (branch %d)", (int)(pc+c.i-param0)); else if (c.i == 1) - sprintf(cp, "else (branch %d)", pc+c.i-param0); + sprintf(cp, "else (branch %d)", (int)(pc+c.i-param0)); else - sprintf(cp, "endof (branch %d)", pc+c.i-param0); + sprintf(cp, "endof (branch %d)", (int)(pc+c.i-param0)); break; case OF: c = *++pc; - sprintf(cp, "of (branch %d)", pc+c.i-param0); + sprintf(cp, "of (branch %d)", (int)(pc+c.i-param0)); break; case QDO: c = *++pc; - sprintf(cp, "?do (leave %d)", (CELL *)c.p-param0); + sprintf(cp, "?do (leave %d)", (int)((CELL *)c.p-param0)); break; case DO: c = *++pc; - sprintf(cp, "do (leave %d)", (CELL *)c.p-param0); + sprintf(cp, "do (leave %d)", (int)((CELL *)c.p-param0)); break; case LOOP: c = *++pc; - sprintf(cp, "loop (branch %d)", pc+c.i-param0); + sprintf(cp, "loop (branch %d)", (int)(pc+c.i-param0)); break; case PLOOP: c = *++pc; - sprintf(cp, "+loop (branch %d)", pc+c.i-param0); + sprintf(cp, "+loop (branch %d)", (int)(pc+c.i-param0)); break; default: sprintf(cp, "%.*s", pFW->nName, pFW->name); Modified: stable/10/sys/boot/ficl/words.c ============================================================================== --- stable/10/sys/boot/ficl/words.c Thu Sep 4 20:49:11 2014 (r271134) +++ stable/10/sys/boot/ficl/words.c Thu Sep 4 21:01:10 2014 (r271135) @@ -2567,7 +2567,7 @@ static void setObjectFlag(FICL_VM *pVM) static void isObject(FICL_VM *pVM) { - int flag; + FICL_INT flag; FICL_WORD *pFW = (FICL_WORD *)stackPopPtr(pVM->pStack); flag = ((pFW != NULL) && (pFW->flags & FW_ISOBJECT)) ? FICL_TRUE : FICL_FALSE; Modified: stable/10/sys/boot/forth/beastie.4th ============================================================================== --- stable/10/sys/boot/forth/beastie.4th Thu Sep 4 20:49:11 2014 (r271134) +++ stable/10/sys/boot/forth/beastie.4th Thu Sep 4 21:01:10 2014 (r271135) @@ -242,6 +242,11 @@ variable logoY ; : beastie-start ( -- ) \ starts the menu + s" console" getenv dup -1 <> if + s" efi" 2swap contains? if + s" set beastie_disable=YES" evaluate + then + else drop then s" beastie_disable" getenv dup -1 <> if s" YES" compare-insensitive 0= if Modified: stable/10/sys/boot/forth/beastie.4th.8 ============================================================================== --- stable/10/sys/boot/forth/beastie.4th.8 Thu Sep 4 20:49:11 2014 (r271134) +++ stable/10/sys/boot/forth/beastie.4th.8 Thu Sep 4 21:01:10 2014 (r271135) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 16, 2011 +.Dd April 27, 2014 .Dt BEASTIE.4TH 8 .Os .Sh NAME @@ -119,6 +119,8 @@ Sets the desired row position of the log If set to .Dq YES , the beastie boot menu will be skipped. +The beastie boot menu is always skipped if booting UEFI or running non-x86 +hardware. .It Va loader_delay If set to a number higher than zero, introduces a delay before starting the beastie boot menu. During the delay the user can press either Ctrl-C to skip Modified: stable/10/sys/boot/forth/loader.conf.5 ============================================================================== --- stable/10/sys/boot/forth/loader.conf.5 Thu Sep 4 20:49:11 2014 (r271134) +++ stable/10/sys/boot/forth/loader.conf.5 Thu Sep 4 21:01:10 2014 (r271135) @@ -23,7 +23,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd October 18, 2013 +.Dd April 27, 2014 .Dt LOADER.CONF 5 .Os .Sh NAME @@ -236,6 +236,8 @@ be displayed. If set to .Dq YES , the beastie boot menu will be skipped. +The beastie boot menu is always skipped if booting UEFI or running non-x86 +hardware. .It Va loader_logo Pq Dq Li orbbw Selects a desired logo in the beastie boot menu. Possible values are: Modified: stable/10/sys/boot/i386/libi386/Makefile ============================================================================== --- stable/10/sys/boot/i386/libi386/Makefile Thu Sep 4 20:49:11 2014 (r271134) +++ stable/10/sys/boot/i386/libi386/Makefile Thu Sep 4 21:01:10 2014 (r271135) @@ -52,6 +52,9 @@ CFLAGS+= -I${.CURDIR}/../../common -I${. # the location of libstand CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/ +# Suppress warning from clang for FreeBSD %b and %D formats +CFLAGS+= -fformat-extensions + .if ${MACHINE_CPUARCH} == "amd64" CLEANFILES+= machine machine: Modified: stable/10/sys/boot/i386/loader/Makefile ============================================================================== --- stable/10/sys/boot/i386/loader/Makefile Thu Sep 4 20:49:11 2014 (r271134) +++ stable/10/sys/boot/i386/loader/Makefile Thu Sep 4 21:01:10 2014 (r271135) @@ -41,8 +41,12 @@ HAVE_ISABUS= yes # Enable BootForth BOOT_FORTH= yes CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/i386 +.if ${MACHINE_CPUARCH} == "amd64" +LIBFICL= ${.OBJDIR}/../../ficl32/libficl.a +.else LIBFICL= ${.OBJDIR}/../../ficl/libficl.a .endif +.endif .if defined(LOADER_BZIP2_SUPPORT) CFLAGS+= -DLOADER_BZIP2_SUPPORT From owner-svn-src-stable-10@FreeBSD.ORG Thu Sep 4 21:05:06 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9D9627A2; Thu, 4 Sep 2014 21:05:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 86DA0158B; Thu, 4 Sep 2014 21:05:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84L56Ei052203; Thu, 4 Sep 2014 21:05:06 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84L55Oa052196; Thu, 4 Sep 2014 21:05:05 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409042105.s84L55Oa052196@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 4 Sep 2014 21:05:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271136 - in stable/10/sys/boot/amd64: . boot1.efi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 21:05:06 -0000 Author: emaste Date: Thu Sep 4 21:05:04 2014 New Revision: 271136 URL: http://svnweb.freebsd.org/changeset/base/271136 Log: MFC boot1.efi stub loader r264391 (nwhitehorn): Add a simple EFI stub loader. This is a quick and dirty of boot1.chrp from the PowerPC port with all the Open Firmware bits removed and replaced by their EFI counterparts. On the whole, I think I prefer Open Firmware. This code is supposed to be an immutable shim that sits on the EFI system partition, loads /boot/loader.efi from UFS and tells the real loader what disk/partition to look at. It finds the UFS root partition by the somewhat braindead approach of picking the first UFS partition it can find. Better approaches are called for, but this works for now. This shim loader will also be useful for secure boot in the future, which will require some rearchitecture. r264403 (nwhitehorn): Fix buildworld. I had some local bits in my build tree that caused this to work by accident. r264404 (nwhitehorn): Add my copyright here. Most of this is unmodified from the original sparc64 version, but at least some indication of changes that postdate the actual invention of EFI is probably a good idea. r264414 (nwhitehorn): Apparently some of the i386 boot blocks are so close to full that adding single lines to ufsread.c spills them over. Duplicate a whole bunch of code to get file sizes into boot1.efi/boot1.c rather than modifying ufsread.c. r264975 (nwhitehorn): Add generation of an EFI filesystem to hold boot1.efi. This is a near- exact copy of the code from boot1.chrp again. The resulting image is installed to /boot/boot1.efifat. If dd'ed to an 800K "efi" partition, it should result in a bootable system. r268975 (sbruno): Remove boot1.efi during clean target. Relnotes: Yes Sponsored by: The FreeBSD Foundation Added: stable/10/sys/boot/amd64/boot1.efi/ - copied from r264391, head/sys/boot/amd64/boot1.efi/ stable/10/sys/boot/amd64/boot1.efi/Makefile.fat - copied unchanged from r264975, head/sys/boot/amd64/boot1.efi/Makefile.fat stable/10/sys/boot/amd64/boot1.efi/fat.tmpl.bz2.uu - copied unchanged from r264975, head/sys/boot/amd64/boot1.efi/fat.tmpl.bz2.uu stable/10/sys/boot/amd64/boot1.efi/generate-fat.sh - copied unchanged from r264975, head/sys/boot/amd64/boot1.efi/generate-fat.sh Modified: stable/10/sys/boot/amd64/Makefile stable/10/sys/boot/amd64/boot1.efi/Makefile stable/10/sys/boot/amd64/boot1.efi/boot1.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/amd64/Makefile ============================================================================== --- stable/10/sys/boot/amd64/Makefile Thu Sep 4 21:01:10 2014 (r271135) +++ stable/10/sys/boot/amd64/Makefile Thu Sep 4 21:05:04 2014 (r271136) @@ -2,6 +2,6 @@ .include -SUBDIR= efi +SUBDIR= efi boot1.efi .include Modified: stable/10/sys/boot/amd64/boot1.efi/Makefile ============================================================================== --- head/sys/boot/amd64/boot1.efi/Makefile Sun Apr 13 01:14:25 2014 (r264391) +++ stable/10/sys/boot/amd64/boot1.efi/Makefile Thu Sep 4 21:05:04 2014 (r271136) @@ -22,11 +22,11 @@ CFLAGS+= -I${.CURDIR}/../../efi/include/ CFLAGS+= -I${.CURDIR}/../../../contrib/dev/acpica/include CFLAGS+= -I${.CURDIR}/../../.. -# Always add MI sources -.PATH: ${.CURDIR}/../../common ../efi +# Always add MI sources and REGULAR efi loader bits +.PATH: ${.CURDIR}/../efi ${.CURDIR}/../../common CFLAGS+= -I${.CURDIR}/../../common -FILES= boot1.efi +FILES= boot1.efi boot1.efifat FILESMODE_boot1.efi= ${BINMODE} LDSCRIPT= ${.CURDIR}/../efi/ldscript.${MACHINE_CPUARCH} @@ -55,13 +55,29 @@ boot1.efi: loader.sym CFLAGS+= -I${.CURDIR}/../../common +boot1.o: ${.CURDIR}/../../common/ufsread.c + +# The following inserts out objects into a template FAT file system +# created by generate-fat.sh + +.include "${.CURDIR}/Makefile.fat" + +boot1.efifat: boot1.efi + echo ${.OBJDIR} + uudecode ${.CURDIR}/fat.tmpl.bz2.uu + mv fat.tmpl.bz2 ${.TARGET}.bz2 + bzip2 -f -d ${.TARGET}.bz2 + dd if=boot1.efi of=${.TARGET} seek=${BOOT1_OFFSET} conv=notrunc + +CLEANFILES= boot1.efifat + .endif # ${COMPILER_TYPE} != "gcc" .include beforedepend ${OBJS}: machine x86 -CLEANFILES+= machine x86 +CLEANFILES+= machine x86 boot1.efi machine: ln -sf ${.CURDIR}/../../../amd64/include machine Copied: stable/10/sys/boot/amd64/boot1.efi/Makefile.fat (from r264975, head/sys/boot/amd64/boot1.efi/Makefile.fat) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/boot/amd64/boot1.efi/Makefile.fat Thu Sep 4 21:05:04 2014 (r271136, copy of r264975, head/sys/boot/amd64/boot1.efi/Makefile.fat) @@ -0,0 +1,3 @@ +# This file autogenerated by generate-fat.sh - DO NOT EDIT +# $FreeBSD$ +BOOT1_OFFSET=0x2d Modified: stable/10/sys/boot/amd64/boot1.efi/boot1.c ============================================================================== --- head/sys/boot/amd64/boot1.efi/boot1.c Sun Apr 13 01:14:25 2014 (r264391) +++ stable/10/sys/boot/amd64/boot1.efi/boot1.c Thu Sep 4 21:05:04 2014 (r271136) @@ -3,6 +3,8 @@ * All rights reserved. * Copyright (c) 2001 Robert Drehmel * All rights reserved. + * Copyright (c) 2014 Nathan Whitehorn + * All rights reserved. * * Redistribution and use in source and binary forms are freely * permitted provided that the above copyright notice and this @@ -167,6 +169,88 @@ dskread(void *buf, u_int64_t lba, int nb #include "ufsread.c" +static ssize_t +fsstat(ufs_ino_t inode) +{ +#ifndef UFS2_ONLY + static struct ufs1_dinode dp1; + ufs1_daddr_t addr1; +#endif +#ifndef UFS1_ONLY + static struct ufs2_dinode dp2; +#endif + static struct fs fs; + static ufs_ino_t inomap; + char *blkbuf; + void *indbuf; + size_t n, nb, size, off, vboff; + ufs_lbn_t lbn; + ufs2_daddr_t addr2, vbaddr; + static ufs2_daddr_t blkmap, indmap; + u_int u; + + blkbuf = dmadat->blkbuf; + indbuf = dmadat->indbuf; + if (!dsk_meta) { + inomap = 0; + for (n = 0; sblock_try[n] != -1; n++) { + if (dskread(dmadat->sbbuf, sblock_try[n] / DEV_BSIZE, + SBLOCKSIZE / DEV_BSIZE)) + return -1; + memcpy(&fs, dmadat->sbbuf, sizeof(struct fs)); + if (( +#if defined(UFS1_ONLY) + fs.fs_magic == FS_UFS1_MAGIC +#elif defined(UFS2_ONLY) + (fs.fs_magic == FS_UFS2_MAGIC && + fs.fs_sblockloc == sblock_try[n]) +#else + fs.fs_magic == FS_UFS1_MAGIC || + (fs.fs_magic == FS_UFS2_MAGIC && + fs.fs_sblockloc == sblock_try[n]) +#endif + ) && + fs.fs_bsize <= MAXBSIZE && + fs.fs_bsize >= sizeof(struct fs)) + break; + } + if (sblock_try[n] == -1) { + printf("Not ufs\n"); + return -1; + } + dsk_meta++; + } else + memcpy(&fs, dmadat->sbbuf, sizeof(struct fs)); + if (!inode) + return 0; + if (inomap != inode) { + n = IPERVBLK(&fs); + if (dskread(blkbuf, INO_TO_VBA(&fs, n, inode), DBPERVBLK)) + return -1; + n = INO_TO_VBO(n, inode); +#if defined(UFS1_ONLY) + memcpy(&dp1, (struct ufs1_dinode *)blkbuf + n, + sizeof(struct ufs1_dinode)); +#elif defined(UFS2_ONLY) + memcpy(&dp2, (struct ufs2_dinode *)blkbuf + n, + sizeof(struct ufs2_dinode)); +#else + if (fs.fs_magic == FS_UFS1_MAGIC) + memcpy(&dp1, (struct ufs1_dinode *)blkbuf + n, + sizeof(struct ufs1_dinode)); + else + memcpy(&dp2, (struct ufs2_dinode *)blkbuf + n, + sizeof(struct ufs2_dinode)); +#endif + inomap = inode; + fs_off = 0; + blkmap = indmap = 0; + } + size = DIP(di_size); + n = size - fs_off; + return (n); +} + static struct dmadat __dmadat; static int @@ -201,7 +285,7 @@ load(const char *fname) return; } - bufsize = fsread(ino, NULL, -1); + bufsize = fsstat(ino); status = systab->BootServices->AllocatePool(EfiLoaderData, bufsize, &buffer); fsread(ino, buffer, bufsize); Copied: stable/10/sys/boot/amd64/boot1.efi/fat.tmpl.bz2.uu (from r264975, head/sys/boot/amd64/boot1.efi/fat.tmpl.bz2.uu) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/boot/amd64/boot1.efi/fat.tmpl.bz2.uu Thu Sep 4 21:05:04 2014 (r271136, copy of r264975, head/sys/boot/amd64/boot1.efi/fat.tmpl.bz2.uu) @@ -0,0 +1,22 @@ +FAT template boot filesystem created by generate-fat.sh +DO NOT EDIT +$FreeBSD$ +begin 644 fat.tmpl.bz2 +M0EIH.3%!62936?1V`!$`&J7____[ZZKJJ_^N_ZO^Z_^[ON_\`4`00!0$#$$" +M0D)$6&(IZC3RGZH\B&$,U&AH#)B:,$8TAF@@]0T>IZF&A +M&GZID,1IZFAMO%FPGL0"(QIZV"3_!`$@N(@`DD$?C&$["`)`!)$6@#\HOB42 +M0`"2(X0FGX1#L"`'7E,'#-'HM!'QUD0\R,?9U,6ZE8F,Y6*L<9S<6PH)"%_" +MX'_PL4A),QB"(`B(=14*-"8,(QCG.(2$A(1J'010CB&R$(0B00FPP(0A"$)E +M#`A"$(1]LB&!"$(0B4&1#`A"$(14W<9J.:&A@8&!@8'`Z$(D(02@^L=UL>:+ +MBG:Q5+4&'[/P4@D2?M<,E!0&YBF8+],4^%$`4*%$N9MF:Z29-_VG2G7<$LJ-44RST& +MB53YE@H%(G5G$.FU;=L[DQVA]"(V4B1+%BP%.A<-10-%#R#NKR='@\'#"_'U +M'I36ZT:8QIN*3E$:HZIZRJ?$Y1L&<1'C)G(=8,E.L(KU<9X=%/NX.6\=@^IW +M\-PC$B&I"T\!(VI3"K!X:\%.01Y#X/83[SH.J*H5BH:ILFV1'X/D/V1$W6'\ +MFY>YE:*(I!.X@'D>H_(PY'(W1+B;:,Y?H8Y%(Q')!>DDE;\J1-DRXJJ/O(1@ +M'X/24=!+/V8S1)B(R:UE"0&&1:PUS(1`!$04``++GZ/8(CE5P1P8?^7QB[DB +(G"A(>CL`"(`` +` +end Copied: stable/10/sys/boot/amd64/boot1.efi/generate-fat.sh (from r264975, head/sys/boot/amd64/boot1.efi/generate-fat.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/boot/amd64/boot1.efi/generate-fat.sh Thu Sep 4 21:05:04 2014 (r271136, copy of r264975, head/sys/boot/amd64/boot1.efi/generate-fat.sh) @@ -0,0 +1,54 @@ +#!/bin/sh + +# This script generates the dummy FAT filesystem used for the EFI boot +# blocks. It uses newfs_msdos to generate a template filesystem with the +# relevant interesting files. These are then found by grep, and the offsets +# written to a Makefile snippet. +# +# Because it requires root, and because it is overkill, we do not +# do this as part of the normal build. If makefs(8) grows workable FAT +# support, this should be revisited. + +# $FreeBSD$ + +FAT_SIZE=1600 #Size in 512-byte blocks of the produced image + +BOOT1_SIZE=64k + +# Generate 800K FAT image +OUTPUT_FILE=fat.tmpl + +dd if=/dev/zero of=$OUTPUT_FILE bs=512 count=$FAT_SIZE +DEVICE=`mdconfig -a -f $OUTPUT_FILE` +newfs_msdos -F 12 $DEVICE +mkdir stub +mount -t msdosfs /dev/$DEVICE stub + +# Create and bless a directory for the boot loader +mkdir -p stub/efi/boot + +# Make a dummy file for boot1 +echo 'Boot1 START' | dd of=stub/efi/boot/BOOTx64.efi cbs=$BOOT1_SIZE count=1 conv=block + +umount stub +mdconfig -d -u $DEVICE +rmdir stub + +# Locate the offsets of the two fake files +BOOT1_OFFSET=$(hd $OUTPUT_FILE | grep 'Boot1 START' | cut -f 1 -d ' ') + +# Convert to numbers of blocks +BOOT1_OFFSET=$(echo 0x$BOOT1_OFFSET | awk '{printf("%x\n",$1/512);}') + +echo '# This file autogenerated by generate-fat.sh - DO NOT EDIT' > Makefile.fat +echo '# $FreeBSD$' >> Makefile.fat +echo "BOOT1_OFFSET=0x$BOOT1_OFFSET" >> Makefile.fat + +bzip2 $OUTPUT_FILE +echo 'FAT template boot filesystem created by generate-fat.sh' > $OUTPUT_FILE.bz2.uu +echo 'DO NOT EDIT' >> $OUTPUT_FILE.bz2.uu +echo '$FreeBSD$' >> $OUTPUT_FILE.bz2.uu + +uuencode $OUTPUT_FILE.bz2 $OUTPUT_FILE.bz2 >> $OUTPUT_FILE.bz2.uu +rm $OUTPUT_FILE.bz2 + From owner-svn-src-stable-10@FreeBSD.ORG Thu Sep 4 21:10:25 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 482B0A6B; Thu, 4 Sep 2014 21:10:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 33BD215D5; Thu, 4 Sep 2014 21:10:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84LAP6v053197; Thu, 4 Sep 2014 21:10:25 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84LAPmh053196; Thu, 4 Sep 2014 21:10:25 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409042110.s84LAPmh053196@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 4 Sep 2014 21:10:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271138 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 21:10:25 -0000 Author: emaste Date: Thu Sep 4 21:10:24 2014 New Revision: 271138 URL: http://svnweb.freebsd.org/changeset/base/271138 Log: Add UPDATING entry for r271116 Noticed by: nwhitehorn Modified: stable/10/UPDATING Modified: stable/10/UPDATING ============================================================================== --- stable/10/UPDATING Thu Sep 4 21:06:33 2014 (r271137) +++ stable/10/UPDATING Thu Sep 4 21:10:24 2014 (r271138) @@ -16,6 +16,13 @@ from older versions of FreeBSD, try WITH stable/10, and then rebuild without this option. The bootstrap process from older version of current is a bit fragile. +20140904: + The ofwfb driver, used to provide a graphics console on PowerPC when + using vt(4), no longer allows mmap() of all of physical memory. This + will prevent Xorg on PowerPC with some ATI graphics cards from + initializing properly unless x11-servers/xorg-server is updated to + 1.12.4_8 or newer. + 20140831: The libatf-c and libatf-c++ major versions were downgraded to 0 and 1 respectively to match the upstream numbers. They were out of From owner-svn-src-stable-10@FreeBSD.ORG Fri Sep 5 05:07:38 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9AF70CEE; Fri, 5 Sep 2014 05:07:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 85EA51991; Fri, 5 Sep 2014 05:07:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8557c6h082117; Fri, 5 Sep 2014 05:07:38 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8557cPh082116; Fri, 5 Sep 2014 05:07:38 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201409050507.s8557cPh082116@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Fri, 5 Sep 2014 05:07:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271153 - stable/10/sys/powerpc/include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 05:07:38 -0000 Author: jhibbits Date: Fri Sep 5 05:07:38 2014 New Revision: 271153 URL: http://svnweb.freebsd.org/changeset/base/271153 Log: MFC r258078,258079 Increase the stack size for ppc64 from 4 pages to 8. I found a stack overflow when a coredump was taken onto a ZFS volume with heavy network activity. 2 DSI traps, plus one DECR trap, along with several function calls in the stack, overflowed the 4 pages. 8 page stack fixes this. Discussed with: nwhitehorn Approved by: re Relnotes: yes Modified: stable/10/sys/powerpc/include/param.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/powerpc/include/param.h ============================================================================== --- stable/10/sys/powerpc/include/param.h Fri Sep 5 03:33:16 2014 (r271152) +++ stable/10/sys/powerpc/include/param.h Fri Sep 5 05:07:38 2014 (r271153) @@ -104,8 +104,12 @@ #define MAXPAGESIZES 1 /* maximum number of supported page sizes */ #ifndef KSTACK_PAGES +#ifdef __powerpc64__ +#define KSTACK_PAGES 8 /* includes pcb */ +#else #define KSTACK_PAGES 4 /* includes pcb */ #endif +#endif #define KSTACK_GUARD_PAGES 1 /* pages of kstack guard; 0 disables */ #define USPACE (KSTACK_PAGES * PAGE_SIZE) /* total size of pcb */ From owner-svn-src-stable-10@FreeBSD.ORG Fri Sep 5 13:22:29 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4B05F90; Fri, 5 Sep 2014 13:22:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C1CE13B9; Fri, 5 Sep 2014 13:22:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s85DMSpW011832; Fri, 5 Sep 2014 13:22:28 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s85DMSFD011829; Fri, 5 Sep 2014 13:22:28 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201409051322.s85DMSFD011829@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 5 Sep 2014 13:22:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271161 - in stable/10/sys: kern sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 13:22:29 -0000 Author: kib Date: Fri Sep 5 13:22:28 2014 New Revision: 271161 URL: http://svnweb.freebsd.org/changeset/base/271161 Log: Add function and wrapper to switch lockmgr and vnode lock back to auto-promotion of shared to exclusive. Approved by: re (gjb) Modified: stable/10/sys/kern/kern_lock.c stable/10/sys/sys/lockmgr.h stable/10/sys/sys/vnode.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_lock.c ============================================================================== --- stable/10/sys/kern/kern_lock.c Fri Sep 5 11:48:32 2014 (r271160) +++ stable/10/sys/kern/kern_lock.c Fri Sep 5 13:22:28 2014 (r271161) @@ -419,6 +419,14 @@ lockallowshare(struct lock *lk) } void +lockdisableshare(struct lock *lk) +{ + + lockmgr_assert(lk, KA_XLOCKED); + lk->lock_object.lo_flags |= LK_NOSHARE; +} + +void lockallowrecurse(struct lock *lk) { Modified: stable/10/sys/sys/lockmgr.h ============================================================================== --- stable/10/sys/sys/lockmgr.h Fri Sep 5 11:48:32 2014 (r271160) +++ stable/10/sys/sys/lockmgr.h Fri Sep 5 13:22:28 2014 (r271161) @@ -77,6 +77,7 @@ void lockallowrecurse(struct lock *lk); void lockallowshare(struct lock *lk); void lockdestroy(struct lock *lk); void lockdisablerecurse(struct lock *lk); +void lockdisableshare(struct lock *lk); void lockinit(struct lock *lk, int prio, const char *wmesg, int timo, int flags); #ifdef DDB Modified: stable/10/sys/sys/vnode.h ============================================================================== --- stable/10/sys/sys/vnode.h Fri Sep 5 11:48:32 2014 (r271160) +++ stable/10/sys/sys/vnode.h Fri Sep 5 13:22:28 2014 (r271161) @@ -428,6 +428,7 @@ extern struct vattr va_null; /* predefi #define VN_LOCK_AREC(vp) lockallowrecurse((vp)->v_vnlock) #define VN_LOCK_ASHARE(vp) lockallowshare((vp)->v_vnlock) +#define VN_LOCK_DSHARE(vp) lockdisableshare((vp)->v_vnlock) #endif /* _KERNEL */ From owner-svn-src-stable-10@FreeBSD.ORG Fri Sep 5 13:25:28 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 154F43D7; Fri, 5 Sep 2014 13:25:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 004D913D9; Fri, 5 Sep 2014 13:25:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s85DPRQL012407; Fri, 5 Sep 2014 13:25:27 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s85DPR9f012406; Fri, 5 Sep 2014 13:25:27 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201409051325.s85DPR9f012406@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 5 Sep 2014 13:25:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271162 - stable/10/sys/ufs/ufs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 13:25:28 -0000 Author: kib Date: Fri Sep 5 13:25:27 2014 New Revision: 271162 URL: http://svnweb.freebsd.org/changeset/base/271162 Log: MFC r270797: Direct access to the quota files, in particular, lookup, causes lock conflict with the quota metadata access. Mark quota vnode lock as recursive and always exclusive to avoid the problem. Approved by: re (gjb) Modified: stable/10/sys/ufs/ufs/ufs_quota.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ufs/ufs/ufs_quota.c ============================================================================== --- stable/10/sys/ufs/ufs/ufs_quota.c Fri Sep 5 13:22:28 2014 (r271161) +++ stable/10/sys/ufs/ufs/ufs_quota.c Fri Sep 5 13:25:27 2014 (r271162) @@ -557,8 +557,21 @@ quotaon(struct thread *td, struct mount if (*vpp != vp) quotaoff1(td, mp, type); + /* + * When the directory vnode containing the quota file is + * inactivated, due to the shared lookup of the quota file + * vput()ing the dvp, the qsyncvp() call for the containing + * directory would try to acquire the quota lock exclusive. + * At the same time, lookup already locked the quota vnode + * shared. Mark the quota vnode lock as allowing recursion + * and automatically converting shared locks to exclusive. + * + * Also mark quota vnode as system. + */ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); vp->v_vflag |= VV_SYSTEM; + VN_LOCK_AREC(vp); + VN_LOCK_DSHARE(vp); VOP_UNLOCK(vp, 0); *vpp = vp; /* From owner-svn-src-stable-10@FreeBSD.ORG Fri Sep 5 13:29:01 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1CB7C551; Fri, 5 Sep 2014 13:29:01 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 82DF61434; Fri, 5 Sep 2014 13:29:00 +0000 (UTC) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id s85DStKH097744 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 5 Sep 2014 16:28:55 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua s85DStKH097744 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id s85DStBf097743; Fri, 5 Sep 2014 16:28:55 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 5 Sep 2014 16:28:55 +0300 From: Konstantin Belousov To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r271161 - in stable/10/sys: kern sys Message-ID: <20140905132855.GR2737@kib.kiev.ua> References: <201409051322.s85DMSFD011829@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="TD4T2t6LN4AO0FZv" Content-Disposition: inline In-Reply-To: <201409051322.s85DMSFD011829@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 13:29:01 -0000 --TD4T2t6LN4AO0FZv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 05, 2014 at 01:22:28PM +0000, Konstantin Belousov wrote: > Author: kib > Date: Fri Sep 5 13:22:28 2014 > New Revision: 271161 > URL: http://svnweb.freebsd.org/changeset/base/271161 >=20 > Log: > Add function and wrapper to switch lockmgr and vnode lock back to > auto-promotion of shared to exclusive. > =20 > Approved by: re (gjb) The commit message missed a line, it is MFC of r270795. --TD4T2t6LN4AO0FZv Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJUCbqXAAoJEJDCuSvBvK1Bb8cP/36URDEFOrtmHhD6rRabQ8dX sACsuC/m7r7T9SZ4gmIpuZbaiTEL4RIqrb/aH2JBATZsFOHunkKkIh+FxOmqiNhr gFUXTN6NagS+urTk78EvAe1uNvBysuIvT+jS3/WaL5WwGmH+CRJ6arj8xxd3t561 kaPFDAjC++IVZf0bODiOtPeyelBLwT2OX6faCUPHBXJvRNLnHCy0K4t53fNTL0rQ lWK52dj2FsbkjAVLsBubAZkmmMx7TOgs9+BUFk6B3oVk+uFEU+fWoplyaSzRMi2+ /Pt74AUkUYpet+E0dt4cjwTrmuGmUVVuuQgupVz7+1Y8jFZN2zxOLZvNYo94aDey 0uq91LlYXZ9rTYKUX0KH0qLKFWtEr8MixQARoZQauy3pMfo5g7UNMQHwgQwMPwsG BdqNs3YKEGMCJWdf7n3mJZWInaA9AKA2/35j9UpFCjyBnkwtH9itm2J85SQobSeY nMY42EZROZlLnDcOdqHDlaf4KBbmMedfLrBqS95VDK4kDlVOp3cxav4Pd2m6/8h1 91hE+wkUQur6fIxHpqtOKefJ62scHtiZwtt96wxDnieqm0nEU8/ktJNLlGRZJD44 Wd1BTTb2eOu9beoi4ZynkGcCaX5s607GLOIhfyJFmi1FY8R9Jh6clb2axAQsijki 12Znegnbkm0z8ZITWsGa =UMtd -----END PGP SIGNATURE----- --TD4T2t6LN4AO0FZv-- From owner-svn-src-stable-10@FreeBSD.ORG Fri Sep 5 15:13:42 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E1EBD68E; Fri, 5 Sep 2014 15:13:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C15FD1252; Fri, 5 Sep 2014 15:13:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s85FDfrc064878; Fri, 5 Sep 2014 15:13:41 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s85FDf3A064876; Fri, 5 Sep 2014 15:13:41 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201409051513.s85FDf3A064876@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Fri, 5 Sep 2014 15:13:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271171 - in stable/10/sys/powerpc: include powerpc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 15:13:42 -0000 Author: jhibbits Date: Fri Sep 5 15:13:41 2014 New Revision: 271171 URL: http://svnweb.freebsd.org/changeset/base/271171 Log: MFC r261095,r263464,r263752,r264189 r263464,r263752,r275189: Mask out SRR1 bits that aren't exported to the MSR. This appears to fix a strange condition with X on 32-bit PowerBooks I observed, caused by one of these bits getting set in the mcontext, but not set in the thread, which is a symptom of another problem, more difficult to diagnose. Since these bits aren't exported anyway, this change makes it more explicit that the bits aren't MSR-related in SRR1. r261095: Fix 32-bit signal handling on ppc64. This was broken when the PSL_USERSTATIC macro was changed. Since copying 64-bit srr1 into 32-bit srr1 drops the upper 32 bits, any bits set in the context were dropped, meaning the context check fails. Since 32-bit set_context() can't change those bits anyway, copy the ones from the current context (td->td_frame) before calling set_context(). Approved by: re Relnotes: yes (Affects 10-stable, but not 10.0-release) Modified: stable/10/sys/powerpc/include/psl.h stable/10/sys/powerpc/powerpc/exec_machdep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/powerpc/include/psl.h ============================================================================== --- stable/10/sys/powerpc/include/psl.h Fri Sep 5 14:58:24 2014 (r271170) +++ stable/10/sys/powerpc/include/psl.h Fri Sep 5 15:13:41 2014 (r271171) @@ -86,17 +86,20 @@ /* Initial kernel MSR, use IS=1 ad DS=1. */ #define PSL_KERNSET_INIT (PSL_IS | PSL_DS) #define PSL_KERNSET (PSL_CE | PSL_ME | PSL_EE) +#define PSL_SRR1_MASK 0x00000000UL /* No mask on Book-E */ #elif defined(BOOKE_PPC4XX) #define PSL_KERNSET (PSL_CE | PSL_ME | PSL_EE | PSL_FP) +#define PSL_SRR1_MASK 0x00000000UL /* No mask on Book-E */ #elif defined(AIM) #ifdef __powerpc64__ #define PSL_KERNSET (PSL_SF | PSL_EE | PSL_ME | PSL_IR | PSL_DR | PSL_RI) #else #define PSL_KERNSET (PSL_EE | PSL_ME | PSL_IR | PSL_DR | PSL_RI) #endif +#define PSL_SRR1_MASK 0x783f0000UL /* Bits 1-4, 10-15 (ppc32), 33-36, 42-47 (ppc64) */ #endif #define PSL_USERSET (PSL_KERNSET | PSL_PR) -#define PSL_USERSTATIC ~(PSL_VEC | PSL_FP | PSL_FE0 | PSL_FE1) +#define PSL_USERSTATIC (~(PSL_VEC | PSL_FP | PSL_FE0 | PSL_FE1) & ~PSL_SRR1_MASK) #endif /* _MACHINE_PSL_H_ */ Modified: stable/10/sys/powerpc/powerpc/exec_machdep.c ============================================================================== --- stable/10/sys/powerpc/powerpc/exec_machdep.c Fri Sep 5 14:58:24 2014 (r271170) +++ stable/10/sys/powerpc/powerpc/exec_machdep.c Fri Sep 5 15:13:41 2014 (r271171) @@ -752,6 +752,7 @@ set_mcontext32(struct thread *td, const memcpy(mcp64.mc_av,mcp->mc_av,sizeof(mcp64.mc_av)); for (i = 0; i < 42; i++) mcp64.mc_frame[i] = mcp->mc_frame[i]; + mcp64.mc_srr1 |= (td->td_frame->srr1 & 0xFFFFFFFF00000000ULL); memcpy(mcp64.mc_fpreg,mcp->mc_fpreg,sizeof(mcp64.mc_fpreg)); error = set_mcontext(td, &mcp64); From owner-svn-src-stable-10@FreeBSD.ORG Fri Sep 5 15:45:21 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EDF669FF; Fri, 5 Sep 2014 15:45:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D8C4A1822; Fri, 5 Sep 2014 15:45:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s85FjKTW079404; Fri, 5 Sep 2014 15:45:20 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s85FjKn4079402; Fri, 5 Sep 2014 15:45:20 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201409051545.s85FjKn4079402@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 5 Sep 2014 15:45:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271172 - stable/10/sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 15:45:21 -0000 Author: jhb Date: Fri Sep 5 15:45:20 2014 New Revision: 271172 URL: http://svnweb.freebsd.org/changeset/base/271172 Log: MFC 270222: Bump the default size of cpuset_t masks in userland from 128 bits to 256. This should not be an ABI change since the various public APIs that use cpusets all include an explicit size parameter in addition to the cpuset parameter. Approved by: re (gjb) Modified: stable/10/sys/sys/_cpuset.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/sys/_cpuset.h ============================================================================== --- stable/10/sys/sys/_cpuset.h Fri Sep 5 15:13:41 2014 (r271171) +++ stable/10/sys/sys/_cpuset.h Fri Sep 5 15:45:20 2014 (r271172) @@ -38,7 +38,7 @@ #define CPU_SETSIZE MAXCPU #endif -#define CPU_MAXSIZE 128 +#define CPU_MAXSIZE 256 #ifndef CPU_SETSIZE #define CPU_SETSIZE CPU_MAXSIZE From owner-svn-src-stable-10@FreeBSD.ORG Fri Sep 5 16:34:34 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 093EFC68; Fri, 5 Sep 2014 16:34:34 +0000 (UTC) Date: Fri, 5 Sep 2014 16:34:34 +0000 From: Alexey Dokuchaev To: =?koi8-r?Q?Jean-S=E9bastien_P=E9dron?= Subject: Re: svn commit: r271023 - stable/10/sys/dev/vt Message-ID: <20140905163433.GA80322@FreeBSD.org> References: <201409031400.s83E0bK6049810@svn.freebsd.org> <20140903140757.GA7494@FreeBSD.org> <20140903145753.GA25935@FreeBSD.org> <54082B57.6070007@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <54082B57.6070007@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-stable@freebsd.org, "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Ed Maste , svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 16:34:34 -0000 On Thu, Sep 04, 2014 at 11:05:27AM +0200, Jean-Sébastien Pédron wrote: > One bug in vt(4) was that the mouse cursor position, even if it was > invisible before moused(8) starts, was always considered "dirty" and > required a redraw. The default position being [0;0], each new character > written would trigger a full refresh of the screen from [0;0] to the > position of this character. For quite a while (since I started using vt(4)) I'm observing a rather annoying thing: sometimes small area of screen would get selected like if pressed mouse button or something. If I do a long build on the console, periodically, white rectangle (selected area) will suddenly pop up and scroll away. Is this a known thing? It can be very annoyting for text editing on the console, as these sporadic "selects" are overwriting my selection buffer contents with whatever was on the screen at that time when they suddenly appear. (Rat itself it motionless while it happens.) > Those two problems combined explain the slownness of vt(4), especially > with discrete GPU and virtual machines; i915 users were mostly spared. > > Regarding the incorrect refresh when vt-switching, it was caused by a > race between the redraw thread and the switch. The redraw thread was not > stopped during a switch. Therefore, if the thread ran while the switch > was in progress, it could mark the screen as "up-to-date" even though it > displayed the wrong data. > > One change did reduce the vt-switch time specifically: in vt_vga, a > switch triggers a clear of the video memory. The loop did read from the > video memory, then wrote 8 black pixels. The useless read was removed. I must say that after I rebuilt my -CURRENT kernel today, vt(4) behaves much nicer than few weeks ago: switching is fast, no damaged screen any- more (both before and after I do "kldload i915kms"). Good work guys, and thanks for explanations! ./danfe From owner-svn-src-stable-10@FreeBSD.ORG Fri Sep 5 17:22:21 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4577E69F; Fri, 5 Sep 2014 17:22:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 15F281362; Fri, 5 Sep 2014 17:22:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s85HMKli028654; Fri, 5 Sep 2014 17:22:20 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s85HMKkp028653; Fri, 5 Sep 2014 17:22:20 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201409051722.s85HMKkp028653@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 5 Sep 2014 17:22:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271176 - in stable: 10/usr.bin/ktrace 8/usr.bin/ktrace 9/usr.bin/ktrace X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 17:22:21 -0000 Author: jhb Date: Fri Sep 5 17:22:20 2014 New Revision: 271176 URL: http://svnweb.freebsd.org/changeset/base/271176 Log: MFC 270674: Clarify that the -c argument clears the list of tracepoints specified by -t (it does not clear all tracepoints). Approved by: re (gjb for 10) Modified: stable/10/usr.bin/ktrace/ktrace.1 Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/8/usr.bin/ktrace/ktrace.1 stable/9/usr.bin/ktrace/ktrace.1 Directory Properties: stable/8/usr.bin/ktrace/ (props changed) stable/9/usr.bin/ktrace/ (props changed) Modified: stable/10/usr.bin/ktrace/ktrace.1 ============================================================================== --- stable/10/usr.bin/ktrace/ktrace.1 Fri Sep 5 17:05:51 2014 (r271175) +++ stable/10/usr.bin/ktrace/ktrace.1 Fri Sep 5 17:22:20 2014 (r271176) @@ -28,7 +28,7 @@ .\" @(#)ktrace.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd May 31, 2012 +.Dd August 26, 2014 .Dt KTRACE 1 .Os .Sh NAME @@ -81,7 +81,7 @@ Append to the trace file instead of recr Disable tracing on all user-owned processes, and, if executed by root, all processes in the system. .It Fl c -Clear the trace points associated with the specified file or processes. +Clear the specified trace points associated with the given file or processes. .It Fl d Descendants; perform the operation for all current children of the designated processes. @@ -102,8 +102,10 @@ Enable (disable) tracing on the indicate .Fl p flag is permitted). .It Fl t Ar trstr -The string argument represents the kernel trace points, one per letter. -The following table equates the letters with the tracepoints: +Specify the list of trace points to enable or disable, one per letter. +If an explicit list is not specified, the default set of trace points is used. +.Pp +The following trace points are supported: .Pp .Bl -tag -width flag -compact .It Cm c From owner-svn-src-stable-10@FreeBSD.ORG Fri Sep 5 17:44:11 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6DE9D237; Fri, 5 Sep 2014 17:44:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 58B57173E; Fri, 5 Sep 2014 17:44:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s85HiBpB038482; Fri, 5 Sep 2014 17:44:11 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s85HiBXP038481; Fri, 5 Sep 2014 17:44:11 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201409051744.s85HiBXP038481@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 5 Sep 2014 17:44:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271177 - in stable: 10/sbin/gbde 8/sbin/gbde 9/sbin/gbde X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 17:44:11 -0000 Author: jhb Date: Fri Sep 5 17:44:10 2014 New Revision: 271177 URL: http://svnweb.freebsd.org/changeset/base/271177 Log: MFC 270722: Correct the destroy example. The -n argument is not needed (and is not valid). Approved by: re (gjb for 10) Modified: stable/10/sbin/gbde/gbde.8 Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/8/sbin/gbde/gbde.8 stable/9/sbin/gbde/gbde.8 Directory Properties: stable/8/sbin/gbde/ (props changed) stable/9/sbin/gbde/ (props changed) Modified: stable/10/sbin/gbde/gbde.8 ============================================================================== --- stable/10/sbin/gbde/gbde.8 Fri Sep 5 17:22:20 2014 (r271176) +++ stable/10/sbin/gbde/gbde.8 Fri Sep 5 17:44:10 2014 (r271177) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 1, 2013 +.Dd August 27, 2014 .Dt GBDE 8 .Os .Sh NAME @@ -235,7 +235,7 @@ pass-phrase: .Pp To destroy all copies of the masterkey: .Pp -.Dl "gbde destroy ada0s1f -n -1" +.Dl "gbde destroy ada0s1f" .Sh SEE ALSO .Xr gbde 4 , .Xr geom 4 From owner-svn-src-stable-10@FreeBSD.ORG Fri Sep 5 22:51:23 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 42B33889 for ; Fri, 5 Sep 2014 22:51:23 +0000 (UTC) Received: from mail-la0-f47.google.com (mail-la0-f47.google.com [209.85.215.47]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B64B41AEE for ; Fri, 5 Sep 2014 22:51:22 +0000 (UTC) Received: by mail-la0-f47.google.com with SMTP id el20so6087589lab.6 for ; Fri, 05 Sep 2014 15:51:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=K0TJAeFe7oAYpxjQvt2VbN+9v4jClV9XzS8Xgnj3vgI=; b=kAXRl2qFuh20s+h63nnBq2jsmveSpaDEZUfCuOKoXpvCwPg8erim25f0XIrGKSpp+V PDRF2EeYOB4O2jOq3dVzF3B66S+m2uY3fdaOsoGaWBClaQNo+z+kFw6HJHSsmLQ7TbSO KqeGpcxVYda1vYfLy83btMm7o1RnkB5Njl+RTA5oRkQk1h9EDzz2eL7VRKx7n1b38vRw gLxv7nw4XwnRHZI7utKWkj1L5iY+Cv+5IIyHtXUvk0luEkYwlAEktgcJpIPAQE9MmKdD YZz3Xvgb/CIn0nmtA+z6WJYuy3vEX9QWshpxyqTWQH8A0dPvoi1Jc47nI/1WIra90e0i /G8Q== X-Gm-Message-State: ALoCoQkr6UEx0EfM5mOfNSrVbdQpQ5as3WQ9U/BeC6x+EAhhVNyg8L/T0N4V5K3LvGLsiKMOiS3l X-Received: by 10.112.158.199 with SMTP id ww7mr13914041lbb.71.1409957473467; Fri, 05 Sep 2014 15:51:13 -0700 (PDT) Received: from raynote.ddteam.net (12-162-133-95.pool.ukrtel.net. [95.133.162.12]) by mx.google.com with ESMTPSA id s7sm1150472lby.45.2014.09.05.15.51.11 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Sep 2014 15:51:12 -0700 (PDT) Date: Sat, 6 Sep 2014 01:48:59 +0300 From: Aleksandr Rybalko To: Alexey Dokuchaev Subject: Re: svn commit: r271023 - stable/10/sys/dev/vt Message-Id: <20140906014859.1c31f3aac5c84605ec6155dc@ddteam.net> In-Reply-To: <20140905163433.GA80322@FreeBSD.org> References: <201409031400.s83E0bK6049810@svn.freebsd.org> <20140903140757.GA7494@FreeBSD.org> <20140903145753.GA25935@FreeBSD.org> <54082B57.6070007@FreeBSD.org> <20140905163433.GA80322@FreeBSD.org> X-Mailer: Sylpheed 3.4.2 (GTK+ 2.24.22; amd64-portbld-freebsd11.0) Mime-Version: 1.0 Content-Type: text/plain; charset=KOI8-U Content-Transfer-Encoding: 8bit Cc: "src-committers@freebsd.org" , Ed Maste , svn-src-stable@freebsd.org, "svn-src-all@freebsd.org" , svn-src-stable-10@freebsd.org, =?KOI8-U?Q?Jean-S=E9bastien_P=E9dron?= X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 22:51:23 -0000 Hi Alexey! On Fri, 5 Sep 2014 16:34:34 +0000 Alexey Dokuchaev wrote: > On Thu, Sep 04, 2014 at 11:05:27AM +0200, Jean-Sébastien Pédron wrote: > > One bug in vt(4) was that the mouse cursor position, even if it was > > invisible before moused(8) starts, was always considered "dirty" and > > required a redraw. The default position being [0;0], each new character > > written would trigger a full refresh of the screen from [0;0] to the > > position of this character. > > For quite a while (since I started using vt(4)) I'm observing a rather > annoying thing: sometimes small area of screen would get selected like if > pressed mouse button or something. If I do a long build on the console, > periodically, white rectangle (selected area) will suddenly pop up and > scroll away. Is this a known thing? It can be very annoyting for text > editing on the console, as these sporadic "selects" are overwriting my > selection buffer contents with whatever was on the screen at that time > when they suddenly appear. (Rat itself it motionless while it happens.) Yeah, it is known. It is due different logic than in syscons(4). vt(4) save not skected text, but position inside history buffer. Return to old (well known syscons(4)) behaviour is in TODO. > > > Those two problems combined explain the slownness of vt(4), especially > > with discrete GPU and virtual machines; i915 users were mostly spared. > > > > Regarding the incorrect refresh when vt-switching, it was caused by a > > race between the redraw thread and the switch. The redraw thread was not > > stopped during a switch. Therefore, if the thread ran while the switch > > was in progress, it could mark the screen as "up-to-date" even though it > > displayed the wrong data. > > > > One change did reduce the vt-switch time specifically: in vt_vga, a > > switch triggers a clear of the video memory. The loop did read from the > > video memory, then wrote 8 black pixels. The useless read was removed. > > I must say that after I rebuilt my -CURRENT kernel today, vt(4) behaves > much nicer than few weeks ago: switching is fast, no damaged screen any- > more (both before and after I do "kldload i915kms"). Good work guys, and > thanks for explanations! > > ./danfe > -- Aleksandr Rybalko From owner-svn-src-stable-10@FreeBSD.ORG Sat Sep 6 04:39:27 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 99F8BFD0; Sat, 6 Sep 2014 04:39:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8476C1EBD; Sat, 6 Sep 2014 04:39:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s864dR66052581; Sat, 6 Sep 2014 04:39:27 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s864dQe1052576; Sat, 6 Sep 2014 04:39:26 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201409060439.s864dQe1052576@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 6 Sep 2014 04:39:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271185 - in stable/10: sys/netinet6 usr.bin/netstat X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 04:39:27 -0000 Author: markj Date: Sat Sep 6 04:39:26 2014 New Revision: 271185 URL: http://svnweb.freebsd.org/changeset/base/271185 Log: MFC r270348: Add some missing checks for unsupported interfaces (e.g. pflog(4)) when handling ioctls. While here, remove duplicated checks for a NULL ifp in in6_control(): this check is already done near the beginning of the function. MFC r270349: Suppress warnings when retrieving protocol stats from interfaces that don't support IPv6 (e.g. pflog(4)). PR: 189117 Approved by: re (gjb) Modified: stable/10/sys/netinet6/in6.c stable/10/sys/netinet6/scope6.c stable/10/sys/netinet6/scope6_var.h stable/10/usr.bin/netstat/inet6.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet6/in6.c ============================================================================== --- stable/10/sys/netinet6/in6.c Sat Sep 6 04:33:37 2014 (r271184) +++ stable/10/sys/netinet6/in6.c Sat Sep 6 04:39:26 2014 (r271185) @@ -293,7 +293,7 @@ in6_control(struct socket *so, u_long cm return (mrt6_ioctl ? mrt6_ioctl(cmd, data) : EOPNOTSUPP); } - switch(cmd) { + switch (cmd) { case SIOCAADDRCTL_POLICY: case SIOCDADDRCTL_POLICY: if (td != NULL) { @@ -365,14 +365,10 @@ in6_control(struct socket *so, u_long cm if (error) return (error); } - return (scope6_set(ifp, - (struct scope6_id *)ifr->ifr_ifru.ifru_scope_id)); + /* FALLTHROUGH */ case SIOCGSCOPE6: - return (scope6_get(ifp, - (struct scope6_id *)ifr->ifr_ifru.ifru_scope_id)); case SIOCGSCOPE6DEF: - return (scope6_get_default((struct scope6_id *) - ifr->ifr_ifru.ifru_scope_id)); + return (scope6_ioctl(cmd, data, ifp)); } switch (cmd) { @@ -503,6 +499,13 @@ in6_control(struct socket *so, u_long cm if (error) goto out; } + /* FALLTHROUGH */ + case SIOCGIFSTAT_IN6: + case SIOCGIFSTAT_ICMP6: + if (ifp->if_afdata[AF_INET6] == NULL) { + error = EPFNOSUPPORT; + goto out; + } break; case SIOCGIFADDR_IN6: @@ -578,10 +581,6 @@ in6_control(struct socket *so, u_long cm break; case SIOCGIFSTAT_IN6: - if (ifp == NULL) { - error = EINVAL; - goto out; - } COUNTER_ARRAY_COPY(((struct in6_ifextra *) ifp->if_afdata[AF_INET6])->in6_ifstat, &ifr->ifr_ifru.ifru_stat, @@ -589,10 +588,6 @@ in6_control(struct socket *so, u_long cm break; case SIOCGIFSTAT_ICMP6: - if (ifp == NULL) { - error = EINVAL; - goto out; - } COUNTER_ARRAY_COPY(((struct in6_ifextra *) ifp->if_afdata[AF_INET6])->icmp6_ifstat, &ifr->ifr_ifru.ifru_icmp6stat, @@ -825,7 +820,7 @@ in6_control(struct socket *so, u_long cm } default: - if (ifp == NULL || ifp->if_ioctl == 0) { + if (ifp->if_ioctl == NULL) { error = EOPNOTSUPP; goto out; } Modified: stable/10/sys/netinet6/scope6.c ============================================================================== --- stable/10/sys/netinet6/scope6.c Sat Sep 6 04:33:37 2014 (r271184) +++ stable/10/sys/netinet6/scope6.c Sat Sep 6 04:39:26 2014 (r271185) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -78,6 +79,9 @@ static VNET_DEFINE(struct scope6_id, sid #define SID(ifp) \ (((struct in6_ifextra *)(ifp)->if_afdata[AF_INET6])->scope6_id) +static int scope6_get(struct ifnet *, struct scope6_id *); +static int scope6_set(struct ifnet *, struct scope6_id *); + void scope6_init(void) { @@ -121,6 +125,30 @@ scope6_ifdetach(struct scope6_id *sid) } int +scope6_ioctl(u_long cmd, caddr_t data, struct ifnet *ifp) +{ + struct in6_ifreq *ifr; + + if (ifp->if_afdata[AF_INET6] == NULL) + return (EPFNOSUPPORT); + + ifr = (struct in6_ifreq *)data; + switch (cmd) { + case SIOCSSCOPE6: + return (scope6_set(ifp, + (struct scope6_id *)ifr->ifr_ifru.ifru_scope_id)); + case SIOCGSCOPE6: + return (scope6_get(ifp, + (struct scope6_id *)ifr->ifr_ifru.ifru_scope_id)); + case SIOCGSCOPE6DEF: + return (scope6_get_default( + (struct scope6_id *)ifr->ifr_ifru.ifru_scope_id)); + default: + return (EOPNOTSUPP); + } +} + +static int scope6_set(struct ifnet *ifp, struct scope6_id *idlist) { int i; @@ -183,7 +211,7 @@ scope6_set(struct ifnet *ifp, struct sco return (error); } -int +static int scope6_get(struct ifnet *ifp, struct scope6_id *idlist) { struct scope6_id *sid; @@ -202,7 +230,6 @@ scope6_get(struct ifnet *ifp, struct sco return (0); } - /* * Get a scope of the address. Node-local, link-local, site-local or global. */ Modified: stable/10/sys/netinet6/scope6_var.h ============================================================================== --- stable/10/sys/netinet6/scope6_var.h Sat Sep 6 04:33:37 2014 (r271184) +++ stable/10/sys/netinet6/scope6_var.h Sat Sep 6 04:39:26 2014 (r271185) @@ -50,8 +50,7 @@ VNET_DECLARE(int, deembed_scopeid); void scope6_init(void); struct scope6_id *scope6_ifattach(struct ifnet *); void scope6_ifdetach(struct scope6_id *); -int scope6_set(struct ifnet *, struct scope6_id *); -int scope6_get(struct ifnet *, struct scope6_id *); +int scope6_ioctl(u_long cmd, caddr_t data, struct ifnet *); void scope6_setdefault(struct ifnet *); int scope6_get_default(struct scope6_id *); u_int32_t scope6_addr2default(struct in6_addr *); Modified: stable/10/usr.bin/netstat/inet6.c ============================================================================== --- stable/10/usr.bin/netstat/inet6.c Sat Sep 6 04:33:37 2014 (r271184) +++ stable/10/usr.bin/netstat/inet6.c Sat Sep 6 04:39:26 2014 (r271185) @@ -540,13 +540,13 @@ ip6_ifstats(char *ifname) } strcpy(ifr.ifr_name, ifname); - printf("ip6 on %s:\n", ifr.ifr_name); - if (ioctl(s, SIOCGIFSTAT_IN6, (char *)&ifr) < 0) { - perror("Warning: ioctl(SIOCGIFSTAT_IN6)"); + if (errno != EPFNOSUPPORT) + perror("Warning: ioctl(SIOCGIFSTAT_IN6)"); goto end; } + printf("ip6 on %s:\n", ifr.ifr_name); p(ifs6_in_receive, "\t%ju total input datagram%s\n"); p(ifs6_in_hdrerr, "\t%ju datagram%s with invalid header received\n"); p(ifs6_in_toobig, "\t%ju datagram%s exceeded MTU received\n"); @@ -945,13 +945,13 @@ icmp6_ifstats(char *ifname) } strcpy(ifr.ifr_name, ifname); - printf("icmp6 on %s:\n", ifr.ifr_name); - if (ioctl(s, SIOCGIFSTAT_ICMP6, (char *)&ifr) < 0) { - perror("Warning: ioctl(SIOCGIFSTAT_ICMP6)"); + if (errno != EPFNOSUPPORT) + perror("Warning: ioctl(SIOCGIFSTAT_ICMP6)"); goto end; } + printf("icmp6 on %s:\n", ifr.ifr_name); p(ifs6_in_msg, "\t%ju total input message%s\n"); p(ifs6_in_error, "\t%ju total input error message%s\n"); p(ifs6_in_dstunreach, "\t%ju input destination unreachable error%s\n"); From owner-svn-src-stable-10@FreeBSD.ORG Sat Sep 6 14:17:52 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 36A1E338; Sat, 6 Sep 2014 14:17:52 +0000 (UTC) Date: Sat, 6 Sep 2014 14:17:52 +0000 From: Alexey Dokuchaev To: Aleksandr Rybalko Subject: Re: svn commit: r271023 - stable/10/sys/dev/vt Message-ID: <20140906141752.GA45915@FreeBSD.org> References: <201409031400.s83E0bK6049810@svn.freebsd.org> <20140903140757.GA7494@FreeBSD.org> <20140903145753.GA25935@FreeBSD.org> <54082B57.6070007@FreeBSD.org> <20140905163433.GA80322@FreeBSD.org> <20140906014859.1c31f3aac5c84605ec6155dc@ddteam.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140906014859.1c31f3aac5c84605ec6155dc@ddteam.net> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "src-committers@freebsd.org" , Ed Maste , svn-src-stable@freebsd.org, "svn-src-all@freebsd.org" , svn-src-stable-10@freebsd.org, =?koi8-r?Q?Jean-S=E9bastien_P=E9dron?= X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 14:17:52 -0000 On Sat, Sep 06, 2014 at 01:48:59AM +0300, Aleksandr Rybalko wrote: > On Fri, 5 Sep 2014 16:34:34 +0000 > Alexey Dokuchaev wrote: > > For quite a while (since I started using vt(4)) I'm observing a rather > > annoying thing: sometimes small area of screen would get selected like if > > pressed mouse button or something. If I do a long build on the console, > > periodically, white rectangle (selected area) will suddenly pop up and > > scroll away. Is this a known thing? It can be very annoying for text > > editing on the console, as these sporadic "selects" are overwriting my > > selection buffer contents with whatever was on the screen at that time > > when they suddenly appear. (Rat itself it motionless while it happens.) > > Yeah, it is known. It is due different logic than in syscons(4). vt(4) save > not skected text, but position inside history buffer. > Return to old (well known syscons(4)) behaviour is in TODO. Noted. It would be nice if vt(4) also regained syscons(4) feature of buffer pasting with Shift-Ins (right now I have to press the middle mouse button to do it). If you could also allow scrolling with Shift-PgUp/PgDn (akin to xterm), not just via pressing ScrollLock first, it would make vt(4) even more awesome. ./danfe From owner-svn-src-stable-10@FreeBSD.ORG Sat Sep 6 15:15:06 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C9158C5A; Sat, 6 Sep 2014 15:15:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B43421151; Sat, 6 Sep 2014 15:15:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s86FF69t051436; Sat, 6 Sep 2014 15:15:06 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s86FF6jF051435; Sat, 6 Sep 2014 15:15:06 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201409061515.s86FF6jF051435@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sat, 6 Sep 2014 15:15:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271191 - stable/10/sys/i386/i386 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 15:15:06 -0000 Author: jhb Date: Sat Sep 6 15:15:06 2014 New Revision: 271191 URL: http://svnweb.freebsd.org/changeset/base/271191 Log: MFC 270826: MFamd64: Add a machdep.bootmethod sysctl to inform the installer which firmware method was used for booting. This is hardcoded to BIOS on i386. PR: 192962 Approved by: re (gjb) Modified: stable/10/sys/i386/i386/machdep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/i386/i386/machdep.c ============================================================================== --- stable/10/sys/i386/i386/machdep.c Sat Sep 6 15:11:35 2014 (r271190) +++ stable/10/sys/i386/i386/machdep.c Sat Sep 6 15:15:06 2014 (r271191) @@ -1636,6 +1636,10 @@ u_long bootdev; /* not a struct cdev *- SYSCTL_ULONG(_machdep, OID_AUTO, guessed_bootdev, CTLFLAG_RD, &bootdev, 0, "Maybe the Boot device (not in struct cdev *format)"); +static char bootmethod[16] = "BIOS"; +SYSCTL_STRING(_machdep, OID_AUTO, bootmethod, CTLFLAG_RD, bootmethod, 0, + "System firmware boot method"); + /* * Initialize 386 and configure to run kernel */ From owner-svn-src-stable-10@FreeBSD.ORG Sat Sep 6 15:24:48 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A37BE1DB; Sat, 6 Sep 2014 15:24:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8E3A61289; Sat, 6 Sep 2014 15:24:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s86FOmnH056185; Sat, 6 Sep 2014 15:24:48 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s86FOmLs056184; Sat, 6 Sep 2014 15:24:48 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201409061524.s86FOmLs056184@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 6 Sep 2014 15:24:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271193 - stable/10/sys/dev/sound/pcm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 15:24:48 -0000 Author: mav Date: Sat Sep 6 15:24:48 2014 New Revision: 271193 URL: http://svnweb.freebsd.org/changeset/base/271193 Log: MFC r269228: Add support for SOUND_MIXER_INFO IOCTL, used by gstreamer. Submitted by: Dmitry Luhtionov Approved by: re (marius) Modified: stable/10/sys/dev/sound/pcm/mixer.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sound/pcm/mixer.c ============================================================================== --- stable/10/sys/dev/sound/pcm/mixer.c Sat Sep 6 15:23:28 2014 (r271192) +++ stable/10/sys/dev/sound/pcm/mixer.c Sat Sep 6 15:24:48 2014 (r271193) @@ -1222,6 +1222,15 @@ mixer_ioctl(struct cdev *i_dev, u_long c return (ret); } +static void +mixer_mixerinfo(struct snd_mixer *m, mixer_info *mi) +{ + bzero((void *)mi, sizeof(*mi)); + strlcpy(mi->id, m->name, sizeof(mi->id)); + strlcpy(mi->name, device_get_desc(m->dev), sizeof(mi->name)); + mi->modify_counter = m->modify_counter; +} + /* * XXX Make sure you can guarantee concurrency safety before calling this * function, be it through Giant, PCM_*, etc ! @@ -1280,6 +1289,10 @@ mixer_ioctl_cmd(struct cdev *i_dev, u_lo *arg_i = SOUND_VERSION; ret = 0; goto done; + case SOUND_MIXER_INFO: + mixer_mixerinfo(m, (mixer_info *)arg); + ret = 0; + goto done; } if ((cmd & ~0xff) == MIXER_WRITE(0)) { if (j == SOUND_MIXER_RECSRC) From owner-svn-src-stable-10@FreeBSD.ORG Sat Sep 6 15:26:39 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B35DC44E; Sat, 6 Sep 2014 15:26:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9E68112A0; Sat, 6 Sep 2014 15:26:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s86FQdi6056500; Sat, 6 Sep 2014 15:26:39 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s86FQduk056498; Sat, 6 Sep 2014 15:26:39 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201409061526.s86FQduk056498@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 6 Sep 2014 15:26:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271194 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 15:26:39 -0000 Author: mav Date: Sat Sep 6 15:26:38 2014 New Revision: 271194 URL: http://svnweb.freebsd.org/changeset/base/271194 Log: MFC r270423: Restore pre-r239157 handling of sched_yield(), when thread time slice was aborted, allowing other threads to run. Without this change thread is just rescheduled again, that was illustrated by provided test tool. PR: 192926 Submitted by: eric@vangyzen.net Approved by: re (marius) Modified: stable/10/sys/kern/sched_4bsd.c stable/10/sys/kern/sched_ule.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/sched_4bsd.c ============================================================================== --- stable/10/sys/kern/sched_4bsd.c Sat Sep 6 15:24:48 2014 (r271193) +++ stable/10/sys/kern/sched_4bsd.c Sat Sep 6 15:26:38 2014 (r271194) @@ -983,7 +983,8 @@ sched_switch(struct thread *td, struct t sched_load_rem(); td->td_lastcpu = td->td_oncpu; - preempted = !(td->td_flags & TDF_SLICEEND); + preempted = !((td->td_flags & TDF_SLICEEND) || + (flags & SWT_RELINQUISH)); td->td_flags &= ~(TDF_NEEDRESCHED | TDF_SLICEEND); td->td_owepreempt = 0; td->td_oncpu = NOCPU; Modified: stable/10/sys/kern/sched_ule.c ============================================================================== --- stable/10/sys/kern/sched_ule.c Sat Sep 6 15:24:48 2014 (r271193) +++ stable/10/sys/kern/sched_ule.c Sat Sep 6 15:26:38 2014 (r271194) @@ -1862,7 +1862,8 @@ sched_switch(struct thread *td, struct t ts->ts_rltick = ticks; td->td_lastcpu = td->td_oncpu; td->td_oncpu = NOCPU; - preempted = !(td->td_flags & TDF_SLICEEND); + preempted = !((td->td_flags & TDF_SLICEEND) || + (flags & SWT_RELINQUISH)); td->td_flags &= ~(TDF_NEEDRESCHED | TDF_SLICEEND); td->td_owepreempt = 0; if (!TD_IS_IDLETHREAD(td)) From owner-svn-src-stable-10@FreeBSD.ORG Sat Sep 6 18:04:29 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id CF001E3C; Sat, 6 Sep 2014 18:04:29 +0000 (UTC) Date: Sat, 6 Sep 2014 18:04:29 +0000 From: Alexey Dokuchaev To: Aleksandr Rybalko Subject: Re: svn commit: r271023 - stable/10/sys/dev/vt Message-ID: <20140906180429.GA24852@FreeBSD.org> References: <201409031400.s83E0bK6049810@svn.freebsd.org> <20140903140757.GA7494@FreeBSD.org> <20140903145753.GA25935@FreeBSD.org> <54082B57.6070007@FreeBSD.org> <20140905163433.GA80322@FreeBSD.org> <20140906014859.1c31f3aac5c84605ec6155dc@ddteam.net> <20140906141752.GA45915@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140906141752.GA45915@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "src-committers@freebsd.org" , Ed Maste , svn-src-stable@freebsd.org, "svn-src-all@freebsd.org" , svn-src-stable-10@freebsd.org, =?koi8-r?Q?Jean-S=E9bastien_P=E9dron?= X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 18:04:29 -0000 On Sat, Sep 06, 2014 at 02:17:52PM +0000, Alexey Dokuchaev wrote: > Noted. It would be nice if vt(4) also regained syscons(4) feature of buffer > pasting with Shift-Ins (right now I have to press the middle mouse button to > do it). I think I'm talking about this commit by ache@: https://svnweb.freebsd.org/base?view=revision&revision=74119 ./danfe From owner-svn-src-stable-10@FreeBSD.ORG Sat Sep 6 19:38:41 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 96B6AA2D; Sat, 6 Sep 2014 19:38:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7644C1C94; Sat, 6 Sep 2014 19:38:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s86JcfGX080265; Sat, 6 Sep 2014 19:38:41 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s86JcfLT080264; Sat, 6 Sep 2014 19:38:41 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201409061938.s86JcfLT080264@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sat, 6 Sep 2014 19:38:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271205 - stable/10/sys/powerpc/powermac X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 19:38:41 -0000 Author: jhibbits Date: Sat Sep 6 19:38:40 2014 New Revision: 271205 URL: http://svnweb.freebsd.org/changeset/base/271205 Log: MFC r259657,r264205,r264207: r259657: Add suspend/resume capabilities to the ATI backlight ppc driver. With this, also shut off the display (DPMS-style) and disable the clocking when the backlight level is set to 0. This is taken from the radeonkms driver (radeon_legacy_encoders.c) which doesn't yet support PowerPC. r264205,r264207: Fix the ATI backlight driver off/on handling. Now this driver works correctly with the ATI Radeon 9700 in the PowerBook G4 1.67GHz. Code shamelessly taken in spirit from the radeonkms driver, which I hope will make this driver redundant in the future. Approved by: re (marius) Relnotes: yes (not suspend/resume, but the rest) Modified: stable/10/sys/powerpc/powermac/atibl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/powerpc/powermac/atibl.c ============================================================================== --- stable/10/sys/powerpc/powermac/atibl.c Sat Sep 6 19:12:14 2014 (r271204) +++ stable/10/sys/powerpc/powermac/atibl.c Sat Sep 6 19:38:40 2014 (r271205) @@ -52,10 +52,21 @@ __FBSDID("$FreeBSD$"); #define RADEON_LVDS_BL_MOD_EN (1 << 16) #define RADEON_LVDS_DIGON (1 << 18) #define RADEON_LVDS_BLON (1 << 19) +#define RADEON_LVDS_PLL_CNTL 0x02d4 +#define RADEON_LVDS_PLL_EN (1 << 16) +#define RADEON_LVDS_PLL_RESET (1 << 17) +#define RADEON_PIXCLKS_CNTL 0x002d +#define RADEON_PIXCLK_LVDS_ALWAYS_ONb (1 << 14) +#define RADEON_DISP_PWR_MAN 0x0d08 +#define RADEON_AUTO_PWRUP_EN (1 << 26) +#define RADEON_CLOCK_CNTL_DATA 0x000c +#define RADEON_CLOCK_CNTL_INDEX 0x0008 +#define RADEON_PLL_WR_EN (1 << 7) +#define RADEON_CRTC_GEN_CNTL 0x0050 struct atibl_softc { - device_t dev; struct resource *sc_memr; + int sc_level; }; static void atibl_identify(driver_t *driver, device_t parent); @@ -63,13 +74,17 @@ static int atibl_probe(device_t dev); static int atibl_attach(device_t dev); static int atibl_setlevel(struct atibl_softc *sc, int newlevel); static int atibl_getlevel(struct atibl_softc *sc); +static int atibl_resume(device_t dev); +static int atibl_suspend(device_t dev); static int atibl_sysctl(SYSCTL_HANDLER_ARGS); static device_method_t atibl_methods[] = { /* Device interface */ - DEVMETHOD(device_identify, atibl_identify), - DEVMETHOD(device_probe, atibl_probe), - DEVMETHOD(device_attach, atibl_attach), + DEVMETHOD(device_identify, atibl_identify), + DEVMETHOD(device_probe, atibl_probe), + DEVMETHOD(device_attach, atibl_attach), + DEVMETHOD(device_suspend, atibl_suspend), + DEVMETHOD(device_resume, atibl_resume), {0, 0}, }; @@ -136,16 +151,62 @@ atibl_attach(device_t dev) tree = device_get_sysctl_tree(dev); SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, - "level", CTLTYPE_INT | CTLFLAG_RW, sc, 0, - atibl_sysctl, "I", "Backlight level (0-100)"); + "level", CTLTYPE_INT | CTLFLAG_RW, sc, 0, + atibl_sysctl, "I", "Backlight level (0-100)"); return (0); } +static uint32_t __inline +atibl_pll_rreg(struct atibl_softc *sc, uint32_t reg) +{ + uint32_t data, save, tmp; + + bus_write_1(sc->sc_memr, RADEON_CLOCK_CNTL_INDEX, + ((reg & 0x3f) | RADEON_PLL_WR_EN)); + (void)bus_read_4(sc->sc_memr, RADEON_CLOCK_CNTL_DATA); + (void)bus_read_4(sc->sc_memr, RADEON_CRTC_GEN_CNTL); + + data = bus_read_4(sc->sc_memr, RADEON_CLOCK_CNTL_DATA); + + /* Only necessary on R300, bt won't hurt others. */ + save = bus_read_4(sc->sc_memr, RADEON_CLOCK_CNTL_INDEX); + tmp = save & (~0x3f | RADEON_PLL_WR_EN); + bus_write_4(sc->sc_memr, RADEON_CLOCK_CNTL_INDEX, tmp); + tmp = bus_read_4(sc->sc_memr, RADEON_CLOCK_CNTL_DATA); + bus_write_4(sc->sc_memr, RADEON_CLOCK_CNTL_INDEX, save); + + return data; +} + +static void __inline +atibl_pll_wreg(struct atibl_softc *sc, uint32_t reg, uint32_t val) +{ + uint32_t save, tmp; + + bus_write_1(sc->sc_memr, RADEON_CLOCK_CNTL_INDEX, + ((reg & 0x3f) | RADEON_PLL_WR_EN)); + (void)bus_read_4(sc->sc_memr, RADEON_CLOCK_CNTL_DATA); + (void)bus_read_4(sc->sc_memr, RADEON_CRTC_GEN_CNTL); + + bus_write_4(sc->sc_memr, RADEON_CLOCK_CNTL_DATA, val); + DELAY(5000); + + /* Only necessary on R300, bt won't hurt others. */ + save = bus_read_4(sc->sc_memr, RADEON_CLOCK_CNTL_INDEX); + tmp = save & (~0x3f | RADEON_PLL_WR_EN); + bus_write_4(sc->sc_memr, RADEON_CLOCK_CNTL_INDEX, tmp); + tmp = bus_read_4(sc->sc_memr, RADEON_CLOCK_CNTL_DATA); + bus_write_4(sc->sc_memr, RADEON_CLOCK_CNTL_INDEX, save); +} + static int atibl_setlevel(struct atibl_softc *sc, int newlevel) { uint32_t lvds_gen_cntl; + uint32_t lvds_pll_cntl; + uint32_t pixclks_cntl; + uint32_t disp_pwr_reg; if (newlevel > 100) newlevel = 100; @@ -153,13 +214,43 @@ atibl_setlevel(struct atibl_softc *sc, i if (newlevel < 0) newlevel = 0; - newlevel = (newlevel * 5) / 2 + 5; lvds_gen_cntl = bus_read_4(sc->sc_memr, RADEON_LVDS_GEN_CNTL); - lvds_gen_cntl |= RADEON_LVDS_BL_MOD_EN; - lvds_gen_cntl &= ~RADEON_LVDS_BL_MOD_LEVEL_MASK; - lvds_gen_cntl |= (newlevel << RADEON_LVDS_BL_MOD_LEVEL_SHIFT) & - RADEON_LVDS_BL_MOD_LEVEL_MASK; - bus_write_4(sc->sc_memr, RADEON_LVDS_GEN_CNTL, lvds_gen_cntl); + + if (newlevel > 0) { + newlevel = (newlevel * 5) / 2 + 5; + disp_pwr_reg = bus_read_4(sc->sc_memr, RADEON_DISP_PWR_MAN); + disp_pwr_reg |= RADEON_AUTO_PWRUP_EN; + bus_write_4(sc->sc_memr, RADEON_DISP_PWR_MAN, disp_pwr_reg); + lvds_pll_cntl = bus_read_4(sc->sc_memr, RADEON_LVDS_PLL_CNTL); + lvds_pll_cntl |= RADEON_LVDS_PLL_EN; + bus_write_4(sc->sc_memr, RADEON_LVDS_PLL_CNTL, lvds_pll_cntl); + lvds_pll_cntl &= ~RADEON_LVDS_PLL_RESET; + bus_write_4(sc->sc_memr, RADEON_LVDS_PLL_CNTL, lvds_pll_cntl); + DELAY(1000); + + lvds_gen_cntl &= ~(RADEON_LVDS_DISPLAY_DIS | + RADEON_LVDS_BL_MOD_LEVEL_MASK); + lvds_gen_cntl |= RADEON_LVDS_ON | RADEON_LVDS_EN | + RADEON_LVDS_DIGON | RADEON_LVDS_BLON; + lvds_gen_cntl |= (newlevel << RADEON_LVDS_BL_MOD_LEVEL_SHIFT) & + RADEON_LVDS_BL_MOD_LEVEL_MASK; + lvds_gen_cntl |= RADEON_LVDS_BL_MOD_EN; + DELAY(200000); + bus_write_4(sc->sc_memr, RADEON_LVDS_GEN_CNTL, lvds_gen_cntl); + } else { + pixclks_cntl = atibl_pll_rreg(sc, RADEON_PIXCLKS_CNTL); + atibl_pll_wreg(sc, RADEON_PIXCLKS_CNTL, + pixclks_cntl & ~RADEON_PIXCLK_LVDS_ALWAYS_ONb); + lvds_gen_cntl |= RADEON_LVDS_DISPLAY_DIS; + lvds_gen_cntl &= ~(RADEON_LVDS_BL_MOD_EN | RADEON_LVDS_BL_MOD_LEVEL_MASK); + bus_write_4(sc->sc_memr, RADEON_LVDS_GEN_CNTL, lvds_gen_cntl); + lvds_gen_cntl &= ~(RADEON_LVDS_ON | RADEON_LVDS_EN); + DELAY(200000); + bus_write_4(sc->sc_memr, RADEON_LVDS_GEN_CNTL, lvds_gen_cntl); + + atibl_pll_wreg(sc, RADEON_PIXCLKS_CNTL, pixclks_cntl); + DELAY(200000); + } return (0); } @@ -173,13 +264,39 @@ atibl_getlevel(struct atibl_softc *sc) lvds_gen_cntl = bus_read_4(sc->sc_memr, RADEON_LVDS_GEN_CNTL); level = ((lvds_gen_cntl & RADEON_LVDS_BL_MOD_LEVEL_MASK) >> - RADEON_LVDS_BL_MOD_LEVEL_SHIFT); - level = ((level - 5) * 2) / 5; + RADEON_LVDS_BL_MOD_LEVEL_SHIFT); + if (level != 0) + level = ((level - 5) * 2) / 5; return (level); } static int +atibl_suspend(device_t dev) +{ + struct atibl_softc *sc; + + sc = device_get_softc(dev); + + sc->sc_level = atibl_getlevel(sc); + atibl_setlevel(sc, 0); + + return (0); +} + +static int +atibl_resume(device_t dev) +{ + struct atibl_softc *sc; + + sc = device_get_softc(dev); + + atibl_setlevel(sc, sc->sc_level); + + return (0); +} + +static int atibl_sysctl(SYSCTL_HANDLER_ARGS) { struct atibl_softc *sc; From owner-svn-src-stable-10@FreeBSD.ORG Sat Sep 6 20:16:46 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2A4EB92E; Sat, 6 Sep 2014 20:16:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 15B131FC9; Sat, 6 Sep 2014 20:16:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s86KGjgf099649; Sat, 6 Sep 2014 20:16:45 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s86KGjEh099648; Sat, 6 Sep 2014 20:16:45 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409062016.s86KGjEh099648@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 6 Sep 2014 20:16:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271210 - stable/10/share/man/man5 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 20:16:46 -0000 Author: gjb Date: Sat Sep 6 20:16:45 2014 New Revision: 271210 URL: http://svnweb.freebsd.org/changeset/base/271210 Log: MFC r271043: Update the autofs(5) manual to reflect it first appeared iN FreeBSD 10.1-RELEASE. Approved by: re (marius) Sponsored by: The FreeBSD Foundation Modified: stable/10/share/man/man5/autofs.5 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man5/autofs.5 ============================================================================== --- stable/10/share/man/man5/autofs.5 Sat Sep 6 20:03:24 2014 (r271209) +++ stable/10/share/man/man5/autofs.5 Sat Sep 6 20:16:45 2014 (r271210) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 14, 2014 +.Dd September 3, 2014 .Dt AUTOFS 5 .Os .Sh NAME @@ -90,7 +90,7 @@ filesystems specified in The .Nm driver first appeared in -.Fx 10.2 . +.Fx 10.1 . .Sh AUTHORS The .Nm From owner-svn-src-stable-10@FreeBSD.ORG Sat Sep 6 22:17:56 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 281C4E2E; Sat, 6 Sep 2014 22:17:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 07A4C1CA1; Sat, 6 Sep 2014 22:17:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s86MHtgu058746; Sat, 6 Sep 2014 22:17:55 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s86MHtgJ058741; Sat, 6 Sep 2014 22:17:55 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201409062217.s86MHtgJ058741@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Sat, 6 Sep 2014 22:17:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271211 - in stable/10/sys/ia64: ia64 include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 22:17:56 -0000 Author: marcel Date: Sat Sep 6 22:17:54 2014 New Revision: 271211 URL: http://svnweb.freebsd.org/changeset/base/271211 Log: Fix the PCPU access macros. It was found that the PCPU pointer, when held in register r13, is used outside the bounds of critical_enter() and critical_exit() by virtue of optimizations performed by the compiler. The net effect being that address computations of fields in the PCPU structure could be relative to the PCPU structure of the CPU on which the address computation was performed and not related to the CPU that executes the actual load or store operation. The typical failure mode being that the per-CPU cache of UMA got corrupted due to accesses from other CPUs. Adding more volatile decorating to the register expression does not help. The thinking being that volatile is assumed to work on memory references and not register references. Thus, the fix is to perform the address computation using a volatile inline assembly statement. Additionally, since the reference is fundamentally non-atomic on ia64 by virtue of have a distinct address computation followed by the actual load or store operation, it is required to wrap the entire PCPU access in a critical section. With PCPU_GET and friends requiring curthread now that they're in a critical section, low-level use of these macros in functions like cpu_switch() is not possible anymore. Consequently, a second order set of changes is needed to avoid using PCPU_GET and friends where curthread is either not set yet, or in the process of being changed. In those cases, explicit dereferencing of pcpup is needed. In those cases it is also possible to do that. This is a direct commit to stable/10. Approved by: re@ (marius) Modified: stable/10/sys/ia64/ia64/highfp.c stable/10/sys/ia64/ia64/machdep.c stable/10/sys/ia64/ia64/mp_machdep.c stable/10/sys/ia64/ia64/xtrace.c stable/10/sys/ia64/include/pcpu.h Modified: stable/10/sys/ia64/ia64/highfp.c ============================================================================== --- stable/10/sys/ia64/ia64/highfp.c Sat Sep 6 20:16:45 2014 (r271210) +++ stable/10/sys/ia64/ia64/highfp.c Sat Sep 6 22:17:54 2014 (r271211) @@ -171,8 +171,8 @@ ia64_highfp_save_ipi(void) td->td_pcb->pcb_fpcpu = NULL; PCPU_SET(fpcurthread, NULL); } + wakeup(PCPU_PTR(fpcurthread)); mtx_unlock_spin(&ia64_highfp_mtx); - wakeup(&PCPU_GET(fpcurthread)); return ((td != NULL) ? 1 : 0); } Modified: stable/10/sys/ia64/ia64/machdep.c ============================================================================== --- stable/10/sys/ia64/ia64/machdep.c Sat Sep 6 20:16:45 2014 (r271210) +++ stable/10/sys/ia64/ia64/machdep.c Sat Sep 6 22:17:54 2014 (r271211) @@ -458,7 +458,7 @@ cpu_switch(struct thread *old, struct th #ifdef COMPAT_FREEBSD32 ia32_savectx(oldpcb); #endif - if (PCPU_GET(fpcurthread) == old) + if (pcpup->pc_fpcurthread == old) old->td_frame->tf_special.psr |= IA64_PSR_DFH; if (!savectx(oldpcb)) { newpcb = new->td_pcb; @@ -472,13 +472,13 @@ cpu_switch(struct thread *old, struct th cpu_spinwait(); #endif - PCPU_SET(curthread, new); + pcpup->pc_curthread = new; #ifdef COMPAT_FREEBSD32 ia32_restorectx(newpcb); #endif - if (PCPU_GET(fpcurthread) == new) + if (pcpup->pc_fpcurthread == new) new->td_frame->tf_special.psr &= ~IA64_PSR_DFH; restorectx(newpcb); /* We should not get here. */ @@ -500,7 +500,7 @@ cpu_throw(struct thread *old __unused, s cpu_spinwait(); #endif - PCPU_SET(curthread, new); + pcpup->pc_curthread = new; #ifdef COMPAT_FREEBSD32 ia32_restorectx(newpcb); @@ -833,7 +833,7 @@ ia64_init(void) pcpu_init(pcpup, 0, sizeof(pcpu0)); dpcpu_init(ia64_physmem_alloc(DPCPU_SIZE, PAGE_SIZE), 0); cpu_pcpu_setup(pcpup, ~0U, ia64_get_lid()); - PCPU_SET(curthread, &thread0); + pcpup->pc_curthread = &thread0; /* * Initialize the console before we print anything out. Modified: stable/10/sys/ia64/ia64/mp_machdep.c ============================================================================== --- stable/10/sys/ia64/ia64/mp_machdep.c Sat Sep 6 20:16:45 2014 (r271210) +++ stable/10/sys/ia64/ia64/mp_machdep.c Sat Sep 6 22:17:54 2014 (r271211) @@ -222,7 +222,7 @@ ia64_ap_startup(void) ia64_ap_state.as_trace = 0x108; - vhpt = PCPU_GET(md.vhpt); + vhpt = pcpup->pc_md.vhpt; map_vhpt(vhpt); ia64_set_pta(vhpt + (1 << 8) + (pmap_vhpt_log2size << 2) + 1); ia64_srlz_i(); @@ -246,8 +246,8 @@ ia64_ap_startup(void) cpu_spinwait(); /* Initialize curthread. */ - KASSERT(PCPU_GET(idlethread) != NULL, ("no idle thread")); - PCPU_SET(curthread, PCPU_GET(idlethread)); + KASSERT(pcpup->pc_idlethread != NULL, ("no idle thread")); + pcpup->pc_curthread = pcpup->pc_idlethread; pmap_invalidate_all(); Modified: stable/10/sys/ia64/ia64/xtrace.c ============================================================================== --- stable/10/sys/ia64/ia64/xtrace.c Sat Sep 6 20:16:45 2014 (r271210) +++ stable/10/sys/ia64/ia64/xtrace.c Sat Sep 6 22:17:54 2014 (r271211) @@ -94,7 +94,7 @@ ia64_xtrace_init_common(vm_paddr_t pa) __asm __volatile("mov psr.l=%0" :: "r" (psr)); ia64_srlz_i(); - PCPU_SET(md.xtrace_tail, ia64_xtrace_base); + pcpup->pc_md.xtrace_tail = ia64_xtrace_base; ia64_set_k3(ia64_xtrace_base); } @@ -119,7 +119,7 @@ ia64_xtrace_init_ap(void *buf) ia64_set_k3(0); return; } - PCPU_SET(md.xtrace_buffer, buf); + pcpup->pc_md.xtrace_buffer = buf; pa = ia64_tpa((uintptr_t)buf); ia64_xtrace_init_common(pa); } @@ -140,7 +140,7 @@ ia64_xtrace_init_bsp(void) ia64_set_k3(0); return; } - PCPU_SET(md.xtrace_buffer, buf); + pcpup->pc_md.xtrace_buffer = buf; pa = IA64_RR_MASK((uintptr_t)buf); ia64_xtrace_init_common(pa); } Modified: stable/10/sys/ia64/include/pcpu.h ============================================================================== --- stable/10/sys/ia64/include/pcpu.h Sat Sep 6 20:16:45 2014 (r271210) +++ stable/10/sys/ia64/include/pcpu.h Sat Sep 6 22:17:54 2014 (r271211) @@ -31,6 +31,7 @@ #define _MACHINE_PCPU_H_ #include +#include #include struct pcpu_stats { @@ -85,16 +86,48 @@ __curthread(void) } #define curthread (__curthread()) -#define PCPU_GET(member) (pcpup->pc_ ## member) +#define __pcpu_offset(name) __offsetof(struct pcpu, name) +#define __pcpu_type(name) __typeof(((struct pcpu *)0)->name) + +#define PCPU_ADD(name, val) \ + do { \ + __pcpu_type(pc_ ## name) *nmp; \ + critical_enter(); \ + __asm __volatile("add %0=%1,r13;;" : \ + "=r"(nmp) : "i"(__pcpu_offset(pc_ ## name))); \ + *nmp += val; \ + critical_exit(); \ + } while (0) + +#define PCPU_GET(name) \ + ({ __pcpu_type(pc_ ## name) *nmp; \ + __pcpu_type(pc_ ## name) res; \ + critical_enter(); \ + __asm __volatile("add %0=%1,r13;;" : \ + "=r"(nmp) : "i"(__pcpu_offset(pc_ ## name))); \ + res = *nmp; \ + critical_exit(); \ + res; \ + }) -/* - * XXX The implementation of this operation should be made atomic - * with respect to preemption. - */ -#define PCPU_ADD(member, value) (pcpup->pc_ ## member += (value)) #define PCPU_INC(member) PCPU_ADD(member, 1) -#define PCPU_PTR(member) (&pcpup->pc_ ## member) -#define PCPU_SET(member,value) (pcpup->pc_ ## member = (value)) + +#define PCPU_PTR(name) \ + ({ __pcpu_type(pc_ ## name) *nmp; \ + __asm __volatile("add %0=%1,r13;;" : \ + "=r"(nmp) : "i"(__pcpu_offset(pc_ ## name))); \ + nmp; \ + }) + +#define PCPU_SET(name, val) \ + do { \ + __pcpu_type(pc_ ## name) *nmp; \ + critical_enter(); \ + __asm __volatile("add %0=%1,r13;;" : \ + "=r"(nmp) : "i"(__pcpu_offset(pc_ ## name))); \ + *nmp = val; \ + critical_exit(); \ + } while (0) #endif /* _KERNEL */ From owner-svn-src-stable-10@FreeBSD.ORG Sat Sep 6 22:37:48 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7F986493; Sat, 6 Sep 2014 22:37:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 473D21E23; Sat, 6 Sep 2014 22:37:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s86Mbm5o068311; Sat, 6 Sep 2014 22:37:48 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s86Mbm05068310; Sat, 6 Sep 2014 22:37:48 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201409062237.s86Mbm05068310@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sat, 6 Sep 2014 22:37:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271212 - stable/10/sys/powerpc/aim X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 22:37:48 -0000 Author: jhibbits Date: Sat Sep 6 22:37:47 2014 New Revision: 271212 URL: http://svnweb.freebsd.org/changeset/base/271212 Log: MFC r269701: Set the si_code appropriately for exception-caused signals. LLDB checks the si_code, and aborts if a code isn't known. Approved by: re (gjb) Relnotes: yes Modified: stable/10/sys/powerpc/aim/trap.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/powerpc/aim/trap.c ============================================================================== --- stable/10/sys/powerpc/aim/trap.c Sat Sep 6 22:17:54 2014 (r271211) +++ stable/10/sys/powerpc/aim/trap.c Sat Sep 6 22:37:47 2014 (r271212) @@ -197,6 +197,7 @@ trap(struct trapframe *frame) case EXC_TRC: frame->srr1 &= ~PSL_SE; sig = SIGTRAP; + ucode = TRAP_TRACE; break; #ifdef __powerpc64__ @@ -204,13 +205,17 @@ trap(struct trapframe *frame) case EXC_DSE: if (handle_user_slb_spill(&p->p_vmspace->vm_pmap, (type == EXC_ISE) ? frame->srr0 : - frame->cpu.aim.dar) != 0) + frame->cpu.aim.dar) != 0) { sig = SIGSEGV; + ucode = SEGV_MAPERR; + } break; #endif case EXC_DSI: case EXC_ISI: sig = trap_pfault(frame, 1); + if (sig == SIGSEGV) + ucode = SEGV_MAPERR; break; case EXC_SC: @@ -245,8 +250,10 @@ trap(struct trapframe *frame) break; case EXC_ALI: - if (fix_unaligned(td, frame) != 0) + if (fix_unaligned(td, frame) != 0) { sig = SIGBUS; + ucode = BUS_ADRALN; + } else frame->srr0 += 4; break; @@ -264,8 +271,16 @@ trap(struct trapframe *frame) } #endif sig = SIGTRAP; + ucode = TRAP_BRKPT; } else { sig = ppc_instr_emulate(frame, td->td_pcb); + if (sig == SIGILL) { + if (frame->srr1 & EXC_PGM_PRIV) + ucode = ILL_PRVOPC; + else if (frame->srr1 & EXC_PGM_ILLEGAL) + ucode = ILL_ILLOPC; + } else if (sig == SIGFPE) + ucode = FPE_FLTINV; /* Punt for now, invalid operation. */ } break; @@ -276,6 +291,7 @@ trap(struct trapframe *frame) * but it at least prevents the kernel from dying. */ sig = SIGBUS; + ucode = BUS_OBJERR; break; default: